@vkzstudio/muza-ui 1.5.2 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/components/ArticleCard/ArticleCard.d.ts.map +1 -1
  2. package/dist/components/ArticleCard/ArticleCard.js +161 -170
  3. package/dist/components/Button/Button.d.ts.map +1 -1
  4. package/dist/components/Button/Button.js +42 -40
  5. package/dist/components/Button/Button.stories.d.ts.map +1 -1
  6. package/dist/components/Carousel/Carousel.d.ts +99 -2
  7. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  8. package/dist/components/Carousel/Carousel.js +208 -151
  9. package/dist/components/Carousel/Carousel.stories.d.ts +2 -0
  10. package/dist/components/Carousel/Carousel.stories.d.ts.map +1 -1
  11. package/dist/components/Carousel/index.js +3 -2
  12. package/dist/components/CarouselSection/CarouselSection.examples.d.ts +1 -1
  13. package/dist/components/DropdownMenu/DropdownMenu.d.ts +22 -3
  14. package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  15. package/dist/components/DropdownMenu/DropdownMenu.js +131 -105
  16. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +3 -2
  17. package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
  18. package/dist/components/MarketNav/MarketNav.examples.d.ts.map +1 -1
  19. package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
  20. package/dist/components/MultiSelect/MultiSelect.js +28 -29
  21. package/dist/components/OfferCard/OfferCard.d.ts +45 -17
  22. package/dist/components/OfferCard/OfferCard.d.ts.map +1 -1
  23. package/dist/components/OfferCard/OfferCard.js +180 -266
  24. package/dist/components/OfferCard/OfferCard.stories.d.ts +5 -2
  25. package/dist/components/OfferCard/OfferCard.stories.d.ts.map +1 -1
  26. package/dist/components/PartnerCard/PartnerCard.d.ts +90 -26
  27. package/dist/components/PartnerCard/PartnerCard.d.ts.map +1 -1
  28. package/dist/components/PartnerCard/PartnerCard.js +323 -264
  29. package/dist/components/PartnerCard/PartnerCard.stories.d.ts +6 -0
  30. package/dist/components/PartnerCard/PartnerCard.stories.d.ts.map +1 -1
  31. package/dist/components/PriceTag/PriceTag.d.ts +37 -0
  32. package/dist/components/PriceTag/PriceTag.d.ts.map +1 -0
  33. package/dist/components/PriceTag/PriceTag.js +43 -0
  34. package/dist/components/PriceTag/PriceTag.stories.d.ts +8 -0
  35. package/dist/components/PriceTag/PriceTag.stories.d.ts.map +1 -0
  36. package/dist/components/PriceTag/index.d.ts +2 -0
  37. package/dist/components/PriceTag/index.d.ts.map +1 -0
  38. package/dist/components/PriceTag/index.js +5 -0
  39. package/dist/components/Select/Select.d.ts.map +1 -1
  40. package/dist/components/Select/Select.js +74 -100
  41. package/dist/components/Select/Select.stories.d.ts.map +1 -1
  42. package/dist/components/Select/SelectTrigger.d.ts +54 -0
  43. package/dist/components/Select/SelectTrigger.d.ts.map +1 -0
  44. package/dist/components/Select/SelectTrigger.js +57 -0
  45. package/dist/components/Select/SelectTrigger.stories.d.ts +11 -0
  46. package/dist/components/Select/SelectTrigger.stories.d.ts.map +1 -0
  47. package/dist/components/Select/index.d.ts +2 -0
  48. package/dist/components/Select/index.d.ts.map +1 -1
  49. package/dist/components/Select/index.js +6 -2
  50. package/dist/components/Select/utils.d.ts +10 -1
  51. package/dist/components/Select/utils.d.ts.map +1 -1
  52. package/dist/components/Select/utils.js +3 -5
  53. package/dist/components/Tooltip/Tooltip.d.ts +18 -7
  54. package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
  55. package/dist/components/Tooltip/Tooltip.js +116 -68
  56. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -0
  57. package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
  58. package/dist/components/UniversalFooter/UniversalFooter.js +1 -1
  59. package/dist/components/VoucherCard/VoucherCard.d.ts +24 -1
  60. package/dist/components/VoucherCard/VoucherCard.d.ts.map +1 -1
  61. package/dist/components/VoucherCard/VoucherCard.js +68 -76
  62. package/dist/components/VoucherCard/VoucherCard.stories.d.ts +1 -0
  63. package/dist/components/VoucherCard/VoucherCard.stories.d.ts.map +1 -1
  64. package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts.map +1 -1
  65. package/dist/components/index.d.ts +1 -0
  66. package/dist/components/index.d.ts.map +1 -1
  67. package/dist/components/internal/CardCompactShell.d.ts +80 -0
  68. package/dist/components/internal/CardCompactShell.d.ts.map +1 -0
  69. package/dist/components/internal/CardCompactShell.js +148 -0
  70. package/dist/components/internal/CardImageSlot.d.ts +56 -0
  71. package/dist/components/internal/CardImageSlot.d.ts.map +1 -0
  72. package/dist/components/internal/CardImageSlot.js +85 -0
  73. package/dist/index.js +356 -348
  74. package/dist/muza-ui.css +1 -1
  75. package/dist/styles/token-sizes.css +16 -4
  76. package/dist/utils/cn.d.ts.map +1 -1
  77. package/dist/utils/cn.js +6 -3
  78. package/dist/utils/disabledLinkProps.d.ts +8 -1
  79. package/dist/utils/disabledLinkProps.d.ts.map +1 -1
  80. package/dist/utils/disabledLinkProps.js +0 -1
  81. package/llms-full.md +133 -2
  82. package/llms.txt +2 -0
  83. package/package.json +3 -1
