@ncds/ui-admin 1.5.4 → 1.6.0
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/badge/utils.js +2 -4
- package/dist/cjs/src/components/breadcrumb/BreadCrumb.js +2 -3
- package/dist/cjs/src/components/button/Button.js +4 -5
- package/dist/cjs/src/components/button/ButtonCloseX.js +3 -3
- package/dist/cjs/src/components/button/ButtonGroup.js +2 -6
- package/dist/cjs/src/components/carousel/CarouselArrow.js +5 -5
- package/dist/cjs/src/components/combobox/ComboBox.js +3 -2
- package/dist/cjs/src/components/date-picker/CustomInput.js +5 -4
- package/dist/cjs/src/components/date-picker/DatePicker.js +3 -2
- package/dist/cjs/src/components/dropdown/Dropdown.js +14 -15
- package/dist/cjs/src/components/featured-icon/FeaturedIcon.js +3 -5
- package/dist/cjs/src/components/file-input/FileInput.js +6 -7
- package/dist/cjs/src/components/image-file-input/ImageFileInput.js +4 -5
- package/dist/cjs/src/components/image-file-input/components/ImagePreview.js +2 -1
- package/dist/cjs/src/components/input/InputBase.js +24 -24
- package/dist/cjs/src/components/input/PasswordInput.js +1 -1
- package/dist/cjs/src/components/modal/Modal.js +7 -5
- package/dist/cjs/src/components/notification/FloatingNotification.js +8 -7
- package/dist/cjs/src/components/notification/FullWidthNotification.js +17 -17
- package/dist/cjs/src/components/notification/MessageNotification.js +11 -12
- package/dist/cjs/src/components/pagination/NavButton.js +12 -11
- package/dist/cjs/src/components/select-dropdown/SelectDropdown.js +14 -4
- package/dist/cjs/src/components/selectbox/SelectBox.js +62 -39
- package/dist/cjs/src/components/tab/TabButton.js +2 -3
- package/dist/cjs/src/components/tag/Tag.js +4 -5
- package/dist/esm/src/components/badge/utils.js +1 -2
- package/dist/esm/src/components/breadcrumb/BreadCrumb.js +2 -3
- package/dist/esm/src/components/button/Button.js +3 -4
- package/dist/esm/src/components/button/ButtonCloseX.js +3 -3
- package/dist/esm/src/components/button/ButtonGroup.js +2 -6
- package/dist/esm/src/components/carousel/CarouselArrow.js +5 -5
- package/dist/esm/src/components/combobox/ComboBox.js +3 -2
- package/dist/esm/src/components/date-picker/CustomInput.js +5 -3
- package/dist/esm/src/components/date-picker/DatePicker.js +3 -2
- package/dist/esm/src/components/dropdown/Dropdown.js +14 -14
- package/dist/esm/src/components/featured-icon/FeaturedIcon.js +2 -4
- package/dist/esm/src/components/file-input/FileInput.js +6 -7
- package/dist/esm/src/components/image-file-input/ImageFileInput.js +4 -5
- package/dist/esm/src/components/image-file-input/components/ImagePreview.js +2 -1
- package/dist/esm/src/components/input/InputBase.js +24 -24
- package/dist/esm/src/components/input/PasswordInput.js +2 -2
- package/dist/esm/src/components/modal/Modal.js +7 -5
- package/dist/esm/src/components/notification/FloatingNotification.js +8 -7
- package/dist/esm/src/components/notification/FullWidthNotification.js +17 -17
- package/dist/esm/src/components/notification/MessageNotification.js +11 -12
- package/dist/esm/src/components/pagination/NavButton.js +11 -10
- package/dist/esm/src/components/select-dropdown/SelectDropdown.js +14 -4
- package/dist/esm/src/components/selectbox/SelectBox.js +62 -39
- package/dist/esm/src/components/tab/TabButton.js +2 -3
- package/dist/esm/src/components/tag/Tag.js +5 -6
- package/dist/types/src/components/badge/BadgeGroup.d.ts +4 -4
- package/dist/types/src/components/badge/utils.d.ts +2 -2
- package/dist/types/src/components/button/Button.d.ts +18 -20
- package/dist/types/src/components/button/ButtonCloseX.d.ts +1 -1
- package/dist/types/src/components/button/ButtonGroup.d.ts +6 -6
- package/dist/types/src/components/combobox/ComboBox.d.ts +4 -4
- package/dist/types/src/components/date-picker/CustomInput.d.ts +1 -2
- package/dist/types/src/components/date-picker/DatePicker.d.ts +1 -0
- package/dist/types/src/components/dot/Dot.d.ts +1 -1
- package/dist/types/src/components/dropdown/Dropdown.d.ts +4 -3
- package/dist/types/src/components/featured-icon/FeaturedIcon.d.ts +2 -2
- package/dist/types/src/components/file-input/FileInput.d.ts +1 -1
- package/dist/types/src/components/image-file-input/ImageFileInput.d.ts +2 -2
- package/dist/types/src/components/index.d.ts +1 -0
- package/dist/types/src/components/input/InputBase.d.ts +4 -4
- package/dist/types/src/components/modal/Modal.d.ts +6 -4
- package/dist/types/src/components/notification/MessageNotification.d.ts +3 -3
- package/dist/types/src/components/notification/Notification.d.ts +3 -3
- package/dist/types/src/components/pagination/NavButton.d.ts +5 -4
- package/dist/types/src/components/select-dropdown/SelectDropdown.d.ts +1 -0
- package/dist/types/src/components/selectbox/SelectBox.d.ts +6 -4
- package/dist/types/src/components/tab/TabButton.d.ts +3 -3
- package/dist/types/src/components/tag/Tag.d.ts +3 -3
- package/dist/types/src/types/dropdown/option.d.ts +4 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +35 -5
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var __assign = this && this.__assign || function () {
|
|
|
9
9
|
return __assign.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
import
|
|
12
|
+
import { DotsVertical } from '@ncds/ui-admin-icon';
|
|
13
13
|
import { useEffect, useRef, useState } from 'react';
|
|
14
14
|
export var Dropdown = function (_a) {
|
|
15
15
|
var trigger = _a.trigger,
|
|
@@ -53,6 +53,7 @@ export var Dropdown = function (_a) {
|
|
|
53
53
|
}
|
|
54
54
|
}, [closeOnClickOutside]);
|
|
55
55
|
var renderTrigger = function () {
|
|
56
|
+
var _a;
|
|
56
57
|
switch (trigger.type) {
|
|
57
58
|
case 'custom':
|
|
58
59
|
return _jsx("button", __assign({
|
|
@@ -62,16 +63,15 @@ export var Dropdown = function (_a) {
|
|
|
62
63
|
children: trigger.children
|
|
63
64
|
}));
|
|
64
65
|
case 'icon':
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}));
|
|
66
|
+
{
|
|
67
|
+
var TriggerIcon = (_a = trigger.icon) !== null && _a !== void 0 ? _a : DotsVertical;
|
|
68
|
+
return _jsx("button", __assign({
|
|
69
|
+
className: "ncua-dropdown__trigger ncua-dropdown__trigger--icon",
|
|
70
|
+
onClick: toggleDropdown
|
|
71
|
+
}, {
|
|
72
|
+
children: _jsx(TriggerIcon, {})
|
|
73
|
+
}));
|
|
74
|
+
}
|
|
75
75
|
case 'avatar':
|
|
76
76
|
return _jsx("button", __assign({
|
|
77
77
|
className: "ncua-dropdown__trigger ncua-dropdown__trigger--avatar",
|
|
@@ -143,7 +143,8 @@ export var Dropdown = function (_a) {
|
|
|
143
143
|
return null;
|
|
144
144
|
};
|
|
145
145
|
var renderItem = function (item) {
|
|
146
|
-
var
|
|
146
|
+
var ItemIcon = item.icon;
|
|
147
|
+
var itemClasses = ['ncua-dropdown__item', item.disabled ? 'is-disabled' : '', item.type === 'danger' ? 'is-danger' : '', item.className].filter(Boolean).join(' ');
|
|
147
148
|
return _jsxs("div", __assign({
|
|
148
149
|
className: itemClasses
|
|
149
150
|
}, {
|
|
@@ -158,8 +159,7 @@ export var Dropdown = function (_a) {
|
|
|
158
159
|
children: [_jsxs("div", __assign({
|
|
159
160
|
className: "ncua-dropdown__item-text-group"
|
|
160
161
|
}, {
|
|
161
|
-
children: [
|
|
162
|
-
name: item.icon,
|
|
162
|
+
children: [ItemIcon && _jsx(ItemIcon, {
|
|
163
163
|
className: "ncua-dropdown__item-icon"
|
|
164
164
|
}), _jsx("span", __assign({
|
|
165
165
|
className: "ncua-dropdown__item-text"
|
|
@@ -17,7 +17,6 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
19
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
import Icon from '@ncds/ui-admin-icon/dynamic';
|
|
21
20
|
import classNames from 'classnames';
|
|
22
21
|
import { forwardRef } from 'react';
|
|
23
22
|
var iconSizeMap = {
|
|
@@ -27,7 +26,7 @@ var iconSizeMap = {
|
|
|
27
26
|
xl: 28
|
|
28
27
|
};
|
|
29
28
|
export var FeaturedIcon = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
30
|
-
var
|
|
29
|
+
var Icon = _a.icon,
|
|
31
30
|
_b = _a.theme,
|
|
32
31
|
theme = _b === void 0 ? 'light-circle' : _b,
|
|
33
32
|
_c = _a.color,
|
|
@@ -35,7 +34,7 @@ export var FeaturedIcon = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
35
34
|
_d = _a.size,
|
|
36
35
|
size = _d === void 0 ? 'md' : _d,
|
|
37
36
|
className = _a.className,
|
|
38
|
-
rest = __rest(_a, ["
|
|
37
|
+
rest = __rest(_a, ["icon", "theme", "color", "size", "className"]);
|
|
39
38
|
return _jsxs("div", __assign({
|
|
40
39
|
ref: ref,
|
|
41
40
|
className: classNames('ncua-featured-icon', "ncua-featured-icon--".concat(theme), "ncua-featured-icon--".concat(color), "ncua-featured-icon--".concat(size), className)
|
|
@@ -47,7 +46,6 @@ export var FeaturedIcon = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
47
46
|
className: "ncua-featured-icon__outline ncua-featured-icon__outline--outer"
|
|
48
47
|
})]
|
|
49
48
|
}), _jsx(Icon, {
|
|
50
|
-
name: name,
|
|
51
49
|
width: iconSizeMap[size],
|
|
52
50
|
height: iconSizeMap[size]
|
|
53
51
|
})]
|
|
@@ -26,12 +26,12 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
26
26
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
27
27
|
};
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
import {
|
|
29
|
+
import { HelpCircle, Upload01 } from '@ncds/ui-admin-icon';
|
|
30
30
|
import classNames from 'classnames';
|
|
31
|
-
import
|
|
32
|
-
import { Tag } from '../tag/Tag';
|
|
31
|
+
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
33
32
|
import { Button } from '../button';
|
|
34
33
|
import { HintText, Label } from '../shared';
|
|
34
|
+
import { Tag } from '../tag/Tag';
|
|
35
35
|
export var FileInputErrorType;
|
|
36
36
|
(function (FileInputErrorType) {
|
|
37
37
|
FileInputErrorType["ALREADY_UPLOADED"] = "ALREADY_UPLOADED";
|
|
@@ -200,9 +200,8 @@ export var FileInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
200
200
|
isRequired: isRequired
|
|
201
201
|
}, {
|
|
202
202
|
children: label
|
|
203
|
-
})), showHelpIcon && _jsx(
|
|
204
|
-
className: "ncua-input__help-icon"
|
|
205
|
-
name: "help-circle"
|
|
203
|
+
})), showHelpIcon && _jsx(HelpCircle, {
|
|
204
|
+
className: "ncua-input__help-icon"
|
|
206
205
|
})]
|
|
207
206
|
})), _jsx(Button, {
|
|
208
207
|
size: size,
|
|
@@ -210,7 +209,7 @@ export var FileInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
210
209
|
disabled: disabled,
|
|
211
210
|
leadingIcon: {
|
|
212
211
|
type: 'icon',
|
|
213
|
-
icon:
|
|
212
|
+
icon: Upload01
|
|
214
213
|
},
|
|
215
214
|
label: buttonLabel
|
|
216
215
|
}), hintText && _jsx(HintText, __assign({
|
|
@@ -26,7 +26,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
|
|
|
26
26
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
27
27
|
};
|
|
28
28
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
import
|
|
29
|
+
import { HelpCircle, Upload01 } from '@ncds/ui-admin-icon';
|
|
30
30
|
import classNames from 'classnames';
|
|
31
31
|
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
32
32
|
import { Button } from '../button';
|
|
@@ -229,9 +229,8 @@ export var ImageFileInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
229
229
|
isRequired: isRequired
|
|
230
230
|
}, {
|
|
231
231
|
children: label
|
|
232
|
-
})), showHelpIcon && _jsx(
|
|
233
|
-
className: "ncua-input__help-icon"
|
|
234
|
-
name: "help-circle"
|
|
232
|
+
})), showHelpIcon && _jsx(HelpCircle, {
|
|
233
|
+
className: "ncua-input__help-icon"
|
|
235
234
|
})]
|
|
236
235
|
})), _jsx(Button, {
|
|
237
236
|
size: "xs",
|
|
@@ -239,7 +238,7 @@ export var ImageFileInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
239
238
|
disabled: disabled,
|
|
240
239
|
leadingIcon: {
|
|
241
240
|
type: 'icon',
|
|
242
|
-
icon:
|
|
241
|
+
icon: Upload01
|
|
243
242
|
},
|
|
244
243
|
label: buttonLabel
|
|
245
244
|
}), showHintText && hintText && _jsx(HintText, __assign({
|
|
@@ -9,6 +9,7 @@ var __assign = this && this.__assign || function () {
|
|
|
9
9
|
return __assign.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { Trash03 } from '@ncds/ui-admin-icon';
|
|
12
13
|
import { Button } from '../../button';
|
|
13
14
|
export var ImagePreview = function (_a) {
|
|
14
15
|
var file = _a.file,
|
|
@@ -26,7 +27,7 @@ export var ImagePreview = function (_a) {
|
|
|
26
27
|
onlyIcon: true,
|
|
27
28
|
leadingIcon: {
|
|
28
29
|
type: 'icon',
|
|
29
|
-
icon:
|
|
30
|
+
icon: Trash03,
|
|
30
31
|
color: 'gray200'
|
|
31
32
|
},
|
|
32
33
|
label: "Remove image",
|
|
@@ -17,7 +17,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
import
|
|
20
|
+
import { CheckCircle, HelpCircle, InfoCircle, X } from '@ncds/ui-admin-icon';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
22
|
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
23
23
|
import { COLOR } from '../../../constant/color';
|
|
@@ -93,18 +93,23 @@ export var InputBase = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
93
93
|
var _a, _b;
|
|
94
94
|
switch (slot.type) {
|
|
95
95
|
case 'icon':
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
96
|
+
{
|
|
97
|
+
var SlotIcon = slot.icon;
|
|
98
|
+
return _jsx("div", __assign({
|
|
99
|
+
className: "ncua-input__icon-wrap"
|
|
100
|
+
}, {
|
|
101
|
+
children: _jsx(SlotIcon, {
|
|
102
|
+
className: classNames("ncua-input__".concat(position, "-icon"), slot.className),
|
|
103
|
+
color: slot.color ? COLOR[slot.color] : undefined,
|
|
104
|
+
width: (_a = slot.size) !== null && _a !== void 0 ? _a : generalSvgSize[size],
|
|
105
|
+
height: (_b = slot.size) !== null && _b !== void 0 ? _b : generalSvgSize[size]
|
|
106
|
+
})
|
|
107
|
+
}));
|
|
108
|
+
}
|
|
107
109
|
case 'custom':
|
|
110
|
+
if (slot.placement !== 'inside') {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
108
113
|
return slot.children;
|
|
109
114
|
default:
|
|
110
115
|
return null;
|
|
@@ -113,11 +118,11 @@ export var InputBase = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
113
118
|
var renderClearButton = function () {
|
|
114
119
|
if (!props.clearText) return null;
|
|
115
120
|
return _jsx("button", __assign({
|
|
116
|
-
|
|
121
|
+
type: "button",
|
|
122
|
+
className: classNames('ncua-input__icon-wrap', 'ncua-input__right-icon', 'ncua-input__clear'),
|
|
117
123
|
onClick: props.onClearText
|
|
118
124
|
}, {
|
|
119
|
-
children: _jsx(
|
|
120
|
-
name: "x",
|
|
125
|
+
children: _jsx(X, {
|
|
121
126
|
className: "ncua-input__clear-icon",
|
|
122
127
|
width: validationSvgSize[size],
|
|
123
128
|
height: validationSvgSize[size]
|
|
@@ -129,8 +134,7 @@ export var InputBase = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
129
134
|
return _jsx("div", __assign({
|
|
130
135
|
className: "ncua-input__icon-wrap ncua-input__right-icon"
|
|
131
136
|
}, {
|
|
132
|
-
children: _jsx(
|
|
133
|
-
name: "info-circle",
|
|
137
|
+
children: _jsx(InfoCircle, {
|
|
134
138
|
className: "ncua-input__destructive-icon",
|
|
135
139
|
width: validationSvgSize[size],
|
|
136
140
|
height: validationSvgSize[size]
|
|
@@ -141,8 +145,7 @@ export var InputBase = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
141
145
|
return _jsx("div", __assign({
|
|
142
146
|
className: "ncua-input__icon-wrap ncua-input__right-icon"
|
|
143
147
|
}, {
|
|
144
|
-
children: _jsx(
|
|
145
|
-
name: "check-circle",
|
|
148
|
+
children: _jsx(CheckCircle, {
|
|
146
149
|
className: "ncua-input__validation-icon",
|
|
147
150
|
width: validationSvgSize[size],
|
|
148
151
|
height: validationSvgSize[size]
|
|
@@ -161,9 +164,8 @@ export var InputBase = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
161
164
|
htmlFor: props.id
|
|
162
165
|
}, {
|
|
163
166
|
children: label
|
|
164
|
-
})), showHelpIcon && _jsx(
|
|
165
|
-
className: "ncua-input__help-icon"
|
|
166
|
-
name: "help-circle"
|
|
167
|
+
})), showHelpIcon && _jsx(HelpCircle, {
|
|
168
|
+
className: "ncua-input__help-icon"
|
|
167
169
|
})]
|
|
168
170
|
}));
|
|
169
171
|
};
|
|
@@ -191,8 +193,6 @@ export var InputBase = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
191
193
|
} else if (ref) {
|
|
192
194
|
ref.current = node;
|
|
193
195
|
}
|
|
194
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
195
|
-
// @ts-ignore - ref assignment is needed for internal tracking
|
|
196
196
|
inputRef.current = node;
|
|
197
197
|
},
|
|
198
198
|
type: "text",
|
|
@@ -17,7 +17,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { Eye, EyeOff } from '@ncds/ui-admin-icon';
|
|
20
|
+
import { Eye, EyeOff, Lock01 } from '@ncds/ui-admin-icon';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
22
|
import { forwardRef, useState } from 'react';
|
|
23
23
|
import { InputBase } from './InputBase';
|
|
@@ -47,7 +47,7 @@ export var PasswordInput = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
47
47
|
type: isVisible ? 'text' : 'password',
|
|
48
48
|
leadingElement: {
|
|
49
49
|
type: 'icon',
|
|
50
|
-
icon:
|
|
50
|
+
icon: Lock01,
|
|
51
51
|
color: props.value ? 'gray600' : 'gray300'
|
|
52
52
|
},
|
|
53
53
|
trailingElement: {
|
|
@@ -92,7 +92,7 @@ Modal.Header = function (_a) {
|
|
|
92
92
|
})
|
|
93
93
|
}, {
|
|
94
94
|
children: [featuredIcon && _jsx(FeaturedIcon, {
|
|
95
|
-
|
|
95
|
+
icon: featuredIcon.icon,
|
|
96
96
|
color: featuredIcon.color,
|
|
97
97
|
theme: featuredIcon.theme,
|
|
98
98
|
size: "sm"
|
|
@@ -120,9 +120,10 @@ Modal.Header = function (_a) {
|
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
122
|
Modal.Content = function (_a) {
|
|
123
|
-
var children = _a.children
|
|
123
|
+
var children = _a.children,
|
|
124
|
+
className = _a.className;
|
|
124
125
|
return _jsx("div", __assign({
|
|
125
|
-
className:
|
|
126
|
+
className: classnames('ncua-modal__content', className)
|
|
126
127
|
}, {
|
|
127
128
|
children: children
|
|
128
129
|
}));
|
|
@@ -163,12 +164,13 @@ Modal.Actions = function (_a) {
|
|
|
163
164
|
showDivider = _c === void 0 ? false : _c,
|
|
164
165
|
_d = _a.align,
|
|
165
166
|
align = _d === void 0 ? 'stretch' : _d,
|
|
166
|
-
checkboxContent = _a.checkboxContent
|
|
167
|
+
checkboxContent = _a.checkboxContent,
|
|
168
|
+
className = _a.className;
|
|
167
169
|
return _jsxs(_Fragment, {
|
|
168
170
|
children: [showDivider && _jsx("div", {
|
|
169
171
|
className: "ncua-modal__actions-divider"
|
|
170
172
|
}), _jsxs("div", __assign({
|
|
171
|
-
className: classnames('ncua-modal__actions-wrapper', {
|
|
173
|
+
className: classnames('ncua-modal__actions-wrapper', className, {
|
|
172
174
|
'ncua-modal__actions-wrapper--checkbox': layout === 'checkbox'
|
|
173
175
|
})
|
|
174
176
|
}, {
|
|
@@ -17,6 +17,7 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
+
import { AlertCircle, AlertTriangle, CheckCircle, Pin02 } from '@ncds/ui-admin-icon';
|
|
20
21
|
import classNames from 'classnames';
|
|
21
22
|
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
22
23
|
import { MEDIA_QUERY } from '../../constant/breakpoint';
|
|
@@ -24,11 +25,11 @@ import { useMediaQuery } from '../../hooks/useMediaQuery';
|
|
|
24
25
|
import { Button } from '../button';
|
|
25
26
|
import { ButtonCloseX } from '../button/ButtonCloseX';
|
|
26
27
|
import { FeaturedIcon } from '../featured-icon/FeaturedIcon';
|
|
27
|
-
var
|
|
28
|
-
neutral:
|
|
29
|
-
error:
|
|
30
|
-
warning:
|
|
31
|
-
success:
|
|
28
|
+
var iconMap = {
|
|
29
|
+
neutral: Pin02,
|
|
30
|
+
error: AlertTriangle,
|
|
31
|
+
warning: AlertCircle,
|
|
32
|
+
success: CheckCircle
|
|
32
33
|
// info는 floating에서는 지원하지 않음
|
|
33
34
|
};
|
|
34
35
|
export var FloatingNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
@@ -47,7 +48,7 @@ export var FloatingNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
47
48
|
setShouldRemove = _d[1];
|
|
48
49
|
var iconColor = color;
|
|
49
50
|
var featuredIconProps = {
|
|
50
|
-
|
|
51
|
+
icon: iconMap[color] || Pin02,
|
|
51
52
|
size: 'sm',
|
|
52
53
|
color: iconColor,
|
|
53
54
|
theme: 'dark-circle'
|
|
@@ -91,7 +92,7 @@ export var FloatingNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
91
92
|
children: _jsxs("div", __assign({
|
|
92
93
|
className: "ncua-floating-notification__container"
|
|
93
94
|
}, {
|
|
94
|
-
children: [
|
|
95
|
+
children: [iconMap[color] && _jsx(FeaturedIcon, __assign({}, featuredIconProps, {
|
|
95
96
|
size: isMobile ? 'md' : 'sm'
|
|
96
97
|
})), _jsxs("div", __assign({
|
|
97
98
|
className: "ncua-floating-notification__text-container"
|
|
@@ -17,16 +17,16 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
import
|
|
20
|
+
import { AlertTriangle, CheckCircle, InfoCircle, MessageChatSquare, XClose } from '@ncds/ui-admin-icon';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
22
|
import { forwardRef, useEffect, useRef, useState } from 'react';
|
|
23
23
|
import { COLOR } from '../../../constant/color';
|
|
24
|
-
var
|
|
25
|
-
neutral:
|
|
26
|
-
error:
|
|
27
|
-
warning:
|
|
28
|
-
success:
|
|
29
|
-
info:
|
|
24
|
+
var iconMap = {
|
|
25
|
+
neutral: MessageChatSquare,
|
|
26
|
+
error: AlertTriangle,
|
|
27
|
+
warning: AlertTriangle,
|
|
28
|
+
success: CheckCircle,
|
|
29
|
+
info: InfoCircle
|
|
30
30
|
};
|
|
31
31
|
var iconColorMap = {
|
|
32
32
|
neutral: 'gray700',
|
|
@@ -94,13 +94,15 @@ export var FullWidthNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
94
94
|
children: [_jsxs("div", __assign({
|
|
95
95
|
className: "ncua-full-width-notification__content-wrapper"
|
|
96
96
|
}, {
|
|
97
|
-
children: [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
97
|
+
children: [function () {
|
|
98
|
+
var IconComponent = iconMap[color];
|
|
99
|
+
return _jsx(IconComponent, {
|
|
100
|
+
width: 16,
|
|
101
|
+
height: 16,
|
|
102
|
+
color: COLOR[iconColorMap[color]],
|
|
103
|
+
className: "ncua-full-width-notification__icon"
|
|
104
|
+
});
|
|
105
|
+
}(), _jsxs("div", __assign({
|
|
104
106
|
className: "ncua-full-width-notification__text-container"
|
|
105
107
|
}, {
|
|
106
108
|
children: [_jsx("span", __assign({
|
|
@@ -148,9 +150,7 @@ export var FullWidthNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
148
150
|
onClick: onClose,
|
|
149
151
|
"aria-label": "\uC54C\uB9BC \uB2EB\uAE30"
|
|
150
152
|
}, {
|
|
151
|
-
children: _jsx(
|
|
152
|
-
name: "x-close"
|
|
153
|
-
}, closeIconSize, {
|
|
153
|
+
children: _jsx(XClose, __assign({}, closeIconSize, {
|
|
154
154
|
color: COLOR[iconColorMap[color]]
|
|
155
155
|
}))
|
|
156
156
|
}))]
|
|
@@ -17,17 +17,17 @@ var __rest = this && this.__rest || function (s, e) {
|
|
|
17
17
|
return t;
|
|
18
18
|
};
|
|
19
19
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
|
-
import
|
|
20
|
+
import { AlertCircle, AlertTriangle, CheckCircle, Pin02, XClose } from '@ncds/ui-admin-icon';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
22
|
import { forwardRef } from 'react';
|
|
23
23
|
import { COLOR } from '../../../constant/color';
|
|
24
24
|
import { Button } from '../button';
|
|
25
25
|
import { FeaturedIcon } from '../featured-icon/FeaturedIcon';
|
|
26
|
-
var
|
|
27
|
-
neutral:
|
|
28
|
-
error:
|
|
29
|
-
warning:
|
|
30
|
-
success:
|
|
26
|
+
var iconMap = {
|
|
27
|
+
neutral: Pin02,
|
|
28
|
+
error: AlertTriangle,
|
|
29
|
+
warning: AlertCircle,
|
|
30
|
+
success: CheckCircle
|
|
31
31
|
};
|
|
32
32
|
var iconColorMap = {
|
|
33
33
|
neutral: 'gray700',
|
|
@@ -38,7 +38,7 @@ var iconColorMap = {
|
|
|
38
38
|
export var MessageNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
39
39
|
var title = _a.title,
|
|
40
40
|
supportingText = _a.supportingText,
|
|
41
|
-
|
|
41
|
+
Icon = _a.icon,
|
|
42
42
|
_b = _a.color,
|
|
43
43
|
color = _b === void 0 ? 'neutral' : _b,
|
|
44
44
|
onClose = _a.onClose,
|
|
@@ -50,7 +50,7 @@ export var MessageNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
50
50
|
var validColor = color === 'info' ? 'neutral' : color;
|
|
51
51
|
var iconColor = validColor;
|
|
52
52
|
var featuredIconProps = {
|
|
53
|
-
|
|
53
|
+
icon: Icon || iconMap[validColor] || Pin02,
|
|
54
54
|
size: 'lg',
|
|
55
55
|
color: iconColor,
|
|
56
56
|
theme: 'light-circle'
|
|
@@ -70,7 +70,7 @@ export var MessageNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
70
70
|
children: [_jsxs("div", __assign({
|
|
71
71
|
className: "ncua-message-notification__content-wrapper"
|
|
72
72
|
}, {
|
|
73
|
-
children: [
|
|
73
|
+
children: [iconMap[validColor] && _jsx(FeaturedIcon, __assign({}, featuredIconProps, {
|
|
74
74
|
className: "ncua-message-notification__icon"
|
|
75
75
|
})), _jsxs("div", __assign({
|
|
76
76
|
className: "ncua-message-notification__text-container"
|
|
@@ -105,7 +105,7 @@ export var MessageNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
105
105
|
}, {
|
|
106
106
|
children: [onHidePermanently && _jsx("button", __assign({
|
|
107
107
|
type: "button",
|
|
108
|
-
className: classNames('ncua-notification__action-button', 'ncua-notification__action-button--
|
|
108
|
+
className: classNames('ncua-notification__action-button', 'ncua-notification__action-button--link', 'ncua-message-notification__hide-link'),
|
|
109
109
|
onClick: onHidePermanently
|
|
110
110
|
}, {
|
|
111
111
|
children: "\uB2E4\uC2DC \uBCF4\uC9C0 \uC54A\uAE30"
|
|
@@ -115,8 +115,7 @@ export var MessageNotification = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
115
115
|
onClick: onClose,
|
|
116
116
|
"aria-label": "\uC54C\uB9BC \uB2EB\uAE30"
|
|
117
117
|
}, {
|
|
118
|
-
children: _jsx(
|
|
119
|
-
name: "x-close",
|
|
118
|
+
children: _jsx(XClose, {
|
|
120
119
|
width: 20,
|
|
121
120
|
height: 20,
|
|
122
121
|
color: closeIconColor
|
|
@@ -9,34 +9,35 @@ var __assign = this && this.__assign || function () {
|
|
|
9
9
|
return __assign.apply(this, arguments);
|
|
10
10
|
};
|
|
11
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import {
|
|
12
|
+
import { ArrowLeft, ArrowRight, ChevronLeft, ChevronLeftDouble, ChevronRight, ChevronRightDouble } from '@ncds/ui-admin-icon';
|
|
13
|
+
import { Button } from '../button';
|
|
13
14
|
var NAV_BUTTON_CONFIG = {
|
|
14
15
|
first: {
|
|
15
16
|
label: '처음',
|
|
16
17
|
className: 'ncua-pagination__first',
|
|
17
|
-
getIcon: function (
|
|
18
|
-
return
|
|
18
|
+
getIcon: function (_isPC) {
|
|
19
|
+
return ChevronLeftDouble;
|
|
19
20
|
}
|
|
20
21
|
},
|
|
21
22
|
prev: {
|
|
22
23
|
label: '이전',
|
|
23
24
|
className: 'ncua-pagination__before',
|
|
24
25
|
getIcon: function (isPC) {
|
|
25
|
-
return isPC ?
|
|
26
|
+
return isPC ? ChevronLeft : ArrowLeft;
|
|
26
27
|
}
|
|
27
28
|
},
|
|
28
29
|
next: {
|
|
29
30
|
label: '다음',
|
|
30
31
|
className: 'ncua-pagination__next',
|
|
31
32
|
getIcon: function (isPC) {
|
|
32
|
-
return isPC ?
|
|
33
|
+
return isPC ? ChevronRight : ArrowRight;
|
|
33
34
|
}
|
|
34
35
|
},
|
|
35
36
|
last: {
|
|
36
37
|
label: '마지막',
|
|
37
38
|
className: 'ncua-pagination__last',
|
|
38
|
-
getIcon: function (
|
|
39
|
-
return
|
|
39
|
+
getIcon: function (_isPC) {
|
|
40
|
+
return ChevronRightDouble;
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
43
|
};
|
|
@@ -50,7 +51,7 @@ export var NavButton = function (_a) {
|
|
|
50
51
|
var isNavigationButton = type === 'first' || type === 'prev' || type === 'next' || type === 'last';
|
|
51
52
|
var isFirstOrPrev = type === 'first' || type === 'prev';
|
|
52
53
|
var isNextOrLast = type === 'next' || type === 'last';
|
|
53
|
-
var disabled = isFirstOrPrev ? noPrev : isNextOrLast ? noNext : false;
|
|
54
|
+
var disabled = (isFirstOrPrev ? noPrev : false) || (isNextOrLast ? noNext : false);
|
|
54
55
|
var isPC = breakPoint === 'pc';
|
|
55
56
|
// key를 제외한 공통 props
|
|
56
57
|
var buttonProps = {
|
|
@@ -60,8 +61,8 @@ export var NavButton = function (_a) {
|
|
|
60
61
|
leadingIcon: {
|
|
61
62
|
type: 'icon',
|
|
62
63
|
icon: config.getIcon(isPC),
|
|
63
|
-
|
|
64
|
-
|
|
64
|
+
size: isPC ? 16 : 20,
|
|
65
|
+
color: disabled ? 'gray200' : 'gray700'
|
|
65
66
|
},
|
|
66
67
|
hierarchy: 'secondary-gray',
|
|
67
68
|
size: isPC ? 'xs' : 'sm',
|
|
@@ -49,12 +49,15 @@ export var SelectDropdown = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
49
49
|
className = _a.className,
|
|
50
50
|
activeDescendantId = _a.activeDescendantId,
|
|
51
51
|
componentType = _a.componentType,
|
|
52
|
-
|
|
52
|
+
_h = _a.align,
|
|
53
|
+
align = _h === void 0 ? 'left' : _h,
|
|
54
|
+
props = __rest(_a, ["isOpen", "direction", "size", "options", "value", "focusedIndex", "maxHeight", "listboxId", "onOptionSelect", "onMouseMove", "isKeyboardNavigation", "onOptionHover", "children", "multiple", "showFooterButtons", "selectAllButtonText", "onSelectAll", "onEdit", "onComplete", "className", "activeDescendantId", "componentType", "align"]);
|
|
53
55
|
if (!isOpen) return null;
|
|
54
56
|
return _jsxs("div", __assign({
|
|
55
57
|
ref: ref,
|
|
56
58
|
className: classNames('ncua-select-dropdown', "ncua-select-dropdown--".concat(direction), "ncua-select-dropdown--".concat(size), {
|
|
57
59
|
'ncua-select-dropdown--multiple': multiple,
|
|
60
|
+
'ncua-select-dropdown--align-right': align === 'right',
|
|
58
61
|
'ncua-select-dropdown--selectbox-single': componentType === 'selectbox' && !multiple
|
|
59
62
|
}, className),
|
|
60
63
|
onMouseMove: onMouseMove,
|
|
@@ -80,7 +83,7 @@ export var SelectDropdown = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
80
83
|
var handleMouseEnter = function () {
|
|
81
84
|
onOptionHover === null || onOptionHover === void 0 ? void 0 : onOptionHover(index);
|
|
82
85
|
};
|
|
83
|
-
return
|
|
86
|
+
return _jsxs("li", __assign({
|
|
84
87
|
id: optionId,
|
|
85
88
|
className: classNames('ncua-select-dropdown__option', {
|
|
86
89
|
'ncua-select-dropdown__option--selected': isSelected,
|
|
@@ -93,11 +96,18 @@ export var SelectDropdown = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
93
96
|
role: "option",
|
|
94
97
|
"aria-selected": isSelected
|
|
95
98
|
}, {
|
|
96
|
-
children: _jsx("span", __assign({
|
|
99
|
+
children: [option.icon && _jsx("span", __assign({
|
|
100
|
+
className: "ncua-select-dropdown__option-icon"
|
|
101
|
+
}, {
|
|
102
|
+
children: _jsx(option.icon, {
|
|
103
|
+
width: 16,
|
|
104
|
+
height: 16
|
|
105
|
+
})
|
|
106
|
+
})), _jsx("span", __assign({
|
|
97
107
|
className: "ncua-select-dropdown__option-text"
|
|
98
108
|
}, {
|
|
99
109
|
children: option.label
|
|
100
|
-
}))
|
|
110
|
+
}))]
|
|
101
111
|
}), option.id);
|
|
102
112
|
}), children]
|
|
103
113
|
}))
|