@dotss/tictoccroc 0.4.2 → 0.5.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.
- package/dist/Calendar-BOLCHnjh.js +97 -0
- package/dist/TimePicker-BwACyeBR.js +120 -0
- package/dist/convertMdToHtml-Bmk0brLK.js +1431 -0
- package/dist/index.mjs +105 -200
- package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +26 -29
- package/dist/parent/b2b/components/ActionButtons/index.mjs +5 -4
- package/dist/parent/b2b/components/BottomNotes/BottomNotes.mjs +37 -35
- package/dist/parent/b2b/components/BottomNotes/index.mjs +5 -4
- package/dist/parent/b2b/components/EmployeeNumberField/EmployeeNumberField.mjs +12 -15
- package/dist/parent/b2b/components/EmployeeNumberField/index.mjs +5 -4
- package/dist/parent/b2b/components/NameField/NameField.mjs +12 -7
- package/dist/parent/b2b/components/NameField/index.mjs +5 -4
- package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.mjs +27 -30
- package/dist/parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs +7 -8
- package/dist/parent/b2b/components/PhoneNumberField/index.mjs +6 -7
- package/dist/parent/b2b/components/Title/Title.mjs +22 -16
- package/dist/parent/b2b/components/Title/index.mjs +4 -3
- package/dist/parent/b2b/components/TopLogo/TopLogo.mjs +55 -93
- package/dist/parent/b2b/components/TopLogo/index.mjs +5 -4
- package/dist/parent/b2b/components/index.mjs +9 -19
- package/dist/parent/b2b/utils/convertMdToHtml/convertMdToHtml.mjs +2 -1143
- package/dist/parent/b2b/utils/index.mjs +2 -4
- package/dist/parent/notification/components/NotificationCard/NotificationCard.mjs +90 -108
- package/dist/parent/notification/components/NotificationCard/index.mjs +5 -4
- package/dist/parent/notification/components/index.mjs +2 -4
- package/dist/parent/notification/utils/index.mjs +2 -4
- package/dist/parent/notification/utils/sanitize/sanitize.mjs +6 -6
- package/dist/purify.es-D3W4zDrg.js +549 -0
- package/dist/shared/components/Calendar/Calendar.mjs +2 -80
- package/dist/shared/components/Calendar/index.mjs +5 -4
- package/dist/shared/components/Carousel/Carousel.mjs +184 -210
- package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +10 -7
- package/dist/shared/components/Carousel/CarouselSlide/index.mjs +5 -4
- package/dist/shared/components/Carousel/index.mjs +6 -6
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.mjs +151 -183
- package/dist/shared/components/ChatKit/BotMessage/BotMessage.utils.mjs +30 -50
- package/dist/shared/components/ChatKit/BotMessage/index.mjs +6 -8
- package/dist/shared/components/ChatKit/InputBar/InputBar.fallback.mjs +64 -84
- package/dist/shared/components/ChatKit/InputBar/InputBar.mjs +105 -130
- package/dist/shared/components/ChatKit/InputBar/index.mjs +6 -6
- package/dist/shared/components/ChatKit/Message/Message.fallback.mjs +50 -66
- package/dist/shared/components/ChatKit/Message/Message.mjs +178 -276
- package/dist/shared/components/ChatKit/Message/Message.utils.mjs +20 -31
- package/dist/shared/components/ChatKit/Message/index.mjs +7 -9
- package/dist/shared/components/ChatKit/Seperator/Seperator.mjs +31 -27
- package/dist/shared/components/ChatKit/Seperator/index.mjs +4 -3
- package/dist/shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs +183 -153
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.mjs +83 -108
- package/dist/shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs +5 -5
- package/dist/shared/components/ChatKit/SystemMessage/index.mjs +7 -8
- package/dist/shared/components/ChatKit/UnreadMessagePill/UnreadMessagePill.mjs +49 -54
- package/dist/shared/components/ChatKit/UnreadMessagePill/index.mjs +5 -4
- package/dist/shared/components/ChatKit/index.mjs +13 -29
- package/dist/shared/components/Image/Image.d.ts +2 -0
- package/dist/shared/components/Image/Image.error.mjs +34 -40
- package/dist/shared/components/Image/Image.mjs +247 -289
- package/dist/shared/components/Image/index.mjs +6 -6
- package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -18
- package/dist/shared/components/LoadingAnnouncer/index.mjs +5 -4
- package/dist/shared/components/Masonry/Masonry.mjs +240 -276
- package/dist/shared/components/Masonry/Masonry.utils.mjs +62 -81
- package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +111 -144
- package/dist/shared/components/Masonry/MasonryBlock/index.mjs +5 -4
- package/dist/shared/components/Masonry/index.mjs +6 -6
- package/dist/shared/components/MediaDialog/MediaBlock/MediaBlock.mjs +54 -69
- package/dist/shared/components/MediaDialog/MediaBlock/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialog.mjs +216 -330
- package/dist/shared/components/MediaDialog/MediaDialogContent/MediaDialogContent.mjs +18 -21
- package/dist/shared/components/MediaDialog/MediaDialogContent/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialogFooter/MediaDialogFooter.mjs +22 -27
- package/dist/shared/components/MediaDialog/MediaDialogFooter/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/MediaDialogToolbar/MediaDialogToolbar.mjs +15 -21
- package/dist/shared/components/MediaDialog/MediaDialogToolbar/index.mjs +5 -4
- package/dist/shared/components/MediaDialog/index.mjs +9 -12
- package/dist/shared/components/Roller/Roller.mjs +99 -132
- package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +9 -6
- package/dist/shared/components/Roller/RollerBlock/index.mjs +5 -4
- package/dist/shared/components/Roller/index.mjs +6 -6
- package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +22 -30
- package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +5 -4
- package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +25 -35
- package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +5 -4
- package/dist/shared/components/Scheduler/Scheduler.mjs +472 -567
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +78 -101
- package/dist/shared/components/Scheduler/index.mjs +8 -10
- package/dist/shared/components/Swiper/Swiper.mjs +238 -283
- package/dist/shared/components/Swiper/Swiper.utils.mjs +19 -24
- package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +14 -17
- package/dist/shared/components/Swiper/SwiperBlock/index.mjs +5 -4
- package/dist/shared/components/Swiper/index.mjs +6 -6
- package/dist/shared/components/TextField/TextField.mjs +44 -55
- package/dist/shared/components/TextField/index.mjs +5 -4
- package/dist/shared/components/TimePicker/TimePicker.mjs +2 -120
- package/dist/shared/components/TimePicker/index.mjs +5 -4
- package/dist/shared/components/index.mjs +36 -75
- package/dist/shared/hooks/index.mjs +4 -8
- package/dist/shared/hooks/useCombineRef/index.mjs +5 -4
- package/dist/shared/hooks/useCombineRef/useCombineRef.mjs +7 -7
- package/dist/shared/hooks/useInView/index.mjs +5 -4
- package/dist/shared/hooks/useInView/useInView.d.ts +2 -1
- package/dist/shared/hooks/useInView/useInView.mjs +37 -47
- package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +5 -4
- package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -6
- package/dist/shared/typings/common.mjs +6 -4
- package/dist/shared/typings/index.mjs +2 -4
- package/dist/shared/utils/ageToBirthDate/ageToBirthDate.mjs +17 -9
- package/dist/shared/utils/ageToBirthDate/index.mjs +5 -4
- package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +9 -10
- package/dist/shared/utils/birthDateToAge/index.mjs +4 -3
- package/dist/shared/utils/combineRef/combineRef.mjs +20 -23
- package/dist/shared/utils/combineRef/index.mjs +5 -4
- package/dist/shared/utils/dayFlagToDay/dayFlagToDay.mjs +15 -23
- package/dist/shared/utils/dayFlagToDay/index.mjs +5 -4
- package/dist/shared/utils/getCareTypeLabel/getCareTypeLabel.mjs +13 -20
- package/dist/shared/utils/getCareTypeLabel/index.mjs +5 -4
- package/dist/shared/utils/getDateRange/getDateRange.mjs +15 -20
- package/dist/shared/utils/getDateRange/index.mjs +5 -4
- package/dist/shared/utils/getImageUrl/getImageUrl.mjs +7 -17
- package/dist/shared/utils/getImageUrl/index.mjs +5 -6
- package/dist/shared/utils/getTimeRange/getTimeRange.mjs +19 -21
- package/dist/shared/utils/getTimeRange/index.mjs +5 -4
- package/dist/shared/utils/getVimeoId/getVimeoId.mjs +11 -11
- package/dist/shared/utils/getVimeoId/index.mjs +5 -4
- package/dist/shared/utils/index.mjs +18 -36
- package/dist/shared/utils/isAndroid/index.mjs +5 -4
- package/dist/shared/utils/isAndroid/isAndroid.mjs +5 -5
- package/dist/shared/utils/isApp/index.mjs +5 -4
- package/dist/shared/utils/isApp/isApp.mjs +4 -4
- package/dist/shared/utils/isDesktop/index.mjs +5 -4
- package/dist/shared/utils/isDesktop/isDesktop.mjs +15 -15
- package/dist/shared/utils/isIos/index.mjs +5 -4
- package/dist/shared/utils/isIos/isIos.mjs +5 -5
- package/dist/shared/utils/isServer/index.mjs +4 -3
- package/dist/shared/utils/isServer/isServer.mjs +4 -4
- package/dist/shared/utils/objectToQueryString/index.mjs +5 -4
- package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +7 -8
- package/dist/shared/utils/parseQueryString/index.mjs +4 -3
- package/dist/shared/utils/parseQueryString/parseQueryString.mjs +5 -5
- package/dist/shared/utils/share/index.mjs +5 -4
- package/dist/shared/utils/share/share.mjs +12 -14
- package/dist/teacher/home/components/BannerAccount/BannerAccount.fallback.mjs +19 -11
- package/dist/teacher/home/components/BannerAccount/BannerAccount.mjs +83 -99
- package/dist/teacher/home/components/BannerAccount/index.mjs +6 -7
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs +127 -67
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +68 -82
- package/dist/teacher/home/components/Carousel1Account/index.mjs +6 -7
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs +112 -94
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +79 -85
- package/dist/teacher/home/components/Carousel2Account/index.mjs +6 -7
- package/dist/teacher/home/components/TextAccount/TextAccount.fallback.mjs +119 -108
- package/dist/teacher/home/components/TextAccount/TextAccount.mjs +91 -111
- package/dist/teacher/home/components/TextAccount/index.mjs +6 -7
- package/dist/teacher/home/components/index.mjs +9 -18
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +345 -442
- package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -5
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +106 -109
- package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +54 -58
- package/dist/teacher/profile/components/AbilityCollection/index.mjs +7 -8
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +73 -104
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +81 -95
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -3
- package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -6
- package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +148 -194
- package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +5 -4
- package/dist/teacher/profile/components/CareNoteSection/CareNote/CareNote.mjs +61 -53
- package/dist/teacher/profile/components/CareNoteSection/CareNote/index.mjs +5 -4
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.mjs +72 -81
- package/dist/teacher/profile/components/CareNoteSection/CareNoteSection.utils.mjs +17 -12
- package/dist/teacher/profile/components/CareNoteSection/index.mjs +6 -6
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +108 -134
- package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +5 -4
- package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +133 -176
- package/dist/teacher/profile/components/CareerSection/index.mjs +6 -6
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/CertificateItem.mjs +82 -88
- package/dist/teacher/profile/components/CertificateSection/CertificateItem/index.mjs +4 -3
- package/dist/teacher/profile/components/CertificateSection/CertificateSection.mjs +112 -141
- package/dist/teacher/profile/components/CertificateSection/index.mjs +6 -6
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +96 -111
- package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +5 -4
- package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +112 -141
- package/dist/teacher/profile/components/EducationSection/index.mjs +6 -6
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +107 -102
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +5 -4
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +85 -81
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +17 -12
- package/dist/teacher/profile/components/ParentReviewSection/index.mjs +7 -8
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +43 -36
- package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -3
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +44 -31
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +11 -12
- package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +5 -5
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +348 -433
- package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs +7 -7
- package/dist/teacher/profile/components/ProfileSummary/index.mjs +5 -4
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +80 -105
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +5 -4
- package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +34 -27
- package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -6
- package/dist/teacher/profile/components/index.mjs +24 -48
- package/dist/teacher/profile/utils/index.mjs +2 -4
- package/dist/teacher/profile/utils/sortItems/index.mjs +5 -4
- package/dist/teacher/profile/utils/sortItems/sortItems.mjs +48 -48
- package/package.json +1 -1
- package/dist/purify.es-BGaRrCfO.js +0 -553
|
@@ -1,85 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const r = h[d];
|
|
14
|
-
for (; s < a.length && h[a[s]] < r; )
|
|
15
|
-
a[s - 1] = a[s], s += 1;
|
|
16
|
-
a[s - 1] = d;
|
|
17
|
-
}), t;
|
|
1
|
+
import e from "../Image/index.mjs";
|
|
2
|
+
import { Children as t, isValidElement as n } from "react";
|
|
3
|
+
//#region shared/components/Masonry/Masonry.utils.ts
|
|
4
|
+
function r(e, t, n, r) {
|
|
5
|
+
let i = Array.from({ length: n }, () => []), a = new Map(e.map((e) => [e.originalSrc ?? e.src, e])), s = Array(n).fill(0), c = Array.from({ length: n }, (e, t) => t);
|
|
6
|
+
return t.forEach((e) => {
|
|
7
|
+
let t = o(e.props.children)?.props.src || "", n = a.get(t), l = c[0];
|
|
8
|
+
i[l].push(e), s[l] += n?.width ?? e.props.width ?? r;
|
|
9
|
+
let u = 1, d = s[l];
|
|
10
|
+
for (; u < c.length && s[c[u]] < d;) c[u - 1] = c[u], u += 1;
|
|
11
|
+
c[u - 1] = l;
|
|
12
|
+
}), i;
|
|
18
13
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return h;
|
|
14
|
+
function i(e, t, n) {
|
|
15
|
+
let r = e.getBoundingClientRect(), i = (r.left + r.right) / 2, a = (r.top + r.bottom) / 2, o = null, s = Infinity;
|
|
16
|
+
for (let r of n) {
|
|
17
|
+
if (!r || r === e) continue;
|
|
18
|
+
let n = r.getBoundingClientRect(), c = (n.left + n.right) / 2, l = (n.top + n.bottom) / 2, u = c - i, d = l - a, f = Math.abs(d) < n.height * .75, p = Math.abs(u) < n.width * .75, m = t === "right" && u > 0 && f || t === "left" && u < 0 && f || t === "down" && d > 0 && p || t === "up" && d < 0 && p, h = Math.hypot(u, d);
|
|
19
|
+
m && h < s && (s = h, o = r);
|
|
20
|
+
}
|
|
21
|
+
return o;
|
|
28
22
|
}
|
|
29
|
-
function
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return r.forEach((m, b) => {
|
|
62
|
-
const R = m.getBoundingClientRect(), C = (R.left + R.right) / 2, A = Math.abs(o - C);
|
|
63
|
-
A < u && (u = A, i = b);
|
|
64
|
-
}), Number((s = r[i]) == null ? void 0 : s.getAttribute("aria-posinset")) - 1;
|
|
65
|
-
}
|
|
66
|
-
return null;
|
|
23
|
+
function a(e, t, n) {
|
|
24
|
+
if (!e.length || t < 0) return null;
|
|
25
|
+
let r = e.length, i = -1, a = -1;
|
|
26
|
+
for (let n = 0; n < r; n++) {
|
|
27
|
+
for (let r = 0; r < e[n].length; r++) {
|
|
28
|
+
let o = e[n][r];
|
|
29
|
+
if (Number(o?.getAttribute("aria-posinset")) - 1 === t) {
|
|
30
|
+
i = n, a = r;
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (i !== -1) break;
|
|
35
|
+
}
|
|
36
|
+
if (i === -1 || a === -1) return null;
|
|
37
|
+
let o = e[i][a].getBoundingClientRect(), s = (o.left + o.right) / 2;
|
|
38
|
+
if (n === "left" && a > 0) return Number(e[i][a - 1]?.getAttribute("aria-posinset")) - 1;
|
|
39
|
+
if (n === "right" && a < e[i].length - 1) return Number(e[i][a + 1]?.getAttribute("aria-posinset")) - 1;
|
|
40
|
+
if (n === "up" && i > 0) {
|
|
41
|
+
let t = e[i - 1], n = 0, r = Infinity;
|
|
42
|
+
return t.forEach((e, t) => {
|
|
43
|
+
let i = e.getBoundingClientRect(), a = (i.left + i.right) / 2, o = Math.abs(s - a);
|
|
44
|
+
o < r && (r = o, n = t);
|
|
45
|
+
}), Number(t[n]?.getAttribute("aria-posinset")) - 1;
|
|
46
|
+
}
|
|
47
|
+
if (n === "down" && i < r - 1) {
|
|
48
|
+
let t = e[i + 1], n = 0, r = Infinity;
|
|
49
|
+
return t.forEach((e, t) => {
|
|
50
|
+
let i = e.getBoundingClientRect(), a = (i.left + i.right) / 2, o = Math.abs(s - a);
|
|
51
|
+
o < r && (r = o, n = t);
|
|
52
|
+
}), Number(t[n]?.getAttribute("aria-posinset")) - 1;
|
|
53
|
+
}
|
|
54
|
+
return null;
|
|
67
55
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return f;
|
|
77
|
-
}
|
|
78
|
-
return null;
|
|
56
|
+
function o(r) {
|
|
57
|
+
let i = t.toArray(r).filter(n).find((t) => t.type === e || t.type === "img");
|
|
58
|
+
if (i) return i;
|
|
59
|
+
for (let i of t.toArray(r)) if (n(i) && i.props && i.props.children) {
|
|
60
|
+
let r = t.toArray(i.props.children).filter(n).find((t) => t.type === e || t.type === "img");
|
|
61
|
+
if (r) return r;
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
79
64
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
Y as findNextFocusableElement,
|
|
83
|
-
S as getHorizontalLayoutRows,
|
|
84
|
-
z as getNextIndexHorizontalFromRows
|
|
85
|
-
};
|
|
65
|
+
//#endregion
|
|
66
|
+
export { o as findImageInChildren, i as findNextFocusableElement, r as getHorizontalLayoutRows, a as getNextIndexHorizontalFromRows };
|
|
@@ -1,144 +1,111 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
enableFallback: !0,
|
|
113
|
-
onLoad: T,
|
|
114
|
-
onError: F
|
|
115
|
-
}) : n)
|
|
116
|
-
}
|
|
117
|
-
),
|
|
118
|
-
/* @__PURE__ */ b(
|
|
119
|
-
K,
|
|
120
|
-
{
|
|
121
|
-
borderRadius: 0,
|
|
122
|
-
inlineCSS: {
|
|
123
|
-
position: "absolute",
|
|
124
|
-
top: 0,
|
|
125
|
-
left: 0,
|
|
126
|
-
width: "100%",
|
|
127
|
-
height: "100%",
|
|
128
|
-
opacity: m ? 0 : 1,
|
|
129
|
-
transition: "opacity 0.3s",
|
|
130
|
-
pointerEvents: m ? "none" : void 0
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
)
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
]
|
|
138
|
-
}
|
|
139
|
-
);
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
export {
|
|
143
|
-
a as default
|
|
144
|
-
};
|
|
1
|
+
import e from "../../../hooks/useIsomorphicLayoutEffect/index.mjs";
|
|
2
|
+
import t from "../../Image/index.mjs";
|
|
3
|
+
import { findImageInChildren as n } from "../Masonry.utils.mjs";
|
|
4
|
+
import { Children as r, cloneElement as i, forwardRef as a, isValidElement as o, useEffect as s, useImperativeHandle as c, useMemo as l, useRef as u, useState as d } from "react";
|
|
5
|
+
import { Flexbox as f, Skeleton as p } from "@dotss/ui";
|
|
6
|
+
import m from "@dotss/ui/core/useTheme";
|
|
7
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
8
|
+
//#region shared/components/Masonry/MasonryBlock/MasonryBlock.tsx
|
|
9
|
+
var _ = a(({ children: a, width: _ = 0, height: v = 0, spacing: y = 2, borderRadius: b = 0, direction: x = "vertical", setInnerRef: S, sourceMetadataMap: C, onLoad: w, onManualLoad: T, ...E }, D) => {
|
|
10
|
+
let { spacing: O } = m(), k = l(() => n(a)?.props?.src ?? "", [a]), A = C?.get(k), [j, M] = d(A?.width ?? _ ?? 0), [N, P] = d(A?.height ?? v ?? 0), [F, I] = d(!1), L = u(null), R = !k || !!k && F;
|
|
11
|
+
c(D, () => L.current);
|
|
12
|
+
let z = (e) => {
|
|
13
|
+
e.propertyName !== "padding-top" && e.propertyName !== "padding-left" || I(!0);
|
|
14
|
+
}, B = () => I(!0);
|
|
15
|
+
return e(() => {
|
|
16
|
+
if (!A?.loaded && L.current && k) {
|
|
17
|
+
let e = L.current.querySelector("img");
|
|
18
|
+
if (!e || !e.complete) return;
|
|
19
|
+
let { naturalWidth: t, naturalHeight: n, src: r } = e;
|
|
20
|
+
T?.(t, n, r);
|
|
21
|
+
}
|
|
22
|
+
}, [
|
|
23
|
+
k,
|
|
24
|
+
A?.loaded,
|
|
25
|
+
T
|
|
26
|
+
]), s(() => {
|
|
27
|
+
M(A?.width ?? _ ?? 0), P(A?.height ?? v ?? 0);
|
|
28
|
+
}, [
|
|
29
|
+
_,
|
|
30
|
+
v,
|
|
31
|
+
A?.width,
|
|
32
|
+
A?.height
|
|
33
|
+
]), s(() => {
|
|
34
|
+
if (!A?.loaded || A?.width !== j || A?.height !== N) return;
|
|
35
|
+
let e = setTimeout(() => I(!0), 300);
|
|
36
|
+
return () => clearTimeout(e);
|
|
37
|
+
}, [
|
|
38
|
+
A,
|
|
39
|
+
j,
|
|
40
|
+
N
|
|
41
|
+
]), s(() => {
|
|
42
|
+
S?.(L.current);
|
|
43
|
+
}, [S]), /* @__PURE__ */ g(f, {
|
|
44
|
+
ref: L,
|
|
45
|
+
flexDirection: "column",
|
|
46
|
+
...E,
|
|
47
|
+
inlineCSS: {
|
|
48
|
+
contain: "content",
|
|
49
|
+
transform: "translate3d(0, 0, 0)",
|
|
50
|
+
breakInside: "avoid",
|
|
51
|
+
...E?.inlineCSS
|
|
52
|
+
},
|
|
53
|
+
children: [x === "vertical" && /* @__PURE__ */ h(f, { inlineCSS: { minHeight: O.content(y) } }), /* @__PURE__ */ g(f, {
|
|
54
|
+
onTransitionEnd: z,
|
|
55
|
+
inlineCSS: {
|
|
56
|
+
position: "relative",
|
|
57
|
+
overflow: "hidden",
|
|
58
|
+
scrollbarWidth: "none",
|
|
59
|
+
borderRadius: b,
|
|
60
|
+
"&::-webkit-scrollbar": { display: "none" },
|
|
61
|
+
...E?.inlineCSS
|
|
62
|
+
},
|
|
63
|
+
style: x === "vertical" ? {
|
|
64
|
+
paddingTop: `calc(${N / j} * 100%)`,
|
|
65
|
+
transition: "padding-top 0.3s"
|
|
66
|
+
} : {
|
|
67
|
+
paddingLeft: j,
|
|
68
|
+
paddingTop: N,
|
|
69
|
+
transition: "padding-top 0.3s, padding-left 0.3s"
|
|
70
|
+
},
|
|
71
|
+
children: [/* @__PURE__ */ h(f, {
|
|
72
|
+
inlineCSS: {
|
|
73
|
+
position: "absolute",
|
|
74
|
+
top: 0,
|
|
75
|
+
left: 0,
|
|
76
|
+
width: "100%",
|
|
77
|
+
height: "100%",
|
|
78
|
+
opacity: +!!R,
|
|
79
|
+
transition: "opacity 0.3s"
|
|
80
|
+
},
|
|
81
|
+
style: { borderRadius: b > 0 ? b : 0 },
|
|
82
|
+
children: r.toArray(a).filter(o).map((e) => e.type === t || e.type === "img" ? i(e, {
|
|
83
|
+
width: A?.originWidth,
|
|
84
|
+
draggable: !1,
|
|
85
|
+
style: {
|
|
86
|
+
objectFit: "cover",
|
|
87
|
+
...e.props.style
|
|
88
|
+
},
|
|
89
|
+
...e.props,
|
|
90
|
+
enableFallback: !0,
|
|
91
|
+
onLoad: w,
|
|
92
|
+
onError: B
|
|
93
|
+
}) : e)
|
|
94
|
+
}), /* @__PURE__ */ h(p, {
|
|
95
|
+
borderRadius: 0,
|
|
96
|
+
inlineCSS: {
|
|
97
|
+
position: "absolute",
|
|
98
|
+
top: 0,
|
|
99
|
+
left: 0,
|
|
100
|
+
width: "100%",
|
|
101
|
+
height: "100%",
|
|
102
|
+
opacity: +!R,
|
|
103
|
+
transition: "opacity 0.3s",
|
|
104
|
+
pointerEvents: R ? "none" : void 0
|
|
105
|
+
}
|
|
106
|
+
})]
|
|
107
|
+
})]
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
//#endregion
|
|
111
|
+
export { _ as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import e from "./MasonryBlock.mjs";
|
|
2
|
+
//#region shared/components/Masonry/MasonryBlock/index.ts
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
1
|
+
import e from "./MasonryBlock/index.mjs";
|
|
2
|
+
import t from "./Masonry.mjs";
|
|
3
|
+
//#region shared/components/Masonry/index.ts
|
|
4
|
+
var n = t;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as MasonryBlock, n as default };
|
|
@@ -1,70 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
inlineCSS: {
|
|
54
|
-
position: "absolute",
|
|
55
|
-
top: "50%",
|
|
56
|
-
left: "50%",
|
|
57
|
-
transform: "translate(-50%, -50%)",
|
|
58
|
-
opacity: r ? 0 : 1,
|
|
59
|
-
transition: "opacity 0.3s"
|
|
60
|
-
},
|
|
61
|
-
children: l
|
|
62
|
-
}
|
|
63
|
-
)
|
|
64
|
-
]
|
|
65
|
-
}
|
|
66
|
-
);
|
|
1
|
+
import e from "../../Image/index.mjs";
|
|
2
|
+
import t from "../../Swiper/SwiperBlock/index.mjs";
|
|
3
|
+
import { Children as n, cloneElement as r, isValidElement as i, useState as a } from "react";
|
|
4
|
+
import { Flexbox as o } from "@dotss/ui";
|
|
5
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
//#region shared/components/MediaDialog/MediaBlock/MediaBlock.tsx
|
|
7
|
+
function l({ children: l, fallback: u, imageProps: d, ...f }) {
|
|
8
|
+
let [p, m] = a(!1), h = () => m(!0);
|
|
9
|
+
return /* @__PURE__ */ c(t, {
|
|
10
|
+
...f,
|
|
11
|
+
inlineCSS: {
|
|
12
|
+
"& > div:nth-of-type(1)": { zIndex: 1 },
|
|
13
|
+
...f?.inlineCSS
|
|
14
|
+
},
|
|
15
|
+
children: [n.toArray(l).filter(i).map((t) => t.type === e || t.type === "img" ? r(t, {
|
|
16
|
+
...d,
|
|
17
|
+
onLoad: h,
|
|
18
|
+
disabledResizing: !0,
|
|
19
|
+
draggable: !1,
|
|
20
|
+
wrapperProps: {
|
|
21
|
+
...d?.wrapperProps,
|
|
22
|
+
...t.props.wrapperProps,
|
|
23
|
+
inlineCSS: {
|
|
24
|
+
overflow: "visible",
|
|
25
|
+
margin: "0 auto",
|
|
26
|
+
...d?.wrapperProps?.inlineCSS,
|
|
27
|
+
...t.props.wrapperProps?.inlineCSS
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
style: {
|
|
31
|
+
position: "static",
|
|
32
|
+
maxWidth: "100%",
|
|
33
|
+
objectFit: "contain",
|
|
34
|
+
transform: "translate3d(0, 0, 0) scale(1)",
|
|
35
|
+
zIndex: 1,
|
|
36
|
+
...d?.style,
|
|
37
|
+
...t.props.style
|
|
38
|
+
},
|
|
39
|
+
...t.props
|
|
40
|
+
}) : t), !p && /* @__PURE__ */ s(o, {
|
|
41
|
+
"aria-busy": !0,
|
|
42
|
+
inlineCSS: {
|
|
43
|
+
position: "absolute",
|
|
44
|
+
top: "50%",
|
|
45
|
+
left: "50%",
|
|
46
|
+
transform: "translate(-50%, -50%)",
|
|
47
|
+
opacity: +!p,
|
|
48
|
+
transition: "opacity 0.3s"
|
|
49
|
+
},
|
|
50
|
+
children: u
|
|
51
|
+
})]
|
|
52
|
+
});
|
|
67
53
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
};
|
|
54
|
+
//#endregion
|
|
55
|
+
export { l as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import e from "./MediaBlock.mjs";
|
|
2
|
+
//#region shared/components/MediaDialog/MediaBlock/index.ts
|
|
3
|
+
var t = e;
|
|
4
|
+
//#endregion
|
|
5
|
+
export { t as default };
|