@douyinfe/semi-foundation 2.88.1 → 2.88.2-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/aiChatInput/constants.ts +2 -1
- package/aiChatInput/utils.ts +4 -4
- package/image/image.scss +7 -0
- package/lib/cjs/aiChatInput/constants.d.ts +1 -0
- package/lib/cjs/aiChatInput/constants.js +2 -1
- package/lib/cjs/aiChatInput/utils.js +4 -4
- package/lib/cjs/datePicker/monthsGridFoundation.d.ts +1 -1
- package/lib/cjs/image/image.css +6 -0
- package/lib/cjs/image/image.scss +7 -0
- package/lib/cjs/navigation/navigation.css +5 -0
- package/lib/cjs/navigation/navigation.scss +6 -0
- package/lib/cjs/rating/foundation.js +3 -2
- package/lib/cjs/rating/rating.css +5 -0
- package/lib/cjs/rating/rating.scss +6 -0
- package/lib/cjs/upload/upload.css +6 -0
- package/lib/cjs/upload/upload.scss +7 -0
- package/lib/es/aiChatInput/constants.d.ts +1 -0
- package/lib/es/aiChatInput/constants.js +2 -1
- package/lib/es/aiChatInput/utils.js +4 -4
- package/lib/es/datePicker/monthsGridFoundation.d.ts +1 -1
- package/lib/es/image/image.css +6 -0
- package/lib/es/image/image.scss +7 -0
- package/lib/es/navigation/navigation.css +5 -0
- package/lib/es/navigation/navigation.scss +6 -0
- package/lib/es/rating/foundation.js +3 -2
- package/lib/es/rating/rating.css +5 -0
- package/lib/es/rating/rating.scss +6 -0
- package/lib/es/upload/upload.css +6 -0
- package/lib/es/upload/upload.scss +7 -0
- package/navigation/navigation.scss +6 -0
- package/package.json +4 -4
- package/rating/foundation.ts +4 -2
- package/rating/rating.scss +6 -0
- package/upload/upload.scss +7 -0
package/aiChatInput/constants.ts
CHANGED
|
@@ -9,7 +9,8 @@ const strings = {
|
|
|
9
9
|
TOPS_SLOT_POSITION_DEFAULT: "top",
|
|
10
10
|
ZERO_WIDTH_CHAR: '\uFEFF',
|
|
11
11
|
PIC_PREFIX: 'image/',
|
|
12
|
-
PIC_SUFFIX_ARRAY: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp']
|
|
12
|
+
PIC_SUFFIX_ARRAY: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp'],
|
|
13
|
+
DELETABLE: 'skipCustomTransactionPlugin'
|
|
13
14
|
};
|
|
14
15
|
|
|
15
16
|
const numbers = {
|
package/aiChatInput/utils.ts
CHANGED
|
@@ -145,7 +145,7 @@ export function getCustomSlotAttribute() {
|
|
|
145
145
|
|
|
146
146
|
export function findSkillSlotInString(content: string) {
|
|
147
147
|
const reg = /<skill-slot\s+([^>]*)><\/skill-slot>/i;
|
|
148
|
-
const attrReg = /([\w-]+)=["']
|
|
148
|
+
const attrReg = /([\w-]+)=["']([^"']*)["']/g;
|
|
149
149
|
const match = reg.exec(content);
|
|
150
150
|
if (match) {
|
|
151
151
|
const attrsStr = match[1];
|
|
@@ -175,8 +175,8 @@ function omitUndefinedFromObj(obj: { [key: string]: any }) {
|
|
|
175
175
|
|
|
176
176
|
export function getSkillSlotString(skill: BaseSkill) {
|
|
177
177
|
let skillParams = '';
|
|
178
|
-
skill.label && (skillParams += ` data-label
|
|
179
|
-
skill.value && (skillParams += ` data-value
|
|
178
|
+
skill.label && (skillParams += ` data-label="${skill.label}"`);
|
|
179
|
+
skill.value && (skillParams += ` data-value="${skill.value}"`);
|
|
180
180
|
(typeof skill.hasTemplate === 'boolean') && (skillParams += ` data-template=${skill.hasTemplate}`);
|
|
181
|
-
return `<skill-slot ${skillParams}
|
|
181
|
+
return `<skill-slot ${skillParams}></skill-slot>`;
|
|
182
182
|
}
|
package/image/image.scss
CHANGED
|
@@ -19,6 +19,13 @@ $module: #{$prefix}-image;
|
|
|
19
19
|
max-width: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
&-tooltip-children-wrapper {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
width: fit-content;
|
|
25
|
+
height: fit-content;
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
&-img {
|
|
23
30
|
vertical-align: top;
|
|
24
31
|
border-radius: inherit;
|
|
@@ -12,7 +12,8 @@ const strings = exports.strings = {
|
|
|
12
12
|
TOPS_SLOT_POSITION_DEFAULT: "top",
|
|
13
13
|
ZERO_WIDTH_CHAR: '\uFEFF',
|
|
14
14
|
PIC_PREFIX: 'image/',
|
|
15
|
-
PIC_SUFFIX_ARRAY: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp']
|
|
15
|
+
PIC_SUFFIX_ARRAY: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp'],
|
|
16
|
+
DELETABLE: 'skipCustomTransactionPlugin'
|
|
16
17
|
};
|
|
17
18
|
const numbers = exports.numbers = {
|
|
18
19
|
SCROLL_AMOUNT: 300,
|
|
@@ -177,7 +177,7 @@ function getCustomSlotAttribute() {
|
|
|
177
177
|
}
|
|
178
178
|
function findSkillSlotInString(content) {
|
|
179
179
|
const reg = /<skill-slot\s+([^>]*)><\/skill-slot>/i;
|
|
180
|
-
const attrReg = /([\w-]+)=["']
|
|
180
|
+
const attrReg = /([\w-]+)=["']([^"']*)["']/g;
|
|
181
181
|
const match = reg.exec(content);
|
|
182
182
|
if (match) {
|
|
183
183
|
const attrsStr = match[1];
|
|
@@ -205,8 +205,8 @@ function omitUndefinedFromObj(obj) {
|
|
|
205
205
|
}
|
|
206
206
|
function getSkillSlotString(skill) {
|
|
207
207
|
let skillParams = '';
|
|
208
|
-
skill.label && (skillParams += ` data-label
|
|
209
|
-
skill.value && (skillParams += ` data-value
|
|
208
|
+
skill.label && (skillParams += ` data-label="${skill.label}"`);
|
|
209
|
+
skill.value && (skillParams += ` data-value="${skill.value}"`);
|
|
210
210
|
typeof skill.hasTemplate === 'boolean' && (skillParams += ` data-template=${skill.hasTemplate}`);
|
|
211
|
-
return `<skill-slot ${skillParams}
|
|
211
|
+
return `<skill-slot ${skillParams}></skill-slot>`;
|
|
212
212
|
}
|
|
@@ -253,6 +253,6 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
253
253
|
* - When yam open type is 'left' or 'right', weeks minHeight should be set
|
|
254
254
|
* If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
|
|
255
255
|
*/
|
|
256
|
-
getYAMOpenType(): "
|
|
256
|
+
getYAMOpenType(): "left" | "right" | "none" | "both";
|
|
257
257
|
}
|
|
258
258
|
export {};
|
package/lib/cjs/image/image.css
CHANGED
package/lib/cjs/image/image.scss
CHANGED
|
@@ -19,6 +19,13 @@ $module: #{$prefix}-image;
|
|
|
19
19
|
max-width: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
&-tooltip-children-wrapper {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
width: fit-content;
|
|
25
|
+
height: fit-content;
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
&-img {
|
|
23
30
|
vertical-align: top;
|
|
24
31
|
border-radius: inherit;
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
transition: opacity 0.2s cubic-bezier(0.5, -0.1, 1, 0.4);
|
|
50
50
|
opacity: 0;
|
|
51
51
|
}
|
|
52
|
+
.semi-navigation-collapsed-wrapper {
|
|
53
|
+
display: flex;
|
|
54
|
+
width: fit-content;
|
|
55
|
+
height: fit-content;
|
|
56
|
+
}
|
|
52
57
|
.semi-navigation-sub-wrap .semi-navigation-sub-title, .semi-navigation-item {
|
|
53
58
|
cursor: pointer;
|
|
54
59
|
display: flex;
|
|
@@ -174,10 +174,11 @@ class RatingFoundation extends _foundation.default {
|
|
|
174
174
|
const {
|
|
175
175
|
count,
|
|
176
176
|
allowHalf,
|
|
177
|
-
preventScroll
|
|
177
|
+
preventScroll,
|
|
178
|
+
tooltips
|
|
178
179
|
} = this.getProps();
|
|
179
180
|
const index = Math.ceil(value) - 1;
|
|
180
|
-
const starElement = [...event.currentTarget.childNodes].map(item => item.childNodes[0].childNodes);
|
|
181
|
+
const starElement = [...event.currentTarget.childNodes].map(item => tooltips ? item.childNodes[0].childNodes[0].childNodes : item.childNodes[0].childNodes);
|
|
181
182
|
if (index < 0) {
|
|
182
183
|
starElement[count][0].focus({
|
|
183
184
|
preventScroll
|
|
@@ -6,7 +6,8 @@ const strings = {
|
|
|
6
6
|
TOPS_SLOT_POSITION_DEFAULT: "top",
|
|
7
7
|
ZERO_WIDTH_CHAR: '\uFEFF',
|
|
8
8
|
PIC_PREFIX: 'image/',
|
|
9
|
-
PIC_SUFFIX_ARRAY: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp']
|
|
9
|
+
PIC_SUFFIX_ARRAY: ['png', 'jpg', 'jpeg', 'gif', 'bmp', 'webp'],
|
|
10
|
+
DELETABLE: 'skipCustomTransactionPlugin'
|
|
10
11
|
};
|
|
11
12
|
const numbers = {
|
|
12
13
|
SCROLL_AMOUNT: 300,
|
|
@@ -160,7 +160,7 @@ export function getCustomSlotAttribute() {
|
|
|
160
160
|
}
|
|
161
161
|
export function findSkillSlotInString(content) {
|
|
162
162
|
const reg = /<skill-slot\s+([^>]*)><\/skill-slot>/i;
|
|
163
|
-
const attrReg = /([\w-]+)=["']
|
|
163
|
+
const attrReg = /([\w-]+)=["']([^"']*)["']/g;
|
|
164
164
|
const match = reg.exec(content);
|
|
165
165
|
if (match) {
|
|
166
166
|
const attrsStr = match[1];
|
|
@@ -188,8 +188,8 @@ function omitUndefinedFromObj(obj) {
|
|
|
188
188
|
}
|
|
189
189
|
export function getSkillSlotString(skill) {
|
|
190
190
|
let skillParams = '';
|
|
191
|
-
skill.label && (skillParams += ` data-label
|
|
192
|
-
skill.value && (skillParams += ` data-value
|
|
191
|
+
skill.label && (skillParams += ` data-label="${skill.label}"`);
|
|
192
|
+
skill.value && (skillParams += ` data-value="${skill.value}"`);
|
|
193
193
|
typeof skill.hasTemplate === 'boolean' && (skillParams += ` data-template=${skill.hasTemplate}`);
|
|
194
|
-
return `<skill-slot ${skillParams}
|
|
194
|
+
return `<skill-slot ${skillParams}></skill-slot>`;
|
|
195
195
|
}
|
|
@@ -253,6 +253,6 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
253
253
|
* - When yam open type is 'left' or 'right', weeks minHeight should be set
|
|
254
254
|
* If the minHeight is not set, the change of the number of weeks will cause the scrollList to be unstable
|
|
255
255
|
*/
|
|
256
|
-
getYAMOpenType(): "
|
|
256
|
+
getYAMOpenType(): "left" | "right" | "none" | "both";
|
|
257
257
|
}
|
|
258
258
|
export {};
|
package/lib/es/image/image.css
CHANGED
package/lib/es/image/image.scss
CHANGED
|
@@ -19,6 +19,13 @@ $module: #{$prefix}-image;
|
|
|
19
19
|
max-width: none;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
&-tooltip-children-wrapper {
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
width: fit-content;
|
|
25
|
+
height: fit-content;
|
|
26
|
+
vertical-align: middle;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
&-img {
|
|
23
30
|
vertical-align: top;
|
|
24
31
|
border-radius: inherit;
|
|
@@ -49,6 +49,11 @@
|
|
|
49
49
|
transition: opacity 0.2s cubic-bezier(0.5, -0.1, 1, 0.4);
|
|
50
50
|
opacity: 0;
|
|
51
51
|
}
|
|
52
|
+
.semi-navigation-collapsed-wrapper {
|
|
53
|
+
display: flex;
|
|
54
|
+
width: fit-content;
|
|
55
|
+
height: fit-content;
|
|
56
|
+
}
|
|
52
57
|
.semi-navigation-sub-wrap .semi-navigation-sub-title, .semi-navigation-item {
|
|
53
58
|
cursor: pointer;
|
|
54
59
|
display: flex;
|
|
@@ -167,10 +167,11 @@ export default class RatingFoundation extends BaseFoundation {
|
|
|
167
167
|
const {
|
|
168
168
|
count,
|
|
169
169
|
allowHalf,
|
|
170
|
-
preventScroll
|
|
170
|
+
preventScroll,
|
|
171
|
+
tooltips
|
|
171
172
|
} = this.getProps();
|
|
172
173
|
const index = Math.ceil(value) - 1;
|
|
173
|
-
const starElement = [...event.currentTarget.childNodes].map(item => item.childNodes[0].childNodes);
|
|
174
|
+
const starElement = [...event.currentTarget.childNodes].map(item => tooltips ? item.childNodes[0].childNodes[0].childNodes : item.childNodes[0].childNodes);
|
|
174
175
|
if (index < 0) {
|
|
175
176
|
starElement[count][0].focus({
|
|
176
177
|
preventScroll
|
package/lib/es/rating/rating.css
CHANGED
package/lib/es/upload/upload.css
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.88.
|
|
3
|
+
"version": "2.88.2-alpha.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.88.
|
|
11
|
-
"@douyinfe/semi-json-viewer-core": "2.88.
|
|
10
|
+
"@douyinfe/semi-animation": "2.88.2-alpha.0",
|
|
11
|
+
"@douyinfe/semi-json-viewer-core": "2.88.2-alpha.0",
|
|
12
12
|
"@mdx-js/mdx": "^3.0.1",
|
|
13
13
|
"async-validator": "^3.5.0",
|
|
14
14
|
"classnames": "^2.2.6",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"*.scss",
|
|
30
30
|
"*.css"
|
|
31
31
|
],
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "e5068303441ac4ad0711cd48420a5b1434eca45a",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
35
35
|
"@babel/preset-env": "^7.15.8",
|
package/rating/foundation.ts
CHANGED
|
@@ -146,9 +146,11 @@ export default class RatingFoundation<P = Record<string, any>, S = Record<string
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
changeFocusStar(value: number, event: any) {
|
|
149
|
-
const { count, allowHalf, preventScroll } = this.getProps();
|
|
149
|
+
const { count, allowHalf, preventScroll, tooltips } = this.getProps();
|
|
150
150
|
const index = Math.ceil(value) - 1;
|
|
151
|
-
const starElement = [...event.currentTarget.childNodes].map(item =>
|
|
151
|
+
const starElement = [...event.currentTarget.childNodes].map(item =>
|
|
152
|
+
tooltips ? item.childNodes[0].childNodes[0].childNodes : item.childNodes[0].childNodes
|
|
153
|
+
);
|
|
152
154
|
if (index < 0) {
|
|
153
155
|
starElement[count][0].focus({ preventScroll });
|
|
154
156
|
} else {
|
package/rating/rating.scss
CHANGED
package/upload/upload.scss
CHANGED