@douyinfe/semi-foundation 2.30.0-alpha.0 → 2.30.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/datePicker/monthsGridFoundation.ts +9 -3
- 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 +15 -4
- 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/popconfirm/popconfirmFoundation.d.ts +4 -0
- package/lib/cjs/popconfirm/popconfirmFoundation.js +21 -1
- 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 +2 -1
- package/lib/cjs/select/select.css +1 -0
- package/lib/cjs/select/select.scss +1 -0
- package/lib/cjs/select/variables.scss +1 -0
- 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 +238 -286
- package/lib/cjs/steps/constants.js +2 -2
- package/lib/cjs/steps/fillSteps.scss +142 -148
- package/lib/cjs/steps/navSteps.scss +40 -60
- package/lib/cjs/steps/steps.css +14 -377
- 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/tag/tag.css +9 -2
- package/lib/cjs/tag/tag.scss +13 -4
- 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.d.ts +1 -1
- package/lib/cjs/tooltip/foundation.js +15 -12
- 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/treeSelect/foundation.d.ts +5 -2
- package/lib/cjs/treeSelect/foundation.js +42 -17
- package/lib/cjs/treeSelect/treeSelect.css +5 -1
- package/lib/cjs/treeSelect/treeSelect.scss +6 -0
- package/lib/cjs/treeSelect/variables.scss +1 -1
- package/lib/cjs/typography/constants.js +1 -1
- package/lib/cjs/typography/formatNumeral.js +6 -11
- 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 +15 -4
- 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/popconfirm/popconfirmFoundation.d.ts +4 -0
- package/lib/es/popconfirm/popconfirmFoundation.js +20 -1
- 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 +2 -1
- package/lib/es/select/select.css +1 -0
- package/lib/es/select/select.scss +1 -0
- package/lib/es/select/variables.scss +1 -0
- 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 +238 -286
- package/lib/es/steps/constants.js +2 -2
- package/lib/es/steps/fillSteps.scss +142 -148
- package/lib/es/steps/navSteps.scss +40 -60
- package/lib/es/steps/steps.css +14 -377
- 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/tag/tag.css +9 -2
- package/lib/es/tag/tag.scss +13 -4
- 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.d.ts +1 -1
- package/lib/es/tooltip/foundation.js +15 -12
- 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/treeSelect/foundation.d.ts +5 -2
- package/lib/es/treeSelect/foundation.js +42 -17
- package/lib/es/treeSelect/treeSelect.css +5 -1
- package/lib/es/treeSelect/treeSelect.scss +6 -0
- package/lib/es/treeSelect/variables.scss +1 -1
- package/lib/es/typography/constants.js +1 -1
- package/lib/es/typography/formatNumeral.js +6 -11
- 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 +3 -3
- package/popconfirm/popconfirmFoundation.ts +20 -1
- package/select/select.scss +1 -0
- package/select/variables.scss +1 -0
- package/steps/bacisSteps.scss +238 -286
- package/steps/fillSteps.scss +142 -148
- package/steps/navSteps.scss +40 -60
- package/tag/tag.scss +13 -4
- package/tooltip/foundation.ts +8 -5
- package/treeSelect/foundation.ts +39 -15
- package/treeSelect/treeSelect.scss +6 -0
- package/treeSelect/variables.scss +1 -1
- package/typography/formatNumeral.ts +2 -5
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-layout`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-list`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
DIALOG:
|
|
11
|
+
DIALOG: `${_constants.BASE_CLASS_PREFIX}-modal`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
@@ -10,7 +10,7 @@ var _constants = require("../base/constants");
|
|
|
10
10
|
const MODE_HORIZONTAL = 'horizontal';
|
|
11
11
|
const MODE_VERTICAL = 'vertical';
|
|
12
12
|
const cssClasses = {
|
|
13
|
-
PREFIX:
|
|
13
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-navigation`
|
|
14
14
|
};
|
|
15
15
|
exports.cssClasses = cssClasses;
|
|
16
16
|
const strings = {
|
|
@@ -8,9 +8,9 @@ exports.strings = exports.numbers = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
WRAPPER:
|
|
12
|
-
LIST:
|
|
13
|
-
NOTICE:
|
|
11
|
+
WRAPPER: `${_constants.BASE_CLASS_PREFIX}-notification-wrapper`,
|
|
12
|
+
LIST: `${_constants.BASE_CLASS_PREFIX}-notification-list`,
|
|
13
|
+
NOTICE: `${_constants.BASE_CLASS_PREFIX}-notification-notice`
|
|
14
14
|
};
|
|
15
15
|
exports.cssClasses = cssClasses;
|
|
16
16
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.numbers = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-page`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {};
|
|
@@ -8,8 +8,8 @@ exports.strings = exports.numbers = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
12
|
-
POPOVER:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-popconfirm`,
|
|
12
|
+
POPOVER: `${_constants.BASE_CLASS_PREFIX}-popconfirm-popover`
|
|
13
13
|
};
|
|
14
14
|
exports.cssClasses = cssClasses;
|
|
15
15
|
const strings = {
|
|
@@ -7,6 +7,9 @@ export interface PopconfirmAdapter<P = Record<string, any>, S = Record<string, a
|
|
|
7
7
|
notifyCancel: (e: any) => Promise<any> | void;
|
|
8
8
|
notifyVisibleChange: (visible: boolean) => void;
|
|
9
9
|
notifyClickOutSide: (e: any) => void;
|
|
10
|
+
focusCancelButton: () => void;
|
|
11
|
+
focusOkButton: () => void;
|
|
12
|
+
focusPrevFocusElement: () => void;
|
|
10
13
|
}
|
|
11
14
|
export default class PopConfirmFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<PopconfirmAdapter<P, S>, P, S> {
|
|
12
15
|
init(): void;
|
|
@@ -15,4 +18,5 @@ export default class PopConfirmFoundation<P = Record<string, any>, S = Record<st
|
|
|
15
18
|
handleConfirm(e: any): void;
|
|
16
19
|
handleClickOutSide(e: any): void;
|
|
17
20
|
handleVisibleChange(visible: boolean): void;
|
|
21
|
+
handleFocusOperateButton(): void;
|
|
18
22
|
}
|
|
@@ -5,13 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
+
var _get2 = _interopRequireDefault(require("lodash/get"));
|
|
9
|
+
|
|
8
10
|
var _foundation = _interopRequireDefault(require("../base/foundation"));
|
|
9
11
|
|
|
10
12
|
var _isPromise = _interopRequireDefault(require("../utils/isPromise"));
|
|
11
13
|
|
|
12
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
15
|
|
|
14
|
-
/* eslint-disable @typescript-eslint/no-empty-function */
|
|
15
16
|
class PopConfirmFoundation extends _foundation.default {
|
|
16
17
|
init() {}
|
|
17
18
|
|
|
@@ -62,9 +63,28 @@ class PopConfirmFoundation extends _foundation.default {
|
|
|
62
63
|
this._adapter.setVisible(visible);
|
|
63
64
|
}
|
|
64
65
|
|
|
66
|
+
if (visible) {
|
|
67
|
+
this.handleFocusOperateButton();
|
|
68
|
+
} else {
|
|
69
|
+
this._adapter.focusPrevFocusElement();
|
|
70
|
+
}
|
|
71
|
+
|
|
65
72
|
this._adapter.notifyVisibleChange(visible);
|
|
66
73
|
}
|
|
67
74
|
|
|
75
|
+
handleFocusOperateButton() {
|
|
76
|
+
const {
|
|
77
|
+
cancelButtonProps,
|
|
78
|
+
okButtonProps
|
|
79
|
+
} = this._adapter.getProps();
|
|
80
|
+
|
|
81
|
+
if ((0, _get2.default)(cancelButtonProps, 'autoFocus') && !(0, _get2.default)(cancelButtonProps, 'disabled')) {
|
|
82
|
+
this._adapter.focusCancelButton();
|
|
83
|
+
} else if ((0, _get2.default)(okButtonProps, 'autoFocus') && !(0, _get2.default)(okButtonProps, 'disabled')) {
|
|
84
|
+
this._adapter.focusOkButton();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
68
88
|
}
|
|
69
89
|
|
|
70
90
|
exports.default = PopConfirmFoundation;
|
|
@@ -10,8 +10,8 @@ var _constants = require("../tooltip/constants");
|
|
|
10
10
|
var _constants2 = require("../base/constants");
|
|
11
11
|
|
|
12
12
|
const cssClasses = {
|
|
13
|
-
PREFIX:
|
|
14
|
-
ARROW:
|
|
13
|
+
PREFIX: `${_constants2.BASE_CLASS_PREFIX}-popover`,
|
|
14
|
+
ARROW: `${_constants2.BASE_CLASS_PREFIX}-popover-icon-arrow`
|
|
15
15
|
};
|
|
16
16
|
exports.cssClasses = cssClasses;
|
|
17
17
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-progress`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
@@ -61,10 +61,10 @@ function generateGradients(g, index) {
|
|
|
61
61
|
} = g;
|
|
62
62
|
const sA = startColor.split('');
|
|
63
63
|
const eA = endColor.split('');
|
|
64
|
-
const rC = [parseInt(
|
|
65
|
-
const gC = [parseInt(
|
|
66
|
-
const bC = [parseInt(
|
|
67
|
-
const aC = [parseInt(
|
|
64
|
+
const rC = [parseInt(`${sA[1]}${sA[2]}`, 16), parseInt(`${eA[1]}${eA[2]}`, 16)];
|
|
65
|
+
const gC = [parseInt(`${sA[3]}${sA[4]}`, 16), parseInt(`${eA[3]}${eA[4]}`, 16)];
|
|
66
|
+
const bC = [parseInt(`${sA[5]}${sA[6]}`, 16), parseInt(`${eA[5]}${eA[6]}`, 16)];
|
|
67
|
+
const aC = [parseInt(`${sA[7]}${sA[8]}`, 16), parseInt(`${eA[7]}${eA[8]}`, 16)];
|
|
68
68
|
const rStep = (rC[0] - rC[1]) / (size + 1);
|
|
69
69
|
const gStep = (gC[0] - gC[1]) / (size + 1);
|
|
70
70
|
const bStep = (bC[0] - bC[1]) / (size + 1);
|
|
@@ -74,14 +74,14 @@ function generateGradients(g, index) {
|
|
|
74
74
|
const rS = Math.round(rC[0] - rStep * (i + 1)).toString(16);
|
|
75
75
|
const gS = Math.round(gC[0] - gStep * (i + 1)).toString(16);
|
|
76
76
|
const bS = Math.round(bC[0] - bStep * (i + 1)).toString(16);
|
|
77
|
-
const h =
|
|
77
|
+
const h = `${padTwo(rS)}${padTwo(gS)}${padTwo(bS)}`;
|
|
78
78
|
const t = Math.floor(aStep * (i + 1) + aC[1]).toString(16);
|
|
79
|
-
return toHex.Hex(
|
|
79
|
+
return toHex.Hex(`#${h}`, t);
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
function padTwo(s) {
|
|
83
83
|
if (s.length === 1) {
|
|
84
|
-
return
|
|
84
|
+
return `0${s}`;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
if (s.length === 0) {
|
|
@@ -129,10 +129,10 @@ function formatToHex(color) {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
if (SEMI_DESIGN_TOKENS.SEQUENCE.indexOf(color) !== -1) {
|
|
132
|
-
return toHex.SemiDesignToken(
|
|
132
|
+
return toHex.SemiDesignToken(`${color}-5`);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
return toHex.SemiDesignToken(
|
|
135
|
+
return toHex.SemiDesignToken(`${color}`);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
return undefined;
|
|
@@ -141,14 +141,14 @@ function formatToHex(color) {
|
|
|
141
141
|
const toHex = {
|
|
142
142
|
Hex(color, transparency) {
|
|
143
143
|
color = color.replace('#', '');
|
|
144
|
-
if (color.length === 8) return
|
|
145
|
-
if (color.length === 6) return
|
|
144
|
+
if (color.length === 8) return `#${color}`;
|
|
145
|
+
if (color.length === 6) return `#${color}${transparency || 'ff'}`;
|
|
146
146
|
|
|
147
147
|
if (color.length === 3) {
|
|
148
148
|
color = color.split('').map(c => c + c).join('');
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
return
|
|
151
|
+
return `#${color}${transparency || 'ff'}`;
|
|
152
152
|
},
|
|
153
153
|
|
|
154
154
|
SemiDesignToken(color) {
|
|
@@ -157,9 +157,9 @@ const toHex = {
|
|
|
157
157
|
return undefined;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
const variable = getComputedStyle(document.body).getPropertyValue(
|
|
160
|
+
const variable = getComputedStyle(document.body).getPropertyValue(`--semi-${color}`);
|
|
161
161
|
if (variable === '') return undefined;
|
|
162
|
-
const rgba =
|
|
162
|
+
const rgba = `rgba(${variable}, 1)`;
|
|
163
163
|
return toHex.RgbA(rgba);
|
|
164
164
|
},
|
|
165
165
|
|
|
@@ -8,22 +8,22 @@ exports.strings = exports.radioGroupClasses = exports.radioClasses = exports.num
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const radioClasses = {
|
|
11
|
-
PREFIX:
|
|
12
|
-
INNER:
|
|
13
|
-
TEXT:
|
|
14
|
-
INPUT:
|
|
15
|
-
CHECKED:
|
|
16
|
-
DISABLED:
|
|
17
|
-
BUTTON:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-radio`,
|
|
12
|
+
INNER: `${_constants.BASE_CLASS_PREFIX}-radio-inner`,
|
|
13
|
+
TEXT: `${_constants.BASE_CLASS_PREFIX}-radio-text`,
|
|
14
|
+
INPUT: `${_constants.BASE_CLASS_PREFIX}-radio-input`,
|
|
15
|
+
CHECKED: `${_constants.BASE_CLASS_PREFIX}-radio-checked`,
|
|
16
|
+
DISABLED: `${_constants.BASE_CLASS_PREFIX}-radio-disabled`,
|
|
17
|
+
BUTTON: `${_constants.BASE_CLASS_PREFIX}-radio-button`
|
|
18
18
|
};
|
|
19
19
|
exports.radioClasses = radioClasses;
|
|
20
20
|
const radioGroupClasses = {
|
|
21
|
-
PREFIX:
|
|
22
|
-
INNER:
|
|
23
|
-
TEXT:
|
|
24
|
-
INPUT:
|
|
25
|
-
CHECKED:
|
|
26
|
-
DISABLED:
|
|
21
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-radioGroup`,
|
|
22
|
+
INNER: `${_constants.BASE_CLASS_PREFIX}-radioGroup-inner`,
|
|
23
|
+
TEXT: `${_constants.BASE_CLASS_PREFIX}-radioGroup-text`,
|
|
24
|
+
INPUT: `${_constants.BASE_CLASS_PREFIX}-radioGroup-input`,
|
|
25
|
+
CHECKED: `${_constants.BASE_CLASS_PREFIX}-radioGroup-checked`,
|
|
26
|
+
DISABLED: `${_constants.BASE_CLASS_PREFIX}-radioGroup-disabled`
|
|
27
27
|
};
|
|
28
28
|
exports.radioGroupClasses = radioGroupClasses;
|
|
29
29
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-rating`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
@@ -8,8 +8,8 @@ exports.strings = exports.numbers = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
12
|
-
SELECTED:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-scrolllist`,
|
|
12
|
+
SELECTED: `${_constants.BASE_CLASS_PREFIX}-scrolllist-item-selected`
|
|
13
13
|
};
|
|
14
14
|
exports.cssClasses = cssClasses;
|
|
15
15
|
const strings = {
|
|
@@ -10,9 +10,9 @@ var _constants = require("../base/constants");
|
|
|
10
10
|
var _constants2 = require("../tooltip/constants");
|
|
11
11
|
|
|
12
12
|
const cssClasses = {
|
|
13
|
-
PREFIX:
|
|
14
|
-
PREFIX_OPTION:
|
|
15
|
-
PREFIX_GROUP:
|
|
13
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-select`,
|
|
14
|
+
PREFIX_OPTION: `${_constants.BASE_CLASS_PREFIX}-select-option`,
|
|
15
|
+
PREFIX_GROUP: `${_constants.BASE_CLASS_PREFIX}-select-group`
|
|
16
16
|
};
|
|
17
17
|
exports.cssClasses = cssClasses;
|
|
18
18
|
const strings = {
|
|
@@ -1367,7 +1367,8 @@ class SelectFoundation extends _foundation.default {
|
|
|
1367
1367
|
const isMultiple = this._isMultiple();
|
|
1368
1368
|
|
|
1369
1369
|
if (!isMultiple) {
|
|
1370
|
-
console.warn(
|
|
1370
|
+
console.warn(`[Semi Select]: It seems that you have called the selectAll method in the single-selection Select.
|
|
1371
|
+
Please note that this is not a legal way to use it`);
|
|
1371
1372
|
return;
|
|
1372
1373
|
}
|
|
1373
1374
|
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
$color-select-bg-default: var(--semi-color-fill-0); // 选择器输入框背景色 - 默认态
|
|
3
3
|
$color-select-bg-hover: var(--semi-color-fill-1); // 选择器输入框背景色 - 悬停态
|
|
4
4
|
$color-select-bg-active: var(--semi-color-fill-2); // 选择器输入框背景色 - 按下态
|
|
5
|
+
$color-select-bg-focus: var(--semi-color-fill-0); // 选择器输入框背景色 - 聚焦态
|
|
5
6
|
$color-select-border-default: transparent; // 选择器输入框描边颜色
|
|
6
7
|
$color-select-border-hover: $color-select-border-default; // 选择器输入框描边颜色 - 悬浮
|
|
7
8
|
$color-select-border-active: var(--semi-color-focus-border); // 选择器输入框描边颜色 - 按下态
|
|
@@ -8,8 +8,8 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
12
|
-
DIALOG:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-sidesheet`,
|
|
12
|
+
DIALOG: `${_constants.BASE_CLASS_PREFIX}-modal`
|
|
13
13
|
};
|
|
14
14
|
exports.cssClasses = cssClasses;
|
|
15
15
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-skeleton`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {};
|
|
@@ -8,13 +8,13 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
12
|
-
DISABLED:
|
|
13
|
-
VERTICAL:
|
|
14
|
-
TRACK:
|
|
15
|
-
DOTS:
|
|
16
|
-
MARKS:
|
|
17
|
-
HANDLE:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-slider`,
|
|
12
|
+
DISABLED: `${_constants.BASE_CLASS_PREFIX}-slider-disabled`,
|
|
13
|
+
VERTICAL: `${_constants.BASE_CLASS_PREFIX}-slider-vertical`,
|
|
14
|
+
TRACK: `${_constants.BASE_CLASS_PREFIX}-slider-track`,
|
|
15
|
+
DOTS: `${_constants.BASE_CLASS_PREFIX}-slider-dots`,
|
|
16
|
+
MARKS: `${_constants.BASE_CLASS_PREFIX}-slider-marks`,
|
|
17
|
+
HANDLE: `${_constants.BASE_CLASS_PREFIX}-slider-handle`
|
|
18
18
|
};
|
|
19
19
|
exports.cssClasses = cssClasses;
|
|
20
20
|
const strings = {
|
|
@@ -8,7 +8,7 @@ exports.strings = exports.cssClasses = void 0;
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
10
|
const cssClasses = {
|
|
11
|
-
PREFIX:
|
|
11
|
+
PREFIX: `${_constants.BASE_CLASS_PREFIX}-space`
|
|
12
12
|
};
|
|
13
13
|
exports.cssClasses = cssClasses;
|
|
14
14
|
const strings = {
|
|
@@ -7,7 +7,7 @@ exports.strings = exports.numbers = exports.cssClasses = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _constants = require("../base/constants");
|
|
9
9
|
|
|
10
|
-
const PREFIX =
|
|
10
|
+
const PREFIX = `${_constants.BASE_CLASS_PREFIX}-spin`;
|
|
11
11
|
const cssClasses = {
|
|
12
12
|
PREFIX
|
|
13
13
|
};
|