@szymonpiatek/designsystem 0.0.7 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -27,10 +27,14 @@ import ImageIcon from '@mui/icons-material/Image';
27
27
  import ArticleIcon from '@mui/icons-material/Article';
28
28
  import CheckCircleOutlinedIcon from '@mui/icons-material/CheckCircleOutlined';
29
29
  import HighlightOffIcon from '@mui/icons-material/HighlightOff';
30
+ import ContentCopyIcon from '@mui/icons-material/ContentCopy';
31
+ import LocalOfferIcon from '@mui/icons-material/LocalOffer';
30
32
  import CreditCardOutlinedIcon from '@mui/icons-material/CreditCardOutlined';
31
33
  import LocalShippingOutlinedIcon from '@mui/icons-material/LocalShippingOutlined';
32
34
  import GridViewIcon from '@mui/icons-material/GridView';
33
35
  import ViewListIcon from '@mui/icons-material/ViewList';
36
+ import ThumbUpOutlinedIcon from '@mui/icons-material/ThumbUpOutlined';
37
+ import ReplyIcon from '@mui/icons-material/Reply';
34
38
  import { createPortal } from 'react-dom';
35
39
  import KeyboardDoubleArrowLeftIcon from '@mui/icons-material/KeyboardDoubleArrowLeft';
36
40
  import KeyboardDoubleArrowRightIcon from '@mui/icons-material/KeyboardDoubleArrowRight';
@@ -39,7 +43,6 @@ import WarningAmberOutlinedIcon from '@mui/icons-material/WarningAmberOutlined';
39
43
  import ErrorOutlineOutlinedIcon from '@mui/icons-material/ErrorOutlineOutlined';
40
44
  import InboxOutlinedIcon from '@mui/icons-material/InboxOutlined';
41
45
  import VerifiedIcon from '@mui/icons-material/Verified';
42
- import ThumbUpOutlinedIcon from '@mui/icons-material/ThumbUpOutlined';
43
46
  import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
44
47
  import MenuIcon from '@mui/icons-material/Menu';
45
48
 
@@ -3324,6 +3327,19 @@ var COUNTRIES = countries_default.countries.map((c) => {
3324
3327
  };
3325
3328
  }).sort((a, b) => a.country.localeCompare(b.country, "pl"));
3326
3329
  var DEFAULT_COUNTRY = COUNTRIES.find((c) => c.flagCode === "US") ?? COUNTRIES[0];
3330
+ var COUNTRIES_BY_DIAL_CODE_LENGTH = [...COUNTRIES].sort(
3331
+ (a, b) => b.dialCode.length - a.dialCode.length
3332
+ );
3333
+ var parsePhoneValue = (full) => {
3334
+ if (full.startsWith("+")) {
3335
+ for (const c of COUNTRIES_BY_DIAL_CODE_LENGTH) {
3336
+ if (full.startsWith(c.dialCode)) {
3337
+ return { country: c, localDigits: full.slice(c.dialCode.length).replace(/\D/g, "") };
3338
+ }
3339
+ }
3340
+ }
3341
+ return { country: DEFAULT_COUNTRY, localDigits: full.replace(/\D/g, "") };
3342
+ };
3327
3343
  var wrapperColors = (theme, error, focused) => ({
3328
3344
  borderColor: focused ? error ? theme.palette.error.main : theme.palette.primary.main : error ? theme.palette.error.main : theme.palette.divider,
3329
3345
  boxShadow: focused ? `0 0 0 3px ${error ? theme.palette.error.main : theme.palette.primary.main}33` : "none",
@@ -3511,13 +3527,24 @@ var PhoneInput = forwardRef(
3511
3527
  () => COUNTRIES.find((c) => c.flagCode === defaultCountry) ?? DEFAULT_COUNTRY,
3512
3528
  [defaultCountry]
3513
3529
  );
3514
- const [selectedCountry, setSelectedCountry] = useState(initialCountry);
3530
+ const [selectedCountry, setSelectedCountry] = useState(() => {
3531
+ if (defaultValue?.startsWith("+")) return parsePhoneValue(defaultValue).country;
3532
+ return initialCountry;
3533
+ });
3515
3534
  const [isOpen, setIsOpen] = useState(false);
3516
3535
  const [searchQuery, setSearchQuery] = useState("");
3517
3536
  const [focused, setFocused] = useState(false);
3518
3537
  const isControlled = value !== void 0;
3519
- const [internalValue, setInternalValue] = useState(defaultValue);
3520
- const phoneValue = isControlled ? value : internalValue;
3538
+ const [internalDigits, setInternalDigits] = useState(() => {
3539
+ if (defaultValue?.startsWith("+")) return parsePhoneValue(defaultValue).localDigits;
3540
+ return defaultValue ?? "";
3541
+ });
3542
+ const parsedControlled = useMemo(() => {
3543
+ if (!isControlled || typeof value !== "string" || !value.startsWith("+")) return null;
3544
+ return parsePhoneValue(value);
3545
+ }, [isControlled, value]);
3546
+ const activeCountry = parsedControlled?.country ?? selectedCountry;
3547
+ const inputDisplayValue = isControlled ? parsedControlled?.localDigits ?? (typeof value === "string" ? value : "") ?? "" : internalDigits;
3521
3548
  const rootRef = useRef(null);
3522
3549
  const searchRef = useRef(null);
3523
3550
  const filteredCountries = useMemo(() => {
@@ -3542,21 +3569,29 @@ var PhoneInput = forwardRef(
3542
3569
  setSelectedCountry(country);
3543
3570
  onCountryChange?.(country);
3544
3571
  close();
3545
- if (!isControlled) setInternalValue("");
3546
- onChange?.("", { country, dialCode: country.dialCode, fullNumber: country.dialCode });
3572
+ if (!isControlled) setInternalDigits("");
3573
+ onChange?.(country.dialCode, { country, dialCode: country.dialCode, fullNumber: country.dialCode });
3547
3574
  };
3548
3575
  const handlePhoneChange = (e) => {
3549
- const raw = e.target.value.replace(/\D/g, "");
3550
- const clamped = raw.slice(0, selectedCountry.maxLength);
3551
- if (!isControlled) setInternalValue(clamped);
3552
- onChange?.(clamped, {
3553
- country: selectedCountry,
3554
- dialCode: selectedCountry.dialCode,
3555
- fullNumber: selectedCountry.dialCode + clamped
3556
- });
3576
+ const raw = e.target.value;
3577
+ if (raw.startsWith("+")) {
3578
+ const { country, localDigits } = parsePhoneValue(raw);
3579
+ const clamped = localDigits.slice(0, country.maxLength);
3580
+ setSelectedCountry(country);
3581
+ onCountryChange?.(country);
3582
+ if (!isControlled) setInternalDigits(clamped);
3583
+ const full = country.dialCode + clamped;
3584
+ onChange?.(full, { country, dialCode: country.dialCode, fullNumber: full });
3585
+ } else {
3586
+ const clamped = raw.replace(/\D/g, "").slice(0, activeCountry.maxLength);
3587
+ if (!isControlled) setInternalDigits(clamped);
3588
+ const full = activeCountry.dialCode + clamped;
3589
+ onChange?.(full, { country: activeCountry, dialCode: activeCountry.dialCode, fullNumber: full });
3590
+ }
3557
3591
  };
3558
3592
  const handlePhoneKeyDown = (e) => {
3559
3593
  if (e.ctrlKey || e.metaKey || e.altKey || e.key.length > 1) return;
3594
+ if (e.key === "+" && e.target.value === "") return;
3560
3595
  if (!/^\d$/.test(e.key)) e.preventDefault();
3561
3596
  };
3562
3597
  useEffect(() => {
@@ -3567,7 +3602,7 @@ var PhoneInput = forwardRef(
3567
3602
  document.addEventListener("mousedown", handler);
3568
3603
  return () => document.removeEventListener("mousedown", handler);
3569
3604
  }, [isOpen, close]);
3570
- const derivedPlaceholder = placeholder ?? (selectedCountry.minLength === selectedCountry.maxLength ? `${selectedCountry.maxLength} ${digitsLabel}` : `${selectedCountry.minLength}\u2013${selectedCountry.maxLength} ${digitsLabel}`);
3605
+ const derivedPlaceholder = placeholder ?? (activeCountry.minLength === activeCountry.maxLength ? `${activeCountry.maxLength} ${digitsLabel}` : `${activeCountry.minLength}\u2013${activeCountry.maxLength} ${digitsLabel}`);
3571
3606
  return /* @__PURE__ */ jsxs(Root8, { $fullWidth: fullWidth, ref: rootRef, children: [
3572
3607
  label && /* @__PURE__ */ jsx(Label, { htmlFor: inputId, error, size, children: label }),
3573
3608
  /* @__PURE__ */ jsxs(
@@ -3589,14 +3624,14 @@ var PhoneInput = forwardRef(
3589
3624
  "aria-haspopup": "listbox",
3590
3625
  "aria-expanded": isOpen,
3591
3626
  "aria-controls": isOpen ? listboxId : void 0,
3592
- "aria-label": countrySelectAriaLabel(selectedCountry.country, selectedCountry.dialCode),
3627
+ "aria-label": countrySelectAriaLabel(activeCountry.country, activeCountry.dialCode),
3593
3628
  onClick: openDropdown,
3594
3629
  onKeyDown: (e) => e.key === "Escape" && close(),
3595
3630
  onFocus: () => setFocused(true),
3596
3631
  onBlur: () => setFocused(false),
3597
3632
  children: [
3598
- /* @__PURE__ */ jsx(CountryFlag, { countryCode: selectedCountry.flagCode, size }),
3599
- /* @__PURE__ */ jsx(DialCode, { children: selectedCountry.dialCode }),
3633
+ /* @__PURE__ */ jsx(CountryFlag, { countryCode: activeCountry.flagCode, size }),
3634
+ /* @__PURE__ */ jsx(DialCode, { children: activeCountry.dialCode }),
3600
3635
  /* @__PURE__ */ jsx(ChevronIcon, { $open: isOpen, children: /* @__PURE__ */ jsx(Chevron, {}) })
3601
3636
  ]
3602
3637
  }
@@ -3610,14 +3645,14 @@ var PhoneInput = forwardRef(
3610
3645
  $size: size,
3611
3646
  type: "tel",
3612
3647
  inputMode: "numeric",
3613
- value: phoneValue,
3648
+ value: inputDisplayValue,
3614
3649
  onChange: handlePhoneChange,
3615
3650
  onKeyDown: handlePhoneKeyDown,
3616
3651
  onFocus: () => setFocused(true),
3617
3652
  onBlur: () => setFocused(false),
3618
3653
  disabled,
3619
3654
  placeholder: derivedPlaceholder,
3620
- maxLength: selectedCountry.maxLength,
3655
+ maxLength: activeCountry.maxLength,
3621
3656
  "aria-label": label ? void 0 : phoneAriaLabel
3622
3657
  }
3623
3658
  ),
@@ -3634,26 +3669,23 @@ var PhoneInput = forwardRef(
3634
3669
  "aria-label": countrySearchAriaLabel
3635
3670
  }
3636
3671
  ) }),
3637
- /* @__PURE__ */ jsx(OptionList, { children: filteredCountries.length === 0 ? /* @__PURE__ */ jsx(EmptyMessage, { children: "Nie znaleziono kraju" }) : filteredCountries.map((country) => {
3638
- const isSelected = country.flagCode === selectedCountry.flagCode;
3639
- return /* @__PURE__ */ jsxs(
3640
- OptionItem2,
3641
- {
3642
- role: "option",
3643
- "aria-selected": isSelected,
3644
- $selected: isSelected,
3645
- onClick: () => selectCountry(country),
3646
- onKeyDown: (e) => e.key === "Enter" && selectCountry(country),
3647
- tabIndex: 0,
3648
- children: [
3649
- /* @__PURE__ */ jsx(CountryFlag, { countryCode: country.flagCode, size: "sm" }),
3650
- /* @__PURE__ */ jsx(CountryName, { children: country.country }),
3651
- /* @__PURE__ */ jsx(OptionDialCode, { children: country.dialCode })
3652
- ]
3653
- },
3654
- country.flagCode
3655
- );
3656
- }) })
3672
+ /* @__PURE__ */ jsx(OptionList, { children: filteredCountries.length === 0 ? /* @__PURE__ */ jsx(EmptyMessage, { children: "Nie znaleziono kraju" }) : filteredCountries.map((country) => /* @__PURE__ */ jsxs(
3673
+ OptionItem2,
3674
+ {
3675
+ role: "option",
3676
+ "aria-selected": country.flagCode === activeCountry.flagCode,
3677
+ $selected: country.flagCode === activeCountry.flagCode,
3678
+ onClick: () => selectCountry(country),
3679
+ onKeyDown: (e) => e.key === "Enter" && selectCountry(country),
3680
+ tabIndex: 0,
3681
+ children: [
3682
+ /* @__PURE__ */ jsx(CountryFlag, { countryCode: country.flagCode, size: "sm" }),
3683
+ /* @__PURE__ */ jsx(CountryName, { children: country.country }),
3684
+ /* @__PURE__ */ jsx(OptionDialCode, { children: country.dialCode })
3685
+ ]
3686
+ },
3687
+ country.flagCode
3688
+ )) })
3657
3689
  ] })
3658
3690
  ]
3659
3691
  }
@@ -4788,55 +4820,51 @@ var cardVariants = [
4788
4820
  ];
4789
4821
  var cardPaddings = ["none", "sm", "md", "lg", "xl"];
4790
4822
  var cardRoundeds = ["none", "sm", "md", "lg", "full"];
