@ncds/ui-admin 0.0.22 → 0.0.23

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.
Files changed (94) hide show
  1. package/dist/cjs/assets/scripts/index.js +11 -0
  2. package/dist/cjs/assets/scripts/slider.js +341 -0
  3. package/dist/cjs/index.js +0 -33
  4. package/dist/cjs/src/components/button/Button.js +15 -7
  5. package/dist/cjs/src/components/button/ButtonGroup.js +1 -1
  6. package/dist/cjs/src/components/date-picker/index.js +0 -11
  7. package/dist/cjs/src/components/divider/Divider.js +43 -0
  8. package/dist/cjs/src/components/divider/index.js +16 -0
  9. package/dist/cjs/src/components/empty-state/EmptyState.js +58 -0
  10. package/dist/cjs/src/components/empty-state/index.js +16 -0
  11. package/dist/cjs/src/components/featured-icon/FeaturedIcon.js +79 -0
  12. package/dist/cjs/src/components/featured-icon/index.js +16 -0
  13. package/dist/cjs/src/components/index.js +81 -4
  14. package/dist/cjs/src/components/modal/Modal.js +193 -0
  15. package/dist/cjs/src/components/modal/index.js +12 -0
  16. package/dist/cjs/src/components/notification/FloatingNotification.js +104 -0
  17. package/dist/cjs/src/components/notification/FullWidthNotification.js +112 -0
  18. package/dist/cjs/src/components/notification/Notification.js +66 -0
  19. package/dist/cjs/src/components/notification/index.js +38 -0
  20. package/dist/cjs/src/components/pagination/NavButton.js +6 -4
  21. package/dist/cjs/src/components/pagination/Pagination.js +4 -19
  22. package/dist/cjs/src/components/progress-bar/ProgressBar.js +57 -0
  23. package/dist/cjs/src/components/progress-bar/index.js +16 -0
  24. package/dist/cjs/src/components/progress-circle/ProgressCircle.js +121 -0
  25. package/dist/cjs/src/components/progress-circle/index.js +16 -0
  26. package/dist/cjs/src/components/slider/Slider.js +64 -0
  27. package/dist/cjs/src/components/slider/index.js +16 -0
  28. package/dist/cjs/src/components/tab/HorizontalTab.js +77 -0
  29. package/dist/cjs/src/components/tab/TabButton.js +76 -0
  30. package/dist/cjs/src/components/tab/VerticalTab.js +75 -0
  31. package/dist/cjs/src/components/tab/index.js +38 -0
  32. package/dist/esm/assets/scripts/index.js +2 -1
  33. package/dist/esm/assets/scripts/slider.js +336 -0
  34. package/dist/esm/index.js +0 -3
  35. package/dist/esm/src/components/button/Button.js +14 -6
  36. package/dist/esm/src/components/button/ButtonGroup.js +1 -1
  37. package/dist/esm/src/components/date-picker/index.js +1 -2
  38. package/dist/esm/src/components/divider/Divider.js +36 -0
  39. package/dist/esm/src/components/divider/index.js +1 -0
  40. package/dist/esm/src/components/empty-state/EmptyState.js +51 -0
  41. package/dist/esm/src/components/empty-state/index.js +1 -0
  42. package/dist/esm/src/components/featured-icon/FeaturedIcon.js +72 -0
  43. package/dist/esm/src/components/featured-icon/index.js +1 -0
  44. package/dist/esm/src/components/index.js +8 -1
  45. package/dist/esm/src/components/modal/Modal.js +185 -0
  46. package/dist/esm/src/components/modal/index.js +1 -0
  47. package/dist/esm/src/components/notification/FloatingNotification.js +97 -0
  48. package/dist/esm/src/components/notification/FullWidthNotification.js +105 -0
  49. package/dist/esm/src/components/notification/Notification.js +59 -0
  50. package/dist/esm/src/components/notification/index.js +3 -0
  51. package/dist/esm/src/components/pagination/NavButton.js +6 -4
  52. package/dist/esm/src/components/pagination/Pagination.js +4 -19
  53. package/dist/esm/src/components/progress-bar/ProgressBar.js +50 -0
  54. package/dist/esm/src/components/progress-bar/index.js +1 -0
  55. package/dist/esm/src/components/progress-circle/ProgressCircle.js +114 -0
  56. package/dist/esm/src/components/progress-circle/index.js +1 -0
  57. package/dist/esm/src/components/slider/Slider.js +57 -0
  58. package/dist/esm/src/components/slider/index.js +1 -0
  59. package/dist/esm/src/components/tab/HorizontalTab.js +69 -0
  60. package/dist/esm/src/components/tab/TabButton.js +68 -0
  61. package/dist/esm/src/components/tab/VerticalTab.js +67 -0
  62. package/dist/esm/src/components/tab/index.js +3 -0
  63. package/dist/types/assets/scripts/index.d.ts +1 -0
  64. package/dist/types/assets/scripts/slider.d.ts +42 -0
  65. package/dist/types/index.d.ts +0 -3
  66. package/dist/types/src/components/button/Button.d.ts +2 -1
  67. package/dist/types/src/components/button/ButtonGroup.d.ts +6 -5
  68. package/dist/types/src/components/date-picker/index.d.ts +0 -1
  69. package/dist/types/src/components/divider/Divider.d.ts +11 -0
  70. package/dist/types/src/components/divider/index.d.ts +2 -0
  71. package/dist/types/src/components/empty-state/EmptyState.d.ts +14 -0
  72. package/dist/types/src/components/empty-state/index.d.ts +2 -0
  73. package/dist/types/src/components/featured-icon/FeaturedIcon.d.ts +14 -0
  74. package/dist/types/src/components/featured-icon/index.d.ts +2 -0
  75. package/dist/types/src/components/index.d.ts +8 -1
  76. package/dist/types/src/components/modal/Modal.d.ts +75 -0
  77. package/dist/types/src/components/modal/index.d.ts +3 -0
  78. package/dist/types/src/components/notification/FloatingNotification.d.ts +32 -0
  79. package/dist/types/src/components/notification/FullWidthNotification.d.ts +32 -0
  80. package/dist/types/src/components/notification/Notification.d.ts +59 -0
  81. package/dist/types/src/components/notification/index.d.ts +4 -0
  82. package/dist/types/src/components/pagination/NavButton.d.ts +2 -2
  83. package/dist/types/src/components/progress-bar/ProgressBar.d.ts +7 -0
  84. package/dist/types/src/components/progress-bar/index.d.ts +2 -0
  85. package/dist/types/src/components/progress-circle/ProgressCircle.d.ts +8 -0
  86. package/dist/types/src/components/progress-circle/index.d.ts +2 -0
  87. package/dist/types/src/components/slider/Slider.d.ts +15 -0
  88. package/dist/types/src/components/slider/index.d.ts +2 -0
  89. package/dist/types/src/components/tab/HorizontalTab.d.ts +12 -0
  90. package/dist/types/src/components/tab/TabButton.d.ts +26 -0
  91. package/dist/types/src/components/tab/VerticalTab.d.ts +10 -0
  92. package/dist/types/src/components/tab/index.d.ts +4 -0
  93. package/dist/ui-admin/assets/styles/style.css +1249 -97
  94. package/package.json +1 -1
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FeaturedIcon = 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 _react = require("react");
11
+ var _color = require("../../../constant/color");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ var __assign = void 0 && (void 0).__assign || function () {
14
+ __assign = Object.assign || function (t) {
15
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
16
+ s = arguments[i];
17
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
18
+ }
19
+ return t;
20
+ };
21
+ return __assign.apply(this, arguments);
22
+ };
23
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
24
+ var t = {};
25
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ };
31
+ var iconSizeMap = {
32
+ sm: 16,
33
+ md: 20,
34
+ lg: 24,
35
+ xl: 28
36
+ };
37
+ var iconStrokeColorMap = {
38
+ neutral: 'gray700',
39
+ error: 'red500',
40
+ warning: 'orange500',
41
+ success: 'green600'
42
+ };
43
+ var FeaturedIcon = exports.FeaturedIcon = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
44
+ var name = _a.name,
45
+ _b = _a.theme,
46
+ theme = _b === void 0 ? 'light-circle' : _b,
47
+ _c = _a.color,
48
+ color = _c === void 0 ? 'neutral' : _c,
49
+ _d = _a.size,
50
+ size = _d === void 0 ? 'md' : _d,
51
+ className = _a.className,
52
+ rest = __rest(_a, ["name", "theme", "color", "size", "className"]);
53
+ var getIconColor = function () {
54
+ if (theme === 'dark-circle') {
55
+ return 'white';
56
+ }
57
+ if (theme === 'square-outline') {
58
+ return 'gray700';
59
+ }
60
+ return iconStrokeColorMap[color];
61
+ };
62
+ return (0, _jsxRuntime.jsxs)("div", __assign({
63
+ ref: ref,
64
+ className: (0, _classnames.default)('ncua-featured-icon', "ncua-featured-icon--".concat(theme), "ncua-featured-icon--".concat(color), "ncua-featured-icon--".concat(size), className)
65
+ }, rest, {
66
+ children: [theme === 'outline-circle' && (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
67
+ children: [(0, _jsxRuntime.jsx)("div", {
68
+ className: "ncua-featured-icon__outline ncua-featured-icon__outline--inner"
69
+ }), (0, _jsxRuntime.jsx)("div", {
70
+ className: "ncua-featured-icon__outline ncua-featured-icon__outline--outer"
71
+ })]
72
+ }), (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
73
+ name: name,
74
+ width: iconSizeMap[size],
75
+ height: iconSizeMap[size],
76
+ color: _color.COLOR[getIconColor()]
77
+ })]
78
+ }));
79
+ });
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _FeaturedIcon = require("./FeaturedIcon");
7
+ Object.keys(_FeaturedIcon).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _FeaturedIcon[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _FeaturedIcon[key];
14
+ }
15
+ });
16
+ });
@@ -69,14 +69,36 @@ Object.keys(_datePicker).forEach(function (key) {
69
69
  }
70
70
  });
