@loword/loword-design-system 0.5.2 → 0.5.4
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/dist/components/LDBreadCrumb/LDBreadCrumb.d.ts +1 -1
- package/dist/components/LDBreadCrumb/LDBreadCrumb.d.ts.map +1 -1
- package/dist/components/LDBreadCrumb/LDBreadCrumb.js +14 -2
- package/dist/components/LDButton/LDButton.d.ts +3 -18
- package/dist/components/LDButton/LDButton.d.ts.map +1 -1
- package/dist/components/LDButton/LDButton.js +1 -206
- package/dist/components/LDButton/LDLink.d.ts +7 -0
- package/dist/components/LDButton/LDLink.d.ts.map +1 -0
- package/dist/components/LDButton/LDLink.js +25 -0
- package/dist/components/LDButton/buttonVariants.d.ts +34 -0
- package/dist/components/LDButton/buttonVariants.d.ts.map +1 -0
- package/dist/components/LDButton/buttonVariants.js +206 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/package.json +24 -26
|
@@ -36,7 +36,7 @@ declare const LDBreadCrumb: {
|
|
|
36
36
|
Root: ({ className, ...props }: React.ComponentProps<"nav">) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
List: ({ className, ...props }: React.ComponentProps<"ol">) => import("react/jsx-runtime").JSX.Element;
|
|
38
38
|
Item: ({ className, ...props }: React.ComponentProps<"li">) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
Link: ({ as, size, icon, className, ...props }: LDBreadCrumbLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
Link: ({ as, size, icon, className, href, ...props }: LDBreadCrumbLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
40
40
|
Page: ({ size, icon, className, children, ...props }: LDBreadCrumbPageProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
41
|
Separator: ({ size, className, ...props }: LDBreadCrumbSeparatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
42
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LDBreadCrumb.d.ts","sourceRoot":"","sources":["../../../src/components/LDBreadCrumb/LDBreadCrumb.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LDBreadCrumb.d.ts","sourceRoot":"","sources":["../../../src/components/LDBreadCrumb/LDBreadCrumb.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAK3E,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,2CAA2C;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,mDAAmD;IACnD,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA6BD,UAAU,qBAAsB,SAAQ,IAAI,CAC1C,KAAK,CAAC,cAAc,CAAC,GAAG,CAAC,EACzB,OAAO,CACR;IACC,mDAAmD;IACnD,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC;IAClE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,UAAU,0BAA2B,SAAQ,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;IACrE,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AA4DD,QAAA,MAAM,YAAY;iDAMf,iBAAiB;oCAvIV,MAAO,cAAc;oCAEQ,MAAO,cAAc;oCAuErB,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC;0DAY9D,qBAAqB;0DAuBrB,qBAAqB;+CAcrB,0BAA0B;CA8C5B,CAAC;AASF,eAAe,YAAY,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import NextLink from 'next/link';
|
|
3
2
|
import { Fragment } from 'react';
|
|
4
3
|
import BreadCrumbBase from '../../components/LDBreadCrumb/BreadCrumbBase.js';
|
|
5
4
|
import LDButton from '../../components/LDButton/LDButton.js';
|
|
5
|
+
import LDLink from '../../components/LDButton/LDLink.js';
|
|
6
6
|
import RenderIcon from '../../components/RenderIcon/RenderIcon.js';
|
|
7
7
|
import cn from '../../utils/cn.js';
|
|
8
8
|
const textSizeClasses = {
|
|
@@ -32,7 +32,19 @@ const separatorIconSizeClasses = {
|
|
|
32
32
|
// gap은 항목·구분자를 나란히 놓는 List(ol)가 담당한다.
|
|
33
33
|
// li의 자식은 Link 또는 Page 하나뿐이라 여기에 gap을 줘도 효과가 없다.
|
|
34
34
|
const Item = ({ className, ...props }) => (_jsx(BreadCrumbBase.Item, { className: className, ...props }));
|
|
35
|
-
|
|
35
|
+
// 기본(next/link)은 LDLink, 다른 라우터를 `as`로 넘긴 경우만 LDButton으로 렌더한다.
|
|
36
|
+
const Link = ({ as, size = 'small', icon, className, href = '', ...props }) => {
|
|
37
|
+
const linkProps = {
|
|
38
|
+
variant: 'ghost',
|
|
39
|
+
color: 'neutral',
|
|
40
|
+
size,
|
|
41
|
+
leftIcon: icon,
|
|
42
|
+
className: cn('flex h-auto min-w-0 flex-row gap-0.5 px-0 regular text-neutral700 hover:bg-transparent active:bg-transparent', className),
|
|
43
|
+
href,
|
|
44
|
+
...props,
|
|
45
|
+
};
|
|
46
|
+
return as ? _jsx(LDButton, { as: as, ...linkProps }) : _jsx(LDLink, { ...linkProps });
|
|
47
|
+
};
|
|
36
48
|
const Page = ({ size = 'small', icon, className, children, ...props }) => (_jsxs(BreadCrumbBase.Page, { className: cn(textSizeClasses[size], 'gap-0.5 text-neutral700', className), ...props, children: [_jsx(RenderIcon, { className: iconSizeClasses[size], children: icon }), children] }));
|
|
37
49
|
const Separator = ({ size = 'small', className, ...props }) => (_jsx(BreadCrumbBase.Separator, { className: cn(separatorIconSizeClasses[size], 'text-neutral700', className), ...props }));
|
|
38
50
|
const LDBreadCrumb = ({ items, as, size = 'small', separator, className, }) => {
|
|
@@ -1,27 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type ElementType } from 'react';
|
|
3
|
-
import
|
|
3
|
+
import { type ButtonStyleProps } from '../../components/LDButton/buttonVariants.js';
|
|
4
4
|
import { PolymorphicComponentProps } from '../../types/polymorphic.js';
|
|
5
|
-
|
|
6
|
-
type
|
|
7
|
-
export type ButtonColor = Subset<Color, 'neutral' | 'point' | 'danger'>;
|
|
8
|
-
export type ButtonSize = Subset<Size, '2xsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'>;
|
|
9
|
-
type ButtonShape = 'default' | 'capsule';
|
|
10
|
-
type ButtonAlign = 'left' | 'center' | 'right';
|
|
11
|
-
type _ButtonProps = {
|
|
12
|
-
variant?: ButtonVariant;
|
|
13
|
-
color?: ButtonColor;
|
|
14
|
-
size?: ButtonSize;
|
|
15
|
-
shape?: ButtonShape;
|
|
16
|
-
align?: ButtonAlign;
|
|
5
|
+
export type { ButtonColor, ButtonSize, } from '../../components/LDButton/buttonVariants.js';
|
|
6
|
+
type _ButtonProps = ButtonStyleProps & {
|
|
17
7
|
loading?: boolean;
|
|
18
8
|
/** 비동기 클릭 핸들러. 실행이 끝날 때까지 자동으로 loading·disabled 상태가 되어 연속 클릭이 막힌다 */
|
|
19
9
|
asyncClick?: (e: React.MouseEvent<HTMLElement>) => Promise<unknown>;
|
|
20
|
-
block?: boolean;
|
|
21
|
-
leftIcon?: React.ReactNode;
|
|
22
|
-
rightIcon?: React.ReactNode;
|
|
23
|
-
compact?: boolean;
|
|
24
|
-
disabled?: boolean;
|
|
25
10
|
};
|
|
26
11
|
export type LDButtonProps<T extends ElementType> = PolymorphicComponentProps<T, _ButtonProps>;
|
|
27
12
|
type ButtonComponent = <T extends React.ElementType = 'button'>(props: LDButtonProps<T>) => React.ReactElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LDButton.d.ts","sourceRoot":"","sources":["../../../src/components/LDButton/LDButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LDButton.d.ts","sourceRoot":"","sources":["../../../src/components/LDButton/LDButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,WAAW,EAAY,MAAM,OAAO,CAAC;AAGnD,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,sCAAsC,CAAC;AAI9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,YAAY,EACV,WAAW,EACX,UAAU,GACX,MAAM,sCAAsC,CAAC;AAG9C,KAAK,YAAY,GAAG,gBAAgB,GAAG;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,qEAAqE;IACrE,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,WAAW,IAAI,yBAAyB,CAC1E,CAAC,EACD,YAAY,CACb,CAAC;AAEF,KAAK,eAAe,GAAG,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAC5D,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,KACpB,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;AAE/B,QAAA,MAAM,QAAQ,EAAE,eA0Ef,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -2,216 +2,11 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import ButtonBase from '../../components/LDButton/ButtonBase.js';
|
|
5
|
+
import { buttonVariants, } from '../../components/LDButton/buttonVariants.js';
|
|
5
6
|
import LDSpinner from '../../components/LDSpinner/LDSpinner.js';
|
|
6
7
|
import RenderIcon from '../../components/RenderIcon/RenderIcon.js';
|
|
7
8
|
import Show from '../../components/Show/Show.js';
|
|
8
9
|
import cn from '../../utils/cn.js';
|
|
9
|
-
import tv from '../../utils/tv.js';
|
|
10
|
-
// ── 스타일 매핑 (static) ──
|
|
11
|
-
// 배경·테두리·텍스트 색은 variant × color 조합에서 갈리고, 거기에 disabled/loading 상태까지
|
|
12
|
-
// 얹혀야 하므로 compoundVariants가 담당한다. 축 하나로 결정되는 값만 variants에 둔다.
|
|
13
|
-
const buttonVariants = tv({
|
|
14
|
-
base: 'relative ld-transition',
|
|
15
|
-
variants: {
|
|
16
|
-
// 색과 무관하게 variant만 보면 정해지는 조각 — outline의 선 굵기/오프셋, link의 밑줄,
|
|
17
|
-
// focus 링을 안쪽에 그릴지 바깥쪽에 그릴지. 선·글자 색은 compoundVariants에 있다.
|
|
18
|
-
variant: {
|
|
19
|
-
solid: 'focus-visible:ring-offset-2',
|
|
20
|
-
outline: 'outline -outline-offset-1 focus-visible:ring-inset',
|
|
21
|
-
ghost: 'focus-visible:ring-inset',
|
|
22
|
-
link: 'underline underline-offset-4 focus-visible:ring-inset',
|
|
23
|
-
},
|
|
24
|
-
// focus 링 색은 variant와 무관하게 color만 본다 (disabled일 때도 유지).
|
|
25
|
-
color: {
|
|
26
|
-
neutral: 'focus-visible:ring-2 focus-visible:ring-neutral800 focus-visible:outline-none',
|
|
27
|
-
point: 'focus-visible:ring-2 focus-visible:ring-lb500 focus-visible:outline-none',
|
|
28
|
-
danger: 'focus-visible:ring-2 focus-visible:ring-danger500 focus-visible:outline-none',
|
|
29
|
-
},
|
|
30
|
-
size: {
|
|
31
|
-
'2xsmall': 'btn-2xs',
|
|
32
|
-
xsmall: 'btn-xs',
|
|
33
|
-
small: 'btn-sm',
|
|
34
|
-
medium: 'btn-md',
|
|
35
|
-
large: 'btn-lg',
|
|
36
|
-
xlarge: 'btn-xl',
|
|
37
|
-
},
|
|
38
|
-
shape: {
|
|
39
|
-
default: 'rounded-[5px]',
|
|
40
|
-
capsule: 'rounded-full',
|
|
41
|
-
},
|
|
42
|
-
align: {
|
|
43
|
-
left: 'justify-start',
|
|
44
|
-
center: 'justify-center',
|
|
45
|
-
right: 'justify-end',
|
|
46
|
-
},
|
|
47
|
-
block: { true: 'w-full' },
|
|
48
|
-
// compact는 size 프리셋(btn-*)의 좌우 여백을 지우므로 size 뒤에 선언한다.
|
|
49
|
-
compact: { true: 'aspect-square min-w-0 px-0' },
|
|
50
|
-
loading: { true: 'cursor-wait', false: 'cursor-pointer' },
|
|
51
|
-
// disabled 커서가 loading 커서를 이겨야 하므로 loading 뒤에 선언한다.
|
|
52
|
-
disabled: { true: 'cursor-not-allowed' },
|
|
53
|
-
},
|
|
54
|
-
compoundVariants: [
|
|
55
|
-
// ── 기본 색 (disabled 아닐 때만. loading 중에도 유지된다)
|
|
56
|
-
{
|
|
57
|
-
variant: 'solid',
|
|
58
|
-
color: 'neutral',
|
|
59
|
-
disabled: false,
|
|
60
|
-
className: 'bg-black text-white',
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
variant: 'solid',
|
|
64
|
-
color: 'point',
|
|
65
|
-
disabled: false,
|
|
66
|
-
className: 'bg-lb500 text-white',
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
variant: 'solid',
|
|
70
|
-
color: 'danger',
|
|
71
|
-
disabled: false,
|
|
72
|
-
className: 'bg-danger500 text-white',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
variant: 'outline',
|
|
76
|
-
color: 'neutral',
|
|
77
|
-
disabled: false,
|
|
78
|
-
className: 'bg-white text-neutral900 outline-neutral100',
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
variant: 'outline',
|
|
82
|
-
color: 'point',
|
|
83
|
-
disabled: false,
|
|
84
|
-
className: 'bg-white text-lb500 outline-lb500',
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
variant: 'outline',
|
|
88
|
-
color: 'danger',
|
|
89
|
-
disabled: false,
|
|
90
|
-
className: 'bg-white text-danger500 outline-danger500',
|
|
91
|
-
},
|
|
92
|
-
// ghost와 link는 배경이 없어 기본 색이 동일하다 (link의 밑줄은 variant 축이 담당)
|
|
93
|
-
{
|
|
94
|
-
variant: ['ghost', 'link'],
|
|
95
|
-
color: 'neutral',
|
|
96
|
-
disabled: false,
|
|
97
|
-
className: 'bg-transparent text-neutral900',
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
variant: ['ghost', 'link'],
|
|
101
|
-
color: 'point',
|
|
102
|
-
disabled: false,
|
|
103
|
-
className: 'bg-transparent text-lb500',
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
variant: ['ghost', 'link'],
|
|
107
|
-
color: 'danger',
|
|
108
|
-
disabled: false,
|
|
109
|
-
className: 'bg-transparent text-danger500',
|
|
110
|
-
},
|
|
111
|
-
// ── hover/active (상호작용 가능할 때만 — loading 중엔 붙지 않는다)
|
|
112
|
-
// ghost는 outline과 같은 hover 배경을 쓰지만 active 유지 색이 없다.
|
|
113
|
-
{
|
|
114
|
-
variant: 'solid',
|
|
115
|
-
color: 'neutral',
|
|
116
|
-
disabled: false,
|
|
117
|
-
loading: false,
|
|
118
|
-
className: 'hover:bg-neutral800 active:bg-neutral800',
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
variant: 'solid',
|
|
122
|
-
color: 'point',
|
|
123
|
-
disabled: false,
|
|
124
|
-
loading: false,
|
|
125
|
-
className: 'hover:bg-lb700 active:bg-lb700',
|
|
126
|
-
},
|
|
127
|
-
{
|
|
128
|
-
variant: 'solid',
|
|
129
|
-
color: 'danger',
|
|
130
|
-
disabled: false,
|
|
131
|
-
loading: false,
|
|
132
|
-
className: 'hover:bg-danger700 active:bg-danger700',
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
variant: 'outline',
|
|
136
|
-
color: 'neutral',
|
|
137
|
-
disabled: false,
|
|
138
|
-
loading: false,
|
|
139
|
-
className: 'hover:bg-mono100 active:bg-mono100',
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
variant: 'outline',
|
|
143
|
-
color: 'point',
|
|
144
|
-
disabled: false,
|
|
145
|
-
loading: false,
|
|
146
|
-
className: 'hover:bg-accept50 active:bg-accept50',
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
variant: 'outline',
|
|
150
|
-
color: 'danger',
|
|
151
|
-
disabled: false,
|
|
152
|
-
loading: false,
|
|
153
|
-
className: 'hover:bg-danger50 active:bg-danger50',
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
variant: 'ghost',
|
|
157
|
-
color: 'neutral',
|
|
158
|
-
disabled: false,
|
|
159
|
-
loading: false,
|
|
160
|
-
className: 'hover:bg-mono100',
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
variant: 'ghost',
|
|
164
|
-
color: 'point',
|
|
165
|
-
disabled: false,
|
|
166
|
-
loading: false,
|
|
167
|
-
className: 'hover:bg-accept50',
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
variant: 'ghost',
|
|
171
|
-
color: 'danger',
|
|
172
|
-
disabled: false,
|
|
173
|
-
loading: false,
|
|
174
|
-
className: 'hover:bg-danger50',
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
variant: 'link',
|
|
178
|
-
color: 'neutral',
|
|
179
|
-
disabled: false,
|
|
180
|
-
loading: false,
|
|
181
|
-
className: 'hover:text-neutral900 active:text-neutral900',
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
variant: 'link',
|
|
185
|
-
color: 'point',
|
|
186
|
-
disabled: false,
|
|
187
|
-
loading: false,
|
|
188
|
-
className: 'hover:text-lb700 active:text-lb700',
|
|
189
|
-
},
|
|
190
|
-
{
|
|
191
|
-
variant: 'link',
|
|
192
|
-
color: 'danger',
|
|
193
|
-
disabled: false,
|
|
194
|
-
loading: false,
|
|
195
|
-
className: 'hover:text-danger600 active:text-danger600',
|
|
196
|
-
},
|
|
197
|
-
// ── disabled 색 (color와 무관하게 회색 고정)
|
|
198
|
-
{
|
|
199
|
-
variant: 'solid',
|
|
200
|
-
disabled: true,
|
|
201
|
-
className: 'bg-mono300 text-white',
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
variant: 'outline',
|
|
205
|
-
disabled: true,
|
|
206
|
-
className: 'text-mono300 outline-neutral100',
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
variant: ['ghost', 'link'],
|
|
210
|
-
disabled: true,
|
|
211
|
-
className: 'text-mono300',
|
|
212
|
-
},
|
|
213
|
-
],
|
|
214
|
-
});
|
|
215
10
|
const LDButton = ({ as, variant = 'solid', color = 'point', size = 'small', shape = 'default', align = 'center', loading = false, asyncClick, block = false, children, className, leftIcon, rightIcon, compact = false, ref, ...props }) => {
|
|
216
11
|
const [pending, setPending] = useState(false);
|
|
217
12
|
const isLoading = loading || pending;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import { type ComponentProps } from 'react';
|
|
3
|
+
import { type ButtonStyleProps } from '../../components/LDButton/buttonVariants.js';
|
|
4
|
+
export type LDLinkProps = ButtonStyleProps & Omit<ComponentProps<typeof Link>, keyof ButtonStyleProps | 'as' | 'legacyBehavior' | 'passHref' | 'shallow' | 'locale' | 'onNavigate'>;
|
|
5
|
+
declare const LDLink: ({ variant, color, size, shape, align, block, children, className, leftIcon, rightIcon, compact, replace, scroll, prefetch, ...props }: LDLinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default LDLink;
|
|
7
|
+
//# sourceMappingURL=LDLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LDLink.d.ts","sourceRoot":"","sources":["../../../src/components/LDButton/LDLink.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,sCAAsC,CAAC;AAQ9C,MAAM,MAAM,WAAW,GAAG,gBAAgB,GACxC,IAAI,CACF,cAAc,CAAC,OAAO,IAAI,CAAC,EACzB,MAAM,gBAAgB,GACtB,IAAI,GACJ,gBAAgB,GAChB,UAAU,GACV,SAAS,GACT,QAAQ,GACR,YAAY,CACf,CAAC;AAEJ,QAAA,MAAM,MAAM,GAAI,uIAiBb,WAAW,4CA8Bb,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
import ButtonBase from '../../components/LDButton/ButtonBase.js';
|
|
4
|
+
import { buttonVariants, } from '../../components/LDButton/buttonVariants.js';
|
|
5
|
+
import RenderIcon from '../../components/RenderIcon/RenderIcon.js';
|
|
6
|
+
import Show from '../../components/Show/Show.js';
|
|
7
|
+
const LDLink = ({ variant = 'solid', color = 'point', size = 'small', shape = 'default', align = 'center', block = false, children, className, leftIcon, rightIcon, compact = false,
|
|
8
|
+
// Link 전용 prop — disabled면 span으로 렌더되므로 DOM 속성으로 새지 않게 뺀다.
|
|
9
|
+
replace, scroll, prefetch, ...props }) => (_jsxs(ButtonBase.Root, { as: Link, className: buttonVariants({
|
|
10
|
+
variant,
|
|
11
|
+
color,
|
|
12
|
+
size,
|
|
13
|
+
shape,
|
|
14
|
+
align,
|
|
15
|
+
block,
|
|
16
|
+
compact,
|
|
17
|
+
loading: false,
|
|
18
|
+
disabled: !!props.disabled,
|
|
19
|
+
className,
|
|
20
|
+
}), ...props, ...(!props.disabled && {
|
|
21
|
+
replace,
|
|
22
|
+
scroll,
|
|
23
|
+
prefetch,
|
|
24
|
+
}), children: [_jsx(RenderIcon, { children: leftIcon }), _jsx(Show, { when: children, children: _jsx("span", { className: "shrink-0", children: children }) }), _jsx(RenderIcon, { children: rightIcon })] }));
|
|
25
|
+
export default LDLink;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { Color, Size, Variant } from '../../types/common.js';
|
|
3
|
+
import type { Subset } from '../../types/subset.js';
|
|
4
|
+
export type ButtonVariant = Subset<Variant, 'solid' | 'outline' | 'ghost' | 'link'>;
|
|
5
|
+
export type ButtonColor = Subset<Color, 'neutral' | 'point' | 'danger'>;
|
|
6
|
+
export type ButtonSize = Subset<Size, '2xsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge'>;
|
|
7
|
+
export type ButtonShape = 'default' | 'capsule';
|
|
8
|
+
export type ButtonAlign = 'left' | 'center' | 'right';
|
|
9
|
+
export declare const buttonVariants: (props?: {
|
|
10
|
+
variant?: "link" | "solid" | "outline" | "ghost" | undefined;
|
|
11
|
+
color?: "neutral" | "point" | "danger" | undefined;
|
|
12
|
+
size?: "small" | "medium" | "2xsmall" | "xsmall" | "large" | "xlarge" | undefined;
|
|
13
|
+
shape?: "default" | "capsule" | undefined;
|
|
14
|
+
align?: "center" | "left" | "right" | undefined;
|
|
15
|
+
block?: boolean | "true" | "false" | undefined;
|
|
16
|
+
compact?: boolean | "true" | "false" | undefined;
|
|
17
|
+
loading?: boolean | "true" | "false" | undefined;
|
|
18
|
+
disabled?: boolean | "true" | "false" | undefined;
|
|
19
|
+
} & {
|
|
20
|
+
className?: string | false | null | undefined;
|
|
21
|
+
}) => string;
|
|
22
|
+
export type ButtonStyleProps = {
|
|
23
|
+
variant?: ButtonVariant;
|
|
24
|
+
color?: ButtonColor;
|
|
25
|
+
size?: ButtonSize;
|
|
26
|
+
shape?: ButtonShape;
|
|
27
|
+
align?: ButtonAlign;
|
|
28
|
+
block?: boolean;
|
|
29
|
+
leftIcon?: ReactNode;
|
|
30
|
+
rightIcon?: ReactNode;
|
|
31
|
+
compact?: boolean;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=buttonVariants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buttonVariants.d.ts","sourceRoot":"","sources":["../../../src/components/LDButton/buttonVariants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAS7C,MAAM,MAAM,aAAa,GAAG,MAAM,CAChC,OAAO,EACP,OAAO,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CACvC,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;AACxE,MAAM,MAAM,UAAU,GAAG,MAAM,CAC7B,IAAI,EACJ,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAC/D,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,SAAS,CAAC;AAChD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAKtD,eAAO,MAAM,cAAc;;;;;;;;;;;;YAwNzB,CAAC;AAGH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import tv from '../../utils/tv.js';
|
|
2
|
+
// ── 스타일 매핑 (static) ──
|
|
3
|
+
// 배경·테두리·텍스트 색은 variant × color 조합에서 갈리고, 거기에 disabled/loading 상태까지
|
|
4
|
+
// 얹혀야 하므로 compoundVariants가 담당한다. 축 하나로 결정되는 값만 variants에 둔다.
|
|
5
|
+
export const buttonVariants = tv({
|
|
6
|
+
base: 'relative ld-transition',
|
|
7
|
+
variants: {
|
|
8
|
+
// 색과 무관하게 variant만 보면 정해지는 조각 — outline의 선 굵기/오프셋, link의 밑줄,
|
|
9
|
+
// focus 링을 안쪽에 그릴지 바깥쪽에 그릴지. 선·글자 색은 compoundVariants에 있다.
|
|
10
|
+
variant: {
|
|
11
|
+
solid: 'focus-visible:ring-offset-2',
|
|
12
|
+
outline: 'outline -outline-offset-1 focus-visible:ring-inset',
|
|
13
|
+
ghost: 'focus-visible:ring-inset',
|
|
14
|
+
link: 'underline underline-offset-4 focus-visible:ring-inset',
|
|
15
|
+
},
|
|
16
|
+
// focus 링 색은 variant와 무관하게 color만 본다 (disabled일 때도 유지).
|
|
17
|
+
color: {
|
|
18
|
+
neutral: 'focus-visible:ring-2 focus-visible:ring-neutral800 focus-visible:outline-none',
|
|
19
|
+
point: 'focus-visible:ring-2 focus-visible:ring-lb500 focus-visible:outline-none',
|
|
20
|
+
danger: 'focus-visible:ring-2 focus-visible:ring-danger500 focus-visible:outline-none',
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
'2xsmall': 'btn-2xs',
|
|
24
|
+
xsmall: 'btn-xs',
|
|
25
|
+
small: 'btn-sm',
|
|
26
|
+
medium: 'btn-md',
|
|
27
|
+
large: 'btn-lg',
|
|
28
|
+
xlarge: 'btn-xl',
|
|
29
|
+
},
|
|
30
|
+
shape: {
|
|
31
|
+
default: 'rounded-[5px]',
|
|
32
|
+
capsule: 'rounded-full',
|
|
33
|
+
},
|
|
34
|
+
align: {
|
|
35
|
+
left: 'justify-start',
|
|
36
|
+
center: 'justify-center',
|
|
37
|
+
right: 'justify-end',
|
|
38
|
+
},
|
|
39
|
+
block: { true: 'w-full' },
|
|
40
|
+
// compact는 size 프리셋(btn-*)의 좌우 여백을 지우므로 size 뒤에 선언한다.
|
|
41
|
+
compact: { true: 'aspect-square min-w-0 px-0' },
|
|
42
|
+
loading: { true: 'cursor-wait', false: 'cursor-pointer' },
|
|
43
|
+
// disabled 커서가 loading 커서를 이겨야 하므로 loading 뒤에 선언한다.
|
|
44
|
+
disabled: { true: 'cursor-not-allowed' },
|
|
45
|
+
},
|
|
46
|
+
compoundVariants: [
|
|
47
|
+
// ── 기본 색 (disabled 아닐 때만. loading 중에도 유지된다)
|
|
48
|
+
{
|
|
49
|
+
variant: 'solid',
|
|
50
|
+
color: 'neutral',
|
|
51
|
+
disabled: false,
|
|
52
|
+
className: 'bg-black text-white',
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
variant: 'solid',
|
|
56
|
+
color: 'point',
|
|
57
|
+
disabled: false,
|
|
58
|
+
className: 'bg-lb500 text-white',
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
variant: 'solid',
|
|
62
|
+
color: 'danger',
|
|
63
|
+
disabled: false,
|
|
64
|
+
className: 'bg-danger500 text-white',
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
variant: 'outline',
|
|
68
|
+
color: 'neutral',
|
|
69
|
+
disabled: false,
|
|
70
|
+
className: 'bg-white text-neutral900 outline-neutral100',
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
variant: 'outline',
|
|
74
|
+
color: 'point',
|
|
75
|
+
disabled: false,
|
|
76
|
+
className: 'bg-white text-lb500 outline-lb500',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
variant: 'outline',
|
|
80
|
+
color: 'danger',
|
|
81
|
+
disabled: false,
|
|
82
|
+
className: 'bg-white text-danger500 outline-danger500',
|
|
83
|
+
},
|
|
84
|
+
// ghost와 link는 배경이 없어 기본 색이 동일하다 (link의 밑줄은 variant 축이 담당)
|
|
85
|
+
{
|
|
86
|
+
variant: ['ghost', 'link'],
|
|
87
|
+
color: 'neutral',
|
|
88
|
+
disabled: false,
|
|
89
|
+
className: 'bg-transparent text-neutral900',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
variant: ['ghost', 'link'],
|
|
93
|
+
color: 'point',
|
|
94
|
+
disabled: false,
|
|
95
|
+
className: 'bg-transparent text-lb500',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
variant: ['ghost', 'link'],
|
|
99
|
+
color: 'danger',
|
|
100
|
+
disabled: false,
|
|
101
|
+
className: 'bg-transparent text-danger500',
|
|
102
|
+
},
|
|
103
|
+
// ── hover/active (상호작용 가능할 때만 — loading 중엔 붙지 않는다)
|
|
104
|
+
// ghost는 outline과 같은 hover 배경을 쓰지만 active 유지 색이 없다.
|
|
105
|
+
{
|
|
106
|
+
variant: 'solid',
|
|
107
|
+
color: 'neutral',
|
|
108
|
+
disabled: false,
|
|
109
|
+
loading: false,
|
|
110
|
+
className: 'hover:bg-neutral800 active:bg-neutral800',
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
variant: 'solid',
|
|
114
|
+
color: 'point',
|
|
115
|
+
disabled: false,
|
|
116
|
+
loading: false,
|
|
117
|
+
className: 'hover:bg-lb700 active:bg-lb700',
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
variant: 'solid',
|
|
121
|
+
color: 'danger',
|
|
122
|
+
disabled: false,
|
|
123
|
+
loading: false,
|
|
124
|
+
className: 'hover:bg-danger700 active:bg-danger700',
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
variant: 'outline',
|
|
128
|
+
color: 'neutral',
|
|
129
|
+
disabled: false,
|
|
130
|
+
loading: false,
|
|
131
|
+
className: 'hover:bg-mono100 active:bg-mono100',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
variant: 'outline',
|
|
135
|
+
color: 'point',
|
|
136
|
+
disabled: false,
|
|
137
|
+
loading: false,
|
|
138
|
+
className: 'hover:bg-accept50 active:bg-accept50',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
variant: 'outline',
|
|
142
|
+
color: 'danger',
|
|
143
|
+
disabled: false,
|
|
144
|
+
loading: false,
|
|
145
|
+
className: 'hover:bg-danger50 active:bg-danger50',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
variant: 'ghost',
|
|
149
|
+
color: 'neutral',
|
|
150
|
+
disabled: false,
|
|
151
|
+
loading: false,
|
|
152
|
+
className: 'hover:bg-mono100',
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
variant: 'ghost',
|
|
156
|
+
color: 'point',
|
|
157
|
+
disabled: false,
|
|
158
|
+
loading: false,
|
|
159
|
+
className: 'hover:bg-accept50',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
variant: 'ghost',
|
|
163
|
+
color: 'danger',
|
|
164
|
+
disabled: false,
|
|
165
|
+
loading: false,
|
|
166
|
+
className: 'hover:bg-danger50',
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
variant: 'link',
|
|
170
|
+
color: 'neutral',
|
|
171
|
+
disabled: false,
|
|
172
|
+
loading: false,
|
|
173
|
+
className: 'hover:text-neutral900 active:text-neutral900',
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
variant: 'link',
|
|
177
|
+
color: 'point',
|
|
178
|
+
disabled: false,
|
|
179
|
+
loading: false,
|
|
180
|
+
className: 'hover:text-lb700 active:text-lb700',
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
variant: 'link',
|
|
184
|
+
color: 'danger',
|
|
185
|
+
disabled: false,
|
|
186
|
+
loading: false,
|
|
187
|
+
className: 'hover:text-danger600 active:text-danger600',
|
|
188
|
+
},
|
|
189
|
+
// ── disabled 색 (color와 무관하게 회색 고정)
|
|
190
|
+
{
|
|
191
|
+
variant: 'solid',
|
|
192
|
+
disabled: true,
|
|
193
|
+
className: 'bg-mono300 text-white',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
variant: 'outline',
|
|
197
|
+
disabled: true,
|
|
198
|
+
className: 'text-mono300 outline-neutral100',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
variant: ['ghost', 'link'],
|
|
202
|
+
disabled: true,
|
|
203
|
+
className: 'text-mono300',
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,8 @@ export { default as LDAvatar } from './components/LDAvatar/LDAvatar.js';
|
|
|
4
4
|
export { default as LDEditableAvatar, type LDEditableAvatarProps, } from './components/LDAvatar/LDEditableAvatar.js';
|
|
5
5
|
export { default as LDBadge } from './components/LDBadge/LDBadge.js';
|
|
6
6
|
export { default as LDBreadCrumb, type LDBreadCrumbItem, type LDBreadCrumbProps, } from './components/LDBreadCrumb/LDBreadCrumb.js';
|
|
7
|
-
export { default as LDButton } from './components/LDButton/LDButton.js';
|
|
7
|
+
export { default as LDButton, type LDButtonProps, } from './components/LDButton/LDButton.js';
|
|
8
|
+
export { default as LDLink, type LDLinkProps, } from './components/LDButton/LDLink.js';
|
|
8
9
|
export { type CalendarColorSet, default as LDCalendar, type LDCalendarProps, } from './components/LDCalendar/LDCalendar.js';
|
|
9
10
|
export { default as LDCallout } from './components/LDCallout/LDCallout.js';
|
|
10
11
|
export { useLDCarousel } from './components/LDCarousel/CarouselBase.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,iBAAiB,EACtB,OAAO,IAAI,WAAW,EACtB,KAAK,gBAAgB,GACtB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,OAAO,IAAI,cAAc,EACzB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,8BAA8B,EACnC,KAAK,uBAAuB,EAC5B,KAAK,gCAAgC,EACrC,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,GAC7B,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,EACL,OAAO,IAAI,gBAAgB,EAC3B,KAAK,qBAAqB,GAC3B,MAAM,wCAAwC,CAAC;AAGhD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,8BAA8B,CAAC;AAGlE,OAAO,EACL,OAAO,IAAI,YAAY,EACvB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,GACvB,MAAM,wCAAwC,CAAC;AAGhD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,iBAAiB,EACtB,OAAO,IAAI,WAAW,EACtB,KAAK,gBAAgB,GACtB,MAAM,sCAAsC,CAAC;AAG9C,OAAO,EACL,OAAO,IAAI,cAAc,EACz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} from './components/LDBadge/LDBadge.js';
|
|
|
12
12
|
// LDBreadCrumb
|
|
13
13
|
export { default as LDBreadCrumb, } from './components/LDBreadCrumb/LDBreadCrumb.js';
|
|
14
14
|
// LDButton
|
|
15
|
-
export { default as LDButton } from './components/LDButton/LDButton.js';
|
|
15
|
+
export { default as LDButton, } from './components/LDButton/LDButton.js';
|
|
16
|
+
export { default as LDLink, } from './components/LDButton/LDLink.js';
|
|
16
17
|
// LDCalendar
|
|
17
18
|
export { default as LDCalendar, } from './components/LDCalendar/LDCalendar.js';
|
|
18
19
|
// LDCallout
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loword/loword-design-system",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "로워드 디자인 시스템 컴포넌트 패키지(Tailwind v4)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -48,30 +48,6 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"license": "MIT",
|
|
51
|
-
"scripts": {
|
|
52
|
-
"prepare": "git config core.hooksPath .githooks || true && playwright install chromium",
|
|
53
|
-
"build": "pnpm build:components && pnpm build:styles",
|
|
54
|
-
"prepublishOnly": "rm -rf dist && pnpm build",
|
|
55
|
-
"build:components": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
56
|
-
"build:styles": "tailwindcss -i ./src/styles.css -o ./dist/index.css",
|
|
57
|
-
"changeset": "node scripts/changesets.mjs new",
|
|
58
|
-
"check-types": "tsc --noEmit",
|
|
59
|
-
"dev:components": "tsc -p tsconfig.build.json --watch",
|
|
60
|
-
"dev:styles": "tailwindcss -i ./src/styles.css -o ./dist/index.css --watch",
|
|
61
|
-
"lint": "eslint --fix src .storybook --max-warnings 0",
|
|
62
|
-
"lint:ci": "eslint src .storybook --max-warnings 0",
|
|
63
|
-
"prettier": "prettier --write src .storybook --log-level warn",
|
|
64
|
-
"test": "vitest run",
|
|
65
|
-
"test:watch": "vitest",
|
|
66
|
-
"test:coverage": "pnpm run test:coverage:utils && pnpm run test:coverage:components",
|
|
67
|
-
"test:coverage:utils": "vitest run --silent --coverage --project unit --coverage.include='src/utils/**' --coverage.reportsDirectory=coverage/utils",
|
|
68
|
-
"test:coverage:components": "vitest run --silent --coverage --project storybook --coverage.include='src/components/**' --coverage.reportsDirectory=coverage/components",
|
|
69
|
-
"storybook": "storybook dev -p 6006",
|
|
70
|
-
"storybook:stop": "lsof -ti tcp:6006 -sTCP:LISTEN | xargs -r kill",
|
|
71
|
-
"build-storybook": "storybook build",
|
|
72
|
-
"generate-story": "npx tsx scripts/generate-story.ts",
|
|
73
|
-
"switch": "sh scripts/switch.sh"
|
|
74
|
-
},
|
|
75
51
|
"peerDependencies": {
|
|
76
52
|
"@radix-ui/react-accordion": "^1.2.16",
|
|
77
53
|
"@radix-ui/react-dialog": "^1.1.15",
|
|
@@ -295,5 +271,27 @@
|
|
|
295
271
|
"lucide-react": "^0.536.0",
|
|
296
272
|
"react-hook-form": "^7.62.0",
|
|
297
273
|
"tailwind-merge": "^3.3.1"
|
|
274
|
+
},
|
|
275
|
+
"scripts": {
|
|
276
|
+
"build": "pnpm build:components && pnpm build:styles",
|
|
277
|
+
"build:components": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",
|
|
278
|
+
"build:styles": "tailwindcss -i ./src/styles.css -o ./dist/index.css",
|
|
279
|
+
"changeset": "node scripts/changesets.mjs new",
|
|
280
|
+
"check-types": "tsc --noEmit",
|
|
281
|
+
"dev:components": "tsc -p tsconfig.build.json --watch",
|
|
282
|
+
"dev:styles": "tailwindcss -i ./src/styles.css -o ./dist/index.css --watch",
|
|
283
|
+
"lint": "eslint --fix src .storybook --max-warnings 0",
|
|
284
|
+
"lint:ci": "eslint src .storybook --max-warnings 0",
|
|
285
|
+
"prettier": "prettier --write src .storybook --log-level warn",
|
|
286
|
+
"test": "vitest run",
|
|
287
|
+
"test:watch": "vitest",
|
|
288
|
+
"test:coverage": "pnpm run test:coverage:utils && pnpm run test:coverage:components",
|
|
289
|
+
"test:coverage:utils": "vitest run --silent --coverage --project unit --coverage.include='src/utils/**' --coverage.reportsDirectory=coverage/utils",
|
|
290
|
+
"test:coverage:components": "vitest run --silent --coverage --project storybook --coverage.include='src/components/**' --coverage.reportsDirectory=coverage/components",
|
|
291
|
+
"storybook": "storybook dev -p 6006",
|
|
292
|
+
"storybook:stop": "lsof -ti tcp:6006 -sTCP:LISTEN | xargs -r kill",
|
|
293
|
+
"build-storybook": "storybook build",
|
|
294
|
+
"generate-story": "npx tsx scripts/generate-story.ts",
|
|
295
|
+
"switch": "sh scripts/switch.sh"
|
|
298
296
|
}
|
|
299
|
-
}
|
|
297
|
+
}
|