@dotss/ui 0.0.12 → 1.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 (101) hide show
  1. package/Accordion/Accordion.d.ts +1 -1
  2. package/Backdrop/Backdrop.d.ts +1 -1
  3. package/Badge/Badge.d.ts +3 -3
  4. package/BottomSheet/BottomSheet.d.ts +1 -1
  5. package/BottomSheet/BottomSheetAction/BottomSheetAction.d.ts +1 -1
  6. package/BottomSheet/BottomSheetContent/BottomSheetContent.d.ts +1 -1
  7. package/BottomSheet/BottomSheetText/BottomSheetText.d.ts +1 -1
  8. package/BottomSheet/BottomSheetTitle/BottomSheetTitle.d.ts +1 -1
  9. package/Box/Box.d.ts +1 -1
  10. package/Button/Button.d.ts +2 -2
  11. package/Button/index.d.ts +1 -0
  12. package/Card/Card.d.ts +1 -1
  13. package/ChainPicker/ChainPicker.d.ts +1 -1
  14. package/Checkbox/Checkbox.d.ts +2 -2
  15. package/Chip/Chip.d.ts +1 -1
  16. package/CircularProgressIndicator/CircularProgressIndicator.d.ts +1 -1
  17. package/DatePicker/DatePicker.cjs +40 -30
  18. package/DatePicker/DatePicker.d.ts +2 -1
  19. package/DatePicker/DatePicker.es.js +477 -301
  20. package/DatePicker/EventDot/EventDot.d.ts +1 -1
  21. package/DatePicker/EventDotGroup/EventDotGroup.cjs +3 -3
  22. package/DatePicker/EventDotGroup/EventDotGroup.d.ts +1 -1
  23. package/DatePicker/EventDotGroup/EventDotGroup.es.js +14 -14
  24. package/Dialog/Dialog.d.ts +1 -1
  25. package/Dialog/DialogText/DialogText.d.ts +1 -1
  26. package/Dialog/DialogTitle/DialogTitle.d.ts +1 -1
  27. package/Flexbox/Flexbox.d.ts +1 -1
  28. package/FocusBoundary/FocusBoundary.d.ts +1 -1
  29. package/FormControlText/FormControlText.cjs +2 -2
  30. package/FormControlText/FormControlText.d.ts +1 -1
  31. package/FormControlText/FormControlText.es.js +14 -14
  32. package/Icon/Icon.cjs +1 -1
  33. package/Icon/Icon.d.ts +2 -2
  34. package/Icon/Icon.es.js +1 -1
  35. package/IconButton/IconButton.d.ts +2 -2
  36. package/Label/Label.d.ts +4 -4
  37. package/LineProgressIndicator/LineProgressIndicator.d.ts +1 -1
  38. package/Menu/Menu.cjs +6 -6
  39. package/Menu/Menu.d.ts +1 -1
  40. package/Menu/Menu.es.js +83 -79
  41. package/Menu/MenuBlock/MenuBlock.cjs +5 -11
  42. package/Menu/MenuBlock/MenuBlock.d.ts +1 -1
  43. package/Menu/MenuBlock/MenuBlock.es.js +19 -29
  44. package/Menu/MenuButton/MenuButton.cjs +1 -1
  45. package/Menu/MenuButton/MenuButton.d.ts +1 -1
  46. package/Menu/MenuButton/MenuButton.es.js +38 -29
  47. package/NumberKeypad/NumberKeypad.d.ts +2 -2
  48. package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.d.ts +1 -1
  49. package/PageControl/PageControl.d.ts +2 -2
  50. package/Radio/Radio.d.ts +2 -2
  51. package/RadioGroup/RadioGroup.d.ts +1 -1
  52. package/SegmentedButton/SegmentedButton.d.ts +2 -2
  53. package/SegmentedButton/SegmentedButtonBlock/SegmentedButtonBlock.d.ts +1 -1
  54. package/Select/Option/Option.d.ts +1 -1
  55. package/Select/Select.d.ts +1 -1
  56. package/Skeleton/Skeleton.d.ts +3 -3
  57. package/Slider/Slider.d.ts +1 -1
  58. package/Snackbar/Snackbar.d.ts +2 -2
  59. package/Switch/Switch.d.ts +1 -1
  60. package/Tab/Tab.d.ts +1 -1
  61. package/Tab/TabBlock/TabBlock.d.ts +1 -1
  62. package/TextArea/TextArea.d.ts +1 -1
  63. package/TextField/TextField.d.ts +1 -1
  64. package/Tooltip/Tooltip.cjs +5 -5
  65. package/Tooltip/Tooltip.d.ts +4 -2
  66. package/Tooltip/Tooltip.es.js +84 -84
  67. package/Typography/Typography.d.ts +2 -2
  68. package/package.json +1 -1
  69. package/resources/tictoccroc/icons/fill/alphabet-fill.svg-CvfRsdBW.js +5 -0
  70. package/resources/tictoccroc/icons/fill/alphabet-fill.svg-HBXWjzrC.cjs +1 -0
  71. package/resources/tictoccroc/icons/fill/{certified-fill.svg-B_RVx6K_.cjs → certified-fill.svg-DA375i9-.cjs} +1 -1
  72. package/resources/tictoccroc/icons/fill/{certified-fill.svg-CK7UqYft.js → certified-fill.svg-DBC-EEKD.js} +1 -1
  73. package/resources/tictoccroc/icons/fill/check-fill.svg-0_5PrDLC.js +5 -0
  74. package/resources/tictoccroc/icons/fill/check-fill.svg-BKKTgIa3.cjs +1 -0
  75. package/resources/tictoccroc/icons/fill/index.d.ts +4 -0
  76. package/resources/tictoccroc/icons/fill/search-fill.svg-BvLNCg-N.cjs +1 -0
  77. package/resources/tictoccroc/icons/fill/search-fill.svg-DnxhncI6.js +5 -0
  78. package/resources/tictoccroc/icons/fill/time-fill.svg-CbMJxmhK.js +5 -0
  79. package/resources/tictoccroc/icons/fill/time-fill.svg-DcMfM75a.cjs +1 -0
  80. package/resources/tictoccroc/icons/index.ts-DI_CztBn.cjs +1 -0
  81. package/resources/tictoccroc/icons/index.ts-Dt89JG4Z.js +236 -0
  82. package/themes/tictoccroc/colors/background.d.ts +2 -2
  83. package/themes/tictoccroc/colors/blue.d.ts +1 -1
  84. package/themes/tictoccroc/colors/classType.d.ts +1 -1
  85. package/themes/tictoccroc/colors/etc.d.ts +2 -2
  86. package/themes/tictoccroc/colors/green.d.ts +1 -1
  87. package/themes/tictoccroc/colors/grey.d.ts +1 -1
  88. package/themes/tictoccroc/colors/pink.d.ts +1 -1
  89. package/themes/tictoccroc/colors/yellow.d.ts +1 -1
  90. package/themes/tictoccroc/parentLight.d.ts +1 -1
  91. package/themes/tictoccroc/teacherLight.d.ts +1 -1
  92. package/themes/tictoccroc/typography/body.d.ts +1 -1
  93. package/themes/tictoccroc/typography/caption.d.ts +1 -1
  94. package/themes/tictoccroc/typography/display.d.ts +1 -1
  95. package/themes/tictoccroc/typography/headline.d.ts +1 -1
  96. package/utils/getIconLabel/getIconLabel.cjs +1 -1
  97. package/utils/getIconLabel/getIconLabel.d.ts +1 -1
  98. package/utils/getIconLabel/getIconLabel.es.js +5 -1
  99. package/utils/getPaletteColor/getPaletteColor.d.ts +1 -1
  100. package/resources/tictoccroc/icons/index.ts-BmqvB_n6.cjs +0 -1
  101. package/resources/tictoccroc/icons/index.ts-CzTh-XsD.js +0 -228
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@emotion/react/jsx-runtime"),w=require("react"),y=require("../../Icon/Icon.cjs"),v=require("../../hooks/useCheckHoverPossible/useCheckHoverPossible.cjs"),S=require("@emotion/styled"),$=e=>e&&e.__esModule?e:{default:e},c=$(S),j=c.default.li`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("@emotion/react/jsx-runtime"),w=require("react"),y=require("../../Icon/Icon.cjs"),v=require("../../hooks/useCheckHoverPossible/useCheckHoverPossible.cjs"),S=require("@emotion/styled"),j=e=>e&&e.__esModule?e:{default:e},u=j(S),$=u.default.li`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  gap: ${({theme:{spacing:e}})=>e.content(2)}px;
@@ -15,19 +15,13 @@
15
15
 
