@whitesev/pops 2.6.0 → 3.0.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/dist/index.amd.js +1233 -1092
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +1233 -1092
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +1233 -1092
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +1233 -1092
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +1233 -1092
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +1233 -1092
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/eslint.config.d.mts +2 -0
- package/dist/types/src/Pops.d.ts +98 -103
- package/dist/types/src/PopsInst.d.ts +2 -2
- package/dist/types/src/components/alert/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/alert/index.d.ts +2 -2
- package/dist/types/src/components/alert/types/index.d.ts +4 -4
- package/dist/types/src/components/confirm/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/confirm/index.d.ts +2 -2
- package/dist/types/src/components/confirm/types/index.d.ts +2 -2
- package/dist/types/src/components/drawer/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/drawer/index.d.ts +2 -2
- package/dist/types/src/components/drawer/types/index.d.ts +2 -2
- package/dist/types/src/components/folder/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/folder/index.d.ts +2 -2
- package/dist/types/src/components/folder/types/index.d.ts +31 -7
- package/dist/types/src/components/iframe/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/iframe/index.d.ts +2 -5
- package/dist/types/src/components/iframe/types/index.d.ts +13 -42
- package/dist/types/src/components/loading/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/loading/index.d.ts +2 -2
- package/dist/types/src/components/loading/types/index.d.ts +4 -4
- package/dist/types/src/components/panel/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/panel/handlerComponents.d.ts +47 -43
- package/dist/types/src/components/panel/index.d.ts +3 -3
- package/dist/types/src/components/panel/types/components-button.d.ts +7 -6
- package/dist/types/src/components/panel/types/components-common.d.ts +7 -7
- package/dist/types/src/components/panel/types/components-container.d.ts +24 -0
- package/dist/types/src/components/panel/types/components-deepMenu.d.ts +13 -13
- package/dist/types/src/components/panel/types/components-input.d.ts +6 -6
- package/dist/types/src/components/panel/types/components-own.d.ts +2 -2
- package/dist/types/src/components/panel/types/components-select.d.ts +9 -9
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +8 -8
- package/dist/types/src/components/panel/types/components-slider.d.ts +7 -7
- package/dist/types/src/components/panel/types/components-switch.d.ts +6 -6
- package/dist/types/src/components/panel/types/components-textarea.d.ts +6 -6
- package/dist/types/src/components/panel/types/index.d.ts +36 -28
- package/dist/types/src/components/prompt/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/prompt/index.d.ts +2 -2
- package/dist/types/src/components/prompt/types/index.d.ts +4 -3
- package/dist/types/src/components/rightClickMenu/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/rightClickMenu/index.d.ts +29 -27
- package/dist/types/src/components/rightClickMenu/types/index.d.ts +32 -11
- package/dist/types/src/components/searchSuggestion/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/searchSuggestion/index.d.ts +21 -6
- package/dist/types/src/components/searchSuggestion/types/index.d.ts +15 -13
- package/dist/types/src/components/tooltip/defaultConfig.d.ts +2 -0
- package/dist/types/src/components/tooltip/index.d.ts +6 -21
- package/dist/types/src/components/tooltip/types/index.d.ts +8 -6
- package/dist/types/src/config/GlobalConfig.d.ts +3 -3
- package/dist/types/src/handler/PopsElementHandler.d.ts +6 -6
- package/dist/types/src/handler/PopsHandler.d.ts +18 -18
- package/dist/types/src/types/button.d.ts +4 -97
- package/dist/types/src/types/components.d.ts +8 -8
- package/dist/types/src/types/event.d.ts +0 -30
- package/dist/types/src/types/global.d.ts +2 -0
- package/dist/types/src/types/inst.d.ts +5 -5
- package/dist/types/src/types/main.d.ts +35 -80
- package/dist/types/src/types/mask.d.ts +18 -15
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +15 -15
- package/dist/types/src/utils/PopsUtils.d.ts +4 -0
- package/package.json +10 -10
- package/src/Pops.ts +44 -44
- package/src/PopsAnimation.ts +1 -1
- package/src/PopsInst.ts +2 -2
- package/src/components/alert/{config.ts → defaultConfig.ts} +7 -7
- package/src/components/alert/index.ts +16 -18
- package/src/components/alert/types/index.ts +4 -4
- package/src/components/confirm/{config.ts → defaultConfig.ts} +11 -11
- package/src/components/confirm/index.ts +11 -13
- package/src/components/confirm/types/index.ts +3 -3
- package/src/components/drawer/{config.ts → defaultConfig.ts} +10 -10
- package/src/components/drawer/index.ts +18 -17
- package/src/components/drawer/types/index.ts +3 -3
- package/src/components/folder/{config.ts → defaultConfig.ts} +22 -18
- package/src/components/folder/index.ts +61 -60
- package/src/components/folder/types/index.ts +31 -18
- package/src/components/iframe/{config.ts → defaultConfig.ts} +2 -2
- package/src/components/iframe/index.ts +24 -29
- package/src/components/iframe/types/index.ts +13 -56
- package/src/components/loading/{config.ts → defaultConfig.ts} +3 -3
- package/src/components/loading/index.ts +13 -11
- package/src/components/loading/types/index.ts +5 -5
- package/src/components/panel/{config.ts → defaultConfig.ts} +115 -37
- package/src/components/panel/handlerComponents.ts +446 -428
- package/src/components/panel/index.css +11 -3
- package/src/components/panel/index.ts +15 -28
- package/src/components/panel/types/components-button.ts +7 -6
- package/src/components/panel/types/components-common.ts +7 -7
- package/src/components/panel/types/components-container.ts +25 -0
- package/src/components/panel/types/components-deepMenu.ts +13 -13
- package/src/components/panel/types/components-input.ts +6 -6
- package/src/components/panel/types/components-own.ts +2 -2
- package/src/components/panel/types/components-select.ts +11 -11
- package/src/components/panel/types/components-selectMultiple.ts +8 -9
- package/src/components/panel/types/components-slider.ts +7 -7
- package/src/components/panel/types/components-switch.ts +6 -6
- package/src/components/panel/types/components-textarea.ts +6 -6
- package/src/components/panel/types/index.ts +45 -38
- package/src/components/prompt/{config.ts → defaultConfig.ts} +10 -10
- package/src/components/prompt/index.ts +13 -15
- package/src/components/prompt/types/index.ts +4 -3
- package/src/components/rightClickMenu/{config.ts → defaultConfig.ts} +20 -19
- package/src/components/rightClickMenu/index.ts +125 -108
- package/src/components/rightClickMenu/types/index.ts +36 -14
- package/src/components/searchSuggestion/{config.ts → defaultConfig.ts} +18 -11
- package/src/components/searchSuggestion/index.ts +116 -96
- package/src/components/searchSuggestion/types/index.ts +17 -15
- package/src/components/tooltip/{config.ts → defaultConfig.ts} +5 -6
- package/src/components/tooltip/index.ts +21 -21
- package/src/components/tooltip/types/index.ts +9 -7
- package/src/config/GlobalConfig.ts +2 -2
- package/src/css/common.css +6 -0
- package/src/handler/PopsElementHandler.ts +29 -30
- package/src/handler/PopsHandler.ts +43 -43
- package/src/svg/cpu.svg +7 -7
- package/src/svg/delete.svg +4 -4
- package/src/svg/documentCopy.svg +4 -4
- package/src/svg/edit.svg +7 -7
- package/src/svg/eleme.svg +4 -4
- package/src/svg/elemePlus.svg +4 -4
- package/src/svg/headset.svg +4 -4
- package/src/svg/hide.svg +7 -7
- package/src/svg/keyboard.svg +7 -7
- package/src/svg/loading.svg +4 -4
- package/src/svg/max.svg +4 -4
- package/src/svg/min.svg +2 -4
- package/src/svg/mise.svg +4 -4
- package/src/svg/monitor.svg +4 -4
- package/src/svg/next.svg +4 -4
- package/src/svg/picture.svg +7 -7
- package/src/svg/prev.svg +4 -4
- package/src/svg/search.svg +4 -4
- package/src/svg/share.svg +4 -4
- package/src/svg/upload.svg +4 -4
- package/src/svg/videoPause.svg +4 -4
- package/src/svg/videoPlay.svg +4 -4
- package/src/svg/view.svg +4 -4
- package/src/types/button.d.ts +4 -97
- package/src/types/components.d.ts +8 -8
- package/src/types/event.d.ts +0 -30
- package/src/types/global.d.ts +2 -0
- package/src/types/inst.d.ts +5 -5
- package/src/types/main.d.ts +35 -80
- package/src/types/mask.d.ts +18 -15
- package/src/utils/PopsDOMUtils.ts +34 -34
- package/src/utils/PopsInstanceUtils.ts +129 -139
- package/src/utils/PopsUtils.ts +60 -45
- package/dist/types/src/components/alert/config.d.ts +0 -2
- package/dist/types/src/components/confirm/config.d.ts +0 -2
- package/dist/types/src/components/drawer/config.d.ts +0 -2
- package/dist/types/src/components/folder/config.d.ts +0 -2
- package/dist/types/src/components/iframe/config.d.ts +0 -2
- package/dist/types/src/components/loading/config.d.ts +0 -2
- package/dist/types/src/components/panel/config.d.ts +0 -2
- package/dist/types/src/components/panel/types/components-forms.d.ts +0 -23
- package/dist/types/src/components/prompt/config.d.ts +0 -2
- package/dist/types/src/components/rightClickMenu/config.d.ts +0 -2
- package/dist/types/src/components/searchSuggestion/config.d.ts +0 -2
- package/dist/types/src/components/tooltip/config.d.ts +0 -2
- package/src/components/panel/types/components-forms.ts +0 -24
|
@@ -5,8 +5,8 @@ import type { PopsType } from "../../types/main";
|
|
|
5
5
|
import { popsDOMUtils } from "../../utils/PopsDOMUtils";
|
|
6
6
|
import { PopsSafeUtils } from "../../utils/PopsSafeUtils";
|
|
7
7
|
import { popsUtils } from "../../utils/PopsUtils";
|
|
8
|
-
import {
|
|
9
|
-
import type {
|
|
8
|
+
import { PopsTooltipDefaultConfig } from "./defaultConfig";
|
|
9
|
+
import type { PopsToolTipConfig } from "./types/index";
|
|
10
10
|
|
|
11
11
|
type ToolTipEventTypeName = "MouseEvent" | "TouchEvent";
|
|
12
12
|
|
|
@@ -19,13 +19,13 @@ export class ToolTip {
|
|
|
19
19
|
$arrow: null as unknown as HTMLElement,
|
|
20
20
|
};
|
|
21
21
|
$data = {
|
|
22
|
-
config: null as any as Required<
|
|
22
|
+
config: null as any as Required<PopsToolTipConfig>,
|
|
23
23
|
guid: null as any as string,
|
|
24
24
|
timeId_close_TouchEvent: <number[]>[],
|
|
25
25
|
timeId_close_MouseEvent: <number[]>[],
|
|
26
26
|
};
|
|
27
27
|
constructor(
|
|
28
|
-
config: Required<
|
|
28
|
+
config: Required<PopsToolTipConfig>,
|
|
29
29
|
guid: string,
|
|
30
30
|
ShadowInfo: {
|
|
31
31
|
$shadowContainer: HTMLDivElement;
|
|
@@ -86,7 +86,7 @@ export class ToolTip {
|
|
|
86
86
|
// 添加z-index
|
|
87
87
|
$toolTipContainer.style.zIndex = PopsHandler.handleZIndex(this.$data.config.zIndex).toString();
|
|
88
88
|
if (this.$data.config.style != null) {
|
|
89
|
-
|
|
89
|
+
// 添加自定义style
|
|
90
90
|
const cssNode = popsDOMUtils.createElement("style", {
|
|
91
91
|
type: "text/css",
|
|
92
92
|
innerHTML: this.$data.config.style,
|
|
@@ -173,9 +173,9 @@ export class ToolTip {
|
|
|
173
173
|
|
|
174
174
|
const toolTipElement_width = popsDOMUtils.outerWidth(this.$el.$toolTip);
|
|
175
175
|
const toolTipElement_height = popsDOMUtils.outerHeight(this.$el.$toolTip);
|
|
176
|
-
|
|
176
|
+
// 目标元素的x轴的中间位置
|
|
177
177
|
const targetElement_X_center_pos = targetElement_left + targetElement_width / 2 - toolTipElement_width / 2;
|
|
178
|
-
|
|
178
|
+
// 目标元素的Y轴的中间位置
|
|
179
179
|
const targetElement_Y_center_pos = targetElement_top + targetElement_height / 2 - toolTipElement_height / 2;
|
|
180
180
|
|
|
181
181
|
let mouseX = 0;
|
|
@@ -235,7 +235,7 @@ export class ToolTip {
|
|
|
235
235
|
*/
|
|
236
236
|
changePosition(event?: MouseEvent | TouchEvent | PointerEvent) {
|
|
237
237
|
const positionInfo = this.calcToolTipPosition(
|
|
238
|
-
this.$data.config
|
|
238
|
+
this.$data.config.$target,
|
|
239
239
|
this.$data.config.arrowDistance,
|
|
240
240
|
this.$data.config.otherDistance,
|
|
241
241
|
event
|
|
@@ -348,7 +348,7 @@ export class ToolTip {
|
|
|
348
348
|
*/
|
|
349
349
|
onShowEvent() {
|
|
350
350
|
popsDOMUtils.on(
|
|
351
|
-
this.$data.config
|
|
351
|
+
this.$data.config.$target,
|
|
352
352
|
this.$data.config.triggerShowEventName,
|
|
353
353
|
this.show,
|
|
354
354
|
this.$data.config.eventOption
|
|
@@ -358,7 +358,7 @@ export class ToolTip {
|
|
|
358
358
|
* 取消绑定 显示事件
|
|
359
359
|
*/
|
|
360
360
|
offShowEvent() {
|
|
361
|
-
popsDOMUtils.off(this.$data.config
|
|
361
|
+
popsDOMUtils.off(this.$data.config.$target, this.$data.config.triggerShowEventName, this.show, {
|
|
362
362
|
capture: true,
|
|
363
363
|
});
|
|
364
364
|
}
|
|
@@ -373,7 +373,7 @@ export class ToolTip {
|
|
|
373
373
|
if (event && event instanceof MouseEvent) {
|
|
374
374
|
const $target = event.composedPath()[0];
|
|
375
375
|
// 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
|
|
376
|
-
if ($target != this.$data.config
|
|
376
|
+
if ($target != this.$data.config.$target && $target != this.$el.$toolTip) {
|
|
377
377
|
return;
|
|
378
378
|
}
|
|
379
379
|
}
|
|
@@ -418,7 +418,7 @@ export class ToolTip {
|
|
|
418
418
|
*/
|
|
419
419
|
onCloseEvent() {
|
|
420
420
|
popsDOMUtils.on(
|
|
421
|
-
this.$data.config
|
|
421
|
+
this.$data.config.$target,
|
|
422
422
|
this.$data.config.triggerCloseEventName,
|
|
423
423
|
this.close,
|
|
424
424
|
this.$data.config.eventOption
|
|
@@ -428,7 +428,7 @@ export class ToolTip {
|
|
|
428
428
|
* 取消绑定 关闭事件
|
|
429
429
|
*/
|
|
430
430
|
offCloseEvent() {
|
|
431
|
-
popsDOMUtils.off(this.$data.config
|
|
431
|
+
popsDOMUtils.off(this.$data.config.$target, this.$data.config.triggerCloseEventName, this.close, {
|
|
432
432
|
capture: true,
|
|
433
433
|
});
|
|
434
434
|
}
|
|
@@ -537,7 +537,7 @@ export class ToolTip {
|
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
|
|
540
|
-
export type PopsTooltipResult<T extends
|
|
540
|
+
export type PopsTooltipResult<T extends PopsToolTipConfig> = {
|
|
541
541
|
guid: string;
|
|
542
542
|
config: T;
|
|
543
543
|
$shadowContainer: HTMLDivElement;
|
|
@@ -546,15 +546,15 @@ export type PopsTooltipResult<T extends PopsToolTipDetails> = {
|
|
|
546
546
|
};
|
|
547
547
|
|
|
548
548
|
export const PopsTooltip = {
|
|
549
|
-
init(
|
|
549
|
+
init(__config__: PopsToolTipConfig) {
|
|
550
550
|
const guid = popsUtils.getRandomGUID();
|
|
551
551
|
// 设置当前类型
|
|
552
552
|
const popsType: PopsType = "tooltip";
|
|
553
553
|
|
|
554
|
-
let config =
|
|
554
|
+
let config = PopsTooltipDefaultConfig();
|
|
555
555
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
556
|
-
config = popsUtils.assign(config,
|
|
557
|
-
if (!(config
|
|
556
|
+
config = popsUtils.assign(config, __config__);
|
|
557
|
+
if (!(config.$target instanceof HTMLElement)) {
|
|
558
558
|
throw new TypeError("config.target 必须是HTMLElement类型");
|
|
559
559
|
}
|
|
560
560
|
config = PopsHandler.handleOnly(popsType, config);
|
|
@@ -584,11 +584,11 @@ export const PopsTooltip = {
|
|
|
584
584
|
$shadowRoot,
|
|
585
585
|
});
|
|
586
586
|
if (config.alwaysShow) {
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
// 总是显示
|
|
588
|
+
// 直接显示
|
|
589
589
|
toolTip.show();
|
|
590
590
|
} else {
|
|
591
|
-
|
|
591
|
+
// 事件触发才显示
|
|
592
592
|
}
|
|
593
593
|
|
|
594
594
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { PopsGeneralConfig } from "../../../types/components";
|
|
2
|
+
import type { PopsPanelGeneralConfig } from "../../panel/types/components-common";
|
|
3
3
|
|
|
4
4
|
/** tooltip的出现位置 */
|
|
5
5
|
export type PopsTooltipPosition = "top" | "right" | "bottom" | "left" | "follow";
|
|
@@ -7,12 +7,12 @@ export type PopsTooltipPosition = "top" | "right" | "bottom" | "left" | "follow"
|
|
|
7
7
|
/**
|
|
8
8
|
* pops.tooltip
|
|
9
9
|
*/
|
|
10
|
-
export interface
|
|
11
|
-
extends Pick<
|
|
10
|
+
export interface PopsToolTipConfig
|
|
11
|
+
extends Pick<PopsGeneralConfig, "useShadowRoot" | "only" | "zIndex" | "style" | "beforeAppendToPageCallBack"> {
|
|
12
12
|
/**
|
|
13
13
|
* 目标元素
|
|
14
14
|
*/
|
|
15
|
-
target: HTMLElement;
|
|
15
|
+
$target: HTMLElement;
|
|
16
16
|
/**
|
|
17
17
|
* 显示的文字
|
|
18
18
|
*/
|
|
@@ -36,7 +36,7 @@ export interface PopsToolTipDetails
|
|
|
36
36
|
* + `github-tooltip` github的样式
|
|
37
37
|
* @default ""
|
|
38
38
|
*/
|
|
39
|
-
className?:
|
|
39
|
+
className?: PopsPanelGeneralConfig<any>["className"];
|
|
40
40
|
/**
|
|
41
41
|
* 是否使用fixed定位,false则是absolute定位
|
|
42
42
|
*
|
|
@@ -69,7 +69,9 @@ export interface PopsToolTipDetails
|
|
|
69
69
|
* 监听的事件配置
|
|
70
70
|
*/
|
|
71
71
|
eventOption?: {
|
|
72
|
-
|
|
72
|
+
once?: boolean;
|
|
73
|
+
passive?: boolean;
|
|
74
|
+
capture?: boolean;
|
|
73
75
|
};
|
|
74
76
|
/**
|
|
75
77
|
* 触发显示前的回调
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PopsGeneralConfig, PopsDragConfig } from "../types/components";
|
|
2
2
|
|
|
3
3
|
type EnterReturnType<T> = null | T | (() => T);
|
|
4
4
|
|
|
5
5
|
type GlobalConfigOption = {
|
|
6
6
|
style?: EnterReturnType<string>;
|
|
7
7
|
zIndex?: EnterReturnType<number> | EnterReturnType<string>;
|
|
8
|
-
} & Partial<
|
|
8
|
+
} & Partial<PopsGeneralConfig> &
|
|
9
9
|
Partial<PopsDragConfig>;
|
|
10
10
|
|
|
11
11
|
type ResultGlobalConfigOption<T> = T extends null | undefined ? never : T extends (...args: any) => infer R ? R : T;
|
package/src/css/common.css
CHANGED
|
@@ -33,9 +33,15 @@
|
|
|
33
33
|
align-content: center;
|
|
34
34
|
}
|
|
35
35
|
.pops-width-fill {
|
|
36
|
+
width: 100%;
|
|
36
37
|
width: -webkit-fill-available;
|
|
37
38
|
width: -moz-available;
|
|
38
39
|
}
|
|
40
|
+
.pops-height-fill {
|
|
41
|
+
height: 100%;
|
|
42
|
+
height: -webkit-fill-available;
|
|
43
|
+
height: -moz-available;
|
|
44
|
+
}
|
|
39
45
|
.pops-text-is-disabled {
|
|
40
46
|
--pops-text-is-disabled-color: #a8abb2;
|
|
41
47
|
color: var(--pops-text-is-disabled-color);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
1
|
+
import type { PopsAlertConfig } from "../components/alert/types";
|
|
2
|
+
import type { PopsConfirmConfig } from "../components/confirm/types";
|
|
3
|
+
import type { PopsIframeConfig } from "../components/iframe/types";
|
|
4
4
|
import type { PopsIconType } from "../types/icon";
|
|
5
5
|
import type {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
PopsSupportAnimConfig,
|
|
7
|
+
PopsSupportBottomButtonConfig,
|
|
8
|
+
PopsSupportContentConfig,
|
|
9
|
+
PopsSupportHeaderTitleConfig,
|
|
10
|
+
PopsSupportAnimConfigType,
|
|
11
|
+
PopsSupportBottomButtonConfigType,
|
|
12
|
+
PopsSupportContentConfigType,
|
|
13
|
+
PopsSupportHeaderTitleConfigType,
|
|
14
14
|
} from "../types/main";
|
|
15
15
|
import { PopsIcon } from "../PopsIcon";
|
|
16
16
|
import { popsDOMUtils } from "../utils/PopsDOMUtils";
|
|
@@ -40,13 +40,13 @@ export const PopsElementHandler = {
|
|
|
40
40
|
*/
|
|
41
41
|
createAnim(
|
|
42
42
|
guid: string,
|
|
43
|
-
type:
|
|
44
|
-
config:
|
|
43
|
+
type: PopsSupportAnimConfigType,
|
|
44
|
+
config: PopsSupportAnimConfig[keyof PopsSupportAnimConfig],
|
|
45
45
|
html = "",
|
|
46
46
|
bottomBtnHTML = "",
|
|
47
47
|
zIndex: number
|
|
48
48
|
) {
|
|
49
|
-
const __config = config as
|
|
49
|
+
const __config = config as PopsAlertConfig;
|
|
50
50
|
let popsAnimStyle = "";
|
|
51
51
|
let popsStyle = "";
|
|
52
52
|
const popsPosition = __config.position || "";
|
|
@@ -76,22 +76,22 @@ export const PopsElementHandler = {
|
|
|
76
76
|
* @param config
|
|
77
77
|
*/
|
|
78
78
|
createHeader(
|
|
79
|
-
type:
|
|
80
|
-
config:
|
|
79
|
+
type: PopsSupportHeaderTitleConfigType,
|
|
80
|
+
config: PopsSupportHeaderTitleConfig[keyof PopsSupportHeaderTitleConfig]
|
|
81
81
|
): string {
|
|
82
82
|
if (!config.btn) {
|
|
83
83
|
return "";
|
|
84
84
|
}
|
|
85
|
-
const confirm_config = config as
|
|
85
|
+
const confirm_config = config as PopsConfirmConfig;
|
|
86
86
|
if (type !== "iframe" && !confirm_config.btn?.close?.enable) {
|
|
87
87
|
return "";
|
|
88
88
|
}
|
|
89
89
|
let resultHTML = "";
|
|
90
90
|
// let btnStyle = "";
|
|
91
91
|
let closeHTML = "";
|
|
92
|
-
const iframe_config = config as
|
|
92
|
+
const iframe_config = config as PopsIframeConfig;
|
|
93
93
|
if (type === "iframe" && iframe_config.topRightButton?.trim() !== "") {
|
|
94
|
-
|
|
94
|
+
// iframe的
|
|
95
95
|
let topRightButtonHTML = "";
|
|
96
96
|
iframe_config.topRightButton.split("|").forEach((item: string) => {
|
|
97
97
|
// 最小化、最大化、窗口化、关闭按钮
|
|
@@ -124,8 +124,8 @@ export const PopsElementHandler = {
|
|
|
124
124
|
* @param config 弹窗配置
|
|
125
125
|
*/
|
|
126
126
|
createHeaderStyle(
|
|
127
|
-
type:
|
|
128
|
-
config:
|
|
127
|
+
type: PopsSupportHeaderTitleConfigType,
|
|
128
|
+
config: PopsSupportHeaderTitleConfig[keyof PopsSupportHeaderTitleConfig]
|
|
129
129
|
) {
|
|
130
130
|
return {
|
|
131
131
|
headerStyle: config?.title?.html ? config?.title?.style || "" : "",
|
|
@@ -138,14 +138,14 @@ export const PopsElementHandler = {
|
|
|
138
138
|
* @param config
|
|
139
139
|
*/
|
|
140
140
|
createBottom(
|
|
141
|
-
type:
|
|
142
|
-
config: Omit<
|
|
141
|
+
type: PopsSupportBottomButtonConfigType,
|
|
142
|
+
config: Omit<PopsSupportBottomButtonConfig[keyof PopsSupportBottomButtonConfig], "content">
|
|
143
143
|
): string {
|
|
144
144
|
if (config.btn == null) {
|
|
145
145
|
// 未设置btn参数
|
|
146
146
|
return "";
|
|
147
147
|
}
|
|
148
|
-
const confirm_config = config as Required<
|
|
148
|
+
const confirm_config = config as Required<PopsConfirmConfig>;
|
|
149
149
|
if (!(config.btn?.ok?.enable || confirm_config.btn?.cancel?.enable || confirm_config.btn?.other?.enable)) {
|
|
150
150
|
// 确定、取消、其它按钮都未启用直接返回
|
|
151
151
|
return "";
|
|
@@ -164,7 +164,7 @@ export const PopsElementHandler = {
|
|
|
164
164
|
btnStyle += "flex-direction: row-reverse;";
|
|
165
165
|
}
|
|
166
166
|
if (config.btn?.ok?.enable) {
|
|
167
|
-
|
|
167
|
+
// 处理确定按钮的尺寸问题
|
|
168
168
|
let okButtonSizeClassName = "";
|
|
169
169
|
if (config.btn.ok.size === "large") {
|
|
170
170
|
okButtonSizeClassName = "pops-button-" + config.btn.ok.size;
|
|
@@ -196,7 +196,7 @@ export const PopsElementHandler = {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
if (confirm_config.btn?.cancel?.enable) {
|
|
199
|
-
|
|
199
|
+
// 处理取消按钮的尺寸问题
|
|
200
200
|
let cancelButtonSizeClassName = "";
|
|
201
201
|
|
|
202
202
|
if (confirm_config.btn.cancel.size === "large") {
|
|
@@ -229,7 +229,7 @@ export const PopsElementHandler = {
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
if (confirm_config.btn?.other?.enable) {
|
|
232
|
-
|
|
232
|
+
// 处理其它按钮的尺寸问题
|
|
233
233
|
let otherButtonSizeClassName = "";
|
|
234
234
|
|
|
235
235
|
if (confirm_config.btn.other.size === "large") {
|
|
@@ -285,12 +285,11 @@ export const PopsElementHandler = {
|
|
|
285
285
|
* @param config 弹窗配置
|
|
286
286
|
*/
|
|
287
287
|
createContentStyle(
|
|
288
|
-
type:
|
|
289
|
-
config:
|
|
288
|
+
type: PopsSupportContentConfigType,
|
|
289
|
+
config: PopsSupportContentConfig[keyof PopsSupportContentConfig]
|
|
290
290
|
) {
|
|
291
291
|
return {
|
|
292
292
|
contentStyle: (config?.content as any)?.html ? config?.content?.style || "" : "",
|
|
293
|
-
|
|
294
293
|
contentPStyle: (config?.content as any)?.html ? "" : config?.content?.style || "",
|
|
295
294
|
};
|
|
296
295
|
},
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type {
|
|
6
|
-
import type {
|
|
7
|
-
import type {
|
|
8
|
-
import type {
|
|
1
|
+
import type { PopsAlertConfig } from "../components/alert/types";
|
|
2
|
+
import type { PopsConfirmConfig } from "../components/confirm/types";
|
|
3
|
+
import type { PopsDrawerConfig } from "../components/drawer/types";
|
|
4
|
+
import type { PopsFolderConfig } from "../components/folder/types";
|
|
5
|
+
import type { PopsIframeConfig } from "../components/iframe/types";
|
|
6
|
+
import type { PopsLoadingConfig } from "../components/loading/types";
|
|
7
|
+
import type { PopsPanelConfig } from "../components/panel/types";
|
|
8
|
+
import type { PopsPromptConfig } from "../components/prompt/types/index";
|
|
9
9
|
import { PopsCore } from "../PopsCore";
|
|
10
10
|
import { PopsAnimation } from "../PopsAnimation";
|
|
11
11
|
import { PopsInstData } from "../PopsInst";
|
|
12
|
-
import type {
|
|
12
|
+
import type { PopsGeneralConfig } from "../types/components";
|
|
13
13
|
import type { PopsEventConfig, PopsHandlerEventConfig } from "../types/event";
|
|
14
|
-
import type {
|
|
15
|
-
import type { PopsInstStoreType, PopsType,
|
|
14
|
+
import type { PopsInstGeneralConfig } from "../types/inst";
|
|
15
|
+
import type { PopsInstStoreType, PopsType, PopsSupportAnimConfigType, PopsSupportOnlyConfig } from "../types/main";
|
|
16
16
|
import { popsDOMUtils } from "../utils/PopsDOMUtils";
|
|
17
17
|
import { PopsInstanceUtils } from "../utils/PopsInstanceUtils";
|
|
18
18
|
import { popsUtils } from "../utils/PopsUtils";
|
|
@@ -21,7 +21,7 @@ export const PopsHandler = {
|
|
|
21
21
|
/**
|
|
22
22
|
* 创建shadow
|
|
23
23
|
*/
|
|
24
|
-
handlerShadow(config: Pick<
|
|
24
|
+
handlerShadow(config: Pick<PopsGeneralConfig, "useShadowRoot">) {
|
|
25
25
|
const $shadowContainer = popsDOMUtils.createElement("div", {
|
|
26
26
|
className: "pops-shadow-container",
|
|
27
27
|
});
|
|
@@ -110,12 +110,12 @@ export const PopsHandler = {
|
|
|
110
110
|
type: "alert" | "confirm" | "prompt" | "loading" | "iframe" | "drawer" | "folder" | "panel";
|
|
111
111
|
guid: string;
|
|
112
112
|
config:
|
|
113
|
-
| Required<
|
|
114
|
-
| Required<
|
|
115
|
-
| Required<
|
|
116
|
-
| Required<
|
|
117
|
-
| Required<
|
|
118
|
-
| Required<
|
|
113
|
+
| Required<PopsAlertConfig>
|
|
114
|
+
| Required<PopsLoadingConfig>
|
|
115
|
+
| Required<PopsIframeConfig>
|
|
116
|
+
| Required<PopsDrawerConfig>
|
|
117
|
+
| Required<PopsPanelConfig>
|
|
118
|
+
| Required<PopsFolderConfig>;
|
|
119
119
|
animElement: HTMLElement;
|
|
120
120
|
maskHTML: string;
|
|
121
121
|
}
|
|
@@ -134,10 +134,10 @@ export const PopsHandler = {
|
|
|
134
134
|
const targetInst = PopsInstData[config.type];
|
|
135
135
|
function originalRun() {
|
|
136
136
|
if (config.config.mask!.clickEvent!.toClose) {
|
|
137
|
-
|
|
137
|
+
// 关闭
|
|
138
138
|
return PopsInstanceUtils.close(config.config, config.type, targetInst, config.guid, config.animElement);
|
|
139
139
|
} else if (config.config.mask!.clickEvent!.toHide) {
|
|
140
|
-
|
|
140
|
+
// 隐藏
|
|
141
141
|
return PopsInstanceUtils.hide(
|
|
142
142
|
config.config,
|
|
143
143
|
config.type,
|
|
@@ -170,20 +170,20 @@ export const PopsHandler = {
|
|
|
170
170
|
element.hasAttribute("anim")
|
|
171
171
|
);
|
|
172
172
|
}
|
|
173
|
-
|
|
173
|
+
// 判断按下的元素是否是pops-anim
|
|
174
174
|
popsDOMUtils.on(config.animElement, ["touchstart", "mousedown"], void 0, (event) => {
|
|
175
175
|
const $click = event.composedPath()[0] as HTMLElement;
|
|
176
176
|
isMaskClick = isAnimElement($click);
|
|
177
177
|
});
|
|
178
|
-
|
|
178
|
+
// 如果有动画层,在动画层上监听点击事件
|
|
179
179
|
popsDOMUtils.on<MouseEvent | PointerEvent>(config.animElement, "click", void 0, (event) => {
|
|
180
180
|
const $click = event.composedPath()[0] as HTMLElement;
|
|
181
181
|
if (isAnimElement($click) && isMaskClick) {
|
|
182
182
|
return clickEvent(event);
|
|
183
183
|
}
|
|
184
184
|
});
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
// 在遮罩层监听点击事件
|
|
186
|
+
// 如果有动画层,那么该点击事件触发不了
|
|
187
187
|
popsDOMUtils.on<MouseEvent | PointerEvent>(result.maskElement, "click", void 0, (event) => {
|
|
188
188
|
isMaskClick = true;
|
|
189
189
|
clickEvent(event);
|
|
@@ -196,7 +196,7 @@ export const PopsHandler = {
|
|
|
196
196
|
* @param animElement
|
|
197
197
|
* @param type
|
|
198
198
|
*/
|
|
199
|
-
handleQueryElement(animElement: HTMLDivElement, type:
|
|
199
|
+
handleQueryElement(animElement: HTMLDivElement, type: PopsSupportAnimConfigType) {
|
|
200
200
|
return {
|
|
201
201
|
/**
|
|
202
202
|
* 主元素
|
|
@@ -351,14 +351,14 @@ export const PopsHandler = {
|
|
|
351
351
|
*/
|
|
352
352
|
handleEventConfig(
|
|
353
353
|
config:
|
|
354
|
-
|
|
|
355
|
-
|
|
|
356
|
-
|
|
|
357
|
-
|
|
|
358
|
-
|
|
|
359
|
-
|
|
|
360
|
-
|
|
|
361
|
-
|
|
|
354
|
+
| PopsAlertConfig
|
|
355
|
+
| PopsDrawerConfig
|
|
356
|
+
| PopsPromptConfig
|
|
357
|
+
| PopsConfirmConfig
|
|
358
|
+
| PopsIframeConfig
|
|
359
|
+
| PopsLoadingConfig
|
|
360
|
+
| PopsPanelConfig
|
|
361
|
+
| PopsFolderConfig,
|
|
362
362
|
guid: string,
|
|
363
363
|
$shadowContainer: HTMLDivElement,
|
|
364
364
|
$shadowRoot: ShadowRoot | HTMLElement,
|
|
@@ -398,14 +398,14 @@ export const PopsHandler = {
|
|
|
398
398
|
*/
|
|
399
399
|
handleLoadingEventConfig(
|
|
400
400
|
config:
|
|
401
|
-
|
|
|
402
|
-
|
|
|
403
|
-
|
|
|
404
|
-
|
|
|
405
|
-
|
|
|
406
|
-
|
|
|
407
|
-
|
|
|
408
|
-
|
|
|
401
|
+
| PopsAlertConfig
|
|
402
|
+
| PopsDrawerConfig
|
|
403
|
+
| PopsPromptConfig
|
|
404
|
+
| PopsConfirmConfig
|
|
405
|
+
| PopsIframeConfig
|
|
406
|
+
| PopsLoadingConfig
|
|
407
|
+
| PopsPanelConfig
|
|
408
|
+
| PopsFolderConfig,
|
|
409
409
|
guid: string,
|
|
410
410
|
mode: "loading",
|
|
411
411
|
$anim: HTMLDivElement,
|
|
@@ -560,7 +560,7 @@ export const PopsHandler = {
|
|
|
560
560
|
* @param type 当前弹窗类型
|
|
561
561
|
* @param config 配置
|
|
562
562
|
*/
|
|
563
|
-
handleOnly<T extends Required<
|
|
563
|
+
handleOnly<T extends Required<PopsSupportOnlyConfig[keyof PopsSupportOnlyConfig]>>(type: PopsType, config: T): T {
|
|
564
564
|
if (config.only) {
|
|
565
565
|
// .loading
|
|
566
566
|
// .tooltip
|
|
@@ -602,7 +602,7 @@ export const PopsHandler = {
|
|
|
602
602
|
* @param type 当前弹窗类型
|
|
603
603
|
* @param value
|
|
604
604
|
*/
|
|
605
|
-
handlePush(type: PopsInstStoreType, value:
|
|
605
|
+
handlePush(type: PopsInstStoreType, value: PopsInstGeneralConfig) {
|
|
606
606
|
PopsInstData[type].push(value);
|
|
607
607
|
},
|
|
608
608
|
};
|
package/src/svg/cpu.svg
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="cpu">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M320 256a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h384a64 64 0 0 0 64-64V320a64 64 0 0 0-64-64H320zm0-64h384a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H320a128 128 0 0 1-128-128V320a128 128 0 0 1 128-128z"></path>
|
|
5
|
+
<path
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
d="M512 64a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32zm160 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32zm-320 0a32 32 0 0 1 32 32v128h-64V96a32 32 0 0 1 32-32zm160 896a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32zm160 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32zm-320 0a32 32 0 0 1-32-32V800h64v128a32 32 0 0 1-32 32zM64 512a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32zm0-160a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32zm0 320a32 32 0 0 1 32-32h128v64H96a32 32 0 0 1-32-32zm896-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32zm0-160a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32zm0 320a32 32 0 0 1-32 32H800v-64h128a32 32 0 0 1 32 32z"></path>
|
|
8
8
|
</svg>
|
package/src/svg/delete.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="delete">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"></path>
|
|
5
5
|
</svg>
|
package/src/svg/documentCopy.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="documentCopy">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M128 320v576h576V320H128zm-32-64h640a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V288a32 32 0 0 1 32-32zM960 96v704a32 32 0 0 1-32 32h-96v-64h64V128H384v64h-64V96a32 32 0 0 1 32-32h576a32 32 0 0 1 32 32zM256 672h320v64H256v-64zm0-192h320v64H256v-64z"></path>
|
|
5
5
|
</svg>
|
package/src/svg/edit.svg
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="edit">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640V512z"></path>
|
|
5
|
+
<path
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
d="m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"></path>
|
|
8
8
|
</svg>
|
package/src/svg/eleme.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="eleme">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M300.032 188.8c174.72-113.28 408-63.36 522.24 109.44 5.76 10.56 11.52 20.16 17.28 30.72v.96a22.4 22.4 0 0 1-7.68 26.88l-352.32 228.48c-9.6 6.72-22.08 3.84-28.8-5.76l-18.24-27.84a54.336 54.336 0 0 1 16.32-74.88l225.6-146.88c9.6-6.72 12.48-19.2 5.76-28.8-.96-1.92-1.92-3.84-3.84-4.8a267.84 267.84 0 0 0-315.84-17.28c-123.84 81.6-159.36 247.68-78.72 371.52a268.096 268.096 0 0 0 370.56 78.72 54.336 54.336 0 0 1 74.88 16.32l17.28 26.88c5.76 9.6 3.84 21.12-4.8 27.84-8.64 7.68-18.24 14.4-28.8 21.12a377.92 377.92 0 0 1-522.24-110.4c-113.28-174.72-63.36-408 111.36-522.24zm526.08 305.28a22.336 22.336 0 0 1 28.8 5.76l23.04 35.52a63.232 63.232 0 0 1-18.24 87.36l-35.52 23.04c-9.6 6.72-22.08 3.84-28.8-5.76l-46.08-71.04c-6.72-9.6-3.84-22.08 5.76-28.8l71.04-46.08z"></path>
|
|
5
5
|
</svg>
|
package/src/svg/elemePlus.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="elemePlus">
|
|
2
|
+
<path
|
|
3
|
+
d="M839.7 734.7c0 33.3-17.9 41-17.9 41S519.7 949.8 499.2 960c-10.2 5.1-20.5 5.1-30.7 0 0 0-314.9-184.3-325.1-192-5.1-5.1-10.2-12.8-12.8-20.5V368.6c0-17.9 20.5-28.2 20.5-28.2L466 158.6c12.8-5.1 25.6-5.1 38.4 0 0 0 279 161.3 309.8 179.2 17.9 7.7 28.2 25.6 25.6 46.1-.1-5-.1 317.5-.1 350.8zM714.2 371.2c-64-35.8-217.6-125.4-217.6-125.4-7.7-5.1-20.5-5.1-30.7 0L217.6 389.1s-17.9 10.2-17.9 23v297c0 5.1 5.1 12.8 7.7 17.9 7.7 5.1 256 148.5 256 148.5 7.7 5.1 17.9 5.1 25.6 0 15.4-7.7 250.9-145.9 250.9-145.9s12.8-5.1 12.8-30.7v-74.2l-276.5 169v-64c0-17.9 7.7-30.7 20.5-46.1L745 535c5.1-7.7 10.2-20.5 10.2-30.7v-66.6l-279 169v-69.1c0-15.4 5.1-30.7 17.9-38.4l220.1-128zM919 135.7c0-5.1-5.1-7.7-7.7-7.7h-58.9V66.6c0-5.1-5.1-5.1-10.2-5.1l-30.7 5.1c-5.1 0-5.1 2.6-5.1 5.1V128h-56.3c-5.1 0-5.1 5.1-7.7 5.1v38.4h69.1v64c0 5.1 5.1 5.1 10.2 5.1l30.7-5.1c5.1 0 5.1-2.6 5.1-5.1v-56.3h64l-2.5-38.4z"
|
|
4
|
+
fill="currentColor"></path>
|
|
5
5
|
</svg>
|
package/src/svg/headset.svg
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-type="headset">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M896 529.152V512a384 384 0 1 0-768 0v17.152A128 128 0 0 1 320 640v128a128 128 0 1 1-256 0V512a448 448 0 1 1 896 0v256a128 128 0 1 1-256 0V640a128 128 0 0 1 192-110.848zM896 640a64 64 0 0 0-128 0v128a64 64 0 0 0 128 0V640zm-768 0v128a64 64 0 0 0 128 0V640a64 64 0 1 0-128 0z"></path>
|
|
5
5
|
</svg>
|
package/src/svg/hide.svg
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" data-type="hide">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"></path>
|
|
5
|
+
<path
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
d="M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"></path>
|
|
8
8
|
</svg>
|