@kizmann/nano-ui 1.0.14 → 1.1.0

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 (73) hide show
  1. package/dist/nano-ui.css +1 -1
  2. package/dist/nano-ui.js +1 -1
  3. package/dist/nano-ui.js.map +1 -1
  4. package/dist/themes/dark.css +1 -1
  5. package/dist/themes/glossy.dark.css +1 -0
  6. package/dist/themes/glossy.light.css +1 -0
  7. package/dist/themes/light.css +1 -1
  8. package/package.json +1 -1
  9. package/src/button/src/button/button.jsx +12 -0
  10. package/src/button/src/button/button.scss +4 -1
  11. package/src/collapse/src/collapse-item/collapse-item.jsx +1 -1
  12. package/src/draggable/src/draglist/draglist.jsx +1 -1
  13. package/src/draggable/src/draglist-item/draglist-item.jsx +5 -2
  14. package/src/drawer/src/drawer/drawer.jsx +9 -3
  15. package/src/form/src/form/form.jsx +9 -4
  16. package/src/form/src/form-frame/form-frame.jsx +53 -21
  17. package/src/form/src/form-frame/form-frame.scss +7 -0
  18. package/src/form/src/form-group/form-group.jsx +31 -11
  19. package/src/form/src/form-item/form-item.jsx +9 -5
  20. package/src/info/src/info/info.jsx +1 -1
  21. package/src/modal/src/modal/modal.jsx +1 -1
  22. package/src/modal/src/modal/modal.scss +2 -2
  23. package/src/paginator/src/paginator/paginator.jsx +24 -29
  24. package/src/preview/index.js +2 -0
  25. package/src/preview/index.scss +1 -0
  26. package/src/preview/src/_tools/preview-handler.js +193 -0
  27. package/src/preview/src/_tools/preview-helper.js +142 -0
  28. package/src/preview/src/preview/preview.jsx +48 -115
  29. package/src/preview/src/preview/preview.scss +2 -1
  30. package/src/preview/src/preview-modal/preview-modal.jsx +156 -0
  31. package/src/preview/src/preview-modal/preview-modal.scss +56 -0
  32. package/src/preview/src/preview-video/preview-video.jsx +4 -60
  33. package/src/resizer/index.js +3 -1
  34. package/src/resizer/src/resizer/resizer-next.jsx +536 -0
  35. package/src/resizer/src/resizer/resizer.jsx +17 -11
  36. package/src/scrollbar/index.js +3 -1
  37. package/src/scrollbar/index.scss +1 -0
  38. package/src/scrollbar/src/scrollbar/scrollbar.scss +14 -8
  39. package/src/scrollbar/src/scrollbar-next/scrollbar-next.jsx +640 -0
  40. package/src/scrollbar/src/scrollbar-next/scrollbar-next.scss +148 -0
  41. package/src/select/src/select/select.jsx +12 -16
  42. package/src/select/src/select/select.scss +1 -1
  43. package/src/table/src/table/table.jsx +4 -7
  44. package/src/table/src/table/table.scss +15 -14
  45. package/src/table/src/table-cell/types/table-cell-image.jsx +9 -3
  46. package/src/table/src/table-column/table-column.jsx +11 -27
  47. package/src/table/src/table-filter/types/table-filter-datetime.jsx +1 -1
  48. package/src/tabs/src/tabs-item/tabs-item.jsx +1 -1
  49. package/src/tags/src/tags-item/tags-item.jsx +1 -2
  50. package/src/timepicker/src/timepicker-panel/timepicker-panel.jsx +15 -3
  51. package/src/timepicker/src/timepicker-panel/timepicker-panel.scss +2 -1
  52. package/src/virtualscroller/src/virtualscroller/virtualscroller.jsx +63 -30
  53. package/src/virtualscroller/src/virtualscroller/virtualscroller.scss +1 -0
  54. package/themes/glossy/button/index.scss +2 -0
  55. package/themes/glossy/button/src/button/button.scss +116 -0
  56. package/themes/glossy/button/src/button-group/button-group.scss +1 -0
  57. package/themes/glossy/index-dark.scss +3 -0
  58. package/themes/glossy/index-light.scss +3 -0
  59. package/themes/glossy/index.scss +43 -0
  60. package/themes/glossy/root/image/empty-default.svg +30 -0
  61. package/themes/glossy/root/image/empty-space.svg +34 -0
  62. package/themes/glossy/root/image/star-default.svg +10 -0
  63. package/themes/glossy/root/image/test.svg +1 -0
  64. package/themes/glossy/root/vars-dark.scss +234 -0
  65. package/themes/glossy/root/vars-light.scss +234 -0
  66. package/themes/glossy/root/vars.scss +233 -0
  67. package/themes/macos/button/src/button/button.scss +46 -8
  68. package/themes/macos/form/src/form-frame/form-frame.scss +2 -2
  69. package/themes/macos/index.scss +1 -0
  70. package/themes/macos/preview/index.scss +1 -0
  71. package/themes/macos/preview/src/preview-modal/preview-modal.scss +28 -0
  72. package/themes/macos/scrollbar/src/scrollbar/scrollbar.scss +1 -0
  73. package/themes/macos/table/src/table/table.scss +5 -0
