diff --git a/.babelrc.js b/.babelrc.js index be62020ecc..2544450f3f 100644 --- a/.babelrc.js +++ b/.babelrc.js @@ -32,9 +32,9 @@ module.exports = { "./scripts/babel/variables-from-scss", "add-module-exports", // stage 3 - "@babel/proposal-object-rest-spread", + "@babel/transform-object-rest-spread", // stage 2 - "@babel/proposal-class-properties", + "@babel/transform-class-properties", [ "inline-react-svg", { diff --git a/CHANGELOG.md b/CHANGELOG.md index 229184fabb..798d4f955c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ - Add slugs to markdown headers ([#1051](https://github.com/opensearch-project/oui/pull/1051)) - Add `crossInCircleEmpty` and `power` icons ([#1044](https://github.com/opensearch-project/oui/pull/1044)) - Add `Figma` icon and link to OUI Figma resources ([#1064](https://github.com/opensearch-project/oui/pull/1064)) +- Implement validation for icon input source & set default icon to `Beaker` ([#1137](https://github.com/opensearch-project/oui/pull/1137)) ### 🐛 Bug Fixes @@ -44,7 +45,7 @@ - Bump `@types/react` and `csstype` ([#1105](https://github.com/opensearch-project/oui/pull/1105)) - Add `scripts` folder to lint-es script ([#1143](https://github.com/opensearch-project/oui/pull/1143)) - Clean up code OUI Breadcrumb component from previous updates ([#1144](https://github.com/opensearch-project/oui/pull/1144)) - +- Update deprecated Babel plugins ([#1155](https://github.com/opensearch-project/oui/pull/1155)) ### 🪛 Refactoring diff --git a/i18ntokens.json b/i18ntokens.json index f93f61a162..31df32aa80 100644 --- a/i18ntokens.json +++ b/i18ntokens.json @@ -1643,14 +1643,14 @@ "highlighting": "string", "loc": { "start": { - "line": 275, + "line": 279, "column": 4, - "index": 10041 + "index": 10184 }, "end": { - "line": 278, + "line": 282, "column": 46, - "index": 10201 + "index": 10344 } }, "filepath": "src/components/datagrid/data_grid.tsx" @@ -1661,14 +1661,14 @@ "highlighting": "string", "loc": { "start": { - "line": 281, + "line": 285, "column": 10, - "index": 10275 + "index": 10418 }, "end": { - "line": 283, + "line": 287, "column": 52, - "index": 10397 + "index": 10540 } }, "filepath": "src/components/datagrid/data_grid.tsx" @@ -1679,14 +1679,14 @@ "highlighting": "string", "loc": { "start": { - "line": 990, + "line": 1004, "column": 4, - "index": 32868 + "index": 33235 }, "end": { - "line": 995, + "line": 1009, "column": 53, - "index": 33041 + "index": 33408 } }, "filepath": "src/components/datagrid/data_grid.tsx" @@ -1697,14 +1697,14 @@ "highlighting": "string", "loc": { "start": { - "line": 990, + "line": 1004, "column": 4, - "index": 32868 + "index": 33235 }, "end": { - "line": 995, + "line": 1009, "column": 53, - "index": 33041 + "index": 33408 } }, "filepath": "src/components/datagrid/data_grid.tsx" @@ -1715,14 +1715,14 @@ "highlighting": "string", "loc": { "start": { - "line": 1031, + "line": 1045, "column": 20, - "index": 34079 + "index": 34453 }, "end": { - "line": 1041, + "line": 1055, "column": 3, - "index": 34366 + "index": 34740 } }, "filepath": "src/components/datagrid/data_grid.tsx" @@ -1733,14 +1733,14 @@ "highlighting": "string", "loc": { "start": { - "line": 1043, + "line": 1057, "column": 25, - "index": 34394 + "index": 34768 }, "end": { - "line": 1052, + "line": 1066, "column": 3, - "index": 34644 + "index": 35018 } }, "filepath": "src/components/datagrid/data_grid.tsx" @@ -1751,14 +1751,14 @@ "highlighting": "string", "loc": { "start": { - "line": 1171, + "line": 1185, "column": 18, - "index": 39758 + "index": 40132 }, "end": { - "line": 1174, + "line": 1188, "column": 20, - "index": 39911 + "index": 40285 } }, "filepath": "src/components/datagrid/data_grid.tsx" diff --git a/package.json b/package.json index 63435c6805..2cef3516a2 100644 --- a/package.json +++ b/package.json @@ -136,10 +136,10 @@ "@axe-core/puppeteer": "4.6.1", "@babel/cli": "^7.10.5", "@babel/core": "^7.11.4", - "@babel/plugin-proposal-class-properties": "^7.10.4", - "@babel/plugin-proposal-object-rest-spread": "^7.11.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-async-to-generator": "^7.10.4", + "@babel/plugin-transform-class-properties": "^7.23.3", + "@babel/plugin-transform-object-rest-spread": "^7.23.3", "@babel/plugin-transform-runtime": "^7.11.0", "@babel/preset-env": "^7.11.0", "@babel/preset-react": "^7.10.4", diff --git a/src/components/icon/__snapshots__/icon.test.tsx.snap b/src/components/icon/__snapshots__/icon.test.tsx.snap index 8ae3b0f871..2480d0d500 100644 --- a/src/components/icon/__snapshots__/icon.test.tsx.snap +++ b/src/components/icon/__snapshots__/icon.test.tsx.snap @@ -10184,7 +10184,7 @@ exports[`OuiIcon props type wrench is rendered 1`] = ` `; -exports[`OuiIcon renders custom components 1`] = ` +exports[`OuiIcon render different types of icons renders custom components 1`] = `