@dotss/ui 0.0.11 → 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.cjs +5 -5
- package/CircularProgressIndicator/CircularProgressIndicator.d.ts +1 -1
- package/CircularProgressIndicator/CircularProgressIndicator.es.js +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.cjs +3 -3
- package/LineProgressIndicator/LineProgressIndicator.d.ts +1 -1
- package/LineProgressIndicator/LineProgressIndicator.es.js +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,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { Color, GeneralComponentProps } from '
|
|
2
|
+
import { Color, GeneralComponentProps } from '../../../typings/component';
|
|
3
3
|
|
|
4
4
|
export interface EventDotProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLSpanElement>, 'color'>> {
|
|
5
5
|
color: Color;
|
|
@@ -1,8 +1,8 @@
|
|
|
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 s=require("@emotion/react/jsx-runtime"),i=require("react"),c=require("@emotion/styled"),d=require("../EventDot/EventDot.cjs"),f=e=>e&&e.__esModule?e:{default:e},u=f(c),h=u.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
gap: ${({theme:{spacing:e}})=>e.content(.5)}px;
|
|
5
5
|
max-height: 6px;
|
|
6
6
|
`,p=u.default.span`
|
|
7
|
-
${({theme:{palette:{grey:e},typography:t}})=>{const{size:
|
|
8
|
-
`;function g({children:e,limit:t=4,...
|
|
7
|
+
${({theme:{palette:{grey:e},typography:t}})=>{const{size:l,weight:r,lineHeight:n,letterSpacing:o}=t.c5R;return{fontSize:l,fontWeight:r,lineHeight:n,letterSpacing:o,color:e[50]}}};
|
|
8
|
+
`;function g({children:e,limit:t=4,...l}){const r=i.Children.toArray(e).filter(i.isValidElement).filter(a=>a.type===d.default),n=r.length,o=n>t;return s.jsxs(h,{"aria-label":`${n}건의 이벤트`,...l,children:[i.Children.toArray(r).slice(0,t),o&&s.jsxs(p,{children:["+",n-t]})]})}exports.default=g;
|
|
@@ -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 EventGroupProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
5
5
|
limit?: number;
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Children as
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as l } from "@emotion/react/jsx-runtime";
|
|
2
|
+
import { Children as s, isValidElement as p } from "react";
|
|
3
|
+
import a from "@emotion/styled";
|
|
4
4
|
import m from "../EventDot/EventDot.es.js";
|
|
5
|
-
const f =
|
|
5
|
+
const f = a.div`
|
|
6
6
|
display: flex;
|
|
7
7
|
align-items: center;
|
|
8
8
|
gap: ${({ theme: { spacing: t } }) => t.content(0.5)}px;
|
|
9
9
|
max-height: 6px;
|
|
10
|
-
`, h =
|
|
10
|
+
`, h = a.span`
|
|
11
11
|
${({
|
|
12
12
|
theme: {
|
|
13
13
|
palette: { grey: t },
|
|
14
14
|
typography: e
|
|
15
15
|
}
|
|
16
16
|
}) => {
|
|
17
|
-
const { size:
|
|
17
|
+
const { size: o, weight: n, lineHeight: r, letterSpacing: i } = e.c5R;
|
|
18
18
|
return {
|
|
19
|
-
fontSize:
|
|
19
|
+
fontSize: o,
|
|
20
20
|
fontWeight: n,
|
|
21
|
-
lineHeight:
|
|
21
|
+
lineHeight: r,
|
|
22
22
|
letterSpacing: i,
|
|
23
23
|
color: t[50]
|
|
24
24
|
};
|
|
25
25
|
}};
|
|
26
26
|
`;
|
|
27
|
-
function y({ children: t, limit: e = 4, ...
|
|
28
|
-
const n =
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
i && /* @__PURE__ */
|
|
27
|
+
function y({ children: t, limit: e = 4, ...o }) {
|
|
28
|
+
const n = s.toArray(t).filter(p).filter((c) => c.type === m), r = n.length, i = r > e;
|
|
29
|
+
return /* @__PURE__ */ l(f, { "aria-label": `${r}건의 이벤트`, ...o, children: [
|
|
30
|
+
s.toArray(n).slice(0, e),
|
|
31
|
+
i && /* @__PURE__ */ l(h, { children: [
|
|
32
32
|
"+",
|
|
33
|
-
|
|
33
|
+
r - e
|
|
34
34
|
] })
|
|
35
35
|
] });
|
|
36
36
|
}
|
package/Dialog/Dialog.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { BackdropProps } from '../Backdrop/Backdrop';
|
|
3
|
-
import { GeneralComponentProps } from '
|
|
3
|
+
import { GeneralComponentProps } from '../../typings/component';
|
|
4
4
|
|
|
5
5
|
export interface DialogProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
6
6
|
open?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
-
import { GeneralComponentProps } from '
|
|
3
|
+
import { GeneralComponentProps } from '../../../typings/component';
|
|
4
4
|
|
|
5
5
|
export interface DialogTextProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
6
6
|
type?: 'main' | 'sub';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementType, HTMLAttributes } from 'react';
|
|
2
|
-
import { GeneralComponentProps } from '
|
|
2
|
+
import { GeneralComponentProps } from '../../../typings/component';
|
|
3
3
|
|
|
4
4
|
export interface DialogTitleProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
5
5
|
onClose?: () => void;
|
package/Flexbox/Flexbox.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
-
import { PolymorphicComponentProps, Spacing } from '
|
|
3
|
+
import { PolymorphicComponentProps, Spacing } from '../../typings/component';
|
|
4
4
|
|
|
5
5
|
export type FlexboxProps<T extends ElementType = 'div'> = Spacing & PolymorphicComponentProps<T> & {
|
|
6
6
|
alignItems?: Property.AlignItems;
|
|
@@ -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 FocusBoundaryProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
5
5
|
active?: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
gap: ${({theme:{spacing:e}})=>e.content(2)}px;
|
|
6
|
-
cursor: ${({disabled:e})=>e?"not-allowed":"
|
|
6
|
+
cursor: ${({disabled:e})=>e?"not-allowed":"unset"};
|
|
7
7
|
flex-direction: ${({placement:e})=>e==="left"?"row-reverse":"row"};
|
|
8
8
|
`,v=d.default.div`
|
|
9
9
|
display: inline-flex;
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
cursor: pointer;
|
|
12
12
|
|
|
13
13
|
${({theme:{palette:{grey:e},typography:{h0R:n,b2R:o}},size:u,disabled:c})=>{let i={fontSize:o.size,fontWeight:o.weight,lineHeight:o.lineHeight,letterSpacing:o.letterSpacing};return u==="2xLarge"&&(i={fontSize:n.size,fontWeight:n.weight,lineHeight:n.lineHeight,letterSpacing:n.letterSpacing}),c&&(i.color=e[30],i.cursor="not-allowed"),i}}
|
|
14
|
-
`,F=l.forwardRef(function({control:n,text:o,placement:u,size:c,onClick:i,disabled:a,inlineCSS:h,controlWrapperProps:
|
|
14
|
+
`,F=l.forwardRef(function({control:n,text:o,placement:u,size:c,onClick:i,disabled:a,inlineCSS:h,controlWrapperProps:x,textProps:p,...s},y){const C=l.useRef(null),m=l.useId(),g=(s==null?void 0:s.id)||m,S=t=>r=>{r.stopPropagation(),typeof t=="function"&&t(r)};return f.jsxs(_,{ref:y,placement:u,disabled:a,...s,css:h,children:[f.jsx(v,{ref:C,...x,children:l.Children.map(n,t=>{var r;return l.isValidElement(t)?l.cloneElement(t,{size:c,disabled:a,onClick:S((r=t.props)==null?void 0:r.onClick),id:g,...t.props}):null})}),f.jsx(T,{size:c,disabled:a,htmlFor:g,...p,children:o})]})});exports.default=F;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { default as Checkbox } from '../Checkbox';
|
|
3
3
|
import { default as Radio } from '../Radio';
|
|
4
|
-
import { GeneralComponentProps, Size } from '
|
|
4
|
+
import { GeneralComponentProps, Size } from '../../typings/component';
|
|
5
5
|
|
|
6
6
|
export interface FormControlTextProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
7
7
|
control: ReactElement<typeof Checkbox | typeof Radio>;
|
|
@@ -6,7 +6,7 @@ const k = a.div`
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: center;
|
|
8
8
|
gap: ${({ theme: { spacing: t } }) => t.content(2)}px;
|
|
9
|
-
cursor: ${({ disabled: t }) => t ? "not-allowed" : "
|
|
9
|
+
cursor: ${({ disabled: t }) => t ? "not-allowed" : "unset"};
|
|
10
10
|
flex-direction: ${({ placement: t }) => t === "left" ? "row-reverse" : "row"};
|
|
11
11
|
`, v = a.div`
|
|
12
12
|
display: inline-flex;
|
|
@@ -16,34 +16,34 @@ const k = a.div`
|
|
|
16
16
|
${({
|
|
17
17
|
theme: {
|
|
18
18
|
palette: { grey: t },
|
|
19
|
-
typography: { h0R:
|
|
19
|
+
typography: { h0R: n, b2R: o }
|
|
20
20
|
},
|
|
21
21
|
size: f,
|
|
22
22
|
disabled: l
|
|
23
23
|
}) => {
|
|
24
24
|
let i = {
|
|
25
|
-
fontSize: n.size,
|
|
26
|
-
fontWeight: n.weight,
|
|
27
|
-
lineHeight: n.lineHeight,
|
|
28
|
-
letterSpacing: n.letterSpacing
|
|
29
|
-
};
|
|
30
|
-
return f === "2xLarge" && (i = {
|
|
31
25
|
fontSize: o.size,
|
|
32
26
|
fontWeight: o.weight,
|
|
33
27
|
lineHeight: o.lineHeight,
|
|
34
28
|
letterSpacing: o.letterSpacing
|
|
29
|
+
};
|
|
30
|
+
return f === "2xLarge" && (i = {
|
|
31
|
+
fontSize: n.size,
|
|
32
|
+
fontWeight: n.weight,
|
|
33
|
+
lineHeight: n.lineHeight,
|
|
34
|
+
letterSpacing: n.letterSpacing
|
|
35
35
|
}), l && (i.color = t[30], i.cursor = "not-allowed"), i;
|
|
36
36
|
}}
|
|
37
37
|
`, L = S(function({
|
|
38
|
-
control:
|
|
39
|
-
text:
|
|
38
|
+
control: n,
|
|
39
|
+
text: o,
|
|
40
40
|
placement: f,
|
|
41
41
|
size: l,
|
|
42
42
|
onClick: i,
|
|
43
43
|
disabled: s,
|
|
44
44
|
inlineCSS: u,
|
|
45
|
-
controlWrapperProps:
|
|
46
|
-
textProps:
|
|
45
|
+
controlWrapperProps: h,
|
|
46
|
+
textProps: p,
|
|
47
47
|
...c
|
|
48
48
|
}, m) {
|
|
49
49
|
const x = j(null), C = F(), d = (c == null ? void 0 : c.id) || C, y = (e) => (r) => {
|
|
@@ -58,7 +58,7 @@ const k = a.div`
|
|
|
58
58
|
...c,
|
|
59
59
|
css: u,
|
|
60
60
|
children: [
|
|
61
|
-
/* @__PURE__ */ g(v, { ref: x, ...
|
|
61
|
+
/* @__PURE__ */ g(v, { ref: x, ...h, children: H.map(n, (e) => {
|
|
62
62
|
var r;
|
|
63
63
|
return T(e) ? $(e, {
|
|
64
64
|
size: l,
|
|
@@ -68,7 +68,7 @@ const k = a.div`
|
|
|
68
68
|
...e.props
|
|
69
69
|
}) : null;
|
|
70
70
|
}) }),
|
|
71
|
-
/* @__PURE__ */ g(z, { size: l, disabled: s, htmlFor: d, ...
|
|
71
|
+
/* @__PURE__ */ g(z, { size: l, disabled: s, htmlFor: d, ...p, children: o })
|
|
72
72
|
]
|
|
73
73
|
}
|
|
74
74
|
);
|
package/Icon/Icon.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@emotion/react/jsx-runtime"),t=require("react"),S=require("../resources/tictoccroc/icons/index.ts-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@emotion/react/jsx-runtime"),t=require("react"),S=require("../resources/tictoccroc/icons/index.ts-DI_CztBn.cjs"),b=require("@emotion/styled"),h=require("../utils/getPaletteColor/getPaletteColor.cjs"),I=r=>r&&r.__esModule?r:{default:r},w=I(b),$=r=>w.default(r)`
|
|
2
2
|
${({size:o,width:s,height:a})=>{let n={width:s,height:a};switch(o){case"large":n={width:32,height:32};break;case"medium":n={width:24,height:24};break;case"small":n={width:20,height:20};break;case"xSmall":n={width:16,height:16};break}return n}};
|
|
3
3
|
|
|
4
4
|
color: ${({theme:o,color:s="grey.100"})=>h.default(s,{theme:o})};
|
package/Icon/Icon.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SVGProps } from 'react';
|
|
2
|
-
import { Color, GeneralComponentProps, IconName, Size } from '
|
|
3
|
-
import { CSSValue } from '
|
|
2
|
+
import { Color, GeneralComponentProps, IconName, Size } from '../../typings/component';
|
|
3
|
+
import { CSSValue } from '../../typings/utility';
|
|
4
4
|
|
|
5
5
|
export interface IconProps extends GeneralComponentProps<Omit<SVGProps<SVGElement>, 'width' | 'height' | 'color'>> {
|
|
6
6
|
name: IconName;
|
package/Icon/Icon.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as w } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as y, Children as f, isValidElement as i, cloneElement as s } from "react";
|
|
3
|
-
import { S as $ } from "../resources/tictoccroc/icons/index.ts-
|
|
3
|
+
import { S as $ } from "../resources/tictoccroc/icons/index.ts-Dt89JG4Z.js";
|
|
4
4
|
import b from "@emotion/styled";
|
|
5
5
|
import x from "../utils/getPaletteColor/getPaletteColor.es.js";
|
|
6
6
|
const g = (p) => b(p)`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
-
import { BrandColorKey } from '
|
|
3
|
-
import { GeneralComponentProps, IconName, Size, Variant } from '
|
|
2
|
+
import { BrandColorKey } from '../../typings/color';
|
|
3
|
+
import { GeneralComponentProps, IconName, Size, Variant } from '../../typings/component';
|
|
4
4
|
|
|
5
5
|
export interface IconButtonProps extends GeneralComponentProps<ButtonHTMLAttributes<HTMLButtonElement>> {
|
|
6
6
|
name: IconName;
|
package/Label/Label.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
|
-
import { SpecifyColorScaleKey } from '
|
|
3
|
-
import { PolymorphicComponentProps, Size, Variant } from '
|
|
4
|
-
import { EtcColorKey } from '
|
|
5
|
-
import { TictoccrocBrandColorKey, TictoccrocClassTypeColorKey } from '
|
|
2
|
+
import { SpecifyColorScaleKey } from '../../typings/color';
|
|
3
|
+
import { PolymorphicComponentProps, Size, Variant } from '../../typings/component';
|
|
4
|
+
import { EtcColorKey } from '../../typings/theme/core';
|
|
5
|
+
import { TictoccrocBrandColorKey, TictoccrocClassTypeColorKey } from '../../typings/theme/tictoccroc';
|
|
6
6
|
|
|
7
7
|
export type LabelProps<T extends ElementType = 'span'> = PolymorphicComponentProps<T> & {
|
|
8
8
|
variant?: Extract<Variant, 'solid' | 'ghost' | 'outlined'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@emotion/react/jsx-runtime"),f=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("@emotion/react/jsx-runtime"),f=require("react"),g=require("@emotion/react"),m=require("@emotion/styled"),p=e=>e&&e.__esModule?e:{default:e},o=p(m),b=g.keyframes`
|
|
2
2
|
to {
|
|
3
3
|
transform: translateX(100%);
|
|
4
4
|
}
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
background-color: ${({theme:{palette:{brand:e}}})=>e.primary.main};
|
|
23
23
|
|
|
24
24
|
${({loop:e})=>e?{animation:`${b} 1s infinite`}:{}};
|
|
25
|
-
`,
|
|
25
|
+
`,x=o.default.div`
|
|
26
26
|
position: absolute;
|
|
27
27
|
top: 0;
|
|
28
28
|
left: 0;
|
|
@@ -32,4 +32,4 @@
|
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 100%;
|
|
34
34
|
white-space: nowrap;
|
|
35
|
-
`,
|
|
35
|
+
`,j=f.forwardRef(function({children:s,size:l,value:r=0,transitionDuration:d=500,loop:a,inlineCSS:c,...i},u){let t=r-100;return t=r>100?0:t,t=a?-80:t,n.jsxs(h,{role:"progressbar","aria-valuenow":a?void 0:r,"aria-label":i["aria-label"]?i["aria-label"]:"로딩 중",ref:u,size:l,...i,css:c,children:[n.jsx(y,{transitionDuration:d,loop:a,style:{transform:`translate3d(${t}%, 0, 0)`}}),l==="large"&&s&&n.jsx(x,{children:s})]})});exports.default=j;
|
|
@@ -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 LineProgressIndicatorProps extends GeneralComponentProps<HTMLAttributes<HTMLDivElement>> {
|
|
5
5
|
size?: Extract<Size, 'large' | 'small'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as l } from "@emotion/react/jsx-runtime";
|
|
2
2
|
import { forwardRef as p } from "react";
|
|
3
|
-
import { keyframes as g } from "
|
|
3
|
+
import { keyframes as g } from "@emotion/react";
|
|
4
4
|
import a from "@emotion/styled";
|
|
5
5
|
const h = g`
|
|
6
6
|
to {
|
package/Menu/Menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@emotion/react/jsx-runtime"),o=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("@emotion/react/jsx-runtime"),o=require("react"),st=require("react-dom"),it=require("../hooks/useCheckKeyboardMode/useCheckKeyboardMode.cjs"),z=require("../utils/getSibling/getSibling.cjs"),ut=require("@emotion/styled"),rt=e=>e&&e.__esModule?e:{default:e},$=rt(ut),nt=$.default.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
${({disableClickOutside:e})=>e?null:{pointerEvents:"none","& *":{pointerEvents:"auto"}}}}
|
|
10
10
|
|
|
11
|
-
`,
|
|
11
|
+
`,dt=$.default.div`
|
|
12
12
|
position: fixed;
|
|
13
13
|
max-width: calc(100% - ${({theme:{spacing:e}})=>e.layout(4)}px);
|
|
14
14
|
border-radius: 10px;
|
|
@@ -21,15 +21,15 @@
|
|
|
21
21
|
transform: scale(${({open:e})=>e?1:.97});
|
|
22
22
|
opacity: ${({open:e})=>e?1:0};
|
|
23
23
|
z-index: 100003;
|
|
24
|
-
`,
|
|
24
|
+
`,ct=$.default.ul`
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
max-height: ${({maxHeight:e})=>e}px;
|
|
28
28
|
overflow-y: auto;
|
|
29
29
|
|
|
30
|
-
${({theme:{spacing:e},disablePadding:
|
|
31
|
-
`,
|
|
30
|
+
${({theme:{spacing:e},disablePadding:a})=>a?null:{padding:`${e.content(1)}px 0`}}}
|
|
31
|
+
`,ft=$.default.div`
|
|
32
32
|
width: 100%;
|
|
33
33
|
height: 1px;
|
|
34
34
|
background-color: ${({theme:{palette:{grey:e}}})=>e[20]};
|
|
35
|
-
`,k=24,
|
|
35
|
+
`,k=24,lt=o.forwardRef(function({children:a,anchorRef:r,open:w,onClose:f,spacing:b=4,transitionDuration:M=200,onChange:m,value:H,showDivider:K,placement:D="bottom-center",disablePadding:C,disableClickOutside:F=!0,width:T,fitToAnchorWidth:q=!0,maxHeight:N=476,style:A,inlineCSS:B,menuProps:G,...U},V){const[g,O]=o.useState(0),[I,_]=o.useState(0),[h,J]=o.useState(0),[j,W]=o.useState(!1),[Q,X]=o.useState(!1),[Y,L]=o.useState(!0),[Z,p]=o.useState(null),v=o.useRef(),x=o.useRef(),E=o.useRef(null),{isKeyboardMode:R}=it.default(),tt=(t,s)=>n=>{n.stopPropagation(),typeof f=="function"&&f(),typeof m=="function"&&m(t,n),typeof s=="function"&&s(n)},et=t=>s=>{var u,c,d,l;if(s.key==="Tab"&&typeof f=="function"&&(f(),p(0)),(s.key==="Enter"||s.key===" ")&&typeof f=="function"&&typeof m=="function"&&(f(),m(t,s),r!=null&&r.current)){const i=r.current.querySelector("button");i&&R&&i.focus()}const n=document.activeElement;if(n){if(s.code==="ArrowDown"){const i=z.default(n,"next",{skipDisabled:!0});i&&i.dataset.index?(p(Number(i.dataset.index)),i.focus()):(p(0),(c=(u=E.current)==null?void 0:u.querySelector('[role="menuitem"]'))==null||c.focus())}if(s.code==="ArrowUp"){const i=z.default(n,"prev",{skipDisabled:!0});i&&i.dataset.index?(p(Number(i.dataset.index)),i.focus()):(p(o.Children.count(a)-1),(l=(d=E.current)==null?void 0:d.querySelector('[role="menuitem"]:last-child'))==null||l.focus())}}};return o.useEffect(()=>{w&&(x.current&&clearTimeout(x.current),document.body.style.overflow="hidden",L(!1),v.current=setTimeout(()=>{W(!0)},100))},[w]),o.useEffect(()=>{w||(v.current&&clearTimeout(v.current),W(!1),document.body.removeAttribute("style"),x.current=setTimeout(()=>{L(!0),p(0)},M))},[w,M]),o.useEffect(()=>{const t=()=>{var P;const{offsetWidth:s=0,offsetHeight:n=0}=(r==null?void 0:r.current)||{},u=((P=r==null?void 0:r.current)==null?void 0:P.getBoundingClientRect())||{top:0,left:0,bottom:0},{offsetWidth:c=0,offsetHeight:d=0}=E.current||{},[l,i]=D.split("-");J(T||s);const S=(u.top||0)-d-b-k<k,ot=(u.bottom||0)+d+b+k>window.innerHeight;switch(l){case"top":O(S?k:u.top-d-b);break;default:O(ot?"auto":u.top+n+b);break}switch(i){case"left":_(u.left);break;case"right":_(u.left-Math.abs(s-c));break;default:_(u.left+s/2-c/2);break}};return t(),window.addEventListener("scroll",t),window.addEventListener("resize",t),()=>{window.removeEventListener("scroll",t),window.removeEventListener("resize",t)}},[r,b,D,j,a,T]),o.useEffect(()=>{X(j&&!!g&&!!I&&!!h)},[j,g,I,h]),o.useEffect(()=>()=>{v.current&&clearTimeout(v.current),x.current&&clearTimeout(x.current)},[]),Y?null:st.createPortal(y.jsx(nt,{onClick:f,disableClickOutside:F,children:y.jsx(dt,{ref:V,open:Q,transitionDuration:M,...U,css:B,style:{...A,top:g,left:I,bottom:g==="auto"?24:void 0,width:q?h:void 0},children:y.jsx(ct,{role:"menu",ref:E,disablePadding:C,maxHeight:N,...G,children:o.Children.map(a,(t,s)=>{var u,c,d,l,i,S;if(!o.isValidElement(t))return null;const n=Z===s;return y.jsxs(y.Fragment,{children:[o.cloneElement(t,{...t.props,"data-index":s,selected:!!((u=t==null?void 0:t.props)!=null&&u.value)&&((c=t==null?void 0:t.props)==null?void 0:c.value)===H,onClick:tt((d=t==null?void 0:t.props)==null?void 0:d.value,(l=t==null?void 0:t.props)==null?void 0:l.onClick),onKeyDown:et((i=t==null?void 0:t.props)==null?void 0:i.value),tabIndex:n?0:-1,style:{...(S=t==null?void 0:t.props)==null?void 0:S.style,[T?"width":"minWidth"]:q?void 0:h,maxWidth:q?void 0:"100%"}}),K&&o.Children.count(a)!==s+1&&y.jsx(ft,{})]})})})})}),document.body)});exports.default=lt;
|
package/Menu/Menu.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactElement, ReactNode, RefObject, SyntheticEvent } from 'react';
|
|
2
|
-
import { GeneralComponentProps } from '
|
|
2
|
+
import { GeneralComponentProps } from '../../typings/component';
|
|
3
3
|
import { default as MenuBlock } from './MenuBlock';
|
|
4
4
|
|
|
5
5
|
export interface MenuProps extends GeneralComponentProps<Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>> {
|