@jetshop/ui 6.3.7 → 7.0.0-alpha-3
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/package.json +2 -3
- package/Accordion/Accordion.d.ts +0 -33
- package/Accordion/Accordion.js +0 -59
- package/Accordion/Accordion.js.map +0 -1
- package/Auth/FormFields/CountriesInput.d.ts +0 -16
- package/Auth/FormFields/CountriesInput.js +0 -28
- package/Auth/FormFields/CountriesInput.js.map +0 -1
- package/Auth/LogInBehavior.d.ts +0 -22
- package/Auth/LogInBehavior.js +0 -24
- package/Auth/LogInBehavior.js.map +0 -1
- package/Auth/LogInFormProvider.d.ts +0 -7
- package/Auth/LogInFormProvider.js +0 -70
- package/Auth/LogInFormProvider.js.map +0 -1
- package/Auth/LogOut.d.ts +0 -10
- package/Auth/LogOut.js +0 -24
- package/Auth/LogOut.js.map +0 -1
- package/Auth/logInValidator.d.ts +0 -10
- package/Auth/logInValidator.js +0 -16
- package/Auth/logInValidator.js.map +0 -1
- package/Breadcrumbs/Breadcrumbs.d.ts +0 -14
- package/Breadcrumbs/Breadcrumbs.js +0 -84
- package/Breadcrumbs/Breadcrumbs.js.map +0 -1
- package/Breadcrumbs/getParentsOrCanonicalRoute.d.ts +0 -3
- package/Breadcrumbs/getParentsOrCanonicalRoute.js +0 -14
- package/Breadcrumbs/getParentsOrCanonicalRoute.js.map +0 -1
- package/Breadcrumbs/index.d.ts +0 -1
- package/Breadcrumbs/index.js +0 -2
- package/Breadcrumbs/index.js.map +0 -1
- package/Breakpoints.d.ts +0 -12
- package/Breakpoints.js +0 -36
- package/Breakpoints.js.map +0 -1
- package/Button/Button.d.ts +0 -14
- package/Button/Button.js +0 -60
- package/Button/Button.js.map +0 -1
- package/Button/SecondaryButton.d.ts +0 -2
- package/Button/SecondaryButton.js +0 -9
- package/Button/SecondaryButton.js.map +0 -1
- package/Button/TrendButton.d.ts +0 -2
- package/Button/TrendButton.js +0 -8
- package/Button/TrendButton.js.map +0 -1
- package/Button/index.d.ts +0 -4
- package/Button/index.js +0 -5
- package/Button/index.js.map +0 -1
- package/CategoryLink.d.ts +0 -11
- package/CategoryLink.js +0 -49
- package/CategoryLink.js.map +0 -1
- package/ChannelSelector/ChannelListItem.d.ts +0 -10
- package/ChannelSelector/ChannelListItem.js +0 -51
- package/ChannelSelector/ChannelListItem.js.map +0 -1
- package/ChannelSelector/ChannelSelector.d.ts +0 -63
- package/ChannelSelector/ChannelSelector.js +0 -80
- package/ChannelSelector/ChannelSelector.js.map +0 -1
- package/ChannelSelector/ChannelSelectorButtons.d.ts +0 -2
- package/ChannelSelector/ChannelSelectorButtons.js +0 -20
- package/ChannelSelector/ChannelSelectorButtons.js.map +0 -1
- package/ChannelSelector/Channels.d.ts +0 -17
- package/ChannelSelector/Channels.js +0 -12
- package/ChannelSelector/Channels.js.map +0 -1
- package/ChannelSelector/LargeSelector.d.ts +0 -3
- package/ChannelSelector/LargeSelector.js +0 -67
- package/ChannelSelector/LargeSelector.js.map +0 -1
- package/ChannelSelector/MiniSelector.d.ts +0 -4
- package/ChannelSelector/MiniSelector.js +0 -58
- package/ChannelSelector/MiniSelector.js.map +0 -1
- package/ChannelSelector/Region.d.ts +0 -28
- package/ChannelSelector/Region.js +0 -21
- package/ChannelSelector/Region.js.map +0 -1
- package/ChannelSelector/groupBy.d.ts +0 -7
- package/ChannelSelector/groupBy.js +0 -16
- package/ChannelSelector/groupBy.js.map +0 -1
- package/Checkbox/Checkbox.d.ts +0 -14
- package/Checkbox/Checkbox.js +0 -70
- package/Checkbox/Checkbox.js.map +0 -1
- package/Checkbox/CheckboxGroup.d.ts +0 -27
- package/Checkbox/CheckboxGroup.js +0 -22
- package/Checkbox/CheckboxGroup.js.map +0 -1
- package/Checkbox/index.d.ts +0 -2
- package/Checkbox/index.js +0 -3
- package/Checkbox/index.js.map +0 -1
- package/ContentPageLink.d.ts +0 -11
- package/ContentPageLink.js +0 -46
- package/ContentPageLink.js.map +0 -1
- package/ContentRenderer.d.ts +0 -9
- package/ContentRenderer.js +0 -36
- package/ContentRenderer.js.map +0 -1
- package/DropdownMenu/Button.d.ts +0 -7
- package/DropdownMenu/Button.js +0 -33
- package/DropdownMenu/Button.js.map +0 -1
- package/DropdownMenu/DropdownMenu.d.ts +0 -21
- package/DropdownMenu/DropdownMenu.js +0 -72
- package/DropdownMenu/DropdownMenu.js.map +0 -1
- package/DropdownMenu/Item.d.ts +0 -13
- package/DropdownMenu/Item.js +0 -48
- package/DropdownMenu/Item.js.map +0 -1
- package/DropdownMenu/Items.d.ts +0 -16
- package/DropdownMenu/Items.js +0 -53
- package/DropdownMenu/Items.js.map +0 -1
- package/DropdownMenu/index.d.ts +0 -4
- package/DropdownMenu/index.js +0 -5
- package/DropdownMenu/index.js.map +0 -1
- package/ErrorBoundary/Generic.d.ts +0 -18
- package/ErrorBoundary/Generic.js +0 -69
- package/ErrorBoundary/Generic.js.map +0 -1
- package/ErrorBoundary/PassThrough.d.ts +0 -3
- package/ErrorBoundary/PassThrough.js +0 -7
- package/ErrorBoundary/PassThrough.js.map +0 -1
- package/Gallery/Gallery.d.ts +0 -39
- package/Gallery/Gallery.js +0 -121
- package/Gallery/Gallery.js.map +0 -1
- package/Gallery/constructGallery.d.ts +0 -15
- package/Gallery/constructGallery.js +0 -40
- package/Gallery/constructGallery.js.map +0 -1
- package/Image/BaseImage.d.ts +0 -39
- package/Image/BaseImage.js +0 -192
- package/Image/BaseImage.js.map +0 -1
- package/Image/Fallback.d.ts +0 -5
- package/Image/Fallback.js +0 -4
- package/Image/Fallback.js.map +0 -1
- package/Image/FlightImage.d.ts +0 -51
- package/Image/FlightImage.js +0 -59
- package/Image/FlightImage.js.map +0 -1
- package/Image/Image.d.ts +0 -2
- package/Image/Image.js +0 -3
- package/Image/Image.js.map +0 -1
- package/Image/index.d.ts +0 -1
- package/Image/index.js +0 -2
- package/Image/index.js.map +0 -1
- package/Image/useConstructImage.d.ts +0 -49
- package/Image/useConstructImage.js +0 -122
- package/Image/useConstructImage.js.map +0 -1
- package/Image/utils/aspectRatioToFraction.d.ts +0 -2
- package/Image/utils/aspectRatioToFraction.js +0 -11
- package/Image/utils/aspectRatioToFraction.js.map +0 -1
- package/Image/utils/getFullUrl.d.ts +0 -6
- package/Image/utils/getFullUrl.js +0 -18
- package/Image/utils/getFullUrl.js.map +0 -1
- package/Image/utils/getImageWidth.d.ts +0 -1
- package/Image/utils/getImageWidth.js +0 -12
- package/Image/utils/getImageWidth.js.map +0 -1
- package/Image/utils/getImageWidths.d.ts +0 -2
- package/Image/utils/getImageWidths.js +0 -21
- package/Image/utils/getImageWidths.js.map +0 -1
- package/Image/utils/getLQIP.d.ts +0 -8
- package/Image/utils/getLQIP.js +0 -20
- package/Image/utils/getLQIP.js.map +0 -1
- package/Image/utils/getLargestSize.d.ts +0 -7
- package/Image/utils/getLargestSize.js +0 -17
- package/Image/utils/getLargestSize.js.map +0 -1
- package/Image/utils/getSizeForBreakpoint.d.ts +0 -2
- package/Image/utils/getSizeForBreakpoint.js +0 -16
- package/Image/utils/getSizeForBreakpoint.js.map +0 -1
- package/Image/utils/getSizesMap.d.ts +0 -2
- package/Image/utils/getSizesMap.js +0 -35
- package/Image/utils/getSizesMap.js.map +0 -1
- package/Image/utils/getSmallestSize.d.ts +0 -2
- package/Image/utils/getSmallestSize.js +0 -12
- package/Image/utils/getSmallestSize.js.map +0 -1
- package/Image/utils/getSrcSetFromWidths.d.ts +0 -10
- package/Image/utils/getSrcSetFromWidths.js +0 -9
- package/Image/utils/getSrcSetFromWidths.js.map +0 -1
- package/Image/utils/getSrcWithParams.d.ts +0 -3
- package/Image/utils/getSrcWithParams.js +0 -29
- package/Image/utils/getSrcWithParams.js.map +0 -1
- package/Image/utils/paddingForAspectRatio.d.ts +0 -1
- package/Image/utils/paddingForAspectRatio.js +0 -6
- package/Image/utils/paddingForAspectRatio.js.map +0 -1
- package/Image/utils/remToPx.d.ts +0 -1
- package/Image/utils/remToPx.js +0 -2
- package/Image/utils/remToPx.js.map +0 -1
- package/Image/utils/sizeToNumber.d.ts +0 -2
- package/Image/utils/sizeToNumber.js +0 -27
- package/Image/utils/sizeToNumber.js.map +0 -1
- package/Input/Input.d.ts +0 -6
- package/Input/Input.js +0 -45
- package/Input/Input.js.map +0 -1
- package/Input/index.d.ts +0 -3
- package/Input/index.js +0 -4
- package/Input/index.js.map +0 -1
- package/JetshopText.d.ts +0 -3
- package/JetshopText.js +0 -13
- package/JetshopText.js.map +0 -1
- package/Loading/LoadingBar.d.ts +0 -8
- package/Loading/LoadingBar.js +0 -58
- package/Loading/LoadingBar.js.map +0 -1
- package/Loading/LoadingLine.d.ts +0 -31
- package/Loading/LoadingLine.js +0 -26
- package/Loading/LoadingLine.js.map +0 -1
- package/Loading/NetworkStatusNotifier.d.ts +0 -6
- package/Loading/NetworkStatusNotifier.js +0 -8
- package/Loading/NetworkStatusNotifier.js.map +0 -1
- package/Menu/MenuContainer.d.ts +0 -28
- package/Menu/MenuContainer.js +0 -46
- package/Menu/MenuContainer.js.map +0 -1
- package/Menu/RecursiveTree.d.ts +0 -28
- package/Menu/RecursiveTree.js +0 -91
- package/Menu/RecursiveTree.js.map +0 -1
- package/Modal/Drawer/Drawer.d.ts +0 -12
- package/Modal/Drawer/Drawer.js +0 -31
- package/Modal/Drawer/Drawer.js.map +0 -1
- package/Modal/Drawer/DrawerTarget.d.ts +0 -6
- package/Modal/Drawer/DrawerTarget.js +0 -12
- package/Modal/Drawer/DrawerTarget.js.map +0 -1
- package/Modal/Drawer/DrawerTrigger.d.ts +0 -11
- package/Modal/Drawer/DrawerTrigger.js +0 -16
- package/Modal/Drawer/DrawerTrigger.js.map +0 -1
- package/Modal/Drawer/index.d.ts +0 -3
- package/Modal/Drawer/index.js +0 -4
- package/Modal/Drawer/index.js.map +0 -1
- package/Modal/Flyout/FlyoutTarget.d.ts +0 -10
- package/Modal/Flyout/FlyoutTarget.js +0 -15
- package/Modal/Flyout/FlyoutTarget.js.map +0 -1
- package/Modal/Flyout/FlyoutTrigger.d.ts +0 -15
- package/Modal/Flyout/FlyoutTrigger.js +0 -18
- package/Modal/Flyout/FlyoutTrigger.js.map +0 -1
- package/Modal/Flyout/index.d.ts +0 -2
- package/Modal/Flyout/index.js +0 -3
- package/Modal/Flyout/index.js.map +0 -1
- package/Modal/ModalContext.d.ts +0 -26
- package/Modal/ModalContext.js +0 -9
- package/Modal/ModalContext.js.map +0 -1
- package/Modal/ModalProvider.d.ts +0 -5
- package/Modal/ModalProvider.js +0 -83
- package/Modal/ModalProvider.js.map +0 -1
- package/Modal/ModalRoot.d.ts +0 -3
- package/Modal/ModalRoot.js +0 -44
- package/Modal/ModalRoot.js.map +0 -1
- package/Modal/ModalTrigger.d.ts +0 -9
- package/Modal/ModalTrigger.js +0 -9
- package/Modal/ModalTrigger.js.map +0 -1
- package/Pagination/Pagination.d.ts +0 -7
- package/Pagination/Pagination.js +0 -23
- package/Pagination/Pagination.js.map +0 -1
- package/Pagination/PaginationBehaviour.d.ts +0 -52
- package/Pagination/PaginationBehaviour.js +0 -68
- package/Pagination/PaginationBehaviour.js.map +0 -1
- package/Pagination/index.d.ts +0 -2
- package/Pagination/index.js +0 -3
- package/Pagination/index.js.map +0 -1
- package/Pagination/usePagination.d.ts +0 -15
- package/Pagination/usePagination.js +0 -46
- package/Pagination/usePagination.js.map +0 -1
- package/PreOrderDateSelector/PreOrderDateSelector.d.ts +0 -23
- package/PreOrderDateSelector/PreOrderDateSelector.js +0 -74
- package/PreOrderDateSelector/PreOrderDateSelector.js.map +0 -1
- package/PreOrderDateSelector/index.d.ts +0 -2
- package/PreOrderDateSelector/index.js +0 -3
- package/PreOrderDateSelector/index.js.map +0 -1
- package/Price/Currency.d.ts +0 -9
- package/Price/Currency.js +0 -11
- package/Price/Currency.js.map +0 -1
- package/Price/Price.d.ts +0 -44
- package/Price/Price.js +0 -74
- package/Price/Price.js.map +0 -1
- package/Price/index.d.ts +0 -1
- package/Price/index.js +0 -2
- package/Price/index.js.map +0 -1
- package/ProductLink.d.ts +0 -23
- package/ProductLink.js +0 -88
- package/ProductLink.js.map +0 -1
- package/ProductList/Badges.d.ts +0 -6
- package/ProductList/Badges.js +0 -56
- package/ProductList/Badges.js.map +0 -1
- package/ProductList/GridProduct.d.ts +0 -24
- package/ProductList/GridProduct.js +0 -58
- package/ProductList/GridProduct.js.map +0 -1
- package/ProductList/ProductGrid.d.ts +0 -16
- package/ProductList/ProductGrid.js +0 -30
- package/ProductList/ProductGrid.js.map +0 -1
- package/ProductList/ProductImage.d.ts +0 -12
- package/ProductList/ProductImage.js +0 -21
- package/ProductList/ProductImage.js.map +0 -1
- package/ProductSpecifications/ProductSpecifications.d.ts +0 -8
- package/ProductSpecifications/ProductSpecifications.js +0 -78
- package/ProductSpecifications/ProductSpecifications.js.map +0 -1
- package/ScrollRestorationHandler/ScrollRestorationHandler.d.ts +0 -8
- package/ScrollRestorationHandler/ScrollRestorationHandler.js +0 -17
- package/ScrollRestorationHandler/ScrollRestorationHandler.js.map +0 -1
- package/ScrollRestorationHandler/index.d.ts +0 -1
- package/ScrollRestorationHandler/index.js +0 -2
- package/ScrollRestorationHandler/index.js.map +0 -1
- package/ScrollRestorationHandler/isInIgnoredRouteTypes.d.ts +0 -8
- package/ScrollRestorationHandler/isInIgnoredRouteTypes.js +0 -8
- package/ScrollRestorationHandler/isInIgnoredRouteTypes.js.map +0 -1
- package/ScrollRestorationHandler/useScrollRestore.d.ts +0 -9
- package/ScrollRestorationHandler/useScrollRestore.js +0 -20
- package/ScrollRestorationHandler/useScrollRestore.js.map +0 -1
- package/Search/SearchAutoCompleteContainer.d.ts +0 -45
- package/Search/SearchAutoCompleteContainer.js +0 -172
- package/Search/SearchAutoCompleteContainer.js.map +0 -1
- package/Search/SearchField.d.ts +0 -26
- package/Search/SearchField.js +0 -98
- package/Search/SearchField.js.map +0 -1
- package/Search/SearchPage/PageOf.d.ts +0 -5
- package/Search/SearchPage/PageOf.js +0 -7
- package/Search/SearchPage/PageOf.js.map +0 -1
- package/Search/SearchPage/SearchMeta.d.ts +0 -16
- package/Search/SearchPage/SearchMeta.js +0 -20
- package/Search/SearchPage/SearchMeta.js.map +0 -1
- package/Search/SearchPage/SearchPageBehaviour.d.ts +0 -19
- package/Search/SearchPage/SearchPageBehaviour.js +0 -75
- package/Search/SearchPage/SearchPageBehaviour.js.map +0 -1
- package/Search/SuggestedTerm.d.ts +0 -16
- package/Search/SuggestedTerm.js +0 -35
- package/Search/SuggestedTerm.js.map +0 -1
- package/Search/index.d.ts +0 -1
- package/Search/index.js +0 -2
- package/Search/index.js.map +0 -1
- package/Select/Components.d.ts +0 -28
- package/Select/Components.js +0 -91
- package/Select/Components.js.map +0 -1
- package/Select/SelectComponents/Quantity.d.ts +0 -5
- package/Select/SelectComponents/Quantity.js +0 -8
- package/Select/SelectComponents/Quantity.js.map +0 -1
- package/Select/index.d.ts +0 -5
- package/Select/index.js +0 -2
- package/Select/index.js.map +0 -1
- package/SortOrder/SortOrder.d.ts +0 -16
- package/SortOrder/SortOrder.js +0 -33
- package/SortOrder/SortOrder.js.map +0 -1
- package/SortOrder/SortOrderDropdown.d.ts +0 -9
- package/SortOrder/SortOrderDropdown.js +0 -25
- package/SortOrder/SortOrderDropdown.js.map +0 -1
- package/SortOrder/SortOrderList.d.ts +0 -7
- package/SortOrder/SortOrderList.js +0 -17
- package/SortOrder/SortOrderList.js.map +0 -1
- package/StartPageRenderer/StartPageRenderer.d.ts +0 -17
- package/StartPageRenderer/StartPageRenderer.js +0 -52
- package/StartPageRenderer/StartPageRenderer.js.map +0 -1
- package/StartPageRenderer/index.d.ts +0 -1
- package/StartPageRenderer/index.js +0 -2
- package/StartPageRenderer/index.js.map +0 -1
- package/Stock/StockStatusContainer.d.ts +0 -21
- package/Stock/StockStatusContainer.js +0 -45
- package/Stock/StockStatusContainer.js.map +0 -1
- package/Text/Text.d.ts +0 -11
- package/Text/Text.js +0 -22
- package/Text/Text.js.map +0 -1
- package/Text/index.d.ts +0 -3
- package/Text/index.js +0 -4
- package/Text/index.js.map +0 -1
- package/Theme/createTheme.d.ts +0 -16
- package/Theme/createTheme.js +0 -5
- package/Theme/createTheme.js.map +0 -1
- package/Theme/cssReset.d.ts +0 -1
- package/Theme/cssReset.js +0 -160
- package/Theme/cssReset.js.map +0 -1
- package/Theme/normalizeCss.d.ts +0 -1
- package/Theme/normalizeCss.js +0 -357
- package/Theme/normalizeCss.js.map +0 -1
- package/Theme/sanitizeCss.d.ts +0 -1
- package/Theme/sanitizeCss.js +0 -572
- package/Theme/sanitizeCss.js.map +0 -1
- package/WindowGrid/WindowGrid.d.ts +0 -11
- package/WindowGrid/WindowGrid.js +0 -58
- package/WindowGrid/WindowGrid.js.map +0 -1
- package/WindowGrid/index.d.ts +0 -1
- package/WindowGrid/index.js +0 -2
- package/WindowGrid/index.js.map +0 -1
- package/WindowGrid/useResizeObserver.d.ts +0 -3
- package/WindowGrid/useResizeObserver.js +0 -14
- package/WindowGrid/useResizeObserver.js.map +0 -1
- package/WindowGrid/useScrollWithWindow.d.ts +0 -12
- package/WindowGrid/useScrollWithWindow.js +0 -39
- package/WindowGrid/useScrollWithWindow.js.map +0 -1
- package/fuzzySearch/fuzzySearch.d.ts +0 -8
- package/fuzzySearch/fuzzySearch.js +0 -43
- package/fuzzySearch/fuzzySearch.js.map +0 -1
- package/fuzzySearch/index.d.ts +0 -1
- package/fuzzySearch/index.js +0 -2
- package/fuzzySearch/index.js.map +0 -1
- package/hooks/index.d.ts +0 -2
- package/hooks/index.js +0 -3
- package/hooks/index.js.map +0 -1
- package/hooks/useOnClickOutside.d.ts +0 -6
- package/hooks/useOnClickOutside.js +0 -17
- package/hooks/useOnClickOutside.js.map +0 -1
- package/hooks/useOnEsc.d.ts +0 -4
- package/hooks/useOnEsc.js +0 -17
- package/hooks/useOnEsc.js.map +0 -1
- package/utils/breakpoints.d.ts +0 -23
- package/utils/breakpoints.js +0 -94
- package/utils/breakpoints.js.map +0 -1
- package/utils/callAllEventHandlers.d.ts +0 -5
- package/utils/callAllEventHandlers.js +0 -9
- package/utils/callAllEventHandlers.js.map +0 -1
- package/utils/text.d.ts +0 -1
- package/utils/text.js +0 -23
- package/utils/text.js.map +0 -1
- package/utils/theme.d.ts +0 -3
- package/utils/theme.js +0 -5
- package/utils/theme.js.map +0 -1
- package/utils/useHoverIntent.d.ts +0 -10
- package/utils/useHoverIntent.js +0 -78
- package/utils/useHoverIntent.js.map +0 -1
- package/utils/usePropsOfType.d.ts +0 -11
- package/utils/usePropsOfType.js +0 -18
- package/utils/usePropsOfType.js.map +0 -1
- package/withFlightUI.d.ts +0 -17
- package/withFlightUI.js +0 -20
- package/withFlightUI.js.map +0 -1
package/Button/Button.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import * as React from 'react';
|
|
13
|
-
import { styled } from 'linaria/react';
|
|
14
|
-
export const buttonStyles = `
|
|
15
|
-
display: inline-flex;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
align-items: center;
|
|
18
|
-
padding: 0.5rem 1rem;
|
|
19
|
-
color: white;
|
|
20
|
-
background-color: grey;
|
|
21
|
-
border-color: grey;
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
|
|
24
|
-
text-align: center;
|
|
25
|
-
height: 54px;
|
|
26
|
-
font-family: 'Source Sans Pro', sans-serif;
|
|
27
|
-
width: 100%;
|
|
28
|
-
|
|
29
|
-
&:disabled {
|
|
30
|
-
opacity: 0.5;
|
|
31
|
-
cursor: not-allowed;
|
|
32
|
-
}
|
|
33
|
-
`;
|
|
34
|
-
const BaseButton = styled('button') `
|
|
35
|
-
${buttonStyles};
|
|
36
|
-
@media (--above-md) {
|
|
37
|
-
max-width: 300px;
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
const BaseLink = styled('a') `
|
|
41
|
-
${buttonStyles};
|
|
42
|
-
text-decoration: none;
|
|
43
|
-
@media (--above-md) {
|
|
44
|
-
max-width: 300px;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
:hover {
|
|
48
|
-
text-decoration: none;
|
|
49
|
-
}
|
|
50
|
-
`;
|
|
51
|
-
const Button = (_a) => {
|
|
52
|
-
var { icon, text, children, anchor = false } = _a, rest = __rest(_a, ["icon", "text", "children", "anchor"]);
|
|
53
|
-
const Comp = anchor ? BaseLink : BaseButton;
|
|
54
|
-
return (React.createElement(Comp, Object.assign({ type: "button" }, rest),
|
|
55
|
-
icon ? [React.createElement(icon, { key: 'icon' }), ' '] : '',
|
|
56
|
-
text,
|
|
57
|
-
children));
|
|
58
|
-
};
|
|
59
|
-
export default Button;
|
|
60
|
-
//# sourceMappingURL=Button.js.map
|
package/Button/Button.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["Button.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,MAAM,CAAC,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;CAmB3B,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;IAC/B,YAAY;;;;CAIf,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;IACxB,YAAY;;;;;;;;;CASf,CAAC;AAaF,MAAM,MAAM,GAA2B,CAAC,EAMvC,EAAE,EAAE;QANmC,EACtC,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,GAAG,KAAK,OAEf,EADI,IAAI,cAL+B,sCAMvC,CADQ;IAEP,MAAM,IAAI,GAAsB,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC;IAE/D,OAAO,CACL,oBAAC,IAAI,kBAAC,IAAI,EAAC,QAAQ,IAAK,IAAI;QACzB,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;QAC7D,IAAI;QACJ,QAAQ,CACJ,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { styled } from 'linaria/react';
|
|
2
|
-
import Button from './Button';
|
|
3
|
-
export const SecondaryButton = styled(Button) `
|
|
4
|
-
background: ${({ inverted }) => (inverted ? '#000' : '#fff')};
|
|
5
|
-
color: ${({ inverted }) => (inverted ? '#fff' : '#000')};
|
|
6
|
-
border: 1px solid ${({ inverted }) => (inverted ? '#000' : '#fff')};
|
|
7
|
-
`;
|
|
8
|
-
export default SecondaryButton;
|
|
9
|
-
//# sourceMappingURL=SecondaryButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SecondaryButton.js","sourceRoot":"","sources":["SecondaryButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;gBAC7B,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;WACxD,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;sBACxC,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;CACxE,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
package/Button/TrendButton.d.ts
DELETED
package/Button/TrendButton.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { styled } from 'linaria/react';
|
|
2
|
-
import Button from './Button';
|
|
3
|
-
export const TrendButton = styled(Button) `
|
|
4
|
-
background: ${({ inverted }) => (inverted ? '#fff' : '#000')};
|
|
5
|
-
color: ${({ inverted }) => (inverted ? '#000' : '#fff')};
|
|
6
|
-
`;
|
|
7
|
-
export default TrendButton;
|
|
8
|
-
//# sourceMappingURL=TrendButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TrendButton.js","sourceRoot":"","sources":["TrendButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;gBACzB,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;WACxD,CAAC,EAAE,QAAQ,EAAO,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;CAC7D,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/Button/index.d.ts
DELETED
package/Button/index.js
DELETED
package/Button/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC"}
|
package/CategoryLink.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { NavLinkProps } from 'react-router-dom';
|
|
3
|
-
import { Category } from '@jetshop/core/types';
|
|
4
|
-
export interface CategoryLinkProps extends Partial<NavLinkProps> {
|
|
5
|
-
category: Category;
|
|
6
|
-
className?: string;
|
|
7
|
-
preloadRoute?: boolean;
|
|
8
|
-
onMouseEnter?: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => any;
|
|
9
|
-
}
|
|
10
|
-
declare const CategoryLink: ({ category: { id, name, primaryRoute }, children, onMouseEnter, preloadRoute, ...props }: CategoryLinkProps) => React.JSX.Element;
|
|
11
|
-
export default CategoryLink;
|
package/CategoryLink.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { NavLink } from 'react-router-dom';
|
|
14
|
-
import { useRoutePreload } from '@jetshop/core/hooks/useRoutePreload';
|
|
15
|
-
import { useHoverIntent } from './utils/useHoverIntent';
|
|
16
|
-
const CategoryLink = (_a) => {
|
|
17
|
-
var { category: { id, name, primaryRoute }, children, onMouseEnter, preloadRoute = true } = _a, props = __rest(_a, ["category", "children", "onMouseEnter", "preloadRoute"]);
|
|
18
|
-
const { preload } = useRoutePreload();
|
|
19
|
-
const categoryPreload = () => {
|
|
20
|
-
preload({
|
|
21
|
-
pathname: primaryRoute && primaryRoute.path,
|
|
22
|
-
routeType: 'Category',
|
|
23
|
-
preloadRoute
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
const [, intentRef] = useHoverIntent({
|
|
27
|
-
onHover: () => {
|
|
28
|
-
categoryPreload();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
if (primaryRoute && primaryRoute.path) {
|
|
32
|
-
return (React.createElement(NavLink, Object.assign({}, props, { to: {
|
|
33
|
-
pathname: primaryRoute.path,
|
|
34
|
-
state: {
|
|
35
|
-
type: 'Category',
|
|
36
|
-
id
|
|
37
|
-
}
|
|
38
|
-
}, innerRef: intentRef, onTouchStart: categoryPreload, onMouseEnter: (event) => {
|
|
39
|
-
categoryPreload();
|
|
40
|
-
if (typeof onMouseEnter === 'function') {
|
|
41
|
-
onMouseEnter(event);
|
|
42
|
-
}
|
|
43
|
-
} }), children ? children : name));
|
|
44
|
-
}
|
|
45
|
-
else
|
|
46
|
-
return null;
|
|
47
|
-
};
|
|
48
|
-
export default CategoryLink;
|
|
49
|
-
//# sourceMappingURL=CategoryLink.js.map
|
package/CategoryLink.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryLink.js","sourceRoot":"","sources":["CategoryLink.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAgB,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAUxD,MAAM,YAAY,GAAG,CAAC,EAMF,EAAE,EAAE;QANF,EACpB,QAAQ,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,EACpC,QAAQ,EACR,YAAY,EACZ,YAAY,GAAG,IAAI,OAED,EADf,KAAK,cALY,wDAMrB,CADS;IAER,MAAM,EAAE,OAAO,EAAE,GAAG,eAAe,EAAE,CAAC;IACtC,MAAM,eAAe,GAAG,GAAG,EAAE;QAC3B,OAAO,CAAC;YACN,QAAQ,EAAE,YAAY,IAAI,YAAY,CAAC,IAAI;YAC3C,SAAS,EAAE,UAAU;YACrB,YAAY;SACb,CAAC,CAAC;IACL,CAAC,CAAC;IACF,MAAM,CAAC,EAAE,SAAS,CAAC,GAAG,cAAc,CAAC;QACnC,OAAO,EAAE,GAAG,EAAE;YACZ,eAAe,EAAE,CAAC;QACpB,CAAC;KACF,CAAC,CAAC;IAEH,IAAI,YAAY,IAAI,YAAY,CAAC,IAAI,EAAE;QACrC,OAAO,CACL,oBAAC,OAAO,oBACF,KAAK,IACT,EAAE,EAAE;gBACF,QAAQ,EAAE,YAAY,CAAC,IAAI;gBAC3B,KAAK,EAAE;oBACL,IAAI,EAAE,UAAU;oBAChB,EAAE;iBACH;aACF,EACD,QAAQ,EAAE,SAAgB,EAC1B,YAAY,EAAE,eAAe,EAC7B,YAAY,EAAE,CAAC,KAAK,EAAE,EAAE;gBACtB,eAAe,EAAE,CAAC;gBAClB,IAAI,OAAO,YAAY,KAAK,UAAU,EAAE;oBACtC,YAAY,CAAC,KAAK,CAAC,CAAC;iBACrB;YACH,CAAC,KAEA,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CACnB,CACX,CAAC;KACH;;QAAM,OAAO,IAAI,CAAC;AACrB,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { SFC } from 'react';
|
|
2
|
-
import { Channel } from '@jetshop/core/types';
|
|
3
|
-
import { SelectChannel } from './ChannelSelector';
|
|
4
|
-
export interface ChannelListItemProps {
|
|
5
|
-
channel: Channel;
|
|
6
|
-
onSelect: SelectChannel;
|
|
7
|
-
isSelected: boolean;
|
|
8
|
-
}
|
|
9
|
-
declare const ChannelListItem: SFC<ChannelListItemProps>;
|
|
10
|
-
export default ChannelListItem;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { styled } from 'linaria/react';
|
|
3
|
-
import { cx } from 'linaria';
|
|
4
|
-
const selectedStyle = `
|
|
5
|
-
color: #000;
|
|
6
|
-
font-weight: 600;
|
|
7
|
-
&:before {
|
|
8
|
-
/*
|
|
9
|
-
Using a before pseudo-element allows us to create a background
|
|
10
|
-
hover effect without adding padding to the element itself.
|
|
11
|
-
*/
|
|
12
|
-
background: #ebebeb;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
const ListItem = styled('li') `
|
|
16
|
-
list-style: none;
|
|
17
|
-
margin: 0;
|
|
18
|
-
padding: 0.75rem 0;
|
|
19
|
-
color: #4f4f4f;
|
|
20
|
-
cursor: pointer;
|
|
21
|
-
display: flex;
|
|
22
|
-
align-items: center;
|
|
23
|
-
position: relative;
|
|
24
|
-
user-select: none;
|
|
25
|
-
z-index: 1;
|
|
26
|
-
&:before {
|
|
27
|
-
content: '';
|
|
28
|
-
top: 0;
|
|
29
|
-
bottom: 0;
|
|
30
|
-
left: -0.5rem;
|
|
31
|
-
right: -0.5rem;
|
|
32
|
-
z-index: -1;
|
|
33
|
-
position: absolute;
|
|
34
|
-
border: 1px solid transparent;
|
|
35
|
-
}
|
|
36
|
-
&:focus {
|
|
37
|
-
outline: none;
|
|
38
|
-
}
|
|
39
|
-
&:focus:before {
|
|
40
|
-
border-color: #2f80ed;
|
|
41
|
-
}
|
|
42
|
-
&.isSelected {
|
|
43
|
-
${selectedStyle};
|
|
44
|
-
}
|
|
45
|
-
&:hover {
|
|
46
|
-
${selectedStyle};
|
|
47
|
-
}
|
|
48
|
-
`;
|
|
49
|
-
const ChannelListItem = ({ channel, onSelect, isSelected }) => (React.createElement(ListItem, { className: cx(isSelected && 'isSelected'), tabIndex: 0, onKeyDown: (e) => e.key === 'Enter' && onSelect(channel.id), onClick: () => onSelect(channel.id) }, channel.name));
|
|
50
|
-
export default ChannelListItem;
|
|
51
|
-
//# sourceMappingURL=ChannelListItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelListItem.js","sourceRoot":"","sources":["ChannelListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAc,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAI7B,MAAM,aAAa,GAAG;;;;;;;;;;CAUrB,CAAC;AAEF,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA4BvB,aAAa;;;MAGb,aAAa;;CAElB,CAAC;AAaF,MAAM,eAAe,GAA8B,CAAC,EAClD,OAAO,EACP,QAAQ,EACR,UAAU,EACX,EAAE,EAAE,CAAC,CACJ,oBAAC,QAAQ,IACP,SAAS,EAAE,EAAE,CAAC,UAAU,IAAI,YAAY,CAAC,EACzC,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,CAAC,CAAqC,EAAE,EAAE,CACnD,CAAC,CAAC,GAAG,KAAK,OAAO,IAAI,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,EAE3C,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,IAKlC,OAAO,CAAC,IAAI,CACJ,CACZ,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { SelectedChannel } from '@jetshop/core/components/ChannelContext/ChannelContext';
|
|
2
|
-
import { Channel } from '@jetshop/core/types';
|
|
3
|
-
import { Item } from '@jetshop/ui/Checkbox/CheckboxGroup';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
export interface RenderCallback {
|
|
6
|
-
(props: {
|
|
7
|
-
channels: Channel[];
|
|
8
|
-
currencyItems: Item[];
|
|
9
|
-
languageItems: Item[];
|
|
10
|
-
selectedChannel: SelectedChannel;
|
|
11
|
-
hasChanged: boolean;
|
|
12
|
-
onSelect: SelectChannel;
|
|
13
|
-
onCurrencySelect: (currency: string) => void;
|
|
14
|
-
onLanguageSelect: (language: string) => void;
|
|
15
|
-
}): React.ReactElement<any>;
|
|
16
|
-
}
|
|
17
|
-
export interface ChannelSelectorProps {
|
|
18
|
-
/** Any array of channels to display */
|
|
19
|
-
channels: Channel[];
|
|
20
|
-
/** The default-selected channel */
|
|
21
|
-
initialChannel: SelectedChannel;
|
|
22
|
-
/**
|
|
23
|
-
* Render callback to pass state to composed child components
|
|
24
|
-
* @param {arr} channels
|
|
25
|
-
* @param {arr} currencyItems
|
|
26
|
-
* @param {arr} languageItems
|
|
27
|
-
* @param {obj} selectedChannel selected channel
|
|
28
|
-
* @param {boolean} hasChanged Whether the selection has changed from the default
|
|
29
|
-
* @param {func} onSelect Call with the channel to set the selected channel
|
|
30
|
-
* @param {func} onCurrencySelect Call with the currency to set the selected currnecy
|
|
31
|
-
* @param {func} onLanguageSelect Call with the language to set the selected lanauge
|
|
32
|
-
*/
|
|
33
|
-
render: RenderCallback;
|
|
34
|
-
}
|
|
35
|
-
export interface ChannelSelectorState {
|
|
36
|
-
selectedChannel: SelectedChannel;
|
|
37
|
-
hasChanged: boolean;
|
|
38
|
-
}
|
|
39
|
-
export type SelectChannel = (channel: number | string, culture?: string, currency?: string, country?: string) => void;
|
|
40
|
-
export type SelectCurrency = (currency: string) => void;
|
|
41
|
-
export type SelectLanguage = (language: string) => void;
|
|
42
|
-
/** Wraps either MiniSelector or LargeSelector and provides controlled state */
|
|
43
|
-
export default class ChannelSelector extends React.Component<ChannelSelectorProps, ChannelSelectorState> {
|
|
44
|
-
state: {
|
|
45
|
-
selectedChannel: SelectedChannel;
|
|
46
|
-
hasChanged: boolean;
|
|
47
|
-
};
|
|
48
|
-
setDirtyState: () => void;
|
|
49
|
-
componentDidUpdate(_prevProps: any, prevState: any): void;
|
|
50
|
-
selectChannel: SelectChannel;
|
|
51
|
-
selectCurrency: SelectCurrency;
|
|
52
|
-
selectLanguage: SelectLanguage;
|
|
53
|
-
render(): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
54
|
-
}
|
|
55
|
-
export declare const LangCurrWrapper: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
56
|
-
as?: React.ElementType<any>;
|
|
57
|
-
}>;
|
|
58
|
-
export declare const SelectorBody: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLElement> & React.HTMLAttributes<HTMLElement> & {
|
|
59
|
-
as?: React.ElementType<any>;
|
|
60
|
-
}>;
|
|
61
|
-
export declare const Title: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
62
|
-
as?: React.ElementType<any>;
|
|
63
|
-
}>;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { createSelectedChannel, findChannel, findChannelById } from '@jetshop/core/ChannelHandler/channelUtils';
|
|
2
|
-
import { styled } from 'linaria/react';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
/** Wraps either MiniSelector or LargeSelector and provides controlled state */
|
|
5
|
-
export default class ChannelSelector extends React.Component {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(...arguments);
|
|
8
|
-
this.state = {
|
|
9
|
-
selectedChannel: this.props.initialChannel,
|
|
10
|
-
hasChanged: false
|
|
11
|
-
};
|
|
12
|
-
this.setDirtyState = () => {
|
|
13
|
-
const hasChanged = this.state.selectedChannel.name !== this.props.initialChannel.name ||
|
|
14
|
-
this.state.selectedChannel.language.name !==
|
|
15
|
-
this.props.initialChannel.language.name ||
|
|
16
|
-
this.state.selectedChannel.currency.name !==
|
|
17
|
-
this.props.initialChannel.currency.name ||
|
|
18
|
-
this.state.selectedChannel.country.name !==
|
|
19
|
-
this.props.initialChannel.country.name;
|
|
20
|
-
this.setState({ hasChanged });
|
|
21
|
-
};
|
|
22
|
-
this.selectChannel = (channel, culture, currency, country) => {
|
|
23
|
-
const selectedChannel = createSelectedChannel(typeof channel === 'number'
|
|
24
|
-
? findChannelById(channel, this.props.channels)
|
|
25
|
-
: findChannel(channel, this.props.channels), culture, currency, country);
|
|
26
|
-
this.setState({
|
|
27
|
-
selectedChannel
|
|
28
|
-
});
|
|
29
|
-
return selectedChannel;
|
|
30
|
-
};
|
|
31
|
-
this.selectCurrency = (selectedCurrency) => {
|
|
32
|
-
const currency = this.state.selectedChannel.currencies.find((currency) => currency.name === selectedCurrency);
|
|
33
|
-
this.setState({
|
|
34
|
-
selectedChannel: Object.assign(Object.assign({}, this.state.selectedChannel), { currency })
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
this.selectLanguage = (selectedLanguage) => {
|
|
38
|
-
const language = this.state.selectedChannel.languages.find((language) => language.name === selectedLanguage);
|
|
39
|
-
this.setState({
|
|
40
|
-
selectedChannel: Object.assign(Object.assign({}, this.state.selectedChannel), { language })
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
componentDidUpdate(_prevProps, prevState) {
|
|
45
|
-
(prevState.selectedChannel.name !== this.state.selectedChannel.name ||
|
|
46
|
-
prevState.selectedChannel.language.name !==
|
|
47
|
-
this.state.selectedChannel.language.name ||
|
|
48
|
-
prevState.selectedChannel.currency.name !==
|
|
49
|
-
this.state.selectedChannel.currency.name ||
|
|
50
|
-
prevState.selectedChannel.country.name !==
|
|
51
|
-
this.state.selectedChannel.country.name) &&
|
|
52
|
-
this.setDirtyState();
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const { render, channels } = this.props;
|
|
56
|
-
const currencyItems = this.state.selectedChannel.currencies.map(currency => {
|
|
57
|
-
return {
|
|
58
|
-
label: currency.name,
|
|
59
|
-
val: currency.name
|
|
60
|
-
};
|
|
61
|
-
});
|
|
62
|
-
const languageItems = this.state.selectedChannel.languages.map(language => {
|
|
63
|
-
return {
|
|
64
|
-
label: language.name,
|
|
65
|
-
val: language.name
|
|
66
|
-
};
|
|
67
|
-
});
|
|
68
|
-
return render(Object.assign(Object.assign({}, this.state), { channels,
|
|
69
|
-
currencyItems,
|
|
70
|
-
languageItems, onSelect: this.selectChannel, onCurrencySelect: this.selectCurrency, onLanguageSelect: this.selectLanguage }));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// For some reason Styleguidist breaks unless this comes after
|
|
74
|
-
// the default export
|
|
75
|
-
export const LangCurrWrapper = styled('div') `
|
|
76
|
-
background: #f5f5f5;
|
|
77
|
-
`;
|
|
78
|
-
export const SelectorBody = styled('section') ``;
|
|
79
|
-
export const Title = styled('h1') ``;
|
|
80
|
-
//# sourceMappingURL=ChannelSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSelector.js","sourceRoot":"","sources":["ChannelSelector.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const CommitButton: import("linaria/lib/StyledMeta").StyledMeta & import("react").SFC<import("../Button/Button").ButtonProps>;
|
|
2
|
-
export declare const CancelButton: import("linaria/lib/StyledMeta").StyledMeta & import("react").SFC<import("../Button/Button").ButtonProps>;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { styled } from 'linaria/react';
|
|
2
|
-
import Button from '../Button/Button';
|
|
3
|
-
const commonStyles = `
|
|
4
|
-
font-size: 1rem;
|
|
5
|
-
border: 1px solid transparent;
|
|
6
|
-
padding: 1rem;
|
|
7
|
-
/* Button is a child of a flex container, so this aligns to bottom */
|
|
8
|
-
margin-top: auto;
|
|
9
|
-
width: 100%;
|
|
10
|
-
`;
|
|
11
|
-
export const CommitButton = styled(Button) `
|
|
12
|
-
background: #2f80ed;
|
|
13
|
-
${commonStyles};
|
|
14
|
-
`;
|
|
15
|
-
export const CancelButton = styled(Button) `
|
|
16
|
-
background: white;
|
|
17
|
-
color: #000;
|
|
18
|
-
${commonStyles};
|
|
19
|
-
`;
|
|
20
|
-
//# sourceMappingURL=ChannelSelectorButtons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChannelSelectorButtons.js","sourceRoot":"","sources":["ChannelSelectorButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC,MAAM,YAAY,GAAG;;;;;;;CAOpB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;IAEtC,YAAY;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;;IAGtC,YAAY;CACf,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SelectedChannel } from '@jetshop/core/components/ChannelContext/ChannelContext';
|
|
2
|
-
import { Channel } from '@jetshop/core/types';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { SelectChannel } from './ChannelSelector';
|
|
5
|
-
export interface ChannelsProps {
|
|
6
|
-
/** An array of channels */
|
|
7
|
-
channels: Channel[];
|
|
8
|
-
/** The selected channel obj */
|
|
9
|
-
selectedChannel: SelectedChannel;
|
|
10
|
-
/** Called with the country obj when a country is selected */
|
|
11
|
-
onSelect: SelectChannel;
|
|
12
|
-
}
|
|
13
|
-
declare const Channels: React.SFC<ChannelsProps>;
|
|
14
|
-
export default Channels;
|
|
15
|
-
export declare const ChannelList: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLUListElement> & React.HTMLAttributes<HTMLUListElement> & {
|
|
16
|
-
as?: React.ElementType<any>;
|
|
17
|
-
}>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { styled } from 'linaria/react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import CountryListItem from './ChannelListItem';
|
|
4
|
-
const Channels = ({ channels, selectedChannel, onSelect }) => {
|
|
5
|
-
return channels ? (React.createElement(ChannelList, null, channels.map((channel) => (React.createElement(CountryListItem, { channel: channel, key: channel.name, isSelected: channel.name === selectedChannel.name, onSelect: onSelect }))))) : null;
|
|
6
|
-
};
|
|
7
|
-
export default Channels;
|
|
8
|
-
export const ChannelList = styled('ul') `
|
|
9
|
-
margin: 0;
|
|
10
|
-
padding: 0;
|
|
11
|
-
`;
|
|
12
|
-
//# sourceMappingURL=Channels.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Channels.js","sourceRoot":"","sources":["Channels.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAYhD,MAAM,QAAQ,GAA6B,CAAC,EAC1C,QAAQ,EACR,eAAe,EACf,QAAQ,EACT,EAAE,EAAE;IACH,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,oBAAC,WAAW,QACT,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,CAClC,oBAAC,eAAe,IACd,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,OAAO,CAAC,IAAI,EACjB,UAAU,EAAE,OAAO,CAAC,IAAI,KAAK,eAAe,CAAC,IAAI,EACjD,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CACU,CACf,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;;CAGtC,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { styled } from 'linaria/react';
|
|
3
|
-
import { RegionGroup, RegionWrapper } from './Region';
|
|
4
|
-
import { CommitButton, CancelButton } from './ChannelSelectorButtons';
|
|
5
|
-
import { LangCurrWrapper, SelectorBody, Title } from './ChannelSelector';
|
|
6
|
-
import { CheckboxWrapper } from '../Checkbox/CheckboxGroup';
|
|
7
|
-
const SelectorWrapper = styled('div') `
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
font-size: 1rem;
|
|
11
|
-
border: 1px solid #e8e8e8;
|
|
12
|
-
box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.07);
|
|
13
|
-
|
|
14
|
-
${RegionGroup} {
|
|
15
|
-
max-width: calc(20% - 2rem);
|
|
16
|
-
margin: 0 1rem;
|
|
17
|
-
min-width: 15rem;
|
|
18
|
-
flex-grow: 1;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
${RegionWrapper} {
|
|
22
|
-
display: flex;
|
|
23
|
-
margin: 0 -1rem;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
${Title} {
|
|
27
|
-
margin: 0;
|
|
28
|
-
padding: 0;
|
|
29
|
-
border: 0;
|
|
30
|
-
font-size: 1rem;
|
|
31
|
-
padding-bottom: 3rem;
|
|
32
|
-
font-weight: 600;
|
|
33
|
-
text-align: left;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
${CommitButton}, ${CancelButton} {
|
|
37
|
-
width: 20%;
|
|
38
|
-
max-width: 15rem;
|
|
39
|
-
margin-left: auto;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
${CancelButton} {
|
|
43
|
-
border-color: #cccccc;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
${LangCurrWrapper} {
|
|
47
|
-
display: flex;
|
|
48
|
-
padding: 1.5rem;
|
|
49
|
-
margin-bottom: 1rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
${CheckboxWrapper} {
|
|
53
|
-
margin-right: 2rem;
|
|
54
|
-
width: calc(20% + 1rem);
|
|
55
|
-
strong {
|
|
56
|
-
font-weight: 600;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
${SelectorBody} {
|
|
60
|
-
padding: 1rem;
|
|
61
|
-
}
|
|
62
|
-
`;
|
|
63
|
-
const LargeSelector = ({ children }) => {
|
|
64
|
-
return React.createElement(SelectorWrapper, null, children);
|
|
65
|
-
};
|
|
66
|
-
export default LargeSelector;
|
|
67
|
-
//# sourceMappingURL=LargeSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LargeSelector.js","sourceRoot":"","sources":["LargeSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;;;;;;IAOjC,WAAkB;;;;;;;IAOlB,aAAoB;;;;;IAKpB,KAAY;;;;;;;;;;IAUZ,YAAmB,KAAK,YAAmB;;;;;;IAM3C,YAAmB;;;;IAInB,eAAsB;;;;;;IAMtB,eAAsB;;;;;;;IAOtB,YAAmB;;;CAGtB,CAAC;AAEF,MAAM,aAAa,GAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAChD,OAAO,oBAAC,eAAe,QAAE,QAAQ,CAAmB,CAAC;AACvD,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import React from 'react';
|
|
13
|
-
import { styled } from 'linaria/react';
|
|
14
|
-
import { LangCurrWrapper, SelectorBody, Title } from './ChannelSelector';
|
|
15
|
-
import { CheckboxWrapper } from '../Checkbox/CheckboxGroup';
|
|
16
|
-
const SelectorWrapper = styled('div') `
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
font-size: 1rem;
|
|
20
|
-
max-width: 16em;
|
|
21
|
-
border: 1px solid #e8e8e8;
|
|
22
|
-
box-shadow: 4px 4px 20px rgba(0, 0, 0, 0.07);
|
|
23
|
-
background-color: white;
|
|
24
|
-
|
|
25
|
-
/* Style the wrapper around language and currency radios */
|
|
26
|
-
${LangCurrWrapper} {
|
|
27
|
-
padding: 1rem;
|
|
28
|
-
margin: 0.5rem;
|
|
29
|
-
font-size: 0.875rem;
|
|
30
|
-
${CheckboxWrapper} {
|
|
31
|
-
margin-top: 1rem;
|
|
32
|
-
&:first-child {
|
|
33
|
-
margin-top: 0;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
${SelectorBody} {
|
|
39
|
-
padding: 1rem;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
${Title} {
|
|
43
|
-
margin: 0;
|
|
44
|
-
padding: 0;
|
|
45
|
-
padding-bottom: 1rem;
|
|
46
|
-
font-weight: 600;
|
|
47
|
-
font-size: 0.875em;
|
|
48
|
-
border-bottom: 1px solid #e8e8e8;
|
|
49
|
-
text-align: center;
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
const MiniSelector = (_a) => {
|
|
53
|
-
var { children } = _a, props = __rest(_a, ["children"]);
|
|
54
|
-
return React.createElement(SelectorWrapper, Object.assign({}, props), children);
|
|
55
|
-
};
|
|
56
|
-
/** @component */
|
|
57
|
-
export default MiniSelector;
|
|
58
|
-
//# sourceMappingURL=MiniSelector.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MiniSelector.js","sourceRoot":"","sources":["MiniSelector.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;;;;;;;;;;IAUjC,eAAsB;;;;MAIpB,eAAsB;;;;;;;;IAQxB,YAAmB;;;;IAInB,KAAY;;;;;;;;;CASf,CAAC;AAEF,MAAM,YAAY,GAAc,CAAC,EAAsB,EAAE,EAAE;QAA1B,EAAE,QAAQ,OAAY,EAAP,KAAK,cAApB,YAAsB,CAAF;IACnD,OAAO,oBAAC,eAAe,oBAAK,KAAK,GAAG,QAAQ,CAAmB,CAAC;AAClE,CAAC,CAAC;AAEF,iBAAiB;AACjB,eAAe,YAAY,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Channel } from '@jetshop/core/types';
|
|
2
|
-
import React, { SFC } from 'react';
|
|
3
|
-
export interface ChannelWithRegion extends Channel {
|
|
4
|
-
region: string;
|
|
5
|
-
}
|
|
6
|
-
export interface RenderCallback {
|
|
7
|
-
(props: {
|
|
8
|
-
regionCountries: {
|
|
9
|
-
[key: string]: Channel[];
|
|
10
|
-
};
|
|
11
|
-
region: string;
|
|
12
|
-
}): React.ReactElement<any>;
|
|
13
|
-
}
|
|
14
|
-
export interface RegionProps {
|
|
15
|
-
channels: ChannelWithRegion[];
|
|
16
|
-
render: RenderCallback;
|
|
17
|
-
}
|
|
18
|
-
export declare const Region: SFC<RegionProps>;
|
|
19
|
-
export default Region;
|
|
20
|
-
export declare const RegionName: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLHeadingElement> & React.HTMLAttributes<HTMLHeadingElement> & {
|
|
21
|
-
as?: React.ElementType<any>;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const RegionWrapper: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
24
|
-
as?: React.ElementType<any>;
|
|
25
|
-
}>;
|
|
26
|
-
export declare const RegionGroup: import("linaria/lib/StyledMeta").StyledMeta & React.FunctionComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & {
|
|
27
|
-
as?: React.ElementType<any>;
|
|
28
|
-
}>;
|