react-component-kit-ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/LICENSE +21 -0
- package/README.md +225 -2
- package/dist/apexcharts.js +327 -0
- package/dist/app.js +21 -0
- package/dist/buttons.js +26 -0
- package/dist/cards.js +26 -0
- package/dist/charts.js +50 -0
- package/dist/chunks/ActivityHeatmapGrid-P3FP0D6z.js +416 -0
- package/dist/chunks/AnimatedCheckmark-CJEmTxC6.js +19 -0
- package/dist/chunks/AnimatedInput-Dt37HZSs.js +21 -0
- package/dist/chunks/AuthCard-BkWHMFho.js +1409 -0
- package/dist/chunks/Badge-CHkR__dT.js +11 -0
- package/dist/chunks/CartPageList-DvsbjjCi.js +331 -0
- package/dist/chunks/CartToast-UIJFD2CK.js +570 -0
- package/dist/chunks/ChangelogSection-eY4neMby.js +2409 -0
- package/dist/chunks/CountdownBanner-CcpsvvE8.js +1263 -0
- package/dist/chunks/CtaNewsletterSection-Cl3fLVpQ.js +75 -0
- package/dist/chunks/CustomRadioGroup-DAwliU9n.js +26 -0
- package/dist/chunks/DiagonalSectionDivider-CwOOEFbn.js +541 -0
- package/dist/chunks/FloatingFeedbackWidget-D_0EpalW.js +348 -0
- package/dist/chunks/FooterMegaSection-DG1qtKuZ.js +67 -0
- package/dist/chunks/HackerDecodeText-hutANQXI.js +289 -0
- package/dist/chunks/LogoWallGrid-BEpsn1Gt.js +433 -0
- package/dist/chunks/LogoWithGalaxy-q_3-9vGU.js +139 -0
- package/dist/chunks/ProductCardMinimal-lQi5vy3-.js +88 -0
- package/dist/chunks/QuickJumpDock-DZzwR0vg.js +294 -0
- package/dist/chunks/SegmentedBarChart-DEBZURnS.js +384 -0
- package/dist/chunks/ShopCategoryHero-BLlWZ-i3.js +695 -0
- package/dist/chunks/StackedAreaChart-DF1-3rDG.js +453 -0
- package/dist/chunks/StatsTrendCard--nij2Jv0.js +491 -0
- package/dist/chunks/StatusTimelineFeed-BRYwz08g.js +62 -0
- package/dist/chunks/StepBreadcrumbBar-BGXvx5NX.js +32 -0
- package/dist/chunks/StepperInput-Ck_9n2BL.js +30 -0
- package/dist/chunks/TagsAutocompleteInput-BdbVqPbF.js +467 -0
- package/dist/chunks/TiltGlowButton-BRHwq9Af.js +650 -0
- package/dist/chunks/TypingIndicator-DshBNXhx.js +373 -0
- package/dist/chunks/WaterfallChart-C6NFbfO0.js +1337 -0
- package/dist/chunks/cart-store-u-ScUvte.js +212 -0
- package/dist/chunks/chart-tooltip-C7pIc_Su.js +49 -0
- package/dist/chunks/galaxy-scene-C854qLoX.js +231 -0
- package/dist/data.js +28 -0
- package/dist/ecommerce.js +43 -0
- package/dist/favicon.svg +14 -0
- package/dist/feedback.js +28 -0
- package/dist/forms.js +31 -0
- package/dist/global.css +254 -0
- package/dist/index.js +397 -0
- package/dist/layout.js +26 -0
- package/dist/logo-animated.svg +46 -0
- package/dist/logo.svg +46 -0
- package/dist/navigation.js +28 -0
- package/dist/overlays.js +27 -0
- package/dist/robots.txt +4 -0
- package/dist/sections.js +68 -0
- package/dist/styles.css +1 -0
- package/dist/templates/ecommerce-editorial.js +481 -0
- package/dist/templates/ecommerce.js +556 -0
- package/dist/templates/saas-hotel.js +540 -0
- package/dist/three.js +17 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/types/components/apexcharts.d.ts +3 -0
- package/dist/types/components/index.d.ts +15 -0
- package/dist/types/components/lib/AnimatedGalaxy.d.ts +8 -0
- package/dist/types/components/lib/Galaxy3D.d.ts +15 -0
- package/dist/types/components/lib/LogoWithGalaxy.d.ts +8 -0
- package/dist/types/components/lib/app/AppSidebar.d.ts +53 -0
- package/dist/types/components/lib/app/AppTopbar.d.ts +52 -0
- package/dist/types/components/lib/app/ArrivalsBoard.d.ts +45 -0
- package/dist/types/components/lib/app/AuthCard.d.ts +45 -0
- package/dist/types/components/lib/app/DataTable.d.ts +54 -0
- package/dist/types/components/lib/app/GuestProfileCard.d.ts +48 -0
- package/dist/types/components/lib/app/HousekeepingBoard.d.ts +38 -0
- package/dist/types/components/lib/app/PageHeader.d.ts +45 -0
- package/dist/types/components/lib/app/PlanUsageCard.d.ts +44 -0
- package/dist/types/components/lib/app/RoomRack.d.ts +42 -0
- package/dist/types/components/lib/app/SettingsSection.d.ts +34 -0
- package/dist/types/components/lib/app/SwitchRow.d.ts +28 -0
- package/dist/types/components/lib/app/TeamMembers.d.ts +33 -0
- package/dist/types/components/lib/app/app-icons.d.ts +37 -0
- package/dist/types/components/lib/app/index.d.ts +15 -0
- package/dist/types/components/lib/buttons/AnimatedIconButton.d.ts +22 -0
- package/dist/types/components/lib/buttons/BorderDrawButton.d.ts +19 -0
- package/dist/types/components/lib/buttons/CyberpunkButton.d.ts +23 -0
- package/dist/types/components/lib/buttons/DoubleBorderButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/GhostOutlineButton.d.ts +21 -0
- package/dist/types/components/lib/buttons/GlassButton.d.ts +23 -0
- package/dist/types/components/lib/buttons/GlowButton.d.ts +19 -0
- package/dist/types/components/lib/buttons/LiquidButton.d.ts +19 -0
- package/dist/types/components/lib/buttons/LoadingButton.d.ts +20 -0
- package/dist/types/components/lib/buttons/MagneticButton.d.ts +21 -0
- package/dist/types/components/lib/buttons/MinimalPillButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/NeonBorderButton.d.ts +19 -0
- package/dist/types/components/lib/buttons/NeumorphicButton.d.ts +21 -0
- package/dist/types/components/lib/buttons/PulseButton.d.ts +20 -0
- package/dist/types/components/lib/buttons/RetroArcadeButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/RetroShadowButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/RippleButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/ShimmerButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/ShinyButton.d.ts +17 -0
- package/dist/types/components/lib/buttons/SlideRevealButton.d.ts +20 -0
- package/dist/types/components/lib/buttons/ThreeDPushButton.d.ts +19 -0
- package/dist/types/components/lib/buttons/TiltGlowButton.d.ts +21 -0
- package/dist/types/components/lib/buttons/index.d.ts +22 -0
- package/dist/types/components/lib/cards/BlogHorizontalCard.d.ts +17 -0
- package/dist/types/components/lib/cards/CyberFeatureCard.d.ts +15 -0
- package/dist/types/components/lib/cards/EcommerceProductCard.d.ts +21 -0
- package/dist/types/components/lib/cards/GithubRepoCard.d.ts +25 -0
- package/dist/types/components/lib/cards/GlassCard.d.ts +19 -0
- package/dist/types/components/lib/cards/GlassEventCard.d.ts +17 -0
- package/dist/types/components/lib/cards/GlowPortfolioCard.d.ts +17 -0
- package/dist/types/components/lib/cards/InteractiveTiltCard.d.ts +13 -0
- package/dist/types/components/lib/cards/KanbanItemCard.d.ts +15 -0
- package/dist/types/components/lib/cards/MinimalLinkCard.d.ts +13 -0
- package/dist/types/components/lib/cards/MusicPlayerMini.d.ts +17 -0
- package/dist/types/components/lib/cards/NeumorphicCard.d.ts +13 -0
- package/dist/types/components/lib/cards/NotificationCard.d.ts +15 -0
- package/dist/types/components/lib/cards/PricingCard.d.ts +17 -0
- package/dist/types/components/lib/cards/PricingCompareMiniCard.d.ts +25 -0
- package/dist/types/components/lib/cards/ProfileCard.d.ts +17 -0
- package/dist/types/components/lib/cards/RetroGameCard.d.ts +15 -0
- package/dist/types/components/lib/cards/StatCard.d.ts +15 -0
- package/dist/types/components/lib/cards/StatsTrendCard.d.ts +19 -0
- package/dist/types/components/lib/cards/TaskKanbanCard.d.ts +17 -0
- package/dist/types/components/lib/cards/TestimonialCardClean.d.ts +17 -0
- package/dist/types/components/lib/cards/WeatherWidgetCard.d.ts +17 -0
- package/dist/types/components/lib/cards/index.d.ts +22 -0
- package/dist/types/components/lib/charts/ActivityRings.d.ts +26 -0
- package/dist/types/components/lib/charts/AreaChart.d.ts +16 -0
- package/dist/types/components/lib/charts/BarChart.d.ts +17 -0
- package/dist/types/components/lib/charts/BoxPlotChart.d.ts +26 -0
- package/dist/types/components/lib/charts/BubbleChart.d.ts +35 -0
- package/dist/types/components/lib/charts/BulletChart.d.ts +29 -0
- package/dist/types/components/lib/charts/BumpChart.d.ts +25 -0
- package/dist/types/components/lib/charts/CandlestickChart.d.ts +30 -0
- package/dist/types/components/lib/charts/ChartFrame.d.ts +43 -0
- package/dist/types/components/lib/charts/DivergingBarChart.d.ts +31 -0
- package/dist/types/components/lib/charts/DonutChart.d.ts +16 -0
- package/dist/types/components/lib/charts/DumbbellChart.d.ts +31 -0
- package/dist/types/components/lib/charts/ForecastLineChart.d.ts +30 -0
- package/dist/types/components/lib/charts/FunnelChart.d.ts +24 -0
- package/dist/types/components/lib/charts/GaugeChart.d.ts +29 -0
- package/dist/types/components/lib/charts/GoalProgressChart.d.ts +29 -0
- package/dist/types/components/lib/charts/GroupedBarChart.d.ts +32 -0
- package/dist/types/components/lib/charts/HeatmapChart.d.ts +29 -0
- package/dist/types/components/lib/charts/HistogramChart.d.ts +27 -0
- package/dist/types/components/lib/charts/HorizontalBarChart.d.ts +32 -0
- package/dist/types/components/lib/charts/KpiStatTile.d.ts +28 -0
- package/dist/types/components/lib/charts/KpiTrendGrid.d.ts +27 -0
- package/dist/types/components/lib/charts/LineChart.d.ts +38 -0
- package/dist/types/components/lib/charts/LinearProgressGauge.d.ts +19 -0
- package/dist/types/components/lib/charts/LollipopChart.d.ts +32 -0
- package/dist/types/components/lib/charts/MeterGauge.d.ts +32 -0
- package/dist/types/components/lib/charts/MetricDeltaTable.d.ts +36 -0
- package/dist/types/components/lib/charts/PieChart.d.ts +32 -0
- package/dist/types/components/lib/charts/PolarAreaChart.d.ts +27 -0
- package/dist/types/components/lib/charts/PopulationPyramid.d.ts +31 -0
- package/dist/types/components/lib/charts/PunchCardChart.d.ts +26 -0
- package/dist/types/components/lib/charts/RadarChart.d.ts +28 -0
- package/dist/types/components/lib/charts/RadarMetricChart.d.ts +20 -0
- package/dist/types/components/lib/charts/RadialBarChart.d.ts +27 -0
- package/dist/types/components/lib/charts/RangeAreaChart.d.ts +34 -0
- package/dist/types/components/lib/charts/RetentionCohortTable.d.ts +27 -0
- package/dist/types/components/lib/charts/SankeyChart.d.ts +30 -0
- package/dist/types/components/lib/charts/ScatterPlot.d.ts +35 -0
- package/dist/types/components/lib/charts/SegmentedBarChart.d.ts +30 -0
- package/dist/types/components/lib/charts/SlopeChart.d.ts +33 -0
- package/dist/types/components/lib/charts/SparklineChart.d.ts +24 -0
- package/dist/types/components/lib/charts/StackedAreaChart.d.ts +34 -0
- package/dist/types/components/lib/charts/StackedBarChart.d.ts +33 -0
- package/dist/types/components/lib/charts/SunburstChart.d.ts +33 -0
- package/dist/types/components/lib/charts/TreemapChart.d.ts +31 -0
- package/dist/types/components/lib/charts/WaffleChart.d.ts +26 -0
- package/dist/types/components/lib/charts/WaterfallChart.d.ts +32 -0
- package/dist/types/components/lib/charts/chart-tooltip.d.ts +1 -0
- package/dist/types/components/lib/charts/chart-utils.d.ts +46 -0
- package/dist/types/components/lib/charts/index.d.ts +44 -0
- package/dist/types/components/lib/data/AccordionGroupGlass.d.ts +6 -0
- package/dist/types/components/lib/data/ActivityHeatmapGrid.d.ts +13 -0
- package/dist/types/components/lib/data/AvatarGroupStack.d.ts +6 -0
- package/dist/types/components/lib/data/CalendarGridView.d.ts +6 -0
- package/dist/types/components/lib/data/DataChipsGroup.d.ts +6 -0
- package/dist/types/components/lib/data/DescriptionListHoriz.d.ts +6 -0
- package/dist/types/components/lib/data/FileTreeView.d.ts +6 -0
- package/dist/types/components/lib/data/GanttChartMinimal.d.ts +6 -0
- package/dist/types/components/lib/data/GlassTable.d.ts +6 -0
- package/dist/types/components/lib/data/KeyValuePillGroup.d.ts +6 -0
- package/dist/types/components/lib/data/MetricComparisonRow.d.ts +19 -0
- package/dist/types/components/lib/data/PriceCompareTable.d.ts +6 -0
- package/dist/types/components/lib/data/ProgressListSmall.d.ts +6 -0
- package/dist/types/components/lib/data/RatingBreakdownBar.d.ts +6 -0
- package/dist/types/components/lib/data/SparklineStatCard.d.ts +6 -0
- package/dist/types/components/lib/data/StatsGridDashboard.d.ts +6 -0
- package/dist/types/components/lib/data/StatusTimelineFeed.d.ts +16 -0
- package/dist/types/components/lib/data/StepperDataVertical.d.ts +6 -0
- package/dist/types/components/lib/data/TagCloudData.d.ts +6 -0
- package/dist/types/components/lib/data/TimelineHorizSteps.d.ts +6 -0
- package/dist/types/components/lib/data/TreeItemInteractive.d.ts +6 -0
- package/dist/types/components/lib/data/UserDirectoryItem.d.ts +6 -0
- package/dist/types/components/lib/data/VerticalTimeline.d.ts +6 -0
- package/dist/types/components/lib/data/index.d.ts +23 -0
- package/dist/types/components/lib/ecommerce/CartDrawer.d.ts +43 -0
- package/dist/types/components/lib/ecommerce/CartPageList.d.ts +36 -0
- package/dist/types/components/lib/ecommerce/CartToast.d.ts +34 -0
- package/dist/types/components/lib/ecommerce/CategoryTiles.d.ts +32 -0
- package/dist/types/components/lib/ecommerce/CheckoutForm.d.ts +44 -0
- package/dist/types/components/lib/ecommerce/CountdownBanner.d.ts +38 -0
- package/dist/types/components/lib/ecommerce/FilterBar.d.ts +48 -0
- package/dist/types/components/lib/ecommerce/FilterSidebar.d.ts +42 -0
- package/dist/types/components/lib/ecommerce/LiveActivityToast.d.ts +43 -0
- package/dist/types/components/lib/ecommerce/OrderSummary.d.ts +39 -0
- package/dist/types/components/lib/ecommerce/ProductBuyBox.d.ts +39 -0
- package/dist/types/components/lib/ecommerce/ProductCardMinimal.d.ts +38 -0
- package/dist/types/components/lib/ecommerce/ProductGallery.d.ts +29 -0
- package/dist/types/components/lib/ecommerce/ProductGrid.d.ts +41 -0
- package/dist/types/components/lib/ecommerce/ProductMedia.d.ts +30 -0
- package/dist/types/components/lib/ecommerce/ProductRating.d.ts +23 -0
- package/dist/types/components/lib/ecommerce/ProductToolbar.d.ts +35 -0
- package/dist/types/components/lib/ecommerce/PromoBar.d.ts +29 -0
- package/dist/types/components/lib/ecommerce/StockIndicator.d.ts +29 -0
- package/dist/types/components/lib/ecommerce/StoreHeader.d.ts +54 -0
- package/dist/types/components/lib/ecommerce/StoreHero.d.ts +48 -0
- package/dist/types/components/lib/ecommerce/StoreProductCard.d.ts +40 -0
- package/dist/types/components/lib/ecommerce/TrustBadges.d.ts +24 -0
- package/dist/types/components/lib/ecommerce/VariantPicker.d.ts +37 -0
- package/dist/types/components/lib/ecommerce/cart-store.d.ts +31 -0
- package/dist/types/components/lib/ecommerce/catalog-filter.d.ts +12 -0
- package/dist/types/components/lib/ecommerce/index.d.ts +30 -0
- package/dist/types/components/lib/ecommerce/product-icons.d.ts +20 -0
- package/dist/types/components/lib/ecommerce/types.d.ts +61 -0
- package/dist/types/components/lib/feedback/AnimatedCheckmark.d.ts +14 -0
- package/dist/types/components/lib/feedback/Badge.d.ts +17 -0
- package/dist/types/components/lib/feedback/CircleProgress.d.ts +18 -0
- package/dist/types/components/lib/feedback/ConfettiFeedback.d.ts +18 -0
- package/dist/types/components/lib/feedback/CyberGlitchAlert.d.ts +14 -0
- package/dist/types/components/lib/feedback/EmptyStateCard.d.ts +20 -0
- package/dist/types/components/lib/feedback/GlassAlert.d.ts +15 -0
- package/dist/types/components/lib/feedback/GlassModal.d.ts +24 -0
- package/dist/types/components/lib/feedback/GlassProgress.d.ts +14 -0
- package/dist/types/components/lib/feedback/IndicatorBadgeMinimal.d.ts +17 -0
- package/dist/types/components/lib/feedback/NeonSpinner.d.ts +16 -0
- package/dist/types/components/lib/feedback/ProgressRingCounter.d.ts +22 -0
- package/dist/types/components/lib/feedback/PulseDot.d.ts +14 -0
- package/dist/types/components/lib/feedback/RatingPill.d.ts +15 -0
- package/dist/types/components/lib/feedback/ShakeErrorGroup.d.ts +17 -0
- package/dist/types/components/lib/feedback/SimpleTooltip.d.ts +15 -0
- package/dist/types/components/lib/feedback/SkeletonList.d.ts +12 -0
- package/dist/types/components/lib/feedback/Spotlight.d.ts +15 -0
- package/dist/types/components/lib/feedback/StepProgress.d.ts +16 -0
- package/dist/types/components/lib/feedback/ToastNotif.d.ts +18 -0
- package/dist/types/components/lib/feedback/ToastNotificationGroup.d.ts +22 -0
- package/dist/types/components/lib/feedback/TypingIndicator.d.ts +14 -0
- package/dist/types/components/lib/feedback/index.d.ts +22 -0
- package/dist/types/components/lib/forms/AnimatedInput.d.ts +23 -0
- package/dist/types/components/lib/forms/ChipInput.d.ts +17 -0
- package/dist/types/components/lib/forms/ColorPickerInput.d.ts +17 -0
- package/dist/types/components/lib/forms/CurrencyInput.d.ts +21 -0
- package/dist/types/components/lib/forms/CustomRadioGroup.d.ts +21 -0
- package/dist/types/components/lib/forms/CyberpunkCheckbox.d.ts +17 -0
- package/dist/types/components/lib/forms/DragDropUpload.d.ts +19 -0
- package/dist/types/components/lib/forms/ErrorInput.d.ts +19 -0
- package/dist/types/components/lib/forms/FloatingPassword.d.ts +17 -0
- package/dist/types/components/lib/forms/FormGroupVertical.d.ts +21 -0
- package/dist/types/components/lib/forms/GlassInlineToggleGroup.d.ts +21 -0
- package/dist/types/components/lib/forms/GlassSlider.d.ts +23 -0
- package/dist/types/components/lib/forms/GlassTextarea.d.ts +21 -0
- package/dist/types/components/lib/forms/ModernSelect.d.ts +23 -0
- package/dist/types/components/lib/forms/NeumorphicSwitch.d.ts +17 -0
- package/dist/types/components/lib/forms/OTPInput.d.ts +17 -0
- package/dist/types/components/lib/forms/PasswordStrengthInput.d.ts +19 -0
- package/dist/types/components/lib/forms/PhoneCountryInput.d.ts +19 -0
- package/dist/types/components/lib/forms/RatingStars.d.ts +17 -0
- package/dist/types/components/lib/forms/SearchReveal.d.ts +15 -0
- package/dist/types/components/lib/forms/SegmentedControl.d.ts +19 -0
- package/dist/types/components/lib/forms/SimpleFileInput.d.ts +17 -0
- package/dist/types/components/lib/forms/StepperInput.d.ts +23 -0
- package/dist/types/components/lib/forms/TagsAutocompleteInput.d.ts +19 -0
- package/dist/types/components/lib/forms/index.d.ts +24 -0
- package/dist/types/components/lib/galaxy-scene.d.ts +5 -0
- package/dist/types/components/lib/layout/BentoGrid3.d.ts +14 -0
- package/dist/types/components/lib/layout/CenterFixedBox.d.ts +11 -0
- package/dist/types/components/lib/layout/CenteredContainer.d.ts +27 -0
- package/dist/types/components/lib/layout/ClusterHorizontal.d.ts +13 -0
- package/dist/types/components/lib/layout/DiagonalSectionDivider.d.ts +17 -0
- package/dist/types/components/lib/layout/FeatureHero.d.ts +35 -0
- package/dist/types/components/lib/layout/FooterCenteredMinimal.d.ts +23 -0
- package/dist/types/components/lib/layout/FullBleedSection.d.ts +11 -0
- package/dist/types/components/lib/layout/GalleryGrid4.d.ts +11 -0
- package/dist/types/components/lib/layout/GlassCardGrid.d.ts +16 -0
- package/dist/types/components/lib/layout/GlassSectionHeader.d.ts +30 -0
- package/dist/types/components/lib/layout/HolyGrailGrid.d.ts +23 -0
- package/dist/types/components/lib/layout/LandingSectionSplit.d.ts +14 -0
- package/dist/types/components/lib/layout/MasonryGrid.d.ts +13 -0
- package/dist/types/components/lib/layout/MinimalFooterGrid.d.ts +10 -0
- package/dist/types/components/lib/layout/ScrollSnapSection.d.ts +12 -0
- package/dist/types/components/lib/layout/SectionDividerText.d.ts +23 -0
- package/dist/types/components/lib/layout/SidebarLayoutWrapper.d.ts +33 -0
- package/dist/types/components/lib/layout/SplitScreenLayout.d.ts +12 -0
- package/dist/types/components/lib/layout/StepLayoutVertical.d.ts +9 -0
- package/dist/types/components/lib/layout/StickySidebarWrapper.d.ts +35 -0
- package/dist/types/components/lib/layout/VerticalStack.d.ts +27 -0
- package/dist/types/components/lib/layout/index.d.ts +22 -0
- package/dist/types/components/lib/navigation/AnchorSideNav.d.ts +6 -0
- package/dist/types/components/lib/navigation/BottomNavMobile.d.ts +6 -0
- package/dist/types/components/lib/navigation/BreadcrumbsMinimal.d.ts +6 -0
- package/dist/types/components/lib/navigation/BurgerMorphIcon.d.ts +6 -0
- package/dist/types/components/lib/navigation/CommandPaletteUI.d.ts +6 -0
- package/dist/types/components/lib/navigation/DotNavigationSlider.d.ts +6 -0
- package/dist/types/components/lib/navigation/FloatingTabBar.d.ts +6 -0
- package/dist/types/components/lib/navigation/GlassNavbar.d.ts +12 -0
- package/dist/types/components/lib/navigation/LangSwitcherPill.d.ts +6 -0
- package/dist/types/components/lib/navigation/MegaMenuGlass.d.ts +6 -0
- package/dist/types/components/lib/navigation/MinimalSidebar.d.ts +6 -0
- package/dist/types/components/lib/navigation/PaginationGlass.d.ts +6 -0
- package/dist/types/components/lib/navigation/PaginationInfiniteUI.d.ts +6 -0
- package/dist/types/components/lib/navigation/QuickJumpDock.d.ts +15 -0
- package/dist/types/components/lib/navigation/RadialIconMenu.d.ts +6 -0
- package/dist/types/components/lib/navigation/RetroArcadeMenu.d.ts +6 -0
- package/dist/types/components/lib/navigation/ScrollProgressTop.d.ts +6 -0
- package/dist/types/components/lib/navigation/SimpleFooterGlass.d.ts +6 -0
- package/dist/types/components/lib/navigation/StepBreadcrumbBar.d.ts +16 -0
- package/dist/types/components/lib/navigation/SubNavbarPills.d.ts +18 -0
- package/dist/types/components/lib/navigation/TabUnderline.d.ts +6 -0
- package/dist/types/components/lib/navigation/UserProfileNav.d.ts +6 -0
- package/dist/types/components/lib/navigation/VerticalTabs.d.ts +6 -0
- package/dist/types/components/lib/navigation/index.d.ts +23 -0
- package/dist/types/components/lib/overlays/AgeVerificationOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/BackdropBlurMask.d.ts +6 -0
- package/dist/types/components/lib/overlays/BottomSheetMobile.d.ts +6 -0
- package/dist/types/components/lib/overlays/CommandDialog.d.ts +6 -0
- package/dist/types/components/lib/overlays/ContextMenuOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/CookieBannerGlass.d.ts +6 -0
- package/dist/types/components/lib/overlays/CookiePreferencesDrawer.d.ts +13 -0
- package/dist/types/components/lib/overlays/ExitIntentOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/FloatingFeedbackWidget.d.ts +13 -0
- package/dist/types/components/lib/overlays/FloatingTrayActions.d.ts +6 -0
- package/dist/types/components/lib/overlays/HelpBubbleOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/ImageCompareSlider.d.ts +19 -0
- package/dist/types/components/lib/overlays/LightboxOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/LoadingOverlayFull.d.ts +6 -0
- package/dist/types/components/lib/overlays/MobileNavOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/OverlayModal.d.ts +6 -0
- package/dist/types/components/lib/overlays/PopoverMenuGlass.d.ts +6 -0
- package/dist/types/components/lib/overlays/SearchOverlayFullscreen.d.ts +6 -0
- package/dist/types/components/lib/overlays/SideDrawerRight.d.ts +8 -0
- package/dist/types/components/lib/overlays/SplashIntroOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/SpotlightIndicator.d.ts +6 -0
- package/dist/types/components/lib/overlays/ToastStackOverlay.d.ts +6 -0
- package/dist/types/components/lib/overlays/TooltipActionTray.d.ts +6 -0
- package/dist/types/components/lib/overlays/index.d.ts +23 -0
- package/dist/types/components/lib/sections/AgencyContactBrief.d.ts +44 -0
- package/dist/types/components/lib/sections/AgencyFooterCta.d.ts +46 -0
- package/dist/types/components/lib/sections/AgencyHeader.d.ts +37 -0
- package/dist/types/components/lib/sections/AgencyHeroKinetic.d.ts +45 -0
- package/dist/types/components/lib/sections/AgencyServicesList.d.ts +35 -0
- package/dist/types/components/lib/sections/AgencyTeamGrid.d.ts +45 -0
- package/dist/types/components/lib/sections/AgencyWorkGrid.d.ts +42 -0
- package/dist/types/components/lib/sections/BlogGridSection.d.ts +35 -0
- package/dist/types/components/lib/sections/ButtonsShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/CardsShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/CareersOpenings.d.ts +37 -0
- package/dist/types/components/lib/sections/ChangelogSection.d.ts +37 -0
- package/dist/types/components/lib/sections/ContactGlassForm.d.ts +16 -0
- package/dist/types/components/lib/sections/ContactSplitMap.d.ts +36 -0
- package/dist/types/components/lib/sections/CtaAppDownload.d.ts +16 -0
- package/dist/types/components/lib/sections/CtaGlowBanner.d.ts +20 -0
- package/dist/types/components/lib/sections/CtaNewsletterSection.d.ts +28 -0
- package/dist/types/components/lib/sections/CtaSplitImage.d.ts +39 -0
- package/dist/types/components/lib/sections/DataShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/FaqAccordionSection.d.ts +16 -0
- package/dist/types/components/lib/sections/FaqTwoColumn.d.ts +32 -0
- package/dist/types/components/lib/sections/FeatureAlternatingRows.d.ts +29 -0
- package/dist/types/components/lib/sections/FeatureBentoGrid.d.ts +16 -0
- package/dist/types/components/lib/sections/FeatureIconGrid.d.ts +33 -0
- package/dist/types/components/lib/sections/FeatureTabsShowcase.d.ts +30 -0
- package/dist/types/components/lib/sections/FeatureTimelineFlow.d.ts +16 -0
- package/dist/types/components/lib/sections/FeedbackShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/FooterMegaSection.d.ts +40 -0
- package/dist/types/components/lib/sections/FormsShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/HeroDashboardPreview.d.ts +32 -0
- package/dist/types/components/lib/sections/HeroGlass.d.ts +8 -0
- package/dist/types/components/lib/sections/HeroGradient.d.ts +8 -0
- package/dist/types/components/lib/sections/HeroMinimalCentered.d.ts +36 -0
- package/dist/types/components/lib/sections/HeroShowcaseSplit.d.ts +25 -0
- package/dist/types/components/lib/sections/HeroSplit.d.ts +8 -0
- package/dist/types/components/lib/sections/HeroTerminal.d.ts +35 -0
- package/dist/types/components/lib/sections/HeroWaitlist.d.ts +30 -0
- package/dist/types/components/lib/sections/HowItWorksSteps.d.ts +32 -0
- package/dist/types/components/lib/sections/IntegrationsGrid.d.ts +28 -0
- package/dist/types/components/lib/sections/LayoutShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/LogoCloudSection.d.ts +16 -0
- package/dist/types/components/lib/sections/LogoWallGrid.d.ts +28 -0
- package/dist/types/components/lib/sections/NavigationShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/OverlaysShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/PricingComparisonMatrix.d.ts +16 -0
- package/dist/types/components/lib/sections/PricingSinglePlan.d.ts +37 -0
- package/dist/types/components/lib/sections/PricingTierCards.d.ts +16 -0
- package/dist/types/components/lib/sections/PricingToggleCards.d.ts +36 -0
- package/dist/types/components/lib/sections/ShopCategoryHero.d.ts +41 -0
- package/dist/types/components/lib/sections/ShopCollectionMosaic.d.ts +37 -0
- package/dist/types/components/lib/sections/ShopFooterWordmark.d.ts +38 -0
- package/dist/types/components/lib/sections/ShopHeaderEditorial.d.ts +61 -0
- package/dist/types/components/lib/sections/ShopHeroEditorial.d.ts +45 -0
- package/dist/types/components/lib/sections/ShopLookbook.d.ts +47 -0
- package/dist/types/components/lib/sections/ShopNewsletterEditorial.d.ts +33 -0
- package/dist/types/components/lib/sections/ShopProductRail.d.ts +41 -0
- package/dist/types/components/lib/sections/ShopReviewsEditorial.d.ts +34 -0
- package/dist/types/components/lib/sections/ShopValuesMarquee.d.ts +28 -0
- package/dist/types/components/lib/sections/StatsCounterBand.d.ts +30 -0
- package/dist/types/components/lib/sections/StatsDashboardSection.d.ts +31 -0
- package/dist/types/components/lib/sections/StatsMetricShowcase.d.ts +16 -0
- package/dist/types/components/lib/sections/TeamGridSection.d.ts +16 -0
- package/dist/types/components/lib/sections/TestimonialCarousel.d.ts +26 -0
- package/dist/types/components/lib/sections/TestimonialFeatured.d.ts +34 -0
- package/dist/types/components/lib/sections/TestimonialGridSection.d.ts +15 -0
- package/dist/types/components/lib/sections/TestimonialWallGlass.d.ts +16 -0
- package/dist/types/components/lib/sections/TypographyShowcase.d.ts +8 -0
- package/dist/types/components/lib/sections/index.d.ts +60 -0
- package/dist/types/components/lib/templates/ecommerce/StoreCategoryPage.d.ts +28 -0
- package/dist/types/components/lib/templates/ecommerce/StoreCheckoutPage.d.ts +25 -0
- package/dist/types/components/lib/templates/ecommerce/StoreHomePage.d.ts +25 -0
- package/dist/types/components/lib/templates/ecommerce/StoreLayout.d.ts +41 -0
- package/dist/types/components/lib/templates/ecommerce/StoreProductPage.d.ts +28 -0
- package/dist/types/components/lib/templates/ecommerce/data.d.ts +49 -0
- package/dist/types/components/lib/templates/ecommerce/index.d.ts +7 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/EditorialBagPage.d.ts +25 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/EditorialCheckoutPage.d.ts +25 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/EditorialHomePage.d.ts +25 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/EditorialLayout.d.ts +36 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/EditorialProductPage.d.ts +29 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/EditorialShopPage.d.ts +28 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/data.d.ts +50 -0
- package/dist/types/components/lib/templates/ecommerce-editorial/index.d.ts +8 -0
- package/dist/types/components/lib/templates/saas-hotel/AppLayout.d.ts +30 -0
- package/dist/types/components/lib/templates/saas-hotel/DashboardPage.d.ts +20 -0
- package/dist/types/components/lib/templates/saas-hotel/GuestsPage.d.ts +20 -0
- package/dist/types/components/lib/templates/saas-hotel/LandingPage.d.ts +24 -0
- package/dist/types/components/lib/templates/saas-hotel/ReportsPage.d.ts +20 -0
- package/dist/types/components/lib/templates/saas-hotel/ReservationsPage.d.ts +20 -0
- package/dist/types/components/lib/templates/saas-hotel/RoomsPage.d.ts +20 -0
- package/dist/types/components/lib/templates/saas-hotel/SettingsPage.d.ts +21 -0
- package/dist/types/components/lib/templates/saas-hotel/SignInPage.d.ts +23 -0
- package/dist/types/components/lib/templates/saas-hotel/data.d.ts +224 -0
- package/dist/types/components/lib/templates/saas-hotel/index.d.ts +11 -0
- package/dist/types/components/lib/typography/AnimatedCounterText.d.ts +19 -0
- package/dist/types/components/lib/typography/AnimatedUnderlineLink.d.ts +9 -0
- package/dist/types/components/lib/typography/BackgroundClipMask.d.ts +8 -0
- package/dist/types/components/lib/typography/CodeInlineGlass.d.ts +8 -0
- package/dist/types/components/lib/typography/CurvedPathHeading.d.ts +15 -0
- package/dist/types/components/lib/typography/CyberpunkGlitchText.d.ts +7 -0
- package/dist/types/components/lib/typography/DropCapParagraph.d.ts +8 -0
- package/dist/types/components/lib/typography/FadedVerticalText.d.ts +8 -0
- package/dist/types/components/lib/typography/FloatingTextLabel.d.ts +8 -0
- package/dist/types/components/lib/typography/GlassBlockQuote.d.ts +8 -0
- package/dist/types/components/lib/typography/GlassTextReveal.d.ts +8 -0
- package/dist/types/components/lib/typography/GradientHeading.d.ts +11 -0
- package/dist/types/components/lib/typography/GradientTextMarquee.d.ts +15 -0
- package/dist/types/components/lib/typography/GradientUnderlineLink.d.ts +8 -0
- package/dist/types/components/lib/typography/HackerDecodeText.d.ts +15 -0
- package/dist/types/components/lib/typography/KbdIndicator.d.ts +8 -0
- package/dist/types/components/lib/typography/LetterSpacingWide.d.ts +8 -0
- package/dist/types/components/lib/typography/MinimalListMarkers.d.ts +8 -0
- package/dist/types/components/lib/typography/MonospaceStatLine.d.ts +8 -0
- package/dist/types/components/lib/typography/NeonTextHighlight.d.ts +8 -0
- package/dist/types/components/lib/typography/ShadowRevealText.d.ts +8 -0
- package/dist/types/components/lib/typography/StrokeHeadingOutline.d.ts +8 -0
- package/dist/types/components/lib/typography/Text3DLayer.d.ts +8 -0
- package/dist/types/components/lib/typography/TypewriterText.d.ts +8 -0
- package/dist/types/components/lib/typography/index.d.ts +24 -0
- package/dist/types/components/three.d.ts +1 -0
- package/dist/typography.js +28 -0
- package/package.json +237 -4
|
@@ -0,0 +1,1263 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, Fragment as U, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as V, useEffect as R } from "react";
|
|
4
|
+
import { P as J, a as te, f as F, b as se, c as de, p as ae } from "./cart-store-u-ScUvte.js";
|
|
5
|
+
import { B as oe } from "./Badge-CHkR__dT.js";
|
|
6
|
+
import { M as ce } from "./AnimatedInput-Dt37HZSs.js";
|
|
7
|
+
import { S as le } from "./StepperInput-Ck_9n2BL.js";
|
|
8
|
+
import { V as re, S as he } from "./CartToast-UIJFD2CK.js";
|
|
9
|
+
function ue(...t) {
|
|
10
|
+
const r = [], i = (a) => {
|
|
11
|
+
if (a) {
|
|
12
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
13
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
14
|
+
else if (typeof a == "object")
|
|
15
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
return t.forEach(i), r.join(" ");
|
|
19
|
+
}
|
|
20
|
+
function fe(t) {
|
|
21
|
+
const r = {};
|
|
22
|
+
for (const i of String(t ?? "").split(";")) {
|
|
23
|
+
const a = i.indexOf(":");
|
|
24
|
+
if (a < 0) continue;
|
|
25
|
+
const s = i.slice(0, a).trim();
|
|
26
|
+
s && (r[s.startsWith("--") ? s : s.replace(/-([a-z])/g, (c, k) => k.toUpperCase())] = i.slice(a + 1).trim());
|
|
27
|
+
}
|
|
28
|
+
return r;
|
|
29
|
+
}
|
|
30
|
+
function me({
|
|
31
|
+
product: t = {
|
|
32
|
+
slug: "aurora-headphones",
|
|
33
|
+
name: "Aurora Wireless Headphones",
|
|
34
|
+
price: 189,
|
|
35
|
+
compareAt: 229,
|
|
36
|
+
category: "audio",
|
|
37
|
+
rating: 4.8,
|
|
38
|
+
reviews: 312,
|
|
39
|
+
badge: "-18%",
|
|
40
|
+
badgeVariant: "warning",
|
|
41
|
+
colors: [{ name: "Graphite", hex: "#2b2b2f" }, { name: "Sand", hex: "#d8c3a5" }, { name: "Ocean", hex: "#3d6f9e" }],
|
|
42
|
+
icon: "headphones",
|
|
43
|
+
hue: 38,
|
|
44
|
+
inStock: !0
|
|
45
|
+
},
|
|
46
|
+
href: r = "#",
|
|
47
|
+
categoryLabel: i = "Audio",
|
|
48
|
+
currency: a = "USD",
|
|
49
|
+
locale: s = "en-US",
|
|
50
|
+
ctaLabel: c = "Add to cart",
|
|
51
|
+
addedLabel: k = "Added",
|
|
52
|
+
cartKey: p = "ack-cart",
|
|
53
|
+
openCart: v = !0,
|
|
54
|
+
variant: N = "glass",
|
|
55
|
+
size: b = "md",
|
|
56
|
+
headingLevel: x = "h3",
|
|
57
|
+
className: o = ""
|
|
58
|
+
}) {
|
|
59
|
+
var y, w;
|
|
60
|
+
const d = x, f = { currency: a, locale: s }, m = t.inStock !== !1, l = JSON.stringify({
|
|
61
|
+
id: t.slug,
|
|
62
|
+
name: t.name,
|
|
63
|
+
price: t.price,
|
|
64
|
+
icon: t.icon,
|
|
65
|
+
hue: t.hue,
|
|
66
|
+
image: t.image,
|
|
67
|
+
variant: (w = (y = t.colors) == null ? void 0 : y[0]) == null ? void 0 : w.name
|
|
68
|
+
}), h = `spc-${t.slug}`, g = V(!1);
|
|
69
|
+
return R(() => {
|
|
70
|
+
if (g.current) return;
|
|
71
|
+
g.current = !0;
|
|
72
|
+
function A() {
|
|
73
|
+
se(document), document.querySelectorAll("[data-wishlist]:not([data-wish-bound])").forEach((S) => {
|
|
74
|
+
S.dataset.wishBound = "", S.addEventListener("click", () => {
|
|
75
|
+
S.setAttribute("aria-pressed", String(S.getAttribute("aria-pressed") !== "true"));
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
A();
|
|
80
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("article", { className: ue(["sp-card", `sp-card--${N}`, `sp-card--${b}`, "is-hoverable", o]), "aria-labelledby": h, "data-product": !0, "data-name": t.name.toLowerCase(), "data-category": t.category, "data-price": t.price, "data-rating": t.rating ?? 0, "data-colors": (t.colors ?? []).map((A) => A.name.toLowerCase()).join(","), "data-stock": m ? "in" : "out", "data-rk-82d407": "", children: [
|
|
81
|
+
/* @__PURE__ */ n("div", { className: "sp-card__media", "data-rk-82d407": "", children: [
|
|
82
|
+
/* @__PURE__ */ e(J, { image: t.image, alt: t.name, icon: t.icon, hue: t.hue }),
|
|
83
|
+
t.badge && /* @__PURE__ */ e("div", { className: "sp-card__badge", "data-rk-82d407": "", children: /* @__PURE__ */ e(oe, { variant: t.badgeVariant ?? "default", children: t.badge }) }),
|
|
84
|
+
/* @__PURE__ */ e("button", { className: "sp-card__wish", type: "button", "aria-pressed": "false", "aria-label": `Save ${t.name} to wishlist`, "data-wishlist": !0, "data-rk-82d407": "", children: /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-82d407": "", children: /* @__PURE__ */ e("path", { d: "M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1-1.1a5.5 5.5 0 0 0-7.8 7.8l1 1.1L12 21l7.8-7.5 1-1.1a5.5 5.5 0 0 0 0-7.8z", "data-rk-82d407": "" }) }) })
|
|
85
|
+
] }),
|
|
86
|
+
/* @__PURE__ */ n("div", { className: "sp-card__body", "data-rk-82d407": "", children: [
|
|
87
|
+
i && /* @__PURE__ */ e("p", { className: "sp-card__cat", "data-rk-82d407": "", children: i }),
|
|
88
|
+
/* @__PURE__ */ e(d, { className: "sp-card__title", id: h, "data-rk-82d407": "", children: /* @__PURE__ */ e("a", { className: "sp-card__link", href: r, "data-rk-82d407": "", children: t.name }) }),
|
|
89
|
+
t.rating !== void 0 && /* @__PURE__ */ e(te, { value: t.rating, count: t.reviews }),
|
|
90
|
+
t.colors && t.colors.length > 0 && /* @__PURE__ */ n("ul", { className: "sp-card__swatches", "aria-label": `Colours: ${t.colors.map((A) => A.name).join(", ")}`, "data-rk-82d407": "", children: [
|
|
91
|
+
t.colors.slice(0, 4).map((A, S) => /* @__PURE__ */ e("li", { className: "sp-card__swatch", style: fe(`--sw: ${A.hex}`), title: A.name, "data-rk-82d407": "" }, S)),
|
|
92
|
+
t.colors.length > 4 && /* @__PURE__ */ n("li", { className: "sp-card__swatch-more", "data-rk-82d407": "", children: [
|
|
93
|
+
"+",
|
|
94
|
+
t.colors.length - 4
|
|
95
|
+
] })
|
|
96
|
+
] }),
|
|
97
|
+
/* @__PURE__ */ n("div", { className: "sp-card__foot", "data-rk-82d407": "", children: [
|
|
98
|
+
/* @__PURE__ */ n("p", { className: "sp-card__price", "data-rk-82d407": "", children: [
|
|
99
|
+
/* @__PURE__ */ e("span", { className: "sp-card__now", "data-rk-82d407": "", children: F(t.price, f) }),
|
|
100
|
+
t.compareAt && /* @__PURE__ */ n("s", { className: "sp-card__was", "data-rk-82d407": "", children: [
|
|
101
|
+
/* @__PURE__ */ e("span", { className: "sr-only", "data-rk-82d407": "", children: "Was " }),
|
|
102
|
+
F(t.compareAt, f)
|
|
103
|
+
] })
|
|
104
|
+
] }),
|
|
105
|
+
/* @__PURE__ */ n("button", { className: "sp-card__add", type: "button", "data-add-to-cart": l, "data-cart-key": p, "data-open-cart": v ? void 0 : "false", "data-added-label": k, disabled: !m, "aria-label": m ? `${c}: ${t.name}` : `${t.name} is sold out`, "data-rk-82d407": "", children: [
|
|
106
|
+
/* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-82d407": "", children: [
|
|
107
|
+
/* @__PURE__ */ e("path", { d: "M6 6h15l-1.5 9h-12z", "data-rk-82d407": "" }),
|
|
108
|
+
/* @__PURE__ */ e("path", { d: "M6 6 5 3H2", "data-rk-82d407": "" }),
|
|
109
|
+
/* @__PURE__ */ e("circle", { cx: "9", cy: "20", r: "1.4", "data-rk-82d407": "" }),
|
|
110
|
+
/* @__PURE__ */ e("circle", { cx: "18", cy: "20", r: "1.4", "data-rk-82d407": "" })
|
|
111
|
+
] }),
|
|
112
|
+
/* @__PURE__ */ e("span", { "data-label": !0, "data-rk-82d407": "", children: m ? c : "Sold out" })
|
|
113
|
+
] })
|
|
114
|
+
] })
|
|
115
|
+
] })
|
|
116
|
+
] }) });
|
|
117
|
+
}
|
|
118
|
+
function pe(...t) {
|
|
119
|
+
const r = [], i = (a) => {
|
|
120
|
+
if (a) {
|
|
121
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
122
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
123
|
+
else if (typeof a == "object")
|
|
124
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
return t.forEach(i), r.join(" ");
|
|
128
|
+
}
|
|
129
|
+
function ke(t) {
|
|
130
|
+
const r = {};
|
|
131
|
+
for (const i of String(t ?? "").split(";")) {
|
|
132
|
+
const a = i.indexOf(":");
|
|
133
|
+
if (a < 0) continue;
|
|
134
|
+
const s = i.slice(0, a).trim();
|
|
135
|
+
s && (r[s.startsWith("--") ? s : s.replace(/-([a-z])/g, (c, k) => k.toUpperCase())] = i.slice(a + 1).trim());
|
|
136
|
+
}
|
|
137
|
+
return r;
|
|
138
|
+
}
|
|
139
|
+
function ze({
|
|
140
|
+
products: t = [
|
|
141
|
+
{ slug: "aurora-headphones", name: "Aurora Wireless Headphones", price: 189, compareAt: 229, category: "audio", rating: 4.8, reviews: 312, badge: "-18%", badgeVariant: "warning", icon: "headphones", hue: 38 },
|
|
142
|
+
{ slug: "orbit-watch", name: "Orbit Smart Watch", price: 249, category: "wearables", rating: 4.6, reviews: 198, badge: "New", badgeVariant: "info", icon: "watch", hue: 205 },
|
|
143
|
+
{ slug: "trail-backpack", name: "Trail 24L Backpack", price: 119, category: "bags", rating: 4.7, reviews: 87, icon: "backpack", hue: 150 },
|
|
144
|
+
{ slug: "halo-lamp", name: "Halo Desk Lamp", price: 79, category: "home", rating: 4.5, reviews: 54, icon: "lamp", hue: 25 }
|
|
145
|
+
],
|
|
146
|
+
id: r = "product-grid",
|
|
147
|
+
productBase: i = "#",
|
|
148
|
+
categoryNames: a = { audio: "Audio", wearables: "Wearables", bags: "Bags", home: "Home" },
|
|
149
|
+
columns: s = 4,
|
|
150
|
+
cardVariant: c = "glass",
|
|
151
|
+
cardSize: k = "md",
|
|
152
|
+
currency: p = "USD",
|
|
153
|
+
locale: v = "en-US",
|
|
154
|
+
cartKey: N = "ack-cart",
|
|
155
|
+
openCart: b = !0,
|
|
156
|
+
emptyTitle: x = "No products match",
|
|
157
|
+
emptyText: o = "Try removing a filter or widening the price range.",
|
|
158
|
+
className: d = ""
|
|
159
|
+
}) {
|
|
160
|
+
const f = Math.min(5, Math.max(2, s)), m = (l) => i === "#" ? "#" : `${i}${l}/`;
|
|
161
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("div", { className: pe(["p-grid-wrap", d]), "data-rk-b3bd9c": "", children: [
|
|
162
|
+
/* @__PURE__ */ e("div", { className: "p-grid", id: r, style: ke(`--pg-cols: ${f}`), "data-product-list": !0, "data-rk-b3bd9c": "", children: t.map((l, h) => /* @__PURE__ */ e(me, { product: l, href: m(l.slug), categoryLabel: a[l.category] ?? "", variant: c, size: k, currency: p, locale: v, cartKey: N, openCart: b }, h)) }),
|
|
163
|
+
/* @__PURE__ */ n("div", { className: "p-grid__empty", role: "status", "data-product-empty": !0, hidden: !0, "data-rk-b3bd9c": "", children: [
|
|
164
|
+
/* @__PURE__ */ n("svg", { width: "40", height: "40", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.7", strokeLinecap: "round", "aria-hidden": "true", "data-rk-b3bd9c": "", children: [
|
|
165
|
+
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7", "data-rk-b3bd9c": "" }),
|
|
166
|
+
/* @__PURE__ */ e("path", { d: "m20 20-3.5-3.5M8 11h6", "data-rk-b3bd9c": "" })
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ e("p", { "data-rk-b3bd9c": "", children: /* @__PURE__ */ e("strong", { "data-rk-b3bd9c": "", children: x }) }),
|
|
169
|
+
/* @__PURE__ */ e("p", { "data-rk-b3bd9c": "", children: o })
|
|
170
|
+
] })
|
|
171
|
+
] }) });
|
|
172
|
+
}
|
|
173
|
+
function ne(...t) {
|
|
174
|
+
const r = [], i = (a) => {
|
|
175
|
+
if (a) {
|
|
176
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
177
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
178
|
+
else if (typeof a == "object")
|
|
179
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
return t.forEach(i), r.join(" ");
|
|
183
|
+
}
|
|
184
|
+
function Ie({
|
|
185
|
+
messages: t = ["Free shipping on orders over $75", "Use code REACT10 for 10% off your first order", "30-day free returns"],
|
|
186
|
+
href: r,
|
|
187
|
+
interval: i = 4500,
|
|
188
|
+
dismissible: a = !0,
|
|
189
|
+
variant: s = "gold",
|
|
190
|
+
size: c = "sm",
|
|
191
|
+
storageKey: k = "ack-promo-closed",
|
|
192
|
+
className: p = ""
|
|
193
|
+
}) {
|
|
194
|
+
const v = r ? "a" : "div", N = V(!1);
|
|
195
|
+
return R(() => {
|
|
196
|
+
N.current || (N.current = !0, document.querySelectorAll("[data-promo-bar]").forEach((b) => {
|
|
197
|
+
var m;
|
|
198
|
+
const x = b.dataset.key || "ack-promo-closed";
|
|
199
|
+
try {
|
|
200
|
+
if (window.sessionStorage.getItem(x)) {
|
|
201
|
+
b.hidden = !0;
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
} catch {
|
|
205
|
+
}
|
|
206
|
+
(m = b.querySelector("[data-promo-close]")) == null || m.addEventListener("click", () => {
|
|
207
|
+
b.hidden = !0;
|
|
208
|
+
try {
|
|
209
|
+
window.sessionStorage.setItem(x, "1");
|
|
210
|
+
} catch {
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
const o = Array.from(b.querySelectorAll(".promo-bar__msg"));
|
|
214
|
+
if (o.length < 2 || window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
215
|
+
let d = 0, f = !1;
|
|
216
|
+
b.addEventListener("mouseenter", () => {
|
|
217
|
+
f = !0;
|
|
218
|
+
}), b.addEventListener("mouseleave", () => {
|
|
219
|
+
f = !1;
|
|
220
|
+
}), b.addEventListener("focusin", () => {
|
|
221
|
+
f = !0;
|
|
222
|
+
}), b.addEventListener("focusout", () => {
|
|
223
|
+
f = !1;
|
|
224
|
+
}), window.setInterval(() => {
|
|
225
|
+
f || document.hidden || (o[d].classList.remove("is-active"), o[d].setAttribute("aria-hidden", "true"), d = (d + 1) % o.length, o[d].classList.add("is-active"), o[d].removeAttribute("aria-hidden"));
|
|
226
|
+
}, Number(b.dataset.interval) || 4500);
|
|
227
|
+
}));
|
|
228
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("div", { className: ne(["promo-bar", `promo-bar--${s}`, `promo-bar--${c}`, p]), "data-promo-bar": !0, "data-interval": i, "data-key": k, "data-rk-ca2577": "", children: [
|
|
229
|
+
/* @__PURE__ */ e(v, { className: "promo-bar__track", href: r, "data-rk-ca2577": "", children: t.map((b, x) => /* @__PURE__ */ e("span", { className: ne(["promo-bar__msg", { "is-active": x === 0 }]), "aria-hidden": x === 0 ? void 0 : "true", "data-rk-ca2577": "", children: b }, x)) }),
|
|
230
|
+
a && /* @__PURE__ */ e("button", { className: "promo-bar__close", type: "button", "aria-label": "Dismiss announcement", "data-promo-close": !0, "data-rk-ca2577": "", children: /* @__PURE__ */ e("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", "aria-hidden": "true", "data-rk-ca2577": "", children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12", "data-rk-ca2577": "" }) }) })
|
|
231
|
+
] }) });
|
|
232
|
+
}
|
|
233
|
+
function be(...t) {
|
|
234
|
+
const r = [], i = (a) => {
|
|
235
|
+
if (a) {
|
|
236
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
237
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
238
|
+
else if (typeof a == "object")
|
|
239
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
return t.forEach(i), r.join(" ");
|
|
243
|
+
}
|
|
244
|
+
function Ue({
|
|
245
|
+
brand: t = "Nova Store",
|
|
246
|
+
brandHref: r = "/",
|
|
247
|
+
links: i = [
|
|
248
|
+
{
|
|
249
|
+
label: "Shop",
|
|
250
|
+
href: "#",
|
|
251
|
+
children: [
|
|
252
|
+
{ label: "Audio", href: "#", description: "Headphones & speakers" },
|
|
253
|
+
{ label: "Wearables", href: "#", description: "Watches & bands" },
|
|
254
|
+
{ label: "Bags", href: "#", description: "Backpacks & totes" },
|
|
255
|
+
{ label: "Home", href: "#", description: "Lamps, mugs & plants" }
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
{ label: "New in", href: "#" },
|
|
259
|
+
{ label: "Sale", href: "#" },
|
|
260
|
+
{ label: "Journal", href: "#" }
|
|
261
|
+
],
|
|
262
|
+
searchAction: a = "#",
|
|
263
|
+
searchPlaceholder: s = "Search products",
|
|
264
|
+
accountHref: c = "#",
|
|
265
|
+
cartKey: k = "ack-cart",
|
|
266
|
+
cartLabel: p = "Cart",
|
|
267
|
+
currentHref: v,
|
|
268
|
+
sticky: N = !0,
|
|
269
|
+
variant: b = "glass",
|
|
270
|
+
size: x = "md",
|
|
271
|
+
themeToggle: o = !0,
|
|
272
|
+
id: d = "store-header",
|
|
273
|
+
className: f = ""
|
|
274
|
+
}) {
|
|
275
|
+
const m = d, l = V(!1);
|
|
276
|
+
return R(() => {
|
|
277
|
+
l.current || (l.current = !0, document.querySelectorAll("[data-store-header]:not([data-bound])").forEach((h) => {
|
|
278
|
+
h.dataset.bound = "";
|
|
279
|
+
const g = h.querySelector("[data-menu-toggle]"), y = h.querySelector("[data-menu]"), w = Array.from(h.querySelectorAll("[data-dropdown-toggle]")), A = (_) => {
|
|
280
|
+
w.forEach((E) => {
|
|
281
|
+
if (E === _) return;
|
|
282
|
+
E.setAttribute("aria-expanded", "false");
|
|
283
|
+
const L = document.getElementById(E.getAttribute("aria-controls") || "");
|
|
284
|
+
L && (L.hidden = !0);
|
|
285
|
+
});
|
|
286
|
+
};
|
|
287
|
+
w.forEach((_) => {
|
|
288
|
+
_.addEventListener("click", () => {
|
|
289
|
+
const E = _.getAttribute("aria-expanded") !== "true";
|
|
290
|
+
A(_), _.setAttribute("aria-expanded", String(E));
|
|
291
|
+
const L = document.getElementById(_.getAttribute("aria-controls") || "");
|
|
292
|
+
L && (L.hidden = !E);
|
|
293
|
+
});
|
|
294
|
+
}), g == null || g.addEventListener("click", () => {
|
|
295
|
+
const _ = g.getAttribute("aria-expanded") !== "true";
|
|
296
|
+
g.setAttribute("aria-expanded", String(_)), y == null || y.classList.toggle("is-open", _);
|
|
297
|
+
}), document.addEventListener("click", (_) => {
|
|
298
|
+
h.contains(_.target) || A();
|
|
299
|
+
}), document.addEventListener("keydown", (_) => {
|
|
300
|
+
if (_.key !== "Escape") return;
|
|
301
|
+
const E = w.find((L) => L.getAttribute("aria-expanded") === "true");
|
|
302
|
+
A(), E == null || E.focus(), (g == null ? void 0 : g.getAttribute("aria-expanded")) === "true" && (g.setAttribute("aria-expanded", "false"), y == null || y.classList.remove("is-open"), g.focus());
|
|
303
|
+
});
|
|
304
|
+
const S = h.querySelector("[data-theme-toggle]");
|
|
305
|
+
if (S) {
|
|
306
|
+
const _ = document.documentElement, E = () => _.dataset.theme === "light" ? "light" : "dark", L = () => S.setAttribute("aria-label", E() === "light" ? "Switch to dark theme" : "Switch to light theme");
|
|
307
|
+
L(), S.addEventListener("click", () => {
|
|
308
|
+
const C = E() === "light" ? "dark" : "light";
|
|
309
|
+
_.dataset.theme = C;
|
|
310
|
+
try {
|
|
311
|
+
window.localStorage.setItem("ack-theme", C);
|
|
312
|
+
} catch {
|
|
313
|
+
}
|
|
314
|
+
L(), document.dispatchEvent(new CustomEvent("ack:theme", { detail: { theme: C } }));
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
const $ = h.querySelector("[data-cart-open]"), j = h.querySelector("[data-cart-count]");
|
|
318
|
+
if ($ && j) {
|
|
319
|
+
const _ = de($.dataset.cartKey), E = $.dataset.cartLabel || "Cart", L = () => {
|
|
320
|
+
const C = _.count();
|
|
321
|
+
j.textContent = C > 99 ? "99+" : String(C), j.hidden = C === 0, $.setAttribute("aria-label", C ? `${E} (${C})` : E);
|
|
322
|
+
};
|
|
323
|
+
L(), _.subscribe((C) => {
|
|
324
|
+
L(), j.classList.remove("is-bump"), j.offsetWidth, j.classList.add("is-bump");
|
|
325
|
+
}), $.addEventListener("click", () => {
|
|
326
|
+
document.dispatchEvent(new CustomEvent("ack:cart-open", { detail: { key: _.key, trigger: $ } }));
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}));
|
|
330
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e("header", { className: be(["store-header", `store-header--${b}`, `store-header--${x}`, { "store-header--sticky": N }, f]), "data-store-header": !0, "data-rk-bf78a5": "", children: /* @__PURE__ */ n("div", { className: "store-header__inner", "data-rk-bf78a5": "", children: [
|
|
331
|
+
i.length > 0 && /* @__PURE__ */ e("button", { className: "store-header__toggle", type: "button", "aria-expanded": "false", "aria-controls": `${m}-nav`, "aria-label": "Menu", "data-menu-toggle": !0, "data-rk-bf78a5": "", children: /* @__PURE__ */ n("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: [
|
|
332
|
+
/* @__PURE__ */ e("path", { className: "l1", d: "M4 7h16", "data-rk-bf78a5": "" }),
|
|
333
|
+
/* @__PURE__ */ e("path", { className: "l2", d: "M4 12h16", "data-rk-bf78a5": "" }),
|
|
334
|
+
/* @__PURE__ */ e("path", { className: "l3", d: "M4 17h16", "data-rk-bf78a5": "" })
|
|
335
|
+
] }) }),
|
|
336
|
+
/* @__PURE__ */ n("a", { className: "store-header__brand", href: r, "data-rk-bf78a5": "", children: [
|
|
337
|
+
/* @__PURE__ */ e("span", { className: "store-header__logo", "aria-hidden": "true", "data-rk-bf78a5": "", children: /* @__PURE__ */ n("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "data-rk-bf78a5": "", children: [
|
|
338
|
+
/* @__PURE__ */ e("path", { d: "M12 2 3 7v10l9 5 9-5V7z", "data-rk-bf78a5": "" }),
|
|
339
|
+
/* @__PURE__ */ e("path", { d: "m3 7 9 5 9-5M12 12v10", "data-rk-bf78a5": "" })
|
|
340
|
+
] }) }),
|
|
341
|
+
/* @__PURE__ */ e("span", { "data-rk-bf78a5": "", children: t })
|
|
342
|
+
] }),
|
|
343
|
+
i.length > 0 ? /* @__PURE__ */ e("nav", { className: "store-header__nav", id: `${m}-nav`, "aria-label": "Main", "data-menu": !0, "data-rk-bf78a5": "", children: /* @__PURE__ */ e("ul", { className: "store-header__links", "data-rk-bf78a5": "", children: i.map((h, g) => {
|
|
344
|
+
var y;
|
|
345
|
+
return /* @__PURE__ */ e("li", { className: "store-header__item", "data-rk-bf78a5": "", children: (y = h.children) != null && y.length ? /* @__PURE__ */ n(U, { children: [
|
|
346
|
+
/* @__PURE__ */ n("button", { className: "store-header__link store-header__link--parent", type: "button", "aria-expanded": "false", "aria-controls": `${m}-dd-${g}`, "data-dropdown-toggle": !0, "data-rk-bf78a5": "", children: [
|
|
347
|
+
h.label,
|
|
348
|
+
/* @__PURE__ */ e("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6", "data-rk-bf78a5": "" }) })
|
|
349
|
+
] }),
|
|
350
|
+
/* @__PURE__ */ e("div", { className: "store-header__dropdown", id: `${m}-dd-${g}`, hidden: !0, "data-dropdown": !0, "data-rk-bf78a5": "", children: /* @__PURE__ */ n("ul", { "data-rk-bf78a5": "", children: [
|
|
351
|
+
h.children.map((w, A) => /* @__PURE__ */ e("li", { "data-rk-bf78a5": "", children: /* @__PURE__ */ n("a", { href: w.href, "aria-current": v === w.href ? "page" : void 0, "data-rk-bf78a5": "", children: [
|
|
352
|
+
/* @__PURE__ */ e("strong", { "data-rk-bf78a5": "", children: w.label }),
|
|
353
|
+
w.description && /* @__PURE__ */ e("span", { "data-rk-bf78a5": "", children: w.description })
|
|
354
|
+
] }) }, A)),
|
|
355
|
+
/* @__PURE__ */ e("li", { className: "store-header__dropdown-all", "data-rk-bf78a5": "", children: /* @__PURE__ */ e("a", { href: h.href, "data-rk-bf78a5": "", children: "View all →" }) })
|
|
356
|
+
] }) })
|
|
357
|
+
] }) : /* @__PURE__ */ e("a", { className: "store-header__link", href: h.href, "aria-current": v === h.href ? "page" : void 0, "data-rk-bf78a5": "", children: h.label }) }, g);
|
|
358
|
+
}) }) }) : /* @__PURE__ */ e("div", { className: "store-header__nav", "data-rk-bf78a5": "" }),
|
|
359
|
+
/* @__PURE__ */ n("div", { className: "store-header__actions", "data-rk-bf78a5": "", children: [
|
|
360
|
+
/* @__PURE__ */ n("form", { className: "store-header__search", role: "search", action: a, "data-rk-bf78a5": "", children: [
|
|
361
|
+
/* @__PURE__ */ e("label", { className: "sr-only", htmlFor: `${m}-q`, "data-rk-bf78a5": "", children: s }),
|
|
362
|
+
/* @__PURE__ */ n("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: [
|
|
363
|
+
/* @__PURE__ */ e("circle", { cx: "11", cy: "11", r: "7", "data-rk-bf78a5": "" }),
|
|
364
|
+
/* @__PURE__ */ e("path", { d: "m20 20-3.5-3.5", "data-rk-bf78a5": "" })
|
|
365
|
+
] }),
|
|
366
|
+
/* @__PURE__ */ e("input", { id: `${m}-q`, name: "q", type: "search", placeholder: s, autoComplete: "off", "data-rk-bf78a5": "" })
|
|
367
|
+
] }),
|
|
368
|
+
o && /* @__PURE__ */ n("button", { className: "store-header__icon store-header__theme", type: "button", "aria-label": "Switch to light theme", "data-theme-toggle": !0, "data-rk-bf78a5": "", children: [
|
|
369
|
+
/* @__PURE__ */ n("svg", { className: "i-sun", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: [
|
|
370
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "4", "data-rk-bf78a5": "" }),
|
|
371
|
+
/* @__PURE__ */ e("path", { d: "M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4", "data-rk-bf78a5": "" })
|
|
372
|
+
] }),
|
|
373
|
+
/* @__PURE__ */ e("svg", { className: "i-moon", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: /* @__PURE__ */ e("path", { d: "M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8z", "data-rk-bf78a5": "" }) })
|
|
374
|
+
] }),
|
|
375
|
+
c && /* @__PURE__ */ e("a", { className: "store-header__icon", href: c, "aria-label": "Account", "data-rk-bf78a5": "", children: /* @__PURE__ */ n("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: [
|
|
376
|
+
/* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "4", "data-rk-bf78a5": "" }),
|
|
377
|
+
/* @__PURE__ */ e("path", { d: "M4 21a8 8 0 0 1 16 0", "data-rk-bf78a5": "" })
|
|
378
|
+
] }) }),
|
|
379
|
+
/* @__PURE__ */ n("button", { className: "store-header__icon store-header__cart", type: "button", "data-cart-open": !0, "data-cart-key": k, "data-cart-label": p, "aria-label": p, "data-rk-bf78a5": "", children: [
|
|
380
|
+
/* @__PURE__ */ n("svg", { width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-bf78a5": "", children: [
|
|
381
|
+
/* @__PURE__ */ e("path", { d: "M6 7h12l-1 13H7z", "data-rk-bf78a5": "" }),
|
|
382
|
+
/* @__PURE__ */ e("path", { d: "M9 7V6a3 3 0 0 1 6 0v1", "data-rk-bf78a5": "" })
|
|
383
|
+
] }),
|
|
384
|
+
/* @__PURE__ */ e("span", { className: "store-header__count", "data-cart-count": !0, hidden: !0, "aria-hidden": "true", "data-rk-bf78a5": "", children: "0" })
|
|
385
|
+
] })
|
|
386
|
+
] })
|
|
387
|
+
] }) }) });
|
|
388
|
+
}
|
|
389
|
+
function ge(...t) {
|
|
390
|
+
const r = [], i = (a) => {
|
|
391
|
+
if (a) {
|
|
392
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
393
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
394
|
+
else if (typeof a == "object")
|
|
395
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
396
|
+
}
|
|
397
|
+
};
|
|
398
|
+
return t.forEach(i), r.join(" ");
|
|
399
|
+
}
|
|
400
|
+
function De({
|
|
401
|
+
cartKey: t = "ack-cart",
|
|
402
|
+
title: r = "Your cart",
|
|
403
|
+
checkoutHref: i = "#",
|
|
404
|
+
checkoutLabel: a = "Checkout",
|
|
405
|
+
currency: s = "USD",
|
|
406
|
+
locale: c = "en-US",
|
|
407
|
+
freeShippingThreshold: k = 75,
|
|
408
|
+
demoItems: p = [],
|
|
409
|
+
inline: v = !1,
|
|
410
|
+
side: N = "right",
|
|
411
|
+
size: b = "md",
|
|
412
|
+
id: x = "cart-drawer",
|
|
413
|
+
className: o = ""
|
|
414
|
+
}) {
|
|
415
|
+
const d = x, f = V(!1);
|
|
416
|
+
return R(() => {
|
|
417
|
+
if (f.current) return;
|
|
418
|
+
f.current = !0;
|
|
419
|
+
const m = 'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
420
|
+
document.querySelectorAll("[data-cart-drawer]:not([data-bound])").forEach((l) => {
|
|
421
|
+
l.dataset.bound = "";
|
|
422
|
+
const h = de(l.dataset.key), g = { currency: l.dataset.currency, locale: l.dataset.locale }, y = l.hasAttribute("data-inline"), w = Number(l.dataset.free) || 0, A = l.querySelector(".cart-drawer__panel"), S = l.querySelector("[data-lines]"), $ = l.querySelector("[data-empty]"), j = l.querySelector("[data-foot]"), _ = l.querySelector("[data-subtotal]"), E = l.querySelector("[data-cart-qty]"), L = l.querySelector("[data-ship]"), C = l.querySelector("[data-ship-text]"), B = l.querySelector("[data-ship-bar]");
|
|
423
|
+
let M = null;
|
|
424
|
+
if (l.dataset.seed)
|
|
425
|
+
try {
|
|
426
|
+
h.seed(JSON.parse(l.dataset.seed));
|
|
427
|
+
} catch {
|
|
428
|
+
}
|
|
429
|
+
const W = (u, q, I) => {
|
|
430
|
+
const T = document.createElement(u);
|
|
431
|
+
return q && (T.className = q), I !== void 0 && (T.textContent = I), T;
|
|
432
|
+
};
|
|
433
|
+
function K(u) {
|
|
434
|
+
const q = W("li", "cart-line"), I = W("div", "cart-line__media");
|
|
435
|
+
if (I.style.setProperty("--h", String(u.hue ?? 40)), u.image) {
|
|
436
|
+
const X = W("img");
|
|
437
|
+
X.src = u.image, X.alt = "", I.append(X);
|
|
438
|
+
} else
|
|
439
|
+
I.innerHTML = `<svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${ae(u.icon)}</svg>`;
|
|
440
|
+
const T = W("div", "cart-line__info");
|
|
441
|
+
T.append(W("p", "cart-line__name", u.name)), u.variant && T.append(W("p", "cart-line__variant", u.variant));
|
|
442
|
+
const D = W("div", "cart-line__stepper"), O = W("button", "cart-line__step", "−");
|
|
443
|
+
O.type = "button", O.setAttribute("aria-label", `Decrease quantity of ${u.name}`), O.addEventListener("click", () => h.setQty(u.id, u.qty - 1));
|
|
444
|
+
const z = W("span", "cart-line__count", String(u.qty));
|
|
445
|
+
z.setAttribute("aria-label", `Quantity ${u.qty}`);
|
|
446
|
+
const H = W("button", "cart-line__step", "+");
|
|
447
|
+
H.type = "button", H.setAttribute("aria-label", `Increase quantity of ${u.name}`), H.disabled = u.qty >= 99, H.addEventListener("click", () => h.setQty(u.id, u.qty + 1)), D.append(O, z, H), T.append(D);
|
|
448
|
+
const P = W("div", "cart-line__side");
|
|
449
|
+
P.append(W("p", "cart-line__price", F(u.price * u.qty, g)));
|
|
450
|
+
const Y = W("button", "cart-line__remove", "Remove");
|
|
451
|
+
return Y.type = "button", Y.setAttribute("aria-label", `Remove ${u.name}`), Y.addEventListener("click", () => h.remove(u.id)), P.append(Y), q.append(I, T, P), q;
|
|
452
|
+
}
|
|
453
|
+
function G() {
|
|
454
|
+
const u = h.items(), q = u.reduce((O, z) => O + z.qty, 0), I = u.reduce((O, z) => O + z.qty * z.price, 0), T = document.activeElement, D = T && l.contains(T) ? T.getAttribute("aria-label") : null;
|
|
455
|
+
if (S.replaceChildren(...u.map(K)), $.hidden = u.length > 0, j.hidden = u.length === 0, S.hidden = u.length === 0, E.textContent = q ? `(${q})` : "", _.textContent = F(I, g), L && C && B) {
|
|
456
|
+
L.hidden = u.length === 0;
|
|
457
|
+
const O = Math.max(0, w - I);
|
|
458
|
+
C.textContent = O > 0 ? `You're ${F(O, g)} away from free shipping` : "You unlocked free shipping", B.style.width = `${Math.min(100, I / w * 100)}%`, L.classList.toggle("is-done", O === 0);
|
|
459
|
+
}
|
|
460
|
+
D && !l.contains(document.activeElement) && (Array.from(l.querySelectorAll("[aria-label]")).find((z) => z.getAttribute("aria-label") === D) ?? A).focus();
|
|
461
|
+
}
|
|
462
|
+
function Q(u) {
|
|
463
|
+
y || (M = u ?? document.activeElement, l.hidden = !1, document.documentElement.style.overflow = "hidden", requestAnimationFrame(() => {
|
|
464
|
+
l.classList.add("is-open"), A.focus();
|
|
465
|
+
}));
|
|
466
|
+
}
|
|
467
|
+
function Z() {
|
|
468
|
+
if (y || l.hidden) return;
|
|
469
|
+
l.classList.remove("is-open"), document.documentElement.style.overflow = "";
|
|
470
|
+
const u = () => {
|
|
471
|
+
l.hidden = !0;
|
|
472
|
+
};
|
|
473
|
+
window.matchMedia("(prefers-reduced-motion: reduce)").matches ? u() : window.setTimeout(u, 280), M == null || M.focus();
|
|
474
|
+
}
|
|
475
|
+
G(), h.subscribe(G), document.addEventListener("ack:cart-open", (u) => {
|
|
476
|
+
const q = u.detail || {};
|
|
477
|
+
(!q.key || q.key === h.key) && Q(q.trigger);
|
|
478
|
+
}), document.querySelectorAll("[data-cart-open]").forEach((u) => {
|
|
479
|
+
u.closest("[data-store-header]") || u.addEventListener("click", () => Q(u));
|
|
480
|
+
}), l.querySelectorAll("[data-cart-close]").forEach((u) => u.addEventListener("click", Z)), l.addEventListener("keydown", (u) => {
|
|
481
|
+
if (y) return;
|
|
482
|
+
if (u.key === "Escape") {
|
|
483
|
+
u.preventDefault(), Z();
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
if (u.key !== "Tab") return;
|
|
487
|
+
const q = Array.from(A.querySelectorAll(m)).filter((D) => !D.closest("[hidden]"));
|
|
488
|
+
if (!q.length) return;
|
|
489
|
+
const I = q[0], T = q[q.length - 1];
|
|
490
|
+
u.shiftKey && (document.activeElement === I || document.activeElement === A) ? (u.preventDefault(), T.focus()) : !u.shiftKey && document.activeElement === T && (u.preventDefault(), I.focus());
|
|
491
|
+
});
|
|
492
|
+
});
|
|
493
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("div", { className: ge(["cart-drawer", `cart-drawer--${N}`, `cart-drawer--${b}`, { "cart-drawer--inline": v }, o]), "data-cart-drawer": !0, "data-key": t, "data-currency": s, "data-locale": c, "data-free": k, "data-seed": p.length ? JSON.stringify(p) : void 0, "data-inline": v ? "" : void 0, hidden: !v, "data-rk-571235": "", children: [
|
|
494
|
+
!v && /* @__PURE__ */ e("div", { className: "cart-drawer__backdrop", "data-cart-close": !0, "data-rk-571235": "" }),
|
|
495
|
+
/* @__PURE__ */ n("aside", { className: "cart-drawer__panel", role: v ? "region" : "dialog", "aria-modal": v ? void 0 : "true", "aria-labelledby": `${d}-title`, tabIndex: -1, "data-rk-571235": "", children: [
|
|
496
|
+
/* @__PURE__ */ n("header", { className: "cart-drawer__head", "data-rk-571235": "", children: [
|
|
497
|
+
/* @__PURE__ */ n("h2", { className: "cart-drawer__title", id: `${d}-title`, "data-rk-571235": "", children: [
|
|
498
|
+
r,
|
|
499
|
+
" ",
|
|
500
|
+
/* @__PURE__ */ e("span", { className: "cart-drawer__qty", "data-cart-qty": !0, "data-rk-571235": "" })
|
|
501
|
+
] }),
|
|
502
|
+
!v && /* @__PURE__ */ e("button", { className: "cart-drawer__close", type: "button", "aria-label": "Close cart", "data-cart-close": !0, "data-rk-571235": "", children: /* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", "aria-hidden": "true", "data-rk-571235": "", children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12", "data-rk-571235": "" }) }) })
|
|
503
|
+
] }),
|
|
504
|
+
k > 0 && /* @__PURE__ */ n("div", { className: "cart-drawer__ship", "data-ship": !0, "data-rk-571235": "", children: [
|
|
505
|
+
/* @__PURE__ */ e("p", { className: "cart-drawer__ship-text", "data-ship-text": !0, "data-rk-571235": "" }),
|
|
506
|
+
/* @__PURE__ */ e("div", { className: "cart-drawer__ship-bar", "aria-hidden": "true", "data-rk-571235": "", children: /* @__PURE__ */ e("span", { "data-ship-bar": !0, "data-rk-571235": "" }) })
|
|
507
|
+
] }),
|
|
508
|
+
/* @__PURE__ */ e("ul", { className: "cart-drawer__lines", "data-lines": !0, "aria-label": "Cart items", "data-rk-571235": "" }),
|
|
509
|
+
/* @__PURE__ */ n("div", { className: "cart-drawer__empty", "data-empty": !0, hidden: !0, "data-rk-571235": "", children: [
|
|
510
|
+
/* @__PURE__ */ n("svg", { width: "44", height: "44", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-571235": "", children: [
|
|
511
|
+
/* @__PURE__ */ e("path", { d: "M6 7h12l-1 13H7z", "data-rk-571235": "" }),
|
|
512
|
+
/* @__PURE__ */ e("path", { d: "M9 7V6a3 3 0 0 1 6 0v1", "data-rk-571235": "" })
|
|
513
|
+
] }),
|
|
514
|
+
/* @__PURE__ */ e("p", { "data-rk-571235": "", children: /* @__PURE__ */ e("strong", { "data-rk-571235": "", children: "Your cart is empty" }) }),
|
|
515
|
+
/* @__PURE__ */ e("p", { "data-rk-571235": "", children: "Add a few products and they will show up here." }),
|
|
516
|
+
!v && /* @__PURE__ */ e("button", { className: "cart-drawer__ghost", type: "button", "data-cart-close": !0, "data-rk-571235": "", children: "Continue shopping" })
|
|
517
|
+
] }),
|
|
518
|
+
/* @__PURE__ */ n("footer", { className: "cart-drawer__foot", "data-foot": !0, "data-rk-571235": "", children: [
|
|
519
|
+
/* @__PURE__ */ n("div", { className: "cart-drawer__row", "data-rk-571235": "", children: [
|
|
520
|
+
/* @__PURE__ */ e("span", { "data-rk-571235": "", children: "Subtotal" }),
|
|
521
|
+
/* @__PURE__ */ e("strong", { "data-subtotal": !0, "aria-live": "polite", "data-rk-571235": "", children: "—" })
|
|
522
|
+
] }),
|
|
523
|
+
/* @__PURE__ */ e("p", { className: "cart-drawer__note", "data-rk-571235": "", children: "Taxes and shipping are calculated at checkout." }),
|
|
524
|
+
/* @__PURE__ */ n("a", { className: "cart-drawer__checkout", href: i, "data-rk-571235": "", children: [
|
|
525
|
+
a,
|
|
526
|
+
/* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-571235": "", children: /* @__PURE__ */ e("path", { d: "M5 12h14M13 6l6 6-6 6", "data-rk-571235": "" }) })
|
|
527
|
+
] })
|
|
528
|
+
] })
|
|
529
|
+
] })
|
|
530
|
+
] }) });
|
|
531
|
+
}
|
|
532
|
+
function ye(...t) {
|
|
533
|
+
const r = [], i = (a) => {
|
|
534
|
+
if (a) {
|
|
535
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
536
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
537
|
+
else if (typeof a == "object")
|
|
538
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
539
|
+
}
|
|
540
|
+
};
|
|
541
|
+
return t.forEach(i), r.join(" ");
|
|
542
|
+
}
|
|
543
|
+
function He({
|
|
544
|
+
eyebrow: t = "New season · 2026",
|
|
545
|
+
title: r = "Gear that feels",
|
|
546
|
+
highlight: i = "made for you",
|
|
547
|
+
subtitle: a = "Thoughtfully designed audio, wearables and everyday carry. Free shipping over $75 and 30-day returns on everything.",
|
|
548
|
+
primary: s = { label: "Shop the collection", href: "#" },
|
|
549
|
+
secondary: c = { label: "Explore new arrivals", href: "#" },
|
|
550
|
+
stats: k = [
|
|
551
|
+
{ value: "4.9/5", label: "from 12k reviews" },
|
|
552
|
+
{ value: "48h", label: "average delivery" },
|
|
553
|
+
{ value: "30 days", label: "free returns" }
|
|
554
|
+
],
|
|
555
|
+
product: p = { slug: "aurora-headphones", name: "Aurora Wireless Headphones", price: 189, compareAt: 229, category: "audio", rating: 4.8, reviews: 312, icon: "headphones", hue: 38 },
|
|
556
|
+
productHref: v = "#",
|
|
557
|
+
currency: N = "USD",
|
|
558
|
+
locale: b = "en-US",
|
|
559
|
+
variant: x = "split",
|
|
560
|
+
size: o = "md",
|
|
561
|
+
className: d = ""
|
|
562
|
+
}) {
|
|
563
|
+
const f = { currency: N, locale: b };
|
|
564
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("section", { className: ye(["store-hero", `store-hero--${x}`, `store-hero--${o}`, d]), "data-rk-92f260": "", children: [
|
|
565
|
+
/* @__PURE__ */ e("div", { className: "store-hero__glow", "aria-hidden": "true", "data-rk-92f260": "" }),
|
|
566
|
+
/* @__PURE__ */ n("div", { className: "store-hero__inner", "data-rk-92f260": "", children: [
|
|
567
|
+
/* @__PURE__ */ n("div", { className: "store-hero__copy", "data-rk-92f260": "", children: [
|
|
568
|
+
t && /* @__PURE__ */ n("p", { className: "store-hero__eyebrow", "data-rk-92f260": "", children: [
|
|
569
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", "data-rk-92f260": "" }),
|
|
570
|
+
t
|
|
571
|
+
] }),
|
|
572
|
+
/* @__PURE__ */ n("h1", { className: "store-hero__title", "data-rk-92f260": "", children: [
|
|
573
|
+
r,
|
|
574
|
+
" ",
|
|
575
|
+
/* @__PURE__ */ e("em", { "data-rk-92f260": "", children: i })
|
|
576
|
+
] }),
|
|
577
|
+
a && /* @__PURE__ */ e("p", { className: "store-hero__subtitle", "data-rk-92f260": "", children: a }),
|
|
578
|
+
/* @__PURE__ */ n("div", { className: "store-hero__ctas", "data-rk-92f260": "", children: [
|
|
579
|
+
s && /* @__PURE__ */ n("a", { className: "store-hero__btn store-hero__btn--primary", href: s.href, "data-rk-92f260": "", children: [
|
|
580
|
+
s.label,
|
|
581
|
+
/* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-92f260": "", children: /* @__PURE__ */ e("path", { d: "M5 12h14M13 6l6 6-6 6", "data-rk-92f260": "" }) })
|
|
582
|
+
] }),
|
|
583
|
+
c && /* @__PURE__ */ e("a", { className: "store-hero__btn store-hero__btn--ghost", href: c.href, "data-rk-92f260": "", children: c.label })
|
|
584
|
+
] }),
|
|
585
|
+
k.length > 0 && /* @__PURE__ */ e("dl", { className: "store-hero__stats", "data-rk-92f260": "", children: k.map((m, l) => /* @__PURE__ */ n("div", { "data-rk-92f260": "", children: [
|
|
586
|
+
/* @__PURE__ */ e("dt", { "data-rk-92f260": "", children: m.label }),
|
|
587
|
+
/* @__PURE__ */ e("dd", { "data-rk-92f260": "", children: m.value })
|
|
588
|
+
] }, l)) })
|
|
589
|
+
] }),
|
|
590
|
+
p && /* @__PURE__ */ n("div", { className: "store-hero__stage", "data-rk-92f260": "", children: [
|
|
591
|
+
/* @__PURE__ */ e("div", { className: "store-hero__ring", "aria-hidden": "true", "data-rk-92f260": "" }),
|
|
592
|
+
/* @__PURE__ */ n("a", { className: "store-hero__product", href: v, "data-rk-92f260": "", children: [
|
|
593
|
+
/* @__PURE__ */ e(J, { image: p.image, alt: p.name, icon: p.icon, hue: p.hue, size: "lg", ratio: "4 / 5" }),
|
|
594
|
+
/* @__PURE__ */ n("span", { className: "store-hero__chip store-hero__chip--price", "data-rk-92f260": "", children: [
|
|
595
|
+
/* @__PURE__ */ e("small", { "data-rk-92f260": "", children: p.name }),
|
|
596
|
+
/* @__PURE__ */ e("strong", { "data-rk-92f260": "", children: F(p.price, f) }),
|
|
597
|
+
p.compareAt && /* @__PURE__ */ n("s", { "data-rk-92f260": "", children: [
|
|
598
|
+
/* @__PURE__ */ e("span", { className: "sr-only", "data-rk-92f260": "", children: "Was " }),
|
|
599
|
+
F(p.compareAt, f)
|
|
600
|
+
] })
|
|
601
|
+
] }),
|
|
602
|
+
p.rating !== void 0 && /* @__PURE__ */ e("span", { className: "store-hero__chip store-hero__chip--rating", "data-rk-92f260": "", children: /* @__PURE__ */ e(te, { value: p.rating, count: p.reviews }) })
|
|
603
|
+
] })
|
|
604
|
+
] })
|
|
605
|
+
] })
|
|
606
|
+
] }) });
|
|
607
|
+
}
|
|
608
|
+
function _e(...t) {
|
|
609
|
+
const r = [], i = (a) => {
|
|
610
|
+
if (a) {
|
|
611
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
612
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
613
|
+
else if (typeof a == "object")
|
|
614
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
return t.forEach(i), r.join(" ");
|
|
618
|
+
}
|
|
619
|
+
function we(t) {
|
|
620
|
+
const r = {};
|
|
621
|
+
for (const i of String(t ?? "").split(";")) {
|
|
622
|
+
const a = i.indexOf(":");
|
|
623
|
+
if (a < 0) continue;
|
|
624
|
+
const s = i.slice(0, a).trim();
|
|
625
|
+
s && (r[s.startsWith("--") ? s : s.replace(/-([a-z])/g, (c, k) => k.toUpperCase())] = i.slice(a + 1).trim());
|
|
626
|
+
}
|
|
627
|
+
return r;
|
|
628
|
+
}
|
|
629
|
+
function Fe({
|
|
630
|
+
title: t = "Shop by category",
|
|
631
|
+
subtitle: r,
|
|
632
|
+
categories: i = [
|
|
633
|
+
{ id: "audio", name: "Audio", href: "#", count: 18, icon: "headphones", hue: 38 },
|
|
634
|
+
{ id: "wearables", name: "Wearables", href: "#", count: 12, icon: "watch", hue: 200 },
|
|
635
|
+
{ id: "bags", name: "Bags", href: "#", count: 9, icon: "backpack", hue: 150 },
|
|
636
|
+
{ id: "home", name: "Home", href: "#", count: 24, icon: "lamp", hue: 20 }
|
|
637
|
+
],
|
|
638
|
+
columns: a = 4,
|
|
639
|
+
variant: s = "glass",
|
|
640
|
+
size: c = "md",
|
|
641
|
+
countLabel: k = "products",
|
|
642
|
+
className: p = ""
|
|
643
|
+
}) {
|
|
644
|
+
const v = Math.min(6, Math.max(2, a));
|
|
645
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("section", { className: _e(["cat-tiles", `cat-tiles--${s}`, `cat-tiles--${c}`, p]), style: we(`--ct-cols: ${v}`), "data-rk-00c0aa": "", children: [
|
|
646
|
+
(t || r) && /* @__PURE__ */ n("header", { className: "cat-tiles__head", "data-rk-00c0aa": "", children: [
|
|
647
|
+
t && /* @__PURE__ */ e("h2", { className: "cat-tiles__title", "data-rk-00c0aa": "", children: t }),
|
|
648
|
+
r && /* @__PURE__ */ e("p", { className: "cat-tiles__subtitle", "data-rk-00c0aa": "", children: r })
|
|
649
|
+
] }),
|
|
650
|
+
/* @__PURE__ */ e("ul", { className: "cat-tiles__grid", "data-rk-00c0aa": "", children: i.map((N, b) => /* @__PURE__ */ e("li", { "data-rk-00c0aa": "", children: /* @__PURE__ */ n("a", { className: "cat-tile is-hoverable", href: N.href, "data-rk-00c0aa": "", children: [
|
|
651
|
+
/* @__PURE__ */ e(J, { icon: N.icon, hue: N.hue, ratio: "auto", size: "sm", variant: s === "minimal" ? "flat" : "glow", className: "cat-tile__media" }),
|
|
652
|
+
/* @__PURE__ */ n("span", { className: "cat-tile__text", "data-rk-00c0aa": "", children: [
|
|
653
|
+
/* @__PURE__ */ e("span", { className: "cat-tile__name", "data-rk-00c0aa": "", children: N.name }),
|
|
654
|
+
N.count !== void 0 && /* @__PURE__ */ n("span", { className: "cat-tile__count", "data-rk-00c0aa": "", children: [
|
|
655
|
+
N.count,
|
|
656
|
+
" ",
|
|
657
|
+
k
|
|
658
|
+
] })
|
|
659
|
+
] }),
|
|
660
|
+
/* @__PURE__ */ e("span", { className: "cat-tile__arrow", "aria-hidden": "true", "data-rk-00c0aa": "", children: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.4", strokeLinecap: "round", strokeLinejoin: "round", "data-rk-00c0aa": "", children: /* @__PURE__ */ e("path", { d: "M7 17 17 7M8 7h9v9", "data-rk-00c0aa": "" }) }) })
|
|
661
|
+
] }) }, b)) })
|
|
662
|
+
] }) });
|
|
663
|
+
}
|
|
664
|
+
function ve(...t) {
|
|
665
|
+
const r = [], i = (a) => {
|
|
666
|
+
if (a) {
|
|
667
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
668
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
669
|
+
else if (typeof a == "object")
|
|
670
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
return t.forEach(i), r.join(" ");
|
|
674
|
+
}
|
|
675
|
+
function Ne({
|
|
676
|
+
items: t = [
|
|
677
|
+
{ icon: "truck", title: "Free shipping", text: "On orders over $75" },
|
|
678
|
+
{ icon: "return", title: "30-day returns", text: "No questions asked" },
|
|
679
|
+
{ icon: "lock", title: "Secure checkout", text: "SSL & 3-D Secure" },
|
|
680
|
+
{ icon: "chat", title: "Real humans", text: "Support 7 days a week" }
|
|
681
|
+
],
|
|
682
|
+
variant: r = "cards",
|
|
683
|
+
size: i = "md",
|
|
684
|
+
className: a = ""
|
|
685
|
+
}) {
|
|
686
|
+
const s = {
|
|
687
|
+
truck: '<path d="M3 6h11v10H3zM14 10h4l3 3v3h-7"/><circle cx="7" cy="18" r="2"/><circle cx="17" cy="18" r="2"/>',
|
|
688
|
+
return: '<path d="M4 10h11a5 5 0 0 1 0 10H9"/><path d="m8 6-4 4 4 4"/>',
|
|
689
|
+
lock: '<rect x="4" y="11" width="16" height="10" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/>',
|
|
690
|
+
chat: '<path d="M21 12a8 8 0 0 1-11.6 7.1L4 20l1.1-4.6A8 8 0 1 1 21 12z"/>',
|
|
691
|
+
gift: '<rect x="3" y="8" width="18" height="5" rx="1"/><path d="M5 13v8h14v-8M12 8v13M12 8S10 3 7.5 4 9 8 12 8zm0 0s2-5 4.5-4S15 8 12 8z"/>',
|
|
692
|
+
leaf: '<path d="M5 19c0-9 6-14 15-14 0 9-5 15-14 15"/><path d="M5 19c3-4 6-6 10-8"/>'
|
|
693
|
+
};
|
|
694
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e("div", { className: "trust-badges-cq", "data-rk-dbc985": "", children: /* @__PURE__ */ e("ul", { className: ve(["trust-badges", `trust-badges--${r}`, `trust-badges--${i}`, a]), "data-rk-dbc985": "", children: t.map((c, k) => /* @__PURE__ */ n("li", { className: "trust-badge", "data-rk-dbc985": "", children: [
|
|
695
|
+
/* @__PURE__ */ e("span", { className: "trust-badge__icon", "aria-hidden": "true", "data-rk-dbc985": "", children: /* @__PURE__ */ e("svg", { width: "22", height: "22", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.9", strokeLinecap: "round", strokeLinejoin: "round", "data-rk-dbc985": "", children: /* @__PURE__ */ e("g", { dangerouslySetInnerHTML: { __html: s[c.icon] }, "data-rk-dbc985": "" }) }) }),
|
|
696
|
+
/* @__PURE__ */ n("span", { className: "trust-badge__text", "data-rk-dbc985": "", children: [
|
|
697
|
+
/* @__PURE__ */ e("strong", { "data-rk-dbc985": "", children: c.title }),
|
|
698
|
+
c.text && /* @__PURE__ */ e("span", { "data-rk-dbc985": "", children: c.text })
|
|
699
|
+
] })
|
|
700
|
+
] }, k)) }) }) });
|
|
701
|
+
}
|
|
702
|
+
function xe(...t) {
|
|
703
|
+
const r = [], i = (a) => {
|
|
704
|
+
if (a) {
|
|
705
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
706
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
707
|
+
else if (typeof a == "object")
|
|
708
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
return t.forEach(i), r.join(" ");
|
|
712
|
+
}
|
|
713
|
+
function Se(t) {
|
|
714
|
+
const r = {};
|
|
715
|
+
for (const i of String(t ?? "").split(";")) {
|
|
716
|
+
const a = i.indexOf(":");
|
|
717
|
+
if (a < 0) continue;
|
|
718
|
+
const s = i.slice(0, a).trim();
|
|
719
|
+
s && (r[s.startsWith("--") ? s : s.replace(/-([a-z])/g, (c, k) => k.toUpperCase())] = i.slice(a + 1).trim());
|
|
720
|
+
}
|
|
721
|
+
return r;
|
|
722
|
+
}
|
|
723
|
+
function Pe({
|
|
724
|
+
target: t = "product-grid",
|
|
725
|
+
id: r = "catalog-filters",
|
|
726
|
+
categories: i = [
|
|
727
|
+
{ id: "audio", name: "Audio", count: 3 },
|
|
728
|
+
{ id: "wearables", name: "Wearables", count: 2 },
|
|
729
|
+
{ id: "bags", name: "Bags", count: 2 },
|
|
730
|
+
{ id: "home", name: "Home", count: 3 }
|
|
731
|
+
],
|
|
732
|
+
selected: a = [],
|
|
733
|
+
maxPrice: s = 300,
|
|
734
|
+
colors: c = [
|
|
735
|
+
{ name: "Graphite", hex: "#2b2b2f" },
|
|
736
|
+
{ name: "Sand", hex: "#d8c3a5" },
|
|
737
|
+
{ name: "Ocean", hex: "#3d6f9e" },
|
|
738
|
+
{ name: "Moss", hex: "#5f7a4e" },
|
|
739
|
+
{ name: "Clay", hex: "#b5654a" }
|
|
740
|
+
],
|
|
741
|
+
currency: k = "USD",
|
|
742
|
+
locale: p = "en-US",
|
|
743
|
+
variant: v = "glass",
|
|
744
|
+
size: N = "md",
|
|
745
|
+
className: b = ""
|
|
746
|
+
}) {
|
|
747
|
+
const x = { currency: k, locale: p }, o = V(!1);
|
|
748
|
+
return R(() => {
|
|
749
|
+
o.current || (o.current = !0, document.querySelectorAll("form[data-filters]:not([data-bound])").forEach((d) => {
|
|
750
|
+
d.dataset.bound = "";
|
|
751
|
+
const f = d.closest("[data-filters-root]"), m = document.getElementById(d.dataset.filters || "");
|
|
752
|
+
if (!m) return;
|
|
753
|
+
const l = m, h = l.parentElement, g = h == null ? void 0 : h.querySelector("[data-product-empty]"), y = Array.from(l.querySelectorAll("[data-product]"));
|
|
754
|
+
y.forEach((M, W) => {
|
|
755
|
+
M.dataset.index = String(W);
|
|
756
|
+
});
|
|
757
|
+
const w = document.getElementById(`${d.id}-sort`), A = d.querySelector("[data-price-out]"), S = f.querySelector("[data-filters-toggle]"), $ = f.querySelector("[data-active-count]"), j = { currency: d.dataset.currency, locale: d.dataset.locale }, _ = d.elements.namedItem("max"), E = Number(_.max), L = new URLSearchParams(window.location.search), C = (L.get("category") || "").split(",").filter(Boolean);
|
|
758
|
+
C.length && d.querySelectorAll('input[name="category"]').forEach((M) => {
|
|
759
|
+
M.checked = C.includes(M.value);
|
|
760
|
+
}), w && L.get("sort") && (w.value = L.get("sort"));
|
|
761
|
+
function B() {
|
|
762
|
+
const M = new FormData(d), W = M.getAll("category"), K = M.getAll("color"), G = Number(M.get("max")), Q = Number(M.get("rating") || 0), Z = M.get("stock") === "in";
|
|
763
|
+
let u = 0;
|
|
764
|
+
y.forEach((O) => {
|
|
765
|
+
const z = O.dataset, H = (z.colors || "").split(",").filter(Boolean), P = (!W.length || W.includes(z.category || "")) && Number(z.price) <= G && Number(z.rating) >= Q && (!Z || z.stock === "in") && (!K.length || K.some((Y) => H.includes(Y)));
|
|
766
|
+
O.hidden = !P, P && u++;
|
|
767
|
+
});
|
|
768
|
+
const q = (w == null ? void 0 : w.value) || "featured", I = [...y].sort((O, z) => {
|
|
769
|
+
const H = O.dataset, P = z.dataset;
|
|
770
|
+
return q === "price-asc" ? Number(H.price) - Number(P.price) : q === "price-desc" ? Number(P.price) - Number(H.price) : q === "rating" ? Number(P.rating) - Number(H.rating) : q === "name" ? (H.name || "").localeCompare(P.name || "") : Number(H.index) - Number(P.index);
|
|
771
|
+
});
|
|
772
|
+
l.append(...I), g && (g.hidden = u > 0), A && (A.textContent = F(G, j)), document.querySelectorAll(`[data-result-count="${l.id}"]`).forEach((O) => {
|
|
773
|
+
O.textContent = String(u);
|
|
774
|
+
});
|
|
775
|
+
const T = W.length + K.length + (G < E ? 1 : 0) + (Q > 0 ? 1 : 0) + (Z ? 1 : 0);
|
|
776
|
+
$ && ($.hidden = T === 0, $.textContent = String(T));
|
|
777
|
+
const D = new URL(window.location.href);
|
|
778
|
+
W.length ? D.searchParams.set("category", W.join(",")) : D.searchParams.delete("category"), q !== "featured" ? D.searchParams.set("sort", q) : D.searchParams.delete("sort"), window.history.replaceState(null, "", D);
|
|
779
|
+
}
|
|
780
|
+
d.addEventListener("input", B), d.addEventListener("change", B), d.addEventListener("submit", (M) => {
|
|
781
|
+
M.preventDefault(), B();
|
|
782
|
+
}), d.addEventListener("reset", () => window.setTimeout(B, 0)), w == null || w.addEventListener("change", B), S == null || S.addEventListener("click", () => {
|
|
783
|
+
const M = S.getAttribute("aria-expanded") !== "true";
|
|
784
|
+
S.setAttribute("aria-expanded", String(M)), f.classList.toggle("is-open", M);
|
|
785
|
+
}), B();
|
|
786
|
+
}));
|
|
787
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("div", { className: xe(["filters", `filters--${v}`, `filters--${N}`, b]), "data-filters-root": !0, "data-rk-a56ca5": "", children: [
|
|
788
|
+
/* @__PURE__ */ n("button", { className: "filters__toggle", type: "button", "aria-expanded": "false", "aria-controls": r, "data-filters-toggle": !0, "data-rk-a56ca5": "", children: [
|
|
789
|
+
/* @__PURE__ */ e("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", "aria-hidden": "true", "data-rk-a56ca5": "", children: /* @__PURE__ */ e("path", { d: "M4 6h16M7 12h10M10 18h4", "data-rk-a56ca5": "" }) }),
|
|
790
|
+
"Filters",
|
|
791
|
+
/* @__PURE__ */ e("span", { className: "filters__active", "data-active-count": !0, hidden: !0, "data-rk-a56ca5": "" })
|
|
792
|
+
] }),
|
|
793
|
+
/* @__PURE__ */ n("form", { className: "filters__form", id: r, "data-filters": t, "data-currency": k, "data-locale": p, "aria-label": "Product filters", "data-rk-a56ca5": "", children: [
|
|
794
|
+
/* @__PURE__ */ n("fieldset", { className: "filters__group", "data-rk-a56ca5": "", children: [
|
|
795
|
+
/* @__PURE__ */ e("legend", { "data-rk-a56ca5": "", children: "Category" }),
|
|
796
|
+
i.map((d, f) => /* @__PURE__ */ n("label", { className: "filters__check", "data-rk-a56ca5": "", children: [
|
|
797
|
+
/* @__PURE__ */ e("input", { type: "checkbox", name: "category", defaultValue: d.id, defaultChecked: a.includes(d.id), "data-rk-a56ca5": "" }),
|
|
798
|
+
/* @__PURE__ */ e("span", { className: "filters__box", "aria-hidden": "true", "data-rk-a56ca5": "" }),
|
|
799
|
+
/* @__PURE__ */ e("span", { className: "filters__label", "data-rk-a56ca5": "", children: d.name }),
|
|
800
|
+
d.count !== void 0 && /* @__PURE__ */ e("span", { className: "filters__count", "data-rk-a56ca5": "", children: d.count })
|
|
801
|
+
] }, f))
|
|
802
|
+
] }),
|
|
803
|
+
/* @__PURE__ */ n("fieldset", { className: "filters__group", "data-rk-a56ca5": "", children: [
|
|
804
|
+
/* @__PURE__ */ e("legend", { "data-rk-a56ca5": "", children: "Price" }),
|
|
805
|
+
/* @__PURE__ */ n("label", { className: "filters__range", "data-rk-a56ca5": "", children: [
|
|
806
|
+
/* @__PURE__ */ n("span", { className: "filters__range-head", "data-rk-a56ca5": "", children: [
|
|
807
|
+
/* @__PURE__ */ e("span", { "data-rk-a56ca5": "", children: "Up to" }),
|
|
808
|
+
/* @__PURE__ */ e("output", { "data-price-out": !0, "data-rk-a56ca5": "", children: F(s, x) })
|
|
809
|
+
] }),
|
|
810
|
+
/* @__PURE__ */ e("input", { type: "range", name: "max", min: "0", max: s, step: "5", defaultValue: s, "aria-label": "Maximum price", "data-rk-a56ca5": "" }),
|
|
811
|
+
/* @__PURE__ */ n("span", { className: "filters__range-scale", "aria-hidden": "true", "data-rk-a56ca5": "", children: [
|
|
812
|
+
/* @__PURE__ */ e("span", { "data-rk-a56ca5": "", children: F(0, x) }),
|
|
813
|
+
/* @__PURE__ */ e("span", { "data-rk-a56ca5": "", children: F(s, x) })
|
|
814
|
+
] })
|
|
815
|
+
] })
|
|
816
|
+
] }),
|
|
817
|
+
c.length > 0 && /* @__PURE__ */ n("fieldset", { className: "filters__group", "data-rk-a56ca5": "", children: [
|
|
818
|
+
/* @__PURE__ */ e("legend", { "data-rk-a56ca5": "", children: "Colour" }),
|
|
819
|
+
/* @__PURE__ */ e("div", { className: "filters__swatches", "data-rk-a56ca5": "", children: c.map((d, f) => /* @__PURE__ */ n("label", { className: "filters__swatch", style: Se(`--sw: ${d.hex}`), "data-rk-a56ca5": "", children: [
|
|
820
|
+
/* @__PURE__ */ e("input", { type: "checkbox", name: "color", defaultValue: d.name.toLowerCase(), "data-rk-a56ca5": "" }),
|
|
821
|
+
/* @__PURE__ */ e("span", { className: "filters__swatch-dot", "aria-hidden": "true", "data-rk-a56ca5": "" }),
|
|
822
|
+
/* @__PURE__ */ e("span", { className: "sr-only", "data-rk-a56ca5": "", children: d.name })
|
|
823
|
+
] }, f)) })
|
|
824
|
+
] }),
|
|
825
|
+
/* @__PURE__ */ n("fieldset", { className: "filters__group", "data-rk-a56ca5": "", children: [
|
|
826
|
+
/* @__PURE__ */ e("legend", { "data-rk-a56ca5": "", children: "Rating" }),
|
|
827
|
+
[["0", "Any rating"], ["4.5", "4.5 ★ & up"], ["4", "4 ★ & up"]].map(([d, f], m) => /* @__PURE__ */ n("label", { className: "filters__check filters__check--radio", "data-rk-a56ca5": "", children: [
|
|
828
|
+
/* @__PURE__ */ e("input", { type: "radio", name: "rating", defaultValue: d, defaultChecked: m === 0, "data-rk-a56ca5": "" }),
|
|
829
|
+
/* @__PURE__ */ e("span", { className: "filters__box", "aria-hidden": "true", "data-rk-a56ca5": "" }),
|
|
830
|
+
/* @__PURE__ */ e("span", { className: "filters__label", "data-rk-a56ca5": "", children: f })
|
|
831
|
+
] }, m))
|
|
832
|
+
] }),
|
|
833
|
+
/* @__PURE__ */ n("fieldset", { className: "filters__group", "data-rk-a56ca5": "", children: [
|
|
834
|
+
/* @__PURE__ */ e("legend", { className: "sr-only", "data-rk-a56ca5": "", children: "Availability" }),
|
|
835
|
+
/* @__PURE__ */ n("label", { className: "filters__switch", "data-rk-a56ca5": "", children: [
|
|
836
|
+
/* @__PURE__ */ e("span", { "data-rk-a56ca5": "", children: "In stock only" }),
|
|
837
|
+
/* @__PURE__ */ e("input", { type: "checkbox", name: "stock", defaultValue: "in", role: "switch", "data-rk-a56ca5": "" }),
|
|
838
|
+
/* @__PURE__ */ e("span", { className: "filters__track", "aria-hidden": "true", "data-rk-a56ca5": "" })
|
|
839
|
+
] })
|
|
840
|
+
] }),
|
|
841
|
+
/* @__PURE__ */ e("button", { className: "filters__reset", type: "reset", "data-rk-a56ca5": "", children: "Clear all filters" })
|
|
842
|
+
] })
|
|
843
|
+
] }) });
|
|
844
|
+
}
|
|
845
|
+
function Ae(...t) {
|
|
846
|
+
const r = [], i = (a) => {
|
|
847
|
+
if (a) {
|
|
848
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
849
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
850
|
+
else if (typeof a == "object")
|
|
851
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
852
|
+
}
|
|
853
|
+
};
|
|
854
|
+
return t.forEach(i), r.join(" ");
|
|
855
|
+
}
|
|
856
|
+
function Ve({
|
|
857
|
+
title: t = "All products",
|
|
858
|
+
description: r,
|
|
859
|
+
total: i = 0,
|
|
860
|
+
target: a = "product-grid",
|
|
861
|
+
filtersId: s = "catalog-filters",
|
|
862
|
+
sortOptions: c = [
|
|
863
|
+
{ label: "Featured", value: "featured" },
|
|
864
|
+
{ label: "Price: low to high", value: "price-asc" },
|
|
865
|
+
{ label: "Price: high to low", value: "price-desc" },
|
|
866
|
+
{ label: "Top rated", value: "rating" },
|
|
867
|
+
{ label: "Name A–Z", value: "name" }
|
|
868
|
+
],
|
|
869
|
+
countLabel: k = "products",
|
|
870
|
+
headingLevel: p = "h1",
|
|
871
|
+
variant: v = "split",
|
|
872
|
+
className: N = ""
|
|
873
|
+
}) {
|
|
874
|
+
const b = p;
|
|
875
|
+
return /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e("div", { className: "p-toolbar-cq", "data-rk-e742d8": "", children: /* @__PURE__ */ n("div", { className: Ae(["p-toolbar", `p-toolbar--${v}`, N]), "data-rk-e742d8": "", children: [
|
|
876
|
+
/* @__PURE__ */ n("div", { className: "p-toolbar__text", "data-rk-e742d8": "", children: [
|
|
877
|
+
/* @__PURE__ */ e(b, { className: "p-toolbar__title", "data-rk-e742d8": "", children: t }),
|
|
878
|
+
r && /* @__PURE__ */ e("p", { className: "p-toolbar__desc", "data-rk-e742d8": "", children: r }),
|
|
879
|
+
/* @__PURE__ */ n("p", { className: "p-toolbar__count", "aria-live": "polite", "data-rk-e742d8": "", children: [
|
|
880
|
+
/* @__PURE__ */ e("span", { "data-result-count": a, "data-rk-e742d8": "", children: i }),
|
|
881
|
+
" ",
|
|
882
|
+
k
|
|
883
|
+
] })
|
|
884
|
+
] }),
|
|
885
|
+
/* @__PURE__ */ e("div", { className: "p-toolbar__sort", "data-rk-e742d8": "", children: /* @__PURE__ */ e(ce, { label: "Sort by", id: `${s}-sort`, name: "sort", options: c }) })
|
|
886
|
+
] }) }) });
|
|
887
|
+
}
|
|
888
|
+
function ee(...t) {
|
|
889
|
+
const r = [], i = (a) => {
|
|
890
|
+
if (a) {
|
|
891
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
892
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
893
|
+
else if (typeof a == "object")
|
|
894
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
return t.forEach(i), r.join(" ");
|
|
898
|
+
}
|
|
899
|
+
function ie(t) {
|
|
900
|
+
const r = {};
|
|
901
|
+
for (const i of String(t ?? "").split(";")) {
|
|
902
|
+
const a = i.indexOf(":");
|
|
903
|
+
if (a < 0) continue;
|
|
904
|
+
const s = i.slice(0, a).trim();
|
|
905
|
+
s && (r[s.startsWith("--") ? s : s.replace(/-([a-z])/g, (c, k) => k.toUpperCase())] = i.slice(a + 1).trim());
|
|
906
|
+
}
|
|
907
|
+
return r;
|
|
908
|
+
}
|
|
909
|
+
function Re({
|
|
910
|
+
images: t = [],
|
|
911
|
+
alt: r = "Product photo",
|
|
912
|
+
icon: i = "headphones",
|
|
913
|
+
hue: a = 38,
|
|
914
|
+
views: s = 4,
|
|
915
|
+
layout: c = "side",
|
|
916
|
+
size: k = "md",
|
|
917
|
+
className: p = ""
|
|
918
|
+
}) {
|
|
919
|
+
const v = Array.from({ length: Math.min(5, Math.max(2, s)) }, (o, d) => ({
|
|
920
|
+
hue: (a + d * 18) % 360,
|
|
921
|
+
variant: d % 2 === 0 ? "glow" : "soft",
|
|
922
|
+
turn: [0, -14, 12, -4, 20][d] ?? 0,
|
|
923
|
+
zoom: [1, 1.18, 0.92, 1.3, 1.05][d] ?? 1
|
|
924
|
+
})), N = t.length ? t.map((o, d) => ({ src: o, label: `${r} ${d + 1}` })) : v.map((o, d) => ({ ...o, label: `View ${d + 1}` })), b = k === "sm" ? "1 / 1" : k === "lg" ? "4 / 5" : "5 / 5.4", x = V(!1);
|
|
925
|
+
return R(() => {
|
|
926
|
+
x.current || (x.current = !0, document.querySelectorAll("[data-gallery]:not([data-bound])").forEach((o) => {
|
|
927
|
+
o.dataset.bound = "";
|
|
928
|
+
const d = Array.from(o.querySelectorAll("[data-slide]")), f = Array.from(o.querySelectorAll("[data-thumb]")), m = (l, h = !1) => {
|
|
929
|
+
var g;
|
|
930
|
+
d.forEach((y, w) => {
|
|
931
|
+
y.hidden = w !== l, y.classList.toggle("is-active", w === l);
|
|
932
|
+
}), f.forEach((y, w) => y.setAttribute("aria-pressed", String(w === l))), h && ((g = f[l]) == null || g.focus());
|
|
933
|
+
};
|
|
934
|
+
f.forEach((l, h) => {
|
|
935
|
+
l.addEventListener("click", () => m(h)), l.addEventListener("keydown", (g) => {
|
|
936
|
+
const y = { ArrowRight: 1, ArrowDown: 1, ArrowLeft: -1, ArrowUp: -1 };
|
|
937
|
+
g.key in y && (g.preventDefault(), m((h + y[g.key] + f.length) % f.length, !0));
|
|
938
|
+
});
|
|
939
|
+
});
|
|
940
|
+
}));
|
|
941
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e("div", { className: "p-gallery-cq", "data-rk-60f127": "", children: /* @__PURE__ */ n("div", { className: ee(["p-gallery", `p-gallery--${c}`, `p-gallery--${k}`, p]), "data-gallery": !0, "data-rk-60f127": "", children: [
|
|
942
|
+
/* @__PURE__ */ e("div", { className: "p-gallery__stage", "aria-live": "polite", "data-rk-60f127": "", children: N.map((o, d) => /* @__PURE__ */ n("div", { className: ee(["p-gallery__slide", { "is-active": d === 0 }]), "data-slide": !0, hidden: d !== 0, style: ie(o.turn !== void 0 ? `--turn: ${o.turn}deg; --zoom: ${o.zoom}` : ""), "data-rk-60f127": "", children: [
|
|
943
|
+
o.src ? /* @__PURE__ */ e(J, { image: o.src, alt: o.label, ratio: b }) : /* @__PURE__ */ e(J, { icon: i, hue: o.hue, variant: o.variant, ratio: b, size: "lg" }),
|
|
944
|
+
/* @__PURE__ */ n("span", { className: "sr-only", "data-rk-60f127": "", children: [
|
|
945
|
+
o.label,
|
|
946
|
+
" of ",
|
|
947
|
+
N.length
|
|
948
|
+
] })
|
|
949
|
+
] }, d)) }),
|
|
950
|
+
/* @__PURE__ */ e("div", { className: "p-gallery__thumbs", role: "group", "aria-label": "Product views", "data-rk-60f127": "", children: N.map((o, d) => /* @__PURE__ */ e("button", { className: ee(["p-gallery__thumb"]), type: "button", "aria-pressed": d === 0 ? "true" : "false", "aria-label": `Show ${o.label}`, "data-thumb": d, style: ie(o.turn !== void 0 ? `--turn: ${o.turn}deg; --zoom: ${o.zoom}` : ""), "data-rk-60f127": "", children: o.src ? /* @__PURE__ */ e(J, { image: o.src, alt: "", ratio: "1 / 1" }) : /* @__PURE__ */ e(J, { icon: i, hue: o.hue, variant: o.variant, ratio: "1 / 1", size: "sm" }) }, d)) })
|
|
951
|
+
] }) }) });
|
|
952
|
+
}
|
|
953
|
+
function Ee(...t) {
|
|
954
|
+
const r = [], i = (a) => {
|
|
955
|
+
if (a) {
|
|
956
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
957
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
958
|
+
else if (typeof a == "object")
|
|
959
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
960
|
+
}
|
|
961
|
+
};
|
|
962
|
+
return t.forEach(i), r.join(" ");
|
|
963
|
+
}
|
|
964
|
+
function Je({
|
|
965
|
+
product: t = {
|
|
966
|
+
slug: "aurora-headphones",
|
|
967
|
+
name: "Aurora Wireless Headphones",
|
|
968
|
+
price: 189,
|
|
969
|
+
compareAt: 229,
|
|
970
|
+
category: "audio",
|
|
971
|
+
rating: 4.8,
|
|
972
|
+
reviews: 312,
|
|
973
|
+
badge: "Bestseller",
|
|
974
|
+
badgeVariant: "warning",
|
|
975
|
+
colors: [{ name: "Graphite", hex: "#2b2b2f" }, { name: "Sand", hex: "#d8c3a5" }, { name: "Ocean", hex: "#3d6f9e" }],
|
|
976
|
+
icon: "headphones",
|
|
977
|
+
hue: 38,
|
|
978
|
+
description: "Adaptive noise cancelling, 40-hour battery and memory-foam cushions that disappear after five minutes. Tuned in-house for a warm, detailed sound.",
|
|
979
|
+
inStock: !0
|
|
980
|
+
},
|
|
981
|
+
categoryLabel: r = "Audio",
|
|
982
|
+
checkoutHref: i = "#",
|
|
983
|
+
details: a = [
|
|
984
|
+
{ title: "Features", body: "Hybrid ANC with transparency mode · Bluetooth 5.4 multipoint · USB-C fast charge (10 min = 5 h) · Foldable aluminium frame." },
|
|
985
|
+
{ title: "Shipping & returns", body: "Free standard shipping over $75, delivered in 2–4 business days. Return anything within 30 days for a full refund." },
|
|
986
|
+
{ title: "Warranty", body: "Two-year limited warranty covering manufacturing defects, with free repair or replacement." }
|
|
987
|
+
],
|
|
988
|
+
currency: s = "USD",
|
|
989
|
+
locale: c = "en-US",
|
|
990
|
+
cartKey: k = "ack-cart",
|
|
991
|
+
id: p = "buy-box",
|
|
992
|
+
variant: v = "plain",
|
|
993
|
+
size: N = "md",
|
|
994
|
+
className: b = ""
|
|
995
|
+
}) {
|
|
996
|
+
const x = { currency: s, locale: c }, o = t.inStock !== !1, d = t.compareAt ? Math.round((1 - t.price / t.compareAt) * 100) : 0, f = JSON.stringify({ id: t.slug, name: t.name, price: t.price, icon: t.icon, hue: t.hue, image: t.image }), m = `${p}-add`, l = V(!1);
|
|
997
|
+
return R(() => {
|
|
998
|
+
l.current || (l.current = !0, se(document), document.querySelectorAll("[data-buy-now]").forEach((h) => {
|
|
999
|
+
h.addEventListener("click", (g) => {
|
|
1000
|
+
const y = document.getElementById(h.dataset.buyNow || "");
|
|
1001
|
+
!y || y.disabled || (g.preventDefault(), y.dataset.openCart = "false", y.click(), window.location.href = h.href);
|
|
1002
|
+
});
|
|
1003
|
+
}));
|
|
1004
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ n("div", { className: Ee(["buy-box", `buy-box--${v}`, `buy-box--${N}`, b]), "data-rk-ed869a": "", children: [
|
|
1005
|
+
/* @__PURE__ */ n("div", { className: "buy-box__top", "data-rk-ed869a": "", children: [
|
|
1006
|
+
r && /* @__PURE__ */ e("p", { className: "buy-box__cat", "data-rk-ed869a": "", children: r }),
|
|
1007
|
+
t.badge && /* @__PURE__ */ e(oe, { variant: t.badgeVariant ?? "default", children: t.badge })
|
|
1008
|
+
] }),
|
|
1009
|
+
/* @__PURE__ */ e("h1", { className: "buy-box__title", "data-rk-ed869a": "", children: t.name }),
|
|
1010
|
+
t.rating !== void 0 && /* @__PURE__ */ e("a", { className: "buy-box__rating", href: "#reviews", "data-rk-ed869a": "", children: /* @__PURE__ */ e(te, { value: t.rating, count: t.reviews, size: "md" }) }),
|
|
1011
|
+
/* @__PURE__ */ n("p", { className: "buy-box__price", "data-rk-ed869a": "", children: [
|
|
1012
|
+
/* @__PURE__ */ e("span", { className: "buy-box__now", "data-rk-ed869a": "", children: F(t.price, x) }),
|
|
1013
|
+
t.compareAt && /* @__PURE__ */ n("s", { className: "buy-box__was", "data-rk-ed869a": "", children: [
|
|
1014
|
+
/* @__PURE__ */ e("span", { className: "sr-only", "data-rk-ed869a": "", children: "Was " }),
|
|
1015
|
+
F(t.compareAt, x)
|
|
1016
|
+
] }),
|
|
1017
|
+
d > 0 && /* @__PURE__ */ n("span", { className: "buy-box__save", "data-rk-ed869a": "", children: [
|
|
1018
|
+
"Save ",
|
|
1019
|
+
d,
|
|
1020
|
+
"%"
|
|
1021
|
+
] })
|
|
1022
|
+
] }),
|
|
1023
|
+
t.description && /* @__PURE__ */ e("p", { className: "buy-box__desc", "data-rk-ed869a": "", children: t.description }),
|
|
1024
|
+
/* @__PURE__ */ n("div", { className: "buy-box__pickers", "data-rk-ed869a": "", children: [
|
|
1025
|
+
t.colors && t.colors.length > 0 && /* @__PURE__ */ e(re, { label: "Colour", name: `${p}-color`, type: "swatch", target: m, options: t.colors.map((h) => ({ label: h.name, hex: h.hex })) }),
|
|
1026
|
+
t.sizes && t.sizes.length > 0 && /* @__PURE__ */ e(re, { label: "Size", name: `${p}-size`, type: "pill", target: m, options: t.sizes.map((h) => ({ label: h })) })
|
|
1027
|
+
] }),
|
|
1028
|
+
/* @__PURE__ */ n("div", { className: "buy-box__actions", "data-rk-ed869a": "", children: [
|
|
1029
|
+
/* @__PURE__ */ e(le, { id: `${p}-qty`, name: "qty", value: 1, min: 1, max: 10 }),
|
|
1030
|
+
/* @__PURE__ */ n("button", { className: "buy-box__add", id: m, type: "button", "data-add-to-cart": f, "data-cart-key": k, "data-qty-from": `${p}-qty`, "data-added-label": "Added to cart", disabled: !o, "data-rk-ed869a": "", children: [
|
|
1031
|
+
/* @__PURE__ */ n("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", "data-rk-ed869a": "", children: [
|
|
1032
|
+
/* @__PURE__ */ e("path", { d: "M6 7h12l-1 13H7z", "data-rk-ed869a": "" }),
|
|
1033
|
+
/* @__PURE__ */ e("path", { d: "M9 7V6a3 3 0 0 1 6 0v1", "data-rk-ed869a": "" })
|
|
1034
|
+
] }),
|
|
1035
|
+
/* @__PURE__ */ e("span", { "data-label": !0, "data-rk-ed869a": "", children: o ? "Add to cart" : "Sold out" })
|
|
1036
|
+
] })
|
|
1037
|
+
] }),
|
|
1038
|
+
o && /* @__PURE__ */ e("a", { className: "buy-box__buy", href: i, "data-buy-now": m, "data-rk-ed869a": "", children: "Buy now" }),
|
|
1039
|
+
o && t.stock !== void 0 && t.stock <= 5 ? /* @__PURE__ */ e(he, { stock: t.stock, viewers: 8 + (t.reviews ?? 0) % 17 }) : /* @__PURE__ */ n("p", { className: "buy-box__stock", "data-in": o ? "" : void 0, "data-rk-ed869a": "", children: [
|
|
1040
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", "data-rk-ed869a": "" }),
|
|
1041
|
+
o ? "In stock — ships in 24 hours" : "Out of stock — back soon"
|
|
1042
|
+
] }),
|
|
1043
|
+
/* @__PURE__ */ e(Ne, { variant: "inline", size: "sm", items: [
|
|
1044
|
+
{ icon: "truck", title: "Free shipping", text: "Over $75" },
|
|
1045
|
+
{ icon: "return", title: "30-day returns", text: "Free & easy" }
|
|
1046
|
+
] }),
|
|
1047
|
+
a.length > 0 && /* @__PURE__ */ e("div", { className: "buy-box__details", "data-rk-ed869a": "", children: a.map((h, g) => /* @__PURE__ */ n("details", { open: g === 0, "data-rk-ed869a": "", children: [
|
|
1048
|
+
/* @__PURE__ */ e("summary", { "data-rk-ed869a": "", children: h.title }),
|
|
1049
|
+
/* @__PURE__ */ e("p", { "data-rk-ed869a": "", children: h.body })
|
|
1050
|
+
] }, g)) })
|
|
1051
|
+
] }) });
|
|
1052
|
+
}
|
|
1053
|
+
function Le(...t) {
|
|
1054
|
+
const r = [], i = (a) => {
|
|
1055
|
+
if (a) {
|
|
1056
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
1057
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
1058
|
+
else if (typeof a == "object")
|
|
1059
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
1060
|
+
}
|
|
1061
|
+
};
|
|
1062
|
+
return t.forEach(i), r.join(" ");
|
|
1063
|
+
}
|
|
1064
|
+
function $e(t) {
|
|
1065
|
+
const r = {};
|
|
1066
|
+
for (const i of String(t ?? "").split(";")) {
|
|
1067
|
+
const a = i.indexOf(":");
|
|
1068
|
+
if (a < 0) continue;
|
|
1069
|
+
const s = i.slice(0, a).trim();
|
|
1070
|
+
s && (r[s.startsWith("--") ? s : s.replace(/-([a-z])/g, (c, k) => k.toUpperCase())] = i.slice(a + 1).trim());
|
|
1071
|
+
}
|
|
1072
|
+
return r;
|
|
1073
|
+
}
|
|
1074
|
+
function Ge({
|
|
1075
|
+
items: t = [
|
|
1076
|
+
{ name: "Lucía", city: "Madrid", product: "Aurora Wireless Headphones", icon: "headphones", hue: 38, ago: "2 min ago" },
|
|
1077
|
+
{ name: "Tom", city: "Berlin", product: "Trail 24L Backpack", icon: "backpack", hue: 150, ago: "6 min ago" },
|
|
1078
|
+
{ name: "Aiko", city: "Osaka", product: "Orbit Smart Watch", icon: "watch", hue: 205, ago: "11 min ago" }
|
|
1079
|
+
],
|
|
1080
|
+
verb: r = "just bought",
|
|
1081
|
+
interval: i = 9e3,
|
|
1082
|
+
visibleFor: a = 5e3,
|
|
1083
|
+
delay: s = 4e3,
|
|
1084
|
+
position: c = "bottom-left",
|
|
1085
|
+
storageKey: k = "ack-activity-off",
|
|
1086
|
+
demo: p = !1,
|
|
1087
|
+
variant: v = "glass",
|
|
1088
|
+
className: N = ""
|
|
1089
|
+
}) {
|
|
1090
|
+
const b = t[0], x = V(!1);
|
|
1091
|
+
return R(() => {
|
|
1092
|
+
x.current || (x.current = !0, document.querySelectorAll("[data-live-activity]:not([data-bound])").forEach((o) => {
|
|
1093
|
+
var C;
|
|
1094
|
+
o.dataset.bound = "";
|
|
1095
|
+
const d = o.dataset.key || "ack-activity-off";
|
|
1096
|
+
try {
|
|
1097
|
+
if (window.sessionStorage.getItem(d)) return;
|
|
1098
|
+
} catch {
|
|
1099
|
+
}
|
|
1100
|
+
let f = [];
|
|
1101
|
+
try {
|
|
1102
|
+
f = JSON.parse(o.dataset.liveActivity || "[]");
|
|
1103
|
+
} catch {
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
if (!f.length) return;
|
|
1107
|
+
const m = (B) => o.querySelector(B), l = m("[data-media]"), h = m("[data-link]"), g = o.dataset.verb || "just bought", y = Number(o.dataset.interval) || 9e3, w = Number(o.dataset.visible) || 5e3;
|
|
1108
|
+
let A = 0, S = !1, $ = !1, j = 0;
|
|
1109
|
+
function _(B) {
|
|
1110
|
+
m("[data-who]").textContent = B.name, m("[data-city]").textContent = `in ${B.city}`, m("[data-product]").textContent = B.product, m("[data-ago]").textContent = B.ago, h && (h.href = B.href || "#"), l && (l.style.setProperty("--h", String(B.hue ?? 40)), l.innerHTML = `<svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round" stroke-linejoin="round">${ae(B.icon)}</svg>`);
|
|
1111
|
+
const M = m(".live-activity__line");
|
|
1112
|
+
M && M.lastChild && (M.lastChild.textContent = ` ${g}`);
|
|
1113
|
+
}
|
|
1114
|
+
function E() {
|
|
1115
|
+
if (!$) {
|
|
1116
|
+
if (S || document.hidden) {
|
|
1117
|
+
window.setTimeout(E, 1500);
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
_(f[A % f.length]), A++, o.hidden = !1, requestAnimationFrame(() => o.classList.add("is-visible")), j = window.setTimeout(L, w);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
function L() {
|
|
1124
|
+
if (S) {
|
|
1125
|
+
j = window.setTimeout(L, 1e3);
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1128
|
+
o.classList.remove("is-visible"), window.setTimeout(() => {
|
|
1129
|
+
o.hidden = !0;
|
|
1130
|
+
}, 300), window.setTimeout(E, Math.max(1e3, y - w));
|
|
1131
|
+
}
|
|
1132
|
+
o.addEventListener("mouseenter", () => {
|
|
1133
|
+
S = !0;
|
|
1134
|
+
}), o.addEventListener("mouseleave", () => {
|
|
1135
|
+
S = !1;
|
|
1136
|
+
}), o.addEventListener("focusin", () => {
|
|
1137
|
+
S = !0;
|
|
1138
|
+
}), o.addEventListener("focusout", () => {
|
|
1139
|
+
S = !1;
|
|
1140
|
+
}), (C = m("[data-close]")) == null || C.addEventListener("click", () => {
|
|
1141
|
+
$ = !0, window.clearTimeout(j), o.classList.remove("is-visible"), o.hidden = !0;
|
|
1142
|
+
try {
|
|
1143
|
+
window.sessionStorage.setItem(d, "1");
|
|
1144
|
+
} catch {
|
|
1145
|
+
}
|
|
1146
|
+
}), window.setTimeout(E, Number(o.dataset.delay) || 4e3);
|
|
1147
|
+
}));
|
|
1148
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e("div", { className: Le(["live-activity", `live-activity--${c}`, `live-activity--${v}`, { "live-activity--demo is-visible": p }, N]), "aria-live": "off", "data-live-activity": p ? void 0 : JSON.stringify(t), "data-verb": r, "data-interval": i, "data-visible": a, "data-delay": s, "data-key": k, hidden: !p, "data-rk-3695c2": "", children: b && /* @__PURE__ */ n(U, { children: [
|
|
1149
|
+
/* @__PURE__ */ e("span", { className: "live-activity__media", style: $e(`--h: ${b.hue ?? 40}`), "aria-hidden": "true", "data-media": !0, "data-rk-3695c2": "", children: /* @__PURE__ */ e("svg", { viewBox: "0 0 64 64", fill: "none", stroke: "currentColor", strokeWidth: "2.6", strokeLinecap: "round", strokeLinejoin: "round", "data-rk-3695c2": "", children: /* @__PURE__ */ e("g", { dangerouslySetInnerHTML: { __html: ae(b.icon) }, "data-rk-3695c2": "" }) }) }),
|
|
1150
|
+
/* @__PURE__ */ n("a", { className: "live-activity__body", href: b.href ?? "#", "data-link": !0, "data-rk-3695c2": "", children: [
|
|
1151
|
+
/* @__PURE__ */ n("span", { className: "live-activity__line", "data-rk-3695c2": "", children: [
|
|
1152
|
+
/* @__PURE__ */ e("strong", { "data-who": !0, "data-rk-3695c2": "", children: b.name }),
|
|
1153
|
+
" ",
|
|
1154
|
+
/* @__PURE__ */ n("span", { "data-city": !0, "data-rk-3695c2": "", children: [
|
|
1155
|
+
"in ",
|
|
1156
|
+
b.city
|
|
1157
|
+
] }),
|
|
1158
|
+
" ",
|
|
1159
|
+
r
|
|
1160
|
+
] }),
|
|
1161
|
+
/* @__PURE__ */ e("span", { className: "live-activity__product", "data-product": !0, "data-rk-3695c2": "", children: b.product }),
|
|
1162
|
+
/* @__PURE__ */ n("span", { className: "live-activity__ago", "data-rk-3695c2": "", children: [
|
|
1163
|
+
/* @__PURE__ */ e("span", { className: "live-activity__dot", "aria-hidden": "true", "data-rk-3695c2": "" }),
|
|
1164
|
+
/* @__PURE__ */ e("span", { "data-ago": !0, "data-rk-3695c2": "", children: b.ago }),
|
|
1165
|
+
" · Verified"
|
|
1166
|
+
] })
|
|
1167
|
+
] }),
|
|
1168
|
+
/* @__PURE__ */ e("button", { className: "live-activity__close", type: "button", "aria-label": "Stop showing purchase notifications", "data-close": !0, "data-rk-3695c2": "", children: "×" })
|
|
1169
|
+
] }) }) });
|
|
1170
|
+
}
|
|
1171
|
+
function Ce(...t) {
|
|
1172
|
+
const r = [], i = (a) => {
|
|
1173
|
+
if (a) {
|
|
1174
|
+
if (typeof a == "string" || typeof a == "number") r.push(String(a));
|
|
1175
|
+
else if (Array.isArray(a)) a.forEach(i);
|
|
1176
|
+
else if (typeof a == "object")
|
|
1177
|
+
for (const [s, c] of Object.entries(a)) c && r.push(s);
|
|
1178
|
+
}
|
|
1179
|
+
};
|
|
1180
|
+
return t.forEach(i), r.join(" ");
|
|
1181
|
+
}
|
|
1182
|
+
function Ye({
|
|
1183
|
+
endsAt: t,
|
|
1184
|
+
hours: r = 48,
|
|
1185
|
+
eyebrow: i = "Flash sale",
|
|
1186
|
+
title: a = "Up to 30% off the Storm collection",
|
|
1187
|
+
text: s = "Waterproof shells, insulated layers and accessories. While stock lasts.",
|
|
1188
|
+
cta: c = { label: "Shop the sale", href: "#" },
|
|
1189
|
+
endedText: k = "This offer has ended — new deals every Friday.",
|
|
1190
|
+
storageKey: p = "ack-countdown",
|
|
1191
|
+
variant: v = "glow",
|
|
1192
|
+
size: N = "md",
|
|
1193
|
+
className: b = ""
|
|
1194
|
+
}) {
|
|
1195
|
+
const x = [
|
|
1196
|
+
{ key: "d", label: "Days" },
|
|
1197
|
+
{ key: "h", label: "Hours" },
|
|
1198
|
+
{ key: "m", label: "Minutes" },
|
|
1199
|
+
{ key: "s", label: "Seconds" }
|
|
1200
|
+
], o = V(!1);
|
|
1201
|
+
return R(() => {
|
|
1202
|
+
o.current || (o.current = !0, document.querySelectorAll("[data-countdown]:not([data-bound])").forEach((d) => {
|
|
1203
|
+
d.dataset.bound = "";
|
|
1204
|
+
let f = d.dataset.ends ? Date.parse(d.dataset.ends) : NaN;
|
|
1205
|
+
if (Number.isNaN(f)) {
|
|
1206
|
+
const $ = d.dataset.key || "ack-countdown", j = (Number(d.dataset.hours) || 48) * 36e5;
|
|
1207
|
+
try {
|
|
1208
|
+
const _ = Number(window.localStorage.getItem($));
|
|
1209
|
+
f = _ && _ > Date.now() ? _ : Date.now() + j, window.localStorage.setItem($, String(f));
|
|
1210
|
+
} catch {
|
|
1211
|
+
f = Date.now() + j;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
const m = Object.fromEntries(Array.from(d.querySelectorAll("[data-unit]")).map(($) => [$.dataset.unit, $])), l = d.querySelector("[data-sr]"), h = d.querySelector("[data-ended]"), g = d.querySelector("[data-clock]");
|
|
1215
|
+
let y = -1, w = 0;
|
|
1216
|
+
const A = ($) => String($).padStart(2, "0");
|
|
1217
|
+
function S() {
|
|
1218
|
+
const $ = Math.max(0, f - Date.now()), j = Math.floor($ / 1e3), _ = { d: Math.floor(j / 86400), h: Math.floor(j % 86400 / 3600), m: Math.floor(j % 3600 / 60), s: j % 60 };
|
|
1219
|
+
Object.keys(_).forEach((L) => {
|
|
1220
|
+
const C = m[L], B = A(_[L]);
|
|
1221
|
+
C && C.textContent !== B && (C.textContent = B, C.classList.remove("is-tick"), C.offsetWidth, C.classList.add("is-tick"));
|
|
1222
|
+
});
|
|
1223
|
+
const E = Math.floor(j / 60);
|
|
1224
|
+
l && E !== y && (y = E, l.textContent = `Offer ends in ${_.d} days, ${_.h} hours and ${_.m} minutes.`), $ === 0 && (window.clearInterval(w), d.classList.add("is-ended"), h && (h.hidden = !1), g && (g.hidden = !0), l && (l.textContent = (h == null ? void 0 : h.textContent) || "Offer ended."));
|
|
1225
|
+
}
|
|
1226
|
+
S(), w = window.setInterval(S, 1e3);
|
|
1227
|
+
}));
|
|
1228
|
+
}, []), /* @__PURE__ */ e(U, { children: /* @__PURE__ */ e("section", { className: Ce(["countdown", `countdown--${v}`, `countdown--${N}`, b]), "data-countdown": !0, "data-ends": t, "data-hours": r, "data-key": p, "aria-label": a, "data-rk-a26cb5": "", children: /* @__PURE__ */ n("div", { className: "countdown__inner", "data-rk-a26cb5": "", children: [
|
|
1229
|
+
/* @__PURE__ */ n("div", { className: "countdown__copy", "data-rk-a26cb5": "", children: [
|
|
1230
|
+
i && /* @__PURE__ */ n("p", { className: "countdown__eyebrow", "data-rk-a26cb5": "", children: [
|
|
1231
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", "data-rk-a26cb5": "" }),
|
|
1232
|
+
i
|
|
1233
|
+
] }),
|
|
1234
|
+
/* @__PURE__ */ e("h2", { className: "countdown__title", "data-rk-a26cb5": "", children: a }),
|
|
1235
|
+
s && /* @__PURE__ */ e("p", { className: "countdown__text", "data-live-text": !0, "data-rk-a26cb5": "", children: s }),
|
|
1236
|
+
/* @__PURE__ */ e("p", { className: "countdown__ended", "data-ended": !0, hidden: !0, "data-rk-a26cb5": "", children: k })
|
|
1237
|
+
] }),
|
|
1238
|
+
/* @__PURE__ */ n("div", { className: "countdown__side", "data-rk-a26cb5": "", children: [
|
|
1239
|
+
/* @__PURE__ */ e("div", { className: "countdown__clock", "aria-hidden": "true", "data-clock": !0, "data-rk-a26cb5": "", children: x.map((d, f) => /* @__PURE__ */ n("div", { className: "countdown__unit", "data-rk-a26cb5": "", children: [
|
|
1240
|
+
/* @__PURE__ */ e("span", { className: "countdown__num", "data-unit": d.key, "data-rk-a26cb5": "", children: "00" }),
|
|
1241
|
+
/* @__PURE__ */ e("span", { className: "countdown__label", "data-rk-a26cb5": "", children: d.label })
|
|
1242
|
+
] }, f)) }),
|
|
1243
|
+
/* @__PURE__ */ e("p", { className: "sr-only", "aria-live": "polite", "data-sr": !0, "data-rk-a26cb5": "" }),
|
|
1244
|
+
c && /* @__PURE__ */ e("a", { className: "countdown__cta", href: c.href, "data-rk-a26cb5": "", children: c.label })
|
|
1245
|
+
] })
|
|
1246
|
+
] }) }) });
|
|
1247
|
+
}
|
|
1248
|
+
export {
|
|
1249
|
+
De as C,
|
|
1250
|
+
Pe as F,
|
|
1251
|
+
Ge as L,
|
|
1252
|
+
Je as P,
|
|
1253
|
+
Ue as S,
|
|
1254
|
+
Ne as T,
|
|
1255
|
+
Fe as a,
|
|
1256
|
+
Ye as b,
|
|
1257
|
+
Re as c,
|
|
1258
|
+
ze as d,
|
|
1259
|
+
Ve as e,
|
|
1260
|
+
Ie as f,
|
|
1261
|
+
He as g,
|
|
1262
|
+
me as h
|
|
1263
|
+
};
|