@yqg/simple 1.0.13 → 1.0.14-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yqg/simple",
3
- "version": "1.0.13",
3
+ "version": "1.0.14-beta.2",
4
4
  "description": "YQG Simple Component Library - Vue 2 + Ant Design Vue 组件库",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -183,7 +183,7 @@ export default {
183
183
  };
184
184
  </script>
185
185
  <style lang="scss" scoped>
186
- @import "./yqg-simple-form/component/field-rich/rich.scss";
186
+ @use "./yqg-simple-form/component/field-rich/rich.scss" as *;
187
187
 
188
188
  .def-value {
189
189
  margin: 0;
@@ -538,7 +538,7 @@ export default {
538
538
  </script>
539
539
 
540
540
  <style lang="scss" scoped>
541
- @import "./rich.scss";
541
+ @use "./rich.scss" as *;
542
542
 
543
543
  $color-black: #000;
544
544
  $color-white: #fff;
@@ -8,7 +8,8 @@
8
8
 
9
9
  $btn-margin: 10px;
10
10
 
11
- .yqg-simple-form {
11
+ /* 使用 :where() 降低选择器权重,便于用户自定义样式覆盖 */
12
+ :where(.yqg-simple-form) {
12
13
  .ant-form-horizontal {
13
14
  .ant-input,
14
15
  .ant-input-number,
@@ -17,7 +18,7 @@ $btn-margin: 10px;
17
18
  }
18
19
 
19
20
  .ant-calendar-picker {
20
- width: 100% !important;
21
+ width: 100%;
21
22
  }
22
23
 
23
24
  .ant-form-item-label {
@@ -94,7 +95,7 @@ $btn-margin: 10px;
94
95
  }
95
96
 
96
97
  .ant-calendar-picker {
97
- width: 100% !important;
98
+ width: 100%;
98
99
  }
99
100
 
100
101
  .ant-form-item {
@@ -155,7 +156,7 @@ $btn-margin: 10px;
155
156
  }
156
157
 
157
158
  &-hidden {
158
- display: none !important;
159
+ display: none;
159
160
  }
160
161
  }
161
162
  }
@@ -181,6 +182,6 @@ $btn-margin: 10px;
181
182
  }
182
183
  }
183
184
 
184
- .yqg-rich-audio {
185
+ :where(.yqg-rich-audio) {
185
186
  height: 30px;
186
187
  }
@@ -7,6 +7,8 @@
7
7
 
8
8
  @use "sass:list";
9
9
  @use "sass:map";
10
+ @use "sass:math";
11
+ @use "sass:meta";
10
12
  @use "sass:string";
11
13
  // stylelint-disable indentation, at-rule-empty-line-before
12
14
  // ref: https://getbootstrap.com/docs/5.0/utilities/api/ bootstrap/scss/bootstrap-utilities
@@ -62,8 +64,8 @@ $position-values: (
62
64
  $spacer: 1rem !default;
63
65
  $spacers: (
64
66
  0: 0,
65
- 1: $spacer / 4,
66
- 2: $spacer / 2,
67
+ 1: math.div($spacer, 4),
68
+ 2: math.div($spacer, 2),
67
69
  3: $spacer,
68
70
  4: $spacer * 1.5,
69
71
  5: $spacer * 3,
@@ -97,7 +99,7 @@ $line-height-lg: 2 !default;
97
99
  $values: map.get($utility, values);
98
100
 
99
101
  // If the values are a list or string, convert it into a map
100
- @if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
102
+ @if meta.type-of($values) == "string" or meta.type-of(list.nth($values, 1)) != "list" {
101
103
  $values: list.zip($values, $values);
102
104
  }
103
105
 
@@ -105,7 +107,7 @@ $line-height-lg: 2 !default;
105
107
  $properties: map.get($utility, property);
106
108
 
107
109
  // Multiple properties are possible, for example with vertical or horizontal margins or paddings
108
- @if type-of($properties) == "string" {
110
+ @if meta.type-of($properties) == "string" {
109
111
  $properties: list.append((), $properties);
110
112
  }
111
113
 
@@ -120,7 +122,7 @@ $line-height-lg: 2 !default;
120
122
  // Don't prefix if value key is null (eg. with shadow class)
121
123
  $property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
122
124
 
123
- @if map-get($utility, rfs) {
125
+ @if map.get($utility, rfs) {
124
126
  // Inside the media query
125
127
  @if $is-rfs-media-query {
126
128
  $val: rfs-value($value);
@@ -282,7 +284,7 @@ $utilities: map.merge(
282
284
  "border-color": (
283
285
  property: border-color,
284
286
  class: border,
285
- values: map-merge($theme-colors, ("white": $white))
287
+ values: map.merge($theme-colors, ("white": $white))
286
288
  ),
287
289
  "border-width": (
288
290
  property: border-width,
@@ -662,7 +664,7 @@ $utilities: map.merge(
662
664
  "color": (
663
665
  property: color,
664
666
  class: text,
665
- values: map-merge(
667
+ values: map.merge(
666
668
  $theme-colors,
667
669
  (
668
670
  "white": $white,
@@ -679,7 +681,7 @@ $utilities: map.merge(
679
681
  "background-color": (
680
682
  property: background-color,
681
683
  class: bg,
682
- values: map-merge(
684
+ values: map.merge(
683
685
  $theme-colors,
684
686
  (
685
687
  "body": $body-bg,
@@ -766,7 +768,7 @@ $utilities: map.merge(
766
768
  @each $key, $utility in $utilities {
767
769
  // The utility can be disabled with `false`, thus check if the utility is a map first
768
770
  // Only proceed if responsive media queries are enabled or if it's the base media query
769
- @if type-of($utility) == "map" {
771
+ @if meta.type-of($utility) == "map" {
770
772
  @include generate-utility($utility);
771
773
  }
772
774
  }
@@ -5,6 +5,9 @@
5
5
  * @Last Modified time: 2023-04-20 15:11:44
6
6
  */
7
7
 
8
+ @use "variable" as *;
9
+ @use "mixin" as *;
10
+
8
11
  .yqg {
9
12
  &-btn {
10
13
  &-info {
@@ -4,13 +4,16 @@
4
4
  * @Last Modified by: xiaodongyu
5
5
  * @Last Modified time: 2021-04-02 23:45:24
6
6
  */
7
- // 引入 Ant Design Vue 样式
8
- @import "~ant-design-vue/dist/antd.css";
7
+ // 引入 Ant Design Vue 样式(@use 替代已弃用的 @import)
8
+ @use "~ant-design-vue/dist/antd.css";
9
9
 
10
- @import "variable";
11
- @import "mixin";
12
- @import "common";
13
- @import "bootstrap-utilities";
10
+ @use "variable" as *;
11
+ @use "mixin" as *;
12
+ @use "common";
13
+ @use "bootstrap-utilities";
14
+ @use "../component/yqg-simple-form/index.scss" as yqg-simple-form;
15
+ @use "../component/yqg-code-textarea/index.scss" as yqg-code-textarea;
16
+ @use "../component/yqg-simple-form/component/field-rich/rich.scss" as field-rich;
14
17
 
15
18
  body {
16
19
  color: $font-color;