@ncds/ui-admin 0.0.31 → 0.0.33
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/constant/color.js +1 -0
- package/dist/cjs/src/components/badge/Badge.js +13 -24
- package/dist/cjs/src/components/badge/BadgeGroup.js +62 -0
- package/dist/cjs/src/components/badge/index.js +11 -0
- package/dist/cjs/src/components/badge/utils.js +33 -0
- package/dist/cjs/src/components/button/ButtonCloseX.js +44 -0
- package/dist/cjs/src/components/date-picker/DatePicker.js +4 -5
- package/dist/cjs/src/components/date-picker/RangeDatePicker.js +13 -7
- package/dist/cjs/src/components/dropdown/Dropdown.js +20 -10
- package/dist/cjs/src/components/modal/Modal.js +5 -7
- package/dist/cjs/src/components/notification/FloatingNotification.js +30 -26
- package/dist/cjs/src/components/notification/FullWidthNotification.js +15 -8
- package/dist/cjs/src/components/notification/Notification.js +9 -30
- package/dist/cjs/src/components/notification/index.js +11 -11
- package/dist/cjs/src/constant/breakpoint.js +12 -0
- package/dist/cjs/src/hooks/useMediaQuery.js +29 -0
- package/dist/esm/constant/color.js +1 -0
- package/dist/esm/src/components/badge/Badge.js +13 -24
- package/dist/esm/src/components/badge/BadgeGroup.js +54 -0
- package/dist/esm/src/components/badge/index.js +2 -1
- package/dist/esm/src/components/badge/utils.js +25 -0
- package/dist/esm/src/components/button/ButtonCloseX.js +36 -0
- package/dist/esm/src/components/date-picker/DatePicker.js +5 -5
- package/dist/esm/src/components/date-picker/RangeDatePicker.js +14 -7
- package/dist/esm/src/components/dropdown/Dropdown.js +20 -10
- package/dist/esm/src/components/modal/Modal.js +5 -7
- package/dist/esm/src/components/notification/FloatingNotification.js +31 -27
- package/dist/esm/src/components/notification/FullWidthNotification.js +15 -8
- package/dist/esm/src/components/notification/Notification.js +10 -30
- package/dist/esm/src/components/notification/index.js +2 -2
- package/dist/esm/src/constant/breakpoint.js +6 -0
- package/dist/esm/src/hooks/useMediaQuery.js +22 -0
- package/dist/types/constant/color.d.ts +1 -0
- package/dist/types/src/components/badge/BadgeGroup.d.ts +17 -0
- package/dist/types/src/components/badge/index.d.ts +1 -0
- package/dist/types/src/components/badge/utils.d.ts +7 -0
- package/dist/types/src/components/button/Button.d.ts +1 -1
- package/dist/types/src/components/button/ButtonCloseX.d.ts +9 -0
- package/dist/types/src/components/button/ButtonGroup.d.ts +2 -2
- package/dist/types/src/components/date-picker/DatePicker.d.ts +2 -2
- package/dist/types/src/components/date-picker/RangeDatePicker.d.ts +1 -1
- package/dist/types/src/components/dropdown/Dropdown.d.ts +4 -1
- package/dist/types/src/components/modal/Modal.d.ts +1 -1
- package/dist/types/src/components/notification/FloatingNotification.d.ts +3 -4
- package/dist/types/src/components/notification/FullWidthNotification.d.ts +3 -4
- package/dist/types/src/components/notification/Notification.d.ts +5 -4
- package/dist/types/src/components/notification/index.d.ts +1 -1
- package/dist/types/src/constant/breakpoint.d.ts +7 -0
- package/dist/types/src/hooks/useMediaQuery.d.ts +6 -0
- package/dist/ui-admin/assets/styles/style.css +171 -136
- package/package.json +2 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SideSlotType } from '../../types/side-slot';
|
|
2
|
+
export type SideSlotRenderProps = {
|
|
3
|
+
slot: SideSlotType;
|
|
4
|
+
defaultIconSize: number;
|
|
5
|
+
};
|
|
6
|
+
export declare const sideSlotRender: ({ slot, defaultIconSize }: SideSlotRenderProps) => any;
|
|
7
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { ComponentProps, ReactNode } from 'react';
|
|
|
2
2
|
import { Size } from '../../../constant/size';
|
|
3
3
|
import { SideSlotType } from '../../types/side-slot';
|
|
4
4
|
import { DotProps } from '../dot';
|
|
5
|
-
export type ButtonTheme = 'primary' | 'secondary' | 'secondary-gray' | 'tertiary-gray' | 'tertiary' | 'link' | 'destructive';
|
|
5
|
+
export type ButtonTheme = 'primary' | 'secondary' | 'secondary-gray' | 'tertiary-gray' | 'tertiary' | 'link' | 'link-gray' | 'destructive';
|
|
6
6
|
export type ButtonSize = Extract<Size, 'xxs' | 'xs' | 'sm' | 'md'>;
|
|
7
7
|
type CommonButtonProps<T extends keyof HTMLElementTagNameMap> = Omit<ComponentProps<T>, 'ref'> & {
|
|
8
8
|
label: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Size } from '../../../constant/size';
|
|
2
|
+
export type ButtonCloseXProps = {
|
|
3
|
+
size: Extract<Size, 'xs' | 'sm' | 'md' | 'lg'>;
|
|
4
|
+
theme?: 'dark' | 'light';
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
className?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const ButtonCloseX: ({ size, theme, className, onClick }: ButtonCloseXProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=ButtonCloseX.d.ts.map
|
|
@@ -108,7 +108,7 @@ export declare const ButtonGroup: {
|
|
|
108
108
|
"aria-colindextext"?: string | undefined;
|
|
109
109
|
"aria-colspan"?: number | undefined;
|
|
110
110
|
"aria-controls"?: string | undefined;
|
|
111
|
-
"aria-current"?: boolean | "true" | "false" | "
|
|
111
|
+
"aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
112
112
|
"aria-describedby"?: string | undefined;
|
|
113
113
|
"aria-description"?: string | undefined;
|
|
114
114
|
"aria-details"?: string | undefined;
|
|
@@ -387,7 +387,7 @@ export declare const ButtonGroup: {
|
|
|
387
387
|
"aria-colindextext"?: string | undefined;
|
|
388
388
|
"aria-colspan"?: number | undefined;
|
|
389
389
|
"aria-controls"?: string | undefined;
|
|
390
|
-
"aria-current"?: boolean | "true" | "false" | "
|
|
390
|
+
"aria-current"?: boolean | "true" | "false" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
391
391
|
"aria-describedby"?: string | undefined;
|
|
392
392
|
"aria-description"?: string | undefined;
|
|
393
393
|
"aria-details"?: string | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'flatpickr/dist/flatpickr.css';
|
|
2
2
|
import { Options } from 'flatpickr/dist/types/options';
|
|
3
|
-
import { DateTimePickerProps } from 'react-flatpickr';
|
|
3
|
+
import { DateTimePickerProps, DateTimePickerHandle } from 'react-flatpickr';
|
|
4
4
|
import { Size } from '../../../constant/size';
|
|
5
5
|
export type DatePickerProps = {
|
|
6
6
|
size?: Extract<Size, 'sm' | 'md'>;
|
|
@@ -9,5 +9,5 @@ export type DatePickerProps = {
|
|
|
9
9
|
datePickerOptions?: Options;
|
|
10
10
|
onChangeDate: (date: string) => void;
|
|
11
11
|
} & Omit<DateTimePickerProps, 'size' | 'options' | 'value'>;
|
|
12
|
-
export declare const DatePicker: (
|
|
12
|
+
export declare const DatePicker: import("react").ForwardRefExoticComponent<Omit<DatePickerProps, "ref"> & import("react").RefAttributes<DateTimePickerHandle>>;
|
|
13
13
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -20,5 +20,5 @@ export type RangeDatePickerProps = {
|
|
|
20
20
|
currentDate: string;
|
|
21
21
|
}) => void;
|
|
22
22
|
};
|
|
23
|
-
export declare const RangeDatePicker: (
|
|
23
|
+
export declare const RangeDatePicker: import("react").ForwardRefExoticComponent<RangeDatePickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
24
|
//# sourceMappingURL=RangeDatePicker.d.ts.map
|
|
@@ -44,10 +44,13 @@ export type TextHeader = {
|
|
|
44
44
|
export type DropdownHeaderType = AvatarHeader | TextHeader;
|
|
45
45
|
export type DropdownProps = {
|
|
46
46
|
trigger: AvatarTrigger | TextTrigger | ButtonTrigger | IconTrigger | CustomTrigger;
|
|
47
|
+
opened?: boolean;
|
|
48
|
+
closeOnClickOutside?: boolean;
|
|
49
|
+
closeOnClickItem?: boolean;
|
|
47
50
|
align?: 'left' | 'right';
|
|
48
51
|
header?: DropdownHeaderType;
|
|
49
52
|
groups: DropdownGroup[];
|
|
50
53
|
className?: string;
|
|
51
54
|
};
|
|
52
|
-
export declare const Dropdown: ({ trigger, align, header, groups, className }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
export declare const Dropdown: ({ trigger, align, header, groups, className, opened, closeOnClickItem, closeOnClickOutside, }: DropdownProps) => import("react/jsx-runtime").JSX.Element;
|
|
53
56
|
//# sourceMappingURL=Dropdown.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IconName } from '@ncds/ui-admin-icon';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
import { FeaturedIconColor, FeaturedIconTheme } from '../featured-icon';
|
|
3
|
-
import { IconName } from '@ncds/ui-admin-icon';
|
|
4
4
|
export type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
5
5
|
export type ModalHeaderAlign = 'left' | 'center' | 'horizontal';
|
|
6
6
|
export type ModalAlign = 'center' | 'right' | 'stretch';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export type FloatingNotificationSize = 'desktop' | 'mobile';
|
|
2
|
+
import { NotificationAction, NotificationColor } from './Notification';
|
|
4
3
|
export interface FloatingNotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
4
|
/**
|
|
6
5
|
* 알림 제목 텍스트
|
|
@@ -14,7 +13,7 @@ export interface FloatingNotificationProps extends Omit<ComponentPropsWithoutRef
|
|
|
14
13
|
* 알림 색상 스타일
|
|
15
14
|
* @default 'neutral'
|
|
16
15
|
*/
|
|
17
|
-
|
|
16
|
+
color?: NotificationColor;
|
|
18
17
|
/**
|
|
19
18
|
* 닫기 버튼 클릭 이벤트 핸들러
|
|
20
19
|
*/
|
|
@@ -26,7 +25,7 @@ export interface FloatingNotificationProps extends Omit<ComponentPropsWithoutRef
|
|
|
26
25
|
/**
|
|
27
26
|
* 버튼 영역 (선택사항)
|
|
28
27
|
*/
|
|
29
|
-
actions?:
|
|
28
|
+
actions?: NotificationAction[];
|
|
30
29
|
}
|
|
31
30
|
export declare const FloatingNotification: import("react").ForwardRefExoticComponent<FloatingNotificationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
31
|
//# sourceMappingURL=FloatingNotification.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export type FullWidthNotificationSize = 'desktop' | 'mobile';
|
|
2
|
+
import { NotificationAction, NotificationColor } from './Notification';
|
|
4
3
|
export interface FullWidthNotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
5
4
|
/**
|
|
6
5
|
* 알림 제목 텍스트
|
|
@@ -14,7 +13,7 @@ export interface FullWidthNotificationProps extends Omit<ComponentPropsWithoutRe
|
|
|
14
13
|
* 알림 색상 스타일
|
|
15
14
|
* @default 'neutral'
|
|
16
15
|
*/
|
|
17
|
-
|
|
16
|
+
color?: NotificationColor;
|
|
18
17
|
/**
|
|
19
18
|
* 닫기 버튼 클릭 이벤트 핸들러
|
|
20
19
|
*/
|
|
@@ -26,7 +25,7 @@ export interface FullWidthNotificationProps extends Omit<ComponentPropsWithoutRe
|
|
|
26
25
|
/**
|
|
27
26
|
* 버튼 영역 (선택사항)
|
|
28
27
|
*/
|
|
29
|
-
actions?:
|
|
28
|
+
actions?: NotificationAction[];
|
|
30
29
|
}
|
|
31
30
|
export declare const FullWidthNotification: import("react").ForwardRefExoticComponent<FullWidthNotificationProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
31
|
//# sourceMappingURL=FullWidthNotification.d.ts.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
1
|
import { IconName } from '@ncds/ui-admin-icon';
|
|
2
|
+
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
+
import { ColorTone } from '../../../constant/color';
|
|
3
4
|
import { ButtonTheme } from '../button';
|
|
4
5
|
export type NotificationType = 'floating' | 'full-width';
|
|
5
|
-
export type
|
|
6
|
+
export type NotificationColor = Extract<ColorTone, 'neutral' | 'error' | 'warning' | 'success'>;
|
|
6
7
|
export type NotificationSize = 'desktop' | 'mobile';
|
|
7
8
|
export interface NotificationAction {
|
|
8
9
|
/**
|
|
@@ -16,7 +17,7 @@ export interface NotificationAction {
|
|
|
16
17
|
/**
|
|
17
18
|
* 액션 버튼 색상 (3가지만 지원)
|
|
18
19
|
*/
|
|
19
|
-
hierarchy?: Extract<ButtonTheme, '
|
|
20
|
+
hierarchy?: Extract<ButtonTheme, 'link' | 'link-gray'>;
|
|
20
21
|
}
|
|
21
22
|
export interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>, 'title'> {
|
|
22
23
|
/**
|
|
@@ -40,7 +41,7 @@ export interface NotificationProps extends Omit<ComponentPropsWithoutRef<'div'>,
|
|
|
40
41
|
* 알림 색상 스타일
|
|
41
42
|
* @default 'neutral'
|
|
42
43
|
*/
|
|
43
|
-
|
|
44
|
+
color?: NotificationColor;
|
|
44
45
|
/**
|
|
45
46
|
* 닫기 버튼 클릭 이벤트 핸들러
|
|
46
47
|
*/
|