@kizmann/nano-ui 0.9.4 → 0.9.6

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 (126) hide show
  1. package/demos/builder.html +18 -8
  2. package/demos/overview.html +1 -1
  3. package/dist/nano-ui.css +1 -1
  4. package/dist/nano-ui.js +2 -2
  5. package/dist/nano-ui.js.map +1 -1
  6. package/dist/themes/dark.css +2 -0
  7. package/dist/themes/light.css +1 -1
  8. package/package.json +1 -1
  9. package/src/config/src/builder/builder.js +85 -16
  10. package/src/config/src/builder/builder.scss +9 -1
  11. package/src/config/src/config/config-next.js +16 -2
  12. package/src/datetimepicker/src/datetimepicker/datetimepicker.scss +2 -2
  13. package/src/empty/src/empty-icon/empty-icon.js +12 -0
  14. package/src/empty/src/empty-icon/empty-icon.scss +10 -0
  15. package/src/preview/src/preview/preview.js +19 -1
  16. package/src/preview/src/preview-image/preview-image.js +2 -1
  17. package/src/select/src/select/select.js +1 -1
  18. package/src/slider/src/slider/slider.scss +1 -6
  19. package/src/table/src/table/table.scss +4 -0
  20. package/src/tags/src/tags-item/tags-item.scss +1 -1
  21. package/themes/macos/alert/index.scss +1 -0
  22. package/themes/macos/alert/src/alert/alert.scss +26 -0
  23. package/themes/macos/button/index.scss +2 -0
  24. package/themes/macos/button/src/button/button.scss +46 -0
  25. package/themes/macos/button/src/button-group/button-group.scss +1 -0
  26. package/themes/macos/cascader/index.scss +2 -0
  27. package/themes/macos/cascader/src/cascader/cascader.scss +46 -0
  28. package/themes/macos/cascader/src/cascader-panel/cascader-panel.scss +14 -0
  29. package/themes/macos/checkbox/index.scss +2 -0
  30. package/themes/macos/checkbox/src/checkbox/checkbox.scss +44 -0
  31. package/themes/macos/checkbox/src/checkbox-group/checkbox-group.scss +1 -0
  32. package/themes/macos/collapse/index.scss +2 -0
  33. package/themes/macos/collapse/src/collapse/collapse.scss +21 -0
  34. package/themes/macos/collapse/src/collapse-item/collapse-item.scss +21 -0
  35. package/themes/macos/confirm/index.scss +1 -0
  36. package/themes/macos/confirm/src/confirm/confirm.scss +13 -0
  37. package/themes/macos/datepicker/index.scss +2 -0
  38. package/themes/macos/datepicker/src/datepicker/datepicker.scss +50 -0
  39. package/themes/macos/datepicker/src/datepicker-panel/datepicker-panel.scss +44 -0
  40. package/themes/macos/datetimepicker/index.scss +1 -0
  41. package/themes/macos/datetimepicker/src/datetimepicker/datetimepicker.scss +67 -0
  42. package/themes/macos/demo/index.scss +1 -0
  43. package/themes/macos/demo/src/demo/demo.scss +22 -0
  44. package/themes/macos/draggable/index.scss +9 -0
  45. package/themes/macos/draggable/src/draggrid/draggrid.scss +13 -0
  46. package/themes/macos/draggable/src/draggrid-item/draggrid-item.scss +65 -0
  47. package/themes/macos/draggable/src/draghandler/draghandler.scss +15 -0
  48. package/themes/macos/draggable/src/draglist/draglist.scss +13 -0
  49. package/themes/macos/draggable/src/draglist-item/draglist-item.scss +72 -0
  50. package/themes/macos/draggable/src/dropzone/dropzone.scss +13 -0
  51. package/themes/macos/durationpicker/index.scss +1 -0
  52. package/themes/macos/durationpicker/src/durationpicker/durationpicker.scss +52 -0
  53. package/themes/macos/empty/index.scss +1 -0
  54. package/themes/macos/empty/src/empty-icon/empty-icon.scss +13 -0
  55. package/themes/macos/file/index.scss +1 -0
  56. package/themes/macos/file/src/file/file.scss +38 -0
  57. package/themes/macos/form/index.scss +3 -0
  58. package/themes/macos/form/src/form/form.scss +1 -0
  59. package/themes/macos/form/src/form-group/form-group.scss +17 -0
  60. package/themes/macos/form/src/form-item/form-item.scss +29 -0
  61. package/themes/macos/index-dark.scss +41 -0
  62. package/themes/macos/index-light.scss +41 -0
  63. package/themes/macos/index.scss +41 -0
  64. package/themes/macos/info/index.scss +3 -0
  65. package/themes/macos/info/src/info/info.scss +5 -0
  66. package/themes/macos/info/src/info-column/info-column.scss +5 -0
  67. package/themes/macos/info/src/info-field/info-field.scss +5 -0
  68. package/themes/macos/input/index.scss +1 -0
  69. package/themes/macos/input/src/input/input.scss +38 -0
  70. package/themes/macos/input-number/index.scss +1 -0
  71. package/themes/macos/input-number/src/input-number/input-number.scss +47 -0
  72. package/themes/macos/loader/index.scss +1 -0
  73. package/themes/macos/loader/src/loader/loader.scss +21 -0
  74. package/themes/macos/map/index.scss +1 -0
  75. package/themes/macos/map/src/map/map.scss +1 -0
  76. package/themes/macos/modal/index.scss +1 -0
  77. package/themes/macos/modal/src/modal/modal.scss +34 -0
  78. package/themes/macos/notification/index.scss +1 -0
  79. package/themes/macos/notification/src/notification/notification.scss +24 -0
  80. package/themes/macos/paginator/index.scss +1 -0
  81. package/themes/macos/paginator/src/paginator/paginator.scss +5 -0
  82. package/themes/macos/popover/index.scss +1 -0
  83. package/themes/macos/popover/src/popover/popover.scss +83 -0
  84. package/themes/macos/radio/index.scss +2 -0
  85. package/themes/macos/radio/src/radio/radio.scss +45 -0
  86. package/themes/macos/radio/src/radio-group/radio-group.scss +1 -0
  87. package/themes/macos/rating/index.scss +1 -0
  88. package/themes/macos/rating/src/rating/rating.scss +18 -0
  89. package/themes/macos/resizer/index.scss +1 -0
  90. package/themes/macos/resizer/src/resizer/resizer.scss +5 -0
  91. package/themes/macos/root/image/empty-default.svg +30 -0
  92. package/themes/macos/root/image/empty-space.svg +34 -0
  93. package/themes/macos/root/image/star-default.svg +10 -0
  94. package/themes/macos/root/vars-dark.scss +221 -0
  95. package/themes/macos/root/vars-light.scss +221 -0
  96. package/themes/macos/root/vars.scss +220 -0
  97. package/themes/macos/scrollbar/index.scss +1 -0
  98. package/themes/macos/scrollbar/src/scrollbar/scrollbar.scss +6 -0
  99. package/themes/macos/select/index.scss +2 -0
  100. package/themes/macos/select/src/select/select.scss +48 -0
  101. package/themes/macos/select/src/select-option/select-option.scss +1 -0
  102. package/themes/macos/slider/index.scss +1 -0
  103. package/themes/macos/slider/src/slider/slider.scss +21 -0
  104. package/themes/macos/switch/index.scss +1 -0
  105. package/themes/macos/switch/src/switch/switch.scss +28 -0
  106. package/themes/macos/table/index.scss +4 -0
  107. package/themes/macos/table/src/table/table.scss +15 -0
  108. package/themes/macos/table/src/table-cell/table-cell.scss +50 -0
  109. package/themes/macos/table/src/table-column/table-column.scss +32 -0
  110. package/themes/macos/table/src/table-filter/table-filter.scss +1 -0
  111. package/themes/macos/tabs/index.scss +2 -0
  112. package/themes/macos/tabs/src/tabs/tabs.scss +21 -0
  113. package/themes/macos/tabs/src/tabs-item/tabs-item.scss +18 -0
  114. package/themes/macos/tags/index.scss +2 -0
  115. package/themes/macos/tags/src/tags/tags.scss +1 -0
  116. package/themes/macos/tags/src/tags-item/tags-item.scss +28 -0
  117. package/themes/macos/textarea/index.scss +1 -0
  118. package/themes/macos/textarea/src/textarea/textarea.scss +30 -0
  119. package/themes/macos/timepicker/index.scss +2 -0
  120. package/themes/macos/timepicker/src/timepicker/timepicker.scss +50 -0
  121. package/themes/macos/timepicker/src/timepicker-panel/timepicker-panel.scss +27 -0
  122. package/themes/macos/transfer/index.scss +1 -0
  123. package/themes/macos/transfer/src/transfer/transfer.scss +18 -0
  124. package/themes/macos/virtualscroller/index.scss +1 -0
  125. package/themes/macos/virtualscroller/src/virtualscroller/virtualscroller.scss +1 -0
  126. package/webpack.config.js +32 -86
