@douyinfe/semi-foundation 2.29.0 → 2.30.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/anchor/constants.js +1 -1
- package/lib/cjs/anchor/foundation.js +3 -3
- package/lib/cjs/autoComplete/constants.js +3 -3
- package/lib/cjs/avatar/constants.js +1 -1
- package/lib/cjs/backtop/constants.js +1 -1
- package/lib/cjs/badge/constants.js +1 -1
- package/lib/cjs/banner/constants.js +1 -1
- package/lib/cjs/breadcrumb/constants.js +1 -1
- package/lib/cjs/button/constants.js +1 -1
- package/lib/cjs/calendar/constants.js +1 -1
- package/lib/cjs/card/constants.js +1 -1
- package/lib/cjs/carousel/constants.js +9 -9
- package/lib/cjs/cascader/constants.js +2 -2
- package/lib/cjs/cascader/foundation.js +1 -1
- package/lib/cjs/cascader/util.js +2 -2
- package/lib/cjs/checkbox/constants.js +13 -13
- package/lib/cjs/collapse/constants.js +1 -1
- package/lib/cjs/collapsible/constants.js +1 -1
- package/lib/cjs/datePicker/_utils/getInsetInputFormatToken.js +1 -1
- package/lib/cjs/datePicker/_utils/getMonthTable.js +4 -4
- package/lib/cjs/datePicker/_utils/getMonthsInYear.js +1 -1
- package/lib/cjs/datePicker/constants.js +27 -27
- package/lib/cjs/datePicker/foundation.js +3 -3
- package/lib/cjs/datePicker/inputFoundation.js +2 -2
- package/lib/cjs/datePicker/monthsGridFoundation.js +1 -1
- package/lib/cjs/descriptions/constants.js +1 -1
- package/lib/cjs/divider/constants.js +1 -1
- package/lib/cjs/dropdown/constants.js +3 -3
- package/lib/cjs/dropdown/menuFoundation.js +1 -1
- package/lib/cjs/empty/constants.js +1 -1
- package/lib/cjs/form/constants.js +1 -1
- package/lib/cjs/form/foundation.js +1 -1
- package/lib/cjs/form/utils.js +1 -1
- package/lib/cjs/grid/constants.js +1 -1
- package/lib/cjs/highlight/constants.js +1 -1
- package/lib/cjs/icons/constants.js +1 -1
- package/lib/cjs/image/constants.js +1 -1
- package/lib/cjs/input/constants.js +1 -1
- package/lib/cjs/input/textareaFoundation.js +1 -1
- package/lib/cjs/layout/constants.js +1 -1
- package/lib/cjs/list/constants.js +1 -1
- package/lib/cjs/modal/constants.js +1 -1
- package/lib/cjs/navigation/constants.js +1 -1
- package/lib/cjs/notification/constants.js +3 -3
- package/lib/cjs/pagination/constants.js +1 -1
- package/lib/cjs/popconfirm/constants.js +2 -2
- package/lib/cjs/popover/constants.js +2 -2
- package/lib/cjs/progress/constants.js +1 -1
- package/lib/cjs/progress/generates.js +14 -14
- package/lib/cjs/radio/constants.js +13 -13
- package/lib/cjs/rating/constants.js +1 -1
- package/lib/cjs/scrollList/constants.js +2 -2
- package/lib/cjs/select/constants.js +3 -3
- package/lib/cjs/select/foundation.js +1 -2
- package/lib/cjs/sideSheet/constants.js +2 -2
- package/lib/cjs/skeleton/constants.js +1 -1
- package/lib/cjs/slider/constants.js +7 -7
- package/lib/cjs/space/constants.js +1 -1
- package/lib/cjs/spin/constants.js +1 -1
- package/lib/cjs/steps/bacisSteps.scss +286 -238
- package/lib/cjs/steps/constants.js +2 -2
- package/lib/cjs/steps/fillSteps.scss +148 -142
- package/lib/cjs/steps/navSteps.scss +60 -40
- package/lib/cjs/steps/steps.css +377 -14
- package/lib/cjs/switch/constants.js +13 -13
- package/lib/cjs/table/constants.js +7 -7
- package/lib/cjs/table/utils.js +2 -2
- package/lib/cjs/tabs/constants.js +21 -21
- package/lib/cjs/tag/constants.js +1 -1
- package/lib/cjs/tagInput/constants.js +1 -1
- package/lib/cjs/timePicker/ComboxFoundation.js +2 -2
- package/lib/cjs/timePicker/constants.js +3 -3
- package/lib/cjs/timePicker/utils/index.js +3 -3
- package/lib/cjs/timeline/constants.js +2 -2
- package/lib/cjs/toast/constants.js +3 -3
- package/lib/cjs/tooltip/constants.js +1 -1
- package/lib/cjs/tooltip/foundation.js +7 -7
- package/lib/cjs/transfer/constants.js +1 -1
- package/lib/cjs/tree/constants.js +2 -2
- package/lib/cjs/tree/treeUtil.d.ts +1 -1
- package/lib/cjs/tree/treeUtil.js +1 -1
- package/lib/cjs/treeSelect/constants.js +3 -3
- package/lib/cjs/typography/constants.js +1 -1
- package/lib/cjs/typography/formatNumeral.js +6 -6
- package/lib/cjs/upload/constants.d.ts +1 -1
- package/lib/cjs/upload/constants.js +2 -2
- package/lib/cjs/upload/foundation.js +1 -1
- package/lib/cjs/upload/utils.js +4 -4
- package/lib/cjs/utils/getMotionObjFromProps.js +2 -2
- package/lib/cjs/utils/touchPolyfill.js +1 -1
- package/lib/cjs/utils/uuid.js +2 -2
- package/lib/cjs/utils/warning.js +1 -1
- package/lib/es/anchor/constants.js +1 -1
- package/lib/es/anchor/foundation.js +3 -3
- package/lib/es/autoComplete/constants.js +3 -3
- package/lib/es/avatar/constants.js +1 -1
- package/lib/es/backtop/constants.js +1 -1
- package/lib/es/badge/constants.js +1 -1
- package/lib/es/banner/constants.js +1 -1
- package/lib/es/breadcrumb/constants.js +1 -1
- package/lib/es/button/constants.js +1 -1
- package/lib/es/calendar/constants.js +1 -1
- package/lib/es/card/constants.js +1 -1
- package/lib/es/carousel/constants.js +9 -9
- package/lib/es/cascader/constants.js +2 -2
- package/lib/es/cascader/foundation.js +1 -1
- package/lib/es/cascader/util.js +2 -2
- package/lib/es/checkbox/constants.js +13 -13
- package/lib/es/collapse/constants.js +1 -1
- package/lib/es/collapsible/constants.js +1 -1
- package/lib/es/datePicker/_utils/getInsetInputFormatToken.js +1 -1
- package/lib/es/datePicker/_utils/getMonthTable.js +4 -4
- package/lib/es/datePicker/_utils/getMonthsInYear.js +1 -1
- package/lib/es/datePicker/constants.js +27 -27
- package/lib/es/datePicker/foundation.js +3 -3
- package/lib/es/datePicker/inputFoundation.js +2 -2
- package/lib/es/datePicker/monthsGridFoundation.js +1 -1
- package/lib/es/descriptions/constants.js +1 -1
- package/lib/es/divider/constants.js +1 -1
- package/lib/es/dropdown/constants.js +3 -3
- package/lib/es/dropdown/menuFoundation.js +1 -1
- package/lib/es/empty/constants.js +1 -1
- package/lib/es/form/constants.js +1 -1
- package/lib/es/form/foundation.js +1 -1
- package/lib/es/form/utils.js +1 -1
- package/lib/es/grid/constants.js +1 -1
- package/lib/es/highlight/constants.js +1 -1
- package/lib/es/icons/constants.js +1 -1
- package/lib/es/image/constants.js +1 -1
- package/lib/es/input/constants.js +1 -1
- package/lib/es/input/textareaFoundation.js +1 -1
- package/lib/es/layout/constants.js +1 -1
- package/lib/es/list/constants.js +1 -1
- package/lib/es/modal/constants.js +1 -1
- package/lib/es/navigation/constants.js +1 -1
- package/lib/es/notification/constants.js +3 -3
- package/lib/es/pagination/constants.js +1 -1
- package/lib/es/popconfirm/constants.js +2 -2
- package/lib/es/popover/constants.js +2 -2
- package/lib/es/progress/constants.js +1 -1
- package/lib/es/progress/generates.js +14 -14
- package/lib/es/radio/constants.js +13 -13
- package/lib/es/rating/constants.js +1 -1
- package/lib/es/scrollList/constants.js +2 -2
- package/lib/es/select/constants.js +3 -3
- package/lib/es/select/foundation.js +1 -2
- package/lib/es/sideSheet/constants.js +2 -2
- package/lib/es/skeleton/constants.js +1 -1
- package/lib/es/slider/constants.js +7 -7
- package/lib/es/space/constants.js +1 -1
- package/lib/es/spin/constants.js +1 -1
- package/lib/es/steps/bacisSteps.scss +286 -238
- package/lib/es/steps/constants.js +2 -2
- package/lib/es/steps/fillSteps.scss +148 -142
- package/lib/es/steps/navSteps.scss +60 -40
- package/lib/es/steps/steps.css +377 -14
- package/lib/es/switch/constants.js +13 -13
- package/lib/es/table/constants.js +7 -7
- package/lib/es/table/utils.js +2 -2
- package/lib/es/tabs/constants.js +21 -21
- package/lib/es/tag/constants.js +1 -1
- package/lib/es/tagInput/constants.js +1 -1
- package/lib/es/timePicker/ComboxFoundation.js +2 -2
- package/lib/es/timePicker/constants.js +3 -3
- package/lib/es/timePicker/utils/index.js +3 -3
- package/lib/es/timeline/constants.js +2 -2
- package/lib/es/toast/constants.js +3 -3
- package/lib/es/tooltip/constants.js +1 -1
- package/lib/es/tooltip/foundation.js +7 -7
- package/lib/es/transfer/constants.js +1 -1
- package/lib/es/tree/constants.js +2 -2
- package/lib/es/tree/treeUtil.d.ts +1 -1
- package/lib/es/tree/treeUtil.js +1 -1
- package/lib/es/treeSelect/constants.js +3 -3
- package/lib/es/typography/constants.js +1 -1
- package/lib/es/typography/formatNumeral.js +6 -6
- package/lib/es/upload/constants.d.ts +1 -1
- package/lib/es/upload/constants.js +2 -2
- package/lib/es/upload/foundation.js +1 -1
- package/lib/es/upload/utils.js +4 -4
- package/lib/es/utils/getMotionObjFromProps.js +2 -2
- package/lib/es/utils/touchPolyfill.js +1 -1
- package/lib/es/utils/uuid.js +2 -2
- package/lib/es/utils/warning.js +1 -1
- package/package.json +2 -2
- package/steps/bacisSteps.scss +286 -238
- package/steps/fillSteps.scss +148 -142
- package/steps/navSteps.scss +60 -40
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
import { VALIDATE_STATUS, BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
import { numbers as popoverNumber, strings as POPOVER_STRINGS } from '../popover/constants';
|
|
3
3
|
const dayItemClasses = {
|
|
4
|
-
DAY_TODAY:
|
|
5
|
-
DAY_IN_RANGE:
|
|
6
|
-
DAY_HOVER:
|
|
7
|
-
DAY_SELECTED:
|
|
8
|
-
DAY_SELECTED_START:
|
|
9
|
-
DAY_SELECTED_END:
|
|
10
|
-
DAY_DISABLED:
|
|
11
|
-
DAY_HOVER_DAY:
|
|
12
|
-
DAY_HOVER_DAY_OFFSET:
|
|
13
|
-
DAY_IN_OFFSET_RANGE:
|
|
14
|
-
DAY_SELECTED_RANGE_HOVER:
|
|
15
|
-
DAY_OFFSET_RANGE_START:
|
|
16
|
-
DAY_OFFSET_RANGE_END:
|
|
17
|
-
DAY_SELECTED_START_AFTER_HOVER:
|
|
18
|
-
DAY_SELECTED_END_BEFORE_HOVER:
|
|
19
|
-
DAY_HOVER_DAY_BEFORE_RANGE:
|
|
20
|
-
DAY_HOVER_DAY_AFTER_RANGE:
|
|
21
|
-
DAY_HOVER_DAY_IN_RANGE:
|
|
22
|
-
DAY_HOVER_DAY_AROUND_SINGLE_SELECTED:
|
|
4
|
+
DAY_TODAY: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-today"),
|
|
5
|
+
DAY_IN_RANGE: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-inrange"),
|
|
6
|
+
DAY_HOVER: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-inhover"),
|
|
7
|
+
DAY_SELECTED: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-selected"),
|
|
8
|
+
DAY_SELECTED_START: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-selected-start"),
|
|
9
|
+
DAY_SELECTED_END: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-selected-end"),
|
|
10
|
+
DAY_DISABLED: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-disabled"),
|
|
11
|
+
DAY_HOVER_DAY: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-hoverday"),
|
|
12
|
+
DAY_HOVER_DAY_OFFSET: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-hoverday-offset"),
|
|
13
|
+
DAY_IN_OFFSET_RANGE: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-inoffsetrange"),
|
|
14
|
+
DAY_SELECTED_RANGE_HOVER: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-selectedrange-hover"),
|
|
15
|
+
DAY_OFFSET_RANGE_START: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-offsetrange-start"),
|
|
16
|
+
DAY_OFFSET_RANGE_END: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-offsetrange-end"),
|
|
17
|
+
DAY_SELECTED_START_AFTER_HOVER: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-selected-start-afterhover"),
|
|
18
|
+
DAY_SELECTED_END_BEFORE_HOVER: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-selected-end-beforehover"),
|
|
19
|
+
DAY_HOVER_DAY_BEFORE_RANGE: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-hoverday-beforerange"),
|
|
20
|
+
DAY_HOVER_DAY_AFTER_RANGE: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-hoverday-afterrange"),
|
|
21
|
+
DAY_HOVER_DAY_IN_RANGE: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-hoverday-inrange"),
|
|
22
|
+
DAY_HOVER_DAY_AROUND_SINGLE_SELECTED: "".concat(BASE_CLASS_PREFIX, "-datepicker-day-hoverday-around-singleselected")
|
|
23
23
|
};
|
|
24
24
|
const cssClasses = Object.assign({
|
|
25
|
-
PREFIX:
|
|
26
|
-
NAVIGATION:
|
|
27
|
-
PANEL_YAM:
|
|
28
|
-
MONTH:
|
|
29
|
-
WEEKDAY:
|
|
30
|
-
WEEKS:
|
|
31
|
-
WEEK:
|
|
32
|
-
DAY:
|
|
25
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-datepicker"),
|
|
26
|
+
NAVIGATION: "".concat(BASE_CLASS_PREFIX, "-datepicker-navigation"),
|
|
27
|
+
PANEL_YAM: "".concat(BASE_CLASS_PREFIX, "-datepicker-panel-yam"),
|
|
28
|
+
MONTH: "".concat(BASE_CLASS_PREFIX, "-datepicker-month"),
|
|
29
|
+
WEEKDAY: "".concat(BASE_CLASS_PREFIX, "-datepicker-weekday"),
|
|
30
|
+
WEEKS: "".concat(BASE_CLASS_PREFIX, "-datepicker-weeks"),
|
|
31
|
+
WEEK: "".concat(BASE_CLASS_PREFIX, "-datepicker-week"),
|
|
32
|
+
DAY: "".concat(BASE_CLASS_PREFIX, "-datepicker-day")
|
|
33
33
|
}, dayItemClasses);
|
|
34
34
|
const formatToken = {
|
|
35
35
|
FORMAT_FULL_DATE: 'yyyy-MM-dd',
|
|
@@ -820,12 +820,12 @@ export default class DatePickerFoundation extends BaseFoundation {
|
|
|
820
820
|
const endIsTruthy = !isNullOrUndefined(dates[1]);
|
|
821
821
|
|
|
822
822
|
if (startIsTruthy && endIsTruthy) {
|
|
823
|
-
str =
|
|
823
|
+
str = "".concat(this.localeFormat(dates[0], formatToken)).concat(rangeSeparator).concat(this.localeFormat(dates[1], formatToken));
|
|
824
824
|
} else {
|
|
825
825
|
if (startIsTruthy) {
|
|
826
|
-
str =
|
|
826
|
+
str = "".concat(this.localeFormat(dates[0], formatToken)).concat(rangeSeparator);
|
|
827
827
|
} else if (endIsTruthy) {
|
|
828
|
-
str =
|
|
828
|
+
str = "".concat(rangeSeparator).concat(this.localeFormat(dates[1], formatToken));
|
|
829
829
|
}
|
|
830
830
|
}
|
|
831
831
|
|
|
@@ -302,7 +302,7 @@ export default class InputFoundation extends BaseFoundation {
|
|
|
302
302
|
date,
|
|
303
303
|
time
|
|
304
304
|
} = _ref2;
|
|
305
|
-
return
|
|
305
|
+
return "".concat(date, " ").concat(time);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
concatInsetDateRange(_ref3) {
|
|
@@ -315,7 +315,7 @@ export default class InputFoundation extends BaseFoundation {
|
|
|
315
315
|
rangeSeparator
|
|
316
316
|
} = this._adapter.getProps();
|
|
317
317
|
|
|
318
|
-
return
|
|
318
|
+
return "".concat(rangeStart).concat(rangeSeparator).concat(rangeEnd);
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
concatInsetInputValue(_ref4) {
|
|
@@ -700,7 +700,7 @@ export default class MonthsGridFoundation extends BaseFoundation {
|
|
|
700
700
|
const dateStr = format(isValidDate(date) ? date : compatibleParse(date, strings.FORMAT_FULL_DATE, undefined, dateFnsLocale), strings.FORMAT_FULL_DATE);
|
|
701
701
|
const timeStr = format(isValidDate(time) ? time : compatibleParse(time, strings.FORMAT_TIME_PICKER, undefined, dateFnsLocale), strings.FORMAT_TIME_PICKER);
|
|
702
702
|
const timeFormat = this.getValidTimeFormat();
|
|
703
|
-
return compatibleParse(
|
|
703
|
+
return compatibleParse("".concat(dateStr, " ").concat(timeStr), timeFormat, undefined, dateFnsLocale);
|
|
704
704
|
}
|
|
705
705
|
|
|
706
706
|
handleRangeSelected(day) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { strings as tooltipStrings } from '../tooltip/constants';
|
|
2
2
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
3
3
|
const cssClasses = {
|
|
4
|
-
PREFIX:
|
|
5
|
-
SELECTED:
|
|
6
|
-
DISABLED:
|
|
4
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-dropdown"),
|
|
5
|
+
SELECTED: "".concat(BASE_CLASS_PREFIX, "-dropdown-item-selected"),
|
|
6
|
+
DISABLED: "".concat(BASE_CLASS_PREFIX, "-dropdown-item-disabled")
|
|
7
7
|
};
|
|
8
8
|
const strings = {
|
|
9
9
|
POSITION_SET: tooltipStrings.POSITION_SET,
|
|
@@ -11,7 +11,7 @@ export default class DropdownMenuFoundation extends BaseFoundation {
|
|
|
11
11
|
const trigger = this._adapter.getContext('trigger');
|
|
12
12
|
|
|
13
13
|
if (trigger === 'custom') {
|
|
14
|
-
const menuButton = menu && getMenuButton(document.querySelectorAll(
|
|
14
|
+
const menuButton = menu && getMenuButton(document.querySelectorAll("[data-popupid]"), menu.id);
|
|
15
15
|
menuButton.focus();
|
|
16
16
|
}
|
|
17
17
|
}
|
package/lib/es/form/constants.js
CHANGED
|
@@ -110,7 +110,7 @@ export default class FormFoundation extends BaseFoundation {
|
|
|
110
110
|
ObjectUtil.remove(this.data.touched, field);
|
|
111
111
|
}
|
|
112
112
|
} catch (error) {
|
|
113
|
-
console.error(
|
|
113
|
+
console.error("some thing wrong when unregister field:".concat(field));
|
|
114
114
|
} // delete field
|
|
115
115
|
|
|
116
116
|
|
package/lib/es/form/utils.js
CHANGED
|
@@ -25,7 +25,7 @@ import AsyncValidator from 'async-validator';
|
|
|
25
25
|
*/
|
|
26
26
|
export function getDisplayName(WrappedComponent) {
|
|
27
27
|
const originName = WrappedComponent.displayName || WrappedComponent.name;
|
|
28
|
-
return originName ?
|
|
28
|
+
return originName ? "SemiField".concat(originName) : 'SemiField';
|
|
29
29
|
}
|
|
30
30
|
export function generateValidatesFromRules(field) {
|
|
31
31
|
let rules = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
package/lib/es/grid/constants.js
CHANGED
package/lib/es/list/constants.js
CHANGED
|
@@ -2,7 +2,7 @@ import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
|
2
2
|
const MODE_HORIZONTAL = 'horizontal';
|
|
3
3
|
const MODE_VERTICAL = 'vertical';
|
|
4
4
|
const cssClasses = {
|
|
5
|
-
PREFIX:
|
|
5
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-navigation")
|
|
6
6
|
};
|
|
7
7
|
const strings = {
|
|
8
8
|
MODE: [MODE_VERTICAL, MODE_HORIZONTAL],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
const cssClasses = {
|
|
3
|
-
WRAPPER:
|
|
4
|
-
LIST:
|
|
5
|
-
NOTICE:
|
|
3
|
+
WRAPPER: "".concat(BASE_CLASS_PREFIX, "-notification-wrapper"),
|
|
4
|
+
LIST: "".concat(BASE_CLASS_PREFIX, "-notification-list"),
|
|
5
|
+
NOTICE: "".concat(BASE_CLASS_PREFIX, "-notification-notice")
|
|
6
6
|
};
|
|
7
7
|
const strings = {
|
|
8
8
|
types: ['warning', 'success', 'info', 'error', 'default'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
const cssClasses = {
|
|
3
|
-
PREFIX:
|
|
4
|
-
POPOVER:
|
|
3
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-popconfirm"),
|
|
4
|
+
POPOVER: "".concat(BASE_CLASS_PREFIX, "-popconfirm-popover")
|
|
5
5
|
};
|
|
6
6
|
const strings = {
|
|
7
7
|
POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { numbers as tooltipNumbers } from '../tooltip/constants';
|
|
2
2
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
3
3
|
const cssClasses = {
|
|
4
|
-
PREFIX:
|
|
5
|
-
ARROW:
|
|
4
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-popover"),
|
|
5
|
+
ARROW: "".concat(BASE_CLASS_PREFIX, "-popover-icon-arrow")
|
|
6
6
|
};
|
|
7
7
|
const strings = {
|
|
8
8
|
POSITION_SET: ['top', 'topLeft', 'topRight', 'left', 'leftTop', 'leftBottom', 'right', 'rightTop', 'rightBottom', 'bottom', 'bottomLeft', 'bottomRight', 'leftTopOver', 'rightTopOver'],
|
|
@@ -54,10 +54,10 @@ function generateGradients(g, index) {
|
|
|
54
54
|
} = g;
|
|
55
55
|
const sA = startColor.split('');
|
|
56
56
|
const eA = endColor.split('');
|
|
57
|
-
const rC = [parseInt(
|
|
58
|
-
const gC = [parseInt(
|
|
59
|
-
const bC = [parseInt(
|
|
60
|
-
const aC = [parseInt(
|
|
57
|
+
const rC = [parseInt("".concat(sA[1]).concat(sA[2]), 16), parseInt("".concat(eA[1]).concat(eA[2]), 16)];
|
|
58
|
+
const gC = [parseInt("".concat(sA[3]).concat(sA[4]), 16), parseInt("".concat(eA[3]).concat(eA[4]), 16)];
|
|
59
|
+
const bC = [parseInt("".concat(sA[5]).concat(sA[6]), 16), parseInt("".concat(eA[5]).concat(eA[6]), 16)];
|
|
60
|
+
const aC = [parseInt("".concat(sA[7]).concat(sA[8]), 16), parseInt("".concat(eA[7]).concat(eA[8]), 16)];
|
|
61
61
|
const rStep = (rC[0] - rC[1]) / (size + 1);
|
|
62
62
|
const gStep = (gC[0] - gC[1]) / (size + 1);
|
|
63
63
|
const bStep = (bC[0] - bC[1]) / (size + 1);
|
|
@@ -67,14 +67,14 @@ function generateGradients(g, index) {
|
|
|
67
67
|
const rS = Math.round(rC[0] - rStep * (i + 1)).toString(16);
|
|
68
68
|
const gS = Math.round(gC[0] - gStep * (i + 1)).toString(16);
|
|
69
69
|
const bS = Math.round(bC[0] - bStep * (i + 1)).toString(16);
|
|
70
|
-
const h =
|
|
70
|
+
const h = "".concat(padTwo(rS)).concat(padTwo(gS)).concat(padTwo(bS));
|
|
71
71
|
const t = Math.floor(aStep * (i + 1) + aC[1]).toString(16);
|
|
72
|
-
return toHex.Hex(
|
|
72
|
+
return toHex.Hex("#".concat(h), t);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function padTwo(s) {
|
|
76
76
|
if (s.length === 1) {
|
|
77
|
-
return
|
|
77
|
+
return "0".concat(s);
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
if (s.length === 0) {
|
|
@@ -122,10 +122,10 @@ function formatToHex(color) {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
if (SEMI_DESIGN_TOKENS.SEQUENCE.indexOf(color) !== -1) {
|
|
125
|
-
return toHex.SemiDesignToken(
|
|
125
|
+
return toHex.SemiDesignToken("".concat(color, "-5"));
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
return toHex.SemiDesignToken(
|
|
128
|
+
return toHex.SemiDesignToken("".concat(color));
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
return undefined;
|
|
@@ -134,14 +134,14 @@ function formatToHex(color) {
|
|
|
134
134
|
const toHex = {
|
|
135
135
|
Hex(color, transparency) {
|
|
136
136
|
color = color.replace('#', '');
|
|
137
|
-
if (color.length === 8) return
|
|
138
|
-
if (color.length === 6) return
|
|
137
|
+
if (color.length === 8) return "#".concat(color);
|
|
138
|
+
if (color.length === 6) return "#".concat(color).concat(transparency || 'ff');
|
|
139
139
|
|
|
140
140
|
if (color.length === 3) {
|
|
141
141
|
color = color.split('').map(c => c + c).join('');
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
return
|
|
144
|
+
return "#".concat(color).concat(transparency || 'ff');
|
|
145
145
|
},
|
|
146
146
|
|
|
147
147
|
SemiDesignToken(color) {
|
|
@@ -150,9 +150,9 @@ const toHex = {
|
|
|
150
150
|
return undefined;
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
const variable = getComputedStyle(document.body).getPropertyValue(
|
|
153
|
+
const variable = getComputedStyle(document.body).getPropertyValue("--semi-".concat(color));
|
|
154
154
|
if (variable === '') return undefined;
|
|
155
|
-
const rgba =
|
|
155
|
+
const rgba = "rgba(".concat(variable, ", 1)");
|
|
156
156
|
return toHex.RgbA(rgba);
|
|
157
157
|
},
|
|
158
158
|
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
const radioClasses = {
|
|
3
|
-
PREFIX:
|
|
4
|
-
INNER:
|
|
5
|
-
TEXT:
|
|
6
|
-
INPUT:
|
|
7
|
-
CHECKED:
|
|
8
|
-
DISABLED:
|
|
9
|
-
BUTTON:
|
|
3
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-radio"),
|
|
4
|
+
INNER: "".concat(BASE_CLASS_PREFIX, "-radio-inner"),
|
|
5
|
+
TEXT: "".concat(BASE_CLASS_PREFIX, "-radio-text"),
|
|
6
|
+
INPUT: "".concat(BASE_CLASS_PREFIX, "-radio-input"),
|
|
7
|
+
CHECKED: "".concat(BASE_CLASS_PREFIX, "-radio-checked"),
|
|
8
|
+
DISABLED: "".concat(BASE_CLASS_PREFIX, "-radio-disabled"),
|
|
9
|
+
BUTTON: "".concat(BASE_CLASS_PREFIX, "-radio-button")
|
|
10
10
|
};
|
|
11
11
|
const radioGroupClasses = {
|
|
12
|
-
PREFIX:
|
|
13
|
-
INNER:
|
|
14
|
-
TEXT:
|
|
15
|
-
INPUT:
|
|
16
|
-
CHECKED:
|
|
17
|
-
DISABLED:
|
|
12
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-radioGroup"),
|
|
13
|
+
INNER: "".concat(BASE_CLASS_PREFIX, "-radioGroup-inner"),
|
|
14
|
+
TEXT: "".concat(BASE_CLASS_PREFIX, "-radioGroup-text"),
|
|
15
|
+
INPUT: "".concat(BASE_CLASS_PREFIX, "-radioGroup-input"),
|
|
16
|
+
CHECKED: "".concat(BASE_CLASS_PREFIX, "-radioGroup-checked"),
|
|
17
|
+
DISABLED: "".concat(BASE_CLASS_PREFIX, "-radioGroup-disabled")
|
|
18
18
|
};
|
|
19
19
|
const strings = {
|
|
20
20
|
DIRECTION_SET: ['horizontal', 'vertical'],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
const cssClasses = {
|
|
3
|
-
PREFIX:
|
|
4
|
-
SELECTED:
|
|
3
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-scrolllist"),
|
|
4
|
+
SELECTED: "".concat(BASE_CLASS_PREFIX, "-scrolllist-item-selected")
|
|
5
5
|
};
|
|
6
6
|
const strings = {
|
|
7
7
|
MODE: ['normal', 'wheel']
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { VALIDATE_STATUS, BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
import { strings as tooltipStrings } from '../tooltip/constants';
|
|
3
3
|
const cssClasses = {
|
|
4
|
-
PREFIX:
|
|
5
|
-
PREFIX_OPTION:
|
|
6
|
-
PREFIX_GROUP:
|
|
4
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-select"),
|
|
5
|
+
PREFIX_OPTION: "".concat(BASE_CLASS_PREFIX, "-select-option"),
|
|
6
|
+
PREFIX_GROUP: "".concat(BASE_CLASS_PREFIX, "-select-group")
|
|
7
7
|
};
|
|
8
8
|
const strings = {
|
|
9
9
|
SIZE_SET: ['small', 'large', 'default'],
|
|
@@ -1345,8 +1345,7 @@ export default class SelectFoundation extends BaseFoundation {
|
|
|
1345
1345
|
const isMultiple = this._isMultiple();
|
|
1346
1346
|
|
|
1347
1347
|
if (!isMultiple) {
|
|
1348
|
-
console.warn(
|
|
1349
|
-
Please note that this is not a legal way to use it`);
|
|
1348
|
+
console.warn("[Semi Select]: It seems that you have called the selectAll method in the single-selection Select.\n Please note that this is not a legal way to use it");
|
|
1350
1349
|
return;
|
|
1351
1350
|
}
|
|
1352
1351
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
const cssClasses = {
|
|
3
|
-
PREFIX:
|
|
4
|
-
DIALOG:
|
|
3
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-sidesheet"),
|
|
4
|
+
DIALOG: "".concat(BASE_CLASS_PREFIX, "-modal")
|
|
5
5
|
};
|
|
6
6
|
const strings = {
|
|
7
7
|
PLACEMENT: ['top', 'right', 'bottom', 'left'],
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BASE_CLASS_PREFIX } from '../base/constants';
|
|
2
2
|
const cssClasses = {
|
|
3
|
-
PREFIX:
|
|
4
|
-
DISABLED:
|
|
5
|
-
VERTICAL:
|
|
6
|
-
TRACK:
|
|
7
|
-
DOTS:
|
|
8
|
-
MARKS:
|
|
9
|
-
HANDLE:
|
|
3
|
+
PREFIX: "".concat(BASE_CLASS_PREFIX, "-slider"),
|
|
4
|
+
DISABLED: "".concat(BASE_CLASS_PREFIX, "-slider-disabled"),
|
|
5
|
+
VERTICAL: "".concat(BASE_CLASS_PREFIX, "-slider-vertical"),
|
|
6
|
+
TRACK: "".concat(BASE_CLASS_PREFIX, "-slider-track"),
|
|
7
|
+
DOTS: "".concat(BASE_CLASS_PREFIX, "-slider-dots"),
|
|
8
|
+
MARKS: "".concat(BASE_CLASS_PREFIX, "-slider-marks"),
|
|
9
|
+
HANDLE: "".concat(BASE_CLASS_PREFIX, "-slider-handle")
|
|
10
10
|
};
|
|
11
11
|
const strings = {
|
|
12
12
|
SIZE: ['small', 'large', 'default'],
|
package/lib/es/spin/constants.js
CHANGED