@hsu-react/ui 2.2.11 → 2.2.13

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.
@@ -196,13 +196,13 @@
196
196
  }
197
197
  }
198
198
 
199
- // Both icons are laid out by v6's flexbox root, so the absolute-position compensation
200
- // (`inset-inline-end` / `translateY(-50%)`) that v5 needed is gone.
199
+ // 箭头由 v6 flex 根布局,居中不用补偿;**清除按钮不是** —— antd 仍然把它绝对定位,
200
+ // `top: 50%` `margin-top: -半个图标高` 拉回中线。把 margin-top 一并归零就只剩
201
+ // top: 50%,图标整个掉到中线以下(实测偏下 7px,正好半个 14px 图标)。
201
202
  :global(.ant-select-suffix),
202
203
  :global(.ant-select-clear) {
203
204
  width: 14px;
204
205
  height: 14px;
205
- margin-top: 0px;
206
206
 
207
207
  font-size: 14px;
208
208
 
@@ -210,6 +210,10 @@
210
210
 
211
211
  pointer-events: all;
212
212
  }
213
+
214
+ :global(.ant-select-suffix) {
215
+ margin-top: 0px;
216
+ }
213
217
  }
214
218
  }
215
219
 
@@ -205,7 +205,6 @@
205
205
  :global(.ant-select-clear) {
206
206
  width: 14px;
207
207
  height: 14px;
208
- margin-top: 0px;
209
208
 
210
209
  font-size: 14px;
211
210
 
@@ -214,6 +213,15 @@
214
213
  pointer-events: all;
215
214
  }
216
215
 
216
+ // 箭头是 `.ant-select` 的 flex 子项,靠 align-items: center 居中,margin 归零无副作用。
217
+ // 清除按钮不一样:它是绝对定位的,antd 靠 `top: 50%` 再配一个 `margin-top: -半个图标高`
218
+ // 把它拉回中线。上面那条规则从前把 margin-top 一并重置成 0,等于只做了 top: 50%
219
+ // 而没有回拉,图标就整个掉到中线以下(实测偏下 7px,正好是半个 14px 图标)。
220
+ // 所以这里只重置箭头的,清除按钮的 margin-top 交给 antd。
221
+ :global(.ant-select-suffix) {
222
+ margin-top: 0px;
223
+ }
224
+
217
225
  &:global(.ant-select-multiple) {
218
226
  // Keep the search input from claiming a slot of its own between the tags.
219
227
  :global(.ant-select-input) {
@@ -177,17 +177,17 @@ textarea,
177
177
  display: flex;
178
178
  flex-direction: column;
179
179
 
180
- // antd v6 removed the `.ant-tabs-content-holder` wrapper `.ant-tabs-content` is now a direct
181
- // child of `.ant-tabs`, so it takes over the flex sizing.
180
+ // antd v6 的层级是 `.ant-tabs > .ant-tabs-body-holder > .ant-tabs-body > .ant-tabs-content`,
181
+ // 其中 `.ant-tabs-content` 就是**面板本身**(v5 里那层叫 `.ant-tabs-tabpane`)。
182
+ //
183
+ // 这里原先还嵌了一条 `.ant-tabs-tabpanel { height: 100% }` —— antd 从没生成过这个类名
184
+ // (v5 是 `tabpane`,少写了一个字母),所以它一直是条空规则。删掉;面板的高度由外面这条
185
+ // 规则给,不需要再嵌一层。
182
186
  .ant-tabs-content {
183
187
  flex: 1;
184
188
 
185
189
  min-height: 0px;
186
190
  height: 100%;
187
-
188
- .ant-tabs-tabpanel {
189
- height: 100%;
190
- }
191
191
  }
192
192
  }
193
193
  .ant-modal-mask {
@@ -196,13 +196,13 @@
196
196
  }
197
197
  }
198
198
 
199
- // Both icons are laid out by v6's flexbox root, so the absolute-position compensation
200
- // (`inset-inline-end` / `translateY(-50%)`) that v5 needed is gone.
199
+ // 箭头由 v6 flex 根布局,居中不用补偿;**清除按钮不是** —— antd 仍然把它绝对定位,
200
+ // `top: 50%` `margin-top: -半个图标高` 拉回中线。把 margin-top 一并归零就只剩
201
+ // top: 50%,图标整个掉到中线以下(实测偏下 7px,正好半个 14px 图标)。
201
202
  :global(.ant-select-suffix),
202
203
  :global(.ant-select-clear) {
203
204
  width: 14px;
204
205
  height: 14px;
205
- margin-top: 0px;
206
206
 
207
207
  font-size: 14px;
208
208
 
@@ -210,6 +210,10 @@
210
210
 
211
211
  pointer-events: all;
212
212
  }
213
+
214
+ :global(.ant-select-suffix) {
215
+ margin-top: 0px;
216
+ }
213
217
  }
214
218
  }
215
219
 
@@ -205,7 +205,6 @@
205
205
  :global(.ant-select-clear) {
206
206
  width: 14px;
207
207
  height: 14px;
208
- margin-top: 0px;
209
208
 
210
209
  font-size: 14px;
211
210
 
@@ -214,6 +213,15 @@
214
213
  pointer-events: all;
215
214
  }
216
215
 
