@dotss/tictoccroc 0.0.12 → 0.0.14

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 (23) hide show
  1. package/dist/index.mjs +102 -100
  2. package/dist/shared/components/Carousel/Carousel.mjs +68 -67
  3. package/dist/shared/components/Image/Image.d.ts +5 -2
  4. package/dist/shared/components/Image/Image.error.d.ts +5 -0
  5. package/dist/shared/components/Image/Image.error.mjs +41 -0
  6. package/dist/shared/components/Image/Image.mjs +114 -98
  7. package/dist/shared/components/Image/index.d.ts +2 -0
  8. package/dist/shared/components/Image/index.mjs +4 -2
  9. package/dist/shared/components/Masonry/Masonry.utils.mjs +19 -16
  10. package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +10 -9
  11. package/dist/shared/components/index.mjs +16 -14
  12. package/dist/teacher/home/components/BannerAccount/BannerAccount.d.ts +3 -1
  13. package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +28 -21
  14. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.d.ts +3 -1
  15. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +1 -1
  16. package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +36 -26
  17. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.d.ts +3 -1
  18. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +1 -1
  19. package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +35 -25
  20. package/dist/teacher/home/components/TextAccount/TextAccount.d.ts +3 -1
  21. package/dist/teacher/home/components/TextAccount/TextAccount.mjs +31 -22
  22. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +3 -2
  23. package/package.json +9 -1
package/dist/index.mjs CHANGED
@@ -10,125 +10,127 @@ import { default as C } from "./shared/components/MediaDialog/MediaDialogToolbar
10
10
  import { default as y } from "./shared/components/Swiper/Swiper.mjs";
11
11
  import { default as k } from "./shared/components/Swiper/SwiperBlock/SwiperBlock.mjs";
12
12
  import { default as v } from "./shared/components/Carousel/Carousel.mjs";
13
- import { default as h } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
13
+ import { default as I } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
14
14
  import { default as T } from "./shared/components/TimePicker/TimePicker.mjs";
15
15
  import { default as P } from "./shared/components/Roller/Roller.mjs";
16
16
  import { default as w } from "./shared/components/Roller/RollerBlock/RollerBlock.mjs";
17
17
  import { default as E } from "./shared/components/Image/Image.mjs";