@@ -0,0 +1,233 @@
1
+ @use "sass:color";
2
+
3
+ $color-white: #ffffff !default;
4
+ $color-black: #111111 !default;
5
+
6
+ $color-foreground: $color-white !default;
7
+ $color-background: $color-black !default;
8
+
9
+ $color-gray-05: color.mix($color-foreground, $color-background, 0.05 * 100%) !default;
10
+ $color-gray-10: color.mix($color-foreground, $color-background, 0.10 * 100%) !default;
11
+ $color-gray-15: color.mix($color-foreground, $color-background, 0.15 * 100%) !default;
12
+ $color-gray-20: color.mix($color-foreground, $color-background, 0.20 * 100%) !default;
13
+ $color-gray-25: color.mix($color-foreground, $color-background, 0.25 * 100%) !default;
14
+ $color-gray-30: color.mix($color-foreground, $color-background, 0.30 * 100%) !default;
15
+ $color-gray-35: color.mix($color-foreground, $color-background, 0.35 * 100%) !default;
16
+ $color-gray-40: color.mix($color-foreground, $color-background, 0.40 * 100%) !default;
17
+ $color-gray-45: color.mix($color-foreground, $color-background, 0.45 * 100%) !default;
18
+ $color-gray-50: color.mix($color-foreground, $color-background, 0.50 * 100%) !default;
19
+ $color-gray-55: color.mix($color-foreground, $color-background, 0.55 * 100%) !default;
20
+ $color-gray-60: color.mix($color-foreground, $color-background, 0.60 * 100%) !default;
21
+ $color-gray-65: color.mix($color-foreground, $color-background, 0.65 * 100%) !default;
22
+ $color-gray-70: color.mix($color-foreground, $color-background, 0.70 * 100%) !default;
23
+ $color-gray-75: color.mix($color-foreground, $color-background, 0.75 * 100%) !default;
24
+ $color-gray-80: color.mix($color-foreground, $color-background, 0.80 * 100%) !default;
25
+ $color-gray-85: color.mix($color-foreground, $color-background, 0.85 * 100%) !default;
26
+ $color-gray-90: color.mix($color-foreground, $color-background, 0.90 * 100%) !default;
27
+ $color-gray-95: color.mix($color-foreground, $color-background, 0.95 * 100%) !default;
28
+
29
+ $color-form: $color-gray-05 !default;
30
+ $color-input: $color-background !default;
31
+ $color-input-off: $color-gray-05 !default;
32
+
33
+ $color-secondary: #d31f9d !default;
34
+ $color-primary: #6e63da !default;
35
+
36
+ $color-success: #06C493 !default;
37
+ $color-warning: #FFBF3F !default;
38
+ $color-danger: #F9536E !default;
39
+ $color-info: #4BD6F9 !default;
40
+
41
+ $color-shadow: color.mix($color-black, $color-primary, 80%) !default;
42
+
43
+
44
+ $color-white-light: $color-white !default;
45
+ $color-white-lighter: $color-white !default;
46
+
47
+ $color-white-dark: color.mix($color-gray-50, $color-white, 5%) !default;
48
+ $color-white-darker: color.mix($color-gray-50, $color-white, 10%) !default;
49
+
50
+ $color-black-light: color.mix($color-gray-50, $color-black, 5%) !default;
51
+ $color-black-lighter: color.mix($color-gray-50, $color-black, 10%) !default;
52
+
53
+ $color-black-dark: $color-black !default;
54
+ $color-black-darker: $color-black !default;
55
+
56
+
57
+ $color-primary-light: color.adjust(color.mix($color-white, $color-primary, 10%), $lightness: 5%) !default;
58
+ $color-primary-lighter: color.adjust(color.mix($color-white, $color-primary, 20%), $lightness: 5%) !default;
59
+
60
+ $color-primary-dark: color.adjust(color.mix($color-black, $color-primary, 10%), $lightness: -5%) !default;
61
+ $color-primary-darker: color.adjust(color.mix($color-black, $color-primary, 20%), $lightness: -5%) !default;
62
+
63
+
64
+ $color-secondary-light: color.adjust(color.mix($color-white, $color-secondary, 10%), $lightness: 5%) !default;
65
+ $color-secondary-lighter: color.adjust(color.mix($color-white, $color-secondary, 20%), $lightness: 5%) !default;
66
+
67
+ $color-secondary-dark: color.adjust(color.mix($color-black, $color-secondary, 10%), $lightness: -5%) !default;
68
+ $color-secondary-darker: color.adjust(color.mix($color-black, $color-secondary, 20%), $lightness: -5%) !default;
69
+
70
+
71
+ $color-success-light: color.adjust(color.mix($color-white, $color-success, 10%), $lightness: 5%) !default;
72
+ $color-success-lighter: color.adjust(color.mix($color-white, $color-success, 20%), $lightness: 5%) !default;
73
+
74
+ $color-success-dark: color.adjust(color.mix($color-black, $color-success, 10%), $lightness: -5%) !default;
75
+ $color-success-darker: color.adjust(color.mix($color-black, $color-success, 20%), $lightness: -5%) !default;
76
+
77
+
78
+ $color-warning-light: color.adjust(color.mix($color-white, $color-warning, 10%), $lightness: 5%) !default;
79
+ $color-warning-lighter: color.adjust(color.mix($color-white, $color-warning, 20%), $lightness: 5%) !default;
80
+
81
+ $color-warning-dark: color.adjust(color.mix($color-black, $color-warning, 10%), $lightness: -5%) !default;
82
+ $color-warning-darker: color.adjust(color.mix($color-black, $color-warning, 20%), $lightness: -5%) !default;
83
+
84
+
85
+ $color-danger-light: color.adjust(color.mix($color-white, $color-danger, 10%), $lightness: 5%) !default;
86
+ $color-danger-lighter: color.adjust(color.mix($color-white, $color-danger, 20%), $lightness: 5%) !default;
87
+
88
+ $color-danger-dark: color.adjust(color.mix($color-black, $color-danger, 10%), $lightness: -5%) !default;
89
+ $color-danger-darker: color.adjust(color.mix($color-black, $color-danger, 20%), $lightness: -5%) !default;
90
+
91
+ $color-info-light: color.adjust(color.mix($color-white, $color-info, 10%), $lightness: 5%) !default;
92
+ $color-info-lighter: color.adjust(color.mix($color-white, $color-info, 20%), $lightness: 5%) !default;
93
+
94
+ $color-info-dark: color.adjust(color.mix($color-black, $color-info, 10%), $lightness: -5%) !default;
95
+ $color-info-darker: color.adjust(color.mix($color-black, $color-info, 20%), $lightness: -5%) !default;
96
+
97
+ $color-background-light: color.adjust(color.mix($color-white, $color-background, 10%), $lightness: 5%) !default;
98
+ $color-background-lighter: color.adjust(color.mix($color-white, $color-background, 20%), $lightness: 5%) !default;
99
+
100
+ $color-background-dark: color.adjust(color.mix($color-black, $color-background, 10%), $lightness: -5%) !default;
101
+ $color-background-darker: color.adjust(color.mix($color-black, $color-background, 20%), $lightness: -5%) !default;
102
+
103
+ $xs-radius: 4px !default;
104
+ $sm-radius: 6px !default;
105
+ $md-radius: 9px !default;
106
+ $lg-radius: 14px !default;
107
+ $xl-radius: 20px !default;
108
+
109
+ $form: (
110
+ 'xs': (
111
+ 'size': 26px,
112
+ 'font': 11px,
113
+ 'radius': $xs-radius,
114
+ 'ratio': 0.40,
115
+ ),
116
+ 'sm': (
117
+ 'size': 28px,
118
+ 'font': 13px,
119
+ 'radius': $sm-radius,
120
+ 'ratio': 0.40,
121
+ ),
122
+ 'md': (
123
+ 'size': 32px,
124
+ 'font': 15px,
125
+ 'radius': $md-radius,
126
+ 'ratio': 0.40,
127
+ ),
128
+ 'lg': (
129
+ 'size': 36px,
130
+ 'font': 16px,
131
+ 'radius': $lg-radius,
132
+ 'ratio': 0.40,
133
+ ),
134
+ ) !default;
135
+
136
+ $colors: (
137
+ 'primary': (
138
+ 'base': $color-primary,
139
+ 'light': $color-primary-light,
140
+ 'dark': $color-primary-dark
141
+ ),
142
+ 'secondary': (
143
+ 'base': $color-secondary,
144
+ 'light': $color-secondary-light,
145
+ 'dark': $color-secondary-dark
146
+ ),
147
+ 'info': (
148
+ 'base': $color-info,
149
+ 'light': $color-info-light,
150
+ 'dark': $color-info-dark
151
+ ),
152
+ 'success': (
153
+ 'base': $color-success,
154
+ 'light': $color-success-light,
155
+ 'dark': $color-success-dark
156
+ ),
157
+ 'warning': (
158
+ 'base': $color-warning,
159
+ 'light': $color-warning-light,
160
+ 'dark': $color-warning-dark
161
+ ),
162
+ 'danger': (
163
+ 'base': $color-danger,
164
+ 'light': $color-danger-light,
165
+ 'dark': $color-danger-dark
166
+ ),
167
+ ) !default;
168
+
169
+ $popover: (
170
+ 'default': (
171
+ 'color': $color-foreground,
172
+ 'border': $color-gray-15,
173
+ 'header': $color-form,
174
+ 'body': $color-form,
175
+ 'footer': $color-form,
176
+ ),
177
+ 'negative': (
178
+ 'color': $color-background,
179
+ 'border': $color-gray-95,
180
+ 'header': $color-foreground,
181
+ 'body': $color-foreground,
182
+ 'footer': $color-foreground,
183
+ )
184
+ ) !default;
185
+
186
+ $modal: (
187
+ 'default': (
188
+ 'color': $color-foreground,
189
+ 'border': $color-gray-10,
190
+ 'header': color.mix($color-background, $color-form, 50%),
191
+ 'body': $color-background,
192
+ 'footer': $color-background,
193
+ ),
194
+ 'preview': (
195
+ 'color': $color-white,
196
+ 'border': $color-gray-95,
197
+ 'header': $color-black,
198
+ 'body': $color-black,
199
+ 'footer': $color-black,
200
+ )
201
+ ) !default;
202
+
203
+ $drawer: (
204
+ 'default': (
205
+ 'color': $color-foreground,
206
+ 'border': $color-gray-10,
207
+ 'header': color.mix($color-background, $color-form, 50%),
208
+ 'body': $color-background,
209
+ 'footer': $color-background,
210
+ )
211
+ ) !default;
212
+
213
+ $colors-tags: (
214
+ '0': color.mix($color-secondary, $color-secondary, 65%),
215
+ '1': color.mix($color-primary, $color-secondary, 65%),
216
+ '2': color.mix($color-danger, $color-secondary, 65%),
217
+ '3': color.mix($color-success, $color-secondary, 65%),
218
+ '4': color.mix($color-warning, $color-secondary, 65%),
219
+ '5': color.mix($color-primary, $color-success, 65%),
220
+ '6': color.mix($color-secondary, $color-success, 65%),
221
+ '7': color.mix($color-danger, $color-success, 65%),
222
+ '8': color.mix($color-success, $color-success, 65%),
223
+ '9': color.mix($color-warning, $color-success, 65%),
224
+ '10': color.mix($color-primary, $color-danger, 65%),
225
+ '11': color.mix($color-secondary, $color-danger, 65%),
226
+ '12': color.mix($color-danger, $color-danger, 65%),
227
+ '13': color.mix($color-success, $color-danger, 65%),
228
+ '14': color.mix($color-warning, $color-danger, 65%),
229
+ '15': color.mix($color-primary, $color-warning, 65%),
230
+ '16': color.mix($color-secondary, $color-warning, 65%),
231
+ '17': color.mix($color-danger, $color-warning, 65%),
232
+ '18': color.mix($color-success, $color-warning, 65%),
233
+ ) !default;
@@ -5,12 +5,36 @@
5
5
  opacity: 0.7;
