@douyinfe/semi-ui 2.18.0-beta.0 → 2.18.1

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.
@@ -2,7 +2,7 @@
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classnames from 'classnames';
5
- import { checkboxClasses as css } from '@douyinfe/semi-foundation/checkbox/constants';
5
+ import { checkboxClasses as css, strings } from '@douyinfe/semi-foundation/checkbox/constants';
6
6
  import CheckboxFoundation, { CheckboxAdapter, BasicCheckboxEvent, BasicTargetObject, BaseCheckboxProps } from '@douyinfe/semi-foundation/checkbox/checkboxFoundation';
7
7
  import CheckboxInner from './checkboxInner';
8
8
  import BaseComponent from '../_base/baseComponent';
@@ -10,6 +10,7 @@ import '@douyinfe/semi-foundation/checkbox/checkbox.scss';
10
10
  import { Context, CheckboxContextType } from './context';
11
11
  import { isUndefined, isBoolean, noop } from 'lodash';
12
12
  import { getUuidShort } from '@douyinfe/semi-foundation/utils/uuid';
13
+ import { CheckboxType } from './checkboxGroup';
13
14
  export type CheckboxEvent = BasicCheckboxEvent;
14
15
  export type TargetObject = BasicTargetObject;
15
16
 
@@ -31,6 +32,7 @@ export interface CheckboxProps extends BaseCheckboxProps {
31
32
  tabIndex?: number; // a11y: wrapper tabIndex
32
33
  addonId?: string;
33
34
  extraId?: string;
35
+ type?: CheckboxType;
34
36
  }
35
37
  interface CheckboxState {
36
38
  checked: boolean;
@@ -68,6 +70,7 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
68
70
  'aria-label': PropTypes.string,
69
71
  tabIndex: PropTypes.number,
70
72
  preventScroll: PropTypes.bool,
73
+ type: PropTypes.string,
71
74
  };
72
75
 
73
76
  static defaultProps = {
@@ -76,6 +79,7 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
76
79
  onChange: noop,
77
80
  onMouseEnter: noop,
78
81
  onMouseLeave: noop,
82
+ type: 'default',
79
83
  };
80
84
  checkboxEntity: CheckboxInner;
81
85
  context: CheckboxContextType;
@@ -179,7 +183,8 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
179
183
  value,
180
184
  role,
181
185
  tabIndex,
182
- id
186
+ id,
187
+ type,
183
188
  } = this.props;
184
189
  const { checked, addonId, extraId, focusVisible } = this.state;
185
190
  const props: Record<string, any> = {
@@ -200,6 +205,9 @@ class Checkbox extends BaseComponent<CheckboxProps, CheckboxState> {
200
205
  props.isCardType = isCardType;
201
206
  props.isPureCardType = isPureCardType;
202
207
  props['name'] = this.context.checkboxGroup.name;
208
+ } else {
209
+ props.isPureCardType = type === strings.TYPE_PURECARD;
210
+ props.isCardType = type === strings.TYPE_CARD || props.isPureCardType;
203
211
  }
204
212
 
205
213
  const prefix = prefixCls || css.PREFIX;
package/dist/css/semi.css CHANGED
@@ -15309,7 +15309,6 @@ body {
15309
15309
  .semi-select-option-icon {
15310
15310
  width: 12px;
15311
15311
  color: transparent;
15312
- visibility: hidden;
15313
15312
  margin-right: 8px;
15314
15313
  display: flex;
15315
15314
  justify-content: center;
@@ -15350,7 +15349,6 @@ body {
15350
15349
  font-weight: 600;
15351
15350
  }
15352
15351
  .semi-select-option-selected .semi-select-option-icon {
15353
- visibility: visible;
15354
15352
  color: var(--semi-color-text-2);
15355
15353
  }
15356
15354
  .semi-select-option-focused {
@@ -17395,10 +17393,14 @@ body {
17395
17393
  display: inline-block;
17396
17394
  width: 16px;
17397
17395
  height: 16px;
17398
- cursor: pointer;
17399
17396
  vertical-align: middle;
17400
17397
  text-align: center;
17401
17398
  }
17399
+ .semi-table .semi-table-column-sorter-wrapper {
17400
+ display: inline-flex;
17401
+ align-items: center;
17402
+ cursor: pointer;
17403
+ }
17402
17404
  .semi-table .semi-table-column-sorter-up, .semi-table .semi-table-column-sorter-down {
17403
17405
  height: 0;
17404
17406
  display: block;
@@ -17421,11 +17423,11 @@ body {
17421
17423
  display: inline-flex;
17422
17424
  cursor: pointer;
17423
17425
  color: var(--semi-color-text-2);
17424
- vertical-align: middle;
17426
+ align-items: center;
17425
17427
  }
17426
17428
  .semi-table .semi-table-column-filter svg {
17427
- width: 12px;
17428
- height: 12px;
17429
+ width: 16px;
17430
+ height: 16px;
17429
17431
  }
17430
17432
  .semi-table .semi-table-column-filter.on {
17431
17433
  color: var(--semi-color-primary);