18
- import { default as L } from "./shared/components/Calendar/Calendar.mjs";
19
- import { default as N } from "./shared/components/Masonry/Masonry.mjs";
20
- import { default as j } from "./shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
21
- import { default as V } from "./shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs";
22
- import { default as z } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
23
- import { default as J } from "./shared/utils/getImageUrl/getImageUrl.mjs";
24
- import { default as W } from "./shared/utils/isServer/isServer.mjs";
25
- import { default as Y } from "./shared/utils/getTimeRange/getTimeRange.mjs";
26
- import { default as _ } from "./shared/utils/getDateRange/getDateRange.mjs";
27
- import { default as ee } from "./shared/utils/isAndroid/isAndroid.mjs";
28
- import { default as te } from "./shared/utils/isApp/isApp.mjs";
29
- import { default as re } from "./shared/utils/isDesktop/isDesktop.mjs";
30
- import { default as le } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
31
- import { default as ue } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
32
- import { default as me } from "./shared/utils/getVimeoId/getVimeoId.mjs";
33
- import { default as xe } from "./shared/utils/parseQueryString/parseQueryString.mjs";
34
- import { default as ce } from "./shared/utils/share/share.mjs";
35
- import { default as ge } from "./shared/utils/dayFlagToDay/dayFlagToDay.mjs";
36
- import { default as Ce } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
37
- import { default as ye } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
38
- import { default as ke } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
39
- import { default as ve } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
40
- import { default as he } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
41
- import { default as Te } from "./teacher/profile/components/CertificateSection/CertificateSection.mjs";
42
- import { default as Pe } from "./teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs";
43
- import { default as we } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
44
- import { default as Ee } from "./teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs";
45
- import { default as Le } from "./teacher/profile/components/EducationSection/EducationSection.mjs";
46
- import { default as Ne } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
47
- import { default as je } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
48
- import { default as Ve } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
49
- import { getPreferredAgeKeywords as ze } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
50
- import { default as Je } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
51
- import { default as We } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
52
- import { getAbilityCollection as Ye } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
53
- import { default as _e } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
54
- import { default as eo } from "./teacher/profile/components/ClassNotesSection/ClassNotesSection.mjs";
55
- import { default as to } from "./teacher/profile/components/ClassNotesSection/ClassNote/ClassNote.mjs";
56
- import { default as ro } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
57
- import { getChildLabel as lo } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
58
- import { default as so } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
59
- import { default as po } from "./teacher/home/components/TextAccount/TextAccount.mjs";
60
- import { default as io } from "./teacher/home/components/TextAccount/TextAccount.fallback.mjs";
61
- import { default as no } from "./teacher/home/components/Carousel1Account/Carousel1Account.mjs";
62
- import { default as Ao } from "./teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs";
63
- import { default as So } from "./teacher/home/components/Carousel2Account/Carousel2Account.mjs";
64
- import { default as bo } from "./teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs";
65
- import { default as Bo } from "./teacher/home/components/BannerAccount/BannerAccount.mjs";
66
- import { default as Do } from "./teacher/home/components/BannerAccount/BannerAccount.fallback.mjs";
18
+ import { default as L } from "./shared/components/Image/Image.error.mjs";
19
+ import { default as N } from "./shared/components/Calendar/Calendar.mjs";
20
+ import { default as j } from "./shared/components/Masonry/Masonry.mjs";
21
+ import { default as V } from "./shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
22
+ import { default as z } from "./shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs";
23
+ import { default as J } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
24
+ import { default as W } from "./shared/utils/getImageUrl/getImageUrl.mjs";
25
+ import { default as Y } from "./shared/utils/isServer/isServer.mjs";
26
+ import { default as _ } from "./shared/utils/getTimeRange/getTimeRange.mjs";
27
+ import { default as ee } from "./shared/utils/getDateRange/getDateRange.mjs";
28
+ import { default as te } from "./shared/utils/isAndroid/isAndroid.mjs";
29
+ import { default as re } from "./shared/utils/isApp/isApp.mjs";
30
+ import { default as le } from "./shared/utils/isDesktop/isDesktop.mjs";
31
+ import { default as ue } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
32
+ import { default as me } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
33
+ import { default as xe } from "./shared/utils/getVimeoId/getVimeoId.mjs";
34
+ import { default as ce } from "./shared/utils/parseQueryString/parseQueryString.mjs";
35
+ import { default as ge } from "./shared/utils/share/share.mjs";
36
+ import { default as Ce } from "./shared/utils/dayFlagToDay/dayFlagToDay.mjs";
37
+ import { default as ye } from "./teacher/profile/components/ProfileSummary/ProfileSummary.mjs";
38
+ import { default as ke } from "./teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs";
39
+ import { default as ve } from "./teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs";
40
+ import { default as Ie } from "./teacher/profile/components/ActivityGallery/ActivityGallery.mjs";
41
+ import { default as Te } from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs";
42
+ import { default as Pe } from "./teacher/profile/components/CertificateSection/CertificateSection.mjs";
43
+ import { default as we } from "./teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs";
44
+ import { default as Ee } from "./teacher/profile/components/CareerSection/CareerSection.mjs";
45
+ import { default as Le } from "./teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs";
46
+ import { default as Ne } from "./teacher/profile/components/EducationSection/EducationSection.mjs";
47
+ import { default as je } from "./teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs";
48
+ import { default as Ve } from "./teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs";
49
+ import { default as ze } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs";
50
+ import { getPreferredAgeKeywords as Je } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
51
+ import { default as We } from "./teacher/profile/components/AbilityCollection/AbilityCollection.mjs";
52
+ import { default as Ye } from "./teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs";
53
+ import { getAbilityCollection as _e } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
54
+ import { default as eo } from "./teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs";
55
+ import { default as to } from "./teacher/profile/components/ClassNotesSection/ClassNotesSection.mjs";
56
+ import { default as ro } from "./teacher/profile/components/ClassNotesSection/ClassNote/ClassNote.mjs";
57
+ import { default as lo } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs";
58
+ import { getChildLabel as so } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
59
+ import { default as po } from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs";
60
+ import { default as io } from "./teacher/home/components/TextAccount/TextAccount.mjs";
61
+ import { default as no } from "./teacher/home/components/TextAccount/TextAccount.fallback.mjs";
62
+ import { default as Ao } from "./teacher/home/components/Carousel1Account/Carousel1Account.mjs";
63
+ import { default as So } from "./teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs";
64
+ import { default as bo } from "./teacher/home/components/Carousel2Account/Carousel2Account.mjs";
65
+ import { default as Bo } from "./teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs";
66
+ import { default as Do } from "./teacher/home/components/BannerAccount/BannerAccount.mjs";
67
+ import { default as ho } from "./teacher/home/components/BannerAccount/BannerAccount.fallback.mjs";
67
68
  export {
68
- We as AbilityBadge,
69
- Je as AbilityCollection,
70
- ve as ActivityGallery,
71
- he as ActivityGalleryItem,
72
- _e as AvailableScheduleSection,
73
- Bo as BannerAccount,
74
- Do as BannerAccountFallback,
75
- L as Calendar,
76
- Ee as CareerItem,
77
- we as CareerSection,
69
+ Ye as AbilityBadge,
70
+ We as AbilityCollection,
71
+ Ie as ActivityGallery,
72
+ Te as ActivityGalleryItem,
73
+ eo as AvailableScheduleSection,
74
+ Do as BannerAccount,
75
+ ho as BannerAccountFallback,
76
+ N as Calendar,
77
+ Le as CareerItem,
78
+ Ee as CareerSection,
78
79
  v as Carousel,
79
- no as Carousel1Account,
80
- Ao as Carousel1AccountFallback,
81
- So as Carousel2Account,
82
- bo as Carousel2AccountFallback,
83
- h as CarouselSlide,
84
- Pe as CertificateItem,
85
- Te as CertificateSection,
86
- to as ClassNote,
87
- eo as ClassNotesSection,
88
- Ne as EducationItem,
89
- Le as EducationSection,
80
+ Ao as Carousel1Account,
81
+ So as Carousel1AccountFallback,
82
+ bo as Carousel2Account,
83
+ Bo as Carousel2AccountFallback,
84
+ I as CarouselSlide,
85
+ we as CertificateItem,
86
+ Pe as CertificateSection,
87
+ ro as ClassNote,
88
+ to as ClassNotesSection,
89
+ je as EducationItem,
90
+ Ne as EducationSection,
90
91
  E as Image,
91
- V as LoadingAnnouncer,
92
- N as Masonry,
93
- j as MasonryBlock,
92
+ L as ImageError,
93
+ z as LoadingAnnouncer,
94
+ j as Masonry,
95
+ V as MasonryBlock,
94
96
  x as MediaBlock,
95
97
  m as MediaDialog,
96
98
  c as MediaDialogContent,
97
99
  g as MediaDialogFooter,
98
100
  C as MediaDialogToolbar,
99
- so as ParentReviewCard,
100
- ro as ParentReviewSection,
101
- je as PreferredActivityKeywordGroup,
102
- Ve as PreferredAgeGroup,
103
- Ce as ProfileSummary,
101
+ po as ParentReviewCard,
102
+ lo as ParentReviewSection,
103
+ Ve as PreferredActivityKeywordGroup,
104
+ ze as PreferredAgeGroup,
105
+ ye as ProfileSummary,
104
106
  P as Roller,
105
107
  w as RollerBlock,
106
108
  l as ScheduleBlock,
107
109
  r as ScheduleEvent,
108
110
  t as Scheduler,
109
- ke as StatBadge,
110
- ye as StatBadgeCollection,
111
+ ve as StatBadge,
112
+ ke as StatBadgeCollection,
111
113
  y as Swiper,
112
114
  k as SwiperBlock,
113
- po as TextAccount,
114
- io as TextAccountFallback,
115
+ io as TextAccount,
116
+ no as TextAccountFallback,
115
117
  T as TimePicker,
116
- le as birthDateToAge,
117
- ge as dayFlagToDay,
118
- Ye as getAbilityCollection,
118
+ ue as birthDateToAge,
119
+ Ce as dayFlagToDay,
120
+ _e as getAbilityCollection,
119
121
  u as getAvailableDateRange,
120
- lo as getChildLabel,
121
- _ as getDateRange,
122
- J as getImageUrl,
123
- ze as getPreferredAgeKeywords,
124
- Y as getTimeRange,
125
- me as getVimeoId,
126
- ee as isAndroid,
127
- te as isApp,
128
- re as isDesktop,
129
- W as isServer,
130
- ue as objectToQueryString,
131
- xe as parseQueryString,
132
- ce as share,
133
- z as useIsomorphicLayoutEffect
122
+ so as getChildLabel,
123
+ ee as getDateRange,
124
+ W as getImageUrl,
125
+ Je as getPreferredAgeKeywords,
126
+ _ as getTimeRange,
127
+ xe as getVimeoId,
128
+ te as isAndroid,
129
+ re as isApp,
130
+ le as isDesktop,
131
+ Y as isServer,
132
+ me as objectToQueryString,
133
+ ce as parseQueryString,
134
+ ge as share,
135
+ J as useIsomorphicLayoutEffect
134
136
  };
