@elastic/eslint-plugin-eui 2.16.0 → 3.0.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/README.md +99 -3
- package/lib/cjs/index.js +4 -1
- package/lib/cjs/rules/button_group_no_invalid_children.d.ts +1 -1
- package/lib/cjs/rules/button_group_no_invalid_children.d.ts.map +1 -1
- package/lib/cjs/rules/button_group_no_invalid_children.js +76 -48
- package/lib/cjs/rules/button_group_selection_require_id.d.ts +3 -0
- package/lib/cjs/rules/button_group_selection_require_id.d.ts.map +1 -0
- package/lib/cjs/rules/button_group_selection_require_id.js +114 -0
- package/lib/cjs/rules/no_deprecated_icon_aliases.d.ts +54 -5
- package/lib/cjs/rules/no_deprecated_icon_aliases.d.ts.map +1 -1
- package/lib/cjs/rules/no_deprecated_icon_aliases.js +70 -8
- package/lib/cjs/utils/button_group_constants.d.ts +6 -0
- package/lib/cjs/utils/button_group_constants.d.ts.map +1 -0
- package/lib/cjs/utils/button_group_constants.js +19 -0
- package/lib/cjs/utils/collect_jsx_children.d.ts +3 -0
- package/lib/cjs/utils/collect_jsx_children.d.ts.map +1 -0
- package/lib/cjs/utils/collect_jsx_children.js +26 -0
- package/lib/esm/index.js +3 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/rules/button_group_no_invalid_children.d.ts +1 -1
- package/lib/esm/rules/button_group_no_invalid_children.js +81 -48
- package/lib/esm/rules/button_group_no_invalid_children.js.map +1 -1
- package/lib/esm/rules/button_group_selection_require_id.d.ts +2 -0
- package/lib/esm/rules/button_group_selection_require_id.js +118 -0
- package/lib/esm/rules/button_group_selection_require_id.js.map +1 -0
- package/lib/esm/rules/no_deprecated_icon_aliases.d.ts +54 -5
- package/lib/esm/rules/no_deprecated_icon_aliases.js +75 -6
- package/lib/esm/rules/no_deprecated_icon_aliases.js.map +1 -1
- package/lib/esm/utils/button_group_constants.d.ts +5 -0
- package/lib/esm/utils/button_group_constants.js +20 -0
- package/lib/esm/utils/button_group_constants.js.map +1 -0
- package/lib/esm/utils/collect_jsx_children.d.ts +2 -0
- package/lib/esm/utils/collect_jsx_children.js +21 -0
- package/lib/esm/utils/collect_jsx_children.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ESLintUtils } from '@typescript-eslint/utils';
|
|
2
2
|
export declare const DEPRECATED_ICON_ALIASES: {
|
|
3
3
|
readonly alert: "warning";
|
|
4
|
+
readonly analyzeEvent: "cube";
|
|
4
5
|
readonly anomalyChart: "chartAnomaly";
|
|
6
|
+
readonly anomalySwimLane: "chartHeatmap";
|
|
7
|
+
readonly annotation: "flag";
|
|
8
|
+
readonly apps: "grid";
|
|
5
9
|
readonly apmTrace: "chartWaterfall";
|
|
6
10
|
readonly arrowDown: "chevronSingleDown";
|
|
7
11
|
readonly arrowEnd: "chevronLimitRight";
|
|
@@ -15,9 +19,15 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
15
19
|
readonly changePointDetection: "chartChangePoint";
|
|
16
20
|
readonly checkInCircleFilled: "checkCircleFill";
|
|
17
21
|
readonly cheer: "popper";
|
|
22
|
+
readonly cloudDrizzle: "cloudRain";
|
|
23
|
+
readonly cloudStormy: "cloudBolt";
|
|
24
|
+
readonly cloudSunny: "cloudSun";
|
|
18
25
|
readonly color: "paintBucket";
|
|
19
26
|
readonly compute: "processor";
|
|
20
27
|
readonly console: "commandLine";
|
|
28
|
+
readonly container: "package";
|
|
29
|
+
readonly continuityAbove: "upload";
|
|
30
|
+
readonly continuityWithin: "maximize";
|
|
21
31
|
readonly contrastHigh: "contrastFill";
|
|
22
32
|
readonly controlsHorizontal: "controls";
|
|
23
33
|
readonly controlsVertical: "controls";
|
|
@@ -64,6 +74,7 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
64
74
|
readonly editorUnorderedList: "listBullet";
|
|
65
75
|
readonly email: "mail";
|
|
66
76
|
readonly eql: "query";
|
|
77
|
+
readonly esqlVis: "query";
|
|
67
78
|
readonly errorFilled: "errorFill";
|
|
68
79
|
readonly exit: "logOut";
|
|
69
80
|
readonly expand: "maximize";
|
|
@@ -73,15 +84,23 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
73
84
|
readonly eyeClosed: "eyeSlash";
|
|
74
85
|
readonly fieldStatistics: "tableInfo";
|
|
75
86
|
readonly filterInCircle: "filter";
|
|
87
|
+
readonly fold: "minimize";
|
|
76
88
|
readonly folderCheck: "check";
|
|
89
|
+
readonly folderClose: "folder";
|
|
90
|
+
readonly folderClosed: "folder";
|
|
77
91
|
readonly folderOpened: "folderOpen";
|
|
92
|
+
readonly frameNext: "chevronSingleRight";
|
|
93
|
+
readonly framePrevious: "chevronSingleLeft";
|
|
78
94
|
readonly glasses: "readOnly";
|
|
95
|
+
readonly help: "question";
|
|
79
96
|
readonly grab: "dragVertical";
|
|
80
97
|
readonly grabHorizontal: "dragHorizontal";
|
|
81
98
|
readonly grabOmnidirectional: "drag";
|
|
82
99
|
readonly heatmap: "chartHeatmap";
|
|
83
100
|
readonly importAction: "download";
|
|
101
|
+
readonly index: "table";
|
|
84
102
|
readonly indexClose: "tableCross";
|
|
103
|
+
readonly ip: "tokenIP";
|
|
85
104
|
readonly indexEdit: "tablePencil";
|
|
86
105
|
readonly indexFlush: "chartThreshold";
|
|
87
106
|
readonly indexMapping: "mapping";
|
|
@@ -91,6 +110,7 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
91
110
|
readonly indexTemporary: "tableTime";
|
|
92
111
|
readonly invert: "contrast";
|
|
93
112
|
readonly kqlField: "queryField";
|
|
113
|
+
readonly kqlFunction: "push";
|
|
94
114
|
readonly kqlOperand: "queryOperand";
|
|
95
115
|
readonly kqlSelector: "querySelector";
|
|
96
116
|
readonly kqlValue: "queryValue";
|
|
@@ -103,20 +123,27 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
103
123
|
readonly listAdd: "plusCircle";
|
|
104
124
|
readonly logPatternAnalysis: "pattern";
|
|
105
125
|
readonly logRateAnalysis: "chartBarVertical";
|
|
126
|
+
readonly logstashFilter: "filter";
|
|
106
127
|
readonly logstashIf: "if";
|
|
128
|
+
readonly logstashInput: "download";
|
|
129
|
+
readonly logstashOutput: "upload";
|
|
107
130
|
readonly logstashQueue: "queue";
|
|
108
131
|
readonly magnifyWithExclamation: "magnifyExclamation";
|
|
109
132
|
readonly magnifyWithMinus: "magnifyMinus";
|
|
110
133
|
readonly magnifyWithPlus: "magnifyPlus";
|
|
111
134
|
readonly mapMarker: "waypoint";
|
|
135
|
+
readonly menuDown: "transitionBottomOut";
|
|
136
|
+
readonly menuUp: "transitionTopOut";
|
|
112
137
|
readonly minusInCircle: "minusCircle";
|
|
113
138
|
readonly minusInCircleFilled: "minusCircle";
|
|
114
139
|
readonly minusInSquare: "minusSquare";
|
|
140
|
+
readonly namespace: "kubernetesNamespace";
|
|
115
141
|
readonly newChat: "plusCircle";
|
|
116
142
|
readonly node: "vectorTriangle";
|
|
117
143
|
readonly offline: "wifiSlash";
|
|
118
144
|
readonly online: "wifi";
|
|
119
145
|
readonly pagesSelect: "documentsCheck";
|
|
146
|
+
readonly payment: "money";
|
|
120
147
|
readonly pinFilled: "pinFill";
|
|
121
148
|
readonly pipeBreaks: "lineBreak";
|
|
122
149
|
readonly pipeNoBreaks: "lineBreakSlash";
|
|
@@ -126,19 +153,30 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
126
153
|
readonly plusInSquare: "plusSquare";
|
|
127
154
|
readonly popout: "external";
|
|
128
155
|
readonly productRobot: "productAgent";
|
|
129
|
-
readonly push: "send";
|
|
130
156
|
readonly returnKey: "return";
|
|
131
157
|
readonly search: "magnify";
|
|
132
158
|
readonly securitySignal: "radar";
|
|
159
|
+
readonly sessionViewer: "commandLine";
|
|
160
|
+
readonly singleMetricViewer: "chartArea";
|
|
161
|
+
readonly spaces: "grid";
|
|
133
162
|
readonly starEmpty: "star";
|
|
163
|
+
readonly starEmptySpace: "star";
|
|
164
|
+
readonly starFillSpace: "starFill";
|
|
134
165
|
readonly starFilled: "starFill";
|
|
135
|
-
readonly starFilledSpace: "
|
|
136
|
-
readonly
|
|
137
|
-
readonly
|
|
166
|
+
readonly starFilledSpace: "starFill";
|
|
167
|
+
readonly starMinusEmpty: "star";
|
|
168
|
+
readonly starMinusFill: "starFill";
|
|
169
|
+
readonly starMinusFilled: "starFill";
|
|
170
|
+
readonly starPlusEmpty: "star";
|
|
171
|
+
readonly starPlusFill: "starFill";
|
|
172
|
+
readonly starPlusFilled: "starFill";
|
|
138
173
|
readonly stopFilled: "stopFill";
|
|
174
|
+
readonly stats: "chartLine";
|
|
139
175
|
readonly streamsClassic: "productStreamsClassic";
|
|
140
176
|
readonly streamsWired: "productStreamsWired";
|
|
177
|
+
readonly string: "tokenString";
|
|
141
178
|
readonly submodule: "merge";
|
|
179
|
+
readonly tableOfContents: "listBullet";
|
|
142
180
|
readonly tableDensityCompact: "tableDensityHigh";
|
|
143
181
|
readonly tableDensityExpanded: "tableDensityLow";
|
|
144
182
|
readonly tableDensityNormal: "table";
|
|
@@ -148,6 +186,7 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
148
186
|
readonly timeslider: "clockControl";
|
|
149
187
|
readonly tokenDenseVector: "tokenVectorDense";
|
|
150
188
|
readonly training: "presentation";
|
|
189
|
+
readonly unfold: "maximize";
|
|
151
190
|
readonly unlink: "linkSlash";
|
|
152
191
|
readonly userAvatar: "user";
|
|
153
192
|
readonly vector: "vectorSquare";
|
|
@@ -158,6 +197,7 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
158
197
|
readonly visBarVertical: "chartBarVertical";
|
|
159
198
|
readonly visBarVerticalStacked: "chartBarVerticalStack";
|
|
160
199
|
readonly visGauge: "chartGauge";
|
|
200
|
+
readonly visGoal: "chartGauge";
|
|
161
201
|
readonly visLine: "chartLine";
|
|
162
202
|
readonly visMapCoordinate: "waypoint";
|
|
163
203
|
readonly visMapRegion: "map";
|
|
@@ -166,9 +206,18 @@ export declare const DEPRECATED_ICON_ALIASES: {
|
|
|
166
206
|
readonly visTable: "table";
|
|
167
207
|
readonly visTagCloud: "chartTagCloud";
|
|
168
208
|
readonly visText: "text";
|
|
209
|
+
readonly visTimelion: "productTimelion";
|
|
169
210
|
readonly visVega: "code";
|
|
211
|
+
readonly visVisualBuilder: "productTSVB";
|
|
170
212
|
readonly warningFilled: "warningFill";
|
|
213
|
+
readonly wordWrap: "lineBreak";
|
|
214
|
+
readonly wordWrapDisabled: "lineBreakSlash";
|
|
171
215
|
};
|
|
172
216
|
export declare const DEPRECATED_ICONS_WITHOUT_REPLACEMENT: ReadonlySet<string>;
|
|
173
|
-
export declare const
|
|
217
|
+
export declare const DEPRECATED_ICONS_WITH_GUIDANCE: {
|
|
218
|
+
readonly folderExclamation: "Use `linkSlash` for unlink actions or `hourglass` for Kibana Cases status.";
|
|
219
|
+
readonly stopFill: "Use `EuiColorPickerSwatch` for a color chip or `stop` otherwise.";
|
|
220
|
+
readonly stopSlash: "Use `EuiColorPickerSwatch` for no/transparent color or `stop` otherwise.";
|
|
221
|
+
};
|
|
222
|
+
export declare const NoDeprecatedIconAliases: ESLintUtils.RuleModule<"deprecatedIcon" | "deprecatedIconAlias" | "deprecatedIconGuidance", [], unknown, ESLintUtils.RuleListener>;
|
|
174
223
|
//# sourceMappingURL=no_deprecated_icon_aliases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no_deprecated_icon_aliases.d.ts","sourceRoot":"","sources":["../../../src/rules/no_deprecated_icon_aliases.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAY,MAAM,0BAA0B,CAAC;AAEjE,eAAO,MAAM,uBAAuB
|
|
1
|
+
{"version":3,"file":"no_deprecated_icon_aliases.d.ts","sourceRoot":"","sources":["../../../src/rules/no_deprecated_icon_aliases.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAY,MAAM,0BAA0B,CAAC;AAEjE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqN1B,CAAC;AAEX,eAAO,MAAM,oCAAoC,EAAE,WAAW,CAAC,MAAM,CAQjE,CAAC;AAEL,eAAO,MAAM,8BAA8B;;;;CAOjC,CAAC;AA+EX,eAAO,MAAM,uBAAuB,oIAuHlC,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.NoDeprecatedIconAliases = exports.DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICONS_WITHOUT_REPLACEMENT = void 0;
|
|
6
|
+
exports.NoDeprecatedIconAliases = exports.DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICONS_WITH_GUIDANCE = exports.DEPRECATED_ICONS_WITHOUT_REPLACEMENT = void 0;
|
|
7
7
|
var _utils = require("@typescript-eslint/utils");
|
|
8
8
|
/*
|
|
9
9
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
@@ -15,7 +15,11 @@ var _utils = require("@typescript-eslint/utils");
|
|
|
15
15
|
|
|
16
16
|
const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
17
17
|
alert: 'warning',
|
|
18
|
+
analyzeEvent: 'cube',
|
|
18
19
|
anomalyChart: 'chartAnomaly',
|
|
20
|
+
anomalySwimLane: 'chartHeatmap',
|
|
21
|
+
annotation: 'flag',
|
|
22
|
+
apps: 'grid',
|
|
19
23
|
apmTrace: 'chartWaterfall',
|
|
20
24
|
arrowDown: 'chevronSingleDown',
|
|
21
25
|
arrowEnd: 'chevronLimitRight',
|
|
@@ -29,9 +33,15 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
29
33
|
changePointDetection: 'chartChangePoint',
|
|
30
34
|
checkInCircleFilled: 'checkCircleFill',
|
|
31
35
|
cheer: 'popper',
|
|
36
|
+
cloudDrizzle: 'cloudRain',
|
|
37
|
+
cloudStormy: 'cloudBolt',
|
|
38
|
+
cloudSunny: 'cloudSun',
|
|
32
39
|
color: 'paintBucket',
|
|
33
40
|
compute: 'processor',
|
|
34
41
|
console: 'commandLine',
|
|
42
|
+
container: 'package',
|
|
43
|
+
continuityAbove: 'upload',
|
|
44
|
+
continuityWithin: 'maximize',
|
|
35
45
|
contrastHigh: 'contrastFill',
|
|
36
46
|
controlsHorizontal: 'controls',
|
|
37
47
|
controlsVertical: 'controls',
|
|
@@ -78,6 +88,7 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
78
88
|
editorUnorderedList: 'listBullet',
|
|
79
89
|
email: 'mail',
|
|
80
90
|
eql: 'query',
|
|
91
|
+
esqlVis: 'query',
|
|
81
92
|
errorFilled: 'errorFill',
|
|
82
93
|
exit: 'logOut',
|
|
83
94
|
expand: 'maximize',
|
|
@@ -87,15 +98,23 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
87
98
|
eyeClosed: 'eyeSlash',
|
|
88
99
|
fieldStatistics: 'tableInfo',
|
|
89
100
|
filterInCircle: 'filter',
|
|
101
|
+
fold: 'minimize',
|
|
90
102
|
folderCheck: 'check',
|
|
103
|
+
folderClose: 'folder',
|
|
104
|
+
folderClosed: 'folder',
|
|
91
105
|
folderOpened: 'folderOpen',
|
|
106
|
+
frameNext: 'chevronSingleRight',
|
|
107
|
+
framePrevious: 'chevronSingleLeft',
|
|
92
108
|
glasses: 'readOnly',
|
|
109
|
+
help: 'question',
|
|
93
110
|
grab: 'dragVertical',
|
|
94
111
|
grabHorizontal: 'dragHorizontal',
|
|
95
112
|
grabOmnidirectional: 'drag',
|
|
96
113
|
heatmap: 'chartHeatmap',
|
|
97
114
|
importAction: 'download',
|
|
115
|
+
index: 'table',
|
|
98
116
|
indexClose: 'tableCross',
|
|
117
|
+
ip: 'tokenIP',
|
|
99
118
|
indexEdit: 'tablePencil',
|
|
100
119
|
indexFlush: 'chartThreshold',
|
|
101
120
|
indexMapping: 'mapping',
|
|
@@ -105,6 +124,7 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
105
124
|
indexTemporary: 'tableTime',
|
|
106
125
|
invert: 'contrast',
|
|
107
126
|
kqlField: 'queryField',
|
|
127
|
+
kqlFunction: 'push',
|
|
108
128
|
kqlOperand: 'queryOperand',
|
|
109
129
|
kqlSelector: 'querySelector',
|
|
110
130
|
kqlValue: 'queryValue',
|
|
@@ -117,20 +137,27 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
117
137
|
listAdd: 'plusCircle',
|
|
118
138
|
logPatternAnalysis: 'pattern',
|
|
119
139
|
logRateAnalysis: 'chartBarVertical',
|
|
140
|
+
logstashFilter: 'filter',
|
|
120
141
|
logstashIf: 'if',
|
|
142
|
+
logstashInput: 'download',
|
|
143
|
+
logstashOutput: 'upload',
|
|
121
144
|
logstashQueue: 'queue',
|
|
122
145
|
magnifyWithExclamation: 'magnifyExclamation',
|
|
123
146
|
magnifyWithMinus: 'magnifyMinus',
|
|
124
147
|
magnifyWithPlus: 'magnifyPlus',
|
|
125
148
|
mapMarker: 'waypoint',
|
|
149
|
+
menuDown: 'transitionBottomOut',
|
|
150
|
+
menuUp: 'transitionTopOut',
|
|
126
151
|
minusInCircle: 'minusCircle',
|
|
127
152
|
minusInCircleFilled: 'minusCircle',
|
|
128
153
|
minusInSquare: 'minusSquare',
|
|
154
|
+
namespace: 'kubernetesNamespace',
|
|
129
155
|
newChat: 'plusCircle',
|
|
130
156
|
node: 'vectorTriangle',
|
|
131
157
|
offline: 'wifiSlash',
|
|
132
158
|
online: 'wifi',
|
|
133
159
|
pagesSelect: 'documentsCheck',
|
|
160
|
+
payment: 'money',
|
|
134
161
|
pinFilled: 'pinFill',
|
|
135
162
|
pipeBreaks: 'lineBreak',
|
|
136
163
|
pipeNoBreaks: 'lineBreakSlash',
|
|
@@ -140,19 +167,30 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
140
167
|
plusInSquare: 'plusSquare',
|
|
141
168
|
popout: 'external',
|
|
142
169
|
productRobot: 'productAgent',
|
|
143
|
-
push: 'send',
|
|
144
170
|
returnKey: 'return',
|
|
145
171
|
search: 'magnify',
|
|
146
172
|
securitySignal: 'radar',
|
|
173
|
+
sessionViewer: 'commandLine',
|
|
174
|
+
singleMetricViewer: 'chartArea',
|
|
175
|
+
spaces: 'grid',
|
|
147
176
|
starEmpty: 'star',
|
|
177
|
+
starEmptySpace: 'star',
|
|
178
|
+
starFillSpace: 'starFill',
|
|
148
179
|
starFilled: 'starFill',
|
|
149
|
-
starFilledSpace: '
|
|
150
|
-
|
|
151
|
-
|
|
180
|
+
starFilledSpace: 'starFill',
|
|
181
|
+
starMinusEmpty: 'star',
|
|
182
|
+
starMinusFill: 'starFill',
|
|
183
|
+
starMinusFilled: 'starFill',
|
|
184
|
+
starPlusEmpty: 'star',
|
|
185
|
+
starPlusFill: 'starFill',
|
|
186
|
+
starPlusFilled: 'starFill',
|
|
152
187
|
stopFilled: 'stopFill',
|
|
188
|
+
stats: 'chartLine',
|
|
153
189
|
streamsClassic: 'productStreamsClassic',
|
|
154
190
|
streamsWired: 'productStreamsWired',
|
|
191
|
+
string: 'tokenString',
|
|
155
192
|
submodule: 'merge',
|
|
193
|
+
tableOfContents: 'listBullet',
|
|
156
194
|
tableDensityCompact: 'tableDensityHigh',
|
|
157
195
|
tableDensityExpanded: 'tableDensityLow',
|
|
158
196
|
tableDensityNormal: 'table',
|
|
@@ -162,6 +200,7 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
162
200
|
timeslider: 'clockControl',
|
|
163
201
|
tokenDenseVector: 'tokenVectorDense',
|
|
164
202
|
training: 'presentation',
|
|
203
|
+
unfold: 'maximize',
|
|
165
204
|
unlink: 'linkSlash',
|
|
166
205
|
userAvatar: 'user',
|
|
167
206
|
vector: 'vectorSquare',
|
|
@@ -172,6 +211,7 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
172
211
|
visBarVertical: 'chartBarVertical',
|
|
173
212
|
visBarVerticalStacked: 'chartBarVerticalStack',
|
|
174
213
|
visGauge: 'chartGauge',
|
|
214
|
+
visGoal: 'chartGauge',
|
|
175
215
|
visLine: 'chartLine',
|
|
176
216
|
visMapCoordinate: 'waypoint',
|
|
177
217
|
visMapRegion: 'map',
|
|
@@ -180,10 +220,20 @@ const DEPRECATED_ICON_ALIASES = exports.DEPRECATED_ICON_ALIASES = {
|
|
|
180
220
|
visTable: 'table',
|
|
181
221
|
visTagCloud: 'chartTagCloud',
|
|
182
222
|
visText: 'text',
|
|
223
|
+
visTimelion: 'productTimelion',
|
|
183
224
|
visVega: 'code',
|
|
184
|
-
|
|
225
|
+
visVisualBuilder: 'productTSVB',
|
|
226
|
+
warningFilled: 'warningFill',
|
|
227
|
+
wordWrap: 'lineBreak',
|
|
228
|
+
wordWrapDisabled: 'lineBreakSlash'
|
|
185
229
|
};
|
|
186
|
-
const DEPRECATED_ICONS_WITHOUT_REPLACEMENT = exports.DEPRECATED_ICONS_WITHOUT_REPLACEMENT = new Set(['mobile']);
|
|
230
|
+
const DEPRECATED_ICONS_WITHOUT_REPLACEMENT = exports.DEPRECATED_ICONS_WITHOUT_REPLACEMENT = new Set(['article', 'dotInCircle', 'kubernetesNode', 'mobile', 'scale', 'securitySignalDetected']);
|
|
231
|
+
const DEPRECATED_ICONS_WITH_GUIDANCE = exports.DEPRECATED_ICONS_WITH_GUIDANCE = {
|
|
232
|
+
folderExclamation: 'Use `linkSlash` for unlink actions or `hourglass` for Kibana Cases status.',
|
|
233
|
+
stopFill: 'Use `EuiColorPickerSwatch` for a color chip or `stop` otherwise.',
|
|
234
|
+
stopSlash: 'Use `EuiColorPickerSwatch` for no/transparent color or `stop` otherwise.'
|
|
235
|
+
};
|
|
236
|
+
const isDeprecatedIconWithGuidance = value => value in DEPRECATED_ICONS_WITH_GUIDANCE;
|
|
187
237
|
const getComponentName = node => node.name.type === 'JSXIdentifier' ? node.name.name : undefined;
|
|
188
238
|
const COMPONENT_ICON_ATTRIBUTES = {
|
|
189
239
|
EuiCommentTimeline: new Set(['timelineAvatar']),
|
|
@@ -258,6 +308,17 @@ const NoDeprecatedIconAliases = exports.NoDeprecatedIconAliases = _utils.ESLintU
|
|
|
258
308
|
return;
|
|
259
309
|
}
|
|
260
310
|
if (!isDeprecatedIconAlias(iconType)) {
|
|
311
|
+
if (isDeprecatedIconWithGuidance(iconType)) {
|
|
312
|
+
context.report({
|
|
313
|
+
node: staticStringNode,
|
|
314
|
+
messageId: 'deprecatedIconGuidance',
|
|
315
|
+
data: {
|
|
316
|
+
iconType,
|
|
317
|
+
guidance: DEPRECATED_ICONS_WITH_GUIDANCE[iconType]
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
261
322
|
if (DEPRECATED_ICONS_WITHOUT_REPLACEMENT.has(iconType)) {
|
|
262
323
|
context.report({
|
|
263
324
|
node: staticStringNode,
|
|
@@ -295,7 +356,8 @@ const NoDeprecatedIconAliases = exports.NoDeprecatedIconAliases = _utils.ESLintU
|
|
|
295
356
|
schema: [],
|
|
296
357
|
messages: {
|
|
297
358
|
deprecatedIcon: 'Icon `{{iconType}}` is deprecated and has no direct replacement.',
|
|
298
|
-
deprecatedIconAlias: 'Icon alias `{{alias}}` is deprecated. Use `{{replacement}}` instead.'
|
|
359
|
+
deprecatedIconAlias: 'Icon alias `{{alias}}` is deprecated. Use `{{replacement}}` instead.',
|
|
360
|
+
deprecatedIconGuidance: 'Icon `{{iconType}}` is deprecated. {{guidance}}'
|
|
299
361
|
}
|
|
300
362
|
},
|
|
301
363
|
defaultOptions: []
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const BUTTON_GROUP = "EuiButtonGroup";
|
|
2
|
+
export declare const VALID_BUTTONS: Set<string>;
|
|
3
|
+
export declare const SEGMENTED_VALID_BUTTONS: Set<string>;
|
|
4
|
+
export declare const SELECTION_VALID_BUTTONS: Set<string>;
|
|
5
|
+
export declare const VALID_WRAPPERS: Set<string>;
|
|
6
|
+
//# sourceMappingURL=button_group_constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button_group_constants.d.ts","sourceRoot":"","sources":["../../../src/utils/button_group_constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAE7C,eAAO,MAAM,aAAa,aAIxB,CAAC;AAEH,eAAO,MAAM,uBAAuB,aAA0C,CAAC;AAE/E,eAAO,MAAM,uBAAuB,aAA0C,CAAC;AAE/E,eAAO,MAAM,cAAc,aAAmD,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VALID_WRAPPERS = exports.VALID_BUTTONS = exports.SELECTION_VALID_BUTTONS = exports.SEGMENTED_VALID_BUTTONS = exports.BUTTON_GROUP = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
9
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
10
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
11
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
12
|
+
* Side Public License, v 1.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const BUTTON_GROUP = exports.BUTTON_GROUP = 'EuiButtonGroup';
|
|
16
|
+
const VALID_BUTTONS = exports.VALID_BUTTONS = new Set(['EuiButton', 'EuiButtonEmpty', 'EuiButtonIcon']);
|
|
17
|
+
const SEGMENTED_VALID_BUTTONS = exports.SEGMENTED_VALID_BUTTONS = new Set(['EuiButton', 'EuiButtonIcon']);
|
|
18
|
+
const SELECTION_VALID_BUTTONS = exports.SELECTION_VALID_BUTTONS = new Set(['EuiButton', 'EuiButtonIcon']);
|
|
19
|
+
const VALID_WRAPPERS = exports.VALID_WRAPPERS = new Set(['EuiToolTip', 'EuiPopover', 'EuiCopy']);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collect_jsx_children.d.ts","sourceRoot":"","sources":["../../../src/utils/collect_jsx_children.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGxE,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,QAAQ,CAAC,IAAI,EACnB,UAAU,EAAE,QAAQ,CAAC,UAAU,GAC9B,QAAQ,CAAC,UAAU,EAAE,CAYvB"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.collectJsxChildren = collectJsxChildren;
|
|
7
|
+
var _walk_jsx_children = require("./walk_jsx_children");
|
|
8
|
+
/*
|
|
9
|
+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
|
10
|
+
* or more contributor license agreements. Licensed under the Elastic License
|
|
11
|
+
* 2.0 and the Server Side Public License, v 1; you may not use this file except
|
|
12
|
+
* in compliance with, at your election, the Elastic License 2.0 or the Server
|
|
13
|
+
* Side Public License, v 1.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function collectJsxChildren(node, sourceCode) {
|
|
17
|
+
const results = [];
|
|
18
|
+
(0, _walk_jsx_children.walkJsxChildren)(node, leaf => {
|
|
19
|
+
if (leaf.type === 'JSXElement') {
|
|
20
|
+
results.push(leaf);
|
|
21
|
+
}
|
|
22
|
+
}, {
|
|
23
|
+
sourceCode
|
|
24
|
+
});
|
|
25
|
+
return results;
|
|
26
|
+
}
|
package/lib/esm/index.js
CHANGED
|
@@ -31,6 +31,7 @@ const tooltip_no_interactive_content_1 = require("./rules/a11y/tooltip_no_intera
|
|
|
31
31
|
const tooltip_button_icon_wrap_1 = require("./rules/a11y/tooltip_button_icon_wrap");
|
|
32
32
|
const no_deprecated_icon_aliases_1 = require("./rules/no_deprecated_icon_aliases");
|
|
33
33
|
const button_group_no_invalid_children_1 = require("./rules/button_group_no_invalid_children");
|
|
34
|
+
const button_group_selection_require_id_1 = require("./rules/button_group_selection_require_id");
|
|
34
35
|
const config = {
|
|
35
36
|
rules: {
|
|
36
37
|
'accessible-interactive-element': accessible_interactive_element_1.AccessibleInteractiveElements,
|
|
@@ -57,6 +58,7 @@ const config = {
|
|
|
57
58
|
'tooltip-no-interactive-content': tooltip_no_interactive_content_1.TooltipNoInteractiveContent,
|
|
58
59
|
'tooltip-button-icon-wrap': tooltip_button_icon_wrap_1.TooltipButtonIconWrap,
|
|
59
60
|
'button-group-no-invalid-children': button_group_no_invalid_children_1.ButtonGroupNoInvalidChildren,
|
|
61
|
+
'button-group-selection-require-id': button_group_selection_require_id_1.ButtonGroupSelectionRequireId,
|
|
60
62
|
},
|
|
61
63
|
configs: {
|
|
62
64
|
recommended: {
|
|
@@ -64,6 +66,7 @@ const config = {
|
|
|
64
66
|
rules: {
|
|
65
67
|
'@elastic/eui/accessible-interactive-element': 'warn',
|
|
66
68
|
'@elastic/eui/button-group-no-invalid-children': 'error',
|
|
69
|
+
'@elastic/eui/button-group-selection-require-id': 'error',
|
|
67
70
|
'@elastic/eui/callout-announce-on-mount': 'warn',
|
|
68
71
|
'@elastic/eui/callout-prefer-props-for-content': 'warn',
|
|
69
72
|
'@elastic/eui/consistent-is-invalid-props': 'warn',
|
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,gGAA4F;AAC5F,sFAAgF;AAChF,+FAAwF;AACxF,0FAAoF;AACpF,+DAAuD;AACvD,yEAAmE;AACnE,uDAAkD;AAClD,gFAA0E;AAC1E,iFAA2E;AAC3E,iEAA2D;AAC3D,gGAA0F;AAC1F,gFAA0E;AAC1E,0EAAoE;AACpE,8FAAuF;AACvF,8EAAyE;AACzE,wFAA4F;AAC5F,oFAA+E;AAC/E,iHAAyG;AACzG,sFAAoF;AACpF,oFAAkF;AAClF,gGAA0F;AAC1F,oFAA8E;AAC9E,mFAA6E;AAC7E,+FAAwF;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,gGAA4F;AAC5F,sFAAgF;AAChF,+FAAwF;AACxF,0FAAoF;AACpF,+DAAuD;AACvD,yEAAmE;AACnE,uDAAkD;AAClD,gFAA0E;AAC1E,iFAA2E;AAC3E,iEAA2D;AAC3D,gGAA0F;AAC1F,gFAA0E;AAC1E,0EAAoE;AACpE,8FAAuF;AACvF,8EAAyE;AACzE,wFAA4F;AAC5F,oFAA+E;AAC/E,iHAAyG;AACzG,sFAAoF;AACpF,oFAAkF;AAClF,gGAA0F;AAC1F,oFAA8E;AAC9E,mFAA6E;AAC7E,+FAAwF;AACxF,iGAA0F;AAE1F,MAAM,MAAM,GAAG;IACb,KAAK,EAAE;QACL,gCAAgC,EAAE,8DAA6B;QAC/D,2BAA2B,EAAE,kDAAsB;QACnD,kCAAkC,EAAE,+DAA4B;QAChE,6BAA6B,EAAE,sDAAwB;QACvD,kBAAkB,EAAE,8BAAW;QAC/B,cAAc,EAAE,yBAAU;QAC1B,4BAA4B,EAAE,oDAAuB;QACrD,wBAAwB,EAAE,4CAAmB;QAC7C,2BAA2B,EAAE,kDAAsB;QACnD,mBAAmB,EAAE,kCAAc;QACnC,gCAAgC,EAAE,4DAA2B;QAC7D,wBAAwB,EAAE,4CAAmB;QAC7C,qBAAqB,EAAE,sCAAgB;QACvC,+BAA+B,EAAE,yDAAyB;QAC1D,uBAAuB,EAAE,2CAAmB;QAC5C,4BAA4B,EAAE,8DAAiC;QAC/D,0BAA0B,EAAE,iDAAsB;QAClD,2CAA2C,EACzC,gFAAoC;QACtC,2BAA2B,EAAE,sDAA0B;QACvD,0BAA0B,EAAE,oDAAyB;QACrD,uBAAuB,EAAE,0CAAkB;QAC3C,gCAAgC,EAAE,4DAA2B;QAC7D,0BAA0B,EAAE,gDAAqB;QACjD,kCAAkC,EAAE,+DAA4B;QAChE,mCAAmC,EAAE,iEAA6B;KACnE;IACD,OAAO,EAAE;QACP,WAAW,EAAE;YACX,OAAO,EAAE,CAAC,4BAA4B,CAAC;YACvC,KAAK,EAAE;gBACL,6CAA6C,EAAE,MAAM;gBACrD,+CAA+C,EAAE,OAAO;gBACxD,gDAAgD,EAAE,OAAO;gBACzD,wCAAwC,EAAE,MAAM;gBAChD,+CAA+C,EAAE,MAAM;gBACvD,0CAA0C,EAAE,MAAM;gBAClD,+BAA+B,EAAE,MAAM;gBACvC,2BAA2B,EAAE,MAAM;gBACnC,yCAAyC,EAAE,MAAM;gBACjD,qCAAqC,EAAE,MAAM;gBAC7C,wCAAwC,EAAE,MAAM;gBAChD,gCAAgC,EAAE,MAAM;gBACxC,6CAA6C,EAAE,MAAM;gBACrD,qCAAqC,EAAE,MAAM;gBAC7C,kCAAkC,EAAE,MAAM;gBAC1C,4CAA4C,EAAE,MAAM;gBACpD,oCAAoC,EAAE,MAAM;gBAC5C,yCAAyC,EAAE,MAAM;gBACjD,uCAAuC,EAAE,MAAM;gBAC/C,wDAAwD,EAAE,MAAM;gBAChE,wCAAwC,EAAE,MAAM;gBAChD,uCAAuC,EAAE,MAAM;gBAC/C,oCAAoC,EAAE,MAAM;gBAC5C,6CAA6C,EAAE,MAAM;gBACrD,uCAAuC,EAAE,MAAM;aAChD;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,OAAO,GAAG,MAAM,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type TSESLint } from '@typescript-eslint/utils';
|
|
2
|
-
export declare const ButtonGroupNoInvalidChildren: TSESLint.RuleModule<"invalidUnresolvableWrapperChild" | "invalidWrapperChild" | "invalidChild" | "invalidUnresolvableChild" | "invalidPopoverButton" | "invalidUnresolvablePopoverButton", [], unknown, TSESLint.RuleListener>;
|
|
2
|
+
export declare const ButtonGroupNoInvalidChildren: TSESLint.RuleModule<"invalidUnresolvableWrapperChild" | "invalidWrapperChild" | "invalidChild" | "invalidUnresolvableChild" | "invalidPopoverButton" | "invalidUnresolvablePopoverButton" | "invalidMixedTypes", [], unknown, TSESLint.RuleListener>;
|