@ncds/ui-admin 1.8.3 → 1.8.4
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/index.js +33 -0
- package/dist/cjs/src/components/layout/block-container/BlockContainer.js +38 -0
- package/dist/cjs/src/components/layout/block-container/index.js +16 -0
- package/dist/cjs/src/components/layout/block-header/BlockHeader.js +107 -0
- package/dist/cjs/src/components/layout/block-header/SubTitle.js +56 -0
- package/dist/cjs/src/components/layout/block-header/index.js +27 -0
- package/dist/cjs/src/components/layout/page-title/PageTitle.js +95 -0
- package/dist/cjs/src/components/layout/page-title/index.js +16 -0
- package/dist/esm/src/components/index.js +3 -0
- package/dist/esm/src/components/layout/block-container/BlockContainer.js +31 -0
- package/dist/esm/src/components/layout/block-container/index.js +1 -0
- package/dist/esm/src/components/layout/block-header/BlockHeader.js +100 -0
- package/dist/esm/src/components/layout/block-header/SubTitle.js +49 -0
- package/dist/esm/src/components/layout/block-header/index.js +2 -0
- package/dist/esm/src/components/layout/page-title/PageTitle.js +88 -0
- package/dist/esm/src/components/layout/page-title/index.js +1 -0
- package/dist/temp/src/components/index.d.ts +3 -0
- package/dist/temp/src/components/index.js +3 -0
- package/dist/temp/src/components/layout/block-container/BlockContainer.d.ts +19 -0
- package/dist/temp/src/components/layout/block-container/BlockContainer.js +11 -0
- package/dist/temp/src/components/layout/block-container/index.d.ts +1 -0
- package/dist/temp/src/components/layout/block-container/index.js +1 -0
- package/dist/temp/src/components/layout/block-header/BlockHeader.d.ts +23 -0
- package/dist/temp/src/components/layout/block-header/BlockHeader.js +21 -0
- package/dist/temp/src/components/layout/block-header/SubTitle.d.ts +19 -0
- package/dist/temp/src/components/layout/block-header/SubTitle.js +8 -0
- package/dist/temp/src/components/layout/block-header/index.d.ts +2 -0
- package/dist/temp/src/components/layout/block-header/index.js +2 -0
- package/dist/temp/src/components/layout/page-title/PageTitle.d.ts +22 -0
- package/dist/temp/src/components/layout/page-title/PageTitle.js +19 -0
- package/dist/temp/src/components/layout/page-title/index.d.ts +1 -0
- package/dist/temp/src/components/layout/page-title/index.js +1 -0
- package/dist/types/src/components/index.d.ts +3 -0
- package/dist/types/src/components/layout/block-container/BlockContainer.d.ts +19 -0
- package/dist/types/src/components/layout/block-container/index.d.ts +1 -0
- package/dist/types/src/components/layout/block-header/BlockHeader.d.ts +23 -0
- package/dist/types/src/components/layout/block-header/SubTitle.d.ts +19 -0
- package/dist/types/src/components/layout/block-header/index.d.ts +2 -0
- package/dist/types/src/components/layout/page-title/PageTitle.d.ts +22 -0
- package/dist/types/src/components/layout/page-title/index.d.ts +1 -0
- package/dist/ui-admin/assets/styles/style.css +292 -0
- package/package.json +1 -1
|
@@ -355,6 +355,28 @@ Object.keys(_featuredIcon).forEach(function (key) {
|
|
|
355
355
|
}
|
|
356
356
|
});
|
|
357
357
|
});
|
|
358
|
+
var _blockContainer = require("./layout/block-container");
|
|
359
|
+
Object.keys(_blockContainer).forEach(function (key) {
|
|
360
|
+
if (key === "default" || key === "__esModule") return;
|
|
361
|
+
if (key in exports && exports[key] === _blockContainer[key]) return;
|
|
362
|
+
Object.defineProperty(exports, key, {
|
|
363
|
+
enumerable: true,
|
|
364
|
+
get: function () {
|
|
365
|
+
return _blockContainer[key];
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
var _blockHeader = require("./layout/block-header");
|
|
370
|
+
Object.keys(_blockHeader).forEach(function (key) {
|
|
371
|
+
if (key === "default" || key === "__esModule") return;
|
|
372
|
+
if (key in exports && exports[key] === _blockHeader[key]) return;
|
|
373
|
+
Object.defineProperty(exports, key, {
|
|
374
|
+
enumerable: true,
|
|
375
|
+
get: function () {
|
|
376
|
+
return _blockHeader[key];
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
});
|
|
358
380
|
var _divider = require("./layout/divider");
|
|
359
381
|
Object.keys(_divider).forEach(function (key) {
|
|
360
382
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -366,6 +388,17 @@ Object.keys(_divider).forEach(function (key) {
|
|
|
366
388
|
}
|
|
367
389
|
});
|
|
368
390
|
});
|
|
391
|
+
var _pageTitle = require("./layout/page-title");
|
|
392
|
+
Object.keys(_pageTitle).forEach(function (key) {
|
|
393
|
+
if (key === "default" || key === "__esModule") return;
|
|
394
|
+
if (key in exports && exports[key] === _pageTitle[key]) return;
|
|
395
|
+
Object.defineProperty(exports, key, {
|
|
396
|
+
enumerable: true,
|
|
397
|
+
get: function () {
|
|
398
|
+
return _pageTitle[key];
|
|
399
|
+
}
|
|
400
|
+
});
|
|
401
|
+
});
|
|
369
402
|
var _breadCrumb = require("./navigation/bread-crumb");
|
|
370
403
|
Object.keys(_breadCrumb).forEach(function (key) {
|
|
371
404
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BlockContainer = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
const BlockContainerBase = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
children,
|
|
13
|
+
className,
|
|
14
|
+
...rest
|
|
15
|
+
} = _ref;
|
|
16
|
+
return (0, _jsxRuntime.jsx)("section", {
|
|
17
|
+
className: (0, _classnames.default)('ncua-block-container', className),
|
|
18
|
+
...rest,
|
|
19
|
+
children: children
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
BlockContainerBase.displayName = 'BlockContainer';
|
|
23
|
+
const Body = _ref2 => {
|
|
24
|
+
let {
|
|
25
|
+
children,
|
|
26
|
+
className,
|
|
27
|
+
...rest
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return (0, _jsxRuntime.jsx)("div", {
|
|
30
|
+
className: (0, _classnames.default)('ncua-block-container__body', className),
|
|
31
|
+
...rest,
|
|
32
|
+
children: children
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
Body.displayName = 'BlockContainer.Body';
|
|
36
|
+
const BlockContainer = exports.BlockContainer = Object.assign(BlockContainerBase, {
|
|
37
|
+
Body
|
|
38
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _BlockContainer = require("./BlockContainer");
|
|
7
|
+
Object.keys(_BlockContainer).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _BlockContainer[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _BlockContainer[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BlockHeader = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _uiAdminIcon = require("@ncds/ui-admin-icon");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _Tooltip = require("../../overlays/tooltip/Tooltip");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const ICON_SIZE = 24;
|
|
13
|
+
const CollapsibleButton = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
expanded,
|
|
16
|
+
onToggle
|
|
17
|
+
} = _ref;
|
|
18
|
+
return (0, _jsxRuntime.jsx)("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
className: "ncua-block-header__collapsible-btn",
|
|
21
|
+
onClick: onToggle,
|
|
22
|
+
"aria-expanded": expanded,
|
|
23
|
+
children: expanded ? (0, _jsxRuntime.jsx)(_uiAdminIcon.ChevronUp, {
|
|
24
|
+
width: ICON_SIZE,
|
|
25
|
+
height: ICON_SIZE,
|
|
26
|
+
color: "var(--gray-300)"
|
|
27
|
+
}) : (0, _jsxRuntime.jsx)(_uiAdminIcon.ChevronDown, {
|
|
28
|
+
width: ICON_SIZE,
|
|
29
|
+
height: ICON_SIZE,
|
|
30
|
+
color: "var(--gray-300)"
|
|
31
|
+
})
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
const BlockHeader = _ref2 => {
|
|
35
|
+
let {
|
|
36
|
+
title,
|
|
37
|
+
tooltip,
|
|
38
|
+
action,
|
|
39
|
+
showDivider = true,
|
|
40
|
+
badge,
|
|
41
|
+
description,
|
|
42
|
+
collapsible,
|
|
43
|
+
showRequiredNotice = false,
|
|
44
|
+
controlStrip,
|
|
45
|
+
children,
|
|
46
|
+
className,
|
|
47
|
+
...rest
|
|
48
|
+
} = _ref2;
|
|
49
|
+
const hasColumnLayout = !!description;
|
|
50
|
+
const hasTabChildren = !!children;
|
|
51
|
+
const hasControlStrip = !!controlStrip;
|
|
52
|
+
const isCollapsed = !!collapsible && !collapsible.expanded;
|
|
53
|
+
return (0, _jsxRuntime.jsxs)("header", {
|
|
54
|
+
className: (0, _classnames.default)('ncua-block-header', {
|
|
55
|
+
'ncua-block-header--column': hasColumnLayout,
|
|
56
|
+
'ncua-block-header--no-divider': !showDivider || hasTabChildren || isCollapsed,
|
|
57
|
+
'ncua-block-header--has-tab': hasTabChildren && !isCollapsed,
|
|
58
|
+
'ncua-block-header--has-control-strip': hasControlStrip,
|
|
59
|
+
'ncua-block-header--is-required': showRequiredNotice
|
|
60
|
+
}, className),
|
|
61
|
+
...rest,
|
|
62
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
63
|
+
className: "ncua-block-header__row",
|
|
64
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
65
|
+
className: "ncua-block-header__title-area",
|
|
66
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
67
|
+
className: "ncua-block-header__title",
|
|
68
|
+
children: title
|
|
69
|
+
}), tooltip && (0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
70
|
+
content: tooltip,
|
|
71
|
+
size: "sm",
|
|
72
|
+
position: "top",
|
|
73
|
+
hideArrow: true,
|
|
74
|
+
iconType: "fill"
|
|
75
|
+
}), badge && (0, _jsxRuntime.jsx)("span", {
|
|
76
|
+
className: "ncua-block-header__badge",
|
|
77
|
+
children: badge
|
|
78
|
+
})]
|
|
79
|
+
}), (0, _jsxRuntime.jsxs)("div", {
|
|
80
|
+
className: "ncua-block-header__action-area",
|
|
81
|
+
children: [showRequiredNotice && (0, _jsxRuntime.jsxs)("span", {
|
|
82
|
+
className: "ncua-block-header__required-notice",
|
|
83
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
84
|
+
className: "ncua-block-header__required-notice--red",
|
|
85
|
+
children: "* \uB294 \uD544\uC218 \uC785\uB825"
|
|
86
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
87
|
+
className: "ncua-block-header__required-notice--gray",
|
|
88
|
+
children: " \uD56D\uBAA9\uC785\uB2C8\uB2E4."
|
|
89
|
+
})]
|
|
90
|
+
}), action, collapsible && (0, _jsxRuntime.jsx)(CollapsibleButton, {
|
|
91
|
+
...collapsible
|
|
92
|
+
})]
|
|
93
|
+
})]
|
|
94
|
+
}), hasColumnLayout && (0, _jsxRuntime.jsx)("p", {
|
|
95
|
+
className: "ncua-block-header__description",
|
|
96
|
+
children: description
|
|
97
|
+
}), hasControlStrip && (0, _jsxRuntime.jsx)("div", {
|
|
98
|
+
className: "ncua-block-header__control-strip",
|
|
99
|
+
children: controlStrip
|
|
100
|
+
}), hasTabChildren && !isCollapsed && (0, _jsxRuntime.jsx)("div", {
|
|
101
|
+
className: "ncua-block-header__tabs",
|
|
102
|
+
children: children
|
|
103
|
+
})]
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
exports.BlockHeader = BlockHeader;
|
|
107
|
+
BlockHeader.displayName = 'BlockHeader';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SubTitle = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _Tooltip = require("../../overlays/tooltip/Tooltip");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const SubTitle = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
title,
|
|
14
|
+
size = 'sm',
|
|
15
|
+
tooltip,
|
|
16
|
+
description,
|
|
17
|
+
error,
|
|
18
|
+
action,
|
|
19
|
+
required = false,
|
|
20
|
+
className,
|
|
21
|
+
...rest
|
|
22
|
+
} = _ref;
|
|
23
|
+
return (0, _jsxRuntime.jsxs)("div", {
|
|
24
|
+
className: (0, _classnames.default)('ncua-sub-title', `ncua-sub-title--${size}`, className),
|
|
25
|
+
...rest,
|
|
26
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
27
|
+
className: "ncua-sub-title__title-row",
|
|
28
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
29
|
+
className: "ncua-sub-title__title-area",
|
|
30
|
+
children: [required && (0, _jsxRuntime.jsx)("span", {
|
|
31
|
+
className: "ncua-sub-title__required-marker",
|
|
32
|
+
children: "*"
|
|
33
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
34
|
+
className: "ncua-sub-title__title",
|
|
35
|
+
children: title
|
|
36
|
+
}), tooltip && (0, _jsxRuntime.jsx)(_Tooltip.Tooltip, {
|
|
37
|
+
content: tooltip,
|
|
38
|
+
size: "sm",
|
|
39
|
+
position: "right",
|
|
40
|
+
hideArrow: true
|
|
41
|
+
})]
|
|
42
|
+
}), action && (0, _jsxRuntime.jsx)("div", {
|
|
43
|
+
className: "ncua-sub-title__action",
|
|
44
|
+
children: action
|
|
45
|
+
})]
|
|
46
|
+
}), description && (0, _jsxRuntime.jsx)("p", {
|
|
47
|
+
className: "ncua-sub-title__description",
|
|
48
|
+
children: description
|
|
49
|
+
}), error && (0, _jsxRuntime.jsx)("p", {
|
|
50
|
+
className: "ncua-sub-title__error",
|
|
51
|
+
children: error
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
exports.SubTitle = SubTitle;
|
|
56
|
+
SubTitle.displayName = 'BlockHeader.SubTitle';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _BlockHeader = require("./BlockHeader");
|
|
7
|
+
Object.keys(_BlockHeader).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _BlockHeader[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _BlockHeader[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _SubTitle = require("./SubTitle");
|
|
18
|
+
Object.keys(_SubTitle).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _SubTitle[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _SubTitle[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PageTitle = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _uiAdminIcon = require("@ncds/ui-admin-icon");
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _Button = require("../../action/button/Button");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
const renderBreadcrumb = items => (0, _jsxRuntime.jsx)("nav", {
|
|
14
|
+
className: "ncua-page-title__breadcrumb",
|
|
15
|
+
"aria-label": "breadcrumb",
|
|
16
|
+
children: items.map((item, i) =>
|
|
17
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: breadcrumb items may have duplicate labels
|
|
18
|
+
(0, _jsxRuntime.jsx)(_react.Fragment, {
|
|
19
|
+
children: i < items.length - 1 ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
20
|
+
children: [(0, _jsxRuntime.jsx)("span", {
|
|
21
|
+
className: "ncua-page-title__breadcrumb-item",
|
|
22
|
+
children: item.href ? (0, _jsxRuntime.jsx)("a", {
|
|
23
|
+
href: item.href,
|
|
24
|
+
children: item.label
|
|
25
|
+
}) : item.label
|
|
26
|
+
}), (0, _jsxRuntime.jsx)(_uiAdminIcon.ChevronRight, {
|
|
27
|
+
className: "ncua-page-title__breadcrumb-separator"
|
|
28
|
+
})]
|
|
29
|
+
}) : (0, _jsxRuntime.jsx)("span", {
|
|
30
|
+
className: "ncua-page-title__breadcrumb-current",
|
|
31
|
+
children: item.label
|
|
32
|
+
})
|
|
33
|
+
}, i))
|
|
34
|
+
});
|
|
35
|
+
const renderBackButton = onBack => (0, _jsxRuntime.jsx)(_Button.Button, {
|
|
36
|
+
label: "",
|
|
37
|
+
hierarchy: "secondary-gray",
|
|
38
|
+
size: "xs",
|
|
39
|
+
onlyIcon: true,
|
|
40
|
+
leadingIcon: {
|
|
41
|
+
type: 'icon',
|
|
42
|
+
icon: _uiAdminIcon.ChevronLeft
|
|
43
|
+
},
|
|
44
|
+
onClick: onBack,
|
|
45
|
+
"aria-label": "\uC774\uC804 \uD398\uC774\uC9C0\uB85C \uB3CC\uC544\uAC00\uAE30",
|
|
46
|
+
className: "ncua-page-title__back-btn"
|
|
47
|
+
});
|
|
48
|
+
const PageTitle = _ref => {
|
|
49
|
+
let {
|
|
50
|
+
title,
|
|
51
|
+
variant = 'default',
|
|
52
|
+
breadcrumbItems,
|
|
53
|
+
onBack,
|
|
54
|
+
guideButton,
|
|
55
|
+
primaryAction,
|
|
56
|
+
secondaryAction,
|
|
57
|
+
className,
|
|
58
|
+
...rest
|
|
59
|
+
} = _ref;
|
|
60
|
+
const isFixed = variant === 'fixed' || variant === 'fixed-detail';
|
|
61
|
+
const isDetail = variant === 'detail' || variant === 'fixed-detail';
|
|
62
|
+
const hasBreadcrumb = !isFixed && breadcrumbItems && breadcrumbItems.length > 0;
|
|
63
|
+
return (0, _jsxRuntime.jsx)("header", {
|
|
64
|
+
className: (0, _classnames.default)('ncua-page-title', {
|
|
65
|
+
'ncua-page-title--fixed': isFixed
|
|
66
|
+
}, className),
|
|
67
|
+
...rest,
|
|
68
|
+
children: (0, _jsxRuntime.jsx)("div", {
|
|
69
|
+
className: "ncua-page-title__page-header",
|
|
70
|
+
children: (0, _jsxRuntime.jsxs)("div", {
|
|
71
|
+
className: (0, _classnames.default)('ncua-page-title__header', {
|
|
72
|
+
'ncua-page-title__header--has-breadcrumb': hasBreadcrumb
|
|
73
|
+
}),
|
|
74
|
+
children: [(0, _jsxRuntime.jsxs)("div", {
|
|
75
|
+
className: "ncua-page-title__container",
|
|
76
|
+
children: [hasBreadcrumb && renderBreadcrumb(breadcrumbItems), (0, _jsxRuntime.jsxs)("div", {
|
|
77
|
+
className: "ncua-page-title__title-row",
|
|
78
|
+
children: [isDetail && onBack && renderBackButton(onBack), (0, _jsxRuntime.jsx)("h1", {
|
|
79
|
+
className: "ncua-page-title__title",
|
|
80
|
+
children: title
|
|
81
|
+
}), guideButton && (0, _jsxRuntime.jsx)("div", {
|
|
82
|
+
className: "ncua-page-title__guide-btn",
|
|
83
|
+
children: guideButton
|
|
84
|
+
})]
|
|
85
|
+
})]
|
|
86
|
+
}), (secondaryAction || primaryAction) && (0, _jsxRuntime.jsxs)("div", {
|
|
87
|
+
className: "ncua-page-title__actions",
|
|
88
|
+
children: [secondaryAction, primaryAction]
|
|
89
|
+
})]
|
|
90
|
+
})
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
exports.PageTitle = PageTitle;
|
|
95
|
+
PageTitle.displayName = 'PageTitle';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _PageTitle = require("./PageTitle");
|
|
7
|
+
Object.keys(_PageTitle).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _PageTitle[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _PageTitle[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -36,7 +36,10 @@ export * from './forms-and-input/toggle';
|
|
|
36
36
|
export * from './image-and-icons/dot';
|
|
37
37
|
export * from './image-and-icons/featured-icon';
|
|
38
38
|
// Layout
|
|
39
|
+
export * from './layout/block-container';
|
|
40
|
+
export * from './layout/block-header';
|
|
39
41
|
export * from './layout/divider';
|
|
42
|
+
export * from './layout/page-title';
|
|
40
43
|
// Navigation
|
|
41
44
|
export * from './navigation/bread-crumb';
|
|
42
45
|
export * from './navigation/horizontal-tab';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
const BlockContainerBase = _ref => {
|
|
4
|
+
let {
|
|
5
|
+
children,
|
|
6
|
+
className,
|
|
7
|
+
...rest
|
|
8
|
+
} = _ref;
|
|
9
|
+
return _jsx("section", {
|
|
10
|
+
className: classNames('ncua-block-container', className),
|
|
11
|
+
...rest,
|
|
12
|
+
children: children
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
BlockContainerBase.displayName = 'BlockContainer';
|
|
16
|
+
const Body = _ref2 => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
...rest
|
|
21
|
+
} = _ref2;
|
|
22
|
+
return _jsx("div", {
|
|
23
|
+
className: classNames('ncua-block-container__body', className),
|
|
24
|
+
...rest,
|
|
25
|
+
children: children
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
Body.displayName = 'BlockContainer.Body';
|
|
29
|
+
export const BlockContainer = Object.assign(BlockContainerBase, {
|
|
30
|
+
Body
|
|
31
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './BlockContainer';
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ChevronDown, ChevronUp } from '@ncds/ui-admin-icon';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Tooltip } from '../../overlays/tooltip/Tooltip';
|
|
5
|
+
const ICON_SIZE = 24;
|
|
6
|
+
const CollapsibleButton = _ref => {
|
|
7
|
+
let {
|
|
8
|
+
expanded,
|
|
9
|
+
onToggle
|
|
10
|
+
} = _ref;
|
|
11
|
+
return _jsx("button", {
|
|
12
|
+
type: "button",
|
|
13
|
+
className: "ncua-block-header__collapsible-btn",
|
|
14
|
+
onClick: onToggle,
|
|
15
|
+
"aria-expanded": expanded,
|
|
16
|
+
children: expanded ? _jsx(ChevronUp, {
|
|
17
|
+
width: ICON_SIZE,
|
|
18
|
+
height: ICON_SIZE,
|
|
19
|
+
color: "var(--gray-300)"
|
|
20
|
+
}) : _jsx(ChevronDown, {
|
|
21
|
+
width: ICON_SIZE,
|
|
22
|
+
height: ICON_SIZE,
|
|
23
|
+
color: "var(--gray-300)"
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
const BlockHeader = _ref2 => {
|
|
28
|
+
let {
|
|
29
|
+
title,
|
|
30
|
+
tooltip,
|
|
31
|
+
action,
|
|
32
|
+
showDivider = true,
|
|
33
|
+
badge,
|
|
34
|
+
description,
|
|
35
|
+
collapsible,
|
|
36
|
+
showRequiredNotice = false,
|
|
37
|
+
controlStrip,
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
...rest
|
|
41
|
+
} = _ref2;
|
|
42
|
+
const hasColumnLayout = !!description;
|
|
43
|
+
const hasTabChildren = !!children;
|
|
44
|
+
const hasControlStrip = !!controlStrip;
|
|
45
|
+
const isCollapsed = !!collapsible && !collapsible.expanded;
|
|
46
|
+
return _jsxs("header", {
|
|
47
|
+
className: classNames('ncua-block-header', {
|
|
48
|
+
'ncua-block-header--column': hasColumnLayout,
|
|
49
|
+
'ncua-block-header--no-divider': !showDivider || hasTabChildren || isCollapsed,
|
|
50
|
+
'ncua-block-header--has-tab': hasTabChildren && !isCollapsed,
|
|
51
|
+
'ncua-block-header--has-control-strip': hasControlStrip,
|
|
52
|
+
'ncua-block-header--is-required': showRequiredNotice
|
|
53
|
+
}, className),
|
|
54
|
+
...rest,
|
|
55
|
+
children: [_jsxs("div", {
|
|
56
|
+
className: "ncua-block-header__row",
|
|
57
|
+
children: [_jsxs("div", {
|
|
58
|
+
className: "ncua-block-header__title-area",
|
|
59
|
+
children: [_jsx("span", {
|
|
60
|
+
className: "ncua-block-header__title",
|
|
61
|
+
children: title
|
|
62
|
+
}), tooltip && _jsx(Tooltip, {
|
|
63
|
+
content: tooltip,
|
|
64
|
+
size: "sm",
|
|
65
|
+
position: "top",
|
|
66
|
+
hideArrow: true,
|
|
67
|
+
iconType: "fill"
|
|
68
|
+
}), badge && _jsx("span", {
|
|
69
|
+
className: "ncua-block-header__badge",
|
|
70
|
+
children: badge
|
|
71
|
+
})]
|
|
72
|
+
}), _jsxs("div", {
|
|
73
|
+
className: "ncua-block-header__action-area",
|
|
74
|
+
children: [showRequiredNotice && _jsxs("span", {
|
|
75
|
+
className: "ncua-block-header__required-notice",
|
|
76
|
+
children: [_jsx("span", {
|
|
77
|
+
className: "ncua-block-header__required-notice--red",
|
|
78
|
+
children: "* \uB294 \uD544\uC218 \uC785\uB825"
|
|
79
|
+
}), _jsx("span", {
|
|
80
|
+
className: "ncua-block-header__required-notice--gray",
|
|
81
|
+
children: " \uD56D\uBAA9\uC785\uB2C8\uB2E4."
|
|
82
|
+
})]
|
|
83
|
+
}), action, collapsible && _jsx(CollapsibleButton, {
|
|
84
|
+
...collapsible
|
|
85
|
+
})]
|
|
86
|
+
})]
|
|
87
|
+
}), hasColumnLayout && _jsx("p", {
|
|
88
|
+
className: "ncua-block-header__description",
|
|
89
|
+
children: description
|
|
90
|
+
}), hasControlStrip && _jsx("div", {
|
|
91
|
+
className: "ncua-block-header__control-strip",
|
|
92
|
+
children: controlStrip
|
|
93
|
+
}), hasTabChildren && !isCollapsed && _jsx("div", {
|
|
94
|
+
className: "ncua-block-header__tabs",
|
|
95
|
+
children: children
|
|
96
|
+
})]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
BlockHeader.displayName = 'BlockHeader';
|
|
100
|
+
export { BlockHeader };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import classNames from 'classnames';
|
|
3
|
+
import { Tooltip } from '../../overlays/tooltip/Tooltip';
|
|
4
|
+
const SubTitle = _ref => {
|
|
5
|
+
let {
|
|
6
|
+
title,
|
|
7
|
+
size = 'sm',
|
|
8
|
+
tooltip,
|
|
9
|
+
description,
|
|
10
|
+
error,
|
|
11
|
+
action,
|
|
12
|
+
required = false,
|
|
13
|
+
className,
|
|
14
|
+
...rest
|
|
15
|
+
} = _ref;
|
|
16
|
+
return _jsxs("div", {
|
|
17
|
+
className: classNames('ncua-sub-title', `ncua-sub-title--${size}`, className),
|
|
18
|
+
...rest,
|
|
19
|
+
children: [_jsxs("div", {
|
|
20
|
+
className: "ncua-sub-title__title-row",
|
|
21
|
+
children: [_jsxs("div", {
|
|
22
|
+
className: "ncua-sub-title__title-area",
|
|
23
|
+
children: [required && _jsx("span", {
|
|
24
|
+
className: "ncua-sub-title__required-marker",
|
|
25
|
+
children: "*"
|
|
26
|
+
}), _jsx("span", {
|
|
27
|
+
className: "ncua-sub-title__title",
|
|
28
|
+
children: title
|
|
29
|
+
}), tooltip && _jsx(Tooltip, {
|
|
30
|
+
content: tooltip,
|
|
31
|
+
size: "sm",
|
|
32
|
+
position: "right",
|
|
33
|
+
hideArrow: true
|
|
34
|
+
})]
|
|
35
|
+
}), action && _jsx("div", {
|
|
36
|
+
className: "ncua-sub-title__action",
|
|
37
|
+
children: action
|
|
38
|
+
})]
|
|
39
|
+
}), description && _jsx("p", {
|
|
40
|
+
className: "ncua-sub-title__description",
|
|
41
|
+
children: description
|
|
42
|
+
}), error && _jsx("p", {
|
|
43
|
+
className: "ncua-sub-title__error",
|
|
44
|
+
children: error
|
|
45
|
+
})]
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
SubTitle.displayName = 'BlockHeader.SubTitle';
|
|
49
|
+
export { SubTitle };
|