@wayke-se/components-react 3.0.0-beta.12 → 3.0.0-beta.14
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/ajax-loader-BOAPMZMT.gif → assets/ajax-loader.gif} +0 -0
- package/assets/default.css +1 -0
- package/{dist/slick-EVLS6IWX.eot → assets/fonts/slick.eot} +0 -0
- package/{dist/slick-7CK47X3J.svg → assets/fonts/slick.svg} +0 -0
- package/{dist/slick-NKQ64RRA.ttf → assets/fonts/slick.ttf} +0 -0
- package/{dist/slick-MU5EZO5G.woff → assets/fonts/slick.woff} +0 -0
- package/dist-node/index.js +9130 -0
- package/dist-node/index.js.map +1 -0
- package/dist-src/@types/action.js +1 -0
- package/dist-src/@types/codegen/types.js +14 -0
- package/dist-src/@types/filter.js +1 -0
- package/dist-src/@types/queryFilter.js +1 -0
- package/dist-src/@types/search.js +1 -0
- package/dist-src/@types/vehicle-properties.js +1 -0
- package/dist-src/State/CentralStorage/CentralStorageContext.js +4 -0
- package/dist-src/State/CentralStorage/CentralStorageProvider.js +9 -0
- package/dist-src/State/CentralStorage/useCentralStorage.js +29 -0
- package/dist-src/State/Path/PathContext.js +2 -0
- package/dist-src/State/Path/PathProvider.js +47 -0
- package/dist-src/State/Path/reducer.js +15 -0
- package/dist-src/State/Path/usePath.js +10 -0
- package/dist-src/State/RelatedSearch/RelatedSearchContext.js +8 -0
- package/dist-src/State/RelatedSearch/RelatedSearchProvider.js +27 -0
- package/dist-src/State/RelatedSearch/useRelatedSearch.js +15 -0
- package/dist-src/State/Search/SearchContext.js +12 -0
- package/dist-src/State/Search/SearchProvider.js +176 -0
- package/dist-src/State/Search/useSearch.js +4 -0
- package/dist-src/State/Settings/SettingsContext.js +2 -0
- package/dist-src/State/Settings/SettingsProvider.js +4 -0
- package/dist-src/State/Settings/useSettings.js +4 -0
- package/dist-src/components/Accordion/index.js +18 -0
- package/dist-src/components/Accordion/wrapper.js +92 -0
- package/dist-src/components/ActionList/index.js +18 -0
- package/dist-src/components/ActionList/toggle-item.js +27 -0
- package/dist-src/components/Avatar/index.js +4 -0
- package/dist-src/components/Avatar/wrapper.js +15 -0
- package/dist-src/components/Badge/index.js +4 -0
- package/dist-src/components/Badge/wrapper.js +24 -0
- package/dist-src/components/Blockquote/index.js +12 -0
- package/dist-src/components/Blockquote/wrapper.js +44 -0
- package/dist-src/components/Button/index.js +195 -0
- package/dist-src/components/CheckMarkList/index.js +9 -0
- package/dist-src/components/CheckMarkList/wrapper.js +26 -0
- package/dist-src/components/Checklist/index.js +14 -0
- package/dist-src/components/Checklist/wrapper.js +59 -0
- package/dist-src/components/ColorSelect/index.js +18 -0
- package/dist-src/components/ColorSelect/wrapper.js +69 -0
- package/dist-src/components/ColumnRow/index.js +17 -0
- package/dist-src/components/Container/index.js +4 -0
- package/dist-src/components/Container/wrapper.js +12 -0
- package/dist-src/components/Content/index.js +4 -0
- package/dist-src/components/Content/wrapper.js +51 -0
- package/dist-src/components/ContentLogo/index.js +23 -0
- package/dist-src/components/DataList/index.js +6 -0
- package/dist-src/components/DataList/wrapper.js +24 -0
- package/dist-src/components/DetailBox/index.js +17 -0
- package/dist-src/components/DetailBox/wrapper.js +27 -0
- package/dist-src/components/ExtendContent/index.js +24 -0
- package/dist-src/components/ExtendContent/wrapper.js +32 -0
- package/dist-src/components/ExtendInfo/index.js +15 -0
- package/dist-src/components/ExtendInfo/wrapper.js +56 -0
- package/dist-src/components/Filter/index.js +62 -0
- package/dist-src/components/Filter/wrapper.js +72 -0
- package/dist-src/components/FilterPanel/checkListFacet.js +29 -0
- package/dist-src/components/FilterPanel/colorFacet.js +29 -0
- package/dist-src/components/FilterPanel/faceSelector.js +31 -0
- package/dist-src/components/FilterPanel/index.js +24 -0
- package/dist-src/components/FilterPanel/rangeFacet.js +82 -0
- package/dist-src/components/FinancialOptions/LoanModal.js +127 -0
- package/dist-src/components/FinancialOptions/index.js +12 -0
- package/dist-src/components/FinancialOptions/leasing.js +55 -0
- package/dist-src/components/FinancialOptions/loan.js +54 -0
- package/dist-src/components/Gallery/MediaButton.js +7 -0
- package/dist-src/components/Gallery/index.js +119 -0
- package/dist-src/components/Gallery/wrapper.js +293 -0
- package/dist-src/components/Grid/index.js +44 -0
- package/dist-src/components/Grid/wrapper.js +26 -0
- package/dist-src/components/Heading/index.js +54 -0
- package/dist-src/components/Icon/index.js +36 -0
- package/dist-src/components/InputCheckbox/index.js +10 -0
- package/dist-src/components/InputCheckbox/wrapper.js +79 -0
- package/dist-src/components/InputGroup/index.js +21 -0
- package/dist-src/components/InputLabel/index.js +4 -0
- package/dist-src/components/InputLabel/wrapper.js +8 -0
- package/dist-src/components/InputSearch/index.js +12 -0
- package/dist-src/components/InputSearch/wrapper.js +90 -0
- package/dist-src/components/InputSelect/index.js +10 -0
- package/dist-src/components/InputSelect/wrapper.js +53 -0
- package/dist-src/components/InputText/index.js +5 -0
- package/dist-src/components/InputText/wrapper.js +54 -0
- package/dist-src/components/InsuranceOptions/Insurance.js +26 -0
- package/dist-src/components/InsuranceOptions/InsuranceFree.js +30 -0
- package/dist-src/components/InsuranceOptions/InsuranceFreeModal.js +19 -0
- package/dist-src/components/InsuranceOptions/InsuranceModal.js +105 -0
- package/dist-src/components/InsuranceOptions/index.js +15 -0
- package/dist-src/components/Lightbox/index.js +30 -0
- package/dist-src/components/Lightbox/wrapper.js +91 -0
- package/dist-src/components/Loader/index.js +7 -0
- package/dist-src/components/Loader/wrapper.js +37 -0
- package/dist-src/components/LogoBox/index.js +10 -0
- package/dist-src/components/LogoBox/wrapper.js +12 -0
- package/dist-src/components/Map/index.js +27 -0
- package/dist-src/components/Map/wrapper.js +25 -0
- package/dist-src/components/Modal/index.js +20 -0
- package/dist-src/components/Modal/wrapper.js +113 -0
- package/dist-src/components/OpeningHours/index.js +97 -0
- package/dist-src/components/OptionBox/index.js +7 -0
- package/dist-src/components/OptionBox/wrapper.js +49 -0
- package/dist-src/components/OverflowBox/index.js +4 -0
- package/dist-src/components/OverflowBox/wrapper.js +6 -0
- package/dist-src/components/OverflowGrid/index.js +66 -0
- package/dist-src/components/Page/index.js +30 -0
- package/dist-src/components/Panel/index.js +20 -0
- package/dist-src/components/Panel/wrapper.js +143 -0
- package/dist-src/components/Pdf/index.js +11 -0
- package/dist-src/components/Pdf/wrapper.js +55 -0
- package/dist-src/components/PhoneNumber/index.js +13 -0
- package/dist-src/components/Portal/index.js +4 -0
- package/dist-src/components/Portal/portal-element.js +3 -0
- package/dist-src/components/Portal/portal-namespace.js +1 -0
- package/dist-src/components/Portal/portal.js +25 -0
- package/dist-src/components/Price/index.js +10 -0
- package/dist-src/components/PriceTable/index.js +20 -0
- package/dist-src/components/PriceTable/wrapper.js +22 -0
- package/dist-src/components/ProductCard/index.js +38 -0
- package/dist-src/components/ProductCard/wrapper.js +129 -0
- package/dist-src/components/ProductPage/index.js +85 -0
- package/dist-src/components/ProgressBar/index.js +16 -0
- package/dist-src/components/ProgressBar/wrapper.js +24 -0
- package/dist-src/components/RangeSlider/RangeSliderSimple.js +26 -0
- package/dist-src/components/RangeSlider/SliderWithLabel.js +21 -0
- package/dist-src/components/RangeSlider/handle.js +5 -0
- package/dist-src/components/RangeSlider/index.js +50 -0
- package/dist-src/components/RangeSlider/track.js +6 -0
- package/dist-src/components/RangeSlider/wrapper.js +86 -0
- package/dist-src/components/RangeSliderLabel/index.js +6 -0
- package/dist-src/components/RangeSliderLabel/wrapper.js +24 -0
- package/dist-src/components/Repeat/index.js +17 -0
- package/dist-src/components/Result/index.js +40 -0
- package/dist-src/components/Result/wrapper.js +29 -0
- package/dist-src/components/Root/index.js +22 -0
- package/dist-src/components/SearchBar/index.js +18 -0
- package/dist-src/components/SearchFilter/index.js +23 -0
- package/dist-src/components/SearchTerm/index.js +8 -0
- package/dist-src/components/SearchTerm/wrapper.js +67 -0
- package/dist-src/components/SectionHeader/index.js +9 -0
- package/dist-src/components/SectionHeader/wrapper.js +13 -0
- package/dist-src/components/Snackbar/index.js +21 -0
- package/dist-src/components/Snackbar/wrapper.js +56 -0
- package/dist-src/components/SortSelect/index.js +10 -0
- package/dist-src/components/SortSelect/wrapper.js +48 -0
- package/dist-src/components/Sphere/Sphere.js +21 -0
- package/dist-src/components/Sphere/SphereLightbox.js +4 -0
- package/dist-src/components/Sphere/SphereViewer.js +54 -0
- package/dist-src/components/Sphere/wrapper.js +250 -0
- package/dist-src/components/SrOnly/index.js +13 -0
- package/dist-src/components/SwitchBar/index.js +23 -0
- package/dist-src/components/SwitchBar/wrapper.js +71 -0
- package/dist-src/components/TableColumn/index.js +14 -0
- package/dist-src/components/TableList/index.js +32 -0
- package/dist-src/components/Tabs/index.js +6 -0
- package/dist-src/components/Tabs/wrapper.js +68 -0
- package/dist-src/components/ThreeSixty/Rotation.js +95 -0
- package/dist-src/components/ThreeSixty/ThreeSixtLightbox.js +15 -0
- package/dist-src/components/ThreeSixty/ThreeSixty.js +25 -0
- package/dist-src/components/UspList/index.js +18 -0
- package/dist-src/components/UspList/wrapper.js +85 -0
- package/dist-src/components/Utility/index.js +13 -0
- package/dist-src/components/Video/CustomPlayer.js +8 -0
- package/dist-src/components/Video/EmbeddedVideoLightbox.js +18 -0
- package/dist-src/components/Video/EmbededVideo.js +38 -0
- package/dist-src/components/Video/QuickNavEmbeded.js +17 -0
- package/dist-src/components/Video/QuickNavVideo.js +6 -0
- package/dist-src/components/Video/Video.js +8 -0
- package/dist-src/components/Video/VimeoPlayer.js +6 -0
- package/dist-src/components/Video/YoutubePlayer.js +6 -0
- package/dist-src/components/Video/useThumbnail.js +25 -0
- package/dist-src/components/Video/utils.js +35 -0
- package/dist-src/components/Video/wrapper.js +19 -0
- package/dist-src/hooks/useFetch.js +69 -0
- package/dist-src/hooks/useHasBeenVisible.js +13 -0
- package/dist-src/hooks/useHashGuid.js +28 -0
- package/dist-src/hooks/useInsurance.js +12 -0
- package/dist-src/hooks/useLoan.js +12 -0
- package/dist-src/hooks/useOnScreen.js +15 -0
- package/dist-src/hooks/useOutsideClick.js +15 -0
- package/dist-src/hooks/usePrevious.js +9 -0
- package/dist-src/hooks/useSearchItem.js +7 -0
- package/dist-src/hooks/useSearchItemBranch.js +7 -0
- package/dist-src/hooks/useSessionStorage.js +23 -0
- package/dist-src/hooks/useVimeoThumbnail.js +18 -0
- package/dist-src/index.js +10 -0
- package/dist-src/layout/helpers.js +5 -0
- package/dist-src/layout/keyframes.js +20 -0
- package/dist-src/layout/theme.js +57 -0
- package/dist-src/layouts/WaykeComposite.js +23 -0
- package/dist-src/layouts/WaykeCompositeWithProvider.js +6 -0
- package/dist-src/layouts/search/index.js +55 -0
- package/dist-src/layouts/searchItem/Branch.js +53 -0
- package/dist-src/layouts/searchItem/BranchModal.js +36 -0
- package/dist-src/layouts/searchItem/CheckList.js +65 -0
- package/dist-src/layouts/searchItem/ManufacturerPackagesOption.js +25 -0
- package/dist-src/layouts/searchItem/MetadataItem.js +34 -0
- package/dist-src/layouts/searchItem/PackageOptionModal.js +15 -0
- package/dist-src/layouts/searchItem/PackageOptions.js +25 -0
- package/dist-src/layouts/searchItem/Page404.js +9 -0
- package/dist-src/layouts/searchItem/PageLoading.js +9 -0
- package/dist-src/layouts/searchItem/Property.js +51 -0
- package/dist-src/layouts/searchItem/Related.js +64 -0
- package/dist-src/layouts/searchItem/index.js +181 -0
- package/dist-src/providers/WaykeItemProvidet.js +16 -0
- package/dist-src/providers/WaykeProvider.js +18 -0
- package/dist-src/providers/graphqlProvider.js +7 -0
- package/dist-src/providers/themeProvider.js +5 -0
- package/dist-src/queries/INSURANCE_CALCULATION.js +41 -0
- package/dist-src/queries/LOAN_CALCULATION.js +36 -0
- package/dist-src/queries/SEARCH_ITEM_BRANCH_QUERY.js +117 -0
- package/dist-src/queries/SEARCH_ITEM_QUERY.js +233 -0
- package/dist-src/utils/constants.js +30 -0
- package/dist-src/utils/converters.js +31 -0
- package/dist-src/utils/deep-copy.js +5 -0
- package/dist-src/utils/formats.js +60 -0
- package/dist-src/utils/metadata.min.js +86 -0
- package/dist-src/utils/phonenumbers.js +12 -0
- package/dist-src/utils/pubsub/Actions.js +1 -0
- package/dist-src/utils/pubsub/Events.js +1 -0
- package/dist-src/utils/pubsub/pubsub.js +93 -0
- package/dist-src/utils/regex.js +10 -0
- package/dist-src/utils/sortOptions.js +26 -0
- package/dist-src/utils/specification.js +495 -0
- package/dist-src/utils/ssn.js +1 -0
- package/dist-src/utils/url.js +1 -0
- package/dist-src/utils/vehicle-properties/compare-basic-properties.js +36 -0
- package/dist-src/utils/vehicle-properties/compare-categories.js +27 -0
- package/dist-src/utils/vehicle-properties/compare-properties.js +3 -0
- package/dist-src/utils/vehicle-properties/custom-property-adder.js +143 -0
- package/dist-src/utils/vehicle-properties/property-hint-enricher.js +190 -0
- package/dist-src/utils/vehicle-properties/property-remover.js +20 -0
- package/dist-src/utils/vehicle-properties/property-tree-creator.js +127 -0
- package/dist-src/utils/vehicle-properties/property-tree-sorter.js +18 -0
- package/dist-types/@types/action.d.ts +3 -0
- package/dist-types/@types/codegen/types.d.ts +343 -0
- package/dist-types/@types/filter.d.ts +5 -0
- package/dist-types/@types/queryFilter.d.ts +5 -0
- package/dist-types/@types/search.d.ts +105 -0
- package/dist-types/@types/vehicle-properties.d.ts +29 -0
- package/dist-types/State/CentralStorage/CentralStorageContext.d.ts +6 -0
- package/dist-types/State/CentralStorage/CentralStorageProvider.d.ts +6 -0
- package/dist-types/State/CentralStorage/useCentralStorage.d.ts +6 -0
- package/dist-types/State/Path/PathContext.d.ts +9 -0
- package/dist-types/State/Path/PathProvider.d.ts +6 -0
- package/dist-types/State/Path/reducer.d.ts +14 -0
- package/dist-types/State/Path/usePath.d.ts +3 -0
- package/dist-types/State/RelatedSearch/RelatedSearchContext.d.ts +10 -0
- package/dist-types/State/RelatedSearch/RelatedSearchProvider.d.ts +9 -0
- package/dist-types/State/RelatedSearch/useRelatedSearch.d.ts +2 -0
- package/dist-types/State/Search/SearchContext.d.ts +15 -0
- package/dist-types/State/Search/SearchProvider.d.ts +10 -0
- package/dist-types/State/Search/useSearch.d.ts +2 -0
- package/dist-types/State/Settings/SettingsContext.d.ts +13 -0
- package/dist-types/State/Settings/SettingsProvider.d.ts +10 -0
- package/dist-types/State/Settings/useSettings.d.ts +2 -0
- package/dist-types/components/Accordion/index.d.ts +13 -0
- package/dist-types/components/Accordion/wrapper.d.ts +16 -0
- package/dist-types/components/ActionList/index.d.ts +8 -0
- package/dist-types/components/ActionList/toggle-item.d.ts +10 -0
- package/dist-types/components/Avatar/index.d.ts +7 -0
- package/dist-types/components/Avatar/wrapper.d.ts +7 -0
- package/dist-types/components/Badge/index.d.ts +7 -0
- package/dist-types/components/Badge/wrapper.d.ts +7 -0
- package/dist-types/components/Blockquote/index.d.ts +9 -0
- package/dist-types/components/Blockquote/wrapper.d.ts +9 -0
- package/dist-types/components/Button/index.d.ts +52 -0
- package/dist-types/components/CheckMarkList/index.d.ts +7 -0
- package/dist-types/components/CheckMarkList/wrapper.d.ts +6 -0
- package/dist-types/components/Checklist/index.d.ts +13 -0
- package/dist-types/components/Checklist/wrapper.d.ts +11 -0
- package/dist-types/components/ColorSelect/index.d.ts +14 -0
- package/dist-types/components/ColorSelect/wrapper.d.ts +11 -0
- package/dist-types/components/ColumnRow/index.d.ts +2 -0
- package/dist-types/components/Container/index.d.ts +6 -0
- package/dist-types/components/Container/wrapper.d.ts +1 -0
- package/dist-types/components/Content/index.d.ts +6 -0
- package/dist-types/components/Content/wrapper.d.ts +4 -0
- package/dist-types/components/ContentLogo/index.d.ts +3 -0
- package/dist-types/components/DataList/index.d.ts +10 -0
- package/dist-types/components/DataList/wrapper.d.ts +6 -0
- package/dist-types/components/DetailBox/index.d.ts +8 -0
- package/dist-types/components/DetailBox/wrapper.d.ts +13 -0
- package/dist-types/components/ExtendContent/index.d.ts +8 -0
- package/dist-types/components/ExtendContent/wrapper.d.ts +6 -0
- package/dist-types/components/ExtendInfo/index.d.ts +7 -0
- package/dist-types/components/ExtendInfo/wrapper.d.ts +10 -0
- package/dist-types/components/Filter/index.d.ts +7 -0
- package/dist-types/components/Filter/wrapper.d.ts +8 -0
- package/dist-types/components/FilterPanel/checkListFacet.d.ts +7 -0
- package/dist-types/components/FilterPanel/colorFacet.d.ts +7 -0
- package/dist-types/components/FilterPanel/faceSelector.d.ts +7 -0
- package/dist-types/components/FilterPanel/index.d.ts +18 -0
- package/dist-types/components/FilterPanel/rangeFacet.d.ts +9 -0
- package/dist-types/components/FinancialOptions/LoanModal.d.ts +9 -0
- package/dist-types/components/FinancialOptions/index.d.ts +8 -0
- package/dist-types/components/FinancialOptions/leasing.d.ts +7 -0
- package/dist-types/components/FinancialOptions/loan.d.ts +8 -0
- package/dist-types/components/Gallery/MediaButton.d.ts +7 -0
- package/dist-types/components/Gallery/index.d.ts +8 -0
- package/dist-types/components/Gallery/wrapper.d.ts +26 -0
- package/dist-types/components/Grid/index.d.ts +11 -0
- package/dist-types/components/Grid/wrapper.d.ts +3 -0
- package/dist-types/components/Heading/index.d.ts +24 -0
- package/dist-types/components/Icon/index.d.ts +16 -0
- package/dist-types/components/InputCheckbox/index.d.ts +7 -0
- package/dist-types/components/InputCheckbox/wrapper.d.ts +13 -0
- package/dist-types/components/InputGroup/index.d.ts +2 -0
- package/dist-types/components/InputLabel/index.d.ts +7 -0
- package/dist-types/components/InputLabel/wrapper.d.ts +3 -0
- package/dist-types/components/InputSearch/index.d.ts +11 -0
- package/dist-types/components/InputSearch/wrapper.d.ts +15 -0
- package/dist-types/components/InputSelect/index.d.ts +14 -0
- package/dist-types/components/InputSelect/wrapper.d.ts +6 -0
- package/dist-types/components/InputText/index.d.ts +8 -0
- package/dist-types/components/InputText/wrapper.d.ts +5 -0
- package/dist-types/components/InsuranceOptions/Insurance.d.ts +9 -0
- package/dist-types/components/InsuranceOptions/InsuranceFree.d.ts +7 -0
- package/dist-types/components/InsuranceOptions/InsuranceFreeModal.d.ts +8 -0
- package/dist-types/components/InsuranceOptions/InsuranceModal.d.ts +10 -0
- package/dist-types/components/InsuranceOptions/index.d.ts +9 -0
- package/dist-types/components/Lightbox/index.d.ts +9 -0
- package/dist-types/components/Lightbox/wrapper.d.ts +9 -0
- package/dist-types/components/Loader/index.d.ts +7 -0
- package/dist-types/components/Loader/wrapper.d.ts +9 -0
- package/dist-types/components/LogoBox/index.d.ts +9 -0
- package/dist-types/components/LogoBox/wrapper.d.ts +4 -0
- package/dist-types/components/Map/index.d.ts +7 -0
- package/dist-types/components/Map/wrapper.d.ts +4 -0
- package/dist-types/components/Modal/index.d.ts +9 -0
- package/dist-types/components/Modal/wrapper.d.ts +21 -0
- package/dist-types/components/OpeningHours/index.d.ts +7 -0
- package/dist-types/components/OptionBox/index.d.ts +9 -0
- package/dist-types/components/OptionBox/wrapper.d.ts +8 -0
- package/dist-types/components/OverflowBox/index.d.ts +6 -0
- package/dist-types/components/OverflowBox/wrapper.d.ts +1 -0
- package/dist-types/components/OverflowGrid/index.d.ts +3 -0
- package/dist-types/components/Page/index.d.ts +7 -0
- package/dist-types/components/Panel/index.d.ts +10 -0
- package/dist-types/components/Panel/wrapper.d.ts +22 -0
- package/dist-types/components/Pdf/index.d.ts +11 -0
- package/dist-types/components/Pdf/wrapper.d.ts +11 -0
- package/dist-types/components/PhoneNumber/index.d.ts +6 -0
- package/dist-types/components/Portal/index.d.ts +4 -0
- package/dist-types/components/Portal/portal-element.d.ts +6 -0
- package/dist-types/components/Portal/portal-namespace.d.ts +1 -0
- package/dist-types/components/Portal/portal.d.ts +7 -0
- package/dist-types/components/Price/index.d.ts +4 -0
- package/dist-types/components/PriceTable/index.d.ts +7 -0
- package/dist-types/components/PriceTable/wrapper.d.ts +4 -0
- package/dist-types/components/ProductCard/index.d.ts +18 -0
- package/dist-types/components/ProductCard/wrapper.d.ts +21 -0
- package/dist-types/components/ProductPage/index.d.ts +9 -0
- package/dist-types/components/ProgressBar/index.d.ts +8 -0
- package/dist-types/components/ProgressBar/wrapper.d.ts +6 -0
- package/dist-types/components/RangeSlider/RangeSliderSimple.d.ts +13 -0
- package/dist-types/components/RangeSlider/SliderWithLabel.d.ts +13 -0
- package/dist-types/components/RangeSlider/handle.d.ts +9 -0
- package/dist-types/components/RangeSlider/index.d.ts +13 -0
- package/dist-types/components/RangeSlider/track.d.ts +9 -0
- package/dist-types/components/RangeSlider/wrapper.d.ts +11 -0
- package/dist-types/components/RangeSliderLabel/index.d.ts +8 -0
- package/dist-types/components/RangeSliderLabel/wrapper.d.ts +10 -0
- package/dist-types/components/Repeat/index.d.ts +3 -0
- package/dist-types/components/Result/index.d.ts +6 -0
- package/dist-types/components/Result/wrapper.d.ts +9 -0
- package/dist-types/components/Root/index.d.ts +4 -0
- package/dist-types/components/SearchBar/index.d.ts +8 -0
- package/dist-types/components/SearchFilter/index.d.ts +3 -0
- package/dist-types/components/SearchTerm/index.d.ts +8 -0
- package/dist-types/components/SearchTerm/wrapper.d.ts +7 -0
- package/dist-types/components/SectionHeader/index.d.ts +8 -0
- package/dist-types/components/SectionHeader/wrapper.d.ts +3 -0
- package/dist-types/components/Snackbar/index.d.ts +9 -0
- package/dist-types/components/Snackbar/wrapper.d.ts +11 -0
- package/dist-types/components/SortSelect/index.d.ts +14 -0
- package/dist-types/components/SortSelect/wrapper.d.ts +6 -0
- package/dist-types/components/Sphere/Sphere.d.ts +10 -0
- package/dist-types/components/Sphere/SphereLightbox.d.ts +6 -0
- package/dist-types/components/Sphere/SphereViewer.d.ts +10 -0
- package/dist-types/components/Sphere/wrapper.d.ts +1 -0
- package/dist-types/components/SrOnly/index.d.ts +1 -0
- package/dist-types/components/SwitchBar/index.d.ts +10 -0
- package/dist-types/components/SwitchBar/wrapper.d.ts +14 -0
- package/dist-types/components/TableColumn/index.d.ts +3 -0
- package/dist-types/components/TableList/index.d.ts +6 -0
- package/dist-types/components/Tabs/index.d.ts +12 -0
- package/dist-types/components/Tabs/wrapper.d.ts +12 -0
- package/dist-types/components/ThreeSixty/Rotation.d.ts +6 -0
- package/dist-types/components/ThreeSixty/ThreeSixtLightbox.d.ts +6 -0
- package/dist-types/components/ThreeSixty/ThreeSixty.d.ts +9 -0
- package/dist-types/components/UspList/index.d.ts +11 -0
- package/dist-types/components/UspList/wrapper.d.ts +11 -0
- package/dist-types/components/Utility/index.d.ts +8 -0
- package/dist-types/components/Video/CustomPlayer.d.ts +10 -0
- package/dist-types/components/Video/EmbeddedVideoLightbox.d.ts +8 -0
- package/dist-types/components/Video/EmbededVideo.d.ts +8 -0
- package/dist-types/components/Video/QuickNavEmbeded.d.ts +7 -0
- package/dist-types/components/Video/QuickNavVideo.d.ts +7 -0
- package/dist-types/components/Video/Video.d.ts +5 -0
- package/dist-types/components/Video/VimeoPlayer.d.ts +7 -0
- package/dist-types/components/Video/YoutubePlayer.d.ts +7 -0
- package/dist-types/components/Video/useThumbnail.d.ts +2 -0
- package/dist-types/components/Video/utils.d.ts +9 -0
- package/dist-types/components/Video/wrapper.d.ts +11 -0
- package/dist-types/hooks/useFetch.d.ts +7 -0
- package/dist-types/hooks/useHasBeenVisible.d.ts +2 -0
- package/dist-types/hooks/useHashGuid.d.ts +2 -0
- package/dist-types/hooks/useInsurance.d.ts +4 -0
- package/dist-types/hooks/useLoan.d.ts +4 -0
- package/dist-types/hooks/useOnScreen.d.ts +2 -0
- package/dist-types/hooks/useOutsideClick.d.ts +2 -0
- package/dist-types/hooks/usePrevious.d.ts +2 -0
- package/dist-types/hooks/useSearchItem.d.ts +4 -0
- package/dist-types/hooks/useSearchItemBranch.d.ts +4 -0
- package/dist-types/hooks/useSessionStorage.d.ts +7 -0
- package/dist-types/hooks/useVimeoThumbnail.d.ts +2 -0
- package/dist-types/index.d.ts +18 -0
- package/dist-types/layout/helpers.d.ts +1 -0
- package/dist-types/layout/keyframes.d.ts +3 -0
- package/dist-types/layout/theme.d.ts +40 -0
- package/dist-types/layouts/WaykeComposite.d.ts +6 -0
- package/dist-types/layouts/WaykeCompositeWithProvider.d.ts +9 -0
- package/dist-types/layouts/search/index.d.ts +15 -0
- package/dist-types/layouts/searchItem/Branch.d.ts +8 -0
- package/dist-types/layouts/searchItem/BranchModal.d.ts +9 -0
- package/dist-types/layouts/searchItem/CheckList.d.ts +13 -0
- package/dist-types/layouts/searchItem/ManufacturerPackagesOption.d.ts +7 -0
- package/dist-types/layouts/searchItem/MetadataItem.d.ts +10 -0
- package/dist-types/layouts/searchItem/PackageOptionModal.d.ts +17 -0
- package/dist-types/layouts/searchItem/PackageOptions.d.ts +7 -0
- package/dist-types/layouts/searchItem/Page404.d.ts +3 -0
- package/dist-types/layouts/searchItem/PageLoading.d.ts +3 -0
- package/dist-types/layouts/searchItem/Property.d.ts +8 -0
- package/dist-types/layouts/searchItem/Related.d.ts +9 -0
- package/dist-types/layouts/searchItem/index.d.ts +12 -0
- package/dist-types/providers/WaykeItemProvidet.d.ts +22 -0
- package/dist-types/providers/WaykeProvider.d.ts +24 -0
- package/dist-types/providers/graphqlProvider.d.ts +6 -0
- package/dist-types/providers/themeProvider.d.ts +6 -0
- package/dist-types/queries/INSURANCE_CALCULATION.d.ts +2 -0
- package/dist-types/queries/LOAN_CALCULATION.d.ts +2 -0
- package/dist-types/queries/SEARCH_ITEM_BRANCH_QUERY.d.ts +2 -0
- package/dist-types/queries/SEARCH_ITEM_QUERY.d.ts +2 -0
- package/dist-types/utils/constants.d.ts +62 -0
- package/dist-types/utils/converters.d.ts +1 -0
- package/dist-types/utils/deep-copy.d.ts +5 -0
- package/dist-types/utils/formats.d.ts +8 -0
- package/dist-types/utils/metadata.min.d.ts +11 -0
- package/dist-types/utils/phonenumbers.d.ts +1 -0
- package/dist-types/utils/pubsub/Actions.d.ts +16 -0
- package/dist-types/utils/pubsub/Events.d.ts +51 -0
- package/dist-types/utils/pubsub/pubsub.d.ts +32 -0
- package/dist-types/utils/regex.d.ts +3 -0
- package/dist-types/utils/sortOptions.d.ts +11 -0
- package/dist-types/utils/specification.d.ts +28 -0
- package/dist-types/utils/ssn.d.ts +1 -0
- package/dist-types/utils/url.d.ts +1 -0
- package/dist-types/utils/vehicle-properties/compare-basic-properties.d.ts +3 -0
- package/dist-types/utils/vehicle-properties/compare-categories.d.ts +3 -0
- package/dist-types/utils/vehicle-properties/compare-properties.d.ts +3 -0
- package/dist-types/utils/vehicle-properties/custom-property-adder.d.ts +12 -0
- package/dist-types/utils/vehicle-properties/property-hint-enricher.d.ts +10 -0
- package/dist-types/utils/vehicle-properties/property-remover.d.ts +7 -0
- package/dist-types/utils/vehicle-properties/property-tree-creator.d.ts +31 -0
- package/dist-types/utils/vehicle-properties/property-tree-sorter.d.ts +3 -0
- package/dist-web/index.js +7555 -0
- package/dist-web/index.js.map +1 -0
- package/package.json +27 -68
- package/dist/index.css +0 -241
- package/dist/index.css.map +0 -7
- package/dist/index.d.ts +0 -3299
- package/dist/index.js +0 -8952
- package/dist/index.js.map +0 -7
- package/dist/index.mjs +0 -8935
- package/dist/index.mjs.map +0 -7
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React, { useState, useCallback } from 'react';
|
|
2
|
+
import OptionBox from '../OptionBox/index';
|
|
3
|
+
import { OptionBoxHeading, OptionBoxContent } from '../OptionBox/wrapper';
|
|
4
|
+
import { UtilityTextPrimary } from '../Utility/index';
|
|
5
|
+
import { ButtonInline } from '../Button/index';
|
|
6
|
+
import { numberSeparator } from '../../utils/formats';
|
|
7
|
+
import useLoanCalculation from '../../hooks/useLoan';
|
|
8
|
+
import LoanModal from './LoanModal';
|
|
9
|
+
const Loan = ({ id, financialOption }) => {
|
|
10
|
+
const [modal, setModal] = useState(false);
|
|
11
|
+
const toggleModal = useCallback(() => setModal(!modal), [modal]);
|
|
12
|
+
const { data } = useLoanCalculation(id, financialOption.duration?.current, financialOption.downPayment?.current, financialOption.residual?.current);
|
|
13
|
+
const interest = data?.loan?.interest;
|
|
14
|
+
const duration = data?.loan?.duration?.current;
|
|
15
|
+
const monthlyCost = data?.loan?.monthlyCost;
|
|
16
|
+
const logo = financialOption?.logotype || 'https://placehold.it/67x10';
|
|
17
|
+
// Skeleton?
|
|
18
|
+
if (financialOption.loanAmount === undefined ||
|
|
19
|
+
financialOption.loanAmount === null ||
|
|
20
|
+
interest === undefined ||
|
|
21
|
+
duration === undefined ||
|
|
22
|
+
monthlyCost === undefined ||
|
|
23
|
+
interest === null ||
|
|
24
|
+
duration === null ||
|
|
25
|
+
monthlyCost === null) {
|
|
26
|
+
return (React.createElement(OptionBox, { logo: logo, logoAlt: "Logotyp" },
|
|
27
|
+
React.createElement(OptionBoxHeading, null, "Laddar..."),
|
|
28
|
+
React.createElement(OptionBoxContent, null,
|
|
29
|
+
React.createElement("p", null, "Laddar..."))));
|
|
30
|
+
}
|
|
31
|
+
return (React.createElement(React.Fragment, null,
|
|
32
|
+
modal && React.createElement(LoanModal, { id: id, financialOption: financialOption, onClose: toggleModal }),
|
|
33
|
+
React.createElement(OptionBox, { logo: logo, logoAlt: "Logotyp" },
|
|
34
|
+
React.createElement(React.Fragment, null,
|
|
35
|
+
React.createElement(OptionBoxHeading, null, `${numberSeparator(monthlyCost)} kr/mån*`),
|
|
36
|
+
React.createElement(OptionBoxContent, null,
|
|
37
|
+
React.createElement("p", null,
|
|
38
|
+
"Delbetala",
|
|
39
|
+
' ',
|
|
40
|
+
financialOption.loanAmount && duration && (React.createElement(React.Fragment, null,
|
|
41
|
+
React.createElement(UtilityTextPrimary, null,
|
|
42
|
+
numberSeparator(financialOption.loanAmount),
|
|
43
|
+
" kr"),
|
|
44
|
+
' ',
|
|
45
|
+
"i ",
|
|
46
|
+
React.createElement(UtilityTextPrimary, null,
|
|
47
|
+
duration,
|
|
48
|
+
" m\u00E5n"),
|
|
49
|
+
"."))),
|
|
50
|
+
React.createElement("p", null,
|
|
51
|
+
`*Beräknat på ${(interest * 100).toFixed(2)}% ränta. `,
|
|
52
|
+
React.createElement(ButtonInline, { onClick: toggleModal }, "L\u00E4s mer")))))));
|
|
53
|
+
};
|
|
54
|
+
export default Loan;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MediaButtonWrapper } from './wrapper';
|
|
3
|
+
import { ButtonSecondary, ButtonContent } from '../Button/index';
|
|
4
|
+
const MediaButton = ({ text, onClick }) => (React.createElement(MediaButtonWrapper, null,
|
|
5
|
+
React.createElement(ButtonSecondary, { onClick: onClick, title: text },
|
|
6
|
+
React.createElement(ButtonContent, null, text))));
|
|
7
|
+
export default MediaButton;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React, { useState, useCallback, useRef, useMemo } from 'react';
|
|
2
|
+
import Slider from 'react-slick';
|
|
3
|
+
import scrollIntoView from 'scroll-into-view-if-needed';
|
|
4
|
+
import { Wrapper, SliderWrapper, Item, Image, ArrowLeft, ArrowRight, Main, Alt, QuickNav, QuickNavItem, QuickNavBtn, QuickNavImg, EnableNavigationButton, } from './wrapper';
|
|
5
|
+
import { IconChevronLeft, IconChevronRight } from '../Icon/index';
|
|
6
|
+
import { ButtonSecondary, ButtonContent } from '../Button/index';
|
|
7
|
+
import Lightbox from '../Lightbox/index';
|
|
8
|
+
import EmbededVideo from '../Video/EmbededVideo';
|
|
9
|
+
import QuickNavEmbeded from '../Video/QuickNavEmbeded';
|
|
10
|
+
import Sphere from '../Sphere/Sphere';
|
|
11
|
+
import { notEmpty } from '../../utils/formats';
|
|
12
|
+
import ThreeSixty from '../ThreeSixty/ThreeSixty';
|
|
13
|
+
import PubSub from '../../utils/pubsub/pubsub';
|
|
14
|
+
import { DEFAULT_PLACEHOLDER_IMAGE } from '../../utils/constants';
|
|
15
|
+
const sliderSettings = {
|
|
16
|
+
dots: false,
|
|
17
|
+
arrows: false,
|
|
18
|
+
infinite: true,
|
|
19
|
+
speed: 300,
|
|
20
|
+
slidesToShow: 1,
|
|
21
|
+
slidesToScroll: 1,
|
|
22
|
+
};
|
|
23
|
+
const Gallery = ({ media, placeholderImage }) => {
|
|
24
|
+
const slider = useRef(null);
|
|
25
|
+
const quickNavRef = useRef(null);
|
|
26
|
+
const isDragging = useRef(false);
|
|
27
|
+
const [index, setIndex] = useState(0);
|
|
28
|
+
const [lightbox, setLightbox] = useState(false);
|
|
29
|
+
const [navigationDisabled, setNavigationDisabled] = useState(false);
|
|
30
|
+
const beforeChange = useCallback((_, newIndex) => {
|
|
31
|
+
const element = quickNavRef.current?.querySelectorAll('li')?.[newIndex];
|
|
32
|
+
if (element) {
|
|
33
|
+
scrollIntoView(element, { scrollMode: 'if-needed', block: 'nearest', inline: 'nearest' });
|
|
34
|
+
}
|
|
35
|
+
setIndex(newIndex);
|
|
36
|
+
}, []);
|
|
37
|
+
const onMouseDown = useCallback(() => {
|
|
38
|
+
if (isDragging.current) {
|
|
39
|
+
isDragging.current = false;
|
|
40
|
+
}
|
|
41
|
+
}, []);
|
|
42
|
+
const onMouseMove = useCallback(() => {
|
|
43
|
+
if (!isDragging.current) {
|
|
44
|
+
isDragging.current = true;
|
|
45
|
+
}
|
|
46
|
+
}, []);
|
|
47
|
+
const onClick = useCallback(() => {
|
|
48
|
+
PubSub.publish('ImagesClick');
|
|
49
|
+
if (!isDragging.current && !lightbox && !!media?.length) {
|
|
50
|
+
setLightbox(true);
|
|
51
|
+
}
|
|
52
|
+
}, [lightbox, media]);
|
|
53
|
+
const nextImage = useCallback(() => {
|
|
54
|
+
if (!slider || !slider.current) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
slider.current.slickNext();
|
|
58
|
+
}, [slider]);
|
|
59
|
+
const prevImage = useCallback(() => {
|
|
60
|
+
if (!slider || !slider.current) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
slider.current.slickPrev();
|
|
64
|
+
}, [slider]);
|
|
65
|
+
const goTo = (target) => {
|
|
66
|
+
if (!slider || !slider.current) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (slider.current) {
|
|
70
|
+
setIndex(target);
|
|
71
|
+
slider.current.slickGoTo(target);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const onDisableNavigation = () => {
|
|
75
|
+
if (!isDragging.current)
|
|
76
|
+
setNavigationDisabled(true);
|
|
77
|
+
};
|
|
78
|
+
const onEnableNavigation = (e) => {
|
|
79
|
+
e.stopPropagation();
|
|
80
|
+
isDragging.current = false;
|
|
81
|
+
setNavigationDisabled(false);
|
|
82
|
+
};
|
|
83
|
+
const onToggleLightbox = useCallback(() => setLightbox(!lightbox), [lightbox]);
|
|
84
|
+
const mediaLength = media?.length || 0;
|
|
85
|
+
const placeholder = useMemo(() => placeholderImage || DEFAULT_PLACEHOLDER_IMAGE, [placeholderImage]);
|
|
86
|
+
return (React.createElement(React.Fragment, null,
|
|
87
|
+
React.createElement(Wrapper, null,
|
|
88
|
+
React.createElement(Main, null,
|
|
89
|
+
React.createElement(SliderWrapper, { onMouseDown: onMouseDown, onMouseMove: onMouseMove, onClick: onClick },
|
|
90
|
+
React.createElement(Slider, { ...sliderSettings, swipe: !navigationDisabled, touchMove: !navigationDisabled, swipeToSlide: !navigationDisabled, ref: slider, beforeChange: beforeChange }, !!media?.length ? (media.map((m, i) => (React.createElement(Item, { key: m.files[0].url || i },
|
|
91
|
+
m.type === 'image' && (React.createElement(Image, { src: m.files[0].formats.filter(notEmpty).find((x) => x.format === '1170x')?.url, alt: `Bild ${i + 1}` })),
|
|
92
|
+
m.type === 'threesixty' && (React.createElement(ThreeSixty, { urls: m.files.map((x) => x.url), visible: i === index, onDisableNavigation: onDisableNavigation, navigationDisabled: navigationDisabled })),
|
|
93
|
+
m.type === 'embedded' && React.createElement(EmbededVideo, { src: m.files[0].url, index: i + 1 }),
|
|
94
|
+
m.type === 'sphere' && (React.createElement(Sphere, { visible: i === index, url: m.files[0].url, preview: m.files[0].url, onDisableNavigation: onDisableNavigation, navigationDisabled: navigationDisabled })))))) : (React.createElement(Item, { key: placeholder },
|
|
95
|
+
React.createElement(Image, { src: placeholder, alt: `Bild 1` })))),
|
|
96
|
+
navigationDisabled && mediaLength > 1 && (React.createElement(EnableNavigationButton, null,
|
|
97
|
+
React.createElement(ButtonSecondary, { onClick: onEnableNavigation, title: "St\u00E4ng" },
|
|
98
|
+
React.createElement(ButtonContent, null, "St\u00E4ng"))))),
|
|
99
|
+
!navigationDisabled && mediaLength > 1 && (React.createElement(React.Fragment, null,
|
|
100
|
+
React.createElement(ArrowLeft, { onClick: prevImage, title: "F\u00F6reg\u00E5ende bild" },
|
|
101
|
+
React.createElement(IconChevronLeft, { block: true })),
|
|
102
|
+
React.createElement(ArrowRight, { onClick: nextImage, title: "N\u00E4sta bild" },
|
|
103
|
+
React.createElement(IconChevronRight, { block: true }))))),
|
|
104
|
+
React.createElement(Alt, null,
|
|
105
|
+
React.createElement(QuickNav, { ref: quickNavRef }, !!media?.length ? (media.map((m, i) => {
|
|
106
|
+
const src = m.files[0].formats.filter(notEmpty).find((x) => x.format === '225x150')?.url ||
|
|
107
|
+
m.files[0].url;
|
|
108
|
+
return (React.createElement(QuickNavItem, { key: src || i, active: index === i },
|
|
109
|
+
React.createElement(QuickNavBtn, { onClick: () => goTo(i), title: `Gå till bild ${i + 1}` },
|
|
110
|
+
m.type === 'image' && React.createElement(QuickNavImg, { src: src, alt: `Bild ${i + 1}` }),
|
|
111
|
+
m.type === 'threesixty' && React.createElement(QuickNavImg, { src: src, alt: `Bild ${i + 1}` }),
|
|
112
|
+
m.type === 'embedded' && React.createElement(QuickNavEmbeded, { src: src, index: i }),
|
|
113
|
+
m.type === 'sphere' && (React.createElement(QuickNavImg, { src: m.files[0].url, alt: `Bild ${i + 1}` })))));
|
|
114
|
+
})) : (React.createElement(QuickNavItem, { key: placeholder, active: true },
|
|
115
|
+
React.createElement(QuickNavBtn, { onClick: () => goTo(0), title: `Gå till bild 0` },
|
|
116
|
+
React.createElement(QuickNavImg, { src: placeholder, alt: `Bild 1` }))))))),
|
|
117
|
+
lightbox && !!media?.length && (React.createElement(Lightbox, { media: media, index: index, onClose: onToggleLightbox }))));
|
|
118
|
+
};
|
|
119
|
+
export default Gallery;
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { size } from '../../layout/helpers';
|
|
3
|
+
import { ButtonReset } from '../Button/index';
|
|
4
|
+
import { Wrapper as Container } from '../Container/wrapper';
|
|
5
|
+
const quickNavWidth = 83; // 75px + 8px
|
|
6
|
+
export const Wrapper = styled.div `
|
|
7
|
+
${(props) => props.theme.breakpoint.LtMd} {
|
|
8
|
+
${Container} & {
|
|
9
|
+
margin-left: ${size(-3)};
|
|
10
|
+
margin-right: ${size(-3)};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
${(props) => props.theme.breakpoint.LtSm} {
|
|
15
|
+
${Container} & {
|
|
16
|
+
margin-left: ${size(-2)};
|
|
17
|
+
margin-right: ${size(-2)};
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
${(props) => props.theme.breakpoint.Md} {
|
|
22
|
+
position: relative;
|
|
23
|
+
padding-right: ${quickNavWidth}px;
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
export const Main = styled.div `
|
|
27
|
+
position: relative;
|
|
28
|
+
height: 0;
|
|
29
|
+
padding-bottom: 66.66666667%;
|
|
30
|
+
|
|
31
|
+
${(props) => props.theme.breakpoint.Md} {
|
|
32
|
+
//background-color: ${(props) => props.theme.color.accent};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.slick-slider,
|
|
36
|
+
.slick-list,
|
|
37
|
+
.slick-track,
|
|
38
|
+
.slick-slide,
|
|
39
|
+
.slick-slide > * {
|
|
40
|
+
height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.slick-slide > * {
|
|
44
|
+
font-size: 0;
|
|
45
|
+
|
|
46
|
+
> * {
|
|
47
|
+
font-size: 1rem;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
export const Alt = styled.div `
|
|
52
|
+
position: absolute;
|
|
53
|
+
top: 0;
|
|
54
|
+
bottom: 0;
|
|
55
|
+
right: 0;
|
|
56
|
+
width: ${quickNavWidth}px;
|
|
57
|
+
padding-left: ${size(1)};
|
|
58
|
+
|
|
59
|
+
${(props) => props.theme.breakpoint.LtMd} {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:after {
|
|
64
|
+
content: '';
|
|
65
|
+
position: absolute;
|
|
66
|
+
bottom: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
right: 0;
|
|
69
|
+
height: ${size(2.5)};
|
|
70
|
+
background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
74
|
+
export const Item = styled.div `
|
|
75
|
+
position: relative;
|
|
76
|
+
width: 100%;
|
|
77
|
+
height: 100%;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
|
|
80
|
+
:focus {
|
|
81
|
+
outline: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
${(props) => props.theme.breakpoint.LtMd} {
|
|
85
|
+
//background-color: ${(props) => props.theme.color.textDark};
|
|
86
|
+
transition: border-radius 150ms ease;
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
export const SliderWrapper = styled.div `
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: 0;
|
|
92
|
+
bottom: 0;
|
|
93
|
+
left: 0;
|
|
94
|
+
right: 0;
|
|
95
|
+
|
|
96
|
+
.slick-slider {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 0;
|
|
99
|
+
bottom: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
${(props) => props.theme.breakpoint.LtMd} {
|
|
105
|
+
overflow: hidden;
|
|
106
|
+
|
|
107
|
+
.slick-list {
|
|
108
|
+
overflow: visible;
|
|
109
|
+
width: 95%;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.slick-slide {
|
|
113
|
+
border-right: ${size(1)} solid ${(props) => props.theme.color.bg};
|
|
114
|
+
//transform: scale(0.95);
|
|
115
|
+
transform-origin: 0 50%;
|
|
116
|
+
transition: transform 150ms ease;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.slick-slide.slick-active {
|
|
120
|
+
transform: none;
|
|
121
|
+
|
|
122
|
+
${Item} {
|
|
123
|
+
border-top-left-radius: 0;
|
|
124
|
+
border-bottom-left-radius: 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
export const Image = styled.img `
|
|
130
|
+
display: block;
|
|
131
|
+
position: absolute;
|
|
132
|
+
left: 0;
|
|
133
|
+
top: 0;
|
|
134
|
+
right: 0;
|
|
135
|
+
bottom: 0;
|
|
136
|
+
margin: auto;
|
|
137
|
+
max-width: 100%;
|
|
138
|
+
max-height: 100%;
|
|
139
|
+
object-fit: cover;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
`;
|
|
142
|
+
export const ImageFull = styled.img `
|
|
143
|
+
display: block;
|
|
144
|
+
position: absolute;
|
|
145
|
+
top: 0;
|
|
146
|
+
left: 0;
|
|
147
|
+
width: 100%;
|
|
148
|
+
height: 100%;
|
|
149
|
+
object-fit: cover;
|
|
150
|
+
`;
|
|
151
|
+
// Arrow Nav
|
|
152
|
+
const Arrow = styled(ButtonReset) `
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 50%;
|
|
155
|
+
transform: translateY(-50%);
|
|
156
|
+
display: flex;
|
|
157
|
+
align-items: center;
|
|
158
|
+
justify-content: center;
|
|
159
|
+
width: ${size(4)};
|
|
160
|
+
height: ${size(4)};
|
|
161
|
+
border-radius: 50%;
|
|
162
|
+
font-size: 1rem;
|
|
163
|
+
line-height: 1;
|
|
164
|
+
background-color: rgba(255, 255, 255, 0.4);
|
|
165
|
+
backdrop-filter: blur(5px);
|
|
166
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
167
|
+
color: ${(props) => props.theme.color.textDark};
|
|
168
|
+
transform-origin: 50% 50%;
|
|
169
|
+
transition: transform 200ms ease;
|
|
170
|
+
|
|
171
|
+
:before {
|
|
172
|
+
content: '';
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 0;
|
|
175
|
+
bottom: 0;
|
|
176
|
+
left: 0;
|
|
177
|
+
right: 0;
|
|
178
|
+
border-radius: 50%;
|
|
179
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
180
|
+
opacity: 0;
|
|
181
|
+
transition: opacity 200ms ease;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
:hover {
|
|
185
|
+
:before {
|
|
186
|
+
opacity: 1;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:active {
|
|
191
|
+
transform: translateY(-50%) scale(0.95);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
${(props) => props.theme.breakpoint.LtSm} {
|
|
195
|
+
display: none;
|
|
196
|
+
}
|
|
197
|
+
`;
|
|
198
|
+
export const ArrowLeft = styled(Arrow) `
|
|
199
|
+
left: ${size(2)};
|
|
200
|
+
`;
|
|
201
|
+
export const ArrowRight = styled(Arrow) `
|
|
202
|
+
right: ${size(2)};
|
|
203
|
+
`;
|
|
204
|
+
// Quick Nav
|
|
205
|
+
export const QuickNav = styled.ul `
|
|
206
|
+
position: relative;
|
|
207
|
+
max-height: 100%;
|
|
208
|
+
list-style: none;
|
|
209
|
+
padding: 0;
|
|
210
|
+
margin: 0;
|
|
211
|
+
overflow: auto;
|
|
212
|
+
-webkit-overflow-scrolling: touch;
|
|
213
|
+
`;
|
|
214
|
+
export const QuickNavItem = styled.li.attrs(() => ({
|
|
215
|
+
className: 'wayke__theme wayke__color--primary-text',
|
|
216
|
+
})) `
|
|
217
|
+
position: relative;
|
|
218
|
+
|
|
219
|
+
& + & {
|
|
220
|
+
margin-top: ${size(1)};
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
${({ active }) => active &&
|
|
224
|
+
css `
|
|
225
|
+
:before {
|
|
226
|
+
content: '';
|
|
227
|
+
position: absolute;
|
|
228
|
+
top: 0;
|
|
229
|
+
left: 0;
|
|
230
|
+
width: 100%;
|
|
231
|
+
height: 100%;
|
|
232
|
+
border: 3px solid currentColor;
|
|
233
|
+
z-index: 2;
|
|
234
|
+
}
|
|
235
|
+
`}
|
|
236
|
+
`;
|
|
237
|
+
export const QuickNavBtn = styled(ButtonReset) `
|
|
238
|
+
position: relative;
|
|
239
|
+
display: block;
|
|
240
|
+
width: 100%;
|
|
241
|
+
height: 0;
|
|
242
|
+
padding-bottom: 66.66666667%; // 3:2
|
|
243
|
+
transform-origin: 50% 50%;
|
|
244
|
+
transition: transform 300ms cubic-bezier(0.47, 1.64, 0.41, 0.8);
|
|
245
|
+
|
|
246
|
+
:before {
|
|
247
|
+
content: '';
|
|
248
|
+
position: absolute;
|
|
249
|
+
top: 0;
|
|
250
|
+
left: 0;
|
|
251
|
+
width: 100%;
|
|
252
|
+
height: 100%;
|
|
253
|
+
background-color: rgba(0, 0, 0, 0.15);
|
|
254
|
+
opacity: 0;
|
|
255
|
+
z-index: 1;
|
|
256
|
+
transition: opacity 150ms ease;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:hover {
|
|
260
|
+
:before {
|
|
261
|
+
opacity: 1;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
:active {
|
|
266
|
+
transform: scale(0.95);
|
|
267
|
+
}
|
|
268
|
+
`;
|
|
269
|
+
export const QuickNavImg = styled.img `
|
|
270
|
+
display: block;
|
|
271
|
+
position: absolute;
|
|
272
|
+
top: 0;
|
|
273
|
+
left: 0;
|
|
274
|
+
width: 100%;
|
|
275
|
+
height: 100%;
|
|
276
|
+
object-fit: cover;
|
|
277
|
+
`;
|
|
278
|
+
// Media Button
|
|
279
|
+
export const MediaButtonWrapper = styled.div `
|
|
280
|
+
position: absolute;
|
|
281
|
+
bottom: ${size(2)};
|
|
282
|
+
left: 50%;
|
|
283
|
+
transform: translateX(-50%);
|
|
284
|
+
z-index: 1;
|
|
285
|
+
`;
|
|
286
|
+
// Sphere Close Button
|
|
287
|
+
export const EnableNavigationButton = styled.div `
|
|
288
|
+
position: absolute;
|
|
289
|
+
bottom: ${size(2)};
|
|
290
|
+
left: 50%;
|
|
291
|
+
transform: translateX(-50%);
|
|
292
|
+
z-index: 1;
|
|
293
|
+
`;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Wrapper, List, Item } from './wrapper';
|
|
3
|
+
import ProductCard from '../ProductCard/index';
|
|
4
|
+
import { numberSeparator } from '../../utils/formats';
|
|
5
|
+
const resolveImage = (document) => {
|
|
6
|
+
const img = document.featuredImage?.files?.[0]?.url;
|
|
7
|
+
if (img) {
|
|
8
|
+
return `${img}?w=567&q=72`;
|
|
9
|
+
}
|
|
10
|
+
return undefined;
|
|
11
|
+
};
|
|
12
|
+
const Grid = ({ documents, placeholderImage, hashRoute, pathRoute, onClickItem }) => {
|
|
13
|
+
if (!documents) {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
return (React.createElement(Wrapper, null,
|
|
17
|
+
React.createElement(List, null, documents.map((document) => {
|
|
18
|
+
const _path = pathRoute?.replace(/^\/|\/$/g, '');
|
|
19
|
+
const prefix = _path ? `/${_path}/` : '/';
|
|
20
|
+
const pathRouteUrl = window.location.pathname === '/'
|
|
21
|
+
? `${prefix}${document._id}`
|
|
22
|
+
: `${window.location.pathname}${prefix}${document._id}`;
|
|
23
|
+
return (React.createElement(Item, { key: document._id },
|
|
24
|
+
React.createElement(ProductCard, { id: document._id, onClick: onClickItem, title: document.title, pathRoute: pathRoute, href: pathRoute ? pathRouteUrl : hashRoute ? `#${document._id}` : undefined, image: resolveImage(document), placeholderImage: placeholderImage, description: document.shortDescription, uspList: [
|
|
25
|
+
{
|
|
26
|
+
title: document.modelYear,
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
title: `${numberSeparator(document.mileage)} mil`,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: document.gearboxType,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
title: document.fuelType,
|
|
36
|
+
},
|
|
37
|
+
], price: `${numberSeparator(document.price)} kr`, leasingPrice: document.leasingPrice !== undefined
|
|
38
|
+
? `${numberSeparator(document.leasingPrice)} kr`
|
|
39
|
+
: undefined, oldPrice: document.oldPrice !== undefined && document.price < document.oldPrice
|
|
40
|
+
? `${numberSeparator(document.oldPrice)} kr`
|
|
41
|
+
: undefined })));
|
|
42
|
+
}))));
|
|
43
|
+
};
|
|
44
|
+
export default Grid;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { size } from '../../layout/helpers';
|
|
3
|
+
export const Wrapper = styled.div ``;
|
|
4
|
+
export const List = styled.ul `
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
list-style: none;
|
|
8
|
+
padding: 0;
|
|
9
|
+
margin: ${size(-2)} ${size(-1)};
|
|
10
|
+
`;
|
|
11
|
+
export const Item = styled.li `
|
|
12
|
+
flex: 1 1 auto;
|
|
13
|
+
width: 100%;
|
|
14
|
+
max-width: 100%;
|
|
15
|
+
padding: ${size(2)} ${size(1)};
|
|
16
|
+
|
|
17
|
+
${(props) => props.theme.breakpoint.Sm} {
|
|
18
|
+
width: 50%;
|
|
19
|
+
max-width: 50%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
${(props) => props.theme.breakpoint.Md} {
|
|
23
|
+
width: 33.333%;
|
|
24
|
+
max-width: 33.333%;
|
|
25
|
+
}
|
|
26
|
+
`;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components';
|
|
2
|
+
import { size } from '../../layout/helpers';
|
|
3
|
+
const HeadingBase = styled.div.attrs(() => ({
|
|
4
|
+
className: 'wayke__theme wayke__font--bold',
|
|
5
|
+
})) `
|
|
6
|
+
margin-top: 0;
|
|
7
|
+
margin-bottom: ${size(2)};
|
|
8
|
+
font-weight: normal;
|
|
9
|
+
line-height: 1.2;
|
|
10
|
+
|
|
11
|
+
${({ noMargin }) => noMargin &&
|
|
12
|
+
css `
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
`}
|
|
15
|
+
`;
|
|
16
|
+
export const H1 = styled(HeadingBase).attrs((props) => ({
|
|
17
|
+
as: props.as || 'h1',
|
|
18
|
+
})) `
|
|
19
|
+
font-size: 1.875rem;
|
|
20
|
+
`;
|
|
21
|
+
export const H2 = styled(HeadingBase).attrs((props) => ({
|
|
22
|
+
as: props.as || 'h2',
|
|
23
|
+
})) `
|
|
24
|
+
font-size: 1.5rem;
|
|
25
|
+
`;
|
|
26
|
+
/*
|
|
27
|
+
export const H3 = styled(HeadingBase).attrs<{ as: string }>((props) => ({
|
|
28
|
+
as: props.as || 'h3',
|
|
29
|
+
}))`
|
|
30
|
+
font-size: 1.125rem;
|
|
31
|
+
`;
|
|
32
|
+
*/
|
|
33
|
+
export const H4 = styled(HeadingBase).attrs((props) => ({
|
|
34
|
+
as: props.as || 'h4',
|
|
35
|
+
})) `
|
|
36
|
+
font-size: 1rem;
|
|
37
|
+
`;
|
|
38
|
+
export const H5 = styled(HeadingBase).attrs((props) => ({
|
|
39
|
+
as: props.as || 'h5',
|
|
40
|
+
})) `
|
|
41
|
+
font-size: 0.875rem;
|
|
42
|
+
`;
|
|
43
|
+
/*
|
|
44
|
+
export const H6 = styled(HeadingBase).attrs<{ as: string }>((props) => ({
|
|
45
|
+
as: props.as || 'h6',
|
|
46
|
+
}))`
|
|
47
|
+
font-size: 0.67rem;
|
|
48
|
+
`;
|
|
49
|
+
*/
|
|
50
|
+
export const VisualHeading = styled.div.attrs(() => ({
|
|
51
|
+
className: 'wayke__theme wayke__font--bold',
|
|
52
|
+
})) `
|
|
53
|
+
font-size: 1em;
|
|
54
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import styled, { css } from 'styled-components';
|
|
3
|
+
const Icon = styled.svg.attrs(() => ({
|
|
4
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
5
|
+
})) `
|
|
6
|
+
display: inline-block;
|
|
7
|
+
vertical-align: middle;
|
|
8
|
+
width: 1em;
|
|
9
|
+
height: 1em;
|
|
10
|
+
fill: currentColor;
|
|
11
|
+
|
|
12
|
+
${({ block }) => block &&
|
|
13
|
+
css `
|
|
14
|
+
display: block;
|
|
15
|
+
`}
|
|
16
|
+
`;
|
|
17
|
+
export const IconInfo = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 24 24", block: block },
|
|
18
|
+
React.createElement("path", { d: "M12 0C5.371 0 0 5.371 0 12s5.371 12 12 12 12-5.371 12-12S18.629 0 12 0zm0 2c5.5234 0 10 4.4766 10 10s-4.4766 10-10 10S2 17.5234 2 12 6.4766 2 12 2zm0 3.8125c-.1836 0-.336-.004-.5.0313-.164.0351-.3164.125-.4375.2187-.121.0938-.211.2227-.2813.375s-.0937.332-.0937.5625c0 .2266.0234.4063.0938.5625.0703.1563.1601.2813.2812.375.121.0938.2734.1484.4375.1875.164.039.3164.0625.5.0625.1797 0 .371-.0234.5313-.0625.1601-.039.2851-.0938.4062-.1875.121-.0938.211-.2188.2813-.375.0703-.1523.125-.336.125-.5625 0-.2305-.0547-.4102-.125-.5625-.0704-.1523-.1602-.2813-.2813-.375-.121-.0938-.246-.1836-.4063-.2188-.1601-.0351-.3515-.0312-.5312-.0312zm-1.2188 3.3438v8.9687h2.4375V9.1562z" })));
|
|
19
|
+
export const IconCancel = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 16 16", block: block },
|
|
20
|
+
React.createElement("path", { d: "M15.7 14.3c.4.4.4 1 0 1.4-.2.2-.5.3-.7.3s-.5-.1-.7-.3L8 9.4l-6.3 6.3c-.2.2-.4.3-.7.3s-.5-.1-.7-.3c-.4-.4-.4-1 0-1.4L6.6 8 .3 1.7C-.1 1.3-.1.7.3.3c.4-.4 1-.4 1.4 0L8 6.6 14.3.3c.4-.4 1-.4 1.4 0 .4.4.4 1 0 1.4L9.4 8l6.3 6.3z" })));
|
|
21
|
+
export const IconChevronDown = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 18 18", block: block },
|
|
22
|
+
React.createElement("path", { d: "M17.7 5L9 13.7.3 5l.7-.7 8 8 8-8 .7.7z" })));
|
|
23
|
+
export const IconChevronLeft = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 18 18", block: block },
|
|
24
|
+
React.createElement("path", { d: "M13 17.7L4.3 9 13 .3l.7.7-8 8 8 8-.7.7z" })));
|
|
25
|
+
export const IconChevronRight = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 18 18", block: block },
|
|
26
|
+
React.createElement("path", { d: "M5 .3L13.7 9 5 17.7l-.7-.7 8-8-8-8L5 .3z" })));
|
|
27
|
+
export const IconCheck = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 16 16", block: block },
|
|
28
|
+
React.createElement("path", { d: "M15.6 4.3l-9.3 9.4c-.5.5-1.4.5-1.9 0l-4-4c-.5-.5-.5-1.4 0-1.9s1.3-.5 1.9 0l3.1 3.1 8.4-8.5c.5-.5 1.4-.5 1.9 0s.4 1.3-.1 1.9z" })));
|
|
29
|
+
export const IconRadio = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 16 16", block: block },
|
|
30
|
+
React.createElement("path", { d: "M13 8c0 2.8-2.2 5-5 5s-5-2.2-5-5 2.2-5 5-5 5 2.2 5 5zm3 0c0 4.4-3.6 8-8 8s-8-3.6-8-8 3.6-8 8-8 8 3.6 8 8zm-1 0c0-3.9-3.1-7-7-7S1 4.1 1 8s3.1 7 7 7 7-3.1 7-7z" })));
|
|
31
|
+
export const IconSearch = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 16 16", block: block },
|
|
32
|
+
React.createElement("path", { d: "M15.5 15.3L11 10.8c1.2-1.1 2-2.7 2-4.5C13 2.9 10.2.1 6.8.1S.5 2.8.5 6.2s2.8 6.2 6.2 6.2c1.3 0 2.5-.4 3.5-1.1l4.6 4.6.7-.6zM1.4 6.2C1.4 3.3 3.8 1 6.7 1S12 3.3 12 6.2c0 1.5-.7 2.9-1.7 3.9l-.7.5c-.8.5-1.8.8-2.8.8-3 .1-5.4-2.3-5.4-5.2z" })));
|
|
33
|
+
export const IconExclamationCircle = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 32 32", block: block },
|
|
34
|
+
React.createElement("path", { d: "M14.482 21.893c0-0.857 0.694-1.551 1.551-1.551s1.551 0.694 1.551 1.551c0 0.857-0.694 1.551-1.551 1.551s-1.551-0.694-1.551-1.551zM16.033 2.838c-7.271 0-13.187 5.916-13.187 13.187s5.916 13.187 13.187 13.187 13.187-5.916 13.187-13.187c0-7.271-5.916-13.187-13.187-13.187zM16.033 27.203c-6.163 0-11.178-5.015-11.178-11.178s5.015-11.178 11.178-11.178c6.164 0 11.178 5.015 11.178 11.178s-5.014 11.178-11.178 11.178zM16.033 8.308c-0.555 0-1.004 0.45-1.004 1.004v8.227c0 0.555 0.45 1.004 1.004 1.004s1.004-0.45 1.004-1.004v-8.227c0-0.555-0.45-1.004-1.004-1.004z" })));
|
|
35
|
+
export const IconExclamationTriangle = ({ block }) => (React.createElement(Icon, { viewBox: "0 0 32 32", block: block },
|
|
36
|
+
React.createElement("path", { d: "M15.951 19.663c-0.457 0-0.828-0.37-0.828-0.828v-4.357c0-0.457 0.37-0.828 0.828-0.828s0.828 0.37 0.828 0.828v4.357c0 0.457-0.371 0.828-0.828 0.828zM15.952 22.906c-0.305 0-0.606-0.126-0.821-0.341s-0.338-0.514-0.338-0.818 0.122-0.606 0.338-0.821c0.431-0.43 1.209-0.43 1.639 0 0.215 0.215 0.341 0.516 0.341 0.821s-0.126 0.603-0.341 0.818c-0.215 0.215-0.513 0.341-0.818 0.341zM27.049 27.070h-22.196c-0.352 0-0.677-0.186-0.855-0.489s-0.184-0.677-0.014-0.985l11.098-20.105c0.175-0.317 0.508-0.513 0.87-0.513s0.695 0.197 0.87 0.513l11.098 20.105c0.17 0.308 0.165 0.683-0.014 0.985s-0.504 0.489-0.856 0.489zM6.536 25.083h18.83l-9.415-17.056-9.415 17.056z" })));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Input, Label, LabelText, Wrapper } from './wrapper';
|
|
3
|
+
const InputCheckbox = ({ children, ...props }) => {
|
|
4
|
+
const { id } = props;
|
|
5
|
+
return (React.createElement(Wrapper, { "aria-labelledby": id ? `${id}-label` : undefined },
|
|
6
|
+
React.createElement(Input, { ...props }),
|
|
7
|
+
React.createElement(Label, { id: `${id}-label`, htmlFor: id },
|
|
8
|
+
React.createElement(LabelText, null, children))));
|
|
9
|
+
};
|
|
10
|
+
export default InputCheckbox;
|