6
6
  }
7
7
 
8
- .n-button--default:not(.n-button--link) {
9
- color: $color-foreground;
10
- background: rgba($color-foreground, 0.05);
8
+ .n-button--default:not(.n-button--link,.n-button--glass) {
9
+ color: rgba($color-foreground, 0.8);
10
+ background: rgba($color-foreground, 0.1);
11
11
  }
12
12
 
13
- .n-button--default:not(.n-button--link):hover {
13
+ .n-button--default:not(.n-button--link,.n-button--glass):hover {
14
+ color: rgba($color-foreground, 0.9);
15
+ background: rgba($color-foreground, 0.15);
16
+ }
17
+
18
+ .n-button--default:not(.n-button--link,.n-button--glass).n-disabled {
19
+ color: rgba($color-foreground, 0.8);
20
+ background: rgba($color-foreground, 0.1);
21
+ }
22
+
23
+ .n-button--default.n-button--link:not(.n-disabled) {
24
+ color: rgba($color-foreground, 0.8);
25
+ }
26
+
27
+ .n-button--default.n-button--link:not(.n-disabled):hover {
28
+ color: rgba($color-foreground, 0.9);
29
+ }
30
+
31
+ .n-button--default.n-button--glass:not(.n-disabled) {
32
+ color: rgba($color-foreground, 0.8);
33
+ background: rgba($color-foreground, 0.1);
34
+ }
35
+
36
+ .n-button--default.n-button--glass:not(.n-disabled):hover {
37
+ color: rgba($color-foreground, 0.9);
14
38
  background: rgba($color-foreground, 0.15);
15
39
  }
16
40
 
@@ -24,23 +48,23 @@
24
48
  * Button primary
25
49
  */
26
50
 
27
- .n-button--#{$color}:not(.n-button--link) {
51
+ .n-button--#{$color}:not(.n-button--link,.n-button--glass) {
28
52
  color: $color-white;
29
53
  background: $-color-base;
30
54
  border-color: $-color-base;
31
55
  }
32
56
 
33
- .n-button--#{$color}:not(.n-button--link):hover {
57
+ .n-button--#{$color}:not(.n-button--link,.n-button--glass):hover {
34
58
  background: $-color-light;
35
59
  border-color: $-color-light;
36
60
  }