@@ -1,67 +1,68 @@
1
1
  import { jsxs as le, jsx as A } from "react/jsx-runtime";
2
- import { useState as I, useRef as p, Children as Z, isValidElement as ue, useCallback as fe, useEffect as C, cloneElement as de } from "react";
3
- import { Flexbox as W } from "@dotss/ui";
2
+ import { useState as I, useRef as p, Children as Q, isValidElement as ue, useCallback as fe, useEffect as T, cloneElement as de } from "react";
3
+ import { Flexbox as P } from "@dotss/ui";
4
4
  import he from "@dotss/ui/core/useTheme";
5
5
  import me from "./CarouselSlide/CarouselSlide.mjs";
6
- function Ee({
7
- children: _,
6
+ const ge = 5;
7
+ function ye({
8
+ children: Z,
8
9
  spacing: K = 2,
9
10
  edgeSpacing: O = 4,
10
11
  rowCount: a = 2,
11
- step: D = 1,
12
+ step: W = 1,
12
13
  renderPagination: z,
13
- ...T
14
+ ...C
14
15
  }) {
15
- const { spacing: $ } = he(), [l, Y] = I(1), [S, ee] = I(0), [te, ne] = I(0), x = p(null), o = p(null), u = p(null), X = p(0), F = p(0), w = p(0), b = p(!1), L = p(!0), k = p(0), v = $.content(K), y = $.content(O), N = Z.toArray(_).filter(ue).filter((e) => e.type === me), M = N.length, j = (e, t) => {
16
+ const { spacing: $ } = he(), [l, Y] = I(1), [w, ee] = I(0), [te, ne] = I(0), L = p(null), c = p(null), u = p(null), X = p(0), F = p(0), b = p(0), S = p(!1), D = p(!0), k = p(0), v = $.content(K), E = $.content(O), N = Q.toArray(Z).filter(ue).filter((e) => e.type === me), x = N.length, j = (e, t) => {
16
17
  X.current = e, F.current = t;
17
- }, P = () => {
18
- var s;
19
- if (!o.current || !b.current) return;
20
- const e = (((s = u.current) == null ? void 0 : s.offsetWidth) || 0) * 0.01, t = -w.current >= e && l + 1 <= S, n = -w.current <= -e && l - 1 >= 1;
21
- b.current = !1, L.current = !1, w.current = 0;
22
- let c = l;
23
- t ? c = l + 1 : n ? c = l - 1 : L.current = !0, o.current.style.transition = "transform 0.2s", o.current.style.cursor = "grab", R(c);
18
+ }, M = () => {
19
+ var o;
20
+ if (!c.current || !S.current) return;
21
+ const e = (((o = u.current) == null ? void 0 : o.offsetWidth) || 0) * 0.01, t = -b.current >= e && l + 1 <= w, n = -b.current <= -e && l - 1 >= 1, f = Math.abs(b.current) >= ge;
22
+ S.current = !1, D.current = !f, b.current = 0;
23
+ let s = l;
24
+ t ? s = l + 1 : n && (s = l - 1), c.current.style.transition = "transform 0.2s", c.current.style.cursor = "grab", R(s);
24
25
  }, R = fe(
25
26
  (e, t = 0) => {
26
- var h, g, E;
27
- if (!o.current) return;
27
+ var h, g, y;
28
+ if (!c.current) return;
28
29
  Y(e);
29
- const n = e === 1, c = e === S, s = (((h = x.current) == null ? void 0 : h.offsetWidth) || 0) - y, f = (((E = (g = u.current) == null ? void 0 : g.children[0]) == null ? void 0 : E.clientWidth) || 0) + v, i = (s - f * Math.floor(s / f) - v) / 2, d = f * (e - 1) - i;
30
- n ? o.current.style.transform = `translate3d(${t}px, 0, 0)` : c ? o.current.style.transform = `translate3d(${-(d - i) + t}px, 0, 0)` : o.current.style.transform = `translate3d(${-d + t}px, 0, 0)`;
30
+ const n = e === 1, f = e === w, s = (((h = L.current) == null ? void 0 : h.offsetWidth) || 0) - E, o = (((y = (g = u.current) == null ? void 0 : g.children[0]) == null ? void 0 : y.clientWidth) || 0) + v, i = (s - o * Math.floor(s / o) - v) / 2, d = o * (e - 1) - i;
31
+ n ? c.current.style.transform = `translate3d(${t}px, 0, 0)` : f ? c.current.style.transform = `translate3d(${-(d - i) + t}px, 0, 0)` : c.current.style.transform = `translate3d(${-d + t}px, 0, 0)`;
31
32
  },
32
- [y, v, S]
33
+ [E, v, w]
33
34
  ), re = (e) => j(e.touches[0].clientX, e.touches[0].clientY), se = (e) => {
34
- b.current = !0, j(e.clientX, e.clientY);
35
+ S.current = !0, j(e.clientX, e.clientY);
35
36
  }, oe = (e) => {
36
- o.current && (o.current.style.transition = "transform 0.2s", o.current.style.cursor = "grab", R(e));
37
+ c.current && (c.current.style.transition = "transform 0.2s", c.current.style.cursor = "grab", R(e));
37
38
  }, ce = (e) => (t) => {
38
- var q, G, V, B, H, J;
39
+ var U, q, G, V, _, B;
39
40
  t.stopPropagation();
40
- const n = Array.from(((q = u.current) == null ? void 0 : q.children) || []).indexOf(t.currentTarget), c = (((G = x.current) == null ? void 0 : G.offsetWidth) || 0) - y * 2, s = (((B = (V = u.current) == null ? void 0 : V.children[0]) == null ? void 0 : B.clientWidth) || 0) + v, i = Math.floor(c / (s / D)) * a, d = (l - 1) * i, h = d + i - 1, g = ((H = u.current) == null ? void 0 : H.children.length) || 0, E = n % a, U = Math.floor(n / a);
41
+ const n = Array.from(((U = u.current) == null ? void 0 : U.children) || []).indexOf(t.currentTarget), f = (((q = L.current) == null ? void 0 : q.offsetWidth) || 0) - E * 2, s = (((V = (G = u.current) == null ? void 0 : G.children[0]) == null ? void 0 : V.clientWidth) || 0) + v, i = Math.floor(f / (s / W)) * a, d = (l - 1) * i, h = d + i - 1, g = ((_ = u.current) == null ? void 0 : _.children.length) || 0, y = n % a, H = Math.floor(n / a);
41
42
  let m = n;
42
43
  switch (t.key) {
43
44
  case "ArrowRight": {
44
45
  t.preventDefault();
45
- const r = (U + 1) * a + E;
46
+ const r = (H + 1) * a + y;
46
47
  r < g && (m = r);
47
48
  break;
48
49
  }
49
50
  case "ArrowLeft": {
50
51
  t.preventDefault();
51
- const r = (U - 1) * a + E;
52
+ const r = (H - 1) * a + y;
52
53
  r >= 0 && (m = r);
53
54
  break;
54
55
  }
55
56
  case "ArrowDown": {
56
57
  t.preventDefault();
57
58
  const r = n + 1;
58
- r < g && r % a > E && (m = r);
59
+ r < g && r % a > y && (m = r);
59
60
  break;
60
61
  }
61
62
  case "ArrowUp": {
62
63
  t.preventDefault();
63
64
  const r = n - 1;
64
- r >= 0 && r % a < E && (m = r);
65
+ r >= 0 && r % a < y && (m = r);
65
66
  break;
66
67
  }
67
68
  case "Enter":
@@ -73,98 +74,98 @@ function Ee({
73
74
  return;
74
75
  }
75
76
  if (m >= d && m <= h) {
76
- const r = (J = u.current) == null ? void 0 : J.children[m];
77
+ const r = (B = u.current) == null ? void 0 : B.children[m];
77
78
  r == null || r.focus();
78
79
  return;
79
80
  }
80
81
  m >= 0 && m < g && (k.current = requestAnimationFrame(() => {
81
- var Q;
82
- const r = (Q = u.current) == null ? void 0 : Q.children[m];
82
+ var J;
83
+ const r = (J = u.current) == null ? void 0 : J.children[m];
83
84
  r == null || r.focus();
84
85
  })), e == null || e(t);
85
86
  }, ie = (e) => {
86
- e.propertyName === "transform" && (L.current = !0);
87
+ e.propertyName === "transform" && (D.current = !0);
87
88
  }, ae = (e) => (t) => {
88
89
  const n = Number(t.currentTarget.getAttribute("aria-posinset")) - 1;
89
90
  ne(n), e == null || e(t);
90
91
  };
91
- return C(() => {
92
+ return T(() => {
92
93
  const e = () => R(l);
93
94
  return e(), window.addEventListener("resize", e), () => {
94
95
  window.removeEventListener("resize", e);
95
96
  };
96
- }, [R, l]), C(() => {
97
+ }, [R, l]), T(() => {
97
98
  const e = () => {
98
99
  var i, d, h;
99
- const t = (((i = x.current) == null ? void 0 : i.offsetWidth) || 0) - y * 2, n = (((h = (d = u.current) == null ? void 0 : d.children[0]) == null ? void 0 : h.clientWidth) || 0) + v, c = Math.floor(t / (n / D)), s = Math.ceil(M / (a || 1)), f = Math.max(s - (c - 1), 1);
100
- Y((g) => g > f ? f : g), ee(f);
100
+ const t = (((i = L.current) == null ? void 0 : i.offsetWidth) || 0) - E * 2, n = (((h = (d = u.current) == null ? void 0 : d.children[0]) == null ? void 0 : h.clientWidth) || 0) + v, f = Math.floor(t / (n / W)), s = Math.ceil(x / (a || 1)), o = Math.max(s - (f - 1), 1);
101
+ Y((g) => g > o ? o : g), ee(o);
101
102
  };
102
103
  return e(), window.addEventListener("resize", e), () => {
103
104
  window.removeEventListener("resize", e);
104
105
  };
105
- }, [y, v, M, D, a]), C(() => {
106
- const e = o.current, t = (s, f, i) => {
107
- if (!e || S <= 1) return;
108
- e.style.transition = "none", e.style.cursor = "grabbing", w.current = s - X.current;
109
- const d = f - F.current, h = 5;
110
- b.current = b.current || Math.abs(w.current) > h && Math.abs(d) < h * 2, b.current && (i.cancelable && (i.stopPropagation(), i.preventDefault()), e.style.transition = "none", e.style.cursor = "grabbing", R(l, w.current));
111
- }, n = (s) => t(s.touches[0].clientX, s.touches[0].clientY, s), c = (s) => {
112
- b.current && t(s.clientX, s.clientY, s);
106
+ }, [E, v, x, W, a]), T(() => {
107
+ const e = c.current, t = (s, o, i) => {
108
+ if (!e || w <= 1) return;
109
+ e.style.transition = "none", e.style.cursor = "grabbing", b.current = s - X.current;
110
+ const d = o - F.current, h = 5;
111
+ S.current = S.current || Math.abs(b.current) > h && Math.abs(d) < h * 2, S.current && (i.cancelable && (i.stopPropagation(), i.preventDefault()), e.style.transition = "none", e.style.cursor = "grabbing", R(l, b.current));
112
+ }, n = (s) => t(s.touches[0].clientX, s.touches[0].clientY, s), f = (s) => {
113
+ S.current && t(s.clientX, s.clientY, s);
113
114
  };
114
- return e && (e.addEventListener("mousemove", c), e.addEventListener("touchmove", n)), () => {
115
- e && (e.removeEventListener("mousemove", c), e.removeEventListener("touchmove", n));
115
+ return e && (e.addEventListener("mousemove", f), e.addEventListener("touchmove", n)), () => {
116
+ e && (e.removeEventListener("mousemove", f), e.removeEventListener("touchmove", n));
116
117
  };
117
- }, [R, l, S]), C(() => () => {
118
+ }, [R, l, w]), T(() => () => {
118
119
  k.current && cancelAnimationFrame(k.current);
119
- }, []), C(() => {
120
+ }, []), T(() => {
120
121
  const e = u.current, t = (n) => {
121
- L.current || (n.stopPropagation(), n.preventDefault());
122
+ D.current || (n.stopPropagation(), n.preventDefault());
122
123
  };
123
124
  return e == null || e.addEventListener("click", t), () => {
124
125
  e == null || e.removeEventListener("click", t);
125
126
  };
126
127
  }, []), /* @__PURE__ */ le(
127
- W,
128
+ P,
128
129
  {
129
130
  flexDirection: "column",
130
131
  role: "list",
131
132
  "aria-roledescription": "carousel",
132
133
  "aria-label": "슬라이더",
133
134
  flexGrow: 1,
134
- ...T,
135
+ ...C,
135
136
  inlineCSS: {
136
137
  width: "100%",
137
- ...T == null ? void 0 : T.inlineCSS
138
+ ...C == null ? void 0 : C.inlineCSS
138
139
  },
139
140
  children: [
140
141
  /* @__PURE__ */ A(
141
- W,
142
+ P,
142
143
  {
143
- ref: x,
144
+ ref: L,
144
145
  inlineCSS: {
145
146
  overflow: "hidden"
146
147
  },
147
148
  children: /* @__PURE__ */ A(
148
- W,
149
+ P,
149
150
  {
150
- ref: o,
151
+ ref: c,
151
152
  onMouseDown: se,
152
- onMouseUp: P,
153
- onMouseLeave: P,
153
+ onMouseUp: M,
154
+ onMouseLeave: M,
154
155
  onTouchStart: re,
155
- onTouchEnd: P,
156
- onTouchCancel: P,
156
+ onTouchEnd: M,
157
+ onTouchCancel: M,
157
158
  onTransitionEnd: ie,
158
159
  inlineCSS: {
159
160
  gap: v,
160
- paddingLeft: y,
161
- paddingRight: y,
161
+ paddingLeft: E,
162
+ paddingRight: E,
162
163
  transition: "transform 0.2s",
163
164
  transform: "translate3d(0, 0, 0)",
164
165
  cursor: "grab"
165
166
  },
166
167
  children: /* @__PURE__ */ A(
167
- W,
168
+ P,
168
169
  {
169
170
  ref: u,
170
171
  inlineCSS: {
@@ -173,7 +174,7 @@ function Ee({
173
174
  gridTemplateRows: "min-content",
174
175
  transform: "translate3d(0, 0, 0)"
175
176
  },
176
- children: Z.map(
177
+ children: Q.map(
177
178
  N,
178
179
  (e, t) => {
179
180
  var n;
@@ -181,9 +182,9 @@ function Ee({
181
182
  role: "listitem",
182
183
  tabIndex: t === te ? 0 : -1,
183
184
  "aria-roledescription": "slide",
184
- "aria-label": `${M}개 중 ${t + 1}번째 슬라이드`,
185
+ "aria-label": `${x}개 중 ${t + 1}번째 슬라이드`,
185
186
  "aria-posinset": t + 1,
186
- "aria-setsize": M,
187
+ "aria-setsize": x,
187
188
  onKeyDown: ce(e.props.onKeyDown),
188
189
  onFocus: ae(e.props.onFocus),
189
190
  ...e.props,
@@ -200,11 +201,11 @@ function Ee({
200
201
  )
201
202
  }
202
203
  ),
203
- typeof z == "function" && z({ page: l, totalPages: S, onChange: oe })
204
+ typeof z == "function" && z({ page: l, totalPages: w, onChange: oe })
204
205
  ]
205
206
  }
206
207
  );
207
208
  }
208
209
  export {
209
- Ee as default
210
+ ye as default
210
211
  };
@@ -1,6 +1,6 @@
1
- import { HTMLProps } from 'react';
1
+ import { HTMLProps, ReactNode } from 'react';
2
2
  import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
3
- export interface ImageProps extends HTMLProps<HTMLImageElement> {
3
+ export interface ImageProps extends Omit<HTMLProps<HTMLImageElement>, 'onError'> {
4
4
  src: string;
5
5
  width?: number;
6
6
  height?: number;
@@ -11,10 +11,13 @@ export interface ImageProps extends HTMLProps<HTMLImageElement> {
11
11
  borderRadius?: number | string;
12
12
  alt: string;
13
13
  onLazyLoad?: () => void;
14
+ onError?: (error: Event) => void;
14
15
  disabledResizing?: boolean;
15
16
  withIntrinsicRatio?: boolean;
16
17
  wrapperProps?: FlexboxProps;
17
18
  enableFallback?: boolean;
19
+ enableErrorFallback?: boolean;
20
+ renderErrorFallback?: (hasError: boolean) => ReactNode;
18
21
  }
19
22
  declare const Image: import('react').ForwardRefExoticComponent<Omit<ImageProps, "ref"> & import('react').RefAttributes<HTMLImageElement>>;
20
23
  export default Image;
@@ -0,0 +1,5 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export interface ImageErrorProps extends FlexboxProps {
3
+ }
4
+ declare function ImageError(props: ImageErrorProps): import("@emotion/react/jsx-runtime").JSX.Element;
5
+ export default ImageError;