@szymonpiatek/designsystem 0.0.13 → 0.0.15

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.cjs CHANGED
@@ -239,14 +239,32 @@ function getVariantStyles(variant, theme) {
239
239
  }
240
240
  }
241
241
  var StyledCard = styles.styled("div", {
242
- shouldForwardProp: (prop) => !["$variant", "$padding", "$rounded"].includes(prop)
243
- })(({ theme, $variant, $padding, $rounded }) => ({
242
+ shouldForwardProp: (prop) => !["$variant", "$padding", "$rounded", "$hoverEffect"].includes(prop)
243
+ })(({ theme, $variant, $padding, $rounded, $hoverEffect }) => ({
244
244
  padding: paddingMap[$padding],
245
245
  borderRadius: roundedMap[$rounded],
246
- ...getVariantStyles($variant, theme)
246
+ ...getVariantStyles($variant, theme),
247
+ ...$hoverEffect && {
248
+ cursor: "pointer",
249
+ transition: "box-shadow 150ms ease, transform 150ms ease",
250
+ "&:hover": {
251
+ boxShadow: theme.shadows[4],
252
+ transform: "translateY(-2px)"
253
+ }
254
+ }
247
255
  }));
248
256
  var Card = react.forwardRef(
249
- ({ variant = "default", padding = "md", rounded = "lg", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(StyledCard, { ref, $variant: variant, $padding: padding, $rounded: rounded, ...props })
257
+ ({ variant = "default", padding = "md", rounded = "lg", hoverEffect = false, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
258
+ StyledCard,
259
+ {
260
+ ref,
261
+ $variant: variant,
262
+ $padding: padding,
263
+ $rounded: rounded,
264
+ $hoverEffect: hoverEffect,
265
+ ...props
266
+ }
267
+ )
250
268
  );
251
269
  Card.displayName = "Card";
252
270
  var cardVariants = [
@@ -541,14 +559,16 @@ var Accordion = react.forwardRef(
541
559
  Accordion.displayName = "Accordion";
542
560
  var accordionVariants = ["default", "bordered", "separated"];
543
561
  var iconSizeMap = {
544
- sm: 18,
545
- md: 20,
546
- lg: 24
562
+ sm: 16,
563
+ md: 18,
564
+ lg: 20,
565
+ xl: 24
547
566
  };
548
567
  var sizeMap3 = {
549
- sm: { height: "2rem", paddingInline: "0.75rem", fontSize: "0.75rem", gap: "0.25rem" },
550
- md: { height: "2.5rem", paddingInline: "1.25rem", fontSize: "0.875rem", gap: "0.375rem" },
551
- lg: { height: "3rem", paddingInline: "1.75rem", fontSize: "1rem", gap: "0.5rem" }
568
+ sm: { height: "1.625rem", paddingInline: "0.5rem", fontSize: "0.625rem", gap: "0.125rem" },
569
+ md: { height: "2rem", paddingInline: "0.75rem", fontSize: "0.75rem", gap: "0.25rem" },
570
+ lg: { height: "2.5rem", paddingInline: "1.25rem", fontSize: "0.875rem", gap: "0.375rem" },
571
+ xl: { height: "3rem", paddingInline: "1.75rem", fontSize: "1rem", gap: "0.5rem" }
552
572
  };
553
573
  var variantStyles = {
554
574
  primary: (theme) => ({
@@ -679,25 +699,28 @@ var Button = react.forwardRef(
679
699
  )
680
700
  );
681
701
  Button.displayName = "Button";
682
- var StyledButton2 = styles.styled(Button)(({ theme }) => ({
702
+ var StyledButton2 = styles.styled(Button)(({ theme, $variant }) => ({
683
703
  border: "none",
684
704
  borderRadius: "0.375rem",
685
- color: theme.palette.text.secondary,
686
- "&:hover:not(:disabled)": {
687
- backgroundColor: theme.palette.action.hover,
688
- color: theme.palette.text.primary
689
- },
690
- "&:active:not(:disabled)": {
691
- filter: "none",
692
- backgroundColor: theme.palette.action.selected
693
- }
705
+ ...$variant === "ghost" || $variant === "text" ? {
706
+ color: theme.palette.text.secondary,
707
+ "&:hover:not(:disabled)": {
708
+ backgroundColor: theme.palette.action.hover,
709
+ color: theme.palette.text.primary
710
+ },
711
+ "&:active:not(:disabled)": {
712
+ filter: "none",
713
+ backgroundColor: theme.palette.action.selected
714
+ }
715
+ } : {}
694
716
  }));
695
717
  var CloseButton = react.forwardRef(
696
- ({ "aria-label": ariaLabel = "Zamknij", size = "sm", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
718
+ ({ "aria-label": ariaLabel = "Zamknij", size = "sm", variant = "ghost", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
697
719
  StyledButton2,
698
720
  {
699
721
  ref,
700
- variant: "ghost",
722
+ variant,
723
+ $variant: variant,
701
724
  shape: "square",
702
725
  size,
703
726
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon__default.default, { "aria-hidden": true, style: { fontSize: "inherit" } }),
@@ -1065,7 +1088,7 @@ var ContextMenu = react.forwardRef(
1065
1088
  }
1066
1089
  );
1067
1090
  ContextMenu.displayName = "ContextMenu";
1068
- var sizeMap4 = { sm: "1em", md: "1.25em", lg: "1.75em" };
1091
+ var sizeMap4 = { sm: "1em", md: "1.25em", lg: "1.75em", xl: "2.25em" };
1069
1092
  var toFlagEmoji = (code) => code.toUpperCase().replace(/[A-Z]/g, (char) => String.fromCodePoint(127462 + char.charCodeAt(0) - 65));
1070
1093
  var CountryFlag = ({ countryCode, size = "md", style, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(
1071
1094
  "span",
@@ -1121,12 +1144,14 @@ EmptyState.displayName = "EmptyState";
1121
1144
  var inputSizeMap = {
1122
1145
  sm: { padding: "0.25rem 0.5rem", fontSize: "0.75rem", gap: "0.25rem" },
1123
1146
  md: { padding: "0.375rem 0.75rem", fontSize: "0.875rem", gap: "0.375rem" },
1124
- lg: { padding: "0.5rem 1rem", fontSize: "1rem", gap: "0.5rem" }
1147
+ lg: { padding: "0.5rem 1rem", fontSize: "1rem", gap: "0.5rem" },
1148
+ xl: { padding: "0.625rem 1.25rem", fontSize: "1.125rem", gap: "0.625rem" }
1125
1149
  };
1126
1150
  var inputHeightMap = {
1127
1151
  sm: "26px",
1128
1152
  md: "32px",
1129
- lg: "38.5px"
1153
+ lg: "40px",
1154
+ xl: "48px"
1130
1155
  };
1131
1156
  var DropdownPanel = styles.styled("div")(({ theme }) => ({
1132
1157
  position: "absolute",
@@ -1142,7 +1167,8 @@ var Chevron = () => /* @__PURE__ */ jsxRuntime.jsx(ExpandMoreIcon__default.defau
1142
1167
  var labelSizeMap = {
1143
1168
  sm: "0.625rem",
1144
1169
  md: "0.75rem",
1145
- lg: "0.875rem"
1170
+ lg: "0.875rem",
1171
+ xl: "1rem"
1146
1172
  };
1147
1173
  var StyledLabel = styles.styled("label")(({ theme, $error, $size }) => ({
1148
1174
  display: "block",
@@ -1152,7 +1178,16 @@ var StyledLabel = styles.styled("label")(({ theme, $error, $size }) => ({
1152
1178
  fontFamily: theme.typography.fontFamily,
1153
1179
  color: $error ? theme.palette.error.main : theme.palette.text.primary
1154
1180
  }));
1155
- var Label = ({ error = false, size = "md", children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsx(StyledLabel, { $error: error, $size: size, ...rest, children });
1181
+ var RequiredAsterisk = styles.styled("span")(({ theme }) => ({
1182
+ marginLeft: "0.2em",
1183
+ color: theme.palette.error.main,
1184
+ fontWeight: 600,
1185
+ lineHeight: 1
1186
+ }));
1187
+ var Label = ({ error = false, size = "md", required, children, ...rest }) => /* @__PURE__ */ jsxRuntime.jsxs(StyledLabel, { $error: error, $size: size, ...rest, children: [
1188
+ children,
1189
+ required && /* @__PURE__ */ jsxRuntime.jsx(RequiredAsterisk, { "aria-hidden": "true", children: "*" })
1190
+ ] });
1156
1191
  Label.displayName = "Label";
1157
1192
  var StyledHelperText = styles.styled("p")(({ theme, $error }) => ({
1158
1193
  margin: "0.25rem 0 0",
@@ -1232,13 +1267,14 @@ var BaseInput = react.forwardRef(
1232
1267
  startAdornment,
1233
1268
  endAdornment,
1234
1269
  disabled = false,
1270
+ required,
1235
1271
  id,
1236
1272
  ...rest
1237
1273
  }, ref) => {
1238
1274
  const autoId = react.useId();
1239
1275
  const inputId = id ?? autoId;
1240
1276
  return /* @__PURE__ */ jsxRuntime.jsxs(Root5, { $fullWidth: fullWidth, children: [
1241
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, error, size, children: label }),
1277
+ label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, error, size, required, children: label }),
1242
1278
  /* @__PURE__ */ jsxRuntime.jsxs(
1243
1279
  InputWrapper,
1244
1280
  {
@@ -1249,7 +1285,7 @@ var BaseInput = react.forwardRef(
1249
1285
  "data-disabled": disabled || void 0,
1250
1286
  children: [
1251
1287
  startAdornment && /* @__PURE__ */ jsxRuntime.jsx(Adornment, { children: startAdornment }),
1252
- /* @__PURE__ */ jsxRuntime.jsx(StyledInput, { ref, id: inputId, disabled, ...rest }),
1288
+ /* @__PURE__ */ jsxRuntime.jsx(StyledInput, { ref, id: inputId, disabled, required, ...rest }),
1253
1289
  endAdornment && /* @__PURE__ */ jsxRuntime.jsx(Adornment, { children: endAdornment })
1254
1290
  ]
1255
1291
  }
@@ -1262,12 +1298,14 @@ BaseInput.displayName = "BaseInput";
1262
1298
  var checkboxSizeMap = {
1263
1299
  sm: "14px",
1264
1300
  md: "16px",
1265
- lg: "20px"
1301
+ lg: "20px",
1302
+ xl: "24px"
1266
1303
  };
1267
1304
  var labelFontSizeMap = {
1268
1305
  sm: "0.75rem",
1269
1306
  md: "0.875rem",
1270
- lg: "1rem"
1307
+ lg: "1rem",
1308
+ xl: "1.125rem"
1271
1309
  };
1272
1310
  var checkedColor = (theme, error) => error ? theme.palette.error.main : theme.palette.primary.main;
1273
1311
  var Box = styles.styled("span")(({ theme, $size, $error, $disabled }) => ({
@@ -1341,6 +1379,12 @@ var LabelText = styles.styled("span")(
1341
1379
  userSelect: "none"
1342
1380
  })
1343
1381
  );
1382
+ var RequiredAsterisk2 = styles.styled("span")(({ theme }) => ({
1383
+ marginLeft: "0.2em",
1384
+ color: theme.palette.error.main,
1385
+ fontWeight: 600,
1386
+ lineHeight: 1
1387
+ }));
1344
1388
  var Root6 = styles.styled("span")(({ $disabled }) => ({
1345
1389
  display: "inline-flex",
1346
1390
  flexDirection: "column",
@@ -1354,6 +1398,7 @@ var CheckboxInput = react.forwardRef(
1354
1398
  size = "md",
1355
1399
  disabled = false,
1356
1400
  indeterminate = false,
1401
+ required,
1357
1402
  id,
1358
1403
  ...rest
1359
1404
  }, ref) => {
@@ -1379,10 +1424,14 @@ var CheckboxInput = react.forwardRef(
1379
1424
  id: inputId,
1380
1425
  type: "checkbox",
1381
1426
  disabled,
1427
+ required,
1382
1428
  ...rest
1383
1429
  }
1384
1430
  ) }),
1385
- label && /* @__PURE__ */ jsxRuntime.jsx(LabelText, { $size: size, $disabled: disabled, $error: error, children: label })
1431
+ label && /* @__PURE__ */ jsxRuntime.jsxs(LabelText, { $size: size, $disabled: disabled, $error: error, children: [
1432
+ label,
1433
+ required && /* @__PURE__ */ jsxRuntime.jsx(RequiredAsterisk2, { "aria-hidden": "true", children: "*" })
1434
+ ] })
1386
1435
  ] }),
1387
1436
  helperText && /* @__PURE__ */ jsxRuntime.jsx(HelperText, { error, children: helperText })
1388
1437
  ] });
@@ -1392,12 +1441,14 @@ CheckboxInput.displayName = "CheckboxInput";
1392
1441
  var radioSizeMap = {
1393
1442
  sm: "14px",
1394
1443
  md: "16px",
1395
- lg: "20px"
1444
+ lg: "20px",
1445
+ xl: "24px"
1396
1446
  };
1397
1447
  var labelFontSizeMap2 = {
1398
1448
  sm: "0.75rem",
1399
1449
  md: "0.875rem",
1400
- lg: "1rem"
1450
+ lg: "1rem",
1451
+ xl: "1.125rem"
1401
1452
  };
1402
1453
  var checkedColor2 = (theme, error) => error ? theme.palette.error.main : theme.palette.primary.main;
1403
1454
  var Circle = styles.styled("span")(({ theme, $size, $error, $disabled }) => ({
@@ -1451,19 +1502,28 @@ var LabelText2 = styles.styled("span")(
1451
1502
  userSelect: "none"
1452
1503
  })
1453
1504
  );
1505
+ var RequiredAsterisk3 = styles.styled("span")(({ theme }) => ({
1506
+ marginLeft: "0.2em",
1507
+ color: theme.palette.error.main,
1508
+ fontWeight: 600,
1509
+ lineHeight: 1
1510
+ }));
1454
1511
  var Root7 = styles.styled("span")(({ $disabled }) => ({
1455
1512
  display: "inline-flex",
1456
1513
  flexDirection: "column",
1457
1514
  cursor: $disabled ? "not-allowed" : "pointer"
1458
1515
  }));
1459
1516
  var RadioInput = react.forwardRef(
1460
- ({ label, helperText, error = false, size = "md", disabled = false, id, ...rest }, ref) => {
1517
+ ({ label, helperText, error = false, size = "md", disabled = false, required, id, ...rest }, ref) => {
1461
1518
  const autoId = react.useId();
1462
1519
  const inputId = id ?? autoId;
1463
1520
  return /* @__PURE__ */ jsxRuntime.jsxs(Root7, { $disabled: disabled, children: [
1464
1521
  /* @__PURE__ */ jsxRuntime.jsxs(Row2, { htmlFor: inputId, children: [
1465
- /* @__PURE__ */ jsxRuntime.jsx(Circle, { $size: size, $error: error, $disabled: disabled, children: /* @__PURE__ */ jsxRuntime.jsx(HiddenInput2, { ref, id: inputId, type: "radio", disabled, ...rest }) }),
1466
- label && /* @__PURE__ */ jsxRuntime.jsx(LabelText2, { $size: size, $disabled: disabled, $error: error, children: label })
1522
+ /* @__PURE__ */ jsxRuntime.jsx(Circle, { $size: size, $error: error, $disabled: disabled, children: /* @__PURE__ */ jsxRuntime.jsx(HiddenInput2, { ref, id: inputId, type: "radio", disabled, required, ...rest }) }),
1523
+ label && /* @__PURE__ */ jsxRuntime.jsxs(LabelText2, { $size: size, $disabled: disabled, $error: error, children: [
1524
+ label,
1525
+ required && /* @__PURE__ */ jsxRuntime.jsx(RequiredAsterisk3, { "aria-hidden": "true", children: "*" })
1526
+ ] })
1467
1527
  ] }),
1468
1528
  helperText && /* @__PURE__ */ jsxRuntime.jsx(HelperText, { error, children: helperText })
1469
1529
  ] });
@@ -1649,6 +1709,15 @@ var dropzoneSizes = {
1649
1709
  fontSize: "1rem",
1650
1710
  subFontSize: "0.875rem",
1651
1711
  gap: "0.625rem"
1712
+ },
1713
+ xl: {
1714
+ minHeight: "220px",
1715
+ padding: "2.5rem",
1716
+ iconSize: 32,
1717
+ circleSize: "4.25rem",
1718
+ fontSize: "1.125rem",
1719
+ subFontSize: "1rem",
1720
+ gap: "0.75rem"
1652
1721
  }
1653
1722
  };
1654
1723
  var DropzoneArea = styles.styled("div")(({ theme, $size, $fullWidth, $error, $disabled, $isDragging, $hasFile }) => {
@@ -2299,6 +2368,7 @@ var BaseSelectInput = ({
2299
2368
  size = "md",
2300
2369
  fullWidth = false,
2301
2370
  disabled = false,
2371
+ required,
2302
2372
  id
2303
2373
  }) => {
2304
2374
  const checkSelected = isSelected ?? ((option) => option.value === value);
@@ -2335,7 +2405,7 @@ var BaseSelectInput = ({
2335
2405
  const selectedLabel = options.find((o) => o.value === value)?.label;
2336
2406
  const defaultTriggerContent = /* @__PURE__ */ jsxRuntime.jsx("span", { style: { opacity: selectedLabel ? 1 : 0.5 }, children: selectedLabel ?? placeholder });
2337
2407
  return /* @__PURE__ */ jsxRuntime.jsxs(Root9, { $fullWidth: fullWidth, ref: rootRef, children: [
2338
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, error, size, children: label }),
2408
+ label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, error, size, required, children: label }),
2339
2409
  /* @__PURE__ */ jsxRuntime.jsxs(
2340
2410
  Trigger2,
2341
2411
  {
@@ -2650,13 +2720,14 @@ var TextareaInput = react.forwardRef(
2650
2720
  fullWidth = false,
2651
2721
  rows = 4,
2652
2722
  disabled = false,
2723
+ required,
2653
2724
  id,
2654
2725
  ...rest
2655
2726
  }, ref) => {
2656
2727
  const autoId = react.useId();
2657
2728
  const inputId = id ?? autoId;
2658
2729
  return /* @__PURE__ */ jsxRuntime.jsxs(Root10, { $fullWidth: fullWidth, children: [
2659
- label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, error, size, children: label }),
2730
+ label && /* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: inputId, error, size, required, children: label }),
2660
2731
  /* @__PURE__ */ jsxRuntime.jsx(
2661
2732
  StyledTextarea,
2662
2733
  {
@@ -2664,6 +2735,7 @@ var TextareaInput = react.forwardRef(
2664
2735
  id: inputId,
2665
2736
  rows,
2666
2737
  disabled,
2738
+ required,
2667
2739
  $size: size,
2668
2740
  $fullWidth: fullWidth,
2669
2741
  $error: error,
@@ -4632,10 +4704,10 @@ var TextInput = react.forwardRef(
4632
4704
  ({ type = "text", ...rest }, ref) => /* @__PURE__ */ jsxRuntime.jsx(BaseInput, { ref, type, ...rest })
4633
4705
  );
4634
4706
  TextInput.displayName = "TextInput";
4635
- var TRACK_W = { sm: "1.75rem", md: "2.25rem", lg: "2.75rem" };
4636
- var TRACK_H = { sm: "1rem", md: "1.25rem", lg: "1.5rem" };
4637
- var THUMB_S = { sm: "0.75rem", md: "1rem", lg: "1.25rem" };
4638
- var FONT_S = { sm: "0.75rem", md: "0.875rem", lg: "1rem" };
4707
+ var TRACK_W = { sm: "1.75rem", md: "2.25rem", lg: "2.75rem", xl: "3.25rem" };
4708
+ var TRACK_H = { sm: "1rem", md: "1.25rem", lg: "1.5rem", xl: "1.75rem" };
4709
+ var THUMB_S = { sm: "0.75rem", md: "1rem", lg: "1.25rem", xl: "1.5rem" };
4710
+ var FONT_S = { sm: "0.75rem", md: "0.875rem", lg: "1rem", xl: "1.125rem" };
4639
4711
  function getActiveColor(color, theme) {
4640
4712
  switch (color) {
4641
4713
  case "secondary":
@@ -6782,15 +6854,15 @@ function CookieConsent({
6782
6854
  Button,
6783
6855
  {
6784
6856
  variant: "text",
6785
- size: "sm",
6857
+ size: "md",
6786
6858
  "aria-expanded": expanded,
6787
6859
  "aria-controls": `${id}-panel`,
6788
6860
  onClick: () => setExpanded((v) => !v),
6789
6861
  children: manageLabel
6790
6862
  }
6791
6863
  ),
6792
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleRejectAll, children: rejectLabel }),
6793
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "sm", onClick: handleAcceptAll, children: acceptAllLabel })
6864
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "md", onClick: handleRejectAll, children: rejectLabel }),
6865
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "md", onClick: handleAcceptAll, children: acceptAllLabel })
6794
6866
  ] })
6795
6867
  ] }),
6796
6868
  expanded && /* @__PURE__ */ jsxRuntime.jsxs(Panel3, { id: `${id}-panel`, role: "group", "aria-label": "Kategorie plik\xF3w cookie", children: [
@@ -6813,7 +6885,7 @@ function CookieConsent({
6813
6885
  }
6814
6886
  )
6815
6887
  ] }, cat.id)),
6816
- /* @__PURE__ */ jsxRuntime.jsx(SaveRow, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "sm", onClick: handleSave, children: saveLabel }) })
6888
+ /* @__PURE__ */ jsxRuntime.jsx(SaveRow, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "primary", size: "md", onClick: handleSave, children: saveLabel }) })
6817
6889
  ] })
6818
6890
  ] }) }),
6819
6891
  document.body
@@ -6911,7 +6983,7 @@ function CommentActions({ commentId, onReply, onShare }) {
6911
6983
  onClick: () => onReply?.(commentId),
6912
6984
  variant: "text",
6913
6985
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(ReplyIcon__default.default, { style: { fontSize: "inherit" } }),
6914
- size: "sm",
6986
+ size: "md",
6915
6987
  children: "Odpowiedz"
6916
6988
  }
6917
6989
  ),
@@ -6923,7 +6995,7 @@ function CommentActions({ commentId, onReply, onShare }) {
6923
6995
  onClick: () => onShare?.(commentId),
6924
6996
  variant: "text",
6925
6997
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(ReplyIcon__default.default, { style: { fontSize: "inherit" } }),
6926
- size: "sm",
6998
+ size: "md",
6927
6999
  children: "Udost\u0119pnij"
6928
7000
  }
6929
7001
  )
@@ -7488,7 +7560,7 @@ var NewsletterSection = react.forwardRef(
7488
7560
  "aria-label": inputPlaceholder
7489
7561
  }
7490
7562
  ),
7491
- /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", variant: "primary", size: "md", children: submitLabel })
7563
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "submit", variant: "primary", size: "lg", children: submitLabel })
7492
7564
  ] }),
7493
7565
  privacyNote && /* @__PURE__ */ jsxRuntime.jsx(PrivacyNote, { children: privacyNote })
7494
7566
  ] });
@@ -9615,25 +9687,12 @@ var Nav2 = styles.styled("nav")({
9615
9687
  display: "none"
9616
9688
  }
9617
9689
  });
9618
- var NavLink = styles.styled("a", {
9690
+ var NavButton2 = styles.styled(Button, {
9619
9691
  shouldForwardProp: (p) => p !== "$active"
9620
9692
  })(({ theme, $active }) => ({
9621
- padding: "0.375rem 0.75rem",
9622
- borderRadius: theme.shape.borderRadius,
9623
- fontFamily: theme.typography.fontFamily,
9624
9693
  fontSize: "0.9375rem",
9625
9694
  fontWeight: $active ? 600 : 400,
9626
- color: $active ? theme.palette.primary.main : theme.palette.text.primary,
9627
- textDecoration: "none",
9628
- transition: "background-color 150ms ease, color 150ms ease",
9629
- "&:hover": {
9630
- backgroundColor: theme.palette.action.hover,
9631
- color: theme.palette.primary.main
9632
- },
9633
- "&:focus-visible": {
9634
- outline: `3px solid ${theme.palette.primary.main}`,
9635
- outlineOffset: "2px"
9636
- }
9695
+ color: $active ? theme.palette.primary.main : theme.palette.text.primary
9637
9696
  }));
9638
9697
  var RightSlot = styles.styled("div")({
9639
9698
  marginLeft: "auto",
@@ -9661,20 +9720,14 @@ var MobileDrawer = styles.styled("div", {
9661
9720
  display: "none"
9662
9721
  }
9663
9722
  }));
9664
- var MobileNavLink = styles.styled("a", {
9723
+ var MobileNavButton = styles.styled(Button, {
9665
9724
  shouldForwardProp: (p) => p !== "$active"
9666
9725
  })(({ theme, $active }) => ({
9667
- padding: "0.625rem 0.75rem",
9668
- borderRadius: theme.shape.borderRadius,
9669
- fontFamily: theme.typography.fontFamily,
9670
9726
  fontSize: "1rem",
9671
9727
  fontWeight: $active ? 600 : 400,
9672
9728
  color: $active ? theme.palette.primary.main : theme.palette.text.primary,
9673
- textDecoration: "none",
9674
- transition: "background-color 150ms ease",
9675
- "&:hover": {
9676
- backgroundColor: theme.palette.action.hover
9677
- }
9729
+ justifyContent: "flex-start",
9730
+ width: "100%"
9678
9731
  }));
9679
9732
  function HamburgerIcon({ open }) {
9680
9733
  return open ? /* @__PURE__ */ jsxRuntime.jsx(CloseIcon__default.default, { "aria-hidden": "true", style: { fontSize: "inherit" } }) : /* @__PURE__ */ jsxRuntime.jsx(MenuIcon__default.default, { "aria-hidden": "true", style: { fontSize: "inherit" } });
@@ -9697,7 +9750,17 @@ function Navbar({
9697
9750
  style: { height: "3.75rem", display: "flex", alignItems: "center", gap: "1.5rem" },
9698
9751
  children: [
9699
9752
  logo && /* @__PURE__ */ jsxRuntime.jsx(LogoSlot, { children: logo }),
9700
- /* @__PURE__ */ jsxRuntime.jsx(Nav2, { "aria-label": "Nawigacja g\u0142\xF3wna", children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(NavLink, { href: item.href, $active: !!item.active, children: item.label }, item.href)) }),
9753
+ /* @__PURE__ */ jsxRuntime.jsx(Nav2, { "aria-label": "Nawigacja g\u0142\xF3wna", children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
9754
+ NavButton2,
9755
+ {
9756
+ variant: "text",
9757
+ $active: !!item.active,
9758
+ "aria-current": item.active ? "page" : void 0,
9759
+ onClick: () => window.location.assign(item.href),
9760
+ children: item.label
9761
+ },
9762
+ item.href
9763
+ )) }),
9701
9764
  (actions || navItems.length > 0) && /* @__PURE__ */ jsxRuntime.jsxs(RightSlot, { children: [
9702
9765
  actions,
9703
9766
  navItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -9705,7 +9768,7 @@ function Navbar({
9705
9768
  {
9706
9769
  variant: "primary",
9707
9770
  shape: "square",
9708
- size: "sm",
9771
+ size: "md",
9709
9772
  "aria-label": mobileOpen ? "Zamknij menu" : "Otw\xF3rz menu",
9710
9773
  "aria-expanded": mobileOpen,
9711
9774
  onClick: () => setMobileOpen((v) => !v),
@@ -9716,49 +9779,99 @@ function Navbar({
9716
9779
  ]
9717
9780
  }
9718
9781
  ),
9719
- navItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(MobileDrawer, { $open: mobileOpen, "aria-label": "Menu mobilne", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { maxWidth, children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(MobileNavLink, { href: item.href, $active: !!item.active, children: item.label }, item.href)) }) })
9782
+ navItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(MobileDrawer, { $open: mobileOpen, "aria-label": "Menu mobilne", children: /* @__PURE__ */ jsxRuntime.jsx(Container, { maxWidth, children: navItems.map((item) => /* @__PURE__ */ jsxRuntime.jsx(
9783
+ MobileNavButton,
9784
+ {
9785
+ variant: "text",
9786
+ $active: !!item.active,
9787
+ "aria-current": item.active ? "page" : void 0,
9788
+ onClick: () => window.location.assign(item.href),
9789
+ children: item.label
9790
+ },
9791
+ item.href
9792
+ )) }) })
9720
9793
  ] });
9721
9794
  }
9722
9795
  var sizeOverrides = {
9723
9796
  sm: { minWidth: "1.75rem", height: "1.75rem" },
9724
9797
  md: { minWidth: "2rem", height: "2rem" },
9725
- lg: { minWidth: "2.5rem", height: "2.5rem" }
9798
+ lg: { minWidth: "2.5rem", height: "2.5rem" },
9799
+ xl: { minWidth: "3rem", height: "3rem" }
9726
9800
  };
9727
- var activeStyles = (theme) => ({
9728
- backgroundColor: theme.palette.primary.main,
9729
- color: theme.palette.primary.contrastText,
9730
- fontWeight: 700,
9731
- "&:hover:not(:disabled)": { backgroundColor: theme.palette.primary.dark },
9732
- "&:active:not(:disabled)": { filter: "none" }
9733
- });
9734
- var idleStyles = (theme) => ({
9735
- backgroundColor: "transparent",
9736
- color: theme.palette.text.primary,
9737
- fontWeight: 400,
9738
- "&:hover:not(:disabled)": { backgroundColor: styles.alpha(theme.palette.primary.main, 0.08) },
9739
- "&:active:not(:disabled)": { backgroundColor: styles.alpha(theme.palette.primary.main, 0.16) }
9740
- });
9741
- var StyledButton3 = styles.styled(Button)(
9742
- ({ theme, $isActive, $btnSize }) => ({
9801
+ var activeStyles = (theme, variant) => {
9802
+ if (variant === "secondary") {
9803
+ return {
9804
+ backgroundColor: theme.palette.secondary.main,
9805
+ color: theme.palette.secondary.contrastText,
9806
+ fontWeight: 700,
9807
+ "&:hover:not(:disabled)": { backgroundColor: theme.palette.secondary.dark },
9808
+ "&:active:not(:disabled)": { filter: "none" }
9809
+ };
9810
+ }
9811
+ if (variant === "danger") {
9812
+ return {
9813
+ backgroundColor: theme.palette.error.main,
9814
+ color: theme.palette.error.contrastText,
9815
+ fontWeight: 700,
9816
+ "&:hover:not(:disabled)": { backgroundColor: theme.palette.error.dark },
9817
+ "&:active:not(:disabled)": { filter: "none" }
9818
+ };
9819
+ }
9820
+ if (variant === "primary") {
9821
+ return {
9822
+ fontWeight: 700,
9823
+ "&:active:not(:disabled)": { filter: "none" }
9824
+ };
9825
+ }
9826
+ return {
9827
+ backgroundColor: theme.palette.primary.main,
9828
+ color: theme.palette.primary.contrastText,
9829
+ fontWeight: 700,
9830
+ "&:hover:not(:disabled)": { backgroundColor: theme.palette.primary.dark },
9831
+ "&:active:not(:disabled)": { filter: "none" }
9832
+ };
9833
+ };
9834
+ var idleStyles = (theme, variant) => {
9835
+ if (variant !== "ghost" && variant !== "text") {
9836
+ return {};
9837
+ }
9838
+ return {
9839
+ backgroundColor: "transparent",
9840
+ color: theme.palette.text.primary,
9743
9841
  border: "none",
9744
- borderRadius: theme.shape.borderRadius,
9745
- padding: "0 0.25rem",
9746
- lineHeight: 1,
9747
- ...sizeOverrides[$btnSize],
9748
- ...$isActive ? activeStyles(theme) : idleStyles(theme)
9749
- })
9750
- );
9842
+ fontWeight: 400,
9843
+ "&:hover:not(:disabled)": { backgroundColor: styles.alpha(theme.palette.primary.main, 0.08) },
9844
+ "&:active:not(:disabled)": { backgroundColor: styles.alpha(theme.palette.primary.main, 0.16) }
9845
+ };
9846
+ };
9847
+ var StyledButton3 = styles.styled(Button)(({ theme, $isActive, $btnSize, $variant }) => ({
9848
+ border: "none",
9849
+ borderRadius: theme.shape.borderRadius,
9850
+ padding: "0 0.25rem",
9851
+ lineHeight: 1,
9852
+ ...sizeOverrides[$btnSize],
9853
+ ...$isActive ? activeStyles(theme, $variant) : idleStyles(theme, $variant)
9854
+ }));
9751
9855
  var PaginationButton = react.forwardRef(
9752
- ({ onClick, isActive = false, disabled = false, size = "md", children, "aria-label": ariaLabel }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9856
+ ({
9857
+ onClick,
9858
+ isActive = false,
9859
+ disabled = false,
9860
+ size = "md",
9861
+ variant = "ghost",
9862
+ children,
9863
+ "aria-label": ariaLabel
9864
+ }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
9753
9865
  StyledButton3,
9754
9866
  {
9755
9867
  ref,
9756
- variant: "ghost",
9868
+ variant,
9757
9869
  size,
9758
9870
  disabled,
9759
9871
  onClick,
9760
9872
  $isActive: isActive,
9761
9873
  $btnSize: size,
9874
+ $variant: variant,
9762
9875
  "aria-label": ariaLabel,
9763
9876
  "aria-current": isActive ? "page" : void 0,
9764
9877
  children
@@ -9875,7 +9988,8 @@ PaginationBar.displayName = "PaginationBar";
9875
9988
  var sizeMap6 = {
9876
9989
  sm: { minWidth: "1.75rem", height: "1.75rem", fontSize: "0.75rem" },
9877
9990
  md: { minWidth: "2rem", height: "2rem", fontSize: "0.875rem" },
9878
- lg: { minWidth: "2.5rem", height: "2.5rem", fontSize: "1rem" }
9991
+ lg: { minWidth: "2.5rem", height: "2.5rem", fontSize: "1rem" },
9992
+ xl: { minWidth: "3rem", height: "3rem", fontSize: "1.125rem" }
9879
9993
  };
9880
9994
  var StyledEllipsis = styles.styled("span")(({ theme, $size }) => ({
9881
9995
  display: "inline-flex",
@@ -10236,13 +10350,24 @@ var Badge2 = styles.styled("span")(({ theme }) => ({
10236
10350
  lineHeight: 1
10237
10351
  }));
10238
10352
  var CartButton = react.forwardRef(
10239
- ({ count, size = "sm", label = "Koszyk", disabled, onClick, className, "aria-label": ariaLabel }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Root36, { className, children: [
10353
+ ({
10354
+ count,
10355
+ size = "sm",
10356
+ shape,
10357
+ variant = "ghost",
10358
+ label = "Koszyk",
10359
+ disabled,
10360
+ onClick,
10361
+ className,
10362
+ "aria-label": ariaLabel
10363
+ }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Root36, { className, children: [
10240
10364
  /* @__PURE__ */ jsxRuntime.jsx(
10241
10365
  Button,
10242
10366
  {
10243
10367
  ref,
10244
- variant: "ghost",
10368
+ variant,
10245
10369
  size,
10370
+ shape,
10246
10371
  disabled,
10247
10372
  onClick,
10248
10373
  "aria-label": ariaLabel ?? (count ? `${label} (${count})` : label),
@@ -10295,12 +10420,14 @@ ProductCardImage.displayName = "ProductCardImage";
10295
10420
  var controlWidthMap = {
10296
10421
  sm: "26px",
10297
10422
  md: "32px",
10298
- lg: "38.5px"
10423
+ lg: "40px",
10424
+ xl: "48px"
10299
10425
  };
10300
10426
  var valueWidthMap = {
10301
10427
  sm: "2rem",
10302
10428
  md: "2.5rem",
10303
- lg: "3rem"
10429
+ lg: "3rem",
10430
+ xl: "3.5rem"
10304
10431
  };
10305
10432
  var Root37 = styles.styled("div", { shouldForwardProp: (p) => p !== "size" })(
10306
10433
  ({ theme, size }) => ({
@@ -10640,17 +10767,11 @@ var CountdownTimer = react.forwardRef(
10640
10767
  );
10641
10768
  CountdownTimer.displayName = "CountdownTimer";
10642
10769
  var countdownTimerVariants = ["inline", "card", "banner"];
10643
- var Root40 = styles.styled(Card)(({ theme }) => ({
10770
+ var Root40 = styles.styled(Card)({
10644
10771
  display: "flex",
10645
10772
  flexDirection: "column",
10646
- overflow: "hidden",
10647
- cursor: "pointer",
10648
- transition: "box-shadow 150ms ease, transform 150ms ease",
10649
- "&:hover": {
10650
- boxShadow: theme.shadows[4],
10651
- transform: "translateY(-2px)"
10652
- }
10653
- }));
10773
+ overflow: "hidden"
10774
+ });
10654
10775
  var ImageWrap2 = styles.styled("div")({
10655
10776
  margin: "-1.5rem -1.5rem 1rem"
10656
10777
  });
@@ -10666,7 +10787,7 @@ var CategoryCard = react.forwardRef(
10666
10787
  /* @__PURE__ */ jsxRuntime.jsx(ImageWrap2, { children: /* @__PURE__ */ jsxRuntime.jsx(CategoryCardImage, { src: imageUrl, alt: imageAlt ?? name }) }),
10667
10788
  /* @__PURE__ */ jsxRuntime.jsx(CategoryCardInfo, { name, count })
10668
10789
  ] });
10669
- return /* @__PURE__ */ jsxRuntime.jsx(Root40, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: href ? /* @__PURE__ */ jsxRuntime.jsx(CardLink2, { href, children: content }) : content });
10790
+ return /* @__PURE__ */ jsxRuntime.jsx(Root40, { ref, variant: "default", padding: "md", rounded: "lg", hoverEffect: true, ...props, children: href ? /* @__PURE__ */ jsxRuntime.jsx(CardLink2, { href, children: content }) : content });
10670
10791
  }
10671
10792
  );
10672
10793
  CategoryCard.displayName = "CategoryCard";
@@ -10889,100 +11010,22 @@ function CompareTool({
10889
11010
  }) })
10890
11011
  ] }) });
10891
11012
  }
10892
- var spin2 = styles.keyframes`to { transform: rotate(360deg); }`;
10893
11013
  var Root42 = styles.styled("div")({
10894
11014
  display: "flex",
10895
11015
  flexDirection: "column",
10896
11016
  gap: "0.5rem"
10897
11017
  });
10898
- var InputRow2 = styles.styled("div", {
10899
- shouldForwardProp: (p) => p !== "$hasError" && p !== "$applied"
10900
- })(({ theme, $hasError, $applied }) => ({
11018
+ var InputRow2 = styles.styled("div")({
10901
11019
  display: "flex",
10902
- border: `1.5px solid ${$hasError ? theme.palette.error.main : $applied ? theme.palette.success.main : theme.palette.divider}`,
10903
- borderRadius: "0.5rem",
10904
- overflow: "hidden",
10905
- transition: "border-color 150ms ease",
10906
- "&:focus-within": {
10907
- borderColor: $hasError ? theme.palette.error.main : $applied ? theme.palette.success.main : theme.palette.primary.main,
10908
- boxShadow: `0 0 0 3px ${$hasError ? `${theme.palette.error.main}22` : $applied ? `${theme.palette.success.main}22` : `${theme.palette.primary.main}22`}`
10909
- }
10910
- }));
10911
- var Input = styles.styled("input")(({ theme }) => ({
10912
- flex: 1,
10913
- border: "none",
10914
- outline: "none",
10915
- padding: "0.625rem 0.875rem",
10916
- fontFamily: theme.typography.fontFamily,
10917
- fontSize: "0.9375rem",
10918
- color: theme.palette.text.primary,
10919
- backgroundColor: "transparent",
10920
- textTransform: "uppercase",
10921
- letterSpacing: "0.05em",
10922
- "&::placeholder": {
10923
- color: theme.palette.text.disabled,
10924
- textTransform: "none",
10925
- letterSpacing: "normal"
10926
- },
10927
- "&:disabled": {
10928
- cursor: "not-allowed",
10929
- color: theme.palette.text.disabled
10930
- }
10931
- }));
10932
- var ApplyButton = styles.styled("button", {
10933
- shouldForwardProp: (p) => p !== "$applied"
10934
- })(({ theme, $applied }) => ({
10935
- appearance: "none",
10936
- border: "none",
10937
- borderLeft: `1.5px solid ${theme.palette.divider}`,
10938
- padding: "0 1rem",
10939
- cursor: "pointer",
10940
- fontFamily: theme.typography.fontFamily,
10941
- fontSize: "0.875rem",
10942
- fontWeight: 700,
10943
- whiteSpace: "nowrap",
10944
- backgroundColor: $applied ? theme.palette.success.main : theme.palette.primary.main,
10945
- color: $applied ? theme.palette.success.contrastText : theme.palette.primary.contrastText,
10946
- transition: "background-color 150ms ease, opacity 150ms ease",
10947
- "&:hover:not(:disabled)": {
10948
- opacity: 0.88
10949
- },
10950
- "&:disabled": {
10951
- opacity: 0.5,
10952
- cursor: "not-allowed"
10953
- },
10954
- "&:focus-visible": {
10955
- outline: `3px solid ${theme.palette.primary.main}`,
10956
- outlineOffset: "-3px"
10957
- }
10958
- }));
10959
- var Spinner4 = styles.styled("span")({
10960
- display: "inline-block",
10961
- width: "0.875rem",
10962
- height: "0.875rem",
10963
- border: "2px solid rgba(255,255,255,0.3)",
10964
- borderTopColor: "#fff",
10965
- borderRadius: "50%",
10966
- animation: `${spin2} 600ms linear infinite`,
10967
- verticalAlign: "middle"
11020
+ alignItems: "flex-start",
11021
+ gap: "0.5rem"
10968
11022
  });
10969
- var Message = styles.styled("p", {
10970
- shouldForwardProp: (p) => p !== "$type"
10971
- })(({ theme, $type }) => ({
10972
- margin: 0,
10973
- fontSize: "0.8125rem",
10974
- fontFamily: theme.typography.fontFamily,
10975
- color: $type === "error" ? theme.palette.error.main : theme.palette.success.main,
10976
- display: "flex",
10977
- alignItems: "center",
10978
- gap: "0.25rem"
10979
- }));
10980
11023
  var AppliedRow = styles.styled("div")(({ theme }) => ({
10981
11024
  display: "flex",
10982
11025
  alignItems: "center",
10983
11026
  justifyContent: "space-between",
10984
11027
  padding: "0.5rem 0.875rem",
10985
- borderRadius: "0.5rem",
11028
+ borderRadius: theme.shape.borderRadius,
10986
11029
  backgroundColor: `${theme.palette.success.main}14`,
10987
11030
  border: `1.5px solid ${theme.palette.success.main}`
10988
11031
  }));
@@ -10994,22 +11037,14 @@ var AppliedCode = styles.styled("span")(({ theme }) => ({
10994
11037
  textTransform: "uppercase",
10995
11038
  letterSpacing: "0.05em"
10996
11039
  }));
10997
- var RemoveButton2 = styles.styled("button")(({ theme }) => ({
10998
- appearance: "none",
10999
- border: "none",
11000
- background: "none",
11001
- cursor: "pointer",
11002
- fontFamily: theme.typography.fontFamily,
11040
+ var SuccessMessage2 = styles.styled("p")(({ theme }) => ({
11041
+ margin: 0,
11003
11042
  fontSize: "0.8125rem",
11004
- fontWeight: 600,
11005
- color: theme.palette.error.main,
11006
- padding: "0.25rem",
11007
- "&:hover": { textDecoration: "underline" },
11008
- "&:focus-visible": {
11009
- outline: `2px solid ${theme.palette.error.main}`,
11010
- outlineOffset: "2px",
11011
- borderRadius: "3px"
11012
- }
11043
+ fontFamily: theme.typography.fontFamily,
11044
+ color: theme.palette.success.main,
11045
+ display: "flex",
11046
+ alignItems: "center",
11047
+ gap: "0.25rem"
11013
11048
  }));
11014
11049
  function CouponInput({
11015
11050
  value,
@@ -11024,12 +11059,9 @@ function CouponInput({
11024
11059
  disabled = false,
11025
11060
  error,
11026
11061
  successMessage,
11062
+ size = "md",
11027
11063
  className
11028
11064
  }) {
11029
- const id = react.useId();
11030
- const errorId = `${id}-error`;
11031
- const successId = `${id}-success`;
11032
- const isDisabled = disabled || loading;
11033
11065
  const handleApply = () => {
11034
11066
  if (value.trim()) onApply(value.trim());
11035
11067
  };
@@ -11041,52 +11073,52 @@ function CouponInput({
11041
11073
  /* @__PURE__ */ jsxRuntime.jsxs(AppliedRow, { role: "status", "aria-label": `Kod rabatowy ${appliedCode} zastosowany`, children: [
11042
11074
  /* @__PURE__ */ jsxRuntime.jsx(AppliedCode, { children: appliedCode }),
11043
11075
  onRemove && /* @__PURE__ */ jsxRuntime.jsx(
11044
- RemoveButton2,
11076
+ Button,
11045
11077
  {
11046
- type: "button",
11047
- "aria-label": `${removeLabel} kod ${appliedCode}`,
11078
+ variant: "danger",
11079
+ size: "md",
11048
11080
  onClick: onRemove,
11081
+ "aria-label": `${removeLabel} kod ${appliedCode}`,
11049
11082
  children: removeLabel
11050
11083
  }
11051
11084
  )
11052
11085
  ] }),
11053
- successMessage && /* @__PURE__ */ jsxRuntime.jsxs(Message, { $type: "success", id: successId, role: "status", children: [
11086
+ successMessage && /* @__PURE__ */ jsxRuntime.jsxs(SuccessMessage2, { role: "status", children: [
11054
11087
  "\u2713 ",
11055
11088
  successMessage
11056
11089
  ] })
11057
11090
  ] });
11058
11091
  }
11059
- return /* @__PURE__ */ jsxRuntime.jsxs(Root42, { className, children: [
11060
- /* @__PURE__ */ jsxRuntime.jsxs(InputRow2, { $hasError: Boolean(error), $applied: false, children: [
11061
- /* @__PURE__ */ jsxRuntime.jsx(
11062
- Input,
11063
- {
11064
- id,
11065
- type: "text",
11066
- value,
11067
- placeholder,
11068
- disabled: isDisabled,
11069
- "aria-label": "Kod rabatowy",
11070
- "aria-invalid": Boolean(error),
11071
- "aria-describedby": error ? errorId : void 0,
11072
- onChange: (e) => onChange(e.target.value),
11073
- onKeyDown: handleKeyDown
11074
- }
11075
- ),
11076
- /* @__PURE__ */ jsxRuntime.jsx(
11077
- ApplyButton,
11078
- {
11079
- type: "button",
11080
- $applied: false,
11081
- disabled: isDisabled || !value.trim(),
11082
- "aria-label": applyLabel,
11083
- onClick: handleApply,
11084
- children: loading ? /* @__PURE__ */ jsxRuntime.jsx(Spinner4, { "aria-hidden": "true" }) : applyLabel
11085
- }
11086
- )
11087
- ] }),
11088
- error && /* @__PURE__ */ jsxRuntime.jsx(Message, { $type: "error", id: errorId, role: "alert", children: error })
11089
- ] });
11092
+ return /* @__PURE__ */ jsxRuntime.jsx(Root42, { className, children: /* @__PURE__ */ jsxRuntime.jsxs(InputRow2, { children: [
11093
+ /* @__PURE__ */ jsxRuntime.jsx(
11094
+ TextInput,
11095
+ {
11096
+ value,
11097
+ placeholder,
11098
+ disabled: disabled || loading,
11099
+ "aria-label": "Kod rabatowy",
11100
+ "aria-invalid": Boolean(error),
11101
+ onChange: (e) => onChange(e.target.value),
11102
+ onKeyDown: handleKeyDown,
11103
+ size,
11104
+ fullWidth: true,
11105
+ error: Boolean(error),
11106
+ helperText: error,
11107
+ style: { textTransform: "uppercase" }
11108
+ }
11109
+ ),
11110
+ /* @__PURE__ */ jsxRuntime.jsx(
11111
+ Button,
11112
+ {
11113
+ size,
11114
+ loading,
11115
+ disabled: disabled || !value.trim(),
11116
+ "aria-label": applyLabel,
11117
+ onClick: handleApply,
11118
+ children: applyLabel
11119
+ }
11120
+ )
11121
+ ] }) });
11090
11122
  }
11091
11123
  var DEFAULT_OMNIBUS_LABEL = "Najni\u017Csza cena z ostatnich 30 dni";
11092
11124
  var FONT_SIZE2 = {
@@ -11390,7 +11422,7 @@ var FilterSidebar = react.forwardRef(
11390
11422
  }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Root45, { ref, "aria-label": "Filtry produkt\xF3w", ...props, children: [
11391
11423
  /* @__PURE__ */ jsxRuntime.jsxs(Header3, { children: [
11392
11424
  /* @__PURE__ */ jsxRuntime.jsx(Title10, { children: "Filtry" }),
11393
- onClear && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: onClear, children: "Wyczy\u015B\u0107" })
11425
+ onClear && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "md", onClick: onClear, children: "Wyczy\u015B\u0107" })
11394
11426
  ] }),
11395
11427
  priceRange && /* @__PURE__ */ jsxRuntime.jsxs(Group, { children: [
11396
11428
  /* @__PURE__ */ jsxRuntime.jsx(Legend, { children: "Cena" }),
@@ -11684,51 +11716,63 @@ var ProductCard = react.forwardRef(
11684
11716
  buttonVariant = "primary",
11685
11717
  disabledButton = false,
11686
11718
  hideButton = false,
11719
+ hoverEffect = true,
11687
11720
  ...props
11688
- }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(Root50, { ref, variant: "default", padding: "md", rounded: "lg", ...props, children: [
11689
- /* @__PURE__ */ jsxRuntime.jsx(
11690
- AspectRatio,
11691
- {
11692
- ratio: imageRatio,
11693
- style: { margin: "-1.5rem -1.5rem 1rem", width: "calc(100% + 3rem)" },
11694
- children: /* @__PURE__ */ jsxRuntime.jsx(
11695
- ProductCardImage,
11721
+ }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
11722
+ Root50,
11723
+ {
11724
+ ref,
11725
+ variant: "default",
11726
+ padding: "md",
11727
+ rounded: "lg",
11728
+ hoverEffect,
11729
+ ...props,
11730
+ children: [
11731
+ /* @__PURE__ */ jsxRuntime.jsx(
11732
+ AspectRatio,
11696
11733
  {
11697
- src: imageUrl,
11698
- alt: imageAlt ?? name,
11699
- badge,
11700
- badgeVariant
11734
+ ratio: imageRatio,
11735
+ style: { margin: "-1.5rem -1.5rem 1rem", width: "calc(100% + 3rem)" },
11736
+ children: /* @__PURE__ */ jsxRuntime.jsx(
11737
+ ProductCardImage,
11738
+ {
11739
+ src: imageUrl,
11740
+ alt: imageAlt ?? name,
11741
+ badge,
11742
+ badgeVariant
11743
+ }
11744
+ )
11701
11745
  }
11702
- )
11703
- }
11704
- ),
11705
- /* @__PURE__ */ jsxRuntime.jsx(Name11, { children: name }),
11706
- rating !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Rating, { value: rating, count: reviewCount, size: "sm" }),
11707
- /* @__PURE__ */ jsxRuntime.jsx(
11708
- Price2,
11709
- {
11710
- price,
11711
- originalPrice,
11712
- currency,
11713
- locale,
11714
- lowestPrice,
11715
- style: { marginTop: "0.5rem" }
11716
- }
11717
- ),
11718
- !hideButton && /* @__PURE__ */ jsxRuntime.jsx(Footer6, { children: /* @__PURE__ */ jsxRuntime.jsx(
11719
- Button,
11720
- {
11721
- fullWidth: true,
11722
- variant: buttonVariant,
11723
- disabled: disabledButton,
11724
- onClick: (e) => {
11725
- e.stopPropagation();
11726
- onAddToCart?.();
11727
- },
11728
- children: ctaLabel
11729
- }
11730
- ) })
11731
- ] })
11746
+ ),
11747
+ /* @__PURE__ */ jsxRuntime.jsx(Name11, { children: name }),
11748
+ rating !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(Rating, { value: rating, count: reviewCount, size: "sm" }),
11749
+ /* @__PURE__ */ jsxRuntime.jsx(
11750
+ Price2,
11751
+ {
11752
+ price,
11753
+ originalPrice,
11754
+ currency,
11755
+ locale,
11756
+ lowestPrice,
11757
+ style: { marginTop: "0.5rem" }
11758
+ }
11759
+ ),
11760
+ !hideButton && /* @__PURE__ */ jsxRuntime.jsx(Footer6, { children: /* @__PURE__ */ jsxRuntime.jsx(
11761
+ Button,
11762
+ {
11763
+ fullWidth: true,
11764
+ variant: buttonVariant,
11765
+ disabled: disabledButton,
11766
+ onClick: (e) => {
11767
+ e.stopPropagation();
11768
+ onAddToCart?.();
11769
+ },
11770
+ children: ctaLabel
11771
+ }
11772
+ ) })
11773
+ ]
11774
+ }
11775
+ )
11732
11776
  );
11733
11777
  ProductCard.displayName = "ProductCard";
11734
11778
  var COLLAPSE_AT = "480px";
@@ -12583,23 +12627,34 @@ var VoucherCard = react.forwardRef(
12583
12627
  ] })
12584
12628
  );
12585
12629
  VoucherCard.displayName = "VoucherCard";
12586
- var StyledButton4 = styles.styled(Button)(({ theme, $active }) => ({
12587
- border: `1px solid ${$active ? theme.palette.error.main : theme.palette.divider}`,
12588
- background: $active ? `${theme.palette.error.main}14` : "transparent",
12589
- color: $active ? theme.palette.error.main : theme.palette.text.secondary,
12590
- "&:hover:not(:disabled)": {
12591
- color: theme.palette.error.main,
12592
- borderColor: theme.palette.error.main,
12593
- backgroundColor: `${theme.palette.error.main}14`
12630
+ var StyledButton4 = styles.styled(Button)(({
12631
+ theme,
12632
+ $active,
12633
+ $variant
12634
+ }) => {
12635
+ if ($variant !== "ghost" && $variant !== "text") {
12636
+ return {};
12594
12637
  }
12595
- }));
12638
+ return {
12639
+ border: $variant === "ghost" ? `1px solid ${$active ? theme.palette.error.main : theme.palette.divider}` : "none",
12640
+ background: $active ? `${theme.palette.error.main}14` : "transparent",
12641
+ color: $active ? theme.palette.error.main : theme.palette.text.secondary,
12642
+ "&:hover:not(:disabled)": {
12643
+ color: theme.palette.error.main,
12644
+ borderColor: $variant === "ghost" ? theme.palette.error.main : void 0,
12645
+ backgroundColor: `${theme.palette.error.main}14`
12646
+ }
12647
+ };
12648
+ });
12596
12649
  var WishlistButton = react.forwardRef(
12597
- ({ active = false, size = "md", label, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
12650
+ ({ active = false, size = "md", variant = "ghost", label, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
12598
12651
  StyledButton4,
12599
12652
  {
12600
12653
  ref,
12654
+ variant,
12601
12655
  shape: "circle",
12602
12656
  size,
12657
+ $variant: variant,
12603
12658
  startIcon: active ? /* @__PURE__ */ jsxRuntime.jsx(FavoriteIcon__default.default, { "aria-hidden": true, style: { fontSize: "inherit" } }) : /* @__PURE__ */ jsxRuntime.jsx(FavoriteBorderIcon__default.default, { "aria-hidden": true, style: { fontSize: "inherit" } }),
12604
12659
  "aria-label": label ?? (active ? "Usu\u0144 z listy \u017Cycze\u0144" : "Dodaj do listy \u017Cycze\u0144"),
12605
12660
  $active: active,