@dotss/tictoccroc 0.0.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.
Files changed (155) hide show
  1. package/dist/index.d.ts +3 -0
  2. package/dist/index.mjs +54 -0
  3. package/dist/shared/components/Calendar/Calendar.d.ts +10 -0
  4. package/dist/shared/components/Calendar/Calendar.mjs +80 -0
  5. package/dist/shared/components/Calendar/index.d.ts +2 -0
  6. package/dist/shared/components/Calendar/index.mjs +4 -0
  7. package/dist/shared/components/Carousel/Carousel.d.ts +16 -0
  8. package/dist/shared/components/Carousel/Carousel.mjs +205 -0
  9. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.d.ts +4 -0
  10. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +8 -0
  11. package/dist/shared/components/Carousel/CarouselSlide/index.d.ts +3 -0
  12. package/dist/shared/components/Carousel/CarouselSlide/index.mjs +4 -0
  13. package/dist/shared/components/Carousel/index.d.ts +4 -0
  14. package/dist/shared/components/Carousel/index.mjs +6 -0
  15. package/dist/shared/components/Image/Image.d.ts +20 -0
  16. package/dist/shared/components/Image/Image.mjs +181 -0
  17. package/dist/shared/components/Image/index.d.ts +3 -0
  18. package/dist/shared/components/Image/index.mjs +4 -0
  19. package/dist/shared/components/ImageZoomDialog/ImageBlock/ImageBlock.d.ts +8 -0
  20. package/dist/shared/components/ImageZoomDialog/ImageBlock/ImageBlock.mjs +50 -0
  21. package/dist/shared/components/ImageZoomDialog/ImageBlock/index.d.ts +2 -0
  22. package/dist/shared/components/ImageZoomDialog/ImageBlock/index.mjs +4 -0
  23. package/dist/shared/components/ImageZoomDialog/ImageZoomDialog.d.ts +16 -0
  24. package/dist/shared/components/ImageZoomDialog/ImageZoomDialog.mjs +344 -0
  25. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogContent/ImageZoomDialogContent.d.ts +3 -0
  26. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogContent/ImageZoomDialogContent.mjs +23 -0
  27. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogContent/index.d.ts +2 -0
  28. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogContent/index.mjs +4 -0
  29. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogFooter/ImageZoomDialogFooter.d.ts +3 -0
  30. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogFooter/ImageZoomDialogFooter.mjs +28 -0
  31. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogFooter/index.d.ts +2 -0
  32. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogFooter/index.mjs +4 -0
  33. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogToolbar/ImageZoomDialogToolbar.d.ts +3 -0
  34. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogToolbar/ImageZoomDialogToolbar.mjs +22 -0
  35. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogToolbar/index.d.ts +2 -0
  36. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogToolbar/index.mjs +4 -0
  37. package/dist/shared/components/ImageZoomDialog/index.d.ts +6 -0
  38. package/dist/shared/components/ImageZoomDialog/index.mjs +10 -0
  39. package/dist/shared/components/Roller/Roller.d.ts +9 -0
  40. package/dist/shared/components/Roller/Roller.mjs +122 -0
  41. package/dist/shared/components/Roller/RollerBlock/RollerBlock.d.ts +4 -0
  42. package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +8 -0
  43. package/dist/shared/components/Roller/RollerBlock/index.d.ts +3 -0
  44. package/dist/shared/components/Roller/RollerBlock/index.mjs +4 -0
  45. package/dist/shared/components/Roller/index.d.ts +4 -0
  46. package/dist/shared/components/Roller/index.mjs +6 -0
  47. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.d.ts +7 -0
  48. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +31 -0
  49. package/dist/shared/components/Scheduler/ScheduleBlock/index.d.ts +3 -0
  50. package/dist/shared/components/Scheduler/ScheduleBlock/index.mjs +4 -0
  51. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.d.ts +9 -0
  52. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +36 -0
  53. package/dist/shared/components/Scheduler/ScheduleEvent/index.d.ts +3 -0
  54. package/dist/shared/components/Scheduler/ScheduleEvent/index.mjs +4 -0
  55. package/dist/shared/components/Scheduler/Scheduler.d.ts +15 -0
  56. package/dist/shared/components/Scheduler/Scheduler.mjs +552 -0
  57. package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +32 -0
  58. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +92 -0
  59. package/dist/shared/components/Scheduler/index.d.ts +6 -0
  60. package/dist/shared/components/Scheduler/index.mjs +10 -0
  61. package/dist/shared/components/Swiper/Swiper.d.ts +25 -0
  62. package/dist/shared/components/Swiper/Swiper.mjs +274 -0
  63. package/dist/shared/components/Swiper/Swiper.utils.d.ts +13 -0
  64. package/dist/shared/components/Swiper/Swiper.utils.mjs +25 -0
  65. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.d.ts +4 -0
  66. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +19 -0
  67. package/dist/shared/components/Swiper/SwiperBlock/index.d.ts +3 -0
  68. package/dist/shared/components/Swiper/SwiperBlock/index.mjs +4 -0
  69. package/dist/shared/components/Swiper/index.d.ts +4 -0
  70. package/dist/shared/components/Swiper/index.mjs +6 -0
  71. package/dist/shared/components/TimePicker/TimePicker.d.ts +23 -0
  72. package/dist/shared/components/TimePicker/TimePicker.mjs +122 -0
  73. package/dist/shared/components/TimePicker/index.d.ts +3 -0
  74. package/dist/shared/components/TimePicker/index.mjs +4 -0
  75. package/dist/shared/components/index.d.ts +7 -0
  76. package/dist/shared/components/index.mjs +30 -0
  77. package/dist/shared/hooks/index.d.ts +1 -0
  78. package/dist/shared/hooks/index.mjs +4 -0
  79. package/dist/shared/hooks/useIsomorphicLayoutEffect/index.d.ts +2 -0
  80. package/dist/shared/hooks/useIsomorphicLayoutEffect/index.mjs +4 -0
  81. package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.d.ts +3 -0
  82. package/dist/shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs +6 -0
  83. package/dist/shared/utils/birthDateToAge/birthDateToAge.d.ts +1 -0
  84. package/dist/shared/utils/birthDateToAge/birthDateToAge.mjs +11 -0
  85. package/dist/shared/utils/birthDateToAge/birthDateToAge.test.d.ts +1 -0
  86. package/dist/shared/utils/birthDateToAge/birthDateToAge.test.mjs +12 -0
  87. package/dist/shared/utils/birthDateToAge/index.d.ts +2 -0
  88. package/dist/shared/utils/birthDateToAge/index.mjs +4 -0
  89. package/dist/shared/utils/getDateRange/getDateRange.d.ts +11 -0
  90. package/dist/shared/utils/getDateRange/getDateRange.mjs +21 -0
  91. package/dist/shared/utils/getDateRange/getDateRange.test.d.ts +1 -0
  92. package/dist/shared/utils/getDateRange/getDateRange.test.mjs +61 -0
  93. package/dist/shared/utils/getDateRange/index.d.ts +2 -0
  94. package/dist/shared/utils/getDateRange/index.mjs +4 -0
  95. package/dist/shared/utils/getImageUrl/getImageUrl.d.ts +3 -0
  96. package/dist/shared/utils/getImageUrl/getImageUrl.mjs +17 -0
  97. package/dist/shared/utils/getImageUrl/getImageUrl.test.d.ts +1 -0
  98. package/dist/shared/utils/getImageUrl/getImageUrl.test.mjs +28 -0
  99. package/dist/shared/utils/getImageUrl/index.d.ts +3 -0
  100. package/dist/shared/utils/getImageUrl/index.mjs +6 -0
  101. package/dist/shared/utils/getTimeRange/getTimeRange.d.ts +12 -0
  102. package/dist/shared/utils/getTimeRange/getTimeRange.mjs +22 -0
  103. package/dist/shared/utils/getTimeRange/getTimeRange.test.d.ts +1 -0
  104. package/dist/shared/utils/getTimeRange/getTimeRange.test.mjs +76 -0
  105. package/dist/shared/utils/getTimeRange/index.d.ts +2 -0
  106. package/dist/shared/utils/getTimeRange/index.mjs +4 -0
  107. package/dist/shared/utils/getVimeoId/getVimeoId.d.ts +1 -0
  108. package/dist/shared/utils/getVimeoId/getVimeoId.mjs +12 -0
  109. package/dist/shared/utils/getVimeoId/getVimeoId.test.d.ts +1 -0
  110. package/dist/shared/utils/getVimeoId/getVimeoId.test.mjs +15 -0
  111. package/dist/shared/utils/getVimeoId/index.d.ts +2 -0
  112. package/dist/shared/utils/getVimeoId/index.mjs +4 -0
  113. package/dist/shared/utils/index.d.ts +11 -0
  114. package/dist/shared/utils/index.mjs +24 -0
  115. package/dist/shared/utils/isAndroid/index.d.ts +2 -0
  116. package/dist/shared/utils/isAndroid/index.mjs +4 -0
  117. package/dist/shared/utils/isAndroid/isAndroid.d.ts +1 -0
  118. package/dist/shared/utils/isAndroid/isAndroid.mjs +6 -0
  119. package/dist/shared/utils/isAndroid/isAndroid.test.d.ts +1 -0
  120. package/dist/shared/utils/isAndroid/isAndroid.test.mjs +13 -0
  121. package/dist/shared/utils/isApp/index.d.ts +2 -0
  122. package/dist/shared/utils/isApp/index.mjs +4 -0
  123. package/dist/shared/utils/isApp/isApp.d.ts +1 -0
  124. package/dist/shared/utils/isApp/isApp.mjs +6 -0
  125. package/dist/shared/utils/isApp/isApp.test.d.ts +1 -0
  126. package/dist/shared/utils/isApp/isApp.test.mjs +23 -0
  127. package/dist/shared/utils/isDesktop/index.d.ts +2 -0
  128. package/dist/shared/utils/isDesktop/index.mjs +4 -0
  129. package/dist/shared/utils/isDesktop/isDesktop.d.ts +1 -0
  130. package/dist/shared/utils/isDesktop/isDesktop.mjs +16 -0
  131. package/dist/shared/utils/isDesktop/isDesktop.test.d.ts +1 -0
  132. package/dist/shared/utils/isDesktop/isDesktop.test.mjs +11 -0
  133. package/dist/shared/utils/isServer/index.d.ts +2 -0
  134. package/dist/shared/utils/isServer/index.mjs +4 -0
  135. package/dist/shared/utils/isServer/isServer.d.ts +1 -0
  136. package/dist/shared/utils/isServer/isServer.mjs +6 -0
  137. package/dist/shared/utils/isServer/isServer.test.d.ts +1 -0
  138. package/dist/shared/utils/isServer/isServer.test.mjs +13 -0
  139. package/dist/shared/utils/objectToQueryString/index.d.ts +2 -0
  140. package/dist/shared/utils/objectToQueryString/index.mjs +4 -0
  141. package/dist/shared/utils/objectToQueryString/objectToQueryString.d.ts +1 -0
  142. package/dist/shared/utils/objectToQueryString/objectToQueryString.mjs +9 -0
  143. package/dist/shared/utils/objectToQueryString/objectToQueryString.test.d.ts +1 -0
  144. package/dist/shared/utils/objectToQueryString/objectToQueryString.test.mjs +11 -0
  145. package/dist/shared/utils/parseQueryString/index.d.ts +2 -0
  146. package/dist/shared/utils/parseQueryString/index.mjs +4 -0
  147. package/dist/shared/utils/parseQueryString/parseQueryString.d.ts +4 -0
  148. package/dist/shared/utils/parseQueryString/parseQueryString.mjs +6 -0
  149. package/dist/shared/utils/parseQueryString/parseQueryString.test.d.ts +1 -0
  150. package/dist/shared/utils/parseQueryString/parseQueryString.test.mjs +16 -0
  151. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.d.ts +2 -0
  152. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +8 -0
  153. package/dist/teacher/profile/components/ProfileSummary/index.d.ts +2 -0
  154. package/dist/teacher/profile/components/ProfileSummary/index.mjs +4 -0
  155. package/package.json +100 -0