71
71
  });
72
- var _dropdown = require("./dropdown");
73
- Object.keys(_dropdown).forEach(function (key) {
72
+ var _featuredIcon = require("./featured-icon");
73
+ Object.keys(_featuredIcon).forEach(function (key) {
74
74
  if (key === "default" || key === "__esModule") return;
75
- if (key in exports && exports[key] === _dropdown[key]) return;
75
+ if (key in exports && exports[key] === _featuredIcon[key]) return;
76
76
  Object.defineProperty(exports, key, {
77
77
  enumerable: true,
78
78
  get: function () {
79
- return _dropdown[key];
79
+ return _featuredIcon[key];
80
+ }
81
+ });
82
+ });
83
+ var _divider = require("./divider");
84
+ Object.keys(_divider).forEach(function (key) {
85
+ if (key === "default" || key === "__esModule") return;
86
+ if (key in exports && exports[key] === _divider[key]) return;
87
+ Object.defineProperty(exports, key, {
88
+ enumerable: true,
89
+ get: function () {
90
+ return _divider[key];
91
+ }
92
+ });
93
+ });
94
+ var _emptyState = require("./empty-state");
95
+ Object.keys(_emptyState).forEach(function (key) {
96
+ if (key === "default" || key === "__esModule") return;
97
+ if (key in exports && exports[key] === _emptyState[key]) return;
98
+ Object.defineProperty(exports, key, {
99
+ enumerable: true,
100
+ get: function () {
101
+ return _emptyState[key];
80
102
  }
81
103
  });
82
104
  });
@@ -91,6 +113,28 @@ Object.keys(_input).forEach(function (key) {
91
113
  }
92
114
  });
93
115
  });
