@ncds/ui-admin 1.8.21-alpha.0 → 1.8.21-alpha.10
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 +10 -48
- package/dist/cjs/assets/scripts/notification/const/classNames.js +3 -0
- package/dist/cjs/assets/scripts/notification/const/index.js +1 -1
- package/dist/cjs/assets/scripts/notification/const/sizes.js +4 -2
- package/dist/cjs/assets/scripts/notification/messageTemplate.js +106 -0
- package/dist/cjs/assets/scripts/notification/utils.js +40 -4
- package/dist/cjs/constant/notification.js +21 -0
- package/dist/cjs/src/components/forms-and-input/input-base/InputBase.js +52 -34
- package/dist/cjs/src/components/forms-and-input/input-base/__tests__/InputBase.test.js +228 -0
- package/dist/cjs/src/components/forms-and-input/password-input/PasswordInput.js +3 -2
- package/dist/cjs/src/components/forms-and-input/password-input/__tests__/PasswordInput.test.js +59 -0
- package/dist/cjs/src/components/index.js +22 -0
- package/dist/cjs/src/components/layout/ncua-scope/NcuaScope.js +79 -0
- package/dist/cjs/src/components/layout/ncua-scope/index.js +16 -0
- package/dist/cjs/src/components/navigation/pagination/Pagination.js +3 -1
- package/dist/cjs/src/components/navigation/pagination/__tests__/Pagination.test.js +74 -0
- package/dist/cjs/src/components/overlays/notification/FullWidthNotification.js +3 -1
- package/dist/cjs/src/components/overlays/notification/MessageNotification.js +14 -54
- package/dist/cjs/src/components/overlays/notification/MessageNotificationParts.js +92 -0
- package/dist/cjs/src/components/overlays/notification/__tests__/MessageNotification.test.js +246 -0
- package/dist/cjs/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.js +209 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +259 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +70 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.js +623 -0
- package/dist/cjs/src/components/overlays/postcode-search-modal/index.js +16 -0
- package/dist/cjs/src/generated/scoped-css.js +9 -0
- package/dist/esm/assets/scripts/notification/FullWidthNotification.js +17 -6
- package/dist/esm/assets/scripts/notification/MessageNotification.js +12 -50
- package/dist/esm/assets/scripts/notification/const/classNames.js +3 -0
- package/dist/esm/assets/scripts/notification/const/index.js +3 -2
- package/dist/esm/assets/scripts/notification/const/sizes.js +4 -2
- package/dist/esm/assets/scripts/notification/messageTemplate.js +100 -0
- package/dist/esm/assets/scripts/notification/utils.js +39 -4
- package/dist/esm/constant/notification.js +15 -0
- package/dist/esm/src/components/forms-and-input/input-base/InputBase.js +52 -34
- package/dist/esm/src/components/forms-and-input/input-base/__tests__/InputBase.test.js +228 -0
- package/dist/esm/src/components/forms-and-input/password-input/PasswordInput.js +3 -2
- package/dist/esm/src/components/forms-and-input/password-input/__tests__/PasswordInput.test.js +56 -0
- package/dist/esm/src/components/index.js +2 -0
- package/dist/esm/src/components/layout/ncua-scope/NcuaScope.js +73 -0
- package/dist/esm/src/components/layout/ncua-scope/index.js +1 -0
- package/dist/esm/src/components/navigation/pagination/Pagination.js +3 -1
- package/dist/esm/src/components/navigation/pagination/__tests__/Pagination.test.js +74 -0
- package/dist/esm/src/components/overlays/notification/FullWidthNotification.js +3 -1
- package/dist/esm/src/components/overlays/notification/MessageNotification.js +15 -55
- package/dist/esm/src/components/overlays/notification/MessageNotificationParts.js +85 -0
- package/dist/esm/src/components/overlays/notification/__tests__/MessageNotification.test.js +243 -0
- package/dist/esm/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.js +206 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +252 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +63 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.js +620 -0
- package/dist/esm/src/components/overlays/postcode-search-modal/index.js +1 -0
- package/dist/esm/src/generated/scoped-css.js +3 -0
- 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.d.ts +0 -3
- package/dist/temp/assets/scripts/notification/MessageNotification.js +9 -44
- package/dist/temp/assets/scripts/notification/const/classNames.d.ts +1 -0
- package/dist/temp/assets/scripts/notification/const/classNames.js +3 -0
- package/dist/temp/assets/scripts/notification/const/index.d.ts +3 -3
- package/dist/temp/assets/scripts/notification/const/index.js +3 -2
- package/dist/temp/assets/scripts/notification/const/sizes.d.ts +2 -2
- package/dist/temp/assets/scripts/notification/const/sizes.js +4 -2
- package/dist/temp/assets/scripts/notification/const/types.d.ts +30 -2
- package/dist/temp/assets/scripts/notification/messageTemplate.d.ts +15 -0
- package/dist/temp/assets/scripts/notification/messageTemplate.js +79 -0
- package/dist/temp/assets/scripts/notification/utils.d.ts +19 -2
- package/dist/temp/assets/scripts/notification/utils.js +39 -5
- package/dist/temp/constant/notification.d.ts +15 -0
- package/dist/temp/constant/notification.js +15 -0
- package/dist/temp/src/components/forms-and-input/input-base/InputBase.d.ts +1 -1
- package/dist/temp/src/components/forms-and-input/input-base/InputBase.js +43 -26
- package/dist/temp/src/components/forms-and-input/input-base/__tests__/InputBase.test.js +174 -0
- package/dist/temp/src/components/forms-and-input/password-input/PasswordInput.js +2 -1
- package/dist/temp/src/components/forms-and-input/password-input/__tests__/PasswordInput.test.d.ts +1 -0
- package/dist/temp/src/components/forms-and-input/password-input/__tests__/PasswordInput.test.js +48 -0
- package/dist/temp/src/components/index.d.ts +2 -0
- package/dist/temp/src/components/index.js +2 -0
- package/dist/temp/src/components/layout/ncua-scope/NcuaScope.d.ts +32 -0
- package/dist/temp/src/components/layout/ncua-scope/NcuaScope.js +51 -0
- package/dist/temp/src/components/layout/ncua-scope/index.d.ts +1 -0
- package/dist/temp/src/components/layout/ncua-scope/index.js +1 -0
- package/dist/temp/src/components/navigation/pagination/Pagination.js +3 -1
- package/dist/temp/src/components/navigation/pagination/__tests__/Pagination.test.js +74 -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 +4 -13
- package/dist/temp/src/components/overlays/notification/MessageNotificationParts.d.ts +28 -0
- package/dist/temp/src/components/overlays/notification/MessageNotificationParts.js +28 -0
- package/dist/temp/src/components/overlays/notification/Notification.d.ts +11 -2
- package/dist/temp/src/components/overlays/notification/__tests__/MessageNotification.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/notification/__tests__/MessageNotification.test.js +190 -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/components/overlays/postcode-search-modal/PostcodeSearchModal.d.ts +45 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModal.js +125 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.d.ts +16 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.js +24 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.d.ts +1 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.js +503 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/index.d.ts +1 -0
- package/dist/temp/src/components/overlays/postcode-search-modal/index.js +1 -0
- package/dist/temp/src/generated/scoped-css.d.ts +1 -0
- package/dist/temp/src/generated/scoped-css.js +3 -0
- package/dist/types/assets/scripts/notification/FullWidthNotification.d.ts +6 -0
- package/dist/types/assets/scripts/notification/MessageNotification.d.ts +0 -3
- package/dist/types/assets/scripts/notification/const/classNames.d.ts +1 -0
- package/dist/types/assets/scripts/notification/const/index.d.ts +3 -3
- package/dist/types/assets/scripts/notification/const/sizes.d.ts +2 -2
- package/dist/types/assets/scripts/notification/const/types.d.ts +30 -2
- package/dist/types/assets/scripts/notification/messageTemplate.d.ts +15 -0
- package/dist/types/assets/scripts/notification/utils.d.ts +19 -2
- package/dist/types/constant/notification.d.ts +15 -0
- package/dist/types/src/components/forms-and-input/input-base/InputBase.d.ts +1 -1
- package/dist/types/src/components/forms-and-input/password-input/__tests__/PasswordInput.test.d.ts +1 -0
- package/dist/types/src/components/index.d.ts +2 -0
- package/dist/types/src/components/layout/ncua-scope/NcuaScope.d.ts +32 -0
- package/dist/types/src/components/layout/ncua-scope/index.d.ts +1 -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 +28 -0
- package/dist/types/src/components/overlays/notification/Notification.d.ts +11 -2
- package/dist/types/src/components/overlays/notification/__tests__/MessageNotification.test.d.ts +1 -0
- package/dist/types/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.d.ts +1 -0
- package/dist/types/src/components/overlays/postcode-search-modal/PostcodeSearchModal.d.ts +45 -0
- package/dist/types/src/components/overlays/postcode-search-modal/PostcodeSearchModalTip.d.ts +16 -0
- package/dist/types/src/components/overlays/postcode-search-modal/__tests__/PostcodeSearchModal.test.d.ts +1 -0
- package/dist/types/src/components/overlays/postcode-search-modal/index.d.ts +1 -0
- package/dist/types/src/generated/scoped-css.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +296 -56
- package/dist/ui-admin/assets/styles/style.scoped.css +8595 -0
- package/package.json +13 -6
|
@@ -1,8 +1,25 @@
|
|
|
1
|
-
import type { NotificationAction, NotificationColor } from './const';
|
|
1
|
+
import type { LegacyNotificationHierarchy, NotificationAction, NotificationActionButtonSize, NotificationColor, NotificationHierarchy } from './const';
|
|
2
2
|
export declare function createWrapperElement(baseClass: string, color: NotificationColor, className?: string): HTMLElement;
|
|
3
3
|
export declare function buildClassName(baseClass: string, color: NotificationColor, className?: string): string;
|
|
4
4
|
export declare function renderSupportingText(supportingText?: string, className?: string, supportTextLink?: string): string;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 액션 버튼의 색상 수식자를 현행 어휘로 정규화한다.
|
|
7
|
+
*
|
|
8
|
+
* 구 어휘(`'link'` / `'link-gray'`)는 Link 컴포넌트의 색상 이름을 빌려 쓴 것이라
|
|
9
|
+
* `ncua-btn--link`에 대응하는 CSS가 존재하지 않았다. 기존 CDN 사용처를 깨지 않기 위해
|
|
10
|
+
* 타입에서 제거하는 대신 이 지점에서 실제 Button 테마로 매핑한다.
|
|
11
|
+
*
|
|
12
|
+
* 렌더(`renderActions`)와 이벤트 바인딩(`bindNotificationEvents`)이 이 함수를 함께 써야
|
|
13
|
+
* `data-action` 키가 어긋나지 않는다.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveActionHierarchy(hierarchy?: NotificationHierarchy | LegacyNotificationHierarchy): NotificationHierarchy;
|
|
16
|
+
/**
|
|
17
|
+
* 액션 버튼 그룹 HTML을 만든다.
|
|
18
|
+
*
|
|
19
|
+
* `size` 기본값 'sm'은 floating / full-width 타입의 기존 렌더링을 그대로 보존하기 위한 것이다.
|
|
20
|
+
* message 타입만 TO-BE 규격(28px)에 맞춰 'xs'를 넘긴다 — React `<Button size="xs">`와 동일.
|
|
21
|
+
*/
|
|
22
|
+
export declare function renderActions(actions: NotificationAction[], wrapperClass: string, size?: NotificationActionButtonSize): string;
|
|
6
23
|
export declare function bindNotificationEvents(element: HTMLElement, actions: NotificationAction[], onClose?: () => void, onRemove?: () => void): void;
|
|
7
24
|
export declare function setupAutoClose(autoClose: number, onClose?: () => void, onRemove?: () => void): number | undefined;
|
|
8
25
|
export declare const isMobile: () => boolean;
|
|
@@ -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
|
+
};
|
|
@@ -25,7 +25,7 @@ interface InputSideCustomSlot {
|
|
|
25
25
|
placement?: 'inside' | 'outside';
|
|
26
26
|
}
|
|
27
27
|
type InputLeadingSlotType = InputSideTextSlot | InputSideIconSlot | InputSideCustomSlot;
|
|
28
|
-
type InputTrailingSlotType = InputSideButtonSlot | InputSideIconSlot | InputSideCustomSlot;
|
|
28
|
+
type InputTrailingSlotType = InputSideButtonSlot | InputSideTextSlot | InputSideIconSlot | InputSideCustomSlot;
|
|
29
29
|
interface InputBaseCommonProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
30
30
|
required?: boolean;
|
|
31
31
|
label?: string;
|
package/dist/types/src/components/forms-and-input/password-input/__tests__/PasswordInput.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -34,6 +34,7 @@ export * from './image-and-icons/featured-icon';
|
|
|
34
34
|
export * from './layout/block-container';
|
|
35
35
|
export * from './layout/block-header';
|
|
36
36
|
export * from './layout/divider';
|
|
37
|
+
export * from './layout/ncua-scope';
|
|
37
38
|
export * from './layout/page-title';
|
|
38
39
|
export * from './navigation/bread-crumb';
|
|
39
40
|
export * from './navigation/context-tab';
|
|
@@ -43,6 +44,7 @@ export * from './navigation/vertical-tab';
|
|
|
43
44
|
export * from './overlays/dropdown';
|
|
44
45
|
export * from './overlays/modal';
|
|
45
46
|
export * from './overlays/notification';
|
|
47
|
+
export * from './overlays/postcode-search-modal';
|
|
46
48
|
export * from './overlays/tooltip';
|
|
47
49
|
export * from './select-dropdown';
|
|
48
50
|
export * from './shared';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
interface NcuaScopeProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* NCUA 스타일을 이 엘리먼트 하위로 한정하는 경계.
|
|
8
|
+
*
|
|
9
|
+
* 다른 디자인 시스템을 전역 적용한 사용처에서 NCUA 컴포넌트를 이걸로 감싼다.
|
|
10
|
+
* 스타일을 직접 들고 있으므로 **CSS 파일을 따로 import 하지 않는다.**
|
|
11
|
+
*
|
|
12
|
+
* ```tsx
|
|
13
|
+
* import { NcuaScope, Button } from '@ncds/ui-admin';
|
|
14
|
+
*
|
|
15
|
+
* <NcuaScope>
|
|
16
|
+
* <Button label="신청하기" hierarchy="primary" size="md" />
|
|
17
|
+
* </NcuaScope>
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* `document.body` 로 portal 되는 컴포넌트(Modal · Tooltip · Dropdown · SelectBox ·
|
|
21
|
+
* Notification)는 이 경계 밖에 놓이지만, 스코프 스타일시트가 그 루트 클래스들을 함께
|
|
22
|
+
* 지정하므로 토큰을 받는다 (`base/_scope.scss` 의 `$roots`). portal 목적지는 바뀌지
|
|
23
|
+
* 않으므로 어드민에서의 기존 동작과 같다.
|
|
24
|
+
*
|
|
25
|
+
* 어드민처럼 `style.css` 를 전역 적용하는 사용처는 이 컴포넌트가 필요 없다.
|
|
26
|
+
*
|
|
27
|
+
* 중첩해서 써도 스타일은 한 번만 들어간다. React 19 에서는 형제로 여러 개를 써도
|
|
28
|
+
* href 기준으로 중복이 제거된다. React 18 에서는 형제마다 `<style>` 이 하나씩 생기므로,
|
|
29
|
+
* 스코프가 여러 곳에 필요하면 공통 조상 한 곳에서 감싸는 편이 낫다.
|
|
30
|
+
*/
|
|
31
|
+
export declare const NcuaScope: import("react").ForwardRefExoticComponent<NcuaScopeProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NcuaScope';
|
|
@@ -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 };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { SlotIconComponent } from '../../../types/side-slot';
|
|
3
|
+
import { type FeaturedIconColor } from '../../image-and-icons/featured-icon/FeaturedIcon';
|
|
4
|
+
import type { NotificationAction } from './Notification';
|
|
5
|
+
interface MessageNotificationContentProps {
|
|
6
|
+
title: ReactNode;
|
|
7
|
+
supportingText?: ReactNode;
|
|
8
|
+
icon?: SlotIconComponent;
|
|
9
|
+
iconColor: FeaturedIconColor;
|
|
10
|
+
showIcon: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** 아이콘 + 제목/서포팅 텍스트 영역. */
|
|
13
|
+
declare const MessageNotificationContent: ({ title, supportingText, icon, iconColor, showIcon, }: MessageNotificationContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
interface MessageNotificationActionsProps {
|
|
15
|
+
actions?: NotificationAction[];
|
|
16
|
+
onClose?: () => void;
|
|
17
|
+
onHidePermanently?: () => void;
|
|
18
|
+
hidePermanentlyLabel?: ReactNode;
|
|
19
|
+
closeIconColor: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 액션 버튼 그룹 + 닫기 그룹을 감싸는 우측 영역.
|
|
23
|
+
* 이 컨테이너의 gap(12px)이 두 그룹 사이 간격을 만든다.
|
|
24
|
+
* 표시할 요소가 하나도 없으면 빈 컨테이너를 남기지 않는다.
|
|
25
|
+
*/
|
|
26
|
+
declare const MessageNotificationActions: ({ actions, onClose, onHidePermanently, hidePermanentlyLabel, closeIconColor, }: MessageNotificationActionsProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export type { MessageNotificationActionsProps, MessageNotificationContentProps };
|
|
28
|
+
export { MessageNotificationActions, MessageNotificationContent };
|
|
@@ -16,9 +16,10 @@ interface NotificationAction {
|
|
|
16
16
|
*/
|
|
17
17
|
onClick?: () => void;
|
|
18
18
|
/**
|
|
19
|
-
* 액션 버튼
|
|
19
|
+
* 액션 버튼 색상. `ButtonTheme` 중 알림에서 허용하는 4가지만 지원한다.
|
|
20
|
+
* @default 'text'
|
|
20
21
|
*/
|
|
21
|
-
hierarchy?: Extract<ButtonTheme, 'text' | 'text-gray'>;
|
|
22
|
+
hierarchy?: Extract<ButtonTheme, 'secondary' | 'secondary-gray' | 'text' | 'text-gray'>;
|
|
22
23
|
}
|
|
23
24
|
interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
24
25
|
/**
|
|
@@ -67,6 +68,14 @@ interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title
|
|
|
67
68
|
* message, full-width 타입에서 사용 가능
|
|
68
69
|
*/
|
|
69
70
|
onHidePermanently?: () => void;
|
|
71
|
+
/**
|
|
72
|
+
* 다시보지 않기 버튼의 라벨 (선택사항)
|
|
73
|
+
* message, full-width 타입에서 사용 가능하며 `onHidePermanently`를 지정했을 때만 렌더된다.
|
|
74
|
+
*
|
|
75
|
+
* 기본값은 타입별로 다르다 — message는 `'다시 보지 않기'`, full-width는 `'다시보지 않기'`.
|
|
76
|
+
* 표기가 통일되어 있지 않은 것은 현행 유지이며, 통일은 별도 결정 사항이다.
|
|
77
|
+
*/
|
|
78
|
+
hidePermanentlyLabel?: ReactNode;
|
|
70
79
|
/**
|
|
71
80
|
* Portal 마운트 여부. `floating` 타입에서만 동작한다.
|
|
72
81
|
*
|
package/dist/types/src/components/overlays/notification/__tests__/MessageNotification.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/src/components/overlays/notification/__tests__/hidePermanentlyLabel.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type PostcodeSearchModalTipProps } from './PostcodeSearchModalTip';
|
|
2
|
+
/** 검색 결과 아이템 하나. */
|
|
3
|
+
interface PostcodeSearchResult {
|
|
4
|
+
/** 우편번호(5자리) */
|
|
5
|
+
zipCode: string;
|
|
6
|
+
/** 도로명주소(도로명 + 건물번호 + 참고항목 등) */
|
|
7
|
+
roadAddress: string;
|
|
8
|
+
/** 지번주소 */
|
|
9
|
+
jibunAddress: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* 컴포넌트가 표시할 수 있는 에러코드(행정안전부 도로명주소 API 기준).
|
|
13
|
+
* 기획서에 직접 적힌 코드는 E0006·E0008·E0009·E0012·E0013 이고,
|
|
14
|
+
* E0010·E0011 은 기획서의 "E0009~E0013 통합" 범위 표기에서 채운 값이다.
|
|
15
|
+
*/
|
|
16
|
+
type PostcodeSearchErrorCode = 'E0006' | 'E0008' | 'E0009' | 'E0010' | 'E0011' | 'E0012' | 'E0013';
|
|
17
|
+
interface PostcodeSearchModalProps {
|
|
18
|
+
open: boolean;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
zIndex?: number;
|
|
21
|
+
className?: string;
|
|
22
|
+
searchQuery: string;
|
|
23
|
+
onSearchQueryChange: (value: string) => void;
|
|
24
|
+
onSearch: () => void;
|
|
25
|
+
results: PostcodeSearchResult[];
|
|
26
|
+
totalCount: number;
|
|
27
|
+
currentPage: number;
|
|
28
|
+
onPageChange: (page: number) => void;
|
|
29
|
+
/** 페이지당 아이템 수. 기획서 기본값 15 */
|
|
30
|
+
pageSize?: number;
|
|
31
|
+
/** 검색 API 응답을 기다리는 중인지 여부. 응답 전에 "결과 없음" 이 먼저 뜨는 것을 막는다. */
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
errorCode?: PostcodeSearchErrorCode;
|
|
34
|
+
onSelect: (result: PostcodeSearchResult) => void;
|
|
35
|
+
}
|
|
36
|
+
declare const PostcodeSearchModal: {
|
|
37
|
+
({ open, onClose, zIndex, className, searchQuery, onSearchQueryChange, onSearch, results, totalCount, currentPage, onPageChange, pageSize, loading, errorCode, onSelect, }: PostcodeSearchModalProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
Tip: {
|
|
40
|
+
({ className }: PostcodeSearchModalTipProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
displayName: string; /** 반응형 전환 기준 — assets/styles/base/_variable.scss 의 $breakpoint 와 동일 */
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export { PostcodeSearchModal };
|
|
45
|
+
export type { PostcodeSearchErrorCode, PostcodeSearchModalProps, PostcodeSearchModalTipProps, PostcodeSearchResult };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface PostcodeSearchModalTipProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
}
|
|
4
|
+
/** Tip 카드 첫 줄 안내 문구 (기획서 TIPS.searchTitle) */
|
|
5
|
+
declare const TIP_TITLE = "\uC544\uB798 \uC870\uD569\uC73C\uB85C \uAC80\uC0C9\uD558\uBA74 \uC6D0\uD558\uB294 \uC8FC\uC18C\uB97C \uB354 \uC27D\uAC8C \uCC3E\uC744 \uC218 \uC788\uC5B4\uC694.";
|
|
6
|
+
/**
|
|
7
|
+
* 검색어 조합을 안내하는 Tip 카드.
|
|
8
|
+
* 결과 목록이 없는 화면(초기·오류·결과 없음)에서만 노출된다.
|
|
9
|
+
* 결과가 있을 때는 모달이 안내 문구 한 줄만 검색 영역에 붙여 고정한다.
|
|
10
|
+
*/
|
|
11
|
+
declare const Tip: {
|
|
12
|
+
({ className }: PostcodeSearchModalTipProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
displayName: string;
|
|
14
|
+
};
|
|
15
|
+
export { Tip, TIP_TITLE };
|
|
16
|
+
export type { PostcodeSearchModalTipProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PostcodeSearchModal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const NCUA_SCOPED_CSS: string;
|