@ncds/ui-admin 0.0.20 → 0.0.22
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/index.js +33 -0
- package/dist/cjs/src/components/breadcrumb/BreadCrumb.js +67 -0
- package/dist/cjs/src/components/breadcrumb/index.js +16 -0
- package/dist/cjs/src/components/date-picker/index.js +11 -0
- package/dist/cjs/src/components/index.js +33 -0
- package/dist/cjs/src/components/tag/Tag.js +66 -0
- package/dist/cjs/src/components/tag/index.js +16 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/src/components/breadcrumb/BreadCrumb.js +59 -0
- package/dist/esm/src/components/breadcrumb/index.js +1 -0
- package/dist/esm/src/components/date-picker/index.js +2 -1
- package/dist/esm/src/components/index.js +3 -0
- package/dist/esm/src/components/tag/Tag.js +58 -0
- package/dist/esm/src/components/tag/index.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src/components/breadcrumb/BreadCrumb.d.ts +10 -0
- package/dist/types/src/components/breadcrumb/index.d.ts +2 -0
- package/dist/types/src/components/checkbox/Checkbox.d.ts +2 -2
- package/dist/types/src/components/date-picker/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/radio/Radio.d.ts +2 -2
- package/dist/types/src/components/tag/Tag.d.ts +19 -0
- package/dist/types/src/components/tag/index.d.ts +2 -0
- package/dist/types/src/components/toggle/Toggle.d.ts +2 -2
- package/dist/ui-admin/assets/styles/style.css +147 -7
- package/package.json +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -14,6 +14,17 @@ Object.keys(_badge).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
var _breadcrumb = require("./src/components/breadcrumb");
|
|
18
|
+
Object.keys(_breadcrumb).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _breadcrumb[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _breadcrumb[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
17
28
|
var _button = require("./src/components/button");
|
|
18
29
|
Object.keys(_button).forEach(function (key) {
|
|
19
30
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -58,6 +69,17 @@ Object.keys(_datePicker).forEach(function (key) {
|
|
|
58
69
|
}
|
|
59
70
|
});
|
|
60
71
|
});
|
|
72
|
+
var _dropdown = require("./src/components/dropdown");
|
|
73
|
+
Object.keys(_dropdown).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _dropdown[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _dropdown[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
61
83
|
var _input = require("./src/components/input");
|
|
62
84
|
Object.keys(_input).forEach(function (key) {
|
|
63
85
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -146,6 +168,17 @@ Object.keys(_spinner).forEach(function (key) {
|
|
|
146
168
|
}
|
|
147
169
|
});
|
|
148
170
|
});
|
|
171
|
+
var _tag = require("./src/components/tag");
|
|
172
|
+
Object.keys(_tag).forEach(function (key) {
|
|
173
|
+
if (key === "default" || key === "__esModule") return;
|
|
174
|
+
if (key in exports && exports[key] === _tag[key]) return;
|
|
175
|
+
Object.defineProperty(exports, key, {
|
|
176
|
+
enumerable: true,
|
|
177
|
+
get: function () {
|
|
178
|
+
return _tag[key];
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
});
|
|
149
182
|
var _toggle = require("./src/components/toggle");
|
|
150
183
|
Object.keys(_toggle).forEach(function (key) {
|
|
151
184
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BreadCrumb = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _uiAdminIcon = _interopRequireDefault(require("@ncds/ui-admin-icon"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
12
|
+
__assign = Object.assign || function (t) {
|
|
13
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
14
|
+
s = arguments[i];
|
|
15
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
16
|
+
}
|
|
17
|
+
return t;
|
|
18
|
+
};
|
|
19
|
+
return __assign.apply(this, arguments);
|
|
20
|
+
};
|
|
21
|
+
var BreadcrumbItem = function (_a) {
|
|
22
|
+
var href = _a.href,
|
|
23
|
+
children = _a.children;
|
|
24
|
+
var ElementType = href ? 'a' : 'span';
|
|
25
|
+
return (0, _jsxRuntime.jsx)(ElementType, __assign({
|
|
26
|
+
href: href,
|
|
27
|
+
className: "ncua-breadcrumb__item"
|
|
28
|
+
}, {
|
|
29
|
+
children: children
|
|
30
|
+
}));
|
|
31
|
+
};
|
|
32
|
+
var BreadCrumb = function (_a) {
|
|
33
|
+
var items = _a.items,
|
|
34
|
+
className = _a.className;
|
|
35
|
+
if (!items || items.length === 0) return null;
|
|
36
|
+
var renderItem = function (item, index) {
|
|
37
|
+
var isLast = index === items.length - 1;
|
|
38
|
+
var content = index === 0 ? (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
|
|
39
|
+
name: "home-01",
|
|
40
|
+
width: 16,
|
|
41
|
+
height: 16,
|
|
42
|
+
color: "gray500"
|
|
43
|
+
}) : item.label;
|
|
44
|
+
return (0, _jsxRuntime.jsx)("li", __assign({
|
|
45
|
+
className: (0, _classnames.default)('ncua-breadcrumb__list-item', {
|
|
46
|
+
'ncua-breadcrumb__list-item--active': isLast
|
|
47
|
+
})
|
|
48
|
+
}, {
|
|
49
|
+
children: (0, _jsxRuntime.jsx)(BreadcrumbItem, __assign({
|
|
50
|
+
href: !isLast ? item.href : undefined
|
|
51
|
+
}, {
|
|
52
|
+
children: content
|
|
53
|
+
}))
|
|
54
|
+
}), index);
|
|
55
|
+
};
|
|
56
|
+
return (0, _jsxRuntime.jsx)("nav", __assign({
|
|
57
|
+
"aria-label": "breadcrumb",
|
|
58
|
+
className: (0, _classnames.default)('ncua-breadcrumb', className)
|
|
59
|
+
}, {
|
|
60
|
+
children: (0, _jsxRuntime.jsx)("ol", __assign({
|
|
61
|
+
className: "ncua-breadcrumb__list"
|
|
62
|
+
}, {
|
|
63
|
+
children: items.map(renderItem)
|
|
64
|
+
}))
|
|
65
|
+
}));
|
|
66
|
+
};
|
|
67
|
+
exports.BreadCrumb = BreadCrumb;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _BreadCrumb = require("./BreadCrumb");
|
|
7
|
+
Object.keys(_BreadCrumb).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _BreadCrumb[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _BreadCrumb[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -24,4 +24,15 @@ Object.keys(_RangeDatePicker).forEach(function (key) {
|
|
|
24
24
|
return _RangeDatePicker[key];
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
+
});
|
|
28
|
+
var _utils = require("./utils");
|
|
29
|
+
Object.keys(_utils).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _utils[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _utils[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
27
38
|
});
|
|
@@ -14,6 +14,17 @@ Object.keys(_badge).forEach(function (key) {
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
|
+
var _breadcrumb = require("./breadcrumb");
|
|
18
|
+
Object.keys(_breadcrumb).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _breadcrumb[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _breadcrumb[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
17
28
|
var _button = require("./button");
|
|
18
29
|
Object.keys(_button).forEach(function (key) {
|
|
19
30
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -58,6 +69,17 @@ Object.keys(_datePicker).forEach(function (key) {
|
|
|
58
69
|
}
|
|
59
70
|
});
|
|
60
71
|
});
|
|
72
|
+
var _dropdown = require("./dropdown");
|
|
73
|
+
Object.keys(_dropdown).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _dropdown[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _dropdown[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
61
83
|
var _input = require("./input");
|
|
62
84
|
Object.keys(_input).forEach(function (key) {
|
|
63
85
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -124,6 +146,17 @@ Object.keys(_spinner).forEach(function (key) {
|
|
|
124
146
|
}
|
|
125
147
|
});
|
|
126
148
|
});
|
|
149
|
+
var _tag = require("./tag");
|
|
150
|
+
Object.keys(_tag).forEach(function (key) {
|
|
151
|
+
if (key === "default" || key === "__esModule") return;
|
|
152
|
+
if (key in exports && exports[key] === _tag[key]) return;
|
|
153
|
+
Object.defineProperty(exports, key, {
|
|
154
|
+
enumerable: true,
|
|
155
|
+
get: function () {
|
|
156
|
+
return _tag[key];
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
});
|
|
127
160
|
var _toggle = require("./toggle");
|
|
128
161
|
Object.keys(_toggle).forEach(function (key) {
|
|
129
162
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Tag = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _uiAdminIcon = _interopRequireDefault(require("@ncds/ui-admin-icon"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _color = require("../../../constant/color");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
13
|
+
__assign = Object.assign || function (t) {
|
|
14
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
15
|
+
s = arguments[i];
|
|
16
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
17
|
+
}
|
|
18
|
+
return t;
|
|
19
|
+
};
|
|
20
|
+
return __assign.apply(this, arguments);
|
|
21
|
+
};
|
|
22
|
+
var Tag = function (_a) {
|
|
23
|
+
var _b = _a.size,
|
|
24
|
+
size = _b === void 0 ? 'sm' : _b,
|
|
25
|
+
icon = _a.icon,
|
|
26
|
+
text = _a.text,
|
|
27
|
+
count = _a.count,
|
|
28
|
+
close = _a.close,
|
|
29
|
+
onButtonClick = _a.onButtonClick;
|
|
30
|
+
var closeSize = {
|
|
31
|
+
sm: 14,
|
|
32
|
+
md: 16
|
|
33
|
+
};
|
|
34
|
+
return (0, _jsxRuntime.jsxs)("span", __assign({
|
|
35
|
+
className: (0, _classnames.default)('ncua-tag', "ncua-tag--".concat(size), {
|
|
36
|
+
'ncua-tag--dot': (icon === null || icon === void 0 ? void 0 : icon.name) === 'dot'
|
|
37
|
+
})
|
|
38
|
+
}, {
|
|
39
|
+
children: [icon && icon.name !== 'dot' && (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
|
|
40
|
+
name: icon.name,
|
|
41
|
+
width: 16,
|
|
42
|
+
height: 16,
|
|
43
|
+
color: icon.color
|
|
44
|
+
}), (0, _jsxRuntime.jsx)("span", __assign({
|
|
45
|
+
className: "ncua-tag__text"
|
|
46
|
+
}, {
|
|
47
|
+
children: text
|
|
48
|
+
})), count && (0, _jsxRuntime.jsx)("span", __assign({
|
|
49
|
+
className: "ncua-tag__count"
|
|
50
|
+
}, {
|
|
51
|
+
children: count
|
|
52
|
+
})), close && (0, _jsxRuntime.jsx)("button", __assign({
|
|
53
|
+
type: "button",
|
|
54
|
+
className: "ncua-tag__close",
|
|
55
|
+
onClick: onButtonClick
|
|
56
|
+
}, {
|
|
57
|
+
children: (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
|
|
58
|
+
name: "x-close",
|
|
59
|
+
color: _color.COLOR.gray300,
|
|
60
|
+
width: closeSize[size],
|
|
61
|
+
height: closeSize[size]
|
|
62
|
+
})
|
|
63
|
+
}))]
|
|
64
|
+
}));
|
|
65
|
+
};
|
|
66
|
+
exports.Tag = Tag;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _Tag = require("./Tag");
|
|
7
|
+
Object.keys(_Tag).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _Tag[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _Tag[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './src/components/badge';
|
|
2
|
+
export * from './src/components/breadcrumb';
|
|
2
3
|
export * from './src/components/button';
|
|
3
4
|
export * from './src/components/carousel';
|
|
4
5
|
export * from './src/components/checkbox';
|
|
5
6
|
export * from './src/components/date-picker';
|
|
7
|
+
export * from './src/components/dropdown';
|
|
6
8
|
export * from './src/components/input';
|
|
7
9
|
export * from './src/components/pagination';
|
|
8
10
|
export * from './src/components/radio';
|
|
@@ -11,6 +13,7 @@ export * from './src/components/shared/hintText';
|
|
|
11
13
|
export * from './src/components/shared/label';
|
|
12
14
|
export * from './src/components/shared';
|
|
13
15
|
export * from './src/components/spinner';
|
|
16
|
+
export * from './src/components/tag';
|
|
14
17
|
export * from './src/components/toggle';
|
|
15
18
|
export * from './src/components/tooltip';
|
|
16
19
|
export * from './src/components';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
return __assign.apply(this, arguments);
|
|
10
|
+
};
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import Icon from '@ncds/ui-admin-icon';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
var BreadcrumbItem = function (_a) {
|
|
15
|
+
var href = _a.href,
|
|
16
|
+
children = _a.children;
|
|
17
|
+
var ElementType = href ? 'a' : 'span';
|
|
18
|
+
return _jsx(ElementType, __assign({
|
|
19
|
+
href: href,
|
|
20
|
+
className: "ncua-breadcrumb__item"
|
|
21
|
+
}, {
|
|
22
|
+
children: children
|
|
23
|
+
}));
|
|
24
|
+
};
|
|
25
|
+
export var BreadCrumb = function (_a) {
|
|
26
|
+
var items = _a.items,
|
|
27
|
+
className = _a.className;
|
|
28
|
+
if (!items || items.length === 0) return null;
|
|
29
|
+
var renderItem = function (item, index) {
|
|
30
|
+
var isLast = index === items.length - 1;
|
|
31
|
+
var content = index === 0 ? _jsx(Icon, {
|
|
32
|
+
name: "home-01",
|
|
33
|
+
width: 16,
|
|
34
|
+
height: 16,
|
|
35
|
+
color: "gray500"
|
|
36
|
+
}) : item.label;
|
|
37
|
+
return _jsx("li", __assign({
|
|
38
|
+
className: classNames('ncua-breadcrumb__list-item', {
|
|
39
|
+
'ncua-breadcrumb__list-item--active': isLast
|
|
40
|
+
})
|
|
41
|
+
}, {
|
|
42
|
+
children: _jsx(BreadcrumbItem, __assign({
|
|
43
|
+
href: !isLast ? item.href : undefined
|
|
44
|
+
}, {
|
|
45
|
+
children: content
|
|
46
|
+
}))
|
|
47
|
+
}), index);
|
|
48
|
+
};
|
|
49
|
+
return _jsx("nav", __assign({
|
|
50
|
+
"aria-label": "breadcrumb",
|
|
51
|
+
className: classNames('ncua-breadcrumb', className)
|
|
52
|
+
}, {
|
|
53
|
+
children: _jsx("ol", __assign({
|
|
54
|
+
className: "ncua-breadcrumb__list"
|
|
55
|
+
}, {
|
|
56
|
+
children: items.map(renderItem)
|
|
57
|
+
}))
|
|
58
|
+
}));
|
|
59
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BreadCrumb';
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
export * from './badge';
|
|
2
|
+
export * from './breadcrumb';
|
|
2
3
|
export * from './button';
|
|
3
4
|
export * from './carousel';
|
|
4
5
|
export * from './checkbox';
|
|
5
6
|
export * from './date-picker';
|
|
7
|
+
export * from './dropdown';
|
|
6
8
|
export * from './input';
|
|
7
9
|
export * from './pagination';
|
|
8
10
|
export * from './radio';
|
|
9
11
|
export * from './select';
|
|
10
12
|
export * from './shared';
|
|
11
13
|
export * from './spinner';
|
|
14
|
+
export * from './tag';
|
|
12
15
|
export * from './toggle';
|
|
13
16
|
export * from './tooltip';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var __assign = this && this.__assign || function () {
|
|
2
|
+
__assign = Object.assign || function (t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
6
|
+
}
|
|
7
|
+
return t;
|
|
8
|
+
};
|
|
9
|
+
return __assign.apply(this, arguments);
|
|
10
|
+
};
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import Icon from '@ncds/ui-admin-icon';
|
|
13
|
+
import classNames from 'classnames';
|
|
14
|
+
import { COLOR } from '../../../constant/color';
|
|
15
|
+
export var Tag = function (_a) {
|
|
16
|
+
var _b = _a.size,
|
|
17
|
+
size = _b === void 0 ? 'sm' : _b,
|
|
18
|
+
icon = _a.icon,
|
|
19
|
+
text = _a.text,
|
|
20
|
+
count = _a.count,
|
|
21
|
+
close = _a.close,
|
|
22
|
+
onButtonClick = _a.onButtonClick;
|
|
23
|
+
var closeSize = {
|
|
24
|
+
sm: 14,
|
|
25
|
+
md: 16
|
|
26
|
+
};
|
|
27
|
+
return _jsxs("span", __assign({
|
|
28
|
+
className: classNames('ncua-tag', "ncua-tag--".concat(size), {
|
|
29
|
+
'ncua-tag--dot': (icon === null || icon === void 0 ? void 0 : icon.name) === 'dot'
|
|
30
|
+
})
|
|
31
|
+
}, {
|
|
32
|
+
children: [icon && icon.name !== 'dot' && _jsx(Icon, {
|
|
33
|
+
name: icon.name,
|
|
34
|
+
width: 16,
|
|
35
|
+
height: 16,
|
|
36
|
+
color: icon.color
|
|
37
|
+
}), _jsx("span", __assign({
|
|
38
|
+
className: "ncua-tag__text"
|
|
39
|
+
}, {
|
|
40
|
+
children: text
|
|
41
|
+
})), count && _jsx("span", __assign({
|
|
42
|
+
className: "ncua-tag__count"
|
|
43
|
+
}, {
|
|
44
|
+
children: count
|
|
45
|
+
})), close && _jsx("button", __assign({
|
|
46
|
+
type: "button",
|
|
47
|
+
className: "ncua-tag__close",
|
|
48
|
+
onClick: onButtonClick
|
|
49
|
+
}, {
|
|
50
|
+
children: _jsx(Icon, {
|
|
51
|
+
name: "x-close",
|
|
52
|
+
color: COLOR.gray300,
|
|
53
|
+
width: closeSize[size],
|
|
54
|
+
height: closeSize[size]
|
|
55
|
+
})
|
|
56
|
+
}))]
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tag';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
export * from './src/components/badge';
|
|
2
|
+
export * from './src/components/breadcrumb';
|
|
2
3
|
export * from './src/components/button';
|
|
3
4
|
export * from './src/components/carousel';
|
|
4
5
|
export * from './src/components/checkbox';
|
|
5
6
|
export * from './src/components/date-picker';
|
|
7
|
+
export * from './src/components/dropdown';
|
|
6
8
|
export * from './src/components/input';
|
|
7
9
|
export * from './src/components/pagination';
|
|
8
10
|
export * from './src/components/radio';
|
|
@@ -11,6 +13,7 @@ export * from './src/components/shared/hintText';
|
|
|
11
13
|
export * from './src/components/shared/label';
|
|
12
14
|
export * from './src/components/shared';
|
|
13
15
|
export * from './src/components/spinner';
|
|
16
|
+
export * from './src/components/tag';
|
|
14
17
|
export * from './src/components/toggle';
|
|
15
18
|
export * from './src/components/tooltip';
|
|
16
19
|
export * from './src/components';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface BreadcrumbItemProps {
|
|
2
|
+
href?: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
export interface BreadcrumbProps {
|
|
6
|
+
items: BreadcrumbItemProps[];
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const BreadCrumb: ({ items, className }: BreadcrumbProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
//# sourceMappingURL=BreadCrumb.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent,
|
|
1
|
+
import { ChangeEvent, MutableRefObject, ReactNode, RefCallback } from 'react';
|
|
2
2
|
import { CheckboxInputProps } from './CheckboxInput';
|
|
3
3
|
export interface CheckboxProps extends Omit<CheckboxInputProps, 'type'> {
|
|
4
4
|
text?: ReactNode;
|
|
@@ -6,5 +6,5 @@ export interface CheckboxProps extends Omit<CheckboxInputProps, 'type'> {
|
|
|
6
6
|
checkboxRef?: RefCallback<HTMLInputElement> | MutableRefObject<HTMLInputElement | null>;
|
|
7
7
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const Checkbox:
|
|
9
|
+
export declare const Checkbox: ({ size, indeterminate, text, supportText, disabled, checked, className, checkboxRef, onChange, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
export * from './badge';
|
|
2
|
+
export * from './breadcrumb';
|
|
2
3
|
export * from './button';
|
|
3
4
|
export * from './carousel';
|
|
4
5
|
export * from './checkbox';
|
|
5
6
|
export * from './date-picker';
|
|
7
|
+
export * from './dropdown';
|
|
6
8
|
export * from './input';
|
|
7
9
|
export * from './pagination';
|
|
8
10
|
export * from './radio';
|
|
9
11
|
export * from './select';
|
|
10
12
|
export * from './shared';
|
|
11
13
|
export * from './spinner';
|
|
14
|
+
export * from './tag';
|
|
12
15
|
export * from './toggle';
|
|
13
16
|
export * from './tooltip';
|
|
14
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent,
|
|
1
|
+
import { ChangeEvent, MutableRefObject, ReactNode, RefCallback } from 'react';
|
|
2
2
|
import { RadioInputProps } from './RadioInput';
|
|
3
3
|
export interface RadioProps extends Omit<RadioInputProps, 'type'> {
|
|
4
4
|
text?: ReactNode;
|
|
@@ -6,5 +6,5 @@ export interface RadioProps extends Omit<RadioInputProps, 'type'> {
|
|
|
6
6
|
radioRef?: RefCallback<HTMLInputElement> | MutableRefObject<HTMLInputElement | null>;
|
|
7
7
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare const Radio:
|
|
9
|
+
export declare const Radio: ({ size, text, supportText, disabled, checked, className, radioRef, onChange, ...props }: RadioProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconName } from '@ncds/ui-admin-icon';
|
|
2
|
+
import { FC, MouseEventHandler } from 'react';
|
|
3
|
+
import { COLOR } from '../../../constant/color';
|
|
4
|
+
import { Size } from '../../../constant/size';
|
|
5
|
+
type TagIcon = {
|
|
6
|
+
name: IconName | 'dot';
|
|
7
|
+
color?: keyof typeof COLOR;
|
|
8
|
+
};
|
|
9
|
+
interface TagProps {
|
|
10
|
+
size?: Extract<Size, 'sm' | 'md'>;
|
|
11
|
+
icon?: TagIcon;
|
|
12
|
+
text: string;
|
|
13
|
+
count?: string;
|
|
14
|
+
close?: boolean;
|
|
15
|
+
onButtonClick?: MouseEventHandler<HTMLButtonElement>;
|
|
16
|
+
}
|
|
17
|
+
export declare const Tag: FC<TagProps>;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=Tag.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChangeEvent, ComponentPropsWithRef
|
|
1
|
+
import { ChangeEvent, ComponentPropsWithRef } from 'react';
|
|
2
2
|
export interface ToggleProps extends Omit<ComponentPropsWithRef<'input'>, 'size'> {
|
|
3
3
|
size?: 'sm' | 'md';
|
|
4
4
|
text?: string;
|
|
@@ -7,5 +7,5 @@ export interface ToggleProps extends Omit<ComponentPropsWithRef<'input'>, 'size'
|
|
|
7
7
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const Toggle:
|
|
10
|
+
export declare const Toggle: ({ size, text, supportText, disabled, onChange, className, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
//# sourceMappingURL=Toggle.d.ts.map
|
|
@@ -68,8 +68,6 @@
|
|
|
68
68
|
--shadow-xl: 0px 20px 24px -4px #10182814, 0px 8px 8px -4px #10182808;
|
|
69
69
|
--shadow-2xl: 0px 24px 48px -12px #1018282e;
|
|
70
70
|
--shadow-3xl: 0px 32px 64px -12px #10182824;
|
|
71
|
-
--box-shadow-xs: 0px 1px 2px 0px #1018280d;
|
|
72
|
-
--box-shadow-lg: 0px 4px 6px -2px #10182808, 0px 12px 16px -4px #10182814;
|
|
73
71
|
--font-families-commerce-sans: Commerce Sans;
|
|
74
72
|
--line-heights-display-xl: 76px;
|
|
75
73
|
--line-heights-display-lg: 60px;
|
|
@@ -783,14 +781,13 @@ button {
|
|
|
783
781
|
cursor: pointer;
|
|
784
782
|
font-size: var(--font-size-xs);
|
|
785
783
|
font-weight: var(--font-weights-commerce-sans-1);
|
|
786
|
-
color: var(--gray-
|
|
787
|
-
box-shadow: var(--
|
|
784
|
+
color: var(--gray-700);
|
|
785
|
+
box-shadow: var(--shadow-xs);
|
|
788
786
|
}
|
|
789
787
|
.ncua-dropdown__menu {
|
|
790
788
|
position: absolute;
|
|
791
789
|
top: calc(100% + 4px);
|
|
792
790
|
left: 0;
|
|
793
|
-
z-index: 1000;
|
|
794
791
|
min-width: 240px;
|
|
795
792
|
background-color: var(--base-white);
|
|
796
793
|
border-radius: 8px;
|
|
@@ -814,12 +811,11 @@ button {
|
|
|
814
811
|
.ncua-dropdown__header .ncua-dropdown__avatar {
|
|
815
812
|
width: 32px;
|
|
816
813
|
height: 32px;
|
|
817
|
-
border-radius:
|
|
814
|
+
border-radius: 50%;
|
|
818
815
|
overflow: hidden;
|
|
819
816
|
display: flex;
|
|
820
817
|
align-items: center;
|
|
821
818
|
justify-content: center;
|
|
822
|
-
background-color: var(--gray-900);
|
|
823
819
|
}
|
|
824
820
|
.ncua-dropdown__header .ncua-dropdown__avatar img {
|
|
825
821
|
width: 100%;
|
|
@@ -1282,6 +1278,79 @@ button {
|
|
|
1282
1278
|
transform: translateY(3px);
|
|
1283
1279
|
}
|
|
1284
1280
|
|
|
1281
|
+
.ncua-tag {
|
|
1282
|
+
display: inline-flex;
|
|
1283
|
+
align-items: center;
|
|
1284
|
+
border-radius: 6px;
|
|
1285
|
+
border: 1px solid var(--gray-200);
|
|
1286
|
+
color: var(--gray-500);
|
|
1287
|
+
line-height: 1.5;
|
|
1288
|
+
font-weight: var(--font-weights-commerce-sans-1);
|
|
1289
|
+
background-color: var(--base-white);
|
|
1290
|
+
vertical-align: top;
|
|
1291
|
+
overflow: hidden;
|
|
1292
|
+
}
|
|
1293
|
+
.ncua-tag--sm {
|
|
1294
|
+
font-size: var(--font-size-xxs);
|
|
1295
|
+
padding: 2px 8px;
|
|
1296
|
+
line-height: 14px;
|
|
1297
|
+
}
|
|
1298
|
+
.ncua-tag--md {
|
|
1299
|
+
font-size: var(--font-size-sm);
|
|
1300
|
+
padding: 1px 9px;
|
|
1301
|
+
line-height: 22px;
|
|
1302
|
+
}
|
|
1303
|
+
.ncua-tag__text {
|
|
1304
|
+
overflow: hidden;
|
|
1305
|
+
display: block;
|
|
1306
|
+
text-overflow: ellipsis;
|
|
1307
|
+
white-space: nowrap;
|
|
1308
|
+
word-wrap: break-word;
|
|
1309
|
+
}
|
|
1310
|
+
.ncua-tag > svg {
|
|
1311
|
+
margin-right: 4px;
|
|
1312
|
+
}
|
|
1313
|
+
.ncua-tag--dot .ncua-tag__text {
|
|
1314
|
+
position: relative;
|
|
1315
|
+
padding-left: 12px;
|
|
1316
|
+
}
|
|
1317
|
+
.ncua-tag--dot .ncua-tag__text::before {
|
|
1318
|
+
position: absolute;
|
|
1319
|
+
top: 50%;
|
|
1320
|
+
left: 0;
|
|
1321
|
+
content: "";
|
|
1322
|
+
transform: translateY(-50%);
|
|
1323
|
+
width: 6px;
|
|
1324
|
+
height: 6px;
|
|
1325
|
+
background-color: var(--primary-red-500);
|
|
1326
|
+
border-radius: 50%;
|
|
1327
|
+
}
|
|
1328
|
+
.ncua-tag__count {
|
|
1329
|
+
display: inline-flex;
|
|
1330
|
+
align-items: center;
|
|
1331
|
+
min-width: 16px;
|
|
1332
|
+
height: 16px;
|
|
1333
|
+
margin-left: 6px;
|
|
1334
|
+
margin-right: -5px;
|
|
1335
|
+
padding: 0 5px;
|
|
1336
|
+
background-color: var(--gray-100);
|
|
1337
|
+
border-radius: 3px;
|
|
1338
|
+
text-align: center;
|
|
1339
|
+
}
|
|
1340
|
+
.ncua-tag__count + .ncua-tag__close {
|
|
1341
|
+
margin-left: 6px;
|
|
1342
|
+
}
|
|
1343
|
+
.ncua-tag__close {
|
|
1344
|
+
margin-left: 3px;
|
|
1345
|
+
margin-right: -5px;
|
|
1346
|
+
padding: 0;
|
|
1347
|
+
display: inline-flex;
|
|
1348
|
+
align-items: center;
|
|
1349
|
+
cursor: pointer;
|
|
1350
|
+
background-color: transparent;
|
|
1351
|
+
border: none;
|
|
1352
|
+
}
|
|
1353
|
+
|
|
1285
1354
|
.ncua-tooltip {
|
|
1286
1355
|
position: relative;
|
|
1287
1356
|
font-size: 12px;
|
|
@@ -1863,6 +1932,8 @@ button {
|
|
|
1863
1932
|
.ncua-date-picker .flatpickr-calendar {
|
|
1864
1933
|
max-height: none;
|
|
1865
1934
|
padding-block-start: 12px;
|
|
1935
|
+
border-radius: 8px;
|
|
1936
|
+
box-shadow: 1px 0 0 var(--gray-200), -1px 0 0 var(--gray-200), 0 1px 0 var(--gray-200), 0 -1px 0 var(--gray-200), 0 3px 13px rgba(0, 0, 0, 0.08);
|
|
1866
1937
|
}
|
|
1867
1938
|
.ncua-date-picker .flatpickr-calendar::before, .ncua-date-picker .flatpickr-calendar::after {
|
|
1868
1939
|
content: none;
|
|
@@ -1891,6 +1962,15 @@ button {
|
|
|
1891
1962
|
width: 36px;
|
|
1892
1963
|
height: 36px;
|
|
1893
1964
|
}
|
|
1965
|
+
.ncua-date-picker .flatpickr-months .flatpickr-prev-month:hover,
|
|
1966
|
+
.ncua-date-picker .flatpickr-months .flatpickr-next-month:hover {
|
|
1967
|
+
border-radius: 6px;
|
|
1968
|
+
background-color: var(--gray-50);
|
|
1969
|
+
}
|
|
1970
|
+
.ncua-date-picker .flatpickr-months .flatpickr-prev-month:hover svg,
|
|
1971
|
+
.ncua-date-picker .flatpickr-months .flatpickr-next-month:hover svg {
|
|
1972
|
+
fill: initial;
|
|
1973
|
+
}
|
|
1894
1974
|
.ncua-date-picker .flatpickr-months .flatpickr-month {
|
|
1895
1975
|
overflow: visible;
|
|
1896
1976
|
flex: none;
|
|
@@ -1988,6 +2068,9 @@ button {
|
|
|
1988
2068
|
.ncua-date-picker--disabled .ncua-date-picker__input {
|
|
1989
2069
|
color: var(--gray-300);
|
|
1990
2070
|
}
|
|
2071
|
+
.ncua-date-picker--md .flatpickr-current-month .flatpickr-monthDropdown-months, .ncua-date-picker--md .numInputWrapper .cur-year {
|
|
2072
|
+
font-size: var(--font-size-md);
|
|
2073
|
+
}
|
|
1991
2074
|
|
|
1992
2075
|
.ncua-range-date-picker {
|
|
1993
2076
|
display: inline-flex;
|
|
@@ -2050,6 +2133,63 @@ button {
|
|
|
2050
2133
|
height: 16px;
|
|
2051
2134
|
}
|
|
2052
2135
|
|
|
2136
|
+
.ncua-breadcrumb {
|
|
2137
|
+
display: flex;
|
|
2138
|
+
align-items: center;
|
|
2139
|
+
font-size: var(--font-size-sm);
|
|
2140
|
+
}
|
|
2141
|
+
.ncua-breadcrumb__list {
|
|
2142
|
+
display: flex;
|
|
2143
|
+
flex-wrap: wrap;
|
|
2144
|
+
align-items: center;
|
|
2145
|
+
gap: 20px;
|
|
2146
|
+
padding: 0;
|
|
2147
|
+
margin: 0;
|
|
2148
|
+
list-style: none;
|
|
2149
|
+
}
|
|
2150
|
+
.ncua-breadcrumb__list-item {
|
|
2151
|
+
position: relative;
|
|
2152
|
+
display: flex;
|
|
2153
|
+
align-items: center;
|
|
2154
|
+
height: 28px;
|
|
2155
|
+
padding: 4px 8px;
|
|
2156
|
+
color: var(--gray-400);
|
|
2157
|
+
font-weight: var(--font-weights-commerce-sans-1);
|
|
2158
|
+
cursor: pointer;
|
|
2159
|
+
}
|
|
2160
|
+
.ncua-breadcrumb__list-item--active {
|
|
2161
|
+
color: var(--gray-600);
|
|
2162
|
+
}
|
|
2163
|
+
.ncua-breadcrumb__list-item:hover:not(:first-child):not(:last-child) {
|
|
2164
|
+
color: var(--gray-600);
|
|
2165
|
+
background-color: var(--gray-100);
|
|
2166
|
+
border-radius: 4px;
|
|
2167
|
+
}
|
|
2168
|
+
.ncua-breadcrumb__list-item:not(:last-child)::after {
|
|
2169
|
+
content: "";
|
|
2170
|
+
position: absolute;
|
|
2171
|
+
right: -18px;
|
|
2172
|
+
top: 50%;
|
|
2173
|
+
transform: translateY(-50%);
|
|
2174
|
+
display: inline-block;
|
|
2175
|
+
width: 16px;
|
|
2176
|
+
height: 16px;
|
|
2177
|
+
background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="none"%3E%3Cpath d="M6 12L10 8L6 4" stroke="%23D3D4D8" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/%3E%3C/svg%3E');
|
|
2178
|
+
background-repeat: no-repeat;
|
|
2179
|
+
background-position: center;
|
|
2180
|
+
}
|
|
2181
|
+
.ncua-breadcrumb__item {
|
|
2182
|
+
display: flex;
|
|
2183
|
+
align-items: center;
|
|
2184
|
+
color: inherit;
|
|
2185
|
+
text-decoration: none;
|
|
2186
|
+
transition: color 0.2s ease;
|
|
2187
|
+
}
|
|
2188
|
+
.ncua-breadcrumb__item:hover {
|
|
2189
|
+
color: inherit;
|
|
2190
|
+
text-decoration: none;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2053
2193
|
.ncua-badge {
|
|
2054
2194
|
display: inline-flex;
|
|
2055
2195
|
align-items: center;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ncds/ui-admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.22",
|
|
4
4
|
"description": "nhn-commerce의 어드민 디자인 시스템입니다.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"barrel": "node barrel.js",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@ncds/types-common": "^1.0.0",
|
|
64
64
|
"@ncds/types-layout": "^1.0.0",
|
|
65
|
-
"@ncds/ui-admin-icon": "0.0.
|
|
65
|
+
"@ncds/ui-admin-icon": "0.0.16",
|
|
66
66
|
"classnames": "^2.3.2",
|
|
67
67
|
"react-flatpickr": "^4.0.10",
|
|
68
68
|
"swiper": "^11.1.1"
|