37
61
 
38
- .n-button--#{$color}:not(.n-button--link):focus {
62
+ .n-button--#{$color}:not(.n-button--link,.n-button--glass):focus {
39
63
  background: $-color-dark;
40
64
  border-color: $-color-dark;
41
65
  }
42
66
 
43
- .n-button--#{$color}:not(.n-button--link).n-disabled {
67
+ .n-button--#{$color}:not(.n-button--link,.n-button--glass).n-disabled {
44
68
  background: $-color-base;
45
69
  border-color: $-color-base;
46
70
  }
@@ -57,4 +81,18 @@
57
81
  color: $-color-dark;
58
82
  }
59
83
 
84
+ .n-button--#{$color}:not(.n-disabled).n-button--glass {
85
+ color: $-color-base;
86
+ background: rgba($-color-base, 0.25);
87
+ }
88
+
89
+ .n-button--#{$color}:not(.n-disabled).n-button--glass:hover {
90
+ color: $-color-dark;
91
+ background: rgba($-color-base, 0.35);
92
+ }
93
+
94
+ .n-button--#{$color}:not(.n-disabled).n-button--glass:focus {
95
+ color: $-color-dark;
96
+ }
97
+
60
98
  }
@@ -19,7 +19,7 @@
19
19
  background: $-color-base;
