@ncds/ui-admin 1.8.21-alpha.5 → 1.8.21-alpha.6
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/cjs/assets/scripts/notification/FullWidthNotification.js +17 -6
- package/dist/cjs/assets/scripts/notification/MessageNotification.js +4 -2
- package/dist/cjs/assets/scripts/notification/messageTemplate.js +37 -8
- package/dist/cjs/constant/notification.js +21 -0
- package/dist/cjs/src/components/overlays/notification/FullWidthNotification.js +3 -1
- package/dist/cjs/src/components/overlays/notification/MessageNotification.js +2 -0
- package/dist/cjs/src/components/overlays/notification/MessageNotificationParts.js +3 -1
- package/dist/cjs/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.js +209 -0
- package/dist/cjs/src/generated/scoped-css.js +1 -1
- package/dist/esm/assets/scripts/notification/FullWidthNotification.js +17 -6
- package/dist/esm/assets/scripts/notification/MessageNotification.js +4 -2
- package/dist/esm/assets/scripts/notification/messageTemplate.js +37 -8
- package/dist/esm/constant/notification.js +15 -0
- package/dist/esm/src/components/overlays/notification/FullWidthNotification.js +3 -1
- package/dist/esm/src/components/overlays/notification/MessageNotification.js +2 -0
- package/dist/esm/src/components/overlays/notification/MessageNotificationParts.js +3 -1
- package/dist/esm/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.js +206 -0
- package/dist/esm/src/generated/scoped-css.js +1 -1
- package/dist/temp/assets/scripts/notification/FullWidthNotification.d.ts +6 -0
- package/dist/temp/assets/scripts/notification/FullWidthNotification.js +14 -5
- package/dist/temp/assets/scripts/notification/MessageNotification.js +2 -1
- package/dist/temp/assets/scripts/notification/const/types.d.ts +10 -0
- package/dist/temp/assets/scripts/notification/messageTemplate.d.ts +1 -0
- package/dist/temp/assets/scripts/notification/messageTemplate.js +18 -8
- package/dist/temp/constant/notification.d.ts +15 -0
- package/dist/temp/constant/notification.js +15 -0
- package/dist/temp/src/components/overlays/notification/FullWidthNotification.d.ts +6 -0
- package/dist/temp/src/components/overlays/notification/FullWidthNotification.js +3 -2
- package/dist/temp/src/components/overlays/notification/MessageNotification.d.ts +6 -0
- package/dist/temp/src/components/overlays/notification/MessageNotification.js +2 -2
- package/dist/temp/src/components/overlays/notification/MessageNotificationParts.d.ts +2 -1
- package/dist/temp/src/components/overlays/notification/MessageNotificationParts.js +3 -2
- package/dist/temp/src/components/overlays/notification/Notification.d.ts +8 -0
- package/dist/temp/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.js +160 -0
- package/dist/temp/src/generated/scoped-css.js +1 -1
- package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +6 -0
- package/dist/types/assets/scripts/notification/const/types.d.ts +10 -0
- package/dist/types/assets/scripts/notification/messageTemplate.d.ts +1 -0
- package/dist/types/constant/notification.d.ts +15 -0
- package/dist/types/src/components/overlays/notification/FullWidthNotification.d.ts +6 -0
- package/dist/types/src/components/overlays/notification/MessageNotification.d.ts +6 -0
- package/dist/types/src/components/overlays/notification/MessageNotificationParts.d.ts +2 -1
- package/dist/types/src/components/overlays/notification/Notification.d.ts +8 -0
- package/dist/types/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +2 -13
- package/dist/ui-admin/assets/styles/style.scoped.css +2 -13
- package/package.json +1 -1
|
@@ -9,6 +9,12 @@ export declare class FullWidthNotification {
|
|
|
9
9
|
constructor(options: FullWidthNotificationOptions);
|
|
10
10
|
private createElement;
|
|
11
11
|
private buildTemplate;
|
|
12
|
+
/**
|
|
13
|
+
* 다시보지 않기 버튼.
|
|
14
|
+
*
|
|
15
|
+
* `label`은 이 함수의 반환값이 `wrapper.innerHTML`에 들어가기 전에 `sanitizeHtml`로
|
|
16
|
+
* 처리되므로 별도 이스케이프하지 않는다 — `renderSupportingText`와 같은 정책이다.
|
|
17
|
+
*/
|
|
12
18
|
private renderHidePermanentlyButton;
|
|
13
19
|
private renderCloseButton;
|
|
14
20
|
private bindEvents;
|
|
@@ -33,5 +33,15 @@ export interface BaseNotificationOptions {
|
|
|
33
33
|
autoClose?: number;
|
|
34
34
|
supportTextLink?: string;
|
|
35
35
|
onHidePermanently?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* 다시보지 않기 버튼의 라벨. full-width, message 타입에서 사용 가능하며
|
|
38
|
+
* `onHidePermanently`를 지정했을 때만 렌더된다.
|
|
39
|
+
*
|
|
40
|
+
* 기본값은 타입별로 다르다 — message는 `'다시 보지 않기'`, full-width는 `'다시보지 않기'`.
|
|
41
|
+
* 표기가 통일되어 있지 않은 것은 현행 유지이며, 통일은 별도 결정 사항이다.
|
|
42
|
+
*
|
|
43
|
+
* 값은 HTML에 삽입되기 전 `sanitizeHtml`을 거친다.
|
|
44
|
+
*/
|
|
45
|
+
hidePermanentlyLabel?: string;
|
|
36
46
|
}
|
|
37
47
|
export declare const MESSAGE_CLOSE_ICON_COLORS: Record<NotificationColor, string>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 다시보지 않기 버튼의 타입별 기본 문구.
|
|
3
|
+
*
|
|
4
|
+
* `hidePermanentlyLabel`을 지정하지 않았을 때 쓰인다.
|
|
5
|
+
* React(`src/components/overlays/notification/`)와 Vanilla(`assets/scripts/notification/`)
|
|
6
|
+
* 두 구현이 이 상수를 함께 참조한다 — 문구가 하드코딩으로 흩어져 서로 어긋나던 문제(#460)를
|
|
7
|
+
* 막기 위한 단일 출처다.
|
|
8
|
+
*
|
|
9
|
+
* `message`와 `fullWidth`의 띄어쓰기가 다른 것은 오타가 아니라 현행 유지다.
|
|
10
|
+
* 표기 통일은 별도 결정 사항이며, 결정되면 이 파일 한 곳만 고치면 된다.
|
|
11
|
+
*/
|
|
12
|
+
export declare const HIDE_PERMANENTLY_LABEL: {
|
|
13
|
+
readonly message: "다시 보지 않기";
|
|
14
|
+
readonly fullWidth: "다시보지 않기";
|
|
15
|
+
};
|
|
@@ -40,6 +40,12 @@ interface FullWidthNotificationProps extends Omit<ComponentPropsWithoutRef<'div'
|
|
|
40
40
|
* 다시보지 않기 이벤트 핸들러 (선택사항)
|
|
41
41
|
*/
|
|
42
42
|
onHidePermanently?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* 다시보지 않기 버튼의 라벨 (선택사항)
|
|
45
|
+
* `onHidePermanently`를 지정했을 때만 렌더된다.
|
|
46
|
+
* @default '다시보지 않기'
|
|
47
|
+
*/
|
|
48
|
+
hidePermanentlyLabel?: ReactNode;
|
|
43
49
|
}
|
|
44
50
|
declare const FullWidthNotification: import("react").ForwardRefExoticComponent<FullWidthNotificationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
45
51
|
export type { FullWidthNotificationProps };
|
|
@@ -35,6 +35,12 @@ interface MessageNotificationProps extends Omit<ComponentPropsWithoutRef<'div'>,
|
|
|
35
35
|
* 다시보지 않기 이벤트 핸들러 (선택사항)
|
|
36
36
|
*/
|
|
37
37
|
onHidePermanently?: () => void;
|
|
38
|
+
/**
|
|
39
|
+
* 다시보지 않기 버튼의 라벨 (선택사항)
|
|
40
|
+
* `onHidePermanently`를 지정했을 때만 렌더된다.
|
|
41
|
+
* @default '다시 보지 않기'
|
|
42
|
+
*/
|
|
43
|
+
hidePermanentlyLabel?: ReactNode;
|
|
38
44
|
}
|
|
39
45
|
declare const MessageNotification: import("react").ForwardRefExoticComponent<MessageNotificationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
40
46
|
export type { MessageNotificationProps };
|
|
@@ -15,6 +15,7 @@ interface MessageNotificationActionsProps {
|
|
|
15
15
|
actions?: NotificationAction[];
|
|
16
16
|
onClose?: () => void;
|
|
17
17
|
onHidePermanently?: () => void;
|
|
18
|
+
hidePermanentlyLabel?: ReactNode;
|
|
18
19
|
closeIconColor: string;
|
|
19
20
|
}
|
|
20
21
|
/**
|
|
@@ -22,6 +23,6 @@ interface MessageNotificationActionsProps {
|
|
|
22
23
|
* 이 컨테이너의 gap(12px)이 두 그룹 사이 간격을 만든다.
|
|
23
24
|
* 표시할 요소가 하나도 없으면 빈 컨테이너를 남기지 않는다.
|
|
24
25
|
*/
|
|
25
|
-
declare const MessageNotificationActions: ({ actions, onClose, onHidePermanently, closeIconColor, }: MessageNotificationActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
declare const MessageNotificationActions: ({ actions, onClose, onHidePermanently, hidePermanentlyLabel, closeIconColor, }: MessageNotificationActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
26
27
|
export type { MessageNotificationActionsProps, MessageNotificationContentProps };
|
|
27
28
|
export { MessageNotificationActions, MessageNotificationContent };
|
|
@@ -68,6 +68,14 @@ interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title
|
|
|
68
68
|
* message, full-width 타입에서 사용 가능
|
|
69
69
|
*/
|
|
70
70
|
onHidePermanently?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* 다시보지 않기 버튼의 라벨 (선택사항)
|
|
73
|
+
* message, full-width 타입에서 사용 가능하며 `onHidePermanently`를 지정했을 때만 렌더된다.
|
|
74
|
+
*
|
|
75
|
+
* 기본값은 타입별로 다르다 — message는 `'다시 보지 않기'`, full-width는 `'다시보지 않기'`.
|
|
76
|
+
* 표기가 통일되어 있지 않은 것은 현행 유지이며, 통일은 별도 결정 사항이다.
|
|
77
|
+
*/
|
|
78
|
+
hidePermanentlyLabel?: ReactNode;
|
|
71
79
|
/**
|
|
72
80
|
* Portal 마운트 여부. `floating` 타입에서만 동작한다.
|
|
73
81
|
*
|
package/dist/types/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2759,9 +2759,6 @@ button {
|
|
|
2759
2759
|
.ncua-message-notification--neutral .ncua-notification__action-button--text, .ncua-message-notification--neutral .ncua-notification__action-button--text-gray {
|
|
2760
2760
|
color: var(--gray-600);
|
|
2761
2761
|
}
|
|
2762
|
-
.ncua-message-notification--neutral .ncua-message-notification__hide-link {
|
|
2763
|
-
color: var(--gray-500);
|
|
2764
|
-
}
|
|
2765
2762
|
.ncua-message-notification--error {
|
|
2766
2763
|
color: var(--primary-red-600);
|
|
2767
2764
|
background-color: var(--primary-red-50);
|
|
@@ -2781,9 +2778,6 @@ button {
|
|
|
2781
2778
|
.ncua-message-notification--error .ncua-notification__action-button--text, .ncua-message-notification--error .ncua-notification__action-button--text-gray {
|
|
2782
2779
|
color: var(--primary-red-600);
|
|
2783
2780
|
}
|
|
2784
|
-
.ncua-message-notification--error .ncua-message-notification__hide-link {
|
|
2785
|
-
color: var(--gray-500);
|
|
2786
|
-
}
|
|
2787
2781
|
.ncua-message-notification--warning {
|
|
2788
2782
|
color: var(--orange-600);
|
|
2789
2783
|
background-color: var(--orange-50);
|
|
@@ -2803,9 +2797,6 @@ button {
|
|
|
2803
2797
|
.ncua-message-notification--warning .ncua-notification__action-button--text, .ncua-message-notification--warning .ncua-notification__action-button--text-gray {
|
|
2804
2798
|
color: var(--orange-600);
|
|
2805
2799
|
}
|
|
2806
|
-
.ncua-message-notification--warning .ncua-message-notification__hide-link {
|
|
2807
|
-
color: var(--gray-500);
|
|
2808
|
-
}
|
|
2809
2800
|
.ncua-message-notification--success {
|
|
2810
2801
|
color: var(--green-600);
|
|
2811
2802
|
background-color: var(--green-50);
|
|
@@ -2825,9 +2816,6 @@ button {
|
|
|
2825
2816
|
.ncua-message-notification--success .ncua-notification__action-button--text, .ncua-message-notification--success .ncua-notification__action-button--text-gray {
|
|
2826
2817
|
color: var(--green-600);
|
|
2827
2818
|
}
|
|
2828
|
-
.ncua-message-notification--success .ncua-message-notification__hide-link {
|
|
2829
|
-
color: var(--gray-500);
|
|
2830
|
-
}
|
|
2831
2819
|
.ncua-message-notification .ncua-notification__action-button {
|
|
2832
2820
|
background: transparent;
|
|
2833
2821
|
border: none;
|
|
@@ -2840,7 +2828,8 @@ button {
|
|
|
2840
2828
|
.ncua-message-notification .ncua-notification__action-button--text, .ncua-message-notification .ncua-notification__action-button--text-gray {
|
|
2841
2829
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
2842
2830
|
}
|
|
2843
|
-
.ncua-message-notification__hide-link.ncua-notification__action-button {
|
|
2831
|
+
.ncua-message-notification .ncua-message-notification__hide-link.ncua-notification__action-button {
|
|
2832
|
+
color: var(--gray-500);
|
|
2844
2833
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
2845
2834
|
}
|
|
2846
2835
|
|
|
@@ -2751,9 +2751,6 @@
|
|
|
2751
2751
|
.ncua-message-notification--neutral .ncua-notification__action-button--text, .ncua-message-notification--neutral .ncua-notification__action-button--text-gray {
|
|
2752
2752
|
color: var(--gray-600);
|
|
2753
2753
|
}
|
|
2754
|
-
.ncua-message-notification--neutral .ncua-message-notification__hide-link {
|
|
2755
|
-
color: var(--gray-500);
|
|
2756
|
-
}
|
|
2757
2754
|
.ncua-message-notification--error {
|
|
2758
2755
|
color: var(--primary-red-600);
|
|
2759
2756
|
background-color: var(--primary-red-50);
|
|
@@ -2773,9 +2770,6 @@
|
|
|
2773
2770
|
.ncua-message-notification--error .ncua-notification__action-button--text, .ncua-message-notification--error .ncua-notification__action-button--text-gray {
|
|
2774
2771
|
color: var(--primary-red-600);
|
|
2775
2772
|
}
|
|
2776
|
-
.ncua-message-notification--error .ncua-message-notification__hide-link {
|
|
2777
|
-
color: var(--gray-500);
|
|
2778
|
-
}
|
|
2779
2773
|
.ncua-message-notification--warning {
|
|
2780
2774
|
color: var(--orange-600);
|
|
2781
2775
|
background-color: var(--orange-50);
|
|
@@ -2795,9 +2789,6 @@
|
|
|
2795
2789
|
.ncua-message-notification--warning .ncua-notification__action-button--text, .ncua-message-notification--warning .ncua-notification__action-button--text-gray {
|
|
2796
2790
|
color: var(--orange-600);
|
|
2797
2791
|
}
|
|
2798
|
-
.ncua-message-notification--warning .ncua-message-notification__hide-link {
|
|
2799
|
-
color: var(--gray-500);
|
|
2800
|
-
}
|
|
2801
2792
|
.ncua-message-notification--success {
|
|
2802
2793
|
color: var(--green-600);
|
|
2803
2794
|
background-color: var(--green-50);
|
|
@@ -2817,9 +2808,6 @@
|
|
|
2817
2808
|
.ncua-message-notification--success .ncua-notification__action-button--text, .ncua-message-notification--success .ncua-notification__action-button--text-gray {
|
|
2818
2809
|
color: var(--green-600);
|
|
2819
2810
|
}
|
|
2820
|
-
.ncua-message-notification--success .ncua-message-notification__hide-link {
|
|
2821
|
-
color: var(--gray-500);
|
|
2822
|
-
}
|
|
2823
2811
|
.ncua-message-notification .ncua-notification__action-button {
|
|
2824
2812
|
background: transparent;
|
|
2825
2813
|
border: none;
|
|
@@ -2832,7 +2820,8 @@
|
|
|
2832
2820
|
.ncua-message-notification .ncua-notification__action-button--text, .ncua-message-notification .ncua-notification__action-button--text-gray {
|
|
2833
2821
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
2834
2822
|
}
|
|
2835
|
-
.ncua-message-notification__hide-link.ncua-notification__action-button {
|
|
2823
|
+
.ncua-message-notification .ncua-message-notification__hide-link.ncua-notification__action-button {
|
|
2824
|
+
color: var(--gray-500);
|
|
2836
2825
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
2837
2826
|
}
|
|
2838
2827
|
|