Skip to content

Commit

Permalink
Develop -> Master (#1948)
Browse files Browse the repository at this point in the history
* refactor(odyssey-design-tokens): consolidate tokens, initial 2.0 work

* refactor(odyssey-react-mui): refactor to use new tokens

* refactor(odyssey-storybook): refactor to use new tokens

* chore: pr feedback

* refactor: update token names based on Content feedback

* refactor: update typography tokens to match new values

* fix(odyssey-storybook): match storybook ui to new tokens

* chore: these keep popping up after build

* docs(odyssey-storybook): update theming docs to use new tokens

* Translations for odyssey (#1807)

chore(odyssey-react-mui): translations for odyssey-react-mui.properties

* fix: use odyssey tokens inside mui components style override

* refactor(odyssey-design-tokens): rename "primary" type color to "action"

* feat(odyssey-design-tokens): add "darker" to primary palette

* feat(odyssey-react-mui): update Link to match new brand standards

* feat(odyssey-react-mui): include color properties in type styles

* refactor(odyssey-react-mui): migrate Circular Progress to design tokens

* chore: fix hover/visited ordering

* chore: same fix for monochrome variant

* fix: add incremental to root tsconfig (#1810)

fix: added incremental to root TSconfig

* feat(odyssey-design-tokens): add border.radius.round

* refactor(odyssey-design-tokens): caution to warning

* refactor(odyssey-react-mui): convert MuiChip to odyssey tokens; find/replace all touched tokens

* fix: memoize the Link component (#1813)

fix: memoized the Link component

* feat(odyssey-design-tokens): add border.width.heavy

* feat(odyssey-react-mui): update Status styles and variants to match brand

* docs(odyssey-storybook): update Status stories

* feat(odyssey-design-tokens): add tokens for colorized text

* refactor(odyssey-react-mui): apply colorized text tokens

* chore: upgraded Applitools (#1815)

* fix: change to DesignTokens type rather than the overrides in theme (#1816)

* fix: changed to DesignTokens type rather than the overrides in theme creation

* fix: incorrectly named property in Odyssey Storybook theme issue

* chore(odyssey-design-tokens): update hue values

* chore: rename indicator to variant

* feat(odyssey-design-tokens): add 'disabled' type color

* feat(odyssey-react-mui): add icon support to Tag

* fix(odyssey-react-mui): add aria-disabled to Tag

* chore: update Tag and Status styles based on design feedback

* fix: orrectly import zh-CN and zh-TW files

* refactor: remove isDefaultChecked and add isInvalid to Radio

* refactor: remove vestigial isDefaultChecked from Checkbox

* refactor: remove isDefaultValue from Radio

* refactor: change hasError to isInvalid for Radio

* refactor: make default Tooltip placement top

* feat(odyssey-design-tokens): add border.outer and palette.x.heading

* refactor(odyssey-react-mui): update all Alert styles to match rebrand

* fix: enable a11y tests in CI (#1826)

* fix: enable a11y tests in CI, add ariaLabel to components with accessibility violations

* refactor(odyssey-react-mui): refactor alert title styling to enable variation

* fix: Applitools VRT (#1827)

fix: fixed Applitools config

* feat(odyssey-design-tokens): add alpha tokens

* feat(odyssey-react-mui): add transparency and blur to Toast

* chore(odyssey-design-tokens): update alpha values to hex

* docs(odyssey-storybook): make datepicker starting date fixed

* chore: fix borderRadius on banner

* chore(deps-dev): bump vite from 4.3.8 to 4.3.9 (#1819)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.8 to 4.3.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.3.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: clicking MenuItem closes MenuButton (#1820)

* fix: clicking MenuItem didn't close MenuButton

* fix: incorrect prop name in MenuButton stories

* Fix RTL position of chevron in NativeSelect (#1835)

fix: adjust NativeSelect chevron position in RTL

* Remove default branch in i18n config (#1841)

* docs(odyssey-storybook): update Form stories to be more comprehensive

* feat(odyssey-design-tokens): add token for border.radius.tight

* feat(odyssey-react-mui): add sub2 type style

* refactor(odyssey-react-mui): update Form and Fieldset styles to match brand

* chore: add Checkbox to kitchen sink

* fix: specfy accessibility tags section508, wcag21aa (#1839)

* fix: specfy accessibility tags section508, wcag21aa
* fix: a11y test for toast, typography, radio, checkbox

* chore: update Field margin

* RTL fixes for field labels (#1836)

* fix: respect RTL in FormControlLabel children

* fix: respect RTL in FormLabel optional text

* refactor: replace margins with gap

* refactor: remove vestigial display declaration

* Enable button wrapping in Dialog footer (#1838)

* feat: enable button wrapping in Dialog footer

* refactor: improve Dialog footer specificity

* Add missing displayNames to components (#1852)

refactor: add missing displayNames

* refactor(odyssey-react-mui): use component class name variables wherever possible

* Prevent dismiss button from overlapping Banner text (#1850)

* fix: add additional padding to dismissable banners

* fix: make dismissable padding uniform

* Update RTL spacing for tab icons (#1849)

fix: update RTL spacing for tab icons

* Fix div-inside-of-p issue in field errors (#1848)

fix: make ScreenReaderText a span for semantics

* feat(odyssey-icons): update all icon source SVGs

* feat(odyssey-svgr): update template to support 24x24 sources

* feat(odyssey-react-mui): generate new and updated icon components

* feat(odyssey-react-mui): manually update icon index, update references in styling

* docs(odyssey-storybook): update stories to use new icons

* chore(odyssey-icons): update source/figma

* chore(odyssey-react-mui): update icon components and index

* chore(odyssey-storybook): update icon stories

* chore: update external link icon

* refactor(odyssey-react-mui): component Link now uses ExternalLinkIcon

* chore: add pseudo-loc languages and fix locale inconsistency  (#1851)

* chore(odyssey-react-mui): change dash to underscore to align with other react locale format

* chore: add ok-PL ok-SK language suppport

* chore: updating README

* chore: update naming for all icons

* fix: add tooltip play test (#1854)

* fix: add playwright tests for tabs, tooltip, banner, autocomplete

* Translations for odyssey (#1856)

chore(odyssey-react-mui): translations for odyssey-react-mui.properties

* Add DataGrid (unstyled) (#1808)

* fix: add material-react-table

* fix: upgraded Prettier

* feat: added DataGrid

* fix: added tsbuildinfo to speed up TS compiles

* fix: removed unused dependencies from Storybook

* fix: updated DataGrid story for Storybook v7

* feat: updated DataGrid with more functionality

* fix: added notes to DataGrid and commented out Reports

* fix: removed unused imports from DataGrid

* fix: upgraded material-react-table

* fix: removed unsused comment in DataGrid

* fix: split DataGrid into 2 components

* fix: added translation interpolation and plurality

* feat: added PaginatedDataGrid

* fix: minor alphabetization in Select

* fix: pagination works now in DataGrid

* fix: removed InfinitelyScrolledDataGrid

* fix: minor code positioning

* fix: renamed DataGrid to DataTable

* fix: renamed table and fixed checkboxes

* fix: removed unused DataGrid component

* fix: incorrectly named i18nKey values

* fix: removed old Table stories

* fix: stories using Table now use StaticTable

* fix: incorrect children type in OdysseyTranslationProvider

* fix: story imports use @storybook/blocks instead of @storybook/addon-docs/blocks

* fix: missing Table components in RTL stories

* fix: updated TokenTables to properly render new brand tokens

* fix: removed unused import

* fix: added console.error where we had console.log

* fix: axe testing bug

* Allow MenuButton to accept null children (#1847)

refactor: add NullElement

* Change all imports to be relative to `./` rather than from `./index.ts` (#1828)

* refactor: make file paths absolute

* refactor: make remaining file paths absolute

* fix: commit suggestions from KG

* refactor: update createTheme import

* fix: update source of createTheme

* refactor: change Alert imports to relative

---------

Co-authored-by: Edbury Enegren <[email protected]>

* Ensure TagList can wrap (#1837)

* fix: ensure TagList can wrap

* feat: add isWrappable to TagList

* refactor: make flexWrap the default

* refactor(odyssey-react-mui): update TextInput styles to match brand

* fix(odyssey-react-mui): lengthy field labels are no longer cut off

* refactor(odyssey-react-mui): fix spacing in Select menu

* refactor(odyssey-react-mui): restyle Select and Autocomplete for brand

* fix(odyssey-react-mui): autocomplete is now RTL friendly

* docs(odyssey-storybook): fix broken Autocomplete.Loading story

* docs: update docs for Supernova (#1821)

* docs: update docs for Supernova

* fix: change type of endIcon in controls

* refactor: make Button default to primary

* feat: switch args back to alphabetical

* refactor: move icons into separate file

* fix: fix merge conflicts

* fix: fix type errors

* refactor: apply recommended changes

* feat: add docs for CircularProgress

* feat: add Link docs

* feat: add Icon docs

* feat: add Dialog docs

* feat: modify ScreenReaderText docs

* feat: update Status documentation

* feat: add Tooltip docs

* feat: add Tag documentation

* feat: add Tabs docs

* feat: added MenuButton docs

* feat: updated Typography docs

* refactor: simplify DatePicker docs

* feat: update Banner docs

* feat: update docs for Infobox

* feat: update Toast docs

* feat: update Autocomplete docs

* feat: update docs for TextField

* feat: update Checkbox and CheckboxGroup docs

* feat: update Radio and RadioGroup docs

* feat: update Form and Fieldset docs

* feat: update Select and NativeSelect docs

* refactor: abstracted out type enums

* fix: fix type errors in Toast stories

* fix: remove click on disabled checkbox

* refactor: commit KG suggestions

* fix: add missing variant to Button

* refactor: fix import relativity

* refactor(odyssey-react-mui): make Button styling syntax consistent

* refactor: simplify Select stories (#1867)

* fix: Button's `tooltipText` needs to show on hover (#1817)

* fix: not showing Button's tooltipText when the prop is passed

* fix: minor ordering of properties in Tooltip stories

* fix: some Tooltip position stories use Tag, not Button

* refactor(odyssey-react-mui): replace all theme.spacing with spacing tokens

* refactor(odyssey-react-mui): remove mui variables that have a token equivalent

* refactor(odyssey-design-tokens): update token values for consistency

* feat(odyssey-react-mui): update Button to match Rebrand

* docs(odyssey-storybook): add Disabled states to Button stories

* chore: update aria label

* chore: update button colors per design review

* refactor: remove forwardRef on Link (#1863)

* refactor(odyssey-react-mui): update Tab/Tabs styling

* fix: add play test for dialog, menubutton, select, tag, passwordfield (#1861)

* chore: update based on design feedback

* chore: fix tests

* chore: fix broken a11y test

* feat(odyssey-react-mui): updated ScopedCSSBaseline for rebrand

* chore: use "highlight" tokens

* refactor: remove IconButton (#1865)

* docs: add monolith to OdysseyTranslationProvider doc (#1866)

* docs: add monolith to OdysseyTranslationProvider doc

* Update packages/odyssey-storybook/src/guidelines/OdysseyTranslationProvider.stories.mdx

Co-authored-by: Kevin Ghadyani <[email protected]>

* docs: expand on monolith docs

---------

Co-authored-by: Kevin Ghadyani <[email protected]>

* Simplify Dialog children type (#1873)

refactor: prevent children from being an array

* Remove Icon type restriction from Button adornments (#1872)

refactor: loosen type rules around Button adornments

* feat(odyssey-react-mui): update Dialog to match Rebrand

* chore: remove unnec import

* chore: fix No Button state

* chore: update Floating button bg

* fix: Upgrade many packages to fix vulns (#1880)

* fix: upgraded all packages

* fix: datePickerTheme types

* Remove all direct MUI exports (#1874)

* refactor: remove all direct MUI exports

* fix: update broken import

* fix: update ThemeOptions import

* fix: update additional broken imports

* fix: move dep to devDep

* chore: update yarn lock

* refactor: re-add MUI exports to our library

* refactor: make MenuItem use our own props (#1822)

* refactor: make MenuItem use our own props

* feat: add props to MenuItem

* fix: update MenuItem API

* refactor: commit KG suggestions

* docs: add prop docs to MenuItem

* fix: add NonNullable to fix broken type

* chore: pull close button

* refactor(odyssey-react-mui): remove borders from button:hover

* Clean up props (#1868)

* refactor: alphabetize all the things

* docs: add full documentation to props

* docs: add Field hasVisibleLabel prop

* fix: adjust comment placement in Tooltip

* refactor(odyssey-react-mui): remove remaining Theme variables from components file

* docs: add RadioGroup isOptional explanation (#1890)

* Change names of the Dialog footer props (#1887)

refactor: change Dialog footer props

* chore: update token naming after review

* chore: update border main to control

* chore: remove more theme vars

* Moved Odyssey Labs into MUI (#1885)

* feat: merged labs with mui

* fix: import for MuiThemeDecorator

* fix: removed README from labs/ export

* fix: types export from labs

* chore(deps): bump tough-cookie from 4.1.2 to 4.1.3 (#1871)

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump semver from 5.7.1 to 5.7.2 (#1876)

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#1892)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(odyssey-react-mui): make Form, Infobox spacing constent across uses

* refactor: enable ARIA attributes on MenuButton (#1893)

* Default Button text to empty string (#1883)

refactor: default Button text to empty string

* Add Odyssey clear button to SearchField (#1878)

* feat: hide native clear button

* feat: add custom button for search clear

* docs: add proper docs to SearchField

* Update packages/odyssey-react-mui/src/SearchField.tsx

* refactor: add KG improvements

* Update packages/odyssey-react-mui/src/SearchField.tsx

* Update packages/odyssey-react-mui/src/SearchField.tsx

* Update packages/odyssey-react-mui/src/SearchField.tsx

* Wrap Box (#1891)

* feat: wrap Box

* refactor: use internal Box where possible

* fix: add ref to wrapped Box

* refactor: switch to material Box

* Add StylisPlugins to OdysseyCacheProvider (#1898)

* feat: adds ability to optionally add stylisPlugins

* fix: refactors prop types in OdysseyProvider

* Update README.md with new URL (#1901)

* feat: add Button types (#1903)

* docs: add kitchen sink to Button (#1902)

* docs: add kitchen sink to Button

* fix: add aria to icon-only button

* Change Checkbox onChange and validity (#1895)

* refactor: moving isValid to validity

* feat: make component controlled

* fix: use correct type for onChange

* test: remove tests on certain checkbox states

* refactor: cpation to subordinate

* feat: adds ScopedCssBaseline to OdysseyThemeProvider (#1904)

* Move Table to Labs (#1900)

* refactor: move Table to Labs

* fix: update broken types

* refactor: remove Button prop changes

* Require Button to have text, startIcon, or endIcon (#1899)

* refactor: require Button to have text, startIcon, or endIcon

* fix: fix broken types

* refactor: update play types

* Wrap Typography (#1886)

* feat: wrap Typography

* feat: add ARIA props to Typography

* refactor: switch Typography to internal and add color

* fix: update types

* refactor: abstract component list into type

* refactor: encapsulate component

* refactor: update aliases

* fix: modify vestigial Typogrpahy components

* feat: remove Icon component (#1864)

* feat: remove Icon component

* docs: add explanatory description

* fix: remove unnecessary type specificity

* fix: remove unneeded invalid import

* refactor: export icons and iconDictionary

* fix: update icon imports

* refactor: switch from iconDictionary to icons

* refactor: make icons a separate export

* fix: fix broken imports

* fix: update broken import path

* fix: add type fix

* refactor: improve iconUtils

* fix: update type

* docs(odyssey-storybook): update Form, Fieldset content

* Fixed icon index generation as well as renaming to .generated (#1906)

* fix: icons get moved to dist/, not src/

* fix: updates Link target type to properly show all possible string values

* fix: icons export in mui package.json

* fix: moved devDependencies as dependencies in odyssey-svgr

* fix: export for @okta/odyssey-react-mui/icons contains generated icons

* fix: svg path optimization

* Add OdysseyDesignTokensContext (#1908)

* fix: icons get moved to dist/, not src/

* fix: updates Link target type to properly show all possible string values

* fix: icons export in mui package.json

* fix: moved devDependencies as dependencies in odyssey-svgr

* fix: export for @okta/odyssey-react-mui/icons contains generated icons

* fix: svg path optimization

* fix: add OdysseyDesignTokensContext

* refactor: rename "Infobox" to "Callout"

* Translations for odyssey (#1909)

chore(odyssey-react-mui): translations for odyssey-react-mui.properties

* chore: typo fixes and sorting

* feat: add `isDisabled` in context from Fieldset to Field (#1911)

* Adds missing Tooltip functionality support to MenuButton and Status (#1912)

* feat: add tooltipText to MenuButton

* feat: rename `Button`'s `text` prop to `label

* fix: refactored Button to use useMuiProps hook

* feat: add Tooltip capabilities to Status

* fix: button stories broken and menu button stories missing tooltip text

* fix!: allow major version bumps (#1913)

* Merge v1.0.0 into develop (#1915)

Release/v1.0.0 (#1914)

* refactor(odyssey-design-tokens): consolidate tokens, initial 2.0 work

* refactor(odyssey-react-mui): refactor to use new tokens

* refactor(odyssey-storybook): refactor to use new tokens

* chore: pr feedback

* refactor: update token names based on Content feedback

* refactor: update typography tokens to match new values

* fix(odyssey-storybook): match storybook ui to new tokens

* chore: these keep popping up after build

* docs(odyssey-storybook): update theming docs to use new tokens

* Translations for odyssey (#1807)

chore(odyssey-react-mui): translations for odyssey-react-mui.properties

* fix: use odyssey tokens inside mui components style override

* refactor(odyssey-design-tokens): rename "primary" type color to "action"

* feat(odyssey-design-tokens): add "darker" to primary palette

* feat(odyssey-react-mui): update Link to match new brand standards

* feat(odyssey-react-mui): include color properties in type styles

* refactor(odyssey-react-mui): migrate Circular Progress to design tokens

* chore: fix hover/visited ordering

* chore: same fix for monochrome variant

* fix: add incremental to root tsconfig (#1810)

fix: added incremental to root TSconfig

* feat(odyssey-design-tokens): add border.radius.round

* refactor(odyssey-design-tokens): caution to warning

* refactor(odyssey-react-mui): convert MuiChip to odyssey tokens; find/replace all touched tokens

* fix: memoize the Link component (#1813)

fix: memoized the Link component

* feat(odyssey-design-tokens): add border.width.heavy

* feat(odyssey-react-mui): update Status styles and variants to match brand

* docs(odyssey-storybook): update Status stories

* feat(odyssey-design-tokens): add tokens for colorized text

* refactor(odyssey-react-mui): apply colorized text tokens

* chore: upgraded Applitools (#1815)

* fix: change to DesignTokens type rather than the overrides in theme (#1816)

* fix: changed to DesignTokens type rather than the overrides in theme creation

* fix: incorrectly named property in Odyssey Storybook theme issue

* chore(odyssey-design-tokens): update hue values

* chore: rename indicator to variant

* feat(odyssey-design-tokens): add 'disabled' type color

* feat(odyssey-react-mui): add icon support to Tag

* fix(odyssey-react-mui): add aria-disabled to Tag

* chore: update Tag and Status styles based on design feedback

* fix: orrectly import zh-CN and zh-TW files

* refactor: remove isDefaultChecked and add isInvalid to Radio

* refactor: remove vestigial isDefaultChecked from Checkbox

* refactor: remove isDefaultValue from Radio

* refactor: change hasError to isInvalid for Radio

* refactor: make default Tooltip placement top

* feat(odyssey-design-tokens): add border.outer and palette.x.heading

* refactor(odyssey-react-mui): update all Alert styles to match rebrand

* fix: enable a11y tests in CI (#1826)

* fix: enable a11y tests in CI, add ariaLabel to components with accessibility violations

* refactor(odyssey-react-mui): refactor alert title styling to enable variation

* fix: Applitools VRT (#1827)

fix: fixed Applitools config

* feat(odyssey-design-tokens): add alpha tokens

* feat(odyssey-react-mui): add transparency and blur to Toast

* chore(odyssey-design-tokens): update alpha values to hex

* docs(odyssey-storybook): make datepicker starting date fixed

* chore: fix borderRadius on banner

* chore(deps-dev): bump vite from 4.3.8 to 4.3.9 (#1819)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 4.3.8 to 4.3.9.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v4.3.9/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...




* fix: clicking MenuItem closes MenuButton (#1820)

* fix: clicking MenuItem didn't close MenuButton

* fix: incorrect prop name in MenuButton stories

* Fix RTL position of chevron in NativeSelect (#1835)

fix: adjust NativeSelect chevron position in RTL

* Remove default branch in i18n config (#1841)

* docs(odyssey-storybook): update Form stories to be more comprehensive

* feat(odyssey-design-tokens): add token for border.radius.tight

* feat(odyssey-react-mui): add sub2 type style

* refactor(odyssey-react-mui): update Form and Fieldset styles to match brand

* chore: add Checkbox to kitchen sink

* fix: specfy accessibility tags section508, wcag21aa (#1839)

* fix: specfy accessibility tags section508, wcag21aa
* fix: a11y test for toast, typography, radio, checkbox

* chore: update Field margin

* RTL fixes for field labels (#1836)

* fix: respect RTL in FormControlLabel children

* fix: respect RTL in FormLabel optional text

* refactor: replace margins with gap

* refactor: remove vestigial display declaration

* Enable button wrapping in Dialog footer (#1838)

* feat: enable button wrapping in Dialog footer

* refactor: improve Dialog footer specificity

* Add missing displayNames to components (#1852)

refactor: add missing displayNames

* refactor(odyssey-react-mui): use component class name variables wherever possible

* Prevent dismiss button from overlapping Banner text (#1850)

* fix: add additional padding to dismissable banners

* fix: make dismissable padding uniform

* Update RTL spacing for tab icons (#1849)

fix: update RTL spacing for tab icons

* Fix div-inside-of-p issue in field errors (#1848)

fix: make ScreenReaderText a span for semantics

* feat(odyssey-icons): update all icon source SVGs

* feat(odyssey-svgr): update template to support 24x24 sources

* feat(odyssey-react-mui): generate new and updated icon components

* feat(odyssey-react-mui): manually update icon index, update references in styling

* docs(odyssey-storybook): update stories to use new icons

* chore(odyssey-icons): update source/figma

* chore(odyssey-react-mui): update icon components and index

* chore(odyssey-storybook): update icon stories

* chore: update external link icon

* refactor(odyssey-react-mui): component Link now uses ExternalLinkIcon

* chore: add pseudo-loc languages and fix locale inconsistency  (#1851)

* chore(odyssey-react-mui): change dash to underscore to align with other react locale format

* chore: add ok-PL ok-SK language suppport

* chore: updating README

* chore: update naming for all icons

* fix: add tooltip play test (#1854)

* fix: add playwright tests for tabs, tooltip, banner, autocomplete

* Translations for odyssey (#1856)

chore(odyssey-react-mui): translations for odyssey-react-mui.properties

* Add DataGrid (unstyled) (#1808)

* fix: add material-react-table

* fix: upgraded Prettier

* feat: added DataGrid

* fix: added tsbuildinfo to speed up TS compiles

* fix: removed unused dependencies from Storybook

* fix: updated DataGrid story for Storybook v7

* feat: updated DataGrid with more functionality

* fix: added notes to DataGrid and commented out Reports

* fix: removed unused imports from DataGrid

* fix: upgraded material-react-table

* fix: removed unsused comment in DataGrid

* fix: split DataGrid into 2 components

* fix: added translation interpolation and plurality

* feat: added PaginatedDataGrid

* fix: minor alphabetization in Select

* fix: pagination works now in DataGrid

* fix: removed InfinitelyScrolledDataGrid

* fix: minor code positioning

* fix: renamed DataGrid to DataTable

* fix: renamed table and fixed checkboxes

* fix: removed unused DataGrid component

* fix: incorrectly named i18nKey values

* fix: removed old Table stories

* fix: stories using Table now use StaticTable

* fix: incorrect children type in OdysseyTranslationProvider

* fix: story imports use @storybook/blocks instead of @storybook/addon-docs/blocks

* fix: missing Table components in RTL stories

* fix: updated TokenTables to properly render new brand tokens

* fix: removed unused import

* fix: added console.error where we had console.log

* fix: axe testing bug

* Allow MenuButton to accept null children (#1847)

refactor: add NullElement

* Change all imports to be relative to `./` rather than from `./index.ts` (#1828)

* refactor: make file paths absolute

* refactor: make remaining file paths absolute

* fix: commit suggestions from KG

* refactor: update createTheme import

* fix: update source of createTheme

* refactor: change Alert imports to relative

---------



* Ensure TagList can wrap (#1837)

* fix: ensure TagList can wrap

* feat: add isWrappable to TagList

* refactor: make flexWrap the default

* refactor(odyssey-react-mui): update TextInput styles to match brand

* fix(odyssey-react-mui): lengthy field labels are no longer cut off

* refactor(odyssey-react-mui): fix spacing in Select menu

* refactor(odyssey-react-mui): restyle Select and Autocomplete for brand

* fix(odyssey-react-mui): autocomplete is now RTL friendly

* docs(odyssey-storybook): fix broken Autocomplete.Loading story

* docs: update docs for Supernova (#1821)

* docs: update docs for Supernova

* fix: change type of endIcon in controls

* refactor: make Button default to primary

* feat: switch args back to alphabetical

* refactor: move icons into separate file

* fix: fix merge conflicts

* fix: fix type errors

* refactor: apply recommended changes

* feat: add docs for CircularProgress

* feat: add Link docs

* feat: add Icon docs

* feat: add Dialog docs

* feat: modify ScreenReaderText docs

* feat: update Status documentation

* feat: add Tooltip docs

* feat: add Tag documentation

* feat: add Tabs docs

* feat: added MenuButton docs

* feat: updated Typography docs

* refactor: simplify DatePicker docs

* feat: update Banner docs

* feat: update docs for Infobox

* feat: update Toast docs

* feat: update Autocomplete docs

* feat: update docs for TextField

* feat: update Checkbox and CheckboxGroup docs

* feat: update Radio and RadioGroup docs

* feat: update Form and Fieldset docs

* feat: update Select and NativeSelect docs

* refactor: abstracted out type enums

* fix: fix type errors in Toast stories

* fix: remove click on disabled checkbox

* refactor: commit KG suggestions

* fix: add missing variant to Button

* refactor: fix import relativity

* refactor(odyssey-react-mui): make Button styling syntax consistent

* refactor: simplify Select stories (#1867)

* fix: Button's `tooltipText` needs to show on hover (#1817)

* fix: not showing Button's tooltipText when the prop is passed

* fix: minor ordering of properties in Tooltip stories

* fix: some Tooltip position stories use Tag, not Button

* refactor(odyssey-react-mui): replace all theme.spacing with spacing tokens

* refactor(odyssey-react-mui): remove mui variables that have a token equivalent

* refactor(odyssey-design-tokens): update token values for consistency

* feat(odyssey-react-mui): update Button to match Rebrand

* docs(odyssey-storybook): add Disabled states to Button stories

* chore: update aria label

* chore: update button colors per design review

* refactor: remove forwardRef on Link (#1863)

* refactor(odyssey-react-mui): update Tab/Tabs styling

* fix: add play test for dialog, menubutton, select, tag, passwordfield (#1861)

* chore: update based on design feedback

* chore: fix tests

* chore: fix broken a11y test

* feat(odyssey-react-mui): updated ScopedCSSBaseline for rebrand

* chore: use "highlight" tokens

* refactor: remove IconButton (#1865)

* docs: add monolith to OdysseyTranslationProvider doc (#1866)

* docs: add monolith to OdysseyTranslationProvider doc

* Update packages/odyssey-storybook/src/guidelines/OdysseyTranslationProvider.stories.mdx



* docs: expand on monolith docs

---------



* Simplify Dialog children type (#1873)

refactor: prevent children from being an array

* Remove Icon type restriction from Button adornments (#1872)

refactor: loosen type rules around Button adornments

* feat(odyssey-react-mui): update Dialog to match Rebrand

* chore: remove unnec import

* chore: fix No Button state

* chore: update Floating button bg

* fix: Upgrade many packages to fix vulns (#1880)

* fix: upgraded all packages

* fix: datePickerTheme types

* Remove all direct MUI exports (#1874)

* refactor: remove all direct MUI exports

* fix: update broken import

* fix: update ThemeOptions import

* fix: update additional broken imports

* fix: move dep to devDep

* chore: update yarn lock

* refactor: re-add MUI exports to our library

* refactor: make MenuItem use our own props (#1822)

* refactor: make MenuItem use our own props

* feat: add props to MenuItem

* fix: update MenuItem API

* refactor: commit KG suggestions

* docs: add prop docs to MenuItem

* fix: add NonNullable to fix broken type

* chore: pull close button

* refactor(odyssey-react-mui): remove borders from button:hover

* Clean up props (#1868)

* refactor: alphabetize all the things

* docs: add full documentation to props

* docs: add Field hasVisibleLabel prop

* fix: adjust comment placement in Tooltip

* refactor(odyssey-react-mui): remove remaining Theme variables from components file

* docs: add RadioGroup isOptional explanation (#1890)

* Change names of the Dialog footer props (#1887)

refactor: change Dialog footer props

* chore: update token naming after review

* chore: update border main to control

* chore: remove more theme vars

* Moved Odyssey Labs into MUI (#1885)

* feat: merged labs with mui

* fix: import for MuiThemeDecorator

* fix: removed README from labs/ export

* fix: types export from labs

* chore(deps): bump tough-cookie from 4.1.2 to 4.1.3 (#1871)

Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.1.2...v4.1.3)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
...




* chore(deps): bump semver from 5.7.1 to 5.7.2 (#1876)

Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2.
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md)
- [Commits](npm/node-semver@v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: semver
  dependency-type: indirect
...




* chore(deps): bump word-wrap from 1.2.3 to 1.2.4 (#1892)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...




* fix(odyssey-react-mui): make Form, Infobox spacing constent across uses

* refactor: enable ARIA attributes on MenuButton (#1893)

* Default Button text to empty string (#1883)

refactor: default Button text to empty string

* Add Odyssey clear button to SearchField (#1878)

* feat: hide native clear button

* feat: add custom button for search clear

* docs: add proper docs to SearchField

* Update packages/odyssey-react-mui/src/SearchField.tsx

* refactor: add KG improvements

* Update packages/odyssey-react-mui/src/SearchField.tsx

* Update packages/odyssey-react-mui/src/SearchField.tsx

* Update packages/odyssey-react-mui/src/SearchField.tsx

* Wrap Box (#1891)

* feat: wrap Box

* refactor: use internal Box where possible

* fix: add ref to wrapped Box

* refactor: switch to material Box

* Add StylisPlugins to OdysseyCacheProvider (#1898)

* feat: adds ability to optionally add stylisPlugins

* fix: refactors prop types in OdysseyProvider

* Update README.md with new URL (#1901)

* feat: add Button types (#1903)

* docs: add kitchen sink to Button (#1902)

* docs: add kitchen sink to Button

* fix: add aria to icon-only button

* Change Checkbox onChange and validity (#1895)

* refactor: moving isValid to validity

* feat: make component controlled

* fix: use correct type for onChange

* test: remove tests on certain checkbox states

* refactor: cpation to subordinate

* feat: adds ScopedCssBaseline to OdysseyThemeProvider (#1904)

* Move Table to Labs (#1900)

* refactor: move Table to Labs

* fix: update broken types

* refactor: remove Button prop changes

* Require Button to have text, startIcon, or endIcon (#1899)

* refactor: require Button to have text, startIcon, or endIcon

* fix: fix broken types

* refactor: update play types

* Wrap Typography (#1886)

* feat: wrap Typography

* feat: add ARIA props to Typography

* refactor: switch Typography to internal and add color

* fix: update types

* refactor: abstract component list into type

* refactor: encapsulate component

* refactor: update aliases

* fix: modify vestigial Typogrpahy components

* feat: remove Icon component (#1864)

* feat: remove Icon component

* docs: add explanatory description

* fix: remove unnecessary type specificity

* fix: remove unneeded invalid import

* refactor: export icons and iconDictionary

* fix: update icon imports

* refactor: switch from iconDictionary to icons

* refactor: make icons a separate export

* fix: fix broken imports

* fix: update broken import path

* fix: add type fix

* refactor: improve iconUtils

* fix: update type

* docs(odyssey-storybook): update Form, Fieldset content

* Fixed icon index generation as well as renaming to .generated (#1906)

* fix: icons get moved to dist/, not src/

* fix: updates Link target type to properly show all possible string values

* fix: icons export in mui package.json

* fix: moved devDependencies as dependencies in odyssey-svgr

* fix: export for @okta/odyssey-react-mui/icons contains generated icons

* fix: svg path optimization

* Add OdysseyDesignTokensContext (#1908)

* fix: icons get moved to dist/, not src/

* fix: updates Link target type to properly show all possible string values

* fix: icons export in mui package.json

* fix: moved devDependencies as dependencies in odyssey-svgr

* fix: export for @okta/odyssey-react-mui/icons contains generated icons

* fix: svg path optimization

* fix: add OdysseyDesignTokensContext

* refactor: rename "Infobox" to "Callout"

* Translations for odyssey (#1909)

chore(odyssey-react-mui): translations for odyssey-react-mui.properties

* chore: typo fixes and sorting

* feat: add `isDisabled` in context from Fieldset to Field (#1911)

* Adds missing Tooltip functionality support to MenuButton and Status (#1912)

* feat: add tooltipText to MenuButton

* feat: rename `Button`'s `text` prop to `label

* fix: refactored Button to use useMuiProps hook

* feat: add Tooltip capabilities to Status

* fix: button stories broken and menu button stories missing tooltip text

* fix!: allow major version bumps (#1913)

* build: bump versions for v1.0.0

* docs: update CHANGELOG for v1.0.0

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Edbury Enegren <[email protected]>
Co-authored-by: Edbury Enegren <[email protected]>
Co-authored-by: ui-okta <[email protected]>
Co-authored-by: Ganesh Somasundaram <[email protected]>
Co-authored-by: François Lehoux <[email protected]>
Co-authored-by: Jordan Koschei <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zihan Wang <[email protected]>
Co-authored-by: Queenie Chen <[email protected]>

* Launch day fixes (#1916)

* refactor: move alert components out of folder

* feat: add id to Box

* fix: update fieldset description margins

* docs: update the readmes

* chore: upgrade storybook (#1917)

* chore: upgrade storybook

* chore: upgrade additional packages

* Upgraded Lerna and conventional commit packages (#1919)

* feat: upgrade Lerna to v7

* feat: upgrades commitlint cli

* fix: upgrades commitlint plugins

* feat: upgrades conventional-changelog-conventionalcommits

* fix: removes lerna graduate commits

* fix: fixes GitHub CI deploy failure on a11y

* Merge v1.0.1 into develop (#1922)

* fix: revert Odyssey bundle exports (#1920)

fix: revert Odyssey exports changes

* fix: broken styles in MuiInputBase (#1921)

* build: bump versions for v1.0.2

* docs: update CHANGELOG for v1.0.2

* fix: update aria props passthrough

* feat: memoize Box and Typography

* feat: enable overflow and default MenuButton

* fix: add back isDisabled to MenuItem

* feat: add LTR-RTL button to support rtl languages (#1927)

* feat: adds semgrep static scan to the repo (#1930)

* fix(odyssey-react-mui): make Autocomplete option styles match Select

* fix(odyssey-react-mui): make Autocomplete option focus a11y-compliant

* chore: update hover colors on options

* chore: update MenuItem option focus color to match hover

* fix: remove useless isDestructive prop

* Fix multi-select checkbox (#1931)

fix: replace Select checkbox with MuiCheckbox

* docs: update CustomTheming with correct example (#1932)

* refactor(odyssey-react-mui): use IconButton within Form Fields

* fix(odyssey-react-mui): ensure headings pick up TypographyFamilyHeading

* fix: moves @emotion/styled and @emotion/react to dependencies (#1944)

* fix: move @emotion/styled and @emotion/react to dependencies

* fix: update README installation instructions

* refactor: move ScopedCssBaseline to OdysseyProvider (#1940)

* fix: adds branches back to Applitools (#1943)

* fix: add branches back to Applitools

* chore: testing branch name logging

* fix: removed explicit baseline

* fix: updated Applitools branch name

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Edbury Enegren <[email protected]>
Co-authored-by: Edbury Enegren <[email protected]>
Co-authored-by: ui-okta <[email protected]>
Co-authored-by: Ganesh Somasundaram <[email protected]>
Co-authored-by: François Lehoux <[email protected]>
Co-authored-by: Jordan Koschei <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zihan Wang <[email protected]>
Co-authored-by: Queenie Chen <[email protected]>
Co-authored-by: jordankoschei-okta <[email protected]>
  • Loading branch information
11 people authored Aug 28, 2023
1 parent 06d0b60 commit 2113964
Show file tree
Hide file tree
Showing 25 changed files with 225 additions and 106 deletions.
8 changes: 8 additions & 0 deletions .bacon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
test_suites:
- name: semgrep
script_path: /root/okta/odyssey/scripts
sort_order: "1"
timeout: "10"
script_name: semgrep
criteria: MERGE
queue_name: small
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/odyssey-react-mui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ This project follows semantic versioning conventions:
Install the package and peer dependencies:

```sh
yarn add @okta/odyssey-react-mui @emotion/react
yarn add @okta/odyssey-react-mui
```

Include fonts:
Expand Down
6 changes: 2 additions & 4 deletions packages/odyssey-react-mui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@
},
"dependencies": {
"@emotion/cache": "^11.10.5",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.11.0",
"@mui/lab": "^5.0.0-alpha.117",
"@mui/material": "^5.12.3",
Expand All @@ -78,8 +80,6 @@
"devDependencies": {
"@babel/cli": "^7.22.9",
"@babel/core": "^7.22.9",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@okta/browserslist-config-odyssey": "workspace:*",
"@okta/odyssey-babel-preset": "workspace:*",
"@okta/odyssey-icons": "workspace:*",
Expand Down Expand Up @@ -114,8 +114,6 @@
"yargs": "^17.7.2"
},
"peerDependencies": {
"@emotion/react": "^11",
"@emotion/styled": "^11",
"react": ">=17 <19",
"react-dom": ">=17 <19"
}
Expand Down
1 change: 1 addition & 0 deletions packages/odyssey-react-mui/src/Autocomplete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ const Autocomplete = <
<MuiAutocomplete
// AutoComplete is wrapped in a div within MUI which does not get the disabled attr. So this aria-disabled gets set in the div
aria-disabled={isDisabled}
disableCloseOnSelect={hasMultipleChoices}
disabled={isDisabled}
freeSolo={isCustomValueAllowed}
loading={isLoading}
Expand Down
9 changes: 6 additions & 3 deletions packages/odyssey-react-mui/src/Box.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import { Box as MuiBox, BoxProps as MuiBoxProps } from "@mui/material";
import { ReactNode, forwardRef } from "react";
import { ReactNode, forwardRef, memo } from "react";

export type BoxProps = {
children?: ReactNode;
Expand All @@ -20,7 +20,7 @@ export type BoxProps = {
sx?: MuiBoxProps["sx"];
};

export const Box = forwardRef<HTMLElement, BoxProps>(
const Box = forwardRef<HTMLElement, BoxProps>(
({ children, component, id, sx }, ref) => (
<MuiBox
ref={ref}
Expand All @@ -32,4 +32,7 @@ export const Box = forwardRef<HTMLElement, BoxProps>(
)
);

Box.displayName = "Box";
const MemoizedBox = memo(Box);
MemoizedBox.displayName = "Box";

export { MemoizedBox as Box };
17 changes: 15 additions & 2 deletions packages/odyssey-react-mui/src/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import { Button, buttonVariantValues, MenuItem, useUniqueId } from "./";
import { Divider, ListSubheader, Menu } from "@mui/material";
import { ChevronDownIcon } from "./icons.generated";
import { ChevronDownIcon, MoreIcon } from "./icons.generated";
import { memo, type ReactElement, useCallback, useMemo, useState } from "react";

import { MenuContext, MenuContextType } from "./MenuContext";
Expand Down Expand Up @@ -55,6 +55,10 @@ export type MenuButtonProps = {
* The id of the Button
*/
id?: string;
/**
* If the MenuButton is an overflow menu or standard menu.
*/
isOverflow?: boolean;
/**
* The tooltip text for the Button if it's icon-only
*/
Expand Down Expand Up @@ -84,8 +88,9 @@ const MenuButton = ({
buttonLabel = "",
buttonVariant = "secondary",
children,
endIcon = <ChevronDownIcon />,
endIcon: endIconProp,
id: idOverride,
isOverflow,
tooltipText,
}: MenuButtonProps) => {
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
Expand Down Expand Up @@ -115,6 +120,14 @@ const MenuButton = ({
[closeMenu, openMenu]
);

const endIcon = endIconProp ? (
endIconProp
) : isOverflow ? (
<MoreIcon />
) : (
<ChevronDownIcon />
);

return (
<div>
<Button
Expand Down
6 changes: 4 additions & 2 deletions packages/odyssey-react-mui/src/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export type MenuItemProps = {
*/
isSelected?: boolean;
/**
* If `true`, the menu item will be visually marked as destructive.
* If `true`, the menu item will be visually marked as disabled.
*/
isDestructive?: boolean;
isDisabled?: boolean;
/**
* Callback fired when the menu item is clicked.
*/
Expand All @@ -56,6 +56,7 @@ const MenuItem = ({
children,
hasInitialFocus,
isSelected,
isDisabled,
onClick: onClickProp,
value,
variant = "default",
Expand All @@ -75,6 +76,7 @@ const MenuItem = ({
/* eslint-disable-next-line jsx-a11y/no-autofocus */
autoFocus={hasInitialFocus}
selected={isSelected}
disabled={isDisabled}
value={value}
onClick={onClick}
className={
Expand Down
15 changes: 9 additions & 6 deletions packages/odyssey-react-mui/src/OdysseyProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

import { memo, ReactNode } from "react";
import { ScopedCssBaseline } from "@mui/material";

import {
OdysseyCacheProvider,
Expand Down Expand Up @@ -45,12 +46,14 @@ const OdysseyProvider = ({
themeOverride={themeOverride}
designTokensOverride={designTokensOverride}
>
<OdysseyTranslationProvider
languageCode={languageCode}
translationOverrides={translationOverrides}
>
{children}
</OdysseyTranslationProvider>
<ScopedCssBaseline>
<OdysseyTranslationProvider
languageCode={languageCode}
translationOverrides={translationOverrides}
>
{children}
</OdysseyTranslationProvider>
</ScopedCssBaseline>
</OdysseyThemeProvider>
</OdysseyCacheProvider>
);
Expand Down
10 changes: 4 additions & 6 deletions packages/odyssey-react-mui/src/OdysseyThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from "@mui/material/styles";
import { memo, ReactNode, useMemo } from "react";

import { ScopedCssBaseline, ThemeOptions } from "@mui/material";
import { ThemeOptions } from "@mui/material";
import { deepmerge } from "@mui/utils";
import { createOdysseyMuiTheme, DesignTokensOverride } from "./theme";
import * as Tokens from "@okta/odyssey-design-tokens";
Expand Down Expand Up @@ -49,11 +49,9 @@ const OdysseyThemeProvider = ({

return (
<MuiThemeProvider theme={customOdysseyTheme ?? odysseyTheme}>
<ScopedCssBaseline>
<OdysseyDesignTokensContext.Provider value={odysseyTokens}>
{children}
</OdysseyDesignTokensContext.Provider>
</ScopedCssBaseline>
<OdysseyDesignTokensContext.Provider value={odysseyTokens}>
{children}
</OdysseyDesignTokensContext.Provider>
</MuiThemeProvider>
);
};
Expand Down
14 changes: 6 additions & 8 deletions packages/odyssey-react-mui/src/PasswordField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and limitations under the License.
*/

import { InputAdornment, InputBase } from "@mui/material";
import { InputAdornment, InputBase, IconButton } from "@mui/material";
import {
ChangeEventHandler,
FocusEventHandler,
Expand All @@ -21,7 +21,6 @@ import {
} from "react";

import { ShowIcon, HideIcon } from "./icons.generated";
import { Button } from "./Button";
import { Field } from "./Field";

export type PasswordFieldProps = {
Expand Down Expand Up @@ -122,13 +121,12 @@ const PasswordField = forwardRef<HTMLInputElement, PasswordFieldProps>(
autoFocus={hasInitialFocus}
endAdornment={
<InputAdornment position="end">
<Button
ariaLabel="toggle password visibility"
endIcon={inputType === "password" ? <ShowIcon /> : <HideIcon />}
<IconButton
aria-label="toggle password visibility"
onClick={togglePasswordVisibility}
size="small"
variant="floating"
/>
>
{inputType === "password" ? <ShowIcon /> : <HideIcon />}
</IconButton>
</InputAdornment>
}
id={id}
Expand Down
16 changes: 7 additions & 9 deletions packages/odyssey-react-mui/src/SearchField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/

import { useState, useEffect } from "react";
import { InputAdornment, InputBase } from "@mui/material";
import { InputAdornment, InputBase, IconButton } from "@mui/material";
import {
ChangeEventHandler,
FocusEventHandler,
Expand All @@ -23,7 +23,6 @@ import {

import { CloseCircleFilledIcon, SearchIcon } from "./icons.generated";
import { Field } from "./Field";
import { Button } from "./Button";

export type SearchFieldProps = {
/**
Expand Down Expand Up @@ -123,15 +122,14 @@ const SearchField = forwardRef<HTMLInputElement, SearchFieldProps>(
endAdornment={
uncontrolledValue && (
<InputAdornment position="end">
<Button
ariaLabel="Clear"
isDisabled={isDisabled}
label=""
<IconButton
aria-label="Clear"
disabled={isDisabled}
onClick={onClear}
size="small"
startIcon={<CloseCircleFilledIcon />}
variant="floating"
/>
>
<CloseCircleFilledIcon />
</IconButton>
</InputAdornment>
)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/odyssey-react-mui/src/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ import { ReactNode, forwardRef, memo, useCallback, useState } from "react";
import {
Box,
Chip,
Checkbox as MuiCheckbox,
ListSubheader,
MenuItem,
Select as MuiSelect,
SelectChangeEvent,
} from "@mui/material";
import { SelectProps as MuiSelectProps } from "@mui/material";
import { Checkbox } from "./Checkbox";
import { Field } from "./Field";

export type SelectOption = {
Expand Down Expand Up @@ -205,7 +205,7 @@ const Select = forwardRef<HTMLSelectElement, SelectProps>(
return (
<MenuItem key={option.value} value={option.value}>
{isMultiSelect && (
<Checkbox isDefaultChecked={selectedValue.includes(option.value)} />
<MuiCheckbox checked={selectedValue.includes(option.value)} />
)}
{option.text}
</MenuItem>
Expand Down
Loading

0 comments on commit 2113964

Please sign in to comment.