@nurihaus/web-design-system 3.3.0 → 3.5.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/README.md +36 -0
- package/dist/ai/components.md +148 -5
- package/dist/avatar.js +5 -5
- package/dist/bottom-nav.js +22 -8
- package/dist/breadcrumb.js +25 -10
- package/dist/callout.js +220 -0
- package/dist/check-box.js +24 -8
- package/dist/chip-group.js +21 -7
- package/dist/{chunk-563.js → chunk-1563.js} +26 -13
- package/dist/{chunk-657.js → chunk-1657.js} +2 -2
- package/dist/chunk-2496.js +70 -0
- package/dist/{chunk-777.js → chunk-2777.js} +2 -2
- package/dist/{chunk-558.js → chunk-4558.js} +2 -2
- package/dist/chunk-4560.js +77 -0
- package/dist/{chunk-917.js → chunk-4917.js} +2 -2
- package/dist/{chunk-77.js → chunk-5077.js} +2 -2
- package/dist/chunk-5226.js +79 -0
- package/dist/{chunk-149.js → chunk-6149.js} +2 -2
- package/dist/{chunk-302.js → chunk-6302.js} +2 -2
- package/dist/{chunk-364.js → chunk-6364.js} +2 -2
- package/dist/{chunk-713.js → chunk-6713.js} +2 -2
- package/dist/{chunk-298.js → chunk-7298.js} +2 -2
- package/dist/{chunk-653.js → chunk-7653.js} +2 -2
- package/dist/{chunk-739.js → chunk-7739.js} +2 -2
- package/dist/{chunk-309.js → chunk-8690.js} +2 -2
- package/dist/{chunk-933.js → chunk-8933.js} +2 -2
- package/dist/chunk-910.js +30 -11
- package/dist/{chunk-387.js → chunk-9387.js} +2 -2
- package/dist/{chunk-436.js → chunk-9436.js} +2 -2
- package/dist/collapsible-menu.js +25 -12
- package/dist/components/bottom-nav/bottom-nav-type.d.ts +5 -2
- package/dist/components/breadcrumb/breadcrumb-type.d.ts +2 -1
- package/dist/components/button/button-props.d.ts +2 -2
- package/dist/components/button/button-type.d.ts +4 -1
- package/dist/components/button/button.stories.d.ts +1 -1
- package/dist/components/callout/base-callout.d.ts +4 -0
- package/dist/components/callout/callout-props.d.ts +10 -0
- package/dist/components/callout/callout-type.d.ts +7 -0
- package/dist/components/callout/callout.d.ts +5 -0
- package/dist/components/callout/callout.stories.d.ts +22 -0
- package/dist/components/check-box/check-box-type.d.ts +2 -1
- package/dist/components/chip-group/chip-group-type.d.ts +2 -1
- package/dist/components/collapsible-menu/collapsible-menu-type.d.ts +2 -1
- package/dist/components/drawer/drawer-type.d.ts +2 -1
- package/dist/components/drop-down/drop-down-type.d.ts +2 -1
- package/dist/components/logging/log-context.d.ts +9 -0
- package/dist/components/logging/logging-type.d.ts +25 -0
- package/dist/components/logging/logging.d.ts +5 -0
- package/dist/components/logging/logging.stories.d.ts +18 -0
- package/dist/components/modal/modal-type.d.ts +2 -1
- package/dist/components/pagination/pagination-type.d.ts +2 -1
- package/dist/components/radio/radio-type.d.ts +3 -1
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.stories.d.ts +1 -1
- package/dist/components/skeleton/skeleton.stories.d.ts +5 -5
- package/dist/components/switch/switch-type.d.ts +2 -1
- package/dist/components/table/table-type.d.ts +2 -1
- package/dist/components/tabs/tabs-type.d.ts +2 -1
- package/dist/components/text-area/text-area-type.d.ts +2 -1
- package/dist/components/text-field/text-field-type.d.ts +2 -1
- package/dist/components/toast/toast-type.d.ts +2 -1
- package/dist/components/toast/toast.stories.d.ts +7 -5
- package/dist/components/tooltip/tooltip-type.d.ts +2 -1
- package/dist/components.css +79 -0
- package/dist/cta-button.js +44 -21
- package/dist/data-table.js +19 -7
- package/dist/drawer.js +23 -9
- package/dist/drop-down.js +25 -9
- package/dist/helpers/hooks/useTrack.d.ts +3 -0
- package/dist/icon-text-badge.js +11 -9
- package/dist/icon-text-option-badge.js +5 -5
- package/dist/icon.js +5 -5
- package/dist/index.d.ts +4 -0
- package/dist/index.js +557 -80
- package/dist/loading.js +6 -6
- package/dist/logging.js +147 -0
- package/dist/modal-with-double-button.js +16 -12
- package/dist/modal.js +39 -26
- package/dist/option-badge.js +11 -9
- package/dist/pagination.js +23 -9
- package/dist/radio.js +24 -10
- package/dist/skeleton.js +4 -4
- package/dist/step-progress.js +3 -3
- package/dist/styles.css +66 -0
- package/dist/switch.js +24 -8
- package/dist/tabs.js +22 -6
- package/dist/text-area.js +30 -8
- package/dist/text-field.js +31 -9
- package/dist/text.js +5 -5
- package/dist/toast.js +34 -15
- package/dist/tooltip.js +33 -18
- package/package.json +9 -1
- package/dist/chunk-976.js +0 -29
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentType, MouseEvent, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes } from './collapsible-menu-props';
|
|
4
5
|
export interface CollapsibleMenuRootProps {
|
|
5
6
|
defaultOpen?: boolean;
|
|
@@ -30,7 +31,7 @@ export interface CollapsibleMenuLinkProps {
|
|
|
30
31
|
'aria-current'?: 'page';
|
|
31
32
|
'aria-disabled'?: 'true';
|
|
32
33
|
}
|
|
33
|
-
export interface CollapsibleMenuProps extends StyleProps {
|
|
34
|
+
export interface CollapsibleMenuProps extends StyleProps, TrackProps {
|
|
34
35
|
size?: (typeof sizes)[number];
|
|
35
36
|
items: CollapsibleMenuItem[];
|
|
36
37
|
activeKey?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sides, sizes } from './drawer-props';
|
|
4
5
|
export interface DrawerRootProps {
|
|
5
6
|
open?: boolean;
|
|
@@ -15,7 +16,7 @@ export interface DrawerDescriptionProps extends ComponentPropsWithRef<'p'>, AsCh
|
|
|
15
16
|
}
|
|
16
17
|
export interface DrawerCloseProps extends ComponentPropsWithRef<'button'>, AsChildProps {
|
|
17
18
|
}
|
|
18
|
-
export interface DrawerProps extends DrawerRootProps, StyleProps {
|
|
19
|
+
export interface DrawerProps extends DrawerRootProps, StyleProps, TrackProps {
|
|
19
20
|
/** asChild 로 감싸 클릭하면 열리는 요소. 없으면 open·defaultOpen 으로만 연다 */
|
|
20
21
|
trigger?: ReactElement;
|
|
21
22
|
title: ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes } from './drop-down-props';
|
|
4
5
|
export interface DropDownRootProps {
|
|
5
6
|
defaultOpen?: boolean;
|
|
@@ -27,7 +28,7 @@ export interface DropDownItemProps extends AsChildProps {
|
|
|
27
28
|
disabled?: boolean;
|
|
28
29
|
onClick?: () => void;
|
|
29
30
|
}
|
|
30
|
-
export interface DropDownProps extends StyleProps {
|
|
31
|
+
export interface DropDownProps extends StyleProps, TrackProps {
|
|
31
32
|
size?: (typeof sizes)[number];
|
|
32
33
|
defaultValue?: string;
|
|
33
34
|
value?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { LogEvent, LogProviderProps } from './logging-type';
|
|
2
|
+
type Emit = (event: LogEvent) => void;
|
|
3
|
+
export declare const LogProvider: {
|
|
4
|
+
(props: LogProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
/** LogProvider 가 둔 emit 함수. Provider 밖이면 null 이다. */
|
|
8
|
+
export declare const useLogEmitter: () => Emit | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** 디자인시스템 컴포넌트가 내보내는 행동 이름. 수동 로그(useLog)는 다른 문자열도 쓸 수 있다. */
|
|
3
|
+
export type LogAction = 'click' | 'open' | 'close' | 'change' | 'show' | 'navigate';
|
|
4
|
+
export interface LogEvent {
|
|
5
|
+
/** 컴포넌트 displayName. 수동 로그는 화면·모듈 이름 */
|
|
6
|
+
component: string;
|
|
7
|
+
action: LogAction | (string & {});
|
|
8
|
+
/** 쓰는 쪽이 준 식별자. 예: 'report/download' */
|
|
9
|
+
track: string;
|
|
10
|
+
/** 개발자가 정한 id 만 (탭 id, 칩 id, 옵션 value, 탭 바 id). 사용자가 입력한 글자는 절대 넣지 않는다 */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** 쓰는 쪽이 trackProps 로 명시한 값 */
|
|
13
|
+
props?: Record<string, string | number | boolean>;
|
|
14
|
+
timestamp: number;
|
|
15
|
+
}
|
|
16
|
+
/** 상호작용 컴포넌트가 공개 Props 에 extends 하는 두 prop */
|
|
17
|
+
export interface TrackProps {
|
|
18
|
+
/** 주면 이 컴포넌트의 상호작용이 LogProvider.onEvent 로 간다. 없으면 아무것도 보내지 않는다 */
|
|
19
|
+
track?: string;
|
|
20
|
+
trackProps?: LogEvent['props'];
|
|
21
|
+
}
|
|
22
|
+
export interface LogProviderProps {
|
|
23
|
+
onEvent: (event: LogEvent) => void;
|
|
24
|
+
children?: ReactNode;
|
|
25
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LogEvent } from './logging-type';
|
|
2
|
+
export { LogProvider } from './log-context';
|
|
3
|
+
/** 컴포넌트 밖의 사용 로그를 남긴다. LogProvider 밖이면 아무것도 하지 않는다. */
|
|
4
|
+
export declare const useLog: () => ((event: Omit<LogEvent, "timestamp">) => void);
|
|
5
|
+
export type { LogEvent, LogAction, LogProviderProps, TrackProps } from './logging-type';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: {
|
|
5
|
+
(props: import("./logging-type").LogProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: string;
|
|
10
|
+
};
|
|
11
|
+
args: {
|
|
12
|
+
onEvent: () => void;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export default meta;
|
|
16
|
+
type Story = StoryObj<typeof meta>;
|
|
17
|
+
/** 버튼을 누르거나 탭을 바꾸면 onEvent 가 받은 이벤트가 아래 목록 맨 위에 쌓인다. */
|
|
18
|
+
export declare const Default: Story;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
3
|
import { CTAButtonProps } from '../button/button-type';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
import { sizes } from './modal-props';
|
|
5
6
|
export interface ModalRootProps {
|
|
6
7
|
open?: boolean;
|
|
@@ -36,7 +37,7 @@ export interface ModalWithDoubleButtonProps {
|
|
|
36
37
|
right: CTAButtonProps;
|
|
37
38
|
size?: (typeof sizes)[number];
|
|
38
39
|
}
|
|
39
|
-
export interface ModalProps extends ModalRootProps, StyleProps {
|
|
40
|
+
export interface ModalProps extends ModalRootProps, StyleProps, TrackProps {
|
|
40
41
|
/** 있으면 `Modal.Trigger asChild` 로 감싸 클릭하면 열리는 요소가 된다. */
|
|
41
42
|
trigger?: ReactElement;
|
|
42
43
|
title: ReactNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
import { TrackProps } from '../logging/logging-type';
|
|
2
3
|
import { sizes } from './pagination-props';
|
|
3
4
|
export interface PaginationRootProps extends ComponentPropsWithRef<'nav'> {
|
|
4
5
|
disabled?: boolean;
|
|
@@ -9,7 +10,7 @@ export interface PaginationItemProps extends ComponentPropsWithRef<'button'> {
|
|
|
9
10
|
disabled?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export type PaginationEllipsisProps = ComponentPropsWithRef<'span'>;
|
|
12
|
-
export interface PaginationProps extends PaginationRootProps {
|
|
13
|
+
export interface PaginationProps extends PaginationRootProps, TrackProps {
|
|
13
14
|
totalPages: number;
|
|
14
15
|
page?: number;
|
|
15
16
|
defaultPage?: number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { ComponentPropsWithRef } from 'react';
|
|
3
3
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
4
|
+
import { TrackProps } from '../logging/logging-type';
|
|
4
5
|
export interface RadioRootProps {
|
|
5
6
|
options: {
|
|
6
7
|
id: string;
|
|
@@ -22,4 +23,5 @@ export interface RadioButtonProps extends ComponentPropsWithRef<'button'>, AsChi
|
|
|
22
23
|
export interface RadioIndicatorProps extends HTMLAttributes<HTMLDivElement>, AsChildProps {
|
|
23
24
|
id: string;
|
|
24
25
|
}
|
|
25
|
-
export
|
|
26
|
+
export interface RadioProps extends RadioRootProps, TrackProps {
|
|
27
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { RadioProps } from './radio-type';
|
|
2
|
+
declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
2
3
|
export default Radio;
|
|
3
4
|
export type { RadioProps } from './radio-type';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { StoryObj } from '@storybook/react-webpack5';
|
|
2
2
|
declare const meta: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").ForwardRefExoticComponent<import("./radio-type").
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("./radio-type").RadioProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
5
5
|
args: {
|
|
6
6
|
options: {
|
|
7
7
|
id: string;
|
|
@@ -38,9 +38,10 @@ declare const meta: {
|
|
|
38
38
|
animated: true;
|
|
39
39
|
};
|
|
40
40
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
41
|
-
|
|
41
|
+
slot?: string | undefined | undefined;
|
|
42
42
|
style?: import("react").CSSProperties | undefined;
|
|
43
|
-
|
|
43
|
+
title?: string | undefined | undefined;
|
|
44
|
+
key?: import("react").Key | null | undefined;
|
|
44
45
|
defaultChecked?: boolean | undefined | undefined;
|
|
45
46
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
46
47
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -48,6 +49,7 @@ declare const meta: {
|
|
|
48
49
|
accessKey?: string | undefined | undefined;
|
|
49
50
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
50
51
|
autoFocus?: boolean | undefined | undefined;
|
|
52
|
+
className?: string | undefined | undefined;
|
|
51
53
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
52
54
|
contextMenu?: string | undefined | undefined;
|
|
53
55
|
dir?: string | undefined | undefined;
|
|
@@ -57,10 +59,8 @@ declare const meta: {
|
|
|
57
59
|
id?: string | undefined | undefined;
|
|
58
60
|
lang?: string | undefined | undefined;
|
|
59
61
|
nonce?: string | undefined | undefined;
|
|
60
|
-
slot?: string | undefined | undefined;
|
|
61
62
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
62
63
|
tabIndex?: number | undefined | undefined;
|
|
63
|
-
title?: string | undefined | undefined;
|
|
64
64
|
translate?: "yes" | "no" | undefined | undefined;
|
|
65
65
|
radioGroup?: string | undefined | undefined;
|
|
66
66
|
role?: import("react").AriaRole | undefined;
|
|
@@ -143,6 +143,7 @@ declare const meta: {
|
|
|
143
143
|
"aria-valuemin"?: number | undefined | undefined;
|
|
144
144
|
"aria-valuenow"?: number | undefined | undefined;
|
|
145
145
|
"aria-valuetext"?: string | undefined | undefined;
|
|
146
|
+
children?: import("react").ReactNode;
|
|
146
147
|
dangerouslySetInnerHTML?: {
|
|
147
148
|
__html: string | TrustedHTML;
|
|
148
149
|
} | undefined | undefined;
|
|
@@ -304,7 +305,6 @@ declare const meta: {
|
|
|
304
305
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLSpanElement> | undefined;
|
|
305
306
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
306
307
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLSpanElement> | undefined;
|
|
307
|
-
key?: import("react").Key | null | undefined;
|
|
308
308
|
height?: number | string | undefined;
|
|
309
309
|
width?: number | string | undefined;
|
|
310
310
|
shape?: (typeof shapes)[number] | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { sizes } from './switch-props';
|
|
4
5
|
export interface SwitchRootProps extends Omit<ComponentPropsWithRef<'button'>, 'id' | 'onChange' | 'value'> {
|
|
5
6
|
id: string;
|
|
@@ -13,7 +14,7 @@ export type SwitchThumbProps = ComponentPropsWithRef<'span'>;
|
|
|
13
14
|
export interface SwitchLabelProps extends AsChildProps {
|
|
14
15
|
className?: string;
|
|
15
16
|
}
|
|
16
|
-
export interface SwitchProps extends SwitchRootProps {
|
|
17
|
+
export interface SwitchProps extends SwitchRootProps, TrackProps {
|
|
17
18
|
label?: ReactNode;
|
|
18
19
|
size?: (typeof sizes)[number];
|
|
19
20
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { TrackProps } from '../logging/logging-type';
|
|
2
3
|
export interface TableProps {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
}
|
|
@@ -23,7 +24,7 @@ type ColumnsType<T extends readonly RowItem[]> = Array<{
|
|
|
23
24
|
onClickCell?: () => void;
|
|
24
25
|
};
|
|
25
26
|
}>;
|
|
26
|
-
export interface DataTableProps<T extends readonly RowItem[]> {
|
|
27
|
+
export interface DataTableProps<T extends readonly RowItem[]> extends TrackProps {
|
|
27
28
|
rows: T;
|
|
28
29
|
columns: ColumnsType<T>;
|
|
29
30
|
fixedRowsIndex?: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { variant } from './tabs-props';
|
|
4
5
|
export type TabsValue = string | null;
|
|
5
6
|
export type TabsVariant = (typeof variant)[number];
|
|
@@ -10,7 +11,7 @@ export interface TabsItem {
|
|
|
10
11
|
disabled?: boolean;
|
|
11
12
|
leftIcon?: ReactNode;
|
|
12
13
|
}
|
|
13
|
-
export interface TabsProps extends StyleProps {
|
|
14
|
+
export interface TabsProps extends StyleProps, TrackProps {
|
|
14
15
|
items: TabsItem[];
|
|
15
16
|
variant?: TabsVariant;
|
|
16
17
|
value?: TabsValue;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent, ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { TrackProps } from '../logging/logging-type';
|
|
2
3
|
import { resize, sizes } from './text-area-props';
|
|
3
4
|
export interface TextAreaRootProps {
|
|
4
5
|
children: ReactNode;
|
|
@@ -20,7 +21,7 @@ export interface TextAreaHelperTextProps {
|
|
|
20
21
|
text: ReactNode;
|
|
21
22
|
className?: string;
|
|
22
23
|
}
|
|
23
|
-
export interface TextAreaProps extends Omit<ComponentPropsWithRef<'textarea'>, 'title'
|
|
24
|
+
export interface TextAreaProps extends Omit<ComponentPropsWithRef<'textarea'>, 'title'>, TrackProps {
|
|
24
25
|
size?: (typeof sizes)[number];
|
|
25
26
|
width?: number | string;
|
|
26
27
|
resize?: (typeof resize)[number];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
+
import { TrackProps } from '../logging/logging-type';
|
|
2
3
|
import { sizes } from './text-field-props';
|
|
3
4
|
export interface TextFieldRootProps {
|
|
4
5
|
children: React.ReactNode;
|
|
@@ -20,7 +21,7 @@ export interface TextFieldHelperTextProps {
|
|
|
20
21
|
text: ReactNode;
|
|
21
22
|
className?: string;
|
|
22
23
|
}
|
|
23
|
-
export interface TextFieldProps extends Omit<ComponentPropsWithRef<'input'>, 'title' | 'size'
|
|
24
|
+
export interface TextFieldProps extends Omit<ComponentPropsWithRef<'input'>, 'title' | 'size'>, TrackProps {
|
|
24
25
|
size: (typeof sizes)[number];
|
|
25
26
|
width: number | string;
|
|
26
27
|
leftIcon?: ReactNode;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
2
|
import { AsChildProps, StyleProps } from '../../helpers/types/common-props';
|
|
3
|
+
import { TrackProps } from '../logging/logging-type';
|
|
3
4
|
import { positions, variants } from './toast-props';
|
|
4
5
|
export interface ToastProviderProps {
|
|
5
6
|
children: ReactNode;
|
|
@@ -36,7 +37,7 @@ export interface ToastAction {
|
|
|
36
37
|
onClick: () => void;
|
|
37
38
|
altText: string;
|
|
38
39
|
}
|
|
39
|
-
export interface ToastProps extends Omit<ToastRootProps, 'children' | keyof StyleProps>, StyleProps {
|
|
40
|
+
export interface ToastProps extends Omit<ToastRootProps, 'children' | keyof StyleProps>, StyleProps, TrackProps {
|
|
40
41
|
title: ReactNode;
|
|
41
42
|
description?: ReactNode;
|
|
42
43
|
variant?: (typeof variants)[number];
|
|
@@ -17,8 +17,11 @@ declare const meta: {
|
|
|
17
17
|
variant: "default";
|
|
18
18
|
};
|
|
19
19
|
decorators: ((Story: import("storybook/internal/csf").PartialStoryFn<import("@storybook/react-webpack5").ReactRenderer, {
|
|
20
|
-
|
|
20
|
+
slot?: string | undefined | undefined;
|
|
21
21
|
style?: import("react").CSSProperties | undefined;
|
|
22
|
+
title: import("react").ReactNode;
|
|
23
|
+
track?: string | undefined;
|
|
24
|
+
key?: import("react").Key | null | undefined;
|
|
22
25
|
defaultChecked?: boolean | undefined | undefined;
|
|
23
26
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
24
27
|
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
@@ -26,6 +29,7 @@ declare const meta: {
|
|
|
26
29
|
accessKey?: string | undefined | undefined;
|
|
27
30
|
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
28
31
|
autoFocus?: boolean | undefined | undefined;
|
|
32
|
+
className?: string | undefined;
|
|
29
33
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
30
34
|
contextMenu?: string | undefined | undefined;
|
|
31
35
|
dir?: string | undefined | undefined;
|
|
@@ -35,10 +39,8 @@ declare const meta: {
|
|
|
35
39
|
id?: string | undefined | undefined;
|
|
36
40
|
lang?: string | undefined | undefined;
|
|
37
41
|
nonce?: string | undefined | undefined;
|
|
38
|
-
slot?: string | undefined | undefined;
|
|
39
42
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
40
43
|
tabIndex?: number | undefined | undefined;
|
|
41
|
-
title: import("react").ReactNode;
|
|
42
44
|
translate?: "yes" | "no" | undefined | undefined;
|
|
43
45
|
radioGroup?: string | undefined | undefined;
|
|
44
46
|
role?: import("react").AriaRole | undefined;
|
|
@@ -282,12 +284,12 @@ declare const meta: {
|
|
|
282
284
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLLIElement> | undefined;
|
|
283
285
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
284
286
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLLIElement> | undefined;
|
|
285
|
-
key?: import("react").Key | null | undefined;
|
|
286
|
-
value?: string | number | readonly string[] | undefined;
|
|
287
287
|
variant?: (typeof variants)[number] | undefined;
|
|
288
288
|
defaultOpen?: boolean | undefined;
|
|
289
289
|
open?: boolean | undefined;
|
|
290
290
|
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
291
|
+
trackProps?: Record<string, string | number | boolean> | undefined;
|
|
292
|
+
value?: string | number | readonly string[] | undefined;
|
|
291
293
|
onResume?: (() => void) | undefined;
|
|
292
294
|
duration?: number | undefined;
|
|
293
295
|
description?: import("react").ReactNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AsChildProps } from '../../helpers/types/common-props';
|
|
2
|
+
import { TrackProps } from '../logging/logging-type';
|
|
2
3
|
import { direction } from './tooltip-props';
|
|
3
4
|
export interface CommonTooltipProps {
|
|
4
5
|
children: React.ReactNode;
|
|
@@ -22,7 +23,7 @@ export interface TooltipProviderProps {
|
|
|
22
23
|
skipDelayDuration?: number;
|
|
23
24
|
disableHoverableContent?: boolean;
|
|
24
25
|
}
|
|
25
|
-
export interface TooltipProps extends TooltipRootProps {
|
|
26
|
+
export interface TooltipProps extends TooltipRootProps, TrackProps {
|
|
26
27
|
trigger: React.ReactNode;
|
|
27
28
|
content: React.ReactNode;
|
|
28
29
|
direction?: (typeof direction)[number];
|
package/dist/components.css
CHANGED
|
@@ -750,6 +750,31 @@
|
|
|
750
750
|
color: var(--color-accent-red-700);
|
|
751
751
|
}
|
|
752
752
|
|
|
753
|
+
/* 소셜 로그인. Google·Apple 가이드의 흰 바탕·검정 글자 — 공급자 로고는 쓰는 쪽이 leftIcon 으로 (ADR 0006) */
|
|
754
|
+
|
|
755
|
+
.cta-button.variant-social {
|
|
756
|
+
background-color: var(--color-white);
|
|
757
|
+
border: var(--hairline) solid var(--color-grey-scale-300);
|
|
758
|
+
color: var(--color-black);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
.cta-button.variant-social:not(:disabled):hover {
|
|
762
|
+
background-color: var(--color-grey-scale-100);
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/* callout prop: 오른쪽 위 모서리에 반쯤 걸친 말풍선 (ADR 0007). 글자 흐름 밖이라 글자가 움직이지 않는다.
|
|
766
|
+
.base-callout 의 position: relative 를 순서와 상관없이 이기도록 .cta-button > 로 한 단계 높인다 */
|
|
767
|
+
|
|
768
|
+
.cta-button.with-callout {
|
|
769
|
+
position: relative;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
.cta-button > .cta-button-callout {
|
|
773
|
+
position: absolute;
|
|
774
|
+
top: calc(var(--spacing-12) * -1);
|
|
775
|
+
right: var(--spacing-14);
|
|
776
|
+
}
|
|
777
|
+
|
|
753
778
|
.cta-button.size-xl {
|
|
754
779
|
height: var(--control-height-xl);
|
|
755
780
|
padding: 0 var(--spacing-24);
|
|
@@ -802,6 +827,60 @@
|
|
|
802
827
|
border: none;
|
|
803
828
|
}
|
|
804
829
|
|
|
830
|
+
/* 대상에 붙어 늘 떠 있는 작은 말풍선 (ADR 0007).
|
|
831
|
+
연보라(primary 뱃지·secondary 버튼과 같은 색)는 흰 면 위에서 묻혀서 purple-300 테두리로 윤곽을 잡는다. */
|
|
832
|
+
|
|
833
|
+
.base-callout {
|
|
834
|
+
position: relative;
|
|
835
|
+
display: inline-flex;
|
|
836
|
+
align-items: center;
|
|
837
|
+
height: var(--label-height-xs);
|
|
838
|
+
padding: 0 var(--spacing-10);
|
|
839
|
+
border: var(--hairline) solid var(--color-purple-300);
|
|
840
|
+
border-radius: var(--radius-6);
|
|
841
|
+
|
|
842
|
+
background-color: var(--color-purple-50);
|
|
843
|
+
color: var(--color-purple-900);
|
|
844
|
+
box-shadow: var(--shadow-popover);
|
|
845
|
+
|
|
846
|
+
font-size: var(--font-size-xsm);
|
|
847
|
+
line-height: var(--line-height-xsm);
|
|
848
|
+
font-weight: var(--font-weight-bold);
|
|
849
|
+
white-space: nowrap;
|
|
850
|
+
|
|
851
|
+
/* 꼬리: --spacing-8 정사각형을 45도 돌린다. 한 변의 절반에 테두리 두께만큼 더 밖으로 내어 몸통 테두리를 덮는다 */
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
.base-callout::after {
|
|
855
|
+
content: '';
|
|
856
|
+
position: absolute;
|
|
857
|
+
width: var(--spacing-8);
|
|
858
|
+
height: var(--spacing-8);
|
|
859
|
+
border: 0 solid var(--color-purple-300);
|
|
860
|
+
background-color: inherit;
|
|
861
|
+
transform: rotate(45deg);
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
.base-callout:is(.tail-bottom-start,.tail-bottom-end)::after {
|
|
865
|
+
bottom: calc((var(--spacing-4) + var(--hairline)) * -1);
|
|
866
|
+
border-right-width: var(--hairline);
|
|
867
|
+
border-bottom-width: var(--hairline);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.base-callout:is(.tail-top-start,.tail-top-end)::after {
|
|
871
|
+
top: calc((var(--spacing-4) + var(--hairline)) * -1);
|
|
872
|
+
border-left-width: var(--hairline);
|
|
873
|
+
border-top-width: var(--hairline);
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
.base-callout:is(.tail-bottom-start,.tail-top-start)::after {
|
|
877
|
+
left: var(--spacing-12);
|
|
878
|
+
}
|
|
879
|
+
|
|
880
|
+
.base-callout:is(.tail-bottom-end,.tail-top-end)::after {
|
|
881
|
+
right: var(--spacing-12);
|
|
882
|
+
}
|
|
883
|
+
|
|
805
884
|
.base-check-box.label {
|
|
806
885
|
font-size: var(--font-size-sm);
|
|
807
886
|
font-weight: var(--font-weight-medium);
|
package/dist/cta-button.js
CHANGED
|
@@ -11,11 +11,13 @@ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_179142b8__ from "react/j
|
|
|
11
11
|
/* harmony export */ });
|
|
12
12
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __nuri_require__(612);
|
|
13
13
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __nuri_require__(1041);
|
|
14
|
-
/* harmony import */ var
|
|
15
|
-
/* harmony import */ var
|
|
16
|
-
/* harmony import */ var
|
|
17
|
-
/* harmony import */ var
|
|
18
|
-
/* harmony import */ var
|
|
14
|
+
/* harmony import */ var _helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__ = __nuri_require__(4560);
|
|
15
|
+
/* harmony import */ var _helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__ = __nuri_require__(3274);
|
|
16
|
+
/* harmony import */ var _helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_4__ = __nuri_require__(7335);
|
|
17
|
+
/* harmony import */ var _callout_callout__WEBPACK_IMPORTED_MODULE_5__ = __nuri_require__(1163);
|
|
18
|
+
/* harmony import */ var _loading_spinner_spinner__WEBPACK_IMPORTED_MODULE_6__ = __nuri_require__(6302);
|
|
19
|
+
/* harmony import */ var _base_button__WEBPACK_IMPORTED_MODULE_7__ = __nuri_require__(8933);
|
|
20
|
+
/* harmony import */ var _button_props__WEBPACK_IMPORTED_MODULE_8__ = __nuri_require__(9976);
|
|
19
21
|
var __assign = undefined && undefined.__assign || function () {
|
|
20
22
|
__assign = Object.assign || function (t) {
|
|
21
23
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -41,19 +43,36 @@ var __rest = undefined && undefined.__rest || function (s, e) {
|
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
|
|
46
|
+
|
|
47
|
+
|
|
44
48
|
var CTAButton = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_1__.forwardRef)(function (props, ref) {
|
|
45
|
-
var _a = (0,
|
|
49
|
+
var _a = (0,_helpers_utils_getMergedProps__WEBPACK_IMPORTED_MODULE_4__/* .getMergedProps */ .p)(props, _button_props__WEBPACK_IMPORTED_MODULE_8__/* .ctaButtonProps */ .Lr),
|
|
46
50
|
className = _a.className,
|
|
47
51
|
text = _a.text,
|
|
48
52
|
leftIcon = _a.leftIcon,
|
|
49
53
|
rightIcon = _a.rightIcon,
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
callout = _a.callout,
|
|
55
|
+
_onClick = _a.onClick,
|
|
56
|
+
track = _a.track,
|
|
57
|
+
trackProps = _a.trackProps,
|
|
58
|
+
restProps = __rest(_a, ["className", "text", "leftIcon", "rightIcon", "callout", "onClick", "track", "trackProps"]);
|
|
59
|
+
var emit = (0,_helpers_hooks_useTrack__WEBPACK_IMPORTED_MODULE_2__/* .useTrack */ .n)('CTAButton', {
|
|
60
|
+
track: track,
|
|
61
|
+
trackProps: trackProps
|
|
62
|
+
});
|
|
63
|
+
return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_base_button__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A, __assign({
|
|
52
64
|
ref: ref,
|
|
53
|
-
className: (0,
|
|
54
|
-
loadingComponent: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(
|
|
65
|
+
className: (0,_helpers_utils_classNames__WEBPACK_IMPORTED_MODULE_3__/* .classNames */ .x)(className, 'cta-button', callout ? 'with-callout' : undefined),
|
|
66
|
+
loadingComponent: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_loading_spinner_spinner__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A, {}),
|
|
67
|
+
onClick: function onClick(event) {
|
|
68
|
+
emit('click');
|
|
69
|
+
_onClick === null || _onClick === void 0 ? void 0 : _onClick(event);
|
|
70
|
+
}
|
|
55
71
|
}, restProps, {
|
|
56
|
-
children: [leftIcon, text, rightIcon]
|
|
72
|
+
children: [leftIcon, text, rightIcon, callout ? (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_callout_callout__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A, {
|
|
73
|
+
className: 'cta-button-callout',
|
|
74
|
+
text: callout
|
|
75
|
+
}) : null]
|
|
57
76
|
}));
|
|
58
77
|
});
|
|
59
78
|
CTAButton.displayName = 'CTAButton';
|
|
@@ -68,7 +87,7 @@ var x = (y) => {
|
|
|
68
87
|
var x = {}; __nuri_require__.d(x, y); return x
|
|
69
88
|
}
|
|
70
89
|
var y = (x) => (() => (x))
|
|
71
|
-
module.exports = x({ ["Children"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.Children), ["cloneElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.cloneElement), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["isValidElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement) });
|
|
90
|
+
module.exports = x({ ["Children"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.Children), ["cloneElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.cloneElement), ["createContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.createContext), ["forwardRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.forwardRef), ["isValidElement"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.isValidElement), ["useCallback"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useCallback), ["useContext"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useContext), ["useRef"]: () => (__WEBPACK_EXTERNAL_MODULE_react__.useRef) });
|
|
72
91
|
|
|
73
92
|
/***/ },
|
|
74
93
|
|
|
@@ -173,8 +192,8 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
|
|
|
173
192
|
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
|
174
193
|
/******/ // [resolve, Promise] = chunk loading, 0 = chunk loaded
|
|
175
194
|
/******/ var installedChunks = {
|
|
176
|
-
/******/
|
|
177
|
-
/******/
|
|
195
|
+
/******/ 910: 0,
|
|
196
|
+
/******/ 2440: 0
|
|
178
197
|
/******/ };
|
|
179
198
|
/******/
|
|
180
199
|
/******/ var installChunk = (data) => {
|
|
@@ -214,23 +233,27 @@ module.exports = x({ ["jsx"]: () => (__WEBPACK_EXTERNAL_MODULE_react_jsx_runtime
|
|
|
214
233
|
/******/
|
|
215
234
|
/************************************************************************/
|
|
216
235
|
/******/
|
|
217
|
-
/******/ import * as __webpack_chunk_1__ from "./chunk-
|
|
236
|
+
/******/ import * as __webpack_chunk_1__ from "./chunk-6364.js";
|
|
218
237
|
/******/ __nuri_require__.C(__webpack_chunk_1__);
|
|
219
|
-
/******/ import * as __webpack_chunk_2__ from "./chunk-
|
|
238
|
+
/******/ import * as __webpack_chunk_2__ from "./chunk-4560.js";
|
|
220
239
|
/******/ __nuri_require__.C(__webpack_chunk_2__);
|
|
221
|
-
/******/ import * as __webpack_chunk_3__ from "./chunk-
|
|
240
|
+
/******/ import * as __webpack_chunk_3__ from "./chunk-2777.js";
|
|
222
241
|
/******/ __nuri_require__.C(__webpack_chunk_3__);
|
|
223
|
-
/******/ import * as __webpack_chunk_4__ from "./chunk-
|
|
242
|
+
/******/ import * as __webpack_chunk_4__ from "./chunk-7298.js";
|
|
224
243
|
/******/ __nuri_require__.C(__webpack_chunk_4__);
|
|
225
|
-
/******/ import * as __webpack_chunk_5__ from "./chunk-
|
|
244
|
+
/******/ import * as __webpack_chunk_5__ from "./chunk-8933.js";
|
|
226
245
|
/******/ __nuri_require__.C(__webpack_chunk_5__);
|
|
227
|
-
/******/ import * as __webpack_chunk_6__ from "./chunk-
|
|
246
|
+
/******/ import * as __webpack_chunk_6__ from "./chunk-6302.js";
|
|
228
247
|
/******/ __nuri_require__.C(__webpack_chunk_6__);
|
|
248
|
+
/******/ import * as __webpack_chunk_7__ from "./chunk-2496.js";
|
|
249
|
+
/******/ __nuri_require__.C(__webpack_chunk_7__);
|
|
250
|
+
/******/ import * as __webpack_chunk_8__ from "./chunk-5226.js";
|
|
251
|
+
/******/ __nuri_require__.C(__webpack_chunk_8__);
|
|
229
252
|
/******/
|
|
230
253
|
/******/ // startup
|
|
231
254
|
/******/ // Load entry module and return exports
|
|
232
255
|
/******/ // This entry module depends on other loaded chunks and execution need to be delayed
|
|
233
|
-
/******/ var __webpack_exports__ = __nuri_require__.O(undefined, [
|
|
256
|
+
/******/ var __webpack_exports__ = __nuri_require__.O(undefined, [6364,4560,2777,7298,8933,6302,2496,5226], () => (__nuri_require__(910)))
|
|
234
257
|
/******/ __webpack_exports__ = __nuri_require__.O(__webpack_exports__);
|
|
235
258
|
/******/ const __webpack_exports__default = __webpack_exports__.A;
|
|
236
259
|
/******/ export { __webpack_exports__default as default };
|