@nokecy/qc-ui 2.0.0-beta.0 → 2.0.0-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.
@@ -1,3 +1,39 @@
1
+ .qc-table-container {
2
+ position: relative;
3
+ }
4
+
5
+ // 刷新时表里已有数据:不盖遮罩,只在表格顶部给一条 2px 的流动加载条
6
+ .qc-grid-busy-bar {
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ right: 0;
11
+ height: 2px;
12
+ z-index: 3;
13
+ pointer-events: none;
14
+ overflow: hidden;
15
+
16
+ > span {
17
+ display: block;
18
+ height: 100%;
19
+ width: 30%;
20
+ animation: qc-grid-busy-slide 1.2s ease-in-out infinite;
21
+ }
22
+ }
23
+
24
+ @keyframes qc-grid-busy-slide {
25
+ 0% { transform: translateX(-100%); }
26
+ 100% { transform: translateX(340%); }
27
+ }
28
+
29
+ @media (prefers-reduced-motion: reduce) {
30
+ .qc-grid-busy-bar > span {
31
+ width: 100%;
32
+ animation: none;
33
+ opacity: 0.6;
34
+ }
35
+ }
36
+
1
37
  .grid-spin {
2
38
  height: 100%;
3
39
 
@@ -49,6 +85,13 @@
49
85
  text-align: right !important;
50
86
  }
51
87
 
88
+ // AG Grid Enterprise 试用水印:组件库不内置 license key(授权由宿主通过 setAgGridLicenseKey 注入),
89
+ // 未注入时 AG Grid 会在表格右下角叠一层 .ag-watermark。这里统一关闭,宿主不必各自处理。
90
+ // 限定在组件库表格容器内,不影响页面上其他独立接入的 AG Grid 实例。
91
+ .qc-table-container .ag-watermark {
92
+ display: none !important;
93
+ }
94
+
52
95
  // 空态浮层里的「重试」「新建」「清空筛选」要能点:AG-Grid 给 .ag-overlay 设了 pointer-events: none,
53
96
  // 只给加载浮层放开,空态浮层里的按钮因此点不到。只放开可交互元素,空白处仍穿透到表格。@author nokecy
54
97
  .ag-overlay-no-rows-wrapper :is(button, a, input, [role='button']) {
@@ -47,3 +47,21 @@
47
47
  padding-inline-end: 38px;
48
48
  }
49
49
  }
50
+
51
+ // 候选面板挂在 body 下,不在 .qc-dialog-select 里,所以写在顶层:「编码 | 名称」两列,编码等宽数字(§6.12)。
52
+ .qc-dialog-select-option {
53
+ display: grid;
54
+ grid-template-columns: minmax(72px, max-content) 1fr;
55
+ column-gap: 12px;
56
+ align-items: center;
57
+
58
+ .qc-dialog-select-option-code {
59
+ font-variant-numeric: tabular-nums;
60
+ }
61
+
62
+ .qc-dialog-select-option-name {
63
+ overflow: hidden;
64
+ text-overflow: ellipsis;
65
+ white-space: nowrap;
66
+ }
67
+ }
@@ -21,28 +21,28 @@
21
21
  .successOverlay::before {
22
22
  top: 0;
23
23
  left: 0;
24
- background: linear-gradient(to right, green, transparent);
24
+ background: linear-gradient(to right, var(--ant-color-success, green), transparent);
25
25
  transform: rotate(0deg);
26
26
  }
27
27
 
28
28
  .successOverlay::after {
29
29
  top: 0%;
30
30
  left: 100%;
31
- background: linear-gradient(to left, green, transparent);
31
+ background: linear-gradient(to left, var(--ant-color-success, green), transparent);
32
32
  transform: rotate(0deg) translate(calc(-1 * var(--alert-size)), 0px);
33
33
  }
34
34
 
35
35
  .successOverlay > div::before {
36
36
  top: 0;
37
37
  left: 0;
38
- background: linear-gradient(to top, green, transparent);
38
+ background: linear-gradient(to top, var(--ant-color-success, green), transparent);
39
39
  transform: rotate(180deg);
40
40
  }
41
41
 