@@ -0,0 +1,3 @@
1
+ export * from './shared/components';
2
+ export * from './shared/hooks';
3
+ export * from './shared/utils';
package/dist/index.mjs ADDED
@@ -0,0 +1,54 @@
1
+ import "./shared/components/Scheduler/Scheduler.mjs";
2
+ import { default as d } from "./shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs";
3
+ import { default as g } from "./shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs";
4
+ import { getAvailableDateRange as c } from "./shared/components/Scheduler/Scheduler.utils.mjs";
5
+ import "react/jsx-runtime";
6
+ import "react";
7
+ import "@thedotscorp/ui/core/useTheme";
8
+ import "@thedotscorp/ui/Dialog";
9
+ import "@thedotscorp/ui/Flexbox";
10
+ import "@thedotscorp/ui/Typography";
11
+ import "./shared/components/Image/Image.mjs";
12
+ import "@thedotscorp/ui";
13
+ import { default as S } from "./shared/components/Swiper/SwiperBlock/SwiperBlock.mjs";
14
+ import { default as b } from "./shared/components/ImageZoomDialog/ImageZoomDialogContent/ImageZoomDialogContent.mjs";
15
+ import { default as k } from "./shared/components/ImageZoomDialog/ImageZoomDialogFooter/ImageZoomDialogFooter.mjs";
16
+ import { default as R } from "./shared/components/ImageZoomDialog/ImageZoomDialogToolbar/ImageZoomDialogToolbar.mjs";
17
+ import { default as v } from "./shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
18
+ import "./shared/components/TimePicker/TimePicker.mjs";
19
+ import { default as B } from "./shared/components/Roller/RollerBlock/RollerBlock.mjs";
20
+ import { default as C } from "./shared/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
21
+ import { default as Q } from "./shared/utils/getImageUrl/getImageUrl.mjs";
22
+ import { default as w } from "./shared/utils/isServer/isServer.mjs";
23
+ import { default as L } from "./shared/utils/getTimeRange/getTimeRange.mjs";
24
+ import { default as V } from "./shared/utils/getDateRange/getDateRange.mjs";
25
+ import { default as z } from "./shared/utils/isAndroid/isAndroid.mjs";
26
+ import { default as H } from "./shared/utils/isApp/isApp.mjs";
27
+ import { default as K } from "./shared/utils/isDesktop/isDesktop.mjs";
28
+ import { default as N } from "./shared/utils/birthDateToAge/birthDateToAge.mjs";
29
+ import { default as P } from "./shared/utils/objectToQueryString/objectToQueryString.mjs";
30
+ import { default as X } from "./shared/utils/getVimeoId/getVimeoId.mjs";
31
+ import { default as _ } from "./shared/utils/parseQueryString/parseQueryString.mjs";
32
+ export {
33
+ v as CarouselSlide,
34
+ b as ImageZoomDialogContent,
35
+ k as ImageZoomDialogFooter,
36
+ R as ImageZoomDialogToolbar,
37
+ B as RollerBlock,
38
+ g as ScheduleBlock,
39
+ d as ScheduleEvent,
40
+ S as SwiperBlock,
41
+ N as birthDateToAge,
42
+ c as getAvailableDateRange,
43
+ V as getDateRange,
44
+ Q as getImageUrl,
45
+ L as getTimeRange,
46
+ X as getVimeoId,
47
+ z as isAndroid,
48
+ H as isApp,
49
+ K as isDesktop,
50
+ w as isServer,
51
+ P as objectToQueryString,
52
+ _ as parseQueryString,
53
+ C as useIsomorphicLayoutEffect
54
+ };
@@ -0,0 +1,10 @@
1
+ import { DatePickerProps, DateValue } from 'node_modules/@thedotscorp/ui/DatePicker/DatePicker';
2
+ import { FlexboxProps } from 'node_modules/@thedotscorp/ui/Flexbox/Flexbox';
3
+ export interface CalendarProps extends Omit<FlexboxProps, 'onChange' | 'value'>, Pick<DatePickerProps, 'onChange' | 'value'> {
4
+ startDate?: DateValue;
5
+ endDate?: DateValue;
6
+ weekHeadInlineCSS?: FlexboxProps['inlineCSS'];
7
+ datePickerProps?: Omit<DatePickerProps, 'onChange' | 'value' | 'date'>;
8
+ }
9
+ declare const Calendar: import('react').ForwardRefExoticComponent<Omit<CalendarProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
10
+ export default Calendar;
@@ -0,0 +1,80 @@
1
+ import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
+ import { forwardRef as f } from "react";
3
+ import u from "@thedotscorp/ui/DatePicker";
4
+ import x from "../../utils/getDateRange/getDateRange.mjs";
5
+ import t from "@emotion/styled";
6
+ const $ = t.div`
7
+ display: flex;
8
+ flex-direction: column;
9
+ `, b = t.div`
10
+ position: sticky;
11
+ top: 0;
12
+ display: flex;
13
+ align-items: center;
14
+ padding: 0 ${({ theme: { spacing: e } }) => e.content(4)}px;
15
+ background-color: ${({
16
+ theme: {
17
+ palette: { grey: e }
18
+ }
19
+ }) => e.white};
20
+ border-bottom: 1px solid
21
+ ${({
22
+ theme: {
23
+ palette: { grey: e }
24
+ }
25
+ }) => e[10]};
26
+ z-index: 1;
27
+
28
+ & > span {
29
+ margin: 9.5px 0;
30
+ flex-grow: 1;
31
+ text-align: center;
32
+ ${({
33
+ theme: {
34
+ palette: { grey: e },
35
+ typography: { b4M: r }
36
+ }
37
+ }) => ({
38
+ fontSize: r.size,
39
+ fontWeight: r.weight,
40
+ lineHeight: r.lineHeight,
41
+ letterSpacing: r.letterSpacing,
42
+ color: e[50]
43
+ })};
44
+ }
45
+ `, y = t.div`
46
+ display: flex;
47
+ flex-direction: column;
48
+ gap: ${({ theme: { spacing: e } }) => e.content(6)}px;
49
+ padding: ${({ theme: { spacing: e } }) => e.content(5)}px
50
+ ${({ theme: { spacing: e } }) => e.content(4)}px;
51
+ `, S = f(function({ startDate: r, endDate: o, onChange: i, value: c, weekHeadInlineCSS: d, datePickerProps: p, inlineCSS: h, ...m }, s) {
52
+ const g = x(r, o, {
53
+ format: "YYYY-MM"
54
+ }).map((a) => new Date(a.value));
55
+ return /* @__PURE__ */ n($, { ref: s, role: "group", "aria-label": "날짜 선택", ...m, css: h, children: [
56
+ /* @__PURE__ */ n(b, { css: d, role: "row", children: [
57
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "일요일", children: "일" }),
58
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "월요일", children: "월" }),
59
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "화요일", children: "화" }),
60
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "수요일", children: "수" }),
61
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "목요일", children: "목" }),
62
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "금요일", children: "금" }),
63
+ /* @__PURE__ */ l("span", { role: "columnheader", "aria-label": "토요일", children: "토" })
64
+ ] }),
65
+ /* @__PURE__ */ l(y, { children: g.map((a) => /* @__PURE__ */ l(
66
+ u,
67
+ {
68
+ ...p,
69
+ date: a,
70
+ onChange: i,
71
+ value: c,
72
+ "aria-label": `${a.getFullYear()}년 ${a.getMonth() + 1}월 달력`
73
+ },
74
+ `calendar-date-picker-${a.getFullYear()}-${a.getMonth()}`
75
+ )) })
76
+ ] });
77
+ });
78
+ export {
79
+ S as default
80
+ };
@@ -0,0 +1,2 @@
1
+ import { default as Calendar } from './Calendar';
2
+ export default Calendar;
@@ -0,0 +1,4 @@
1
+ import r from "./Calendar.mjs";
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+ import { FlexboxProps } from 'node_modules/@thedotscorp/ui/Flexbox/Flexbox';
3
+ export interface CarouselPaginationProps {
4
+ page: number;
5
+ totalPages: number;
6
+ onChange: (value: number) => void;
7
+ }
8
+ export interface CarouselProps extends FlexboxProps {
9
+ spacing?: number;
10
+ edgeSpacing?: number;
11
+ rowCount?: number;
12
+ step?: number;
13
+ renderPagination?: (props: CarouselPaginationProps) => ReactNode;
14
+ }
15
+ declare function Carousel({ children, spacing, edgeSpacing, rowCount, step, renderPagination, ...props }: CarouselProps): import("@emotion/react/jsx-runtime").JSX.Element;
16
+ export default Carousel;
@@ -0,0 +1,205 @@
1
+ import { jsxs as ce, jsx as k } from "react/jsx-runtime";
2
+ import { useState as J, useRef as m, Children as Q, isValidElement as ie, useCallback as ae, useEffect as C, cloneElement as le } from "react";
3
+ import { Flexbox as W } from "@thedotscorp/ui";
4
+ import ue from "@thedotscorp/ui/core/useTheme";
5
+ import fe from "./CarouselSlide/CarouselSlide.mjs";
6
+ function ve({
7
+ children: Z,
8
+ spacing: _ = 2,
9
+ edgeSpacing: K = 4,
10
+ rowCount: a = 2,
11
+ step: x = 1,
12
+ renderPagination: A,
13
+ ...O
14
+ }) {
15
+ const { spacing: z } = ue(), [l, $] = J(1), [w, ee] = J(0), L = m(null), o = m(null), u = m(null), I = m(0), Y = m(0), R = m(0), b = m(!1), T = m(!0), D = m(0), v = z.content(_), y = z.content(K), X = Q.toArray(Z).filter(ie).filter((e) => e.type === fe), M = X.length, F = (e, t) => {
16
+ I.current = e, Y.current = t;
17
+ }, P = () => {
18
+ var s;
19
+ if (!o.current || !b.current) return;
20
+ const e = (((s = u.current) == null ? void 0 : s.offsetWidth) || 0) * 0.01, t = -R.current >= e && l + 1 <= w, r = -R.current <= -e && l - 1 >= 1;
21
+ b.current = !1, T.current = !1, R.current = 0;
22
+ let c = l;
23
+ t ? c = l + 1 : r ? c = l - 1 : T.current = !0, o.current.style.transition = "transform 0.2s", o.current.style.cursor = "grab", S(c);
24
+ }, S = ae(
25
+ (e, t = 0) => {
26
+ var h, g, E;
27
+ if (!o.current) return;
28
+ $(e);
29
+ const r = e === 1, c = e === w, s = (((h = L.current) == null ? void 0 : h.offsetWidth) || 0) - y, f = (((E = (g = u.current) == null ? void 0 : g.children[0]) == null ? void 0 : E.clientWidth) || 0) + v, i = (s - f * Math.floor(s / f) - v) / 2, d = f * (e - 1) - i;
30
+ r ? o.current.style.transform = `translate3d(${t}px, 0, 0)` : c ? o.current.style.transform = `translate3d(${-(d - i) + t}px, 0, 0)` : o.current.style.transform = `translate3d(${-d + t}px, 0, 0)`;
31
+ },
32
+ [y, v, w]
33
+ ), te = (e) => F(e.touches[0].clientX, e.touches[0].clientY), ne = (e) => {
34
+ b.current = !0, F(e.clientX, e.clientY);
35
+ }, re = (e) => {
36
+ o.current && (o.current.style.transition = "transform 0.2s", o.current.style.cursor = "grab", S(e));
37
+ }, se = (e) => (t) => {
38
+ var N, U, q, G, V, B;
39
+ t.stopPropagation();
40
+ const r = Array.from(((N = u.current) == null ? void 0 : N.children) || []).indexOf(t.currentTarget), c = (((U = L.current) == null ? void 0 : U.offsetWidth) || 0) - y * 2, s = (((G = (q = u.current) == null ? void 0 : q.children[0]) == null ? void 0 : G.clientWidth) || 0) + v, i = Math.floor(c / (s / x)) * a, d = (l - 1) * i, h = d + i - 1, g = ((V = u.current) == null ? void 0 : V.children.length) || 0, E = r % a, j = Math.floor(r / a);
41
+ let p = r;
42
+ switch (t.key) {
43
+ case "ArrowRight": {
44
+ t.preventDefault();
45
+ const n = (j + 1) * a + E;
46
+ n < g && (p = n);
47
+ break;
48
+ }
49
+ case "ArrowLeft": {
50
+ t.preventDefault();
51
+ const n = (j - 1) * a + E;
52
+ n >= 0 && (p = n);
53
+ break;
54
+ }
55
+ case "ArrowDown": {
56
+ t.preventDefault();
57
+ const n = r + 1;
58
+ n < g && n % a > E && (p = n);
59
+ break;
60
+ }
61
+ case "ArrowUp": {
62
+ t.preventDefault();
63
+ const n = r - 1;
64
+ n >= 0 && n % a < E && (p = n);
65
+ break;
66
+ }
67
+ case "Enter":
68
+ case " ": {
69
+ t.preventDefault(), t.currentTarget.click();
70
+ return;
71
+ }
72
+ default:
73
+ return;
74
+ }
75
+ if (p >= d && p <= h) {
76
+ const n = (B = u.current) == null ? void 0 : B.children[p];
77
+ n == null || n.focus();
78
+ return;
79
+ }
80
+ p >= 0 && p < g && (D.current = requestAnimationFrame(() => {
81
+ var H;
82
+ const n = (H = u.current) == null ? void 0 : H.children[p];
83
+ n == null || n.focus();
84
+ })), e == null || e(t);
85
+ }, oe = (e) => {
86
+ e.propertyName === "transform" && (T.current = !0);
87
+ };
88
+ return C(() => {
89
+ const e = () => S(l);
90
+ return e(), window.addEventListener("resize", e), () => {
91
+ window.removeEventListener("resize", e);
92
+ };
93
+ }, [S, l]), C(() => {
94
+ const e = () => {
95
+ var i, d, h;
96
+ const t = (((i = L.current) == null ? void 0 : i.offsetWidth) || 0) - y * 2, r = (((h = (d = u.current) == null ? void 0 : d.children[0]) == null ? void 0 : h.clientWidth) || 0) + v, c = Math.floor(t / (r / x)), s = Math.ceil(M / (a || 1)), f = Math.max(s - (c - 1), 1);
97
+ $((g) => g > f ? f : g), ee(f);
98
+ };
99
+ return e(), window.addEventListener("resize", e), () => {
100
+ window.removeEventListener("resize", e);
101
+ };
102
+ }, [y, v, M, x, a]), C(() => {
103
+ const e = o.current, t = (s, f, i) => {
104
+ if (!e || w <= 1) return;
105
+ e.style.transition = "none", e.style.cursor = "grabbing", R.current = s - I.current;
106
+ const d = f - Y.current, h = 5;
107
+ b.current = b.current || Math.abs(R.current) > h && Math.abs(d) < h * 2, b.current && (i.cancelable && (i.stopPropagation(), i.preventDefault()), e.style.transition = "none", e.style.cursor = "grabbing", S(l, R.current));
108
+ }, r = (s) => t(s.touches[0].clientX, s.touches[0].clientY, s), c = (s) => {
109
+ b.current && t(s.clientX, s.clientY, s);
110
+ };
111
+ return e && (e.addEventListener("mousemove", c), e.addEventListener("touchmove", r)), () => {
112
+ e && (e.removeEventListener("mousemove", c), e.removeEventListener("touchmove", r));
113
+ };
114
+ }, [S, l, w]), C(() => () => {
115
+ D.current && cancelAnimationFrame(D.current);
116
+ }, []), C(() => {
117
+ const e = u.current, t = (r) => {
118
+ T.current || r.stopPropagation();
119
+ };
120
+ return e == null || e.addEventListener("click", t), () => {
121
+ e == null || e.removeEventListener("click", t);
122
+ };
123
+ }, []), /* @__PURE__ */ ce(
124
+ W,
125
+ {
126
+ flexDirection: "column",
127
+ role: "group",
128
+ "aria-roledescription": "carousel",
129
+ "aria-label": "슬라이더",
130
+ flexGrow: 1,
131
+ inlineCSS: {
132
+ width: "100%"
133
+ },
134
+ ...O,
135
+ children: [
136
+ /* @__PURE__ */ k(
137
+ W,
138
+ {
139
+ ref: L,
140
+ inlineCSS: {
141
+ overflow: "hidden"
142
+ },
143
+ children: /* @__PURE__ */ k(
144
+ W,
145
+ {
146
+ ref: o,
147
+ onMouseDown: ne,
148
+ onMouseUp: P,
149
+ onMouseLeave: P,
150
+ onTouchStart: te,
151
+ onTouchEnd: P,
152
+ onTouchCancel: P,
153
+ onTransitionEnd: oe,
154
+ inlineCSS: {
155
+ gap: v,
156
+ paddingLeft: y,
157
+ paddingRight: y,
158
+ transition: "transform 0.2s",
159
+ transform: "translate3d(0, 0, 0)",
160
+ cursor: "grab"
161
+ },
162
+ children: /* @__PURE__ */ k(
163
+ W,
164
+ {
165
+ ref: u,
166
+ inlineCSS: {
167
+ gap: v,
168
+ display: "grid",
169
+ gridTemplateRows: "min-content",
170
+ transform: "translate3d(0, 0, 0)"
171
+ },
172
+ children: Q.map(
173
+ X,
174
+ (e, t) => {
175
+ var r;
176
+ return le(e, {
177
+ role: "group",
178
+ tabIndex: 0,
179
+ "aria-roledescription": "slide",
180
+ "aria-label": `${M}개 중 ${t + 1}번째 슬라이드`,
181
+ "aria-posinset": t + 1,
182
+ "aria-setsize": M,
183
+ onKeyDown: se(e.props.onKeyDown),
184
+ ...e.props,
185
+ style: {
186
+ ...(r = e.props) == null ? void 0 : r.style,
187
+ gridRow: `${t % a + 1} / ${t % a + 1}`
188
+ }
189
+ });
190
+ }
191
+ )
192
+ }
193
+ )
194
+ }
195
+ )
196
+ }
197
+ ),
198
+ typeof A == "function" && A({ page: l, totalPages: w, onChange: re })
199
+ ]
200
+ }
201
+ );
202
+ }
203
+ export {
204
+ ve as default
205
+ };
@@ -0,0 +1,4 @@
1
+ import { FlexboxProps } from 'node_modules/@thedotscorp/ui/Flexbox/Flexbox';
2
+ export type CarouselSlideProps = FlexboxProps;
3
+ declare function CarouselSlide({ children, ...props }: CarouselSlideProps): import("@emotion/react/jsx-runtime").JSX.Element;
4
+ export default CarouselSlide;
@@ -0,0 +1,8 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import t from "@thedotscorp/ui/Flexbox";
3
+ function l({ children: o, ...r }) {
4
+ return /* @__PURE__ */ e(t, { ...r, children: o });
5
+ }
6
+ export {
7
+ l as default
8
+ };
@@ -0,0 +1,3 @@
1
+ import { default as CarouselSlide } from './CarouselSlide';
2
+ export type { CarouselSlideProps } from './CarouselSlide';
3
+ export default CarouselSlide;
@@ -0,0 +1,4 @@
1
+ import o from "./CarouselSlide.mjs";
2
+ export {
3
+ o as default
4
+ };
@@ -0,0 +1,4 @@
1
+ import { CarouselProps, default as Carousel } from './Carousel';
2
+ export { default as CarouselSlide, type CarouselSlideProps } from './CarouselSlide';
3
+ export type { CarouselProps };
4
+ export default Carousel;
@@ -0,0 +1,6 @@
1
+ import o from "./Carousel.mjs";
2
+ import { default as l } from "./CarouselSlide/CarouselSlide.mjs";
3
+ export {
4
+ l as CarouselSlide,
5
+ o as default
6
+ };
@@ -0,0 +1,20 @@
1
+ import { HTMLProps } from 'react';
2
+ import { FlexboxProps } from '@thedotscorp/ui/Flexbox/Flexbox';
3
+ export interface ImageProps extends HTMLProps<HTMLImageElement> {
4
+ src: string;
5
+ width?: number;
6
+ height?: number;
7
+ fit?: string;
8
+ position?: string;
9
+ scale?: number;
10
+ lazy?: boolean;
11
+ borderRadius?: number | string;
12
+ alt: string;
13
+ onLazyLoad?: () => void;
14
+ disabledResizing?: boolean;
15
+ withIntrinsicRatio?: boolean;
16
+ wrapperProps?: FlexboxProps;
17
+ enableFallback?: boolean;
18
+ }
19
+ declare const Image: import('react').ForwardRefExoticComponent<Omit<ImageProps, "ref"> & import('react').RefAttributes<HTMLImageElement>>;
20
+ export default Image;
@@ -0,0 +1,181 @@
1
+ import { jsxs as I, jsx as d } from "react/jsx-runtime";
2
+ import { forwardRef as V, useRef as p, useImperativeHandle as _, useState as x, useEffect as T } from "react";
3
+ import W from "@thedotscorp/ui/Flexbox";
4
+ import $ from "@thedotscorp/ui/Skeleton";
5
+ import k from "../../hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.mjs";
6
+ import q from "../../utils/getImageUrl/getImageUrl.mjs";
7
+ const A = 100, X = V(
8
+ ({
9
+ src: H,
10
+ width: t,
11
+ height: o,
12
+ fit: O = "cover",
13
+ position: j = "center",
14
+ alt: y,
15
+ scale: z = 2,
16
+ onLoad: v,
17
+ onLazyLoad: m,
18
+ lazy: S = !1,
19
+ borderRadius: l,
20
+ disabledResizing: B = !1,
21
+ withIntrinsicRatio: L = !1,
22
+ enableFallback: g = !1,
23
+ wrapperProps: s = {},
24
+ ...r
25
+ }, F) => {
26
+ const c = p(null), E = p(!1), a = p(null);
27
+ _(F, () => a.current);
28
+ const [f, R] = x(!1), [C, u] = x(!1), w = q({ src: H, width: t, height: o, fit: O, position: j, scale: z, disabledResizing: B }), h = (e) => {
29
+ u(!0), typeof v == "function" && v(e);
30
+ };
31
+ return T(() => {
32
+ if (S && c.current) {
33
+ const e = c.current, b = () => {
34
+ if (!e) return !1;
35
+ const n = e.getBoundingClientRect();
36
+ return n.bottom >= 0 && n.top <= (window.innerHeight || document.documentElement.clientHeight) + A;
37
+ }, i = () => {
38
+ b() && R(!0);
39
+ }, M = () => {
40
+ var n;
41
+ (n = window.appScreenContent) == null || n.addEventListener("scroll", i), window.addEventListener("resize", i), window.addEventListener("orientationchange", i);
42
+ }, U = () => {
43
+ var n;
44
+ (n = window.appScreenContent) == null || n.removeEventListener("scroll", i), window.removeEventListener("resize", i), window.removeEventListener("orientationchange", i);
45
+ };
46
+ return i(), M(), U;
47
+ }
48
+ }), T(() => {
49
+ typeof m == "function" && f && !E.current && (E.current = !0, m());
50
+ }, [m, f]), k(() => {
51
+ const e = a.current;
52
+ return e != null && e.complete ? (e.style.transition = "none", e.style.opacity = "1", u(!0)) : e && (e.style.transition = "opacity 0.3s", e.style.opacity = "0", e.onload = () => {
53
+ e.style.opacity = "1", u(!0), e.onload = null;
54
+ }), () => {
55
+ e && (e.onload = null);
56
+ };
57
+ }, [f]), S ? /* @__PURE__ */ I(
58
+ W,
59
+ {
60
+ ...s,
61
+ ref: c,
62
+ inlineCSS: L ? {
63
+ position: "relative",
64
+ paddingTop: `calc(100% / ${t} * ${o})`,
65
+ minWidth: "100%",
66
+ borderRadius: l,
67
+ overflow: "hidden",
68
+ ...s.inlineCSS
69
+ } : {
70
+ position: "relative",
71
+ width: t,
72
+ minWidth: t,
73
+ height: o,
74
+ borderRadius: l,
75
+ overflow: "hidden",
76
+ ...s.inlineCSS || {}
77
+ },
78
+ children: [
79
+ g && /* @__PURE__ */ d(
80
+ $,
81
+ {
82
+ width: "100%",
83
+ height: "100%",
84
+ inlineCSS: {
85
+ position: "absolute",
86
+ top: 0,
87
+ left: 0,
88
+ opacity: C ? 0 : 1,
89
+ transition: "opacity 0.3s"
90
+ }
91
+ }
92
+ ),
93
+ f && /* @__PURE__ */ d(
94
+ "img",
95
+ {
96
+ ref: a,
97
+ src: w,
98
+ alt: y,
99
+ width: t,
100
+ height: o,
101
+ onLoad: h,
102
+ ...r,
103
+ style: {
104
+ position: "absolute",
105
+ top: 0,
106
+ left: 0,
107
+ width: "100%",
108
+ height: "100%",
109
+ transition: "opacity 0.3s",
110
+ ...r.style
111
+ }
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ ) : /* @__PURE__ */ I(
117
+ W,
118
+ {
119
+ ...s,
120
+ ref: c,
121
+ inlineCSS: L ? {
122
+ position: "relative",
123
+ paddingTop: `calc(100% / ${t} * ${o})`,
124
+ minWidth: "100%",
125
+ transition: "padding-top 0.2s",
126
+ borderRadius: l,
127
+ overflow: "hidden",
128
+ ...s.inlineCSS
129
+ } : {
130
+ position: "relative",
131
+ width: t,
132
+ minWidth: t,
133
+ height: o,
134
+ borderRadius: l,
135
+ overflow: "hidden",
136
+ ...s.inlineCSS
137
+ },
138
+ children: [
139
+ g && /* @__PURE__ */ d(
140
+ $,
141
+ {
142
+ width: "100%",
143
+ height: "100%",
144
+ inlineCSS: {
145
+ position: "absolute",
146
+ top: 0,
147
+ left: 0,
148
+ opacity: C ? 0 : 1,
149
+ transition: "opacity 0.3s"
150
+ }
151
+ }
152
+ ),
153
+ /* @__PURE__ */ d(
154
+ "img",
155
+ {
156
+ ref: a,
157
+ src: w,
158
+ alt: y,
159
+ width: t,
160
+ height: o,
161
+ onLoad: h,
162
+ ...r,
163
+ style: {
164
+ position: "absolute",
165
+ top: 0,
166
+ left: 0,
167
+ width: "100%",
168
+ height: "100%",
169
+ transition: "opacity 0.3s",
170
+ ...r.style
171
+ }
172
+ }
173
+ )
174
+ ]
175
+ }
176
+ );
177
+ }
178
+ );
179
+ export {
180
+ X as default
181
+ };
@@ -0,0 +1,3 @@
1
+ import { ImageProps, default as Image } from './Image';
2
+ export type { ImageProps };
3
+ export default Image;
@@ -0,0 +1,4 @@
1
+ import e from "./Image.mjs";
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,8 @@
1
+ import { ReactNode } from 'react';
2
+ import { ImageProps } from '../../Image';
3
+ export interface ImageBlockProps extends Omit<ImageProps, 'wrapperProps' | 'style' | 'onLoad'> {
4
+ fallback?: ReactNode;
5
+ containerHeight: string;
6
+ }
7
+ declare function ImageBlock({ fallback, containerHeight, ...props }: ImageBlockProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ export default ImageBlock;