nntc-ui 0.0.1

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/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "name": "nntc-ui",
3
+ "version": "0.0.1",
4
+ "description": "React UI-kit for NNTC",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "import": "./index.js",
9
+ "types": "./index.d.ts"
10
+ },
11
+ "./icons": {
12
+ "import": "./icons/index.js",
13
+ "types": "./icons/index.d.ts"
14
+ },
15
+ "./index.css": "./index.css",
16
+ "./styles/themes/dark.css": "./styles/themes/dark.css",
17
+ "./styles/themes/light.css": "./styles/themes/light.css",
18
+ "./styles/global.css": "./styles/global.css"
19
+ },
20
+ "scripts": {
21
+ "dev": "storybook dev -p 6006",
22
+ "build": "tsup && copyfiles package.json README.md dist && copyfiles -u 1 \"src/styles/**/*\" dist",
23
+ "build-storybook": "storybook build",
24
+ "lint": "eslint . --ext .ts,.tsx",
25
+ "lint:fix": "eslint . --ext .ts,.tsx --fix"
26
+ },
27
+ "keywords": [
28
+ "react",
29
+ "ui-kit",
30
+ "components"
31
+ ],
32
+ "author": "NNTC",
33
+ "peerDependencies": {
34
+ "react": "^18.0.0",
35
+ "react-dom": "^18.0.0"
36
+ },
37
+ "license": "MIT",
38
+ "dependencies": {
39
+ "@floating-ui/react": "^0.27.8",
40
+ "@tanstack/react-table": "^8.21.3",
41
+ "@tanstack/react-virtual": "^3.13.8",
42
+ "classnames": "^2.5.1",
43
+ "copyfiles": "^2.4.1",
44
+ "dayjs": "^1.11.13",
45
+ "i18next": "^23.10.0",
46
+ "react-colorful": "^5.6.1",
47
+ "react-i18next": "^14.0.5",
48
+ "react-merge-refs": "^3.0.2",
49
+ "uuid": "^11.1.0"
50
+ },
51
+ "devDependencies": {
52
+ "@babel/core": "^7.27.1",
53
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
54
+ "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
55
+ "@babel/preset-env": "^7.27.2",
56
+ "@babel/preset-react": "^7.27.1",
57
+ "@babel/preset-typescript": "^7.27.1",
58
+ "@eslint/compat": "^1.2.9",
59
+ "@eslint/eslintrc": "^3.0.0",
60
+ "@eslint/js": "^9.0.0",
61
+ "@storybook/addon-docs": "^8.6.12",
62
+ "@storybook/addon-essentials": "^8.6.12",
63
+ "@storybook/addon-interactions": "^8.6.12",
64
+ "@storybook/react-vite": "^8.6.12",
65
+ "@types/react": "^19.1.4",
66
+ "@types/react-dom": "^19.1.5",
67
+ "@typescript-eslint/eslint-plugin": "^7.0.0",
68
+ "@typescript-eslint/parser": "^7.0.0",
69
+ "@vitejs/plugin-react": "^4.4.1",
70
+ "eslint": "^9.0.0",
71
+ "eslint-config-airbnb-typescript": "^18.0.0",
72
+ "eslint-config-prettier": "^9.1.0",
73
+ "eslint-import-resolver-typescript": "^4.3.4",
74
+ "eslint-plugin-import": "^2.29.1",
75
+ "eslint-plugin-jsx-a11y": "^6.8.0",
76
+ "eslint-plugin-optimize-regex": "^1.2.1",
77
+ "eslint-plugin-prettier": "^5.1.3",
78
+ "eslint-plugin-react": "^7.33.2",
79
+ "eslint-plugin-react-hooks": "^4.6.0",
80
+ "postcss-modules": "^6.0.1",
81
+ "prettier": "^3.2.5",
82
+ "react": "^18.0.0",
83
+ "react-dom": "^18.0.0",
84
+ "storybook": "^8.0.0",
85
+ "tsup": "^7.0.0",
86
+ "typescript": "^5.0.0",
87
+ "vite": "^5.0.0",
88
+ "vite-plugin-svgr": "^4.3.0",
89
+ "vite-tsconfig-paths": "^5.1.4"
90
+ }
91
+ }
@@ -0,0 +1,148 @@
1
+ :root {
2
+ --text-headline1-size: 96px;
3
+ --text-headline1-weight: 300;
4
+ --text-headline1-height: 112px;
5
+ --text-headline1-letter: -1.5px;
6
+
7
+ --text-headline2-size: 60px;
8
+ --text-headline2-weight: 300;
9
+ --text-headline2-height: 72px;
10
+ --text-headline2-letter: -0.5px;
11
+
12
+ --text-headline3-size: 48px;
13
+ --text-headline3-weight: 400;
14
+ --text-headline3-height: 56px;
15
+ --text-headline3-letter: normal;
16
+
17
+ --text-headline4-size: 34px;
18
+ --text-headline4-weight: 400;
19
+ --text-headline4-height: 36px;
20
+ --text-headline4-letter: normal;
21
+
22
+ --text-headline5-size: 24px;
23
+ --text-headline5-weight: 400;
24
+ --text-headline5-height: 24px;
25
+ --text-headline5-letter: 0.18px;
26
+
27
+ --text-headline6-size: 20px;
28
+ --text-headline6-weight: 500;
29
+ --text-headline6-height: 24px;
30
+ --text-headline6-letter: 0.15px;
31
+
32
+ --text-headline7-size: 20px;
33
+ --text-headline7-weight: 400;
34
+ --text-headline7-height: 24px;
35
+ --text-headline7-letter: 0.15px;
36
+
37
+ --text-subtitle1-size: 16px;
38
+ --text-subtitle1-weight: 400;
39
+ --text-subtitle1-height: 24px;
40
+ --text-subtitle1-letter: 0.15px;
41
+
42
+ --text-subtitle2-size: 14px;
43
+ --text-subtitle2-weight: 400;
44
+ --text-subtitle2-height: 24px;
45
+ --text-subtitle2-letter: 0.1px;
46
+
47
+ --text-body1-size: 16px;
48
+ --text-body1-weight: 400;
49
+ --text-body1-height: 24px;
50
+ --text-body1-letter: 0.5px;
51
+
52
+ --text-body2-size: 14px;
53
+ --text-body2-weight: 400;
54
+ --text-body2-height: 20px;
55
+ --text-body2-letter: 0.25px;
56
+
57
+ --text-button-size: 14px;
58
+ --text-button-weight: 500;
59
+ --text-button-height: 20px;
60
+ --text-button-letter: 0.1px;
61
+
62
+ --text-caption-size: 12px;
63
+ --text-caption-weight: 400;
64
+ --text-caption-height: 16px;
65
+ --text-caption-letter: 0.4px;
66
+
67
+ --text-overline-size: 10px;
68
+ --text-overline-weight: 500;
69
+ --text-overline-height: 16px;
70
+ --text-overline-letter: 1.5px;
71
+ }
72
+
73
+ html,
74
+ body {
75
+ width: 100%;
76
+ height: 100%;
77
+ padding: 0;
78
+ margin: 0;
79
+ background-color: var(--theme-surface-layout);
80
+ color: var(--theme-text-primary);
81
+ transition:
82
+ background-color 0.3s ease,
83
+ color 0.3s ease;
84
+ }
85
+
86
+ body {
87
+ font-family: Roboto, sans-serif;
88
+ font-size: var(--text-body2-size);
89
+ font-weight: var(--text-body2-weight);
90
+ line-height: var(--text-body2-height);
91
+ letter-spacing: var(--text-body2-letter);
92
+ }
93
+
94
+ * {
95
+ box-sizing: border-box;
96
+ }
97
+
98
+ input[type='password']::-ms-reveal {
99
+ display: none;
100
+ height: 100%;
101
+ opacity: 1;
102
+ }
103
+
104
+ :global(#react_root) {
105
+ position: relative;
106
+ display: flex;
107
+ flex-direction: column;
108
+ gap: 0;
109
+ width: 100%;
110
+ height: 100%;
111
+ overflow: hidden;
112
+ }
113
+
114
+ :global(.styledScroll) {
115
+ margin-right: -16px !important;
116
+ margin-bottom: -16px !important;
117
+ overflow: scroll;
118
+ }
119
+
120
+ /* общая зона скроллбара */
121
+ :global(.styledScroll)::-webkit-scrollbar {
122
+ width: 16px;
123
+ height: 16px;
124
+ background-color: transparent;
125
+ background-clip: content-box;
126
+ border: 4px solid transparent;
127
+ border-radius: 12px;
128
+ }
129
+
130
+ /* зона перетаскивания */
131
+ :global(.styledScroll)::-webkit-scrollbar-thumb {
132
+ background-clip: content-box;
133
+ border: 4px solid transparent;
134
+ border-radius: 12px;
135
+ }
136
+
137
+ /* уголок между горизонтальным и вертикальным скроллбарами */
138
+ :global(.styledScroll)::-webkit-scrollbar-corner {
139
+ background: transparent;
140
+ }
141
+
142
+ /* зона трека */
143
+ :global(.styledScroll)::-webkit-scrollbar-track {
144
+ background-color: transparent;
145
+ background-clip: content-box;
146
+ border: 4px solid transparent;
147
+ border-radius: 12px;
148
+ }
@@ -0,0 +1,97 @@
1
+ :root {
2
+ --theme-surface-layout: #373737;
3
+ --theme-surface-panel: #424242;
4
+ --theme-surface-background: #2b2b2b;
5
+ --theme-surface-modal: #373737;
6
+
7
+ --theme-legend-background: rgba(0, 0, 0, 0.12);
8
+
9
+ --theme-surface-dropdown: #515151;
10
+
11
+ --theme-modal-shadow-background: rgba(81, 81, 81, 0.5);
12
+ --theme-modal-background: #515151;
13
+ --theme-modal-translucent-background: #515151aa;
14
+
15
+ --theme-divider: rgba(255, 255, 255, 0.24);
16
+
17
+ --theme-text-primary: rgba(255, 255, 255, 0.87);
18
+ --theme-text-secondary: rgba(255, 255, 255, 0.64);
19
+ --theme-text-inactive: rgba(255, 255, 255, 0.32);
20
+ --theme-text-button-primary: #fcfcff;
21
+ --theme-text-button-invert: rgba(0, 0, 0, 0.72);
22
+
23
+ --theme-icon-primary: rgba(255, 255, 255, 0.64);
24
+ --theme-icon-secondary: rgba(255, 255, 255, 0.32);
25
+ --theme-icon-hover: rgba(255, 255, 255, 0.12);
26
+ --theme-icon-hover-on-selected: rgba(255, 255, 255, 0.24);
27
+
28
+ --theme-accent: #7bd3f6;
29
+
30
+ --theme-success: #4caf50;
31
+ --theme-warning: #ee7918;
32
+ --theme-error: #ef5350;
33
+ --theme-focus: #7bd3f6;
34
+
35
+ --theme-table-background: #424242;
36
+ --theme-table-header: #515151;
37
+ --theme-table-even-row: #494949;
38
+ --theme-table-hover-row: #494949;
39
+ --theme-table-selected-row: rgba(3, 169, 244, 0.08);
40
+ --theme-table-hover-selected-row: rgba(3, 169, 244, 0.16);
41
+ --theme-table-error: rgba(211, 47, 47, 0.3);
42
+
43
+ --theme-tooltip-background: rgba(40, 40, 40, 0.9);
44
+
45
+ --theme-alert-default-color: rgba(255, 255, 255, 0.87);
46
+ --theme-alert-default-background: #6d6d6d;
47
+ --theme-alert-success-color: #1e4620;
48
+ --theme-alert-success-background: #edf7ed;
49
+ --theme-alert-warning-color: #663c00;
50
+ --theme-alert-warning-background: #fff4e5;
51
+ --theme-alert-error-color: #5f2120;
52
+ --theme-alert-error-background: #fdeded;
53
+ --theme-alert-info-color: #014361;
54
+ --theme-alert-info-background: #e5f6fd;
55
+
56
+ --theme-grey-300: #e0e0e0;
57
+ --theme-grey-400: #bdbdbd;
58
+ --theme-grey-500: #9e9e9e;
59
+ --theme-grey-600: #757575;
60
+ --theme-grey-700: #616161;
61
+
62
+ --theme-overlay-4: rgba(123, 211, 246, 0.04);
63
+ --theme-overlay-8: rgba(123, 211, 246, 0.08);
64
+ --theme-overlay-10: rgba(123, 211, 246, 0.1);
65
+ --theme-overlay-12: rgba(123, 211, 246, 0.12);
66
+
67
+ --theme-button-elevated: #424242;
68
+ --theme-button-tonal: #435864;
69
+
70
+ --theme-input-filled: rgba(255, 255, 255, 0.08);
71
+ --theme-input-filled-hover: rgba(255, 255, 255, 0.16);
72
+
73
+ --theme-input-border: rgba(255, 255, 255, 0.4);
74
+ --theme-input-border-hover: rgba(255, 255, 255, 0.8);
75
+
76
+ --theme-selection-border: rgba(255, 255, 255, 0.6);
77
+ --theme-selection-border-disabled: rgba(255, 255, 255, 0.38);
78
+ --theme-selection-hover: rgba(255, 255, 255, 0.04);
79
+ --theme-selection-focused: rgba(255, 255, 255, 0.12);
80
+ --theme-selection-pressed: rgba(255, 255, 255, 0.1);
81
+ --theme-selection-selected-hover: rgba(255, 255, 255, 0.04);
82
+ --theme-selection-selected-focused: rgba(255, 255, 255, 0.12);
83
+ --theme-selection-selected-pressed: rgba(255, 255, 255, 0.1);
84
+
85
+ --theme-date-range: rgba(255, 255, 255, 0.12);
86
+
87
+ --theme-thumb: rgba(255, 255, 255, 0.16);
88
+ }
89
+
90
+ input::placeholder,
91
+ textarea::placeholder {
92
+ color: var(--theme-text-inactive);
93
+ }
94
+
95
+ .styledScroll::-webkit-scrollbar-thumb {
96
+ background-color: var(--theme-thumb);
97
+ }
@@ -0,0 +1,97 @@
1
+ :root {
2
+ --theme-surface-layout: #f8f8f8;
3
+ --theme-surface-panel: #ffffff;
4
+ --theme-surface-background: #ffffff;
5
+ --theme-surface-modal: #ffffff;
6
+
7
+ --theme-legend-background: rgba(0, 0, 0, 0.12);
8
+
9
+ --theme-surface-dropdown: #ffffff;
10
+
11
+ --theme-modal-shadow-background: rgba(255, 255, 255, 0.5);
12
+ --theme-modal-background: #ffffff;
13
+ --theme-modal-translucent-background: #515151aa;
14
+
15
+ --theme-divider: rgba(0, 0, 0, 0.12);
16
+
17
+ --theme-text-primary: rgba(0, 0, 0, 0.87);
18
+ --theme-text-secondary: rgba(0, 0, 0, 0.64);
19
+ --theme-text-inactive: rgba(0, 0, 0, 0.32);
20
+ --theme-text-button-primary: rgba(0, 0, 0, 0.72);
21
+ --theme-text-button-invert: #ffffff;
22
+
23
+ --theme-icon-primary: rgba(0, 0, 0, 0.64);
24
+ --theme-icon-secondary: rgba(0, 0, 0, 0.32);
25
+ --theme-icon-hover: #eeeeee;
26
+ --theme-icon-hover-on-selected: #e0e0e0;
27
+
28
+ --theme-accent: #03a9f4;
29
+
30
+ --theme-success: #2e7d32;
31
+ --theme-warning: #ee7918;
32
+ --theme-error: #d32f2f;
33
+ --theme-focus: #03a9f4;
34
+
35
+ --theme-table-background: #ffffff;
36
+ --theme-table-header: #f5f5f5;
37
+ --theme-table-even-row: #f5f5f5;
38
+ --theme-table-hover-row: #f5f5f5;
39
+ --theme-table-selected-row: rgba(3, 169, 244, 0.08);
40
+ --theme-table-hover-selected-row: rgba(3, 169, 244, 0.16);
41
+ --theme-table-error: rgba(211, 47, 47, 0.3);
42
+
43
+ --theme-tooltip-background: rgba(215, 215, 215, 0.9);
44
+
45
+ --theme-alert-default-color: rgba(0, 0, 0, 0.87);
46
+ --theme-alert-default-background: #ffffff;
47
+ --theme-alert-success-color: #1e4620;
48
+ --theme-alert-success-background: #edf7ed;
49
+ --theme-alert-warning-color: #663c00;
50
+ --theme-alert-warning-background: #fff4e5;
51
+ --theme-alert-error-color: #5f2120;
52
+ --theme-alert-error-background: ##fdeded;
53
+ --theme-alert-info-color: #014361;
54
+ --theme-alert-info-background: #e5f6fd;
55
+
56
+ --theme-grey-300: #e0e0e0;
57
+ --theme-grey-400: #bdbdbd;
58
+ --theme-grey-500: #9e9e9e;
59
+ --theme-grey-600: #757575;
60
+ --theme-grey-700: #616161;
61
+
62
+ --theme-overlay-4: rgba(255, 255, 255, 0.04);
63
+ --theme-overlay-8: rgba(255, 255, 255, 0.08);
64
+ --theme-overlay-10: rgba(255, 255, 255, 0.1);
65
+ --theme-overlay-12: rgba(255, 255, 255, 0.12);
66
+
67
+ --theme-button-elevated: rgba(3, 169, 244, 0.04);
68
+ --theme-button-tonal: rgba(3, 169, 244, 0.16);
69
+
70
+ --theme-input-filled: #f5f5f5;
71
+ --theme-input-filled-hover: #eeeeee;
72
+
73
+ --theme-input-border: rgba(0, 0, 0, 0.4);
74
+ --theme-input-border-hover: rgba(0, 0, 0, 0.8);
75
+
76
+ --theme-selection-border: rgba(0, 0, 0, 0.6);
77
+ --theme-selection-border-disabled: rgba(0, 0, 0, 0.32);
78
+ --theme-selection-hover: rgba(0, 0, 0, 0.04);
79
+ --theme-selection-focused: rgba(0, 0, 0, 0.12);
80
+ --theme-selection-pressed: rgba(0, 0, 0, 0.1);
81
+ --theme-selection-selected-hover: rgba(3, 169, 244, 0.04);
82
+ --theme-selection-selected-focused: rgba(3, 169, 244, 0.12);
83
+ --theme-selection-selected-pressed: rgba(3, 169, 244, 0.1);
84
+
85
+ --theme-date-range: rgba(3, 169, 244, 0.12);
86
+
87
+ --theme-thumb: rgba(0, 0, 0, 0.16);
88
+ }
89
+
90
+ input::placeholder,
91
+ textarea::placeholder {
92
+ color: var(--theme-text-inactive);
93
+ }
94
+
95
+ .styledScroll::-webkit-scrollbar-thumb {
96
+ background-color: var(--theme-thumb);
97
+ }