daleui 0.0.2 → 0.0.5
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/README.md +43 -0
- package/dist/check-DEVerfH5.js +72 -0
- package/dist/components/Box/Box.d.ts +34 -0
- package/dist/components/Box/Box.js +34 -0
- package/dist/components/Button/Button.d.ts +37 -0
- package/dist/components/Button/Button.js +367 -0
- package/dist/components/Card/Card.d.ts +68 -0
- package/dist/components/Card/Card.js +132 -0
- package/dist/components/Checkbox/Checkbox.d.ts +34 -0
- package/dist/components/Checkbox/Checkbox.js +657 -0
- package/dist/components/Flex/Flex.d.ts +361 -0
- package/dist/components/Flex/Flex.js +65 -0
- package/dist/components/HStack/HStack.d.ts +23 -0
- package/dist/components/HStack/HStack.js +35 -0
- package/dist/components/Heading/Heading.d.ts +33 -0
- package/dist/components/Heading/Heading.js +67 -0
- package/dist/components/Icon/Icon.d.ts +20 -0
- package/dist/components/Icon/Icon.js +325 -0
- package/dist/components/Label/Label.d.ts +35 -0
- package/dist/components/Label/Label.js +74 -0
- package/dist/components/Link/Link.d.ts +33 -0
- package/dist/components/Link/Link.js +176 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +17 -0
- package/dist/components/PasswordInput/PasswordInput.js +151 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +82 -0
- package/dist/components/RadioGroup/RadioGroup.js +713 -0
- package/dist/components/Select/Select.d.ts +39 -0
- package/dist/components/Select/Select.js +222 -0
- package/dist/components/Tag/Tag.d.ts +26 -0
- package/dist/components/Tag/Tag.js +189 -0
- package/dist/components/Text/Text.d.ts +22 -0
- package/dist/components/Text/Text.js +115 -0
- package/dist/components/TextInput/TextInput.d.ts +21 -0
- package/dist/components/TextInput/TextInput.js +106 -0
- package/dist/components/VStack/VStack.d.ts +23 -0
- package/dist/components/VStack/VStack.js +35 -0
- package/dist/css-QiVVeZaw.js +212 -0
- package/dist/cva-BrKodHDH.js +57 -0
- package/dist/cx-DN21T1EH.js +9 -0
- package/dist/hstack-cCrHxysi.js +43 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +37 -0
- package/dist/tokens/colors.d.ts +4 -0
- package/dist/tokens/iconography.d.ts +45 -0
- package/dist/tokens/spacing.d.ts +42 -0
- package/dist/tokens/typography.d.ts +312 -0
- package/dist/use-locale-context-DYXE7B4r.js +775 -0
- package/package.json +62 -39
- package/styled-system/css/conditions.mjs +36 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.mjs +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.mjs +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.mjs +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.mjs +46 -0
- package/styled-system/helpers.mjs +316 -0
- package/styled-system/patterns/aspect-ratio.d.ts +20 -0
- package/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/styled-system/patterns/bleed.d.ts +21 -0
- package/styled-system/patterns/bleed.mjs +24 -0
- package/styled-system/patterns/box.d.ts +20 -0
- package/styled-system/patterns/box.mjs +15 -0
- package/styled-system/patterns/center.d.ts +20 -0
- package/styled-system/patterns/center.mjs +21 -0
- package/styled-system/patterns/circle.d.ts +20 -0
- package/styled-system/patterns/circle.mjs +25 -0
- package/styled-system/patterns/container.d.ts +20 -0
- package/styled-system/patterns/container.mjs +21 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.mjs +21 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.mjs +25 -0
- package/styled-system/patterns/flex.d.ts +26 -0
- package/styled-system/patterns/flex.mjs +26 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.mjs +52 -0
- package/styled-system/patterns/grid-item.d.ts +25 -0
- package/styled-system/patterns/grid-item.mjs +25 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.mjs +27 -0
- package/styled-system/patterns/hstack.d.ts +21 -0
- package/styled-system/patterns/hstack.mjs +24 -0
- package/styled-system/patterns/index.d.ts +21 -0
- package/styled-system/patterns/index.mjs +20 -0
- package/styled-system/patterns/link-overlay.d.ts +20 -0
- package/styled-system/patterns/link-overlay.mjs +24 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.mjs +21 -0
- package/styled-system/patterns/square.d.ts +20 -0
- package/styled-system/patterns/square.mjs +24 -0
- package/styled-system/patterns/stack.d.ts +23 -0
- package/styled-system/patterns/stack.mjs +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/styled-system/patterns/visually-hidden.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +21 -0
- package/styled-system/patterns/vstack.mjs +24 -0
- package/styled-system/patterns/wrap.d.ts +24 -0
- package/styled-system/patterns/wrap.mjs +25 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.mjs +3176 -0
- package/styled-system/tokens/tokens.d.ts +63 -0
- package/styled-system/types/composition.d.ts +224 -0
- package/styled-system/types/conditions.d.ts +310 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +20 -0
- package/styled-system/types/index.d.ts +7 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +265 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +7504 -0
- package/styled-system/types/system-types.d.ts +269 -0
- package/.github/CODEOWNERS +0 -1
- package/.github/FUNDING.yml +0 -1
- package/.github/workflows/automation.yml +0 -13
- package/.github/workflows/chromatic.yml +0 -19
- package/.github/workflows/deployment.yml +0 -32
- package/.github/workflows/integration.yml +0 -15
- package/.github/workflows/storybook-tests.yml +0 -17
- package/.storybook/main.ts +0 -18
- package/.storybook/preview.ts +0 -29
- package/.storybook/test-runner.ts +0 -33
- package/bun.lock +0 -2099
- package/chromatic.config.json +0 -5
- package/eslint.config.js +0 -28
- package/index.html +0 -13
- package/panda.config.ts +0 -61
- package/postcss.config.cjs +0 -5
- package/public/logo.svg +0 -9
- package/src/App.tsx +0 -67
- package/src/assets/Discord.svg +0 -1
- package/src/assets/GitHub.svg +0 -1
- package/src/assets/LinkedIn.svg +0 -1
- package/src/assets/Medium.svg +0 -1
- package/src/assets/YouTube.svg +0 -1
- package/src/components/Button/Button.stories.tsx +0 -115
- package/src/components/Button/Button.test.tsx +0 -108
- package/src/components/Button/Button.tsx +0 -245
- package/src/components/Button/index.tsx +0 -1
- package/src/components/Checkbox/Checkbox.stories.tsx +0 -129
- package/src/components/Checkbox/Checkbox.test.tsx +0 -169
- package/src/components/Checkbox/Checkbox.tsx +0 -190
- package/src/components/Heading/Heading.stories.tsx +0 -72
- package/src/components/Heading/Heading.test.tsx +0 -55
- package/src/components/Heading/Heading.tsx +0 -73
- package/src/components/Heading/index.tsx +0 -1
- package/src/components/Icon/Icon.stories.tsx +0 -106
- package/src/components/Icon/Icon.test.tsx +0 -44
- package/src/components/Icon/Icon.tsx +0 -116
- package/src/components/Icon/index.tsx +0 -1
- package/src/components/Text/Text.stories.tsx +0 -65
- package/src/components/Text/Text.test.tsx +0 -54
- package/src/components/Text/Text.tsx +0 -93
- package/src/components/Text/index.tsx +0 -1
- package/src/index.css +0 -2
- package/src/main.tsx +0 -10
- package/src/setupTests.tsx +0 -5
- package/src/styles/globalCss.ts +0 -43
- package/src/tokens/colors.mdx +0 -100
- package/src/tokens/colors.ts +0 -288
- package/src/tokens/iconography.mdx +0 -15
- package/src/tokens/iconography.tsx +0 -54
- package/src/tokens/typography.mdx +0 -38
- package/src/tokens/typography.ts +0 -132
- package/src/vite-env.d.ts +0 -2
- package/tsconfig.app.json +0 -25
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -22
- package/vite.config.ts +0 -16
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsxs as b, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u } from "react";
|
|
3
|
+
import "../../css-QiVVeZaw.js";
|
|
4
|
+
import { c as t } from "../../cva-BrKodHDH.js";
|
|
5
|
+
import { Icon as c } from "../Icon/Icon.js";
|
|
6
|
+
function w({
|
|
7
|
+
invalid: l = !1,
|
|
8
|
+
disabled: e = !1,
|
|
9
|
+
placeholder: a = "패스워드를 입력해주세요.",
|
|
10
|
+
ref: n,
|
|
11
|
+
...d
|
|
12
|
+
}) {
|
|
13
|
+
const [r, i] = u(!1), s = () => {
|
|
14
|
+
e || i(!r);
|
|
15
|
+
};
|
|
16
|
+
return /* @__PURE__ */ b(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: g({
|
|
20
|
+
state: l ? "error" : void 0
|
|
21
|
+
}),
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ o(
|
|
24
|
+
"input",
|
|
25
|
+
{
|
|
26
|
+
ref: n,
|
|
27
|
+
type: r ? "text" : "password",
|
|
28
|
+
placeholder: a,
|
|
29
|
+
disabled: e,
|
|
30
|
+
className: p(),
|
|
31
|
+
"aria-label": "패스워드",
|
|
32
|
+
"aria-invalid": l ? !0 : void 0,
|
|
33
|
+
...d
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ o(
|
|
37
|
+
"button",
|
|
38
|
+
{
|
|
39
|
+
type: "button",
|
|
40
|
+
onClick: s,
|
|
41
|
+
disabled: e,
|
|
42
|
+
className: f({ disabled: e }),
|
|
43
|
+
"aria-pressed": r,
|
|
44
|
+
"aria-label": r ? "패스워드 숨기기" : "패스워드 보기",
|
|
45
|
+
children: /* @__PURE__ */ o(c, { name: r ? "eye" : "eyeOff", size: "md", tone: "neutral" })
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
]
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const g = t({
|
|
53
|
+
base: {
|
|
54
|
+
position: "relative",
|
|
55
|
+
display: "flex",
|
|
56
|
+
alignItems: "center",
|
|
57
|
+
width: "100%",
|
|
58
|
+
height: "12",
|
|
59
|
+
paddingX: "12",
|
|
60
|
+
gap: "8",
|
|
61
|
+
borderWidth: "md",
|
|
62
|
+
borderStyle: "solid",
|
|
63
|
+
borderRadius: "sm",
|
|
64
|
+
backgroundColor: "appBg",
|
|
65
|
+
borderColor: "border.neutral",
|
|
66
|
+
"&:hover": {
|
|
67
|
+
borderColor: "border.neutral.hover"
|
|
68
|
+
},
|
|
69
|
+
"&:active": {
|
|
70
|
+
borderColor: "border.neutral.active"
|
|
71
|
+
},
|
|
72
|
+
"&:focus-within": {
|
|
73
|
+
borderColor: "border.neutral",
|
|
74
|
+
outlineStyle: "solid",
|
|
75
|
+
outlineWidth: "lg",
|
|
76
|
+
outlineColor: "border.brand.focus",
|
|
77
|
+
outlineOffset: "2px"
|
|
78
|
+
},
|
|
79
|
+
"&:has(input:disabled)": {
|
|
80
|
+
cursor: "not-allowed",
|
|
81
|
+
backgroundColor: "bg.neutral.disabled",
|
|
82
|
+
borderColor: "border.neutral.disabled",
|
|
83
|
+
borderTopWidth: "md",
|
|
84
|
+
borderTopColor: "border.neutral.disabled",
|
|
85
|
+
color: "fg.neutral.disabled"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
variants: {
|
|
89
|
+
state: {
|
|
90
|
+
error: {
|
|
91
|
+
borderColor: "border.danger",
|
|
92
|
+
"&:focus-within": {
|
|
93
|
+
borderColor: "border.danger"
|
|
94
|
+
},
|
|
95
|
+
"&:hover": {
|
|
96
|
+
borderColor: "border.danger"
|
|
97
|
+
},
|
|
98
|
+
"&:active": {
|
|
99
|
+
borderColor: "border.danger"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}), p = t({
|
|
105
|
+
base: {
|
|
106
|
+
flex: "1",
|
|
107
|
+
border: "none",
|
|
108
|
+
outline: "none",
|
|
109
|
+
color: "fg.neutral.default",
|
|
110
|
+
fontSize: "md",
|
|
111
|
+
fontWeight: "medium",
|
|
112
|
+
lineHeight: "tight",
|
|
113
|
+
letterSpacing: "balanced",
|
|
114
|
+
"&::placeholder": {
|
|
115
|
+
color: "fg.neutral.placeholder"
|
|
116
|
+
},
|
|
117
|
+
"&:disabled": {
|
|
118
|
+
cursor: "not-allowed",
|
|
119
|
+
color: "fg.neutral.disabled",
|
|
120
|
+
"&::placeholder": {
|
|
121
|
+
color: "fg.neutral.disabled"
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}), f = t({
|
|
126
|
+
base: {
|
|
127
|
+
display: "flex",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
justifyContent: "center",
|
|
130
|
+
cursor: "pointer",
|
|
131
|
+
"&:hover": {
|
|
132
|
+
backgroundColor: "bg.neutral.hover"
|
|
133
|
+
},
|
|
134
|
+
"&:active": {
|
|
135
|
+
backgroundColor: "bg.neutral.active"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
variants: {
|
|
139
|
+
disabled: {
|
|
140
|
+
true: {
|
|
141
|
+
cursor: "not-allowed",
|
|
142
|
+
"&:hover": {
|
|
143
|
+
backgroundColor: "transparent"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
export {
|
|
150
|
+
w as PasswordInput
|
|
151
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { Tone } from "../../tokens/colors";
|
|
3
|
+
export interface RadioGroupProps {
|
|
4
|
+
/**
|
|
5
|
+
* 라디오 버튼 요소들
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* 동일 그룹의 라디오 버튼들이 공유하는 이름입니다.
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
/**
|
|
13
|
+
* 라디오 그룹을 설명하는 텍스트입니다.
|
|
14
|
+
*/
|
|
15
|
+
label: string;
|
|
16
|
+
/**
|
|
17
|
+
* 컴포넌트가 처음 렌더링될 때 선택되는 값입니다.
|
|
18
|
+
* @default undefined
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
/**
|
|
22
|
+
* 외부에서 선택 값을 직접 제어할 때 사용합니다.
|
|
23
|
+
* @default undefined
|
|
24
|
+
*/
|
|
25
|
+
value?: string;
|
|
26
|
+
/**
|
|
27
|
+
* 사용자가 선택을 변경할 때 호출되는 콜백입니다.
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
onChange?: (value: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* true이면 모든 라디오 버튼이 비활성화되어 상호작용이 불가합니다.
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
disabled?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 라디오 버튼의 배치 방향입니다. 'horizontal'은 가로, 'vertical'은 세로입니다.
|
|
38
|
+
* @default undefined
|
|
39
|
+
*/
|
|
40
|
+
orientation?: "horizontal" | "vertical";
|
|
41
|
+
/**
|
|
42
|
+
* 색상 강조를 지정합니다.
|
|
43
|
+
* @default "neutral"
|
|
44
|
+
*/
|
|
45
|
+
tone?: Tone;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 라디오 버튼 그룹 컴포넌트입니다.
|
|
49
|
+
*
|
|
50
|
+
* 사용자가 제한된 선택지 중 하나만 선택해야 할 때 사용합니다.
|
|
51
|
+
* 특히 선택지가 2-5개로 적고 모든 옵션을 한눈에 보여주어야 할 때 적합합니다.
|
|
52
|
+
*
|
|
53
|
+
* 선택지가 많은 경우(6개 이상)에는 대신 [Select](?path=/docs/components-select--docs) 컴포넌트 사용을 권장합니다.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* <RadioGroup name="fruits" label="좋아하는 과일을 선택하세요">
|
|
57
|
+
* <Radio value="apple">사과</Radio>
|
|
58
|
+
* <Radio value="banana">바나나</Radio>
|
|
59
|
+
* <Radio value="orange">오렌지</Radio>
|
|
60
|
+
* </RadioGroup>
|
|
61
|
+
*/
|
|
62
|
+
export declare function RadioGroup({ children, name, label, defaultValue, value, onChange, disabled, orientation, tone, }: RadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export interface RadioProps {
|
|
64
|
+
/**
|
|
65
|
+
* 라디오 버튼의 값입니다.
|
|
66
|
+
*/
|
|
67
|
+
value: string;
|
|
68
|
+
/**
|
|
69
|
+
* 라벨 등 자식 요소를 표시합니다.
|
|
70
|
+
*/
|
|
71
|
+
children?: ReactNode;
|
|
72
|
+
/**
|
|
73
|
+
* true이면 이 라디오 버튼이 비활성화됩니다.
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
disabled?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* DOM 요소에 대한 ref입니다.
|
|
79
|
+
*/
|
|
80
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
81
|
+
}
|
|
82
|
+
export declare function Radio({ value, children, disabled, ref }: RadioProps): import("react/jsx-runtime").JSX.Element;
|