@douyinfe/semi-ui 2.15.2-alpha.0 → 2.17.0-alpha.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.
- package/button/buttonGroup.tsx +3 -2
- package/cascader/index.tsx +5 -1
- package/dist/css/semi.css +87 -20
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +358 -223
- package/dist/umd/semi-ui.js.map +1 -1
- package/dist/umd/semi-ui.min.js +1 -1
- package/dist/umd/semi-ui.min.js.map +1 -1
- package/iconButton/index.tsx +3 -0
- package/lib/cjs/button/buttonGroup.d.ts +0 -2
- package/lib/cjs/button/buttonGroup.js +4 -3
- package/lib/cjs/cascader/index.d.ts +3 -0
- package/lib/cjs/cascader/index.js +5 -3
- package/lib/cjs/iconButton/index.js +3 -0
- package/lib/cjs/radio/radio.js +3 -5
- package/lib/cjs/slider/index.d.ts +1 -1
- package/lib/cjs/slider/index.js +84 -36
- package/lib/cjs/transfer/index.d.ts +5 -0
- package/lib/cjs/transfer/index.js +7 -17
- package/lib/cjs/typography/base.js +15 -3
- package/lib/cjs/typography/text.js +11 -1
- package/lib/es/button/buttonGroup.d.ts +0 -2
- package/lib/es/button/buttonGroup.js +4 -3
- package/lib/es/cascader/index.d.ts +3 -0
- package/lib/es/cascader/index.js +5 -3
- package/lib/es/iconButton/index.js +3 -0
- package/lib/es/radio/radio.js +3 -5
- package/lib/es/slider/index.d.ts +1 -1
- package/lib/es/slider/index.js +84 -36
- package/lib/es/transfer/index.d.ts +5 -0
- package/lib/es/transfer/index.js +7 -17
- package/lib/es/typography/base.js +15 -3
- package/lib/es/typography/text.js +10 -1
- package/package.json +11 -11
- package/radio/_story/radio.stories.js +5 -5
- package/radio/radio.tsx +5 -3
- package/slider/_story/slider.stories.js +4 -2
- package/slider/index.tsx +63 -33
- package/transfer/_story/transfer.stories.js +29 -0
- package/transfer/index.tsx +10 -10
- package/typography/_story/typography.stories.js +15 -3
- package/typography/base.tsx +9 -4
- package/typography/text.tsx +9 -1
package/button/buttonGroup.tsx
CHANGED
|
@@ -33,9 +33,10 @@ export default class ButtonGroup extends BaseComponent<ButtonGroupProps> {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
static defaultProps = {
|
|
36
|
+
// There are default values for type and theme in Button.
|
|
37
|
+
// In order to allow users to individually customize the type and theme of the Button through the parameters of the Button in the ButtonGroup,
|
|
38
|
+
// the default value of type and theme is not given in the ButtonGroup。
|
|
36
39
|
size: 'default',
|
|
37
|
-
type: 'primary',
|
|
38
|
-
theme: 'light',
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
render() {
|
package/cascader/index.tsx
CHANGED
|
@@ -29,6 +29,7 @@ import Tag from '../tag';
|
|
|
29
29
|
import TagInput from '../tagInput';
|
|
30
30
|
import { Motion } from '../_base/base';
|
|
31
31
|
import { isSemiIcon } from '../_utils';
|
|
32
|
+
import { Position } from '../tooltip/index';
|
|
32
33
|
|
|
33
34
|
export { CascaderType, ShowNextType } from '@douyinfe/semi-foundation/cascader/foundation';
|
|
34
35
|
export { CascaderData, Entity, Data, CascaderItemProps } from './item';
|
|
@@ -82,6 +83,7 @@ export interface CascaderProps extends BasicCascaderProps {
|
|
|
82
83
|
onBlur?: (e: MouseEvent) => void;
|
|
83
84
|
onFocus?: (e: MouseEvent) => void;
|
|
84
85
|
validateStatus?: ValidateStatus;
|
|
86
|
+
position?: Position;
|
|
85
87
|
}
|
|
86
88
|
|
|
87
89
|
export interface CascaderState extends BasicCascaderInnerData {
|
|
@@ -169,6 +171,7 @@ class Cascader extends BaseComponent<CascaderProps, CascaderState> {
|
|
|
169
171
|
leafOnly: PropTypes.bool,
|
|
170
172
|
enableLeafClick: PropTypes.bool,
|
|
171
173
|
preventScroll: PropTypes.bool,
|
|
174
|
+
position:PropTypes.string
|
|
172
175
|
};
|
|
173
176
|
|
|
174
177
|
static defaultProps = {
|
|
@@ -954,12 +957,13 @@ class Cascader extends BaseComponent<CascaderProps, CascaderState> {
|
|
|
954
957
|
stopPropagation,
|
|
955
958
|
mouseLeaveDelay,
|
|
956
959
|
mouseEnterDelay,
|
|
960
|
+
position
|
|
957
961
|
} = this.props;
|
|
958
962
|
const { isOpen, rePosKey } = this.state;
|
|
959
963
|
const { direction } = this.context;
|
|
960
964
|
const content = this.renderContent();
|
|
961
965
|
const selection = this.renderSelection();
|
|
962
|
-
const pos = direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
966
|
+
const pos = position ?? (direction === 'rtl' ? 'bottomRight' : 'bottomLeft');
|
|
963
967
|
const mergedMotion: Motion = this.foundation.getMergedMotion();
|
|
964
968
|
return (
|
|
965
969
|
<Popover
|
package/dist/css/semi.css
CHANGED
|
@@ -14257,8 +14257,9 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14257
14257
|
font-size: 14px;
|
|
14258
14258
|
line-height: 20px;
|
|
14259
14259
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
14260
|
+
position: relative;
|
|
14260
14261
|
display: inline-flex;
|
|
14261
|
-
|
|
14262
|
+
flex-wrap: wrap;
|
|
14262
14263
|
min-height: 20px;
|
|
14263
14264
|
min-width: 16px;
|
|
14264
14265
|
cursor: pointer;
|
|
@@ -14306,7 +14307,6 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14306
14307
|
border-radius: var(--semi-border-radius-small);
|
|
14307
14308
|
}
|
|
14308
14309
|
.semi-radio-buttonRadioGroup {
|
|
14309
|
-
position: relative;
|
|
14310
14310
|
padding: 4px;
|
|
14311
14311
|
border-radius: var(--semi-border-radius-small);
|
|
14312
14312
|
line-height: 16px;
|
|
@@ -14330,6 +14330,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14330
14330
|
border: 1px solid transparent;
|
|
14331
14331
|
}
|
|
14332
14332
|
.semi-radio-cardRadioGroup .semi-radio-inner {
|
|
14333
|
+
position: relative;
|
|
14333
14334
|
margin-right: 8px;
|
|
14334
14335
|
flex-shrink: 0;
|
|
14335
14336
|
}
|
|
@@ -14399,18 +14400,19 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14399
14400
|
border-color: var(--semi-color-primary-disabled);
|
|
14400
14401
|
}
|
|
14401
14402
|
.semi-radio-inner {
|
|
14402
|
-
|
|
14403
|
-
|
|
14404
|
-
|
|
14403
|
+
position: absolute;
|
|
14404
|
+
display: inline-block;
|
|
14405
|
+
top: 2px;
|
|
14406
|
+
left: 0;
|
|
14405
14407
|
width: 16px;
|
|
14406
14408
|
height: 16px;
|
|
14407
14409
|
vertical-align: sub;
|
|
14408
14410
|
user-select: none;
|
|
14409
14411
|
}
|
|
14410
14412
|
.semi-radio-inner-display {
|
|
14411
|
-
|
|
14412
|
-
|
|
14413
|
-
|
|
14413
|
+
position: absolute;
|
|
14414
|
+
left: 0;
|
|
14415
|
+
top: 0;
|
|
14414
14416
|
box-sizing: border-box;
|
|
14415
14417
|
width: 16px;
|
|
14416
14418
|
height: 16px;
|
|
@@ -14419,14 +14421,11 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14419
14421
|
background: transparent;
|
|
14420
14422
|
}
|
|
14421
14423
|
.semi-radio-inner-display .semi-icon {
|
|
14424
|
+
position: absolute;
|
|
14422
14425
|
width: 100%;
|
|
14423
14426
|
height: 100%;
|
|
14424
14427
|
font-size: 14px;
|
|
14425
14428
|
}
|
|
14426
|
-
.semi-radio-content {
|
|
14427
|
-
display: flex;
|
|
14428
|
-
flex-direction: column;
|
|
14429
|
-
}
|
|
14430
14429
|
.semi-radio:hover .semi-radio-inner-display {
|
|
14431
14430
|
background: var(--semi-color-fill-0);
|
|
14432
14431
|
}
|
|
@@ -14435,6 +14434,8 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14435
14434
|
}
|
|
14436
14435
|
.semi-radio-addon {
|
|
14437
14436
|
user-select: none;
|
|
14437
|
+
padding-left: 8px;
|
|
14438
|
+
margin-left: 16px;
|
|
14438
14439
|
color: var(--semi-color-text-0);
|
|
14439
14440
|
display: inline-flex;
|
|
14440
14441
|
align-items: center;
|
|
@@ -14523,7 +14524,11 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14523
14524
|
color: var(--semi-color-disabled-text);
|
|
14524
14525
|
}
|
|
14525
14526
|
.semi-radio-extra {
|
|
14527
|
+
flex-grow: 1;
|
|
14528
|
+
flex-basis: 100%;
|
|
14529
|
+
flex-shrink: 0;
|
|
14526
14530
|
color: var(--semi-color-text-2);
|
|
14531
|
+
padding-left: 24px;
|
|
14527
14532
|
box-sizing: border-box;
|
|
14528
14533
|
}
|
|
14529
14534
|
.semi-radio-focus {
|
|
@@ -14538,20 +14543,25 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14538
14543
|
line-height: 20px;
|
|
14539
14544
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
14540
14545
|
}
|
|
14541
|
-
.semi-radioGroup-vertical {
|
|
14542
|
-
|
|
14543
|
-
flex-direction: column;
|
|
14544
|
-
row-gap: 12px;
|
|
14546
|
+
.semi-radioGroup-vertical .semi-radio:last-of-type {
|
|
14547
|
+
margin-bottom: 0;
|
|
14545
14548
|
}
|
|
14546
14549
|
.semi-radioGroup-vertical-default .semi-radio {
|
|
14547
|
-
display:
|
|
14550
|
+
display: block;
|
|
14551
|
+
margin-bottom: 12px;
|
|
14548
14552
|
}
|
|
14549
14553
|
.semi-radioGroup-vertical-card .semi-radio {
|
|
14550
14554
|
display: flex;
|
|
14555
|
+
margin-bottom: 16px;
|
|
14551
14556
|
}
|
|
14552
|
-
.semi-radioGroup-horizontal {
|
|
14553
|
-
|
|
14554
|
-
|
|
14557
|
+
.semi-radioGroup-horizontal .semi-radio {
|
|
14558
|
+
margin-right: 16px;
|
|
14559
|
+
}
|
|
14560
|
+
.semi-radioGroup-horizontal .semi-radio:last-of-type {
|
|
14561
|
+
margin-right: 0;
|
|
14562
|
+
}
|
|
14563
|
+
.semi-radioGroup-horizontal-default {
|
|
14564
|
+
display: inline-block;
|
|
14555
14565
|
}
|
|
14556
14566
|
.semi-radioGroup-buttonRadio {
|
|
14557
14567
|
display: inline-block;
|
|
@@ -14575,14 +14585,59 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
14575
14585
|
.semi-portal-rtl .semi-radio-buttonRadioGroup:not(:last-child) {
|
|
14576
14586
|
padding-left: 0;
|
|
14577
14587
|
}
|
|
14588
|
+
.semi-rtl .semi-radio-inner,
|
|
14589
|
+
.semi-portal-rtl .semi-radio-inner {
|
|
14590
|
+
left: auto;
|
|
14591
|
+
right: 0;
|
|
14592
|
+
}
|
|
14593
|
+
.semi-rtl .semi-radio-inner-display,
|
|
14594
|
+
.semi-portal-rtl .semi-radio-inner-display {
|
|
14595
|
+
left: auto;
|
|
14596
|
+
right: 0;
|
|
14597
|
+
}
|
|
14598
|
+
.semi-rtl .semi-radio-addon,
|
|
14599
|
+
.semi-portal-rtl .semi-radio-addon {
|
|
14600
|
+
padding-left: 0;
|
|
14601
|
+
margin-left: 0;
|
|
14602
|
+
padding-right: 8px;
|
|
14603
|
+
margin-right: 16px;
|
|
14604
|
+
}
|
|
14578
14605
|
.semi-rtl .semi-radio-addon-buttonRadio,
|
|
14579
14606
|
.semi-portal-rtl .semi-radio-addon-buttonRadio {
|
|
14580
14607
|
margin-right: 0;
|
|
14581
14608
|
}
|
|
14609
|
+
.semi-rtl .semi-radio-extra,
|
|
14610
|
+
.semi-portal-rtl .semi-radio-extra {
|
|
14611
|
+
padding-left: 0;
|
|
14612
|
+
padding-right: 24px;
|
|
14613
|
+
}
|
|
14614
|
+
.semi-rtl-isCardRadioGroup .semi-radio-inner,
|
|
14615
|
+
.semi-portal-rtl-isCardRadioGroup .semi-radio-inner {
|
|
14616
|
+
margin-right: 0;
|
|
14617
|
+
margin-left: 8px;
|
|
14618
|
+
}
|
|
14619
|
+
.semi-rtl-isCardRadioGroup .semi-radio-addon,
|
|
14620
|
+
.semi-portal-rtl-isCardRadioGroup .semi-radio-addon {
|
|
14621
|
+
margin-right: 0;
|
|
14622
|
+
padding-right: 0;
|
|
14623
|
+
}
|
|
14624
|
+
.semi-rtl-isCardRadioGroup .semi-radio-extra,
|
|
14625
|
+
.semi-portal-rtl-isCardRadioGroup .semi-radio-extra {
|
|
14626
|
+
padding-right: 0;
|
|
14627
|
+
}
|
|
14582
14628
|
.semi-rtl .semi-radioGroup,
|
|
14583
14629
|
.semi-portal-rtl .semi-radioGroup {
|
|
14584
14630
|
direction: rtl;
|
|
14585
14631
|
}
|
|
14632
|
+
.semi-rtl .semi-radioGroup-horizontal .semi-radio,
|
|
14633
|
+
.semi-portal-rtl .semi-radioGroup-horizontal .semi-radio {
|
|
14634
|
+
margin-right: 0;
|
|
14635
|
+
margin-left: 16px;
|
|
14636
|
+
}
|
|
14637
|
+
.semi-rtl .semi-radioGroup-horizontal .semi-radio:last-of-type,
|
|
14638
|
+
.semi-portal-rtl .semi-radioGroup-horizontal .semi-radio:last-of-type {
|
|
14639
|
+
margin-left: 0;
|
|
14640
|
+
}
|
|
14586
14641
|
|
|
14587
14642
|
.semi-rating {
|
|
14588
14643
|
display: inline-block;
|
|
@@ -15599,6 +15654,9 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
15599
15654
|
cursor: pointer;
|
|
15600
15655
|
transition: #fff 0.3s;
|
|
15601
15656
|
}
|
|
15657
|
+
.semi-slider-handle:focus-visible {
|
|
15658
|
+
outline: 2px solid var(--semi-color-primary-light-active);
|
|
15659
|
+
}
|
|
15602
15660
|
.semi-slider-handle:hover {
|
|
15603
15661
|
background-color: var(--semi-color-white);
|
|
15604
15662
|
}
|
|
@@ -19596,6 +19654,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19596
19654
|
.semi-tree-select-arrow {
|
|
19597
19655
|
display: inline-flex;
|
|
19598
19656
|
align-items: center;
|
|
19657
|
+
flex-shrink: 0;
|
|
19599
19658
|
height: 100%;
|
|
19600
19659
|
justify-content: center;
|
|
19601
19660
|
width: 32px;
|
|
@@ -19620,6 +19679,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19620
19679
|
display: inline-flex;
|
|
19621
19680
|
align-items: center;
|
|
19622
19681
|
height: 100%;
|
|
19682
|
+
flex-shrink: 0;
|
|
19623
19683
|
justify-content: center;
|
|
19624
19684
|
width: 32px;
|
|
19625
19685
|
color: var(--semi-color-text-2);
|
|
@@ -19727,6 +19787,12 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19727
19787
|
line-height: 20px;
|
|
19728
19788
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
19729
19789
|
}
|
|
19790
|
+
.semi-typography-text {
|
|
19791
|
+
display: inline-block;
|
|
19792
|
+
}
|
|
19793
|
+
.semi-typography-text-icon {
|
|
19794
|
+
display: inline-flex;
|
|
19795
|
+
}
|
|
19730
19796
|
.semi-typography.semi-typography-secondary {
|
|
19731
19797
|
color: var(--semi-color-text-1);
|
|
19732
19798
|
}
|
|
@@ -19758,6 +19824,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19758
19824
|
color: var(--semi-color-link);
|
|
19759
19825
|
}
|
|
19760
19826
|
.semi-typography-icon {
|
|
19827
|
+
display: inline-flex;
|
|
19761
19828
|
margin-right: 4px;
|
|
19762
19829
|
vertical-align: middle;
|
|
19763
19830
|
color: inherit;
|