@phillips/seldon 1.272.0 → 1.273.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs +1 -1
- package/dist/_virtual/index.js +3 -5
- package/dist/_virtual/index10.cjs +1 -1
- package/dist/_virtual/index10.js +2 -2
- package/dist/_virtual/index12.js +2 -2
- package/dist/_virtual/index13.js +2 -2
- package/dist/_virtual/index2.cjs +1 -1
- package/dist/_virtual/index2.js +5 -3
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.js +2 -2
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/AccordionItem.cjs +1 -1
- package/dist/components/Accordion/AccordionItem.js +9 -9
- package/dist/components/Accordion/utils.cjs +1 -1
- package/dist/components/Accordion/utils.js +1 -1
- package/dist/components/AddToCalendar/AddToCalendar.cjs +1 -1
- package/dist/components/AddToCalendar/AddToCalendar.js +19 -20
- package/dist/components/Article/Article.cjs +1 -1
- package/dist/components/Article/Article.js +6 -6
- package/dist/components/Banner/Banner.cjs +1 -1
- package/dist/components/Banner/Banner.js +8 -8
- package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/Breadcrumb/BreadcrumbItem.cjs +1 -1
- package/dist/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.js +1 -1
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.js +18 -18
- package/dist/components/Carousel/Carousel.cjs +1 -1
- package/dist/components/Carousel/Carousel.js +4 -4
- package/dist/components/Carousel/CarouselArrows.cjs +1 -1
- package/dist/components/Carousel/CarouselArrows.js +1 -1
- package/dist/components/Carousel/CarouselContent.cjs +1 -1
- package/dist/components/Carousel/CarouselContent.js +1 -1
- package/dist/components/Carousel/CarouselDot.cjs +1 -1
- package/dist/components/Carousel/CarouselDot.js +1 -1
- package/dist/components/Carousel/CarouselDots.cjs +1 -1
- package/dist/components/Carousel/CarouselDots.js +1 -1
- package/dist/components/Carousel/CarouselItem.cjs +1 -1
- package/dist/components/Carousel/CarouselItem.js +1 -1
- package/dist/components/Collapsible/Collapsible.cjs +1 -1
- package/dist/components/Collapsible/Collapsible.js +1 -1
- package/dist/components/Collapsible/CollapsibleContent.cjs +1 -1
- package/dist/components/Collapsible/CollapsibleContent.js +1 -1
- package/dist/components/Collapsible/CollapsibleTrigger.cjs +1 -1
- package/dist/components/Collapsible/CollapsibleTrigger.js +1 -1
- package/dist/components/ComboBox/ComboBox.cjs +1 -1
- package/dist/components/ComboBox/ComboBox.js +139 -224
- package/dist/components/ComposedModal/ComposedModal.cjs +1 -1
- package/dist/components/ComposedModal/ComposedModal.js +8 -8
- package/dist/components/ContentPeek/ContentPeek.cjs +1 -1
- package/dist/components/ContentPeek/ContentPeek.js +3 -3
- package/dist/components/Countdown/Countdown.cjs +1 -1
- package/dist/components/Countdown/Countdown.js +17 -17
- package/dist/components/Countdown/Duration.cjs +1 -1
- package/dist/components/Countdown/Duration.js +4 -4
- package/dist/components/DescriptiveRadioButton/DescriptiveRadioButton.cjs +1 -1
- package/dist/components/DescriptiveRadioButton/DescriptiveRadioButton.js +1 -1
- package/dist/components/DescriptiveRadioButtonGroup/DescriptiveRadioButtonGroup.cjs +1 -1
- package/dist/components/DescriptiveRadioButtonGroup/DescriptiveRadioButtonGroup.js +1 -1
- package/dist/components/Detail/Detail.cjs +1 -1
- package/dist/components/Detail/Detail.js +1 -1
- package/dist/components/DetailList/DetailList.cjs +1 -1
- package/dist/components/DetailList/DetailList.js +1 -1
- package/dist/components/Divider/Divider.cjs +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Drawer/Drawer.cjs +1 -1
- package/dist/components/Drawer/Drawer.js +1 -1
- package/dist/components/Drawer/DrawerHeader.cjs +1 -1
- package/dist/components/Drawer/DrawerHeader.js +4 -4
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/ExitGateCard/ExitGateCard.cjs +1 -1
- package/dist/components/ExitGateCard/ExitGateCard.js +19 -20
- package/dist/components/FavoritingTileButton/FavoritingTileButton.cjs +1 -1
- package/dist/components/FavoritingTileButton/FavoritingTileButton.js +1 -1
- package/dist/components/Filter/Filter.cjs +1 -1
- package/dist/components/Filter/Filter.js +5 -5
- package/dist/components/Filter/FilterHeader.cjs +1 -1
- package/dist/components/Filter/FilterHeader.js +6 -6
- package/dist/components/Grid/Grid.cjs +1 -1
- package/dist/components/Grid/Grid.js +1 -1
- package/dist/components/Grid/utils.cjs +1 -1
- package/dist/components/Grid/utils.js +1 -1
- package/dist/components/GridItem/GridItem.cjs +1 -1
- package/dist/components/GridItem/GridItem.js +1 -1
- package/dist/components/Icon/Icon.cjs +1 -1
- package/dist/components/Icon/Icon.js +1 -1
- package/dist/components/IconButton/IconButton.cjs +1 -1
- package/dist/components/IconButton/IconButton.js +1 -1
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +6 -6
- package/dist/components/Input/utils.cjs +1 -1
- package/dist/components/Input/utils.js +2 -100
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/Link/types.cjs +1 -1
- package/dist/components/Link/types.js +0 -1
- package/dist/components/LinkBlock/LinkBlock.cjs +1 -1
- package/dist/components/LinkBlock/LinkBlock.js +5 -5
- package/dist/components/LinkList/LinkList.cjs +1 -1
- package/dist/components/LinkList/LinkList.js +1 -1
- package/dist/components/Loader/Loader.cjs +1 -1
- package/dist/components/Loader/Loader.js +1 -1
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.js +18 -18
- package/dist/components/Navigation/Navigation.cjs +1 -1
- package/dist/components/Navigation/Navigation.js +2 -2
- package/dist/components/Navigation/NavigationItem/NavigationItem.cjs +1 -1
- package/dist/components/Navigation/NavigationItem/NavigationItem.js +1 -1
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationDesktopSubmenu.cjs +1 -1
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationDesktopSubmenu.js +5 -5
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.cjs +1 -1
- package/dist/components/Navigation/NavigationItemWithSubmenu/NavigationItemWithSubmenu.js +8 -8
- package/dist/components/Navigation/NavigationList/NavigationList.cjs +1 -1
- package/dist/components/Navigation/NavigationList/NavigationList.js +1 -1
- package/dist/components/Navigation/NavigationSubmenu/NavigationSubmenu.cjs +1 -1
- package/dist/components/Navigation/NavigationSubmenu/NavigationSubmenu.js +5 -5
- package/dist/components/NotificationBanner/NotificationBanner.cjs +1 -1
- package/dist/components/NotificationBanner/NotificationBanner.js +1 -1
- package/dist/components/PageContentWrapper/PageContentWrapper.cjs +1 -1
- package/dist/components/PageContentWrapper/PageContentWrapper.js +1 -1
- package/dist/components/Pagination/Pagination.cjs +1 -1
- package/dist/components/Pagination/Pagination.js +1 -1
- package/dist/components/Pictogram/Pictogram.cjs +1 -1
- package/dist/components/Pictogram/Pictogram.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.cjs +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.cjs +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +5 -5
- package/dist/components/ProgressIndicator/ProgressIndicator.cjs +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.js +5 -5
- package/dist/components/Row/Row.cjs +1 -1
- package/dist/components/Row/Row.js +1 -1
- package/dist/components/Search/Search.cjs +1 -1
- package/dist/components/Search/Search.js +16 -16
- package/dist/components/SeldonImage/SeldonImage.cjs +1 -1
- package/dist/components/SeldonImage/SeldonImage.js +2 -2
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +9 -9
- package/dist/components/SplitPanel/SplitPanel.cjs +1 -1
- package/dist/components/SplitPanel/SplitPanel.js +1 -1
- package/dist/components/Tabs/TabsContainer.cjs +1 -1
- package/dist/components/Tabs/TabsContainer.js +5 -5
- package/dist/components/Tabs/TabsContent.cjs +1 -1
- package/dist/components/Tabs/TabsContent.js +1 -1
- package/dist/components/Tags/Tags.cjs +1 -1
- package/dist/components/Tags/Tags.js +8 -8
- package/dist/components/Text/Text.cjs +1 -1
- package/dist/components/Text/Text.js +1 -1
- package/dist/components/TextArea/TextArea.cjs +1 -1
- package/dist/components/TextArea/TextArea.js +7 -7
- package/dist/components/TextSymbol/TextSymbol.cjs +1 -1
- package/dist/components/TextSymbol/TextSymbol.js +1 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.js +5 -5
- package/dist/components/Toast/ToastContextProvider.js +3 -3
- package/dist/components/Video/Video.cjs +1 -1
- package/dist/components/Video/Video.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +277 -279
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-popper/dist/index.js +6 -6
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-popper/dist/index.js +6 -6
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-toast/dist/index.js +3 -3
- package/dist/node_modules/ics/dist/index.cjs +1 -1
- package/dist/node_modules/ics/dist/index.js +1 -1
- package/dist/node_modules/ics/dist/schema/index.cjs +1 -1
- package/dist/node_modules/ics/dist/schema/index.js +1 -1
- package/dist/node_modules/ics/dist/utils/index.cjs +1 -1
- package/dist/node_modules/ics/dist/utils/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.cjs +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.cjs +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +3 -3
- package/dist/patterns/AccountPageHeader/AccountPageHeader.cjs +1 -1
- package/dist/patterns/AccountPageHeader/AccountPageHeader.js +8 -8
- package/dist/patterns/BidSnapshot/BidMessage.cjs +1 -1
- package/dist/patterns/BidSnapshot/BidMessage.js +5 -5
- package/dist/patterns/BidSnapshot/BidSnapshot.cjs +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +12 -13
- package/dist/patterns/CountryPicker/CountryPickerCountryList.cjs +1 -1
- package/dist/patterns/CountryPicker/CountryPickerCountryList.js +4 -4
- package/dist/patterns/CountryPicker/CountryPickerModal.cjs +1 -1
- package/dist/patterns/CountryPicker/CountryPickerModal.js +10 -10
- package/dist/patterns/CountryPicker/CountryPickerOption.cjs +1 -1
- package/dist/patterns/CountryPicker/CountryPickerOption.js +1 -1
- package/dist/patterns/CountryPicker/CountryPickerTrigger.cjs +1 -1
- package/dist/patterns/CountryPicker/CountryPickerTrigger.js +10 -10
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.cjs +1 -1
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +14 -14
- package/dist/patterns/FilterMenu/FilterMenu.cjs +1 -1
- package/dist/patterns/FilterMenu/FilterMenu.js +1 -1
- package/dist/patterns/FiltersInline/FilterButton.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterButton.js +10 -10
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuDesktop.js +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.cjs +1 -1
- package/dist/patterns/FiltersInline/FilterDropdownMenuMobile.js +1 -1
- package/dist/patterns/FiltersInline/FiltersInline.cjs +1 -1
- package/dist/patterns/FiltersInline/FiltersInline.js +1 -1
- package/dist/patterns/FiltersInline/MainFilterDropdown.cjs +1 -1
- package/dist/patterns/FiltersInline/MainFilterDropdown.js +1 -1
- package/dist/patterns/HeroBanner/HeroBanner.cjs +1 -1
- package/dist/patterns/HeroBanner/HeroBanner.js +5 -5
- package/dist/patterns/LanguageSelector/LanguageSelector.cjs +1 -1
- package/dist/patterns/LanguageSelector/LanguageSelector.js +25 -26
- package/dist/patterns/ObjectTile/ObjectTile.cjs +1 -1
- package/dist/patterns/ObjectTile/ObjectTile.js +19 -19
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.cjs +1 -1
- package/dist/patterns/PhoneNumberInput/PhoneNumberInput.js +1 -1
- package/dist/patterns/ProgressWizard/ProgressWizard.cjs +1 -1
- package/dist/patterns/ProgressWizard/ProgressWizard.js +5 -5
- package/dist/patterns/SaleCard/SaleCard.cjs +1 -1
- package/dist/patterns/SaleCard/SaleCard.js +11 -11
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.cjs +1 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBanner.js +16 -16
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.cjs +1 -1
- package/dist/patterns/SaleHeaderBanner/SaleHeaderBrowseAuctions.js +6 -7
- package/dist/patterns/Social/Social.cjs +1 -1
- package/dist/patterns/Social/Social.js +4 -4
- package/dist/patterns/Subscribe/Subscribe.cjs +1 -1
- package/dist/patterns/Subscribe/Subscribe.js +2 -2
- package/dist/patterns/TextBanner/TextBanner.cjs +1 -1
- package/dist/patterns/TextBanner/TextBanner.js +2 -2
- package/dist/patterns/UserManagement/UserManagement.cjs +1 -1
- package/dist/patterns/UserManagement/UserManagement.js +7 -7
- package/dist/patterns/ViewingDetails/ViewingDetails.cjs +1 -1
- package/dist/patterns/ViewingDetails/ViewingDetails.js +7 -7
- package/dist/patterns/ViewingsList/ViewingsList.cjs +1 -1
- package/dist/patterns/ViewingsList/ViewingsList.js +1 -1
- package/dist/patterns/ViewingsList/ViewingsListCard.cjs +1 -1
- package/dist/patterns/ViewingsList/ViewingsListCard.js +1 -1
- package/dist/patterns/ViewingsList/ViewingsListCardForm.cjs +1 -1
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +1 -1
- package/dist/providers/SeldonProvider/utils.cjs +1 -1
- package/dist/providers/SeldonProvider/utils.js +1 -1
- package/dist/site-furniture/Footer/Footer.cjs +1 -1
- package/dist/site-furniture/Footer/Footer.js +4 -4
- package/dist/site-furniture/Header/Header.cjs +1 -1
- package/dist/site-furniture/Header/Header.js +14 -14
- package/package.json +5 -1
|
@@ -1,314 +1,229 @@
|
|
|
1
|
-
import { jsxs as T, jsx as
|
|
2
|
-
import { Root as
|
|
3
|
-
import
|
|
4
|
-
import { Command as
|
|
5
|
-
import
|
|
6
|
-
import { useOnClickOutside as
|
|
7
|
-
import "../../
|
|
8
|
-
import "../../assets/formatted/AccountActive.js";
|
|
9
|
-
import "../../assets/formatted/Add.js";
|
|
10
|
-
import "../../assets/formatted/AdminCheck.js";
|
|
11
|
-
import "../../assets/formatted/AdminChevronLeft.js";
|
|
12
|
-
import "../../assets/formatted/AdminChevronRight.js";
|
|
13
|
-
import "../../assets/formatted/AdminChevronUp.js";
|
|
14
|
-
import "../../assets/formatted/AdminClose.js";
|
|
15
|
-
import "../../assets/formatted/AdminFullscreen.js";
|
|
16
|
-
import "../../assets/formatted/AdminFullscreenExit.js";
|
|
17
|
-
import "../../assets/formatted/AdminGavel.js";
|
|
18
|
-
import "../../assets/formatted/AdminHome.js";
|
|
19
|
-
import "../../assets/formatted/AdminLiveOnline.js";
|
|
20
|
-
import "../../assets/formatted/AdminPencil.js";
|
|
21
|
-
import "../../assets/formatted/AdminPerson.js";
|
|
22
|
-
import "../../assets/formatted/AdminPlay.js";
|
|
23
|
-
import "../../assets/formatted/AdminSearch.js";
|
|
24
|
-
import "../../assets/formatted/AdminTelephone.js";
|
|
25
|
-
import "../../assets/formatted/AppleAppStoreBadge.js";
|
|
26
|
-
import "../../assets/formatted/ArrowDown.js";
|
|
27
|
-
import "../../assets/formatted/ArrowLeft.js";
|
|
28
|
-
import "../../assets/formatted/ArrowRight.js";
|
|
29
|
-
import "../../assets/formatted/ArrowUp.js";
|
|
30
|
-
import "../../assets/formatted/Bag.js";
|
|
31
|
-
import "../../assets/formatted/Calendar.js";
|
|
32
|
-
import "../../assets/formatted/Card.js";
|
|
33
|
-
import Tt from "../../assets/formatted/ChevronDown.js";
|
|
34
|
-
import "../../assets/formatted/ChevronLeft.js";
|
|
35
|
-
import "../../assets/formatted/ChevronRight.js";
|
|
36
|
-
import "../../assets/formatted/ChevronUp.js";
|
|
37
|
-
import "../../assets/formatted/Clock.js";
|
|
38
|
-
import xt from "../../assets/formatted/CloseX.js";
|
|
39
|
-
import "../../assets/formatted/ConditionReport.js";
|
|
40
|
-
import "../../assets/formatted/Delete.js";
|
|
41
|
-
import "../../assets/formatted/Download.js";
|
|
42
|
-
import "../../assets/formatted/Edit.js";
|
|
43
|
-
import "../../assets/formatted/Email.js";
|
|
44
|
-
import "../../assets/formatted/Error.js";
|
|
45
|
-
import "../../assets/formatted/ExternalLink.js";
|
|
46
|
-
import "../../assets/formatted/Facebook.js";
|
|
47
|
-
import "../../assets/formatted/Favorite.js";
|
|
48
|
-
import "../../assets/formatted/FavoriteActive.js";
|
|
49
|
-
import "../../assets/formatted/Filters.js";
|
|
50
|
-
import "../../assets/formatted/Fullscreen.js";
|
|
51
|
-
import "../../assets/formatted/FullscreenExit.js";
|
|
52
|
-
import "../../assets/formatted/Gavel.js";
|
|
53
|
-
import "../../assets/formatted/GavelActive.js";
|
|
54
|
-
import "../../assets/formatted/Grid.js";
|
|
55
|
-
import "../../assets/formatted/Hide.js";
|
|
56
|
-
import "../../assets/formatted/Home.js";
|
|
57
|
-
import "../../assets/formatted/HomeActive.js";
|
|
58
|
-
import "../../assets/formatted/Icon.js";
|
|
59
|
-
import "../../assets/formatted/IconBlueCircle.js";
|
|
60
|
-
import "../../assets/formatted/IconGreenCircle.js";
|
|
61
|
-
import "../../assets/formatted/IconOrangeCircle.js";
|
|
62
|
-
import "../../assets/formatted/IconRedCircle.js";
|
|
63
|
-
import "../../assets/formatted/ImageUnavailable.js";
|
|
64
|
-
import "../../assets/formatted/Instagram.js";
|
|
65
|
-
import "../../assets/formatted/LinkedIn.js";
|
|
66
|
-
import "../../assets/formatted/List.js";
|
|
67
|
-
import "../../assets/formatted/LiveNow.js";
|
|
68
|
-
import "../../assets/formatted/Lock.js";
|
|
69
|
-
import "../../assets/formatted/MagnificentSeven.js";
|
|
70
|
-
import "../../assets/formatted/Menu.js";
|
|
71
|
-
import "../../assets/formatted/Mute.js";
|
|
72
|
-
import "../../assets/formatted/Paddle.js";
|
|
73
|
-
import "../../assets/formatted/Pause.js";
|
|
74
|
-
import "../../assets/formatted/PhillipsAppIcon.js";
|
|
75
|
-
import "../../assets/formatted/PhillipsLogo.js";
|
|
76
|
-
import "../../assets/formatted/Play.js";
|
|
77
|
-
import "../../assets/formatted/Red.js";
|
|
78
|
-
import "../../assets/formatted/Refresh.js";
|
|
79
|
-
import "../../assets/formatted/Search.js";
|
|
80
|
-
import "../../assets/formatted/Sell.js";
|
|
81
|
-
import "../../assets/formatted/SellActive.js";
|
|
82
|
-
import "../../assets/formatted/Settings.js";
|
|
83
|
-
import "../../assets/formatted/Share.js";
|
|
84
|
-
import "../../assets/formatted/Subtract.js";
|
|
85
|
-
import "../../assets/formatted/Success.js";
|
|
86
|
-
import "../../assets/formatted/Tooltip.js";
|
|
87
|
-
import "../../assets/formatted/TwitterX.js";
|
|
88
|
-
import "../../assets/formatted/Upload.js";
|
|
89
|
-
import "../../assets/formatted/View.js";
|
|
90
|
-
import "../../assets/formatted/VolumeMaximum.js";
|
|
91
|
-
import "../../assets/formatted/VolumeMid.js";
|
|
92
|
-
import "../../assets/formatted/VolumeMinimum.js";
|
|
93
|
-
import "../../assets/formatted/WeChat.js";
|
|
94
|
-
import { getCommonProps as Ot, useNormalizedInputProps as kt } from "../../utils/index.js";
|
|
1
|
+
import { jsxs as T, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Root as he, Trigger as _e, Portal as ve, Content as be } from "../../node_modules/@radix-ui/react-popover/dist/index.js";
|
|
3
|
+
import p from "../../_virtual/index2.js";
|
|
4
|
+
import { Command as Ce, CommandInput as ye, CommandList as $e, CommandGroup as we, CommandItem as ge } from "../../node_modules/cmdk/dist/index.js";
|
|
5
|
+
import Ne, { useState as B, useCallback as g, useRef as x, useMemo as O } from "react";
|
|
6
|
+
import { useOnClickOutside as Ie } from "../../node_modules/usehooks-ts/dist/index.js";
|
|
7
|
+
import { getCommonProps as Te, useNormalizedInputProps as xe } from "../../utils/index.js";
|
|
95
8
|
import W from "../IconButton/IconButton.js";
|
|
96
9
|
import { ButtonVariants as X } from "../Button/types.js";
|
|
97
|
-
import { usePrevious as
|
|
98
|
-
import
|
|
99
|
-
import
|
|
100
|
-
|
|
101
|
-
|
|
10
|
+
import { usePrevious as Oe } from "../../utils/usePrevious.js";
|
|
11
|
+
import ke from "../Text/Text.js";
|
|
12
|
+
import { TextVariants as Le } from "../Text/types.js";
|
|
13
|
+
import Ve from "../../assets/formatted/CloseX.js";
|
|
14
|
+
import De from "../../assets/formatted/ChevronDown.js";
|
|
15
|
+
const Me = Ne.forwardRef(function({
|
|
16
|
+
options: i = [],
|
|
102
17
|
className: H,
|
|
103
|
-
id:
|
|
18
|
+
id: n,
|
|
104
19
|
labelText: S,
|
|
105
20
|
placeholder: J,
|
|
106
21
|
name: k,
|
|
107
|
-
value:
|
|
108
|
-
onChange:
|
|
22
|
+
value: m,
|
|
23
|
+
onChange: f,
|
|
109
24
|
onBlur: Q,
|
|
110
25
|
renderOption: j,
|
|
111
26
|
ariaLabelDropdown: L,
|
|
112
27
|
ariaLabelInput: Y,
|
|
113
28
|
ariaLabelClear: Z,
|
|
114
|
-
ariaLabelContent:
|
|
115
|
-
hideLabel:
|
|
116
|
-
popoverContainerRef:
|
|
117
|
-
noOptionsMessage:
|
|
29
|
+
ariaLabelContent: ee,
|
|
30
|
+
hideLabel: te = !1,
|
|
31
|
+
popoverContainerRef: ae,
|
|
32
|
+
noOptionsMessage: le = "No Options.",
|
|
118
33
|
invalid: N = !1,
|
|
119
|
-
invalidText:
|
|
34
|
+
invalidText: re,
|
|
120
35
|
countOfCharsBeforeDropdown: q = 0,
|
|
121
|
-
...
|
|
36
|
+
...se
|
|
122
37
|
}, V) {
|
|
123
|
-
const { className:
|
|
124
|
-
id:
|
|
38
|
+
const { className: t, ...ne } = Te({ id: n }, "ComboBox"), oe = De, ie = Ve, z = xe({
|
|
39
|
+
id: n,
|
|
125
40
|
invalid: N,
|
|
126
|
-
invalidText:
|
|
41
|
+
invalidText: re,
|
|
127
42
|
type: "text"
|
|
128
|
-
}), [
|
|
129
|
-
if (
|
|
130
|
-
const
|
|
131
|
-
return
|
|
43
|
+
}), [d, G] = B(!1), [ce, ue] = B(""), K = Oe(m), D = g((e) => e.label || e.value, []), [l, b] = B(() => {
|
|
44
|
+
if (m !== void 0) {
|
|
45
|
+
const e = i.find((a) => a.value === m);
|
|
46
|
+
return e ? e.displayValue || D(e) : "";
|
|
132
47
|
}
|
|
133
48
|
return "";
|
|
134
|
-
}), C = x(null), y = x(null), $ = x(!1), M = x(null),
|
|
135
|
-
if (!
|
|
136
|
-
return
|
|
137
|
-
const
|
|
138
|
-
return
|
|
139
|
-
const w =
|
|
49
|
+
}), C = x(null), y = x(null), $ = x(!1), M = x(null), c = g((e) => D(e), [D]), h = m !== void 0, R = h ? m : ce, s = O(() => i.find((e) => e.value === R) || null, [i, R]), _ = O(() => s ? s.displayValue || c(s) : "", [s, c]), u = O(() => {
|
|
50
|
+
if (!l || s && l === _)
|
|
51
|
+
return i;
|
|
52
|
+
const e = l.toLowerCase().trim();
|
|
53
|
+
return i.filter((a) => {
|
|
54
|
+
const w = c(a).toLowerCase().includes(e), P = a.value.toLowerCase().includes(e), A = a.displayValue?.toLowerCase().includes(e) || !1;
|
|
140
55
|
let v = !1;
|
|
141
|
-
return
|
|
56
|
+
return a.filterTerms && a.filterTerms.length > 0 && (v = a.filterTerms.some((pe) => pe.toLowerCase().includes(e))), w || P || A || v;
|
|
142
57
|
});
|
|
143
|
-
}, [
|
|
144
|
-
(
|
|
145
|
-
const w = (
|
|
146
|
-
(!
|
|
58
|
+
}, [l, _, s, c, i]), o = g(
|
|
59
|
+
(e, a) => {
|
|
60
|
+
const w = (a?.length || l.length) >= q;
|
|
61
|
+
(!e || e && w) && G(e), e && s && u.length > 5 && requestAnimationFrame(() => {
|
|
147
62
|
M.current && M.current.scrollIntoView({
|
|
148
63
|
block: "nearest",
|
|
149
64
|
behavior: "auto"
|
|
150
65
|
});
|
|
151
66
|
});
|
|
152
67
|
},
|
|
153
|
-
[q,
|
|
68
|
+
[q, l.length, s, u.length]
|
|
154
69
|
), I = g(
|
|
155
|
-
(
|
|
156
|
-
h ||
|
|
157
|
-
const
|
|
158
|
-
b(
|
|
70
|
+
(e) => {
|
|
71
|
+
h || ue(e.value);
|
|
72
|
+
const a = e.displayValue || c(e);
|
|
73
|
+
b(a), f && f(e.value, e), o(!1), $.current = !0, requestAnimationFrame(() => {
|
|
159
74
|
$.current = !1;
|
|
160
75
|
});
|
|
161
76
|
},
|
|
162
|
-
[h,
|
|
163
|
-
),
|
|
164
|
-
|
|
77
|
+
[h, f, o, c]
|
|
78
|
+
), me = (e) => {
|
|
79
|
+
o(!1), $.current = !0, e.preventDefault(), e.stopPropagation(), f && h && f("", null), b(""), y.current?.focus(), requestAnimationFrame(() => {
|
|
165
80
|
$.current = !1;
|
|
166
81
|
});
|
|
167
|
-
},
|
|
168
|
-
G(!
|
|
169
|
-
},
|
|
170
|
-
b(
|
|
82
|
+
}, fe = () => {
|
|
83
|
+
G(!d), y.current?.focus();
|
|
84
|
+
}, de = (e) => {
|
|
85
|
+
b(e), e !== "" && u.length > 0 && o(!0, e);
|
|
171
86
|
}, U = O(() => {
|
|
172
87
|
if (h) {
|
|
173
|
-
if (
|
|
174
|
-
return
|
|
175
|
-
if (
|
|
176
|
-
const
|
|
177
|
-
return
|
|
88
|
+
if (m !== K)
|
|
89
|
+
return s ? _ : l;
|
|
90
|
+
if (s) {
|
|
91
|
+
const e = _;
|
|
92
|
+
return e !== l ? l : e;
|
|
178
93
|
} else
|
|
179
|
-
return
|
|
94
|
+
return l;
|
|
180
95
|
}
|
|
181
|
-
return
|
|
182
|
-
}, [h,
|
|
183
|
-
if (
|
|
184
|
-
const
|
|
185
|
-
|
|
96
|
+
return l;
|
|
97
|
+
}, [h, l, m, K, s, _]), E = (e) => {
|
|
98
|
+
if (s) {
|
|
99
|
+
const a = _;
|
|
100
|
+
a !== U && b(a);
|
|
186
101
|
} else
|
|
187
102
|
b("");
|
|
188
103
|
}, F = g(() => {
|
|
189
|
-
const
|
|
190
|
-
const w =
|
|
104
|
+
const e = i.filter((a) => {
|
|
105
|
+
const w = c(a).toLowerCase(), P = a.value.toLowerCase(), A = a.displayValue?.toLowerCase(), v = l.toLowerCase();
|
|
191
106
|
return w === v || P === v || A === v;
|
|
192
107
|
});
|
|
193
|
-
|
|
194
|
-
}, [
|
|
195
|
-
return
|
|
196
|
-
|
|
197
|
-
}), /* @__PURE__ */ T("div", { ref: V, className:
|
|
198
|
-
k && /* @__PURE__ */
|
|
108
|
+
e.length === 1 && I(e[0]);
|
|
109
|
+
}, [l, i, I, c]);
|
|
110
|
+
return Ie(C, (e) => {
|
|
111
|
+
e.target.closest(`.${t}__item`) || e.target.closest(`.${t}__content`) || C.current?.contains(e.target) || e.target === C.current || (F(), E(), o(!1));
|
|
112
|
+
}), /* @__PURE__ */ T("div", { ref: V, className: p(t, H), id: n, ...ne, ...se, children: [
|
|
113
|
+
k && /* @__PURE__ */ r(
|
|
199
114
|
"input",
|
|
200
115
|
{
|
|
201
116
|
type: "hidden",
|
|
202
117
|
name: k,
|
|
203
118
|
id: k,
|
|
204
119
|
value: R || "",
|
|
205
|
-
ref: (
|
|
206
|
-
typeof V == "function" &&
|
|
120
|
+
ref: (e) => {
|
|
121
|
+
typeof V == "function" && e && V(e);
|
|
207
122
|
}
|
|
208
123
|
}
|
|
209
124
|
),
|
|
210
|
-
/* @__PURE__ */ T("div", { ref: C, className: `${
|
|
211
|
-
/* @__PURE__ */
|
|
212
|
-
|
|
125
|
+
/* @__PURE__ */ T("div", { ref: C, className: `${t}__wrapper`, children: [
|
|
126
|
+
/* @__PURE__ */ r(
|
|
127
|
+
ke,
|
|
213
128
|
{
|
|
214
129
|
element: "label",
|
|
215
|
-
variant:
|
|
216
|
-
htmlFor: `${
|
|
217
|
-
className:
|
|
218
|
-
[`${
|
|
219
|
-
[`${
|
|
130
|
+
variant: Le.labelMedium,
|
|
131
|
+
htmlFor: `${n}-input`,
|
|
132
|
+
className: p(`${t}__label`, {
|
|
133
|
+
[`${t}__label--hidden`]: te,
|
|
134
|
+
[`${t}__label--invalid`]: N
|
|
220
135
|
}),
|
|
221
|
-
"data-testid": `${
|
|
136
|
+
"data-testid": `${n}-label`,
|
|
222
137
|
children: S
|
|
223
138
|
}
|
|
224
139
|
),
|
|
225
|
-
/* @__PURE__ */
|
|
226
|
-
|
|
140
|
+
/* @__PURE__ */ r(
|
|
141
|
+
Ce,
|
|
227
142
|
{
|
|
228
143
|
loop: !0,
|
|
229
|
-
onKeyDown: (
|
|
144
|
+
onKeyDown: (e) => {
|
|
230
145
|
setTimeout(() => {
|
|
231
|
-
|
|
146
|
+
e.key === "Escape" && o(!1);
|
|
232
147
|
}, 0);
|
|
233
148
|
},
|
|
234
149
|
shouldFilter: !1,
|
|
235
|
-
className: `${
|
|
236
|
-
children: /* @__PURE__ */ T(
|
|
237
|
-
/* @__PURE__ */
|
|
150
|
+
className: `${t}__command-wrapper`,
|
|
151
|
+
children: /* @__PURE__ */ T(he, { open: d, modal: !1, children: [
|
|
152
|
+
/* @__PURE__ */ r(_e, { asChild: !0, children: /* @__PURE__ */ T(
|
|
238
153
|
"div",
|
|
239
154
|
{
|
|
240
|
-
className:
|
|
241
|
-
[`${
|
|
155
|
+
className: p(`${t}__input-wrapper`, {
|
|
156
|
+
[`${t}__input-wrapper--invalid`]: N
|
|
242
157
|
}),
|
|
243
158
|
role: "combobox",
|
|
244
159
|
"aria-label": S,
|
|
245
160
|
children: [
|
|
246
|
-
/* @__PURE__ */
|
|
247
|
-
|
|
161
|
+
/* @__PURE__ */ r(
|
|
162
|
+
ye,
|
|
248
163
|
{
|
|
249
|
-
id: `${
|
|
164
|
+
id: `${n}-input`,
|
|
250
165
|
placeholder: J,
|
|
251
166
|
value: U,
|
|
252
|
-
onValueChange:
|
|
167
|
+
onValueChange: de,
|
|
253
168
|
tabIndex: 0,
|
|
254
169
|
onFocus: () => {
|
|
255
|
-
|
|
170
|
+
u.length > 0 && !$.current && !d && o(!0);
|
|
256
171
|
},
|
|
257
|
-
onClick: (
|
|
258
|
-
|
|
172
|
+
onClick: (e) => {
|
|
173
|
+
o(!0), e.preventDefault(), e.currentTarget.focus();
|
|
259
174
|
},
|
|
260
|
-
onKeyDown: (
|
|
261
|
-
|
|
175
|
+
onKeyDown: (e) => {
|
|
176
|
+
e.key === "Tab" ? (o(!1), F(), E()) : e.key === "Enter" && !d ? (f && f(l, null), u.length === 1 && I(u[0])) : e.key === "Escape" ? (o(!1), e.preventDefault(), F(), E()) : (e.key === "ArrowDown" || e.key === "ArrowUp") && !d && u.length > 0 && (o(!0), e.preventDefault());
|
|
262
177
|
},
|
|
263
178
|
onBlur: Q,
|
|
264
|
-
className:
|
|
265
|
-
[`${
|
|
179
|
+
className: p(`${t}__input`, {
|
|
180
|
+
[`${t}__input--invalid`]: N
|
|
266
181
|
}),
|
|
267
182
|
"aria-label": Y,
|
|
268
|
-
"aria-controls": `${
|
|
269
|
-
"data-testid": `${
|
|
183
|
+
"aria-controls": `${n}-content`,
|
|
184
|
+
"data-testid": `${n}-input`,
|
|
270
185
|
ref: y
|
|
271
186
|
}
|
|
272
187
|
),
|
|
273
|
-
|
|
188
|
+
l && /* @__PURE__ */ r(
|
|
274
189
|
W,
|
|
275
190
|
{
|
|
276
|
-
className: `${
|
|
277
|
-
"data-testid": `${
|
|
278
|
-
onClick:
|
|
191
|
+
className: `${t}__close-button`,
|
|
192
|
+
"data-testid": `${n}-clear-button`,
|
|
193
|
+
onClick: me,
|
|
279
194
|
"aria-label": Z,
|
|
280
195
|
tabIndex: -1,
|
|
281
196
|
variant: X.tertiary,
|
|
282
|
-
children: /* @__PURE__ */
|
|
283
|
-
|
|
197
|
+
children: /* @__PURE__ */ r(
|
|
198
|
+
ie,
|
|
284
199
|
{
|
|
285
200
|
color: "currentColor",
|
|
286
201
|
height: 18,
|
|
287
202
|
width: 18,
|
|
288
|
-
className: `${
|
|
203
|
+
className: `${t}__icon-button`
|
|
289
204
|
}
|
|
290
205
|
)
|
|
291
206
|
}
|
|
292
207
|
),
|
|
293
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ r(
|
|
294
209
|
W,
|
|
295
210
|
{
|
|
296
211
|
"aria-label": L,
|
|
297
|
-
className:
|
|
298
|
-
[`${
|
|
212
|
+
className: p(`${t}__dropdown-button`, {
|
|
213
|
+
[`${t}__dropdown-button--open`]: d
|
|
299
214
|
}),
|
|
300
|
-
onClick:
|
|
301
|
-
"data-testid": `${
|
|
215
|
+
onClick: fe,
|
|
216
|
+
"data-testid": `${n}-dropdown`,
|
|
302
217
|
tabIndex: -1,
|
|
303
218
|
variant: X.tertiary,
|
|
304
|
-
children: /* @__PURE__ */
|
|
305
|
-
|
|
219
|
+
children: /* @__PURE__ */ r(
|
|
220
|
+
oe,
|
|
306
221
|
{
|
|
307
222
|
color: "currentColor",
|
|
308
223
|
height: 18,
|
|
309
224
|
width: 18,
|
|
310
|
-
className: `${
|
|
311
|
-
title: L || `${
|
|
225
|
+
className: `${t}__icon-button`,
|
|
226
|
+
title: L || `${n}-dropdown`
|
|
312
227
|
}
|
|
313
228
|
)
|
|
314
229
|
}
|
|
@@ -316,12 +231,12 @@ const Mt = Nt.forwardRef(function({
|
|
|
316
231
|
]
|
|
317
232
|
}
|
|
318
233
|
) }),
|
|
319
|
-
|
|
320
|
-
|
|
234
|
+
d && /* @__PURE__ */ r(ve, { container: ae?.current || document.body, children: /* @__PURE__ */ r(
|
|
235
|
+
be,
|
|
321
236
|
{
|
|
322
|
-
id: `${
|
|
323
|
-
className: `${
|
|
324
|
-
"aria-label":
|
|
237
|
+
id: `${n}-content`,
|
|
238
|
+
className: `${t}__content`,
|
|
239
|
+
"aria-label": ee,
|
|
325
240
|
side: "bottom",
|
|
326
241
|
sideOffset: -5,
|
|
327
242
|
align: "start",
|
|
@@ -332,29 +247,29 @@ const Mt = Nt.forwardRef(function({
|
|
|
332
247
|
style: {
|
|
333
248
|
width: C.current?.offsetWidth || "100%"
|
|
334
249
|
},
|
|
335
|
-
children: /* @__PURE__ */
|
|
336
|
-
|
|
250
|
+
children: /* @__PURE__ */ r($e, { className: `${t}__list`, children: u.length > 0 ? /* @__PURE__ */ r(we, { className: `${t}__group`, children: u.map((e) => /* @__PURE__ */ r(
|
|
251
|
+
ge,
|
|
337
252
|
{
|
|
338
|
-
className:
|
|
339
|
-
[`${
|
|
253
|
+
className: p(`${t}__item`, {
|
|
254
|
+
[`${t}__item--selected`]: s?.value === e.value
|
|
340
255
|
}),
|
|
341
|
-
value:
|
|
342
|
-
onSelect: () => I(
|
|
343
|
-
...
|
|
344
|
-
children: j ? j(
|
|
256
|
+
value: e.value,
|
|
257
|
+
onSelect: () => I(e),
|
|
258
|
+
...s?.value === e.value ? { ref: M } : {},
|
|
259
|
+
children: j ? j(e) : c(e)
|
|
345
260
|
},
|
|
346
|
-
|
|
347
|
-
)) }) : /* @__PURE__ */
|
|
261
|
+
e.value
|
|
262
|
+
)) }) : /* @__PURE__ */ r("div", { className: `${t}__no-options`, children: le }) })
|
|
348
263
|
}
|
|
349
264
|
) })
|
|
350
265
|
] })
|
|
351
266
|
}
|
|
352
267
|
),
|
|
353
|
-
z.validation ? z.validation : /* @__PURE__ */
|
|
268
|
+
z.validation ? z.validation : /* @__PURE__ */ r("p", { className: p(`${t}__empty-validation`), children: " " })
|
|
354
269
|
] })
|
|
355
270
|
] });
|
|
356
271
|
});
|
|
357
|
-
|
|
272
|
+
Me.displayName = "ComboBox";
|
|
358
273
|
export {
|
|
359
|
-
|
|
274
|
+
Me as default
|
|
360
275
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),j=require("../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),j=require("../../_virtual/index2.cjs"),q=require("react"),t=require("../../utils/index.cjs"),b=require("../Modal/Modal.cjs"),f=require("../Divider/Divider.cjs"),h=require("../Text/Text.cjs"),p=require("../Text/types.cjs"),o=q.forwardRef(({children:c,className:m,overlayClassName:$,isOpen:n=!1,onClose:u=t.noOp,maxHeightValue:x="60vh",title:v,footerContent:a,secondaryButton:l,primaryButton:r,id:d,...i},_)=>{const{className:s,"data-testid":g,...N}=t.getCommonProps({id:d,...i},"ComposedModal");return e.jsxs(b.default,{isOpen:n,onClose:u,...i,...N,className:j.default(`${s}`,m),id:d,ref:_,title:v,children:[e.jsx("div",{className:`${s}__body`,style:{"--max-modal-body-height":x},children:c}),(l||r||a)&&e.jsxs(e.Fragment,{children:[e.jsx(f.default,{className:`${s}__divider`,id:`${d}-divider`}),e.jsxs("div",{className:`${s}__btns-group`,children:[l,r]}),a&&e.jsx(h.default,{variant:p.TextVariants.bodySmall,className:`${s}__disclaimer`,children:a})]})]})});o.displayName="ComposedModal";exports.default=o;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e, Fragment as _ } from "react/jsx-runtime";
|
|
2
|
-
import h from "../../_virtual/
|
|
2
|
+
import h from "../../_virtual/index2.js";
|
|
3
3
|
import { forwardRef as x } from "react";
|
|
4
4
|
import { getCommonProps as $, noOp as b } from "../../utils/index.js";
|
|
5
|
-
import g from "../
|
|
6
|
-
import y from "../
|
|
7
|
-
import
|
|
8
|
-
import M from "../Text/
|
|
5
|
+
import g from "../Modal/Modal.js";
|
|
6
|
+
import y from "../Divider/Divider.js";
|
|
7
|
+
import C from "../Text/Text.js";
|
|
8
|
+
import { TextVariants as M } from "../Text/types.js";
|
|
9
9
|
const j = x(
|
|
10
10
|
({
|
|
11
11
|
children: i,
|
|
@@ -27,7 +27,7 @@ const j = x(
|
|
|
27
27
|
...v
|
|
28
28
|
} = $({ id: s, ...l }, "ComposedModal");
|
|
29
29
|
return /* @__PURE__ */ o(
|
|
30
|
-
|
|
30
|
+
g,
|
|
31
31
|
{
|
|
32
32
|
isOpen: c,
|
|
33
33
|
onClose: p,
|
|
@@ -47,12 +47,12 @@ const j = x(
|
|
|
47
47
|
}
|
|
48
48
|
),
|
|
49
49
|
(r || d || m) && /* @__PURE__ */ o(_, { children: [
|
|
50
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(y, { className: `${a}__divider`, id: `${s}-divider` }),
|
|
51
51
|
/* @__PURE__ */ o("div", { className: `${a}__btns-group`, children: [
|
|
52
52
|
r,
|
|
53
53
|
d
|
|
54
54
|
] }),
|
|
55
|
-
m && /* @__PURE__ */ e(
|
|
55
|
+
m && /* @__PURE__ */ e(C, { variant: M.bodySmall, className: `${a}__disclaimer`, children: m })
|
|
56
56
|
] })
|
|
57
57
|
]
|
|
58
58
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react"),g=require("../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),s=require("react"),g=require("../../_virtual/index2.cjs"),N=require("../../utils/index.cjs"),S=require("../Button/Button.cjs"),H=require("../Button/types.cjs"),c=require("./utils.cjs"),m=require("../../utils/constants.cjs"),I=require("../Collapsible/Collapsible.cjs"),M=require("../Collapsible/CollapsibleContent.cjs"),_=require("../Collapsible/CollapsibleTrigger.cjs"),h=require("../Icon/Icon.cjs"),p=s.forwardRef(({className:q,children:v,contentExpandText:C="Read More",contentCollapseText:y="Read Less",maxHeight:d=480,minHeightThreshold:i,heightUnits:f=c.HeightUnits.px,...u},E)=>{const{className:t,...j}=N.getCommonProps(u,"ContentPeek"),[r,R]=s.useState(!1),[x,P]=s.useState(!1),l=s.useRef(null),o=f===c.HeightUnits.rem?d*m.DEFAULT_REM_SIZE:d,$=i?i*m.DEFAULT_REM_SIZE:null,n=f===c.HeightUnits.rem?$:i;s.useEffect(()=>{if(l.current){const a=n??o;P(l.current.scrollHeight>a)}},[o,n]),s.useEffect(()=>{const a=n&&n>=o?n:o;l.current?.style.setProperty("--content-peek-max-height",`${a}${c.HeightUnits.px}`)},[o,n]);const b=s.useCallback(()=>{R(a=>!a)},[]);return e.jsxs(I.default,{id:u?.id,open:r,onOpenChange:b,className:g.default(t,q),ref:E,...j,...u,children:[e.jsx(M.default,{className:`${t}-content`,ref:l,forceMount:!0,children:v}),x?e.jsx("div",{className:g.default(`${t}-overlay`,{[`${t}-overlay--expanded`]:r,[`${t}-overlay--gradient`]:x&&!r}),children:e.jsx("div",{className:`${t}-overlay-trigger-wrapper`,children:e.jsx(_.default,{asChild:!0,className:`${t}-overlay-trigger`,children:e.jsxs(S.default,{variant:H.ButtonVariants.secondary,children:[r?e.jsx(h.default,{icon:"Subtract"}):e.jsx(h.default,{icon:"Add"}),r?y:C]})})})}):null]})});p.displayName="ContentPeek";exports.default=p;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as w, useState as u, useRef as H, useEffect as h, useCallback as M } from "react";
|
|
3
|
-
import g from "../../_virtual/
|
|
3
|
+
import g from "../../_virtual/index2.js";
|
|
4
4
|
import { getCommonProps as O } from "../../utils/index.js";
|
|
5
5
|
import S from "../Button/Button.js";
|
|
6
6
|
import { ButtonVariants as T } from "../Button/types.js";
|
|
7
|
+
import { HeightUnits as l } from "./utils.js";
|
|
8
|
+
import { DEFAULT_REM_SIZE as x } from "../../utils/constants.js";
|
|
7
9
|
import j from "../Collapsible/Collapsible.js";
|
|
8
10
|
import A from "../Collapsible/CollapsibleContent.js";
|
|
9
11
|
import B from "../Collapsible/CollapsibleTrigger.js";
|
|
10
|
-
import { HeightUnits as l } from "./utils.js";
|
|
11
|
-
import { DEFAULT_REM_SIZE as x } from "../../utils/constants.js";
|
|
12
12
|
import C from "../Icon/Icon.js";
|
|
13
13
|
const L = w(
|
|
14
14
|
({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),f=require("react"),z=require("../../utils/index.cjs"),H=require("../../_virtual/
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),f=require("react"),z=require("../../utils/index.cjs"),H=require("../../_virtual/index2.cjs"),P=require("../../types/commonTypes.cjs"),i=require("./types.cjs"),m=require("./Duration.cjs"),R=require("../../node_modules/date-fns/locale/zh-CN.cjs"),U=require("../../node_modules/date-fns/locale/en-US.cjs"),x=require("../../node_modules/date-fns/differenceInSeconds.cjs"),I=require("../../node_modules/date-fns/differenceInMinutes.cjs"),y=require("../../node_modules/date-fns/differenceInHours.cjs"),p=require("../../node_modules/date-fns/differenceInDays.cjs"),E=require("../../node_modules/date-fns/differenceInMilliseconds.cjs"),C=require("../Text/types.cjs"),F=require("../Text/Text.cjs"),j=f.forwardRef(({endDateTime:e,formatDurationStr:a,label:h="Lots Close in",intervalDescription:g,className:M,locale:$="en",showBottomBorder:N=!0,variant:l=i.CountdownVariants.default,getCurrentDateTime:c=()=>new Date,centerAlign:V=!1,...q},b)=>{const{className:r,...S}=z.getCommonProps(q,"Countdown"),[s,_]=f.useState(c()||new Date),d=$===P.SupportedLanguages.zh?R.zhCN:U.enUS,n={days:p.differenceInDays(e,s)>0?p.differenceInDays(e,s):0,hours:y.differenceInHours(e,s)>0?y.differenceInHours(e,s)%24:0,minutes:I.differenceInMinutes(e,s)>0?I.differenceInMinutes(e,s)%60:0,seconds:(x.differenceInSeconds(e,s)>0?x.differenceInSeconds(e,s)%60:0)%60};f.useEffect(()=>{const t=setInterval(()=>{_(c()||new Date)},1e3);return()=>clearInterval(t)},[e,c]);const v=f.useMemo(()=>{const t=c();return!!t&&new Date(e).getTime()>t.getTime()},[e,c]),L=E.differenceInMilliseconds(e,s)<=180*1e3,u=l===i.CountdownVariants.sm?C.TextVariants.labelSmall:C.TextVariants.labelMedium,w=[n.days>0?o.jsx(m.Duration,{duration:n,unit:"days",locale:d,formatDurationStr:a,textVariant:u},"days"):null,n.days>0||n.hours>0?o.jsx(m.Duration,{duration:n,unit:"hours",locale:d,formatDurationStr:a,textVariant:u},"hours"):null,n.days===0?o.jsx(m.Duration,{duration:n,unit:"minutes",locale:d,formatDurationStr:a,textVariant:u},"minutes"):null,n.days===0&&n.hours===0?o.jsx(m.Duration,{duration:n,unit:"seconds",locale:d,formatDurationStr:a,textVariant:u},"seconds"):null].filter(t=>t!=null);return v?o.jsxs("div",{"data-chromatic":"ignore",...S,className:H.default(r,M,{[`${r}--compact`]:l===i.CountdownVariants.compact,[`${r}--sm`]:l===i.CountdownVariants.sm,[`${r}--show-bottom-border`]:N,[`${r}--closing-lot`]:L,[`${r}--center-align`]:V}),...q,ref:b,children:[o.jsxs("div",{className:`${r}__countdown-container`,role:"timer","aria-label":h,children:[o.jsx(F.default,{variant:u,children:h}),w.length>0?o.jsx("div",{className:`${r}__duration-group`,children:w}):null]}),l===i.CountdownVariants.default?o.jsx("span",{children:g}):null]}):null});j.displayName="Countdown";exports.default=j;
|