@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.
- package/Accordion/Accordion.d.ts +1 -1
- package/Backdrop/Backdrop.d.ts +1 -1
- package/Badge/Badge.d.ts +3 -3
- package/BottomSheet/BottomSheet.d.ts +1 -1
- package/BottomSheet/BottomSheetAction/BottomSheetAction.d.ts +1 -1
- package/BottomSheet/BottomSheetContent/BottomSheetContent.d.ts +1 -1
- package/BottomSheet/BottomSheetText/BottomSheetText.d.ts +1 -1
- package/BottomSheet/BottomSheetTitle/BottomSheetTitle.d.ts +1 -1
- package/Box/Box.d.ts +1 -1
- package/Button/Button.d.ts +2 -2
- package/Button/index.d.ts +1 -0
- package/Card/Card.d.ts +1 -1
- package/ChainPicker/ChainPicker.d.ts +1 -1
- package/Checkbox/Checkbox.d.ts +2 -2
- package/Chip/Chip.d.ts +1 -1
- package/CircularProgressIndicator/CircularProgressIndicator.d.ts +1 -1
- package/DatePicker/DatePicker.cjs +40 -30
- package/DatePicker/DatePicker.d.ts +2 -1
- package/DatePicker/DatePicker.es.js +477 -301
- package/DatePicker/EventDot/EventDot.d.ts +1 -1
- package/DatePicker/EventDotGroup/EventDotGroup.cjs +3 -3
- package/DatePicker/EventDotGroup/EventDotGroup.d.ts +1 -1
- package/DatePicker/EventDotGroup/EventDotGroup.es.js +14 -14
- package/Dialog/Dialog.d.ts +1 -1
- package/Dialog/DialogText/DialogText.d.ts +1 -1
- package/Dialog/DialogTitle/DialogTitle.d.ts +1 -1
- package/Flexbox/Flexbox.d.ts +1 -1
- package/FocusBoundary/FocusBoundary.d.ts +1 -1
- package/FormControlText/FormControlText.cjs +2 -2
- package/FormControlText/FormControlText.d.ts +1 -1
- package/FormControlText/FormControlText.es.js +14 -14
- package/Icon/Icon.cjs +1 -1
- package/Icon/Icon.d.ts +2 -2
- package/Icon/Icon.es.js +1 -1
- package/IconButton/IconButton.d.ts +2 -2
- package/Label/Label.d.ts +4 -4
- package/LineProgressIndicator/LineProgressIndicator.d.ts +1 -1
- package/Menu/Menu.cjs +6 -6
- package/Menu/Menu.d.ts +1 -1
- package/Menu/Menu.es.js +83 -79
- package/Menu/MenuBlock/MenuBlock.cjs +5 -11
- package/Menu/MenuBlock/MenuBlock.d.ts +1 -1
- package/Menu/MenuBlock/MenuBlock.es.js +19 -29
- package/Menu/MenuButton/MenuButton.cjs +1 -1
- package/Menu/MenuButton/MenuButton.d.ts +1 -1
- package/Menu/MenuButton/MenuButton.es.js +38 -29
- package/NumberKeypad/NumberKeypad.d.ts +2 -2
- package/NumberKeypad/NumberKeypadBlock/NumberKeypadBlock.d.ts +1 -1
- package/PageControl/PageControl.d.ts +2 -2
- package/Radio/Radio.d.ts +2 -2
- package/RadioGroup/RadioGroup.d.ts +1 -1
- package/SegmentedButton/SegmentedButton.d.ts +2 -2
- package/SegmentedButton/SegmentedButtonBlock/SegmentedButtonBlock.d.ts +1 -1
- package/Select/Option/Option.d.ts +1 -1
- package/Select/Select.d.ts +1 -1
- package/Skeleton/Skeleton.d.ts +3 -3
- package/Slider/Slider.d.ts +1 -1
- package/Snackbar/Snackbar.d.ts +2 -2
- package/Switch/Switch.d.ts +1 -1
- package/Tab/Tab.d.ts +1 -1
- package/Tab/TabBlock/TabBlock.d.ts +1 -1
- package/TextArea/TextArea.d.ts +1 -1
- package/TextField/TextField.d.ts +1 -1
- package/Tooltip/Tooltip.cjs +5 -5
- package/Tooltip/Tooltip.d.ts +4 -2
- package/Tooltip/Tooltip.es.js +84 -84
- package/Typography/Typography.d.ts +2 -2
- package/package.json +1 -1
- package/resources/tictoccroc/icons/fill/alphabet-fill.svg-CvfRsdBW.js +5 -0
- package/resources/tictoccroc/icons/fill/alphabet-fill.svg-HBXWjzrC.cjs +1 -0
- package/resources/tictoccroc/icons/fill/{certified-fill.svg-B_RVx6K_.cjs → certified-fill.svg-DA375i9-.cjs} +1 -1
- package/resources/tictoccroc/icons/fill/{certified-fill.svg-CK7UqYft.js → certified-fill.svg-DBC-EEKD.js} +1 -1
- package/resources/tictoccroc/icons/fill/check-fill.svg-0_5PrDLC.js +5 -0
- package/resources/tictoccroc/icons/fill/check-fill.svg-BKKTgIa3.cjs +1 -0
- package/resources/tictoccroc/icons/fill/index.d.ts +4 -0
- package/resources/tictoccroc/icons/fill/search-fill.svg-BvLNCg-N.cjs +1 -0
- package/resources/tictoccroc/icons/fill/search-fill.svg-DnxhncI6.js +5 -0
- package/resources/tictoccroc/icons/fill/time-fill.svg-CbMJxmhK.js +5 -0
- package/resources/tictoccroc/icons/fill/time-fill.svg-DcMfM75a.cjs +1 -0
- package/resources/tictoccroc/icons/index.ts-DI_CztBn.cjs +1 -0
- package/resources/tictoccroc/icons/index.ts-Dt89JG4Z.js +236 -0
- package/themes/tictoccroc/colors/background.d.ts +2 -2
- package/themes/tictoccroc/colors/blue.d.ts +1 -1
- package/themes/tictoccroc/colors/classType.d.ts +1 -1
- package/themes/tictoccroc/colors/etc.d.ts +2 -2
- package/themes/tictoccroc/colors/green.d.ts +1 -1
- package/themes/tictoccroc/colors/grey.d.ts +1 -1
- package/themes/tictoccroc/colors/pink.d.ts +1 -1
- package/themes/tictoccroc/colors/yellow.d.ts +1 -1
- package/themes/tictoccroc/parentLight.d.ts +1 -1
- package/themes/tictoccroc/teacherLight.d.ts +1 -1
- package/themes/tictoccroc/typography/body.d.ts +1 -1
- package/themes/tictoccroc/typography/caption.d.ts +1 -1
- package/themes/tictoccroc/typography/display.d.ts +1 -1
- package/themes/tictoccroc/typography/headline.d.ts +1 -1
- package/utils/getIconLabel/getIconLabel.cjs +1 -1
- package/utils/getIconLabel/getIconLabel.d.ts +1 -1
- package/utils/getIconLabel/getIconLabel.es.js +5 -1
- package/utils/getPaletteColor/getPaletteColor.d.ts +1 -1
- package/resources/tictoccroc/icons/index.ts-BmqvB_n6.cjs +0 -1
- 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")
|
|
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
|
|
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(
|
|
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 '
|
|
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
|
|
4
|
+
import k from "../../hooks/useCheckHoverPossible/useCheckHoverPossible.es.js";
|
|
5
5
|
import c from "@emotion/styled";
|
|
6
|
-
const
|
|
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:
|
|
24
|
+
palette: { brand: e, grey: i }
|
|
25
25
|
},
|
|
26
26
|
selected: t,
|
|
27
27
|
disabled: r
|
|
28
|
-
}) => t ? e.primary.main : r ?
|
|
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:
|
|
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 :
|
|
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:
|
|
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
|
|
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 && (
|
|
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 && (
|
|
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:
|
|
80
|
+
children: i,
|
|
91
81
|
startAdornment: t,
|
|
92
82
|
endAdornment: r,
|
|
93
83
|
inlineCSS: p,
|
|
94
84
|
selected: n,
|
|
95
|
-
disabled:
|
|
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
|
-
|
|
93
|
+
v,
|
|
104
94
|
{
|
|
105
95
|
ref: g,
|
|
106
96
|
selected: n,
|
|
107
|
-
disabled:
|
|
97
|
+
disabled: o,
|
|
108
98
|
"data-value": u,
|
|
109
99
|
isHoverPossible: d,
|
|
110
100
|
onClick: (s) => {
|
|
111
|
-
s.stopPropagation(), !
|
|
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(
|
|
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
|
|
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,44 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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
|
-
},
|
|
17
|
-
if (
|
|
18
|
-
|
|
25
|
+
}, d = (t) => {
|
|
26
|
+
if (t.stopPropagation(), t.key === "ArrowDown" && !e) {
|
|
27
|
+
t.preventDefault(), n(t), i();
|
|
19
28
|
return;
|
|
20
29
|
}
|
|
21
|
-
if ((
|
|
22
|
-
|
|
30
|
+
if ((t.key === "Enter" || t.key === " ") && !e) {
|
|
31
|
+
t.preventDefault(), n(t), i();
|
|
23
32
|
return;
|
|
24
33
|
}
|
|
25
34
|
};
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
}, []), /* @__PURE__ */
|
|
29
|
-
|
|
35
|
+
return F(() => () => {
|
|
36
|
+
r.current && cancelAnimationFrame(r.current);
|
|
37
|
+
}, []), /* @__PURE__ */ p(
|
|
38
|
+
v,
|
|
30
39
|
{
|
|
31
|
-
ref:
|
|
40
|
+
ref: a,
|
|
32
41
|
type: "button",
|
|
33
42
|
"aria-haspopup": !0,
|
|
34
|
-
"aria-expanded":
|
|
35
|
-
"aria-controls":
|
|
36
|
-
onKeyDown:
|
|
37
|
-
onClick:
|
|
38
|
-
...
|
|
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
|
-
|
|
52
|
+
x as default
|
|
44
53
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
|
-
import { GeneralComponentProps, Size } from '
|
|
3
|
-
import { CSSValue } from '
|
|
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 '
|
|
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 '
|
|
3
|
-
import { GeneralComponentProps } from '
|
|
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 '
|
|
3
|
-
import { GeneralComponentProps, Size } from '
|
|
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 '
|
|
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 '
|
|
3
|
-
import { GeneralComponentProps, Variant } from '
|
|
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 '
|
|
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 '
|
|
2
|
+
import { GeneralComponentProps } from '../../../typings/component';
|
|
3
3
|
|
|
4
4
|
export interface OptionProps extends GeneralComponentProps<HTMLAttributes<HTMLLIElement>> {
|
|
5
5
|
value?: string;
|
package/Select/Select.d.ts
CHANGED
|
@@ -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 '
|
|
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;
|
package/Skeleton/Skeleton.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { GeneralComponentProps } from '
|
|
3
|
-
import { TypographyBodyKey, TypographyCaptionKey, TypographyHeadlineKey } from '
|
|
4
|
-
import { CSSValue } from '
|
|
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}`;
|
package/Slider/Slider.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { GeneralComponentProps } from '
|
|
2
|
+
import { GeneralComponentProps } from '../../typings/component';
|
|
3
3
|
|
|
4
4
|
export interface SliderProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
|
|
5
5
|
value: number;
|
package/Snackbar/Snackbar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BrandColorKey } from '
|
|
3
|
-
import { GeneralComponentProps } from '
|
|
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;
|
package/Switch/Switch.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeEventHandler, HTMLAttributes } from 'react';
|
|
2
|
-
import { GeneralComponentProps } from '
|
|
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 '
|
|
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 '
|
|
3
|
+
import { GeneralComponentProps } from '../../../typings/component';
|
|
4
4
|
|
|
5
5
|
export interface TabBlockProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement> & Pick<TabProps, 'size'>> {
|
|
6
6
|
value: string;
|
package/TextArea/TextArea.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { GeneralComponentProps, Size, Variant } from '
|
|
2
|
+
import { GeneralComponentProps, Size, Variant } from '../../typings/component';
|
|
3
3
|
|
|
4
4
|
export interface TextAreaProps extends GeneralComponentProps<TextareaHTMLAttributes<HTMLTextAreaElement>> {
|
|
5
5
|
value: string;
|
package/TextField/TextField.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { GeneralComponentProps, Size, Variant } from '
|
|
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'>;
|
package/Tooltip/Tooltip.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
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
|
-
`,
|
|
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:
|
|
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:
|
|
27
|
-
`,
|
|
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;
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode, SyntheticEvent } from 'react';
|
|
2
|
-
import { BrandColorKey } from '
|
|
3
|
-
import { GeneralComponentProps } from '
|
|
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;
|