@dotss/tictoccroc 0.12.0 → 0.13.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/TimePicker-eObMuz3A.js +128 -0
- package/dist/index.mjs +63 -62
- package/dist/shared/components/TimePicker/TimePicker.d.ts +18 -5
- package/dist/shared/components/TimePicker/TimePicker.mjs +1 -1
- package/dist/shared/components/TimePicker/TimePicker.utils.d.ts +11 -0
- package/dist/shared/components/TimePicker/TimePicker.utils.mjs +38 -0
- package/dist/shared/components/TimePicker/TimePicker.utils.test.d.ts +1 -0
- package/dist/shared/components/TimePicker/index.mjs +1 -1
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.fallback.d.ts +2 -0
- package/dist/teacher/profile/components/KokTeacherCard/KokTeacherCard.fallback.mjs +128 -0
- package/dist/teacher/profile/components/KokTeacherCard/index.d.ts +2 -0
- package/dist/teacher/profile/components/KokTeacherCard/index.mjs +4 -3
- package/dist/teacher/profile/components/index.mjs +4 -3
- package/package.json +1 -1
- package/dist/TimePicker-BwACyeBR.js +0 -120
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { formatTimeLabel as e, getEndTimeColumn as t, getStartTimeColumn as n, isNextDayTime as r, shouldResetEndTime as i } from "./shared/components/TimePicker/TimePicker.utils.mjs";
|
|
2
|
+
import { forwardRef as a, useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
3
|
+
import { ChainPicker as u, Flexbox as d, Label as f, Typography as p } from "@dotss/ui";
|
|
4
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
5
|
+
import g from "@emotion/styled";
|
|
6
|
+
//#region shared/components/TimePicker/TimePicker.styles.ts
|
|
7
|
+
var _ = g.div`
|
|
8
|
+
position: relative;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
gap: ${({ theme: { spacing: e } }) => e.content(7)}px;
|
|
13
|
+
width: 100%;
|
|
14
|
+
padding: ${({ theme: { spacing: e } }) => e.content(2)}px 0;
|
|
15
|
+
`, v = g.div`
|
|
16
|
+
position: absolute;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 54px;
|
|
19
|
+
background: ${({ theme: e }) => e.palette.background.primary};
|
|
20
|
+
border-radius: 12px;
|
|
21
|
+
`;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region shared/components/TimePicker/TimePicker.tsx
|
|
24
|
+
function y(t, n, i) {
|
|
25
|
+
let a = i && r(t.value), { period: o, time: s, ariaText: c } = e(t.label, a);
|
|
26
|
+
return /* @__PURE__ */ h(d, {
|
|
27
|
+
gap: 1,
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
justifyContent: "center",
|
|
30
|
+
"aria-label": c,
|
|
31
|
+
inlineCSS: i ? { width: "117px" } : { width: "82px" },
|
|
32
|
+
children: [
|
|
33
|
+
a && /* @__PURE__ */ m(f, {
|
|
34
|
+
size: "xSmall",
|
|
35
|
+
variant: n ? "solid" : "outlined",
|
|
36
|
+
color: "yellow",
|
|
37
|
+
"aria-hidden": !0,
|
|
38
|
+
children: "다음 날"
|
|
39
|
+
}),
|
|
40
|
+
/* @__PURE__ */ m(p, {
|
|
41
|
+
tag: "span",
|
|
42
|
+
variant: n ? "h5M" : "b5M",
|
|
43
|
+
children: o
|
|
44
|
+
}),
|
|
45
|
+
/* @__PURE__ */ m(p, {
|
|
46
|
+
tag: "span",
|
|
47
|
+
variant: n ? "h2M" : "h4M",
|
|
48
|
+
children: s
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
var b = a(function({ onChange: e, onChangeStartTime: r, onChangeEndTime: a, startTime: d = 9, endTime: f = 12, range: g = [0, 24], step: b = 1, maxDuration: x, startTimeChainPickerProps: S, endTimeChainPickerProps: C, timePickerHighlightProps: w, renderStartTimeLabel: T, renderEndTimeLabel: E, inlineCSS: D, ...O }, k) {
|
|
54
|
+
let [A, j] = l(d), [M, N] = l(f), P = c(n(g, b, x)), F = c(t(d, g, b, x)), I = o((e, t) => y(e, t, !1), []), L = o((e, t) => y(e, t, x !== void 0), [x]), R = (e) => {
|
|
55
|
+
j(e), F.current = t(e, g, b, x), i(e, f, b, x) && N(F.current[0].value);
|
|
56
|
+
}, z = (e) => {
|
|
57
|
+
N(e);
|
|
58
|
+
};
|
|
59
|
+
return s(() => {
|
|
60
|
+
F.current = t(d, g, b, x);
|
|
61
|
+
}, [
|
|
62
|
+
d,
|
|
63
|
+
f,
|
|
64
|
+
g,
|
|
65
|
+
b,
|
|
66
|
+
x
|
|
67
|
+
]), s(() => {
|
|
68
|
+
j(d);
|
|
69
|
+
}, [d]), s(() => {
|
|
70
|
+
i(d, f, b, x) ? N(F.current[0].value) : N(f);
|
|
71
|
+
}, [
|
|
72
|
+
d,
|
|
73
|
+
f,
|
|
74
|
+
b,
|
|
75
|
+
x
|
|
76
|
+
]), s(() => {
|
|
77
|
+
e(A, M);
|
|
78
|
+
}, [A, M]), s(() => {
|
|
79
|
+
r?.(A);
|
|
80
|
+
}, [A]), s(() => {
|
|
81
|
+
a?.(M);
|
|
82
|
+
}, [M]), /* @__PURE__ */ h(_, {
|
|
83
|
+
ref: k,
|
|
84
|
+
css: D,
|
|
85
|
+
role: "group",
|
|
86
|
+
"aria-label": "시간 선택",
|
|
87
|
+
...O,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ m(v, {
|
|
90
|
+
...w,
|
|
91
|
+
"aria-hidden": !0
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ m(u, {
|
|
94
|
+
column: P.current,
|
|
95
|
+
value: d,
|
|
96
|
+
onChange: R,
|
|
97
|
+
renderLabel: T || I,
|
|
98
|
+
"aria-label": "시작 시간 선택",
|
|
99
|
+
inlineCSS: {
|
|
100
|
+
"& > li": { padding: 0 },
|
|
101
|
+
...S?.inlineCSS
|
|
102
|
+
},
|
|
103
|
+
...S
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ m(p, {
|
|
106
|
+
variant: "h5M",
|
|
107
|
+
color: "grey.50",
|
|
108
|
+
"aria-hidden": !0,
|
|
109
|
+
inlineCSS: { zIndex: 1 },
|
|
110
|
+
children: "부터"
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ m(u, {
|
|
113
|
+
column: F.current,
|
|
114
|
+
value: f,
|
|
115
|
+
onChange: z,
|
|
116
|
+
renderLabel: E || L,
|
|
117
|
+
"aria-label": "종료 시간 선택",
|
|
118
|
+
inlineCSS: {
|
|
119
|
+
"& > li": { padding: 0 },
|
|
120
|
+
...C?.inlineCSS
|
|
121
|
+
},
|
|
122
|
+
...C
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
//#endregion
|
|
128
|
+
export { b as t };
|
package/dist/index.mjs
CHANGED
|
@@ -42,72 +42,73 @@ import B from "./teacher/profile/components/CareNoteSection/index.mjs";
|
|
|
42
42
|
import { getChildLabel as V } from "./teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs";
|
|
43
43
|
import H from "./teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs";
|
|
44
44
|
import U from "./teacher/profile/components/ParentReviewSection/index.mjs";
|
|
45
|
-
import
|
|
46
|
-
import
|
|
45
|
+
import W from "./shared/components/LoadingAnnouncer/index.mjs";
|
|
46
|
+
import G from "./teacher/profile/components/KokTeacherCard/KokTeacherCard.fallback.mjs";
|
|
47
|
+
import { getBadgeLabel as K, getCareActivityLabel as q, getChargeLabel as J, getNote as Y, getPictureLabel as X, getStrengthLabel as Z } from "./teacher/profile/components/KokTeacherCard/KokTeacherCard.utils.mjs";
|
|
48
|
+
import Q from "./teacher/profile/components/KokTeacherCard/index.mjs";
|
|
47
49
|
import "./teacher/profile/components/index.mjs";
|
|
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
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import fe from "./teacher/home/components/SingleAccount/index.mjs";
|
|
50
|
+
import $ from "./teacher/home/components/TextAccount/TextAccount.fallback.mjs";
|
|
51
|
+
import ee from "./teacher/home/components/TextAccount/index.mjs";
|
|
52
|
+
import te from "./shared/components/Carousel/CarouselSlide/index.mjs";
|
|
53
|
+
import ne from "./shared/components/Carousel/index.mjs";
|
|
54
|
+
import re from "./teacher/home/components/Carousel1Account/Carousel1Account.fallback.mjs";
|
|
55
|
+
import ie from "./teacher/home/components/Carousel1Account/index.mjs";
|
|
56
|
+
import ae from "./teacher/home/components/Carousel2Account/Carousel2Account.fallback.mjs";
|
|
57
|
+
import oe from "./teacher/home/components/Carousel2Account/index.mjs";
|
|
58
|
+
import se from "./shared/components/Swiper/SwiperBlock/index.mjs";
|
|
59
|
+
import ce from "./shared/components/MediaDialog/MediaBlock/index.mjs";
|
|
60
|
+
import le from "./shared/components/Swiper/index.mjs";
|
|
61
|
+
import ue from "./teacher/home/components/BannerAccount/BannerAccount.fallback.mjs";
|
|
62
|
+
import de from "./teacher/home/components/BannerAccount/index.mjs";
|
|
63
|
+
import fe from "./teacher/home/components/SingleAccount/SingleAccount.fallback.mjs";
|
|
64
|
+
import pe from "./teacher/home/components/SingleAccount/index.mjs";
|
|
64
65
|
import "./teacher/home/components/index.mjs";
|
|
65
|
-
import
|
|
66
|
+
import me from "./parent/notification/utils/sanitize/sanitize.mjs";
|
|
66
67
|
import "./parent/notification/utils/index.mjs";
|
|
67
|
-
import
|
|
68
|
+
import he from "./parent/notification/components/NotificationCard/index.mjs";
|
|
68
69
|
import "./parent/notification/components/index.mjs";
|
|
69
|
-
import { t as
|
|
70
|
+
import { t as ge } from "./convertMdToHtml-Bmk0brLK.js";
|
|
70
71
|
import "./parent/b2b/utils/index.mjs";
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import { isSuccess as
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import { getMessageLabel as
|
|
87
|
-
import
|
|
88
|
-
import { getImageMessageLabel as
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import { getSystemMessageLabel as
|
|
92
|
-
import
|
|
93
|
-
import { getBotMessageLabel as
|
|
94
|
-
import
|
|
95
|
-
import
|
|
96
|
-
import
|
|
97
|
-
import
|
|
98
|
-
import
|
|
99
|
-
import
|
|
72
|
+
import _e from "./parent/b2b/components/ActionButtons/index.mjs";
|
|
73
|
+
import ve from "./parent/b2b/components/BottomNotes/index.mjs";
|
|
74
|
+
import ye from "./shared/components/TextField/index.mjs";
|
|
75
|
+
import be from "./parent/b2b/components/EmployeeNumberField/index.mjs";
|
|
76
|
+
import xe from "./parent/b2b/components/NameField/index.mjs";
|
|
77
|
+
import { isSuccess as Se, isValid as Ce } from "./parent/b2b/components/PhoneNumberField/PhoneNumberField.utils.mjs";
|
|
78
|
+
import we from "./parent/b2b/components/PhoneNumberField/index.mjs";
|
|
79
|
+
import Te from "./parent/b2b/components/Title/index.mjs";
|
|
80
|
+
import Ee from "./shared/components/MediaDialog/MediaDialogContent/index.mjs";
|
|
81
|
+
import De from "./shared/components/MediaDialog/MediaDialogFooter/index.mjs";
|
|
82
|
+
import Oe from "./shared/components/MediaDialog/MediaDialogToolbar/index.mjs";
|
|
83
|
+
import ke from "./shared/components/MediaDialog/index.mjs";
|
|
84
|
+
import Ae from "./shared/components/TimePicker/index.mjs";
|
|
85
|
+
import je from "./shared/components/Calendar/index.mjs";
|
|
86
|
+
import Me from "./shared/components/ChatKit/Message/Message.fallback.mjs";
|
|
87
|
+
import { getMessageLabel as Ne, markMessageGroupBoundaries as Pe } from "./shared/components/ChatKit/Message/Message.utils.mjs";
|
|
88
|
+
import Fe from "./shared/components/ChatKit/Message/index.mjs";
|
|
89
|
+
import { getImageMessageLabel as Ie, getPhotoAssetMessage as Le } from "./shared/components/ChatKit/ImageMessage/ImageMessage.utils.mjs";
|
|
90
|
+
import Re from "./shared/components/ChatKit/ImageMessage/index.mjs";
|
|
91
|
+
import ze from "./shared/components/ChatKit/SystemMessage/(Actions)/DirectTrageRiskInfoBottomSheet/DirectTrageRiskInfoBottomSheet.mjs";
|
|
92
|
+
import { getSystemMessageLabel as Be } from "./shared/components/ChatKit/SystemMessage/SystemMessage.utils.mjs";
|
|
93
|
+
import Ve from "./shared/components/ChatKit/SystemMessage/index.mjs";
|
|
94
|
+
import { getBotMessageLabel as He, getCtaButtonText as Ue } from "./shared/components/ChatKit/BotMessage/BotMessage.utils.mjs";
|
|
95
|
+
import We from "./shared/components/ChatKit/BotMessage/index.mjs";
|
|
96
|
+
import Ge from "./shared/components/ChatKit/InputBar/InputBar.fallback.mjs";
|
|
97
|
+
import Ke from "./shared/components/ChatKit/InputBar/index.mjs";
|
|
98
|
+
import qe from "./shared/components/ChatKit/Seperator/index.mjs";
|
|
99
|
+
import Je from "./shared/components/ChatKit/UnreadMessagePill/index.mjs";
|
|
100
|
+
import Ye from "./parent/b2b/components/TopLogo/index.mjs";
|
|
100
101
|
import "./parent/b2b/components/index.mjs";
|
|
101
|
-
import
|
|
102
|
-
import
|
|
103
|
-
import
|
|
104
|
-
import
|
|
105
|
-
import
|
|
106
|
-
import
|
|
107
|
-
import
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
import
|
|
111
|
-
import
|
|
102
|
+
import Xe from "./shared/utils/isAndroid/index.mjs";
|
|
103
|
+
import Ze from "./shared/utils/isIos/index.mjs";
|
|
104
|
+
import Qe from "./shared/utils/isApp/index.mjs";
|
|
105
|
+
import $e from "./shared/utils/isDesktop/index.mjs";
|
|
106
|
+
import et from "./shared/utils/ageToBirthDate/index.mjs";
|
|
107
|
+
import tt from "./shared/utils/objectToQueryString/index.mjs";
|
|
108
|
+
import nt from "./shared/utils/getVimeoId/index.mjs";
|
|
109
|
+
import rt from "./shared/utils/parseQueryString/index.mjs";
|
|
110
|
+
import it from "./shared/utils/share/index.mjs";
|
|
111
|
+
import at from "./shared/utils/getCareTypeLabel/index.mjs";
|
|
112
|
+
import ot from "./shared/utils/getHoverChildrenScaleStyle/index.mjs";
|
|
112
113
|
import "./shared/utils/index.mjs";
|
|
113
|
-
export { E as AbilityBadge, D as AbilityCollection,
|
|
114
|
+
export { E as AbilityBadge, D as AbilityCollection, _e as ActionButtons, h as ActivityGallery, p as ActivityGalleryItem, F as AvailableScheduleSection, de as BannerAccount, ue as BannerAccountFallback, We as BotMessage, ve as BottomNotes, je as Calendar, R as CareNote, B as CareNoteSection, v as CareerItem, y as CareerSection, ne as Carousel, ie as Carousel1Account, re as Carousel1AccountFallback, oe as Carousel2Account, ae as Carousel2AccountFallback, te as CarouselSlide, g as CertificateItem, _ as CertificateSection, ze as DirectTradeRiskInfoBottomSheet, b as EducationItem, x as EducationSection, be as EmployeeNumberField, a as Image, i as ImageError, Re as ImageMessage, Ke as InputBar, Ge as InputBarFallback, Q as KokTeacherCard, G as KokTeacherCardFallback, W as LoadingAnnouncer, m as Masonry, u as MasonryBlock, ce as MediaBlock, ke as MediaDialog, Ee as MediaDialogContent, De as MediaDialogFooter, Oe as MediaDialogToolbar, Fe as Message, Me as MessageFallback, xe as NameField, he as NotificationCard, H as ParentReviewCard, U as ParentReviewSection, we 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, qe as Seperator, pe as SingleAccount, fe as SingleAccountFallback, c as StatBadge, l as StatBadgeCollection, le as Swiper, se as SwiperBlock, Ve as SystemMessage, ee as TextAccount, $ as TextAccountFallback, ye as TextField, Ae as TimePicker, Te as Title, Ye as TopLogo, Je as UnreadMessagePill, et as ageToBirthDate, L as birthDateToAge, d as combineRef, ge as convertMdToHtml, k as dayFlagToDay, T as getAbilityCollection, M as getAvailableDateRange, K as getBadgeLabel, He as getBotMessageLabel, q as getCareActivityLabel, at as getCareTypeLabel, J as getChargeLabel, V as getChildLabel, Ue as getCtaButtonText, A as getDateRange, ot as getHoverChildrenScaleStyle, Ie as getImageMessageLabel, r as getImageUrl, o as getLastActiveText, Ne as getMessageLabel, Y as getNote, Le as getPhotoAssetMessage, X as getPictureLabel, C as getPreferredAgeKeywords, Z as getStrengthLabel, Be as getSystemMessageLabel, j as getTimeRange, nt as getVimeoId, Xe as isAndroid, Qe as isApp, $e as isDesktop, Ze as isIos, t as isServer, Se as isSuccess, Ce as isValid, Pe as markMessageGroupBoundaries, tt as objectToQueryString, rt as parseQueryString, me as sanitize, it as share, f as useCombineRef, e as useInView, n as useIsomorphicLayoutEffect };
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { ChainPicker } from '@dotss/ui';
|
|
2
|
+
import { ChainPickerItem, ChainPicker } from '@dotss/ui';
|
|
3
3
|
import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
|
|
4
|
-
export
|
|
5
|
-
label: string;
|
|
6
|
-
value: number;
|
|
7
|
-
}
|
|
4
|
+
export type TimePickerItem = ChainPickerItem;
|
|
8
5
|
export interface TimePickerProps extends Omit<FlexboxProps, 'onChange'> {
|
|
9
6
|
onChange: (startTime: number, endTime: number) => void;
|
|
10
7
|
onChangeStartTime?: (startTime: number) => void;
|
|
@@ -13,6 +10,22 @@ export interface TimePickerProps extends Omit<FlexboxProps, 'onChange'> {
|
|
|
13
10
|
endTime?: number;
|
|
14
11
|
step?: number;
|
|
15
12
|
range?: [number, number];
|
|
13
|
+
/**
|
|
14
|
+
* 시작부터 종료까지 고를 수 있는 최대 시간(시간 단위)이다.
|
|
15
|
+
* 이 값을 지정하면 종료가 자정을 넘을 수 있다.
|
|
16
|
+
* 종료 열은 `start + step`부터 `start + maxDuration`까지이고 `range[1]`은 쓰지 않는다.
|
|
17
|
+
* 시작 열은 `range[1] - 0.5`까지다.
|
|
18
|
+
*
|
|
19
|
+
* 24 이상인 종료 값은 다음 날 시각이고(28은 다음 날 04:00), `onChange`와
|
|
20
|
+
* `onChangeEndTime`에도 그대로 넘어간다.
|
|
21
|
+
*
|
|
22
|
+
* `step` 이상 24 이하여야 한다. `step`보다 작으면 종료 열이 비어 오류가 나고,
|
|
23
|
+
* 24보다 크면 같은 시각이 두 번 나올 수 있다.
|
|
24
|
+
*
|
|
25
|
+
* 시작 열은 마운트할 때 한 번만 만든다. 마운트 뒤 `maxDuration`, `range`, `step`이
|
|
26
|
+
* 바뀔 수 있으면 `key`로 다시 마운트한다.
|
|
27
|
+
*/
|
|
28
|
+
maxDuration?: number;
|
|
16
29
|
startTimeChainPickerProps?: Omit<Parameters<typeof ChainPicker>[0], 'column' | 'value' | 'onChange' | 'renderLabel'>;
|
|
17
30
|
endTimeChainPickerProps?: Omit<Parameters<typeof ChainPicker>[0], 'column' | 'value' | 'onChange' | 'renderLabel'>;
|
|
18
31
|
timePickerHighlightProps?: HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "../../../TimePicker-
|
|
1
|
+
import { t as e } from "../../../TimePicker-eObMuz3A.js";
|
|
2
2
|
export { e as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainPickerItem } from '@dotss/ui';
|
|
2
|
+
export declare const NEXT_DAY_LABEL = "\uB2E4\uC74C \uB0A0";
|
|
3
|
+
export declare function getStartTimeColumn(range: [number, number], step: number, maxDuration?: number): ChainPickerItem[];
|
|
4
|
+
export declare function getEndTimeColumn(startTime: number, range: [number, number], step: number, maxDuration?: number): ChainPickerItem[];
|
|
5
|
+
export declare function shouldResetEndTime(startTime: number, endTime: number, step: number, maxDuration?: number): boolean;
|
|
6
|
+
export declare function isNextDayTime(value: number): boolean;
|
|
7
|
+
export declare function formatTimeLabel(label: string, isNextDay: boolean): {
|
|
8
|
+
period: string;
|
|
9
|
+
time: string;
|
|
10
|
+
ariaText: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import e from "../../utils/getTimeRange/index.mjs";
|
|
2
|
+
//#region shared/components/TimePicker/TimePicker.utils.ts
|
|
3
|
+
var t = .5, n = 24, r = "다음 날";
|
|
4
|
+
function i(r, i, a) {
|
|
5
|
+
let o = a === void 0 ? r[1] - i : r[1] - t;
|
|
6
|
+
return e(0, n, {
|
|
7
|
+
minTime: r[0],
|
|
8
|
+
maxTime: o
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
function a(t, r, i, a) {
|
|
12
|
+
return a === void 0 ? e(0, n, {
|
|
13
|
+
minTime: t + i > r[1] ? r[1] : t + i,
|
|
14
|
+
maxTime: r[1]
|
|
15
|
+
}) : e(0, n * 2, {
|
|
16
|
+
minTime: t + i,
|
|
17
|
+
maxTime: t + a
|
|
18
|
+
}).map((e) => ({
|
|
19
|
+
...e,
|
|
20
|
+
ariaValueText: c(e.label, s(e.value)).ariaText
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
function o(e, n, r, i) {
|
|
24
|
+
return i === void 0 ? e >= n - t : n < e + r || n > e + i;
|
|
25
|
+
}
|
|
26
|
+
function s(e) {
|
|
27
|
+
return e >= n;
|
|
28
|
+
}
|
|
29
|
+
function c(e, t) {
|
|
30
|
+
let [n, i] = e.split(":").map(Number), a = n >= 12 ? "오후" : "오전", o = n % 12 || 12;
|
|
31
|
+
return {
|
|
32
|
+
period: a,
|
|
33
|
+
time: `${o}:${i.toString().padStart(2, "0")}`,
|
|
34
|
+
ariaText: `${t ? `${r} ` : ""}${a} ${o}시 ${i}분`
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { r as NEXT_DAY_LABEL, c as formatTimeLabel, a as getEndTimeColumn, i as getStartTimeColumn, s as isNextDayTime, o as shouldResetEndTime };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import e from "../../../../shared/components/LoadingAnnouncer/index.mjs";
|
|
2
|
+
import t from "@dotss/ui/core/useTheme";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import a from "@dotss/ui/Box";
|
|
5
|
+
import o from "@dotss/ui/Card";
|
|
6
|
+
import s from "@dotss/ui/Flexbox";
|
|
7
|
+
import c from "@dotss/ui/Skeleton";
|
|
8
|
+
//#region teacher/profile/components/KokTeacherCard/KokTeacherCard.fallback.tsx
|
|
9
|
+
function l() {
|
|
10
|
+
let { spacing: l, palette: u } = t();
|
|
11
|
+
return /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ r(e, {}), /* @__PURE__ */ i(o, {
|
|
12
|
+
variant: "outlined",
|
|
13
|
+
"aria-busy": !0,
|
|
14
|
+
wrapperProps: { inlineCSS: {
|
|
15
|
+
width: "100%",
|
|
16
|
+
alignSelf: "stretch"
|
|
17
|
+
} },
|
|
18
|
+
inlineCSS: {
|
|
19
|
+
width: "100%",
|
|
20
|
+
gap: "unset",
|
|
21
|
+
borderWidth: 1,
|
|
22
|
+
padding: l.content(4) - 1,
|
|
23
|
+
cursor: "wait",
|
|
24
|
+
"&:hover, &:active": { backgroundColor: u.grey.white }
|
|
25
|
+
},
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ i(s, {
|
|
28
|
+
justifyContent: "space-between",
|
|
29
|
+
gap: 3,
|
|
30
|
+
children: [/* @__PURE__ */ i(s, {
|
|
31
|
+
flexDirection: "column",
|
|
32
|
+
gap: 2,
|
|
33
|
+
alignItems: "center",
|
|
34
|
+
children: [/* @__PURE__ */ r(c, {
|
|
35
|
+
width: 74,
|
|
36
|
+
height: 74,
|
|
37
|
+
borderRadius: 200
|
|
38
|
+
}), /* @__PURE__ */ r(c, {
|
|
39
|
+
width: 72,
|
|
40
|
+
textHeight: "c3M"
|
|
41
|
+
})]
|
|
42
|
+
}), /* @__PURE__ */ i(s, {
|
|
43
|
+
flexDirection: "column",
|
|
44
|
+
flexGrow: 1,
|
|
45
|
+
gap: 2,
|
|
46
|
+
inlineCSS: { minWidth: 0 },
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ i(s, {
|
|
49
|
+
gap: 2,
|
|
50
|
+
alignItems: "center",
|
|
51
|
+
inlineCSS: { minWidth: 0 },
|
|
52
|
+
children: [/* @__PURE__ */ i(s, {
|
|
53
|
+
flexGrow: 1,
|
|
54
|
+
gap: 2,
|
|
55
|
+
alignItems: "center",
|
|
56
|
+
children: [/* @__PURE__ */ r(c, {
|
|
57
|
+
width: 48,
|
|
58
|
+
height: 24,
|
|
59
|
+
borderRadius: 6
|
|
60
|
+
}), /* @__PURE__ */ r(c, {
|
|
61
|
+
width: 64,
|
|
62
|
+
textHeight: "h4B"
|
|
63
|
+
})]
|
|
64
|
+
}), /* @__PURE__ */ r(c, {
|
|
65
|
+
width: 24,
|
|
66
|
+
height: 24,
|
|
67
|
+
borderRadius: 4
|
|
68
|
+
})]
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ i(s, {
|
|
71
|
+
flexDirection: "column",
|
|
72
|
+
gap: 1,
|
|
73
|
+
children: [/* @__PURE__ */ r(c, {
|
|
74
|
+
textHeight: "b4M",
|
|
75
|
+
inlineCSS: { width: "100%" }
|
|
76
|
+
}), /* @__PURE__ */ r(c, {
|
|
77
|
+
textHeight: "b4M",
|
|
78
|
+
inlineCSS: { width: "72%" }
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ i(s, {
|
|
82
|
+
flexDirection: "column",
|
|
83
|
+
gap: 1,
|
|
84
|
+
children: [/* @__PURE__ */ r(c, {
|
|
85
|
+
textHeight: "b5R",
|
|
86
|
+
inlineCSS: { width: "68%" }
|
|
87
|
+
}), /* @__PURE__ */ r(c, {
|
|
88
|
+
textHeight: "b5R",
|
|
89
|
+
inlineCSS: { width: "84%" }
|
|
90
|
+
})]
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})]
|
|
94
|
+
}),
|
|
95
|
+
/* @__PURE__ */ r(a, {
|
|
96
|
+
tag: "hr",
|
|
97
|
+
mt: 2,
|
|
98
|
+
mb: 2,
|
|
99
|
+
inlineCSS: {
|
|
100
|
+
border: "unset",
|
|
101
|
+
height: 1,
|
|
102
|
+
background: u.grey[20]
|
|
103
|
+
}
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ i(s, {
|
|
106
|
+
alignItems: "center",
|
|
107
|
+
justifyContent: "space-between",
|
|
108
|
+
children: [/* @__PURE__ */ r(c, {
|
|
109
|
+
width: 148,
|
|
110
|
+
textHeight: "h5B"
|
|
111
|
+
}), /* @__PURE__ */ r(c, {
|
|
112
|
+
width: 88,
|
|
113
|
+
height: 24,
|
|
114
|
+
borderRadius: 6
|
|
115
|
+
})]
|
|
116
|
+
}),
|
|
117
|
+
/* @__PURE__ */ r(s, {
|
|
118
|
+
mt: 1,
|
|
119
|
+
children: /* @__PURE__ */ r(c, {
|
|
120
|
+
textHeight: "c4R",
|
|
121
|
+
inlineCSS: { width: "78%" }
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
]
|
|
125
|
+
})] });
|
|
126
|
+
}
|
|
127
|
+
//#endregion
|
|
128
|
+
export { l as default };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { KokTeacherCardProps, default as KokTeacherCard } from './KokTeacherCard';
|
|
2
|
+
import { default as KokTeacherCardFallback } from './KokTeacherCard.fallback';
|
|
2
3
|
export * from './KokTeacherCard.utils';
|
|
4
|
+
export { KokTeacherCardFallback };
|
|
3
5
|
export type { KokTeacherCardProps };
|
|
4
6
|
export default KokTeacherCard;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import e from "./KokTeacherCard.mjs";
|
|
2
|
-
import
|
|
2
|
+
import t from "./KokTeacherCard.fallback.mjs";
|
|
3
|
+
import { getBadgeLabel as n, getCareActivityLabel as r, getChargeLabel as i, getNote as a, getPictureLabel as o, getStrengthLabel as s } from "./KokTeacherCard.utils.mjs";
|
|
3
4
|
//#region teacher/profile/components/KokTeacherCard/index.ts
|
|
4
|
-
var
|
|
5
|
+
var c = e;
|
|
5
6
|
//#endregion
|
|
6
|
-
export {
|
|
7
|
+
export { t as KokTeacherCardFallback, c as default, n as getBadgeLabel, r as getCareActivityLabel, i as getChargeLabel, a as getNote, o as getPictureLabel, s as getStrengthLabel };
|
|
@@ -22,6 +22,7 @@ import b from "./CareNoteSection/index.mjs";
|
|
|
22
22
|
import { getChildLabel as x } from "./ParentReviewSection/ParentReviewSection.utils.mjs";
|
|
23
23
|
import S from "./ParentReviewSection/ParentReviewCard/index.mjs";
|
|
24
24
|
import C from "./ParentReviewSection/index.mjs";
|
|
25
|
-
import
|
|
26
|
-
import A from "./KokTeacherCard/
|
|
27
|
-
|
|
25
|
+
import w from "./KokTeacherCard/KokTeacherCard.fallback.mjs";
|
|
26
|
+
import { getBadgeLabel as T, getCareActivityLabel as E, getChargeLabel as D, getNote as O, getPictureLabel as k, getStrengthLabel as A } from "./KokTeacherCard/KokTeacherCard.utils.mjs";
|
|
27
|
+
import j from "./KokTeacherCard/index.mjs";
|
|
28
|
+
export { g as AbilityBadge, _ as AbilityCollection, a as ActivityGallery, i as ActivityGalleryItem, v as AvailableScheduleSection, y as CareNote, b as CareNoteSection, c as CareerItem, l as CareerSection, o as CertificateItem, s as CertificateSection, u as EducationItem, d as EducationSection, j as KokTeacherCard, w as KokTeacherCardFallback, S as ParentReviewCard, C as ParentReviewSection, f as PreferredActivityKeywordGroup, m as PreferredAgeGroup, t as ProfileSummary, n as StatBadge, r as StatBadgeCollection, h as getAbilityCollection, T as getBadgeLabel, E as getCareActivityLabel, D as getChargeLabel, x as getChildLabel, e as getLastActiveText, O as getNote, k as getPictureLabel, p as getPreferredAgeKeywords, A as getStrengthLabel };
|
package/package.json
CHANGED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import e from "./shared/utils/getTimeRange/index.mjs";
|
|
2
|
-
import { forwardRef as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
|
|
3
|
-
import { ChainPicker as o, Flexbox as s, Typography as c } from "@dotss/ui";
|
|
4
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
|
-
import d from "@emotion/styled";
|
|
6
|
-
//#region shared/components/TimePicker/TimePicker.styles.ts
|
|
7
|
-
var f = d.div`
|
|
8
|
-
position: relative;
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: center;
|
|
11
|
-
justify-content: center;
|
|
12
|
-
gap: ${({ theme: { spacing: e } }) => e.content(7)}px;
|
|
13
|
-
width: 100%;
|
|
14
|
-
padding: ${({ theme: { spacing: e } }) => e.content(2)}px 0;
|
|
15
|
-
`, p = d.div`
|
|
16
|
-
position: absolute;
|
|
17
|
-
width: 100%;
|
|
18
|
-
height: 54px;
|
|
19
|
-
background: ${({ theme: e }) => e.palette.background.primary};
|
|
20
|
-
border-radius: 12px;
|
|
21
|
-
`, m = t(function({ onChange: t, onChangeStartTime: d, onChangeEndTime: m, startTime: h = 9, endTime: g = 12, range: _ = [0, 24], step: v = 1, startTimeChainPickerProps: y, endTimeChainPickerProps: b, timePickerHighlightProps: x, renderStartTimeLabel: S, renderEndTimeLabel: C, inlineCSS: w, ...T }, E) {
|
|
22
|
-
let [D, O] = a(h), [k, A] = a(g), j = i(e(0, 24, {
|
|
23
|
-
minTime: _[0],
|
|
24
|
-
maxTime: _[1] - v
|
|
25
|
-
})), M = i(e(0, 24, {
|
|
26
|
-
minTime: h + v,
|
|
27
|
-
maxTime: _[1]
|
|
28
|
-
})), N = n((e, t) => {
|
|
29
|
-
let [n, r] = e.label.split(":").map(Number), i = n >= 12, a = n % 12 || 12, o = i ? "오후" : "오전";
|
|
30
|
-
return /* @__PURE__ */ u(s, {
|
|
31
|
-
gap: 1,
|
|
32
|
-
alignItems: "center",
|
|
33
|
-
justifyContent: "center",
|
|
34
|
-
"aria-label": `${o} ${a}시 ${r}분`,
|
|
35
|
-
inlineCSS: { width: "82px" },
|
|
36
|
-
children: [/* @__PURE__ */ l(c, {
|
|
37
|
-
tag: "span",
|
|
38
|
-
variant: t ? "h5M" : "b5M",
|
|
39
|
-
children: o
|
|
40
|
-
}), /* @__PURE__ */ l(c, {
|
|
41
|
-
tag: "span",
|
|
42
|
-
variant: t ? "h2M" : "h4M",
|
|
43
|
-
children: `${a}:${r.toString().padStart(2, "0")}`
|
|
44
|
-
})]
|
|
45
|
-
});
|
|
46
|
-
}, []), P = (t) => {
|
|
47
|
-
O(t), M.current = e(0, 24, {
|
|
48
|
-
minTime: t + v > _[1] ? _[1] : t + v,
|
|
49
|
-
maxTime: _[1]
|
|
50
|
-
}), t >= g - .5 && A(M.current[0].value);
|
|
51
|
-
}, F = (e) => {
|
|
52
|
-
A(e);
|
|
53
|
-
};
|
|
54
|
-
return r(() => {
|
|
55
|
-
M.current = e(0, 24, {
|
|
56
|
-
minTime: h + v > _[1] ? _[1] : h + v,
|
|
57
|
-
maxTime: _[1]
|
|
58
|
-
});
|
|
59
|
-
}, [
|
|
60
|
-
h,
|
|
61
|
-
g,
|
|
62
|
-
_,
|
|
63
|
-
v
|
|
64
|
-
]), r(() => {
|
|
65
|
-
O(h);
|
|
66
|
-
}, [h]), r(() => {
|
|
67
|
-
h >= g - .5 ? A(M.current[0].value) : A(g);
|
|
68
|
-
}, [h, g]), r(() => {
|
|
69
|
-
t(D, k);
|
|
70
|
-
}, [D, k]), r(() => {
|
|
71
|
-
d?.(D);
|
|
72
|
-
}, [D]), r(() => {
|
|
73
|
-
m?.(k);
|
|
74
|
-
}, [k]), /* @__PURE__ */ u(f, {
|
|
75
|
-
ref: E,
|
|
76
|
-
css: w,
|
|
77
|
-
role: "group",
|
|
78
|
-
"aria-label": "시간 선택",
|
|
79
|
-
...T,
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ l(p, {
|
|
82
|
-
...x,
|
|
83
|
-
"aria-hidden": !0
|
|
84
|
-
}),
|
|
85
|
-
/* @__PURE__ */ l(o, {
|
|
86
|
-
column: j.current,
|
|
87
|
-
value: h,
|
|
88
|
-
onChange: P,
|
|
89
|
-
renderLabel: S || N,
|
|
90
|
-
"aria-label": "시작 시간 선택",
|
|
91
|
-
inlineCSS: {
|
|
92
|
-
"& > li": { padding: 0 },
|
|
93
|
-
...y?.inlineCSS
|
|
94
|
-
},
|
|
95
|
-
...y
|
|
96
|
-
}),
|
|
97
|
-
/* @__PURE__ */ l(c, {
|
|
98
|
-
variant: "h5M",
|
|
99
|
-
color: "grey.50",
|
|
100
|
-
"aria-hidden": !0,
|
|
101
|
-
inlineCSS: { zIndex: 1 },
|
|
102
|
-
children: "부터"
|
|
103
|
-
}),
|
|
104
|
-
/* @__PURE__ */ l(o, {
|
|
105
|
-
column: M.current,
|
|
106
|
-
value: g,
|
|
107
|
-
onChange: F,
|
|
108
|
-
renderLabel: C || N,
|
|
109
|
-
"aria-label": "종료 시간 선택",
|
|
110
|
-
inlineCSS: {
|
|
111
|
-
"& > li": { padding: 0 },
|
|
112
|
-
...b?.inlineCSS
|
|
113
|
-
},
|
|
114
|
-
...b
|
|
115
|
-
})
|
|
116
|
-
]
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
//#endregion
|
|
120
|
-
export { m as t };
|