@hero-design/snowflake-guard 1.0.13 → 1.0.14
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.
|
@@ -22,6 +22,7 @@ declare const RULESET_MAP: {
|
|
|
22
22
|
'Checkbox.Group': string[];
|
|
23
23
|
'Checkbox.Button': string[];
|
|
24
24
|
'Checkbox.ButtonGroup': string[];
|
|
25
|
+
Chip: string[];
|
|
25
26
|
Collapse: string[];
|
|
26
27
|
Comment: string[];
|
|
27
28
|
'Comment.Editor': string[];
|
|
@@ -38,6 +39,7 @@ declare const RULESET_MAP: {
|
|
|
38
39
|
'DatePicker.Fortnightly': string[];
|
|
39
40
|
'DatePicker.SingleMonth': string[];
|
|
40
41
|
'DatePicker.SingleYear': string[];
|
|
42
|
+
'DatePicker.FixedRange': string[];
|
|
41
43
|
Divider: string[];
|
|
42
44
|
Dropdown: string[];
|
|
43
45
|
Empty: string[];
|
|
@@ -128,6 +130,7 @@ declare const SX_RULESET_MAP: {
|
|
|
128
130
|
'Checkbox.Group': string[];
|
|
129
131
|
'Checkbox.Button': string[];
|
|
130
132
|
'Checkbox.ButtonGroup': string[];
|
|
133
|
+
Chip: string[];
|
|
131
134
|
Collapse: string[];
|
|
132
135
|
Comment: string[];
|
|
133
136
|
'Comment.Editor': string[];
|
|
@@ -144,6 +147,7 @@ declare const SX_RULESET_MAP: {
|
|
|
144
147
|
'DatePicker.Fortnightly': string[];
|
|
145
148
|
'DatePicker.SingleMonth': string[];
|
|
146
149
|
'DatePicker.SingleYear': string[];
|
|
150
|
+
'DatePicker.FixedRange': string[];
|
|
147
151
|
Divider: string[];
|
|
148
152
|
Dropdown: string[];
|
|
149
153
|
Empty: string[];
|
|
@@ -210,7 +214,7 @@ declare const SX_RULESET_MAP: {
|
|
|
210
214
|
'Typography.Text': string[];
|
|
211
215
|
Widget: string[];
|
|
212
216
|
};
|
|
213
|
-
declare const HD_COMPONENTS: readonly ["Alert", "Badge", "Banner", "Breadcrumb", "Button", "Card", "Carousel", "Chart", "Checkbox", "Collapse", "Comment", "ContextPanel", "DatePicker", "Divider", "Dropdown", "Empty", "File", "Filters", "Form", "Grid", "Icon", "InPageNavigation", "Input", "MediaQuery", "Menu", "Modal", "Notification", "PageHeader", "Pagination", "Portal", "Portlet", "Progress", "Radio", "Rate", "Result", "Select", "SelectButton", "SideBar", "Slider", "Spinner", "Statistic", "Steps", "Switch", "Table", "Tabs", "Tag", "TagInput", "TimePicker", "Timeline", "Tooltip", "Typography", "Widget"];
|
|
217
|
+
declare const HD_COMPONENTS: readonly ["Alert", "Badge", "Banner", "Breadcrumb", "Button", "Card", "Carousel", "Chart", "Checkbox", "Chip", "Collapse", "Comment", "ContextPanel", "DatePicker", "Divider", "Dropdown", "Empty", "File", "Filters", "Form", "Grid", "Icon", "InPageNavigation", "Input", "MediaQuery", "Menu", "Modal", "Notification", "PageHeader", "Pagination", "Portal", "Portlet", "Progress", "Radio", "Rate", "Result", "Select", "SelectButton", "SideBar", "Slider", "Spinner", "Statistic", "Steps", "Switch", "Table", "Tabs", "Tag", "TagInput", "TimePicker", "Timeline", "Tooltip", "Typography", "Widget"];
|
|
214
218
|
declare const APPROVED_COMMENT = "@snowflake-guard/snowflake-approved-by-andromeda";
|
|
215
219
|
declare const APPROVED_CLASSNAME_COMMENT = "@snowflake-guard/none-css-classname";
|
|
216
220
|
export { HD_COMPONENTS, RULESET_MAP, SX_RULESET_MAP, APPROVED_COMMENT, APPROVED_CLASSNAME_COMMENT, };
|
|
@@ -177,6 +177,12 @@ const RULESET_MAP = {
|
|
|
177
177
|
...SHADOW_ATTRS,
|
|
178
178
|
...HEIGHT_ATTRS,
|
|
179
179
|
],
|
|
180
|
+
Chip: [
|
|
181
|
+
...COMMON_PROHIBITED_ATTRS,
|
|
182
|
+
...SHADOW_ATTRS,
|
|
183
|
+
...WIDTH_ATTRS,
|
|
184
|
+
...HEIGHT_ATTRS,
|
|
185
|
+
],
|
|
180
186
|
Collapse: [...COMMON_PROHIBITED_ATTRS, ...SHADOW_ATTRS, ...HEIGHT_ATTRS],
|
|
181
187
|
Comment: [...COMMON_PROHIBITED_ATTRS, ...SHADOW_ATTRS, ...HEIGHT_ATTRS],
|
|
182
188
|
'Comment.Editor': [
|
|
@@ -255,6 +261,11 @@ const RULESET_MAP = {
|
|
|
255
261
|
...SHADOW_ATTRS,
|
|
256
262
|
...HEIGHT_ATTRS,
|
|
257
263
|
],
|
|
264
|
+
'DatePicker.FixedRange': [
|
|
265
|
+
...COMMON_PROHIBITED_ATTRS,
|
|
266
|
+
...SHADOW_ATTRS,
|
|
267
|
+
...HEIGHT_ATTRS,
|
|
268
|
+
],
|
|
258
269
|
Divider: [
|
|
259
270
|
...COMMON_PROHIBITED_ATTRS,
|
|
260
271
|
...SHADOW_ATTRS,
|
|
@@ -552,12 +563,7 @@ const RULESET_MAP = {
|
|
|
552
563
|
],
|
|
553
564
|
TimePicker: [...COMMON_PROHIBITED_ATTRS, ...SHADOW_ATTRS, ...HEIGHT_ATTRS],
|
|
554
565
|
Timeline: [...COMMON_PROHIBITED_ATTRS, ...SHADOW_ATTRS, ...HEIGHT_ATTRS],
|
|
555
|
-
Tooltip: [
|
|
556
|
-
...COMMON_PROHIBITED_ATTRS,
|
|
557
|
-
...SHADOW_ATTRS,
|
|
558
|
-
...WIDTH_ATTRS,
|
|
559
|
-
...HEIGHT_ATTRS,
|
|
560
|
-
],
|
|
566
|
+
Tooltip: [...COMMON_PROHIBITED_ATTRS, ...SHADOW_ATTRS],
|
|
561
567
|
'Typography.Title': [
|
|
562
568
|
...COMMON_PROHIBITED_ATTRS,
|
|
563
569
|
...SHADOW_ATTRS,
|
|
@@ -605,7 +611,7 @@ const SX_RULESET_MAP = Object.assign(Object.assign({}, RULESET_MAP), { Alert: [.
|
|
|
605
611
|
], 'Checkbox.ButtonGroup': [
|
|
606
612
|
...RULESET_MAP['Checkbox.ButtonGroup'],
|
|
607
613
|
...COMMON_SX_PROHIBITED_ATTRS,
|
|
608
|
-
], Collapse: [...RULESET_MAP.Collapse, ...COMMON_SX_PROHIBITED_ATTRS], Comment: [...RULESET_MAP.Comment, ...COMMON_SX_PROHIBITED_ATTRS], 'Comment.Editor': [
|
|
614
|
+
], Chip: [...RULESET_MAP.Chip, ...COMMON_SX_PROHIBITED_ATTRS], Collapse: [...RULESET_MAP.Collapse, ...COMMON_SX_PROHIBITED_ATTRS], Comment: [...RULESET_MAP.Comment, ...COMMON_SX_PROHIBITED_ATTRS], 'Comment.Editor': [
|
|
609
615
|
...RULESET_MAP['Comment.Editor'],
|
|
610
616
|
...COMMON_SX_PROHIBITED_ATTRS,
|
|
611
617
|
], ContextPanel: [
|
|
@@ -649,6 +655,9 @@ const SX_RULESET_MAP = Object.assign(Object.assign({}, RULESET_MAP), { Alert: [.
|
|
|
649
655
|
], 'DatePicker.SingleYear': [
|
|
650
656
|
...RULESET_MAP['DatePicker.SingleYear'],
|
|
651
657
|
...COMMON_SX_PROHIBITED_ATTRS,
|
|
658
|
+
], 'DatePicker.FixedRange': [
|
|
659
|
+
...RULESET_MAP['DatePicker.FixedRange'],
|
|
660
|
+
...COMMON_SX_PROHIBITED_ATTRS,
|
|
652
661
|
], Divider: [
|
|
653
662
|
...RULESET_MAP.Divider,
|
|
654
663
|
...COMMON_SX_PROHIBITED_ATTRS,
|
|
@@ -799,6 +808,7 @@ const HD_COMPONENTS = [
|
|
|
799
808
|
'Carousel',
|
|
800
809
|
'Chart',
|
|
801
810
|
'Checkbox',
|
|
811
|
+
'Chip',
|
|
802
812
|
'Collapse',
|
|
803
813
|
'Comment',
|
|
804
814
|
'ContextPanel',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as recast from 'recast';
|
|
2
2
|
import type { ComponentName } from './types';
|
|
3
3
|
declare const reportCustomProperties: (ast: recast.types.ASTNode, componentList: {
|
|
4
|
-
[k: string]: "Alert" | "Badge" | "Banner" | "Breadcrumb" | "Button" | "Card" | "Carousel" | "Chart" | "Checkbox" | "Collapse" | "Comment" | "ContextPanel" | "DatePicker" | "Divider" | "Dropdown" | "Empty" | "File" | "Filters" | "Form" | "Grid" | "Icon" | "InPageNavigation" | "Input" | "MediaQuery" | "Menu" | "Modal" | "Notification" | "PageHeader" | "Pagination" | "Portal" | "Portlet" | "Progress" | "Radio" | "Rate" | "Result" | "Select" | "SelectButton" | "SideBar" | "Slider" | "Spinner" | "Statistic" | "Steps" | "Switch" | "Table" | "Tabs" | "Tag" | "TagInput" | "TimePicker" | "Timeline" | "Tooltip" | "Typography" | "Widget";
|
|
4
|
+
[k: string]: "Alert" | "Badge" | "Banner" | "Breadcrumb" | "Button" | "Card" | "Carousel" | "Chart" | "Checkbox" | "Chip" | "Collapse" | "Comment" | "ContextPanel" | "DatePicker" | "Divider" | "Dropdown" | "Empty" | "File" | "Filters" | "Form" | "Grid" | "Icon" | "InPageNavigation" | "Input" | "MediaQuery" | "Menu" | "Modal" | "Notification" | "PageHeader" | "Pagination" | "Portal" | "Portlet" | "Progress" | "Radio" | "Rate" | "Result" | "Select" | "SelectButton" | "SideBar" | "Slider" | "Spinner" | "Statistic" | "Steps" | "Switch" | "Table" | "Tabs" | "Tag" | "TagInput" | "TimePicker" | "Timeline" | "Tooltip" | "Typography" | "Widget";
|
|
5
5
|
}) => {
|
|
6
6
|
className: number[];
|
|
7
7
|
style: number[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as recast from 'recast';
|
|
2
2
|
import type { ComponentName } from './types';
|
|
3
3
|
declare const reportStyledComponents: (ast: recast.types.ASTNode, componentList: {
|
|
4
|
-
[k: string]: "Alert" | "Badge" | "Banner" | "Breadcrumb" | "Button" | "Card" | "Carousel" | "Chart" | "Checkbox" | "Collapse" | "Comment" | "ContextPanel" | "DatePicker" | "Divider" | "Dropdown" | "Empty" | "File" | "Filters" | "Form" | "Grid" | "Icon" | "InPageNavigation" | "Input" | "MediaQuery" | "Menu" | "Modal" | "Notification" | "PageHeader" | "Pagination" | "Portal" | "Portlet" | "Progress" | "Radio" | "Rate" | "Result" | "Select" | "SelectButton" | "SideBar" | "Slider" | "Spinner" | "Statistic" | "Steps" | "Switch" | "Table" | "Tabs" | "Tag" | "TagInput" | "TimePicker" | "Timeline" | "Tooltip" | "Typography" | "Widget";
|
|
4
|
+
[k: string]: "Alert" | "Badge" | "Banner" | "Breadcrumb" | "Button" | "Card" | "Carousel" | "Chart" | "Checkbox" | "Chip" | "Collapse" | "Comment" | "ContextPanel" | "DatePicker" | "Divider" | "Dropdown" | "Empty" | "File" | "Filters" | "Form" | "Grid" | "Icon" | "InPageNavigation" | "Input" | "MediaQuery" | "Menu" | "Modal" | "Notification" | "PageHeader" | "Pagination" | "Portal" | "Portlet" | "Progress" | "Radio" | "Rate" | "Result" | "Select" | "SelectButton" | "SideBar" | "Slider" | "Spinner" | "Statistic" | "Steps" | "Switch" | "Table" | "Tabs" | "Tag" | "TagInput" | "TimePicker" | "Timeline" | "Tooltip" | "Typography" | "Widget";
|
|
5
5
|
}, styledAliasName: string) => number[];
|
|
6
6
|
export default reportStyledComponents;
|