42
42
  .successOverlay > div::after {
43
43
  top: 100%;
44
44
  left: 0;
45
- background: linear-gradient(to top, green, transparent);
45
+ background: linear-gradient(to top, var(--ant-color-success, green), transparent);
46
46
  transform: rotate(0deg) translate(0px, calc(-1 * var(--alert-size)));
47
47
  }
48
48
 
@@ -78,28 +78,28 @@
78
78
  .errorOverlay::before {
79
79
  top: 0;
80
80
  left: 0;
81
- background: linear-gradient(to right, red, transparent);
81
+ background: linear-gradient(to right, var(--ant-color-error, red), transparent);
82
82
  transform: rotate(0deg);
83
83
  }
84
84
 
85
85
  .errorOverlay::after {
86
86
  top: 0%;
87
87
  left: 100%;
88
- background: linear-gradient(to left, red, transparent);
88
+ background: linear-gradient(to left, var(--ant-color-error, red), transparent);
89
89
  transform: rotate(0deg) translate(calc(-1 * var(--alert-size)), 0px);
90
90
  }
91
91
 
92
92
  .errorOverlay > div::before {
93
93
  top: 0;
94
94
  left: 0;
95
- background: linear-gradient(to top, red, transparent);
95
+ background: linear-gradient(to top, var(--ant-color-error, red), transparent);
96
96
  transform: rotate(180deg);
97
97
  }
98
98
 
99
99
  .errorOverlay > div::after {
100
100
  top: 100%;
101
101
  left: 0;
102
- background: linear-gradient(to top, red, transparent);
102
+ background: linear-gradient(to top, var(--ant-color-error, red), transparent);
103
103
  transform: rotate(0deg) translate(0px, calc(-1 * var(--alert-size)));
104
104
  }
105
105
 
@@ -156,9 +156,9 @@
156
156
  }
157
157
 
158
158
  .alertBadge-success {
159
- color: green;
159
+ color: var(--ant-color-success, green);
160
160
  }
161
161
 
162
162
  .alertBadge-error {
163
- color: red;
163
+ color: var(--ant-color-error, red);
164
164
  }
@@ -54,6 +54,7 @@ export type { EntitySelectConfig, EntitySelectProps, EntitySelectQuery } from "@
54
54
  export { semanticTextColors, toGridTextColor, gridValueEnum } from "@nokecy/qc-ui-components/ag-grid-plus/utils/valueEnumColor";
55
55
  export type { SemanticPreset } from "@nokecy/qc-ui-components/ag-grid-plus/utils/valueEnumColor";
56
56
  export { getQcColDefProp } from "@nokecy/qc-ui-components/ag-grid-plus/utils/agGridCompat";
57
+ export { setAgGridLicenseKey } from "@nokecy/qc-ui-components/ag-grid-plus/index";
57
58
  export { contrastRatio, relativeLuminance, darkenUntilContrast, lightenUntilContrast, toRgb, toHsl, fromHsl } from "@nokecy/qc-ui-components/shared/contrast";
58
59
  export { BusinessDecimal, decimal, decimalText, nonNegativeDecimal, roundDecimal, sumDecimals, formatDecimal } from "@nokecy/qc-ui-components/shared/businessDecimal";
59
60
  export type { DecimalValue } from "@nokecy/qc-ui-components/shared/businessDecimal";
package/dist/cjs/index.js CHANGED
@@ -13,6 +13,7 @@ var _exportNames = {
13
13
  useGridSchemes: true,
14
14
  LocalStorageSchemeAdapter: true,
15
15
  BackendApiSchemeAdapter: true,
16
+ setAgGridLicenseKey: true,
16
17
  ArrayTable: true,
17
18
  ArrayTableIndex: true,
18
19
  ColumnPresets: true,
@@ -514,6 +515,12 @@ Object.defineProperty(exports, "semanticTextColors", {
514
515
  return _valueEnumColor.semanticTextColors;
515
516
  }
516
517
  });
