@dotss/tictoccroc 0.0.17 → 0.0.19

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.
@@ -1,2 +1,2 @@
1
1
  import { DayFlag } from '../../typings/common';
2
- export default function dayFlagToDay(dayFlag?: DayFlag): 1 | 0 | 2 | 4 | 3 | 5 | 6 | null;
2
+ export default function dayFlagToDay(dayFlag?: DayFlag): 0 | 1 | 2 | 4 | 3 | 5 | 6 | null;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, SyntheticEvent } from 'react';
2
- import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
3
2
  import { ImageProps } from '../../../../shared/components/Image';
3
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
4
4
  import { BannerProps } from '..';
5
5
  export interface Carousel1AccountProps extends Omit<FlexboxProps, 'title'> {
6
6
  id: string;
@@ -1,54 +1,56 @@
1
- import { jsx as e, Fragment as f, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as r, Fragment as f, jsxs as n } from "react/jsx-runtime";
2
2
  import b from "@dotss/ui/core/useTheme";
3
- import c from "@dotss/ui/Flexbox";
4
- import l from "@dotss/ui/Typography";
3
+ import l from "@dotss/ui/Flexbox";
4
+ import c from "@dotss/ui/Typography";
5
5
  import C from "../../../../shared/components/Carousel/Carousel.mjs";
6
6
  import S from "../../../../shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
7
- import x from "../../../../shared/components/Image/Image.mjs";
7
+ import w from "../../../../shared/components/Image/Image.mjs";
8
8
  import "@dotss/ui";
9
- function I({
10
- id: d,
11
- title: m,
12
- banners: p,
13
- onClickBanner: r,
9
+ function D({
10
+ id: p,
11
+ title: d,
12
+ banners: m,
13
+ onClickBanner: t,
14
14
  imageProps: s,
15
- ...u
15
+ ...h
16
16
  }) {
17
- const { spacing: i } = b(), g = (o) => (t) => {
18
- r && typeof r == "function" && (t.stopPropagation(), t.preventDefault(), r(o, t));
17
+ const { spacing: a } = b(), u = (i) => (e) => {
18
+ t && typeof t == "function" && (e.stopPropagation(), e.preventDefault(), t(i, e));
19
19
  };
20
- return /* @__PURE__ */ e(f, { children: /* @__PURE__ */ n(c, { flexDirection: "column", inlineCSS: { width: "100%" }, ...u, children: [
21
- /* @__PURE__ */ e(
22
- l,
20
+ return /* @__PURE__ */ r(f, { children: /* @__PURE__ */ n(l, { flexDirection: "column", inlineCSS: { width: "100%" }, ...h, children: [
21
+ /* @__PURE__ */ r(
22
+ c,
23
23
  {
24
- id: `banner-account-carousel1-${d}`,
24
+ id: `banner-account-carousel1-${p}`,
25
25
  variant: "h2B",
26
26
  inlineCSS: {
27
- paddingLeft: i.content(4),
28
- paddingRight: i.content(4),
29
- marginBottom: i.content(3)
27
+ whiteSpace: "pre-wrap",
28
+ wordBreak: "keep-all",
29
+ paddingLeft: a.content(4),
30
+ paddingRight: a.content(4),
31
+ marginBottom: a.content(3)
30
32
  },
31
- children: m
33
+ children: d
32
34
  }
33
35
  ),
34
- /* @__PURE__ */ e(C, { rowCount: 2, step: 1, spacing: 5, children: p.map(({ id: o, title: t, url: a, image: h }) => /* @__PURE__ */ e(S, { children: /* @__PURE__ */ n(
35
- c,
36
+ /* @__PURE__ */ r(C, { rowCount: 2, step: 1, spacing: 5, children: m.map(({ id: i, title: e, url: o, image: g }) => /* @__PURE__ */ r(S, { children: /* @__PURE__ */ n(
37
+ l,
36
38
  {
37
39
  tag: "a",
38
- href: a,
40
+ href: o,
39
41
  alignItems: "center",
40
42
  gap: 4,
41
43
  draggable: !1,
42
- onClick: g(a),
44
+ onClick: u(o),
43
45
  inlineCSS: { width: 264 },
44
46
  children: [
45
- /* @__PURE__ */ e(
46
- x,
47
+ /* @__PURE__ */ r(
48
+ w,
47
49
  {
48
- src: h || "",
50
+ src: g || "",
49
51
  width: 140,
50
52
  height: 98,
51
- alt: `${t} 이미지`,
53
+ alt: `${e} 이미지`,
52
54
  "aria-hidden": !0,
53
55
  draggable: !1,
54
56
  borderRadius: 12,
@@ -58,12 +60,12 @@ function I({
58
60
  ...s
59
61
  }
60
62
  ),
61
- /* @__PURE__ */ e(l, { tag: "p", variant: "b2M", lineClamp: 2, children: t })
63
+ /* @__PURE__ */ r(c, { tag: "p", variant: "b2M", lineClamp: 2, children: e })
62
64
  ]
63
65
  }
64
- ) }, `tictoccroc-carousel1-account-${o}`)) })
66
+ ) }, `tictoccroc-carousel1-account-${i}`)) })
65
67
  ] }) });
66
68
  }
67
69
  export {
68
- I as default
70
+ D as default
69
71
  };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, SyntheticEvent } from 'react';
2
- import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
3
2
  import { ImageProps } from '../../../../shared/components/Image';
3
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
4
4
  import { BannerProps } from '..';
5
5
  export interface Carousel2AccountProps extends Omit<FlexboxProps, 'title'> {
6
6
  id: string;
@@ -1,12 +1,12 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import b from "@dotss/ui/core/useTheme";
3
- import a from "@dotss/ui/Flexbox";
3
+ import n from "@dotss/ui/Flexbox";
4
4
  import l from "@dotss/ui/Typography";
5
5
  import C from "../../../../shared/components/Carousel/Carousel.mjs";
6
6
  import x from "../../../../shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
7
7
  import S from "../../../../shared/components/Image/Image.mjs";
8
8
  import "@dotss/ui";
9
- function k({
9
+ function R({
10
10
  id: p,
11
11
  title: d,
12
12
  banners: m,
@@ -14,16 +14,18 @@ function k({
14
14
  imageProps: s,
15
15
  ...u
16
16
  }) {
17
- const { spacing: i } = b(), g = (o) => (t) => {
18
- r && typeof r == "function" && (t.stopPropagation(), t.preventDefault(), r(o, t));
17
+ const { spacing: i } = b(), h = (o) => (e) => {
18
+ r && typeof r == "function" && (e.stopPropagation(), e.preventDefault(), r(o, e));
19
19
  };
20
- return /* @__PURE__ */ n(a, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...u, children: [
21
- /* @__PURE__ */ e(
20
+ return /* @__PURE__ */ a(n, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...u, children: [
21
+ /* @__PURE__ */ t(
22
22
  l,
23
23
  {
24
24
  id: `banner-account-carousel2-${p}`,
25
25
  variant: "h2B",
26
26
  inlineCSS: {
27
+ whiteSpace: "pre-wrap",
28
+ wordBreak: "keep-all",
27
29
  paddingLeft: i.content(4),
28
30
  paddingRight: i.content(4),
29
31
  marginBottom: i.content(4)
@@ -31,24 +33,24 @@ function k({
31
33
  children: d
32
34
  }
33
35
  ),
34
- /* @__PURE__ */ e(C, { rowCount: 1, step: 1, spacing: 3, children: m.map(({ id: o, title: t, subtitle: h, url: c, image: f }) => /* @__PURE__ */ e(x, { children: /* @__PURE__ */ n(
35
- a,
36
+ /* @__PURE__ */ t(C, { rowCount: 1, step: 1, spacing: 3, children: m.map(({ id: o, title: e, subtitle: g, url: c, image: f }) => /* @__PURE__ */ t(x, { children: /* @__PURE__ */ a(
37
+ n,
36
38
  {
37
39
  tag: "a",
38
40
  href: c,
39
41
  flexDirection: "column",
40
42
  gap: 3,
41
43
  draggable: !1,
42
- onClick: g(c),
44
+ onClick: h(c),
43
45
  inlineCSS: { width: 240 },
44
46
  children: [
45
- /* @__PURE__ */ e(
47
+ /* @__PURE__ */ t(
46
48
  S,
47
49
  {
48
50
  src: f || "",
49
51
  width: 240,
50
52
  height: 168,
51
- alt: `${t} 이미지`,
53
+ alt: `${e} 이미지`,
52
54
  "aria-hidden": !0,
53
55
  draggable: !1,
54
56
  borderRadius: 12,
@@ -58,9 +60,9 @@ function k({
58
60
  ...s
59
61
  }
60
62
  ),
61
- /* @__PURE__ */ n(a, { flexDirection: "column", gap: 1, children: [
62
- /* @__PURE__ */ e(l, { tag: "p", variant: "h4B", lineClamp: 1, children: t }),
63
- /* @__PURE__ */ e(l, { tag: "p", variant: "b4R", lineClamp: 1, color: "grey.70", children: h })
63
+ /* @__PURE__ */ a(n, { flexDirection: "column", gap: 1, children: [
64
+ /* @__PURE__ */ t(l, { tag: "p", variant: "h4B", lineClamp: 1, children: e }),
65
+ /* @__PURE__ */ t(l, { tag: "p", variant: "b4R", lineClamp: 1, color: "grey.70", children: g })
64
66
  ] })
65
67
  ]
66
68
  }
@@ -68,5 +70,5 @@ function k({
68
70
  ] });
69
71
  }
70
72
  export {
71
- k as default
73
+ R as default
72
74
  };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode, SyntheticEvent } from 'react';
2
- import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
3
2
  import { ImageProps } from '../../../../shared/components/Image';
3
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
4
4
  import { BannerProps } from '..';
5
5
  export interface TextAccountProps extends Omit<FlexboxProps, 'title'> {
6
6
  id: string;
@@ -1,45 +1,47 @@
1
- import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
- import S from "@dotss/ui/core/useTheme";
1
+ import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
+ import b from "@dotss/ui/core/useTheme";
3
3
  import i from "@dotss/ui/Flexbox";
4
4
  import { useCheckHoverPossible as x } from "@dotss/ui/hooks";
5
- import C from "@dotss/ui/Icon";
5
+ import w from "@dotss/ui/Icon";
6
6
  import d from "@dotss/ui/Typography";
7
- import v from "../../../../shared/components/Image/Image.mjs";
7
+ import C from "../../../../shared/components/Image/Image.mjs";
8
8
  import "@dotss/ui";
9
9
  function P({
10
- id: a,
11
- title: p,
10
+ id: l,
11
+ title: m,
12
12
  banners: s,
13
13
  onClickBanner: n,
14
14
  imageProps: g,
15
15
  ...f
16
16
  }) {
17
- const { spacing: o, palette: c } = S(), { isHoverPossible: u } = x(), b = (r) => (t) => {
18
- n && typeof n == "function" && (t.stopPropagation(), t.preventDefault(), n(r, t));
17
+ const { spacing: r, palette: c } = b(), { isHoverPossible: u } = x(), S = (o) => (t) => {
18
+ n && typeof n == "function" && (t.stopPropagation(), t.preventDefault(), n(o, t));
19
19
  };
20
- return /* @__PURE__ */ m(i, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...f, children: [
20
+ return /* @__PURE__ */ h(i, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...f, children: [
21
21
  /* @__PURE__ */ e(
22
22
  d,
23
23
  {
24
- id: `banner-account-text-${a}`,
24
+ id: `banner-account-text-${l}`,
25
25
  variant: "h2B",
26
26
  inlineCSS: {
27
- paddingLeft: o.content(4),
28
- paddingRight: o.content(4),
29
- marginBottom: o.content(2)
27
+ whiteSpace: "pre-wrap",
28
+ wordBreak: "keep-all",
29
+ paddingLeft: r.content(4),
30
+ paddingRight: r.content(4),
31
+ marginBottom: r.content(2)
30
32
  },
31
- children: p
33
+ children: m
32
34
  }
33
35
  ),
34
- /* @__PURE__ */ e(i, { tag: "ul", flexDirection: "column", "aria-labelledby": `banner-account-text-${a}`, children: s.map(({ id: r, title: t, url: l, image: h }) => /* @__PURE__ */ e(i, { tag: "li", alignItems: "center", children: /* @__PURE__ */ m(
36
+ /* @__PURE__ */ e(i, { tag: "ul", flexDirection: "column", "aria-labelledby": `banner-account-text-${l}`, children: s.map(({ id: o, title: t, url: a, image: p }) => /* @__PURE__ */ e(i, { tag: "li", alignItems: "center", children: /* @__PURE__ */ h(
35
37
  i,
36
38
  {
37
39
  tag: "a",
38
- href: l,
40
+ href: a,
39
41
  p: 4,
40
42
  gap: 3,
41
43
  alignItems: "center",
42
- onClick: b(l),
44
+ onClick: S(a),
43
45
  inlineCSS: {
44
46
  width: "100%",
45
47
  "&:focus-within": {
@@ -52,7 +54,7 @@ function P({
52
54
  } : {}
53
55
  },
54
56
  children: [
55
- h && /* @__PURE__ */ e(
57
+ p && /* @__PURE__ */ e(
56
58
  i,
57
59
  {
58
60
  inlineCSS: {
@@ -61,11 +63,11 @@ function P({
61
63
  overflow: "hidden"
62
64
  },
63
65
  children: /* @__PURE__ */ e(
64
- v,
66
+ C,
65
67
  {
66
68
  width: 100,
67
69
  height: 78,
68
- src: h,
70
+ src: p,
69
71
  alt: `${t} 이미지`,
70
72
  enableFallback: !0,
71
73
  enableErrorFallback: !0,
@@ -79,7 +81,7 @@ function P({
79
81
  {
80
82
  tag: "p",
81
83
  variant: "b2R",
82
- lineClamp: l ? 2 : 1,
84
+ lineClamp: a ? 2 : 1,
83
85
  inlineCSS: {
84
86
  flexGrow: 1
85
87
  },
@@ -92,12 +94,12 @@ function P({
92
94
  inlineCSS: {
93
95
  whiteSpace: "nowrap"
94
96
  },
95
- children: /* @__PURE__ */ e(C, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
97
+ children: /* @__PURE__ */ e(w, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
96
98
  }
97
99
  )
98
100
  ]
99
101
  }
100
- ) }, `tictoccroc-story-${r}`)) })
102
+ ) }, `tictoccroc-story-${o}`)) })
101
103
  ] });
102
104
  }
103
105
  export {
@@ -1,18 +1,17 @@
1
1
  import { jsxs as i, jsx as t, Fragment as m } from "react/jsx-runtime";
2
- import { useState as S, Children as O, isValidElement as F } from "react";
2
+ import { useState as S, Children as E, isValidElement as F } from "react";
3
3
  import { Flexbox as r, Typography as f, Tooltip as Y, Icon as p, Button as M } from "@dotss/ui";
4
4
  import T from "@dotss/ui/core/useTheme";
5
5
  import g from "dayjs";
6
6
  import W from "./CareerItem/CareerItem.mjs";
7
- import { sortItemElements as z } from "../../utils/sortItems/sortItems.mjs";
8
- function q({
7
+ function U({
9
8
  children: u,
10
9
  action: C,
11
10
  showTooltip: x = !1,
12
11
  enableToggle: s = !1,
13
12
  ...o
14
13
  }) {
15
- const { spacing: w } = T(), [b, I] = S(!1), [a, v] = S(!1), l = O.toArray(u).filter(F).filter((e) => e.type === W), D = l.length > 0, j = l.length > 3, y = l.map((e) => [e.props.startDate, e.props.endDate ?? g().format("YYYY-MM-DD")]).map(([e, n]) => [g(e), g(n)]).map(([e, n]) => n.diff(e, "month")), c = Math.floor(y.reduce((e, n) => e + n, 0) / 12), d = y.reduce((e, n) => e + n, 0) % 12, k = () => v((e) => !e), h = () => I((e) => !e), E = (e) => {
14
+ const { spacing: w } = T(), [b, I] = S(!1), [a, v] = S(!1), l = E.toArray(u).filter(F).filter((e) => e.type === W), D = l.length > 0, j = l.length > 3, y = l.map((e) => [e.props.startDate, e.props.endDate ?? g().format("YYYY-MM-DD")]).map(([e, n]) => [g(e), g(n)]).map(([e, n]) => n.diff(e, "month")), c = Math.floor(y.reduce((e, n) => e + n, 0) / 12), d = y.reduce((e, n) => e + n, 0) % 12, k = () => v((e) => !e), h = () => I((e) => !e), O = (e) => {
16
15
  (e.key === "Enter" || e.key === " ") && h();
17
16
  };
18
17
  return /* @__PURE__ */ i(
@@ -100,7 +99,7 @@ function q({
100
99
  size: "small",
101
100
  color: "grey.50",
102
101
  onClick: h,
103
- onKeyDown: E,
102
+ onKeyDown: O,
104
103
  "aria-label": "추가 정보 안내",
105
104
  inlineCSS: {
106
105
  cursor: "pointer"
@@ -134,7 +133,7 @@ function q({
134
133
  tag: "ul",
135
134
  flexDirection: "column",
136
135
  inlineCSS: { width: "inherit" },
137
- children: z(l).slice(0, !s || a ? void 0 : 3)
136
+ children: l.slice(0, !s || a ? void 0 : 3)
138
137
  }
139
138
  ),
140
139
  s && j && /* @__PURE__ */ t(
@@ -175,5 +174,5 @@ function q({
175
174
  );
176
175
  }
177
176
  export {
178
- q as default
177
+ U as default
179
178
  };
@@ -1,18 +1,17 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as f, Children as I, isValidElement as v } from "react";
3
- import { Flexbox as i, Typography as m, Tooltip as j, Icon as s, Button as k } from "@dotss/ui";
3
+ import { Flexbox as i, Typography as h, Tooltip as j, Icon as s, Button as k } from "@dotss/ui";
4
4
  import D from "@dotss/ui/core/useTheme";
5
- import E from "./CertificateItem/CertificateItem.mjs";
6
- import { sortItemElements as O } from "../../utils/sortItems/sortItems.mjs";
7
- function K({
8
- children: h,
5
+ import O from "./CertificateItem/CertificateItem.mjs";
6
+ function A({
7
+ children: m,
9
8
  action: d,
10
9
  showTooltip: p = !1,
11
10
  enableToggle: r = !1,
12
11
  ...n
13
12
  }) {
14
- const { spacing: x } = D(), [y, C] = f(!1), [o, g] = f(!1), l = I.toArray(h).filter(v).filter((t) => t.type === E), u = l.length > 0, S = l.length > 3, c = () => C((t) => !t), b = (t) => {
15
- (t.key === "Enter" || t.key === " ") && c();
13
+ const { spacing: x } = D(), [y, C] = f(!1), [o, g] = f(!1), c = I.toArray(m).filter(v).filter((t) => t.type === O), u = c.length > 0, S = c.length > 3, l = () => C((t) => !t), b = (t) => {
14
+ (t.key === "Enter" || t.key === " ") && l();
16
15
  }, w = () => g((t) => !t);
17
16
  return /* @__PURE__ */ a(
18
17
  i,
@@ -30,7 +29,7 @@ function K({
30
29
  children: [
31
30
  /* @__PURE__ */ a(i, { alignItems: "center", justifyContent: "center", gap: 1, children: [
32
31
  /* @__PURE__ */ e(
33
- m,
32
+ h,
34
33
  {
35
34
  id: "certificate-section-title",
36
35
  tag: "h2",
@@ -43,13 +42,13 @@ function K({
43
42
  j,
44
43
  {
45
44
  open: y,
46
- onClose: c,
45
+ onClose: l,
47
46
  color: "secondary",
48
47
  role: "tooltip",
49
48
  "aria-labelledby": "certificate-section-tooltip",
50
49
  "aria-describedby": "certificate-section-tooltip-desc",
51
50
  body: /* @__PURE__ */ a(
52
- m,
51
+ h,
53
52
  {
54
53
  id: "certificate-section-tooltip-desc",
55
54
  tag: "p",
@@ -83,7 +82,7 @@ function K({
83
82
  name: "TooltipFill",
84
83
  size: "small",
85
84
  color: "grey.50",
86
- onClick: c,
85
+ onClick: l,
87
86
  onKeyDown: b,
88
87
  "aria-label": "추가 정보 안내",
89
88
  inlineCSS: {
@@ -101,10 +100,7 @@ function K({
101
100
  tag: "ul",
102
101
  flexDirection: "column",
103
102
  inlineCSS: { width: "inherit" },
104
- children: O(l).slice(
105
- 0,
106
- !r || o ? void 0 : 3
107
- )
103
+ children: c.slice(0, !r || o ? void 0 : 3)
108
104
  }
109
105
  ),
110
106
  r && S && /* @__PURE__ */ e(
@@ -145,5 +141,5 @@ function K({
145
141
  );
146
142
  }
147
143
  export {
148
- K as default
144
+ A as default
149
145
  };
@@ -4,7 +4,7 @@ import x from "@dotss/ui/core/useTheme";
4
4
  import y from "dayjs";
5
5
  import C from "../../../../../shared/components/Roller/RollerBlock/RollerBlock.mjs";
6
6
  import { getChildLabel as S } from "../ClassNotesSection.utils.mjs";
7
- function M({ content: h, keywords: t, regDatetime: s, childrenInfo: p, ...n }) {
7
+ function D({ content: h, keywords: t, regDatetime: s, childrenInfo: p, ...n }) {
8
8
  var c, m;
9
9
  const {
10
10
  palette: { grey: f, brand: i }
@@ -26,7 +26,7 @@ function M({ content: h, keywords: t, regDatetime: s, childrenInfo: p, ...n }) {
26
26
  /* @__PURE__ */ e(r, { tag: "p", variant: "b4R", color: "grey.70", lineClamp: 6, inlineCSS: { flexGrow: 1 }, children: h }),
27
27
  t.length > 0 && /* @__PURE__ */ e(g, { alignItems: "center", gap: 1, flexWrap: "wrap", children: t.map((d) => /* @__PURE__ */ e(u, { variant: "ghost", color: "yellow", size: "small", children: d }, `activity-keyword-${d}`)) }),
28
28
  /* @__PURE__ */ l(g, { alignItems: "center", justifyContent: "space-between", gap: 1, children: [
29
- /* @__PURE__ */ e(r, { tag: "p", variant: "b4R", color: "grey.70", children: b.format("YYYY년 MMDD일") }),
29
+ /* @__PURE__ */ e(r, { tag: "p", variant: "b4R", color: "grey.70", children: b.format("YYYY년 MD일") }),
30
30
  /* @__PURE__ */ l(
31
31
  r,
32
32
  {
@@ -50,5 +50,5 @@ function M({ content: h, keywords: t, regDatetime: s, childrenInfo: p, ...n }) {
50
50
  );
51
51
  }
52
52
  export {
53
- M as default
53
+ D as default
54
54
  };
@@ -1,18 +1,17 @@
1
1
  import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
- import { useState as m, Children as I, isValidElement as E } from "react";
3
- import { Flexbox as i, Typography as h, Tooltip as v, Icon as s, Button as j } from "@dotss/ui";
2
+ import { useState as h, Children as I, isValidElement as v } from "react";
3
+ import { Flexbox as i, Typography as m, Tooltip as E, Icon as s, Button as j } from "@dotss/ui";
4
4
  import k from "@dotss/ui/core/useTheme";
5
5
  import D from "./EducationItem/EducationItem.mjs";
6
- import { sortItemElements as O } from "../../utils/sortItems/sortItems.mjs";
7
- function L({
8
- children: f,
6
+ function B({
7
+ children: u,
9
8
  action: d,
10
- showTooltip: u = !1,
9
+ showTooltip: f = !1,
11
10
  enableToggle: l = !1,
12
11
  ...n
13
12
  }) {
14
- const { spacing: p } = k(), [x, y] = m(!1), [o, g] = m(!1), r = I.toArray(f).filter(E).filter((t) => t.type === D), C = r.length > 0, S = r.length > 3, a = () => y((t) => !t), b = (t) => {
15
- (t.key === "Enter" || t.key === " ") && a();
13
+ const { spacing: p } = k(), [x, y] = h(!1), [o, g] = h(!1), a = I.toArray(u).filter(v).filter((t) => t.type === D), C = a.length > 0, S = a.length > 3, r = () => y((t) => !t), b = (t) => {
14
+ (t.key === "Enter" || t.key === " ") && r();
16
15
  }, w = () => g((t) => !t);
17
16
  return /* @__PURE__ */ c(
18
17
  i,
@@ -30,7 +29,7 @@ function L({
30
29
  children: [
31
30
  /* @__PURE__ */ c(i, { alignItems: "center", justifyContent: "center", gap: 1, children: [
32
31
  /* @__PURE__ */ e(
33
- h,
32
+ m,
34
33
  {
35
34
  id: "education-section-title",
36
35
  tag: "h2",
@@ -39,17 +38,17 @@ function L({
39
38
  children: "학력"
40
39
  }
41
40
  ),
42
- u && /* @__PURE__ */ e(
43
- v,
41
+ f && /* @__PURE__ */ e(
42
+ E,
44
43
  {
45
44
  open: x,
46
- onClose: a,
45
+ onClose: r,
47
46
  color: "secondary",
48
47
  role: "tooltip",
49
48
  "aria-labelledby": "education-section-tooltip",
50
49
  "aria-describedby": "education-section-tooltip-desc",
51
50
  body: /* @__PURE__ */ c(
52
- h,
51
+ m,
53
52
  {
54
53
  id: "education-section-tooltip-desc",
55
54
  tag: "p",
@@ -83,7 +82,7 @@ function L({
83
82
  name: "TooltipFill",
84
83
  size: "small",
85
84
  color: "grey.50",
86
- onClick: a,
85
+ onClick: r,
87
86
  onKeyDown: b,
88
87
  "aria-label": "추가 정보 안내",
89
88
  inlineCSS: {
@@ -101,7 +100,7 @@ function L({
101
100
  tag: "ul",
102
101
  flexDirection: "column",
103
102
  inlineCSS: { width: "inherit" },
104
- children: O(r).slice(0, !l || o ? void 0 : 3)
103
+ children: a.slice(0, !l || o ? void 0 : 3)
105
104
  }
106
105
  ),
107
106
  l && S && /* @__PURE__ */ e(
@@ -142,5 +141,5 @@ function L({
142
141
  );
143
142
  }
144
143
  export {
145
- L as default
144
+ B as default
146
145
  };
@@ -1 +1 @@
1
- export { default as sortItems, sortItemElements } from './sortItems';
1
+ export { default as sortItems } from './sortItems';
@@ -1,5 +1,4 @@
1
- import { sortItemElements as s, default as m } from "./sortItems/sortItems.mjs";
1
+ import { default as o } from "./sortItems/sortItems.mjs";
2
2
  export {
3
- s as sortItemElements,
4
- m as sortItems
3
+ o as sortItems
5
4
  };
@@ -1,3 +1,2 @@
1
- import { default as sortItems, sortItemElements } from './sortItems';
2
- export { sortItemElements };
1
+ import { default as sortItems } from './sortItems';
3
2
  export default sortItems;
@@ -1,6 +1,4 @@
1
- import e from "./sortItems.mjs";
2
- import { sortItemElements as m } from "./sortItems.mjs";
1
+ import o from "./sortItems.mjs";
3
2
  export {
4
- e as default,
5
- m as sortItemElements
3
+ o as default
6
4
  };
@@ -1,9 +1,11 @@
1
- import { ReactElement } from 'react';
2
1
  type ItemProps = {
3
2
  status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
4
3
  regDatetime: string;
4
+ startDate?: string;
5
+ endDate?: string | null;
6
+ phase?: 'STUDYING' | 'ONBREAK' | 'FINISHED';
7
+ acqDate?: string;
5
8
  priority: number;
6
9
  };
7
10
  export default function sortItems<T>(items: T[], get?: (item: T) => ItemProps): T[];
8
- export declare function sortItemElements<T extends ReactElement<ItemProps>>(items: T[]): T[];
9
11
  export {};
@@ -1,29 +1,49 @@
1
- function c(s, r = (a) => a) {
2
- const a = s.some((o) => !!r(o).priority), n = s.filter((o) => r(o).status !== "REJECTED"), m = s.filter((o) => r(o).status === "REJECTED");
3
- if (a)
1
+ function d(i, s = (D) => D) {
2
+ const D = i.some((a) => !!s(a).priority), c = i.filter((a) => s(a).status !== "REJECTED"), u = i.filter((a) => s(a).status === "REJECTED"), n = (a, o) => {
3
+ const t = s(a), e = s(o);
4
+ if (t.phase && e.phase) {
5
+ const r = { STUDYING: 0, ONBREAK: 1, FINISHED: 2 }, f = r[t.phase], p = r[e.phase];
6
+ if (f !== p)
7
+ return f - p;
8
+ }
9
+ if (t.phase && !e.phase) return -1;
10
+ if (!t.phase && e.phase) return 1;
11
+ if (t.acqDate && e.acqDate) {
12
+ const r = e.acqDate.localeCompare(t.acqDate);
13
+ if (r !== 0) return r;
14
+ }
15
+ if (t.acqDate && !e.acqDate) return -1;
16
+ if (!t.acqDate && e.acqDate) return 1;
17
+ if (t.startDate && e.startDate) {
18
+ const r = e.startDate.localeCompare(t.startDate);
19
+ if (r !== 0) return r;
20
+ }
21
+ if (t.startDate && !e.startDate) return -1;
22
+ if (!t.startDate && e.startDate) return 1;
23
+ if (t.endDate && e.endDate) {
24
+ const r = e.endDate.localeCompare(t.endDate);
25
+ if (r !== 0) return r;
26
+ }
27
+ return t.endDate && !e.endDate ? -1 : !t.endDate && e.endDate ? 1 : e.regDatetime.localeCompare(t.regDatetime);
28
+ };
29
+ if (D) {
30
+ const a = (o, t) => {
31
+ const e = s(o), r = s(t);
32
+ return e.priority !== r.priority ? r.priority - e.priority : n(o, t);
33
+ };
4
34
  return [
5
- ...n.sort((o, i) => {
6
- const t = r(o).priority, e = r(i).priority;
7
- return t === 0 && e === 0 ? r(i).regDatetime.localeCompare(r(o).regDatetime) : t === 0 && e !== 0 ? -1 : t !== 0 && e === 0 ? 1 : e - t;
8
- }),
9
- ...m.sort((o, i) => {
10
- const t = r(o).priority, e = r(i).priority;
11
- return t === 0 && e === 0 ? r(i).regDatetime.localeCompare(r(o).regDatetime) : t === 0 && e !== 0 ? -1 : t !== 0 && e === 0 ? 1 : e - t;
12
- })
35
+ ...c.sort(a),
36
+ ...u.sort(a)
13
37
  ];
14
- {
15
- const o = n.filter((t) => r(t).status === "VERIFIED"), i = n.filter((t) => r(t).status !== "VERIFIED");
38
+ } else {
39
+ const a = c.filter((t) => s(t).status === "VERIFIED"), o = c.filter((t) => s(t).status !== "VERIFIED");
16
40
  return [
17
- ...o.sort((t, e) => r(e).regDatetime.localeCompare(r(t).regDatetime)),
18
- ...i.sort((t, e) => r(e).regDatetime.localeCompare(r(t).regDatetime)),
19
- ...m.sort((t, e) => r(e).regDatetime.localeCompare(r(t).regDatetime))
41
+ ...a.sort(n),
42
+ ...o.sort(n),
43
+ ...u.sort(n)
20
44
  ];
21
45
  }
22
46
  }
23
- function u(s) {
24
- return c(s, (r) => r.props);
25
- }
26
47
  export {
27
- c as default,
28
- u as sortItemElements
48
+ d as default
29
49
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dotss/tictoccroc",
3
3
  "type": "module",
4
- "version": "0.0.17",
4
+ "version": "0.0.19",
5
5
  "description": "Tictoccroc shared components, hooks, utils, and APIs for Dotss",
6
6
  "main": "./dist/index.mjs",
7
7
  "module": "./dist/index.mjs",