116
+ var _modal = require("./modal");
117
+ Object.keys(_modal).forEach(function (key) {
118
+ if (key === "default" || key === "__esModule") return;
119
+ if (key in exports && exports[key] === _modal[key]) return;
120
+ Object.defineProperty(exports, key, {
121
+ enumerable: true,
122
+ get: function () {
123
+ return _modal[key];
124
+ }
125
+ });
126
+ });
127
+ var _notification = require("./notification");
128
+ Object.keys(_notification).forEach(function (key) {
129
+ if (key === "default" || key === "__esModule") return;
130
+ if (key in exports && exports[key] === _notification[key]) return;
131
+ Object.defineProperty(exports, key, {
132
+ enumerable: true,
133
+ get: function () {
134
+ return _notification[key];
135
+ }
136
+ });
137
+ });
94
138
  var _pagination = require("./pagination");
95
139
  Object.keys(_pagination).forEach(function (key) {
96
140
  if (key === "default" || key === "__esModule") return;
@@ -102,6 +146,28 @@ Object.keys(_pagination).forEach(function (key) {
102
146
  }
103
147
  });
104
148
  });
149
+ var _progressBar = require("./progress-bar");
150
+ Object.keys(_progressBar).forEach(function (key) {
151
+ if (key === "default" || key === "__esModule") return;
152
+ if (key in exports && exports[key] === _progressBar[key]) return;
153
+ Object.defineProperty(exports, key, {
154
+ enumerable: true,
155
+ get: function () {
156
+ return _progressBar[key];
157
+ }
158
+ });
159
+ });
160
+ var _progressCircle = require("./progress-circle");
161
+ Object.keys(_progressCircle).forEach(function (key) {
162
+ if (key === "default" || key === "__esModule") return;
163
+ if (key in exports && exports[key] === _progressCircle[key]) return;
164
+ Object.defineProperty(exports, key, {
165
+ enumerable: true,
166
+ get: function () {
167
+ return _progressCircle[key];
168
+ }
169
+ });
170
+ });
105
171
  var _radio = require("./radio");
