@ncds/ui-admin 0.0.32 → 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/BadgeGroup.js +8 -3
- 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/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/BadgeGroup.js +8 -3
- 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/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 +3 -1
- 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/date-picker/DatePicker.d.ts +2 -2
- package/dist/types/src/components/date-picker/RangeDatePicker.d.ts +1 -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 +20 -59
- package/package.json +2 -2
|
@@ -20,8 +20,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
20
20
|
import classnames from 'classnames';
|
|
21
21
|
import { useEffect, useRef } from 'react';
|
|
22
22
|
import ReactDOM from 'react-dom';
|
|
23
|
+
import { ButtonCloseX } from '../button/ButtonCloseX';
|
|
23
24
|
import { FeaturedIcon } from '../featured-icon';
|
|
24
|
-
import Icon from '@ncds/ui-admin-icon';
|
|
25
25
|
export var Modal = function (_a) {
|
|
26
26
|
var isOpen = _a.isOpen,
|
|
27
27
|
onClose = _a.onClose,
|
|
@@ -104,14 +104,12 @@ Modal.Header = function (_a) {
|
|
|
104
104
|
}, {
|
|
105
105
|
children: subtitle
|
|
106
106
|
}))]
|
|
107
|
-
})), children, !hideCloseButton && _jsx(
|
|
107
|
+
})), children, !hideCloseButton && _jsx(ButtonCloseX, {
|
|
108
108
|
className: "ncua-modal__close-button",
|
|
109
|
+
size: "sm",
|
|
110
|
+
theme: "light",
|
|
109
111
|
onClick: onClose
|
|
110
|
-
}
|
|
111
|
-
children: _jsx(Icon, {
|
|
112
|
-
name: "x-close"
|
|
113
|
-
})
|
|
114
|
-
}))]
|
|
112
|
+
})]
|
|
115
113
|
})), showDivider && _jsx("div", {
|
|
116
114
|
className: "ncua-modal__header-divider"
|
|
117
115
|
})]
|
|
@@ -16,11 +16,14 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
16
16
|
}
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
|
-
import { jsx as _jsx,
|
|
20
|
-
import { FeaturedIcon } from '../featured-icon/FeaturedIcon';
|
|
21
|
-
import Icon from '@ncds/ui-admin-icon';
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
20
|
import classNames from 'classnames';
|
|
23
21
|
import { forwardRef } from 'react';
|
|
22
|
+
import { MEDIA_QUERY } from '../../constant/breakpoint';
|
|
23
|
+
import { useMediaQuery } from '../../hooks/useMediaQuery';
|
|
24
|
+
import { Button } from '../button';
|
|
25
|
+
import { ButtonCloseX } from '../button/ButtonCloseX';
|
|
26
|
+
import { FeaturedIcon } from '../featured-icon/FeaturedIcon';
|
|
24
27
|
var iconNameMap = {
|
|
25
28
|
neutral: 'pin-02',
|
|
26
29
|
error: 'alert-triangle',
|
|
@@ -30,22 +33,25 @@ var iconNameMap = {
|
|
|
30
33
|
export var FloatingNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
31
34
|
var title = _a.title,
|
|
32
35
|
supportingText = _a.supportingText,
|
|
33
|
-
_b = _a.
|
|
34
|
-
|
|
36
|
+
_b = _a.color,
|
|
37
|
+
color = _b === void 0 ? 'neutral' : _b,
|
|
35
38
|
onClose = _a.onClose,
|
|
36
39
|
className = _a.className,
|
|
37
40
|
actions = _a.actions,
|
|
38
|
-
rest = __rest(_a, ["title", "supportingText", "
|
|
39
|
-
var iconColor =
|
|
41
|
+
rest = __rest(_a, ["title", "supportingText", "color", "onClose", "className", "actions"]);
|
|
42
|
+
var iconColor = color;
|
|
40
43
|
var featuredIconProps = {
|
|
41
|
-
name: iconNameMap[
|
|
44
|
+
name: iconNameMap[color],
|
|
42
45
|
size: 'sm',
|
|
43
46
|
color: iconColor,
|
|
44
47
|
theme: 'dark-circle'
|
|
45
48
|
};
|
|
49
|
+
var isMobile = useMediaQuery(MEDIA_QUERY.mobile, {
|
|
50
|
+
onMatched: onClose
|
|
51
|
+
});
|
|
46
52
|
return _jsxs("div", __assign({
|
|
47
53
|
ref: ref,
|
|
48
|
-
className: classNames('ncua-floating-notification', "ncua-floating-notification--".concat(
|
|
54
|
+
className: classNames('ncua-floating-notification', "ncua-floating-notification--".concat(color), className),
|
|
49
55
|
role: "alert"
|
|
50
56
|
}, rest, {
|
|
51
57
|
children: [_jsx("div", __assign({
|
|
@@ -54,14 +60,9 @@ export var FloatingNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
54
60
|
children: _jsxs("div", __assign({
|
|
55
61
|
className: "ncua-floating-notification__container"
|
|
56
62
|
}, {
|
|
57
|
-
children: [iconNameMap[
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
})), _jsx(FeaturedIcon, __assign({}, featuredIconProps, {
|
|
61
|
-
size: "md",
|
|
62
|
-
className: "ncua-floating-notification__mobile-icon"
|
|
63
|
-
}))]
|
|
64
|
-
}), _jsxs("div", __assign({
|
|
63
|
+
children: [iconNameMap[color] && _jsx(FeaturedIcon, __assign({}, featuredIconProps, {
|
|
64
|
+
size: isMobile ? 'md' : 'sm'
|
|
65
|
+
})), _jsxs("div", __assign({
|
|
65
66
|
className: "ncua-floating-notification__text-container"
|
|
66
67
|
}, {
|
|
67
68
|
children: [_jsx("div", __assign({
|
|
@@ -79,19 +80,22 @@ export var FloatingNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
79
80
|
})), actions && _jsx("div", __assign({
|
|
80
81
|
className: "ncua-floating-notification__actions"
|
|
81
82
|
}, {
|
|
82
|
-
children: actions
|
|
83
|
+
children: actions.map(function (action) {
|
|
84
|
+
return _jsx(Button, {
|
|
85
|
+
size: "xs",
|
|
86
|
+
hierarchy: action.hierarchy || 'link',
|
|
87
|
+
label: action.label,
|
|
88
|
+
onClick: action === null || action === void 0 ? void 0 : action.onClick
|
|
89
|
+
}, "".concat(action.label, "-").concat(action.hierarchy));
|
|
90
|
+
})
|
|
83
91
|
}))]
|
|
84
92
|
}))]
|
|
85
93
|
}))
|
|
86
|
-
})), onClose && _jsx(
|
|
87
|
-
|
|
94
|
+
})), onClose && _jsx(ButtonCloseX, {
|
|
95
|
+
theme: "light",
|
|
88
96
|
className: "ncua-floating-notification__close-button",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
children: _jsx(Icon, {
|
|
93
|
-
name: "x"
|
|
94
|
-
})
|
|
95
|
-
}))]
|
|
97
|
+
size: isMobile ? 'sm' : 'xs',
|
|
98
|
+
onClick: onClose
|
|
99
|
+
})]
|
|
96
100
|
}));
|
|
97
101
|
});
|
|
@@ -36,19 +36,19 @@ var iconColorMap = {
|
|
|
36
36
|
export var FullWidthNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
37
37
|
var title = _a.title,
|
|
38
38
|
supportingText = _a.supportingText,
|
|
39
|
-
_b = _a.
|
|
40
|
-
|
|
39
|
+
_b = _a.color,
|
|
40
|
+
color = _b === void 0 ? 'neutral' : _b,
|
|
41
41
|
onClose = _a.onClose,
|
|
42
42
|
className = _a.className,
|
|
43
43
|
actions = _a.actions,
|
|
44
|
-
rest = __rest(_a, ["title", "supportingText", "
|
|
44
|
+
rest = __rest(_a, ["title", "supportingText", "color", "onClose", "className", "actions"]);
|
|
45
45
|
var closeIconSize = {
|
|
46
46
|
width: 20,
|
|
47
47
|
height: 20
|
|
48
48
|
};
|
|
49
49
|
return _jsx("div", __assign({
|
|
50
50
|
ref: ref,
|
|
51
|
-
className: classNames('ncua-full-width-notification', "ncua-full-width-notification--".concat(
|
|
51
|
+
className: classNames('ncua-full-width-notification', "ncua-full-width-notification--".concat(color), className),
|
|
52
52
|
role: "alert"
|
|
53
53
|
}, rest, {
|
|
54
54
|
children: _jsx("div", __assign({
|
|
@@ -61,10 +61,10 @@ export var FullWidthNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
61
61
|
className: "ncua-full-width-notification__content-wrapper"
|
|
62
62
|
}, {
|
|
63
63
|
children: [_jsx(Icon, {
|
|
64
|
-
name: iconNameMap[
|
|
64
|
+
name: iconNameMap[color],
|
|
65
65
|
width: 16,
|
|
66
66
|
height: 16,
|
|
67
|
-
color: COLOR[iconColorMap[
|
|
67
|
+
color: COLOR[iconColorMap[color]],
|
|
68
68
|
className: "ncua-full-width-notification__icon"
|
|
69
69
|
}), _jsxs("div", __assign({
|
|
70
70
|
className: "ncua-full-width-notification__text-container"
|
|
@@ -85,7 +85,14 @@ export var FullWidthNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
85
85
|
children: [actions && _jsx("div", __assign({
|
|
86
86
|
className: "ncua-full-width-notification__actions"
|
|
87
87
|
}, {
|
|
88
|
-
children: actions
|
|
88
|
+
children: actions.map(function (action) {
|
|
89
|
+
return _jsx("button", __assign({
|
|
90
|
+
onClick: action.onClick,
|
|
91
|
+
className: classNames('ncua-notification__action-button', "ncua-notification__action-button--".concat(action.hierarchy || 'link'))
|
|
92
|
+
}, {
|
|
93
|
+
children: action.label
|
|
94
|
+
}), "".concat(action.label, "-").concat(action.hierarchy));
|
|
95
|
+
})
|
|
89
96
|
})), onClose && _jsx("button", __assign({
|
|
90
97
|
type: "button",
|
|
91
98
|
className: "ncua-full-width-notification__close-button",
|
|
@@ -95,7 +102,7 @@ export var FullWidthNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
95
102
|
children: _jsx(Icon, __assign({
|
|
96
103
|
name: "x-close"
|
|
97
104
|
}, closeIconSize, {
|
|
98
|
-
color: COLOR[iconColorMap[
|
|
105
|
+
color: COLOR[iconColorMap[color]]
|
|
99
106
|
}))
|
|
100
107
|
}))]
|
|
101
108
|
}))]
|
|
@@ -16,43 +16,23 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
16
16
|
}
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
|
-
import { jsx as _jsx
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { forwardRef } from 'react';
|
|
21
|
-
import classNames from 'classnames';
|
|
22
21
|
import { FloatingNotification } from './FloatingNotification';
|
|
23
22
|
import { FullWidthNotification } from './FullWidthNotification';
|
|
24
23
|
export var Notification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
25
24
|
var _b = _a.type,
|
|
26
25
|
type = _b === void 0 ? 'floating' : _b,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
actions = _a.actions,
|
|
34
|
-
rest = __rest(_a, ["type", "title", "supportingText", "variant", "onClose", "className", "actions"]);
|
|
35
|
-
var actionsContent = actions && actions.length > 0 ? _jsx(_Fragment, {
|
|
36
|
-
children: actions.map(function (action, index) {
|
|
37
|
-
return _jsx("button", __assign({
|
|
38
|
-
onClick: action.onClick,
|
|
39
|
-
className: classNames('ncua-notification__action-button', "ncua-notification__action-button--".concat(action.hierarchy || 'link-gray'))
|
|
40
|
-
}, {
|
|
41
|
-
children: action.label
|
|
42
|
-
}), index);
|
|
43
|
-
})
|
|
44
|
-
}) : null;
|
|
45
|
-
var sharedProps = __assign({
|
|
46
|
-
title: title,
|
|
47
|
-
supportingText: supportingText,
|
|
48
|
-
variant: variant,
|
|
49
|
-
onClose: onClose,
|
|
50
|
-
className: className,
|
|
51
|
-
actions: actionsContent
|
|
52
|
-
}, rest);
|
|
53
|
-
return type === 'floating' ? _jsx(FloatingNotification, __assign({}, sharedProps, {
|
|
26
|
+
_c = _a.color,
|
|
27
|
+
color = _c === void 0 ? 'neutral' : _c,
|
|
28
|
+
rest = __rest(_a, ["type", "color"]);
|
|
29
|
+
return type === 'floating' ? _jsx(FloatingNotification, __assign({
|
|
30
|
+
color: color
|
|
31
|
+
}, rest, {
|
|
54
32
|
ref: ref
|
|
55
|
-
})) : _jsx(FullWidthNotification, __assign({
|
|
33
|
+
})) : _jsx(FullWidthNotification, __assign({
|
|
34
|
+
color: color
|
|
35
|
+
}, rest, {
|
|
56
36
|
ref: ref
|
|
57
37
|
}));
|
|
58
38
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export var useMediaQuery = function (query, options) {
|
|
3
|
+
var _a = useState(false),
|
|
4
|
+
matches = _a[0],
|
|
5
|
+
setMatches = _a[1];
|
|
6
|
+
useEffect(function () {
|
|
7
|
+
var mediaQuery = window.matchMedia(query);
|
|
8
|
+
setMatches(mediaQuery.matches);
|
|
9
|
+
var handleChange = function (e) {
|
|
10
|
+
var _a;
|
|
11
|
+
setMatches(e.matches);
|
|
12
|
+
if (e.matches) {
|
|
13
|
+
(_a = options === null || options === void 0 ? void 0 : options.onMatched) === null || _a === void 0 ? void 0 : _a.call(options);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
mediaQuery.addEventListener('change', handleChange);
|
|
17
|
+
return function () {
|
|
18
|
+
mediaQuery.removeEventListener('change', handleChange);
|
|
19
|
+
};
|
|
20
|
+
}, [query, options === null || options === void 0 ? void 0 : options.onMatched]);
|
|
21
|
+
return matches;
|
|
22
|
+
};
|
|
@@ -10,6 +10,8 @@ export type BadgeGroupProps = Omit<BadgeProps, 'type' | 'size' | 'color'> & {
|
|
|
10
10
|
groupClassName?: string;
|
|
11
11
|
size?: BadgeGroupSize;
|
|
12
12
|
color?: BadgeGroupColor;
|
|
13
|
+
href?: string;
|
|
14
|
+
target?: string;
|
|
13
15
|
};
|
|
14
|
-
export declare const BadgeGroup: ({ groupLabel, groupIcon, groupClassName, color, size, ...props }: BadgeGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare const BadgeGroup: ({ groupLabel, groupIcon, groupClassName, color, size, href, target, ...props }: BadgeGroupProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
//# sourceMappingURL=BadgeGroup.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
|
|
@@ -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
|
|
@@ -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
|
*/
|
|
@@ -622,41 +622,46 @@ button {
|
|
|
622
622
|
display: block;
|
|
623
623
|
}
|
|
624
624
|
|
|
625
|
-
.ncua-
|
|
625
|
+
.ncua-button-close-x {
|
|
626
626
|
display: inline-flex;
|
|
627
627
|
align-items: center;
|
|
628
628
|
justify-content: center;
|
|
629
629
|
color: var(--gray-400);
|
|
630
630
|
border-radius: 8px;
|
|
631
631
|
cursor: pointer;
|
|
632
|
+
background-color: transparent;
|
|
632
633
|
}
|
|
633
|
-
.ncua-
|
|
634
|
+
.ncua-button-close-x:hover {
|
|
634
635
|
background-color: var(--gray-50);
|
|
635
636
|
color: var(--gray-500);
|
|
636
637
|
}
|
|
637
|
-
.ncua-
|
|
638
|
+
.ncua-button-close-x:focus {
|
|
638
639
|
background-color: var(--gray-50);
|
|
639
640
|
}
|
|
640
|
-
.ncua-
|
|
641
|
+
.ncua-button-close-x--xs {
|
|
642
|
+
width: 28px;
|
|
643
|
+
height: 28px;
|
|
644
|
+
}
|
|
645
|
+
.ncua-button-close-x--sm {
|
|
641
646
|
width: 36px;
|
|
642
647
|
height: 36px;
|
|
643
648
|
}
|
|
644
|
-
.ncua-
|
|
649
|
+
.ncua-button-close-x--md {
|
|
645
650
|
width: 40px;
|
|
646
651
|
height: 40px;
|
|
647
652
|
}
|
|
648
|
-
.ncua-
|
|
653
|
+
.ncua-button-close-x--lg {
|
|
649
654
|
width: 44px;
|
|
650
655
|
height: 44px;
|
|
651
656
|
}
|
|
652
|
-
.ncua-
|
|
657
|
+
.ncua-button-close-x--dark {
|
|
653
658
|
color: var(--gray-100);
|
|
654
659
|
}
|
|
655
|
-
.ncua-
|
|
660
|
+
.ncua-button-close-x--dark:hover {
|
|
656
661
|
color: var(--base-white);
|
|
657
662
|
background-color: rgba(255, 255, 255, 0.2);
|
|
658
663
|
}
|
|
659
|
-
.ncua-
|
|
664
|
+
.ncua-button-close-x--dark:focus {
|
|
660
665
|
color: var(--gray-100);
|
|
661
666
|
background-color: rgba(255, 255, 255, 0.2);
|
|
662
667
|
}
|
|
@@ -1397,7 +1402,7 @@ button {
|
|
|
1397
1402
|
cursor: pointer;
|
|
1398
1403
|
}
|
|
1399
1404
|
.ncua-input__trailing-button .ncua-input__button--xs {
|
|
1400
|
-
padding:
|
|
1405
|
+
padding: 4px 10px;
|
|
1401
1406
|
font-size: var(--font-size-xs);
|
|
1402
1407
|
line-height: var(--line-heights-xs);
|
|
1403
1408
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
@@ -1566,7 +1571,7 @@ button {
|
|
|
1566
1571
|
flex: 1;
|
|
1567
1572
|
}
|
|
1568
1573
|
.ncua-modal__header--close-button.ncua-modal__header--left {
|
|
1569
|
-
padding: 20px 56px 20px
|
|
1574
|
+
padding: 20px 56px 20px 20px;
|
|
1570
1575
|
}
|
|
1571
1576
|
|
|
1572
1577
|
.ncua-modal__title {
|
|
@@ -1592,19 +1597,6 @@ button {
|
|
|
1592
1597
|
position: absolute;
|
|
1593
1598
|
top: 10px;
|
|
1594
1599
|
right: 16px;
|
|
1595
|
-
display: flex;
|
|
1596
|
-
align-items: center;
|
|
1597
|
-
justify-content: center;
|
|
1598
|
-
background: transparent;
|
|
1599
|
-
border: none;
|
|
1600
|
-
cursor: pointer;
|
|
1601
|
-
padding: 8px;
|
|
1602
|
-
color: var(--gray-400);
|
|
1603
|
-
border-radius: 8px;
|
|
1604
|
-
}
|
|
1605
|
-
.ncua-modal__close-button svg {
|
|
1606
|
-
width: 20px;
|
|
1607
|
-
height: 20px;
|
|
1608
1600
|
}
|
|
1609
1601
|
|
|
1610
1602
|
.ncua-modal__content {
|
|
@@ -1774,24 +1766,8 @@ button {
|
|
|
1774
1766
|
}
|
|
1775
1767
|
.ncua-floating-notification__close-button {
|
|
1776
1768
|
position: absolute;
|
|
1777
|
-
top:
|
|
1778
|
-
right:
|
|
1779
|
-
display: grid;
|
|
1780
|
-
place-items: center;
|
|
1781
|
-
background: transparent;
|
|
1782
|
-
border: none;
|
|
1783
|
-
padding: 8px;
|
|
1784
|
-
color: var(--gray-400);
|
|
1785
|
-
}
|
|
1786
|
-
.ncua-floating-notification__close-button svg {
|
|
1787
|
-
width: 20px;
|
|
1788
|
-
height: 20px;
|
|
1789
|
-
}
|
|
1790
|
-
@media (max-width: 768px) {
|
|
1791
|
-
.ncua-floating-notification__close-button svg {
|
|
1792
|
-
width: 24px;
|
|
1793
|
-
height: 24px;
|
|
1794
|
-
}
|
|
1769
|
+
top: 12px;
|
|
1770
|
+
right: 12px;
|
|
1795
1771
|
}
|
|
1796
1772
|
.ncua-floating-notification .ncua-notification__action-button {
|
|
1797
1773
|
min-height: 20px;
|
|
@@ -1816,22 +1792,6 @@ button {
|
|
|
1816
1792
|
color: var(--blue-500);
|
|
1817
1793
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
1818
1794
|
}
|
|
1819
|
-
.ncua-floating-notification__pc-icon {
|
|
1820
|
-
display: flex;
|
|
1821
|
-
}
|
|
1822
|
-
@media (max-width: 768px) {
|
|
1823
|
-
.ncua-floating-notification__pc-icon {
|
|
1824
|
-
display: none;
|
|
1825
|
-
}
|
|
1826
|
-
}
|
|
1827
|
-
.ncua-floating-notification__mobile-icon {
|
|
1828
|
-
display: none;
|
|
1829
|
-
}
|
|
1830
|
-
@media (max-width: 768px) {
|
|
1831
|
-
.ncua-floating-notification__mobile-icon {
|
|
1832
|
-
display: flex;
|
|
1833
|
-
}
|
|
1834
|
-
}
|
|
1835
1795
|
|
|
1836
1796
|
.ncua-full-width-notification {
|
|
1837
1797
|
width: 100%;
|
|
@@ -3227,8 +3187,9 @@ button {
|
|
|
3227
3187
|
.ncua-badge-group {
|
|
3228
3188
|
display: inline-flex;
|
|
3229
3189
|
align-items: center;
|
|
3230
|
-
padding:
|
|
3190
|
+
padding: 3px 10px 3px 4px;
|
|
3231
3191
|
border-radius: 16px;
|
|
3192
|
+
cursor: pointer;
|
|
3232
3193
|
}
|
|
3233
3194
|
.ncua-badge-group__label {
|
|
3234
3195
|
margin-left: 8px;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncds/ui-admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"description": "nhn-commerce의 어드민 디자인 시스템입니다.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"barrel": "node barrel.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"publish:npm": "npm publish --access=public",
|
|
17
17
|
"start": "webpack --node-env development",
|
|
18
18
|
"test": "react-scripts test",
|
|
19
|
-
"tsc": "tsc"
|
|
19
|
+
"tsc": "tsc --pretty --listFiles"
|
|
20
20
|
},
|
|
21
21
|
"author": {
|
|
22
22
|
"name": "nhn-commerce-fe",
|