@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.
- package/dist/index.mjs +102 -100
- package/dist/shared/components/Carousel/Carousel.mjs +68 -67
- package/dist/shared/components/Image/Image.d.ts +5 -2
- package/dist/shared/components/Image/Image.error.d.ts +5 -0
- package/dist/shared/components/Image/Image.error.mjs +41 -0
- package/dist/shared/components/Image/Image.mjs +114 -98
- package/dist/shared/components/Image/index.d.ts +2 -0
- package/dist/shared/components/Image/index.mjs +4 -2
- package/dist/shared/components/Masonry/Masonry.utils.mjs +19 -16
- package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +10 -9
- package/dist/shared/components/index.mjs +16 -14
- package/dist/teacher/home/components/BannerAccount/BannerAccount.d.ts +3 -1
- package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +28 -21
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.d.ts +3 -1
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +1 -1
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +36 -26
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.d.ts +3 -1
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +1 -1
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +35 -25
- package/dist/teacher/home/components/TextAccount/TextAccount.d.ts +3 -1
- package/dist/teacher/home/components/TextAccount/TextAccount.mjs +31 -22
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +3 -2
- 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
|
|
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/
|
|
19
|
-
import { default as N } from "./shared/components/
|
|
20
|
-
import { default as j } from "./shared/components/Masonry/
|
|
21
|
-
import { default as V } from "./shared/components/
|
|
22
|
-
import { default as z } from "./shared/
|
|
23
|
-
import { default as J } from "./shared/
|
|
24
|
-
import { default as W } from "./shared/utils/
|
|
25
|
-
import { default as Y } from "./shared/utils/
|
|
26
|
-
import { default as _ } from "./shared/utils/
|
|
27
|
-
import { default as ee } from "./shared/utils/
|
|
28
|
-
import { default as te } from "./shared/utils/
|
|
29
|
-
import { default as re } from "./shared/utils/
|
|
30
|
-
import { default as le } from "./shared/utils/
|
|
31
|
-
import { default as ue } from "./shared/utils/
|
|
32
|
-
import { default as me } from "./shared/utils/
|
|
33
|
-
import { default as xe } from "./shared/utils/
|
|
34
|
-
import { default as ce } from "./shared/utils/
|
|
35
|
-
import { default as ge } from "./shared/utils/
|
|
36
|
-
import { default as Ce } from "./
|
|
37
|
-
import { default as ye } from "./teacher/profile/components/
|
|
38
|
-
import { default as ke } from "./teacher/profile/components/StatBadgeCollection/
|
|
39
|
-
import { default as ve } from "./teacher/profile/components/
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as Te } from "./teacher/profile/components/
|
|
42
|
-
import { default as Pe } from "./teacher/profile/components/CertificateSection/
|
|
43
|
-
import { default as we } from "./teacher/profile/components/
|
|
44
|
-
import { default as Ee } from "./teacher/profile/components/CareerSection/
|
|
45
|
-
import { default as Le } from "./teacher/profile/components/
|
|
46
|
-
import { default as Ne } from "./teacher/profile/components/EducationSection/
|
|
47
|
-
import { default as je } from "./teacher/profile/components/
|
|
48
|
-
import { default as Ve } from "./teacher/profile/components/
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import { default as We } from "./teacher/profile/components/AbilityCollection/
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import { default as eo } from "./teacher/profile/components/
|
|
55
|
-
import { default as to } from "./teacher/profile/components/ClassNotesSection/
|
|
56
|
-
import { default as ro } from "./teacher/profile/components/
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { default as po } from "./teacher/
|
|
60
|
-
import { default as io } from "./teacher/home/components/TextAccount/TextAccount.
|
|
61
|
-
import { default as no } from "./teacher/home/components/
|
|
62
|
-
import { default as Ao } from "./teacher/home/components/Carousel1Account/Carousel1Account.
|
|
63
|
-
import { default as So } from "./teacher/home/components/
|
|
64
|
-
import { default as bo } from "./teacher/home/components/Carousel2Account/Carousel2Account.
|
|
65
|
-
import { default as Bo } from "./teacher/home/components/
|
|
66
|
-
import { default as Do } from "./teacher/home/components/BannerAccount/BannerAccount.
|
|
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
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
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
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
|
|
92
|
-
|
|
93
|
-
j as
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
|
|
110
|
-
|
|
111
|
+
ve as StatBadge,
|
|
112
|
+
ke as StatBadgeCollection,
|
|
111
113
|
y as Swiper,
|
|
112
114
|
k as SwiperBlock,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
io as TextAccount,
|
|
116
|
+
no as TextAccountFallback,
|
|
115
117
|
T as TimePicker,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
118
|
+
ue as birthDateToAge,
|
|
119
|
+
Ce as dayFlagToDay,
|
|
120
|
+
_e as getAbilityCollection,
|
|
119
121
|
u as getAvailableDateRange,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
|
3
|
-
import { Flexbox as
|
|
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
|
-
|
|
7
|
-
|
|
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:
|
|
12
|
+
step: W = 1,
|
|
12
13
|
renderPagination: z,
|
|
13
|
-
...
|
|
14
|
+
...C
|
|
14
15
|
}) {
|
|
15
|
-
const { spacing: $ } = he(), [l, Y] = I(1), [
|
|
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
|
-
},
|
|
18
|
-
var
|
|
19
|
-
if (!
|
|
20
|
-
const e = (((
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
t ?
|
|
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,
|
|
27
|
-
if (!
|
|
27
|
+
var h, g, y;
|
|
28
|
+
if (!c.current) return;
|
|
28
29
|
Y(e);
|
|
29
|
-
const n = e === 1,
|
|
30
|
-
n ?
|
|
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
|
-
[
|
|
33
|
+
[E, v, w]
|
|
33
34
|
), re = (e) => j(e.touches[0].clientX, e.touches[0].clientY), se = (e) => {
|
|
34
|
-
|
|
35
|
+
S.current = !0, j(e.clientX, e.clientY);
|
|
35
36
|
}, oe = (e) => {
|
|
36
|
-
|
|
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,
|
|
39
|
+
var U, q, G, V, _, B;
|
|
39
40
|
t.stopPropagation();
|
|
40
|
-
const n = Array.from(((
|
|
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 = (
|
|
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 = (
|
|
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 >
|
|
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 <
|
|
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 = (
|
|
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
|
|
82
|
-
const r = (
|
|
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" && (
|
|
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
|
|
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]),
|
|
97
|
+
}, [R, l]), T(() => {
|
|
97
98
|
const e = () => {
|
|
98
99
|
var i, d, h;
|
|
99
|
-
const t = (((i =
|
|
100
|
-
Y((g) => g >
|
|
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
|
-
}, [
|
|
106
|
-
const e =
|
|
107
|
-
if (!e ||
|
|
108
|
-
e.style.transition = "none", e.style.cursor = "grabbing",
|
|
109
|
-
const d =
|
|
110
|
-
|
|
111
|
-
}, n = (s) => t(s.touches[0].clientX, s.touches[0].clientY, s),
|
|
112
|
-
|
|
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",
|
|
115
|
-
e && (e.removeEventListener("mousemove",
|
|
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,
|
|
118
|
+
}, [R, l, w]), T(() => () => {
|
|
118
119
|
k.current && cancelAnimationFrame(k.current);
|
|
119
|
-
}, []),
|
|
120
|
+
}, []), T(() => {
|
|
120
121
|
const e = u.current, t = (n) => {
|
|
121
|
-
|
|
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
|
-
|
|
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
|
-
...
|
|
135
|
+
...C,
|
|
135
136
|
inlineCSS: {
|
|
136
137
|
width: "100%",
|
|
137
|
-
...
|
|
138
|
+
...C == null ? void 0 : C.inlineCSS
|
|
138
139
|
},
|
|
139
140
|
children: [
|
|
140
141
|
/* @__PURE__ */ A(
|
|
141
|
-
|
|
142
|
+
P,
|
|
142
143
|
{
|
|
143
|
-
ref:
|
|
144
|
+
ref: L,
|
|
144
145
|
inlineCSS: {
|
|
145
146
|
overflow: "hidden"
|
|
146
147
|
},
|
|
147
148
|
children: /* @__PURE__ */ A(
|
|
148
|
-
|
|
149
|
+
P,
|
|
149
150
|
{
|
|
150
|
-
ref:
|
|
151
|
+
ref: c,
|
|
151
152
|
onMouseDown: se,
|
|
152
|
-
onMouseUp:
|
|
153
|
-
onMouseLeave:
|
|
153
|
+
onMouseUp: M,
|
|
154
|
+
onMouseLeave: M,
|
|
154
155
|
onTouchStart: re,
|
|
155
|
-
onTouchEnd:
|
|
156
|
-
onTouchCancel:
|
|
156
|
+
onTouchEnd: M,
|
|
157
|
+
onTouchCancel: M,
|
|
157
158
|
onTransitionEnd: ie,
|
|
158
159
|
inlineCSS: {
|
|
159
160
|
gap: v,
|
|
160
|
-
paddingLeft:
|
|
161
|
-
paddingRight:
|
|
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
|
-
|
|
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:
|
|
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": `${
|
|
185
|
+
"aria-label": `${x}개 중 ${t + 1}번째 슬라이드`,
|
|
185
186
|
"aria-posinset": t + 1,
|
|
186
|
-
"aria-setsize":
|
|
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:
|
|
204
|
+
typeof z == "function" && z({ page: l, totalPages: w, onChange: oe })
|
|
204
205
|
]
|
|
205
206
|
}
|
|
206
207
|
);
|
|
207
208
|
}
|
|
208
209
|
export {
|
|
209
|
-
|
|
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;
|