216
+ // 箭头是 `.ant-select` 的 flex 子项,靠 align-items: center 居中,margin 归零无副作用。
217
+ // 清除按钮不一样:它是绝对定位的,antd 靠 `top: 50%` 再配一个 `margin-top: -半个图标高`
218
+ // 把它拉回中线。上面那条规则从前把 margin-top 一并重置成 0,等于只做了 top: 50%
219
+ // 而没有回拉,图标就整个掉到中线以下(实测偏下 7px,正好是半个 14px 图标)。
220
+ // 所以这里只重置箭头的,清除按钮的 margin-top 交给 antd。
221
+ :global(.ant-select-suffix) {
222
+ margin-top: 0px;
223
+ }
224
+
217
225
  &:global(.ant-select-multiple) {
218
226
  // Keep the search input from claiming a slot of its own between the tags.
219
227
  :global(.ant-select-input) {
@@ -177,17 +177,17 @@ textarea,
177
177
  display: flex;
178
178
  flex-direction: column;
179
179
 
180
- // antd v6 removed the `.ant-tabs-content-holder` wrapper `.ant-tabs-content` is now a direct
181
- // child of `.ant-tabs`, so it takes over the flex sizing.
180
+ // antd v6 的层级是 `.ant-tabs > .ant-tabs-body-holder > .ant-tabs-body > .ant-tabs-content`,
181
+ // 其中 `.ant-tabs-content` 就是**面板本身**(v5 里那层叫 `.ant-tabs-tabpane`)。
182
+ //
183
+ // 这里原先还嵌了一条 `.ant-tabs-tabpanel { height: 100% }` —— antd 从没生成过这个类名
184
+ // (v5 是 `tabpane`,少写了一个字母),所以它一直是条空规则。删掉;面板的高度由外面这条
185
+ // 规则给,不需要再嵌一层。
182
186
  .ant-tabs-content {
183
187
  flex: 1;
184
188
 
185
189
  min-height: 0px;
186
190
  height: 100%;
187
-
188
- .ant-tabs-tabpanel {
189
- height: 100%;
190
- }
191
191
  }
192
192
  }
193
193
  .ant-modal-mask {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hsu-react/ui",
3
- "version": "2.2.11",
3
+ "version": "2.2.13",
4
4
  "description": "一套基于 React + Ant Design 的中后台业务组件库",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -196,13 +196,13 @@
196
196
  }
197
197
  }
198
198
 
199
- // Both icons are laid out by v6's flexbox root, so the absolute-position compensation
200
- // (`inset-inline-end` / `translateY(-50%)`) that v5 needed is gone.
199
+ // 箭头由 v6 flex 根布局,居中不用补偿;**清除按钮不是** —— antd 仍然把它绝对定位,
200
+ // `top: 50%` `margin-top: -半个图标高` 拉回中线。把 margin-top 一并归零就只剩
201
+ // top: 50%,图标整个掉到中线以下(实测偏下 7px,正好半个 14px 图标)。
201
202
  :global(.ant-select-suffix),
202
203
  :global(.ant-select-clear) {
203
204
  width: 14px;
204
205
  height: 14px;
205
- margin-top: 0px;
206
206
 
207
207
  font-size: 14px;
208
208
 
@@ -210,6 +210,10 @@
210
210
 
211
211
  pointer-events: all;
212
212
  }
213
+
214
+ :global(.ant-select-suffix) {
215
+ margin-top: 0px;
216
+ }
213
217
  }
214
218
  }
215
219
 
@@ -205,7 +205,6 @@
205
205
  :global(.ant-select-clear) {
206
206
  width: 14px;
207
207
  height: 14px;
208
- margin-top: 0px;
209
208
 
210
209
  font-size: 14px;
211
210
 
@@ -214,6 +213,15 @@
214
213
  pointer-events: all;
215
214
  }
216
215
 
216
+ // 箭头是 `.ant-select` 的 flex 子项,靠 align-items: center 居中,margin 归零无副作用。
217
+ // 清除按钮不一样:它是绝对定位的,antd 靠 `top: 50%` 再配一个 `margin-top: -半个图标高`
218
+ // 把它拉回中线。上面那条规则从前把 margin-top 一并重置成 0,等于只做了 top: 50%
219
+ // 而没有回拉,图标就整个掉到中线以下(实测偏下 7px,正好是半个 14px 图标)。
220
+ // 所以这里只重置箭头的,清除按钮的 margin-top 交给 antd。
221
+ :global(.ant-select-suffix) {
222
+ margin-top: 0px;
223
+ }
224
+
217
225
  &:global(.ant-select-multiple) {
218
226
  // Keep the search input from claiming a slot of its own between the tags.
219
227
  :global(.ant-select-input) {
@@ -177,17 +177,17 @@ textarea,
177
177
  display: flex;
178
178
  flex-direction: column;
179
179
 
180
- // antd v6 removed the `.ant-tabs-content-holder` wrapper `.ant-tabs-content` is now a direct
181
- // child of `.ant-tabs`, so it takes over the flex sizing.
180
+ // antd v6 的层级是 `.ant-tabs > .ant-tabs-body-holder > .ant-tabs-body > .ant-tabs-content`,
181
+ // 其中 `.ant-tabs-content` 就是**面板本身**(v5 里那层叫 `.ant-tabs-tabpane`)。
182
+ //
183
+ // 这里原先还嵌了一条 `.ant-tabs-tabpanel { height: 100% }` —— antd 从没生成过这个类名
184
+ // (v5 是 `tabpane`,少写了一个字母),所以它一直是条空规则。删掉;面板的高度由外面这条
185
+ // 规则给,不需要再嵌一层。
182
186
  .ant-tabs-content {
183
187
  flex: 1;
184
188
 
185
189
  min-height: 0px;
186
190
  height: 100%;
187
-
188
- .ant-tabs-tabpanel {
189
- height: 100%;
190
- }
191
191
  }
192
192
  }
193
193
  .ant-modal-mask {