@douyinfe/semi-foundation 2.76.1 → 2.78.0-alpha.2

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.
Files changed (35) hide show
  1. package/inputNumber/foundation.ts +176 -10
  2. package/lib/cjs/inputNumber/foundation.d.ts +15 -1
  3. package/lib/cjs/inputNumber/foundation.js +169 -8
  4. package/lib/cjs/markdownRender/foundation.d.ts +1 -1
  5. package/lib/cjs/tooltip/foundation.d.ts +5 -0
  6. package/lib/cjs/tooltip/foundation.js +22 -0
  7. package/lib/cjs/userGuide/animation.scss +2 -0
  8. package/lib/cjs/userGuide/constants.d.ts +15 -0
  9. package/lib/cjs/userGuide/constants.js +21 -0
  10. package/lib/cjs/userGuide/foundation.d.ts +24 -0
  11. package/lib/cjs/userGuide/foundation.js +82 -0
  12. package/lib/cjs/userGuide/userGuide.css +109 -0
  13. package/lib/cjs/userGuide/userGuide.scss +143 -0
  14. package/lib/cjs/userGuide/variables.scss +48 -0
  15. package/lib/es/inputNumber/foundation.d.ts +15 -1
  16. package/lib/es/inputNumber/foundation.js +169 -8
  17. package/lib/es/markdownRender/foundation.d.ts +1 -1
  18. package/lib/es/tooltip/foundation.d.ts +5 -0
  19. package/lib/es/tooltip/foundation.js +22 -0
  20. package/lib/es/userGuide/animation.scss +2 -0
  21. package/lib/es/userGuide/constants.d.ts +15 -0
  22. package/lib/es/userGuide/constants.js +16 -0
  23. package/lib/es/userGuide/foundation.d.ts +24 -0
  24. package/lib/es/userGuide/foundation.js +74 -0
  25. package/lib/es/userGuide/userGuide.css +109 -0
  26. package/lib/es/userGuide/userGuide.scss +143 -0
  27. package/lib/es/userGuide/variables.scss +48 -0
  28. package/markdownRender/foundation.ts +2 -1
  29. package/package.json +4 -4
  30. package/tooltip/foundation.ts +26 -2
  31. package/userGuide/animation.scss +2 -0
  32. package/userGuide/constants.ts +35 -0
  33. package/userGuide/foundation.ts +87 -0
  34. package/userGuide/userGuide.scss +143 -0
  35. package/userGuide/variables.scss +48 -0
