diff --git a/packages/odyssey-react-mui/package.json b/packages/odyssey-react-mui/package.json index 0a602a36c7..ebc619d979 100644 --- a/packages/odyssey-react-mui/package.json +++ b/packages/odyssey-react-mui/package.json @@ -5,7 +5,6 @@ "author": "Okta, Inc.", "license": "Apache-2.0", "sideEffects": false, - "type": "module", "main": "dist/index.js", "module": "dist/index.js", "types": "dist/src/index.d.ts", @@ -23,9 +22,18 @@ } }, "exports": { - "./icons": "./dist/icons.generated/index.js", - "./labs": "./dist/labs/index.js", - ".": "./dist/index.js", + "./icons": { + "types": "./dist/src/icons.generated/index.d.ts", + "default": "./dist/icons.generated/index.js" + }, + "./labs": { + "types": "./dist/src/labs/index.d.ts", + "default": "./dist/labs/index.js" + }, + ".": { + "types": "./dist/src/index.d.ts", + "default": "./dist/index.js" + }, "./README.md": "./README.md" }, "scripts": { @@ -34,7 +42,7 @@ "build:cleanIconsIndex": "rimraf src/icons.generated/index.ts", "build:source": "NODE_ENV=production BROWSERSLIST_ENV=modern babel src --out-dir dist --extensions .js,.jsx,.ts,.tsx --source-maps", "build:types": "tsc --project tsconfig.production.json", - "build": "npm-run-all --sequential build:clean generate:i18n --parallel build:types build:source", + "build": "npm-run-all --sequential build:clean generate:i18n build:types build:source", "dev:source": "yarn build:source --watch", "dev:types": "yarn build:types --watch", "dev": "npm-run-all --parallel dev:source dev:types", diff --git a/packages/odyssey-react-mui/scripts/properties-to-ts.js b/packages/odyssey-react-mui/scripts/properties-to-ts.js index 8e29f8eb68..2bb5a589b7 100644 --- a/packages/odyssey-react-mui/scripts/properties-to-ts.js +++ b/packages/odyssey-react-mui/scripts/properties-to-ts.js @@ -13,18 +13,18 @@ // Part of this has been copied over from @okta/ui-build-tools' own internal node script // https://github.com/okta/ui-build-tools/blob/master/packages/clis/i18n/properties-to-json.js -import { resolve, join, basename, extname } from "node:path"; -import { +const { resolve, join, basename, extname } = require("node:path"); +const { readFileSync, writeFileSync, rmSync, existsSync, mkdirSync, -} from "node:fs"; -import properties from "properties"; -import readdir from "recursive-readdir"; -import yargs from "yargs"; -import { hideBin } from "yargs/helpers"; +} = require("node:fs"); +const properties = require("properties"); +const readdir = require("recursive-readdir"); +const yargs = require("yargs"); +const { hideBin } = require("yargs/helpers"); const convert = (baseFiles, propertiesTargetDir) => { for (const src of baseFiles) { diff --git a/packages/odyssey-storybook/src/components/odyssey-mui/Button/Button.stories.tsx b/packages/odyssey-storybook/src/components/odyssey-mui/Button/Button.stories.tsx index 0507f3b7c8..671e4e9765 100644 --- a/packages/odyssey-storybook/src/components/odyssey-mui/Button/Button.stories.tsx +++ b/packages/odyssey-storybook/src/components/odyssey-mui/Button/Button.stories.tsx @@ -10,24 +10,23 @@ * See the License for the specific language governing permissions and limitations under the License. */ -import type { Meta, StoryObj } from "@storybook/react"; - +import { Box } from "@mui/material"; import { Button, buttonSizeValues, buttonTypeValues, buttonVariantValues, + type ButtonProps, } from "@okta/odyssey-react-mui"; -import type { ButtonProps } from "@okta/odyssey-react-mui"; import { AddIcon } from "@okta/odyssey-react-mui/icons"; +import { expect } from "@storybook/jest"; +import { userEvent, waitFor, within } from "@storybook/testing-library"; +import type { Meta, StoryObj } from "@storybook/react"; + import { MuiThemeDecorator } from "../../../../.storybook/components"; import icons from "../../../../.storybook/components/iconUtils"; - -import { userEvent, waitFor, within } from "@storybook/testing-library"; -import { expect } from "@storybook/jest"; import { axeRun } from "../../../axe-util"; import type { PlaywrightProps } from "../storybookTypes"; -import { Box } from "@mui/material"; type playType = { args: ButtonProps;