@dotss/tictoccroc 0.0.30 → 0.0.31

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,13 +1,13 @@
1
1
  import { 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
- export interface BannerAccountProps extends Omit<FlexboxProps, 'title'> {
6
- id: string;
5
+ export interface BannerAccountProps extends Omit<FlexboxProps, 'title' | 'id'> {
6
+ id: number;
7
7
  banners: Array<BannerProps & {
8
8
  image?: string;
9
9
  }>;
10
- onClickBanner?: (url: string, e: SyntheticEvent) => void;
10
+ onClickBanner?: (url: string, bannerId: number, e: SyntheticEvent) => void;
11
11
  imageProps?: Partial<ImageProps>;
12
12
  }
13
13
  declare function BannerAccount({ id, banners, onClickBanner, imageProps, ...props }: BannerAccountProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
- import t from "@dotss/ui/Flexbox";
1
+ import { jsxs as c, jsx as i } from "react/jsx-runtime";
2
+ import n from "@dotss/ui/Flexbox";
3
3
  import b from "@dotss/ui/Typography";
4
4
  import { useTheme as f } from "@emotion/react";
5
5
  import g from "../../../../shared/components/Image/Image.mjs";
@@ -7,11 +7,11 @@ import "@dotss/ui";
7
7
  import "@dotss/ui/core/useTheme";
8
8
  import S from "../../../../shared/components/Swiper/Swiper.mjs";
9
9
  import w from "../../../../shared/components/Swiper/SwiperBlock/SwiperBlock.mjs";
10
- function I({ id: o, banners: c, onClickBanner: n, imageProps: l, ...d }) {
11
- const { palette: p } = f(), h = (i) => (r) => {
12
- n && typeof n == "function" && (r.stopPropagation(), r.preventDefault(), n(i, r));
13
- }, m = ({ page: i, totalPages: r }) => r <= 1 ? null : /* @__PURE__ */ e(
14
- t,
10
+ function I({ id: a, banners: l, onClickBanner: o, imageProps: d, ...p }) {
11
+ const { palette: h } = f(), m = (e, r) => (t) => {
12
+ o && typeof o == "function" && (t.stopPropagation(), t.preventDefault(), o(e, r, t));
13
+ }, s = ({ page: e, totalPages: r }) => r <= 1 ? null : /* @__PURE__ */ i(
14
+ n,
15
15
  {
16
16
  alignItems: "center",
17
17
  justifyContent: "center",
@@ -26,9 +26,9 @@ function I({ id: o, banners: c, onClickBanner: n, imageProps: l, ...d }) {
26
26
  minWidth: 36,
27
27
  minHeight: 20,
28
28
  borderRadius: 24,
29
- backgroundColor: p.etc.dimmed02
29
+ backgroundColor: h.etc.dimmed02
30
30
  },
31
- children: /* @__PURE__ */ a(
31
+ children: /* @__PURE__ */ c(
32
32
  b,
33
33
  {
34
34
  tag: "p",
@@ -39,9 +39,9 @@ function I({ id: o, banners: c, onClickBanner: n, imageProps: l, ...d }) {
39
39
  fontWeight: 700
40
40
  }
41
41
  },
42
- "aria-label": `${r} 중 ${i + 1}`,
42
+ "aria-label": `${r} 중 ${e + 1}`,
43
43
  children: [
44
- /* @__PURE__ */ e("span", { children: i + 1 }),
44
+ /* @__PURE__ */ i("span", { children: e + 1 }),
45
45
  "/",
46
46
  r
47
47
  ]
@@ -49,27 +49,27 @@ function I({ id: o, banners: c, onClickBanner: n, imageProps: l, ...d }) {
49
49
  )
50
50
  }
51
51
  );
52
- return /* @__PURE__ */ a(t, { inlineCSS: { width: "100%" }, ...d, children: [
53
- /* @__PURE__ */ e(t, { id: `tictoccroc-banner-${o}`, visuallyHidden: !0, children: "배너" }),
54
- /* @__PURE__ */ e(
52
+ return /* @__PURE__ */ c(n, { inlineCSS: { width: "100%" }, ...p, children: [
53
+ /* @__PURE__ */ i(n, { id: `tictoccroc-banner-${a}`, visuallyHidden: !0, children: "배너" }),
54
+ /* @__PURE__ */ i(
55
55
  S,
56
56
  {
57
- renderPagination: m,
57
+ renderPagination: s,
58
58
  loop: !0,
59
59
  inlineCSS: { borderRadius: 12, overflow: "hidden" },
60
- "aria-describedby": `tictoccroc-banner-${o}`,
61
- children: c.map(({ id: i, url: r, image: s }, u) => /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(
62
- t,
60
+ "aria-describedby": `tictoccroc-banner-${a}`,
61
+ children: l.map(({ id: e, url: r, image: t }, u) => /* @__PURE__ */ i(w, { children: /* @__PURE__ */ i(
62
+ n,
63
63
  {
64
64
  tag: "a",
65
65
  href: r,
66
66
  draggable: !1,
67
- onClick: h(r),
67
+ onClick: m(r, e),
68
68
  inlineCSS: { width: "100%" },
69
- children: /* @__PURE__ */ e(
69
+ children: /* @__PURE__ */ i(
70
70
  g,
71
71
  {
72
- src: s || "",
72
+ src: t || "",
73
73
  alt: `배너 ${u + 1}`,
74
74
  width: 328,
75
75
  height: 100,
@@ -79,11 +79,11 @@ function I({ id: o, banners: c, onClickBanner: n, imageProps: l, ...d }) {
79
79
  withIntrinsicRatio: !0,
80
80
  wrapperProps: { inlineCSS: { width: "100%" } },
81
81
  style: { width: "100%", objectFit: "cover" },
82
- ...l
82
+ ...d
83
83
  }
84
84
  )
85
85
  }
86
- ) }, `tictoccroc-banner-account-${i}`))
86
+ ) }, `tictoccroc-banner-account-${e}`))
87
87
  }
88
88
  )
89
89
  ] });
@@ -1,14 +1,14 @@
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
- export interface Carousel1AccountProps extends Omit<FlexboxProps, 'title'> {
6
- id: string;
5
+ export interface Carousel1AccountProps extends Omit<FlexboxProps, 'title' | 'id'> {
6
+ id: number;
7
7
  title: ReactNode;
8
8
  banners: Array<BannerProps & {
9
9
  image?: string;
10
10
  }>;
11
- onClickBanner?: (url: string, e: SyntheticEvent) => void;
11
+ onClickBanner?: (url: string, bannerId: number, e: SyntheticEvent) => void;
12
12
  imageProps?: Partial<ImageProps>;
13
13
  }
14
14
  declare function Carousel1Account({ id, title, banners, onClickBanner, imageProps, ...props }: Carousel1AccountProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -10,12 +10,12 @@ function D({
10
10
  id: p,
11
11
  title: d,
12
12
  banners: m,
13
- onClickBanner: t,
13
+ onClickBanner: i,
14
14
  imageProps: s,
15
15
  ...h
16
16
  }) {
17
- const { spacing: a } = b(), u = (i) => (e) => {
18
- t && typeof t == "function" && (e.stopPropagation(), e.preventDefault(), t(i, e));
17
+ const { spacing: o } = b(), u = (t, a) => (e) => {
18
+ i && typeof i == "function" && (e.stopPropagation(), e.preventDefault(), i(t, a, e));
19
19
  };
20
20
  return /* @__PURE__ */ r(f, { children: /* @__PURE__ */ n(l, { flexDirection: "column", inlineCSS: { width: "100%" }, ...h, children: [
21
21
  /* @__PURE__ */ r(
@@ -26,22 +26,22 @@ function D({
26
26
  inlineCSS: {
27
27
  whiteSpace: "pre-wrap",
28
28
  wordBreak: "keep-all",
29
- paddingLeft: a.content(4),
30
- paddingRight: a.content(4),
31
- marginBottom: a.content(3)
29
+ paddingLeft: o.content(4),
30
+ paddingRight: o.content(4),
31
+ marginBottom: o.content(3)
32
32
  },
33
33
  children: d
34
34
  }
35
35
  ),
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(
36
+ /* @__PURE__ */ r(C, { rowCount: 2, step: 1, spacing: 5, children: m.map(({ id: t, title: a, url: e, image: g }) => /* @__PURE__ */ r(S, { children: /* @__PURE__ */ n(
37
37
  l,
38
38
  {
39
39
  tag: "a",
40
- href: o,
40
+ href: e,
41
41
  alignItems: "center",
42
42
  gap: 4,
43
43
  draggable: !1,
44
- onClick: u(o),
44
+ onClick: u(e, t),
45
45
  inlineCSS: { width: 264 },
46
46
  children: [
47
47
  /* @__PURE__ */ r(
@@ -50,7 +50,7 @@ function D({
50
50
  src: g || "",
51
51
  width: 140,
52
52
  height: 98,
53
- alt: `${e} 이미지`,
53
+ alt: `${a} 이미지`,
54
54
  "aria-hidden": !0,
55
55
  draggable: !1,
56
56
  borderRadius: 12,
@@ -60,10 +60,10 @@ function D({
60
60
  ...s
61
61
  }
62
62
  ),
63
- /* @__PURE__ */ r(c, { tag: "p", variant: "b2M", lineClamp: 2, children: e })
63
+ /* @__PURE__ */ r(c, { tag: "p", variant: "b2M", lineClamp: 2, children: a })
64
64
  ]
65
65
  }
66
- ) }, `tictoccroc-carousel1-account-${i}`)) })
66
+ ) }, `tictoccroc-carousel1-account-${t}`)) })
67
67
  ] }) });
68
68
  }
69
69
  export {
@@ -1,15 +1,15 @@
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
- export interface Carousel2AccountProps extends Omit<FlexboxProps, 'title'> {
6
- id: string;
5
+ export interface Carousel2AccountProps extends Omit<FlexboxProps, 'title' | 'id'> {
6
+ id: number;
7
7
  title: ReactNode;
8
8
  banners: Array<BannerProps & {
9
9
  image?: string;
10
10
  subTitle?: ReactNode;
11
11
  }>;
12
- onClickBanner?: (url: string, e: SyntheticEvent) => void;
12
+ onClickBanner?: (url: string, bannerId: number, e: SyntheticEvent) => void;
13
13
  bannerWidth?: number;
14
14
  imageProps?: Partial<ImageProps>;
15
15
  }
@@ -1,72 +1,72 @@
1
- import { jsxs as a, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import b from "@dotss/ui/core/useTheme";
3
- import n 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 x from "../../../../shared/components/Carousel/CarouselSlide/CarouselSlide.mjs";
7
7
  import S from "../../../../shared/components/Image/Image.mjs";
8
8
  import "@dotss/ui";
9
9
  function R({
10
- id: p,
11
- title: d,
12
- banners: m,
13
- onClickBanner: t,
14
- imageProps: s,
15
- ...u
10
+ id: d,
11
+ title: m,
12
+ banners: s,
13
+ onClickBanner: o,
14
+ imageProps: u,
15
+ ...h
16
16
  }) {
17
- const { spacing: i } = b(), h = (o) => (e) => {
18
- t && typeof t == "function" && (e.stopPropagation(), e.preventDefault(), t(o, e));
17
+ const { spacing: a } = b(), g = (t, i) => (r) => {
18
+ o && typeof o == "function" && (r.stopPropagation(), r.preventDefault(), o(t, i, r));
19
19
  };
20
- return /* @__PURE__ */ a(n, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...u, children: [
21
- /* @__PURE__ */ r(
22
- l,
20
+ return /* @__PURE__ */ n(l, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...h, children: [
21
+ /* @__PURE__ */ e(
22
+ c,
23
23
  {
24
- id: `banner-account-carousel2-${p}`,
24
+ id: `banner-account-carousel2-${d}`,
25
25
  variant: "h2B",
26
26
  inlineCSS: {
27
27
  whiteSpace: "pre-wrap",
28
28
  wordBreak: "keep-all",
29
- paddingLeft: i.content(4),
30
- paddingRight: i.content(4),
31
- marginBottom: i.content(4)
29
+ paddingLeft: a.content(4),
30
+ paddingRight: a.content(4),
31
+ marginBottom: a.content(4)
32
32
  },
33
- children: d
33
+ children: m
34
34
  }
35
35
  ),
36
- /* @__PURE__ */ r(C, { rowCount: 1, step: 1, spacing: 3, children: m.map(({ id: o, title: e, subTitle: g, url: c, image: f }) => /* @__PURE__ */ r(x, { children: /* @__PURE__ */ a(
37
- n,
36
+ /* @__PURE__ */ e(C, { rowCount: 1, step: 1, spacing: 3, children: s.map(({ id: t, title: i, subTitle: r, url: p, image: f }) => /* @__PURE__ */ e(x, { children: /* @__PURE__ */ n(
37
+ l,
38
38
  {
39
39
  tag: "a",
40
- href: c,
40
+ href: p,
41
41
  flexDirection: "column",
42
42
  gap: 3,
43
43
  draggable: !1,
44
- onClick: h(c),
44
+ onClick: g(p, t),
45
45
  inlineCSS: { width: 240 },
46
46
  children: [
47
- /* @__PURE__ */ r(
47
+ /* @__PURE__ */ e(
48
48
  S,
49
49
  {
50
50
  src: f || "",
51
51
  width: 240,
52
52
  height: 168,
53
- alt: `${e} 이미지`,
53
+ alt: `${i} 이미지`,
54
54
  "aria-hidden": !0,
55
55
  draggable: !1,
56
56
  borderRadius: 12,
57
57
  enableFallback: !0,
58
58
  enableErrorFallback: !0,
59
59
  style: { objectFit: "cover" },
60
- ...s
60
+ ...u
61
61
  }
62
62
  ),
63
- /* @__PURE__ */ a(n, { flexDirection: "column", gap: 1, children: [
64
- /* @__PURE__ */ r(l, { tag: "p", variant: "h4B", lineClamp: 1, children: e }),
65
- /* @__PURE__ */ r(l, { tag: "p", variant: "b4R", lineClamp: 1, color: "grey.70", children: g })
63
+ /* @__PURE__ */ n(l, { flexDirection: "column", gap: 1, children: [
64
+ /* @__PURE__ */ e(c, { tag: "p", variant: "h4B", lineClamp: 1, children: i }),
65
+ /* @__PURE__ */ e(c, { tag: "p", variant: "b4R", lineClamp: 1, color: "grey.70", children: r })
66
66
  ] })
67
67
  ]
68
68
  }
69
- ) }, `tictoccroc-carousel2-account-${o}`)) })
69
+ ) }, `tictoccroc-carousel2-account-${t}`)) })
70
70
  ] });
71
71
  }
72
72
  export {
@@ -1,14 +1,14 @@
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
- export interface TextAccountProps extends Omit<FlexboxProps, 'title'> {
6
- id: string;
5
+ export interface TextAccountProps extends Omit<FlexboxProps, 'title' | 'id'> {
6
+ id: number;
7
7
  title: ReactNode;
8
8
  banners: Array<BannerProps & {
9
9
  image?: string;
10
10
  }>;
11
- onClickBanner?: (url: string, e: SyntheticEvent) => void;
11
+ onClickBanner?: (url: string, bannerId: number, e: SyntheticEvent) => void;
12
12
  imageProps?: Partial<ImageProps>;
13
13
  }
14
14
  declare function TextAccount({ id, title, banners, onClickBanner, imageProps, ...props }: TextAccountProps): import("@emotion/react/jsx-runtime").JSX.Element;
@@ -7,37 +7,37 @@ import h from "@dotss/ui/Typography";
7
7
  import C from "../../../../shared/components/Image/Image.mjs";
8
8
  import "@dotss/ui";
9
9
  function P({
10
- id: a,
10
+ id: c,
11
11
  title: s,
12
12
  banners: m,
13
- onClickBanner: i,
13
+ onClickBanner: l,
14
14
  imageProps: g,
15
15
  ...f
16
16
  }) {
17
- const { spacing: o, palette: c } = S(), { isHoverPossible: u } = x(), b = (l) => (t) => {
18
- i && typeof i == "function" && (t.stopPropagation(), t.preventDefault(), i(l, t));
17
+ const { spacing: a, palette: p } = S(), { isHoverPossible: u } = x(), b = (o, i) => (t) => {
18
+ l && typeof l == "function" && (t.stopPropagation(), t.preventDefault(), l(o, i, t));
19
19
  };
20
20
  return /* @__PURE__ */ d(r, { tag: "section", flexDirection: "column", inlineCSS: { width: "100%" }, ...f, children: [
21
21
  /* @__PURE__ */ e(
22
22
  h,
23
23
  {
24
- id: `banner-account-text-${a}`,
24
+ id: `banner-account-text-${c}`,
25
25
  variant: "h2B",
26
26
  inlineCSS: {
27
27
  whiteSpace: "pre-wrap",
28
28
  wordBreak: "keep-all",
29
- paddingLeft: o.content(4),
30
- paddingRight: o.content(4),
31
- marginBottom: o.content(2)
29
+ paddingLeft: a.content(4),
30
+ paddingRight: a.content(4),
31
+ marginBottom: a.content(2)
32
32
  },
33
33
  children: s
34
34
  }
35
35
  ),
36
- /* @__PURE__ */ e(r, { tag: "ul", flexDirection: "column", "aria-labelledby": `banner-account-text-${a}`, children: m.map(({ id: l, title: t, url: p, image: n }) => /* @__PURE__ */ e(r, { tag: "li", alignItems: "center", children: /* @__PURE__ */ d(
36
+ /* @__PURE__ */ e(r, { tag: "ul", flexDirection: "column", "aria-labelledby": `banner-account-text-${c}`, children: m.map(({ id: o, title: i, url: t, image: n }) => /* @__PURE__ */ e(r, { tag: "li", alignItems: "center", children: /* @__PURE__ */ d(
37
37
  r,
38
38
  {
39
39
  tag: "a",
40
- href: p,
40
+ href: t,
41
41
  pt: n ? 3 : 4,
42
42
  pl: 4,
43
43
  pb: n ? 3 : 4,
@@ -45,15 +45,15 @@ function P({
45
45
  gap: 3,
46
46
  alignItems: "center",
47
47
  draggable: !1,
48
- onClick: b(p),
48
+ onClick: b(t, o),
49
49
  inlineCSS: {
50
50
  width: "100%",
51
51
  "&:focus-within": {
52
- backgroundColor: c.grey[10]
52
+ backgroundColor: p.grey[10]
53
53
  },
54
54
  ...u ? {
55
55
  "&:hover": {
56
- backgroundColor: c.grey[10]
56
+ backgroundColor: p.grey[10]
57
57
  }
58
58
  } : {}
59
59
  },
@@ -72,7 +72,7 @@ function P({
72
72
  width: 100,
73
73
  height: 70,
74
74
  src: n,
75
- alt: `${t} 이미지`,
75
+ alt: `${i} 이미지`,
76
76
  draggable: !1,
77
77
  enableFallback: !0,
78
78
  enableErrorFallback: !0,
@@ -90,7 +90,7 @@ function P({
90
90
  inlineCSS: {
91
91
  flexGrow: 1
92
92
  },
93
- children: t
93
+ children: i
94
94
  }
95
95
  ),
96
96
  /* @__PURE__ */ e(
@@ -104,7 +104,7 @@ function P({
104
104
  )
105
105
  ]
106
106
  }
107
- ) }, `tictoccroc-story-${l}`)) })
107
+ ) }, `tictoccroc-story-${o}`)) })
108
108
  ] });
109
109
  }
110
110
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dotss/tictoccroc",
3
3
  "type": "module",
4
- "version": "0.0.30",
4
+ "version": "0.0.31",
5
5
  "description": "Tictoccroc shared components, hooks, utils, and APIs for Dotss",
6
6
  "main": "./dist/index.mjs",
7
7
  "module": "./dist/index.mjs",