@phillips/seldon 1.249.0 → 1.251.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 (137) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index9.js +2 -2
  3. package/dist/assets/formatted/Account.js +15 -11
  4. package/dist/assets/formatted/AccountActive.js +17 -13
  5. package/dist/assets/formatted/Add.js +18 -14
  6. package/dist/assets/formatted/AdminCheck.js +19 -15
  7. package/dist/assets/formatted/AdminChevronLeft.js +17 -13
  8. package/dist/assets/formatted/AdminChevronRight.js +19 -15
  9. package/dist/assets/formatted/AdminChevronUp.js +18 -14
  10. package/dist/assets/formatted/AdminClose.js +20 -16
  11. package/dist/assets/formatted/AdminFullscreen.js +19 -21
  12. package/dist/assets/formatted/AdminFullscreenExit.js +19 -15
  13. package/dist/assets/formatted/AdminGavel.js +22 -18
  14. package/dist/assets/formatted/AdminHome.js +19 -15
  15. package/dist/assets/formatted/AdminLiveOnline.js +20 -16
  16. package/dist/assets/formatted/AdminPencil.js +18 -14
  17. package/dist/assets/formatted/AdminPerson.js +16 -12
  18. package/dist/assets/formatted/AdminPlay.js +19 -15
  19. package/dist/assets/formatted/AdminSearch.js +20 -16
  20. package/dist/assets/formatted/AdminTelephone.js +17 -13
  21. package/dist/assets/formatted/AppleAppStoreBadge.js +19 -15
  22. package/dist/assets/formatted/ArrowDown.js +16 -12
  23. package/dist/assets/formatted/ArrowLeft.js +16 -12
  24. package/dist/assets/formatted/ArrowRight.js +17 -13
  25. package/dist/assets/formatted/ArrowUp.js +18 -14
  26. package/dist/assets/formatted/Bag.js +18 -14
  27. package/dist/assets/formatted/Calendar.js +17 -13
  28. package/dist/assets/formatted/ChevronDown.js +17 -13
  29. package/dist/assets/formatted/ChevronLeft.js +17 -13
  30. package/dist/assets/formatted/ChevronRight.js +19 -15
  31. package/dist/assets/formatted/ChevronUp.js +17 -13
  32. package/dist/assets/formatted/Clock.js +18 -14
  33. package/dist/assets/formatted/CloseX.js +14 -10
  34. package/dist/assets/formatted/ConditionReport.js +19 -15
  35. package/dist/assets/formatted/Delete.js +20 -16
  36. package/dist/assets/formatted/Download.js +18 -14
  37. package/dist/assets/formatted/Edit.js +20 -16
  38. package/dist/assets/formatted/Email.js +19 -15
  39. package/dist/assets/formatted/Error.js +20 -16
  40. package/dist/assets/formatted/ExternalLink.js +16 -12
  41. package/dist/assets/formatted/Facebook.js +18 -14
  42. package/dist/assets/formatted/Favorite.js +17 -13
  43. package/dist/assets/formatted/FavoriteActive.js +17 -15
  44. package/dist/assets/formatted/Filters.js +19 -15
  45. package/dist/assets/formatted/Fullscreen.js +17 -13
  46. package/dist/assets/formatted/FullscreenExit.js +17 -13
  47. package/dist/assets/formatted/Gavel.js +19 -15
  48. package/dist/assets/formatted/GavelActive.js +18 -14
  49. package/dist/assets/formatted/Grid.js +16 -12
  50. package/dist/assets/formatted/Hide.js +20 -16
  51. package/dist/assets/formatted/Home.js +17 -13
  52. package/dist/assets/formatted/HomeActive.js +17 -13
  53. package/dist/assets/formatted/Icon.js +19 -15
  54. package/dist/assets/formatted/IconBlueCircle.js +18 -14
  55. package/dist/assets/formatted/IconGreenCircle.js +17 -13
  56. package/dist/assets/formatted/IconOrangeCircle.js +18 -14
  57. package/dist/assets/formatted/IconRedCircle.js +17 -13
  58. package/dist/assets/formatted/ImageUnavailable.js +23 -112
  59. package/dist/assets/formatted/Instagram.js +20 -16
  60. package/dist/assets/formatted/LinkedIn.js +19 -15
  61. package/dist/assets/formatted/List.js +20 -16
  62. package/dist/assets/formatted/LiveNow.js +17 -17
  63. package/dist/assets/formatted/Lock.js +19 -15
  64. package/dist/assets/formatted/MagnificentSeven.js +21 -17
  65. package/dist/assets/formatted/Menu.js +17 -13
  66. package/dist/assets/formatted/Mute.js +22 -18
  67. package/dist/assets/formatted/Pause.js +16 -12
  68. package/dist/assets/formatted/PhillipsAppIcon.js +21 -17
  69. package/dist/assets/formatted/PhillipsLogo.js +17 -13
  70. package/dist/assets/formatted/Play.js +18 -14
  71. package/dist/assets/formatted/Red.js +13 -9
  72. package/dist/assets/formatted/Refresh.js +17 -13
  73. package/dist/assets/formatted/Search.js +19 -14
  74. package/dist/assets/formatted/Sell.js +19 -15
  75. package/dist/assets/formatted/SellActive.js +19 -15
  76. package/dist/assets/formatted/Share.js +15 -11
  77. package/dist/assets/formatted/Subtract.js +19 -15
  78. package/dist/assets/formatted/Success.js +16 -12
  79. package/dist/assets/formatted/Tooltip.js +21 -17
  80. package/dist/assets/formatted/TwitterX.js +19 -15
  81. package/dist/assets/formatted/Upload.js +16 -12
  82. package/dist/assets/formatted/View.js +15 -11
  83. package/dist/assets/formatted/VolumeMaximum.js +17 -13
  84. package/dist/assets/formatted/VolumeMid.js +21 -17
  85. package/dist/assets/formatted/VolumeMinimum.js +19 -15
  86. package/dist/assets/formatted/WeChat.js +19 -15
  87. package/dist/assets/pictograms/formatted/Chat.js +22 -18
  88. package/dist/assets/pictograms/formatted/CreditCard.js +20 -16
  89. package/dist/assets/pictograms/formatted/Form.js +19 -15
  90. package/dist/assets/pictograms/formatted/Live.js +17 -13
  91. package/dist/assets/pictograms/formatted/MobilePhone.js +18 -14
  92. package/dist/assets/pictograms/formatted/Notification.js +21 -17
  93. package/dist/assets/pictograms/formatted/Phone.js +25 -21
  94. package/dist/assets/pictograms/formatted/Photos.js +21 -17
  95. package/dist/assets/pictograms/formatted/Search.js +18 -14
  96. package/dist/assets/pictograms/formatted/Shipping.js +17 -13
  97. package/dist/assets/pictograms/formatted/Sign.js +16 -12
  98. package/dist/assets/pictograms/formatted/Submit.js +21 -17
  99. package/dist/assets/pictograms/formatted/Timer.js +21 -17
  100. package/dist/assets/pictograms/formatted/Verification.js +22 -18
  101. package/dist/components/AddToCalendar/AddToCalendar.js +5 -5
  102. package/dist/components/Card/Card.d.ts +41 -0
  103. package/dist/components/Card/Card.js +80 -0
  104. package/dist/components/Card/Card.stories.d.ts +63 -0
  105. package/dist/components/Card/Card.test.d.ts +1 -0
  106. package/dist/components/Card/index.d.ts +2 -0
  107. package/dist/components/Card/types.d.ts +4 -0
  108. package/dist/components/Card/types.js +4 -0
  109. package/dist/components/Carousel/Carousel.js +74 -74
  110. package/dist/components/Carousel/CarouselArrows.js +25 -23
  111. package/dist/components/Carousel/CarouselDot.js +1 -1
  112. package/dist/components/Carousel/CarouselDots.js +27 -25
  113. package/dist/components/Carousel/CarouselItem.js +16 -16
  114. package/dist/components/ComboBox/ComboBox.js +48 -44
  115. package/dist/components/ComboBox/ComboBox.stories.d.ts +10 -0
  116. package/dist/components/Dropdown/Dropdown.js +3 -3
  117. package/dist/components/FavoritingTileButton/FavoritingTileButton.js +13 -14
  118. package/dist/components/IconButton/IconButton.js +16 -15
  119. package/dist/components/Input/utils.js +3 -2
  120. package/dist/components/SeldonImage/SeldonImage.stories.d.ts +5 -0
  121. package/dist/components/Toast/Toast.stories.d.ts +8 -0
  122. package/dist/components/Video/Video.d.ts +4 -0
  123. package/dist/components/Video/Video.js +12 -11
  124. package/dist/index.d.ts +1 -0
  125. package/dist/index.js +240 -236
  126. package/dist/node_modules/ics/dist/index.js +1 -1
  127. package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
  128. package/dist/patterns/SaleCard/SaleCard.d.ts +3 -3
  129. package/dist/patterns/SaleCard/SaleCard.js +41 -42
  130. package/dist/patterns/SaleCard/SaleCard.stories.d.ts +1 -1
  131. package/dist/scss/componentStyles.scss +1 -0
  132. package/dist/scss/components/Card/_card.scss +113 -0
  133. package/dist/scss/components/Countdown/_countdown.scss +1 -1
  134. package/dist/scss/components/SeldonImage/_seldonImage.scss +16 -4
  135. package/dist/scss/pages/_page.scss +4 -4
  136. package/dist/scss/patterns/SaleCard/_saleCard.scss +3 -66
  137. package/package.json +10 -5