4791
- function getVariantStyles2(variant, theme) {
4792
- const primary = theme.palette.primary.main;
4793
- const secondary = theme.palette.secondary.main;
4794
- const error = theme.palette.error.main;
4795
- switch (variant) {
4796
- case "default":
4797
- return {
4798
- backgroundColor: `${primary}26`,
4799
- color: primary,
4800
- border: "1px solid transparent"
4801
- };
4802
- case "secondary":
4803
- return {
4804
- backgroundColor: `${secondary}26`,
4805
- color: secondary,
4806
- border: "1px solid transparent"
4807
- };
4808
- case "outline":
4809
- return {
4810
- backgroundColor: "transparent",
4811
- border: `1px solid ${theme.palette.divider}`,
4812
- color: theme.palette.text.primary
4813
- };
4814
- case "destructive":
4815
- return {
4816
- backgroundColor: `${error}26`,
4817
- color: error,
4818
- border: "1px solid transparent"
4819
- };
4820
- case "success":
4821
- return {
4822
- backgroundColor: "rgba(34,197,94,0.15)",
4823
- color: theme.palette.mode === "dark" ? "rgb(134,239,172)" : "rgb(22,163,74)",
4824
- border: "1px solid transparent"
4825
- };
4826
- case "ghost":
4827
- return {
4828
- backgroundColor: "rgba(255,255,255,0.15)",
4829
- color: theme.palette.common.white,
4830
- border: "1px solid rgba(255,255,255,0.4)"
4831
- };
4832
- case "promo":
4833
- return {
4834
- backgroundColor: theme.palette.mode === "dark" ? "rgb(22,163,74)" : "rgb(22,163,74)",
4835
- color: "#ffffff",
4836
- border: "1px solid transparent"
4837
- };
4838
- }
4839
- }
4823
+
4824
+ // src/components/atoms/badges/Badge/Badge.variants.ts
4825
+ var variantStyles2 = {
4826
+ default: (theme) => ({
4827
+ backgroundColor: theme.palette.primary.main,
4828
+ color: "#fff",
4829
+ border: "1px solid transparent"
4830
+ }),
4831
+ secondary: (theme) => ({
4832
+ backgroundColor: theme.palette.secondary.main,
4833
+ color: "#fff",
4834
+ border: "1px solid transparent"
4835
+ }),
4836
+ outline: (theme) => ({
4837
+ backgroundColor: "transparent",
4838
+ border: `1px solid ${theme.palette.divider}`,
4839
+ color: theme.palette.text.primary
4840
+ }),
4841
+ destructive: (theme) => ({
4842
+ backgroundColor: theme.palette.error.main,
4843
+ color: "#fff",
4844
+ border: "1px solid transparent"
4845
+ }),
4846
+ success: (theme) => ({
4847
+ backgroundColor: theme.palette.success.main,
4848
+ color: "#fff",
4849
+ border: "1px solid transparent"
4850
+ }),
4851
+ ghost: (theme) => ({
4852
+ backgroundColor: "rgba(255,255,255,0.15)",
4853
+ color: theme.palette.common.white,
4854
+ border: "1px solid rgba(255,255,255,0.4)"
4855
+ }),
4856
+ warning: (theme) => ({
4857
+ backgroundColor: theme.palette.warning.main,
4858
+ color: "#fff",
4859
+ border: "1px solid transparent"
4860
+ }),
4861
+ promo: (theme) => ({
4862
+ backgroundColor: theme.palette.success.main,
4863
+ color: "#fff",
4864
+ border: "1px solid transparent"
4865
+ })
4866
+ };
4867
+ var badgeVariants = Object.keys(variantStyles2);
4840
4868
  var StyledBadge = styled("span", {
4841
4869
  shouldForwardProp: (prop) => prop !== "$variant"
4842
4870
  })(({ theme, $variant }) => ({
@@ -4847,54 +4875,11 @@ var StyledBadge = styled("span", {
4847
4875
  fontWeight: 500,
4848
4876
  lineHeight: 1,
4849
4877
  fontFamily: theme.typography.fontFamily,
4850
- ...getVariantStyles2($variant, theme)
4878
+ ...variantStyles2[$variant](theme)
4851
4879
  }));
4852
4880
  function Badge2({ variant = "default", ...props }) {
4853
4881
  return /* @__PURE__ */ jsx(StyledBadge, { $variant: variant, ...props });
4854
4882
  }
4855
- var badgeVariants = [
4856
- "default",
4857
- "secondary",
4858
- "outline",
4859
- "destructive",
4860
- "success",
4861
- "ghost",
4862
- "promo"
4863
- ];
4864
- function getBgColor(variant) {
4865
- switch (variant) {
4866
- case "flash":
4867
- return "#f59e0b";
4868
- case "new":
4869
- return "#3b82f6";
4870
- case "hot":
4871
- return "#ef4444";
4872
- default:
4873
- return "#16a34a";
4874
- }
4875
- }
4876
- var Root12 = styled("span", {
4877
- shouldForwardProp: (prop) => prop !== "$variant"
4878
- })(({ theme, $variant }) => ({
4879
- display: "inline-flex",
4880
- alignItems: "center",
4881
- gap: "0.25rem",
4882
- borderRadius: "0.375rem",
4883
- padding: "0.25rem 0.625rem",
4884
- fontSize: "0.75rem",
4885
- fontWeight: 700,
4886
- lineHeight: 1,
4887
- letterSpacing: "0.02em",
4888
- fontFamily: theme.typography.fontFamily,
4889
- backgroundColor: getBgColor($variant),
4890
- color: "#ffffff",
4891
- textTransform: "uppercase"
4892
- }));
4893
- function SaleBadge({ discount, label, variant = "default", ...props }) {
4894
- const text = label ?? (discount !== void 0 ? `-${discount}%` : "SALE");
4895
- return /* @__PURE__ */ jsx(Root12, { $variant: variant, ...props, children: text });
4896
- }
4897
- var saleBadgeVariants = ["default", "flash", "new", "hot"];
4898
4883
  var sizeMap4 = {
4899
4884
  sm: { width: "2rem", height: "2rem", fontSize: "0.75rem" },
4900
4885
  md: { width: "2.5rem", height: "2.5rem", fontSize: "0.875rem" },
@@ -5043,7 +5028,7 @@ var spin = keyframes$1`to { transform: rotate(360deg); }`;
5043
5028
  var fade = keyframes$1`0%,100%{opacity:.15} 50%{opacity:1}`;
5044
5029
  var scalePulse = keyframes$1`0%,100%{transform:scale(0.6);opacity:.4} 50%{transform:scale(1);opacity:1}`;
5045
5030
  var barAnim = keyframes$1`0%,100%{transform:scaleY(.4);opacity:.5} 50%{transform:scaleY(1);opacity:1}`;
5046
- var Root13 = styled("span", {
5031
+ var Root12 = styled("span", {
5047
5032
  shouldForwardProp: (p) => !["$size", "$color"].includes(p)
5048
5033
  })(({ theme, $size, $color }) => {
5049
5034
  const colorMap = {
@@ -5131,8 +5116,8 @@ function Spinner3({
5131
5116
  label = "\u0141adowanie\u2026",
5132
5117
  ...props
5133
5118
  }) {
5134
- const Inner7 = VARIANTS[variant];
5135
- return /* @__PURE__ */ jsx(Root13, { $size: size, $color: color, role: "status", "aria-label": label, ...props, children: /* @__PURE__ */ jsx(Inner7, {}) });
5119
+ const Inner5 = VARIANTS[variant];
5120
+ return /* @__PURE__ */ jsx(Root12, { $size: size, $color: color, role: "status", "aria-label": label, ...props, children: /* @__PURE__ */ jsx(Inner5, {}) });
5136
5121
  }
5137
5122
  var spinnerVariants = ["ring", "dots", "pulse", "bars"];
5138
5123
  var spinnerSizes = ["xs", "sm", "md", "lg", "xl"];
@@ -5258,7 +5243,7 @@ var FONT_MAP = {
5258
5243
  lg: "1.125rem",
5259
5244
  xl: "1.5rem"
5260
5245
  };
5261
- var Root14 = styled("div")({ position: "relative", display: "inline-flex", flexShrink: 0 });
5246
+ var Root13 = styled("div")({ position: "relative", display: "inline-flex", flexShrink: 0 });
5262
5247
  var Label2 = styled("div", {
5263
5248
  shouldForwardProp: (p) => p !== "$size"
5264
5249
  })(({ theme, $size }) => ({
@@ -5312,7 +5297,7 @@ function ProgressCircle({
5312
5297
  const { color, gradient } = useStrokeColor(variant, gradientId);
5313
5298
  const trackColor = theme.palette.mode === "dark" ? "rgba(255,255,255,0.1)" : "rgba(0,0,0,0.08)";
5314
5299
  return /* @__PURE__ */ jsxs(
5315
- Root14,
5300
+ Root13,
5316
5301
  {
5317
5302
  role: "progressbar",
5318
5303
  "aria-valuenow": value,
@@ -5669,9 +5654,10 @@ var PRESET_MAP = {
5669
5654
  "3/4": 3 / 4,
5670
5655
  "2/3": 2 / 3
5671
5656
  };
5672
- var Root15 = styled("div")({
5657
+ var Root14 = styled("div")({
5673
5658
  position: "relative",
5674
5659
  width: "100%",
5660
+ aspectRatio: "var(--ar)",
5675
5661
  "& > *": {
5676
5662
  position: "absolute",
5677
5663
  inset: 0,
@@ -5683,32 +5669,25 @@ var Root15 = styled("div")({
5683
5669
  var AspectRatio = forwardRef(
5684
5670
  ({ ratio = "16/9", children, style, ...props }, ref) => {
5685
5671
  const numericRatio = typeof ratio === "string" ? PRESET_MAP[ratio] ?? 16 / 9 : ratio;
5686
- const paddingBottom = `${1 / numericRatio * 100}%`;
5687
- return /* @__PURE__ */ jsx(Root15, { ref, style: { paddingBottom, ...style }, ...props, children });
5672
+ return /* @__PURE__ */ jsx(
5673
+ Root14,
5674
+ {
5675
+ ref,
5676
+ style: { "--ar": String(numericRatio), ...style },
5677
+ ...props,
5678
+ children
5679
+ }
5680
+ );
5688
5681
  }
5689
5682
  );
5690
5683
  AspectRatio.displayName = "AspectRatio";
5691
5684
  var aspectRatioPresets = Object.keys(PRESET_MAP);
5692
- var Root16 = styled(Card)(({ theme }) => ({
5693
- display: "flex",
5694
- flexDirection: "column",
5695
- overflow: "hidden",
5696
- cursor: "pointer",
5697
- transition: "box-shadow 150ms ease, transform 150ms ease",
5698
- "&:hover": {
5699
- boxShadow: theme.shadows[4],
5700
- transform: "translateY(-2px)"
5701
- }
5702
- }));
5703
- var ImageWrap = styled("div")({
5704
- margin: "-1.5rem -1.5rem 1rem"
5705
- });
5706
- var Image = styled("img")({
5685
+ var Img = styled("img")({
5707
5686
  objectFit: "cover",
5708
5687
  width: "100%",
5709
5688
  height: "100%"
5710
5689
  });
5711
- var ImagePlaceholder = styled("div")(({ theme }) => ({
5690
+ var Placeholder2 = styled("div")(({ theme }) => ({
5712
5691
  width: "100%",
5713
5692
  height: "100%",
5714
5693
  backgroundColor: theme.palette.action.hover,
@@ -5717,7 +5696,9 @@ var ImagePlaceholder = styled("div")(({ theme }) => ({
5717
5696
  justifyContent: "center",
5718
5697
  color: theme.palette.text.disabled
5719
5698
  }));
5720
- var Content = styled("div")({
5699
+ var CategoryCardImage = ({ src, alt }) => /* @__PURE__ */ jsx(AspectRatio, { ratio: "4/3", children: src ? /* @__PURE__ */ jsx(Img, { src, alt }) : /* @__PURE__ */ jsx(Placeholder2, { "aria-label": alt, children: /* @__PURE__ */ jsx(ImageIcon, { style: { fontSize: 48 } }) }) });
5700
+ CategoryCardImage.displayName = "CategoryCardImage";
5701
+ var Root15 = styled("div")({
5721
5702
  display: "flex",
5722
5703
  flexDirection: "column",
5723
5704
  gap: "0.25rem"
@@ -5735,6 +5716,33 @@ var Count = styled("span")(({ theme }) => ({
5735
5716
  fontFamily: theme.typography.fontFamily,
5736
5717
  fontSize: "0.875rem"
5737
5718
  }));
5719
+ var CategoryCardInfo = ({
5720
+ name,
5721
+ count,
5722
+ countLabel = "produkt\xF3w"
5723
+ }) => /* @__PURE__ */ jsxs(Root15, { children: [
5724
+ /* @__PURE__ */ jsx(Name, { children: name }),
5725
+ count !== void 0 && /* @__PURE__ */ jsxs(Count, { children: [
5726
+ count,
5727
+ " ",
5728
+ countLabel
5729
+ ] })
5730
+ ] });
5731
+ CategoryCardInfo.displayName = "CategoryCardInfo";
5732
+ var Root16 = styled(Card)(({ theme }) => ({
5733
+ display: "flex",
5734
+ flexDirection: "column",
5735
+ overflow: "hidden",
5736
+ cursor: "pointer",
5737
+ transition: "box-shadow 150ms ease, transform 150ms ease",
5738
+ "&:hover": {
5739
+ boxShadow: theme.shadows[4],
5740
+ transform: "translateY(-2px)"
5741
+ }
5742
+ }));
5743
+ var ImageWrap = styled("div")({
5744
+ margin: "-1.5rem -1.5rem 1rem"
5745
+ });
5738
5746
  var CardLink = styled("a")({
5739
5747
  display: "block",
5740
5748
  textDecoration: "none",
@@ -5744,90 +5752,95 @@ var CardLink = styled("a")({
5744
5752
  var CategoryCard = forwardRef(
5745
5753
  ({ name, imageUrl, imageAlt, count, href, ...props }, ref) => {
5746
5754
  const content = /* @__PURE__ */ jsxs(Fragment, { children: [
5747
- /* @__PURE__ */ jsx(ImageWrap, { children: /* @__PURE__ */ jsx(AspectRatio, { ratio: "4/3", children: imageUrl ? /* @__PURE__ */ jsx(Image, { src: imageUrl, alt: imageAlt ?? name }) : /* @__PURE__ */ jsx(ImagePlaceholder, { "aria-label": imageAlt ?? name, children: /* @__PURE__ */ jsx(ImageIcon, { style: { fontSize: 48 } }) }) }) }),
5748
- /* @__PURE__ */ jsxs(Content, { children: [
5749
- /* @__PURE__ */ jsx(Name, { children: name }),
5750
- count !== void 0 && /* @__PURE__ */ jsxs(Count, { children: [
5751
- count,
5752
- " produkt\xF3w"
5753
- ] })
5754
- ] })
5755
+ /* @__PURE__ */ jsx(ImageWrap, { children: /* @__PURE__ */ jsx(CategoryCardImage, { src: imageUrl, alt: imageAlt ?? name }) }),
5756
+ /* @__PURE__ */ jsx(CategoryCardInfo, { name, count })
5755
5757
  ] });
5756
5758
  return /* @__PURE__ */ jsx(Root16, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: href ? /* @__PURE__ */ jsx(CardLink, { href, children: content }) : content });
5757
5759
  }
5758
5760
  );
5759
5761
  CategoryCard.displayName = "CategoryCard";
5760
- var sizeMap5 = {
5761
- sm: "1rem",
5762
- md: "1.25rem",
5763
- lg: "1.5rem"
5764
- };
5765
- var Root17 = styled("div")(({ theme }) => ({
5766
- display: "inline-flex",
5762
+ function deriveInitials(name) {
5763
+ return name.split(/\s+/).filter(Boolean).slice(0, 2).map((p) => p[0]?.toUpperCase() ?? "").join("");
5764
+ }
5765
+ var Root17 = styled(Card)({
5766
+ display: "flex",
5767
5767
  alignItems: "center",
5768
- gap: "0.5rem",
5769
- color: theme.palette.text.secondary,
5770
- fontFamily: theme.typography.fontFamily
5771
- }));
5772
- var Stars = styled("div")({
5773
- display: "inline-flex",
5768
+ justifyContent: "space-between",
5769
+ gap: "1rem",
5770
+ flexWrap: "wrap"
5771
+ });
5772
+ var AvatarImg = styled("img")({
5773
+ borderRadius: "50%",
5774
+ objectFit: "cover",
5775
+ flexShrink: 0
5776
+ });
5777
+ var Identity = styled("div")({
5778
+ display: "flex",
5774
5779
  alignItems: "center",
5775
- gap: "0.125rem"
5780
+ gap: "1rem",
5781
+ flex: 1,
5782
+ minWidth: 0
5776
5783
  });
5777
- var StarButton = styled("button")(
5778
- ({ theme, $size, $active }) => ({
5779
- appearance: "none",
5780
- border: 0,
5781
- background: "transparent",
5782
- padding: 0,
5783
- color: $active ? "#f59e0b" : theme.palette.action.disabled,
5784
- cursor: "pointer",
5785
- fontSize: sizeMap5[$size],
5786
- lineHeight: 1,
5787
- "&:disabled": {
5788
- cursor: "default"
5789
- }
5790
- })
5791
- );
5792
- var Meta = styled("span")(({ theme }) => ({
5784
+ var TextBlock = styled("div")({ minWidth: 0 });
5785
+ var Name2 = styled("h2")(({ theme }) => ({
5786
+ margin: 0,
5787
+ fontFamily: theme.typography.fontFamily,
5788
+ fontSize: "1.25rem",
5789
+ fontWeight: 700,
5790
+ color: theme.palette.text.primary,
5791
+ whiteSpace: "nowrap",
5792
+ overflow: "hidden",
5793
+ textOverflow: "ellipsis"
5794
+ }));
5795
+ var Subtitle = styled("p")(({ theme }) => ({
5796
+ margin: "0.25rem 0 0",
5797
+ fontFamily: theme.typography.fontFamily,
5793
5798
  fontSize: "0.875rem",
5794
- color: theme.palette.text.secondary
5799
+ color: theme.palette.text.secondary,
5800
+ whiteSpace: "nowrap",
5801
+ overflow: "hidden",
5802
+ textOverflow: "ellipsis"
5795
5803
  }));
5796
- var Rating = forwardRef(
5797
- ({ value, max = 5, readonly = true, size = "md", label, count, onChange, ...props }, ref) => {
5798
- const roundedValue = Math.round(value);
5799
- const meta = label ?? (count !== void 0 ? `(${count})` : void 0);
5800
- return /* @__PURE__ */ jsxs(Root17, { ref, "aria-label": `Ocena ${value} z ${max}`, ...props, children: [
5801
- /* @__PURE__ */ jsx(
5802
- Stars,
5803
- {
5804
- role: readonly ? "img" : "radiogroup",
5805
- "aria-label": readonly ? void 0 : "Wybierz ocen\u0119",
5806
- children: Array.from({ length: max }, (_, index) => {
5807
- const starValue = index + 1;
5808
- return /* @__PURE__ */ jsx(
5809
- StarButton,
5810
- {
5811
- type: "button",
5812
- $size: size,
5813
- $active: starValue <= roundedValue,
5814
- disabled: readonly,
5815
- "aria-label": `${starValue} z ${max}`,
5816
- "aria-checked": readonly ? void 0 : starValue === roundedValue,
5817
- role: readonly ? void 0 : "radio",
5818
- onClick: () => onChange?.(starValue),
5819
- children: "\u2605"
5820
- },
5821
- starValue
5822
- );
5823
- })
5824
- }
5825
- ),
5826
- meta && /* @__PURE__ */ jsx(Meta, { children: meta })
5804
+ var Actions = styled("div")({
5805
+ display: "flex",
5806
+ alignItems: "center",
5807
+ gap: "0.75rem",
5808
+ flexWrap: "wrap",
5809
+ justifyContent: "flex-end"
5810
+ });
5811
+ var sizeMap5 = {
5812
+ sm: "2rem",
5813
+ md: "2.5rem",
5814
+ lg: "3rem",
5815
+ xl: "4rem"
5816
+ };
5817
+ var ProfileCard = forwardRef(
5818
+ ({
5819
+ name,
5820
+ subtitle,
5821
+ initials,
5822
+ avatarUrl,
5823
+ avatarColor = "primary",
5824
+ avatarSize = "xl",
5825
+ actions,
5826
+ cardVariant = "default",
5827
+ ...props
5828
+ }, ref) => {
5829
+ const resolvedInitials = initials ?? deriveInitials(name);
5830
+ const imgSize = sizeMap5[avatarSize] ?? "4rem";
5831
+ return /* @__PURE__ */ jsxs(Root17, { ref, variant: cardVariant, padding: "lg", rounded: "lg", ...props, children: [
5832
+ /* @__PURE__ */ jsxs(Identity, { children: [
5833
+ avatarUrl ? /* @__PURE__ */ jsx(AvatarImg, { src: avatarUrl, alt: name, style: { width: imgSize, height: imgSize } }) : /* @__PURE__ */ jsx(Avatar, { initials: resolvedInitials, size: avatarSize, color: avatarColor }),
5834
+ /* @__PURE__ */ jsxs(TextBlock, { children: [
5835
+ /* @__PURE__ */ jsx(Name2, { children: name }),
5836
+ subtitle && /* @__PURE__ */ jsx(Subtitle, { children: subtitle })
5837
+ ] })
5838
+ ] }),
5839
+ actions && /* @__PURE__ */ jsx(Actions, { children: actions })
5827
5840
  ] });
5828
5841
  }
5829
5842
  );
5830
- Rating.displayName = "Rating";
5843
+ ProfileCard.displayName = "ProfileCard";
5831
5844
  var DEFAULT_OMNIBUS_LABEL = "Najni\u017Csza cena z ostatnich 30 dni";
5832
5845
  var FONT_SIZE = {
5833
5846
  sm: "0.875rem",
@@ -5960,147 +5973,150 @@ var Price = forwardRef(
5960
5973
  );
5961
5974
  Price.displayName = "Price";
5962
5975
  var priceSizes = ["sm", "md", "lg", "xl"];
5963
- var Root19 = styled(Card)({
5964
- display: "flex",
5965
- flexDirection: "column",
5966
- height: "100%",
5967
- overflow: "hidden"
5968
- });
5969
- var ImageWrap2 = styled("div")({
5970
- position: "relative",
5971
- margin: "-1.5rem -1.5rem 1rem"
5972
- });
5973
- var Image2 = styled("img")(({ theme }) => ({
5974
- objectFit: "cover",
5975
- backgroundColor: theme.palette.action.hover
5976
+ function calcTimeLeft(target) {
5977
+ const diff = new Date(target).getTime() - Date.now();
5978
+ if (diff <= 0) return null;
5979
+ return {
5980
+ days: Math.floor(diff / 864e5),
5981
+ hours: Math.floor(diff % 864e5 / 36e5),
5982
+ minutes: Math.floor(diff % 36e5 / 6e4),
5983
+ seconds: Math.floor(diff % 6e4 / 1e3)
5984
+ };
5985
+ }
5986
+ function pad(n) {
5987
+ return String(n).padStart(2, "0");
5988
+ }
5989
+ var Root19 = styled("div", {
5990
+ shouldForwardProp: (prop) => prop !== "$variant"
5991
+ })(({ theme, $variant }) => ({
5992
+ display: "inline-flex",
5993
+ alignItems: "center",
5994
+ justifyContent: "space-between",
5995
+ flexWrap: "wrap",
5996
+ gap: "0.5rem",
5997
+ fontFamily: theme.typography.fontFamily,
5998
+ ...$variant === "card" && {
5999
+ backgroundColor: theme.palette.background.paper,
6000
+ border: `1px solid ${theme.palette.divider}`,
6001
+ borderRadius: theme.shape.borderRadius,
6002
+ padding: "1rem 1.5rem"
6003
+ },
6004
+ ...$variant === "banner" && {
6005
+ backgroundColor: theme.palette.error.main,
6006
+ color: "#fff",
6007
+ borderRadius: theme.shape.borderRadius,
6008
+ padding: "0.75rem 1.25rem"
6009
+ }
5976
6010
  }));
5977
- var ImagePlaceholder2 = styled("div")(({ theme }) => ({
5978
- width: "100%",
5979
- height: "100%",
5980
- backgroundColor: theme.palette.action.hover,
6011
+ var TimerLabel = styled("span", {
6012
+ shouldForwardProp: (prop) => prop !== "$variant"
6013
+ })(({ theme, $variant }) => ({
6014
+ fontSize: "0.875rem",
6015
+ fontWeight: 600,
6016
+ color: $variant === "banner" ? "rgba(255,255,255,0.85)" : theme.palette.text.secondary,
6017
+ marginRight: "0.25rem"
6018
+ }));
6019
+ var Segments = styled("div")({
5981
6020
  display: "flex",
5982
6021
  alignItems: "center",
5983
- justifyContent: "center",
5984
- color: theme.palette.text.disabled
5985
- }));
5986
- var BadgeSlot = styled("div")({
5987
- position: "absolute",
5988
- left: "0.75rem",
5989
- top: "0.75rem"
6022
+ gap: "0.25rem"
5990
6023
  });
5991
- var Name2 = styled("h3")(({ theme }) => ({
5992
- margin: 0,
5993
- color: theme.palette.text.primary,
5994
- fontFamily: theme.typography.fontFamily,
5995
- fontSize: "1rem",
6024
+ var Segment = styled("div", {
6025
+ shouldForwardProp: (prop) => prop !== "$variant"
6026
+ })(({ theme, $variant }) => ({
6027
+ display: "flex",
6028
+ flexDirection: "column",
6029
+ alignItems: "center",
6030
+ minWidth: "2.5rem",
6031
+ ...$variant === "card" && {
6032
+ backgroundColor: theme.palette.action.hover,
6033
+ borderRadius: "0.375rem",
6034
+ padding: "0.375rem 0.5rem"
6035
+ }
6036
+ }));
6037
+ var Value = styled("span", {
6038
+ shouldForwardProp: (prop) => prop !== "$variant"
6039
+ })(({ $variant }) => ({
6040
+ fontSize: $variant === "inline" ? "1rem" : "1.5rem",
5996
6041
  fontWeight: 700,
5997
- lineHeight: 1.4
6042
+ lineHeight: 1,
6043
+ color: $variant === "banner" ? "#fff" : "inherit"
5998
6044
  }));
5999
- var Footer = styled("div")({
6000
- display: "grid",
6001
- gap: "1rem",
6002
- marginTop: "auto",
6003
- paddingTop: "1rem"
6004
- });
6005
- var ProductCard = forwardRef(
6045
+ var Unit = styled("span", {
6046
+ shouldForwardProp: (prop) => prop !== "$variant"
6047
+ })(({ theme, $variant }) => ({
6048
+ fontSize: "0.6875rem",
6049
+ color: $variant === "banner" ? "rgba(255,255,255,0.7)" : theme.palette.text.secondary,
6050
+ marginTop: "0.125rem"
6051
+ }));
6052
+ var Colon = styled("span", {
6053
+ shouldForwardProp: (prop) => prop !== "$variant"
6054
+ })(({ theme, $variant }) => ({
6055
+ fontSize: $variant === "inline" ? "1rem" : "1.5rem",
6056
+ fontWeight: 700,
6057
+ color: $variant === "banner" ? "rgba(255,255,255,0.6)" : theme.palette.text.disabled,
6058
+ alignSelf: $variant === "card" ? "flex-start" : "center",
6059
+ marginTop: $variant === "card" ? "0.375rem" : 0
6060
+ }));
6061
+ var UNITS = ["dni", "godz", "min", "sek"];
6062
+ var CountdownTimer = forwardRef(
6006
6063
  ({
6007
- name,
6008
- imageUrl,
6009
- imageAlt,
6010
- price,
6011
- originalPrice,
6012
- currency,
6013
- locale,
6014
- lowestPrice,
6015
- badge,
6016
- badgeVariant = "success",
6017
- rating,
6018
- reviewCount,
6019
- ctaLabel = "Dodaj do koszyka",
6020
- onAddToCart,
6064
+ targetDate,
6065
+ variant = "inline",
6066
+ label,
6067
+ expiredLabel = "Promocja zako\u0144czona",
6068
+ onExpire,
6021
6069
  ...props
6022
- }, ref) => /* @__PURE__ */ jsxs(Root19, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: [
6023
- /* @__PURE__ */ jsx(ImageWrap2, { children: /* @__PURE__ */ jsxs(AspectRatio, { ratio: "4/3", children: [
6024
- imageUrl ? /* @__PURE__ */ jsx(Image2, { src: imageUrl, alt: imageAlt ?? name }) : /* @__PURE__ */ jsx(ImagePlaceholder2, { "aria-label": imageAlt ?? name, children: /* @__PURE__ */ jsx(ImageIcon, { style: { fontSize: 48 } }) }),
6025
- badge && /* @__PURE__ */ jsx(BadgeSlot, { children: /* @__PURE__ */ jsx(Badge2, { variant: badgeVariant, children: badge }) })
6026
- ] }) }),
6027
- /* @__PURE__ */ jsx(Name2, { children: name }),
6028
- rating !== void 0 && /* @__PURE__ */ jsx(Rating, { value: rating, count: reviewCount, size: "sm" }),
6029
- /* @__PURE__ */ jsx(
6030
- Price,
6070
+ }, ref) => {
6071
+ const [timeLeft, setTimeLeft] = useState(() => calcTimeLeft(targetDate));
6072
+ useEffect(() => {
6073
+ const id = setInterval(() => {
6074
+ const tl = calcTimeLeft(targetDate);
6075
+ setTimeLeft(tl);
6076
+ if (!tl) {
6077
+ clearInterval(id);
6078
+ onExpire?.();
6079
+ }
6080
+ }, 1e3);
6081
+ return () => clearInterval(id);
6082
+ }, [targetDate, onExpire]);
6083
+ if (!timeLeft) {
6084
+ return /* @__PURE__ */ jsx(Root19, { ref, $variant: variant, ...props, children: /* @__PURE__ */ jsx(TimerLabel, { $variant: variant, children: expiredLabel }) });
6085
+ }
6086
+ const parts = [timeLeft.days, timeLeft.hours, timeLeft.minutes, timeLeft.seconds];
6087
+ return /* @__PURE__ */ jsxs(
6088
+ Root19,
6031
6089
  {
6032
- price,
6033
- originalPrice,
6034
- currency,
6035
- locale,
6036
- lowestPrice,
6037
- style: { marginTop: "0.5rem" }
6090
+ ref,
6091
+ $variant: variant,
6092
+ "aria-live": "polite",
6093
+ "aria-label": `Czas do ko\u0144ca promocji`,
6094
+ ...props,
6095
+ children: [
6096
+ label && /* @__PURE__ */ jsx(TimerLabel, { $variant: variant, children: label }),
6097
+ /* @__PURE__ */ jsx(Segments, { children: parts.map((val, i) => /* @__PURE__ */ jsxs("div", { style: { display: "contents" }, children: [
6098
+ i > 0 && /* @__PURE__ */ jsx(Colon, { $variant: variant, children: ":" }),
6099
+ /* @__PURE__ */ jsxs(Segment, { $variant: variant, children: [
6100
+ /* @__PURE__ */ jsx(Value, { $variant: variant, children: pad(val) }),
6101
+ variant !== "inline" && /* @__PURE__ */ jsx(Unit, { $variant: variant, children: UNITS[i] })
6102
+ ] })
6103
+ ] }, UNITS[i])) })
6104
+ ]
6038
6105
  }
6039
- ),
6040
- /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: (e) => {
6041
- e.stopPropagation();
6042
- onAddToCart?.();
6043
- }, children: ctaLabel }) })
6044
- ] })
6106
+ );
6107
+ }
6045
6108
  );
6046
- ProductCard.displayName = "ProductCard";
6047
- var COLLAPSE_AT = "480px";
6048
- var ContainerRoot = styled("div")({
6049
- containerType: "inline-size",
6050
- width: "100%",
6051
- height: "100%"
6052
- });
6053
- var Inner = styled("div")({
6109
+ CountdownTimer.displayName = "CountdownTimer";
6110
+ var countdownTimerVariants = ["inline", "card", "banner"];
6111
+ var Root20 = styled(Card)({
6054
6112
  display: "flex",
6055
- flexDirection: "row",
6113
+ flexDirection: "column",
6056
6114
  height: "100%",
6057
- [`@container (max-width: ${COLLAPSE_AT})`]: {
6058
- flexDirection: "column"
6059
- }
6115
+ overflow: "hidden"
6060
6116
  });
6061
- var ImageWrap3 = styled("div")({
6117
+ var ImageWrap2 = styled("div")({
6062
6118
  position: "relative",
6063
- flexShrink: 0,
6064
- width: "clamp(120px, 33%, 200px)",
6065
- alignSelf: "stretch",
6066
- margin: "-1.5rem 1rem -1.5rem -1.5rem",
6067
- [`@container (max-width: ${COLLAPSE_AT})`]: {
6068
- width: "auto",
6069
- alignSelf: "auto",
6070
- margin: "-1.5rem -1.5rem 1rem",
6071
- aspectRatio: "4 / 3"
6072
- }
6073
- });
6074
- var Image3 = styled("img")(({ theme }) => ({
6075
- position: "absolute",
6076
- inset: 0,
6077
- width: "100%",
6078
- height: "100%",
6079
- objectFit: "cover",
6080
- backgroundColor: theme.palette.action.hover
6081
- }));
6082
- var ImagePlaceholder3 = styled("div")(({ theme }) => ({
6083
- position: "absolute",
6084
- inset: 0,
6085
- width: "100%",
6086
- height: "100%",
6087
- backgroundColor: theme.palette.action.hover,
6088
- display: "flex",
6089
- alignItems: "center",
6090
- justifyContent: "center",
6091
- color: theme.palette.text.disabled
6092
- }));
6093
- var BadgeSlot2 = styled("div")({
6094
- position: "absolute",
6095
- left: "0.75rem",
6096
- top: "0.75rem",
6097
- zIndex: 1
6098
- });
6099
- var Content2 = styled("div")({
6100
- display: "flex",
6101
- flexDirection: "column",
6102
- flex: 1,
6103
- minWidth: 0
6119
+ margin: "-1.5rem -1.5rem 1rem"
6104
6120
  });
6105
6121
  var Name3 = styled("h3")(({ theme }) => ({
6106
6122
  margin: 0,
@@ -6110,13 +6126,13 @@ var Name3 = styled("h3")(({ theme }) => ({
6110
6126
  fontWeight: 700,
6111
6127
  lineHeight: 1.4
6112
6128
  }));
6113
- var Footer2 = styled("div")({
6129
+ var Footer = styled("div")({
6114
6130
  display: "grid",
6115
6131
  gap: "1rem",
6116
6132
  marginTop: "auto",
6117
6133
  paddingTop: "1rem"
6118
6134
  });
6119
- var ProductCardHorizontal = forwardRef(
6135
+ var DealCard = forwardRef(
6120
6136
  ({
6121
6137
  name,
6122
6138
  imageUrl,
@@ -6125,22 +6141,14 @@ var ProductCardHorizontal = forwardRef(
6125
6141
  originalPrice,
6126
6142
  currency,
6127
6143
  locale,
6128
- lowestPrice,
6129
- badge,
6130
- badgeVariant = "success",
6131
- rating,
6132
- reviewCount,
6133
- ctaLabel = "Dodaj do koszyka",
6144
+ dealEndsAt,
6145
+ ctaLabel = "Kup teraz",
6134
6146
  onAddToCart,
6135
6147
  ...props
6136
- }, ref) => /* @__PURE__ */ jsx(Card, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: /* @__PURE__ */ jsx(ContainerRoot, { children: /* @__PURE__ */ jsxs(Inner, { children: [
6137
- /* @__PURE__ */ jsxs(ImageWrap3, { children: [
6138
- imageUrl ? /* @__PURE__ */ jsx(Image3, { src: imageUrl, alt: imageAlt ?? name }) : /* @__PURE__ */ jsx(ImagePlaceholder3, { "aria-label": imageAlt ?? name, children: /* @__PURE__ */ jsx(ImageIcon, { style: { fontSize: 48 } }) }),
6139
- badge && /* @__PURE__ */ jsx(BadgeSlot2, { children: /* @__PURE__ */ jsx(Badge2, { variant: badgeVariant, children: badge }) })
6140
- ] }),
6141
- /* @__PURE__ */ jsxs(Content2, { children: [
6148
+ }, ref) => {
6149
+ return /* @__PURE__ */ jsxs(Root20, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: [
6150
+ /* @__PURE__ */ jsx(ImageWrap2, { children: /* @__PURE__ */ jsx(ProductCardImage, { src: imageUrl, alt: imageAlt ?? name }) }),
6142
6151
  /* @__PURE__ */ jsx(Name3, { children: name }),
6143
- rating !== void 0 && /* @__PURE__ */ jsx(Rating, { value: rating, count: reviewCount, size: "sm" }),
6144
6152
  /* @__PURE__ */ jsx(
6145
6153
  Price,
6146
6154
  {
@@ -6148,14 +6156,22 @@ var ProductCardHorizontal = forwardRef(
6148
6156
  originalPrice,
6149
6157
  currency,
6150
6158
  locale,
6151
- lowestPrice,
6152
6159
  style: { marginTop: "0.5rem" }
6153
6160
  }
6154
6161
  ),
6155
- /* @__PURE__ */ jsx(Footer2, { children: /* @__PURE__ */ jsx(
6162
+ dealEndsAt && /* @__PURE__ */ jsx(
6163
+ CountdownTimer,
6164
+ {
6165
+ targetDate: dealEndsAt,
6166
+ label: "Oferta ko\u0144czy si\u0119 za:",
6167
+ style: { marginTop: "0.75rem" }
6168
+ }
6169
+ ),
6170
+ /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(
6156
6171
  Button,
6157
6172
  {
6158
6173
  fullWidth: true,
6174
+ variant: "primary",
6159
6175
  onClick: (e) => {
6160
6176
  e.stopPropagation();
6161
6177
  onAddToCart?.();
@@ -6163,10 +6179,10 @@ var ProductCardHorizontal = forwardRef(
6163
6179
  children: ctaLabel
6164
6180
  }
6165
6181
  ) })
6166
- ] })
6167
- ] }) }) })
6182
+ ] });
6183
+ }
6168
6184
  );
6169
- ProductCardHorizontal.displayName = "ProductCardHorizontal";
6185
+ DealCard.displayName = "DealCard";
6170
6186
  var ImageWrapper = styled("div", {
6171
6187
  shouldForwardProp: (prop) => prop !== "$ar"
6172
6188
  })(({ $ar }) => ({
@@ -6176,13 +6192,13 @@ var ImageWrapper = styled("div", {
6176
6192
  overflow: "hidden",
6177
6193
  flexShrink: 0
6178
6194
  }));
6179
- var Img = styled("img")({
6195
+ var Img2 = styled("img")({
6180
6196
  width: "100%",
6181
6197
  height: "100%",
6182
6198
  objectFit: "cover",
6183
6199
  display: "block"
6184
6200
  });
6185
- var Placeholder2 = styled("div")(({ theme }) => ({
6201
+ var Placeholder3 = styled("div")(({ theme }) => ({
6186
6202
  width: "100%",
6187
6203
  height: "100%",
6188
6204
  display: "flex",
@@ -6212,7 +6228,7 @@ var PostCardImage = ({
6212
6228
  const [imgError, setImgError] = useState(false);
6213
6229
  const showPlaceholder = !src || imgError;
6214
6230
  return /* @__PURE__ */ jsxs(ImageWrapper, { $ar: toAspectRatioCss(aspectRatio), className, style, children: [
6215
- showPlaceholder ? /* @__PURE__ */ jsx(Placeholder2, { children: /* @__PURE__ */ jsx(FileTextIcon, {}) }) : /* @__PURE__ */ jsx(Img, { src, alt, onError: () => setImgError(true) }),
6231
+ showPlaceholder ? /* @__PURE__ */ jsx(Placeholder3, { children: /* @__PURE__ */ jsx(FileTextIcon, {}) }) : /* @__PURE__ */ jsx(Img2, { src, alt, onError: () => setImgError(true) }),
6216
6232
  overlay && !showPlaceholder && /* @__PURE__ */ jsx(Overlay, {})
6217
6233
  ] });
6218
6234
  };
@@ -6382,6 +6398,7 @@ var PostCard = forwardRef(
6382
6398
  author,
6383
6399
  href,
6384
6400
  category,
6401
+ categoryBadgeVariant,
6385
6402
  variant = "vertical",
6386
6403
  cardVariant = "default",
6387
6404
  ...rest
@@ -6393,7 +6410,7 @@ var PostCard = forwardRef(
6393
6410
  isFeatured && showImage && /* @__PURE__ */ jsx(FeaturedImageWrapper, { children: /* @__PURE__ */ jsx(PostCardImage, { src: imageUrl, alt: imageAlt, aspectRatio: "16/9", overlay: true }) }),
6394
6411
  !isFeatured && showImage && (isHorizontal ? /* @__PURE__ */ jsx(HorizontalImageWrapper, { children: /* @__PURE__ */ jsx(PostCardImage, { src: imageUrl, alt: imageAlt, aspectRatio: "4/3" }) }) : /* @__PURE__ */ jsx(PostCardImage, { src: imageUrl, alt: imageAlt, aspectRatio: "16/9" })),
6395
6412
  /* @__PURE__ */ jsxs(StyledContent, { $variant: variant, children: [
6396
- category && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge2, { variant: isFeatured ? "ghost" : "default", children: category }) }),
6413
+ category && /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(Badge2, { variant: categoryBadgeVariant ?? (isFeatured ? "ghost" : "default"), children: category }) }),
6397
6414
  /* @__PURE__ */ jsx(StyledTitle, { className: "post-card-title", $featured: isFeatured, children: title }),
6398
6415
  excerpt && variant !== "compact" && !isFeatured && /* @__PURE__ */ jsx(StyledExcerpt, { children: excerpt }),
6399
6416
  (date || author) && /* @__PURE__ */ jsx(PostCardMeta, { date, author, inverted: isFeatured })
@@ -6411,28 +6428,10 @@ var postCardVariants = [
6411
6428
  "featured",
6412
6429
  "compact"
6413
6430
  ];
6414
- var Root20 = styled(Card)({
6431
+ var Row3 = styled("div")({
6415
6432
  display: "flex",
6416
- flexDirection: "column",
6417
- height: "100%"
6418
- });
6419
- var NameRow = styled("div")({
6420
- display: "flex",
6421
- alignItems: "center",
6422
- justifyContent: "space-between",
6423
- marginBottom: "0.75rem"
6424
- });
6425
- var Name4 = styled("p")(({ theme }) => ({
6426
- margin: 0,
6427
- fontFamily: theme.typography.fontFamily,
6428
- fontWeight: 600,
6429
- fontSize: "1rem",
6430
- color: theme.palette.text.primary
6431
- }));
6432
- var PriceRow2 = styled("div")({
6433
- display: "flex",
6434
- alignItems: "baseline",
6435
- gap: "0.25rem"
6433
+ alignItems: "baseline",
6434
+ gap: "0.25rem"
6436
6435
  });
6437
6436
  var Currency = styled("span")(({ theme }) => ({
6438
6437
  fontFamily: theme.typography.fontFamily,
@@ -6442,7 +6441,7 @@ var Currency = styled("span")(({ theme }) => ({
6442
6441
  alignSelf: "flex-start",
6443
6442
  paddingTop: "0.375rem"
6444
6443
  }));
6445
- var Price2 = styled("span")(({ theme }) => ({
6444
+ var Amount = styled("span")(({ theme }) => ({
6446
6445
  fontFamily: theme.typography.fontFamily,
6447
6446
  fontWeight: 700,
6448
6447
  fontSize: "3rem",
@@ -6454,28 +6453,21 @@ var Period = styled("span")(({ theme }) => ({
6454
6453
  fontSize: "0.875rem",
6455
6454
  color: theme.palette.text.secondary
6456
6455
  }));
6457
- var Description2 = styled("p")(({ theme }) => ({
6458
- margin: "0.75rem 0 0",
6459
- fontFamily: theme.typography.fontFamily,
6460
- fontSize: "0.875rem",
6461
- color: theme.palette.text.secondary,
6462
- lineHeight: 1.6
6463
- }));
6464
- var Divider2 = styled("hr")(({ theme }) => ({
6465
- border: "none",
6466
- borderTop: `1px solid ${theme.palette.divider}`,
6467
- margin: "1.25rem 0"
6468
- }));
6469
- var FeatureList = styled("ul")({
6456
+ var PricingCardPrice = ({ price, currency, period }) => /* @__PURE__ */ jsxs(Row3, { children: [
6457
+ currency && /* @__PURE__ */ jsx(Currency, { children: currency }),
6458
+ /* @__PURE__ */ jsx(Amount, { children: price }),
6459
+ period && /* @__PURE__ */ jsx(Period, { children: period })
6460
+ ] });
6461
+ PricingCardPrice.displayName = "PricingCardPrice";
6462
+ var List = styled("ul")({
6470
6463
  listStyle: "none",
6471
6464
  margin: 0,
6472
6465
  padding: 0,
6473
6466
  display: "flex",
6474
6467
  flexDirection: "column",
6475
- gap: "0.625rem",
6476
- flex: 1
6468
+ gap: "0.625rem"
6477
6469
  });
6478
- var FeatureItem = styled("li", {
6470
+ var Item = styled("li", {
6479
6471
  shouldForwardProp: (prop) => prop !== "$included"
6480
6472
  })(({ theme, $included }) => ({
6481
6473
  display: "flex",
@@ -6485,6 +6477,50 @@ var FeatureItem = styled("li", {
6485
6477
  fontSize: "0.875rem",
6486
6478
  color: $included ? theme.palette.text.primary : theme.palette.text.disabled
6487
6479
  }));
6480
+ function CheckIcon3() {
6481
+ return /* @__PURE__ */ jsx(CheckCircleOutlinedIcon, { "aria-hidden": "true", style: { fontSize: 16, flexShrink: 0 } });
6482
+ }
6483
+ function XIcon3() {
6484
+ return /* @__PURE__ */ jsx(HighlightOffIcon, { "aria-hidden": "true", style: { fontSize: 16, flexShrink: 0 } });
6485
+ }
6486
+ var PricingCardFeatureList = ({ features }) => /* @__PURE__ */ jsx(List, { children: features.map((feature, i) => {
6487
+ const included = feature.included !== false;
6488
+ return /* @__PURE__ */ jsxs(Item, { $included: included, children: [
6489
+ included ? /* @__PURE__ */ jsx(CheckIcon3, {}) : /* @__PURE__ */ jsx(XIcon3, {}),
6490
+ feature.text
6491
+ ] }, i);
6492
+ }) });
6493
+ PricingCardFeatureList.displayName = "PricingCardFeatureList";
6494
+ var Root21 = styled(Card)({
6495
+ display: "flex",
6496
+ flexDirection: "column",
6497
+ height: "100%"
6498
+ });
6499
+ var NameRow = styled("div")({
6500
+ display: "flex",
6501
+ alignItems: "center",
6502
+ justifyContent: "space-between",
6503
+ marginBottom: "0.75rem"
6504
+ });
6505
+ var Name4 = styled("p")(({ theme }) => ({
6506
+ margin: 0,
6507
+ fontFamily: theme.typography.fontFamily,
6508
+ fontWeight: 600,
6509
+ fontSize: "1rem",
6510
+ color: theme.palette.text.primary
6511
+ }));
6512
+ var Description2 = styled("p")(({ theme }) => ({
6513
+ margin: "0.75rem 0 0",
6514
+ fontFamily: theme.typography.fontFamily,
6515
+ fontSize: "0.875rem",
6516
+ color: theme.palette.text.secondary,
6517
+ lineHeight: 1.6
6518
+ }));
6519
+ var Divider2 = styled("hr")(({ theme }) => ({
6520
+ border: "none",
6521
+ borderTop: `1px solid ${theme.palette.divider}`,
6522
+ margin: "1.25rem 0"
6523
+ }));
6488
6524
  var CtaLink = styled("a", {
6489
6525
  shouldForwardProp: (prop) => prop !== "$variant"
6490
6526
  })(({ theme, $variant }) => ({
@@ -6517,12 +6553,6 @@ var CtaLink = styled("a", {
6517
6553
  var CtaWrapper = styled("div")({
6518
6554
  marginTop: "1.5rem"
6519
6555
  });
6520
- function CheckIcon3() {
6521
- return /* @__PURE__ */ jsx(CheckCircleOutlinedIcon, { "aria-hidden": "true", style: { fontSize: 16, flexShrink: 0 } });
6522
- }
6523
- function XIcon3() {
6524
- return /* @__PURE__ */ jsx(HighlightOffIcon, { "aria-hidden": "true", style: { fontSize: 16, flexShrink: 0 } });
6525
- }
6526
6556
  var PricingCard = forwardRef(
6527
6557
  ({
6528
6558
  name,
@@ -6537,44 +6567,320 @@ var PricingCard = forwardRef(
6537
6567
  href,
6538
6568
  popular = false,
6539
6569
  popularLabel = "Najpopularniejszy",
6570
+ popularBadgeVariant = "default",
6540
6571
  cardVariant,
6541
6572
  ...props
6542
6573
  }, ref) => {
6543
6574
  const resolvedCardVariant = cardVariant ?? (popular ? "gradient-primary" : "default");
6544
6575
  const resolvedCtaVariant = ctaVariant ?? (popular ? "primary" : "ghost");
6545
- return /* @__PURE__ */ jsxs(Root20, { ref, variant: resolvedCardVariant, padding: "lg", rounded: "lg", ...props, children: [
6576
+ return /* @__PURE__ */ jsxs(Root21, { ref, variant: resolvedCardVariant, padding: "lg", rounded: "lg", ...props, children: [
6546
6577
  /* @__PURE__ */ jsxs(NameRow, { children: [
6547
6578
  /* @__PURE__ */ jsx(Name4, { children: name }),
6548
- popular && /* @__PURE__ */ jsx(Badge2, { variant: "default", children: popularLabel })
6549
- ] }),
6550
- /* @__PURE__ */ jsxs(PriceRow2, { children: [
6551
- currency && /* @__PURE__ */ jsx(Currency, { children: currency }),
6552
- /* @__PURE__ */ jsx(Price2, { children: price }),
6553
- period && /* @__PURE__ */ jsx(Period, { children: period })
6579
+ popular && /* @__PURE__ */ jsx(Badge2, { variant: popularBadgeVariant, children: popularLabel })
6554
6580
  ] }),
6581
+ /* @__PURE__ */ jsx(PricingCardPrice, { price, currency, period }),
6555
6582
  description && /* @__PURE__ */ jsx(Description2, { children: description }),
6556
6583
  features.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
6557
6584
  /* @__PURE__ */ jsx(Divider2, {}),
6558
- /* @__PURE__ */ jsx(FeatureList, { children: features.map((feature, i) => {
6559
- const included = feature.included !== false;
6560
- return /* @__PURE__ */ jsxs(FeatureItem, { $included: included, children: [
6561
- included ? /* @__PURE__ */ jsx(CheckIcon3, {}) : /* @__PURE__ */ jsx(XIcon3, {}),
6562
- feature.text
6563
- ] }, i);
6564
- }) })
6585
+ /* @__PURE__ */ jsx(PricingCardFeatureList, { features })
6565
6586
  ] }),
6566
6587
  /* @__PURE__ */ jsx(CtaWrapper, { children: href ? /* @__PURE__ */ jsx(CtaLink, { href, $variant: resolvedCtaVariant, children: ctaLabel }) : /* @__PURE__ */ jsx(Button, { variant: resolvedCtaVariant, fullWidth: true, onClick: onCtaClick, children: ctaLabel }) })
6567
6588
  ] });
6568
6589
  }
6569
6590
  );
6570
6591
  PricingCard.displayName = "PricingCard";
6571
- var Root21 = styled(Card, {
6592
+ var sizeMap6 = {
6593
+ sm: "1rem",
6594
+ md: "1.25rem",
6595
+ lg: "1.5rem"
6596
+ };
6597
+ var Root22 = styled("div")(({ theme }) => ({
6598
+ display: "inline-flex",
6599
+ alignItems: "center",
6600
+ gap: "0.5rem",
6601
+ color: theme.palette.text.secondary,
6602
+ fontFamily: theme.typography.fontFamily
6603
+ }));
6604
+ var Stars = styled("div")({
6605
+ display: "inline-flex",
6606
+ alignItems: "center",
6607
+ gap: "0.125rem"
6608
+ });
6609
+ var StarButton = styled("button")(
6610
+ ({ theme, $size, $active }) => ({
6611
+ appearance: "none",
6612
+ border: 0,
6613
+ background: "transparent",
6614
+ padding: 0,
6615
+ color: $active ? "#f59e0b" : theme.palette.action.disabled,
6616
+ cursor: "pointer",
6617
+ fontSize: sizeMap6[$size],
6618
+ lineHeight: 1,
6619
+ "&:disabled": {
6620
+ cursor: "default"
6621
+ }
6622
+ })
6623
+ );
6624
+ var Meta = styled("span")(({ theme }) => ({
6625
+ fontSize: "0.875rem",
6626
+ color: theme.palette.text.secondary
6627
+ }));
6628
+ var Rating = forwardRef(
6629
+ ({ value, max = 5, readonly = true, size = "md", label, count, onChange, ...props }, ref) => {
6630
+ const roundedValue = Math.round(value);
6631
+ const meta = label ?? (count !== void 0 ? `(${count})` : void 0);
6632
+ return /* @__PURE__ */ jsxs(Root22, { ref, "aria-label": `Ocena ${value} z ${max}`, ...props, children: [
6633
+ /* @__PURE__ */ jsx(
6634
+ Stars,
6635
+ {
6636
+ role: readonly ? "img" : "radiogroup",
6637
+ "aria-label": readonly ? void 0 : "Wybierz ocen\u0119",
6638
+ children: Array.from({ length: max }, (_, index) => {
6639
+ const starValue = index + 1;
6640
+ return /* @__PURE__ */ jsx(
6641
+ StarButton,
6642
+ {
6643
+ type: "button",
6644
+ $size: size,
6645
+ $active: starValue <= roundedValue,
6646
+ disabled: readonly,
6647
+ "aria-label": `${starValue} z ${max}`,
6648
+ "aria-checked": readonly ? void 0 : starValue === roundedValue,
6649
+ role: readonly ? void 0 : "radio",
6650
+ onClick: () => onChange?.(starValue),
6651
+ children: "\u2605"
6652
+ },
6653
+ starValue
6654
+ );
6655
+ })
6656
+ }
6657
+ ),
6658
+ meta && /* @__PURE__ */ jsx(Meta, { children: meta })
6659
+ ] });
6660
+ }
6661
+ );
6662
+ Rating.displayName = "Rating";
6663
+ var Container2 = styled("div")({
6664
+ width: "100%",
6665
+ height: "100%"
6666
+ });
6667
+ var Img3 = styled("img")(({ theme }) => ({
6668
+ position: "absolute",
6669
+ inset: 0,
6670
+ width: "100%",
6671
+ height: "100%",
6672
+ objectFit: "cover",
6673
+ backgroundColor: theme.palette.action.hover
6674
+ }));
6675
+ var Placeholder4 = styled("div")(({ theme }) => ({
6676
+ position: "absolute",
6677
+ inset: 0,
6678
+ width: "100%",
6679
+ height: "100%",
6680
+ backgroundColor: theme.palette.action.hover,
6681
+ display: "flex",
6682
+ alignItems: "center",
6683
+ justifyContent: "center",
6684
+ color: theme.palette.text.disabled
6685
+ }));
6686
+ var BadgeSlot = styled("div")({
6687
+ position: "absolute",
6688
+ left: "0.75rem",
6689
+ top: "0.75rem",
6690
+ zIndex: 1
6691
+ });
6692
+ var ProductCardImage = ({
6693
+ src,
6694
+ alt,
6695
+ badge,
6696
+ badgeVariant = "success"
6697
+ }) => /* @__PURE__ */ jsxs(Container2, { children: [
6698
+ src ? /* @__PURE__ */ jsx(Img3, { src, alt }) : /* @__PURE__ */ jsx(Placeholder4, { "aria-label": alt, children: /* @__PURE__ */ jsx(ImageIcon, { style: { fontSize: 48 } }) }),
6699
+ badge && /* @__PURE__ */ jsx(BadgeSlot, { children: /* @__PURE__ */ jsx(Badge2, { variant: badgeVariant, children: badge }) })
6700
+ ] });
6701
+ ProductCardImage.displayName = "ProductCardImage";
6702
+ var Root23 = styled(Card)({
6703
+ display: "flex",
6704
+ flexDirection: "column",
6705
+ height: "100%",
6706
+ overflow: "hidden"
6707
+ });
6708
+ var Name5 = styled("h3")(({ theme }) => ({
6709
+ margin: 0,
6710
+ color: theme.palette.text.primary,
6711
+ fontFamily: theme.typography.fontFamily,
6712
+ fontSize: "1rem",
6713
+ fontWeight: 700,
6714
+ lineHeight: 1.4
6715
+ }));
6716
+ var Footer2 = styled("div")({
6717
+ display: "grid",
6718
+ gap: "1rem",
6719
+ marginTop: "auto",
6720
+ paddingTop: "1rem"
6721
+ });
6722
+ var ProductCard = forwardRef(
6723
+ ({
6724
+ name,
6725
+ imageUrl,
6726
+ imageAlt,
6727
+ price,
6728
+ originalPrice,
6729
+ currency,
6730
+ locale,
6731
+ lowestPrice,
6732
+ badge,
6733
+ badgeVariant = "success",
6734
+ imageRatio = "4/3",
6735
+ rating,
6736
+ reviewCount,
6737
+ ctaLabel = "Dodaj do koszyka",
6738
+ onAddToCart,
6739
+ buttonVariant = "primary",
6740
+ disabledButton = false,
6741
+ hideButton = false,
6742
+ ...props
6743
+ }, ref) => /* @__PURE__ */ jsxs(Root23, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: [
6744
+ /* @__PURE__ */ jsx(AspectRatio, { ratio: imageRatio, style: { margin: "-1.5rem -1.5rem 1rem", width: "calc(100% + 3rem)" }, children: /* @__PURE__ */ jsx(
6745
+ ProductCardImage,
6746
+ {
6747
+ src: imageUrl,
6748
+ alt: imageAlt ?? name,
6749
+ badge,
6750
+ badgeVariant
6751
+ }
6752
+ ) }),
6753
+ /* @__PURE__ */ jsx(Name5, { children: name }),
6754
+ rating !== void 0 && /* @__PURE__ */ jsx(Rating, { value: rating, count: reviewCount, size: "sm" }),
6755
+ /* @__PURE__ */ jsx(
6756
+ Price,
6757
+ {
6758
+ price,
6759
+ originalPrice,
6760
+ currency,
6761
+ locale,
6762
+ lowestPrice,
6763
+ style: { marginTop: "0.5rem" }
6764
+ }
6765
+ ),
6766
+ !hideButton && /* @__PURE__ */ jsx(Footer2, { children: /* @__PURE__ */ jsx(
6767
+ Button,
6768
+ {
6769
+ fullWidth: true,
6770
+ variant: buttonVariant,
6771
+ disabled: disabledButton,
6772
+ onClick: (e) => {
6773
+ e.stopPropagation();
6774
+ onAddToCart?.();
6775
+ },
6776
+ children: ctaLabel
6777
+ }
6778
+ ) })
6779
+ ] })
6780
+ );
6781
+ ProductCard.displayName = "ProductCard";
6782
+ var COLLAPSE_AT = "480px";
6783
+ var ContainerRoot = styled("div")({
6784
+ containerType: "inline-size",
6785
+ width: "100%",
6786
+ height: "100%"
6787
+ });
6788
+ var Inner = styled("div")({
6789
+ display: "flex",
6790
+ flexDirection: "row",
6791
+ height: "100%",
6792
+ [`@container (max-width: ${COLLAPSE_AT})`]: {
6793
+ flexDirection: "column"
6794
+ }
6795
+ });
6796
+ var ImageWrap3 = styled("div")({
6797
+ position: "relative",
6798
+ flexShrink: 0,
6799
+ width: "clamp(120px, 33%, 200px)",
6800
+ alignSelf: "stretch",
6801
+ margin: "-1.5rem 1rem -1.5rem -1.5rem",
6802
+ [`@container (max-width: ${COLLAPSE_AT})`]: {
6803
+ width: "auto",
6804
+ alignSelf: "auto",
6805
+ margin: "-1.5rem -1.5rem 1rem",
6806
+ aspectRatio: "4 / 3"
6807
+ }
6808
+ });
6809
+ var Content = styled("div")({
6810
+ display: "flex",
6811
+ flexDirection: "column",
6812
+ flex: 1,
6813
+ minWidth: 0
6814
+ });
6815
+ var Name6 = styled("h3")(({ theme }) => ({
6816
+ margin: 0,
6817
+ color: theme.palette.text.primary,
6818
+ fontFamily: theme.typography.fontFamily,
6819
+ fontSize: "1rem",
6820
+ fontWeight: 700,
6821
+ lineHeight: 1.4
6822
+ }));
6823
+ var Footer3 = styled("div")({
6824
+ display: "grid",
6825
+ gap: "1rem",
6826
+ marginTop: "auto",
6827
+ paddingTop: "1rem"
6828
+ });
6829
+ var ProductCardHorizontal = forwardRef(
6830
+ ({
6831
+ name,
6832
+ imageUrl,
6833
+ imageAlt,
6834
+ price,
6835
+ originalPrice,
6836
+ currency,
6837
+ locale,
6838
+ lowestPrice,
6839
+ badge,
6840
+ badgeVariant = "success",
6841
+ rating,
6842
+ reviewCount,
6843
+ ctaLabel = "Dodaj do koszyka",
6844
+ onAddToCart,
6845
+ ...props
6846
+ }, ref) => /* @__PURE__ */ jsx(Card, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: /* @__PURE__ */ jsx(ContainerRoot, { children: /* @__PURE__ */ jsxs(Inner, { children: [
6847
+ /* @__PURE__ */ jsx(ImageWrap3, { children: /* @__PURE__ */ jsx(ProductCardImage, { src: imageUrl, alt: imageAlt ?? name, badge, badgeVariant }) }),
6848
+ /* @__PURE__ */ jsxs(Content, { children: [
6849
+ /* @__PURE__ */ jsx(Name6, { children: name }),
6850
+ rating !== void 0 && /* @__PURE__ */ jsx(Rating, { value: rating, count: reviewCount, size: "sm" }),
6851
+ /* @__PURE__ */ jsx(
6852
+ Price,
6853
+ {
6854
+ price,
6855
+ originalPrice,
6856
+ currency,
6857
+ locale,
6858
+ lowestPrice,
6859
+ style: { marginTop: "0.5rem" }
6860
+ }
6861
+ ),
6862
+ /* @__PURE__ */ jsx(Footer3, { children: /* @__PURE__ */ jsx(
6863
+ Button,
6864
+ {
6865
+ fullWidth: true,
6866
+ onClick: (e) => {
6867
+ e.stopPropagation();
6868
+ onAddToCart?.();
6869
+ },
6870
+ children: ctaLabel
6871
+ }
6872
+ ) })
6873
+ ] })
6874
+ ] }) }) })
6875
+ );
6876
+ ProductCardHorizontal.displayName = "ProductCardHorizontal";
6877
+ var Root24 = styled(Card, {
6572
6878
  shouldForwardProp: (prop) => prop !== "$align"
6573
6879
  })(({ $align }) => ({
6574
6880
  textAlign: $align,
6575
6881
  height: "100%"
6576
6882
  }));
6577
- var Value = styled("p")(({ theme }) => ({
6883
+ var Value2 = styled("p")(({ theme }) => ({
6578
6884
  margin: 0,
6579
6885
  fontFamily: theme.typography.fontFamily,
6580
6886
  fontSize: "2.5rem",
@@ -6598,19 +6904,85 @@ var Description3 = styled("p")(({ theme }) => ({
6598
6904
  lineHeight: 1.5
6599
6905
  }));
6600
6906
  var StatCard = forwardRef(
6601
- ({ stat, cardVariant = "default", align = "center", ...props }, ref) => /* @__PURE__ */ jsxs(Root21, { ref, variant: cardVariant, padding: "lg", rounded: "lg", $align: align, ...props, children: [
6602
- /* @__PURE__ */ jsx(Value, { children: stat.value }),
6907
+ ({ stat, cardVariant = "default", align = "center", ...props }, ref) => /* @__PURE__ */ jsxs(Root24, { ref, variant: cardVariant, padding: "lg", rounded: "lg", $align: align, ...props, children: [
6908
+ /* @__PURE__ */ jsx(Value2, { children: stat.value }),
6603
6909
  /* @__PURE__ */ jsx(Label3, { children: stat.label }),
6604
6910
  stat.description && /* @__PURE__ */ jsx(Description3, { children: stat.description })
6605
6911
  ] })
6606
6912
  );
6607
- StatCard.displayName = "StatCard";
6608
- var Root22 = styled(Card)({
6609
- display: "flex",
6610
- flexDirection: "column",
6611
- gap: "1.25rem",
6612
- height: "100%"
6613
- });
6913
+ StatCard.displayName = "StatCard";
6914
+ var Img4 = styled("img")({
6915
+ width: "4rem",
6916
+ height: "4rem",
6917
+ flexShrink: 0,
6918
+ borderRadius: "50%",
6919
+ objectFit: "cover"
6920
+ });
6921
+ function deriveInitials2(name) {
6922
+ return name.split(" ").filter(Boolean).slice(0, 2).map((part) => part[0]).join("").toUpperCase();
6923
+ }
6924
+ var TeamMemberAvatar = ({
6925
+ name,
6926
+ avatarUrl,
6927
+ avatarAlt,
6928
+ initials,
6929
+ avatarColor = "primary"
6930
+ }) => {
6931
+ if (avatarUrl) {
6932
+ return /* @__PURE__ */ jsx(Img4, { src: avatarUrl, alt: avatarAlt ?? name });
6933
+ }
6934
+ return /* @__PURE__ */ jsx(Avatar, { initials: initials ?? deriveInitials2(name), size: "xl", color: avatarColor });
6935
+ };
6936
+ TeamMemberAvatar.displayName = "TeamMemberAvatar";
6937
+ var Root25 = styled("div")({ minWidth: 0 });
6938
+ var Name7 = styled("h3")(({ theme }) => ({
6939
+ margin: 0,
6940
+ color: theme.palette.text.primary,
6941
+ fontFamily: theme.typography.fontFamily,
6942
+ fontSize: "1rem",
6943
+ fontWeight: 700,
6944
+ lineHeight: 1.4
6945
+ }));
6946
+ var Role = styled("p")(({ theme }) => ({
6947
+ margin: "0.25rem 0 0",
6948
+ color: theme.palette.text.secondary,
6949
+ fontFamily: theme.typography.fontFamily,
6950
+ fontSize: "0.875rem",
6951
+ lineHeight: 1.5
6952
+ }));
6953
+ var TeamMemberInfo = ({ name, role }) => /* @__PURE__ */ jsxs(Root25, { children: [
6954
+ /* @__PURE__ */ jsx(Name7, { children: name }),
6955
+ role && /* @__PURE__ */ jsx(Role, { children: role })
6956
+ ] });
6957
+ TeamMemberInfo.displayName = "TeamMemberInfo";
6958
+ var Root26 = styled(Card)(({ theme }) => ({
6959
+ display: "flex",
6960
+ alignItems: "center",
6961
+ gap: "1rem",
6962
+ height: "100%",
6963
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease",
6964
+ "&:hover": {
6965
+ borderColor: theme.palette.primary.main,
6966
+ boxShadow: theme.shadows[2],
6967
+ transform: "translateY(-2px)"
6968
+ }
6969
+ }));
6970
+ var TeamMemberCard = forwardRef(
6971
+ ({ member, cardVariant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(Root26, { ref, variant: cardVariant, padding: "lg", rounded: "lg", ...props, children: [
6972
+ /* @__PURE__ */ jsx(
6973
+ TeamMemberAvatar,
6974
+ {
6975
+ name: member.name,
6976
+ avatarUrl: member.avatarUrl,
6977
+ avatarAlt: member.avatarAlt,
6978
+ initials: member.initials,
6979
+ avatarColor: member.avatarColor
6980
+ }
6981
+ ),
6982
+ /* @__PURE__ */ jsx(TeamMemberInfo, { name: member.name, role: member.role })
6983
+ ] })
6984
+ );
6985
+ TeamMemberCard.displayName = "TeamMemberCard";
6614
6986
  var Quote = styled("blockquote")(({ theme }) => ({
6615
6987
  margin: 0,
6616
6988
  fontFamily: theme.typography.fontFamily,
@@ -6631,104 +7003,162 @@ var Quote = styled("blockquote")(({ theme }) => ({
6631
7003
  marginLeft: "0.125rem"
6632
7004
  }
6633
7005
  }));
6634
- var Footer3 = styled("div")({
7006
+ var TestimonialQuote = ({ quote }) => /* @__PURE__ */ jsx(Quote, { children: quote });
7007
+ TestimonialQuote.displayName = "TestimonialQuote";
7008
+ var Root27 = styled("div")({
6635
7009
  display: "flex",
6636
7010
  alignItems: "center",
6637
7011
  gap: "0.75rem"
6638
7012
  });
6639
- var AvatarImage = styled("img")({
7013
+ var AvatarImg2 = styled("img")({
6640
7014
  width: "2.5rem",
6641
7015
  height: "2.5rem",
6642
7016
  borderRadius: "50%",
6643
7017
  objectFit: "cover",
6644
7018
  flexShrink: 0
6645
7019
  });
6646
- var AuthorInfo = styled("div")({
6647
- minWidth: 0
6648
- });
6649
- var AuthorName = styled("p")(({ theme }) => ({
7020
+ var Info = styled("div")({ minWidth: 0 });
7021
+ var Name8 = styled("p")(({ theme }) => ({
6650
7022
  margin: 0,
6651
7023
  fontFamily: theme.typography.fontFamily,
6652
7024
  fontSize: "0.875rem",
6653
7025
  fontWeight: 700,
6654
7026
  color: theme.palette.text.primary
6655
7027
  }));
6656
- var AuthorRole = styled("p")(({ theme }) => ({
7028
+ var Role2 = styled("p")(({ theme }) => ({
6657
7029
  margin: "0.125rem 0 0",
6658
7030
  fontFamily: theme.typography.fontFamily,
6659
7031
  fontSize: "0.8125rem",
6660
7032
  color: theme.palette.text.secondary
6661
7033
  }));
7034
+ function deriveInitials3(name) {
7035
+ return name.split(" ").filter(Boolean).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
7036
+ }
7037
+ var TestimonialAuthor = ({
7038
+ authorName,
7039
+ authorRole,
7040
+ authorAvatarUrl,
7041
+ authorInitials
7042
+ }) => /* @__PURE__ */ jsxs(Root27, { children: [
7043
+ authorAvatarUrl ? /* @__PURE__ */ jsx(AvatarImg2, { src: authorAvatarUrl, alt: authorName }) : /* @__PURE__ */ jsx(Avatar, { initials: authorInitials ?? deriveInitials3(authorName), size: "md", color: "primary" }),
7044
+ /* @__PURE__ */ jsxs(Info, { children: [
7045
+ /* @__PURE__ */ jsx(Name8, { children: authorName }),
7046
+ authorRole && /* @__PURE__ */ jsx(Role2, { children: authorRole })
7047
+ ] })
7048
+ ] });
7049
+ TestimonialAuthor.displayName = "TestimonialAuthor";
7050
+ var Root28 = styled(Card)({
7051
+ display: "flex",
7052
+ flexDirection: "column",
7053
+ gap: "1.25rem",
7054
+ height: "100%"
7055
+ });
6662
7056
  var TestimonialCard = forwardRef(
6663
- ({ testimonial, cardVariant = "default", ...props }, ref) => {
6664
- const initials = testimonial.authorInitials ?? testimonial.authorName.split(" ").filter(Boolean).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
6665
- return /* @__PURE__ */ jsxs(Root22, { ref, variant: cardVariant, padding: "lg", rounded: "lg", ...props, children: [
6666
- testimonial.rating && /* @__PURE__ */ jsx(Rating, { value: testimonial.rating, readonly: true, size: "sm" }),
6667
- /* @__PURE__ */ jsx(Quote, { children: testimonial.quote }),
6668
- /* @__PURE__ */ jsxs(Footer3, { children: [
6669
- testimonial.authorAvatarUrl ? /* @__PURE__ */ jsx(AvatarImage, { src: testimonial.authorAvatarUrl, alt: testimonial.authorName }) : /* @__PURE__ */ jsx(Avatar, { initials, size: "md", color: "primary" }),
6670
- /* @__PURE__ */ jsxs(AuthorInfo, { children: [
6671
- /* @__PURE__ */ jsx(AuthorName, { children: testimonial.authorName }),
6672
- testimonial.authorRole && /* @__PURE__ */ jsx(AuthorRole, { children: testimonial.authorRole })
6673
- ] })
6674
- ] })
6675
- ] });
6676
- }
7057
+ ({ testimonial, cardVariant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(Root28, { ref, variant: cardVariant, padding: "lg", rounded: "lg", ...props, children: [
7058
+ testimonial.rating && /* @__PURE__ */ jsx(Rating, { value: testimonial.rating, readonly: true, size: "sm" }),
7059
+ /* @__PURE__ */ jsx(TestimonialQuote, { quote: testimonial.quote }),
7060
+ /* @__PURE__ */ jsx(
7061
+ TestimonialAuthor,
7062
+ {
7063
+ authorName: testimonial.authorName,
7064
+ authorRole: testimonial.authorRole,
7065
+ authorAvatarUrl: testimonial.authorAvatarUrl,
7066
+ authorInitials: testimonial.authorInitials
7067
+ }
7068
+ )
7069
+ ] })
6677
7070
  );
6678
7071
  TestimonialCard.displayName = "TestimonialCard";
6679
- var Root23 = styled(Card)(({ theme }) => ({
7072
+ var Root29 = styled("div")(({ theme }) => ({
7073
+ position: "relative",
7074
+ padding: "1.5rem",
7075
+ borderRadius: "1rem",
7076
+ border: `2px dashed ${theme.palette.primary.main}`,
7077
+ backgroundColor: theme.palette.background.paper,
7078
+ fontFamily: theme.typography.fontFamily,
6680
7079
  display: "flex",
6681
- alignItems: "center",
6682
- gap: "1rem",
6683
- height: "100%",
6684
- transition: "border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease",
6685
- "&:hover": {
6686
- borderColor: theme.palette.primary.main,
6687
- boxShadow: theme.shadows[2],
6688
- transform: "translateY(-2px)"
6689
- }
7080
+ flexDirection: "column",
7081
+ gap: "1rem"
6690
7082
  }));
6691
- var AvatarImage2 = styled("img")({
6692
- width: "4rem",
6693
- height: "4rem",
6694
- flexShrink: 0,
6695
- borderRadius: "50%",
6696
- objectFit: "cover"
6697
- });
6698
- var Content3 = styled("div")({
6699
- minWidth: 0
7083
+ var Header = styled("div")({
7084
+ display: "flex",
7085
+ alignItems: "center",
7086
+ gap: "0.75rem"
6700
7087
  });
6701
- var Name5 = styled("h3")(({ theme }) => ({
6702
- margin: 0,
6703
- color: theme.palette.text.primary,
6704
- fontFamily: theme.typography.fontFamily,
6705
- fontSize: "1rem",
6706
- fontWeight: 700,
6707
- lineHeight: 1.4
7088
+ var Discount = styled("span")(({ theme }) => ({
7089
+ fontSize: "2rem",
7090
+ fontWeight: 800,
7091
+ lineHeight: 1,
7092
+ color: theme.palette.primary.main
6708
7093
  }));
6709
- var Role = styled("p")(({ theme }) => ({
6710
- margin: "0.25rem 0 0",
6711
- color: theme.palette.text.secondary,
6712
- fontFamily: theme.typography.fontFamily,
7094
+ var Description4 = styled("p")(({ theme }) => ({
7095
+ margin: 0,
6713
7096
  fontSize: "0.875rem",
7097
+ color: theme.palette.text.secondary,
6714
7098
  lineHeight: 1.5
6715
7099
  }));
6716
- function getInitials(member) {
6717
- if (member.initials) {
6718
- return member.initials;
7100
+ var CodeRow = styled("div")(({ theme }) => ({
7101
+ display: "flex",
7102
+ alignItems: "center",
7103
+ gap: "0.5rem",
7104
+ padding: "0.625rem 1rem",
7105
+ backgroundColor: theme.palette.action.hover,
7106
+ borderRadius: theme.shape.borderRadius
7107
+ }));
7108
+ var Code = styled("span")(({ theme }) => ({
7109
+ flex: 1,
7110
+ fontFamily: "monospace",
7111
+ fontSize: "1rem",
7112
+ fontWeight: 700,
7113
+ letterSpacing: "0.1em",
7114
+ color: theme.palette.text.primary,
7115
+ userSelect: "all"
7116
+ }));
7117
+ var CopyButton = styled("button")(({ theme }) => ({
7118
+ border: 0,
7119
+ background: "transparent",
7120
+ color: theme.palette.primary.main,
7121
+ cursor: "pointer",
7122
+ padding: "0.25rem",
7123
+ display: "flex",
7124
+ alignItems: "center",
7125
+ borderRadius: theme.shape.borderRadius,
7126
+ transition: "background-color 150ms ease",
7127
+ "&:hover": {
7128
+ backgroundColor: theme.palette.action.hover
6719
7129
  }
6720
- return member.name.split(" ").filter(Boolean).slice(0, 2).map((part) => part[0]).join("").toUpperCase();
6721
- }
6722
- var TeamMemberCard = forwardRef(
6723
- ({ member, cardVariant = "default", ...props }, ref) => /* @__PURE__ */ jsxs(Root23, { ref, variant: cardVariant, padding: "lg", rounded: "lg", ...props, children: [
6724
- member.avatarUrl ? /* @__PURE__ */ jsx(AvatarImage2, { src: member.avatarUrl, alt: member.avatarAlt ?? member.name }) : /* @__PURE__ */ jsx(Avatar, { initials: getInitials(member), size: "xl", color: member.avatarColor ?? "primary" }),
6725
- /* @__PURE__ */ jsxs(Content3, { children: [
6726
- /* @__PURE__ */ jsx(Name5, { children: member.name }),
6727
- /* @__PURE__ */ jsx(Role, { children: member.role })
7130
+ }));
7131
+ var Expiry = styled("p")(({ theme }) => ({
7132
+ margin: 0,
7133
+ fontSize: "0.75rem",
7134
+ color: theme.palette.text.disabled
7135
+ }));
7136
+ var VoucherCard = forwardRef(
7137
+ ({ code, discount, description, expiresAt, copied = false, onCopy, ...props }, ref) => /* @__PURE__ */ jsxs(Root29, { ref, ...props, children: [
7138
+ /* @__PURE__ */ jsxs(Header, { children: [
7139
+ /* @__PURE__ */ jsx(LocalOfferIcon, { style: { fontSize: 20 }, color: "primary" }),
7140
+ /* @__PURE__ */ jsx(Discount, { children: discount })
7141
+ ] }),
7142
+ description && /* @__PURE__ */ jsx(Description4, { children: description }),
7143
+ /* @__PURE__ */ jsxs(CodeRow, { children: [
7144
+ /* @__PURE__ */ jsx(Code, { children: code }),
7145
+ /* @__PURE__ */ jsx(
7146
+ CopyButton,
7147
+ {
7148
+ type: "button",
7149
+ "aria-label": copied ? "Skopiowano" : "Kopiuj kod",
7150
+ onClick: () => onCopy?.(code),
7151
+ children: copied ? /* @__PURE__ */ jsx(CheckIcon, { style: { fontSize: 18, color: "green" } }) : /* @__PURE__ */ jsx(ContentCopyIcon, { style: { fontSize: 18 } })
7152
+ }
7153
+ )
7154
+ ] }),
7155
+ expiresAt && /* @__PURE__ */ jsxs(Expiry, { children: [
7156
+ "Wa\u017Cny do: ",
7157
+ expiresAt
6728
7158
  ] })
6729
7159
  ] })
6730
7160
  );
6731
- TeamMemberCard.displayName = "TeamMemberCard";
7161
+ VoucherCard.displayName = "VoucherCard";
6732
7162
  var Wrapper3 = styled("div")({
6733
7163
  width: "100%",
6734
7164
  overflowX: "auto",
@@ -6813,7 +7243,7 @@ var RemoveBtn = styled("button")(({ theme }) => ({
6813
7243
  }
6814
7244
  }));
6815
7245
  var Tbody = styled("tbody")({});
6816
- var Row3 = styled("tr", {
7246
+ var Row4 = styled("tr", {
6817
7247
  shouldForwardProp: (p) => p !== "$diff"
6818
7248
  })(({ theme, $diff }) => ({
6819
7249
  backgroundColor: $diff ? theme.palette.mode === "dark" ? "rgba(255,255,255,0.03)" : "rgba(0,0,0,0.02)" : "transparent",
@@ -6834,210 +7264,75 @@ var ValueCell = styled("td", {
6834
7264
  })(({ theme, $highlight }) => ({
6835
7265
  padding: "0.75rem 1rem",
6836
7266
  textAlign: "center",
6837
- fontSize: "0.9375rem",
6838
- color: theme.palette.text.primary,
6839
- borderBottom: `1px solid ${theme.palette.divider}`,
6840
- fontWeight: $highlight ? 700 : 400,
6841
- backgroundColor: $highlight ? theme.palette.mode === "dark" ? "rgba(99,102,241,0.08)" : "rgba(99,102,241,0.06)" : "transparent"
6842
- }));
6843
- var BoolIcon = ({ value }) => /* @__PURE__ */ jsx("span", { "aria-label": value ? "Tak" : "Nie", style: { display: "inline-flex", fontSize: "1.125rem" }, children: value ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CloseIcon, {}) });
6844
- function formatValue(v) {
6845
- if (typeof v === "boolean") return /* @__PURE__ */ jsx(BoolIcon, { value: v });
6846
- return String(v);
6847
- }
6848
- function isDiff(specKey, products) {
6849
- const values = products.map((p) => p.specs[specKey]);
6850
- return values.some((v) => String(v) !== String(values[0]));
6851
- }
6852
- function getSpecKeys(products) {
6853
- const keys = /* @__PURE__ */ new Set();
6854
- products.forEach((p) => Object.keys(p.specs).forEach((k) => keys.add(k)));
6855
- return Array.from(keys);
6856
- }
6857
- function CompareTool({
6858
- products,
6859
- specLabels = {},
6860
- onRemove,
6861
- highlightDifferences = true,
6862
- className
6863
- }) {
6864
- if (!products.length) return null;
6865
- const specKeys = getSpecKeys(products);
6866
- const bestValues = {};
6867
- specKeys.forEach((key) => {
6868
- const nums = products.map((p) => p.specs[key]).filter((v) => typeof v === "number");
6869
- if (nums.length === products.length) {
6870
- bestValues[key] = Math.max(...nums);
6871
- }
6872
- });
6873
- return /* @__PURE__ */ jsx(Wrapper3, { className, children: /* @__PURE__ */ jsxs(Table, { role: "table", "aria-label": "Por\xF3wnanie produkt\xF3w", children: [
6874
- /* @__PURE__ */ jsx(Thead, { children: /* @__PURE__ */ jsxs("tr", { children: [
6875
- /* @__PURE__ */ jsx(HeaderCell, { $isLabel: true, as: "th", scope: "col", children: "Parametr" }),
6876
- products.map((p) => /* @__PURE__ */ jsxs(HeaderCell, { as: "th", scope: "col", children: [
6877
- p.imageUrl ? /* @__PURE__ */ jsx(ProductImage, { src: p.imageUrl, alt: p.name }) : /* @__PURE__ */ jsx(ProductImagePlaceholder, { "aria-hidden": "true" }),
6878
- /* @__PURE__ */ jsx(ProductName, { children: p.name }),
6879
- /* @__PURE__ */ jsx(ProductPrice, { children: p.price }),
6880
- onRemove && /* @__PURE__ */ jsx(
6881
- RemoveBtn,
6882
- {
6883
- type: "button",
6884
- "aria-label": `Usu\u0144 ${p.name} z por\xF3wnania`,
6885
- onClick: () => onRemove(p.id),
6886
- children: "Usu\u0144"
6887
- }
6888
- )
6889
- ] }, p.id))
6890
- ] }) }),
6891
- /* @__PURE__ */ jsx(Tbody, { children: specKeys.map((key) => {
6892
- const diff = highlightDifferences && isDiff(key, products);
6893
- return /* @__PURE__ */ jsxs(Row3, { $diff: diff, children: [
6894
- /* @__PURE__ */ jsx(LabelCell, { as: "th", scope: "row", children: specLabels[key] ?? key }),
6895
- products.map((p) => {
6896
- const val = p.specs[key];
6897
- const isHighlighted = highlightDifferences && key in bestValues && typeof val === "number" && val === bestValues[key];
6898
- return /* @__PURE__ */ jsx(ValueCell, { $highlight: isHighlighted, children: val !== void 0 ? formatValue(val) : /* @__PURE__ */ jsx("span", { "aria-label": "Brak danych", children: "\u2014" }) }, p.id);
6899
- })
6900
- ] }, key);
6901
- }) })
6902
- ] }) });
6903
- }
6904
- function calcTimeLeft(target) {
6905
- const diff = new Date(target).getTime() - Date.now();
6906
- if (diff <= 0) return null;
6907
- return {
6908
- days: Math.floor(diff / 864e5),
6909
- hours: Math.floor(diff % 864e5 / 36e5),
6910
- minutes: Math.floor(diff % 36e5 / 6e4),
6911
- seconds: Math.floor(diff % 6e4 / 1e3)
6912
- };
6913
- }
6914
- function pad(n) {
6915
- return String(n).padStart(2, "0");
6916
- }
6917
- var Root24 = styled("div", {
6918
- shouldForwardProp: (prop) => prop !== "$variant"
6919
- })(({ theme, $variant }) => ({
6920
- display: "inline-flex",
6921
- alignItems: "center",
6922
- justifyContent: "space-between",
6923
- flexWrap: "wrap",
6924
- gap: "0.5rem",
6925
- fontFamily: theme.typography.fontFamily,
6926
- ...$variant === "card" && {
6927
- backgroundColor: theme.palette.background.paper,
6928
- border: `1px solid ${theme.palette.divider}`,
6929
- borderRadius: theme.shape.borderRadius,
6930
- padding: "1rem 1.5rem"
6931
- },
6932
- ...$variant === "banner" && {
6933
- backgroundColor: theme.palette.error.main,
6934
- color: "#fff",
6935
- borderRadius: theme.shape.borderRadius,
6936
- padding: "0.75rem 1.25rem"
6937
- }
6938
- }));
6939
- var TimerLabel = styled("span", {
6940
- shouldForwardProp: (prop) => prop !== "$variant"
6941
- })(({ theme, $variant }) => ({
6942
- fontSize: "0.875rem",
6943
- fontWeight: 600,
6944
- color: $variant === "banner" ? "rgba(255,255,255,0.85)" : theme.palette.text.secondary,
6945
- marginRight: "0.25rem"
6946
- }));
6947
- var Segments = styled("div")({
6948
- display: "flex",
6949
- alignItems: "center",
6950
- gap: "0.25rem"
6951
- });
6952
- var Segment = styled("div", {
6953
- shouldForwardProp: (prop) => prop !== "$variant"
6954
- })(({ theme, $variant }) => ({
6955
- display: "flex",
6956
- flexDirection: "column",
6957
- alignItems: "center",
6958
- minWidth: "2.5rem",
6959
- ...$variant === "card" && {
6960
- backgroundColor: theme.palette.action.hover,
6961
- borderRadius: "0.375rem",
6962
- padding: "0.375rem 0.5rem"
6963
- }
6964
- }));
6965
- var Value2 = styled("span", {
6966
- shouldForwardProp: (prop) => prop !== "$variant"
6967
- })(({ $variant }) => ({
6968
- fontSize: $variant === "inline" ? "1rem" : "1.5rem",
6969
- fontWeight: 700,
6970
- lineHeight: 1,
6971
- color: $variant === "banner" ? "#fff" : "inherit"
6972
- }));
6973
- var Unit = styled("span", {
6974
- shouldForwardProp: (prop) => prop !== "$variant"
6975
- })(({ theme, $variant }) => ({
6976
- fontSize: "0.6875rem",
6977
- color: $variant === "banner" ? "rgba(255,255,255,0.7)" : theme.palette.text.secondary,
6978
- marginTop: "0.125rem"
6979
- }));
6980
- var Colon = styled("span", {
6981
- shouldForwardProp: (prop) => prop !== "$variant"
6982
- })(({ theme, $variant }) => ({
6983
- fontSize: $variant === "inline" ? "1rem" : "1.5rem",
6984
- fontWeight: 700,
6985
- color: $variant === "banner" ? "rgba(255,255,255,0.6)" : theme.palette.text.disabled,
6986
- alignSelf: $variant === "card" ? "flex-start" : "center",
6987
- marginTop: $variant === "card" ? "0.375rem" : 0
7267
+ fontSize: "0.9375rem",
7268
+ color: theme.palette.text.primary,
7269
+ borderBottom: `1px solid ${theme.palette.divider}`,
7270
+ fontWeight: $highlight ? 700 : 400,
7271
+ backgroundColor: $highlight ? theme.palette.mode === "dark" ? "rgba(99,102,241,0.08)" : "rgba(99,102,241,0.06)" : "transparent"
6988
7272
  }));
6989
- var UNITS = ["dni", "godz", "min", "sek"];
6990
- var CountdownTimer = forwardRef(
6991
- ({
6992
- targetDate,
6993
- variant = "inline",
6994
- label,
6995
- expiredLabel = "Promocja zako\u0144czona",
6996
- onExpire,
6997
- ...props
6998
- }, ref) => {
6999
- const [timeLeft, setTimeLeft] = useState(() => calcTimeLeft(targetDate));
7000
- useEffect(() => {
7001
- const id = setInterval(() => {
7002
- const tl = calcTimeLeft(targetDate);
7003
- setTimeLeft(tl);
7004
- if (!tl) {
7005
- clearInterval(id);
7006
- onExpire?.();
7007
- }
7008
- }, 1e3);
7009
- return () => clearInterval(id);
7010
- }, [targetDate, onExpire]);
7011
- if (!timeLeft) {
7012
- return /* @__PURE__ */ jsx(Root24, { ref, $variant: variant, ...props, children: /* @__PURE__ */ jsx(TimerLabel, { $variant: variant, children: expiredLabel }) });
7273
+ var BoolIcon = ({ value }) => /* @__PURE__ */ jsx("span", { "aria-label": value ? "Tak" : "Nie", style: { display: "inline-flex", fontSize: "1.125rem" }, children: value ? /* @__PURE__ */ jsx(CheckIcon, {}) : /* @__PURE__ */ jsx(CloseIcon, {}) });
7274
+ function formatValue(v) {
7275
+ if (typeof v === "boolean") return /* @__PURE__ */ jsx(BoolIcon, { value: v });
7276
+ return String(v);
7277
+ }
7278
+ function isDiff(specKey, products) {
7279
+ const values = products.map((p) => p.specs[specKey]);
7280
+ return values.some((v) => String(v) !== String(values[0]));
7281
+ }
7282
+ function getSpecKeys(products) {
7283
+ const keys = /* @__PURE__ */ new Set();
7284
+ products.forEach((p) => Object.keys(p.specs).forEach((k) => keys.add(k)));
7285
+ return Array.from(keys);
7286
+ }
7287
+ function CompareTool({
7288
+ products,
7289
+ specLabels = {},
7290
+ onRemove,
7291
+ highlightDifferences = true,
7292
+ className
7293
+ }) {
7294
+ if (!products.length) return null;
7295
+ const specKeys = getSpecKeys(products);
7296
+ const bestValues = {};
7297
+ specKeys.forEach((key) => {
7298
+ const nums = products.map((p) => p.specs[key]).filter((v) => typeof v === "number");
7299
+ if (nums.length === products.length) {
7300
+ bestValues[key] = Math.max(...nums);
7013
7301
  }
7014
- const parts = [timeLeft.days, timeLeft.hours, timeLeft.minutes, timeLeft.seconds];
7015
- return /* @__PURE__ */ jsxs(
7016
- Root24,
7017
- {
7018
- ref,
7019
- $variant: variant,
7020
- "aria-live": "polite",
7021
- "aria-label": `Czas do ko\u0144ca promocji`,
7022
- ...props,
7023
- children: [
7024
- label && /* @__PURE__ */ jsx(TimerLabel, { $variant: variant, children: label }),
7025
- /* @__PURE__ */ jsx(Segments, { children: parts.map((val, i) => /* @__PURE__ */ jsxs("div", { style: { display: "contents" }, children: [
7026
- i > 0 && /* @__PURE__ */ jsx(Colon, { $variant: variant, children: ":" }),
7027
- /* @__PURE__ */ jsxs(Segment, { $variant: variant, children: [
7028
- /* @__PURE__ */ jsx(Value2, { $variant: variant, children: pad(val) }),
7029
- variant !== "inline" && /* @__PURE__ */ jsx(Unit, { $variant: variant, children: UNITS[i] })
7030
- ] })
7031
- ] }, UNITS[i])) })
7032
- ]
7033
- }
7034
- );
7035
- }
7036
- );
7037
- CountdownTimer.displayName = "CountdownTimer";
7038
- var countdownTimerVariants = ["inline", "card", "banner"];
7302
+ });
7303
+ return /* @__PURE__ */ jsx(Wrapper3, { className, children: /* @__PURE__ */ jsxs(Table, { role: "table", "aria-label": "Por\xF3wnanie produkt\xF3w", children: [
7304
+ /* @__PURE__ */ jsx(Thead, { children: /* @__PURE__ */ jsxs("tr", { children: [
7305
+ /* @__PURE__ */ jsx(HeaderCell, { $isLabel: true, as: "th", scope: "col", children: "Parametr" }),
7306
+ products.map((p) => /* @__PURE__ */ jsxs(HeaderCell, { as: "th", scope: "col", children: [
7307
+ p.imageUrl ? /* @__PURE__ */ jsx(ProductImage, { src: p.imageUrl, alt: p.name }) : /* @__PURE__ */ jsx(ProductImagePlaceholder, { "aria-hidden": "true" }),
7308
+ /* @__PURE__ */ jsx(ProductName, { children: p.name }),
7309
+ /* @__PURE__ */ jsx(ProductPrice, { children: p.price }),
7310
+ onRemove && /* @__PURE__ */ jsx(
7311
+ RemoveBtn,
7312
+ {
7313
+ type: "button",
7314
+ "aria-label": `Usu\u0144 ${p.name} z por\xF3wnania`,
7315
+ onClick: () => onRemove(p.id),
7316
+ children: "Usu\u0144"
7317
+ }
7318
+ )
7319
+ ] }, p.id))
7320
+ ] }) }),
7321
+ /* @__PURE__ */ jsx(Tbody, { children: specKeys.map((key) => {
7322
+ const diff = highlightDifferences && isDiff(key, products);
7323
+ return /* @__PURE__ */ jsxs(Row4, { $diff: diff, children: [
7324
+ /* @__PURE__ */ jsx(LabelCell, { as: "th", scope: "row", children: specLabels[key] ?? key }),
7325
+ products.map((p) => {
7326
+ const val = p.specs[key];
7327
+ const isHighlighted = highlightDifferences && key in bestValues && typeof val === "number" && val === bestValues[key];
7328
+ return /* @__PURE__ */ jsx(ValueCell, { $highlight: isHighlighted, children: val !== void 0 ? formatValue(val) : /* @__PURE__ */ jsx("span", { "aria-label": "Brak danych", children: "\u2014" }) }, p.id);
7329
+ })
7330
+ ] }, key);
7331
+ }) })
7332
+ ] }) });
7333
+ }
7039
7334
  var spin2 = keyframes`to { transform: rotate(360deg); }`;
7040
- var Root25 = styled("div")({
7335
+ var Root30 = styled("div")({
7041
7336
  display: "flex",
7042
7337
  flexDirection: "column",
7043
7338
  gap: "0.5rem"
@@ -7184,7 +7479,7 @@ function CouponInput({
7184
7479
  if (e.key === "Enter") handleApply();
7185
7480
  };
7186
7481
  if (appliedCode) {
7187
- return /* @__PURE__ */ jsxs(Root25, { className, children: [
7482
+ return /* @__PURE__ */ jsxs(Root30, { className, children: [
7188
7483
  /* @__PURE__ */ jsxs(AppliedRow, { role: "status", "aria-label": `Kod rabatowy ${appliedCode} zastosowany`, children: [
7189
7484
  /* @__PURE__ */ jsx(AppliedCode, { children: appliedCode }),
7190
7485
  onRemove && /* @__PURE__ */ jsx(
@@ -7203,7 +7498,7 @@ function CouponInput({
7203
7498
  ] })
7204
7499
  ] });
7205
7500
  }
7206
- return /* @__PURE__ */ jsxs(Root25, { className, children: [
7501
+ return /* @__PURE__ */ jsxs(Root30, { className, children: [
7207
7502
  /* @__PURE__ */ jsxs(InputRow, { $hasError: Boolean(error), $applied: false, children: [
7208
7503
  /* @__PURE__ */ jsx(
7209
7504
  Input,
@@ -7235,7 +7530,7 @@ function CouponInput({
7235
7530
  error && /* @__PURE__ */ jsx(Message, { $type: "error", id: errorId, role: "alert", children: error })
7236
7531
  ] });
7237
7532
  }
7238
- var Root26 = styled("div")({
7533
+ var Root31 = styled("div")({
7239
7534
  display: "flex",
7240
7535
  flexDirection: "column",
7241
7536
  gap: "0.5rem"
@@ -7271,8 +7566,8 @@ var IconWrap = styled("span")(({ theme }) => ({
7271
7566
  color: theme.palette.text.secondary,
7272
7567
  display: "flex"
7273
7568
  }));
7274
- var Info = styled("div")({ flex: 1 });
7275
- var Name6 = styled("div")(({ theme }) => ({
7569
+ var Info2 = styled("div")({ flex: 1 });
7570
+ var Name9 = styled("div")(({ theme }) => ({
7276
7571
  fontSize: "0.9375rem",
7277
7572
  fontWeight: 600,
7278
7573
  color: theme.palette.text.primary
@@ -7283,7 +7578,7 @@ var Desc = styled("div")(({ theme }) => ({
7283
7578
  marginTop: "0.125rem"
7284
7579
  }));
7285
7580
  var PaymentMethodSelector = forwardRef(
7286
- ({ methods, value, onChange, label = "Metoda p\u0142atno\u015Bci", disabled, ...props }, ref) => /* @__PURE__ */ jsxs(Root26, { ref, ...props, children: [
7581
+ ({ methods, value, onChange, label = "Metoda p\u0142atno\u015Bci", disabled, ...props }, ref) => /* @__PURE__ */ jsxs(Root31, { ref, ...props, children: [
7287
7582
  /* @__PURE__ */ jsx(GroupLabel, { children: label }),
7288
7583
  methods.map((method) => {
7289
7584
  const selected = value === method.id;
@@ -7301,8 +7596,8 @@ var PaymentMethodSelector = forwardRef(
7301
7596
  }
7302
7597
  ),
7303
7598
  /* @__PURE__ */ jsx(IconWrap, { children: method.icon ?? /* @__PURE__ */ jsx(CreditCardOutlinedIcon, { "aria-hidden": true }) }),
7304
- /* @__PURE__ */ jsxs(Info, { children: [
7305
- /* @__PURE__ */ jsx(Name6, { children: method.label }),
7599
+ /* @__PURE__ */ jsxs(Info2, { children: [
7600
+ /* @__PURE__ */ jsx(Name9, { children: method.label }),
7306
7601
  method.description && /* @__PURE__ */ jsx(Desc, { children: method.description })
7307
7602
  ] })
7308
7603
  ] }, method.id);
@@ -7310,7 +7605,7 @@ var PaymentMethodSelector = forwardRef(
7310
7605
  ] })
7311
7606
  );
7312
7607
  PaymentMethodSelector.displayName = "PaymentMethodSelector";
7313
- var Root27 = styled("div")({
7608
+ var Root32 = styled("div")({
7314
7609
  display: "grid",
7315
7610
  gap: "0.75rem"
7316
7611
  });
@@ -7337,7 +7632,7 @@ var ThumbnailImage = styled("img")({
7337
7632
  objectFit: "cover"
7338
7633
  });
7339
7634
  var ProductGallery = forwardRef(
7340
- ({ images, selectedIndex, onSelect, ...props }, ref) => {
7635
+ ({ images, selectedIndex, onSelect, imageRatio = "4/3", ...props }, ref) => {
7341
7636
  const [internalIndex, setInternalIndex] = useState(0);
7342
7637
  const activeIndex = selectedIndex ?? internalIndex;
7343
7638
  const activeImage = images[activeIndex] ?? images[0];
@@ -7348,8 +7643,8 @@ var ProductGallery = forwardRef(
7348
7643
  if (!activeImage) {
7349
7644
  return null;
7350
7645
  }
7351
- return /* @__PURE__ */ jsxs(Root27, { ref, ...props, children: [
7352
- /* @__PURE__ */ jsx(AspectRatio, { ratio: "4/3", children: /* @__PURE__ */ jsx(MainImage, { src: activeImage.src, alt: activeImage.alt }) }),
7646
+ return /* @__PURE__ */ jsxs(Root32, { ref, ...props, children: [
7647
+ /* @__PURE__ */ jsx(AspectRatio, { ratio: imageRatio, children: /* @__PURE__ */ jsx(MainImage, { src: activeImage.src, alt: activeImage.alt }) }),
7353
7648
  images.length > 1 && /* @__PURE__ */ jsx(Thumbnails, { children: images.map((image, index) => /* @__PURE__ */ jsx(
7354
7649
  ThumbnailButton,
7355
7650
  {
@@ -7366,7 +7661,7 @@ var ProductGallery = forwardRef(
7366
7661
  }
7367
7662
  );
7368
7663
  ProductGallery.displayName = "ProductGallery";
7369
- var Root28 = styled("div")(({ theme, $variant }) => ({
7664
+ var Root33 = styled("div")(({ theme, $variant }) => ({
7370
7665
  display: "flex",
7371
7666
  alignItems: "center",
7372
7667
  justifyContent: "center",
@@ -7386,14 +7681,14 @@ var Link = styled("a")(({ theme }) => ({
7386
7681
  textUnderlineOffset: "0.2em"
7387
7682
  }));
7388
7683
  var PromoStrip = forwardRef(
7389
- ({ message, actionLabel, href, variant = "info", ...props }, ref) => /* @__PURE__ */ jsxs(Root28, { ref, $variant: variant, ...props, children: [
7684
+ ({ message, actionLabel, href, variant = "info", ...props }, ref) => /* @__PURE__ */ jsxs(Root33, { ref, $variant: variant, ...props, children: [
7390
7685
  /* @__PURE__ */ jsx("span", { children: message }),
7391
7686
  actionLabel && href && /* @__PURE__ */ jsx(Link, { href, children: actionLabel })
7392
7687
  ] })
7393
7688
  );
7394
7689
  PromoStrip.displayName = "PromoStrip";
7395
7690
  var promoStripVariants = ["info", "success", "warning"];
7396
- var Root29 = styled("div")(({ theme }) => ({
7691
+ var Root34 = styled("div")(({ theme }) => ({
7397
7692
  display: "inline-grid",
7398
7693
  gridTemplateColumns: "2.25rem 3rem 2.25rem",
7399
7694
  alignItems: "center",
@@ -7429,7 +7724,7 @@ var QuantitySelector = forwardRef(
7429
7724
  ({ value, min = 1, max = 99, step = 1, disabled = false, onChange, ...props }, ref) => {
7430
7725
  const decrease = Math.max(min, value - step);
7431
7726
  const increase = Math.min(max, value + step);
7432
- return /* @__PURE__ */ jsxs(Root29, { ref, "aria-label": "Wybierz ilo\u015B\u0107", ...props, children: [
7727
+ return /* @__PURE__ */ jsxs(Root34, { ref, "aria-label": "Wybierz ilo\u015B\u0107", ...props, children: [
7433
7728
  /* @__PURE__ */ jsx(
7434
7729
  Control,
7435
7730
  {
@@ -7455,7 +7750,7 @@ var QuantitySelector = forwardRef(
7455
7750
  }
7456
7751
  );
7457
7752
  QuantitySelector.displayName = "QuantitySelector";
7458
- var Root30 = styled("div")({
7753
+ var Root35 = styled("div")({
7459
7754
  display: "flex",
7460
7755
  flexDirection: "column",
7461
7756
  gap: "0.5rem"
@@ -7493,8 +7788,8 @@ var IconWrap2 = styled("span")(({ theme }) => ({
7493
7788
  color: theme.palette.text.secondary,
7494
7789
  display: "flex"
7495
7790
  }));
7496
- var Info2 = styled("div")({ flex: 1 });
7497
- var Name7 = styled("div")(({ theme }) => ({
7791
+ var Info3 = styled("div")({ flex: 1 });
7792
+ var Name10 = styled("div")(({ theme }) => ({
7498
7793
  fontSize: "0.9375rem",
7499
7794
  fontWeight: 600,
7500
7795
  color: theme.palette.text.primary
@@ -7504,7 +7799,7 @@ var Desc2 = styled("div")(({ theme }) => ({
7504
7799
  color: theme.palette.text.secondary,
7505
7800
  marginTop: "0.125rem"
7506
7801
  }));
7507
- var Price3 = styled("div", {
7802
+ var Price2 = styled("div", {
7508
7803
  shouldForwardProp: (prop) => prop !== "$selected"
7509
7804
  })(({ theme, $selected }) => ({
7510
7805
  fontSize: "0.9375rem",
@@ -7513,7 +7808,7 @@ var Price3 = styled("div", {
7513
7808
  whiteSpace: "nowrap"
7514
7809
  }));
7515
7810
  var ShippingSelector = forwardRef(
7516
- ({ options, value, onChange, label = "Metoda dostawy", disabled, ...props }, ref) => /* @__PURE__ */ jsxs(Root30, { ref, ...props, children: [
7811
+ ({ options, value, onChange, label = "Metoda dostawy", disabled, ...props }, ref) => /* @__PURE__ */ jsxs(Root35, { ref, ...props, children: [
7517
7812
  /* @__PURE__ */ jsx(GroupLabel2, { children: label }),
7518
7813
  options.map((opt) => {
7519
7814
  const selected = value === opt.id;
@@ -7531,14 +7826,14 @@ var ShippingSelector = forwardRef(
7531
7826
  }
7532
7827
  ),
7533
7828
  /* @__PURE__ */ jsx(IconWrap2, { children: opt.icon ?? /* @__PURE__ */ jsx(LocalShippingOutlinedIcon, { "aria-hidden": true }) }),
7534
- /* @__PURE__ */ jsxs(Info2, { children: [
7535
- /* @__PURE__ */ jsx(Name7, { children: opt.label }),
7829
+ /* @__PURE__ */ jsxs(Info3, { children: [
7830
+ /* @__PURE__ */ jsx(Name10, { children: opt.label }),
7536
7831
  (opt.description || opt.estimatedDays) && /* @__PURE__ */ jsxs(Desc2, { children: [
7537
7832
  opt.description,
7538
7833
  opt.estimatedDays && ` \xB7 ${opt.estimatedDays}`
7539
7834
  ] })
7540
7835
  ] }),
7541
- /* @__PURE__ */ jsx(Price3, { $selected: selected, children: opt.price })
7836
+ /* @__PURE__ */ jsx(Price2, { $selected: selected, children: opt.price })
7542
7837
  ] }, opt.id);
7543
7838
  })
7544
7839
  ] })
@@ -7550,7 +7845,7 @@ var DEFAULT_SORT_OPTIONS = [
7550
7845
  { value: "price-asc", label: "Cena rosn\u0105co" },
7551
7846
  { value: "price-desc", label: "Cena malej\u0105co" }
7552
7847
  ];
7553
- var Root31 = styled("div")(({ theme }) => ({
7848
+ var Root36 = styled("div")(({ theme }) => ({
7554
7849
  display: "flex",
7555
7850
  alignItems: "center",
7556
7851
  justifyContent: "space-between",
@@ -7624,7 +7919,7 @@ var SortBar = forwardRef(
7624
7919
  ...props
7625
7920
  }, ref) => {
7626
7921
  const resolvedLabel = totalLabel ?? (total !== void 0 ? `Znaleziono ${total} produkt\xF3w` : void 0);
7627
- return /* @__PURE__ */ jsxs(Root31, { ref, ...props, children: [
7922
+ return /* @__PURE__ */ jsxs(Root36, { ref, ...props, children: [
7628
7923
  resolvedLabel && /* @__PURE__ */ jsx(TotalLabel, { children: resolvedLabel }),
7629
7924
  /* @__PURE__ */ jsxs(Controls, { children: [
7630
7925
  sortOptions.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -7677,7 +7972,7 @@ function getDefaultLabel(status, count) {
7677
7972
  return "Dost\u0119pny na zam\xF3wienie";
7678
7973
  }
7679
7974
  }
7680
- var Root32 = styled("div", {
7975
+ var Root37 = styled("div", {
7681
7976
  shouldForwardProp: (p) => p !== "$color" && p !== "$size"
7682
7977
  })(({ theme, $color, $size }) => {
7683
7978
  const colorMap = {
@@ -7718,7 +8013,7 @@ var StockStatus = forwardRef(
7718
8013
  ({ status, count, label, showIcon = true, size = "md", ...props }, ref) => {
7719
8014
  const color = COLOR_MAP[status];
7720
8015
  const text = label ?? getDefaultLabel(status, count);
7721
- return /* @__PURE__ */ jsxs(Root32, { ref, $color: color, $size: size, role: "status", "aria-label": text, ...props, children: [
8016
+ return /* @__PURE__ */ jsxs(Root37, { ref, $color: color, $size: size, role: "status", "aria-label": text, ...props, children: [
7722
8017
  showIcon && /* @__PURE__ */ jsx(Dot2, { $color: color, "aria-hidden": "true" }),
7723
8018
  /* @__PURE__ */ jsx("span", { children: text })
7724
8019
  ] });
@@ -7732,7 +8027,7 @@ var stockStatusValues = [
7732
8027
  "preorder",
7733
8028
  "backorder"
7734
8029
  ];
7735
- var Root33 = styled("div")({
8030
+ var Root38 = styled("div")({
7736
8031
  display: "flex",
7737
8032
  flexDirection: "column",
7738
8033
  gap: "0.5rem"
@@ -7754,88 +8049,231 @@ var OptionButton = styled("button", {
7754
8049
  appearance: "none",
7755
8050
  cursor: "pointer",
7756
8051
  fontFamily: theme.typography.fontFamily,
7757
- fontSize: "0.875rem",
8052
+ fontSize: "0.875rem",
8053
+ fontWeight: 500,
8054
+ transition: "border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease",
8055
+ "&:disabled": {
8056
+ opacity: 0.4,
8057
+ cursor: "not-allowed",
8058
+ textDecoration: $mode === "button" ? "line-through" : "none"
8059
+ },
8060
+ "&:focus-visible": {
8061
+ outline: `3px solid ${theme.palette.primary.main}`,
8062
+ outlineOffset: "2px"
8063
+ },
8064
+ ...$mode === "swatch" ? {
8065
+ width: "2rem",
8066
+ height: "2rem",
8067
+ borderRadius: "50%",
8068
+ border: $active ? `3px solid ${theme.palette.primary.main}` : `2px solid ${theme.palette.divider}`,
8069
+ boxShadow: $active ? `0 0 0 2px ${theme.palette.background.paper}, 0 0 0 4px ${theme.palette.primary.main}` : "none",
8070
+ padding: 0,
8071
+ background: "currentColor"
8072
+ } : {
8073
+ padding: "0.375rem 0.875rem",
8074
+ border: $active ? `2px solid ${theme.palette.primary.main}` : `1px solid ${theme.palette.divider}`,
8075
+ borderRadius: theme.shape.borderRadius,
8076
+ backgroundColor: $active ? `${theme.palette.primary.main}14` : "transparent",
8077
+ color: $active ? theme.palette.primary.main : theme.palette.text.primary
8078
+ }
8079
+ }));
8080
+ var Select2 = styled("select")(({ theme }) => ({
8081
+ padding: "0.5rem 2rem 0.5rem 0.75rem",
8082
+ border: `1px solid ${theme.palette.divider}`,
8083
+ borderRadius: theme.shape.borderRadius,
8084
+ backgroundColor: theme.palette.background.paper,
8085
+ color: theme.palette.text.primary,
8086
+ fontFamily: theme.typography.fontFamily,
8087
+ fontSize: "0.875rem",
8088
+ cursor: "pointer",
8089
+ appearance: "none",
8090
+ backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")`,
8091
+ backgroundRepeat: "no-repeat",
8092
+ backgroundPosition: "right 0.75rem center",
8093
+ "&:focus": {
8094
+ outline: `3px solid ${theme.palette.primary.main}`,
8095
+ outlineOffset: "2px"
8096
+ }
8097
+ }));
8098
+ var VariantSelector = forwardRef(
8099
+ ({ label, options, value, onChange, mode = "button", disabled, ...props }, ref) => /* @__PURE__ */ jsxs(Root38, { ref, ...props, children: [
8100
+ /* @__PURE__ */ jsxs(Label4, { children: [
8101
+ label,
8102
+ value && mode !== "swatch" && /* @__PURE__ */ jsx("span", { style: { fontWeight: 400, marginLeft: "0.375rem" }, children: options.find((o) => o.value === value)?.label })
8103
+ ] }),
8104
+ mode === "dropdown" ? /* @__PURE__ */ jsx(
8105
+ Select2,
8106
+ {
8107
+ value: value ?? "",
8108
+ onChange: (e) => onChange?.(e.target.value),
8109
+ disabled,
8110
+ "aria-label": label,
8111
+ children: options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
8112
+ }
8113
+ ) : /* @__PURE__ */ jsx(OptionsRow, { role: "radiogroup", "aria-label": label, children: options.map((opt) => /* @__PURE__ */ jsx(
8114
+ OptionButton,
8115
+ {
8116
+ type: "button",
8117
+ $active: value === opt.value,
8118
+ $mode: mode,
8119
+ disabled: opt.disabled || disabled,
8120
+ style: mode === "swatch" ? { color: opt.color ?? "#ccc" } : void 0,
8121
+ title: opt.label,
8122
+ "aria-label": opt.label,
8123
+ "aria-pressed": value === opt.value,
8124
+ onClick: () => onChange?.(opt.value),
8125
+ children: mode === "button" && opt.label
8126
+ },
8127
+ opt.value
8128
+ )) })
8129
+ ] })
8130
+ );
8131
+ VariantSelector.displayName = "VariantSelector";
8132
+ var variantSelectorModes = ["button", "swatch", "dropdown"];
8133
+ function deriveInitials4(name) {
8134
+ return name.split(" ").filter(Boolean).slice(0, 2).map((p) => p[0]).join("").toUpperCase();
8135
+ }
8136
+ var Root39 = styled("div")({
8137
+ display: "flex",
8138
+ alignItems: "center",
8139
+ gap: "0.75rem"
8140
+ });
8141
+ var AvatarImg3 = styled("img")({
8142
+ width: "2.5rem",
8143
+ height: "2.5rem",
8144
+ borderRadius: "50%",
8145
+ objectFit: "cover",
8146
+ flexShrink: 0
8147
+ });
8148
+ var Info4 = styled("div")({ minWidth: 0 });
8149
+ var NameRow2 = styled("div")({
8150
+ display: "flex",
8151
+ alignItems: "center",
8152
+ gap: "0.5rem",
8153
+ flexWrap: "wrap"
8154
+ });
8155
+ var Name11 = styled("span")(({ theme }) => ({
8156
+ fontFamily: theme.typography.fontFamily,
8157
+ fontSize: "0.9375rem",
8158
+ fontWeight: 700,
8159
+ color: theme.palette.text.primary
8160
+ }));
8161
+ var AuthorBadge = styled("span")(({ theme }) => ({
8162
+ display: "inline-flex",
8163
+ alignItems: "center",
8164
+ fontSize: "0.6875rem",
8165
+ fontWeight: 600,
8166
+ padding: "0.125rem 0.5rem",
8167
+ borderRadius: "999px",
8168
+ backgroundColor: theme.palette.primary.main,
8169
+ color: theme.palette.primary.contrastText,
8170
+ fontFamily: theme.typography.fontFamily,
8171
+ letterSpacing: "0.03em",
8172
+ textTransform: "uppercase"
8173
+ }));
8174
+ var DateText = styled("time")(({ theme }) => ({
8175
+ display: "block",
8176
+ marginTop: "0.125rem",
8177
+ fontFamily: theme.typography.fontFamily,
8178
+ fontSize: "0.8125rem",
8179
+ color: theme.palette.text.secondary
8180
+ }));
8181
+ function CommentMeta({ author, date }) {
8182
+ return /* @__PURE__ */ jsxs(Root39, { children: [
8183
+ author.avatarUrl ? /* @__PURE__ */ jsx(AvatarImg3, { src: author.avatarUrl, alt: author.name }) : /* @__PURE__ */ jsx(Avatar, { initials: deriveInitials4(author.name), size: "md", color: "primary" }),
8184
+ /* @__PURE__ */ jsxs(Info4, { children: [
8185
+ /* @__PURE__ */ jsxs(NameRow2, { children: [
8186
+ /* @__PURE__ */ jsx(Name11, { children: author.name }),
8187
+ author.isPostAuthor && /* @__PURE__ */ jsx(AuthorBadge, { children: "Autor" })
8188
+ ] }),
8189
+ /* @__PURE__ */ jsx(DateText, { dateTime: date, children: date })
8190
+ ] })
8191
+ ] });
8192
+ }
8193
+ CommentMeta.displayName = "CommentMeta";
8194
+ var Text = styled("p")(({ theme }) => ({
8195
+ margin: 0,
8196
+ fontFamily: theme.typography.fontFamily,
8197
+ fontSize: "0.9375rem",
8198
+ lineHeight: 1.7,
8199
+ color: theme.palette.text.primary
8200
+ }));
8201
+ function CommentBody({ content }) {
8202
+ return /* @__PURE__ */ jsx(Text, { children: content });
8203
+ }
8204
+ CommentBody.displayName = "CommentBody";
8205
+ var Root40 = styled("div")({
8206
+ display: "flex",
8207
+ alignItems: "center",
8208
+ gap: "0.25rem"
8209
+ });
8210
+ var ActionButton = styled("button")(({ theme }) => ({
8211
+ display: "inline-flex",
8212
+ alignItems: "center",
8213
+ gap: "0.375rem",
8214
+ padding: "0.3125rem 0.625rem",
8215
+ background: "none",
8216
+ border: "none",
8217
+ borderRadius: theme.shape.borderRadius,
8218
+ cursor: "pointer",
8219
+ color: theme.palette.text.secondary,
8220
+ fontFamily: theme.typography.fontFamily,
8221
+ fontSize: "0.8125rem",
7758
8222
  fontWeight: 500,
7759
- transition: "border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease",
7760
- "&:disabled": {
7761
- opacity: 0.4,
7762
- cursor: "not-allowed",
7763
- textDecoration: $mode === "button" ? "line-through" : "none"
8223
+ lineHeight: 1,
8224
+ transition: "background-color 150ms ease, color 150ms ease",
8225
+ "&:hover": {
8226
+ backgroundColor: theme.palette.action.hover,
8227
+ color: theme.palette.primary.main
7764
8228
  },
7765
8229
  "&:focus-visible": {
7766
8230
  outline: `3px solid ${theme.palette.primary.main}`,
7767
8231
  outlineOffset: "2px"
7768
- },
7769
- ...$mode === "swatch" ? {
7770
- width: "2rem",
7771
- height: "2rem",
7772
- borderRadius: "50%",
7773
- border: $active ? `3px solid ${theme.palette.primary.main}` : `2px solid ${theme.palette.divider}`,
7774
- boxShadow: $active ? `0 0 0 2px ${theme.palette.background.paper}, 0 0 0 4px ${theme.palette.primary.main}` : "none",
7775
- padding: 0,
7776
- background: "currentColor"
7777
- } : {
7778
- padding: "0.375rem 0.875rem",
7779
- border: $active ? `2px solid ${theme.palette.primary.main}` : `1px solid ${theme.palette.divider}`,
7780
- borderRadius: theme.shape.borderRadius,
7781
- backgroundColor: $active ? `${theme.palette.primary.main}14` : "transparent",
7782
- color: $active ? theme.palette.primary.main : theme.palette.text.primary
7783
8232
  }
7784
8233
  }));
7785
- var Select2 = styled("select")(({ theme }) => ({
7786
- padding: "0.5rem 2rem 0.5rem 0.75rem",
7787
- border: `1px solid ${theme.palette.divider}`,
7788
- borderRadius: theme.shape.borderRadius,
7789
- backgroundColor: theme.palette.background.paper,
7790
- color: theme.palette.text.primary,
7791
- fontFamily: theme.typography.fontFamily,
7792
- fontSize: "0.875rem",
7793
- cursor: "pointer",
7794
- appearance: "none",
7795
- backgroundImage: `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E")`,
7796
- backgroundRepeat: "no-repeat",
7797
- backgroundPosition: "right 0.75rem center",
7798
- "&:focus": {
7799
- outline: `3px solid ${theme.palette.primary.main}`,
7800
- outlineOffset: "2px"
8234
+ function CommentActions({ commentId, likesCount, onLike, onReply }) {
8235
+ return /* @__PURE__ */ jsxs(Root40, { children: [
8236
+ /* @__PURE__ */ jsxs(ActionButton, { type: "button", "aria-label": "Lubi\u0119 to", onClick: () => onLike?.(commentId), children: [
8237
+ /* @__PURE__ */ jsx(ThumbUpOutlinedIcon, { style: { fontSize: "0.9375rem" }, "aria-hidden": "true" }),
8238
+ typeof likesCount === "number" && /* @__PURE__ */ jsx("span", { children: likesCount }),
8239
+ "Lubi\u0119 to"
8240
+ ] }),
8241
+ /* @__PURE__ */ jsxs(ActionButton, { type: "button", "aria-label": "Odpowiedz", onClick: () => onReply?.(commentId), children: [
8242
+ /* @__PURE__ */ jsx(ReplyIcon, { style: { fontSize: "0.9375rem" }, "aria-hidden": "true" }),
8243
+ "Odpowiedz"
8244
+ ] })
8245
+ ] });
8246
+ }
8247
+ CommentActions.displayName = "CommentActions";
8248
+ var Root41 = styled("div", {
8249
+ shouldForwardProp: (p) => p !== "$depth"
8250
+ })(({ theme, $depth }) => ({
8251
+ display: "flex",
8252
+ flexDirection: "column",
8253
+ gap: "0.75rem",
8254
+ ...$depth > 0 && {
8255
+ paddingLeft: "1.25rem",
8256
+ borderLeft: `3px solid ${theme.palette.divider}`,
8257
+ marginLeft: "1rem"
7801
8258
  }
7802
8259
  }));
7803
- var VariantSelector = forwardRef(
7804
- ({ label, options, value, onChange, mode = "button", disabled, ...props }, ref) => /* @__PURE__ */ jsxs(Root33, { ref, ...props, children: [
7805
- /* @__PURE__ */ jsxs(Label4, { children: [
7806
- label,
7807
- value && mode !== "swatch" && /* @__PURE__ */ jsx("span", { style: { fontWeight: 400, marginLeft: "0.375rem" }, children: options.find((o) => o.value === value)?.label })
7808
- ] }),
7809
- mode === "dropdown" ? /* @__PURE__ */ jsx(
7810
- Select2,
8260
+ var CommentCard = forwardRef(
8261
+ ({ comment, depth = 0, onLike, onReply, ...props }, ref) => /* @__PURE__ */ jsxs(Root41, { ref, $depth: depth, ...props, children: [
8262
+ /* @__PURE__ */ jsx(CommentMeta, { author: comment.author, date: comment.date }),
8263
+ /* @__PURE__ */ jsx(CommentBody, { content: comment.content }),
8264
+ /* @__PURE__ */ jsx(
8265
+ CommentActions,
7811
8266
  {
7812
- value: value ?? "",
7813
- onChange: (e) => onChange?.(e.target.value),
7814
- disabled,
7815
- "aria-label": label,
7816
- children: options.map((opt) => /* @__PURE__ */ jsx("option", { value: opt.value, disabled: opt.disabled, children: opt.label }, opt.value))
8267
+ commentId: comment.id,
8268
+ likesCount: comment.likesCount,
8269
+ onLike,
8270
+ onReply
7817
8271
  }
7818
- ) : /* @__PURE__ */ jsx(OptionsRow, { role: "radiogroup", "aria-label": label, children: options.map((opt) => /* @__PURE__ */ jsx(
7819
- OptionButton,
7820
- {
7821
- type: "button",
7822
- $active: value === opt.value,
7823
- $mode: mode,
7824
- disabled: opt.disabled || disabled,
7825
- style: mode === "swatch" ? { color: opt.color ?? "#ccc" } : void 0,
7826
- title: opt.label,
7827
- "aria-label": opt.label,
7828
- "aria-pressed": value === opt.value,
7829
- onClick: () => onChange?.(opt.value),
7830
- children: mode === "button" && opt.label
7831
- },
7832
- opt.value
7833
- )) })
8272
+ )
7834
8273
  ] })
7835
8274
  );
7836
- VariantSelector.displayName = "VariantSelector";
7837
- var variantSelectorModes = ["button", "swatch", "dropdown"];
7838
- var Root34 = styled("div")(({ theme }) => ({
8275
+ CommentCard.displayName = "CommentCard";
8276
+ var Root42 = styled("div")(({ theme }) => ({
7839
8277
  borderBottom: `1px solid ${theme.palette.divider}`
7840
8278
  }));
7841
8279
  var Trigger2 = styled("button")(({ theme }) => ({
@@ -7883,7 +8321,7 @@ var PanelInner = styled("p")(({ theme }) => ({
7883
8321
  var FaqItem = forwardRef(
7884
8322
  ({ item, defaultOpen = false, ...props }, ref) => {
7885
8323
  const [open, setOpen] = useState(defaultOpen);
7886
- return /* @__PURE__ */ jsxs(Root34, { ref, ...props, children: [
8324
+ return /* @__PURE__ */ jsxs(Root42, { ref, ...props, children: [
7887
8325
  /* @__PURE__ */ jsxs(Trigger2, { type: "button", "aria-expanded": open, onClick: () => setOpen((prev) => !prev), children: [
7888
8326
  item.question,
7889
8327
  /* @__PURE__ */ jsx(ChevronIcon2, { $open: open, "aria-hidden": "true" })
@@ -7931,21 +8369,21 @@ var Title2 = styled("h3")(({ theme }) => ({
7931
8369
  color: theme.palette.text.primary,
7932
8370
  lineHeight: 1.4
7933
8371
  }));
7934
- var Description4 = styled("p")(({ theme }) => ({
8372
+ var Description5 = styled("p")(({ theme }) => ({
7935
8373
  margin: "0.375rem 0 0",
7936
8374
  fontFamily: theme.typography.fontFamily,
7937
8375
  fontSize: "0.9rem",
7938
8376
  color: theme.palette.text.secondary,
7939
8377
  lineHeight: 1.6
7940
8378
  }));
7941
- var FeatureItem2 = forwardRef(
8379
+ var FeatureItem = forwardRef(
7942
8380
  ({ feature, cardVariant = "default", layout = "card", ...props }, ref) => {
7943
8381
  if (layout === "icon-left") {
7944
8382
  return /* @__PURE__ */ jsxs(IconLeftRoot, { ref, ...props, children: [
7945
8383
  feature.icon && /* @__PURE__ */ jsx(IconWrapper, { children: feature.icon }),
7946
8384
  /* @__PURE__ */ jsxs(TextGroup2, { children: [
7947
8385
  /* @__PURE__ */ jsx(Title2, { children: feature.title }),
7948
- /* @__PURE__ */ jsx(Description4, { children: feature.description })
8386
+ /* @__PURE__ */ jsx(Description5, { children: feature.description })
7949
8387
  ] })
7950
8388
  ] });
7951
8389
  }
@@ -7953,13 +8391,13 @@ var FeatureItem2 = forwardRef(
7953
8391
  feature.icon && /* @__PURE__ */ jsx(IconWrapper, { children: feature.icon }),
7954
8392
  /* @__PURE__ */ jsxs(TextGroup2, { children: [
7955
8393
  /* @__PURE__ */ jsx(Title2, { children: feature.title }),
7956
- /* @__PURE__ */ jsx(Description4, { children: feature.description })
8394
+ /* @__PURE__ */ jsx(Description5, { children: feature.description })
7957
8395
  ] })
7958
8396
  ] });
7959
8397
  }
7960
8398
  );
7961
- FeatureItem2.displayName = "FeatureItem";
7962
- var Root35 = styled("div")({
8399
+ FeatureItem.displayName = "FeatureItem";
8400
+ var Root43 = styled("div")({
7963
8401
  display: "flex",
7964
8402
  flexDirection: "column",
7965
8403
  alignItems: "center",
@@ -7998,7 +8436,7 @@ var Title3 = styled("h3")(({ theme }) => ({
7998
8436
  fontSize: "1rem",
7999
8437
  color: theme.palette.text.primary
8000
8438
  }));
8001
- var Description5 = styled("p")(({ theme }) => ({
8439
+ var Description6 = styled("p")(({ theme }) => ({
8002
8440
  margin: 0,
8003
8441
  fontFamily: theme.typography.fontFamily,
8004
8442
  fontSize: "0.875rem",
@@ -8007,10 +8445,10 @@ var Description5 = styled("p")(({ theme }) => ({
8007
8445
  maxWidth: "18rem"
8008
8446
  }));
8009
8447
  var ProcessStep = forwardRef(
8010
- ({ step, title, description, icon, ...props }, ref) => /* @__PURE__ */ jsxs(Root35, { ref, ...props, children: [
8448
+ ({ step, title, description, icon, ...props }, ref) => /* @__PURE__ */ jsxs(Root43, { ref, ...props, children: [
8011
8449
  /* @__PURE__ */ jsx(StepBadge, { "aria-hidden": "true", children: icon ? /* @__PURE__ */ jsx(IconWrapper2, { children: icon }) : /* @__PURE__ */ jsx(StepNumber, { children: step }) }),
8012
8450
  /* @__PURE__ */ jsx(Title3, { children: title }),
8013
- description && /* @__PURE__ */ jsx(Description5, { children: description })
8451
+ description && /* @__PURE__ */ jsx(Description6, { children: description })
8014
8452
  ] })
8015
8453
  );
8016
8454
  ProcessStep.displayName = "ProcessStep";
@@ -8133,7 +8571,7 @@ function getDotColor(status, theme) {
8133
8571
  return theme.palette.mode === "dark" ? "rgba(255,255,255,0.2)" : "rgba(0,0,0,0.15)";
8134
8572
  }
8135
8573
  }
8136
- var List = styled("ol")({
8574
+ var List2 = styled("ol")({
8137
8575
  listStyle: "none",
8138
8576
  margin: 0,
8139
8577
  padding: 0,
@@ -8193,7 +8631,7 @@ var Dot3 = styled("span", {
8193
8631
  }
8194
8632
  }
8195
8633
  }));
8196
- var Content4 = styled("div")({ flex: 1, minWidth: 0, paddingTop: "0.0625rem" });
8634
+ var Content2 = styled("div")({ flex: 1, minWidth: 0, paddingTop: "0.0625rem" });
8197
8635
  var TitleRow = styled("div")({
8198
8636
  display: "flex",
8199
8637
  alignItems: "baseline",
@@ -8216,7 +8654,7 @@ var Date2 = styled("time")(({ theme }) => ({
8216
8654
  color: theme.palette.text.secondary,
8217
8655
  whiteSpace: "nowrap"
8218
8656
  }));
8219
- var Description6 = styled("div")(({ theme }) => ({
8657
+ var Description7 = styled("div")(({ theme }) => ({
8220
8658
  marginTop: "0.25rem",
8221
8659
  fontFamily: theme.typography.fontFamily,
8222
8660
  fontSize: "0.875rem",
@@ -8238,19 +8676,19 @@ function TimelineItemComponent({
8238
8676
  const hasIcon = Boolean(item.icon);
8239
8677
  return /* @__PURE__ */ jsxs(ItemRow, { $compact: compact, $last: last, children: [
8240
8678
  /* @__PURE__ */ jsx(DotCol, { $last: last, children: /* @__PURE__ */ jsx(Dot3, { $status: status, $hasIcon: hasIcon, children: item.icon ?? /* @__PURE__ */ jsx(StatusIcon, { status }) }) }),
8241
- /* @__PURE__ */ jsxs(Content4, { children: [
8679
+ /* @__PURE__ */ jsxs(Content2, { children: [
8242
8680
  /* @__PURE__ */ jsxs(TitleRow, { children: [
8243
8681
  /* @__PURE__ */ jsx(Title4, { $compact: compact, children: item.title }),
8244
8682
  item.date && /* @__PURE__ */ jsx(Date2, { dateTime: item.date, children: item.date })
8245
8683
  ] }),
8246
- item.description && /* @__PURE__ */ jsx(Description6, { children: item.description })
8684
+ item.description && /* @__PURE__ */ jsx(Description7, { children: item.description })
8247
8685
  ] })
8248
8686
  ] });
8249
8687
  }
8250
8688
  var Timeline = forwardRef(
8251
8689
  ({ items, variant = "default", align: _align = "left", ...props }, ref) => {
8252
8690
  const compact = variant === "compact";
8253
- return /* @__PURE__ */ jsx(List, { ref, "aria-label": "O\u015B czasu", ...props, children: items.map((item, i) => /* @__PURE__ */ jsx(
8691
+ return /* @__PURE__ */ jsx(List2, { ref, "aria-label": "O\u015B czasu", ...props, children: items.map((item, i) => /* @__PURE__ */ jsx(
8254
8692
  TimelineItemComponent,
8255
8693
  {
8256
8694
  item,
@@ -8269,7 +8707,7 @@ var timelineItemStatuses = [
8269
8707
  "pending",
8270
8708
  "error"
8271
8709
  ];
8272
- var Root36 = styled("div")({
8710
+ var Root44 = styled("div")({
8273
8711
  position: "relative",
8274
8712
  width: "100%",
8275
8713
  overflow: "hidden",
@@ -8379,7 +8817,7 @@ function Carousel({
8379
8817
  }, [prev, next]);
8380
8818
  if (!count) return null;
8381
8819
  return /* @__PURE__ */ jsxs("div", { className, children: [
8382
- /* @__PURE__ */ jsxs(Root36, { "aria-roledescription": "carousel", children: [
8820
+ /* @__PURE__ */ jsxs(Root44, { "aria-roledescription": "carousel", children: [
8383
8821
  /* @__PURE__ */ jsx(Track4, { $index: index, "aria-live": "polite", children: slides.map((slide, i) => /* @__PURE__ */ jsx(
8384
8822
  Slide,
8385
8823
  {
@@ -8426,6 +8864,46 @@ function Carousel({
8426
8864
  )) })
8427
8865
  ] });
8428
8866
  }
8867
+ var Img5 = styled("img")({
8868
+ position: "absolute",
8869
+ inset: 0,
8870
+ width: "100%",
8871
+ height: "100%"
8872
+ });
8873
+ var Placeholder5 = styled("div")(({ theme }) => ({
8874
+ position: "absolute",
8875
+ inset: 0,
8876
+ width: "100%",
8877
+ height: "100%",
8878
+ backgroundColor: theme.palette.action.hover,
8879
+ display: "flex",
8880
+ alignItems: "center",
8881
+ justifyContent: "center",
8882
+ color: theme.palette.text.disabled
8883
+ }));
8884
+ var Image = forwardRef(
8885
+ ({
8886
+ src,
8887
+ alt = "",
8888
+ ratio = "16/9",
8889
+ objectFit = "cover",
8890
+ objectPosition = "center",
8891
+ loading = "lazy",
8892
+ style,
8893
+ ...props
8894
+ }, ref) => /* @__PURE__ */ jsx(AspectRatio, { ratio, children: src ? /* @__PURE__ */ jsx(
8895
+ Img5,
8896
+ {
8897
+ ref,
8898
+ src,
8899
+ alt,
8900
+ loading,
8901
+ style: { objectFit, objectPosition, ...style },
8902
+ ...props
8903
+ }
8904
+ ) : /* @__PURE__ */ jsx(Placeholder5, { "aria-label": alt || "Image placeholder", children: /* @__PURE__ */ jsx(ImageIcon, { style: { fontSize: 48 } }) }) })
8905
+ );
8906
+ Image.displayName = "Image";
8429
8907
  var Wrapper4 = styled("div")(({ theme }) => ({
8430
8908
  borderRadius: "0.75rem",
8431
8909
  overflow: "hidden",
@@ -8727,7 +9205,7 @@ var Nav = styled("nav")(({ theme }) => ({
8727
9205
  fontSize: "0.875rem",
8728
9206
  color: theme.palette.text.secondary
8729
9207
  }));
8730
- var List2 = styled("ol")({
9208
+ var List3 = styled("ol")({
8731
9209
  display: "flex",
8732
9210
  alignItems: "center",
8733
9211
  flexWrap: "wrap",
@@ -8751,7 +9229,7 @@ var Separator2 = styled("span")(({ theme }) => ({
8751
9229
  color: theme.palette.text.disabled
8752
9230
  }));
8753
9231
  var Breadcrumbs = forwardRef(
8754
- ({ items, separator = "/", ...props }, ref) => /* @__PURE__ */ jsx(Nav, { ref, "aria-label": "\u015Acie\u017Cka nawigacji", ...props, children: /* @__PURE__ */ jsx(List2, { children: items.map((item, index) => {
9232
+ ({ items, separator = "/", ...props }, ref) => /* @__PURE__ */ jsx(Nav, { ref, "aria-label": "\u015Acie\u017Cka nawigacji", ...props, children: /* @__PURE__ */ jsx(List3, { children: items.map((item, index) => {
8755
9233
  const isLast = index === items.length - 1;
8756
9234
  return /* @__PURE__ */ jsxs("li", { children: [
8757
9235
  item.href && !isLast ? /* @__PURE__ */ jsx(Link2, { href: item.href, children: item.label }) : /* @__PURE__ */ jsx(Current2, { "aria-current": isLast ? "page" : void 0, children: item.label }),
@@ -8763,7 +9241,7 @@ var Breadcrumbs = forwardRef(
8763
9241
  }) }) })
8764
9242
  );
8765
9243
  Breadcrumbs.displayName = "Breadcrumbs";
8766
- var sizeMap6 = {
9244
+ var sizeMap7 = {
8767
9245
  sm: { minWidth: "1.75rem", height: "1.75rem", fontSize: "0.75rem" },
8768
9246
  md: { minWidth: "2rem", height: "2rem", fontSize: "0.875rem" },
8769
9247
  lg: { minWidth: "2.5rem", height: "2.5rem", fontSize: "1rem" }
@@ -8792,7 +9270,7 @@ var StyledButton2 = styled("button")(({ theme, $isActive, $size }) => ({
8792
9270
  lineHeight: 1,
8793
9271
  padding: "0 0.25rem",
8794
9272
  transition: "background-color 150ms ease",
8795
- ...sizeMap6[$size],
9273
+ ...sizeMap7[$size],
8796
9274
  ...$isActive ? activeStyles(theme) : idleStyles(theme),
8797
9275
  "&:focus-visible": {
8798
9276
  outline: `3px solid ${theme.palette.primary.main}`,
@@ -8821,7 +9299,7 @@ var PaginationButton = forwardRef(
8821
9299
  )
8822
9300
  );
8823
9301
  PaginationButton.displayName = "PaginationButton";
8824
- var sizeMap7 = {
9302
+ var sizeMap8 = {
8825
9303
  sm: { minWidth: "1.75rem", height: "1.75rem", fontSize: "0.75rem" },
8826
9304
  md: { minWidth: "2rem", height: "2rem", fontSize: "0.875rem" },
8827
9305
  lg: { minWidth: "2.5rem", height: "2.5rem", fontSize: "1rem" }
@@ -8832,7 +9310,7 @@ var StyledEllipsis = styled("span")(({ theme, $size }) => ({
8832
9310
  justifyContent: "center",
8833
9311
  color: theme.palette.text.secondary,
8834
9312
  userSelect: "none",
8835
- ...sizeMap7[$size]
9313
+ ...sizeMap8[$size]
8836
9314
  }));
8837
9315
  var PaginationEllipsis = ({ size = "md" }) => /* @__PURE__ */ jsx(StyledEllipsis, { $size: size, "aria-hidden": "true", children: "\u2026" });
8838
9316
  PaginationEllipsis.displayName = "PaginationEllipsis";
@@ -8942,7 +9420,7 @@ var PaginationBar = ({
8942
9420
  ] });
8943
9421
  };
8944
9422
  PaginationBar.displayName = "PaginationBar";
8945
- var Root37 = styled("div", {
9423
+ var Root45 = styled("div", {
8946
9424
  shouldForwardProp: (p) => p !== "$variant"
8947
9425
  })(({ theme, $variant }) => ({
8948
9426
  width: "100%",
@@ -8957,7 +9435,7 @@ var Root37 = styled("div", {
8957
9435
  gap: "0.5rem"
8958
9436
  }
8959
9437
  }));
8960
- var Item = styled("div", {
9438
+ var Item2 = styled("div", {
8961
9439
  shouldForwardProp: (p) => !["$variant", "$disabled"].includes(p)
8962
9440
  })(({ theme, $variant, $disabled }) => ({
8963
9441
  opacity: $disabled ? 0.5 : 1,
@@ -9052,11 +9530,11 @@ var Accordion = forwardRef(
9052
9530
  if (controlledKeys === void 0) setInternalKeys(next);
9053
9531
  onChange?.(next);
9054
9532
  };
9055
- return /* @__PURE__ */ jsx(Root37, { ref, $variant: variant, ...props, children: items.map((item) => {
9533
+ return /* @__PURE__ */ jsx(Root45, { ref, $variant: variant, ...props, children: items.map((item) => {
9056
9534
  const isOpen = openKeys.includes(item.key);
9057
9535
  const panelId = `accordion-panel-${item.key}`;
9058
9536
  const triggerId = `accordion-trigger-${item.key}`;
9059
- return /* @__PURE__ */ jsxs(Item, { $variant: variant, $disabled: Boolean(item.disabled), children: [
9537
+ return /* @__PURE__ */ jsxs(Item2, { $variant: variant, $disabled: Boolean(item.disabled), children: [
9060
9538
  /* @__PURE__ */ jsxs(
9061
9539
  Trigger3,
9062
9540
  {
@@ -9081,32 +9559,31 @@ var Accordion = forwardRef(
9081
9559
  );
9082
9560
  Accordion.displayName = "Accordion";
9083
9561
  var accordionVariants = ["default", "bordered", "separated"];
9084
- var SEVERITY_COLORS = {
9085
- info: { bg: "rgba(25,118,210,0.08)", color: "#1565c0", border: "rgba(25,118,210,0.3)" },
9086
- success: { bg: "rgba(34,197,94,0.1)", color: "#15803d", border: "rgba(34,197,94,0.35)" },
9087
- warning: { bg: "rgba(245,158,11,0.1)", color: "#b45309", border: "rgba(245,158,11,0.35)" },
9088
- error: { bg: "rgba(211,47,47,0.08)", color: "#c62828", border: "rgba(211,47,47,0.3)" }
9089
- };
9090
9562
  var ICONS = {
9091
9563
  info: /* @__PURE__ */ jsx(InfoOutlinedIcon, { "aria-hidden": true, style: { fontSize: 20 } }),
9092
9564
  success: /* @__PURE__ */ jsx(CheckCircleOutlinedIcon, { "aria-hidden": true, style: { fontSize: 20 } }),
9093
9565
  warning: /* @__PURE__ */ jsx(WarningAmberOutlinedIcon, { "aria-hidden": true, style: { fontSize: 20 } }),
9094
9566
  error: /* @__PURE__ */ jsx(ErrorOutlineOutlinedIcon, { "aria-hidden": true, style: { fontSize: 20 } })
9095
9567
  };
9096
- var Root38 = styled("div", {
9568
+ var Root46 = styled("div", {
9097
9569
  shouldForwardProp: (prop) => prop !== "$severity"
9098
9570
  })(({ theme, $severity }) => {
9099
- const c = SEVERITY_COLORS[$severity];
9571
+ const palette = {
9572
+ info: theme.palette.info,
9573
+ success: theme.palette.success,
9574
+ warning: theme.palette.warning,
9575
+ error: theme.palette.error
9576
+ }[$severity];
9100
9577
  return {
9101
9578
  display: "flex",
9102
9579
  gap: "0.75rem",
9103
9580
  padding: "0.875rem 1rem",
9104
9581
  borderRadius: theme.shape.borderRadius,
9105
- border: `1px solid ${c.border}`,
9106
- backgroundColor: c.bg,
9107
- color: c.color,
9582
+ border: `1px solid ${palette.dark}`,
9583
+ backgroundColor: palette.main,
9584
+ color: palette.contrastText,
9108
9585
  fontFamily: theme.typography.fontFamily,
9109
- fontSize: "0.9375rem"
9586
+ fontSize: "1rem"
9110
9587
  };
9111
9588
  });
9112
9589
  var IconSlot2 = styled("span")({
@@ -9138,11 +9615,11 @@ var CloseButton2 = styled("button")(({ theme }) => ({
9138
9615
  }
9139
9616
  }));
9140
9617
  var Alert = forwardRef(
9141
- ({ severity = "info", title, children, onClose, icon, ...props }, ref) => /* @__PURE__ */ jsxs(Root38, { ref, role: "alert", $severity: severity, ...props, children: [
9618
+ ({ severity = "info", title, children, onClose, icon, ...props }, ref) => /* @__PURE__ */ jsxs(Root46, { ref, role: "alert", $severity: severity, ...props, children: [
9142
9619
  /* @__PURE__ */ jsx(IconSlot2, { children: icon ?? ICONS[severity] }),
9143
9620
  /* @__PURE__ */ jsxs(Body, { children: [
9144
9621
  title && /* @__PURE__ */ jsx(Title5, { children: title }),
9145
- children
9622
+ typeof children === "string" ? /* @__PURE__ */ jsx("span", { dangerouslySetInnerHTML: { __html: children } }) : children
9146
9623
  ] }),
9147
9624
  onClose && /* @__PURE__ */ jsx(CloseButton2, { type: "button", onClick: onClose, "aria-label": "Zamknij", children: /* @__PURE__ */ jsx(CloseIcon, { "aria-hidden": true, style: { fontSize: 16 } }) })
9148
9625
  ] })
@@ -9159,7 +9636,7 @@ var POSITION_MAP = {
9159
9636
  var Btn = styled("button", {
9160
9637
  shouldForwardProp: (p) => !["$variant", "$visible", "$position"].includes(p)
9161
9638
  })(({ theme, $variant, $visible, $position }) => {
9162
- const variantStyles2 = {
9639
+ const variantStyles3 = {
9163
9640
  default: {
9164
9641
  backgroundColor: theme.palette.background.paper,
9165
9642
  border: `1px solid ${theme.palette.divider}`,
@@ -9200,7 +9677,7 @@ var Btn = styled("button", {
9200
9677
  outlineOffset: "3px"
9201
9678
  },
9202
9679
  ...POSITION_MAP[$position],
9203
- ...variantStyles2
9680
+ ...variantStyles3
9204
9681
  };
9205
9682
  });
9206
9683
  function BackToTop({
@@ -9388,7 +9865,7 @@ var ContextMenu = forwardRef(
9388
9865
  }
9389
9866
  );
9390
9867
  ContextMenu.displayName = "ContextMenu";
9391
- var Root39 = styled("div")(({ theme }) => ({
9868
+ var Root47 = styled("div")(({ theme }) => ({
9392
9869
  display: "flex",
9393
9870
  flexDirection: "column",
9394
9871
  alignItems: "center",
@@ -9409,18 +9886,18 @@ var Title6 = styled("h3")(({ theme }) => ({
9409
9886
  fontWeight: 700,
9410
9887
  color: theme.palette.text.primary
9411
9888
  }));
9412
- var Description7 = styled("p")(({ theme }) => ({
9889
+ var Description8 = styled("p")(({ theme }) => ({
9413
9890
  margin: 0,
9414
9891
  fontSize: "0.9375rem",
9415
9892
  color: theme.palette.text.secondary,
9416
9893
  maxWidth: "28rem"
9417
9894
  }));
9418
9895
  var EmptyState = forwardRef(
9419
- ({ icon, title, description, action, ...props }, ref) => /* @__PURE__ */ jsxs(Root39, { ref, ...props, children: [
9896
+ ({ icon, title, description, action, ...props }, ref) => /* @__PURE__ */ jsxs(Root47, { ref, ...props, children: [
9420
9897
  /* @__PURE__ */ jsx(IconWrap3, { "aria-hidden": true, children: icon ?? /* @__PURE__ */ jsx(InboxOutlinedIcon, {}) }),
9421
9898
  /* @__PURE__ */ jsxs("div", { children: [
9422
9899
  /* @__PURE__ */ jsx(Title6, { children: title }),
9423
- description && /* @__PURE__ */ jsx(Description7, { style: { marginTop: "0.5rem" }, children: description })
9900
+ description && /* @__PURE__ */ jsx(Description8, { style: { marginTop: "0.5rem" }, children: description })
9424
9901
  ] }),
9425
9902
  action && /* @__PURE__ */ jsx("div", { children: action })
9426
9903
  ] })
@@ -9436,7 +9913,7 @@ var FONT_SIZE2 = {
9436
9913
  md: "0.9375rem",
9437
9914
  lg: "1rem"
9438
9915
  };
9439
- var Root40 = styled("ul", {
9916
+ var Root48 = styled("ul", {
9440
9917
  shouldForwardProp: (p) => p !== "$variant"
9441
9918
  })(({ theme, $variant }) => ({
9442
9919
  listStyle: "none",
@@ -9454,7 +9931,7 @@ var Root40 = styled("ul", {
9454
9931
  gap: "0.375rem"
9455
9932
  }
9456
9933
  }));
9457
- var Item2 = styled("li", {
9934
+ var Item3 = styled("li", {
9458
9935
  shouldForwardProp: (p) => !["$size", "$variant", "$clickable", "$disabled"].includes(p)
9459
9936
  })(({ theme, $size, $variant, $clickable, $disabled }) => ({
9460
9937
  display: "flex",
@@ -9528,11 +10005,11 @@ var SuffixWrap = styled("span")({
9528
10005
  display: "flex",
9529
10006
  alignItems: "center"
9530
10007
  });
9531
- var List3 = forwardRef(
10008
+ var List4 = forwardRef(
9532
10009
  ({ items, size = "md", variant = "default", dividers = true, ...props }, ref) => {
9533
10010
  const effectiveVariant = !dividers && variant === "default" ? "default" : variant;
9534
- return /* @__PURE__ */ jsx(Root40, { ref, $variant: effectiveVariant, role: "list", ...props, children: items.map((item) => /* @__PURE__ */ jsxs(
9535
- Item2,
10011
+ return /* @__PURE__ */ jsx(Root48, { ref, $variant: effectiveVariant, role: "list", ...props, children: items.map((item) => /* @__PURE__ */ jsxs(
10012
+ Item3,
9536
10013
  {
9537
10014
  role: "listitem",
9538
10015
  $size: size,
@@ -9554,7 +10031,7 @@ var List3 = forwardRef(
9554
10031
  )) });
9555
10032
  }
9556
10033
  );
9557
- List3.displayName = "List";
10034
+ List4.displayName = "List";
9558
10035
  var listVariants = ["default", "bordered", "separated"];
9559
10036
  var listSizes = ["sm", "md", "lg"];
9560
10037
  var scrollLeft = keyframes`
@@ -9570,7 +10047,7 @@ var speedDuration = {
9570
10047
  normal: "20s",
9571
10048
  fast: "10s"
9572
10049
  };
9573
- var Root41 = styled("div")({
10050
+ var Root49 = styled("div")({
9574
10051
  overflow: "hidden",
9575
10052
  width: "100%",
9576
10053
  userSelect: "none"
@@ -9601,7 +10078,7 @@ var Marquee = forwardRef(
9601
10078
  /* @__PURE__ */ jsx(ItemWrap, { $gap: gapValue, "aria-hidden": "false", children }),
9602
10079
  /* @__PURE__ */ jsx(ItemWrap, { $gap: gapValue, "aria-hidden": "true", children })
9603
10080
  ] });
9604
- return /* @__PURE__ */ jsx(Root41, { ref, ...props, children: /* @__PURE__ */ jsx(Track5, { $direction: direction, $speed: speed, $pauseOnHover: pauseOnHover, $gap: gapValue, children: content }) });
10081
+ return /* @__PURE__ */ jsx(Root49, { ref, ...props, children: /* @__PURE__ */ jsx(Track5, { $direction: direction, $speed: speed, $pauseOnHover: pauseOnHover, $gap: gapValue, children: content }) });
9605
10082
  }
9606
10083
  );
9607
10084
  Marquee.displayName = "Marquee";
@@ -9647,7 +10124,7 @@ var Dialog = styled("div", {
9647
10124
  margin: 0
9648
10125
  }
9649
10126
  }));
9650
- var Header = styled("div")(({ theme }) => ({
10127
+ var Header2 = styled("div")(({ theme }) => ({
9651
10128
  display: "flex",
9652
10129
  alignItems: "center",
9653
10130
  justifyContent: "space-between",
@@ -9744,7 +10221,7 @@ function Modal({
9744
10221
  tabIndex: -1,
9745
10222
  onClick: (e) => e.stopPropagation(),
9746
10223
  children: [
9747
- (title || !hideCloseButton) && /* @__PURE__ */ jsxs(Header, { children: [
10224
+ (title || !hideCloseButton) && /* @__PURE__ */ jsxs(Header2, { children: [
9748
10225
  title ? /* @__PURE__ */ jsx(Title7, { id: "modal-title", children: title }) : /* @__PURE__ */ jsx("span", {}),
9749
10226
  !hideCloseButton && /* @__PURE__ */ jsx(CloseButton3, { "aria-label": "Zamknij", onClick: onClose, children: /* @__PURE__ */ jsx(CloseIcon, { "aria-hidden": true, style: { fontSize: 16 } }) })
9750
10227
  ] }),
@@ -9757,7 +10234,7 @@ function Modal({
9757
10234
  );
9758
10235
  }
9759
10236
  var modalSizes = ["sm", "md", "lg", "xl", "full"];
9760
- var Root42 = styled("div")({ width: "100%" });
10237
+ var Root50 = styled("div")({ width: "100%" });
9761
10238
  var TabList = styled("div", {
9762
10239
  shouldForwardProp: (prop) => prop !== "$variant"
9763
10240
  })(({ theme, $variant }) => ({
@@ -9837,7 +10314,7 @@ var Tabs = forwardRef(
9837
10314
  onChange?.(key);
9838
10315
  };
9839
10316
  const activeTab = tabs.find((t) => t.key === activeKey);
9840
- return /* @__PURE__ */ jsxs(Root42, { ref, ...props, children: [
10317
+ return /* @__PURE__ */ jsxs(Root50, { ref, ...props, children: [
9841
10318
  /* @__PURE__ */ jsx(TabList, { role: "tablist", $variant: variant, children: tabs.map((tab) => /* @__PURE__ */ jsx(
9842
10319
  TabButton,
9843
10320
  {
@@ -9869,6 +10346,79 @@ var Tabs = forwardRef(
9869
10346
  );
9870
10347
  Tabs.displayName = "Tabs";
9871
10348
  var tabsVariants = ["underline", "pills", "bordered"];
10349
+ var Root51 = styled("div")(({ theme }) => ({
10350
+ display: "grid",
10351
+ gridTemplateColumns: "4.5rem 1fr",
10352
+ gap: "0.875rem",
10353
+ paddingBottom: "1rem",
10354
+ borderBottom: `1px solid ${theme.palette.divider}`
10355
+ }));
10356
+ var ImageWrap4 = styled("div")(({ theme }) => ({
10357
+ position: "relative",
10358
+ width: "4.5rem",
10359
+ height: "4.5rem",
10360
+ borderRadius: theme.shape.borderRadius,
10361
+ overflow: "hidden",
10362
+ flexShrink: 0
10363
+ }));
10364
+ var Info5 = styled("div")({ display: "grid", gap: "0.5rem" });
10365
+ var Row5 = styled("div")({
10366
+ display: "flex",
10367
+ alignItems: "center",
10368
+ justifyContent: "space-between",
10369
+ gap: "0.75rem"
10370
+ });
10371
+ var Name12 = styled("p")(({ theme }) => ({
10372
+ margin: 0,
10373
+ color: theme.palette.text.primary,
10374
+ fontFamily: theme.typography.fontFamily,
10375
+ fontWeight: 700
10376
+ }));
10377
+ var Price3 = styled("p")(({ theme }) => ({
10378
+ margin: 0,
10379
+ color: theme.palette.text.secondary,
10380
+ fontFamily: theme.typography.fontFamily,
10381
+ fontSize: "0.875rem"
10382
+ }));
10383
+ var RemoveButton2 = styled("button")(({ theme }) => ({
10384
+ border: 0,
10385
+ background: "transparent",
10386
+ color: theme.palette.error.main,
10387
+ cursor: "pointer",
10388
+ padding: 0,
10389
+ fontFamily: theme.typography.fontFamily,
10390
+ fontSize: "0.875rem"
10391
+ }));
10392
+ var CartDrawerItem = ({
10393
+ id,
10394
+ name,
10395
+ price,
10396
+ quantity,
10397
+ imageUrl,
10398
+ imageAlt,
10399
+ onQuantityChange,
10400
+ onRemove
10401
+ }) => /* @__PURE__ */ jsxs(Root51, { children: [
10402
+ /* @__PURE__ */ jsx(ImageWrap4, { children: /* @__PURE__ */ jsx(ProductCardImage, { src: imageUrl, alt: imageAlt ?? name }) }),
10403
+ /* @__PURE__ */ jsxs(Info5, { children: [
10404
+ /* @__PURE__ */ jsxs(Row5, { children: [
10405
+ /* @__PURE__ */ jsx(Name12, { children: name }),
10406
+ /* @__PURE__ */ jsx(Price3, { children: price })
10407
+ ] }),
10408
+ /* @__PURE__ */ jsxs(Row5, { children: [
10409
+ /* @__PURE__ */ jsx(
10410
+ QuantitySelector,
10411
+ {
10412
+ value: quantity,
10413
+ min: 1,
10414
+ onChange: (qty) => onQuantityChange?.(id, qty)
10415
+ }
10416
+ ),
10417
+ /* @__PURE__ */ jsx(RemoveButton2, { type: "button", onClick: () => onRemove?.(id), children: "Usu\u0144" })
10418
+ ] })
10419
+ ] })
10420
+ ] });
10421
+ CartDrawerItem.displayName = "CartDrawerItem";
9872
10422
  var Overlay3 = styled("div")(({ $open }) => ({
9873
10423
  position: "fixed",
9874
10424
  inset: 0,
@@ -9888,7 +10438,7 @@ var Panel3 = styled("aside")(({ theme }) => ({
9888
10438
  boxShadow: theme.shadows[5],
9889
10439
  fontFamily: theme.typography.fontFamily
9890
10440
  }));
9891
- var Header2 = styled("div")(({ theme }) => ({
10441
+ var Header3 = styled("div")(({ theme }) => ({
9892
10442
  display: "flex",
9893
10443
  alignItems: "center",
9894
10444
  justifyContent: "space-between",
@@ -9913,51 +10463,12 @@ var Items = styled("div")({
9913
10463
  padding: "1rem 1.25rem",
9914
10464
  overflow: "auto"
9915
10465
  });
9916
- var Item3 = styled("div")(({ theme }) => ({
9917
- display: "grid",
9918
- gridTemplateColumns: "4.5rem 1fr",
9919
- gap: "0.875rem",
9920
- paddingBottom: "1rem",
9921
- borderBottom: `1px solid ${theme.palette.divider}`
9922
- }));
9923
- var ItemImage = styled("img")(({ theme }) => ({
9924
- width: "4.5rem",
9925
- height: "4.5rem",
9926
- borderRadius: theme.shape.borderRadius,
9927
- objectFit: "cover",
9928
- backgroundColor: theme.palette.action.hover
9929
- }));
9930
- var PlaceholderImage = styled("div")(({ theme }) => ({
9931
- width: "4.5rem",
9932
- height: "4.5rem",
9933
- borderRadius: theme.shape.borderRadius,
9934
- backgroundColor: theme.palette.action.hover
9935
- }));
9936
- var ItemInfo = styled("div")({ display: "grid", gap: "0.5rem" });
9937
- var ItemName = styled("p")(({ theme }) => ({
9938
- margin: 0,
9939
- color: theme.palette.text.primary,
9940
- fontWeight: 700
9941
- }));
9942
- var ItemMeta = styled("p")(({ theme }) => ({
9943
- margin: 0,
9944
- color: theme.palette.text.secondary,
9945
- fontSize: "0.875rem"
9946
- }));
9947
- var Row4 = styled("div")({
10466
+ var Row6 = styled("div")({
9948
10467
  display: "flex",
9949
10468
  alignItems: "center",
9950
10469
  justifyContent: "space-between",
9951
10470
  gap: "0.75rem"
9952
10471
  });
9953
- var RemoveButton2 = styled("button")(({ theme }) => ({
9954
- border: 0,
9955
- background: "transparent",
9956
- color: theme.palette.error.main,
9957
- cursor: "pointer",
9958
- padding: 0,
9959
- fontSize: "0.875rem"
9960
- }));
9961
10472
  var Footer5 = styled("div")(({ theme }) => ({
9962
10473
  display: "grid",
9963
10474
  gap: "1rem",
@@ -9979,32 +10490,21 @@ var CartDrawer = forwardRef(
9979
10490
  onRemove,
9980
10491
  ...props
9981
10492
  }, ref) => /* @__PURE__ */ jsx(Overlay3, { $open: open, children: /* @__PURE__ */ jsxs(Panel3, { ref, "aria-hidden": !open, "aria-label": title, ...props, children: [
9982
- /* @__PURE__ */ jsxs(Header2, { children: [
10493
+ /* @__PURE__ */ jsxs(Header3, { children: [
9983
10494
  /* @__PURE__ */ jsx(Title8, { children: title }),
9984
10495
  /* @__PURE__ */ jsx(IconButton, { type: "button", "aria-label": closeLabel, onClick: onClose, children: "\xD7" })
9985
10496
  ] }),
9986
- /* @__PURE__ */ jsx(Items, { children: items.map((item) => /* @__PURE__ */ jsxs(Item3, { children: [
9987
- item.imageUrl ? /* @__PURE__ */ jsx(ItemImage, { src: item.imageUrl, alt: item.imageAlt ?? item.name }) : /* @__PURE__ */ jsx(PlaceholderImage, {}),
9988
- /* @__PURE__ */ jsxs(ItemInfo, { children: [
9989
- /* @__PURE__ */ jsxs(Row4, { children: [
9990
- /* @__PURE__ */ jsx(ItemName, { children: item.name }),
9991
- /* @__PURE__ */ jsx(ItemMeta, { children: item.price })
9992
- ] }),
9993
- /* @__PURE__ */ jsxs(Row4, { children: [
9994
- /* @__PURE__ */ jsx(
9995
- QuantitySelector,
9996
- {
9997
- value: item.quantity,
9998
- min: 1,
9999
- onChange: (quantity) => onQuantityChange?.(item.id, quantity)
10000
- }
10001
- ),
10002
- /* @__PURE__ */ jsx(RemoveButton2, { type: "button", onClick: () => onRemove?.(item.id), children: "Usu\u0144" })
10003
- ] })
10004
- ] })
10005
- ] }, item.id)) }),
10497
+ /* @__PURE__ */ jsx(Items, { children: items.map((item) => /* @__PURE__ */ jsx(
10498
+ CartDrawerItem,
10499
+ {
10500
+ ...item,
10501
+ onQuantityChange,
10502
+ onRemove
10503
+ },
10504
+ item.id
10505
+ )) }),
10006
10506
  /* @__PURE__ */ jsxs(Footer5, { children: [
10007
- /* @__PURE__ */ jsxs(Row4, { children: [
10507
+ /* @__PURE__ */ jsxs(Row6, { children: [
10008
10508
  /* @__PURE__ */ jsx("strong", { children: "Suma" }),
10009
10509
  /* @__PURE__ */ jsx("strong", { children: subtotal })
10010
10510
  ] }),
@@ -10013,7 +10513,7 @@ var CartDrawer = forwardRef(
10013
10513
  ] }) })
10014
10514
  );
10015
10515
  CartDrawer.displayName = "CartDrawer";
10016
- var Root43 = styled("aside")(({ theme }) => ({
10516
+ var Root52 = styled("aside")(({ theme }) => ({
10017
10517
  display: "grid",
10018
10518
  gap: "1.5rem",
10019
10519
  width: "100%",
@@ -10024,7 +10524,7 @@ var Root43 = styled("aside")(({ theme }) => ({
10024
10524
  backgroundColor: theme.palette.background.paper,
10025
10525
  fontFamily: theme.typography.fontFamily
10026
10526
  }));
10027
- var Header3 = styled("div")({
10527
+ var Header4 = styled("div")({
10028
10528
  display: "flex",
10029
10529
  alignItems: "center",
10030
10530
  justifyContent: "space-between",
@@ -10105,8 +10605,8 @@ var FilterSidebar = forwardRef(
10105
10605
  onPriceRangeChange,
10106
10606
  onClear,
10107
10607
  ...props
10108
- }, ref) => /* @__PURE__ */ jsxs(Root43, { ref, "aria-label": "Filtry produkt\xF3w", ...props, children: [
10109
- /* @__PURE__ */ jsxs(Header3, { children: [
10608
+ }, ref) => /* @__PURE__ */ jsxs(Root52, { ref, "aria-label": "Filtry produkt\xF3w", ...props, children: [
10609
+ /* @__PURE__ */ jsxs(Header4, { children: [
10110
10610
  /* @__PURE__ */ jsx(Title9, { children: "Filtry" }),
10111
10611
  onClear && /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "sm", onClick: onClear, children: "Wyczy\u015B\u0107" })
10112
10612
  ] }),
@@ -10133,67 +10633,37 @@ var FilterSidebar = forwardRef(
10133
10633
  )
10134
10634
  ] })
10135
10635
  ] }),
10136
- categories.length > 0 && /* @__PURE__ */ jsxs(Group, { children: [
10137
- /* @__PURE__ */ jsx(Legend, { children: "Kategorie" }),
10138
- renderOptions(categories, selectedCategories, onToggleCategory)
10139
- ] }),
10140
- colors.length > 0 && /* @__PURE__ */ jsxs(Group, { children: [
10141
- /* @__PURE__ */ jsx(Legend, { children: "Kolory" }),
10142
- renderOptions(colors, selectedColors, onToggleColor)
10143
- ] }),
10144
- sizes.length > 0 && /* @__PURE__ */ jsxs(Group, { children: [
10145
- /* @__PURE__ */ jsx(Legend, { children: "Rozmiary" }),
10146
- renderOptions(sizes, selectedSizes, onToggleSize)
10147
- ] })
10148
- ] })
10149
- );
10150
- FilterSidebar.displayName = "FilterSidebar";
10151
- var Root44 = styled(Card)({ display: "grid", gap: "1rem" });
10152
- var Title10 = styled("h2")(({ theme }) => ({
10153
- margin: 0,
10154
- fontFamily: theme.typography.fontFamily,
10155
- fontSize: "1.125rem",
10156
- fontWeight: 800,
10157
- color: theme.palette.text.primary
10158
- }));
10159
- var Rows = styled("dl")({ display: "grid", gap: "0.75rem", margin: 0 });
10160
- var SectionTitle = styled("h3")(({ theme }) => ({
10161
- margin: 0,
10162
- fontFamily: theme.typography.fontFamily,
10163
- fontSize: "0.875rem",
10164
- fontWeight: 800,
10165
- color: theme.palette.text.primary
10166
- }));
10167
- var ItemList = styled("ul")({
10168
- display: "grid",
10169
- gap: "0.875rem",
10170
- padding: 0,
10171
- margin: 0,
10172
- listStyle: "none"
10173
- });
10174
- var Item4 = styled("li")({
10636
+ categories.length > 0 && /* @__PURE__ */ jsxs(Group, { children: [
10637
+ /* @__PURE__ */ jsx(Legend, { children: "Kategorie" }),
10638
+ renderOptions(categories, selectedCategories, onToggleCategory)
10639
+ ] }),
10640
+ colors.length > 0 && /* @__PURE__ */ jsxs(Group, { children: [
10641
+ /* @__PURE__ */ jsx(Legend, { children: "Kolory" }),
10642
+ renderOptions(colors, selectedColors, onToggleColor)
10643
+ ] }),
10644
+ sizes.length > 0 && /* @__PURE__ */ jsxs(Group, { children: [
10645
+ /* @__PURE__ */ jsx(Legend, { children: "Rozmiary" }),
10646
+ renderOptions(sizes, selectedSizes, onToggleSize)
10647
+ ] })
10648
+ ] })
10649
+ );
10650
+ FilterSidebar.displayName = "FilterSidebar";
10651
+ var Root53 = styled("li")({
10175
10652
  display: "grid",
10176
10653
  gridTemplateColumns: "3.5rem 1fr auto",
10177
10654
  alignItems: "center",
10178
10655
  gap: "0.75rem"
10179
10656
  });
10180
- var ItemImage2 = styled("img")(({ theme }) => ({
10181
- width: "3.5rem",
10182
- height: "3.5rem",
10183
- borderRadius: theme.shape.borderRadius,
10184
- objectFit: "cover",
10185
- backgroundColor: theme.palette.action.hover
10186
- }));
10187
- var ItemImagePlaceholder = styled("div")(({ theme }) => ({
10657
+ var ImageWrap5 = styled("div")(({ theme }) => ({
10658
+ position: "relative",
10188
10659
  width: "3.5rem",
10189
10660
  height: "3.5rem",
10190
10661
  borderRadius: theme.shape.borderRadius,
10191
- backgroundColor: theme.palette.action.hover
10662
+ overflow: "hidden",
10663
+ flexShrink: 0
10192
10664
  }));
10193
- var ItemInfo2 = styled("div")({
10194
- minWidth: 0
10195
- });
10196
- var ItemName2 = styled("p")(({ theme }) => ({
10665
+ var Info6 = styled("div")({ minWidth: 0 });
10666
+ var Name13 = styled("p")(({ theme }) => ({
10197
10667
  margin: 0,
10198
10668
  color: theme.palette.text.primary,
10199
10669
  fontFamily: theme.typography.fontFamily,
@@ -10201,39 +10671,88 @@ var ItemName2 = styled("p")(({ theme }) => ({
10201
10671
  fontWeight: 700,
10202
10672
  lineHeight: 1.4
10203
10673
  }));
10204
- var ItemMeta2 = styled("p")(({ theme }) => ({
10674
+ var Meta2 = styled("p")(({ theme }) => ({
10205
10675
  margin: "0.25rem 0 0",
10206
10676
  color: theme.palette.text.secondary,
10207
10677
  fontFamily: theme.typography.fontFamily,
10208
10678
  fontSize: "0.8125rem",
10209
10679
  lineHeight: 1.4
10210
10680
  }));
10211
- var ItemPrice = styled("span")(({ theme }) => ({
10681
+ var Price4 = styled("span")(({ theme }) => ({
10212
10682
  color: theme.palette.text.primary,
10213
10683
  fontFamily: theme.typography.fontFamily,
10214
10684
  fontSize: "0.875rem",
10215
10685
  fontWeight: 800,
10216
10686
  whiteSpace: "nowrap"
10217
10687
  }));
10218
- var Row5 = styled("div")(({ theme }) => ({
10688
+ var OrderSummaryItem = ({
10689
+ name,
10690
+ price,
10691
+ imageUrl,
10692
+ imageAlt,
10693
+ quantity,
10694
+ meta
10695
+ }) => /* @__PURE__ */ jsxs(Root53, { children: [
10696
+ /* @__PURE__ */ jsx(ImageWrap5, { children: /* @__PURE__ */ jsx(ProductCardImage, { src: imageUrl, alt: imageAlt ?? String(name) }) }),
10697
+ /* @__PURE__ */ jsxs(Info6, { children: [
10698
+ /* @__PURE__ */ jsx(Name13, { children: name }),
10699
+ (quantity !== void 0 || meta) && /* @__PURE__ */ jsxs(Meta2, { children: [
10700
+ quantity !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
10701
+ "Ilo\u015B\u0107: ",
10702
+ quantity
10703
+ ] }),
10704
+ quantity !== void 0 && meta && " \xB7 ",
10705
+ meta
10706
+ ] })
10707
+ ] }),
10708
+ /* @__PURE__ */ jsx(Price4, { children: price })
10709
+ ] });
10710
+ OrderSummaryItem.displayName = "OrderSummaryItem";
10711
+ var Root54 = styled("div", {
10712
+ shouldForwardProp: (prop) => prop !== "$total"
10713
+ })(({ theme, $total }) => ({
10219
10714
  display: "flex",
10220
10715
  justifyContent: "space-between",
10221
10716
  gap: "1rem",
10222
- color: theme.palette.text.secondary,
10717
+ color: $total ? theme.palette.text.primary : theme.palette.text.secondary,
10223
10718
  fontFamily: theme.typography.fontFamily,
10224
- fontSize: "0.875rem",
10719
+ fontSize: $total ? "1rem" : "0.875rem",
10720
+ fontWeight: $total ? 800 : 400,
10225
10721
  "& dt, & dd": { margin: 0 }
10226
10722
  }));
10723
+ var OrderSummaryRow = ({ label, value, total = false }) => /* @__PURE__ */ jsxs(Root54, { as: "div", $total: total, children: [
10724
+ /* @__PURE__ */ jsx("dt", { children: label }),
10725
+ /* @__PURE__ */ jsx("dd", { children: value })
10726
+ ] });
10727
+ OrderSummaryRow.displayName = "OrderSummaryRow";
10728
+ var Root55 = styled(Card)({ display: "grid", gap: "1rem" });
10729
+ var Title10 = styled("h2")(({ theme }) => ({
10730
+ margin: 0,
10731
+ fontFamily: theme.typography.fontFamily,
10732
+ fontSize: "1.125rem",
10733
+ fontWeight: 800,
10734
+ color: theme.palette.text.primary
10735
+ }));
10736
+ var Rows = styled("dl")({ display: "grid", gap: "0.75rem", margin: 0 });
10737
+ var SectionTitle = styled("h3")(({ theme }) => ({
10738
+ margin: 0,
10739
+ fontFamily: theme.typography.fontFamily,
10740
+ fontSize: "0.875rem",
10741
+ fontWeight: 800,
10742
+ color: theme.palette.text.primary
10743
+ }));
10744
+ var ItemList = styled("ul")({
10745
+ display: "grid",
10746
+ gap: "0.875rem",
10747
+ padding: 0,
10748
+ margin: 0,
10749
+ listStyle: "none"
10750
+ });
10227
10751
  var Divider3 = styled("hr")(({ theme }) => ({
10228
10752
  width: "100%",
10229
10753
  border: 0,
10230
10754
  borderTop: `1px solid ${theme.palette.divider}`
10231
10755
  }));
10232
- var TotalRow = styled(Row5)(({ theme }) => ({
10233
- color: theme.palette.text.primary,
10234
- fontSize: "1rem",
10235
- fontWeight: 800
10236
- }));
10237
10756
  var OrderSummary = forwardRef(
10238
10757
  ({
10239
10758
  title = "Podsumowanie zam\xF3wienia",
@@ -10248,59 +10767,27 @@ var OrderSummary = forwardRef(
10248
10767
  ctaLabel = "Przejd\u017A do kasy",
10249
10768
  onCheckout,
10250
10769
  ...props
10251
- }, ref) => /* @__PURE__ */ jsxs(Root44, { ref, variant: "default", padding: "lg", rounded: "lg", ...props, children: [
10770
+ }, ref) => /* @__PURE__ */ jsxs(Root55, { ref, variant: "default", padding: "lg", rounded: "lg", ...props, children: [
10252
10771
  /* @__PURE__ */ jsx(Title10, { children: title }),
10253
10772
  items.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
10254
10773
  /* @__PURE__ */ jsx(SectionTitle, { children: itemsTitle }),
10255
- /* @__PURE__ */ jsx(ItemList, { children: items.map((item) => /* @__PURE__ */ jsxs(Item4, { children: [
10256
- item.imageUrl ? /* @__PURE__ */ jsx(ItemImage2, { src: item.imageUrl, alt: item.imageAlt ?? String(item.name) }) : /* @__PURE__ */ jsx(ItemImagePlaceholder, { "aria-hidden": "true" }),
10257
- /* @__PURE__ */ jsxs(ItemInfo2, { children: [
10258
- /* @__PURE__ */ jsx(ItemName2, { children: item.name }),
10259
- (item.quantity !== void 0 || item.meta) && /* @__PURE__ */ jsxs(ItemMeta2, { children: [
10260
- item.quantity !== void 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
10261
- "Ilo\u015B\u0107: ",
10262
- item.quantity
10263
- ] }),
10264
- item.quantity !== void 0 && item.meta && " \xB7 ",
10265
- item.meta
10266
- ] })
10267
- ] }),
10268
- /* @__PURE__ */ jsx(ItemPrice, { children: item.price })
10269
- ] }, item.id)) }),
10774
+ /* @__PURE__ */ jsx(ItemList, { children: items.map((item) => /* @__PURE__ */ jsx(OrderSummaryItem, { ...item }, item.id)) }),
10270
10775
  /* @__PURE__ */ jsx(Divider3, {})
10271
10776
  ] }),
10272
10777
  /* @__PURE__ */ jsxs(Rows, { children: [
10273
- /* @__PURE__ */ jsxs(Row5, { children: [
10274
- /* @__PURE__ */ jsx("dt", { children: "Warto\u015B\u0107 produkt\xF3w" }),
10275
- /* @__PURE__ */ jsx("dd", { children: subtotal })
10276
- ] }),
10277
- shipping !== void 0 && /* @__PURE__ */ jsxs(Row5, { children: [
10278
- /* @__PURE__ */ jsx("dt", { children: "Dostawa" }),
10279
- /* @__PURE__ */ jsx("dd", { children: shipping })
10280
- ] }),
10281
- tax !== void 0 && /* @__PURE__ */ jsxs(Row5, { children: [
10282
- /* @__PURE__ */ jsx("dt", { children: "Podatek" }),
10283
- /* @__PURE__ */ jsx("dd", { children: tax })
10284
- ] }),
10285
- discount !== void 0 && /* @__PURE__ */ jsxs(Row5, { children: [
10286
- /* @__PURE__ */ jsx("dt", { children: "Rabat" }),
10287
- /* @__PURE__ */ jsx("dd", { children: discount })
10288
- ] }),
10289
- lines.map((line, index) => /* @__PURE__ */ jsxs(Row5, { children: [
10290
- /* @__PURE__ */ jsx("dt", { children: line.label }),
10291
- /* @__PURE__ */ jsx("dd", { children: line.value })
10292
- ] }, index))
10778
+ /* @__PURE__ */ jsx(OrderSummaryRow, { label: "Warto\u015B\u0107 produkt\xF3w", value: subtotal }),
10779
+ shipping !== void 0 && /* @__PURE__ */ jsx(OrderSummaryRow, { label: "Dostawa", value: shipping }),
10780
+ tax !== void 0 && /* @__PURE__ */ jsx(OrderSummaryRow, { label: "Podatek", value: tax }),
10781
+ discount !== void 0 && /* @__PURE__ */ jsx(OrderSummaryRow, { label: "Rabat", value: discount }),
10782
+ lines.map((line, index) => /* @__PURE__ */ jsx(OrderSummaryRow, { label: line.label, value: line.value }, index))
10293
10783
  ] }),
10294
10784
  /* @__PURE__ */ jsx(Divider3, {}),
10295
- /* @__PURE__ */ jsx(Rows, { children: /* @__PURE__ */ jsxs(TotalRow, { children: [
10296
- /* @__PURE__ */ jsx("dt", { children: "Razem" }),
10297
- /* @__PURE__ */ jsx("dd", { children: total })
10298
- ] }) }),
10785
+ /* @__PURE__ */ jsx(Rows, { children: /* @__PURE__ */ jsx(OrderSummaryRow, { label: "Razem", value: total, total: true }) }),
10299
10786
  /* @__PURE__ */ jsx(Button, { fullWidth: true, onClick: onCheckout, children: ctaLabel })
10300
10787
  ] })
10301
10788
  );
10302
10789
  OrderSummary.displayName = "OrderSummary";
10303
- var Root45 = styled("div")(({ theme }) => ({
10790
+ var Root56 = styled("div")(({ theme }) => ({
10304
10791
  fontFamily: theme.typography.fontFamily
10305
10792
  }));
10306
10793
  var Grid2 = styled("div", {
@@ -10335,17 +10822,87 @@ var ScrollTrack = styled("div")({
10335
10822
  }
10336
10823
  });
10337
10824
  var RelatedProducts = forwardRef(
10338
- ({ products, title = "Podobne produkty", layout = "grid", columns = 4, ...props }, ref) => /* @__PURE__ */ jsxs(Root45, { ref, ...props, children: [
10825
+ ({ products, title = "Podobne produkty", layout = "grid", columns = 4, ...props }, ref) => /* @__PURE__ */ jsxs(Root56, { ref, ...props, children: [
10339
10826
  /* @__PURE__ */ jsx(SectionHeading, { title, align: "left", style: { marginBottom: "1.5rem" } }),
10340
10827
  layout === "scroll" ? /* @__PURE__ */ jsx(ScrollTrack, { children: products.map((product, i) => /* @__PURE__ */ jsx(ProductCard, { ...product }, product.name + i)) }) : /* @__PURE__ */ jsx(Grid2, { $columns: columns, children: products.map((product, i) => /* @__PURE__ */ jsx(ProductCard, { ...product }, product.name + i)) })
10341
10828
  ] })
10342
10829
  );
10343
10830
  RelatedProducts.displayName = "RelatedProducts";
10344
10831
  var relatedProductsLayouts = ["grid", "scroll"];
10345
- var Root46 = styled("div")(({ theme }) => ({
10832
+ var Card2 = styled("div")(({ theme }) => ({
10833
+ padding: "1.25rem",
10834
+ border: `1px solid ${theme.palette.divider}`,
10835
+ borderRadius: theme.shape.borderRadius,
10836
+ display: "flex",
10837
+ flexDirection: "column",
10838
+ gap: "0.75rem",
10346
10839
  fontFamily: theme.typography.fontFamily
10347
10840
  }));
10348
- var Summary = styled("div")(({ theme }) => ({
10841
+ var Header5 = styled("div")({
10842
+ display: "flex",
10843
+ alignItems: "flex-start",
10844
+ gap: "0.875rem"
10845
+ });
10846
+ var AuthorInfo = styled("div")({ flex: 1 });
10847
+ var AuthorName = styled("div")(({ theme }) => ({
10848
+ display: "flex",
10849
+ alignItems: "center",
10850
+ gap: "0.375rem",
10851
+ fontSize: "0.9375rem",
10852
+ fontWeight: 700,
10853
+ color: theme.palette.text.primary
10854
+ }));
10855
+ var ReviewDate = styled("div")(({ theme }) => ({
10856
+ fontSize: "0.8125rem",
10857
+ color: theme.palette.text.secondary,
10858
+ marginTop: "0.125rem"
10859
+ }));
10860
+ var Title11 = styled("div")(({ theme }) => ({
10861
+ fontSize: "0.9375rem",
10862
+ fontWeight: 700,
10863
+ color: theme.palette.text.primary
10864
+ }));
10865
+ var Content3 = styled("p")(({ theme }) => ({
10866
+ margin: 0,
10867
+ fontSize: "0.9375rem",
10868
+ color: theme.palette.text.secondary,
10869
+ lineHeight: 1.6
10870
+ }));
10871
+ var HelpfulRow = styled("div")(({ theme }) => ({
10872
+ display: "flex",
10873
+ alignItems: "center",
10874
+ gap: "0.375rem",
10875
+ fontSize: "0.8125rem",
10876
+ color: theme.palette.text.secondary
10877
+ }));
10878
+ var ReviewItem = ({ review }) => /* @__PURE__ */ jsxs(Card2, { children: [
10879
+ /* @__PURE__ */ jsxs(Header5, { children: [
10880
+ /* @__PURE__ */ jsx(Avatar, { initials: review.author.slice(0, 2).toUpperCase(), size: "sm" }),
10881
+ /* @__PURE__ */ jsxs(AuthorInfo, { children: [
10882
+ /* @__PURE__ */ jsxs(AuthorName, { children: [
10883
+ review.author,
10884
+ review.verified && /* @__PURE__ */ jsx(
10885
+ VerifiedIcon,
10886
+ {
10887
+ "aria-label": "Zweryfikowany zakup",
10888
+ style: { fontSize: 14, color: "#16a34a" }
10889
+ }
10890
+ )
10891
+ ] }),
10892
+ /* @__PURE__ */ jsx(ReviewDate, { children: review.date })
10893
+ ] }),
10894
+ /* @__PURE__ */ jsx(Rating, { value: review.rating, size: "sm", readonly: true })
10895
+ ] }),
10896
+ review.title && /* @__PURE__ */ jsx(Title11, { children: review.title }),
10897
+ /* @__PURE__ */ jsx(Content3, { children: review.content }),
10898
+ review.helpfulCount !== void 0 && /* @__PURE__ */ jsxs(HelpfulRow, { children: [
10899
+ /* @__PURE__ */ jsx(ThumbUpOutlinedIcon, { "aria-hidden": true, style: { fontSize: 14 } }),
10900
+ review.helpfulCount,
10901
+ " os\xF3b uzna\u0142o t\u0119 recenzj\u0119 za pomocn\u0105"
10902
+ ] })
10903
+ ] });
10904
+ ReviewItem.displayName = "ReviewItem";
10905
+ var Root57 = styled("div")(({ theme }) => ({
10349
10906
  display: "flex",
10350
10907
  alignItems: "center",
10351
10908
  gap: "2rem",
@@ -10353,7 +10910,7 @@ var Summary = styled("div")(({ theme }) => ({
10353
10910
  padding: "1.5rem",
10354
10911
  backgroundColor: theme.palette.action.hover,
10355
10912
  borderRadius: theme.shape.borderRadius,
10356
- marginBottom: "2rem"
10913
+ fontFamily: theme.typography.fontFamily
10357
10914
  }));
10358
10915
  var AverageBlock = styled("div")({
10359
10916
  display: "flex",
@@ -10361,13 +10918,23 @@ var AverageBlock = styled("div")({
10361
10918
  alignItems: "center",
10362
10919
  gap: "0.25rem"
10363
10920
  });
10364
- var AverageScore = styled("span")(({ theme }) => ({
10921
+ var Score = styled("span")(({ theme }) => ({
10365
10922
  fontSize: "3rem",
10366
10923
  fontWeight: 800,
10367
10924
  lineHeight: 1,
10368
10925
  color: theme.palette.text.primary
10369
10926
  }));
10370
- var Distribution = styled("div")({ flex: 1, display: "flex", flexDirection: "column", gap: "0.375rem" });
10927
+ var ReviewCount = styled("span")(({ theme }) => ({
10928
+ fontSize: "0.8125rem",
10929
+ marginTop: "0.25rem",
10930
+ color: theme.palette.text.secondary
10931
+ }));
10932
+ var Distribution = styled("div")({
10933
+ flex: 1,
10934
+ display: "flex",
10935
+ flexDirection: "column",
10936
+ gap: "0.375rem"
10937
+ });
10371
10938
  var DistRow = styled("div")({ display: "flex", alignItems: "center", gap: "0.75rem" });
10372
10939
  var DistLabel = styled("span")(({ theme }) => ({
10373
10940
  fontSize: "0.8125rem",
@@ -10391,117 +10958,142 @@ var DistFill = styled("div", {
10391
10958
  borderRadius: "9999px",
10392
10959
  transition: "width 400ms ease"
10393
10960
  }));
10961
+ var ReviewSummary = ({
10962
+ averageRating,
10963
+ totalReviews,
10964
+ ratingDistribution
10965
+ }) => {
10966
+ const totalDist = ratingDistribution ? Object.values(ratingDistribution).reduce((a, b) => a + b, 0) : 0;
10967
+ return /* @__PURE__ */ jsxs(Root57, { children: [
10968
+ /* @__PURE__ */ jsxs(AverageBlock, { children: [
10969
+ /* @__PURE__ */ jsx(Score, { children: averageRating.toFixed(1) }),
10970
+ /* @__PURE__ */ jsx(Rating, { value: averageRating, size: "sm", readonly: true }),
10971
+ totalReviews !== void 0 && /* @__PURE__ */ jsxs(ReviewCount, { children: [
10972
+ totalReviews,
10973
+ " opinii"
10974
+ ] })
10975
+ ] }),
10976
+ ratingDistribution && /* @__PURE__ */ jsx(Distribution, { children: [5, 4, 3, 2, 1].map((star) => {
10977
+ const count = ratingDistribution[star] ?? 0;
10978
+ const pct2 = totalDist > 0 ? count / totalDist * 100 : 0;
10979
+ return /* @__PURE__ */ jsxs(DistRow, { children: [
10980
+ /* @__PURE__ */ jsxs(DistLabel, { children: [
10981
+ star,
10982
+ "\u2605"
10983
+ ] }),
10984
+ /* @__PURE__ */ jsx(DistBar, { children: /* @__PURE__ */ jsx(DistFill, { $pct: pct2 }) }),
10985
+ /* @__PURE__ */ jsx(DistLabel, { style: { textAlign: "left" }, children: count })
10986
+ ] }, star);
10987
+ }) })
10988
+ ] });
10989
+ };
10990
+ ReviewSummary.displayName = "ReviewSummary";
10991
+ var Root58 = styled("div")(({ theme }) => ({
10992
+ fontFamily: theme.typography.fontFamily
10993
+ }));
10394
10994
  var ReviewList = styled("div")({
10395
10995
  display: "flex",
10396
10996
  flexDirection: "column",
10397
10997
  gap: "1.5rem"
10398
10998
  });
10399
- var ReviewCard = styled("div")(({ theme }) => ({
10400
- padding: "1.25rem",
10401
- border: `1px solid ${theme.palette.divider}`,
10402
- borderRadius: theme.shape.borderRadius,
10403
- display: "flex",
10404
- flexDirection: "column",
10405
- gap: "0.75rem"
10406
- }));
10407
- var ReviewHeader = styled("div")({
10408
- display: "flex",
10409
- alignItems: "flex-start",
10410
- gap: "0.875rem"
10411
- });
10412
- var AuthorInfo2 = styled("div")({ flex: 1 });
10413
- var AuthorName2 = styled("div")(({ theme }) => ({
10414
- display: "flex",
10415
- alignItems: "center",
10416
- gap: "0.375rem",
10417
- fontSize: "0.9375rem",
10418
- fontWeight: 700,
10419
- color: theme.palette.text.primary
10420
- }));
10421
- var ReviewDate = styled("div")(({ theme }) => ({
10422
- fontSize: "0.8125rem",
10423
- color: theme.palette.text.secondary,
10424
- marginTop: "0.125rem"
10425
- }));
10426
- var ReviewTitle = styled("div")(({ theme }) => ({
10427
- fontSize: "0.9375rem",
10999
+ var ReviewSection = forwardRef(
11000
+ ({
11001
+ reviews,
11002
+ averageRating,
11003
+ totalReviews,
11004
+ title = "Opinie klient\xF3w",
11005
+ ratingDistribution,
11006
+ ...props
11007
+ }, ref) => /* @__PURE__ */ jsxs(Root58, { ref, ...props, children: [
11008
+ /* @__PURE__ */ jsx(SectionHeading, { title, align: "left", style: { marginBottom: "1.5rem" } }),
11009
+ averageRating !== void 0 && /* @__PURE__ */ jsx("div", { style: { marginBottom: "2rem" }, children: /* @__PURE__ */ jsx(
11010
+ ReviewSummary,
11011
+ {
11012
+ averageRating,
11013
+ totalReviews,
11014
+ ratingDistribution
11015
+ }
11016
+ ) }),
11017
+ /* @__PURE__ */ jsx(ReviewList, { children: reviews.map((review) => /* @__PURE__ */ jsx(ReviewItem, { review }, review.id)) })
11018
+ ] })
11019
+ );
11020
+ ReviewSection.displayName = "ReviewSection";
11021
+ var Heading = styled("h2")(({ theme }) => ({
11022
+ margin: "0 0 2rem",
11023
+ fontFamily: theme.typography.fontFamily,
11024
+ fontSize: "1.5rem",
10428
11025
  fontWeight: 700,
10429
11026
  color: theme.palette.text.primary
10430
11027
  }));
10431
- var ReviewContent = styled("p")(({ theme }) => ({
10432
- margin: 0,
10433
- fontSize: "0.9375rem",
11028
+ var CommentCount = styled("span")(({ theme }) => ({
11029
+ marginLeft: "0.375rem",
10434
11030
  color: theme.palette.text.secondary,
10435
- lineHeight: 1.6
11031
+ fontWeight: 400
10436
11032
  }));
10437
- var HelpfulRow = styled("div")(({ theme }) => ({
11033
+ var List5 = styled("div")({
10438
11034
  display: "flex",
10439
- alignItems: "center",
10440
- gap: "0.375rem",
10441
- fontSize: "0.8125rem",
10442
- color: theme.palette.text.secondary
11035
+ flexDirection: "column"
11036
+ });
11037
+ var ThreadWrapper = styled("div")(({ theme }) => ({
11038
+ display: "flex",
11039
+ flexDirection: "column",
11040
+ gap: "1.5rem",
11041
+ paddingTop: "1.5rem",
11042
+ paddingBottom: "1.5rem",
11043
+ borderBottom: `1px solid ${theme.palette.divider}`,
11044
+ "&:first-of-type": {
11045
+ paddingTop: 0
11046
+ },
11047
+ "&:last-child": {
11048
+ borderBottom: "none",
11049
+ paddingBottom: 0
11050
+ }
10443
11051
  }));
10444
- function ReviewItem({ review }) {
10445
- return /* @__PURE__ */ jsxs(ReviewCard, { children: [
10446
- /* @__PURE__ */ jsxs(ReviewHeader, { children: [
10447
- /* @__PURE__ */ jsx(
10448
- Avatar,
10449
- {
10450
- initials: review.author.slice(0, 2).toUpperCase(),
10451
- size: "sm"
10452
- }
10453
- ),
10454
- /* @__PURE__ */ jsxs(AuthorInfo2, { children: [
10455
- /* @__PURE__ */ jsxs(AuthorName2, { children: [
10456
- review.author,
10457
- review.verified && /* @__PURE__ */ jsx(VerifiedIcon, { "aria-label": "Zweryfikowany zakup", style: { fontSize: 14, color: "#16a34a" } })
10458
- ] }),
10459
- /* @__PURE__ */ jsx(ReviewDate, { children: review.date })
10460
- ] }),
10461
- /* @__PURE__ */ jsx(Rating, { value: review.rating, size: "sm", readonly: true })
10462
- ] }),
10463
- review.title && /* @__PURE__ */ jsx(ReviewTitle, { children: review.title }),
10464
- /* @__PURE__ */ jsx(ReviewContent, { children: review.content }),
10465
- review.helpfulCount !== void 0 && /* @__PURE__ */ jsxs(HelpfulRow, { children: [
10466
- /* @__PURE__ */ jsx(ThumbUpOutlinedIcon, { "aria-hidden": true, style: { fontSize: 14 } }),
10467
- review.helpfulCount,
10468
- " os\xF3b uzna\u0142o t\u0119 recenzj\u0119 za pomocn\u0105"
10469
- ] })
10470
- ] });
11052
+ var Replies = styled("div")({
11053
+ display: "flex",
11054
+ flexDirection: "column",
11055
+ gap: "1.5rem"
11056
+ });
11057
+ function countTotal(comments) {
11058
+ return comments.reduce((acc, c) => acc + 1 + (c.replies?.length ?? 0), 0);
10471
11059
  }
10472
- var ReviewSection = forwardRef(
10473
- ({ reviews, averageRating, totalReviews, title = "Opinie klient\xF3w", ratingDistribution, ...props }, ref) => {
10474
- const totalDist = ratingDistribution ? Object.values(ratingDistribution).reduce((a, b) => a + b, 0) : 0;
10475
- return /* @__PURE__ */ jsxs(Root46, { ref, ...props, children: [
10476
- /* @__PURE__ */ jsx(SectionHeading, { title, align: "left", style: { marginBottom: "1.5rem" } }),
10477
- (averageRating !== void 0 || ratingDistribution) && /* @__PURE__ */ jsxs(Summary, { children: [
10478
- averageRating !== void 0 && /* @__PURE__ */ jsxs(AverageBlock, { children: [
10479
- /* @__PURE__ */ jsx(AverageScore, { children: averageRating.toFixed(1) }),
10480
- /* @__PURE__ */ jsx(Rating, { value: averageRating, size: "sm", readonly: true }),
10481
- totalReviews !== void 0 && /* @__PURE__ */ jsxs("span", { style: { fontSize: "0.8125rem", marginTop: "0.25rem" }, children: [
10482
- totalReviews,
10483
- " opinii"
10484
- ] })
10485
- ] }),
10486
- ratingDistribution && /* @__PURE__ */ jsx(Distribution, { children: [5, 4, 3, 2, 1].map((star) => {
10487
- const count = ratingDistribution[star] ?? 0;
10488
- const pct2 = totalDist > 0 ? count / totalDist * 100 : 0;
10489
- return /* @__PURE__ */ jsxs(DistRow, { children: [
10490
- /* @__PURE__ */ jsxs(DistLabel, { children: [
10491
- star,
10492
- "\u2605"
10493
- ] }),
10494
- /* @__PURE__ */ jsx(DistBar, { children: /* @__PURE__ */ jsx(DistFill, { $pct: pct2 }) }),
10495
- /* @__PURE__ */ jsx(DistLabel, { style: { textAlign: "left" }, children: count })
10496
- ] }, star);
10497
- }) })
11060
+ var CommentSection = forwardRef(
11061
+ ({
11062
+ title = "Komentarze",
11063
+ comments,
11064
+ maxWidth = "xl",
11065
+ onLike,
11066
+ onReply,
11067
+ ...rest
11068
+ }, ref) => {
11069
+ const total = countTotal(comments);
11070
+ return /* @__PURE__ */ jsx(Section, { ref, ...rest, children: /* @__PURE__ */ jsxs(Container, { maxWidth, children: [
11071
+ /* @__PURE__ */ jsxs(Heading, { children: [
11072
+ title,
11073
+ /* @__PURE__ */ jsxs(CommentCount, { children: [
11074
+ "(",
11075
+ total,
11076
+ ")"
11077
+ ] })
10498
11078
  ] }),
10499
- /* @__PURE__ */ jsx(ReviewList, { children: reviews.map((review) => /* @__PURE__ */ jsx(ReviewItem, { review }, review.id)) })
10500
- ] });
11079
+ /* @__PURE__ */ jsx(List5, { children: comments.map((comment) => /* @__PURE__ */ jsxs(ThreadWrapper, { children: [
11080
+ /* @__PURE__ */ jsx(CommentCard, { comment, depth: 0, onLike, onReply }),
11081
+ comment.replies && comment.replies.length > 0 && /* @__PURE__ */ jsx(Replies, { children: comment.replies.map((reply) => /* @__PURE__ */ jsx(
11082
+ CommentCard,
11083
+ {
11084
+ comment: reply,
11085
+ depth: 1,
11086
+ onLike,
11087
+ onReply
11088
+ },
11089
+ reply.id
11090
+ )) })
11091
+ ] }, comment.id)) })
11092
+ ] }) });
10501
11093
  }
10502
11094
  );
10503
- ReviewSection.displayName = "ReviewSection";
10504
- var List4 = styled("div")(({ $hasHeading }) => ({
11095
+ CommentSection.displayName = "CommentSection";
11096
+ var List6 = styled("div")(({ $hasHeading }) => ({
10505
11097
  marginTop: $hasHeading ? "2.5rem" : 0
10506
11098
  }));
10507
11099
  var FaqSection = forwardRef(
@@ -10517,7 +11109,7 @@ var FaqSection = forwardRef(
10517
11109
  const hasHeading = Boolean(title || description);
10518
11110
  return /* @__PURE__ */ jsx(Section, { ref, ...rest, children: /* @__PURE__ */ jsxs(Container, { maxWidth, children: [
10519
11111
  hasHeading && /* @__PURE__ */ jsx(SectionHeading, { title: title ?? "", description, align: headingAlign }),
10520
- /* @__PURE__ */ jsx(List4, { $hasHeading: hasHeading, children: items.map((item, index) => /* @__PURE__ */ jsx(
11112
+ /* @__PURE__ */ jsx(List6, { $hasHeading: hasHeading, children: items.map((item, index) => /* @__PURE__ */ jsx(
10521
11113
  FaqItem,
10522
11114
  {
10523
11115
  item,
@@ -10559,7 +11151,7 @@ var FeatureGrid = forwardRef(
10559
11151
  return /* @__PURE__ */ jsx(Section, { ref, ...rest, children: /* @__PURE__ */ jsxs(Container, { maxWidth, children: [
10560
11152
  hasHeading && /* @__PURE__ */ jsx(SectionHeading, { title: title ?? "", description, align: headingAlign }),
10561
11153
  /* @__PURE__ */ jsx(Grid3, { $columns: columns, $hasHeading: hasHeading, $iconLeft: itemLayout === "icon-left", children: features.map((feature, index) => /* @__PURE__ */ jsx(
10562
- FeatureItem2,
11154
+ FeatureItem,
10563
11155
  {
10564
11156
  feature,
10565
11157
  cardVariant,
@@ -11042,7 +11634,7 @@ var GroupLabel3 = styled("div")(({ theme }) => ({
11042
11634
  textTransform: "uppercase",
11043
11635
  letterSpacing: "0.06em"
11044
11636
  }));
11045
- var Item5 = styled("div", {
11637
+ var Item4 = styled("div", {
11046
11638
  shouldForwardProp: (p) => p !== "$active"
11047
11639
  })(({ theme, $active }) => ({
11048
11640
  display: "flex",
@@ -11241,7 +11833,7 @@ function CommandPalette({
11241
11833
  const idx = globalIndex++;
11242
11834
  const isActive = idx === activeIndex;
11243
11835
  return /* @__PURE__ */ jsxs(
11244
- Item5,
11836
+ Item4,
11245
11837
  {
11246
11838
  id: `${id}-item-${item.id}`,
11247
11839
  role: "option",
@@ -11336,8 +11928,8 @@ var TopRow = styled("div")({
11336
11928
  gap: "1rem",
11337
11929
  flexWrap: "wrap"
11338
11930
  });
11339
- var TextBlock = styled("div")({ flex: 1, minWidth: "16rem" });
11340
- var Title11 = styled("p")(({ theme }) => ({
11931
+ var TextBlock2 = styled("div")({ flex: 1, minWidth: "16rem" });
11932
+ var Title12 = styled("p")(({ theme }) => ({
11341
11933
  margin: "0 0 0.25rem",
11342
11934
  fontFamily: theme.typography.fontFamily,
11343
11935
  fontSize: "1rem",
@@ -11345,7 +11937,7 @@ var Title11 = styled("p")(({ theme }) => ({
11345
11937
  color: theme.palette.text.primary,
11346
11938
  lineHeight: 1.4
11347
11939
  }));
11348
- var Description8 = styled("p")(({ theme }) => ({
11940
+ var Description9 = styled("p")(({ theme }) => ({
11349
11941
  margin: 0,
11350
11942
  fontFamily: theme.typography.fontFamily,
11351
11943
  fontSize: "0.875rem",
@@ -11357,7 +11949,7 @@ var Link3 = styled("a")(({ theme }) => ({
11357
11949
  textDecoration: "underline",
11358
11950
  "&:hover": { opacity: 0.8 }
11359
11951
  }));
11360
- var Actions = styled("div")({
11952
+ var Actions2 = styled("div")({
11361
11953
  display: "flex",
11362
11954
  alignItems: "center",
11363
11955
  gap: "0.625rem",
@@ -11501,9 +12093,9 @@ function CookieConsent({
11501
12093
  return createPortal(
11502
12094
  /* @__PURE__ */ jsx(Bar2, { role: "region", "aria-label": "Zgoda na pliki cookie", "aria-live": "polite", children: /* @__PURE__ */ jsxs(Inner4, { children: [
11503
12095
  /* @__PURE__ */ jsxs(TopRow, { children: [
11504
- /* @__PURE__ */ jsxs(TextBlock, { children: [
11505
- /* @__PURE__ */ jsx(Title11, { children: title }),
11506
- /* @__PURE__ */ jsxs(Description8, { children: [
12096
+ /* @__PURE__ */ jsxs(TextBlock2, { children: [
12097
+ /* @__PURE__ */ jsx(Title12, { children: title }),
12098
+ /* @__PURE__ */ jsxs(Description9, { children: [
11507
12099
  description,
11508
12100
  privacyPolicyLabel && privacyPolicyHref && /* @__PURE__ */ jsxs(Fragment, { children: [
11509
12101
  " ",
@@ -11511,7 +12103,7 @@ function CookieConsent({
11511
12103
  ] })
11512
12104
  ] })
11513
12105
  ] }),
11514
- /* @__PURE__ */ jsxs(Actions, { children: [
12106
+ /* @__PURE__ */ jsxs(Actions2, { children: [
11515
12107
  /* @__PURE__ */ jsx(
11516
12108
  TextButton,
11517
12109
  {
@@ -11553,16 +12145,11 @@ function CookieConsent({
11553
12145
  );
11554
12146
  }
11555
12147
  var defaultCookieCategories = DEFAULT_CATEGORIES;
11556
- var Root47 = styled("footer")(({ theme }) => ({
12148
+ var Root59 = styled("footer")(({ theme }) => ({
11557
12149
  width: "100%",
11558
12150
  backgroundColor: theme.palette.background.paper,
11559
12151
  borderTop: `1px solid ${theme.palette.divider}`
11560
12152
  }));
11561
- var Inner5 = styled("div")({
11562
- maxWidth: "72rem",
11563
- margin: "0 auto",
11564
- padding: "3rem 1.5rem 2rem"
11565
- });
11566
12153
  var TopRow2 = styled("div")({
11567
12154
  display: "grid",
11568
12155
  gridTemplateColumns: "1fr",
@@ -11580,7 +12167,7 @@ var BrandBlock = styled("div")({
11580
12167
  flexDirection: "column",
11581
12168
  gap: "0.75rem"
11582
12169
  });
11583
- var Description9 = styled("p")(({ theme }) => ({
12170
+ var Description10 = styled("p")(({ theme }) => ({
11584
12171
  margin: 0,
11585
12172
  fontFamily: theme.typography.fontFamily,
11586
12173
  fontSize: "0.875rem",
@@ -11691,14 +12278,16 @@ function Footer7({
11691
12278
  description,
11692
12279
  columns = [],
11693
12280
  socialLinks = [],
11694
- copyright
12281
+ copyright,
12282
+ maxWidth = "lg",
12283
+ style
11695
12284
  }) {
11696
12285
  const colCount = columns.length;
11697
- return /* @__PURE__ */ jsx(Root47, { children: /* @__PURE__ */ jsxs(Inner5, { children: [
12286
+ return /* @__PURE__ */ jsx(Root59, { style, children: /* @__PURE__ */ jsxs(Container, { maxWidth, style: { paddingTop: "3rem", paddingBottom: "2rem" }, children: [
11698
12287
  (logo || description || colCount > 0) && /* @__PURE__ */ jsxs(TopRow2, { style: { "--col-count": colCount }, children: [
11699
12288
  (logo || description) && /* @__PURE__ */ jsxs(BrandBlock, { children: [
11700
12289
  logo,
11701
- description && /* @__PURE__ */ jsx(Description9, { children: description })
12290
+ description && /* @__PURE__ */ jsx(Description10, { children: description })
11702
12291
  ] }),
11703
12292
  columns.map((col) => /* @__PURE__ */ jsxs(Column, { children: [
11704
12293
  /* @__PURE__ */ jsx(ColumnTitle, { children: col.title }),
@@ -11721,7 +12310,7 @@ function Footer7({
11721
12310
  ] })
11722
12311
  ] }) });
11723
12312
  }
11724
- var Root48 = styled("header", {
12313
+ var Root60 = styled("header", {
11725
12314
  shouldForwardProp: (p) => p !== "$sticky" && p !== "$variant"
11726
12315
  })(({ theme, $sticky, $variant }) => ({
11727
12316
  position: $sticky ? "sticky" : "relative",
@@ -11732,17 +12321,6 @@ var Root48 = styled("header", {
11732
12321
  borderBottom: $variant === "transparent" ? "none" : `1px solid ${theme.palette.divider}`,
11733
12322
  boxShadow: $variant === "transparent" ? "none" : "0 1px 4px rgba(0,0,0,0.08)"
11734
12323
  }));
11735
- var Inner6 = styled("div", {
11736
- shouldForwardProp: (p) => p !== "$maxWidth"
11737
- })(({ $maxWidth }) => ({
11738
- maxWidth: typeof $maxWidth === "number" ? `${$maxWidth}px` : $maxWidth,
11739
- margin: "0 auto",
11740
- padding: "0 1.5rem",
11741
- height: "3.75rem",
11742
- display: "flex",
11743
- alignItems: "center",
11744
- gap: "1.5rem"
11745
- }));
11746
12324
  var LogoSlot = styled("div")({
11747
12325
  flexShrink: 0,
11748
12326
  display: "flex",
@@ -11808,7 +12386,8 @@ var MobileDrawer = styled("div", {
11808
12386
  display: $open ? "flex" : "none",
11809
12387
  flexDirection: "column",
11810
12388
  gap: "0.25rem",
11811
- padding: "0.75rem 1.5rem 1rem",
12389
+ paddingTop: "0.75rem",
12390
+ paddingBottom: "1rem",
11812
12391
  borderTop: `1px solid ${theme.palette.divider}`,
11813
12392
  backgroundColor: theme.palette.background.paper,
11814
12393
  "@media (min-width: 768px)": {
@@ -11839,87 +12418,80 @@ function Navbar({
11839
12418
  actions,
11840
12419
  sticky = false,
11841
12420
  variant = "filled",
11842
- maxWidth = "72rem"
12421
+ maxWidth = "lg",
12422
+ style
11843
12423
  }) {
11844
12424
  const [mobileOpen, setMobileOpen] = useState(false);
11845
- return /* @__PURE__ */ jsxs(Root48, { $sticky: sticky, $variant: variant, children: [
11846
- /* @__PURE__ */ jsxs(Inner6, { $maxWidth: maxWidth, children: [
11847
- logo && /* @__PURE__ */ jsx(LogoSlot, { children: logo }),
11848
- /* @__PURE__ */ jsx(Nav3, { "aria-label": "Nawigacja g\u0142\xF3wna", children: navItems.map((item) => /* @__PURE__ */ jsx(NavLink, { href: item.href, $active: !!item.active, children: item.label }, item.href)) }),
11849
- (actions || navItems.length > 0) && /* @__PURE__ */ jsxs(RightSlot, { children: [
11850
- actions,
11851
- navItems.length > 0 && /* @__PURE__ */ jsx(
11852
- HamburgerButton,
11853
- {
11854
- type: "button",
11855
- "aria-label": mobileOpen ? "Zamknij menu" : "Otw\xF3rz menu",
11856
- "aria-expanded": mobileOpen,
11857
- onClick: () => setMobileOpen((v) => !v),
11858
- children: /* @__PURE__ */ jsx(HamburgerIcon, { open: mobileOpen })
11859
- }
11860
- )
11861
- ] })
11862
- ] }),
11863
- navItems.length > 0 && /* @__PURE__ */ jsx(MobileDrawer, { $open: mobileOpen, "aria-label": "Menu mobilne", children: navItems.map((item) => /* @__PURE__ */ jsx(MobileNavLink, { href: item.href, $active: !!item.active, children: item.label }, item.href)) })
12425
+ return /* @__PURE__ */ jsxs(Root60, { $sticky: sticky, $variant: variant, style, children: [
12426
+ /* @__PURE__ */ jsxs(
12427
+ Container,
12428
+ {
12429
+ maxWidth,
12430
+ style: { height: "3.75rem", display: "flex", alignItems: "center", gap: "1.5rem" },
12431
+ children: [
12432
+ logo && /* @__PURE__ */ jsx(LogoSlot, { children: logo }),
12433
+ /* @__PURE__ */ jsx(Nav3, { "aria-label": "Nawigacja g\u0142\xF3wna", children: navItems.map((item) => /* @__PURE__ */ jsx(NavLink, { href: item.href, $active: !!item.active, children: item.label }, item.href)) }),
12434
+ (actions || navItems.length > 0) && /* @__PURE__ */ jsxs(RightSlot, { children: [
12435
+ actions,
12436
+ navItems.length > 0 && /* @__PURE__ */ jsx(
12437
+ HamburgerButton,
12438
+ {
12439
+ type: "button",
12440
+ "aria-label": mobileOpen ? "Zamknij menu" : "Otw\xF3rz menu",
12441
+ "aria-expanded": mobileOpen,
12442
+ onClick: () => setMobileOpen((v) => !v),
12443
+ children: /* @__PURE__ */ jsx(HamburgerIcon, { open: mobileOpen })
12444
+ }
12445
+ )
12446
+ ] })
12447
+ ]
12448
+ }
12449
+ ),
12450
+ navItems.length > 0 && /* @__PURE__ */ jsx(MobileDrawer, { $open: mobileOpen, "aria-label": "Menu mobilne", children: /* @__PURE__ */ jsx(Container, { maxWidth, children: navItems.map((item) => /* @__PURE__ */ jsx(MobileNavLink, { href: item.href, $active: !!item.active, children: item.label }, item.href)) }) })
11864
12451
  ] });
11865
12452
  }
11866
- var ss = "sans-serif";
12453
+ var fontFamily = "'Lato', sans-serif";
11867
12454
  var typographyOptions = {
11868
- fontFamily: ["'Lato'", ss].join(","),
11869
- h1: {
11870
- fontFamily: ["'Lato'", ss].join(","),
11871
- fontSize: "1.75rem"
11872
- },
11873
- h2: {
11874
- fontFamily: ["'Lato'", ss].join(","),
11875
- fontSize: "1.375rem"
11876
- },
11877
- h3: {
11878
- fontFamily: ["'Lato'", ss].join(","),
11879
- fontSize: "1.125rem"
11880
- },
11881
- h4: {
11882
- fontFamily: ["'Lato'", ss].join(","),
11883
- fontSize: "1rem"
11884
- },
11885
- h5: {
11886
- fontFamily: ["'Lato'", ss].join(","),
11887
- fontSize: "0.875rem"
11888
- },
11889
- h6: {
11890
- fontFamily: ["'Lato'", ss].join(","),
11891
- fontSize: "0.75rem"
11892
- }
12455
+ fontFamily,
12456
+ h1: { fontSize: "1.75rem" },
12457
+ h2: { fontSize: "1.375rem" },
12458
+ h3: { fontSize: "1.125rem" },
12459
+ h4: { fontSize: "1rem" },
12460
+ h5: { fontSize: "0.875rem" },
12461
+ h6: { fontSize: "0.75rem" }
11893
12462
  };
11894
- var themeLight = createTheme({
12463
+ var themeBase = {
11895
12464
  typography: typographyOptions,
12465
+ palette: {
12466
+ error: { main: "#d32f2f", dark: "#b71c1c", light: "#ef5350", contrastText: "#ffffff" },
12467
+ success: { main: "#388e3c", dark: "#2e7d32", light: "#66bb6a", contrastText: "#ffffff" },
12468
+ warning: { main: "#f57c00", dark: "#ef6c00", light: "#ffb74d", contrastText: "#000000" },
12469
+ info: { main: "#1976d2", dark: "#1565c0", light: "#42a5f5", contrastText: "#ffffff" }
12470
+ }
12471
+ };
12472
+ var themeLight = createTheme(themeBase, {
11896
12473
  palette: {
11897
12474
  mode: "light",
11898
12475
  primary: { main: "#1976d2", dark: "#1565c0", light: "#42a5f5", contrastText: "#ffffff" },
11899
12476
  secondary: { main: "#6b7280", dark: "#4b5563", light: "#9ca3af", contrastText: "#ffffff" },
11900
- error: { main: "#d32f2f", dark: "#b71c1c", light: "#ef5350", contrastText: "#ffffff" },
11901
12477
  action: { disabled: "rgba(0,0,0,0.38)", disabledBackground: "rgba(0,0,0,0.12)" },
11902
12478
  background: { default: "#ffffff", paper: "#f5f5f5" }
11903
12479
  }
11904
12480
  });
11905
- var themeDark = createTheme({
11906
- typography: typographyOptions,
12481
+ var themeDark = createTheme(themeBase, {
11907
12482
  palette: {
11908
12483
  mode: "dark",
11909
12484
  primary: { main: "#90caf9", dark: "#42a5f5", light: "#bbdefb", contrastText: "#0d1b2a" },
11910
12485
  secondary: { main: "#9ca3af", dark: "#6b7280", light: "#d1d5db", contrastText: "#111827" },
11911
- error: { main: "#f48fb1", dark: "#f06292", light: "#fce4ec", contrastText: "#1a0010" },
11912
12486
  action: { disabled: "rgba(255,255,255,0.30)", disabledBackground: "rgba(255,255,255,0.12)" },
11913
12487
  background: { default: "#121212", paper: "#1e1e1e" }
11914
12488
  }
11915
12489
  });
11916
- var themeHighContrast = createTheme({
11917
- typography: typographyOptions,
12490
+ var themeHighContrast = createTheme(themeBase, {
11918
12491
  palette: {
11919
12492
  mode: "dark",
11920
12493
  primary: { main: "#ffffff", dark: "#e0e0e0", light: "#ffffff", contrastText: "#000000" },
11921
12494
  secondary: { main: "#ffff00", dark: "#cccc00", light: "#ffff66", contrastText: "#000000" },
11922
- error: { main: "#ff6b6b", dark: "#ff3333", light: "#ffaaaa", contrastText: "#000000" },
11923
12495
  action: { disabled: "rgba(255,255,255,0.38)", disabledBackground: "rgba(255,255,255,0.12)" },
11924
12496
  background: { default: "#000000", paper: "#1a1a1a" }
11925
12497
  }
@@ -11968,6 +12540,6 @@ var MyThemeProvider = ({
11968
12540
  ] });
11969
12541
  };
11970
12542
 
11971
- export { Accordion, Alert, Article, AspectRatio, Avatar, BackToTop, Badge2 as Badge, BaseInput, BaseSelectInput, Box2 as Box, Breadcrumbs, Button, Card, Carousel, CartButton, CartDrawer, CategoryCard, CheckboxInput, CommandPalette, CompareTool, Container, ContextMenu, CookieConsent, CountdownTimer, CountryFlag, CouponInput, DateTimePicker, EmailInput, EmptyState, FaqItem, FaqSection, FeatureGrid, FeatureItem2 as FeatureItem, FileInput, FilterSidebar, Footer7 as Footer, Lightbox, List3 as List, LogoCloud, LogoTile, Main, Marquee, Modal, MultiSelectInput, MyThemeProvider, Navbar, NewsletterSection, NumberInput, OrderSummary, PaginationBar, PaginationButton, PaginationEllipsis, Partners, PasswordInput, PaymentMethodSelector, PhoneInput, PostCard, PostCardImage, PostCardMeta, Price, PricingCard, PricingSection, ProcessSection, ProcessStep, ProductCard, ProductCardHorizontal, ProductGallery, ProgressBar, ProgressCircle, PromoStrip, Prose, QuantitySelector, RangeSlider, Rating, RelatedProducts, ReviewSection, SaleBadge, SearchInput, Section, SectionHeading, SelectInput, ShippingSelector, Skeleton, SortBar, Spinner3 as Spinner, StatCard, StatsSection, StockStatus, SwitchInput, Tabs, TeamMemberCard, TeamSection, TestimonialCard, TestimonialsSection, TextInput, TextareaInput, Timeline, VariantSelector, VideoPlayer, WishlistButton, accordionVariants, alertSeverities, aspectRatioPresets, avatarColors, avatarSizes, backToTopPositions, backToTopVariants, badgeVariants, cardPaddings, cardRoundeds, cardVariants, countdownTimerVariants, createMyTheme, dateTimePickerModes, defaultCookieCategories, featureGridColumns, listSizes, listVariants, logoCloudColumns, logoCloudVariants, logoTileVariants, marqueeDirections, marqueeSpeeds, modalSizes, myTheme, newsletterLayouts, postCardVariants, priceSizes, progressBarSizes, progressBarVariants, progressCircleSizes, progressCircleVariants, promoStripVariants, rangeSliderSizes, relatedProductsLayouts, saleBadgeVariants, sectionHeadingAligns, skeletonVariants, spinnerColors, spinnerSizes, spinnerVariants, statsSectionColumns, stockStatusValues, switchColors, tabsVariants, teamSectionColumns, testimonialsSectionColumns, themeDark, themeHighContrast, themeLight, timelineItemStatuses, timelineVariants, variantSelectorModes };
12543
+ export { Accordion, Alert, Article, AspectRatio, Avatar, BackToTop, Badge2 as Badge, BaseInput, BaseSelectInput, Box2 as Box, Breadcrumbs, Button, Card, Carousel, CartButton, CartDrawer, CartDrawerItem as CartDrawerItemComponent, CategoryCard, CategoryCardImage, CategoryCardInfo, CheckboxInput, CommandPalette, CommentActions, CommentBody, CommentCard, CommentMeta, CommentSection, CompareTool, Container, ContextMenu, CookieConsent, CountdownTimer, CountryFlag, CouponInput, DateTimePicker, DealCard, EmailInput, EmptyState, FaqItem, FaqSection, FeatureGrid, FeatureItem, FileInput, FilterSidebar, Footer7 as Footer, Image, Lightbox, List4 as List, LogoCloud, LogoTile, Main, Marquee, Modal, MultiSelectInput, MyThemeProvider, Navbar, NewsletterSection, NumberInput, OrderSummary, OrderSummaryItem as OrderSummaryItemComponent, OrderSummaryRow, PaginationBar, PaginationButton, PaginationEllipsis, Partners, PasswordInput, PaymentMethodSelector, PhoneInput, PostCard, PostCardImage, PostCardMeta, Price, PricingCard, PricingCardFeatureList, PricingCardPrice, PricingSection, ProcessSection, ProcessStep, ProductCard, ProductCardHorizontal, ProductCardImage, ProductGallery, ProfileCard, ProgressBar, ProgressCircle, PromoStrip, Prose, QuantitySelector, RangeSlider, Rating, RelatedProducts, ReviewItem, ReviewSection, ReviewSummary, SearchInput, Section, SectionHeading, SelectInput, ShippingSelector, Skeleton, SortBar, Spinner3 as Spinner, StatCard, StatsSection, StockStatus, SwitchInput, Tabs, TeamMemberAvatar, TeamMemberCard, TeamMemberInfo, TeamSection, TestimonialAuthor, TestimonialCard, TestimonialQuote, TestimonialsSection, TextInput, TextareaInput, Timeline, VariantSelector, VideoPlayer, VoucherCard, WishlistButton, accordionVariants, alertSeverities, aspectRatioPresets, avatarColors, avatarSizes, backToTopPositions, backToTopVariants, badgeVariants, cardPaddings, cardRoundeds, cardVariants, countdownTimerVariants, createMyTheme, dateTimePickerModes, defaultCookieCategories, featureGridColumns, listSizes, listVariants, logoCloudColumns, logoCloudVariants, logoTileVariants, marqueeDirections, marqueeSpeeds, modalSizes, myTheme, newsletterLayouts, postCardVariants, priceSizes, progressBarSizes, progressBarVariants, progressCircleSizes, progressCircleVariants, promoStripVariants, rangeSliderSizes, relatedProductsLayouts, sectionHeadingAligns, skeletonVariants, spinnerColors, spinnerSizes, spinnerVariants, statsSectionColumns, stockStatusValues, switchColors, tabsVariants, teamSectionColumns, testimonialsSectionColumns, themeDark, themeHighContrast, themeLight, timelineItemStatuses, timelineVariants, variantSelectorModes };
11972
12544
  //# sourceMappingURL=index.js.map
11973
12545
  //# sourceMappingURL=index.js.map