@ncds/ui-admin 1.8.21-alpha.12 → 1.8.21-alpha.13
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/src/components/overlays/notification/CalloutNotification.js +6 -1
- package/dist/cjs/src/components/overlays/notification/Notification.js +22 -2
- package/dist/cjs/src/components/overlays/notification/__tests__/CalloutNotification.test.js +128 -0
- package/dist/cjs/src/components/overlays/notification/__tests__/Notification.test.js +83 -0
- package/dist/cjs/src/generated/scoped-css.js +1 -1
- package/dist/esm/src/components/overlays/notification/CalloutNotification.js +6 -1
- package/dist/esm/src/components/overlays/notification/Notification.js +22 -2
- package/dist/esm/src/components/overlays/notification/__tests__/CalloutNotification.test.js +125 -0
- package/dist/esm/src/components/overlays/notification/__tests__/Notification.test.js +80 -0
- package/dist/esm/src/generated/scoped-css.js +1 -1
- package/dist/temp/src/components/overlays/notification/CalloutNotification.d.ts +3 -1
- package/dist/temp/src/components/overlays/notification/CalloutNotification.js +5 -1
- package/dist/temp/src/components/overlays/notification/Notification.d.ts +12 -2
- package/dist/temp/src/components/overlays/notification/Notification.js +9 -4
- package/dist/temp/src/components/overlays/notification/__tests__/CalloutNotification.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/notification/__tests__/CalloutNotification.test.js +108 -0
- package/dist/temp/src/components/overlays/notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/notification/__tests__/Notification.test.js +71 -0
- package/dist/temp/src/generated/scoped-css.js +1 -1
- package/dist/types/src/components/overlays/notification/CalloutNotification.d.ts +3 -1
- package/dist/types/src/components/overlays/notification/Notification.d.ts +12 -2
- package/dist/types/src/components/overlays/notification/__tests__/CalloutNotification.test.d.ts +1 -0
- package/dist/types/src/components/overlays/notification/__tests__/Notification.test.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +7 -0
- package/dist/ui-admin/assets/styles/style.scoped.css +7 -0
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
2
|
import type { NotificationColor } from './Notification';
|
|
3
|
+
type CalloutNotificationWidth = 'full' | 'fit';
|
|
3
4
|
interface CalloutNotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
4
5
|
color?: NotificationColor;
|
|
5
6
|
title?: ReactNode;
|
|
7
|
+
width?: CalloutNotificationWidth;
|
|
6
8
|
}
|
|
7
9
|
declare const CalloutNotification: import("react").ForwardRefExoticComponent<CalloutNotificationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export type { CalloutNotificationProps };
|
|
10
|
+
export type { CalloutNotificationProps, CalloutNotificationWidth };
|
|
9
11
|
export { CalloutNotification };
|
|
@@ -2,7 +2,7 @@ import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
|
2
2
|
import type { ColorTone } from '../../../../constant/color';
|
|
3
3
|
import type { SlotIconComponent } from '../../../types/side-slot';
|
|
4
4
|
import type { ButtonTheme } from '../../action/button';
|
|
5
|
-
import { type CalloutNotificationProps } from './CalloutNotification';
|
|
5
|
+
import { type CalloutNotificationProps, type CalloutNotificationWidth } from './CalloutNotification';
|
|
6
6
|
type NotificationType = 'floating' | 'full-width' | 'message' | 'callout';
|
|
7
7
|
type NotificationColor = Extract<ColorTone, 'neutral' | 'error' | 'warning' | 'success' | 'info'>;
|
|
8
8
|
type NotificationSize = 'desktop' | 'mobile';
|
|
@@ -76,6 +76,16 @@ interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title
|
|
|
76
76
|
* 표기가 통일되어 있지 않은 것은 현행 유지이며, 통일은 별도 결정 사항이다.
|
|
77
77
|
*/
|
|
78
78
|
hidePermanentlyLabel?: ReactNode;
|
|
79
|
+
/**
|
|
80
|
+
* supportingText 에 연결할 링크 URL (선택사항)
|
|
81
|
+
* full-width 타입에서 사용 가능
|
|
82
|
+
*/
|
|
83
|
+
supportTextLink?: string;
|
|
84
|
+
/**
|
|
85
|
+
* 너비 동작 (선택사항)
|
|
86
|
+
* callout 타입에서만 사용 가능. 미지정 시 부모 너비를 채운다(100%). 'fit' 은 콘텐츠 너비에 맞춘다
|
|
87
|
+
*/
|
|
88
|
+
width?: CalloutNotificationWidth;
|
|
79
89
|
/**
|
|
80
90
|
* Portal 마운트 여부. `floating` 타입에서만 동작한다.
|
|
81
91
|
*
|
|
@@ -92,5 +102,5 @@ interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title
|
|
|
92
102
|
}
|
|
93
103
|
declare const Notification: import("react").ForwardRefExoticComponent<NotificationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
94
104
|
export type { NotificationType, NotificationColor, NotificationSize, NotificationAction, NotificationProps };
|
|
95
|
-
export type { CalloutNotificationProps };
|
|
105
|
+
export type { CalloutNotificationProps, CalloutNotificationWidth };
|
|
96
106
|
export { Notification };
|
package/dist/types/src/components/overlays/notification/__tests__/CalloutNotification.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3065,6 +3065,13 @@ button {
|
|
|
3065
3065
|
line-height: var(--line-heights-md);
|
|
3066
3066
|
font-weight: var(--font-weights-commerce-sans-0);
|
|
3067
3067
|
}
|
|
3068
|
+
.ncua-callout-notification--full {
|
|
3069
|
+
width: 100%;
|
|
3070
|
+
}
|
|
3071
|
+
.ncua-callout-notification--fit {
|
|
3072
|
+
width: fit-content;
|
|
3073
|
+
max-width: 100%;
|
|
3074
|
+
}
|
|
3068
3075
|
.ncua-callout-notification--info {
|
|
3069
3076
|
background-color: var(--blue-50);
|
|
3070
3077
|
border-color: var(--blue-200);
|
|
@@ -3057,6 +3057,13 @@
|
|
|
3057
3057
|
line-height: var(--line-heights-md);
|
|
3058
3058
|
font-weight: var(--font-weights-commerce-sans-0);
|
|
3059
3059
|
}
|
|
3060
|
+
.ncua-callout-notification--full {
|
|
3061
|
+
width: 100%;
|
|
3062
|
+
}
|
|
3063
|
+
.ncua-callout-notification--fit {
|
|
3064
|
+
width: fit-content;
|
|
3065
|
+
max-width: 100%;
|
|
3066
|
+
}
|
|
3060
3067
|
.ncua-callout-notification--info {
|
|
3061
3068
|
background-color: var(--blue-50);
|
|
3062
3069
|
border-color: var(--blue-200);
|