@@ -0,0 +1,143 @@
1
+ @import './variables.scss';
2
+ @import './animation.scss';
3
+
4
+ $module: #{$prefix}-userGuide;
5
+
6
+
7
+ .#{$module} {
8
+
9
+ &-spotlight {
10
+ position: fixed;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100vw;
14
+ height: 100vh;
15
+ pointer-events: none;
16
+
17
+ &-rect {
18
+ transition: all $transition_duration-userGuide_spotLight $transition_function-userGuide_spotLight;
19
+ }
20
+ }
21
+
22
+ &-popover {
23
+ max-width: fit-content;
24
+ width: $width-userGuide_popover-default;
25
+ }
26
+
27
+ &-popup-content {
28
+ color: $color-userGuide_popup-text-default;
29
+
30
+ &-primary {
31
+ color: $color-userGuide_popup-text-primary;
32
+ }
33
+
34
+ &-cover {
35
+ img {
36
+ display: block;
37
+ height: $height-userGuide_popup_content_cover-default;
38
+ width: 100%;
39
+ border-radius: $radius-userGuide_popup_content_cover;
40
+ }
41
+ }
42
+
43
+ &-body {
44
+ padding: $spacing-userGuide_popup_content_body-padding;
45
+ }
46
+
47
+ &-title {
48
+ font-size: $font-userGuide_popup_content_title-fontSize;
49
+ font-weight: $font-userGuide_popup_content_title-fontWeight;
50
+ line-height: $font-userGuide_popup_content_title-lineHeight;
51
+ margin-bottom: $spacing-userGuide_popup_content_title-marginBottom;
52
+ }
53
+
54
+ &-description {
55
+ font-size: $font-userGuide_popup_content_description-fontSize;
56
+ line-height: $font-userGuide_popup_content_description-lineHeight;
57
+ margin-bottom: $spacing-userGuide_popup_content_description-marginBottom;
58
+ }
59
+
60
+ &-footer {
61
+ display: flex;
62
+ justify-content: space-between;
63
+ align-items: center;
64
+ }
65
+
66
+ &-buttons {
67
+ display: flex;
68
+ gap: $spacing-userGuide_popup_content_button-gap;
69
+ margin-left: $spacing-userGuide_popup_content_button-marginLeft;
70
+ }
71
+
72
+ &-indicator {
73
+ font-size: $font-size-regular;
74
+ line-height: $font-userGuide_popup_content_indicator-lineHeight;
75
+ }
76
+ }
77
+
78
+ &-modal {
79
+
80
+ .#{$prefix}-modal-small {
81
+ width: fit-content;
82
+ }
83
+
84
+ // Override the modal's original padding
85
+ .#{$prefix}-modal-content {
86
+ padding: 0;
87
+ width: $width-userGuide_modal_content_cover-default;
88
+ max-width: fit-content;
89
+ }
90
+
91
+ &-cover {
92
+ height: $height-userGuide_modal_content_cover-default;
93
+ }
94
+
95
+ &-indicator {
96
+ height: $height-userGuide_modal_content_indicator-default;
97
+ display: flex;
98
+ justify-content: center;
99
+ align-items: center;
100
+ column-gap: $spacing-userGuide_popup_content_indicator-gap;
101
+
102
+ &-item {
103
+ width: $width-userGuide_modal_content_indicator_item-default;
104
+ height: $height-userGuide_modal_content_indicator_item-default;
105
+ border-radius: $radius-userGuide_modal_content_indicator;
106
+ background-color: $color-userGuide_modal_content_indicator-bg;
107
+
108
+ &-active {
109
+ background: $color-userGuide_modal_content_indicator-bg-active
110
+ }
111
+ }
112
+ }
113
+
114
+ &-body {
115
+ display: flex;
116
+ justify-content: center;
117
+ align-items: center;
118
+ flex-direction: column;
119
+ padding: $spacing-userGuide_modal_content_body-padding;
120
+
121
+ &-title {
122
+ font-size: $font-userGuide_modal_content_title-fontSize;
123
+ font-weight: $font-userGuide_modal_content_title-fontWeight;
124
+ line-height:$font-userGuide_modal_content_title-lineHeight;
125
+ margin-bottom: $spacing-userGuide_modal_content_title-marginBottom;
126
+ }
127
+
128
+ &-description {
129
+ font-size: $font-userGuide_modal_content_description-fontSize;
130
+ line-height: $font-userGuide_modal_content_description-lineHeight;
131
+ }
132
+ }
133
+
134
+ &-footer {
135
+ display: flex;
136
+ justify-content: center;
137
+ align-items: center;
138
+ padding: $spacing-userGuide_modal_content_footer-padding;
139
+ column-gap: $spacing-userGuide_modal_content_button-gap
140
+ }
141
+ }
142
+ }
143
+
@@ -0,0 +1,48 @@
1
+ // Color
2
+ $color-userGuide_popup-text-default: var(--semi-color-text-0); // 气泡卡片文字颜色 - 默认
3
+ $color-userGuide_popup-text-primary: var(--semi-color-tertiary-light-default); // 气泡卡片文字颜色 - primary
4
+ $color-userGuide_modal_content_indicator-bg: var(--semi-color-primary-light-active); // 弹窗指示器背景颜色
5
+ $color-userGuide_modal_content_indicator-bg-active: var(--semi-color-primary); // 弹窗指示器背景颜色 - 选中态
6
+
7
+ // Width/Height
8
+ $width-userGuide_popover-default: 400px; // 默认气泡卡片宽度
9
+ $height-userGuide_popup_content_cover-default: 200px; // 默认气泡卡片封面高度
10
+ $width-userGuide_modal_content_cover-default: 600px; // 默认弹窗式卡片封面宽度
11
+ $height-userGuide_modal_content_cover-default: 300px; // 默认弹窗式卡片封面高度
12
+ $height-userGuide_modal_content_indicator-default: 30px; // 默认弹窗式卡片指示器整体高度
13
+ $width-userGuide_modal_content_indicator_item-default: 6px; // 默认弹窗式卡片单个指示器宽度
14
+ $height-userGuide_modal_content_indicator_item-default: 6px; // 默认弹窗式卡片单个指示器高度
15
+ $font-userGuide_popup_content_title-lineHeight: 24px; // 气泡卡片标题行高
16
+ $font-userGuide_popup_content_description-lineHeight: 20px; // 气泡卡片详情行高
17
+ $font-userGuide_popup_content_indicator-lineHeight: 20px; // 气泡卡片指示器行高
18
+ $font-userGuide_modal_content_title-lineHeight: 24px; // 弹窗式卡片标题行高
19
+ $font-userGuide_modal_content_description-lineHeight: 20px; // 弹窗式卡片详情行高
20
+
21
+ // Spacing
22
+ $spacing-userGuide_popup_content_body-padding: 24px; // 气泡卡片内边距
23
+ $spacing-userGuide_popup_content_title-marginBottom: 8px; // 气泡卡片标题底部外边距
24
+ $spacing-userGuide_popup_content_description-marginBottom: 48px; // 气泡卡片详情底部外边距
25
+ $spacing-userGuide_popup_content_button-gap: 12px; // 气泡卡片底部按钮间距
26
+ $spacing-userGuide_popup_content_button-marginLeft: 120px; // 气泡卡片按钮组左边距
27
+ $spacing-userGuide_modal_content_title-marginBottom: 8px; // 弹窗式卡片标题底部外边距
28
+ $spacing-userGuide_modal_content_body-padding: 24px 48px; // 弹窗式卡片body内边距
29
+ $spacing-userGuide_modal_content_footer-padding: 24px; // 弹窗式卡片footer内边距
30
+ $spacing-userGuide_popup_content_indicator-gap: 8px; // 弹窗式片指示器间距
31
+ $spacing-userGuide_modal_content_button-gap: 12px; // 弹窗式卡片底部按钮间距
32
+
33
+
34
+ // Radius
35
+ $radius-userGuide_popup_content_cover: var(--semi-border-radius-medium) var(--semi-border-radius-medium) 0 0; // 气泡卡片封面圆角
36
+ $radius-userGuide_modal_content_indicator: var(--semi-border-radius-large); // 气泡卡片指示器圆角
37
+
38
+
39
+ // font
40
+ $font-userGuide_popup_content_title-fontSize: $font-size-header-5; // 气泡卡片标题字体大小
41
+ $font-userGuide_popup_content_description-fontSize: $font-size-regular; // 气泡卡片详情字体大小
42
+ $font-userGuide_popup_content_indicator-fontSize: $font-size-regular; // 气泡卡片指示器字体大小
43
+ $font-userGuide_popup_content_title-fontWeight: $font-weight-bold; // 气泡卡片标题字重
44
+ $font-userGuide_modal_content_title-fontSize: $font-size-header-5; // 弹窗式卡片标题字体大小
45
+ $font-userGuide_modal_content_description-fontSize: $font-size-regular; // 弹窗式卡详情字体大小
46
+ $font-userGuide_modal_content_title-fontWeight: $font-weight-bold; // 弹窗式卡片标题字重
47
+
48
+
@@ -2,7 +2,8 @@ import BaseFoundation, { DefaultAdapter } from '../base/foundation';
2
2
  import { CompileOptions, evaluate, compile, EvaluateOptions, evaluateSync, RunOptions } from '@mdx-js/mdx';