16
16
  ${({ellipsis:e})=>e?{maxHeight:"40px"}:{}};
17
17
 
18
- ${({theme:{palette:{brand:e,grey:n}},selected:t,isHoverPossible:r})=>r?{"&:hover:not([disabled])":{backgroundColor:t?e.primary.bg:n[10]}}:{}}
19
-
20
- &:focus {
21
- outline: none;
22
- border: 2px solid
23
- ${({theme:{palette:{grey:e}}})=>e[100]};
24
- }
25
- `,k=c.default.div`
18
+ ${({theme:{palette:{brand:e,grey:n}},selected:t,isHoverPossible:r})=>r?{"&:hover:not([disabled]), &:focus:not([disabled])":{backgroundColor:t?e.primary.bg:n[10]}}:{}}
19
+ `,k=u.default.div`
26
20
  flex-grow: 1;
27
21
 
28
22
  ${({ellipsis:e})=>e?{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}:{}};
29
23
 
30
24
  ${({theme:{palette:{brand:e,grey:n},typography:{h5B:t,b4R:r}},selected:a,disabled:o})=>{let i={fontSize:r.size,fontWeight:r.weight,letterSpacing:r.letterSpacing,lineHeight:r.lineHeight};return a&&(i={fontSize:t.size,fontWeight:t.weight,letterSpacing:t.letterSpacing,lineHeight:t.lineHeight,color:e.primary.text}),o&&(i.color=n[30]),i}}}
31
- `,u=c.default.div`
25
+ `,c=u.default.div`
32
26
  white-space: nowrap;
33
- `,H=w.forwardRef(function({children:n,startAdornment:t,endAdornment:r,inlineCSS:a,selected:o,disabled:i,value:d,onClick:s,ellipsis:p=!0,...h},g){const{isHoverPossible:x}=v.default(),m=f=>{f.stopPropagation(),!i&&typeof s=="function"&&s(f)};return l.jsxs(j,{ref:g,selected:o,disabled:i,"data-value":d,isHoverPossible:x,onClick:m,ellipsis:p,role:"menuitem",...h,css:a,children:[t&&l.jsx(u,{children:t}),l.jsx(k,{selected:o,disabled:i,ellipsis:p,children:n}),!o&&r&&l.jsx(u,{children:r}),o&&l.jsx(u,{children:l.jsx(y.default,{name:"CheckLine",color:"primary"})})]})});exports.default=H;
27
+ `,H=w.forwardRef(function({children:n,startAdornment:t,endAdornment:r,inlineCSS:a,selected:o,disabled:i,value:d,onClick:s,ellipsis:p=!0,...h},g){const{isHoverPossible:x}=v.default(),m=f=>{f.stopPropagation(),!i&&typeof s=="function"&&s(f)};return l.jsxs($,{ref:g,selected:o,disabled:i,"data-value":d,isHoverPossible:x,onClick:m,ellipsis:p,role:"menuitem",...h,css:a,children:[t&&l.jsx(c,{children:t}),l.jsx(k,{selected:o,disabled:i,ellipsis:p,children:n}),!o&&r&&l.jsx(c,{children:r}),o&&l.jsx(c,{children:l.jsx(y.default,{name:"CheckLine",color:"primary"})})]})});exports.default=H;
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
- import { GeneralComponentProps } from '../../typings/component';
2
+ import { GeneralComponentProps } from '../../../typings/component';
3
3
 
4
4
  export interface MenuBlockProps extends GeneralComponentProps<HTMLAttributes<HTMLLIElement>> {
5
5
  startAdornment?: ReactNode;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as x, jsx as l } from "@emotion/react/jsx-runtime";
