tntd 3.0.0-beta.10 → 3.0.0-beta.12
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/es/form/form.less +1 -1
- package/es/form/style/index.less +3 -3
- package/es/modal/style/confirm.less +6 -6
- package/es/query-form/Field/Checkbox.js +1 -1
- package/es/query-form/Field/Checkbox.js.map +1 -1
- package/es/query-form/Field/Composition/FieldPopover.js +59 -39
- package/es/query-form/Field/Composition/FieldPopover.js.map +1 -1
- package/es/query-form/Field/Composition/Select.js +17 -14
- package/es/query-form/Field/Composition/Select.js.map +1 -1
- package/es/query-form/Field/Composition/index.js +16 -105
- package/es/query-form/Field/Composition/index.js.map +1 -1
- package/es/query-form/Field/Composition/index.less +1 -1
- package/es/query-form/Field/Composition/utils.js +107 -0
- package/es/query-form/Field/Composition/utils.js.map +1 -1
- package/es/query-form/index.js +146 -319
- package/es/query-form/index.js.map +1 -1
- package/es/query-form/index.less +12 -58
- package/es/query-form2/Field/Checkbox.js +23 -0
- package/es/query-form2/Field/Checkbox.js.map +1 -0
- package/es/query-form2/Field/Composition/FieldPopover.js +308 -0
- package/es/query-form2/Field/Composition/FieldPopover.js.map +1 -0
- package/es/query-form2/Field/Composition/FieldPopover.less +35 -0
- package/es/query-form2/Field/Composition/Select.js +104 -0
- package/es/query-form2/Field/Composition/Select.js.map +1 -0
- package/es/query-form2/Field/Composition/index.js +299 -0
- package/es/query-form2/Field/Composition/index.js.map +1 -0
- package/es/query-form2/Field/Composition/index.less +114 -0
- package/es/query-form2/Field/Composition/utils.js +19 -0
- package/es/query-form2/Field/Composition/utils.js.map +1 -0
- package/es/query-form2/Field/Select.js +59 -0
- package/es/query-form2/Field/Select.js.map +1 -0
- package/es/query-form2/Field/SelectInput.js +87 -0
- package/es/query-form2/Field/SelectInput.js.map +1 -0
- package/es/query-form2/Field/fieldsMap.js +28 -0
- package/es/query-form2/Field/fieldsMap.js.map +1 -0
- package/es/query-form2/Field/index.js +117 -0
- package/es/query-form2/Field/index.js.map +1 -0
- package/es/query-form2/createActions.js +47 -0
- package/es/query-form2/createActions.js.map +1 -0
- package/es/query-form2/index.js +345 -0
- package/es/query-form2/index.js.map +1 -0
- package/es/query-form2/index.less +136 -0
- package/es/query-form2/useForm.js +6 -0
- package/es/query-form2/useForm.js.map +1 -0
- package/es/query-list-scene/QueryForm.js +1 -3
- package/es/query-list-scene/QueryForm.js.map +1 -1
- package/es/select/select.less +1 -0
- package/es/tag/color.less +28 -18
- package/es/tag/tag.less +42 -6
- package/lib/form/form.less +1 -1
- package/lib/form/style/index.less +3 -3
- package/lib/modal/style/confirm.less +6 -6
- package/lib/query-form/Field/Checkbox.js +1 -1
- package/lib/query-form/Field/Checkbox.js.map +1 -1
- package/lib/query-form/Field/Composition/FieldPopover.js +91 -70
- package/lib/query-form/Field/Composition/FieldPopover.js.map +1 -1
- package/lib/query-form/Field/Composition/Select.d.ts.map +1 -1
- package/lib/query-form/Field/Composition/Select.js +18 -15
- package/lib/query-form/Field/Composition/Select.js.map +1 -1
- package/lib/query-form/Field/Composition/index.d.ts +0 -4
- package/lib/query-form/Field/Composition/index.js +29 -121
- package/lib/query-form/Field/Composition/index.js.map +1 -1
- package/lib/query-form/Field/Composition/index.less +1 -1
- package/lib/query-form/Field/Composition/utils.d.ts +16 -0
- package/lib/query-form/Field/Composition/utils.d.ts.map +1 -1
- package/lib/query-form/Field/Composition/utils.js +114 -0
- package/lib/query-form/Field/Composition/utils.js.map +1 -1
- package/lib/query-form/index.d.ts +15 -24
- package/lib/query-form/index.d.ts.map +1 -1
- package/lib/query-form/index.js +165 -344
- package/lib/query-form/index.js.map +1 -1
- package/lib/query-form/index.less +12 -58
- package/lib/query-form2/Field/Checkbox.d.ts +8 -0
- package/lib/query-form2/Field/Checkbox.d.ts.map +1 -0
- package/lib/query-form2/Field/Checkbox.js +28 -0
- package/lib/query-form2/Field/Checkbox.js.map +1 -0
- package/lib/query-form2/Field/Composition/FieldPopover.d.ts +19 -0
- package/lib/query-form2/Field/Composition/FieldPopover.d.ts.map +1 -0
- package/lib/query-form2/Field/Composition/FieldPopover.js +347 -0
- package/lib/query-form2/Field/Composition/FieldPopover.js.map +1 -0
- package/lib/query-form2/Field/Composition/FieldPopover.less +35 -0
- package/lib/query-form2/Field/Composition/Select.d.ts +4 -0
- package/lib/query-form2/Field/Composition/Select.d.ts.map +1 -0
- package/lib/query-form2/Field/Composition/Select.js +128 -0
- package/lib/query-form2/Field/Composition/Select.js.map +1 -0
- package/lib/query-form2/Field/Composition/index.d.ts +14 -0
- package/lib/query-form2/Field/Composition/index.d.ts.map +1 -0
- package/lib/query-form2/Field/Composition/index.js +349 -0
- package/lib/query-form2/Field/Composition/index.js.map +1 -0
- package/lib/query-form2/Field/Composition/index.less +114 -0
- package/lib/query-form2/Field/Composition/utils.d.ts +6 -0
- package/lib/query-form2/Field/Composition/utils.d.ts.map +1 -0
- package/lib/query-form2/Field/Composition/utils.js +27 -0
- package/lib/query-form2/Field/Composition/utils.js.map +1 -0
- package/lib/query-form2/Field/Select.d.ts +4 -0
- package/lib/query-form2/Field/Select.d.ts.map +1 -0
- package/lib/query-form2/Field/Select.js +80 -0
- package/lib/query-form2/Field/Select.js.map +1 -0
- package/lib/query-form2/Field/SelectInput.d.ts +4 -0
- package/lib/query-form2/Field/SelectInput.d.ts.map +1 -0
- package/lib/query-form2/Field/SelectInput.js +100 -0
- package/lib/query-form2/Field/SelectInput.js.map +1 -0
- package/lib/query-form2/Field/fieldsMap.d.ts +27 -0
- package/lib/query-form2/Field/fieldsMap.d.ts.map +1 -0
- package/lib/query-form2/Field/fieldsMap.js +35 -0
- package/lib/query-form2/Field/fieldsMap.js.map +1 -0
- package/lib/query-form2/Field/index.d.ts +14 -0
- package/lib/query-form2/Field/index.d.ts.map +1 -0
- package/lib/query-form2/Field/index.js +147 -0
- package/lib/query-form2/Field/index.js.map +1 -0
- package/lib/query-form2/createActions.d.ts +14 -0
- package/lib/query-form2/createActions.d.ts.map +1 -0
- package/lib/query-form2/createActions.js +54 -0
- package/lib/query-form2/createActions.js.map +1 -0
- package/lib/query-form2/index.d.ts +36 -0
- package/lib/query-form2/index.d.ts.map +1 -0
- package/lib/query-form2/index.js +385 -0
- package/lib/query-form2/index.js.map +1 -0
- package/lib/query-form2/index.less +136 -0
- package/lib/query-form2/useForm.d.ts +13 -0
- package/lib/query-form2/useForm.d.ts.map +1 -0
- package/lib/query-form2/useForm.js +13 -0
- package/lib/query-form2/useForm.js.map +1 -0
- package/lib/query-list-scene/QueryForm.js +2 -3
- package/lib/query-list-scene/QueryForm.js.map +1 -1
- package/lib/select/select.less +1 -0
- package/lib/tag/color.less +28 -18
- package/lib/tag/tag.less +42 -6
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
.tnt-queryform {
|
|
2
|
+
display: flex;
|
|
3
|
+
|
|
4
|
+
&-extra {
|
|
5
|
+
line-height: 32px;
|
|
6
|
+
margin-left: @margin-sm;
|
|
7
|
+
& > * {
|
|
8
|
+
margin-left: @margin-xs;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&-actions {
|
|
13
|
+
align-items: center;
|
|
14
|
+
display: inline-block;
|
|
15
|
+
height: 32px;
|
|
16
|
+
line-height: 32px;
|
|
17
|
+
position: absolute;
|
|
18
|
+
right: 0;
|
|
19
|
+
|
|
20
|
+
& > *:not(.expand-link) {
|
|
21
|
+
margin-right: 10px;
|
|
22
|
+
}
|
|
23
|
+
& > .expand-link {
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin-right: 0;
|
|
26
|
+
}
|
|
27
|
+
& > .ant-badge {
|
|
28
|
+
.tnt-icon {
|
|
29
|
+
margin-right: @margin-xs;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.ant-form {
|
|
35
|
+
display: inline-block;
|
|
36
|
+
margin-bottom: @margin-sm;
|
|
37
|
+
display: flex;
|
|
38
|
+
flex: 1;
|
|
39
|
+
&.ant-form-inline {
|
|
40
|
+
flex-wrap: unset;
|
|
41
|
+
position: relative;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
& > div:nth-child(1) {
|
|
45
|
+
height: 32px;
|
|
46
|
+
overflow: hidden;
|
|
47
|
+
.ant-form-item-label {
|
|
48
|
+
label {
|
|
49
|
+
// bottom: 4px;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.expanded {
|
|
55
|
+
& > div:nth-child(1) {
|
|
56
|
+
height: auto !important;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.showMore {
|
|
61
|
+
& > div:nth-child(1) {
|
|
62
|
+
.ant-form-item {
|
|
63
|
+
margin-bottom: @margin-sm;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
& > div:nth-child(2) {
|
|
69
|
+
display: flex;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.ant-form-inline .ant-form-item {
|
|
73
|
+
margin-right: 10px;
|
|
74
|
+
display: inline-block;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ant-form-item-control {
|
|
78
|
+
// min-width: 160px;
|
|
79
|
+
line-height: unset;
|
|
80
|
+
.ant-calendar-picker-input {
|
|
81
|
+
padding: 0 @padding-sm;
|
|
82
|
+
}
|
|
83
|
+
.ant-form-item-children {
|
|
84
|
+
& > .ant-input,
|
|
85
|
+
& > .ant-input-affix-wrapper {
|
|
86
|
+
width: 160px;
|
|
87
|
+
// width: 200px;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&-drawer {
|
|
94
|
+
margin-top: @margin-xxl;
|
|
95
|
+
&.large-size {
|
|
96
|
+
margin-top: 60px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&.ant-drawer.ant-drawer-open {
|
|
100
|
+
.ant-drawer-mask {
|
|
101
|
+
opacity: 0;
|
|
102
|
+
background: unset;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
.ant-drawer-body {
|
|
106
|
+
.ant-form-item {
|
|
107
|
+
display: block;
|
|
108
|
+
margin-right: 0;
|
|
109
|
+
margin-bottom: @margin-md;
|
|
110
|
+
width: 100%;
|
|
111
|
+
}
|
|
112
|
+
.ant-form-item-label {
|
|
113
|
+
display: block;
|
|
114
|
+
text-align: left;
|
|
115
|
+
line-height: 22px;
|
|
116
|
+
margin-bottom: 10px;
|
|
117
|
+
}
|
|
118
|
+
.ant-form-item-control-wrapper,
|
|
119
|
+
.ant-form-item-control,
|
|
120
|
+
.ant-calendar-picker,
|
|
121
|
+
.ant-input {
|
|
122
|
+
min-width: 100%;
|
|
123
|
+
width: 100%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
& > .ant-btn {
|
|
127
|
+
display: block;
|
|
128
|
+
width: 100%;
|
|
129
|
+
margin-bottom: 10px;
|
|
130
|
+
&.ant-btn-primary {
|
|
131
|
+
margin-top: @margin-md;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default function useForm(): {
|
|
2
|
+
setData(key: any, value: any): void;
|
|
3
|
+
getData(key: any): void;
|
|
4
|
+
setValues(values: any): void;
|
|
5
|
+
getValues(): {};
|
|
6
|
+
resetValues(): void;
|
|
7
|
+
setValue(name: any, value: any): void;
|
|
8
|
+
getValue(name: any): any;
|
|
9
|
+
on: (eventName: any, callback: any) => void;
|
|
10
|
+
emit: (...args: any[]) => void;
|
|
11
|
+
off: (...args: any[]) => void;
|
|
12
|
+
}[];
|
|
13
|
+
//# sourceMappingURL=useForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForm.d.ts","sourceRoot":"","sources":["../../src/query-form2/useForm.js"],"names":[],"mappings":"AAGA;;;;;;;;;;;IAIC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = useForm;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _createActions = _interopRequireDefault(require("./createActions"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
+
function useForm() {
|
|
11
|
+
var form = (0, _react.useRef)((0, _createActions["default"])());
|
|
12
|
+
return [form.current];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useForm.js","sourceRoot":"","sources":["../../src/query-form2/useForm.js"],"names":[],"mappings":";;;;;AAAA,iCAA8B;AAC9B,oEAA2C;AAE3C,SAAwB,OAAO;IAC7B,MAAM,IAAI,GAAG,IAAA,cAAM,EAAC,IAAA,uBAAa,GAAE,CAAC,CAAA;IAEpC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;AACvB,CAAC;AAJD,0BAIC","sourcesContent":["import { useRef } from 'react'\nimport createActions from './createActions'\n\nexport default function useForm() {\n const form = useRef(createActions())\n\n return [form.current]\n}\n"]}
|
|
@@ -6,10 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _queryForm = _interopRequireDefault(require("../query-form"));
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
12
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
14
13
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
15
14
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -128,7 +127,7 @@ var QueryForm = exports["default"] = /*#__PURE__*/function (_React$PureComponent
|
|
|
128
127
|
props = __rest(_a, ["className", "actions", "extraActions", "extralActions", "qlsProps"]);
|
|
129
128
|
return _react["default"].createElement(_queryForm["default"], Object.assign({}, props, {
|
|
130
129
|
form: this.form,
|
|
131
|
-
className: (0,
|
|
130
|
+
className: (0, _classnames["default"])(clsPrefix, className),
|
|
132
131
|
// 前期拼写错误,导致需要兼容错误的api
|
|
133
132
|
extraActions: extraActions || extralActions,
|
|
134
133
|
onChange: this.onChange,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryForm.js","sourceRoot":"","sources":["../../src/query-list-scene/QueryForm.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAyB;AACzB,4DAAmC;AACnC,+DAAgC;AAEhC,MAAM,SAAS,GAAG,8BAA8B,CAAA;AAEhD,MAAqB,SAAU,SAAQ,eAAK,CAAC,aAAa;IACxD,YAAY,KAAK;QACf,KAAK,CAAC,KAAK,CAAC,CAAA;QA0Cd;;;;mBAAW,CAAC,SAAS,EAAE,EAAE;gBACvB,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;gBACxC,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,EAAE,CAAA;gBACpC,M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,IAAI,CAAC,OAAO,IACrB,CACH,CAAA;IACH,CAAC;IAED,iBAAiB;QACf,MAAM,EAAE,aAAa,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAEpE,IAAI,QAAQ,CAAC,MAAM,IAAI,MAAM,EAAE;YAC7B,OAAO,CAAC,WAAW,iCAEZ,aAAa,GACb,OAAO,CAAC,WAAW,EAAE,GAE1B,KAAK,CACN,CAAA;SACF;aAAM;YACL,OAAO,CAAC,OAAO,CAAC,UAAU,EAAE,aAAa,CAAC,CAAA;SAC3C;IACH,CAAC;IA6CD,oBAAoB;QAClB,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAA;QAE9B,OAAO,CAAC,cAAc,CAAC,aAAa,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;QACvD,OAAO,CAAC,cAAc,CAAC,eAAe,EAAE,IAAI,CAAC,aAAa,CAAC,CAAA;IAC7D,CAAC;CACF;AA7FD,4BA6FC;AAED,SAAS,CAAC,KAAK,GAAG,oBAAI,CAAC,KAAK,CAAA","sourcesContent":["import React from 'react'\nimport classnames from 'classnames'\nimport Form from '../query-form'\n\nconst clsPrefix = 'tnt-querylistscene-queryform'\n\nexport default class QueryForm extends React.PureComponent {\n constructor(props) {\n super(props)\n const { actions, form } = props\n\n this.form = form || Form.createForm()\n\n actions.on('setFormData', this.setFormData)\n actions.on('resetFormData', this.resetFormData)\n }\n\n render() {\n const { className, actions, extraActions, extralActions, qlsProps, ...props } = this.props\n\n return (\n <Form\n {...props}\n form={this.form}\n className={classnames(clsPrefix, className)}\n // 前期拼写错误,导致需要兼容错误的api\n extraActions={extraActions || extralActions}\n onChange={this.onChange}\n onSearch={this.onSearch}\n onReset={this.onReset}\n />\n )\n }\n\n componentDidMount() {\n const { initialValues = {}, actions, qlsProps, memory } = this.props\n\n if (qlsProps.memory || memory) {\n actions.setFormData(\n {\n ...initialValues,\n ...actions.getFormData(),\n },\n false\n )\n } else {\n actions.setData('formData', initialValues)\n }\n }\n\n onSearch = (searchObj) => {\n const { onSearch, actions } = this.props\n const values = actions.getFormData()\n const params = { ...values, ...(searchObj || {}), current: 1 }\n\n // memory 与 url解析setForm时 监听事件异步\n actions.setData('formData', values)\n Promise.resolve().then(() => {\n onSearch && onSearch(params)\n actions.emit('search', params)\n })\n }\n\n onReset = () => {\n const { initialValues, onReset, actions } = this.props\n\n actions.setFormData(initialValues, false)\n\n onReset?.(initialValues)\n this.onSearch()\n }\n\n onChange = (newValues, changedInfo, ...rest) => {\n const { onChange, actions } = this.props\n\n actions.setFormData(newValues, false)\n onChange?.(newValues, changedInfo, ...rest)\n }\n\n setFormData = (data, needSearch) => {\n const { actions } = this.props\n actions.setData('formData', data)\n this.form.setValues(data)\n needSearch && this.onSearch()\n }\n\n resetFormData = (needSearch) => {\n const { initialValues, actions } = this.props\n\n actions.setFormData(initialValues, needSearch)\n this.form.resetValues()\n }\n\n componentWillUnmount() {\n const { actions } = this.props\n\n actions.removeListener('setFormData', this.setFormData)\n actions.removeListener('resetFormData', this.resetFormData)\n }\n}\n\nQueryForm.Field = Form.Field\n"]}
|
package/lib/select/select.less
CHANGED
package/lib/tag/color.less
CHANGED
|
@@ -1,43 +1,53 @@
|
|
|
1
|
-
@preset-colors-custom: grey,
|
|
1
|
+
@preset-colors-custom: grey, green, red, gold, lightblue, bluegrey, purplegrey, purple, lightpurple, lightgreen, pink, rose, orange, magenta, volcano, yellow, cyan, lime, geekblue, tnt-pink, tnt-orange, tnt-purple;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
@grey-7: @text-color-secondary;
|
|
5
|
+
@grey-5: #8b919e;
|
|
5
6
|
@grey-4: @border-color-base;
|
|
6
7
|
@grey-1: @tag-default-bg;
|
|
7
8
|
|
|
8
|
-
@rose-7:#D8395E;
|
|
9
|
+
@rose-7:#D8395E;
|
|
10
|
+
@rose-5: #EE3E67;
|
|
9
11
|
@rose-4: #FEA3B4;
|
|
10
|
-
@rose-1: #FFF1F3;
|
|
12
|
+
@rose-1: #FFF1F3;
|
|
11
13
|
|
|
12
|
-
@lightblue-7: #1AA9E6;
|
|
14
|
+
@lightblue-7: #1AA9E6;
|
|
15
|
+
@lightblue-5: #36BFFA;
|
|
13
16
|
@lightblue-4: #8FE0FF;
|
|
14
|
-
@lightblue-1: #F0F9FF;
|
|
17
|
+
@lightblue-1: #F0F9FF;
|
|
15
18
|
|
|
16
|
-
@bluegrey-7: #486FBB;
|
|
19
|
+
@bluegrey-7: #486FBB;
|
|
20
|
+
@bluegrey-5: #628FE4;
|
|
17
21
|
@bluegrey-4: #A1BCEF;
|
|
18
|
-
@bluegrey-1: #F4F8FF;
|
|
22
|
+
@bluegrey-1: #F4F8FF;
|
|
19
23
|
|
|
20
|
-
@purplegrey-7: #4E5BA6;
|
|
24
|
+
@purplegrey-7: #4E5BA6;
|
|
25
|
+
@purplegrey-5: #717BBC;
|
|
21
26
|
@purplegrey-4: #AFB5D9;
|
|
22
|
-
@purplegrey-1: #F8F9FC;
|
|
27
|
+
@purplegrey-1: #F8F9FC;
|
|
23
28
|
|
|
24
|
-
@tnt-purple-7: #6E54D4;
|
|
29
|
+
@tnt-purple-7: #6E54D4;
|
|
30
|
+
@tnt-purple-5: #7A5AF8;
|
|
25
31
|
@tnt-purple-4: #BDB4FE;
|
|
26
|
-
@tnt-purple-1: #F4F3FF;
|
|
32
|
+
@tnt-purple-1: #F4F3FF;
|
|
27
33
|
|
|
28
|
-
@lightpurple-7: #5161D7;
|
|
34
|
+
@lightpurple-7: #5161D7;
|
|
35
|
+
@lightpurple-5: #6172F3;
|
|
29
36
|
@lightpurple-4: #A4BCFD;
|
|
30
|
-
@lightpurple-1: #EEF4FF;
|
|
37
|
+
@lightpurple-1: #EEF4FF;
|
|
31
38
|
|
|
32
|
-
@lightgreen-7: #2E9C98;
|
|
39
|
+
@lightgreen-7: #2E9C98;
|
|
40
|
+
@lightgreen-5: #3AB4AF;
|
|
33
41
|
@lightgreen-4: #8CE0DD;
|
|
34
|
-
@lightgreen-1: #F1FBFB;
|
|
42
|
+
@lightgreen-1: #F1FBFB;
|
|
35
43
|
|
|
36
|
-
@tnt-pink-7: #D03E93;
|
|
44
|
+
@tnt-pink-7: #D03E93;
|
|
45
|
+
@tnt-pink-5: #E844B7;
|
|
37
46
|
@tnt-pink-4: #FAA7E0;
|
|
38
47
|
@tnt-pink-1: #FDF2FA;
|
|
39
48
|
|
|
40
|
-
@tnt-orange-7:#DF5F28;
|
|
49
|
+
@tnt-orange-7:#DF5F28;
|
|
50
|
+
@tnt-orange-5:#F47345;
|
|
41
51
|
@tnt-orange-4: #FEB173;
|
|
42
|
-
@tnt-orange-1: #FFF6ED;
|
|
52
|
+
@tnt-orange-1: #FFF6ED;
|
|
43
53
|
|
package/lib/tag/tag.less
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
line-height: @tag-height;
|
|
22
22
|
|
|
23
23
|
.@{iconfont-css-prefix}-close {
|
|
24
|
-
|
|
24
|
+
.iconfont-size-under-12px(12px);
|
|
25
|
+
font-size: @font-size-sm !important;
|
|
25
26
|
vertical-align: middle;
|
|
26
27
|
line-height: 1;
|
|
27
28
|
}
|
|
@@ -112,6 +113,29 @@
|
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
&.@{tag-prefix-cls}-blue {
|
|
117
|
+
color: @blue-6;
|
|
118
|
+
background: @blue-1;
|
|
119
|
+
border-color: @blue-3;
|
|
120
|
+
>.@{iconfont-css-prefix}-close {
|
|
121
|
+
color: @blue-5;
|
|
122
|
+
}
|
|
123
|
+
&.@{tag-prefix-cls}-no-border{
|
|
124
|
+
border-color:transparent;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
&.@{tag-prefix-cls}-blue-inverse {
|
|
128
|
+
color: @text-color-inverse;
|
|
129
|
+
background: @blue-6;
|
|
130
|
+
border-color: @blue-6;
|
|
131
|
+
>.@{iconfont-css-prefix}-close {
|
|
132
|
+
color: @text-color-inverse;
|
|
133
|
+
}
|
|
134
|
+
&.@{tag-prefix-cls}-no-border{
|
|
135
|
+
border-color:transparent;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
115
139
|
// mixin to iterate over colors and create CSS class for each one
|
|
116
140
|
.make-color-classes(@i: length(@preset-colors-custom)) when (@i > 0) {
|
|
117
141
|
.make-color-classes(@i - 1);
|
|
@@ -119,13 +143,13 @@
|
|
|
119
143
|
@lightColor: '@{color}-1';
|
|
120
144
|
@lightBorderColor: '@{color}-4';
|
|
121
145
|
@darkColor: '@{color}-7';
|
|
146
|
+
@closeColor:'@{color}-5';
|
|
122
147
|
&.@{tag-prefix-cls}-@{color} {
|
|
123
148
|
color: @@darkColor;
|
|
124
149
|
background: @@lightColor;
|
|
125
150
|
border-color: @@lightBorderColor;
|
|
126
151
|
>.@{iconfont-css-prefix}-close {
|
|
127
|
-
color: @@
|
|
128
|
-
opacity: .8;
|
|
152
|
+
color: @@closeColor;
|
|
129
153
|
}
|
|
130
154
|
&.@{tag-prefix-cls}-no-border{
|
|
131
155
|
border-color:transparent;
|
|
@@ -135,7 +159,9 @@
|
|
|
135
159
|
color: @text-color-inverse;
|
|
136
160
|
background: @@darkColor;
|
|
137
161
|
border-color: @@darkColor;
|
|
138
|
-
|
|
162
|
+
>.@{iconfont-css-prefix}-close {
|
|
163
|
+
color: @text-color-inverse;
|
|
164
|
+
}
|
|
139
165
|
&.@{tag-prefix-cls}-no-border{
|
|
140
166
|
border-color:transparent;
|
|
141
167
|
}
|
|
@@ -154,11 +180,21 @@
|
|
|
154
180
|
cursor: pointer;
|
|
155
181
|
&-border{
|
|
156
182
|
border-color: @border-color-base;
|
|
183
|
+
// 非disabled
|
|
184
|
+
&:not(.@{tag-prefix-cls}-checkable-disabled):hover {
|
|
185
|
+
border-color: @primary-3;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&:not(.@{tag-prefix-cls}-checkable-disabled):hover {
|
|
190
|
+
color: @primary-6;
|
|
191
|
+
background-color: @primary-1;
|
|
192
|
+
transition: all 0.3s @ease-in-out-circ;
|
|
157
193
|
}
|
|
158
194
|
|
|
159
195
|
&:active,
|
|
160
196
|
&-checked {
|
|
161
|
-
color: @primary-
|
|
197
|
+
color: @primary-6;
|
|
162
198
|
background-color: @primary-1;
|
|
163
199
|
&.@{tag-prefix-cls}-checkable-border{
|
|
164
200
|
border-color: @primary-3;
|
|
@@ -167,7 +203,7 @@
|
|
|
167
203
|
|
|
168
204
|
&-checked {
|
|
169
205
|
&.@{tag-prefix-cls}-checkable-disabled:hover {
|
|
170
|
-
color: @primary-
|
|
206
|
+
color: @primary-6;
|
|
171
207
|
}
|
|
172
208
|
}
|
|
173
209
|
|