3
3
  import { MDXProps } from 'mdx/types';
4
4
  import remarkGfm from 'remark-gfm';
5
- import { type PluggableList } from "@mdx-js/mdx/lib/core";
5
+ import type { PluggableList } from 'unified';
6
+
6
7
  export interface MarkdownRenderAdapter <P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
7
8
  getRuntime: () => any
8
9
 
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.76.1",
3
+ "version": "2.78.0-alpha.2",
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.76.1",
11
- "@douyinfe/semi-json-viewer-core": "2.76.1",
10
+ "@douyinfe/semi-animation": "2.78.0-alpha.2",
11
+ "@douyinfe/semi-json-viewer-core": "2.78.0-alpha.2",
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": "3feea3f0ba53bd6710ad2fc9aca2ec892a2a21df",
32
+ "gitHead": "8f2966f2472daa5369f886b2c246ceccf59ed94e",
33
33
  "devDependencies": {
34
34
  "@babel/plugin-transform-runtime": "^7.15.8",
35
35
  "@babel/preset-env": "^7.15.8",
@@ -4,6 +4,7 @@ import BaseFoundation, { DefaultAdapter } from '../base/foundation';
4
4
  import { ArrayElement } from '../utils/type';
5
5
  import { strings } from './constants';
6
6
  import { handlePrevent } from '../utils/a11y';
7
+ import { getUuidShort } from "../utils/uuid";
7
8
 
8
9
  const REGS = {
9
10
  TOP: /top/i,
@@ -81,7 +82,7 @@ export interface PopupContainerDOMRect extends DOMRectLikeType {
81
82
  export default class Tooltip<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<TooltipAdapter<P, S>, P, S> {
82
83
  _timer: ReturnType<typeof setTimeout>;
83
84
  _mounted: boolean;
84
-
85
+ anchorName = `--native-semi-anchor-${getUuidShort()}`
85
86
  constructor(adapter: TooltipAdapter<P, S>) {
86
87
  super({ ...adapter });
87
88
  this._timer = null;
@@ -135,7 +136,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
135
136
  unBindResizeEvent() {
136
137
  this._adapter.unregisterResizeHandler(this.onResize);
137
138
  }
138
-
139
+
139
140
  removePortal = () => {
140
141
  this._adapter.removePortal();
141
142
  }
@@ -199,6 +200,29 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
199
200
  }
200
201
  }
201
202
 
203
+ getNativeAnchorStyle = () => {
204
+ const style = {
205
+ positionAnchor: this.anchorName,
206
+ position: "fixed",
207
+ };
208
+ const position = this._adapter.getProp("position");
209
+ const spacing = this._adapter.getProp("spacing");
210
+ if (position === "top") {
211
+ style['bottom'] = `anchor(top)`;
212
+ style['justifySelf'] = "anchor-center";
213
+ style["transform"] = `translateY(-${spacing}px)`;
214
+
215
+ } else if (position === "bottom") {
216
+ style['top'] = `anchor(bottom)`;
217
+ style['justifySelf'] = "anchor-center";
218
+ style["transform"] = `translateY(${spacing}px)`;
219
+
220
+ } else {
221
+ throw new Error(`Currently, not support position ${position} when enable native anchor ability, only 'top' 'bottom'.`);
222
+ }
223
+ return style;
224
+ }
225
+
202
226
  _generateEvent(types: ArrayElement<typeof strings.TRIGGER_SET>) {
203
227
  const eventNames = this._adapter.getEventName();
204
228
  const triggerEventSet = {
@@ -0,0 +1,2 @@
1
+ $transition_duration-userGuide_spotLight: 200ms; // spotLight 动画持续时间
2
+ $transition_function-userGuide_spotLight: cubic-bezier(0.4, 0, 0.2, 1); // spotLight 过渡曲线
@@ -0,0 +1,35 @@
1
+ import { BASE_CLASS_PREFIX } from '../base/constants';
2
+
3
+ const cssClasses = {
4
+ PREFIX: `${BASE_CLASS_PREFIX}-userGuide`,
5
+ PREFIX_MODAL: `${BASE_CLASS_PREFIX}-userGuide-modal`,
6
+ };
7
+
8
+ const strings = {
9
+ MODE: ['popup', 'modal'],
10
+ POSITION_SET: [
11
+ 'top',
12
+ 'topLeft',
13
+ 'topRight',
14
+ 'left',
15
+ 'leftTop',
16
+ 'leftBottom',
17
+ 'right',
18
+ 'rightTop',
19
+ 'rightBottom',
20
+ 'bottom',
21
+ 'bottomLeft',
22
+ 'bottomRight',
23
+ 'leftTopOver',
24
+ 'rightTopOver',
25
+ ],
26
+ THEME: ['default', 'primary'],
27
+ };
28
+
29
+ const numbers = {
30
+ DEFAULT_CURRENT: 0,
31
+ DEFAULT_SPOTLIGHT_PADDING: 5,
32
+ DEFAULT_Z_INDEX: 1030,
33
+ };
34
+
35
+ export { cssClasses, strings, numbers };
@@ -0,0 +1,87 @@
1
+ import BaseFoundation, { DefaultAdapter } from '../base/foundation';
2
+ import { numbers } from './constants';
3
+
4
+ export interface UserGuideAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S>{
5
+ notifyChange: (current: number) => void;
6
+ notifyPrev: (current: number) => void;
7
+ notifyNext: (current: number) => void;
8
+ notifySkip: () => void;
9
+ notifyFinish: () => void;
10
+ setCurrent: (current: number) => void;
11
+ disabledBodyScroll: () => void;
12
+ enabledBodyScroll: () => void
13
+ }
14
+
15
+
16
+ export default class UserGuideFoundation <P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<UserGuideAdapter<P, S>, P, S> {
17
+ constructor(adapter: UserGuideAdapter<P, S>) {
18
+ super({ ...adapter });
19
+ }
20
+
21
+ init() {
22
+ }
23
+
24
+ destroy() {
25
+ this._adapter.enabledBodyScroll();
26
+ }
27
+
28
+ _notifyChange(current: number): void {
29
+ const { current: stateCurrent } = this.getStates();
30
+ if (stateCurrent !== current) {
31
+ this._adapter.notifyChange(current);
32
+ }
33
+ }
34
+
35
+ getIsControlledComponent(): boolean {
36
+ return this._isInProps('current');
37
+ }
38
+
39
+ beforeShow() {
40
+ this._adapter.disabledBodyScroll();
41
+ }
42
+
43
+ afterHide() {
44
+ this._adapter.enabledBodyScroll();
45
+ }
46
+
47
+ getFinalPaading() {
48
+ const { spotlightPadding, steps } = this.getProps();
49
+ const { current } = this.getStates();
50
+ const stepPadding = steps[current]?.spotlightPadding;
51
+ const padding = typeof stepPadding === 'number' ? stepPadding :
52
+ typeof spotlightPadding === 'number' ? spotlightPadding :
53
+ numbers.DEFAULT_SPOTLIGHT_PADDING;
54
+ return padding;
55
+ }
56
+
57
+ handlePrev = () => {
58
+ const { current } = this.getStates();
59
+ const newCurrent = current - 1;
60
+ if (!this.getIsControlledComponent()) {
61
+ this._adapter.setCurrent(newCurrent);
62
+ }
63
+ this._notifyChange(newCurrent);
64
+ this._adapter.notifyPrev(newCurrent);
65
+ };
66
+
67
+ handleNext = () => {
68
+ const { steps } = this.getProps();
69
+ const { current } = this.getStates();
70
+ const isLastStep = current === steps.length - 1;
71
+ const newCurrent = isLastStep ? current : current + 1;
72
+ if (isLastStep) {
73
+ this._adapter.notifyFinish();
74
+ } else {
75
+ this._notifyChange(newCurrent);
76
+ this._adapter.notifyNext(newCurrent);
77
+ if (!this.getIsControlledComponent()) {
78
+ this._adapter.setCurrent(newCurrent);
79
+ }
80
+ }
81
+ };
82
+
83
+ handleSkip = () => {
84
+ this._adapter.notifySkip();
85
+ };
86
+
87
+ }
@@ -0,0 +1,143 @@
1
+ @import './variables.scss';
2
+ @import './animation.scss';
3
+
4
+ $module: #{$prefix}-userGuide;
5
+
6
+
7
+ .#{$module} {
8
+
9
+ &-spotlight {
10
+ position: fixed;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100vw;
14
+ height: 100vh;
15
+ pointer-events: none;
16
+
17
+ &-rect {
18
+ transition: all $transition_duration-userGuide_spotLight $transition_function-userGuide_spotLight;
19
+ }
20
+ }
21
+
22
+ &-popover {
23
+ max-width: fit-content;
24
+ width: $width-userGuide_popover-default;
25
+ }
26
+
27
+ &-popup-content {
28
+ color: $color-userGuide_popup-text-default;
29
+
30
+ &-primary {
31
+ color: $color-userGuide_popup-text-primary;
32
+ }
33
+
34
+ &-cover {
35
+ img {
36
+ display: block;
37
+ height: $height-userGuide_popup_content_cover-default;
38
+ width: 100%;
39
+ border-radius: $radius-userGuide_popup_content_cover;
40
+ }
41
+ }
42
+
43
+ &-body {
44
+ padding: $spacing-userGuide_popup_content_body-padding;
45
+ }
46
+
47
+ &-title {
48
+ font-size: $font-userGuide_popup_content_title-fontSize;
49
+ font-weight: $font-userGuide_popup_content_title-fontWeight;
50
+ line-height: $font-userGuide_popup_content_title-lineHeight;
51
+ margin-bottom: $spacing-userGuide_popup_content_title-marginBottom;
52
+ }
53
+
54
+ &-description {
55
+ font-size: $font-userGuide_popup_content_description-fontSize;
56
+ line-height: $font-userGuide_popup_content_description-lineHeight;
57
+ margin-bottom: $spacing-userGuide_popup_content_description-marginBottom;
58
+ }
59
+
60
+ &-footer {
61
+ display: flex;
62
+ justify-content: space-between;
63
+ align-items: center;
64
+ }
65
+
66
+ &-buttons {
67
+ display: flex;
68
+ gap: $spacing-userGuide_popup_content_button-gap;
69
+ margin-left: $spacing-userGuide_popup_content_button-marginLeft;
70
+ }
71
+
72
+ &-indicator {
73
+ font-size: $font-size-regular;
74
+ line-height: $font-userGuide_popup_content_indicator-lineHeight;
75
+ }
76
+ }
77
+
78
+ &-modal {
79
+
80
+ .#{$prefix}-modal-small {
81
+ width: fit-content;
82
+ }
83
+
84
+ // Override the modal's original padding
85
+ .#{$prefix}-modal-content {
86
+ padding: 0;
87
+ width: $width-userGuide_modal_content_cover-default;
88
+ max-width: fit-content;
89
+ }
90
+
91
+ &-cover {
92
+ height: $height-userGuide_modal_content_cover-default;
93
+ }
94
+
95
+ &-indicator {
96
+ height: $height-userGuide_modal_content_indicator-default;
97
+ display: flex;
98
+ justify-content: center;
99
+ align-items: center;
100
+ column-gap: $spacing-userGuide_popup_content_indicator-gap;
101
+
102
+ &-item {
103
+ width: $width-userGuide_modal_content_indicator_item-default;
104
+ height: $height-userGuide_modal_content_indicator_item-default;
105
+ border-radius: $radius-userGuide_modal_content_indicator;
106
+ background-color: $color-userGuide_modal_content_indicator-bg;
107
+
108
+ &-active {
109
+ background: $color-userGuide_modal_content_indicator-bg-active
110
+ }
111
+ }
112
+ }
113
+
114
+ &-body {
115
+ display: flex;
116
+ justify-content: center;
117
+ align-items: center;
118
+ flex-direction: column;
119
+ padding: $spacing-userGuide_modal_content_body-padding;
120
+
121
+ &-title {
122
+ font-size: $font-userGuide_modal_content_title-fontSize;
123
+ font-weight: $font-userGuide_modal_content_title-fontWeight;
124
+ line-height:$font-userGuide_modal_content_title-lineHeight;
125
+ margin-bottom: $spacing-userGuide_modal_content_title-marginBottom;
126
+ }
127
+
128
+ &-description {
129
+ font-size: $font-userGuide_modal_content_description-fontSize;
130
+ line-height: $font-userGuide_modal_content_description-lineHeight;
131
+ }
132
+ }
133
+
134
+ &-footer {
135
+ display: flex;
136
+ justify-content: center;
137
+ align-items: center;
138
+ padding: $spacing-userGuide_modal_content_footer-padding;
139
+ column-gap: $spacing-userGuide_modal_content_button-gap
140
+ }
141
+ }
142
+ }
143
+
@@ -0,0 +1,48 @@
1
+ // Color
2
+ $color-userGuide_popup-text-default: var(--semi-color-text-0); // 气泡卡片文字颜色 - 默认
3
+ $color-userGuide_popup-text-primary: var(--semi-color-tertiary-light-default); // 气泡卡片文字颜色 - primary
4
+ $color-userGuide_modal_content_indicator-bg: var(--semi-color-primary-light-active); // 弹窗指示器背景颜色
5
+ $color-userGuide_modal_content_indicator-bg-active: var(--semi-color-primary); // 弹窗指示器背景颜色 - 选中态
6
+
7
+ // Width/Height
8
+ $width-userGuide_popover-default: 400px; // 默认气泡卡片宽度
9
+ $height-userGuide_popup_content_cover-default: 200px; // 默认气泡卡片封面高度
10
+ $width-userGuide_modal_content_cover-default: 600px; // 默认弹窗式卡片封面宽度
11
+ $height-userGuide_modal_content_cover-default: 300px; // 默认弹窗式卡片封面高度
12
+ $height-userGuide_modal_content_indicator-default: 30px; // 默认弹窗式卡片指示器整体高度
13
+ $width-userGuide_modal_content_indicator_item-default: 6px; // 默认弹窗式卡片单个指示器宽度
14
+ $height-userGuide_modal_content_indicator_item-default: 6px; // 默认弹窗式卡片单个指示器高度
15
+ $font-userGuide_popup_content_title-lineHeight: 24px; // 气泡卡片标题行高
16
+ $font-userGuide_popup_content_description-lineHeight: 20px; // 气泡卡片详情行高
17
+ $font-userGuide_popup_content_indicator-lineHeight: 20px; // 气泡卡片指示器行高
18
+ $font-userGuide_modal_content_title-lineHeight: 24px; // 弹窗式卡片标题行高
19
+ $font-userGuide_modal_content_description-lineHeight: 20px; // 弹窗式卡片详情行高
20
+
21
+ // Spacing
22
+ $spacing-userGuide_popup_content_body-padding: 24px; // 气泡卡片内边距
23
+ $spacing-userGuide_popup_content_title-marginBottom: 8px; // 气泡卡片标题底部外边距
24
+ $spacing-userGuide_popup_content_description-marginBottom: 48px; // 气泡卡片详情底部外边距
25
+ $spacing-userGuide_popup_content_button-gap: 12px; // 气泡卡片底部按钮间距
26
+ $spacing-userGuide_popup_content_button-marginLeft: 120px; // 气泡卡片按钮组左边距
27
+ $spacing-userGuide_modal_content_title-marginBottom: 8px; // 弹窗式卡片标题底部外边距
28
+ $spacing-userGuide_modal_content_body-padding: 24px 48px; // 弹窗式卡片body内边距
29
+ $spacing-userGuide_modal_content_footer-padding: 24px; // 弹窗式卡片footer内边距
30
+ $spacing-userGuide_popup_content_indicator-gap: 8px; // 弹窗式片指示器间距
31
+ $spacing-userGuide_modal_content_button-gap: 12px; // 弹窗式卡片底部按钮间距
32
+
33
+
34
+ // Radius
35
+ $radius-userGuide_popup_content_cover: var(--semi-border-radius-medium) var(--semi-border-radius-medium) 0 0; // 气泡卡片封面圆角
36
+ $radius-userGuide_modal_content_indicator: var(--semi-border-radius-large); // 气泡卡片指示器圆角
37
+
38
+
39
+ // font
40
+ $font-userGuide_popup_content_title-fontSize: $font-size-header-5; // 气泡卡片标题字体大小
41
+ $font-userGuide_popup_content_description-fontSize: $font-size-regular; // 气泡卡片详情字体大小
42
+ $font-userGuide_popup_content_indicator-fontSize: $font-size-regular; // 气泡卡片指示器字体大小
43
+ $font-userGuide_popup_content_title-fontWeight: $font-weight-bold; // 气泡卡片标题字重
44
+ $font-userGuide_modal_content_title-fontSize: $font-size-header-5; // 弹窗式卡片标题字体大小
45
+ $font-userGuide_modal_content_description-fontSize: $font-size-regular; // 弹窗式卡详情字体大小
46
+ $font-userGuide_modal_content_title-fontWeight: $font-weight-bold; // 弹窗式卡片标题字重
47
+
48
+