@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
@@ -8,6 +8,7 @@ var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
8
8
  var _get2 = _interopRequireDefault(require("lodash/get"));
9
9
  var _foundation = _interopRequireDefault(require("../base/foundation"));
10
10
  var _a11y = require("../utils/a11y");
11
+ var _uuid = require("../utils/uuid");
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
13
  const REGS = {
13
14
  TOP: /top/i,
@@ -28,6 +29,7 @@ class Tooltip extends _foundation.default {
28
29
  var _this;
29
30
  super(Object.assign({}, adapter));
30
31
  _this = this;
32
+ this.anchorName = `--native-semi-anchor-${(0, _uuid.getUuidShort)()}`;
31
33
  this.removePortal = () => {
32
34
  this._adapter.removePortal();
33
35
  };
@@ -42,6 +44,26 @@ class Tooltip extends _foundation.default {
42
44
  (_b = triggerEventSet[eventNames.mouseEnter]) === null || _b === void 0 ? void 0 : _b.call(triggerEventSet);
43
45
  }
44
46
  };
47
+ this.getNativeAnchorStyle = () => {
48
+ const style = {
49
+ positionAnchor: this.anchorName,
50
+ position: "fixed"
51
+ };
52
+ const position = this._adapter.getProp("position");
53
+ const spacing = this._adapter.getProp("spacing");
54
+ if (position === "top") {
55
+ style['bottom'] = `anchor(top)`;
56
+ style['justifySelf'] = "anchor-center";
57
+ style["transform"] = `translateY(-${spacing}px)`;
58
+ } else if (position === "bottom") {
59
+ style['top'] = `anchor(bottom)`;
60
+ style['justifySelf'] = "anchor-center";
61
+ style["transform"] = `translateY(${spacing}px)`;
62
+ } else {
63
+ throw new Error(`Currently, not support position ${position} when enable native anchor ability, only 'top' 'bottom'.`);
64
+ }
65
+ return style;
66
+ };
45
67
  this.onResize = () => {
46
68
  // this.log('resize');
47
69
  // rePosition when window resize
@@ -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,15 @@
1
+ declare const cssClasses: {
2
+ PREFIX: string;
3
+ PREFIX_MODAL: string;
4
+ };
5
+ declare const strings: {
6
+ MODE: string[];
7
+ POSITION_SET: string[];
8
+ THEME: string[];
9
+ };
10
+ declare const numbers: {
11
+ DEFAULT_CURRENT: number;
12
+ DEFAULT_SPOTLIGHT_PADDING: number;
13
+ DEFAULT_Z_INDEX: number;
14
+ };
15
+ export { cssClasses, strings, numbers };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.strings = exports.numbers = exports.cssClasses = void 0;
7
+ var _constants = require("../base/constants");
8
+ const cssClasses = exports.cssClasses = {
9
+ PREFIX: `${_constants.BASE_CLASS_PREFIX}-userGuide`,
10
+ PREFIX_MODAL: `${_constants.BASE_CLASS_PREFIX}-userGuide-modal`
11
+ };
12
+ const strings = exports.strings = {
13
+ MODE: ['popup', 'modal'],
14
+ POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
15
+ THEME: ['default', 'primary']
16
+ };
17
+ const numbers = exports.numbers = {
18
+ DEFAULT_CURRENT: 0,
19
+ DEFAULT_SPOTLIGHT_PADDING: 5,
20
+ DEFAULT_Z_INDEX: 1030
21
+ };
@@ -0,0 +1,24 @@
1
+ import BaseFoundation, { DefaultAdapter } from '../base/foundation';
2
+ export interface UserGuideAdapter<P = Record<string, any>, S = Record<string, any>> extends DefaultAdapter<P, S> {
3
+ notifyChange: (current: number) => void;
4
+ notifyPrev: (current: number) => void;
5
+ notifyNext: (current: number) => void;
6
+ notifySkip: () => void;
7
+ notifyFinish: () => void;
8
+ setCurrent: (current: number) => void;
9
+ disabledBodyScroll: () => void;
10
+ enabledBodyScroll: () => void;
11
+ }
12
+ export default class UserGuideFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<UserGuideAdapter<P, S>, P, S> {
13
+ constructor(adapter: UserGuideAdapter<P, S>);
14
+ init(): void;
15
+ destroy(): void;
16
+ _notifyChange(current: number): void;
17
+ getIsControlledComponent(): boolean;
18
+ beforeShow(): void;
19
+ afterHide(): void;
20
+ getFinalPaading(): number;
21
+ handlePrev: () => void;
22
+ handleNext: () => void;
23
+ handleSkip: () => void;
24
+ }
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _foundation = _interopRequireDefault(require("../base/foundation"));
8
+ var _constants = require("./constants");
9
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
+ class UserGuideFoundation extends _foundation.default {
11
+ constructor(adapter) {
12
+ super(Object.assign({}, adapter));
13
+ this.handlePrev = () => {
14
+ const {
15
+ current
16
+ } = this.getStates();
17
+ const newCurrent = current - 1;
18
+ if (!this.getIsControlledComponent()) {
19
+ this._adapter.setCurrent(newCurrent);
20
+ }
21
+ this._notifyChange(newCurrent);
22
+ this._adapter.notifyPrev(newCurrent);
23
+ };
24
+ this.handleNext = () => {
25
+ const {
26
+ steps
27
+ } = this.getProps();
28
+ const {
29
+ current
30
+ } = this.getStates();
31
+ const isLastStep = current === steps.length - 1;
32
+ const newCurrent = isLastStep ? current : current + 1;
33
+ if (isLastStep) {
34
+ this._adapter.notifyFinish();
35
+ } else {
36
+ this._notifyChange(newCurrent);
37
+ this._adapter.notifyNext(newCurrent);
38
+ if (!this.getIsControlledComponent()) {
39
+ this._adapter.setCurrent(newCurrent);
40
+ }
41
+ }
42
+ };
43
+ this.handleSkip = () => {
44
+ this._adapter.notifySkip();
45
+ };
46
+ }
47
+ init() {}
48
+ destroy() {
49
+ this._adapter.enabledBodyScroll();
50
+ }
51
+ _notifyChange(current) {
52
+ const {
53
+ current: stateCurrent
54
+ } = this.getStates();
55
+ if (stateCurrent !== current) {
56
+ this._adapter.notifyChange(current);
57
+ }
58
+ }
59
+ getIsControlledComponent() {
60
+ return this._isInProps('current');
61
+ }
62
+ beforeShow() {
63
+ this._adapter.disabledBodyScroll();
64
+ }
65
+ afterHide() {
66
+ this._adapter.enabledBodyScroll();
67
+ }
68
+ getFinalPaading() {
69
+ var _a;
70
+ const {
71
+ spotlightPadding,
72
+ steps
73
+ } = this.getProps();
74
+ const {
75
+ current
76
+ } = this.getStates();
77
+ const stepPadding = (_a = steps[current]) === null || _a === void 0 ? void 0 : _a.spotlightPadding;
78
+ const padding = typeof stepPadding === 'number' ? stepPadding : typeof spotlightPadding === 'number' ? spotlightPadding : _constants.numbers.DEFAULT_SPOTLIGHT_PADDING;
79
+ return padding;
80
+ }
81
+ }
82
+ exports.default = UserGuideFoundation;
@@ -0,0 +1,109 @@
1
+ /* shadow */
2
+ /* sizing */
3
+ /* spacing */
4
+ .semi-userGuide-spotlight {
5
+ position: fixed;
6
+ top: 0;
7
+ left: 0;
8
+ width: 100vw;
9
+ height: 100vh;
10
+ pointer-events: none;
11
+ }
12
+ .semi-userGuide-spotlight-rect {
13
+ transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
14
+ }
15
+ .semi-userGuide-popover {
16
+ max-width: fit-content;
17
+ width: 400px;
18
+ }
19
+ .semi-userGuide-popup-content {
20
+ color: var(--semi-color-text-0);
21
+ }
22
+ .semi-userGuide-popup-content-primary {
23
+ color: var(--semi-color-tertiary-light-default);
24
+ }
25
+ .semi-userGuide-popup-content-cover img {
26
+ display: block;
27
+ height: 200px;
28
+ width: 100%;
29
+ border-radius: var(--semi-border-radius-medium) var(--semi-border-radius-medium) 0 0;
30
+ }
31
+ .semi-userGuide-popup-content-body {
32
+ padding: 24px;
33
+ }
34
+ .semi-userGuide-popup-content-title {
35
+ font-size: 18px;
36
+ font-weight: 600;
37
+ line-height: 24px;
38
+ margin-bottom: 8px;
39
+ }
40
+ .semi-userGuide-popup-content-description {
41
+ font-size: 14px;
42
+ line-height: 20px;
43
+ margin-bottom: 48px;
44
+ }
45
+ .semi-userGuide-popup-content-footer {
46
+ display: flex;
47
+ justify-content: space-between;
48
+ align-items: center;
49
+ }
50
+ .semi-userGuide-popup-content-buttons {
51
+ display: flex;
52
+ gap: 12px;
53
+ margin-left: 120px;
54
+ }
55
+ .semi-userGuide-popup-content-indicator {
56
+ font-size: 14px;
57
+ line-height: 20px;
58
+ }
59
+ .semi-userGuide-modal .semi-modal-small {
60
+ width: fit-content;
61
+ }
62
+ .semi-userGuide-modal .semi-modal-content {
63
+ padding: 0;
64
+ width: 600px;
65
+ max-width: fit-content;
66
+ }
67
+ .semi-userGuide-modal-cover {
68
+ height: 300px;
69
+ }
70
+ .semi-userGuide-modal-indicator {
71
+ height: 30px;
72
+ display: flex;
73
+ justify-content: center;
74
+ align-items: center;
75
+ column-gap: 8px;
76
+ }
77
+ .semi-userGuide-modal-indicator-item {
78
+ width: 6px;
79
+ height: 6px;
80
+ border-radius: var(--semi-border-radius-large);
81
+ background-color: var(--semi-color-primary-light-active);
82
+ }
83
+ .semi-userGuide-modal-indicator-item-active {
84
+ background: var(--semi-color-primary);
85
+ }
86
+ .semi-userGuide-modal-body {
87
+ display: flex;
88
+ justify-content: center;
89
+ align-items: center;
90
+ flex-direction: column;
91
+ padding: 24px 48px;
92
+ }
93
+ .semi-userGuide-modal-body-title {
94
+ font-size: 18px;
95
+ font-weight: 600;
96
+ line-height: 24px;
97
+ margin-bottom: 8px;
98
+ }
99
+ .semi-userGuide-modal-body-description {
100
+ font-size: 14px;
101
+ line-height: 20px;
102
+ }
103
+ .semi-userGuide-modal-footer {
104
+ display: flex;
105
+ justify-content: center;
106
+ align-items: center;
107
+ padding: 24px;
108
+ column-gap: 12px;
109
+ }
@@ -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
+
@@ -19,6 +19,7 @@ export interface InputNumberAdapter extends DefaultAdapter {
19
19
  fixCaret: (start: number, end: number) => void;
20
20
  setClickUpOrDown: (clicked: boolean) => void;
21
21
  updateStates: (states: BaseInputNumberState, callback?: () => void) => void;
22
+ getInputCharacter: (index: number) => string;
22
23
  }
23
24
  export interface BaseInputNumberState {
24
25
  value?: number | string;
@@ -31,14 +32,19 @@ declare class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
31
32
  _interval: any;
32
33
  _timerHasRegistered: boolean;
33
34
  _timer: any;
35
+ _decimalPointSymbol: string;
36
+ _currencySymbol: string;
34
37
  init(): void;
35
38
  destroy(): void;
36
39
  isControlled(): boolean;
40
+ _isCurrency(): boolean;
41
+ _getFinalCurrency(): any;
37
42
  _doInput(v?: string, event?: any, updateCb?: any): void;
38
43
  _registerInterval(cb?: (...args: any) => void): void;
39
44
  _unregisterInterval(): void;
40
45
  _registerTimer(cb: (...args: any[]) => void): void;
41
46
  _unregisterTimer(): void;
47
+ _setCurrencySymbol(): void;
42
48
  handleInputFocus(e: any): void;
43
49
  /**
44
50
  * Input box content update processing
@@ -73,19 +79,21 @@ declare class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
73
79
  */
74
80
  _getPrecLen(num: string | number): number;
75
81
  _adjustPrec(num: string | number): string;
82
+ formatCurrency(value: number | string): string;
76
83
  /**
77
84
  * format number to string
78
85
  * @param {string|number} value
79
86
  * @param {boolean} needAdjustPrec
80
87
  * @returns {string}
81
88
  */
82
- doFormat(value?: string | number, needAdjustPrec?: boolean): string;
89
+ doFormat(value?: string | number, needAdjustPrec?: boolean, needAdjustCurrency?: boolean): string;
83
90
  /**
84
91
  *
85
92
  * @param {number} current
86
93
  * @returns {number}
87
94
  */
88
95
  fetchMinOrMax(current: number): any;
96
+ parseInternationalCurrency(currencyString: string): number;
89
97
  /**
90
98
  * parse to number
91
99
  * @param {string|number} value
@@ -116,5 +124,11 @@ declare class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
116
124
  notifyChange(value: string, e: any): void;
117
125
  notifyNumberChange(value: number, e: any): void;
118
126
  updateStates(states: BaseInputNumberState, callback?: () => void): void;
127
+ /**
128
+ * Get currency by locale code
129
+ * @param {string} localeCode
130
+ * @returns {string}
131
+ */
132
+ getCurrencyByLocaleCode(): string;
119
133
  }
120
134
  export default InputNumberFoundation;