2
2
  import { forwardRef as w } from "react";
3
3
  import y from "../../Icon/Icon.es.js";
4
- import $ from "../../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
4
+ import k from "../../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
5
5
  import c from "@emotion/styled";
6
- const k = c.li`
6
+ const v = c.li`
7
7
  display: flex;
8
8
  align-items: center;
9
9
  gap: ${({ theme: { spacing: e } }) => e.content(2)}px;
@@ -21,11 +21,11 @@ const k = c.li`
21
21
  height: 20px;
22
22
  color: ${({
23
23
  theme: {
24
- palette: { brand: e, grey: o }
24
+ palette: { brand: e, grey: i }
25
25
  },
26
26
  selected: t,
27
27
  disabled: r
28
- }) => t ? e.primary.main : r ? o[30] : "inherit"};
28
+ }) => t ? e.primary.main : r ? i[30] : "inherit"};
29
29
  }
30
30
 
31
31
  ${({ ellipsis: e }) => e ? {
@@ -34,26 +34,16 @@ const k = c.li`
34
34
 
35
35
  ${({
36
36
  theme: {
37
- palette: { brand: e, grey: o }
37
+ palette: { brand: e, grey: i }
38
38
  },
39
39
  selected: t,
40
40
  isHoverPossible: r
41
41
  }) => r ? {
42
- "&:hover:not([disabled])": {
43
- backgroundColor: t ? e.primary.bg : o[10]
42
+ "&:hover:not([disabled]), &:focus:not([disabled])": {
43
+ backgroundColor: t ? e.primary.bg : i[10]
44
44
  }
45
45
  } : {}}
46
-
47
- &:focus {
48
- outline: none;
49
- border: 2px solid
50
- ${({
51
- theme: {
52
- palette: { grey: e }
53
- }
54
- }) => e[100]};
55
- }
56
- `, v = c.div`
46
+ `, $ = c.div`
57
47
  flex-grow: 1;
58
48
 
59
49
  ${({ ellipsis: e }) => e ? {
@@ -64,51 +54,51 @@ const k = c.li`
64
54
 
65
55
  ${({
66
56
  theme: {
67
- palette: { brand: e, grey: o },
57
+ palette: { brand: e, grey: i },
68
58
  typography: { h5B: t, b4R: r }
69
59
  },
70
60
  selected: p,
71
61
  disabled: n
72
62
  }) => {
73
- let i = {
63
+ let o = {
74
64
  fontSize: r.size,
75
65
  fontWeight: r.weight,
76
66
  letterSpacing: r.letterSpacing,
77
67
  lineHeight: r.lineHeight
78
68
  };
79
- return p && (i = {
69
+ return p && (o = {
80
70
  fontSize: t.size,
81
71
  fontWeight: t.weight,
82
72
  letterSpacing: t.letterSpacing,
83
73
  lineHeight: t.lineHeight,
84
74
  color: e.primary.text
85
- }), n && (i.color = o[30]), i;
75
+ }), n && (o.color = i[30]), o;
86
76
  }}}
87
77
  `, a = c.div`
88
78
  white-space: nowrap;
89
79
  `, M = w(function({
90
- children: o,
80
+ children: i,
91
81
  startAdornment: t,
92
82
  endAdornment: r,
93
83
  inlineCSS: p,
94
84
  selected: n,
95
- disabled: i,
85
+ disabled: o,
96
86
  value: u,
97
87
  onClick: h,
98
88
  ellipsis: f = !0,
99
89
  ...m
100
90
  }, g) {
101
- const { isHoverPossible: d } = $();
91
+ const { isHoverPossible: d } = k();
102
92
  return /* @__PURE__ */ x(
103
- k,
93
+ v,
104
94
  {
105
95
  ref: g,
106
96
  selected: n,
107
- disabled: i,
97
+ disabled: o,
108
98
  "data-value": u,
109
99
  isHoverPossible: d,
110
100
  onClick: (s) => {
111
- s.stopPropagation(), !i && typeof h == "function" && h(s);
101
+ s.stopPropagation(), !o && typeof h == "function" && h(s);
112
102
  },
113
103
  ellipsis: f,
114
104
  role: "menuitem",
@@ -116,7 +106,7 @@ const k = c.li`
116
106
  css: p,
117
107
  children: [
118
108
  t && /* @__PURE__ */ l(a, { children: t }),
119
- /* @__PURE__ */ l(v, { selected: n, disabled: i, ellipsis: f, children: o }),
109
+ /* @__PURE__ */ l($, { selected: n, disabled: o, ellipsis: f, children: i }),
120
110
  !n && r && /* @__PURE__ */ l(a, { children: r }),
121
111
  n && /* @__PURE__ */ l(a, { children: /* @__PURE__ */ l(y, { name: "CheckLine", color: "primary" }) })
122
112
  ]
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("@emotion/react/jsx-runtime"),u=require("react"),l=require("../../Button/Button.cjs"),m=u.forwardRef(function({isMenuOpen:n,menuId:a,onClick:o,...i},s){const t=u.useRef(),c=()=>{t.current&&cancelAnimationFrame(t.current),t.current=requestAnimationFrame(()=>{t.current=requestAnimationFrame(()=>{const e=document.getElementById(a);if(e){const r=e.querySelector('[role="menuitem"]');r==null||r.setAttribute("tabindex","0"),r==null||r.focus()}t.current=void 0})})},f=e=>{if(e.stopPropagation(),e.key==="ArrowDown"&&!n){o(e),c();return}if((e.key==="Enter"||e.key===" ")&&!n){o(e),c();return}};return u.useEffect(()=>()=>{t.current&&cancelAnimationFrame(t.current)},[]),d.jsx(l.default,{ref:s,type:"button","aria-haspopup":!0,"aria-expanded":n,"aria-controls":a,onKeyDown:f,onClick:o,...i})});exports.default=m;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@emotion/react/jsx-runtime"),r=require("react"),p=require("../../Button/Button.cjs"),v=r.forwardRef(function({isMenuOpen:n,menuId:a,onClick:u,...l},d){const c=r.useRef(null),t=r.useRef();r.useImperativeHandle(d,()=>c.current);const i=()=>{t.current&&cancelAnimationFrame(t.current);const e=(s=0)=>{const f=document.getElementById(a);if(f){const o=f.querySelector('[role="menuitem"]');if(o){o.setAttribute("tabindex","0"),o.focus(),t.current=void 0;return}}s<10?t.current=requestAnimationFrame(()=>{e(s+1)}):t.current=void 0};t.current=requestAnimationFrame(()=>{e()})},m=e=>{if(e.stopPropagation(),e.key==="ArrowDown"&&!n){e.preventDefault(),u(e),i();return}if((e.key==="Enter"||e.key===" ")&&!n){e.preventDefault(),u(e),i();return}};return r.useEffect(()=>()=>{t.current&&cancelAnimationFrame(t.current)},[]),y.jsx(p.default,{ref:c,type:"button","aria-haspopup":!0,"aria-expanded":n,"aria-controls":a,onKeyDown:m,onClick:u,...l})});exports.default=v;
@@ -1,5 +1,5 @@
1
1
  import { SyntheticEvent } from 'react';
2
- import { ButtonProps } from '../Button/Button';
2
+ import { ButtonProps } from '../../Button/Button';
3
3
 
4
4
  export interface MenuButtonProps extends ButtonProps {
5
5
  isMenuOpen: boolean;
@@ -1,44 +1,53 @@
1
- import { jsx as m } from "@emotion/react/jsx-runtime";
2
- import { forwardRef as s, useRef as d, useEffect as p } from "react";
3
- import y from "../../Button/Button.es.js";
4
- const F = s(function({ isMenuOpen: n, menuId: a, onClick: o, ...c }, i) {
5
- const t = d(), u = () => {
6
- t.current && cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
7
- t.current = requestAnimationFrame(() => {
8
- const r = document.getElementById(a);
9
- if (r) {
10
- const e = r.querySelector('[role="menuitem"]');
11
- e == null || e.setAttribute("tabindex", "0"), e == null || e.focus();
1
+ import { jsx as p } from "@emotion/react/jsx-runtime";
2
+ import { forwardRef as y, useRef as s, useImperativeHandle as A, useEffect as F } from "react";
3
+ import v from "../../Button/Button.es.js";
4
+ const x = y(function({ isMenuOpen: e, menuId: u, onClick: n, ...m }, l) {
5
+ const a = s(null), r = s();
6
+ A(l, () => a.current);
7
+ const i = () => {
8
+ r.current && cancelAnimationFrame(r.current);
9
+ const t = (c = 0) => {
10
+ const f = document.getElementById(u);
11
+ if (f) {
12
+ const o = f.querySelector('[role="menuitem"]');
13
+ if (o) {
14
+ o.setAttribute("tabindex", "0"), o.focus(), r.current = void 0;
15
+ return;
12
16
  }
13
- t.current = void 0;
14
- });
17
+ }
18
+ c < 10 ? r.current = requestAnimationFrame(() => {
19
+ t(c + 1);
20
+ }) : r.current = void 0;
21
+ };
22
+ r.current = requestAnimationFrame(() => {
23
+ t();
15
24
  });
16
- }, f = (r) => {
17
- if (r.stopPropagation(), r.key === "ArrowDown" && !n) {
18
- o(r), u();
25
+ }, d = (t) => {
26
+ if (t.stopPropagation(), t.key === "ArrowDown" && !e) {
27
+ t.preventDefault(), n(t), i();
19
28
  return;
20
29
  }
21
- if ((r.key === "Enter" || r.key === " ") && !n) {
22
- o(r), u();
30
+ if ((t.key === "Enter" || t.key === " ") && !e) {
31
+ t.preventDefault(), n(t), i();
23
32
  return;
24
33
  }
25
34
  };
26
- return p(() => () => {
27
- t.current && cancelAnimationFrame(t.current);
28
- }, []), /* @__PURE__ */ m(
29
- y,
35
+ return F(() => () => {
36
+ r.current && cancelAnimationFrame(r.current);
37
+ }, []), /* @__PURE__ */ p(
38
+ v,
30
39
  {
31
- ref: i,
40
+ ref: a,
32
41
  type: "button",
33
42
  "aria-haspopup": !0,
34
- "aria-expanded": n,
35
- "aria-controls": a,
36
- onKeyDown: f,
37
- onClick: o,
38
- ...c
43
+ "aria-expanded": e,
44
+ "aria-controls": u,
45
+ onKeyDown: d,
46
+ onClick: n,
47
+ ...m
39
48
  }
40
49
  );
41
50
  });
42
51
  export {
43
- F as default
52
+ x as default
44
53
  };
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
- import { GeneralComponentProps, Size } from '../typings/component';
3
- import { CSSValue } from '../typings/utility';
2
+ import { GeneralComponentProps, Size } from '../../typings/component';
3
+ import { CSSValue } from '../../typings/utility';
4
4
  import { default as NumberKeypadBlock } from './NumberKeypadBlock';
5
5
 
6
6
  export interface NumberKeypadProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { GeneralComponentProps } from '../../typings/component';
2
+ import { GeneralComponentProps } from '../../../typings/component';
3
3
  import { NumberKeypadProps } from '../NumberKeypad';
4
4
 
5
5
  export interface NumberKeypadBlockProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement> & Pick<NumberKeypadProps, 'size' | 'disabled'>> {
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { BrandColorKey } from '../typings/color';
3
- import { GeneralComponentProps } from '../typings/component';
2
+ import { BrandColorKey } from '../../typings/color';
3
+ import { GeneralComponentProps } from '../../typings/component';
4
4
 
5
5
  export interface PageControlProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'onClick'>> {
6
6
  totalCount?: number;
package/Radio/Radio.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { InputHTMLAttributes } from 'react';
2
- import { BrandColorKey } from '../typings/color';
3
- import { GeneralComponentProps, Size } from '../typings/component';
2
+ import { BrandColorKey } from '../../typings/color';
3
+ import { GeneralComponentProps, Size } from '../../typings/component';
4
4
 
5
5
  export interface RadioProps extends GeneralComponentProps<Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>> {
6
6
  size?: Extract<Size, 'medium' | '2xLarge'>;
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { GeneralComponentProps } from '../typings/component';
2
+ import { GeneralComponentProps } from '../../typings/component';
3
3
 
4
4
  export interface RadioGroupProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
5
5
  name?: string;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactElement } from 'react';
2
- import { BrandColorKey } from '../typings/color';
3
- import { GeneralComponentProps, Variant } from '../typings/component';
2
+ import { BrandColorKey } from '../../typings/color';
3
+ import { GeneralComponentProps, Variant } from '../../typings/component';
4
4
  import { default as SegmentedButtonBlock } from './SegmentedButtonBlock';
5
5
 
6
6
  export interface SegmentedButtonProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
@@ -1,5 +1,5 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from 'react';
2
- import { GeneralComponentProps } from '../../typings/component';
2
+ import { GeneralComponentProps } from '../../../typings/component';
3
3
  import { SegmentedButtonProps } from '../SegmentedButton';
4
4
 
5
5
  export interface SegmentedButtonBlockProps extends GeneralComponentProps<ButtonHTMLAttributes<HTMLButtonElement> & Pick<SegmentedButtonProps, 'variant' | 'color' | 'rounded'>> {
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
- import { GeneralComponentProps } from '../../typings/component';
2
+ import { GeneralComponentProps } from '../../../typings/component';
3
3
 
4
4
  export interface OptionProps extends GeneralComponentProps<HTMLAttributes<HTMLLIElement>> {
5
5
  value?: string;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
2
  import { default as Option } from './Option';
3
- import { GeneralComponentProps, Size, Variant } from '../typings/component';
3
+ import { GeneralComponentProps, Size, Variant } from '../../typings/component';
4
4
 
5
5
  export interface SelectProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
6
6
  value: string;
@@ -1,7 +1,7 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { GeneralComponentProps } from '../typings/component';
3
- import { TypographyBodyKey, TypographyCaptionKey, TypographyHeadlineKey } from '../typings/typography';
4
- import { CSSValue } from '../typings/utility';
2
+ import { GeneralComponentProps } from '../../typings/component';
3
+ import { TypographyBodyKey, TypographyCaptionKey, TypographyHeadlineKey } from '../../typings/typography';
4
+ import { CSSValue } from '../../typings/utility';
5
5
 
6
6
  export interface SkeletonProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
7
7
  ratio?: `${number}:${number}`;
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { GeneralComponentProps } from '../typings/component';
2
+ import { GeneralComponentProps } from '../../typings/component';
3
3
 
4
4
  export interface SliderProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
5
5
  value: number;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactNode, RefObject } from 'react';
2
- import { BrandColorKey } from '../typings/color';
3
- import { GeneralComponentProps } from '../typings/component';
2
+ import { BrandColorKey } from '../../typings/color';
3
+ import { GeneralComponentProps } from '../../typings/component';
4
4
 
5
5
  export interface SnackbarProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
6
6
  open?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { ChangeEventHandler, HTMLAttributes } from 'react';
2
- import { GeneralComponentProps } from '../typings/component';
2
+ import { GeneralComponentProps } from '../../typings/component';
3
3
 
4
4
  export interface SwitchProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
5
5
  selected: boolean;
package/Tab/Tab.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes } from 'react';
2
- import { GeneralComponentProps, Size } from '../typings/component';
2
+ import { GeneralComponentProps, Size } from '../../typings/component';
3
3
 
4
4
  export interface TabProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
5
5
  value: string;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, MouseEvent } from 'react';
2
2
  import { TabProps } from '../Tab';
3
- import { GeneralComponentProps } from '../../typings/component';
3
+ import { GeneralComponentProps } from '../../../typings/component';
4
4
 
5
5
  export interface TabBlockProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement> & Pick<TabProps, 'size'>> {
6
6
  value: string;
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, TextareaHTMLAttributes } from 'react';
2
- import { GeneralComponentProps, Size, Variant } from '../typings/component';
2
+ import { GeneralComponentProps, Size, Variant } from '../../typings/component';
3
3
 
4
4
  export interface TextAreaProps extends GeneralComponentProps<TextareaHTMLAttributes<HTMLTextAreaElement>> {
5
5
  value: string;
@@ -1,5 +1,5 @@
1
1
  import { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
2
- import { GeneralComponentProps, Size, Variant } from '../typings/component';
2
+ import { GeneralComponentProps, Size, Variant } from '../../typings/component';
3
3
 
4
4
  export interface TextFieldProps extends GeneralComponentProps<Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>> {
5
5
  variant?: Extract<Variant, 'outlined' | 'filled'>;
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const x=require("@emotion/react/jsx-runtime"),s=require("react"),$=require("../Flexbox/Flexbox.cjs"),I=require("../Icon/Icon.cjs"),z=require("../Typography/Typography.cjs"),M=require("../hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs"),X=require("@emotion/styled"),N=t=>t&&t.__esModule?t:{default:t},q=N(X),F=q.default.div`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("@emotion/react/jsx-runtime"),s=require("react"),y=require("../Flexbox/Flexbox.cjs"),j=require("../Icon/Icon.cjs"),X=require("../Typography/Typography.cjs"),N=require("../hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs"),F=require("@emotion/styled"),H=t=>t&&t.__esModule?t:{default:t},q=H(F),V=q.default.div`
2
2
  position: relative;
3
3
  display: inline-block;
4
4
  &[open] > .tooltip {
5
5
  display: flex;
6
6
  }
7
- `,H=q.default.div`
7
+ `,W=q.default.div`
8
8
  position: absolute;
9
9
  display: none;
10
10
  flex-direction: column;
@@ -19,9 +19,9 @@
19
19
  white-space: nowrap;
20
20
  word-break: break-all;
21
21
 
22
- ${({theme:{palette:{brand:t,grey:r}},color:f})=>{let e={};return f==="primary"&&(e={backgroundColor:t.primary.tooltip,color:r[100]}),f==="secondary"&&(e={backgroundColor:r[80],color:r.white}),e}}
22
+ ${({theme:{palette:{brand:t,grey:r}},color:m})=>{let e={};return m==="primary"&&(e={backgroundColor:t.primary.tooltip,color:r[100]}),m==="secondary"&&(e={backgroundColor:r[80],color:r.white}),e}}
23
23
 
24
24
  ${({theme:{typography:t}})=>({fontSize:t.b4R.size,fontWeight:t.b4R.weight,lineHeight:t.b4R.lineHeight,letterSpacing:t.b4R.letterSpacing,"& svg:not(.tooltip-closer)":{width:24,height:24}})};
25
25
 
26
- ${({theme:{palette:{brand:t,grey:r}},placement:f,color:e,offset:c,arrowOffset:d})=>{let o={};const n=(c==null?void 0:c.x)||0,p=(c==null?void 0:c.y)||0,l=(d==null?void 0:d.x)||0,a=(d==null?void 0:d.y)||0;switch(f){case"bottom-left":o={top:`calc(-12px + ${p}px)`,left:`calc(-6px + ${n}px)`,transform:"translateY(-100%)","&:after":{content:'""',position:"absolute",top:"100%",left:`calc(12px + ${l}px)`,borderTop:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderRight:"6px solid transparent",borderBottom:"8px solid transparent",borderLeft:"6px solid transparent"}};break;case"bottom-center":o={top:`calc(-12px + ${p}px)`,left:"50%",transform:`translate(calc(-50% + ${n}px), -100%)`,"&:after":{content:'""',position:"absolute",top:"100%",left:`calc(50% + ${l}px)`,transform:"translateX(-50%)",borderTop:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderRight:"6px solid transparent",borderBottom:"8px solid transparent",borderLeft:"6px solid transparent"}};break;case"bottom-right":o={top:`calc(-12px + ${p}px)`,right:`calc(-6px - ${n}px)`,transform:"translateY(-100%)","&:after":{content:'""',position:"absolute",top:"100%",right:`calc(12px - ${l}px)`,borderTop:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderRight:"6px solid transparent",borderBottom:"8px solid transparent",borderLeft:"6px solid transparent"}};break;case"left-top":o={top:`calc(-6px + ${p}px)`,left:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",top:`calc(12px + ${a}px)`,right:"100%",borderTop:"6px solid transparent",borderRight:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderBottom:"6px solid transparent",borderLeft:"8px solid transparent"}};break;case"left-middle":o={top:"50%",left:`calc(100% + 12px + ${n}px)`,transform:`translateY(calc(-50% + ${p}px))`,"&:after":{content:'""',position:"absolute",top:`calc(50% + ${a}px)`,right:"100%",transform:"translateY(-50%)",borderTop:"6px solid transparent",borderRight:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderBottom:"6px solid transparent",borderLeft:"8px solid transparent"}};break;case"left-bottom":o={bottom:`calc(-6px - ${p}px)`,left:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",bottom:`calc(12px - ${a}px)`,right:"100%",borderTop:"6px solid transparent",borderRight:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderBottom:"6px solid transparent",borderLeft:"8px solid transparent"}};break;case"top-left":o={left:`calc(-6px + ${n}px)`,transform:`translate(0, calc(12px + ${p}px))`,"&:after":{content:'""',position:"absolute",bottom:"100%",left:`calc(12px + ${l}px)`,borderTop:"8px solid transparent",borderRight:"6px solid transparent",borderBottom:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderLeft:"6px solid transparent"}};break;case"top-center":o={right:"50%",transform:`translate(calc(50% + ${n}px), calc(12px + ${p}px))`,"&:after":{content:'""',position:"absolute",bottom:"100%",left:`calc(50% + ${l}px)`,transform:"translateX(-50%)",borderTop:"8px solid transparent",borderRight:"6px solid transparent",borderBottom:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderLeft:"6px solid transparent"}};break;case"top-right":o={right:`calc(-6px - ${n}px)`,transform:`translate(0, calc(12px + ${p}px))`,"&:after":{content:'""',position:"absolute",bottom:"100%",right:`calc(12px - ${l}px)`,borderTop:"8px solid transparent",borderRight:"6px solid transparent",borderBottom:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderLeft:"6px solid transparent"}};break;case"right-top":o={top:`calc(-6px + ${p}px)`,right:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",top:`calc(12px + ${a}px)`,left:"100%",borderTop:"6px solid transparent",borderRight:"8px solid transparent",borderBottom:"6px solid transparent",borderLeft:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`}};break;case"right-middle":o={top:"50%",right:`calc(100% + 12px + ${n}px)`,transform:`translateY(calc(-50% + ${p}px))`,"&:after":{content:'""',position:"absolute",top:`calc(50% + ${a}px)`,left:"100%",transform:"translateY(-50%)",borderTop:"6px solid transparent",borderRight:"8px solid transparent",borderBottom:"6px solid transparent",borderLeft:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`}};break;case"right-bottom":o={bottom:`calc(-6px - ${p}px)`,right:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",bottom:`calc(12px - ${a}px)`,left:"100%",borderTop:"6px solid transparent",borderRight:"8px solid transparent",borderBottom:"6px solid transparent",borderLeft:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`}};break}return o}};
27
- `,V=s.forwardRef(function({children:r,placement:f="bottom-center",color:e="primary",title:c,body:d,closer:o,endAdornment:n,inlineCSS:p,open:l=!1,onClose:a,wrapperProps:y,offset:E,arrowOffset:K,...g},Y){const C=s.useId(),T=s.useId(),L=s.useId(),{isKeyboardMode:k}=M.default(),S=s.useRef(null),R=s.useRef(null),v=s.useRef(!0),[D,_]=s.useState(!1),w=(g==null?void 0:g.id)||C,B=i=>{(i.key==="Enter"||i.key===" ")&&(a==null||a(i))};return s.useEffect(()=>{R.current&&R.current.getBoundingClientRect().width>=276&&_(!0)},[l]),s.useEffect(()=>{const i=u=>{u.key==="Escape"&&l&&(u.stopPropagation(),a==null||a(u))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[l,a]),s.useEffect(()=>{var u,m,b;if(v.current){v.current=!1;return}if(l){const h=(u=S.current)==null?void 0:u.querySelector('.tooltip-closer[role="button"]');if(h&&k&&h.focus(),!h){const j=(m=S.current)==null?void 0:m.querySelector('[role="button"]');j&&k&&j.focus()}return}const i=(b=S.current)==null?void 0:b.querySelector('[role="button"]');i&&k&&i.focus()},[l,k]),x.jsxs(F,{ref:S,open:l,...y,css:y==null?void 0:y.inlineCSS,children:[s.Children.map(r,i=>{if(!s.isValidElement(i))return i;const u=m=>{var b,h;(m.key==="Enter"||m.key===" ")&&((h=(b=i.props)==null?void 0:b.onClick)==null||h.call(b,m))};return s.cloneElement(i,{inlineCSS:{cursor:"pointer","&:active":{outline:"none"},...i.props.inlineCSS},role:"button",tabIndex:0,"aria-hidden":!1,"aria-expanded":l,"aria-haspopup":"dialog","aria-controls":w,focusable:!0,onKeyDown:u,...i.props})}),x.jsxs(H,{id:w,className:"tooltip",role:"dialog","aria-modal":"true","aria-labelledby":c?T:void 0,"aria-describedby":d?L:void 0,ref:Y,placement:f,color:e,offset:E,arrowOffset:K,...g,css:p,children:[c&&x.jsxs($.default,{alignItems:"center",justifyContent:"space-between",gap:2,children:[x.jsx(z.default,{id:T,variant:"h5B",color:e==="primary"?"grey.100":"grey.white",children:c}),o&&x.jsx($.default,{flexShrink:0,children:x.jsx(I.default,{className:"tooltip-closer",name:"CloseLine",size:"xSmall",color:e==="primary"?"grey.100":"grey.white",role:"button","aria-hidden":"false",focusable:"true",tabIndex:0,onClick:a,onKeyDown:B,"aria-label":"닫기",inlineCSS:{marginLeft:"2px",cursor:"pointer","&:active":{outline:"none"}}})})]}),d&&x.jsxs($.default,{id:L,alignItems:"center",gap:2,ref:R,style:D?{width:"276px",whiteSpace:"wrap"}:{},children:[d,n&&x.jsx($.default,{flexShrink:0,inlineCSS:{fontSize:"24px"},children:n}),!c&&o&&x.jsx($.default,{flexShrink:0,children:x.jsx(I.default,{className:"tooltip-closer",name:"CloseLine",size:"xSmall",color:e==="primary"?"grey.100":"grey.white",role:"button","aria-hidden":"false",focusable:"true",tabIndex:0,onClick:a,onKeyDown:B,"aria-label":"닫기",inlineCSS:{marginLeft:"2px",cursor:"pointer","&:active":{outline:"none"}}})})]})]})]})});exports.default=V;
26
+ ${({theme:{palette:{brand:t,grey:r}},placement:m,color:e,offset:c,arrowOffset:d})=>{let o={};const n=(c==null?void 0:c.x)||0,l=(c==null?void 0:c.y)||0,p=(d==null?void 0:d.x)||0,a=(d==null?void 0:d.y)||0;switch(m){case"bottom-left":o={top:`calc(-12px + ${l}px)`,left:`calc(-6px + ${n}px)`,transform:"translateY(-100%)","&:after":{content:'""',position:"absolute",top:"100%",left:`calc(12px + ${p}px)`,borderTop:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderRight:"6px solid transparent",borderBottom:"8px solid transparent",borderLeft:"6px solid transparent"}};break;case"bottom-center":o={top:`calc(-12px + ${l}px)`,left:"50%",transform:`translate(calc(-50% + ${n}px), -100%)`,"&:after":{content:'""',position:"absolute",top:"100%",left:`calc(50% + ${p}px)`,transform:"translateX(-50%)",borderTop:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderRight:"6px solid transparent",borderBottom:"8px solid transparent",borderLeft:"6px solid transparent"}};break;case"bottom-right":o={top:`calc(-12px + ${l}px)`,right:`calc(-6px - ${n}px)`,transform:"translateY(-100%)","&:after":{content:'""',position:"absolute",top:"100%",right:`calc(12px - ${p}px)`,borderTop:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderRight:"6px solid transparent",borderBottom:"8px solid transparent",borderLeft:"6px solid transparent"}};break;case"left-top":o={top:`calc(-6px + ${l}px)`,left:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",top:`calc(12px + ${a}px)`,right:"100%",borderTop:"6px solid transparent",borderRight:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderBottom:"6px solid transparent",borderLeft:"8px solid transparent"}};break;case"left-middle":o={top:"50%",left:`calc(100% + 12px + ${n}px)`,transform:`translateY(calc(-50% + ${l}px))`,"&:after":{content:'""',position:"absolute",top:`calc(50% + ${a}px)`,right:"100%",transform:"translateY(-50%)",borderTop:"6px solid transparent",borderRight:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderBottom:"6px solid transparent",borderLeft:"8px solid transparent"}};break;case"left-bottom":o={bottom:`calc(-6px - ${l}px)`,left:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",bottom:`calc(12px - ${a}px)`,right:"100%",borderTop:"6px solid transparent",borderRight:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderBottom:"6px solid transparent",borderLeft:"8px solid transparent"}};break;case"top-left":o={left:`calc(-6px + ${n}px)`,transform:`translate(0, calc(12px + ${l}px))`,"&:after":{content:'""',position:"absolute",bottom:"100%",left:`calc(12px + ${p}px)`,borderTop:"8px solid transparent",borderRight:"6px solid transparent",borderBottom:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderLeft:"6px solid transparent"}};break;case"top-center":o={right:"50%",transform:`translate(calc(50% + ${n}px), calc(12px + ${l}px))`,"&:after":{content:'""',position:"absolute",bottom:"100%",left:`calc(50% + ${p}px)`,transform:"translateX(-50%)",borderTop:"8px solid transparent",borderRight:"6px solid transparent",borderBottom:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderLeft:"6px solid transparent"}};break;case"top-right":o={right:`calc(-6px - ${n}px)`,transform:`translate(0, calc(12px + ${l}px))`,"&:after":{content:'""',position:"absolute",bottom:"100%",right:`calc(12px - ${p}px)`,borderTop:"8px solid transparent",borderRight:"6px solid transparent",borderBottom:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`,borderLeft:"6px solid transparent"}};break;case"right-top":o={top:`calc(-6px + ${l}px)`,right:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",top:`calc(12px + ${a}px)`,left:"100%",borderTop:"6px solid transparent",borderRight:"8px solid transparent",borderBottom:"6px solid transparent",borderLeft:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`}};break;case"right-middle":o={top:"50%",right:`calc(100% + 12px + ${n}px)`,transform:`translateY(calc(-50% + ${l}px))`,"&:after":{content:'""',position:"absolute",top:`calc(50% + ${a}px)`,left:"100%",transform:"translateY(-50%)",borderTop:"6px solid transparent",borderRight:"8px solid transparent",borderBottom:"6px solid transparent",borderLeft:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`}};break;case"right-bottom":o={bottom:`calc(-6px - ${l}px)`,right:`calc(100% + 12px + ${n}px)`,"&:after":{content:'""',position:"absolute",bottom:`calc(12px - ${a}px)`,left:"100%",borderTop:"6px solid transparent",borderRight:"8px solid transparent",borderBottom:"6px solid transparent",borderLeft:`8px solid ${e==="primary"?t.primary.tooltip:r[80]}`}};break}return o}};
27
+ `,G=s.forwardRef(function({children:r,placement:m="bottom-center",color:e="primary",title:c,body:d,closer:o,endAdornment:n,inlineCSS:l,open:p=!1,onClose:a,wrapperProps:g,offset:E,arrowOffset:K,...x},Y){const C=s.useId(),D=s.useId(),_=s.useId(),{isKeyboardMode:k}=N.default(),S=s.useRef(null),R=s.useRef(null),T=s.useRef(!0),[z,M]=s.useState(!1),I=(x==null?void 0:x.id)||C,B=(x==null?void 0:x.titleId)||D,L=(x==null?void 0:x.bodyId)||_,v=i=>{(i.key==="Enter"||i.key===" ")&&(a==null||a(i))};return s.useEffect(()=>{R.current&&R.current.getBoundingClientRect().width>=276&&M(!0)},[p]),s.useEffect(()=>{const i=b=>{b.key==="Escape"&&p&&(b.stopPropagation(),a==null||a(b))};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[p,a]),s.useEffect(()=>{var b,h,f;if(T.current){T.current=!1;return}if(p){const $=(b=S.current)==null?void 0:b.querySelector('.tooltip-closer[role="button"]');if($&&k&&$.focus(),!$){const w=(h=S.current)==null?void 0:h.querySelector('[role="button"]');w&&k&&w.focus()}return}const i=(f=S.current)==null?void 0:f.querySelector('[role="button"]');i&&k&&i.focus()},[p,k]),u.jsxs(V,{ref:S,open:p,...g,css:g==null?void 0:g.inlineCSS,children:[s.Children.map(r,i=>{if(!s.isValidElement(i))return i;const b=h=>{var f,$;(h.key==="Enter"||h.key===" ")&&(($=(f=i.props)==null?void 0:f.onClick)==null||$.call(f,h))};return s.cloneElement(i,{inlineCSS:{cursor:"pointer","&:active":{outline:"none"},...i.props.inlineCSS},role:"button",tabIndex:0,"aria-hidden":!1,"aria-expanded":p,"aria-haspopup":"dialog","aria-controls":I,focusable:!0,onKeyDown:b,...i.props})}),u.jsxs(W,{id:I,className:"tooltip",role:"dialog","aria-modal":"true","aria-labelledby":c?B:void 0,"aria-describedby":d?L:void 0,ref:Y,placement:m,color:e,offset:E,arrowOffset:K,...x,css:l,children:[c&&u.jsxs(y.default,{alignItems:"center",justifyContent:"space-between",gap:2,children:[u.jsx(X.default,{id:B,variant:"h5B",color:e==="primary"?"grey.100":"grey.white",children:c}),o&&u.jsx(y.default,{flexShrink:0,children:u.jsx(j.default,{className:"tooltip-closer",name:"CloseLine",size:"xSmall",color:e==="primary"?"grey.100":"grey.white",role:"button","aria-hidden":"false",focusable:"true",tabIndex:0,onClick:a,onKeyDown:v,"aria-label":"닫기",inlineCSS:{marginLeft:"2px",cursor:"pointer","&:active":{outline:"none"}}})})]}),d&&u.jsxs(y.default,{id:L,alignItems:"center",gap:2,ref:R,style:z?{width:"276px",whiteSpace:"wrap"}:{},children:[d,n&&u.jsx(y.default,{flexShrink:0,inlineCSS:{fontSize:"24px"},children:n}),!c&&o&&u.jsx(y.default,{flexShrink:0,children:u.jsx(j.default,{className:"tooltip-closer",name:"CloseLine",size:"xSmall",color:e==="primary"?"grey.100":"grey.white",role:"button","aria-hidden":"false",focusable:"true",tabIndex:0,onClick:a,onKeyDown:v,"aria-label":"닫기",inlineCSS:{marginLeft:"2px",cursor:"pointer","&:active":{outline:"none"}}})})]})]})]})});exports.default=G;
@@ -1,6 +1,6 @@
1
1
  import { HTMLAttributes, ReactNode, SyntheticEvent } from 'react';
2
- import { BrandColorKey } from '../typings/color';
3
- import { GeneralComponentProps } from '../typings/component';
2
+ import { BrandColorKey } from '../../typings/color';
3
+ import { GeneralComponentProps } from '../../typings/component';
4
4
 
5
5
  export interface TooltipOffset {
6
6
  x?: number;
@@ -18,6 +18,8 @@ export interface TooltipProps extends GeneralComponentProps<Omit<HTMLAttributes<
18
18
  wrapperProps?: GeneralComponentProps<HTMLAttributes<HTMLDivElement>>;
19
19
  offset?: TooltipOffset;
20
20
  arrowOffset?: TooltipOffset;
21
+ titleId?: string;
22
+ bodyId?: string;
21
23
  }
22
24
  declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLDivElement>>;
23
25
  export default Tooltip;