20
20
  }
21
21
 
22
- .n-form-frame__menu--#{$color}.is-first {
22
+ .n-form-frame__menu--#{$color}.is-star {
23
23
  background: rgba($-color-base, 0.15);
24
24
  }
25
25
 
@@ -27,7 +27,7 @@
27
27
  color: $-color-base;
28
28
  }
29
29
 
30
- .n-form-frame__menu--#{$color}.is-visible span {
30
+ .n-form-frame__menu--#{$color}.is-star span {
31
31
  color: $-color-base;
32
32
  }
33
33
 
@@ -35,6 +35,7 @@
35
35
  @import "./rating/index";
36
36
  @import "./slider/index";
37
37
  @import "./drawer/index";
38
+ @import "./preview/index";
38
39
 
39
40
  @import "./demo/index";
40
41
 
@@ -0,0 +1 @@
1
+ @import "./src/preview-modal/preview-modal";
@@ -0,0 +1,28 @@
1
+ @use 'sass:map';
2
+ @import "../../../root/vars";
3
+
4
+ .n-preview-modal {
5
+ background: rgba($color-black, 0.95);
6
+ backdrop-filter: blur(10px);
7
+ transition: opacity 0.3s;
8
+ }
9
+
10
+ .n-preview-modal__close,
11
+ .n-preview-modal__prev,
12
+ .n-preview-modal__next {
13
+ border-radius: 500px;
14
+ color: $color-white;
15
+ background: rgba($color-white, 0.25);
16
+ transition: background 0.2s;
17
+ }
18
+
19
+ .n-preview-modal__close:hover,
20
+ .n-preview-modal__prev:hover,
21
+ .n-preview-modal__next:hover {
22
+ background: rgba($color-white, 0.35);
23
+ }
24
+
25
+ .n-preview-modal .n-preview-frame {
26
+ background: transparent !important;
27
+ }
28
+
@@ -4,3 +4,4 @@
4
4
  .n-scrollbar-h:before {
5
5
  background: rgba($color-foreground, 0.4);
6
6
  }
7
+
@@ -1,6 +1,11 @@
1
1
  @import "../../../root/vars";
2
2
 
3
+ .n-table {
4
+ border-radius: $md-radius + 2;
5
+ }
6
+
3
7
  .n-table:before {
8
+ border-radius: $md-radius + 2;
4
9
  border: 1px solid $color-gray-15;
5
10
  }
6
11