@douyinfe/semi-ui 2.15.1 → 2.17.0-alpha.0
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 +12 -0
- package/dist/css/semi.min.css +1 -1
- package/dist/umd/semi-ui.js +596 -459
- 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/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/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 +8 -10
- 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
|
@@ -15654,6 +15654,9 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
15654
15654
|
cursor: pointer;
|
|
15655
15655
|
transition: #fff 0.3s;
|
|
15656
15656
|
}
|
|
15657
|
+
.semi-slider-handle:focus-visible {
|
|
15658
|
+
outline: 2px solid var(--semi-color-primary-light-active);
|
|
15659
|
+
}
|
|
15657
15660
|
.semi-slider-handle:hover {
|
|
15658
15661
|
background-color: var(--semi-color-white);
|
|
15659
15662
|
}
|
|
@@ -19651,6 +19654,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19651
19654
|
.semi-tree-select-arrow {
|
|
19652
19655
|
display: inline-flex;
|
|
19653
19656
|
align-items: center;
|
|
19657
|
+
flex-shrink: 0;
|
|
19654
19658
|
height: 100%;
|
|
19655
19659
|
justify-content: center;
|
|
19656
19660
|
width: 32px;
|
|
@@ -19675,6 +19679,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19675
19679
|
display: inline-flex;
|
|
19676
19680
|
align-items: center;
|
|
19677
19681
|
height: 100%;
|
|
19682
|
+
flex-shrink: 0;
|
|
19678
19683
|
justify-content: center;
|
|
19679
19684
|
width: 32px;
|
|
19680
19685
|
color: var(--semi-color-text-2);
|
|
@@ -19782,6 +19787,12 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19782
19787
|
line-height: 20px;
|
|
19783
19788
|
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
19784
19789
|
}
|
|
19790
|
+
.semi-typography-text {
|
|
19791
|
+
display: inline-block;
|
|
19792
|
+
}
|
|
19793
|
+
.semi-typography-text-icon {
|
|
19794
|
+
display: inline-flex;
|
|
19795
|
+
}
|
|
19785
19796
|
.semi-typography.semi-typography-secondary {
|
|
19786
19797
|
color: var(--semi-color-text-1);
|
|
19787
19798
|
}
|
|
@@ -19813,6 +19824,7 @@ body[theme-mode=dark], body .semi-always-dark {
|
|
|
19813
19824
|
color: var(--semi-color-link);
|
|
19814
19825
|
}
|
|
19815
19826
|
.semi-typography-icon {
|
|
19827
|
+
display: inline-flex;
|
|
19816
19828
|
margin-right: 4px;
|
|
19817
19829
|
vertical-align: middle;
|
|
19818
19830
|
color: inherit;
|