@@ -173,16 +173,32 @@ export default {
173
173
  ...Obj.except(child, ['content']), content: {}, builder: this.buildProps(child),
174
174
  });
175
175
 
176
- Obj.each(child.content || {}, (value, key) => {
176
+ if ( Any.isArray(child.content) ) {
177
+ child.content = Arr.first(child.content);
178
+ }
177
179
 
178
- if ( ! key.match(':') ) {
179
- key += ':' + UUID();
180
- }
180
+ if ( ! Any.isPlain(child.content) && ! Any.isString(child.content) ) {
181
+ child.content = {};
182
+ }
183
+
184
+ result.builder["null"] = {
185
+ type: typeof child.content
186
+ }
187
+
188
+ if (Any.isPlain(child.content)) {
189
+ Obj.each(child.content || {}, (value, key) => {
181
190
 
182
- result['content'][key] = Obj.assign(this.normalizeChild(value), {
183
- order: (Any.vals(result['content']).length + 1) * 100
191
+ if ( ! key.match(':') ) {
192
+ key += ':' + UUID();
193
+ }
194
+
195
+ result['content'][key] = Obj.assign(this.normalizeChild(value), {
196
+ order: (Any.vals(result['content']).length + 1) * 100
197
+ });
184
198
  });
185
- });
199
+ } else {
200
+ result.content = child.content;
201
+ }
186
202
 
187
203
  return result;
188
204
  },
@@ -239,7 +255,6 @@ export default {
239
255
 
240
256
  if ( prop.code === 'number' ) {
241
257
  realvalue = Any.number(prop.value, 0);
242
- console.log('num', prop.value, realvalue)
243
258
  }
244
259
 
245
260
  if ( prop.code === 'object' ) {
@@ -289,6 +304,23 @@ export default {
289
304
  });
290
305
  },
291
306
 
307
+ changeType(key, type)
308
+ {
309
+ let value = Obj.get(this, key, {});
310
+
311
+ let original = Obj.get(value, 'builder.null.type');
312
+
313
+ if ( type === 'object' ) {
314
+ value.content = {};
315
+ }
316
+
317
+ if ( type === 'string' ) {
318
+ value.content = '';
319
+ }
320
+
321
+ Obj.set(value, 'builder.null.type', typeof value.content);
322
+ },
323
+
292
324
  applyProps(key = null, value = {})
293
325
  {
294
326
  if ( ! Any.isEmpty(key) ) {
@@ -584,6 +616,10 @@ export default {
584
616
 
585
617
  renderProp(el, sub, key)
586
618
  {
619
+ if ( sub === "null" ) {
620
+ return null;
621
+ }
622
+
587
623
  let group = key.replace(/^.*?([^\.]+):([^\.]+)$/, '$1')
588
624
  let value = Obj.get(this.$data, `${key}.builder.${sub}`, {});
589
625
 
@@ -592,20 +628,17 @@ export default {
592
628
  props = Obj.assign({}, global.NanoBuilderProps, props);
593
629
 
594
630
  Obj.each(props, (prop, index) => {
595
- console.log(prop.for, index, value.type)
596
631
  if ( ! Any.isEmpty(prop.for) && ! Arr.has(prop.for, value.type) ) {
597
632
  props = Obj.unset(props, index);
598
633
  }
599
634
  });
600
635
 
601
- console.log(props);
602
-
603
636
  let typeProps = {
604
637
  size: 'sm', options: global.NanoBuilderPropType
605
638
  };
606
639
 
607
640
  typeProps['onUpdate:modelValue'] = () => {
608
- this.applyProps(key);
641
+ this.$nextTick(() => this.applyProps(key));
609
642
  };
610
643
 
611
644
  let keyProps = {
@@ -694,8 +727,20 @@ export default {
694
727
  modelValue: key.replace(/^.*?([^\.]+):([^\.]+)$/, '$2'),
695
728
  };
696
729
 
697
- aliasProps['onBlur'] = (e) => {
698
- this.changeAlias(key, e.target.value);
730
+ aliasProps['onUpdate:modelValue'] = (value) => {
731
+ this.changeAlias(key, value);
732
+ };
733
+
734
+ let plainProps = {
735
+ modelValue: Obj.get(value, 'builder.null.type'),
736
+ options: {
737
+ 'object': this.trans('Object'),
738
+ 'string': this.trans('String'),
739
+ }
740
+ };
741
+
742
+ plainProps['onUpdate:modelValue'] = (value) => {
743
+ this.changeType(key, value);
699
744
  };
700
745
 
701
746
  let addProps = {
@@ -720,6 +765,9 @@ export default {
720
765
  <NFormItem class="n-builder__element-alias" label={this.trans('Alias')}>
721
766
  <NInput {...aliasProps} />
722
767
  </NFormItem>
768
+ <NFormItem class="n-builder__element-plain" label={this.trans('Content')}>
769
+ <NSelect {...plainProps}>{this.trans('Enable plain')}</NSelect>
770
+ </NFormItem>
723
771
  <div class="n-builder__element-prop">
724
772
  <NButton {...addProps}>Add property</NButton>
725
773
  </div>
@@ -740,11 +788,21 @@ export default {
740
788
  classList.push('is-open');
741
789
  }
742
790
 
791
+ let builderHtml = () => {
792
+ return this.ctor('renderBuilder')(value.content || {}, `${key}.content`);
793
+ };
794
+
795
+ if ( value.builder["null"]["type"] === 'string' ) {
796
+ builderHtml = () => {
797
+ return (<div><NInput vModel={value.content} /></div>);
798
+ };
799
+ }
800
+
743
801
  return (
744
802
  <div class={classList}>
745
803
  {this.ctor('renderTools')(el, value, key)}
746
804
  {this.ctor('renderProps')(el, value, key)}
747
- {this.ctor('renderBuilder')(value.content || {}, `${key}.content`)}
805
+ {builderHtml()}
748
806
  </div>
749
807
  );
750
808
  },
@@ -755,9 +813,20 @@ export default {
755
813
  return null;
756
814
  }
757
815
 
816
+ let items = Arr.each(Obj.sort(Obj.clone(el), 'order'), (v) => {
817
+
818
+ let args = [
819
+ Obj.get(this.$data, key, {}),
820
+ Obj.get(this.$data, [key, v._key], {}),
821
+ `${key}.${v._key}`
822
+ ];
823
+
824
+ return this.ctor('renderElement')(...args);
825
+ });
826
+
758
827
  return (
759
828
  <div class="n-builder__frame">
760
- {Arr.each(Obj.sort(Obj.clone(el), 'order'), (v) => this.ctor('renderElement')(Obj.get(this.$data, key, {}), Obj.get(this.$data, [key, v._key], {}), `${key}.${v._key}`))}
829
+ {items}
761
830
  </div>
762
831
  );
763
832
  },
@@ -131,7 +131,7 @@ div:not(.n-builder__body) > .n-builder__frame {
131
131
 
132
132
  .n-builder__props .n-builder__element-type,
133
133
  .n-builder__props .n-builder__element-alias {
134
- width: calc(50% - 10px);
134
+ width: calc(40% - 10px);
135
135
  }
136
136
 
137
137
  .n-builder__props .n-builder__element-prop {
@@ -145,6 +145,10 @@ div:not(.n-builder__body) > .n-builder__frame {
145
145
  width: 100%;
146
146
  }
147
147
 
148
+ .n-builder__element-plain {
149
+ width: calc(20% - 10px);
150
+ }
151
+
148
152
  .n-builder__props .n-form-item__label {
149
153
  font-size: 12px;
150
154
  }
@@ -237,6 +241,10 @@ div:not(.n-builder__body) > .n-builder__frame {
237
241
  margin-right: 10px;
238
242
  }
239
243
 
244
+ .n-builder_prop-i18n {
245
+ flex: 0 0 auto;
246
+ }
247
+
240
248
  .n-builder_prop-text {
241
249
  flex: 0 0 auto;
242
250
  width: 100%;
@@ -66,6 +66,20 @@ export default {
66
66
 
67
67
  methods: {
68
68
 
69
+ getString(value)
70
+ {
71
+ let final = value.replace(/^@/, '')
72
+ .replace(/^\\@/, '@');
73
+
74
+
75
+
76
+ if ( value.match(/^@/) ) {
77
+ return this.trans(final);
78
+ }
79
+
80
+ return final;
81
+ },
82
+
69
83
  propAwait(value)
70
84
  {
71
85
  if ( Any.isEmpty(value) ) {
@@ -180,7 +194,7 @@ export default {
180
194
  }
181
195
 
182
196
  if ( ! value.match(/(\$scope|\$model|\$global)/) ) {
183
- return value;
197
+ return this.getString(value);
184
198
  }
185
199
 
186
200
  let sources = {
@@ -316,7 +330,7 @@ export default {
316
330
  }
317
331
 
318
332
  if ( Any.isString(setup.content) ) {
319
- render = () => setup.content;
333
+ render = () => this.getString(setup.content);
320
334
  }
321
335
 
322
336
  return h(component, props, { default: render });
@@ -123,12 +123,12 @@
123
123
 
124
124
  .n-datetimepicker__date-panel.n-datepicker-panel {
125
125
  border: none;
126
+ border-radius: 0;
126
127
  }
127
128
 
128
129
  .n-datetimepicker__time-panel.n-timepicker-panel {
129
130
  border: none;
130
- border-left: 1px solid $color-gray-10;
131
- background: rgba($color-gray-05, 0.5);
131
+ border-radius: 0;
132
132
  }
133
133
 
134
134
  .n-datetimepicker__empty {
@@ -26,6 +26,14 @@ export default {
26
26
  return false;
27
27
  },
28
28
  type: [Boolean]
29
+ },
30
+
31
+ inline: {
32
+ default()
33
+ {
34
+ return false;
35
+ },
36
+ type: [Boolean]
29
37
  }
30
38
 
31
39
  },
@@ -42,6 +50,10 @@ export default {
42
50
  classList.push('n-disabled');
43
51
  }
44
52
 
53
+ if ( this.inline ) {
54
+ classList.push('n-inline');
55
+ }
56
+
45
57
  return (
46
58
  <div class={classList}>
47
59
  <div class="n-empty-icon__frame">
@@ -10,6 +10,11 @@
10
10
  margin: 0 auto;
11
11
  }
12
12
 
13
+ .n-empty-icon.n-inline {
14
+ flex-direction: row;
15
+ width: auto;
16
+ }
17
+
13
18
  .n-empty-icon__frame {
14
19
  display: block;
15
20
  width: 35%;
@@ -18,6 +23,11 @@
18
23
  opacity: 0.3;
19
24
  }
20
25
 
26
+ .n-empty-icon.n-inline .n-empty-icon__frame {
27
+ width: 36px;
28
+ margin: 0 10px 0 0;
29
+ }
30
+
21
31
  .n-empty-icon.n-disabled .n-empty-icon__frame {
22
32
  display: none;
23
33
  }
@@ -46,6 +46,14 @@ export default {
46
46
  type: [String]
47
47
  },
48
48
 
49
+ mime: {
50
+ default()
51
+ {
52
+ return null;
53
+ },
54
+ typre: [String]
55
+ },
56
+
49
57
  preview: {
50
58
  default()
51
59
  {
@@ -129,11 +137,19 @@ export default {
129
137
  fallback = 'video';
130
138
  }
131
139
 
140
+ if ( Any.isString(this.mime) ) {
141
+ fallback = this.mime;
142
+ }
143
+
132
144
  return fallback;
133
145
  },
134
146
 
135
147
  getThumbMime(fallback = null)
136
148
  {
149
+ if ( Any.isString(this.mime) ) {
150
+ return this.mime;
151
+ }
152
+
137
153
  let file = Obj.get(this.tempThumb, 'name',
138
154
  this.tempThumb);
139
155
 
@@ -236,8 +252,10 @@ export default {
236
252
  props.onClick = this.showLightbox;
237
253
  }
238
254
 
255
+ let key = btoa(this.tempThumb);
256
+
239
257
  return (
240
- <div class={classList} {...props}>
258
+ <div key={key} class={classList} {...props}>
241
259
  { [this.ctor('renderPreview')(), this.ctor('renderLightbox')()] }
242
260
  </div>
243
261
  );
@@ -32,6 +32,7 @@ export default {
32
32
  if ( ! Arr.has(window.ImageCache, this.src) ) {
33
33
  this.tempSrc = this.src;
34
34
  }
35
+
35
36
  },
36
37
 
37
38
  mounted()
@@ -51,7 +52,7 @@ export default {
51
52
 
52
53
  resolveLoad()
53
54
  {
54
- if ( ! Arr.has(window.ImageCache, this.src) ) {
55
+ if ( Arr.has(window.ImageCache, this.src) ) {
55
56
  return;
56
57
  }
57
58
 
@@ -750,7 +750,7 @@ export default {
750
750
  {
751
751
  let emptyHtml = (
752
752
  <div class="n-select__empty">
753
- <NEmptyIcon>{this.trans(this.emptyText)}</NEmptyIcon>
753
+ <NEmptyIcon inline={true}>{this.trans(this.emptyText)}</NEmptyIcon>
754
754
  </div>
755
755
  );
756
756
 
@@ -14,7 +14,6 @@
14
14
  right: 0;
15
15
  margin-top: -3px;
16
16
  height: 6px;
17
- background: $color-gray-10;
18
17
  border-radius: 500px;
19
18
  }
20
19
 
@@ -24,7 +23,6 @@
24
23
  left: 0;
25
24
  right: 0;
26
25
  bottom: 0;
27
- background: $color-primary;
28
26
  }
29
27
 
30
28
  .n-slider__handle {
@@ -36,8 +34,7 @@
36
34
  width: 20px;
37
35
  height: 20px;
38
36
  margin: -10px 0 0 -10px;
39
- background: $color-white;
40
- border: 2px solid $color-primary;
37
+ border: 2px solid transparent;
41
38
  border-radius: 500px;
42
39
  }
43
40
 
@@ -51,9 +48,7 @@
51
48
  font-size: 13px;
52
49
  display: inline-block;
53
50
  opacity: 0;
54
- color: $color-white;
55
51
  transform: translate(-50%, -25%);
56
- background: rgba($color-black, 0.8);
57
52
  transition: opacity 0.3s;
58
53
  }
59
54
 
@@ -9,6 +9,10 @@
9
9
  border-radius: $md-radius + 2;
10
10
  }
11
11
 
12
+ .n-table .n-table__header {
13
+ border-radius: $md-radius + 2 $md-radius + 2 0 0;
14
+ }
15
+
12
16
  .n-table .n-table__wrap,
13
17
  .n-table .n-table__inner,
14
18
  .n-table > .n-scrollbar,
@@ -7,7 +7,6 @@
7
7
  align-items: center;
8
8
  justify-content: flex-start;
9
9
  max-width: 160px;
10
- border-radius: $sm-radius;
11
10
  background: $color-gray-10;
12
11
  }
13
12
 
@@ -33,6 +32,7 @@
33
32
  $-tags-item-ratio: map-get($values, 'ratio');
34
33
 
35
34
  .n-tags-item--#{$suffix} {
35
+ border-radius: $-tags-item-radius;
36
36
  padding: 0 $-tags-item-size * 0.3 0 $-tags-item-size * 0.3;
37
37
  }
38
38
 
@@ -0,0 +1 @@
1
+ @import "./src/alert/alert";
@@ -0,0 +1,26 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-alert-backdrop {
4
+ background: rgba($color-black, 0.8);
5
+ }
6
+
7
+ .n-alert {
8
+ background: $color-black;
9
+ box-shadow: 0 1px 5px 1px rgba($color-shadow, 0.20);
10
+ }
11
+
12
+ .n-alert__text {
13
+ color: $color-gray-40;
14
+ }
15
+
16
+ @each $color, $values in $colors {
17
+
18
+ $-color-base: map_get($values, 'base');
19
+ $-color-light: map_get($values, 'light');
20
+ $-color-dark: map_get($values, 'dark');
21
+
22
+ .n-alert-frame--#{$color} .n-alert__icon {
23
+ color: $-color-base;
24
+ }
25
+
26
+ }
@@ -0,0 +1,2 @@
1
+ @import "./src/button/button";
2
+ @import "./src/button-group/button-group";
@@ -0,0 +1,46 @@
1
+ @import "../../../root/vars";
2
+
3
+ @each $color, $values in $colors {
4
+
5
+ $-color-base: map_get($values, 'base');
6
+ $-color-light: map_get($values, 'light');
7
+ $-color-dark: map_get($values, 'dark');
8
+
9
+ /**
10
+ * Button primary
11
+ */
12
+
13
+ .n-button--#{$color}:not(.n-button--link) {
14
+ color: $color-white;
15
+ background: $-color-base;
16
+ border-color: $-color-base;
17
+ }
18
+
19
+ .n-button--#{$color}:not(.n-button--link):hover {
20
+ background: $-color-light;
21
+ border-color: $-color-light;
22
+ }
23
+
24
+ .n-button--#{$color}:not(.n-button--link):focus {
25
+ background: $-color-dark;
26
+ border-color: $-color-dark;
27
+ }
28
+
29
+ .n-button--#{$color}:not(.n-button--link).n-disabled {
30
+ background: $-color-base;
31
+ border-color: $-color-base;
32
+ }
33
+
34
+ .n-button--#{$color}:not(.n-disabled).n-button--link {
35
+ color: $-color-base;
36
+ }
37
+
38
+ .n-button--#{$color}:not(.n-disabled).n-button--link:hover {
39
+ color: $-color-light;
40
+ }
41
+
42
+ .n-button--#{$color}:not(.n-disabled).n-button--link:focus {
43
+ color: $-color-dark;
44
+ }
45
+
46
+ }
@@ -0,0 +1 @@
1
+ @import "../../../root/vars";
@@ -0,0 +1,2 @@
1
+ @import "./src/cascader-panel/cascader-panel";
2
+ @import "./src/cascader/cascader";
@@ -0,0 +1,46 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-cascader {
4
+ background: $color-input;
5
+ border: 1px solid $color-gray-15;
6
+ }
7
+
8
+ .n-cascader.n-disabled {
9
+ background: rgba($color-gray-15, 0.3);
10
+ }
11
+
12
+ .n-cascader__clear,
13
+ .n-cascader__angle {
14
+ color: $color-gray-60;
15
+ }
16
+
17
+ .n-cascader__clear i {
18
+ background: rgba($color-gray-15, 0.6);
19
+ }
20
+
21
+ .n-cascader__placeholder {
22
+ color: rgba($color-foreground, 0.5);
23
+ }
24
+
25
+ .n-cascader__body,
26
+ .n-cascader__empty {
27
+ background: $color-input;
28
+ box-shadow: 0 1px 3px 1px rgba($color-shadow, 0.15);
29
+ }
30
+
31
+ .n-cascader__empty {
32
+ color: $color-gray-60;
33
+ }
34
+
35
+ @each $color, $values in $colors {
36
+
37
+ $-color-base: map_get($values, 'base');
38
+ $-color-light: map_get($values, 'light');
39
+ $-color-dark: map_get($values, 'dark');
40
+
41
+ .n-cascader--#{$color}:not(.n-disabled):hover,
42
+ .n-cascader--#{$color}:not(.n-disabled).n-focus {
43
+ border-color: $-color-base;
44
+ }
45
+
46
+ }
@@ -0,0 +1,14 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-cascader-panel {
4
+ background: $color-input;
5
+ border: 1px solid $color-gray-15;
6
+ }
7
+
8
+ .n-cascader-panel .n-popover-option:not(.n-active) i {
9
+ color: $color-gray-40;
10
+ }
11
+
12
+ .n-cascader-panel__items:not(:last-child) {
13
+ border-right: 1px solid $color-gray-15;
14
+ }
@@ -0,0 +1,2 @@
1
+ @import "./src/checkbox/checkbox";
2
+ @import "./src/checkbox-group/checkbox-group";
@@ -0,0 +1,44 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-checkbox__checkbox {
4
+ color: $color-foreground;
5
+ background: $color-input;
6
+ border: 1px solid $color-gray-15;
7
+ }
8
+
9
+ .n-checkbox.n-disabled .n-checkbox__checkbox {
10
+ background: rgba($color-gray-15, 0.3);
11
+ }
12
+
13
+ @each $color, $values in $colors {
14
+
15
+ $-color-base: map_get($values, 'base');
16
+ $-color-light: map_get($values, 'light');
17
+ $-color-dark: map_get($values, 'dark');
18
+
19
+ /**
20
+ * Button primary
21
+ */
22
+
23
+ .n-checkbox--#{$color}:not(.n-disabled):hover .n-checkbox__checkbox {
24
+ border-color: $-color-base;
25
+ }
26
+
27
+ .n-checkbox--#{$color}.n-checked:not(.n-disabled) .n-checkbox__checkbox,
28
+ .n-checkbox--#{$color}.n-intermediate:not(.n-disabled) .n-checkbox__checkbox {
29
+ color: $color-white;
30
+ background: $-color-base;
31
+ border-color: $-color-base;
32
+ }
33
+
34
+ .n-checkbox--#{$color}.n-checked:not(.n-disabled) .n-checkbox__checkbox:not(.n-disabled):hover,
35
+ .n-checkbox--#{$color}.n-intermediate:not(.n-disabled) .n-checkbox__checkbox:not(.n-disabled):hover {
36
+ background: $-color-light;
37
+ border-color: $-color-light;
38
+ }
39
+
40
+ .n-checkbox--#{$color}.n-checked:not(.n-disabled) .n-checkbox__label {
41
+ color: $-color-base;
42
+ }
43
+
44
+ }
@@ -0,0 +1 @@
1
+ @import "../../../root/vars";
@@ -0,0 +1,2 @@
1
+ @import "./src/collapse/collapse";
2
+ @import "./src/collapse-item/collapse-item";
@@ -0,0 +1,21 @@
1
+ @import "../../../root/vars";
2
+
3
+ .n-collapse {
4
+ border: 1px solid $color-gray-15;
5
+ }
6
+
7
+ .n-collapse__header:not(:first-child) {
8
+ border-top: 1px solid $color-gray-15;
9
+ }
10
+
11
+ .n-collapse__header.n-active {
12
+ border-bottom: 1px solid $color-gray-15;
13
+ }
14
+
15
+ @each $color, $values in $colors {
16
+
17
+ $-color-base: map_get($values, 'base');
18
+ $-color-light: map_get($values, 'light');
19
+ $-color-dark: map_get($values, 'dark');
20
+
21
+ }