@wishket/design-system 3.4.1 → 3.5.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/dist/Components/Base/Typography/Typography.d.ts +0 -9
- package/dist/Components/Base/Typography/Typography.js +2 -2
- package/dist/Components/DataDisplays/ImageLabel/ImageLabel.js +1 -1
- package/dist/Components/Feedbacks/DialogBox/DialogBox.js +6 -6
- package/dist/Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.js +1 -1
- package/dist/Components/Feedbacks/Tooltip/Tooltip.js +3 -3
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.d.ts +2 -2
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.js +22 -7
- package/dist/Components/Inputs/AutoCompleteList/AutoCompleteList.types.d.ts +17 -0
- package/dist/Components/Inputs/Autocomplete/Autocomplete.d.ts +3 -1
- package/dist/Components/Inputs/Autocomplete/Autocomplete.js +28 -5
- package/dist/Components/Inputs/Autocomplete/Autocomplete.types.d.ts +18 -0
- package/dist/Components/Inputs/Checkbox/Checkbox.js +4 -4
- package/dist/Components/Inputs/Checkbox/Checkbox.parts.js +3 -3
- package/dist/Components/Inputs/Checkbox/Checkbox.types.d.ts +0 -1
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.js +4 -4
- package/dist/Components/Inputs/CheckboxCard/CheckboxCard.parts.js +4 -4
- package/dist/Components/Inputs/FileUploader/FileUploader.js +4 -4
- package/dist/Components/Inputs/FilterList/FilterList.js +5 -6
- package/dist/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +4 -4
- package/dist/Components/Inputs/Input/Input.js +1 -1
- package/dist/Components/Inputs/Input/PasswordInput.js +3 -3
- package/dist/Components/Inputs/InputChip/InputChip.d.ts +16 -3
- package/dist/Components/Inputs/InputChip/InputChip.js +13 -4
- package/dist/Components/Inputs/Radio/Radio.js +5 -5
- package/dist/Components/Inputs/RadioCard/RadioCard.js +5 -5
- package/dist/Components/Inputs/RadioCard/RadioCard.parts.js +4 -4
- package/dist/Components/Inputs/RangeSlider/RangeSlider.js +2 -2
- package/dist/Components/Inputs/SearchField/SearchField.js +5 -5
- package/dist/Components/Inputs/TextField/TextField.js +1 -1
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.d.ts +24 -3
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.js +10 -54
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.d.ts +9 -0
- package/dist/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.js +1 -1
- package/dist/Components/Inputs/TextFieldTrigger/TextFieldTrigger.d.ts +73 -0
- package/dist/Components/Inputs/TextFieldTrigger/TextFieldTrigger.js +62 -0
- package/dist/Components/Inputs/TextFieldTrigger/index.d.ts +2 -0
- package/dist/Components/Inputs/Textarea/Textarea.js +4 -4
- package/dist/Components/Inputs/index.d.ts +1 -0
- package/dist/Components/Navigations/Drawer/Drawer.js +3 -3
- package/dist/Components/Navigations/Menu/MenuBase.js +3 -3
- package/dist/Components/Utils/BackDrop/BackDrop.js +1 -1
- package/dist/Components/Utils/BackDropLiftContainer/BackDropLiftContainer.js +2 -2
- package/dist/Components/Utils/BottomModalContainer/BottomModalContainer.js +1 -1
- package/dist/Components/Utils/FullModalContainer/FullModalContainer.js +1 -1
- package/dist/Components/Utils/Modal/Modal.js +3 -3
- package/dist/Components/Utils/ModalContainer/ModalContainer.js +2 -2
- package/dist/Components/Wrappers/WithBadge/WithBadge.js +2 -2
- package/dist/Components/Wrappers/WithSnackBar/WithSnackBar.js +3 -3
- package/dist/cjs/Components/Base/Typography/Typography.js +1 -1
- package/dist/cjs/Components/DataDisplays/ImageLabel/ImageLabel.js +3 -3
- package/dist/cjs/Components/Feedbacks/DialogBox/DialogBox.js +6 -6
- package/dist/cjs/Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.js +1 -1
- package/dist/cjs/Components/Feedbacks/Tooltip/Tooltip.js +3 -3
- package/dist/cjs/Components/Inputs/AutoCompleteList/AutoCompleteList.js +22 -7
- package/dist/cjs/Components/Inputs/Autocomplete/Autocomplete.js +25 -4
- package/dist/cjs/Components/Inputs/Checkbox/Checkbox.js +4 -4
- package/dist/cjs/Components/Inputs/Checkbox/Checkbox.parts.js +5 -5
- package/dist/cjs/Components/Inputs/CheckboxCard/CheckboxCard.js +4 -4
- package/dist/cjs/Components/Inputs/CheckboxCard/CheckboxCard.parts.js +4 -4
- package/dist/cjs/Components/Inputs/FileUploader/FileUploader.js +6 -6
- package/dist/cjs/Components/Inputs/FilterList/FilterList.js +2 -3
- package/dist/cjs/Components/Inputs/IconButtonDropdown/IconButtonDropdown.js +3 -3
- package/dist/cjs/Components/Inputs/Input/Input.js +2 -2
- package/dist/cjs/Components/Inputs/Input/PasswordInput.js +2 -2
- package/dist/cjs/Components/Inputs/InputChip/InputChip.js +36 -2
- package/dist/cjs/Components/Inputs/Radio/Radio.js +6 -6
- package/dist/cjs/Components/Inputs/RadioCard/RadioCard.js +4 -4
- package/dist/cjs/Components/Inputs/RadioCard/RadioCard.parts.js +4 -4
- package/dist/cjs/Components/Inputs/RangeSlider/RangeSlider.js +3 -3
- package/dist/cjs/Components/Inputs/SearchField/SearchField.js +3 -3
- package/dist/cjs/Components/Inputs/TextField/TextField.js +2 -2
- package/dist/cjs/Components/Inputs/TextFieldDropdown/TextFieldDropdown.js +10 -8
- package/dist/cjs/Components/Inputs/TextFieldDropdown/TextFieldDropdown.parts.js +1 -1
- package/dist/cjs/Components/Inputs/TextFieldTrigger/TextFieldTrigger.js +62 -0
- package/dist/cjs/Components/Inputs/Textarea/Textarea.js +5 -5
- package/dist/cjs/Components/Navigations/Drawer/Drawer.js +3 -3
- package/dist/cjs/Components/Navigations/Menu/MenuBase.js +3 -3
- package/dist/cjs/Components/Utils/BackDrop/BackDrop.js +1 -1
- package/dist/cjs/Components/Utils/BackDropLiftContainer/BackDropLiftContainer.js +2 -2
- package/dist/cjs/Components/Utils/BottomModalContainer/BottomModalContainer.js +1 -1
- package/dist/cjs/Components/Utils/FullModalContainer/FullModalContainer.js +1 -1
- package/dist/cjs/Components/Utils/Modal/Modal.js +2 -2
- package/dist/cjs/Components/Utils/ModalContainer/ModalContainer.js +2 -2
- package/dist/cjs/Components/Wrappers/WithBadge/WithBadge.js +1 -1
- package/dist/cjs/Components/Wrappers/WithSnackBar/WithSnackBar.js +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -2
- package/scripts/codemods/add-as-link.ts +9 -5
- package/scripts/codemods/menu-split.ts +25 -11
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{Avatar}from"./Components/DataDisplays/Avatar/Avatar.js";export{CountBadge}from"./Components/DataDisplays/CountBadge/CountBadge.js";export{ImageLabel}from"./Components/DataDisplays/ImageLabel/ImageLabel.js";export{Label}from"./Components/DataDisplays/Label/Label.js";export{NewBadge}from"./Components/DataDisplays/NewBadge/NewBadge.js";export{ProductIcon}from"./Components/DataDisplays/ProductIcon/ProductIcon.js";export{ServiceLogo}from"./Components/DataDisplays/ServiceLogo/ServiceLogo.js";export{SkillLabel}from"./Components/DataDisplays/SkillLabel/SkillLabel.js";export{SystemIcon}from"./Components/DataDisplays/SystemIcon/SystemIcon.js";export{LargeSystemIconNames,MediumSystemIconNames,SmallSystemIconNames,SocialSystemIconNames,SystemIconNames}from"./Components/DataDisplays/SystemIcon/SystemIcon.constants.js";export{Divider}from"./Components/DataDisplays/Divider/Divider.js";export{ProgressIndicator}from"./Components/DataDisplays/ProgressIndicator/ProgressIndicator.js";export{default as Li}from"./Components/DataDisplays/Li/Li.js";export{Accordion}from"./Components/DataDisplays/Accordion/Accordion.js";export{MessageBox}from"./Components/Feedbacks/MessageBox/MessageBox.js";export{SnackBar}from"./Components/Feedbacks/SnackBar/SnackBar.js";export{messageType}from"./Components/Feedbacks/SnackBar/SnackBar.types.js";export{MessageBar}from"./Components/Feedbacks/MessageBar/MessageBar.js";export{Dialog}from"./Components/Feedbacks/Dialog/Dialog.js";export{DialogBox}from"./Components/Feedbacks/DialogBox/DialogBox.js";export{LoadingIndicator}from"./Components/Feedbacks/LoadingIndicator/LoadingIndicator.js";export{Tooltip}from"./Components/Feedbacks/Tooltip/Tooltip.js";export{RichTooltip}from"./Components/Feedbacks/Tooltip/RichTooltip/RichTooltip.js";export{PlainTooltip}from"./Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.js";export{GlobalLoadingIndicator}from"./Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.js";export{Autocomplete}from"./Components/Inputs/Autocomplete/Autocomplete.js";export{Button}from"./Components/Inputs/Button/Button.js";export{Calendar}from"./Components/Inputs/Calendar/Calendar.js";export{Checkbox}from"./Components/Inputs/Checkbox/Checkbox.js";export{CheckboxCard}from"./Components/Inputs/CheckboxCard/CheckboxCard.js";export{CheckboxList}from"./Components/Inputs/CheckboxList/CheckboxList.js";export{CheckboxListItem}from"./Components/Inputs/CheckboxListItem/CheckboxListItem.js";export{ChoiceChip}from"./Components/Inputs/ChoiceChip/ChoiceChip.js";export{IconButton}from"./Components/Inputs/IconButton/IconButton.js";export{InputChip}from"./Components/Inputs/InputChip/InputChip.js";export{RangeSlider}from"./Components/Inputs/RangeSlider/RangeSlider.js";export{Radio}from"./Components/Inputs/Radio/Radio.js";export{RadioCard}from"./Components/Inputs/RadioCard/RadioCard.js";export{RadioList}from"./Components/Inputs/RadioList/RadioList.js";export{RadioGroup}from"./Components/Inputs/RadioGroup/RadioGroup.js";export{RadioListItem}from"./Components/Inputs/RadioListItem/RadioListItem.js";export{SearchField}from"./Components/Inputs/SearchField/SearchField.js";export{SegmentedControl}from"./Components/Inputs/SegmentedControl/SegmentedControl.js";export{Switch}from"./Components/Inputs/Switch/Switch.js";export{Textarea}from"./Components/Inputs/Textarea/Textarea.js";export{TextButton}from"./Components/Inputs/TextButton/TextButton.js";export{TextField}from"./Components/Inputs/TextField/TextField.js";export{List}from"./Components/Inputs/List/List.js";export{TextFieldDropdown}from"./Components/Inputs/TextFieldDropdown/TextFieldDropdown.js";export{CommentArea}from"./Components/Inputs/CommentArea/CommentArea.js";export{IconButtonDropdown}from"./Components/Inputs/IconButtonDropdown/IconButtonDropdown.js";export{MultiColumnList}from"./Components/Inputs/MultiColumnList/MultiColumnList.js";export{FilterChip}from"./Components/Inputs/FilterChip/FilterChip.js";export{TextButtonDropdown}from"./Components/Inputs/TextButtonDropdown/TextButtonDropdown.js";export{AutoCompleteList}from"./Components/Inputs/AutoCompleteList/AutoCompleteList.js";export{FilterList}from"./Components/Inputs/FilterList/FilterList.js";export{Input}from"./Components/Inputs/Input/Input.js";export{PasswordInput}from"./Components/Inputs/Input/PasswordInput.js";export{LabelInput}from"./Components/Inputs/Input/LabelInput.js";export{InputTypeSelector}from"./Components/Inputs/Input/InputTypeSelector.js";export{SupportTextContainer}from"./Components/Inputs/SupportTextContainer/SupportTextContainer.js";export{TextFieldContainer}from"./Components/Inputs/TextFieldContainer/TextFieldContainer.js";export{FileUploader}from"./Components/Inputs/FileUploader/FileUploader.js";export{Typography}from"./Components/Base/Typography/Typography.js";export{Box}from"./Components/Base/Layouts/Box/Box.js";export{GridLayout}from"./Components/Base/Layouts/GridLayout/GridLayout.js";export{Column}from"./Components/Base/Layouts/Column/Column.js";export{FullBleed}from"./Components/Base/Layouts/FullBleed/FullBleed.js";export{Drawer}from"./Components/Navigations/Drawer/Drawer.js";export{GNBList}from"./Components/Navigations/GNBList/GNBList.js";export{LeftArrow,PaginationNumber,RightArrow}from"./Components/Navigations/Pagination/Pagination.parts.js";export{Pagination}from"./Components/Navigations/Pagination/Pagination.js";export{TableOfContents}from"./Components/Navigations/TableOfContents/TableOfContents.js";export{TextTab}from"./Components/Navigations/TextTab/TextTab.js";export{BoxTab}from"./Components/Navigations/BoxTab/BoxTab.js";export{MenuLink}from"./Components/Navigations/Menu/MenuLink.js";export{MenuButton}from"./Components/Navigations/Menu/MenuButton.js";export{TextLink}from"./Components/Navigations/TextLink/TextLink.js";export{BackDrop}from"./Components/Utils/BackDrop/BackDrop.js";export{BackDropLiftContainer}from"./Components/Utils/BackDropLiftContainer/BackDropLiftContainer.js";export{BottomModalContainer}from"./Components/Utils/BottomModalContainer/BottomModalContainer.js";export{FullModalContainer}from"./Components/Utils/FullModalContainer/FullModalContainer.js";export{Modal}from"./Components/Utils/Modal/Modal.js";export{ModalContainer}from"./Components/Utils/ModalContainer/ModalContainer.js";export{Portal}from"./Components/Utils/Portal/Portal.js";export{WithBadge}from"./Components/Wrappers/WithBadge/WithBadge.js";export{WithSnackBar}from"./Components/Wrappers/WithSnackBar/WithSnackBar.js";
|
|
1
|
+
export{Avatar}from"./Components/DataDisplays/Avatar/Avatar.js";export{CountBadge}from"./Components/DataDisplays/CountBadge/CountBadge.js";export{ImageLabel}from"./Components/DataDisplays/ImageLabel/ImageLabel.js";export{Label}from"./Components/DataDisplays/Label/Label.js";export{NewBadge}from"./Components/DataDisplays/NewBadge/NewBadge.js";export{ProductIcon}from"./Components/DataDisplays/ProductIcon/ProductIcon.js";export{ServiceLogo}from"./Components/DataDisplays/ServiceLogo/ServiceLogo.js";export{SkillLabel}from"./Components/DataDisplays/SkillLabel/SkillLabel.js";export{SystemIcon}from"./Components/DataDisplays/SystemIcon/SystemIcon.js";export{LargeSystemIconNames,MediumSystemIconNames,SmallSystemIconNames,SocialSystemIconNames,SystemIconNames}from"./Components/DataDisplays/SystemIcon/SystemIcon.constants.js";export{Divider}from"./Components/DataDisplays/Divider/Divider.js";export{ProgressIndicator}from"./Components/DataDisplays/ProgressIndicator/ProgressIndicator.js";export{default as Li}from"./Components/DataDisplays/Li/Li.js";export{Accordion}from"./Components/DataDisplays/Accordion/Accordion.js";export{MessageBox}from"./Components/Feedbacks/MessageBox/MessageBox.js";export{SnackBar}from"./Components/Feedbacks/SnackBar/SnackBar.js";export{messageType}from"./Components/Feedbacks/SnackBar/SnackBar.types.js";export{MessageBar}from"./Components/Feedbacks/MessageBar/MessageBar.js";export{Dialog}from"./Components/Feedbacks/Dialog/Dialog.js";export{DialogBox}from"./Components/Feedbacks/DialogBox/DialogBox.js";export{LoadingIndicator}from"./Components/Feedbacks/LoadingIndicator/LoadingIndicator.js";export{Tooltip}from"./Components/Feedbacks/Tooltip/Tooltip.js";export{RichTooltip}from"./Components/Feedbacks/Tooltip/RichTooltip/RichTooltip.js";export{PlainTooltip}from"./Components/Feedbacks/Tooltip/PlainTooltip/PlainTooltip.js";export{GlobalLoadingIndicator}from"./Components/Feedbacks/GlobalLoadingIndicator/GlobalLoadingIndicator.js";export{Autocomplete}from"./Components/Inputs/Autocomplete/Autocomplete.js";export{Button}from"./Components/Inputs/Button/Button.js";export{Calendar}from"./Components/Inputs/Calendar/Calendar.js";export{Checkbox}from"./Components/Inputs/Checkbox/Checkbox.js";export{CheckboxCard}from"./Components/Inputs/CheckboxCard/CheckboxCard.js";export{CheckboxList}from"./Components/Inputs/CheckboxList/CheckboxList.js";export{CheckboxListItem}from"./Components/Inputs/CheckboxListItem/CheckboxListItem.js";export{ChoiceChip}from"./Components/Inputs/ChoiceChip/ChoiceChip.js";export{IconButton}from"./Components/Inputs/IconButton/IconButton.js";export{InputChip}from"./Components/Inputs/InputChip/InputChip.js";export{RangeSlider}from"./Components/Inputs/RangeSlider/RangeSlider.js";export{Radio}from"./Components/Inputs/Radio/Radio.js";export{RadioCard}from"./Components/Inputs/RadioCard/RadioCard.js";export{RadioList}from"./Components/Inputs/RadioList/RadioList.js";export{RadioGroup}from"./Components/Inputs/RadioGroup/RadioGroup.js";export{RadioListItem}from"./Components/Inputs/RadioListItem/RadioListItem.js";export{SearchField}from"./Components/Inputs/SearchField/SearchField.js";export{SegmentedControl}from"./Components/Inputs/SegmentedControl/SegmentedControl.js";export{Switch}from"./Components/Inputs/Switch/Switch.js";export{Textarea}from"./Components/Inputs/Textarea/Textarea.js";export{TextButton}from"./Components/Inputs/TextButton/TextButton.js";export{TextField}from"./Components/Inputs/TextField/TextField.js";export{List}from"./Components/Inputs/List/List.js";export{TextFieldDropdown}from"./Components/Inputs/TextFieldDropdown/TextFieldDropdown.js";export{TextFieldTrigger}from"./Components/Inputs/TextFieldTrigger/TextFieldTrigger.js";export{CommentArea}from"./Components/Inputs/CommentArea/CommentArea.js";export{IconButtonDropdown}from"./Components/Inputs/IconButtonDropdown/IconButtonDropdown.js";export{MultiColumnList}from"./Components/Inputs/MultiColumnList/MultiColumnList.js";export{FilterChip}from"./Components/Inputs/FilterChip/FilterChip.js";export{TextButtonDropdown}from"./Components/Inputs/TextButtonDropdown/TextButtonDropdown.js";export{AutoCompleteList}from"./Components/Inputs/AutoCompleteList/AutoCompleteList.js";export{FilterList}from"./Components/Inputs/FilterList/FilterList.js";export{Input}from"./Components/Inputs/Input/Input.js";export{PasswordInput}from"./Components/Inputs/Input/PasswordInput.js";export{LabelInput}from"./Components/Inputs/Input/LabelInput.js";export{InputTypeSelector}from"./Components/Inputs/Input/InputTypeSelector.js";export{SupportTextContainer}from"./Components/Inputs/SupportTextContainer/SupportTextContainer.js";export{TextFieldContainer}from"./Components/Inputs/TextFieldContainer/TextFieldContainer.js";export{FileUploader}from"./Components/Inputs/FileUploader/FileUploader.js";export{Typography}from"./Components/Base/Typography/Typography.js";export{Box}from"./Components/Base/Layouts/Box/Box.js";export{GridLayout}from"./Components/Base/Layouts/GridLayout/GridLayout.js";export{Column}from"./Components/Base/Layouts/Column/Column.js";export{FullBleed}from"./Components/Base/Layouts/FullBleed/FullBleed.js";export{Drawer}from"./Components/Navigations/Drawer/Drawer.js";export{GNBList}from"./Components/Navigations/GNBList/GNBList.js";export{LeftArrow,PaginationNumber,RightArrow}from"./Components/Navigations/Pagination/Pagination.parts.js";export{Pagination}from"./Components/Navigations/Pagination/Pagination.js";export{TableOfContents}from"./Components/Navigations/TableOfContents/TableOfContents.js";export{TextTab}from"./Components/Navigations/TextTab/TextTab.js";export{BoxTab}from"./Components/Navigations/BoxTab/BoxTab.js";export{MenuLink}from"./Components/Navigations/Menu/MenuLink.js";export{MenuButton}from"./Components/Navigations/Menu/MenuButton.js";export{TextLink}from"./Components/Navigations/TextLink/TextLink.js";export{BackDrop}from"./Components/Utils/BackDrop/BackDrop.js";export{BackDropLiftContainer}from"./Components/Utils/BackDropLiftContainer/BackDropLiftContainer.js";export{BottomModalContainer}from"./Components/Utils/BottomModalContainer/BottomModalContainer.js";export{FullModalContainer}from"./Components/Utils/FullModalContainer/FullModalContainer.js";export{Modal}from"./Components/Utils/Modal/Modal.js";export{ModalContainer}from"./Components/Utils/ModalContainer/ModalContainer.js";export{Portal}from"./Components/Utils/Portal/Portal.js";export{WithBadge}from"./Components/Wrappers/WithBadge/WithBadge.js";export{WithSnackBar}from"./Components/Wrappers/WithSnackBar/WithSnackBar.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wishket/design-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Wishket Design System",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"build": "rm -rf dist && yarn build:dts && rollup -c",
|
|
38
38
|
"start": "next start",
|
|
39
39
|
"build:dts": "tsc --project tsconfig.rollup.json --emitDeclarationOnly",
|
|
40
|
-
"lint": "eslint './**/*.{ts,tsx,js,jsx}' --ignore-path .eslintignore
|
|
40
|
+
"lint": "eslint './**/*.{ts,tsx,js,jsx}' --ignore-path .eslintignore",
|
|
41
41
|
"test": "jest --ci --runInBand --coverage --watchAll=false --passWithNoTests --testMatch=\"**/*.spec.@(ts|tsx)\"",
|
|
42
42
|
"test:codemods": "node scripts/codemods/__tests__/run-fixtures.cjs",
|
|
43
43
|
"storybook": "storybook dev -p 6006",
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
"eslint-plugin-jest": "^29.1.0",
|
|
95
95
|
"eslint-plugin-jest-dom": "^5.5.0",
|
|
96
96
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
97
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
97
98
|
"eslint-plugin-naming-convention": "^0.1.3",
|
|
98
99
|
"eslint-plugin-prettier": "^5.5.4",
|
|
99
100
|
"eslint-plugin-storybook": "^10.1.9",
|
|
@@ -86,25 +86,29 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
86
86
|
return root.toSource({ quote: 'single' });
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
const getJSXName = (node: JSXOpeningElement): string | null => {
|
|
90
90
|
const { name } = node;
|
|
91
91
|
if (name.type === 'JSXIdentifier') return name.name;
|
|
92
92
|
if (name.type === 'JSXMemberExpression') {
|
|
93
93
|
return memberExpressionToString(name);
|
|
94
94
|
}
|
|
95
|
+
|
|
95
96
|
return null;
|
|
96
|
-
}
|
|
97
|
+
};
|
|
97
98
|
|
|
98
|
-
|
|
99
|
+
const memberExpressionToString = (
|
|
99
100
|
expr: JSXMemberExpression,
|
|
100
|
-
): string | null {
|
|
101
|
+
): string | null => {
|
|
101
102
|
const right = expr.property.name;
|
|
102
103
|
if (expr.object.type === 'JSXIdentifier') {
|
|
103
104
|
return `${expr.object.name}.${right}`;
|
|
104
105
|
}
|
|
106
|
+
|
|
105
107
|
if (expr.object.type === 'JSXMemberExpression') {
|
|
106
108
|
const left = memberExpressionToString(expr.object);
|
|
109
|
+
|
|
107
110
|
return left ? `${left}.${right}` : null;
|
|
108
111
|
}
|
|
112
|
+
|
|
109
113
|
return null;
|
|
110
|
-
}
|
|
114
|
+
};
|
|
@@ -79,6 +79,7 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
79
79
|
root,
|
|
80
80
|
` TODO: codemod could not safely resolve aliased Menu import — manually split into MenuLink / MenuButton.`,
|
|
81
81
|
);
|
|
82
|
+
|
|
82
83
|
return root.toSource({ quote: 'single' });
|
|
83
84
|
}
|
|
84
85
|
|
|
@@ -98,6 +99,7 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
98
99
|
` TODO: codemod could not safely resolve spread props — manually choose MenuLink or MenuButton.`,
|
|
99
100
|
);
|
|
100
101
|
hasUnconvertedMenu = true;
|
|
102
|
+
|
|
101
103
|
return;
|
|
102
104
|
}
|
|
103
105
|
|
|
@@ -121,6 +123,7 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
121
123
|
` TODO: codemod could not safely resolve — manually choose MenuLink or MenuButton.`,
|
|
122
124
|
);
|
|
123
125
|
hasUnconvertedMenu = true;
|
|
126
|
+
|
|
124
127
|
return;
|
|
125
128
|
}
|
|
126
129
|
|
|
@@ -131,6 +134,7 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
131
134
|
` TODO: codemod could not safely resolve — Menu without href or onClick. Choose MenuLink (add href) or MenuButton (add onClick).`,
|
|
132
135
|
);
|
|
133
136
|
hasUnconvertedMenu = true;
|
|
137
|
+
|
|
134
138
|
return;
|
|
135
139
|
}
|
|
136
140
|
|
|
@@ -147,28 +151,35 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
147
151
|
dsImports.forEach(path => {
|
|
148
152
|
const specifiers = path.node.specifiers ?? [];
|
|
149
153
|
const next: ImportSpecifier[] = [];
|
|
154
|
+
|
|
150
155
|
let touched = false;
|
|
151
156
|
|
|
152
157
|
specifiers.forEach(spec => {
|
|
153
158
|
if (spec.type !== 'ImportSpecifier') {
|
|
154
159
|
next.push(spec as ImportSpecifier);
|
|
160
|
+
|
|
155
161
|
return;
|
|
156
162
|
}
|
|
163
|
+
|
|
157
164
|
if (spec.imported.name !== SOURCE_NAME) {
|
|
158
165
|
next.push(spec);
|
|
166
|
+
|
|
159
167
|
return;
|
|
160
168
|
}
|
|
169
|
+
|
|
161
170
|
// `Menu`를 제거하고 사용된 변형으로 교체.
|
|
162
171
|
touched = true;
|
|
163
172
|
if (hasUnconvertedMenu) {
|
|
164
173
|
// 일부 변환 못한 호출이 남아있어 Menu도 유지가 필요할 수 있음.
|
|
165
174
|
next.push(spec);
|
|
166
175
|
}
|
|
176
|
+
|
|
167
177
|
if (usedMenuLink) {
|
|
168
178
|
next.push(
|
|
169
179
|
j.importSpecifier(j.identifier(LINK_NAME)) as ImportSpecifier,
|
|
170
180
|
);
|
|
171
181
|
}
|
|
182
|
+
|
|
172
183
|
if (usedMenuButton) {
|
|
173
184
|
next.push(
|
|
174
185
|
j.importSpecifier(j.identifier(BUTTON_NAME)) as ImportSpecifier,
|
|
@@ -186,6 +197,7 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
186
197
|
const key = `${importedName}::${localName}`;
|
|
187
198
|
if (seen.has(key)) return false;
|
|
188
199
|
seen.add(key);
|
|
200
|
+
|
|
189
201
|
return true;
|
|
190
202
|
});
|
|
191
203
|
didChange = true;
|
|
@@ -197,17 +209,18 @@ export default function transformer(file: FileInfo, api: API): string {
|
|
|
197
209
|
return root.toSource({ quote: 'single' });
|
|
198
210
|
}
|
|
199
211
|
|
|
200
|
-
|
|
212
|
+
const getJSXName = (node: JSXOpeningElement): string | null => {
|
|
201
213
|
const { name } = node;
|
|
202
214
|
if (name.type === 'JSXIdentifier') return name.name;
|
|
215
|
+
|
|
203
216
|
return null;
|
|
204
|
-
}
|
|
217
|
+
};
|
|
205
218
|
|
|
206
|
-
|
|
219
|
+
const renameJSXElement = (
|
|
207
220
|
j: JSCodeshift,
|
|
208
221
|
path: ASTPath<JSXOpeningElement>,
|
|
209
222
|
newName: string,
|
|
210
|
-
) {
|
|
223
|
+
) => {
|
|
211
224
|
const opening = path.node;
|
|
212
225
|
(opening.name as JSXIdentifier).name = newName;
|
|
213
226
|
|
|
@@ -219,34 +232,35 @@ function renameJSXElement(
|
|
|
219
232
|
(closingName as JSXIdentifier).name = newName;
|
|
220
233
|
}
|
|
221
234
|
}
|
|
222
|
-
}
|
|
235
|
+
};
|
|
223
236
|
|
|
224
|
-
|
|
237
|
+
const addCommentBefore = (
|
|
225
238
|
j: JSCodeshift,
|
|
226
239
|
path: ASTPath<JSXOpeningElement>,
|
|
227
240
|
message: string,
|
|
228
|
-
) {
|
|
241
|
+
) => {
|
|
229
242
|
// JSX element 자체의 부모(보통 JSXElement)를 찾아 그 앞에 코멘트를 삽입.
|
|
230
243
|
let current: ASTPath | null = path;
|
|
231
244
|
while (current && current.node && current.node.type !== 'JSXElement') {
|
|
232
245
|
current = current.parent;
|
|
233
246
|
}
|
|
247
|
+
|
|
234
248
|
if (!current) return;
|
|
235
249
|
|
|
236
250
|
const node = current.node;
|
|
237
251
|
node.comments = node.comments ?? [];
|
|
238
252
|
node.comments.push(j.commentLine(message, true, false));
|
|
239
|
-
}
|
|
253
|
+
};
|
|
240
254
|
|
|
241
|
-
|
|
255
|
+
const addLeadingComment = (
|
|
242
256
|
j: JSCodeshift,
|
|
243
257
|
root: Collection,
|
|
244
258
|
message: string,
|
|
245
|
-
) {
|
|
259
|
+
) => {
|
|
246
260
|
const program = root.get().node.program;
|
|
247
261
|
const body = program.body;
|
|
248
262
|
if (!body || body.length === 0) return;
|
|
249
263
|
const first = body[0];
|
|
250
264
|
first.comments = first.comments ?? [];
|
|
251
265
|
first.comments.push(j.commentLine(message, true, false));
|
|
252
|
-
}
|
|
266
|
+
};
|