@@ -1,50 +1,50 @@
1
- import { jsx as c } from "react/jsx-runtime";
2
- import { createContext as R, forwardRef as K, useState as f, useEffect as m, useCallback as u } from "react";
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { createContext as K, forwardRef as L, useState as u, useEffect as d, useCallback as p } from "react";
3
3
  import { getCommonProps as W } from "../../utils/index.js";
4
4
  import j from "../../_virtual/index.js";
5
5
  import B from "../../node_modules/embla-carousel-class-names/esm/embla-carousel-class-names.esm.js";
6
6
  import G from "../../node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js";
7
- import { WheelGesturesPlugin as L } from "../../node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js";
8
- const q = R(null), z = K(
7
+ import { WheelGesturesPlugin as q } from "../../node_modules/embla-carousel-wheel-gestures/dist/embla-carousel-wheel-gestures.esm.js";
8
+ const z = K(null), F = L(
9
9
  ({
10
- element: d,
11
- loop: p = !1,
12
- startIndex: w = 0,
13
- onSlideChange: o,
14
- className: x,
15
- children: N,
16
- columnGap: v,
17
- useWheelGestures: C = !1,
18
- disableDrag: n = !1,
19
- disableNavigationDrag: b = null,
20
- inViewThreshold: h = 0.99,
21
- ...i
22
- }, g) => {
23
- const k = d || "div", { className: P, ...D } = W(i, "Carousel");
24
- let l = {};
25
- switch (b) {
10
+ element: w,
11
+ loop: x = !1,
12
+ startIndex: v = 0,
13
+ onSlideChange: r,
14
+ className: N,
15
+ children: C,
16
+ columnGap: b,
17
+ useWheelGestures: h = !1,
18
+ disableDrag: i = !1,
19
+ disableNavigationDrag: g = null,
20
+ inViewThreshold: k = 0.99,
21
+ ...c
22
+ }, P) => {
23
+ const t = w || "div", f = t === "ul" || t === "ol", { className: D, ...S } = W(c, "Carousel");
24
+ let o = {};
25
+ switch (g) {
26
26
  case "mobile":
27
- l = { breakpoints: { "(max-width: 960px)": { watchDrag: !1 } } };
27
+ o = { breakpoints: { "(max-width: 960px)": { watchDrag: !1 } } };
28
28
  break;
29
29
  case "desktop":
30
- l = { breakpoints: { "(min-width: 961px)": { watchDrag: !1 } } };
30
+ o = { breakpoints: { "(min-width: 961px)": { watchDrag: !1 } } };
31
31
  break;
32
32
  case "all":
33
- l = { watchDrag: !1 };
33
+ o = { watchDrag: !1 };
34
34
  break;
35
35
  default:
36
- l = {};
36
+ o = {};
37
37
  }
38
- const [S, I] = f(!1), [E, y] = f(!1), [V, e] = G(
38
+ const [E, I] = u(!1), [y, V] = u(!1), [A, e] = G(
39
39
  {
40
- loop: p,
41
- startIndex: w,
42
- inViewThreshold: h,
43
- ...l
40
+ loop: x,
41
+ startIndex: v,
42
+ inViewThreshold: k,
43
+ ...o
44
44
  },
45
45
  [
46
- ...C ? [
47
- L({
46
+ ...h ? [
47
+ q({
48
48
  forceWheelAxis: "x"
49
49
  })
50
50
  ] : [],
@@ -53,72 +53,72 @@ const q = R(null), z = K(
53
53
  })
54
54
  ]
55
55
  );
56
- m(() => {
57
- n ? e?.reInit({
56
+ d(() => {
57
+ i ? e?.reInit({
58
58
  watchDrag: () => !1
59
59
  }) : e?.reInit({
60
60
  watchDrag: () => !0
61
61
  });
62
- }, [n, e]);
63
- const A = u(
64
- (r) => {
65
- if (r.key === "ArrowLeft") {
66
- r.preventDefault(), e?.scrollPrev();
67
- const s = e?.slideNodes().filter((a) => a === document.activeElement)[0]?.previousElementSibling;
68
- s && s?.focus();
69
- } else if (r.key === "ArrowRight") {
70
- r.preventDefault(), e?.scrollNext();
71
- const s = e?.slideNodes().filter((a) => a === document.activeElement)[0]?.nextElementSibling;
72
- s && s?.focus();
62
+ }, [i, e]);
63
+ const R = p(
64
+ (s) => {
65
+ if (s.key === "ArrowLeft") {
66
+ s.preventDefault(), e?.scrollPrev();
67
+ const l = e?.slideNodes().filter((n) => n === document.activeElement)[0]?.previousElementSibling;
68
+ l && l?.focus();
69
+ } else if (s.key === "ArrowRight") {
70
+ s.preventDefault(), e?.scrollNext();
71
+ const l = e?.slideNodes().filter((n) => n === document.activeElement)[0]?.nextElementSibling;
72
+ l && l?.focus();
73
73
  }
74
74
  },
75
75
  [e]
76
- ), t = u(
77
- (r) => {
78
- if (!r) return;
79
- I(r?.canScrollPrev()), y(r?.canScrollNext());
80
- const s = r.slidesInView()?.[0];
81
- s !== void 0 && o?.(s);
76
+ ), a = p(
77
+ (s) => {
78
+ if (!s) return;
79
+ I(s?.canScrollPrev()), V(s?.canScrollNext());
80
+ const l = s.slidesInView()?.[0];
81
+ l !== void 0 && r?.(l);
82
82
  },
83
- [o]
83
+ [r]
84
84
  );
85
- return m(() => {
85
+ return d(() => {
86
86
  if (e)
87
- return e.on("slidesInView", t), () => {
88
- e.off("slidesInView", t);
87
+ return e.on("slidesInView", a), () => {
88
+ e.off("slidesInView", a);
89
89
  };
90
- }, [e, t]), /* @__PURE__ */ c(
91
- q.Provider,
90
+ }, [e, a]), /* @__PURE__ */ m(
91
+ z.Provider,
92
92
  {
93
93
  value: {
94
- carouselRef: V,
94
+ carouselRef: A,
95
95
  api: e,
96
96
  scrollPrev: () => e?.scrollPrev(),
97
97
  scrollNext: () => e?.scrollNext(),
98
- canScrollPrev: S,
99
- canScrollNext: E,
100
- columnGap: v,
101
- onSlideChange: o
98
+ canScrollPrev: E,
99
+ canScrollNext: y,
100
+ columnGap: b,
101
+ onSlideChange: r
102
102
  },
103
- children: /* @__PURE__ */ c(
104
- k,
103
+ children: /* @__PURE__ */ m(
104
+ t,
105
105
  {
106
- ref: g,
107
- onKeyDownCapture: A,
108
- className: j(P, x),
109
- role: "region",
110
- "aria-roledescription": "carousel",
111
- ...i,
112
- ...D,
113
- children: N
106
+ ref: P,
107
+ onKeyDownCapture: R,
108
+ className: j(D, N),
109
+ role: f ? void 0 : "region",
110
+ "aria-roledescription": f ? void 0 : "carousel",
111
+ ...c,
112
+ ...S,
113
+ children: C
114
114
  }
115
115
  )
116
116
  }
117
117
  );
118
118
  }
119
119
  );
120
- z.displayName = "Carousel";
120
+ F.displayName = "Carousel";
121
121
  export {
122
- q as CarouselContext,
123
- z as default
122
+ z as CarouselContext,
123
+ F as default
124
124
  };
@@ -1,46 +1,47 @@
1
- import { jsxs as b, jsx as r } from "react/jsx-runtime";
2
- import n from "../../_virtual/index.js";
3
- import { forwardRef as p, useCallback as l } from "react";
4
- import { getCommonProps as u } from "../../utils/index.js";
1
+ import { jsxs as h, jsx as r } from "react/jsx-runtime";
2
+ import l from "../../_virtual/index.js";
3
+ import { forwardRef as u, useCallback as t } from "react";
4
+ import { getCommonProps as p } from "../../utils/index.js";
5
5
  import { useCarousel as f } from "./utils.js";
6
6
  import a from "../Icon/Icon.js";
7
- const C = p(
8
- ({ className: c, areArrowsAlwaysVisible: i, ...t }, d) => {
9
- const { className: s, ...m } = u(t, "CarouselArrows"), { api: e } = f(), w = l(() => {
7
+ const x = u(
8
+ ({ className: c, areArrowsAlwaysVisible: o, ...n }, d) => {
9
+ const { className: s, ...m } = p(n, "CarouselArrows"), { api: e } = f(), b = t(() => {
10
10
  if (e)
11
11
  if (e?.slidesInView().length <= 1)
12
12
  e.scrollPrev(!0);
13
13
  else {
14
- const o = e?.slidesInView();
15
- e?.scrollTo(Math.max(0, o[0] - (o.length ?? 1)));
14
+ const i = e?.slidesInView();
15
+ e?.scrollTo(Math.max(0, i[0] - (i.length ?? 1)));
16
16
  }
17
- }, [e]), h = l(() => {
17
+ }, [e]), v = t(() => {
18
18
  if (e)
19
19
  if (e?.slidesInView().length <= 1)
20
20
  e?.scrollNext(!0);
21
21
  else {
22
- const v = (e?.slidesInView()).slice(-1)[0] + 1;
23
- e?.scrollTo(v);
22
+ const w = (e?.slidesInView()).slice(-1)[0] + 1;
23
+ e?.scrollTo(w);
24
24
  }
25
25
  }, [e]);
26
- return /* @__PURE__ */ b(
26
+ return /* @__PURE__ */ h(
27
27
  "div",
28
28
  {
29
29
  ref: d,
30
30
  "aria-roledescription": "carousel-arrow-navigation",
31
- className: n(`${s}`, c),
32
- ...t,
31
+ className: l(`${s}`, c),
32
+ ...n,
33
33
  ...m,
34
34
  children: [
35
35
  /* @__PURE__ */ r(
36
36
  "button",
37
37
  {
38
38
  "data-testid": "prev-arrow",
39
- className: n(`${s}-prev-btn`, {
40
- [`${s}-prev-btn--always-visible`]: i,
39
+ "aria-label": "Previous slide",
40
+ className: l(`${s}-prev-btn`, {
41
+ [`${s}-prev-btn--always-visible`]: o,
41
42
  [`${s}-prev-btn--disabled`]: !e?.canScrollPrev()
42
43
  }),
43
- onClick: w,
44
+ onClick: b,
44
45
  children: /* @__PURE__ */ r("div", { className: `${s}-prev-btn__icon`, children: /* @__PURE__ */ r(a, { icon: "ChevronLeft", height: "2rem" }) })
45
46
  }
46
47
  ),
@@ -48,11 +49,12 @@ const C = p(
48
49
  "button",
49
50
  {
50
51
  "data-testid": "next-arrow",
51
- className: n(`${s}-next-btn`, {
52
- [`${s}-next-btn--always-visible`]: i,
52
+ "aria-label": "Next slide",
53
+ className: l(`${s}-next-btn`, {
54
+ [`${s}-next-btn--always-visible`]: o,
53
55
  [`${s}-next-btn--disabled`]: !e?.canScrollNext()
54
56
  }),
55
- onClick: h,
57
+ onClick: v,
56
58
  children: /* @__PURE__ */ r("div", { className: `${s}-next-btn__icon`, children: /* @__PURE__ */ r(a, { icon: "ChevronRight", height: "2rem" }) })
57
59
  }
58
60
  )
@@ -61,7 +63,7 @@ const C = p(
61
63
  );
62
64
  }
63
65
  );
64
- C.displayName = "CarouselArrows";
66
+ x.displayName = "CarouselArrows";
65
67
  export {
66
- C as default
68
+ x as default
67
69
  };
@@ -21,7 +21,7 @@ const N = ({
21
21
  "button",
22
22
  {
23
23
  ref: p,
24
- role: "button",
24
+ type: "button",
25
25
  onClick: m,
26
26
  className: r(`${o}__container`),
27
27
  ...l,
@@ -1,14 +1,14 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import E from "../../_virtual/index.js";
3
- import { forwardRef as G, useState as S, useRef as L, useCallback as l, useEffect as M, useMemo as q } from "react";
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import B from "../../_virtual/index.js";
3
+ import { forwardRef as E, useState as S, useRef as L, useCallback as l, useEffect as M, useMemo as q } from "react";
4
4
  import { useCarousel as z } from "./utils.js";
5
5
  import { getCommonProps as A } from "../../utils/index.js";
6
6
  import { CarouselDot as F } from "./CarouselDot.js";
7
- const h = 10, C = 12, H = (h + C) / 2, J = G(
8
- ({ className: v, maxDots: g = 9, position: V = "inline", numberOfSlides: b = 0, id: I, ...D }, k) => {
9
- const { className: c, ...y } = A({ id: I, ...D }, "CarouselDots"), { api: t, onSlideChange: a } = z(), [R, T] = S(0), [i, O] = S(
10
- Array.from({ length: b }, (e, o) => o)
11
- ), r = L(null), [$, w] = S([]), N = l((e) => {
7
+ const h = 10, C = 12, H = (h + C) / 2, J = E(
8
+ ({ className: b, maxDots: g = 9, position: V = "inline", numberOfSlides: k = 0, id: I, ...D }, y) => {
9
+ const { className: c, ...R } = A({ id: I, ...D }, "CarouselDots"), { api: t, onSlideChange: a } = z(), [T, G] = S(0), [i, O] = S(
10
+ Array.from({ length: k }, (e, o) => o)
11
+ ), r = L(null), [$, w] = S([]), v = l((e) => {
12
12
  r.current && r.current.scrollTo?.({
13
13
  left: e * (h + C) - r.current.offsetWidth / 2 + H,
14
14
  // Center dot in container
@@ -23,10 +23,10 @@ const h = 10, C = 12, H = (h + C) / 2, J = G(
23
23
  O(e.scrollSnapList());
24
24
  }, []), n = l(
25
25
  (e) => {
26
- T(e.selectedScrollSnap()), N(e.selectedScrollSnap());
26
+ G(e.selectedScrollSnap()), v(e.selectedScrollSnap());
27
27
  },
28
- [N]
29
- ), u = l(
28
+ [v]
29
+ ), m = l(
30
30
  (e) => {
31
31
  a?.(e.selectedScrollSnap());
32
32
  },
@@ -34,45 +34,47 @@ const h = 10, C = 12, H = (h + C) / 2, J = G(
34
34
  );
35
35
  M(() => {
36
36
  if (t)
37
- return f(t), n(t), t.on("reInit", f).on("reInit", n).on("select", n).on("settle", u), () => {
38
- t.off("reInit", f).off("reInit", n).off("select", n).off("settle", u);
37
+ return f(t), n(t), t.on("reInit", f).on("reInit", n).on("select", n).on("settle", m), () => {
38
+ t.off("reInit", f).off("reInit", n).off("select", n).off("settle", m);
39
39
  };
40
- }, [t, f, n, u]);
40
+ }, [t, f, n, m]);
41
41
  const s = q(() => $.sort((e, o) => e - o), [$]);
42
- return /* @__PURE__ */ m(
42
+ return /* @__PURE__ */ u(
43
43
  "div",
44
44
  {
45
- ref: k,
45
+ ref: y,
46
46
  role: "group",
47
47
  "aria-roledescription": "pagination",
48
48
  "aria-label": "pagination",
49
- className: E(`${c}`, v, `${c}-${V}`),
49
+ className: B(`${c}`, b, `${c}-${V}`),
50
50
  ...D,
51
- ...y,
52
- children: /* @__PURE__ */ m("div", { className: `${c}-container`, children: /* @__PURE__ */ m(
51
+ ...R,
52
+ children: /* @__PURE__ */ u("div", { className: `${c}-container`, children: /* @__PURE__ */ u(
53
53
  "div",
54
54
  {
55
55
  style: { "--max-width": `${g * h + (g - 1) * C + 2}px` },
56
56
  className: `${c}-container-inner`,
57
57
  ref: r,
58
58
  children: i.map((e, o) => {
59
- const W = R === o, d = s.indexOf(o), _ = (
59
+ const N = T === o, d = s.indexOf(o), W = (
60
60
  // The dot is out of view
61
61
  d === -1 || // The dot must be either among the first two or last two visible dots
62
62
  (d <= 1 || d >= s.length - 2) && // Don't shrink if we're showing the first two dots (index 0,1) and both are visible
63
63
  !(o <= 1 && s.includes(0) && s.includes(1)) && // Don't shrink if we're showing the last two dots and both are visible
64
64
  !(o >= i.length - 2 && s.includes(i.length - 1) && s.includes(i.length - 2))
65
65
  );
66
- return /* @__PURE__ */ m(
66
+ return /* @__PURE__ */ u(
67
67
  F,
68
68
  {
69
69
  onClick: () => P(o),
70
- isSelected: W,
70
+ isSelected: N,
71
+ "aria-label": `Go to slide ${o + 1}`,
72
+ "aria-current": N ? "true" : void 0,
71
73
  scrollableContainerRef: r,
72
- onInViewChange: (j) => {
73
- w(j ? (p) => [...p, o] : (p) => p.filter((B) => B !== o));
74
+ onInViewChange: (_) => {
75
+ w(_ ? (p) => [...p, o] : (p) => p.filter((j) => j !== o));
74
76
  },
75
- variant: _ ? "sm" : "md"
77
+ variant: W ? "sm" : "md"
76
78
  },
77
79
  `${I}-dot-${o}`
78
80
  );
@@ -1,28 +1,28 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import i from "../../_virtual/index.js";
3
- import { forwardRef as c } from "react";
4
- import { getCommonProps as u } from "../../utils/index.js";
5
- import { useCarousel as p } from "./utils.js";
6
- const C = c(
7
- ({ element: m, className: s, ...o }, a) => {
8
- const t = m || "div", { className: e, ...l } = u(o, "CarouselItem"), { columnGap: r } = p();
9
- return /* @__PURE__ */ n(
10
- t,
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import c from "../../_virtual/index.js";
3
+ import { forwardRef as u } from "react";
4
+ import { getCommonProps as p } from "../../utils/index.js";
5
+ import { useCarousel as C } from "./utils.js";
6
+ const f = u(
7
+ ({ element: r, className: t, ...o }, a) => {
8
+ const m = r || "div", l = m === "li", { className: e, ...n } = p(o, "CarouselItem"), { columnGap: s } = C();
9
+ return /* @__PURE__ */ i(
10
+ m,
11
11
  {
12
12
  ref: a,
13
- role: o.onClick ? "button" : "group",
13
+ role: l ? void 0 : o.onClick ? "button" : "group",
14
14
  "aria-roledescription": "slide",
15
- className: i(`${e}`, s, {
16
- [`${e}--gap-${r}`]: !!r,
15
+ className: c(`${e}`, t, {
16
+ [`${e}--gap-${s}`]: !!s,
17
17
  [`${e}--cursor-pointer`]: !!o.onClick
18
18
  }),
19
19
  ...o,
20
- ...l
20
+ ...n
21
21
  }
22
22
  );
23
23
  }
24
24
  );
25
- C.displayName = "CarouselItem";
25
+ f.displayName = "CarouselItem";
26
26
  export {
27
- C as default
27
+ f as default
28
28
  };