106
172
  Object.keys(_radio).forEach(function (key) {
107
173
  if (key === "default" || key === "__esModule") return;
@@ -146,6 +212,17 @@ Object.keys(_spinner).forEach(function (key) {
146
212
  }
147
213
  });
148
214
  });
215
+ var _tab = require("./tab");
216
+ Object.keys(_tab).forEach(function (key) {
217
+ if (key === "default" || key === "__esModule") return;
218
+ if (key in exports && exports[key] === _tab[key]) return;
219
+ Object.defineProperty(exports, key, {
220
+ enumerable: true,
221
+ get: function () {
222
+ return _tab[key];
223
+ }
224
+ });
225
+ });
149
226
  var _tag = require("./tag");
150
227
  Object.keys(_tag).forEach(function (key) {
151
228
  if (key === "default" || key === "__esModule") return;
@@ -0,0 +1,193 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Modal = void 0;
7
+ var _jsxRuntime = require("react/jsx-runtime");
8
+ var _classnames = _interopRequireDefault(require("classnames"));
9
+ var _react = require("react");
10
+ var _reactDom = _interopRequireDefault(require("react-dom"));
11
+ var _featuredIcon = require("../featured-icon");
12
+ var _uiAdminIcon = _interopRequireDefault(require("@ncds/ui-admin-icon"));
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ var __assign = void 0 && (void 0).__assign || function () {
15
+ __assign = Object.assign || function (t) {
16
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
17
+ s = arguments[i];
18
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
19
+ }
20
+ return t;
21
+ };
22
+ return __assign.apply(this, arguments);
23
+ };
24
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
25
+ var t = {};
26
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
27
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
28
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
29
+ }
30
+ return t;
31
+ };
32
+ var Modal = function (_a) {
33
+ var isOpen = _a.isOpen,
34
+ onClose = _a.onClose,
35
+ children = _a.children,
36
+ _b = _a.size,
37
+ size = _b === void 0 ? 'md' : _b,
38
+ _c = _a.closeOnBackdropClick,
39
+ closeOnBackdropClick = _c === void 0 ? true : _c,
40
+ _d = _a.closeOnEsc,
41
+ closeOnEsc = _d === void 0 ? true : _d,
42
+ className = _a.className,
43
+ restProps = __rest(_a, ["isOpen", "onClose", "children", "size", "closeOnBackdropClick", "closeOnEsc", "className"]);
44
+ var modalRef = (0, _react.useRef)(null);
45
+ var handleBackdropClick = function (e) {
46
+ if (closeOnBackdropClick && e.target === e.currentTarget) {
47
+ onClose();
48
+ }
49
+ };
50
+ (0, _react.useEffect)(function () {
51
+ var handleKeyDown = function (e) {
52
+ if (isOpen && closeOnEsc && e.key === 'Escape') {
53
+ onClose();
54
+ }
55
+ };
56
+ if (isOpen) {
57
+ document.addEventListener('keydown', handleKeyDown);
58
+ document.body.style.overflow = 'hidden';
59
+ }
60
+ return function () {
61
+ document.removeEventListener('keydown', handleKeyDown);
62
+ document.body.style.overflow = '';
63
+ };
64
+ }, [isOpen, closeOnEsc, onClose]);
65
+ if (!isOpen) return null;
66
+ var modalContent = (0, _jsxRuntime.jsx)("div", __assign({
67
+ className: (0, _classnames.default)('ncua-modal-backdrop', className),
68
+ onClick: handleBackdropClick,
69
+ ref: modalRef
70
+ }, restProps, {
71
+ children: (0, _jsxRuntime.jsx)("div", __assign({
72
+ className: (0, _classnames.default)('ncua-modal', "ncua-modal--".concat(size))
73
+ }, {
74
+ children: children
75
+ }))
76
+ }));
77
+ return /*#__PURE__*/_reactDom.default.createPortal(modalContent, document.body);
78
+ };
79
+ exports.Modal = Modal;
80
+ Modal.Header = function (_a) {
81
+ var children = _a.children,
82
+ onClose = _a.onClose,
83
+ featuredIcon = _a.featuredIcon,
84
+ title = _a.title,
85
+ subtitle = _a.subtitle,
86
+ _b = _a.align,
87
+ align = _b === void 0 ? 'left' : _b,
88
+ _c = _a.showDivider,
89
+ showDivider = _c === void 0 ? false : _c,
90
+ _d = _a.hideCloseButton,
91
+ hideCloseButton = _d === void 0 ? false : _d;
92
+ return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
93
+ children: [(0, _jsxRuntime.jsxs)("header", __assign({
94
+ className: (0, _classnames.default)('ncua-modal__header', "ncua-modal__header--".concat(align))
95
+ }, {
96
+ children: [featuredIcon && (0, _jsxRuntime.jsx)(_featuredIcon.FeaturedIcon, {
97
+ name: featuredIcon.name,
98
+ color: featuredIcon.color,
99
+ theme: featuredIcon.theme
100
+ }), (0, _jsxRuntime.jsxs)("div", __assign({
101
+ className: "ncua-modal__title"
102
+ }, {
103
+ children: [(0, _jsxRuntime.jsx)("div", __assign({
104
+ className: "ncua-modal__title-text"
105
+ }, {
106
+ children: title
107
+ })), subtitle && (0, _jsxRuntime.jsx)("div", __assign({
108
+ className: "ncua-modal__title-subtitle"
109
+ }, {
110
+ children: subtitle
111
+ }))]
112
+ })), children, !hideCloseButton && (0, _jsxRuntime.jsx)("button", __assign({
113
+ className: "ncua-modal__close-button",
114
+ onClick: onClose
115
+ }, {
116
+ children: (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
117
+ name: "x"
118
+ })
119
+ }))]
120
+ })), showDivider && (0, _jsxRuntime.jsx)("div", {
121
+ className: "ncua-modal__header-divider"
122
+ })]
123
+ });
124
+ };
125
+ Modal.Content = function (_a) {
126
+ var children = _a.children;
127
+ return (0, _jsxRuntime.jsx)("div", __assign({
128
+ className: "ncua-modal__content"
129
+ }, {
130
+ children: children
131
+ }));
132
+ };
133
+ /**
134
+ * Modal.Actions - The actions area of the modal
135
+ *
136
+ * Examples:
137
+ *
138
+ * 1. Vertical layout (buttons stacked):
139
+ * <Modal.Actions layout="vertical" align="stretch">
140
+ * <Button label="Confirm" onClick={handleConfirm} hierarchy="primary" />
141
+ * <Button label="Cancel" onClick={handleCancel} hierarchy="secondary-gray" />
142
+ * </Modal.Actions>
143
+ *
144
+ * 2. Horizontal layout (buttons side by side):
145
+ * <Modal.Actions layout="horizontal" align="stretch">
146
+ * <Button label="Confirm" onClick={handleConfirm} hierarchy="primary" />
147
+ * <Button label="Cancel" onClick={handleCancel} hierarchy="secondary-gray" />
148
+ * </Modal.Actions>
149
+ *
150
+ * 3. Checkbox layout (checkbox on left, buttons on right):
151
+ * <Modal.Actions layout="checkbox" align="stretch" checkboxContent={
152
+ * <>
153
+ * <Checkbox text="Never show again" />
154
+ * <a href="#">Settings</a>
155
+ * </>
156
+ * }>
157
+ * <Button label="Cancel" onClick={handleCancel} hierarchy="secondary-gray" />
158
+ * <Button label="Confirm" onClick={handleConfirm} hierarchy="primary" />
159
+ * </Modal.Actions>
160
+ */
161
+ Modal.Actions = function (_a) {
162
+ var children = _a.children,
163
+ _b = _a.layout,
164
+ layout = _b === void 0 ? 'vertical' : _b,
165
+ _c = _a.showDivider,
166
+ showDivider = _c === void 0 ? false : _c,
167
+ _d = _a.align,
168
+ align = _d === void 0 ? 'stretch' : _d,
169
+ checkboxContent = _a.checkboxContent;
170
+ return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
171
+ children: [showDivider && (0, _jsxRuntime.jsx)("div", {
172
+ className: "ncua-modal__actions-divider"
173
+ }), (0, _jsxRuntime.jsxs)("div", __assign({
174
+ className: (0, _classnames.default)('ncua-modal__actions-wrapper', {
175
+ 'ncua-modal__actions-wrapper--checkbox': layout === 'checkbox'
176
+ })
177
+ }, {
178
+ children: [layout === 'checkbox' && (0, _jsxRuntime.jsx)("div", __assign({
179
+ className: "ncua-modal__actions-checkbox"
180
+ }, {
181
+ children: (0, _jsxRuntime.jsx)("div", __assign({
182
+ className: "ncua-modal__actions-checkbox-content"
183
+ }, {
184
+ children: checkboxContent
185
+ }))
186
+ })), (0, _jsxRuntime.jsx)("div", __assign({
187
+ className: (0, _classnames.default)('ncua-modal__actions', "ncua-modal__actions--".concat(layout), "ncua-modal__actions--".concat(align))
188
+ }, {
189
+ children: children
190
+ }))]
191
+ }))]
192
+ });
193
+ };
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "Modal", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _Modal.Modal;
10
+ }
11
+ });
12
+ var _Modal = require("./Modal");
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FloatingNotification = void 0;
7
+ var _jsxRuntime = require("react/jsx-runtime");
8
+ var _FeaturedIcon = require("../featured-icon/FeaturedIcon");
9
+ var _uiAdminIcon = _interopRequireDefault(require("@ncds/ui-admin-icon"));
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _react = require("react");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ var __assign = void 0 && (void 0).__assign || function () {
14
+ __assign = Object.assign || function (t) {
15
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
16
+ s = arguments[i];
17
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
18
+ }
19
+ return t;
20
+ };
21
+ return __assign.apply(this, arguments);
22
+ };
23
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
24
+ var t = {};
25
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ };
31
+ var iconNameMap = {
32
+ neutral: 'pin-02',
33
+ error: 'alert-triangle',
34
+ warning: 'alert-circle',
35
+ success: 'check-circle'
36
+ };
37
+ var FloatingNotification = exports.FloatingNotification = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
38
+ var title = _a.title,
39
+ supportingText = _a.supportingText,
40
+ _b = _a.variant,
41
+ variant = _b === void 0 ? 'neutral' : _b,
42
+ onClose = _a.onClose,
43
+ className = _a.className,
44
+ actions = _a.actions,
45
+ rest = __rest(_a, ["title", "supportingText", "variant", "onClose", "className", "actions"]);
46
+ var iconColor = variant;
47
+ var featuredIconProps = {
48
+ name: iconNameMap[variant],
49
+ size: 'sm',
50
+ color: iconColor,
51
+ theme: 'dark-circle'
52
+ };
53
+ return (0, _jsxRuntime.jsxs)("div", __assign({
54
+ ref: ref,
55
+ className: (0, _classnames.default)('ncua-floating-notification', "ncua-floating-notification--".concat(variant), className),
56
+ role: "alert"
57
+ }, rest, {
58
+ children: [(0, _jsxRuntime.jsx)("div", __assign({
59
+ className: "ncua-floating-notification__content"
60
+ }, {
61
+ children: (0, _jsxRuntime.jsxs)("div", __assign({
62
+ className: "ncua-floating-notification__container"
63
+ }, {
64
+ children: [iconNameMap[variant] && (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
65
+ children: [(0, _jsxRuntime.jsx)(_FeaturedIcon.FeaturedIcon, __assign({}, featuredIconProps, {
66
+ className: "ncua-floating-notification__pc-icon"
67
+ })), (0, _jsxRuntime.jsx)(_FeaturedIcon.FeaturedIcon, __assign({}, featuredIconProps, {
68
+ size: "md",
69
+ className: "ncua-floating-notification__mobile-icon"
70
+ }))]
71
+ }), (0, _jsxRuntime.jsxs)("div", __assign({
72
+ className: "ncua-floating-notification__text-container"
73
+ }, {
74
+ children: [(0, _jsxRuntime.jsx)("div", __assign({
75
+ className: "ncua-floating-notification__title-wrapper"
76
+ }, {
77
+ children: (0, _jsxRuntime.jsx)("span", __assign({
78
+ className: "ncua-floating-notification__title"
79
+ }, {
80
+ children: title
81
+ }))
82
+ })), supportingText && (0, _jsxRuntime.jsx)("span", __assign({
83
+ className: "ncua-floating-notification__supporting-text"
84
+ }, {
85
+ children: supportingText
86
+ })), actions && (0, _jsxRuntime.jsx)("div", __assign({
87
+ className: "ncua-floating-notification__actions"
88
+ }, {
89
+ children: actions
90
+ }))]
91
+ }))]
92
+ }))
93
+ })), onClose && (0, _jsxRuntime.jsx)("button", __assign({
94
+ type: "button",
95
+ className: "ncua-floating-notification__close-button",
96
+ onClick: onClose,
97
+ "aria-label": "\uC54C\uB9BC \uB2EB\uAE30"
98
+ }, {
99
+ children: (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
100
+ name: "x"
101
+ })
102
+ }))]
103
+ }));
104
+ });
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.FullWidthNotification = 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 _react = require("react");
11
+ var _color = require("../../../constant/color");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ var __assign = void 0 && (void 0).__assign || function () {
14
+ __assign = Object.assign || function (t) {
15
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
16
+ s = arguments[i];
17
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
18
+ }
19
+ return t;
20
+ };
21
+ return __assign.apply(this, arguments);
22
+ };
23
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
24
+ var t = {};
25
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
26
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
27
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
28
+ }
29
+ return t;
30
+ };
31
+ var iconNameMap = {
32
+ neutral: 'message-chat-square',
33
+ error: 'alert-triangle',
34
+ warning: 'alert-triangle',
35
+ success: 'check-circle'
36
+ };
37
+ var iconColorMap = {
38
+ neutral: 'gray700',
39
+ error: 'red500',
40
+ warning: 'orange500',
41
+ success: 'green600'
42
+ };
43
+ var FullWidthNotification = exports.FullWidthNotification = /*#__PURE__*/(0, _react.forwardRef)(function (_a, ref) {
44
+ var title = _a.title,
45
+ supportingText = _a.supportingText,
46
+ _b = _a.variant,
47
+ variant = _b === void 0 ? 'neutral' : _b,
48
+ onClose = _a.onClose,
49
+ className = _a.className,
50
+ actions = _a.actions,
51
+ rest = __rest(_a, ["title", "supportingText", "variant", "onClose", "className", "actions"]);
52
+ var closeIconSize = {
53
+ width: 20,
54
+ height: 20
55
+ };
56
+ return (0, _jsxRuntime.jsx)("div", __assign({
57
+ ref: ref,
58
+ className: (0, _classnames.default)('ncua-full-width-notification', "ncua-full-width-notification--".concat(variant), className),
59
+ role: "alert"
60
+ }, rest, {
61
+ children: (0, _jsxRuntime.jsx)("div", __assign({
62
+ className: "ncua-full-width-notification__container"
63
+ }, {
64
+ children: (0, _jsxRuntime.jsxs)("div", __assign({
65
+ className: "ncua-full-width-notification__content"
66
+ }, {
67
+ children: [(0, _jsxRuntime.jsxs)("div", __assign({
68
+ className: "ncua-full-width-notification__content-wrapper"
69
+ }, {
70
+ children: [(0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
71
+ name: iconNameMap[variant],
72
+ width: 16,
73
+ height: 16,
74
+ color: _color.COLOR[iconColorMap[variant]],
75
+ className: "ncua-full-width-notification__icon"
76
+ }), (0, _jsxRuntime.jsxs)("div", __assign({
77
+ className: "ncua-full-width-notification__text-container"
78
+ }, {
79
+ children: [(0, _jsxRuntime.jsx)("span", __assign({
80
+ className: "ncua-full-width-notification__title"
81
+ }, {
82
+ children: title
83
+ })), supportingText && (0, _jsxRuntime.jsx)("span", __assign({
84
+ className: "ncua-full-width-notification__supporting-text"
85
+ }, {
86
+ children: supportingText
87
+ }))]
88
+ }))]
89
+ })), (0, _jsxRuntime.jsxs)("div", __assign({
90
+ className: "ncua-full-width-notification__actions-container"
91
+ }, {
92
+ children: [actions && (0, _jsxRuntime.jsx)("div", __assign({
93
+ className: "ncua-full-width-notification__actions"
94
+ }, {
95
+ children: actions
96
+ })), onClose && (0, _jsxRuntime.jsx)("button", __assign({
97
+ type: "button",
98
+ className: "ncua-full-width-notification__close-button",
99
+ onClick: onClose,
100
+ "aria-label": "\uC54C\uB9BC \uB2EB\uAE30"
101
+ }, {
102
+ children: (0, _jsxRuntime.jsx)(_uiAdminIcon.default, __assign({
103
+ name: "x-close"
104
+ }, closeIconSize, {
105
+ color: _color.COLOR[iconColorMap[variant]]
106
+ }))
107
+ }))]
108
+ }))]
109
+ }))
110
+ }))
111
+ }));
112
+ });