diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index c260bbe6cd..0000000000 --- a/.eslintignore +++ /dev/null @@ -1,4 +0,0 @@ -.yarn/ -utilities/icons/src/react/**/*.js -**/locales/ -*.d.ts diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index d35a160c28..0000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,91 +0,0 @@ -const cliStyle = require('@dhis2/cli-style') - -const config = { - extends: [cliStyle.config.eslintReact], - globals: { - cy: 'readonly', - Cypress: 'readonly', - }, - rules: { - 'import/no-webpack-loader-syntax': 'error', - 'import/no-useless-path-segments': 'error', - 'react/no-unknown-property': ['error', { ignore: ['jsx', 'global'] }], - }, - overrides: [ - { - files: [ - '*.stories.{js,jsx,ts,tsx}', - '*.stories.e2e.{js,jsx,ts,tsx}', - '**/__stories__/*.{js,jsx,ts,tsx}', - ], - rules: { - 'import/no-extraneous-dependencies': 'off', - 'react/display-name': 'off', - 'react/prop-types': 'off', - }, - }, - { - files: [ - 'components/*/src/**/*.{js,jsx,ts,tsx}', - 'collections/*/src/**/*.{js,jsx,ts,tsx}', - 'utilities/*/src/**/*.{js,jsx,ts,tsx}', - ], - excludedFiles: [ - '**/features/**/*.{js,jsx,ts,tsx}', - '**/__tests__/**/*.{js,jsx,ts,tsx}', - '*.test.{js,jsx,ts,tsx}', - '*.stories*.{js,jsx,ts,tsx}', - '**/__stories__/*.{js,jsx,ts,tsx}', - '**/__stories__/**/*.{js,jsx,ts,tsx}', - '*.d.ts', - ], - rules: { - 'import/no-extraneous-dependencies': 'error', - }, - }, - { - files: ['**/*.{ts,tsx}'], - parser: require.resolve('@typescript-eslint/parser'), - // TypeScript ambient namespaces, which `no-undef` does not know. - globals: { JSX: 'readonly', NodeJS: 'readonly' }, - settings: { - // Lets `import/no-unresolved` follow an extensionless relative - // import to a `.ts`/`.tsx` file. - 'import/resolver': { - node: { extensions: ['.js', '.jsx', '.ts', '.tsx'] }, - }, - }, - rules: { - /* - * TypeScript sources import siblings without an extension - * (`./ou-tree` resolves to `ou-tree.tsx`), the inverse of the - * `ignorePackages` rule the JavaScript packages follow. - */ - 'import/extensions': [ - 'error', - 'never', - { ts: 'never', tsx: 'never' }, - ], - }, - }, - ], -} - -// Run cpu intensive checks only on CI -const isCI = !!process.env.CI - -if (isCI) { - if (!config.rules) { - config.rules = {} - } - - config.rules['import/no-cycle'] = 'error' - config.rules['import/no-self-import'] = 'error' - - // for newer versions of import plugin - //config.rules['import/no-internal-modules'] = 'error' - //config.rules['import/no-relative-parent-imports'] = 'error' - //config.rules['import/no-relative-packages'] = 'error' -} - -module.exports = config diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index d2b752c157..f7f6525af4 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -10,15 +10,15 @@ _text_ ### Known issues -- [ ] _issue_ +- [ ] _issue_ --- ### Checklist -- [ ] API docs are generated -- [ ] Tests were added -- [ ] Storybook demos were added +- [ ] API docs are generated +- [ ] Tests were added +- [ ] Storybook demos were added _All points above should be relevant for feature PRs. For bugfixes, some points might not be relevant. In that case, just check them anyway to signal the work is done._ diff --git a/.github/workflows/dhis2-deploy-netlify.yml b/.github/workflows/dhis2-deploy-netlify.yml index ec71f6c11f..966d47aafd 100644 --- a/.github/workflows/dhis2-deploy-netlify.yml +++ b/.github/workflows/dhis2-deploy-netlify.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x # We use Netlify only for deploy previews, production docs are hosted at developers.dhis2.org # Don't build anything, just copy the _redirects file into the dist directory diff --git a/.github/workflows/dhis2-preview-pr.yml b/.github/workflows/dhis2-preview-pr.yml index 288f7d78c2..68166392fb 100644 --- a/.github/workflows/dhis2-preview-pr.yml +++ b/.github/workflows/dhis2-preview-pr.yml @@ -24,7 +24,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - run: yarn install --frozen-lockfile diff --git a/.github/workflows/dhis2-verify-commits.yml b/.github/workflows/dhis2-verify-commits.yml index e783d3c628..c492e1c9b7 100644 --- a/.github/workflows/dhis2-verify-commits.yml +++ b/.github/workflows/dhis2-verify-commits.yml @@ -11,15 +11,17 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - run: yarn install --frozen-lockfile - - id: commitlint - run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") - - uses: JulienKode/pull-request-name-linter-action@v0.5.0 - with: - configuration-path: ${{ steps.commitlint.outputs.config_path }} + + # The title is untrusted input, so it reaches the shell through + # the environment. + - name: Lint pull request title + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: echo "$PR_TITLE" | yarn commitlint lint-commits: runs-on: ubuntu-latest @@ -29,12 +31,8 @@ jobs: fetch-depth: 0 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - run: yarn install --frozen-lockfile - - id: commitlint - run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)") - - uses: wagoid/commitlint-github-action@v5 - with: - configFile: ${{ steps.commitlint.outputs.config_path }} + - uses: wagoid/commitlint-github-action@v6 diff --git a/.github/workflows/dhis2-verify-lib.yml b/.github/workflows/dhis2-verify-lib.yml index 20e67ef200..0b51670577 100644 --- a/.github/workflows/dhis2-verify-lib.yml +++ b/.github/workflows/dhis2-verify-lib.yml @@ -36,7 +36,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - run: | @@ -61,7 +61,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - uses: actions/download-artifact@v4 @@ -87,7 +87,7 @@ jobs: - uses: actions/checkout@v2 - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - uses: actions/download-artifact@v4 @@ -118,7 +118,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x - uses: actions/download-artifact@v4 with: @@ -178,7 +178,7 @@ jobs: token: ${{ env.GH_TOKEN }} - uses: actions/setup-node@v3 with: - node-version: 20.x + node-version: 24.x cache: 'yarn' - uses: dhis2/action-commit-signing@v1 with: diff --git a/.github/workflows/generate-and-upload-bom.yml b/.github/workflows/generate-and-upload-bom.yml index e739072ec4..2fc6d94962 100644 --- a/.github/workflows/generate-and-upload-bom.yml +++ b/.github/workflows/generate-and-upload-bom.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 20.x + node-version: 24.x - name: Install Dependencies run: yarn install --frozen-lockfile diff --git a/.hooks/.gitignore b/.hooks/.gitignore deleted file mode 100644 index 31354ec138..0000000000 --- a/.hooks/.gitignore +++ /dev/null @@ -1 +0,0 @@ -_ diff --git a/.hooks/commit-msg b/.hooks/commit-msg index 9975a81880..8568db1f2f 100755 --- a/.hooks/commit-msg +++ b/.hooks/commit-msg @@ -1,4 +1,3 @@ #!/bin/sh -. "$(dirname "$0")/_/husky.sh" -yarn d2-style check commit "$1" +yarn commitlint --edit "$1" diff --git a/.hooks/pre-commit b/.hooks/pre-commit index 50ae359a69..a14ef675d9 100755 --- a/.hooks/pre-commit +++ b/.hooks/pre-commit @@ -1,4 +1,20 @@ #!/bin/sh -. "$(dirname "$0")/_/husky.sh" +set -e -yarn d2-style check --staged +staged_files_without_deletions() { + git diff --cached --name-only --diff-filter=d | grep -E "$1" || true +} + +check() { + files=$1 + shift + + if [ -n "$files" ]; then + printf '%s\n' "$files" | tr '\n' '\0' | xargs -0 "$@" + fi +} + +check "$(staged_files_without_deletions '\.(js|jsx|ts|tsx)$')" \ + yarn eslint --no-warn-ignored +check "$(staged_files_without_deletions '\.(js|jsx|ts|tsx|md|json|yml|html|css)$')" \ + yarn prettier --check --ignore-unknown diff --git a/.nvmrc b/.nvmrc index 9a2a0e219c..54c65116f1 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20 +v24 diff --git a/.prettierignore b/.prettierignore index efc07066f8..7d691955fb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,12 +1,20 @@ .yarn/ +.d2/ **/locales/ cypress/assets/*.js # Documentation files that are generated on CI API.md +# Generated from the SVG sources by `yarn setup` +icons/src/react/ + # Build output, generated locally by `yarn build` (docusaurus site into dist/, # its build cache into docs/.docusaurus/). Without these, `yarn build` followed # by `yarn lint` fails on generated files nobody wrote. dist/ +**/build/ **/.docusaurus/ + +# Release notes, written by semantic-release +CHANGELOG.md diff --git a/.prettierrc.js b/.prettierrc.js deleted file mode 100644 index def7934e3d..0000000000 --- a/.prettierrc.js +++ /dev/null @@ -1,5 +0,0 @@ -const { config } = require('@dhis2/cli-style') - -module.exports = { - ...require(config.prettier), -} diff --git a/.prettierrc.mjs b/.prettierrc.mjs new file mode 100644 index 0000000000..b5f556b791 --- /dev/null +++ b/.prettierrc.mjs @@ -0,0 +1,6 @@ +import config from '@dhis2/config-prettier' + +/** + * @type {import("prettier").Config} + */ +export default { ...config } diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index e05806ffee..75e82a6bad 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -54,16 +54,16 @@ In React fashion we rely on composition to enable the goal of having This means that: -- complex components are constructed by connecting several simple - components, +- complex components are constructed by connecting several simple + components, -- a consumer must have direct access to the building blocks that make up - composed components, +- a consumer must have direct access to the building blocks that make up + composed components, -- components need to be isolated from each other with a well defined - interface and scope, +- components need to be isolated from each other with a well defined + interface and scope, -- components needs to be reusable across many contexts. +- components needs to be reusable across many contexts. > _Note_: Components are published under the `@dhis2-ui` scope, and will > eventually be considered part of the external API as things stabilize. @@ -110,6 +110,6 @@ through that collection. UI uses two different scopes on NPM to publish: -- `@dhis2/ui*`: Collections and utilities. +- `@dhis2/ui*`: Collections and utilities. -- `@dhis2-ui/*`: Component packages are published under this scope. +- `@dhis2-ui/*`: Component packages are published under this scope. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 494031bedc..f2c941e59e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -38,9 +38,9 @@ Our commit message standard is one of the areas that trips up first-time contrib In practice, this means that you should have a prefix and a description, i.e. `fix: make clear button not focusable`, notice: -- The `fix` (or `feat` or `docs` etc..) prefix, followed by a colon `:` and a `space`, then the message starts with a lower-case letter - all of these parts are important, even the space! Otherwise your PR will fail on CI checks. +- The `fix` (or `feat` or `docs` etc..) prefix, followed by a colon `:` and a `space`, then the message starts with a lower-case letter - all of these parts are important, even the space! Otherwise your PR will fail on CI checks. -- You can optionally - and we encourage you to do so - add a scope to the prefix, this can be the UI component you worked on, so `fix(transfer): make clear button not focusable`. Some people also choose to use the JIRA ticket number for the scope. +- You can optionally - and we encourage you to do so - add a scope to the prefix, this can be the UI component you worked on, so `fix(transfer): make clear button not focusable`. Some people also choose to use the JIRA ticket number for the scope. Additionally, some [general advice](https://www.gitkraken.com/learn/git/best-practices/git-commit-message#quick-git-commit-message-tips) is to: @@ -61,18 +61,18 @@ These are not enforced by CI, but they help keep the commit history clean, and t Try in your PR to give as much information and context as possible to the reviewer. Some things to keep in mind: -- Add a link to the JIRA ticket: this makes it easier to find the ticket, but also - more importantly - it allows JIRA automation to link the tickcet to your PR. -- Add a short description of your changes - - if you made some coding or design decisions you'd like to highlight, then expand on these decisions in the description -- Add a video or screenshot of the change. +- Add a link to the JIRA ticket: this makes it easier to find the ticket, but also - more importantly - it allows JIRA automation to link the tickcet to your PR. +- Add a short description of your changes + - if you made some coding or design decisions you'd like to highlight, then expand on these decisions in the description +- Add a video or screenshot of the change. These are some examples of good PRs: -- [https://github.com/dhis2/ui/pull/1694](https://github.com/dhis2/ui/pull/1694) +- [https://github.com/dhis2/ui/pull/1694](https://github.com/dhis2/ui/pull/1694) -- [https://github.com/dhis2/ui/pull/1629](https://github.com/dhis2/ui/pull/1629) -- [https://github.com/dhis2/ui/pull/1672](https://github.com/dhis2/ui/pull/1672) -- [https://github.com/dhis2/ui/pull/1681](https://github.com/dhis2/ui/pull/1681) +- [https://github.com/dhis2/ui/pull/1629](https://github.com/dhis2/ui/pull/1629) +- [https://github.com/dhis2/ui/pull/1672](https://github.com/dhis2/ui/pull/1672) +- [https://github.com/dhis2/ui/pull/1681](https://github.com/dhis2/ui/pull/1681) Note that these good PRs are not about having a long and verbose description - sometimes that makes the PR harder to review. Just try and put yourself in the reviewers' shoes and make their lives as easy as possible, so they understand the PR context and approach (the How and the Why). @@ -80,18 +80,18 @@ Note that these good PRs are not about having a long and verbose description - s Make sure you followed our coding conventions in the repo. While this might vary between repos, since there are some legacy ones, here some general high-level things to look for: -- Your code is well formatted - run `yarn format` at the end of your work - - This should be done automatically in your IDE, but some of our legacy repos are not well configured. -- Add relevant tests to your PR, and ensure that all tests are passing -- Ensure sure the documentation was updated, especially for library projects (like UI or app-platform). +- Your code is well formatted - run `yarn format` at the end of your work + - This should be done automatically in your IDE, but some of our legacy repos are not well configured. +- Add relevant tests to your PR, and ensure that all tests are passing +- Ensure sure the documentation was updated, especially for library projects (like UI or app-platform). ## Report an issue We track our issues with Jira at https://jira.dhis2.org under the [LIBS](https://jira.dhis2.org/projects/LIBS) project. You can use the links below to open an issue with the relevant fields prepopulated: -- [Bug](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10006&components=11015) -- [Feature](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10300&components=11015) -- [Task](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10003&components=11015) +- [Bug](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10006&components=11015) +- [Feature](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10300&components=11015) +- [Task](https://jira.dhis2.org/secure/CreateIssueDetails!init.jspa?pid=10700&issuetype=10003&components=11015) ## Automated releases @@ -99,15 +99,15 @@ We use semantic release to publish the changes to `@dhis2/ui` automatically. Thi To allow semantic release to analyse our commits we use [conventional commits](https://www.conventionalcommits.org) for our allowed commit types. See [this list](https://github.com/commitizen/conventional-commit-types/blob/master/index.json) for a summary of the available types and their usage. Since semantic release analyses commits, preserving commit hashes between branches is sometimes important. There are [recipes](https://github.com/semantic-release/semantic-release/blob/master/docs/recipes/distribution-channels.md#publishing-on-distribution-channels) available in the semantic-release repository for most scenarios, but for convenience these are the merge types you can use for the two most common scenarios: -- When merging from a feature branch to a release branch we recommend you use a squash merge. A regular merge, squash merge, and rebase merge are all technically ok, but a squash merge ensures that only the PR title and squash commit message will be used for generating the changelog. -- When merging from a release branch to another release branch you must use a regular merge so that the commit hashes are preserved. +- When merging from a feature branch to a release branch we recommend you use a squash merge. A regular merge, squash merge, and rebase merge are all technically ok, but a squash merge ensures that only the PR title and squash commit message will be used for generating the changelog. +- When merging from a release branch to another release branch you must use a regular merge so that the commit hashes are preserved. ## Adding icons to ui-icons The `@dhis2/ui-icons` build process will take care of most things for you. If you want to add an icon you can follow these steps: -- Add the icon as an svg to `packages/icons/src/svg` -- Ensure that you're matching the existing naming conventions, i.e. kebab-case and icon name followed by the variant and then the size -- The svg does not have to be optimized, the build process already includes svgo -- Any path fill colors should be set to `#010101` so that we can set all path fills to `currentColor` -- Use `feat` as your conventional commit type, so that the change will be published automatically when the PR is merged +- Add the icon as an svg to `packages/icons/src/svg` +- Ensure that you're matching the existing naming conventions, i.e. kebab-case and icon name followed by the variant and then the size +- The svg does not have to be optimized, the build process already includes svgo +- Any path fill colors should be set to `#010101` so that we can set all path fills to `currentColor` +- Use `feat` as your conventional commit type, so that the change will be published automatically when the PR is merged diff --git a/README.md b/README.md index dab1085fcf..1aa1f9770a 100644 --- a/README.md +++ b/README.md @@ -24,9 +24,9 @@ We recommend that you use `@dhis2/ui` as the entrypoint for all imports of our f `@dhis2/ui` is based on the specifications in our design-system: https://github.com/dhis2/design-system. See the documentation there for more information. -- Docs: [Developer Portal](https://developers.dhis2.org/docs/tutorials/ui-library) -- Live demo: [Demo](https://developers.dhis2.org/demo/) -- Components reference: [Components](https://developers.dhis2.org/docs/ui/webcomponents) +- Docs: [Developer Portal](https://developers.dhis2.org/docs/tutorials/ui-library) +- Live demo: [Demo](https://developers.dhis2.org/demo/) +- Components reference: [Components](https://developers.dhis2.org/docs/ui/webcomponents) ## Bundled packages @@ -92,8 +92,8 @@ For the `yarn start` command, you can run it at the top-level directory if you a To record e2e tests in Cypress Cloud, you can use one of the following methods based on your needs: -- **Commit Message**: Include `[e2e record]` in your commit messages to activate recording. -- **GitHub Labels**: Apply the `e2e record` label to your pull request to trigger recording. +- **Commit Message**: Include `[e2e record]` in your commit messages to activate recording. +- **GitHub Labels**: Apply the `e2e record` label to your pull request to trigger recording. This setup helps in managing Cypress Cloud credits more efficiently, ensuring recordings are only made when explicitly required. diff --git a/collections/forms/i18n/en.pot b/collections/forms/i18n/en.pot index 5f981eec3a..2f8d8eb535 100644 --- a/collections/forms/i18n/en.pot +++ b/collections/forms/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2026-06-29T22:33:55.937Z\n" -"PO-Revision-Date: 2026-06-29T22:33:55.938Z\n" +"POT-Creation-Date: 2026-09-14T14:58:22.742Z\n" +"PO-Revision-Date: 2026-09-14T14:58:22.742Z\n" msgid "Upload file" msgstr "Upload file" diff --git a/collections/forms/src/MultiSelectFieldFF/MultiSelectFieldFF.js b/collections/forms/src/MultiSelectFieldFF/MultiSelectFieldFF.js index 823c306a47..cb2d86ab2f 100644 --- a/collections/forms/src/MultiSelectFieldFF/MultiSelectFieldFF.js +++ b/collections/forms/src/MultiSelectFieldFF/MultiSelectFieldFF.js @@ -12,6 +12,8 @@ import { } from '../shared/helpers.js' import { inputPropType, metaPropType } from '../shared/propTypes.js' +const defaultOptions = [] + export const MultiSelectFieldFF = ({ error, input, @@ -19,7 +21,7 @@ export const MultiSelectFieldFF = ({ meta, onBlur, onFocus, - options = [], + options = defaultOptions, showLoadingStatus, showValidStatus, valid, diff --git a/commitlint.config.mjs b/commitlint.config.mjs new file mode 100644 index 0000000000..42df4facd8 --- /dev/null +++ b/commitlint.config.mjs @@ -0,0 +1,6 @@ +export default { + extends: ['@commitlint/config-conventional'], + // semantic-release appends the changelog to a release commit, which + // pushes it past the header length limit. + ignores: [(commit) => commit.includes('[skip release]')], +} diff --git a/components/button/types/index.d.ts b/components/button/types/index.d.ts index 3ded9d0311..747ef30e59 100644 --- a/components/button/types/index.d.ts +++ b/components/button/types/index.d.ts @@ -13,7 +13,7 @@ type ButtonEventHandler = ( ) => void type ButtonOpenEventHandler< - Event extends React.SyntheticEvent = React.MouseEvent + Event extends React.SyntheticEvent = React.MouseEvent, > = (arg0: ButtonEventPayload & { open: boolean }, event: Event) => void export interface BaseButtonProps { diff --git a/components/calendar/src/calendar-input/calendar-input.js b/components/calendar/src/calendar-input/calendar-input.js index fd722cf43b..75d9e4a4c5 100644 --- a/components/calendar/src/calendar-input/calendar-input.js +++ b/components/calendar/src/calendar-input/calendar-input.js @@ -207,9 +207,9 @@ export const CalendarInput = ({ } .calendar-clear-button { position: absolute; - inset-inline-end: ${rest.error || rest.warning - ? '36px' - : '6px'}; + inset-inline-end: ${ + rest.error || rest.warning ? '36px' : '6px' + }; inset-block-start: 27px; } .calendar-clear-button.with-icon { diff --git a/components/calendar/src/stories/calendar-input.prod.stories.js b/components/calendar/src/stories/calendar-input.prod.stories.js index 5239d0401f..338ccfa5bd 100644 --- a/components/calendar/src/stories/calendar-input.prod.stories.js +++ b/components/calendar/src/stories/calendar-input.prod.stories.js @@ -26,19 +26,18 @@ export default { const buildCalendar = ({ date, locale, calendar }) => - () => - ( - {}} - /> - ) + () => ( + {}} + /> + ) export const EthiopicWithAmharic = buildCalendar({ calendar: 'ethiopic', diff --git a/components/chip/src/chip.js b/components/chip/src/chip.js index c06364b3b3..ced97156be 100644 --- a/components/chip/src/chip.js +++ b/components/chip/src/chip.js @@ -94,7 +94,8 @@ const Chip = ({ } .dragging { - box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), + box-shadow: + 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12); } @@ -102,12 +103,12 @@ const Chip = ({ diff --git a/components/header-bar/src/debug-info/debug-info-menu-item.js b/components/header-bar/src/debug-info/debug-info-menu-item.js index 89e7cd759a..59f93d4170 100644 --- a/components/header-bar/src/debug-info/debug-info-menu-item.js +++ b/components/header-bar/src/debug-info/debug-info-menu-item.js @@ -33,10 +33,10 @@ export const DebugInfoMenuItem = ({ hideProfileMenu, showDebugInfoModal }) => { appName: debugInfo.app_name, }) : debugInfo.app_version - ? i18n.t('App {{appVersion}}', { - appVersion: debugInfo.app_version, - }) - : i18n.t('App version unknown')} + ? i18n.t('App {{appVersion}}', { + appVersion: debugInfo.app_version, + }) + : i18n.t('App version unknown')} {} diff --git a/components/select/types/index.d.ts b/components/select/types/index.d.ts index f9c163ac54..0f63772394 100644 --- a/components/select/types/index.d.ts +++ b/components/select/types/index.d.ts @@ -16,7 +16,7 @@ export interface MultiSelectEventPayload extends BaseEventPayload { type SelectEventHandler< T extends BaseEventPayload, - Event extends React.SyntheticEvent + Event extends React.SyntheticEvent, > = (payload: T, event: Event) => void export type SelectOnBlurHandler = diff --git a/components/selector-bar/src/selector-bar-item/selector-bar-item.e2e.stories.js b/components/selector-bar/src/selector-bar-item/selector-bar-item.e2e.stories.js index 38d5f3167c..343e86b6af 100644 --- a/components/selector-bar/src/selector-bar-item/selector-bar-item.e2e.stories.js +++ b/components/selector-bar/src/selector-bar-item/selector-bar-item.e2e.stories.js @@ -18,34 +18,31 @@ const createStateDecorator = (args) => { const createStory = () => - (_, { open, setOpen, selected, setSelected }) => - ( - value === selected)?.label || '' - } + (_, { open, setOpen, selected, setSelected }) => ( + value === selected)?.label || ''} + > + { + setSelected(nextSelected) + setOpen(false) + }} > - { - setSelected(nextSelected) - setOpen(false) - }} - > - {options.map(({ value, label }) => ( - - ))} - - - ) + {options.map(({ value, label }) => ( + + ))} + + + ) export default { title: 'SelectorBarItem' } diff --git a/components/sharing-dialog/src/access-list/list-item-context.js b/components/sharing-dialog/src/access-list/list-item-context.js index 894fa4a73a..00eedf212b 100644 --- a/components/sharing-dialog/src/access-list/list-item-context.js +++ b/components/sharing-dialog/src/access-list/list-item-context.js @@ -17,7 +17,7 @@ const LABELS = { export const ListItemContext = ({ target, id }) => { return ( <> -

{target === SHARE_TARGET_USER ? id : LABELS[target] ?? ''}

+

{target === SHARE_TARGET_USER ? id : (LABELS[target] ?? '')}