@dotss/tictoccroc 0.4.2 → 0.6.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.d.ts +3 -0
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +12 -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,211 +1,185 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Flexbox as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
tabIndex: t === te ? 0 : -1,
|
|
184
|
-
"aria-roledescription": "slide",
|
|
185
|
-
"aria-label": `${x}개 중 ${t + 1}번째 슬라이드`,
|
|
186
|
-
"aria-posinset": t + 1,
|
|
187
|
-
"aria-setsize": x,
|
|
188
|
-
onKeyDown: ce(e.props.onKeyDown),
|
|
189
|
-
onFocus: ae(e.props.onFocus),
|
|
190
|
-
...e.props,
|
|
191
|
-
style: {
|
|
192
|
-
...(n = e.props) == null ? void 0 : n.style,
|
|
193
|
-
gridRow: `${t % a + 1} / ${t % a + 1}`
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
)
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
|
-
)
|
|
202
|
-
}
|
|
203
|
-
),
|
|
204
|
-
typeof $ == "function" && $({ page: l, totalPages: w, onChange: oe })
|
|
205
|
-
]
|
|
206
|
-
}
|
|
207
|
-
);
|
|
1
|
+
import e from "./CarouselSlide/index.mjs";
|
|
2
|
+
import { Children as t, cloneElement as n, isValidElement as r, useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
3
|
+
import { Flexbox as c } from "@dotss/ui";
|
|
4
|
+
import l from "@dotss/ui/core/useTheme";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
|
+
//#region shared/components/Carousel/Carousel.tsx
|
|
7
|
+
var f = 5;
|
|
8
|
+
function p({ children: p, spacing: m = 2, edgeSpacing: h = 4, rowCount: g = 2, step: _ = 1, renderPagination: v, ...y }) {
|
|
9
|
+
let { spacing: b } = l(), [x, S] = s(1), [C, w] = s(1), [T, E] = s(0), D = o(null), O = o(null), k = o(null), A = o(0), j = o(0), M = o(0), N = o(!1), P = o(!0), F = o(0), I = b.content(m), L = b.content(h), R = t.toArray(p).filter(r).filter((t) => t.type === e), z = R.length, B = (e, t) => {
|
|
10
|
+
A.current = e, j.current = t;
|
|
11
|
+
}, V = () => {
|
|
12
|
+
if (!O.current || !N.current) return;
|
|
13
|
+
let e = (k.current?.offsetWidth || 0) * .01, t = -M.current >= e && x + 1 <= C, n = -M.current <= -e && x - 1 >= 1, r = Math.abs(M.current) >= f;
|
|
14
|
+
N.current = !1, P.current = !r, M.current = 0;
|
|
15
|
+
let i = x;
|
|
16
|
+
t ? i = x + 1 : n && (i = x - 1), O.current.style.transition = "transform 0.2s", O.current.style.cursor = "grab", H(i);
|
|
17
|
+
}, H = i((e, t = 0) => {
|
|
18
|
+
if (!O.current) return;
|
|
19
|
+
S(e);
|
|
20
|
+
let n = e === 1, r = e === C, i = (D.current?.offsetWidth || 0) - L, a = (k.current?.children[0]?.clientWidth || 0) + I, o = (i - a * Math.floor(i / a) - I) / 2, s = a * (e - 1) - o;
|
|
21
|
+
n ? O.current.style.transform = `translate3d(${t}px, 0, 0)` : r ? O.current.style.transform = `translate3d(${-(s - o) + t}px, 0, 0)` : O.current.style.transform = `translate3d(${-s + t}px, 0, 0)`;
|
|
22
|
+
}, [
|
|
23
|
+
L,
|
|
24
|
+
I,
|
|
25
|
+
C
|
|
26
|
+
]), U = (e) => B(e.touches[0].clientX, e.touches[0].clientY), W = (e) => {
|
|
27
|
+
N.current = !0, B(e.clientX, e.clientY);
|
|
28
|
+
}, G = (e) => {
|
|
29
|
+
O.current && (O.current.style.transition = "transform 0.2s", O.current.style.cursor = "grab", H(e));
|
|
30
|
+
}, K = (e) => (t) => {
|
|
31
|
+
t.stopPropagation();
|
|
32
|
+
let n = Array.from(k.current?.children || []).indexOf(t.currentTarget), r = (D.current?.offsetWidth || 0) - L * 2, i = (k.current?.children[0]?.clientWidth || 0) + I, a = Math.floor(r / (i / _)) * g, o = (x - 1) * a, s = o + a - 1, c = k.current?.children.length || 0, l = n % g, u = Math.floor(n / g), d = n;
|
|
33
|
+
switch (t.key) {
|
|
34
|
+
case "ArrowRight": {
|
|
35
|
+
t.preventDefault();
|
|
36
|
+
let e = (u + 1) * g + l;
|
|
37
|
+
e < c && (d = e);
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
case "ArrowLeft": {
|
|
41
|
+
t.preventDefault();
|
|
42
|
+
let e = (u - 1) * g + l;
|
|
43
|
+
e >= 0 && (d = e);
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
case "ArrowDown": {
|
|
47
|
+
t.preventDefault();
|
|
48
|
+
let e = n + 1;
|
|
49
|
+
e < c && e % g > l && (d = e);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case "ArrowUp": {
|
|
53
|
+
t.preventDefault();
|
|
54
|
+
let e = n - 1;
|
|
55
|
+
e >= 0 && e % g < l && (d = e);
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
case "Enter":
|
|
59
|
+
case " ":
|
|
60
|
+
t.preventDefault(), t.currentTarget.click();
|
|
61
|
+
return;
|
|
62
|
+
default: return;
|
|
63
|
+
}
|
|
64
|
+
if (d >= o && d <= s) {
|
|
65
|
+
(k.current?.children[d])?.focus();
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
d >= 0 && d < c && (F.current = requestAnimationFrame(() => {
|
|
69
|
+
(k.current?.children[d])?.focus();
|
|
70
|
+
})), e?.(t);
|
|
71
|
+
}, q = (e) => {
|
|
72
|
+
e.propertyName === "transform" && (P.current = !0);
|
|
73
|
+
}, J = (e) => (t) => {
|
|
74
|
+
E(Number(t.currentTarget.getAttribute("aria-posinset")) - 1), e?.(t);
|
|
75
|
+
};
|
|
76
|
+
return a(() => {
|
|
77
|
+
let e = () => H(x);
|
|
78
|
+
return e(), window.addEventListener("resize", e), () => {
|
|
79
|
+
window.removeEventListener("resize", e);
|
|
80
|
+
};
|
|
81
|
+
}, [H, x]), a(() => {
|
|
82
|
+
let e = () => {
|
|
83
|
+
let e = (D.current?.offsetWidth || 0) - L * 2, t = (k.current?.children[0]?.clientWidth || 0) + I, n = Math.floor(e / (t / _)), r = Math.ceil(z / (g || 1)), i = Math.max(r - (n - 1), 1);
|
|
84
|
+
S((e) => e > i ? i : e), w(i);
|
|
85
|
+
};
|
|
86
|
+
return e(), window.addEventListener("resize", e), () => {
|
|
87
|
+
window.removeEventListener("resize", e);
|
|
88
|
+
};
|
|
89
|
+
}, [
|
|
90
|
+
L,
|
|
91
|
+
I,
|
|
92
|
+
z,
|
|
93
|
+
_,
|
|
94
|
+
g,
|
|
95
|
+
p
|
|
96
|
+
]), a(() => {
|
|
97
|
+
let e = O.current, t = (t, n, r) => {
|
|
98
|
+
if (!e || C <= 1) return;
|
|
99
|
+
e.style.transition = "none", e.style.cursor = "grabbing", M.current = t - A.current;
|
|
100
|
+
let i = n - j.current;
|
|
101
|
+
N.current = N.current || Math.abs(M.current) > 5 && Math.abs(i) < 10, N.current && (r.cancelable && (r.stopPropagation(), r.preventDefault()), e.style.transition = "none", e.style.cursor = "grabbing", H(x, M.current));
|
|
102
|
+
}, n = (e) => t(e.touches[0].clientX, e.touches[0].clientY, e), r = (e) => {
|
|
103
|
+
N.current && t(e.clientX, e.clientY, e);
|
|
104
|
+
};
|
|
105
|
+
return e && (e.addEventListener("mousemove", r), e.addEventListener("touchmove", n)), () => {
|
|
106
|
+
e && (e.removeEventListener("mousemove", r), e.removeEventListener("touchmove", n));
|
|
107
|
+
};
|
|
108
|
+
}, [
|
|
109
|
+
H,
|
|
110
|
+
x,
|
|
111
|
+
C
|
|
112
|
+
]), a(() => () => {
|
|
113
|
+
F.current && cancelAnimationFrame(F.current);
|
|
114
|
+
}, []), a(() => {
|
|
115
|
+
let e = k.current, t = (e) => {
|
|
116
|
+
P.current || (e.stopPropagation(), e.preventDefault());
|
|
117
|
+
};
|
|
118
|
+
return e?.addEventListener("click", t), () => {
|
|
119
|
+
e?.removeEventListener("click", t);
|
|
120
|
+
};
|
|
121
|
+
}, []), /* @__PURE__ */ d(c, {
|
|
122
|
+
flexDirection: "column",
|
|
123
|
+
role: "list",
|
|
124
|
+
"aria-roledescription": "carousel",
|
|
125
|
+
"aria-label": "슬라이더",
|
|
126
|
+
flexGrow: 1,
|
|
127
|
+
...y,
|
|
128
|
+
inlineCSS: {
|
|
129
|
+
width: "100%",
|
|
130
|
+
...y?.inlineCSS
|
|
131
|
+
},
|
|
132
|
+
children: [/* @__PURE__ */ u(c, {
|
|
133
|
+
ref: D,
|
|
134
|
+
inlineCSS: { overflow: "hidden" },
|
|
135
|
+
children: /* @__PURE__ */ u(c, {
|
|
136
|
+
ref: O,
|
|
137
|
+
onMouseDown: W,
|
|
138
|
+
onMouseUp: V,
|
|
139
|
+
onMouseLeave: V,
|
|
140
|
+
onTouchStart: U,
|
|
141
|
+
onTouchEnd: V,
|
|
142
|
+
onTouchCancel: V,
|
|
143
|
+
onTransitionEnd: q,
|
|
144
|
+
inlineCSS: {
|
|
145
|
+
gap: I,
|
|
146
|
+
paddingLeft: L,
|
|
147
|
+
paddingRight: L,
|
|
148
|
+
transition: "transform 0.2s",
|
|
149
|
+
transform: "translate3d(0, 0, 0)",
|
|
150
|
+
cursor: "grab"
|
|
151
|
+
},
|
|
152
|
+
children: /* @__PURE__ */ u(c, {
|
|
153
|
+
ref: k,
|
|
154
|
+
inlineCSS: {
|
|
155
|
+
gap: I,
|
|
156
|
+
display: "grid",
|
|
157
|
+
gridTemplateRows: "min-content",
|
|
158
|
+
transform: "translate3d(0, 0, 0)"
|
|
159
|
+
},
|
|
160
|
+
children: t.map(R, (e, t) => n(e, {
|
|
161
|
+
role: "listitem",
|
|
162
|
+
tabIndex: t === T ? 0 : -1,
|
|
163
|
+
"aria-roledescription": "slide",
|
|
164
|
+
"aria-label": `${z}개 중 ${t + 1}번째 슬라이드`,
|
|
165
|
+
"aria-posinset": t + 1,
|
|
166
|
+
"aria-setsize": z,
|
|
167
|
+
onKeyDown: K(e.props.onKeyDown),
|
|
168
|
+
onFocus: J(e.props.onFocus),
|
|
169
|
+
...e.props,
|
|
170
|
+
style: {
|
|
171
|
+
...e.props?.style,
|
|
172
|
+
gridRow: `${t % g + 1} / ${t % g + 1}`
|
|
173
|
+
}
|
|
174
|
+
}))
|
|
175
|
+
})
|
|
176
|
+
})
|
|
177
|
+
}), typeof v == "function" && v({
|
|
178
|
+
page: x,
|
|
179
|
+
totalPages: C,
|
|
180
|
+
onChange: G
|
|
181
|
+
})]
|
|
182
|
+
});
|
|
208
183
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
};
|
|
184
|
+
//#endregion
|
|
185
|
+
export { p as default };
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Flexbox as e } from "@dotss/ui";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region shared/components/Carousel/CarouselSlide/CarouselSlide.tsx
|
|
4
|
+
function n({ children: n, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t(e, {
|
|
6
|
+
...r,
|
|
7
|
+
children: n
|
|
8
|
+
});
|
|
5
9
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as default };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import e from "./CarouselSlide.mjs";
|
|
2
|
+
//#region shared/components/Carousel/CarouselSlide/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 "./CarouselSlide/index.mjs";
|
|
2
|
+
import t from "./Carousel.mjs";
|
|
3
|
+
//#region shared/components/Carousel/index.ts
|
|
4
|
+
var n = t;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { e as CarouselSlide, n as default };
|