@@ -1,28 +1,55 @@
1
- import { jsx as m, jsxs as j } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import _ from "embla-carousel-react";
4
- import { useMuzaTranslations as L } from "../../translations/TranslationContext.js";
5
- import { cn as h } from "../../utils/cn.js";
6
- import { ButtonArrow as P } from "../ButtonArrow/ButtonArrow.js";
7
- import { Flex as B } from "../Flex/Flex.js";
8
- import { SliderIndicators as F } from "../SliderIndicators/SliderIndicators.js";
9
- const R = o.createContext(null), v = () => {
10
- const t = o.useContext(R);
1
+ import { jsx as p, jsxs as Z } from "react/jsx-runtime";
2
+ import * as r from "react";
3
+ import $ from "embla-carousel-autoplay";
4
+ import ee from "embla-carousel-react";
5
+ import { useMuzaTranslations as U } from "../../translations/TranslationContext.js";
6
+ import { cn as C } from "../../utils/cn.js";
7
+ import { ButtonArrow as K } from "../ButtonArrow/ButtonArrow.js";
8
+ import { Flex as oe } from "../Flex/Flex.js";
9
+ import { SliderIndicators as re } from "../SliderIndicators/SliderIndicators.js";
10
+ import { useMediaQuery as te } from "../../hooks/use-media-query.js";
11
+ const se = "(prefers-reduced-motion: reduce)", ae = 5e3, F = r.createContext(null), v = () => {
12
+ const t = r.useContext(F);
11
13
  if (!t)
12
14
  throw new Error("useCarousel must be used within a <Carousel />");
13
15
  return t;
14
- }, M = o.forwardRef(
16
+ }, le = r.forwardRef(
15
17
  ({
16
18
  orientation: t = "horizontal",
17
- options: s,
18
- align: c,
19
- setApi: l,
20
- plugins: n,
21
- className: f,
22
- children: i,
23
- ...C
24
- }, w) => {
25
- const [d, e] = _(
19
+ options: l,
20
+ align: u,
21
+ setApi: n,
22
+ plugins: s,
23
+ autoplay: f = !1,
24
+ autoplayDelay: c = ae,
25
+ className: w,
26
+ children: b,
27
+ onPointerEnter: m,
28
+ onPointerLeave: d,
29
+ ...x
30
+ }, a) => {
31
+ const i = te(se), y = (s ?? []).some(
32
+ (o) => o.name === "autoplay"
33
+ ), g = f && !i && !y, Y = r.useMemo(() => g ? [
34
+ ...s ?? [],
35
+ $({
36
+ delay: c,
37
+ // Pause/resume is driven from this component instead of the plugin's
38
+ // own wiring: on touch devices the browser fires a synthetic
39
+ // `mouseenter` after a tap and never a matching `mouseleave`, which
40
+ // leaves the plugin's internal "mouse is over" flag stuck and
41
+ // autoplay dead. `stopOnInteraction: true` keeps the plugin's
42
+ // pointerDown pause (the same thing we'd do ourselves) while leaving
43
+ // every resume decision to us, so hover state is always respected.
44
+ stopOnInteraction: !0,
45
+ stopOnMouseEnter: !1,
46
+ // The plugin's focus-in stop is a one-way trip in this configuration
47
+ // (its matching focusout resume is only registered when
48
+ // `stopOnInteraction` is false), which would kill autoplay for good
49
+ // the first time anything inside gets focused.
50
+ stopOnFocusIn: !1
51
+ })
52
+ ] : s, [g, c, s]), [j, e] = ee(
26
53
  {
27
54
  // `skipSnaps: true` lets a longer drag/flick cross several slides
28
55
  // before snapping, instead of Embla's default of clamping every drag
@@ -30,71 +57,100 @@ const R = o.createContext(null), v = () => {
30
57
  // (e.g. single-slide galleries that should advance one at a time).
31
58
  skipSnaps: !0,
32
59
  // `align` prop is a baseline; an explicit `options.align` overrides it.
33
- ...c !== void 0 && { align: c },
34
- ...s,
60
+ ...u !== void 0 && { align: u },
61
+ ...l,
35
62
  axis: t === "horizontal" ? "x" : "y"
36
63
  },
37
- n
38
- ), [b, a] = o.useState(!1), [u, x] = o.useState(!1), [D, E] = o.useState(0), [k, z] = o.useState(0), p = o.useCallback((r) => {
39
- r && (E(r.selectedScrollSnap()), a(r.canScrollPrev()), x(r.canScrollNext()));
40
- }, []), S = o.useCallback((r) => {
41
- r && z(r.scrollSnapList().length);
42
- }, []), N = o.useCallback(() => {
64
+ Y
65
+ ), [Q, B] = r.useState(!1), [V, q] = r.useState(!1), [G, J] = r.useState(0), [M, O] = r.useState(0), h = r.useCallback((o) => {
66
+ o && (J(o.selectedScrollSnap()), B(o.canScrollPrev()), q(o.canScrollNext()));
67
+ }, []), z = r.useCallback((o) => {
68
+ o && O(o.scrollSnapList().length);
69
+ }, []), E = r.useCallback(() => {
43
70
  e == null || e.scrollPrev();
44
- }, [e]), y = o.useCallback(() => {
71
+ }, [e]), P = r.useCallback(() => {
45
72
  e == null || e.scrollNext();
46
- }, [e]), A = o.useCallback(
47
- (r) => {
48
- e == null || e.scrollTo(r);
73
+ }, [e]), W = r.useCallback(
74
+ (o) => {
75
+ e == null || e.scrollTo(o);
49
76
  },
50
77
  [e]
51
- ), K = o.useCallback(
52
- (r) => {
53
- const T = t === "horizontal" ? "ArrowLeft" : "ArrowUp", H = t === "horizontal" ? "ArrowRight" : "ArrowDown";
54
- r.key === T ? (r.preventDefault(), N()) : r.key === H && (r.preventDefault(), y());
78
+ ), X = r.useCallback(
79
+ (o) => {
80
+ const L = t === "horizontal" ? "ArrowLeft" : "ArrowUp", D = t === "horizontal" ? "ArrowRight" : "ArrowDown";
81
+ o.key === L ? (o.preventDefault(), E()) : o.key === D && (o.preventDefault(), P());
55
82
  },
56
- [t, N, y]
83
+ [t, E, P]
57
84
  );
58
- o.useEffect(() => {
59
- !e || !l || l(e);
60
- }, [e, l]), o.useEffect(() => {
85
+ r.useEffect(() => {
86
+ !e || !n || n(e);
87
+ }, [e, n]), r.useEffect(() => {
61
88
  if (e)
62
- return z(e.scrollSnapList().length), p(e), e.on("select", p), e.on("reInit", p), e.on("reInit", S), () => {
63
- e.off("select", p), e.off("reInit", p), e.off("reInit", S);
89
+ return O(e.scrollSnapList().length), h(e), e.on("select", h), e.on("reInit", h), e.on("reInit", z), () => {
90
+ e.off("select", h), e.off("reInit", h), e.off("reInit", z);
64
91
  };
65
- }, [e, p, S]);
66
- const g = [], I = [];
67
- return o.Children.forEach(i, (r) => {
68
- o.isValidElement(r) && r.type === J ? g.push(r) : I.push(r);
69
- }), /* @__PURE__ */ m(
70
- R.Provider,
92
+ }, [e, h, z]);
93
+ const T = r.useRef(!1), S = r.useRef(!1), N = r.useRef(!1), R = g && M > 1, A = r.useCallback(
94
+ () => R ? e == null ? void 0 : e.plugins().autoplay : void 0,
95
+ [e, R]
96
+ ), k = r.useCallback(() => {
97
+ var o;
98
+ (o = A()) == null || o.stop();
99
+ }, [A]), I = r.useCallback(() => {
100
+ var o;
101
+ T.current || S.current || (o = A()) == null || o.play();
102
+ }, [A]);
103
+ r.useEffect(() => {
104
+ if (!e || !R) return;
105
+ const o = () => {
106
+ S.current = !0, N.current = !0, k();
107
+ }, L = () => {
108
+ S.current = !1, I();
109
+ }, D = () => {
110
+ N.current && (N.current = !1, I());
111
+ };
112
+ return e.on("pointerDown", o), e.on("pointerUp", L), e.on("settle", D), () => {
113
+ e.off("pointerDown", o), e.off("pointerUp", L), e.off("settle", D), S.current = !1, N.current = !1;
114
+ };
115
+ }, [e, R, k, I]);
116
+ const _ = [], H = [];
117
+ return r.Children.forEach(b, (o) => {
118
+ r.isValidElement(o) && o.type === fe ? _.push(o) : H.push(o);
119
+ }), /* @__PURE__ */ p(
120
+ F.Provider,
71
121
  {
72
122
  value: {
73
- carouselRef: d,
123
+ carouselRef: j,
74
124
  api: e,
75
- options: s,
125
+ options: l,
76
126
  orientation: t,
77
- plugins: n,
78
- scrollPrev: N,
79
- scrollNext: y,
80
- canScrollPrev: b,
81
- canScrollNext: u,
82
- selectedIndex: D,
83
- scrollTo: A,
84
- slidesCount: k
127
+ plugins: s,
128
+ scrollPrev: E,
129
+ scrollNext: P,
130
+ canScrollPrev: Q,
131
+ canScrollNext: V,
132
+ selectedIndex: G,
133
+ scrollTo: W,
134
+ slidesCount: M
85
135
  },
86
- children: /* @__PURE__ */ j(
136
+ children: /* @__PURE__ */ Z(
87
137
  "div",
88
138
  {
89
- ref: w,
90
- onKeyDownCapture: K,
91
- className: f,
139
+ ref: a,
140
+ onKeyDownCapture: X,
141
+ className: w,
92
142
  role: "region",
93
143
  "aria-roledescription": "carousel",
94
- ...C,
144
+ onPointerEnter: (o) => {
145
+ o.pointerType === "mouse" && (T.current = !0, k()), m == null || m(o);
146
+ },
147
+ onPointerLeave: (o) => {
148
+ o.pointerType === "mouse" && (T.current = !1, I()), d == null || d(o);
149
+ },
150
+ ...x,
95
151
  children: [
96
- /* @__PURE__ */ m("div", { className: "relative", children: I }),
97
- g
152
+ /* @__PURE__ */ p("div", { className: "relative", children: H }),
153
+ _
98
154
  ]
99
155
  }
100
156
  )
@@ -102,90 +158,90 @@ const R = o.createContext(null), v = () => {
102
158
  );
103
159
  }
104
160
  );
105
- M.displayName = "Carousel";
106
- const U = o.forwardRef(
107
- ({ className: t, overflowVisible: s = !1, ...c }, l) => {
108
- const { carouselRef: n, orientation: f } = v(), i = f === "horizontal";
109
- return /* @__PURE__ */ m(
161
+ le.displayName = "Carousel";
162
+ const ne = r.forwardRef(
163
+ ({ className: t, overflowVisible: l = !1, ...u }, n) => {
164
+ const { carouselRef: s, orientation: f } = v(), c = f === "horizontal";
165
+ return /* @__PURE__ */ p(
110
166
  "div",
111
167
  {
112
- ref: n,
113
- className: h(
168
+ ref: s,
169
+ className: C(
114
170
  // touch-action: keeps cross-axis native scroll while same-axis swipes go to Embla
115
171
  "select-none",
116
- s ? "overflow-visible" : "overflow-hidden",
117
- i ? "[touch-action:pan-y_pinch-zoom]" : "[touch-action:pan-x_pinch-zoom]"
172
+ l ? "overflow-visible" : "overflow-hidden",
173
+ c ? "[touch-action:pan-y_pinch-zoom]" : "[touch-action:pan-x_pinch-zoom]"
118
174
  ),
119
- children: /* @__PURE__ */ m(
120
- B,
175
+ children: /* @__PURE__ */ p(
176
+ oe,
121
177
  {
122
- ref: l,
123
- direction: i ? "row" : "column",
124
- className: h(
125
- i ? "-ml-comp-carousel-gap" : "-mt-comp-carousel-gap",
178
+ ref: n,
179
+ direction: c ? "row" : "column",
180
+ className: C(
181
+ c ? "-ml-comp-carousel-gap" : "-mt-comp-carousel-gap",
126
182
  t
127
183
  ),
128
- ...c
184
+ ...u
129
185
  }
130
186
  )
131
187
  }
132
188
  );
133
189
  }
134
190
  );
135
- U.displayName = "CarouselContent";
136
- const V = o.forwardRef(
137
- ({ className: t, ...s }, c) => {
138
- const { orientation: l } = v();
139
- return /* @__PURE__ */ m(
191
+ ne.displayName = "CarouselContent";
192
+ const ce = r.forwardRef(
193
+ ({ className: t, ...l }, u) => {
194
+ const { orientation: n } = v();
195
+ return /* @__PURE__ */ p(
140
196
  "div",
141
197
  {
142
- ref: c,
198
+ ref: u,
143
199
  role: "group",
144
200
  "aria-roledescription": "slide",
145
- className: h(
201
+ className: C(
146
202
  "min-w-0 shrink-0 grow-0 basis-full",
147
203
  {
148
- "pl-comp-carousel-gap": l === "horizontal",
149
- "pt-comp-carousel-gap": l !== "horizontal"
204
+ "pl-comp-carousel-gap": n === "horizontal",
205
+ "pt-comp-carousel-gap": n !== "horizontal"
150
206
  },
151
207
  t
152
208
  ),
153
- ...s
209
+ ...l
154
210
  }
155
211
  );
156
212
  }
157
213
  );
158
- V.displayName = "CarouselItem";
159
- const q = o.forwardRef(
214
+ ce.displayName = "CarouselItem";
215
+ const ue = r.forwardRef(
160
216
  ({
161
217
  className: t,
162
- size: s = "default",
163
- ariaLabel: c,
164
- hideWhenDisabled: l = !1,
165
- onClick: n,
218
+ size: l = "default",
219
+ ariaLabel: u,
220
+ hideWhenDisabled: n = !1,
221
+ onClick: s,
166
222
  ...f
167
- }, i) => {
168
- const { orientation: C, scrollPrev: w, canScrollPrev: d } = v(), e = L(), b = c ?? e.carousel.previousAriaLabel, a = C === "horizontal", u = s === "sm";
169
- return l && !d ? null : /* @__PURE__ */ m(
170
- P,
223
+ }, c) => {
224
+ const { orientation: w, scrollPrev: b, canScrollPrev: m } = v(), d = U(), x = u ?? d.carousel.previousAriaLabel, a = w === "horizontal", i = l === "sm";
225
+ return n && !m ? null : /* @__PURE__ */ p(
226
+ K,
171
227
  {
172
- ref: i,
228
+ ref: c,
173
229
  direction: "left",
174
- size: s,
175
- disabled: !d,
176
- "aria-label": b,
177
- onClick: (x) => {
178
- w(), n == null || n(x);
230
+ size: l,
231
+ disabled: !m,
232
+ "aria-label": x,
233
+ onClick: (y) => {
234
+ b(), s == null || s(y);
179
235
  },
180
- className: h(
236
+ className: C(
181
237
  "absolute",
182
238
  {
183
239
  "top-1/2 -translate-y-1/2": a,
184
240
  "left-1/2 -translate-x-1/2 rotate-90": !a,
185
- "-left-comp-carousel-arrow-offset-sm": a && u,
186
- "-left-comp-carousel-arrow-offset": a && !u,
187
- "-top-comp-carousel-arrow-offset-v-sm": !a && u,
188
- "-top-comp-carousel-arrow-offset-v": !a && !u
241
+ "-left-comp-carousel-arrow-offset-sm": a && i,
242
+ "-left-comp-carousel-arrow-offset": a && !i,
243
+ "-top-comp-carousel-arrow-offset-v-sm": !a && i,
244
+ "-top-comp-carousel-arrow-offset-v": !a && !i
189
245
  },
190
246
  t
191
247
  ),
@@ -194,37 +250,37 @@ const q = o.forwardRef(
194
250
  );
195
251
  }
196
252
  );
197
- q.displayName = "CarouselPrevious";
198
- const G = o.forwardRef(
253
+ ue.displayName = "CarouselPrevious";
254
+ const ie = r.forwardRef(
199
255
  ({
200
256
  className: t,
201
- size: s = "default",
202
- ariaLabel: c,
203
- hideWhenDisabled: l = !1,
204
- onClick: n,
257
+ size: l = "default",
258
+ ariaLabel: u,
259
+ hideWhenDisabled: n = !1,
260
+ onClick: s,
205
261
  ...f
206
- }, i) => {
207
- const { orientation: C, scrollNext: w, canScrollNext: d } = v(), e = L(), b = c ?? e.carousel.nextAriaLabel, a = C === "horizontal", u = s === "sm";
208
- return l && !d ? null : /* @__PURE__ */ m(
209
- P,
262
+ }, c) => {
263
+ const { orientation: w, scrollNext: b, canScrollNext: m } = v(), d = U(), x = u ?? d.carousel.nextAriaLabel, a = w === "horizontal", i = l === "sm";
264
+ return n && !m ? null : /* @__PURE__ */ p(
265
+ K,
210
266
  {
211
- ref: i,
267
+ ref: c,
212
268
  direction: "right",
213
- size: s,
214
- disabled: !d,
215
- "aria-label": b,
216
- onClick: (x) => {
217
- w(), n == null || n(x);
269
+ size: l,
270
+ disabled: !m,
271
+ "aria-label": x,
272
+ onClick: (y) => {
273
+ b(), s == null || s(y);
218
274
  },
219
- className: h(
275
+ className: C(
220
276
  "absolute",
221
277
  {
222
278
  "top-1/2 -translate-y-1/2": a,
223
279
  "left-1/2 -translate-x-1/2 rotate-90": !a,
224
- "-right-comp-carousel-arrow-offset-sm": a && u,
225
- "-right-comp-carousel-arrow-offset": a && !u,
226
- "-bottom-comp-carousel-arrow-offset-v-sm": !a && u,
227
- "-bottom-comp-carousel-arrow-offset-v": !a && !u
280
+ "-right-comp-carousel-arrow-offset-sm": a && i,
281
+ "-right-comp-carousel-arrow-offset": a && !i,
282
+ "-bottom-comp-carousel-arrow-offset-v-sm": !a && i,
283
+ "-bottom-comp-carousel-arrow-offset-v": !a && !i
228
284
  },
229
285
  t
230
286
  ),
@@ -233,31 +289,32 @@ const G = o.forwardRef(
233
289
  );
234
290
  }
235
291
  );
236
- G.displayName = "CarouselNext";
237
- const J = ({
292
+ ie.displayName = "CarouselNext";
293
+ const fe = ({
238
294
  className: t,
239
- ariaLabel: s,
240
- buttonAriaLabel: c
295
+ ariaLabel: l,
296
+ buttonAriaLabel: u
241
297
  }) => {
242
- const { selectedIndex: l, scrollTo: n, slidesCount: f } = v(), i = L();
243
- return f <= 1 ? null : /* @__PURE__ */ m(
244
- F,
298
+ const { selectedIndex: n, scrollTo: s, slidesCount: f } = v(), c = U();
299
+ return f <= 1 ? null : /* @__PURE__ */ p(
300
+ re,
245
301
  {
246
302
  count: f,
247
- activeIndex: l,
248
- onDotClick: n,
303
+ activeIndex: n,
304
+ onDotClick: s,
249
305
  interactive: !0,
250
- className: h("mt-comp-carousel-dots-gap", t),
251
- ariaLabel: s ?? i.carousel.dotsAriaLabel,
252
- buttonAriaLabel: c ?? i.carousel.dotAriaLabel
306
+ className: C("mt-comp-carousel-dots-gap", t),
307
+ ariaLabel: l ?? c.carousel.dotsAriaLabel,
308
+ buttonAriaLabel: u ?? c.carousel.dotAriaLabel
253
309
  }
254
310
  );
255
311
  };
256
312
  export {
257
- M as Carousel,
258
- U as CarouselContent,
259
- J as CarouselDots,
260
- V as CarouselItem,
261
- G as CarouselNext,
262
- q as CarouselPrevious
313
+ le as Carousel,
314
+ ne as CarouselContent,
315
+ fe as CarouselDots,
316
+ ce as CarouselItem,
317
+ ie as CarouselNext,
318
+ ue as CarouselPrevious,
319
+ v as useCarousel
263
320
  };
@@ -8,6 +8,8 @@ export declare const Vertical: Story;
8
8
  export declare const MultipleVisible: Story;
9
9
  export declare const WithLinks: Story;
10
10
  export declare const Looping: Story;
11
+ export declare const Autoplay: Story;
12
+ export declare const CustomControls: Story;
11
13
  export declare const SmallArrows: Story;
12
14
  export declare const NoDots: Story;
13
15
  //# sourceMappingURL=Carousel.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EACL,QAAQ,EAMT,MAAM,YAAY,CAAA;AAEnB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CA2C/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAiCtC,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAiCtB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA4B7B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAyCvB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KA6BzB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA2BpB,CAAA"}
1
+ {"version":3,"file":"Carousel.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Carousel/Carousel.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAI3D,OAAO,EACL,QAAQ,EAOT,MAAM,YAAY,CAAA;AAEnB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAgD/B,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAA;AAiCtC,eAAO,MAAM,OAAO,EAAE,KA4BrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAiCtB,CAAA;AAED,eAAO,MAAM,eAAe,EAAE,KA4B7B,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAyCvB,CAAA;AAED,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAqCtB,CAAA;AA2BD,eAAO,MAAM,cAAc,EAAE,KAoD5B,CAAA;AAED,eAAO,MAAM,WAAW,EAAE,KA6BzB,CAAA;AAED,eAAO,MAAM,MAAM,EAAE,KA2BpB,CAAA"}
@@ -1,9 +1,10 @@
1
- import { Carousel as r, CarouselContent as s, CarouselDots as u, CarouselItem as C, CarouselNext as a, CarouselPrevious as l } from "./Carousel.js";
1
+ import { Carousel as r, CarouselContent as s, CarouselDots as u, CarouselItem as C, CarouselNext as a, CarouselPrevious as l, useCarousel as t } from "./Carousel.js";
2
2
  export {
3
3
  r as Carousel,
4
4
  s as CarouselContent,
5
5
  u as CarouselDots,
6
6
  C as CarouselItem,
7
7
  a as CarouselNext,
8
- l as CarouselPrevious
8
+ l as CarouselPrevious,
9
+ t as useCarousel
9
10
  };
@@ -25,7 +25,7 @@ export interface CarouselSectionProps {
25
25
  */
26
26
  export declare const CarouselSection: ({ title, items, ctaLabel, ctaHref, }: CarouselSectionProps) => import("react/jsx-runtime").JSX.Element;
27
27
  /**
28
- * Pre-rendered slides using the library `OfferCard` (compact promo variant).
28
+ * Pre-rendered slides using the library `OfferCard` (tinted compact variant).
29
29
  * Below desktop the fixed `w-[284px]` drives the peeking multi-card layout;
30
30
  * `lg:w-full` lets the card fill its slide so the desktop fractional bases
31
31
  * (3 → 4 → 5 per view) line up exactly. `h-full` matches the tallest card.
@@ -92,7 +92,26 @@ export interface IDropdownItem {
92
92
  description?: React.ReactNode;
93
93
  }
94
94
  /** Props for DropdownMenuItem. Standard clickable item with optional icon. Extends Radix Item with IDropdownItem. */
95
- export type DropdownMenuItemProps = React.ComponentProps<typeof DropdownMenuPrimitive.Item> & IDropdownItem;
95
+ export interface DropdownMenuItemProps extends React.ComponentProps<typeof DropdownMenuPrimitive.Item>, IDropdownItem {
96
+ /**
97
+ * Renders the single child as the menu item's root element, merging the item's
98
+ * props, styling, ref and event handlers onto it. Use it for navigation
99
+ * entries so they become real links — preserving middle-click, Ctrl+click,
100
+ * "open in new tab", "copy link address", link semantics for screen readers
101
+ * and framework prefetching, none of which an `onSelect` handler can offer.
102
+ *
103
+ * `icon` and `description` still render: the icon is injected as a sibling
104
+ * inside the child, and the child's own content is wrapped in the standard
105
+ * label. Keyboard navigation, typeahead and `onSelect` are unchanged.
106
+ *
107
+ * @default false
108
+ * @example
109
+ * <DropdownMenuItem asChild icon={<HeartBold />}>
110
+ * <Link href="/profile/favorite">Favorites</Link>
111
+ * </DropdownMenuItem>
112
+ */
113
+ asChild?: boolean;
114
+ }
96
115
  /**
97
116
  * Props for DropdownMenuButtonItem. Menu item rendered as a Button for more prominent actions
98
117
  * such as upgrade or sign-up calls-to-action inside the menu. Pass `buttonProps` to configure the inner Button.
@@ -110,9 +129,9 @@ export type DropdownMenuButtonItemProps = React.ComponentProps<typeof DropdownMe
110
129
  buttonProps: ButtonProps;
111
130
  };
112
131
  /** Standard clickable menu item with optional icon and variant styling. */
113
- declare const DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, description, ...props }: DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
132
+ declare const DropdownMenuItem: ({ className, variant, children, icon, disabled, isActive, description, asChild, ...props }: DropdownMenuItemProps) => import("react/jsx-runtime").JSX.Element;
114
133
  declare const DropdownMenuButtonItem: ({ children, buttonProps, className, ...props }: DropdownMenuButtonItemProps) => import("react/jsx-runtime").JSX.Element;
115
- declare const DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, description, ...props }: DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
134
+ declare const DropdownMenuCheckboxItem: ({ className, children, checked, variant, icon, description, asChild, ...props }: DropdownMenuCheckboxItemProps) => import("react/jsx-runtime").JSX.Element;
116
135
  declare const DropdownMenuRadioGroup: ({ value, onValueChange, ...props }: DropdownMenuRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
117
136
  declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuRadioItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
118
137
  declare const DropdownMenuSeparator: ({ className, ...props }: DropdownMenuSeparatorProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/DropdownMenu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAA;AAGtE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAKpD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,iBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC;IAC/D,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,gEAAgE;IAChE,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,+EAA+E;IAC/E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,0EAA0E;IAC1E,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,yCAAyC;IACzC,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;CACpB;AAED,oFAAoF;AACpF,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,cAAc,CACxD,OAAO,qBAAqB,CAAC,MAAM,CACpC,CAAA;AAED,4FAA4F;AAC5F,MAAM,MAAM,wBAAwB,GAAG,KAAK,CAAC,cAAc,CACzD,OAAO,qBAAqB,CAAC,OAAO,CACrC,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,wBACf,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC;IAClE,yEAAyE;IACzE,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC1C,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,gEAAg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