@ncds/ui-admin 0.0.2
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/README.md +36 -0
- package/dist/const/Icon/FinanceECommerce.d.ts +2 -0
- package/dist/const/Icon/FinanceECommerce.d.ts.map +1 -0
- package/dist/const/Icon/FinanceECommerce.js +7 -0
- package/dist/const/Icon/alertAndFeedback.d.ts +2 -0
- package/dist/const/Icon/alertAndFeedback.d.ts.map +1 -0
- package/dist/const/Icon/alertAndFeedback.js +7 -0
- package/dist/const/Icon/arrow.d.ts +2 -0
- package/dist/const/Icon/arrow.d.ts.map +1 -0
- package/dist/const/Icon/arrow.js +7 -0
- package/dist/const/Icon/chart.d.ts +2 -0
- package/dist/const/Icon/chart.d.ts.map +1 -0
- package/dist/const/Icon/chart.js +7 -0
- package/dist/const/Icon/chevron.d.ts +2 -0
- package/dist/const/Icon/chevron.d.ts.map +1 -0
- package/dist/const/Icon/chevron.js +7 -0
- package/dist/const/Icon/circle.d.ts +2 -0
- package/dist/const/Icon/circle.d.ts.map +1 -0
- package/dist/const/Icon/circle.js +7 -0
- package/dist/const/Icon/communication.d.ts +2 -0
- package/dist/const/Icon/communication.d.ts.map +1 -0
- package/dist/const/Icon/communication.js +7 -0
- package/dist/const/Icon/development.d.ts +2 -0
- package/dist/const/Icon/development.d.ts.map +1 -0
- package/dist/const/Icon/development.js +7 -0
- package/dist/const/Icon/editor.d.ts +2 -0
- package/dist/const/Icon/editor.d.ts.map +1 -0
- package/dist/const/Icon/editor.js +7 -0
- package/dist/const/Icon/education.d.ts +2 -0
- package/dist/const/Icon/education.d.ts.map +1 -0
- package/dist/const/Icon/education.js +7 -0
- package/dist/const/Icon/files.d.ts +2 -0
- package/dist/const/Icon/files.d.ts.map +1 -0
- package/dist/const/Icon/files.js +7 -0
- package/dist/const/Icon/general.d.ts +2 -0
- package/dist/const/Icon/general.d.ts.map +1 -0
- package/dist/const/Icon/general.js +31 -0
- package/dist/const/Icon/index.d.ts +2 -0
- package/dist/const/Icon/index.d.ts.map +1 -0
- package/dist/const/Icon/index.js +39 -0
- package/dist/const/Icon/layout.d.ts +2 -0
- package/dist/const/Icon/layout.d.ts.map +1 -0
- package/dist/const/Icon/layout.js +9 -0
- package/dist/const/Icon/mapsTravel.d.ts +2 -0
- package/dist/const/Icon/mapsTravel.d.ts.map +1 -0
- package/dist/const/Icon/mapsTravel.js +7 -0
- package/dist/const/Icon/mediaDevices.d.ts +2 -0
- package/dist/const/Icon/mediaDevices.d.ts.map +1 -0
- package/dist/const/Icon/mediaDevices.js +7 -0
- package/dist/const/Icon/message.d.ts +2 -0
- package/dist/const/Icon/message.d.ts.map +1 -0
- package/dist/const/Icon/message.js +7 -0
- package/dist/const/Icon/sales.d.ts +2 -0
- package/dist/const/Icon/sales.d.ts.map +1 -0
- package/dist/const/Icon/sales.js +7 -0
- package/dist/const/Icon/security.d.ts +2 -0
- package/dist/const/Icon/security.d.ts.map +1 -0
- package/dist/const/Icon/security.js +7 -0
- package/dist/const/Icon/shapes.d.ts +2 -0
- package/dist/const/Icon/shapes.d.ts.map +1 -0
- package/dist/const/Icon/shapes.js +9 -0
- package/dist/const/Icon/tag.d.ts +2 -0
- package/dist/const/Icon/tag.d.ts.map +1 -0
- package/dist/const/Icon/tag.js +7 -0
- package/dist/const/Icon/time.d.ts +2 -0
- package/dist/const/Icon/time.d.ts.map +1 -0
- package/dist/const/Icon/time.js +7 -0
- package/dist/const/Icon/users.d.ts +2 -0
- package/dist/const/Icon/users.d.ts.map +1 -0
- package/dist/const/Icon/users.js +7 -0
- package/dist/const/Icon/weather.d.ts +2 -0
- package/dist/const/Icon/weather.d.ts.map +1 -0
- package/dist/const/Icon/weather.js +7 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/dist/ui-admin/assets/images/sprite.png +0 -0
- package/dist/ui-admin/assets/scripts/index.d.ts +2 -0
- package/dist/ui-admin/assets/scripts/index.d.ts.map +1 -0
- package/dist/ui-admin/assets/scripts/index.js +16 -0
- package/dist/ui-admin/assets/scripts/test.d.ts +2 -0
- package/dist/ui-admin/assets/scripts/test.d.ts.map +1 -0
- package/dist/ui-admin/assets/scripts/test.js +10 -0
- package/dist/ui-admin/assets/styles/style.css +1438 -0
- package/dist/ui-admin/constant/color.d.ts +34 -0
- package/dist/ui-admin/constant/color.d.ts.map +1 -0
- package/dist/ui-admin/constant/color.js +38 -0
- package/dist/ui-admin/constant/size.d.ts +2 -0
- package/dist/ui-admin/constant/size.d.ts.map +1 -0
- package/dist/ui-admin/constant/size.js +5 -0
- package/dist/ui-admin/index.d.ts +14 -0
- package/dist/ui-admin/index.d.ts.map +1 -0
- package/dist/ui-admin/index.js +148 -0
- package/dist/ui-admin/src/components/button/Button.d.ts +42 -0
- package/dist/ui-admin/src/components/button/Button.d.ts.map +1 -0
- package/dist/ui-admin/src/components/button/Button.js +106 -0
- package/dist/ui-admin/src/components/button/ButtonGroup.d.ts +606 -0
- package/dist/ui-admin/src/components/button/ButtonGroup.d.ts.map +1 -0
- package/dist/ui-admin/src/components/button/ButtonGroup.js +99 -0
- package/dist/ui-admin/src/components/button/index.d.ts +3 -0
- package/dist/ui-admin/src/components/button/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/button/index.js +27 -0
- package/dist/ui-admin/src/components/checkbox/Checkbox.d.ts +10 -0
- package/dist/ui-admin/src/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/ui-admin/src/components/checkbox/Checkbox.js +70 -0
- package/dist/ui-admin/src/components/checkbox/CheckboxInput.d.ts +10 -0
- package/dist/ui-admin/src/components/checkbox/CheckboxInput.d.ts.map +1 -0
- package/dist/ui-admin/src/components/checkbox/CheckboxInput.js +67 -0
- package/dist/ui-admin/src/components/checkbox/index.d.ts +3 -0
- package/dist/ui-admin/src/components/checkbox/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/checkbox/index.js +27 -0
- package/dist/ui-admin/src/components/index.d.ts +11 -0
- package/dist/ui-admin/src/components/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/index.js +115 -0
- package/dist/ui-admin/src/components/input/InputBase.d.ts +49 -0
- package/dist/ui-admin/src/components/input/InputBase.d.ts.map +1 -0
- package/dist/ui-admin/src/components/input/InputBase.js +169 -0
- package/dist/ui-admin/src/components/input/PasswordInput.d.ts +3 -0
- package/dist/ui-admin/src/components/input/PasswordInput.d.ts.map +1 -0
- package/dist/ui-admin/src/components/input/PasswordInput.js +88 -0
- package/dist/ui-admin/src/components/input/index.d.ts +3 -0
- package/dist/ui-admin/src/components/input/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/input/index.js +27 -0
- package/dist/ui-admin/src/components/pagination/NavButton.d.ts +34 -0
- package/dist/ui-admin/src/components/pagination/NavButton.d.ts.map +1 -0
- package/dist/ui-admin/src/components/pagination/NavButton.js +91 -0
- package/dist/ui-admin/src/components/pagination/Pagination.d.ts +22 -0
- package/dist/ui-admin/src/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/ui-admin/src/components/pagination/Pagination.js +175 -0
- package/dist/ui-admin/src/components/pagination/index.d.ts +3 -0
- package/dist/ui-admin/src/components/pagination/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/pagination/index.js +27 -0
- package/dist/ui-admin/src/components/radio/Radio.d.ts +10 -0
- package/dist/ui-admin/src/components/radio/Radio.d.ts.map +1 -0
- package/dist/ui-admin/src/components/radio/Radio.js +65 -0
- package/dist/ui-admin/src/components/radio/RadioInput.d.ts +9 -0
- package/dist/ui-admin/src/components/radio/RadioInput.d.ts.map +1 -0
- package/dist/ui-admin/src/components/radio/RadioInput.js +50 -0
- package/dist/ui-admin/src/components/radio/index.d.ts +3 -0
- package/dist/ui-admin/src/components/radio/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/radio/index.js +27 -0
- package/dist/ui-admin/src/components/select/Select.d.ts +22 -0
- package/dist/ui-admin/src/components/select/Select.d.ts.map +1 -0
- package/dist/ui-admin/src/components/select/Select.js +98 -0
- package/dist/ui-admin/src/components/select/index.d.ts +2 -0
- package/dist/ui-admin/src/components/select/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/select/index.js +16 -0
- package/dist/ui-admin/src/components/shared/hintText/HintText.d.ts +8 -0
- package/dist/ui-admin/src/components/shared/hintText/HintText.d.ts.map +1 -0
- package/dist/ui-admin/src/components/shared/hintText/HintText.js +43 -0
- package/dist/ui-admin/src/components/shared/hintText/index.d.ts +2 -0
- package/dist/ui-admin/src/components/shared/hintText/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/shared/hintText/index.js +16 -0
- package/dist/ui-admin/src/components/shared/index.d.ts +3 -0
- package/dist/ui-admin/src/components/shared/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/shared/index.js +27 -0
- package/dist/ui-admin/src/components/shared/label/Label.d.ts +8 -0
- package/dist/ui-admin/src/components/shared/label/Label.d.ts.map +1 -0
- package/dist/ui-admin/src/components/shared/label/Label.js +43 -0
- package/dist/ui-admin/src/components/shared/label/index.d.ts +2 -0
- package/dist/ui-admin/src/components/shared/label/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/shared/label/index.js +16 -0
- package/dist/ui-admin/src/components/spinner/Spinner.d.ts +10 -0
- package/dist/ui-admin/src/components/spinner/Spinner.d.ts.map +1 -0
- package/dist/ui-admin/src/components/spinner/Spinner.js +53 -0
- package/dist/ui-admin/src/components/spinner/index.d.ts +2 -0
- package/dist/ui-admin/src/components/spinner/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/spinner/index.js +16 -0
- package/dist/ui-admin/src/components/svg/SvgIcon.d.ts +17 -0
- package/dist/ui-admin/src/components/svg/SvgIcon.d.ts.map +1 -0
- package/dist/ui-admin/src/components/svg/SvgIcon.js +65 -0
- package/dist/ui-admin/src/components/svg/const.d.ts +9 -0
- package/dist/ui-admin/src/components/svg/const.d.ts.map +1 -0
- package/dist/ui-admin/src/components/svg/const.js +792 -0
- package/dist/ui-admin/src/components/svg/index.d.ts +3 -0
- package/dist/ui-admin/src/components/svg/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/svg/index.js +27 -0
- package/dist/ui-admin/src/components/tooltip/Tooltip.d.ts +11 -0
- package/dist/ui-admin/src/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/ui-admin/src/components/tooltip/Tooltip.js +71 -0
- package/dist/ui-admin/src/components/tooltip/index.d.ts +2 -0
- package/dist/ui-admin/src/components/tooltip/index.d.ts.map +1 -0
- package/dist/ui-admin/src/components/tooltip/index.js +16 -0
- package/dist/ui-admin/src/constant/index.d.ts +2 -0
- package/dist/ui-admin/src/constant/index.d.ts.map +1 -0
- package/dist/ui-admin/src/constant/index.js +16 -0
- package/dist/ui-admin/src/constant/size.d.ts +2 -0
- package/dist/ui-admin/src/constant/size.d.ts.map +1 -0
- package/dist/ui-admin/src/constant/size.js +7 -0
- package/package.json +108 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const COLOR: {
|
|
2
|
+
gray200: string;
|
|
3
|
+
gray300: string;
|
|
4
|
+
gray400: string;
|
|
5
|
+
gray500: string;
|
|
6
|
+
gray600: string;
|
|
7
|
+
gray700: string;
|
|
8
|
+
blue500: string;
|
|
9
|
+
blue600: string;
|
|
10
|
+
red500: string;
|
|
11
|
+
red600: string;
|
|
12
|
+
orange500: string;
|
|
13
|
+
orange600: string;
|
|
14
|
+
green500: string;
|
|
15
|
+
green600: string;
|
|
16
|
+
pink100: string;
|
|
17
|
+
pink600: string;
|
|
18
|
+
yellow600: string;
|
|
19
|
+
violet600: string;
|
|
20
|
+
white: string;
|
|
21
|
+
currentColor: string;
|
|
22
|
+
black: string;
|
|
23
|
+
'secondary-gray-blue-50': string;
|
|
24
|
+
'secondary-gray-blue-100': string;
|
|
25
|
+
'secondary-gray-blue-200': string;
|
|
26
|
+
'secondary-gray-blue-300': string;
|
|
27
|
+
'secondary-gray-blue-400': string;
|
|
28
|
+
'secondary-gray-blue-450': string;
|
|
29
|
+
'secondary-gray-blue-500': string;
|
|
30
|
+
'secondary-gray-blue-600': string;
|
|
31
|
+
'secondary-gray-blue-700': string;
|
|
32
|
+
};
|
|
33
|
+
export type ColorKeyType = keyof typeof COLOR;
|
|
34
|
+
//# sourceMappingURL=color.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../constant/color.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,KAAK,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.COLOR = void 0;
|
|
7
|
+
var COLOR = exports.COLOR = {
|
|
8
|
+
gray200: '#D0D5DD',
|
|
9
|
+
gray300: '#98A2B3',
|
|
10
|
+
gray400: '#667085',
|
|
11
|
+
gray500: '#344054',
|
|
12
|
+
gray600: '#475467',
|
|
13
|
+
gray700: '#0C111D',
|
|
14
|
+
blue500: '#1570EF',
|
|
15
|
+
blue600: '#1849a9',
|
|
16
|
+
red500: '#ec1d31',
|
|
17
|
+
red600: '#dc0a2b',
|
|
18
|
+
orange500: '#e4501e',
|
|
19
|
+
orange600: '#b93815',
|
|
20
|
+
green500: '#099250',
|
|
21
|
+
green600: '#087443',
|
|
22
|
+
pink100: '#fce7f6',
|
|
23
|
+
pink600: '#c11574',
|
|
24
|
+
yellow600: '#c27004',
|
|
25
|
+
violet600: '#5720b7',
|
|
26
|
+
white: '#fff',
|
|
27
|
+
currentColor: 'currentColor',
|
|
28
|
+
black: '',
|
|
29
|
+
'secondary-gray-blue-50': '#f8f9fc',
|
|
30
|
+
'secondary-gray-blue-100': '#eaecf5',
|
|
31
|
+
'secondary-gray-blue-200': '#d5d9eb',
|
|
32
|
+
'secondary-gray-blue-300': '#b3b8db',
|
|
33
|
+
'secondary-gray-blue-400': '#717bbc',
|
|
34
|
+
'secondary-gray-blue-450': '#4e5ba6',
|
|
35
|
+
'secondary-gray-blue-500': '#3e4784',
|
|
36
|
+
'secondary-gray-blue-600': '#363f72',
|
|
37
|
+
'secondary-gray-blue-700': '#293056'
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"size.d.ts","sourceRoot":"","sources":["../../../constant/size.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './src/components/button';
|
|
2
|
+
export * from './src/components/checkbox';
|
|
3
|
+
export * from './src/components/input';
|
|
4
|
+
export * from './src/components/pagination';
|
|
5
|
+
export * from './src/components/radio';
|
|
6
|
+
export * from './src/components/select';
|
|
7
|
+
export * from './src/components/shared/hintText';
|
|
8
|
+
export * from './src/components/shared/label';
|
|
9
|
+
export * from './src/components/shared';
|
|
10
|
+
export * from './src/components/spinner';
|
|
11
|
+
export * from './src/components/svg';
|
|
12
|
+
export * from './src/components/tooltip';
|
|
13
|
+
export * from './src/components';
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _button = require("./src/components/button");
|
|
7
|
+
Object.keys(_button).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _button[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _button[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _checkbox = require("./src/components/checkbox");
|
|
18
|
+
Object.keys(_checkbox).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _checkbox[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _checkbox[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
var _input = require("./src/components/input");
|
|
29
|
+
Object.keys(_input).forEach(function (key) {
|
|
30
|
+
if (key === "default" || key === "__esModule") return;
|
|
31
|
+
if (key in exports && exports[key] === _input[key]) return;
|
|
32
|
+
Object.defineProperty(exports, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () {
|
|
35
|
+
return _input[key];
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
var _pagination = require("./src/components/pagination");
|
|
40
|
+
Object.keys(_pagination).forEach(function (key) {
|
|
41
|
+
if (key === "default" || key === "__esModule") return;
|
|
42
|
+
if (key in exports && exports[key] === _pagination[key]) return;
|
|
43
|
+
Object.defineProperty(exports, key, {
|
|
44
|
+
enumerable: true,
|
|
45
|
+
get: function () {
|
|
46
|
+
return _pagination[key];
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
var _radio = require("./src/components/radio");
|
|
51
|
+
Object.keys(_radio).forEach(function (key) {
|
|
52
|
+
if (key === "default" || key === "__esModule") return;
|
|
53
|
+
if (key in exports && exports[key] === _radio[key]) return;
|
|
54
|
+
Object.defineProperty(exports, key, {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _radio[key];
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
var _select = require("./src/components/select");
|
|
62
|
+
Object.keys(_select).forEach(function (key) {
|
|
63
|
+
if (key === "default" || key === "__esModule") return;
|
|
64
|
+
if (key in exports && exports[key] === _select[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _select[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _hintText = require("./src/components/shared/hintText");
|
|
73
|
+
Object.keys(_hintText).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (key in exports && exports[key] === _hintText[key]) return;
|
|
76
|
+
Object.defineProperty(exports, key, {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _hintText[key];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
var _label = require("./src/components/shared/label");
|
|
84
|
+
Object.keys(_label).forEach(function (key) {
|
|
85
|
+
if (key === "default" || key === "__esModule") return;
|
|
86
|
+
if (key in exports && exports[key] === _label[key]) return;
|
|
87
|
+
Object.defineProperty(exports, key, {
|
|
88
|
+
enumerable: true,
|
|
89
|
+
get: function () {
|
|
90
|
+
return _label[key];
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
var _shared = require("./src/components/shared");
|
|
95
|
+
Object.keys(_shared).forEach(function (key) {
|
|
96
|
+
if (key === "default" || key === "__esModule") return;
|
|
97
|
+
if (key in exports && exports[key] === _shared[key]) return;
|
|
98
|
+
Object.defineProperty(exports, key, {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function () {
|
|
101
|
+
return _shared[key];
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
var _spinner = require("./src/components/spinner");
|
|
106
|
+
Object.keys(_spinner).forEach(function (key) {
|
|
107
|
+
if (key === "default" || key === "__esModule") return;
|
|
108
|
+
if (key in exports && exports[key] === _spinner[key]) return;
|
|
109
|
+
Object.defineProperty(exports, key, {
|
|
110
|
+
enumerable: true,
|
|
111
|
+
get: function () {
|
|
112
|
+
return _spinner[key];
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
var _svg = require("./src/components/svg");
|
|
117
|
+
Object.keys(_svg).forEach(function (key) {
|
|
118
|
+
if (key === "default" || key === "__esModule") return;
|
|
119
|
+
if (key in exports && exports[key] === _svg[key]) return;
|
|
120
|
+
Object.defineProperty(exports, key, {
|
|
121
|
+
enumerable: true,
|
|
122
|
+
get: function () {
|
|
123
|
+
return _svg[key];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
});
|
|
127
|
+
var _tooltip = require("./src/components/tooltip");
|
|
128
|
+
Object.keys(_tooltip).forEach(function (key) {
|
|
129
|
+
if (key === "default" || key === "__esModule") return;
|
|
130
|
+
if (key in exports && exports[key] === _tooltip[key]) return;
|
|
131
|
+
Object.defineProperty(exports, key, {
|
|
132
|
+
enumerable: true,
|
|
133
|
+
get: function () {
|
|
134
|
+
return _tooltip[key];
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
var _components = require("./src/components");
|
|
139
|
+
Object.keys(_components).forEach(function (key) {
|
|
140
|
+
if (key === "default" || key === "__esModule") return;
|
|
141
|
+
if (key in exports && exports[key] === _components[key]) return;
|
|
142
|
+
Object.defineProperty(exports, key, {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
get: function () {
|
|
145
|
+
return _components[key];
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { COLOR } from '../../../constant/color';
|
|
3
|
+
import { Size } from '../../../constant/size';
|
|
4
|
+
import { IconName } from '@ncds/ui-admin-icon';
|
|
5
|
+
export type ButtonTheme = 'primary' | 'secondary' | 'secondary-gray' | 'tertiary-gray' | 'tertiary' | 'link' | 'destructive';
|
|
6
|
+
type IconSlotType = {
|
|
7
|
+
type: 'icon';
|
|
8
|
+
icon: IconName;
|
|
9
|
+
color?: keyof typeof COLOR;
|
|
10
|
+
};
|
|
11
|
+
type CustomSlotType = {
|
|
12
|
+
type: 'custom';
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
};
|
|
15
|
+
type SideSlotType = IconSlotType | CustomSlotType;
|
|
16
|
+
export type ButtonSize = Extract<Size, 'xs' | 'sm' | 'md' | 'lg'>;
|
|
17
|
+
type CommonButtonProps<T extends keyof HTMLElementTagNameMap> = Omit<ComponentProps<T>, 'ref'> & {
|
|
18
|
+
label: string;
|
|
19
|
+
className?: string;
|
|
20
|
+
hierarchy?: ButtonTheme;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
leadingIcon?: SideSlotType;
|
|
23
|
+
trailingIcon?: SideSlotType;
|
|
24
|
+
onlyIcon?: boolean;
|
|
25
|
+
size?: ButtonSize;
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
};
|
|
28
|
+
type ButtonElementProps = CommonButtonProps<Exclude<keyof HTMLElementTagNameMap, 'a'>> & {
|
|
29
|
+
as?: Exclude<keyof HTMLElementTagNameMap, 'a'>;
|
|
30
|
+
href?: never;
|
|
31
|
+
};
|
|
32
|
+
type AnchorElementProps = CommonButtonProps<'a'> & {
|
|
33
|
+
as: 'a';
|
|
34
|
+
href: string;
|
|
35
|
+
target?: HTMLAnchorElement['target'];
|
|
36
|
+
underline?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type ButtonProps = ButtonElementProps | AnchorElementProps;
|
|
39
|
+
export declare const svgSize: Record<ButtonSize, number>;
|
|
40
|
+
export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../../../src/components/button/Button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,SAAS,EAAkD,MAAM,OAAO,CAAC;AAClG,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAa,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,WAAW,GACnB,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,eAAe,GACf,UAAU,GACV,MAAM,GACN,aAAa,CAAC;AAElB,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,OAAO,KAAK,CAAC;CAC5B,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,KAAK,YAAY,GAAG,YAAY,GAAG,cAAc,CAAC;AAElD,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AAElE,KAAK,iBAAiB,CAAC,CAAC,SAAS,MAAM,qBAAqB,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,GAAG;IAC/F,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,KAAK,kBAAkB,GAAG,iBAAiB,CAAC,OAAO,CAAC,MAAM,qBAAqB,EAAE,GAAG,CAAC,CAAC,GAAG;IACvF,EAAE,CAAC,EAAE,OAAO,CAAC,MAAM,qBAAqB,EAAE,GAAG,CAAC,CAAC;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,KAAK,kBAAkB,GAAG,iBAAiB,CAAC,GAAG,CAAC,GAAG;IACjD,EAAE,EAAE,GAAG,CAAC;IACR,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAElE,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAK9C,CAAC;AAEF,eAAO,MAAM,MAAM,2GAuFjB,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.svgSize = exports.Button = void 0;
|
|
7
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
8
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _color = require("../../../constant/color");
|
|
11
|
+
var _uiAdminIcon = _interopRequireDefault(require("@ncds/ui-admin-icon"));
|
|
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 svgSize = exports.svgSize = {
|
|
32
|
+
xs: 12,
|
|
33
|
+
sm: 14,
|
|
34
|
+
md: 16,
|
|
35
|
+
lg: 20
|
|
36
|
+
};
|
|
37
|
+
var Button = exports.Button = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
38
|
+
// NOTE: 엘리먼트 종류에 따라 props의 타입이 달라지므로 분리
|
|
39
|
+
var _a = props.as,
|
|
40
|
+
as = _a === void 0 ? 'button' : _a,
|
|
41
|
+
_b = props.size,
|
|
42
|
+
size = _b === void 0 ? 'md' : _b,
|
|
43
|
+
children = props.children,
|
|
44
|
+
onlyIcon = props.onlyIcon,
|
|
45
|
+
disabled = props.disabled,
|
|
46
|
+
className = props.className,
|
|
47
|
+
_c = props.hierarchy,
|
|
48
|
+
hierarchy = _c === void 0 ? 'secondary-gray' : _c,
|
|
49
|
+
label = props.label,
|
|
50
|
+
leadingIcon = props.leadingIcon,
|
|
51
|
+
trailingIcon = props.trailingIcon,
|
|
52
|
+
restProps = __rest(props, ["as", "size", "children", "onlyIcon", "disabled", "className", "hierarchy", "label", "leadingIcon", "trailingIcon"]);
|
|
53
|
+
var _d = (0, _react.useState)(null),
|
|
54
|
+
queryParams = _d[0],
|
|
55
|
+
setQueryParams = _d[1];
|
|
56
|
+
// Type guard to check if props is an AnchorElementProps
|
|
57
|
+
var isAnchorProps = function (p) {
|
|
58
|
+
return p.as === 'a';
|
|
59
|
+
};
|
|
60
|
+
var handleClickLink = function (e) {
|
|
61
|
+
var isRemote = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.get('isRemote')) === 'true';
|
|
62
|
+
if (isAnchorProps(props) && isRemote) {
|
|
63
|
+
e.preventDefault();
|
|
64
|
+
// INFO: 1. 사이트 리모트 페이지(디센/개센): 빌더에서 설정한 타겟(self or blank)에 따라 페이지 호출
|
|
65
|
+
// 2. 어드민 리모트 페이지: 빌더에서 설정한 타겟에 관계 없이 모두 blank
|
|
66
|
+
var isBlank = props.target === '_blank';
|
|
67
|
+
if (!isRemote && !isBlank && window.top) {
|
|
68
|
+
window.top.location.href = props.href;
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
window.open(props.href);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
var sideSlotRender = function (slot) {
|
|
75
|
+
if (slot.type === 'icon') {
|
|
76
|
+
return (0, _jsxRuntime.jsx)(_uiAdminIcon.default, {
|
|
77
|
+
name: slot.icon,
|
|
78
|
+
height: svgSize[size],
|
|
79
|
+
width: svgSize[size],
|
|
80
|
+
color: slot.color ? _color.COLOR[slot.color] : undefined
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
return slot.children;
|
|
84
|
+
};
|
|
85
|
+
(0, _react.useEffect)(function () {
|
|
86
|
+
var _a;
|
|
87
|
+
setQueryParams(new URLSearchParams(((_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.search) || ''));
|
|
88
|
+
}, []);
|
|
89
|
+
return /*#__PURE__*/(0, _react.createElement)(as, __assign(__assign({
|
|
90
|
+
className: (0, _classnames.default)('ncua-btn', "ncua-btn--".concat(size), {
|
|
91
|
+
'only-icon': onlyIcon,
|
|
92
|
+
'is-disable': disabled,
|
|
93
|
+
'has-underline': isAnchorProps(props) ? props.underline : false
|
|
94
|
+
}, className, hierarchy && "ncua-btn--".concat(hierarchy)),
|
|
95
|
+
onClick: isAnchorProps(props) ? handleClickLink : undefined,
|
|
96
|
+
disabled: disabled
|
|
97
|
+
}, restProps), {
|
|
98
|
+
ref: ref
|
|
99
|
+
}), (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
100
|
+
children: [leadingIcon && sideSlotRender(leadingIcon), !onlyIcon && label && (0, _jsxRuntime.jsx)("span", __assign({
|
|
101
|
+
className: "ncua-btn__label"
|
|
102
|
+
}, {
|
|
103
|
+
children: label
|
|
104
|
+
})), children, trailingIcon && sideSlotRender(trailingIcon)]
|
|
105
|
+
}));
|
|
106
|
+
});
|