@dotss/tictoccroc 0.11.1 → 0.12.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/index.mjs +100 -96
- package/dist/parent/b2b/components/ActionButtons/ActionButtons.mjs +5 -5
- package/dist/shared/components/Carousel/Carousel.mjs +104 -98
- package/dist/shared/components/Carousel/Carousel.utils.d.ts +8 -0
- package/dist/shared/components/Carousel/Carousel.utils.mjs +12 -0
- package/dist/shared/components/Carousel/Carousel.utils.test.d.ts +1 -0
- package/dist/shared/components/Image/Image.d.ts +1 -0
- package/dist/shared/components/Image/Image.mjs +102 -97
- package/dist/shared/components/Swiper/Swiper.mjs +137 -136
- package/dist/shared/components/Swiper/Swiper.utils.d.ts +10 -0
- package/dist/shared/components/Swiper/Swiper.utils.mjs +13 -2
- package/dist/shared/components/Swiper/Swiper.utils.test.d.ts +1 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.d.ts +18 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.mjs +9 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/getHoverChildrenScaleStyle.test.d.ts +1 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/index.d.ts +2 -0
- package/dist/shared/utils/getHoverChildrenScaleStyle/index.mjs +5 -0
- package/dist/shared/utils/index.d.ts +1 -0
- package/dist/shared/utils/index.mjs +2 -1
- package/dist/teacher/home/components/Carousel1Account/Carousel1Account.mjs +12 -12
- package/dist/teacher/home/components/Carousel2Account/Carousel2Account.mjs +14 -14
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.d.ts +21 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.mjs +202 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.d.ts +15 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.mjs +175 -0
- package/dist/teacher/profile/components/KokTeacherCard/index.d.ts +4 -0
- package/dist/teacher/profile/components/KokTeacherCard/index.mjs +6 -0
- package/dist/teacher/profile/components/ProfileSummary/index.d.ts +1 -0
- package/dist/teacher/profile/components/ProfileSummary/index.mjs +4 -3
- package/dist/teacher/profile/components/index.d.ts +2 -0
- package/dist/teacher/profile/components/index.mjs +27 -24
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4,106 +4,110 @@ import n from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffec
|
|
|
4
4
|
import r from "./shared/utils/getImageUrl/index.mjs";
|
|
5
5
|
import i from "./shared/components/Image/Image.error.mjs";
|
|
6
6
|
import a from "./shared/components/Image/index.mjs";
|
|
7
|
-
import o from "./teacher/profile/components/ProfileSummary/
|
|
8
|
-
import s from "./teacher/profile/components/
|
|
9
|
-
import c from "./teacher/profile/components/StatBadgeCollection/index.mjs";
|
|
10
|
-
import l from "./
|
|
11
|
-
import u from "./shared/
|
|
12
|
-
import d from "./shared/
|
|
13
|
-
import f from "./
|
|
14
|
-
import p from "./
|
|
15
|
-
import m from "./
|
|
16
|
-
import h from "./teacher/profile/components/
|
|
17
|
-
import g from "./teacher/profile/components/CertificateSection/index.mjs";
|
|
18
|
-
import _ from "./teacher/profile/components/
|
|
19
|
-
import v from "./teacher/profile/components/CareerSection/index.mjs";
|
|
20
|
-
import y from "./teacher/profile/components/
|
|
21
|
-
import b from "./teacher/profile/components/EducationSection/index.mjs";
|
|
22
|
-
import x from "./teacher/profile/components/
|
|
23
|
-
import
|
|
24
|
-
import C from "./teacher/profile/components/PreferredAgeGroup/
|
|
25
|
-
import
|
|
26
|
-
import T from "./teacher/profile/components/AbilityCollection/
|
|
27
|
-
import E from "./teacher/profile/components/AbilityCollection/index.mjs";
|
|
28
|
-
import D from "./
|
|
29
|
-
import O from "./shared/
|
|
30
|
-
import k from "./shared/utils/
|
|
31
|
-
import A from "./shared/utils/
|
|
32
|
-
import
|
|
33
|
-
import M from "./shared/components/Scheduler/
|
|
34
|
-
import N from "./shared/components/Scheduler/index.mjs";
|
|
35
|
-
import P from "./
|
|
36
|
-
import F from "./
|
|
37
|
-
import I from "./shared/
|
|
38
|
-
import L from "./
|
|
39
|
-
import R from "./
|
|
40
|
-
import z from "./
|
|
41
|
-
import
|
|
42
|
-
import V from "./teacher/profile/components/ParentReviewSection/
|
|
43
|
-
import H from "./teacher/profile/components/ParentReviewSection/index.mjs";
|
|
7
|
+
import { getLastActiveText as o } from "./teacher/profile/components/ProfileSummary/ProfileSummary.utils.mjs";
|
|
8
|
+
import s from "./teacher/profile/components/ProfileSummary/index.mjs";
|
|
9
|
+
import c from "./teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs";
|
|
10
|
+
import l from "./teacher/profile/components/StatBadgeCollection/index.mjs";
|
|
11
|
+
import u from "./shared/components/Masonry/MasonryBlock/index.mjs";
|
|
12
|
+
import d from "./shared/utils/combineRef/index.mjs";
|
|
13
|
+
import f from "./shared/hooks/useCombineRef/useCombineRef.mjs";
|
|
14
|
+
import p from "./teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs";
|
|
15
|
+
import m from "./shared/components/Masonry/index.mjs";
|
|
16
|
+
import h from "./teacher/profile/components/ActivityGallery/index.mjs";
|
|
17
|
+
import g from "./teacher/profile/components/CertificateSection/CertificateItem/index.mjs";
|
|
18
|
+
import _ from "./teacher/profile/components/CertificateSection/index.mjs";
|
|
19
|
+
import v from "./teacher/profile/components/CareerSection/CareerItem/index.mjs";
|
|
20
|
+
import y from "./teacher/profile/components/CareerSection/index.mjs";
|
|
21
|
+
import b from "./teacher/profile/components/EducationSection/EducationItem/index.mjs";
|
|
22
|
+
import x from "./teacher/profile/components/EducationSection/index.mjs";
|
|
23
|
+
import S from "./teacher/profile/components/PreferredActivityKeywordGroup/index.mjs";
|
|
24
|
+
import { getPreferredAgeKeywords as C } from "./teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs";
|
|
25
|
+
import w from "./teacher/profile/components/PreferredAgeGroup/index.mjs";
|
|
26
|
+
import { getAbilityCollection as T } from "./teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs";
|
|
27
|
+
import E from "./teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs";
|
|
28
|
+
import D from "./teacher/profile/components/AbilityCollection/index.mjs";
|
|
29
|
+
import O from "./shared/components/Scheduler/ScheduleEvent/index.mjs";
|
|
30
|
+
import k from "./shared/utils/dayFlagToDay/index.mjs";
|
|
31
|
+
import A from "./shared/utils/getDateRange/index.mjs";
|
|
32
|
+
import j from "./shared/utils/getTimeRange/index.mjs";
|
|
33
|
+
import { getAvailableDateRange as M } from "./shared/components/Scheduler/Scheduler.utils.mjs";
|
|
34
|
+
import N from "./shared/components/Scheduler/ScheduleBlock/index.mjs";
|
|
35
|
+
import P from "./shared/components/Scheduler/index.mjs";
|
|
36
|
+
import F from "./teacher/profile/components/AvailableScheduleSection/index.mjs";
|
|
37
|
+
import I from "./shared/components/Roller/RollerBlock/index.mjs";
|
|
38
|
+
import L from "./shared/utils/birthDateToAge/index.mjs";
|
|
39
|
+
import R from "./teacher/profile/components/CareNoteSection/CareNote/index.mjs";
|
|
40
|
+
import z from "./shared/components/Roller/index.mjs";
|
|
41
|
+
import B from "./teacher/profile/components/CareNoteSection/index.mjs";
|
|
42
|
+
import { getChildLabel as V } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
|
|
43
|
+
import H from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs";
|
|
44
|
+
import U from "./teacher/profile/components/ParentReviewSection/index.mjs";
|
|
45
|
+
import { getBadgeLabel as W, getCareActivityLabel as G, getChargeLabel as K, getNote as q, getPictureLabel as J, getStrengthLabel as Y } from "./teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.mjs";
|
|
46
|
+
import X from "./teacher/profile/components/KokTeacherCard/index.mjs";
|
|
44
47
|
import "./teacher/profile/components/index.mjs";
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
48
|
+
import Z from "./shared/components/LoadingAnnouncer/index.mjs";
|
|
49
|
+
import Q from "./teacher/home/components/TextAccount/TextAccount.fallback.mjs";
|
|
50
|
+
import $ from "./teacher/home/components/TextAccount/index.mjs";
|
|
51
|
+
import ee from "./shared/components/Carousel/CarouselSlide/index.mjs";
|
|
52
|
+
import te from "./shared/components/Carousel/index.mjs";
|
|
53
|
+
import ne from "./teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs";
|
|
54
|
+
import re from "./teacher/home/components/Carousel1Account/index.mjs";
|
|
55
|
+
import ie from "./teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs";
|
|
56
|
+
import ae from "./teacher/home/components/Carousel2Account/index.mjs";
|
|
57
|
+
import oe from "./shared/components/Swiper/SwiperBlock/index.mjs";
|
|
58
|
+
import se from "./shared/components/MediaDialog/MediaBlock/index.mjs";
|
|
59
|
+
import ce from "./shared/components/Swiper/index.mjs";
|
|
60
|
+
import le from "./teacher/home/components/BannerAccount/BannerAccount.fallback.mjs";
|
|
61
|
+
import ue from "./teacher/home/components/BannerAccount/index.mjs";
|
|
62
|
+
import de from "./teacher/home/components/SingleAccount/SingleAccount.fallback.mjs";
|
|
63
|
+
import fe from "./teacher/home/components/SingleAccount/index.mjs";
|
|
61
64
|
import "./teacher/home/components/index.mjs";
|
|
62
|
-
import
|
|
65
|
+
import pe from "./parent/notification/utils/sanitize/sanitize.mjs";
|
|
63
66
|
import "./parent/notification/utils/index.mjs";
|
|
64
|
-
import
|
|
67
|
+
import me from "./parent/notification/components/NotificationCard/index.mjs";
|
|
65
68
|
import "./parent/notification/components/index.mjs";
|
|
66
|
-
import { t as
|
|
69
|
+
import { t as he } from "./convertMdToHtml-Bmk0brLK.js";
|
|
67
70
|
import "./parent/b2b/utils/index.mjs";
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import { isSuccess as
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import { getMessageLabel as
|
|
84
|
-
import
|
|
85
|
-
import { getImageMessageLabel as
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import { getSystemMessageLabel as
|
|
89
|
-
import
|
|
90
|
-
import { getBotMessageLabel as
|
|
91
|
-
import
|
|
92
|
-
import
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
import
|
|
96
|
-
import
|
|
71
|
+
import ge from "./parent/b2b/components/ActionButtons/index.mjs";
|
|
72
|
+
import _e from "./parent/b2b/components/BottomNotes/index.mjs";
|
|
73
|
+
import ve from "./shared/components/TextField/index.mjs";
|
|
74
|
+
import ye from "./parent/b2b/components/EmployeeNumberField/index.mjs";
|
|
75
|
+
import be from "./parent/b2b/components/NameField/index.mjs";
|
|
76
|
+
import { isSuccess as xe, isValid as Se } from "./parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs";
|
|
77
|
+
import Ce from "./parent/b2b/components/PhoneNumberField/index.mjs";
|
|
78
|
+
import we from "./parent/b2b/components/Title/index.mjs";
|
|
79
|
+
import Te from "./shared/components/MediaDialog/MediaDialogContent/index.mjs";
|
|
80
|
+
import Ee from "./shared/components/MediaDialog/MediaDialogFooter/index.mjs";
|
|
81
|
+
import De from "./shared/components/MediaDialog/MediaDialogToolbar/index.mjs";
|
|
82
|
+
import Oe from "./shared/components/MediaDialog/index.mjs";
|
|
83
|
+
import ke from "./shared/components/TimePicker/index.mjs";
|
|
84
|
+
import Ae from "./shared/components/Calendar/index.mjs";
|
|
85
|
+
import je from "./shared/components/ChatKit/Message/Message.fallback.mjs";
|
|
86
|
+
import { getMessageLabel as Me, markMessageGroupBoundaries as Ne } from "./shared/components/ChatKit/Message/Message.utils.mjs";
|
|
87
|
+
import Pe from "./shared/components/ChatKit/Message/index.mjs";
|
|
88
|
+
import { getImageMessageLabel as Fe, getPhotoAssetMessage as Ie } from "./shared/components/ChatKit/ImageMessage/ImageMessage.utils.mjs";
|
|
89
|
+
import Le from "./shared/components/ChatKit/ImageMessage/index.mjs";
|
|
90
|
+
import Re from "./shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs";
|
|
91
|
+
import { getSystemMessageLabel as ze } from "./shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs";
|
|
92
|
+
import Be from "./shared/components/ChatKit/SystemMessage/index.mjs";
|
|
93
|
+
import { getBotMessageLabel as Ve, getCtaButtonText as He } from "./shared/components/ChatKit/BotMessage/BotMessage.utils.mjs";
|
|
94
|
+
import Ue from "./shared/components/ChatKit/BotMessage/index.mjs";
|
|
95
|
+
import We from "./shared/components/ChatKit/InputBar/InputBar.fallback.mjs";
|
|
96
|
+
import Ge from "./shared/components/ChatKit/InputBar/index.mjs";
|
|
97
|
+
import Ke from "./shared/components/ChatKit/Seperator/index.mjs";
|
|
98
|
+
import qe from "./shared/components/ChatKit/UnreadMessagePill/index.mjs";
|
|
99
|
+
import Je from "./parent/b2b/components/TopLogo/index.mjs";
|
|
97
100
|
import "./parent/b2b/components/index.mjs";
|
|
98
|
-
import
|
|
99
|
-
import
|
|
100
|
-
import
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
104
|
-
import
|
|
105
|
-
import
|
|
106
|
-
import
|
|
107
|
-
import
|
|
101
|
+
import Ye from "./shared/utils/isAndroid/index.mjs";
|
|
102
|
+
import Xe from "./shared/utils/isIos/index.mjs";
|
|
103
|
+
import Ze from "./shared/utils/isApp/index.mjs";
|
|
104
|
+
import Qe from "./shared/utils/isDesktop/index.mjs";
|
|
105
|
+
import $e from "./shared/utils/ageToBirthDate/index.mjs";
|
|
106
|
+
import et from "./shared/utils/objectToQueryString/index.mjs";
|
|
107
|
+
import tt from "./shared/utils/getVimeoId/index.mjs";
|
|
108
|
+
import nt from "./shared/utils/parseQueryString/index.mjs";
|
|
109
|
+
import rt from "./shared/utils/share/index.mjs";
|
|
110
|
+
import it from "./shared/utils/getCareTypeLabel/index.mjs";
|
|
111
|
+
import at from "./shared/utils/getHoverChildrenScaleStyle/index.mjs";
|
|
108
112
|
import "./shared/utils/index.mjs";
|
|
109
|
-
export {
|
|
113
|
+
export { E as AbilityBadge, D as AbilityCollection, ge as ActionButtons, h as ActivityGallery, p as ActivityGalleryItem, F as AvailableScheduleSection, ue as BannerAccount, le as BannerAccountFallback, Ue as BotMessage, _e as BottomNotes, Ae as Calendar, R as CareNote, B as CareNoteSection, v as CareerItem, y as CareerSection, te as Carousel, re as Carousel1Account, ne as Carousel1AccountFallback, ae as Carousel2Account, ie as Carousel2AccountFallback, ee as CarouselSlide, g as CertificateItem, _ as CertificateSection, Re as DirectTradeRiskInfoBottomSheet, b as EducationItem, x as EducationSection, ye as EmployeeNumberField, a as Image, i as ImageError, Le as ImageMessage, Ge as InputBar, We as InputBarFallback, X as KokTeacherCard, Z as LoadingAnnouncer, m as Masonry, u as MasonryBlock, se as MediaBlock, Oe as MediaDialog, Te as MediaDialogContent, Ee as MediaDialogFooter, De as MediaDialogToolbar, Pe as Message, je as MessageFallback, be as NameField, me as NotificationCard, H as ParentReviewCard, U as ParentReviewSection, Ce as PhoneNumberField, S as PreferredActivityKeywordGroup, w as PreferredAgeGroup, s as ProfileSummary, z as Roller, I as RollerBlock, N as ScheduleBlock, O as ScheduleEvent, P as Scheduler, Ke as Seperator, fe as SingleAccount, de as SingleAccountFallback, c as StatBadge, l as StatBadgeCollection, ce as Swiper, oe as SwiperBlock, Be as SystemMessage, $ as TextAccount, Q as TextAccountFallback, ve as TextField, ke as TimePicker, we as Title, Je as TopLogo, qe as UnreadMessagePill, $e as ageToBirthDate, L as birthDateToAge, d as combineRef, he as convertMdToHtml, k as dayFlagToDay, T as getAbilityCollection, M as getAvailableDateRange, W as getBadgeLabel, Ve as getBotMessageLabel, G as getCareActivityLabel, it as getCareTypeLabel, K as getChargeLabel, V as getChildLabel, He as getCtaButtonText, A as getDateRange, at as getHoverChildrenScaleStyle, Fe as getImageMessageLabel, r as getImageUrl, o as getLastActiveText, Me as getMessageLabel, q as getNote, Ie as getPhotoAssetMessage, J as getPictureLabel, C as getPreferredAgeKeywords, Y as getStrengthLabel, ze as getSystemMessageLabel, j as getTimeRange, tt as getVimeoId, Ye as isAndroid, Ze as isApp, Qe as isDesktop, Xe as isIos, t as isServer, xe as isSuccess, Se as isValid, Ne as markMessageGroupBoundaries, et as objectToQueryString, nt as parseQueryString, pe as sanitize, rt as share, f as useCombineRef, e as useInView, n as useIsomorphicLayoutEffect };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import n from "@dotss/ui/
|
|
3
|
-
import r from "@dotss/ui/
|
|
2
|
+
import n from "@dotss/ui/Button";
|
|
3
|
+
import r from "@dotss/ui/Flexbox";
|
|
4
4
|
//#region parent/b2b/components/ActionButtons/ActionButtons.tsx
|
|
5
5
|
function i({ topButtonOnClick: i, bottomButtonOnClick: a, topButtonLabel: o, topButtonProps: s, bottomButtonLabel: c, bottomButtonProps: l, ...u }) {
|
|
6
|
-
return /* @__PURE__ */ t(
|
|
6
|
+
return /* @__PURE__ */ t(r, {
|
|
7
7
|
flexDirection: "column",
|
|
8
8
|
gap: 2,
|
|
9
9
|
inlineCSS: { width: "100%" },
|
|
10
10
|
...u,
|
|
11
|
-
children: [/* @__PURE__ */ e(
|
|
11
|
+
children: [/* @__PURE__ */ e(n, {
|
|
12
12
|
type: "button",
|
|
13
13
|
color: "secondary",
|
|
14
14
|
size: "large",
|
|
15
15
|
onClick: i,
|
|
16
16
|
...s,
|
|
17
17
|
children: o || "인증하기"
|
|
18
|
-
}), /* @__PURE__ */ e(
|
|
18
|
+
}), /* @__PURE__ */ e(n, {
|
|
19
19
|
size: "large",
|
|
20
20
|
onClick: a,
|
|
21
21
|
...l,
|
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import l from "@dotss/ui
|
|
5
|
-
import
|
|
1
|
+
import { getCarouselSwipeDelta as e } from "./Carousel.utils.mjs";
|
|
2
|
+
import t from "./CarouselSlide/index.mjs";
|
|
3
|
+
import { Children as n, cloneElement as r, isValidElement as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
|
|
4
|
+
import { Flexbox as l } from "@dotss/ui";
|
|
5
|
+
import u from "@dotss/ui/core/useTheme";
|
|
6
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
6
7
|
//#region shared/components/Carousel/Carousel.tsx
|
|
7
|
-
var
|
|
8
|
-
function
|
|
9
|
-
let { spacing:
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
if (!
|
|
13
|
-
let e = (
|
|
14
|
-
|
|
15
|
-
let i =
|
|
16
|
-
t ? i =
|
|
17
|
-
},
|
|
18
|
-
if (!
|
|
19
|
-
|
|
20
|
-
let n = e === 1, r = e ===
|
|
21
|
-
n ?
|
|
8
|
+
var p = 5;
|
|
9
|
+
function m({ children: m, spacing: h = 2, edgeSpacing: g = 4, rowCount: _ = 2, step: v = 1, renderPagination: y, ...b }) {
|
|
10
|
+
let { spacing: x } = u(), [S, C] = c(1), [w, T] = c(1), [E, D] = c(0), O = s(null), k = s(null), A = s(null), j = s(0), M = s(0), N = s(0), P = s(!1), F = s(!0), I = s(0), L = x.content(h), R = x.content(g), z = n.toArray(m).filter(i).filter((e) => e.type === t), B = z.length, V = (e, t) => {
|
|
11
|
+
j.current = e, M.current = t;
|
|
12
|
+
}, H = () => {
|
|
13
|
+
if (!k.current || !P.current) return;
|
|
14
|
+
let e = (A.current?.offsetWidth || 0) * .01, t = -N.current >= e && S + 1 <= w, n = -N.current <= -e && S - 1 >= 1, r = Math.abs(N.current) >= p;
|
|
15
|
+
P.current = !1, F.current = !r, N.current = 0;
|
|
16
|
+
let i = S;
|
|
17
|
+
t ? i = S + 1 : n && (i = S - 1), k.current.style.transition = "transform 0.2s", k.current.style.cursor = "grab", U(i);
|
|
18
|
+
}, U = a((e, t = 0) => {
|
|
19
|
+
if (!k.current) return;
|
|
20
|
+
C(e);
|
|
21
|
+
let n = e === 1, r = e === w, i = (O.current?.offsetWidth || 0) - R, a = (A.current?.children[0]?.clientWidth || 0) + L, o = (i - a * Math.floor(i / a) - L) / 2, s = a * (e - 1) - o;
|
|
22
|
+
n ? k.current.style.transform = `translate3d(${t}px, 0, 0)` : r ? k.current.style.transform = `translate3d(${-(s - o) + t}px, 0, 0)` : k.current.style.transform = `translate3d(${-s + t}px, 0, 0)`;
|
|
22
23
|
}, [
|
|
24
|
+
R,
|
|
23
25
|
L,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}, K = (e) => (t) => {
|
|
26
|
+
w
|
|
27
|
+
]), W = (e) => V(e.touches[0].clientX, e.touches[0].clientY), G = (e) => {
|
|
28
|
+
P.current = !0, V(e.clientX, e.clientY);
|
|
29
|
+
}, K = (e) => {
|
|
30
|
+
k.current && (k.current.style.transition = "transform 0.2s", k.current.style.cursor = "grab", U(e));
|
|
31
|
+
}, q = (e) => (t) => {
|
|
31
32
|
t.stopPropagation();
|
|
32
|
-
let n = Array.from(
|
|
33
|
+
let n = Array.from(A.current?.children || []).indexOf(t.currentTarget), r = (O.current?.offsetWidth || 0) - R * 2, i = (A.current?.children[0]?.clientWidth || 0) + L, a = Math.floor(r / (i / v)) * _, o = (S - 1) * a, s = o + a - 1, c = A.current?.children.length || 0, l = n % _, u = Math.floor(n / _), d = n;
|
|
33
34
|
switch (t.key) {
|
|
34
35
|
case "ArrowRight": {
|
|
35
36
|
t.preventDefault();
|
|
36
|
-
let e = (u + 1) *
|
|
37
|
+
let e = (u + 1) * _ + l;
|
|
37
38
|
e < c && (d = e);
|
|
38
39
|
break;
|
|
39
40
|
}
|
|
40
41
|
case "ArrowLeft": {
|
|
41
42
|
t.preventDefault();
|
|
42
|
-
let e = (u - 1) *
|
|
43
|
+
let e = (u - 1) * _ + l;
|
|
43
44
|
e >= 0 && (d = e);
|
|
44
45
|
break;
|
|
45
46
|
}
|
|
46
47
|
case "ArrowDown": {
|
|
47
48
|
t.preventDefault();
|
|
48
49
|
let e = n + 1;
|
|
49
|
-
e < c && e %
|
|
50
|
+
e < c && e % _ > l && (d = e);
|
|
50
51
|
break;
|
|
51
52
|
}
|
|
52
53
|
case "ArrowUp": {
|
|
53
54
|
t.preventDefault();
|
|
54
55
|
let e = n - 1;
|
|
55
|
-
e >= 0 && e %
|
|
56
|
+
e >= 0 && e % _ < l && (d = e);
|
|
56
57
|
break;
|
|
57
58
|
}
|
|
58
59
|
case "Enter":
|
|
@@ -62,124 +63,129 @@ function p({ children: p, spacing: m = 2, edgeSpacing: h = 4, rowCount: g = 2, s
|
|
|
62
63
|
default: return;
|
|
63
64
|
}
|
|
64
65
|
if (d >= o && d <= s) {
|
|
65
|
-
(
|
|
66
|
+
(A.current?.children[d])?.focus();
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
|
-
d >= 0 && d < c && (
|
|
69
|
-
(
|
|
69
|
+
d >= 0 && d < c && (I.current = requestAnimationFrame(() => {
|
|
70
|
+
(A.current?.children[d])?.focus();
|
|
70
71
|
})), e?.(t);
|
|
71
|
-
},
|
|
72
|
-
e.propertyName === "transform" && (
|
|
73
|
-
},
|
|
74
|
-
|
|
72
|
+
}, J = (e) => {
|
|
73
|
+
e.propertyName === "transform" && (F.current = !0);
|
|
74
|
+
}, Y = (e) => (t) => {
|
|
75
|
+
D(Number(t.currentTarget.getAttribute("aria-posinset")) - 1), e?.(t);
|
|
75
76
|
};
|
|
76
|
-
return
|
|
77
|
-
let e = () =>
|
|
77
|
+
return o(() => {
|
|
78
|
+
let e = () => U(S);
|
|
78
79
|
return e(), window.addEventListener("resize", e), () => {
|
|
79
80
|
window.removeEventListener("resize", e);
|
|
80
81
|
};
|
|
81
|
-
}, [
|
|
82
|
+
}, [U, S]), o(() => {
|
|
82
83
|
let e = () => {
|
|
83
|
-
let e = (
|
|
84
|
-
|
|
84
|
+
let e = (O.current?.offsetWidth || 0) - R * 2, t = (A.current?.children[0]?.clientWidth || 0) + L, n = Math.floor(e / (t / v)), r = Math.ceil(B / (_ || 1)), i = Math.max(r - (n - 1), 1);
|
|
85
|
+
C((e) => e > i ? i : e), T(i);
|
|
85
86
|
};
|
|
86
87
|
return e(), window.addEventListener("resize", e), () => {
|
|
87
88
|
window.removeEventListener("resize", e);
|
|
88
89
|
};
|
|
89
90
|
}, [
|
|
91
|
+
R,
|
|
90
92
|
L,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
+
B,
|
|
94
|
+
v,
|
|
93
95
|
_,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
m
|
|
97
|
+
]), o(() => {
|
|
98
|
+
let t = k.current, n = (n, r, i) => {
|
|
99
|
+
if (!t || w <= 1) return;
|
|
100
|
+
t.style.transition = "none", t.style.cursor = "grabbing", N.current = n - j.current;
|
|
101
|
+
let a = r - M.current;
|
|
102
|
+
P.current = P.current || Math.abs(N.current) > 5 && Math.abs(a) < 10, P.current && (i.cancelable && (i.stopPropagation(), i.preventDefault()), t.style.transition = "none", t.style.cursor = "grabbing", U(S, e({
|
|
103
|
+
fingerDeltaX: N.current,
|
|
104
|
+
page: S,
|
|
105
|
+
totalPages: w,
|
|
106
|
+
width: O.current?.offsetWidth ?? 0
|
|
107
|
+
})));
|
|
108
|
+
}, r = (e) => n(e.touches[0].clientX, e.touches[0].clientY, e), i = (e) => {
|
|
109
|
+
P.current && n(e.clientX, e.clientY, e);
|
|
104
110
|
};
|
|
105
|
-
return
|
|
106
|
-
|
|
111
|
+
return t && (t.addEventListener("mousemove", i), t.addEventListener("touchmove", r)), () => {
|
|
112
|
+
t && (t.removeEventListener("mousemove", i), t.removeEventListener("touchmove", r));
|
|
107
113
|
};
|
|
108
114
|
}, [
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
]),
|
|
113
|
-
|
|
114
|
-
}, []),
|
|
115
|
-
let e =
|
|
116
|
-
|
|
115
|
+
U,
|
|
116
|
+
S,
|
|
117
|
+
w
|
|
118
|
+
]), o(() => () => {
|
|
119
|
+
I.current && cancelAnimationFrame(I.current);
|
|
120
|
+
}, []), o(() => {
|
|
121
|
+
let e = A.current, t = (e) => {
|
|
122
|
+
F.current || (e.stopPropagation(), e.preventDefault());
|
|
117
123
|
};
|
|
118
124
|
return e?.addEventListener("click", t), () => {
|
|
119
125
|
e?.removeEventListener("click", t);
|
|
120
126
|
};
|
|
121
|
-
}, []), /* @__PURE__ */
|
|
127
|
+
}, []), /* @__PURE__ */ f(l, {
|
|
122
128
|
flexDirection: "column",
|
|
123
129
|
role: "list",
|
|
124
130
|
"aria-roledescription": "carousel",
|
|
125
131
|
"aria-label": "슬라이더",
|
|
126
132
|
flexGrow: 1,
|
|
127
|
-
...
|
|
133
|
+
...b,
|
|
128
134
|
inlineCSS: {
|
|
129
135
|
width: "100%",
|
|
130
|
-
...
|
|
136
|
+
...b?.inlineCSS
|
|
131
137
|
},
|
|
132
|
-
children: [/* @__PURE__ */
|
|
133
|
-
ref:
|
|
138
|
+
children: [/* @__PURE__ */ d(l, {
|
|
139
|
+
ref: O,
|
|
134
140
|
inlineCSS: { overflow: "hidden" },
|
|
135
|
-
children: /* @__PURE__ */
|
|
136
|
-
ref:
|
|
137
|
-
onMouseDown:
|
|
138
|
-
onMouseUp:
|
|
139
|
-
onMouseLeave:
|
|
140
|
-
onTouchStart:
|
|
141
|
-
onTouchEnd:
|
|
142
|
-
onTouchCancel:
|
|
143
|
-
onTransitionEnd:
|
|
141
|
+
children: /* @__PURE__ */ d(l, {
|
|
142
|
+
ref: k,
|
|
143
|
+
onMouseDown: G,
|
|
144
|
+
onMouseUp: H,
|
|
145
|
+
onMouseLeave: H,
|
|
146
|
+
onTouchStart: W,
|
|
147
|
+
onTouchEnd: H,
|
|
148
|
+
onTouchCancel: H,
|
|
149
|
+
onTransitionEnd: J,
|
|
144
150
|
inlineCSS: {
|
|
145
|
-
gap:
|
|
146
|
-
paddingLeft:
|
|
147
|
-
paddingRight:
|
|
151
|
+
gap: L,
|
|
152
|
+
paddingLeft: R,
|
|
153
|
+
paddingRight: R,
|
|
148
154
|
transition: "transform 0.2s",
|
|
149
155
|
transform: "translate3d(0, 0, 0)",
|
|
150
156
|
cursor: "grab"
|
|
151
157
|
},
|
|
152
|
-
children: /* @__PURE__ */
|
|
153
|
-
ref:
|
|
158
|
+
children: /* @__PURE__ */ d(l, {
|
|
159
|
+
ref: A,
|
|
154
160
|
inlineCSS: {
|
|
155
|
-
gap:
|
|
161
|
+
gap: L,
|
|
156
162
|
display: "grid",
|
|
157
163
|
gridTemplateRows: "min-content",
|
|
158
164
|
transform: "translate3d(0, 0, 0)"
|
|
159
165
|
},
|
|
160
|
-
children:
|
|
166
|
+
children: n.map(z, (e, t) => r(e, {
|
|
161
167
|
role: "listitem",
|
|
162
|
-
tabIndex: t ===
|
|
168
|
+
tabIndex: t === E ? 0 : -1,
|
|
163
169
|
"aria-roledescription": "slide",
|
|
164
|
-
"aria-label": `${
|
|
170
|
+
"aria-label": `${B}개 중 ${t + 1}번째 슬라이드`,
|
|
165
171
|
"aria-posinset": t + 1,
|
|
166
|
-
"aria-setsize":
|
|
167
|
-
onKeyDown:
|
|
168
|
-
onFocus:
|
|
172
|
+
"aria-setsize": B,
|
|
173
|
+
onKeyDown: q(e.props.onKeyDown),
|
|
174
|
+
onFocus: Y(e.props.onFocus),
|
|
169
175
|
...e.props,
|
|
170
176
|
style: {
|
|
171
177
|
...e.props?.style,
|
|
172
|
-
gridRow: `${t %
|
|
178
|
+
gridRow: `${t % _ + 1} / ${t % _ + 1}`
|
|
173
179
|
}
|
|
174
180
|
}))
|
|
175
181
|
})
|
|
176
182
|
})
|
|
177
|
-
}), typeof
|
|
178
|
-
page:
|
|
179
|
-
totalPages:
|
|
180
|
-
onChange:
|
|
183
|
+
}), typeof y == "function" && y({
|
|
184
|
+
page: S,
|
|
185
|
+
totalPages: w,
|
|
186
|
+
onChange: K
|
|
181
187
|
})]
|
|
182
188
|
});
|
|
183
189
|
}
|
|
184
190
|
//#endregion
|
|
185
|
-
export {
|
|
191
|
+
export { m as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const EDGE_RESISTANCE = 0.55;
|
|
2
|
+
export declare function addDamping(distance: number, maxDistance: number, constant?: number): number;
|
|
3
|
+
export declare function getCarouselSwipeDelta({ fingerDeltaX, page, totalPages, width }: {
|
|
4
|
+
fingerDeltaX: number;
|
|
5
|
+
page: number;
|
|
6
|
+
totalPages: number;
|
|
7
|
+
width: number;
|
|
8
|
+
}): number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region shared/components/Carousel/Carousel.utils.tsx
|
|
2
|
+
var e = .55;
|
|
3
|
+
function t(t, n, r = e) {
|
|
4
|
+
if (t === 0 || n <= 0) return 0;
|
|
5
|
+
let i = Math.abs(t), a = i * n * r / (n + r * i);
|
|
6
|
+
return Math.sign(t) * a;
|
|
7
|
+
}
|
|
8
|
+
function n({ fingerDeltaX: e, page: n, totalPages: r, width: i }) {
|
|
9
|
+
return !(n === 1 && e > 0) && !(n === r && e < 0) ? e : t(e, i);
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as EDGE_RESISTANCE, t as addDamping, n as getCarouselSwipeDelta };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,6 +21,7 @@ export interface ImageProps extends Omit<HTMLProps<HTMLImageElement>, 'onError'>
|
|
|
21
21
|
enableFallback?: boolean;
|
|
22
22
|
enableErrorFallback?: boolean;
|
|
23
23
|
renderErrorFallback?: () => ReactNode;
|
|
24
|
+
enableHoverScale?: boolean;
|
|
24
25
|
}
|
|
25
26
|
declare const Image: import('react').ForwardRefExoticComponent<Omit<ImageProps, "ref"> & import('react').RefAttributes<HTMLImageElement>>;
|
|
26
27
|
export default Image;
|