518
+ Object.defineProperty(exports, "setAgGridLicenseKey", {
519
+ enumerable: true,
520
+ get: function get() {
521
+ return _index.setAgGridLicenseKey;
522
+ }
523
+ });
517
524
  Object.defineProperty(exports, "sumDecimals", {
518
525
  enumerable: true,
519
526
  get: function get() {
@@ -1,3 +1,39 @@
1
+ .qc-table-container {
2
+ position: relative;
3
+ }
4
+
5
+ // 刷新时表里已有数据:不盖遮罩,只在表格顶部给一条 2px 的流动加载条
6
+ .qc-grid-busy-bar {
7
+ position: absolute;
8
+ top: 0;
9
+ left: 0;
10
+ right: 0;
11
+ height: 2px;
12
+ z-index: 3;
13
+ pointer-events: none;
14
+ overflow: hidden;
15
+
16
+ > span {
17
+ display: block;
18
+ height: 100%;
19
+ width: 30%;
20
+ animation: qc-grid-busy-slide 1.2s ease-in-out infinite;
21
+ }
22
+ }
23
+
24
+ @keyframes qc-grid-busy-slide {
25
+ 0% { transform: translateX(-100%); }
26
+ 100% { transform: translateX(340%); }
27
+ }
28
+
29
+ @media (prefers-reduced-motion: reduce) {
30
+ .qc-grid-busy-bar > span {
31
+ width: 100%;
32
+ animation: none;
33
+ opacity: 0.6;
34
+ }
35
+ }
36
+
1
37
  .grid-spin {
2
38
  height: 100%;
3
39
 
@@ -49,6 +85,13 @@
49
85
  text-align: right !important;
50
86
  }
51
87
 
88
+ // AG Grid Enterprise 试用水印:组件库不内置 license key(授权由宿主通过 setAgGridLicenseKey 注入),
89
+ // 未注入时 AG Grid 会在表格右下角叠一层 .ag-watermark。这里统一关闭,宿主不必各自处理。
90
+ // 限定在组件库表格容器内,不影响页面上其他独立接入的 AG Grid 实例。
91
+ .qc-table-container .ag-watermark {
92
+ display: none !important;
93
+ }
94
+
52
95
  // 空态浮层里的「重试」「新建」「清空筛选」要能点:AG-Grid 给 .ag-overlay 设了 pointer-events: none,
53
96
  // 只给加载浮层放开,空态浮层里的按钮因此点不到。只放开可交互元素,空白处仍穿透到表格。@author nokecy
54
97
  .ag-overlay-no-rows-wrapper :is(button, a, input, [role='button']) {
@@ -47,3 +47,21 @@
47
47
  padding-inline-end: 38px;
48
48
  }
49
49
  }
50
+
51
+ // 候选面板挂在 body 下,不在 .qc-dialog-select 里,所以写在顶层:「编码 | 名称」两列,编码等宽数字(§6.12)。
52
+ .qc-dialog-select-option {
53
+ display: grid;
54
+ grid-template-columns: minmax(72px, max-content) 1fr;
55
+ column-gap: 12px;
56
+ align-items: center;
57
+
58
+ .qc-dialog-select-option-code {
59
+ font-variant-numeric: tabular-nums;
60
+ }
61
+
62
+ .qc-dialog-select-option-name {
63
+ overflow: hidden;
64
+ text-overflow: ellipsis;
65
+ white-space: nowrap;
66
+ }
67
+ }
@@ -21,28 +21,28 @@
21
21
  .successOverlay::before {
22
22
  top: 0;
23
23
  left: 0;
24
- background: linear-gradient(to right, green, transparent);
24
+ background: linear-gradient(to right, var(--ant-color-success, green), transparent);
25
25
  transform: rotate(0deg);
26
26
  }
27
27
 
28
28
  .successOverlay::after {
29
29
  top: 0%;
30
30
  left: 100%;
31
- background: linear-gradient(to left, green, transparent);
31
+ background: linear-gradient(to left, var(--ant-color-success, green), transparent);
32
32
  transform: rotate(0deg) translate(calc(-1 * var(--alert-size)), 0px);
33
33
  }
34
34
 
35
35
  .successOverlay > div::before {
36
36
  top: 0;
37
37
  left: 0;
38
- background: linear-gradient(to top, green, transparent);
38
+ background: linear-gradient(to top, var(--ant-color-success, green), transparent);
39
39
  transform: rotate(180deg);
40
40
  }
41
41
 
42
42
  .successOverlay > div::after {
43
43
  top: 100%;
44
44
  left: 0;
45
- background: linear-gradient(to top, green, transparent);
45
+ background: linear-gradient(to top, var(--ant-color-success, green), transparent);
46
46
  transform: rotate(0deg) translate(0px, calc(-1 * var(--alert-size)));
47
47
  }
48
48
 
@@ -78,28 +78,28 @@
78
78
  .errorOverlay::before {
79
79
  top: 0;
80
80
  left: 0;
81
- background: linear-gradient(to right, red, transparent);
81
+ background: linear-gradient(to right, var(--ant-color-error, red), transparent);
82
82
  transform: rotate(0deg);
83
83
  }
84
84
 
85
85
  .errorOverlay::after {
86
86
  top: 0%;
87
87
  left: 100%;
88
- background: linear-gradient(to left, red, transparent);
88
+ background: linear-gradient(to left, var(--ant-color-error, red), transparent);
89
89
  transform: rotate(0deg) translate(calc(-1 * var(--alert-size)), 0px);
90
90
  }
91
91
 
92
92
  .errorOverlay > div::before {
93
93
  top: 0;
94
94
  left: 0;
95
- background: linear-gradient(to top, red, transparent);
95
+ background: linear-gradient(to top, var(--ant-color-error, red), transparent);
96
96
  transform: rotate(180deg);
97
97
  }
98
98
 
99
99
  .errorOverlay > div::after {
100
100
  top: 100%;
101
101
  left: 0;
102
- background: linear-gradient(to top, red, transparent);
102
+ background: linear-gradient(to top, var(--ant-color-error, red), transparent);
103
103
  transform: rotate(0deg) translate(0px, calc(-1 * var(--alert-size)));
104
104
  }
105
105
 
@@ -156,9 +156,9 @@
156
156
  }
157
157
 
158
158
  .alertBadge-success {
159
- color: green;
159
+ color: var(--ant-color-success, green);
160
160
  }
161
161
 
162
162
  .alertBadge-error {
163
- color: red;
163
+ color: var(--ant-color-error, red);
164
164
  }
@@ -54,6 +54,7 @@ export type { EntitySelectConfig, EntitySelectProps, EntitySelectQuery } from "@
54
54
  export { semanticTextColors, toGridTextColor, gridValueEnum } from "@nokecy/qc-ui-components/ag-grid-plus/utils/valueEnumColor";
55
55
  export type { SemanticPreset } from "@nokecy/qc-ui-components/ag-grid-plus/utils/valueEnumColor";
56
56
  export { getQcColDefProp } from "@nokecy/qc-ui-components/ag-grid-plus/utils/agGridCompat";
57
+ export { setAgGridLicenseKey } from "@nokecy/qc-ui-components/ag-grid-plus/index";
57
58
  export { contrastRatio, relativeLuminance, darkenUntilContrast, lightenUntilContrast, toRgb, toHsl, fromHsl } from "@nokecy/qc-ui-components/shared/contrast";
58
59
  export { BusinessDecimal, decimal, decimalText, nonNegativeDecimal, roundDecimal, sumDecimals, formatDecimal } from "@nokecy/qc-ui-components/shared/businessDecimal";
59
60
  export type { DecimalValue } from "@nokecy/qc-ui-components/shared/businessDecimal";
package/dist/esm/index.js CHANGED
@@ -63,6 +63,8 @@ export * from "@nokecy/qc-ui-components/scanCollect/index";
63
63
  export * from "@nokecy/qc-ui-components/documentPage/index";
64
64
  export { semanticTextColors, toGridTextColor, gridValueEnum } from "@nokecy/qc-ui-components/ag-grid-plus/utils/valueEnumColor";
65
65
  export { getQcColDefProp } from "@nokecy/qc-ui-components/ag-grid-plus/utils/agGridCompat";
66
+ // 正式 AG Grid Enterprise 授权入口:宿主注入 key 后组件库不再静默试用提示。
67
+ export { setAgGridLicenseKey } from "@nokecy/qc-ui-components/ag-grid-plus/index";
66
68
  export { contrastRatio, relativeLuminance, darkenUntilContrast, lightenUntilContrast, toRgb, toHsl, fromHsl } from "@nokecy/qc-ui-components/shared/contrast";
67
69
  export { BusinessDecimal, decimal, decimalText, nonNegativeDecimal, roundDecimal, sumDecimals, formatDecimal } from "@nokecy/qc-ui-components/shared/businessDecimal";
68
70