From b8c37ccb15bf541050c29df12017538b941e277f Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Mon, 11 May 2026 13:00:35 -0700 Subject: [PATCH 1/7] chore: Migrate from eslint to oxlint --- .oxlintrc.json | 391 ++++ eslint.config.mjs | 505 ----- package.json | 15 +- packages/@react-spectrum/s2/style/tokens.ts | 2 +- packages/dev/eslint-plugin-rsp-rules/index.js | 9 +- .../dev/eslint-plugin-rsp-rules/package.json | 5 +- .../eslint-plugin-rsp-rules/rules}/imports.js | 29 +- .../rules}/pure-render.js | 18 +- .../rules/use-layout-effect-rule.js | 9 +- packages/dev/mcp/s2/scripts/build-data.mjs | 2 +- packages/dev/s2-docs/src/IconSearchView.tsx | 2 +- packages/dev/s2-docs/src/color.macro.ts | 2 +- .../dev/s2-docs/src/illustrations/generic1.ts | 2 +- .../dev/s2-docs/src/illustrations/generic2.ts | 2 +- .../dev/s2-docs/src/illustrations/linear.ts | 2 +- .../src/content-script.js | 4 +- .../style-macro-chrome-plugin/src/devtool.js | 6 +- .../react-aria-components/src/ListBox.tsx | 38 +- packages/react-aria-components/src/Tabs.tsx | 6 +- .../src/collections/CollectionBuilder.tsx | 2 +- packages/react-aria/src/ssr/SSRProvider.tsx | 8 +- packages/react-aria/src/utils/useDeepMemo.ts | 2 +- packages/react-aria/src/utils/useDrag1D.ts | 2 +- .../react-aria/test/utils/mergeProps.test.jsx | 6 +- yarn.lock | 1659 +++-------------- 25 files changed, 728 insertions(+), 2000 deletions(-) create mode 100644 .oxlintrc.json delete mode 100644 eslint.config.mjs rename {bin => packages/dev/eslint-plugin-rsp-rules/rules}/imports.js (79%) rename {bin => packages/dev/eslint-plugin-rsp-rules/rules}/pure-render.js (86%) rename bin/useLayoutEffectRule.js => packages/dev/eslint-plugin-rsp-rules/rules/use-layout-effect-rule.js (85%) diff --git a/.oxlintrc.json b/.oxlintrc.json new file mode 100644 index 00000000000..70c61a932a3 --- /dev/null +++ b/.oxlintrc.json @@ -0,0 +1,391 @@ +{ + "$schema": "./node_modules/oxlint/configuration_schema.json", + "plugins": ["react", "jsx-a11y"], + "jsPlugins": [ + "eslint-plugin-rsp-rules", + { + "name": "monorepo", + "specifier": "@jdb8/eslint-plugin-monorepo" + }, + { + "name": "react-hooks-js", + "specifier": "eslint-plugin-react-hooks" + } + ], + "categories": { + "correctness": "off" + }, + "env": { + "builtin": true, + "browser": true, + "node": true, + "es6": true, + "commonjs": true, + "mocha": true, + "jest": true + }, + "globals": { + "importSpectrumCSS": "readonly", + "JSX": "readonly", + "NodeJS": "readonly", + "AsyncIterable": "readonly", + "FileSystemFileEntry": "readonly", + "FileSystemDirectoryEntry": "readonly", + "FileSystemEntry": "readonly", + "IS_REACT_ACT_ENVIRONMENT": "readonly" + }, + "settings": { + "jsdoc": { + "ignorePrivate": true, + "publicFunctionsOnly": true + }, + "react": { + "version": "18.3.1" + } + }, + "ignorePatterns": [ + "packages/@react-aria/i18n/server", + "packages/@spectrum-icons/color/**/*", + "packages/@spectrum-icons/ui/**/*", + "packages/@spectrum-icons/workflow/**/*", + "packages/@spectrum-icons/illustrations/**/*", + "packages/@spectrum-icons/express/**/*", + "**/node_modules", + "packages/*/*/dist", + "packages/*/*/i18n", + "packages/react-aria/dist", + "packages/react-aria/i18n", + "packages/react-aria-components/dist", + "packages/react-aria-components/i18n", + "packages/react-stately/dist", + "packages/dev/storybook-builder-parcel/preview.js", + "packages/dev/optimize-locales-plugin/LocalesPlugin.d.ts", + "examples/**/*", + "starters/**/*", + "scripts/icon-builder-fixture/**/*", + "packages/@react-spectrum/s2/icon.d.ts", + "packages/@react-spectrum/s2/spectrum-illustrations", + "packages/dev/parcel-config-storybook/*", + "packages/dev/parcel-resolver-storybook/*", + "packages/dev/parcel-transformer-storybook/*", + "packages/dev/storybook-builder-parcel/*", + "packages/dev/storybook-react-parcel/*", + "packages/dev/s2-docs/pages/**", + "packages/dev/mcp/*/dist", + "packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/**" + ], + "rules": { + // eslint recommended rules + "constructor-super": "error", + "for-direction": "error", + "getter-return": "error", + "no-async-promise-executor": "error", + "no-case-declarations": "error", + "no-class-assign": "error", + "no-compare-neg-zero": "error", + "no-cond-assign": "error", + "no-const-assign": "error", + "no-constant-binary-expression": "error", + "no-constant-condition": "error", + "no-control-regex": "error", + "no-debugger": "error", + "no-delete-var": "error", + "no-dupe-class-members": "error", + "no-dupe-else-if": "error", + "no-dupe-keys": "error", + "no-duplicate-case": "error", + "no-empty": "error", + "no-empty-character-class": "error", + "no-empty-pattern": "error", + "no-empty-static-block": "error", + "no-ex-assign": "error", + "no-extra-boolean-cast": "error", + "no-func-assign": "error", + "no-global-assign": "error", + "no-import-assign": "error", + "no-invalid-regexp": "error", + "no-irregular-whitespace": ["error"], + "no-loss-of-precision": "error", + "no-misleading-character-class": "error", + "no-new-native-nonconstructor": "error", + "no-nonoctal-decimal-escape": "error", + "no-obj-calls": "error", + "no-prototype-builtins": "error", + "no-redeclare": [ + "error", + { + "builtinGlobals": false + } + ], + "no-regex-spaces": "error", + "no-self-assign": "error", + "no-setter-return": "error", + "no-shadow-restricted-names": "error", + "no-sparse-arrays": "error", + "no-this-before-super": "error", + "no-unexpected-multiline": "error", + "no-unreachable": "error", + "no-unsafe-finally": "error", + "no-unsafe-negation": "error", + "no-unsafe-optional-chaining": "error", + "no-unused-labels": "error", + "no-unused-vars": [ + "error", + { + "args": "none", + "vars": "all", + "varsIgnorePattern": "[rR]eact" + } + ], + "no-useless-backreference": "error", + "no-useless-catch": "error", + "no-useless-escape": "error", + "no-with": "error", + "require-yield": "error", + "use-isnan": "error", + "valid-typeof": "error", + // custom rules + "eqeqeq": ["error", "smart"], + "max-depth": ["warn", 4], + "radix": ["error", "always"], + "no-new-wrappers": "error", + "no-self-compare": "error", + "no-nested-ternary": "off", + "no-unneeded-ternary": "error", + "react/jsx-no-duplicate-props": "error", + "react/jsx-no-undef": "error", + "react/no-did-update-set-state": "error", + "react/no-unknown-property": [ + "error", + { + "ignore": ["prefix"] + } + ], + "react/react-in-jsx-scope": "error", + "react/jsx-boolean-value": "error", + "react/self-closing-comp": "error", + + // Core hooks rules + "react/rules-of-hooks": "error", + "react/exhaustive-deps": "warn", + + // React Compiler rules + "react-hooks-js/config": "error", + "react-hooks-js/error-boundaries": "error", + "react-hooks-js/component-hook-factories": "error", + "react-hooks-js/gating": "error", + "react-hooks-js/globals": "error", + "react-hooks-js/purity": "error", + "react-hooks-js/set-state-in-effect": "warn", + "react-hooks-js/set-state-in-render": "error", + "react-hooks-js/static-components": "error", + "react-hooks-js/unsupported-syntax": "warn", + "react-hooks-js/use-memo": "error", + "react-hooks-js/incompatible-library": "warn", + + "rsp-rules/no-react-key": ["error"], + "rsp-rules/sort-imports": ["error"], + "rsp-rules/no-non-shadow-contains": ["error"], + "rsp-rules/safe-event-target": ["error"], + "rsp-rules/shadow-safe-active-element": ["error"], + "rsp-rules/faster-node-contains": ["error"], + "rsp-rules/imports": ["error"], + "rsp-rules/use-layout-effect-rule": ["error"], + "rsp-rules/pure-render": ["error"], + "jsx-a11y/alt-text": "error", + "jsx-a11y/anchor-has-content": "error", + "jsx-a11y/anchor-is-valid": "error", + "jsx-a11y/aria-activedescendant-has-tabindex": "error", + "jsx-a11y/aria-props": "error", + "jsx-a11y/aria-proptypes": "error", + "jsx-a11y/aria-role": "error", + "jsx-a11y/aria-unsupported-elements": "error", + "jsx-a11y/click-events-have-key-events": "error", + "jsx-a11y/heading-has-content": "error", + "jsx-a11y/html-has-lang": "error", + "jsx-a11y/iframe-has-title": "error", + "jsx-a11y/img-redundant-alt": "error", + "jsx-a11y/interactive-supports-focus": [ + "error", + { + "tabbable": ["button", "checkbox", "link", "searchbox", "spinbutton", "switch", "textbox"] + } + ], + "jsx-a11y/label-has-associated-control": [ + "error", + { + "assert": "either", + "depth": 3 + } + ], + "jsx-a11y/media-has-caption": "error", + "jsx-a11y/mouse-events-have-key-events": "error", + "jsx-a11y/no-access-key": "error", + "jsx-a11y/no-distracting-elements": "error", + "jsx-a11y/no-noninteractive-tabindex": [ + "error", + { + "tags": [], + "roles": ["alertdialog", "dialog", "tabpanel"] + } + ], + "jsx-a11y/no-redundant-roles": "error", + "jsx-a11y/no-static-element-interactions": [ + "error", + { + "handlers": ["onClick", "onMouseDown", "onMouseUp", "onKeyPress", "onKeyDown", "onKeyUp"] + } + ], + "jsx-a11y/role-has-required-aria-props": "error", + "jsx-a11y/role-supports-aria-props": "error", + "jsx-a11y/scope": "error", + "jsx-a11y/tabindex-no-positive": "error", + "monorepo/no-relative-import": "error" + }, + "overrides": [ + { + "files": ["packages/**/*.ts", "packages/**/*.tsx"], + "rules": { + "jsdoc/check-tag-names": [ + "error", + { + "definedTags": ["selector", "note"] + } + ], + "no-unused-vars": "error" + }, + "globals": { + "globalThis": "readonly" + }, + "plugins": ["jsdoc", "typescript"] + }, + { + "files": [ + "packages/@*/**/src/**/*.ts", + "packages/@*/**/src/**/*.tsx", + "packages/react-*/**/src/**/*.ts", + "packages/react-*/**/src/**/*.tsx", + "packages/tailwindcss-react-aria-components/**/*.ts", + "packages/tailwindcss-react-aria-components/**/*.tsx" + ], + "rules": { + "rsp-rules/no-package-root-imports": "error" + } + }, + { + "files": [ + "**/test/**", + "**/stories/**", + "**/docs/**", + "**/chromatic/**", + "**/chromatic-fc/**", + "**/__tests__/**" + ], + "rules": { + "rsp-rules/no-react-key": ["error"], + "rsp-rules/act-events-test": "error", + "rsp-rules/no-getByRole-toThrow": "error", + "rsp-rules/no-non-shadow-contains": "off", + "rsp-rules/safe-event-target": "off", + "rsp-rules/shadow-safe-active-element": "off", + "rsp-rules/faster-node-contains": "off", + "rsp-rules/imports": "off", + "monorepo/no-internal-import": "off", + "react/react-in-jsx-scope": "off", + "jsx-a11y/interactive-supports-focus": "off" + }, + "globals": { + "importSpectrumCSS": "readonly", + "JSX": "readonly", + "NodeJS": "readonly", + "AsyncIterable": "readonly", + "FileSystemFileEntry": "readonly", + "FileSystemDirectoryEntry": "readonly", + "FileSystemEntry": "readonly", + "IS_REACT_ACT_ENVIRONMENT": "readonly", + "globalThis": "readonly" + }, + "env": { + "builtin": true, + "browser": true, + "node": true, + "es6": true, + "commonjs": true, + "mocha": true, + "jest": true + } + }, + { + "files": ["**/dev/**", "**/scripts/**"], + "rules": { + "rsp-rules/safe-event-target": "off" + } + }, + { + "files": [ + "packages/@react-aria/focus/src/**/*.ts", + "packages/@react-aria/focus/src/**/*.tsx" + ], + "rules": { + "no-restricted-globals": [ + "error", + { + "name": "window", + "message": "Use getOwnerWindow from @react-aria/utils instead." + }, + { + "name": "document", + "message": "Use getOwnerDocument from @react-aria/utils instead." + } + ] + } + }, + { + "files": [ + "packages/react-aria/src/interactions/**/*.ts", + "packages/react-aria/src/interactions/**/*.tsx" + ], + "rules": { + "no-restricted-globals": [ + "warn", + { + "name": "window", + "message": "Use getOwnerWindow from @react-aria/utils instead." + }, + { + "name": "document", + "message": "Use getOwnerDocument from @react-aria/utils instead." + } + ] + } + }, + { + "files": [ + "packages/@react-aria/test-utils/src/**/*.ts", + "packages/@react-aria/test-utils/src/**/*.tsx" + ], + "rules": { + "rsp-rules/faster-node-contains": "off", + "rsp-rules/no-non-shadow-contains": "off", + "rsp-rules/shadow-safe-active-element": "off" + } + }, + { + "files": ["packages/@react-spectrum/s2/**", "packages/dev/s2-docs/**"], + "rules": { + "react/react-in-jsx-scope": "off" + } + }, + { + "files": ["packages/dev/style-macro-chrome-plugin/**"], + "env": { + "builtin": true, + "browser": true, + "webextensions": true, + "node": true, + "es6": true, + "commonjs": true + } + } + ] +} diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 0a4f190019e..00000000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,505 +0,0 @@ -import react from 'eslint-plugin-react'; -import rulesdir from 'eslint-plugin-rulesdir'; -import jsxA11Y from 'eslint-plugin-jsx-a11y'; -import reactHooks from 'eslint-plugin-react-hooks'; -import jest from 'eslint-plugin-jest'; -import monorepo from '@jdb8/eslint-plugin-monorepo'; -import * as rspRules from 'eslint-plugin-rsp-rules'; -import globals from 'globals'; -import babelParser from '@babel/eslint-parser'; -import typescriptEslint from '@typescript-eslint/eslint-plugin'; -import jsdoc from 'eslint-plugin-jsdoc'; -import tseslint from 'typescript-eslint'; -import path from 'node:path'; -import {fileURLToPath} from 'node:url'; -import js from '@eslint/js'; -import {FlatCompat} from '@eslint/eslintrc'; - -import rulesDirPlugin from 'eslint-plugin-rulesdir'; -rulesDirPlugin.RULES_DIR = './bin'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); -const compat = new FlatCompat({ - baseDirectory: __dirname, - recommendedConfig: js.configs.recommended, - allConfig: js.configs.all -}); - -const OFF = 0; -const WARN = 1; -const ERROR = 2; - -export default [ - { - ignores: [ - 'packages/@react-aria/i18n/server', - 'packages/@spectrum-icons/color/**/*', - 'packages/@spectrum-icons/ui/**/*', - 'packages/@spectrum-icons/workflow/**/*', - 'packages/@spectrum-icons/illustrations/**/*', - 'packages/@spectrum-icons/express/**/*', - '**/node_modules', - 'packages/*/*/dist', - 'packages/*/*/i18n', - 'packages/react-aria/dist', - 'packages/react-aria/i18n', - 'packages/react-aria-components/dist', - 'packages/react-aria-components/i18n', - 'packages/react-stately/dist', - 'packages/dev/storybook-builder-parcel/preview.js', - 'packages/dev/optimize-locales-plugin/LocalesPlugin.d.ts', - 'examples/**/*', - 'starters/**/*', - 'scripts/icon-builder-fixture/**/*', - 'packages/@react-spectrum/s2/icon.d.ts', - 'packages/@react-spectrum/s2/spectrum-illustrations', - 'packages/dev/parcel-config-storybook/*', - 'packages/dev/parcel-resolver-storybook/*', - 'packages/dev/parcel-transformer-storybook/*', - 'packages/dev/storybook-builder-parcel/*', - 'packages/dev/storybook-react-parcel/*', - 'packages/dev/s2-docs/pages/**', - 'packages/dev/mcp/*/dist', - 'packages/dev/codemods/src/s1-to-s2/__testfixtures__/cli/**' - ] - }, - ...compat.extends('eslint:recommended'), - { - plugins: { - react, - rulesdir, - 'jsx-a11y': jsxA11Y, - 'react-hooks': reactHooks, - jest, - monorepo, - 'rsp-rules': rspRules - }, - - languageOptions: { - globals: { - ...globals.browser, - ...globals.node, - ...globals.mocha, - ...globals.jest, - importSpectrumCSS: 'readonly', - jest: true, - expect: true, - JSX: 'readonly', - NodeJS: 'readonly', - AsyncIterable: 'readonly', - FileSystemFileEntry: 'readonly', - FileSystemDirectoryEntry: 'readonly', - FileSystemEntry: 'readonly', - IS_REACT_ACT_ENVIRONMENT: 'readonly' - }, - - parser: babelParser, - ecmaVersion: 6, - sourceType: 'module', - - parserOptions: { - ecmaFeatures: { - legacyDecorators: true - } - } - }, - - settings: { - jsdoc: { - ignorePrivate: true, - publicFunctionsOnly: true - }, - - react: { - version: 'detect' - } - }, - - rules: { - 'no-fallthrough': OFF, - 'no-irregular-whitespace': [ERROR], - eqeqeq: [ERROR, 'smart'], - - 'no-console': OFF, - - 'no-unused-vars': [ - ERROR, - { - args: 'none', - vars: 'all', - varsIgnorePattern: '[rR]eact' - } - ], - 'no-unused-private-class-members': OFF, - - 'spaced-comment': [ - ERROR, - 'always', - { - exceptions: ['*', '#__PURE__'], - markers: ['/'] - } - ], - - 'max-depth': [WARN, 4], - radix: [ERROR, 'always'], - 'react/jsx-uses-react': WARN, - 'eol-last': ERROR, - 'arrow-spacing': ERROR, - 'space-before-blocks': [ERROR, 'always'], - 'space-infix-ops': ERROR, - 'no-new-wrappers': ERROR, - 'no-self-compare': ERROR, - 'no-nested-ternary': ERROR, - 'no-multiple-empty-lines': ERROR, - 'no-unneeded-ternary': ERROR, - // "no-duplicate-imports": ERROR, - 'react/display-name': OFF, - 'react/jsx-curly-spacing': [ERROR, 'never'], - 'react/jsx-indent-props': [ERROR, ERROR], - 'react/jsx-no-duplicate-props': ERROR, - 'react/jsx-no-literals': OFF, - 'react/jsx-no-undef': ERROR, - 'react/jsx-quotes': OFF, - 'react/jsx-sort-prop-types': OFF, - 'react/jsx-sort-props': OFF, - 'react/jsx-uses-vars': ERROR, - 'react/no-danger': OFF, - 'react/no-did-mount-set-state': OFF, - 'react/no-did-update-set-state': ERROR, - 'react/no-multi-comp': OFF, - 'react/no-set-state': OFF, - - 'react/no-unknown-property': [ - ERROR, - { - ignore: ['prefix'] - } - ], - - 'react/react-in-jsx-scope': ERROR, - 'react/require-extension': OFF, - - 'react/jsx-max-props-per-line': [ - ERROR, - { - when: 'multiline' - } - ], - - 'react/jsx-boolean-value': ERROR, - 'react/self-closing-comp': ERROR, - - // Core hooks rules - 'react-hooks/rules-of-hooks': ERROR, // https://github.com/facebook/react/blob/main/packages/eslint-plugin-react-hooks/CHANGELOG.md - 'react-hooks/exhaustive-deps': WARN, - - // React Compiler rules - 'react-hooks/config': ERROR, - 'react-hooks/error-boundaries': ERROR, - 'react-hooks/component-hook-factories': ERROR, - 'react-hooks/gating': ERROR, - 'react-hooks/globals': ERROR, - // 'react-hooks/immutability': ERROR, - // 'react-hooks/preserve-manual-memoization': ERROR, // No idea how to turn this one on yet - 'react-hooks/purity': ERROR, - // 'react-hooks/refs': ERROR, // can't turn on until https://github.com/facebook/react/issues/34775 is fixed - 'react-hooks/set-state-in-effect': ERROR, - 'react-hooks/set-state-in-render': ERROR, - 'react-hooks/static-components': ERROR, - 'react-hooks/unsupported-syntax': WARN, - 'react-hooks/use-memo': ERROR, - 'react-hooks/incompatible-library': WARN, - - 'rsp-rules/no-react-key': [ERROR], - 'rsp-rules/sort-imports': [ERROR], - 'rsp-rules/no-non-shadow-contains': [ERROR], - 'rsp-rules/safe-event-target': [ERROR], - 'rsp-rules/shadow-safe-active-element': [ERROR], - 'rsp-rules/faster-node-contains': [ERROR], - 'rulesdir/imports': [ERROR], - 'rulesdir/useLayoutEffectRule': [ERROR], - 'rulesdir/pure-render': [ERROR], - 'jsx-a11y/accessible-emoji': ERROR, - 'jsx-a11y/alt-text': ERROR, - 'jsx-a11y/anchor-has-content': ERROR, - 'jsx-a11y/anchor-is-valid': ERROR, - 'jsx-a11y/aria-activedescendant-has-tabindex': ERROR, - 'jsx-a11y/aria-props': ERROR, - 'jsx-a11y/aria-proptypes': ERROR, - 'jsx-a11y/aria-role': ERROR, - 'jsx-a11y/aria-unsupported-elements': ERROR, - 'jsx-a11y/click-events-have-key-events': ERROR, - 'jsx-a11y/heading-has-content': ERROR, - 'jsx-a11y/html-has-lang': ERROR, - 'jsx-a11y/iframe-has-title': ERROR, - 'jsx-a11y/img-redundant-alt': ERROR, - - 'jsx-a11y/interactive-supports-focus': [ - ERROR, - { - tabbable: ['button', 'checkbox', 'link', 'searchbox', 'spinbutton', 'switch', 'textbox'] - } - ], - - 'jsx-a11y/label-has-associated-control': [ - ERROR, - { - assert: 'either', - depth: 3 - } - ], - - 'jsx-a11y/media-has-caption': ERROR, - 'jsx-a11y/mouse-events-have-key-events': ERROR, - 'jsx-a11y/no-access-key': ERROR, - 'jsx-a11y/no-distracting-elements': ERROR, - 'jsx-a11y/no-interactive-element-to-noninteractive-role': ERROR, - - 'jsx-a11y/no-noninteractive-element-interactions': [ - WARN, - { - handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'] - } - ], - - 'jsx-a11y/no-noninteractive-element-to-interactive-role': [ - ERROR, - { - ul: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'], - ol: ['listbox', 'menu', 'menubar', 'radiogroup', 'tablist', 'tree', 'treegrid'], - li: ['menuitem', 'option', 'row', 'tab', 'treeitem'], - table: ['grid'], - td: ['gridcell', 'columnheader', 'rowheader'], - th: ['columnheader', 'rowheader'] - } - ], - - 'jsx-a11y/no-noninteractive-tabindex': [ - ERROR, - { - tags: [], - roles: ['alertdialog', 'dialog', 'tabpanel'] - } - ], - - 'jsx-a11y/no-redundant-roles': ERROR, - - 'jsx-a11y/no-static-element-interactions': [ - ERROR, - { - handlers: ['onClick', 'onMouseDown', 'onMouseUp', 'onKeyPress', 'onKeyDown', 'onKeyUp'] - } - ], - - 'jsx-a11y/role-has-required-aria-props': ERROR, - 'jsx-a11y/role-supports-aria-props': ERROR, - 'jsx-a11y/scope': ERROR, - 'jsx-a11y/tabindex-no-positive': ERROR, - - 'monorepo/no-relative-import': ERROR - } - }, - { - files: ['packages/**/*.ts', 'packages/**/*.tsx'], - - plugins: { - react, - rulesdir, - 'jsx-a11y': jsxA11Y, - 'react-hooks': reactHooks, - jest, - '@typescript-eslint': typescriptEslint, - monorepo, - jsdoc - }, - - languageOptions: { - globals: { - globalThis: 'readonly' - }, - - parser: tseslint.parser, - ecmaVersion: 6, - sourceType: 'module', - - parserOptions: { - ecmaFeatures: { - jsx: true, - legacyDecorators: true - }, - - useJSXTextNode: true, - project: './tsconfig.json' - } - }, - - rules: { - 'jsdoc/require-description-complete-sentence': [ - ERROR, - { - abbreviations: ['e.g', 'i.e'] - } - ], - - 'jsdoc/check-alignment': ERROR, - 'jsdoc/check-indentation': ERROR, - - 'jsdoc/check-tag-names': [ - ERROR, - { - definedTags: ['selector', 'note'] - } - ], - - 'jsdoc/require-description': [ - ERROR, - { - exemptedBy: ['deprecated'], - checkConstructors: false - } - ], - - 'no-redeclare': OFF, - '@typescript-eslint/no-redeclare': ERROR, - 'no-unused-vars': OFF, - '@typescript-eslint/no-unused-vars': ERROR - } - }, - { - files: ['packages/**/src/**/*.ts', 'packages/**/src/**/*.tsx'], - ignores: ['packages/dev/**'], - rules: { - 'rsp-rules/no-package-root-imports': ERROR - } - }, - { - files: [ - '**/test/**', - '**/stories/**', - '**/docs/**', - '**/chromatic/**', - '**/chromatic-fc/**', - '**/__tests__/**' - ], - - rules: { - 'rsp-rules/no-react-key': [ERROR], - 'rsp-rules/act-events-test': ERROR, - 'rsp-rules/no-getByRole-toThrow': ERROR, - 'rsp-rules/no-non-shadow-contains': OFF, - 'rsp-rules/safe-event-target': OFF, - 'rsp-rules/shadow-safe-active-element': OFF, - 'rsp-rules/faster-node-contains': OFF, - 'rulesdir/imports': OFF, - 'monorepo/no-internal-import': OFF, - 'jsdoc/require-jsdoc': OFF - }, - - languageOptions: { - globals: { - ...globals.browser, - ...globals.node, - ...globals.mocha, - ...globals.jest, - importSpectrumCSS: 'readonly', - jest: true, - expect: true, - JSX: 'readonly', - NodeJS: 'readonly', - AsyncIterable: 'readonly', - FileSystemFileEntry: 'readonly', - FileSystemDirectoryEntry: 'readonly', - FileSystemEntry: 'readonly', - IS_REACT_ACT_ENVIRONMENT: 'readonly', - globalThis: 'readonly' - }, - - parser: tseslint.parser, - ecmaVersion: 6, - sourceType: 'module', - - parserOptions: { - // eventually move to projectService for faster linting - ecmaFeatures: { - legacyDecorators: true - } - } - } - }, - { - files: ['**/dev/**', '**/scripts/**'], - - rules: { - 'jsdoc/require-jsdoc': OFF, - 'jsdoc/require-description': OFF, - 'rsp-rules/safe-event-target': OFF - } - }, - { - files: ['packages/@react-aria/focus/src/**/*.ts', 'packages/@react-aria/focus/src/**/*.tsx'], - - rules: { - 'no-restricted-globals': [ - ERROR, - { - name: 'window', - message: 'Use getOwnerWindow from @react-aria/utils instead.' - }, - { - name: 'document', - message: 'Use getOwnerDocument from @react-aria/utils instead.' - } - ] - } - }, - { - files: [ - 'packages/react-aria/src/interactions/**/*.ts', - 'packages/react-aria/src/interactions/**/*.tsx' - ], - - rules: { - 'no-restricted-globals': [ - WARN, - { - name: 'window', - message: 'Use getOwnerWindow from @react-aria/utils instead.' - }, - { - name: 'document', - message: 'Use getOwnerDocument from @react-aria/utils instead.' - } - ] - } - }, - { - files: [ - 'packages/@react-aria/test-utils/src/**/*.ts', - 'packages/@react-aria/test-utils/src/**/*.tsx' - ], - - rules: { - 'rsp-rules/faster-node-contains': OFF, - 'rsp-rules/no-non-shadow-contains': OFF, - 'rsp-rules/shadow-safe-active-element': OFF - } - }, - { - files: ['packages/@react-spectrum/s2/**', 'packages/dev/s2-docs/**'], - - rules: { - 'react/react-in-jsx-scope': OFF - } - }, - { - files: ['packages/dev/style-macro-chrome-plugin/**'], - languageOptions: { - globals: { - ...globals.webextensions, - ...globals.browser - } - } - } -]; diff --git a/package.json b/package.json index 9b9aaad38ed..70d8adf6458 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "build": "make build", "test:ssr": "cross-env STRICT_MODE=1 yarn jest --runInBand --config jest.ssr.config.js", "ci-test": "cross-env STRICT_MODE=1 yarn jest --maxWorkers=2 && cross-env STRICT_MODE=1 yarn test:ssr --runInBand", - "lint": "concurrently \"yarn format:check\" \"yarn check-types\" \"eslint packages\" \"node scripts/lint-packages.js\" \"yarn constraints\"", + "lint": "concurrently \"yarn format:check\" \"yarn check-types\" \"oxlint packages\" \"node scripts/lint-packages.js\" \"yarn constraints\"", "jest": "jest", "copyrights": "babel-node --presets @babel/env ./scripts/addHeaders.js", "build:icons": "babel-node --presets @babel/env ./scripts/buildIcons.js", @@ -85,7 +85,6 @@ "@actions/github": "^1.1.0", "@babel/cli": "^7.24.1", "@babel/core": "^7.24.3", - "@babel/eslint-parser": "^7.27.1", "@babel/node": "^7.23.9", "@babel/plugin-proposal-decorators": "^7.24.1", "@babel/plugin-transform-runtime": "^7.24.3", @@ -93,9 +92,6 @@ "@babel/preset-react": "^7.24.1", "@babel/preset-typescript": "^7.24.1", "@babel/register": "^7.23.7", - "@eslint/compat": "^1.2.0", - "@eslint/eslintrc": "^3.1.0", - "@eslint/js": "^9.12.0", "@faker-js/faker": "^8.4.1", "@jdb8/eslint-plugin-monorepo": "^1.0.1", "@octokit/rest": "*", @@ -154,14 +150,7 @@ "cross-spawn": "^7.0.5", "delta-e": "^0.0.8", "diff": "^5.1.0", - "eslint": "^9.12.0", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jest": "^28.8.3", - "eslint-plugin-jsdoc": "^50.4.1", - "eslint-plugin-jsx-a11y": "^6.10.0", - "eslint-plugin-react": "^7.37.1", "eslint-plugin-react-hooks": "^7.0.0", - "eslint-plugin-rulesdir": "^0.2.2", "exceljs": "^4.4.0", "fast-check": "^2.19.0", "fast-glob": "^3.1.0", @@ -182,6 +171,7 @@ "motion": "^12.23.6", "npm-cli-login": "^1.0.0", "oxfmt": "^0.48.0", + "oxlint": "^1.63.0", "parcel": "^2.16.3", "parcel-optimizer-strict-mode": "workspace:^", "patch-package": "^6.2.0", @@ -208,7 +198,6 @@ "tailwindcss-animate": "^1.0.7", "tempy": "^0.5.0", "typescript": "^5.8.2", - "typescript-eslint": "^8.38.0", "unplugin-parcel-macros": "^0.1.1", "verdaccio": "^6.0.0", "vite": "^7.3.2", diff --git a/packages/@react-spectrum/s2/style/tokens.ts b/packages/@react-spectrum/s2/style/tokens.ts index d150edf1157..76900f3e8b2 100644 --- a/packages/@react-spectrum/s2/style/tokens.ts +++ b/packages/@react-spectrum/s2/style/tokens.ts @@ -12,7 +12,7 @@ // package.json in this directory is not the real package.json. Lint rule not smart enough. import assert from 'assert'; -// eslint-disable-next-line rulesdir/imports +// eslint-disable-next-line rsp-rules/imports import * as originalTokens from '@adobe/spectrum-tokens/dist/json/variables.json'; // This forces TSC to inline the token keys instead of leaving a dependency on it. diff --git a/packages/dev/eslint-plugin-rsp-rules/index.js b/packages/dev/eslint-plugin-rsp-rules/index.js index 6472a0cca33..dd1e17f1712 100644 --- a/packages/dev/eslint-plugin-rsp-rules/index.js +++ b/packages/dev/eslint-plugin-rsp-rules/index.js @@ -12,13 +12,16 @@ import actEventsTest from './rules/act-events-test.js'; import fasterNodeContains from './rules/faster-node-contains.js'; +import imports from './rules/imports.js'; import noGetByRoleToThrow from './rules/no-getByRole-toThrow.js'; import noNonShadowContains from './rules/no-non-shadow-contains.js'; import noPackageRootImports from './rules/no-package-root-imports.js'; import noReactKey from './rules/no-react-key.js'; +import pureRender from './rules/pure-render.js'; import safeEventTarget from './rules/safe-event-target.js'; import shadowSafeActiveElement from './rules/shadow-safe-active-element.js'; import sortImports from './rules/sort-imports.js'; +import useLayoutEffectRule from './rules/use-layout-effect-rule.js'; const rules = { 'act-events-test': actEventsTest, @@ -29,7 +32,10 @@ const rules = { 'no-non-shadow-contains': noNonShadowContains, 'safe-event-target': safeEventTarget, 'shadow-safe-active-element': shadowSafeActiveElement, - 'faster-node-contains': fasterNodeContains + 'faster-node-contains': fasterNodeContains, + imports, + 'use-layout-effect-rule': useLayoutEffectRule, + 'pure-render': pureRender }; const meta = { @@ -38,3 +44,4 @@ const meta = { }; export {meta, rules}; +export default {meta, rules}; diff --git a/packages/dev/eslint-plugin-rsp-rules/package.json b/packages/dev/eslint-plugin-rsp-rules/package.json index 7fa4c654aa6..2041c5485b8 100644 --- a/packages/dev/eslint-plugin-rsp-rules/package.json +++ b/packages/dev/eslint-plugin-rsp-rules/package.json @@ -3,5 +3,8 @@ "version": "1.0.0", "private": true, "type": "module", - "main": "./index.js" + "main": "./index.js", + "dependencies": { + "find-up": "^4.1.0" + } } diff --git a/bin/imports.js b/packages/dev/eslint-plugin-rsp-rules/rules/imports.js similarity index 79% rename from bin/imports.js rename to packages/dev/eslint-plugin-rsp-rules/rules/imports.js index a9a4835f51f..6ce849ec434 100644 --- a/bin/imports.js +++ b/packages/dev/eslint-plugin-rsp-rules/rules/imports.js @@ -10,10 +10,15 @@ * governing permissions and limitations under the License. */ -const findUp = require('find-up'); -const path = require('path'); -const fs = require('fs'); -const Module = require('module'); +import {builtinModules} from 'node:module'; +import {fileURLToPath} from 'node:url'; +import findUp from 'find-up'; +import fs from 'node:fs'; +import path from 'node:path'; + +const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const PACKAGES_ROOT = path.join(__dirname, '..', '..', '..'); + const substrings = ['-', '+']; const devDependencies = new Set([ @@ -33,7 +38,7 @@ const devDependencies = new Set([ 'vite-plugin-svgr' ]); -module.exports = { +const plugin = { meta: { fixable: 'code' }, @@ -44,16 +49,13 @@ module.exports = { } let source = node.source.value.replace(/^[a-z-]+:/, ''); - if (source.startsWith('.') || Module.builtinModules.includes(source)) { + if (source.startsWith('.') || builtinModules.includes(source)) { return; } - // Split the import specifier on slashes. If it starts with an @ then it's - // a scoped package, otherwise just take the first part. let parts = source.split('/'); let pkgName = source.startsWith('@') ? parts.slice(0, 2).join('/') : parts[0]; - // Search for a package.json starting from the current filename let pkgPath = findUp.sync('package.json', {cwd: path.dirname(context.getFilename())}); if (!pkgPath) { return; @@ -61,7 +63,6 @@ module.exports = { let pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); - // The only dev dependency should be spectrum-css. if (exists(pkg.devDependencies, pkgName) && devDependencies.has(pkgName)) { return; } @@ -79,9 +80,7 @@ module.exports = { node, message: `Missing dependency on ${pkgName}.`, fix(fixer) { - // Attempt to find a package in the monorepo. If the dep is for an external library, - // then we cannot auto fix it because we don't know the version to add. - let depPath = __dirname + '/../packages/' + pkgName + '/package.json'; + let depPath = path.join(PACKAGES_ROOT, pkgName, 'package.json'); if (!fs.existsSync(depPath)) { return; } @@ -99,7 +98,6 @@ module.exports = { fs.writeFileSync(pkgPath, JSON.stringify(pkg, false, 2) + '\n'); - // Fake fix so eslint doesn't show the error. return { range: [0, 0], text: '' @@ -121,7 +119,6 @@ function exists(deps, name) { return deps && deps[name]; } -// Insert a key into an object and sort it. function insertObject(obj, key, value) { obj[key] = value; @@ -132,3 +129,5 @@ function insertObject(obj, key, value) { return res; } + +export default plugin; diff --git a/bin/pure-render.js b/packages/dev/eslint-plugin-rsp-rules/rules/pure-render.js similarity index 86% rename from bin/pure-render.js rename to packages/dev/eslint-plugin-rsp-rules/rules/pure-render.js index d28d2028669..a3eacab4e20 100644 --- a/bin/pure-render.js +++ b/packages/dev/eslint-plugin-rsp-rules/rules/pure-render.js @@ -11,7 +11,7 @@ */ // Copied from https://github.com/facebook/react/pull/24506 -module.exports = { +const plugin = { meta: { type: 'problem', docs: { @@ -21,9 +21,9 @@ module.exports = { } }, create(context) { + const sourceCode = context.sourceCode || context.getSourceCode(); return { MemberExpression(member) { - // Look for member expressions that look like refs (i.e. `ref.current`). if ( member.object.type !== 'Identifier' || member.computed || @@ -33,8 +33,6 @@ module.exports = { return; } - // Find the parent function of this node, as well as any if statement matching against the ref value - // (i.e. lazy init pattern shown in React docs). let node = member; let fn; let conditional; @@ -65,13 +63,11 @@ module.exports = { return; } - // Find the variable definition for the object. - const variable = getVariable(context.sourceCode.getScope(node), member.object.name); + const variable = getVariable(sourceCode.getScope(node), member.object.name); if (!variable) { return; } - // Find the initialization of the variable and see if it's a call to useRef. const refDefinition = variable.defs.find(def => { const init = def.node.init; if (!init) { @@ -91,8 +87,6 @@ module.exports = { }); if (refDefinition) { - // If within an if statement, check if comparing with the initial value passed to useRef. - // This indicates the lazy init pattern, which is allowed. if (conditional) { const init = refDefinition.node.init.arguments[0] || { type: 'Identifier', @@ -106,7 +100,6 @@ module.exports = { } } - // Otherwise, report an error for either writing or reading to this ref based on parent expression. context.report({ node: member, message: @@ -183,9 +176,12 @@ function isLiteralEqual(operator, a, b) { if (operator === '===') { return aValue === bValue; } else if (operator === '==') { - // eslint-disable-next-line + // Mirror `==` semantics from the source binary expression (e.g. null == undefined). + // eslint-disable-next-line eqeqeq -- intentional loose equality for `==` branch return aValue == bValue; } return false; } + +export default plugin; diff --git a/bin/useLayoutEffectRule.js b/packages/dev/eslint-plugin-rsp-rules/rules/use-layout-effect-rule.js similarity index 85% rename from bin/useLayoutEffectRule.js rename to packages/dev/eslint-plugin-rsp-rules/rules/use-layout-effect-rule.js index 4ed02507c11..2726c6fd7d3 100644 --- a/bin/useLayoutEffectRule.js +++ b/packages/dev/eslint-plugin-rsp-rules/rules/use-layout-effect-rule.js @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -module.exports = { +const plugin = { create: function (context) { return { ImportDeclaration(node) { @@ -25,10 +25,15 @@ module.exports = { importSpecifiers.map(item => { let itemName = getName(item); if (itemName === 'useLayoutEffect') { - context.report(node, 'Please use useLayoutEffect from @react-aria/utils instead.'); + context.report({ + node, + message: 'Please use useLayoutEffect from @react-aria/utils instead.' + }); } }); } }; } }; + +export default plugin; diff --git a/packages/dev/mcp/s2/scripts/build-data.mjs b/packages/dev/mcp/s2/scripts/build-data.mjs index 2cdbf816098..f7973cb96ee 100644 --- a/packages/dev/mcp/s2/scripts/build-data.mjs +++ b/packages/dev/mcp/s2/scripts/build-data.mjs @@ -4,7 +4,7 @@ import fg from 'fast-glob'; import {fileURLToPath, pathToFileURL} from 'url'; import fs from 'fs'; import path from 'path'; -// eslint-disable-next-line rulesdir/imports +// eslint-disable-next-line rsp-rules/imports import * as ts from 'typescript'; const __filename = fileURLToPath(import.meta.url); diff --git a/packages/dev/s2-docs/src/IconSearchView.tsx b/packages/dev/s2-docs/src/IconSearchView.tsx index c79c61dfbca..f4743e87427 100644 --- a/packages/dev/s2-docs/src/IconSearchView.tsx +++ b/packages/dev/s2-docs/src/IconSearchView.tsx @@ -1,4 +1,4 @@ -/* eslint-disable rulesdir/imports */ +/* eslint-disable rsp-rules/imports */ 'use client'; import { diff --git a/packages/dev/s2-docs/src/color.macro.ts b/packages/dev/s2-docs/src/color.macro.ts index 1c993d77b7c..4db0f29d3a2 100644 --- a/packages/dev/s2-docs/src/color.macro.ts +++ b/packages/dev/s2-docs/src/color.macro.ts @@ -1,7 +1,7 @@ import {colorScale} from '../../../@react-spectrum/s2/style/tokens'; import type {MacroContext} from '@parcel/macros'; import {style} from '@react-spectrum/s2/style'; -// eslint-disable-next-line rulesdir/imports +// eslint-disable-next-line rsp-rules/imports import * as tokens from '@adobe/spectrum-tokens/dist/json/variables.json'; export function getColorScale( diff --git a/packages/dev/s2-docs/src/illustrations/generic1.ts b/packages/dev/s2-docs/src/illustrations/generic1.ts index 71e1e9c68c9..e5c86ce4f17 100644 --- a/packages/dev/s2-docs/src/illustrations/generic1.ts +++ b/packages/dev/s2-docs/src/illustrations/generic1.ts @@ -1,4 +1,4 @@ -/* eslint-disable rulesdir/imports */ +/* eslint-disable rsp-rules/imports */ import {ComponentType} from 'react'; // @ts-ignore import illustrations from '/packages/@react-spectrum/s2/spectrum-illustrations/gradient/generic1/*.tsx'; diff --git a/packages/dev/s2-docs/src/illustrations/generic2.ts b/packages/dev/s2-docs/src/illustrations/generic2.ts index 6109fdb0e28..503b6a34435 100644 --- a/packages/dev/s2-docs/src/illustrations/generic2.ts +++ b/packages/dev/s2-docs/src/illustrations/generic2.ts @@ -1,4 +1,4 @@ -/* eslint-disable rulesdir/imports */ +/* eslint-disable rsp-rules/imports */ import {ComponentType} from 'react'; // @ts-ignore import illustrations from '/packages/@react-spectrum/s2/spectrum-illustrations/gradient/generic2/*.tsx'; diff --git a/packages/dev/s2-docs/src/illustrations/linear.ts b/packages/dev/s2-docs/src/illustrations/linear.ts index a9de208e1fc..79506c32790 100644 --- a/packages/dev/s2-docs/src/illustrations/linear.ts +++ b/packages/dev/s2-docs/src/illustrations/linear.ts @@ -1,4 +1,4 @@ -/* eslint-disable rulesdir/imports */ +/* eslint-disable rsp-rules/imports */ import {ComponentType} from 'react'; // @ts-ignore import illustrations from '/packages/@react-spectrum/s2/spectrum-illustrations/linear/*.tsx'; diff --git a/packages/dev/style-macro-chrome-plugin/src/content-script.js b/packages/dev/style-macro-chrome-plugin/src/content-script.js index aaf4f59f461..ba55048e978 100644 --- a/packages/dev/style-macro-chrome-plugin/src/content-script.js +++ b/packages/dev/style-macro-chrome-plugin/src/content-script.js @@ -3,8 +3,8 @@ if (window.__macrosLoaded) { } window.__macrosLoaded = true; -let debugLog = (...args) => { - // console.log('[Content Script]', ...args); +let debugLog = () => { + // console.log('[Content Script]', ...arguments); }; window.addEventListener('message', function (event) { diff --git a/packages/dev/style-macro-chrome-plugin/src/devtool.js b/packages/dev/style-macro-chrome-plugin/src/devtool.js index d7bad258bc0..a8d4501fa99 100644 --- a/packages/dev/style-macro-chrome-plugin/src/devtool.js +++ b/packages/dev/style-macro-chrome-plugin/src/devtool.js @@ -2,9 +2,9 @@ chrome.devtools.panels.elements.createSidebarPane('Style Macros', sidebar => { sidebar.setObject({}); // Helper function to log to both DevTools-for-DevTools console and inspected page console - const debugLog = (...args) => { - // console.log(...args); // Logs to DevTools-for-DevTools console - // const message = args.map(arg => + const debugLog = () => { + // console.log(...arguments); // Logs to DevTools-for-DevTools console + // const message = [...arguments].map(arg => // typeof arg === 'object' ? JSON.stringify(arg) : String(arg) // ).join(' '); // chrome.devtools.inspectedWindow.eval(`console.log('[DevTools]', ${JSON.stringify(message)})`); diff --git a/packages/react-aria-components/src/ListBox.tsx b/packages/react-aria-components/src/ListBox.tsx index 6fc5dead6a2..e61b5b4d351 100644 --- a/packages/react-aria-components/src/ListBox.tsx +++ b/packages/react-aria-components/src/ListBox.tsx @@ -672,13 +672,17 @@ function ListBoxDropIndicator(props: ListBoxDropIndicatorProps, ref: ForwardedRe }); return ( - } - data-drop-target={isDropTarget || undefined} - /> + <> + {/* oxlint-disable jsx-a11y/role-has-required-aria-props -- drop indicator is not selectable */} + } + data-drop-target={isDropTarget || undefined} + /> + {/* oxlint-enable jsx-a11y/role-has-required-aria-props */} + ); } @@ -754,14 +758,18 @@ export const ListBoxLoadMoreItem = createLeafComponent( /> {isLoading && renderProps.children && ( - }> - {renderProps.children} - + <> + {/* oxlint-disable jsx-a11y/role-has-required-aria-props -- loader row is not selectable */} + }> + {renderProps.children} + + {/* oxlint-enable jsx-a11y/role-has-required-aria-props */} + )} ); diff --git a/packages/react-aria-components/src/Tabs.tsx b/packages/react-aria-components/src/Tabs.tsx index ba5a44454a5..7813b25586a 100644 --- a/packages/react-aria-components/src/Tabs.tsx +++ b/packages/react-aria-components/src/Tabs.tsx @@ -504,13 +504,13 @@ export const TabPanels = /*#__PURE__*/ createHideableComponent(function TabPanel // This breaks the rules of hooks because there is no effect that runs _before_ DOM updates. if ( state.selectedKey != null && - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render state.selectedKey !== selectedKeyRef.current && ref.current && - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render hasTransition.current ) { - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render prevSize.current = ref.current.getBoundingClientRect(); } diff --git a/packages/react-aria/src/collections/CollectionBuilder.tsx b/packages/react-aria/src/collections/CollectionBuilder.tsx index d702aaa600d..53da2958be8 100644 --- a/packages/react-aria/src/collections/CollectionBuilder.tsx +++ b/packages/react-aria/src/collections/CollectionBuilder.tsx @@ -98,7 +98,7 @@ function useSyncExternalStoreFallback( // This is read immediately inside the wrapper, which also runs during render. // We just need a ref to avoid invalidating the callback itself, which // would cause React to re-run the callback more than necessary. - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render isSSRRef.current = isSSR; let getSnapshotWrapper = useCallback(() => { diff --git a/packages/react-aria/src/ssr/SSRProvider.tsx b/packages/react-aria/src/ssr/SSRProvider.tsx index 66c71e467e6..3ccc727a4d3 100644 --- a/packages/react-aria/src/ssr/SSRProvider.tsx +++ b/packages/react-aria/src/ssr/SSRProvider.tsx @@ -12,7 +12,7 @@ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is // guarded by a check that it only runs on the client side. -// eslint-disable-next-line rulesdir/useLayoutEffectRule +// eslint-disable-next-line rsp-rules/use-layout-effect-rule import React, {JSX, ReactNode, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react'; // To support SSR, the auto incrementing id counter is stored in a context. This allows @@ -109,7 +109,7 @@ let componentIds = new WeakMap(); function useCounter(isDisabled = false) { let ctx = useContext(SSRContext); let ref = useRef(null); - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render if (ref.current === null && !isDisabled) { // In strict mode, React renders components twice, and the ref will be reset to null on the second render. // This means our id counter will be incremented twice instead of once. This is a problem because on the @@ -140,11 +140,11 @@ function useCounter(isDisabled = false) { } } - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render ref.current = ++ctx.current; } - // eslint-disable-next-line rulesdir/pure-render + // eslint-disable-next-line rsp-rules/pure-render return ref.current; } diff --git a/packages/react-aria/src/utils/useDeepMemo.ts b/packages/react-aria/src/utils/useDeepMemo.ts index d0f7e144579..21ff2d3b04d 100644 --- a/packages/react-aria/src/utils/useDeepMemo.ts +++ b/packages/react-aria/src/utils/useDeepMemo.ts @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -/* eslint-disable rulesdir/pure-render */ +/* eslint-disable rsp-rules/pure-render */ import {useRef} from 'react'; diff --git a/packages/react-aria/src/utils/useDrag1D.ts b/packages/react-aria/src/utils/useDrag1D.ts index 4e58419f0fa..970b187e06f 100644 --- a/packages/react-aria/src/utils/useDrag1D.ts +++ b/packages/react-aria/src/utils/useDrag1D.ts @@ -10,7 +10,7 @@ * governing permissions and limitations under the License. */ -/* eslint-disable rulesdir/pure-render */ +/* eslint-disable rsp-rules/pure-render */ import {getEventTarget, nodeContains} from './shadowdom/DOMFunctions'; import {getOffset} from './getOffset'; diff --git a/packages/react-aria/test/utils/mergeProps.test.jsx b/packages/react-aria/test/utils/mergeProps.test.jsx index a5014873d1a..1be255bdbd7 100644 --- a/packages/react-aria/test/utils/mergeProps.test.jsx +++ b/packages/react-aria/test/utils/mergeProps.test.jsx @@ -11,10 +11,10 @@ */ import clsx from 'clsx'; +import {createRef} from 'react'; import {mergeIds, useId} from '../../src/utils/useId'; import {mergeProps} from '../../src/utils/mergeProps'; import {render} from '@react-spectrum/test-utils-internal'; -import {createRef} from 'react'; describe('mergeProps', function () { it('handles one argument', function () { @@ -106,8 +106,8 @@ describe('mergeProps', function () { render(); // We use stringMatching to support optional refs in React 19. - expect(Spy).toHaveBeenCalledWith({id: 'id2'}, expect.not.stringMatching(/\A(?!x)x/)); - expect(Spy).toHaveBeenLastCalledWith({id: 'id1'}, expect.not.stringMatching(/\A(?!x)x/)); + expect(Spy).toHaveBeenCalledWith({id: 'id2'}, expect.not.stringMatching(/^(?!x)x/)); + expect(Spy).toHaveBeenLastCalledWith({id: 'id1'}, expect.not.stringMatching(/^(?!x)x/)); }); it('combines reoccuring ids', function () { diff --git a/yarn.lock b/yarn.lock index 65988287f1b..f61172aa56e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -231,20 +231,6 @@ __metadata: languageName: node linkType: hard -"@babel/eslint-parser@npm:^7.27.1": - version: 7.27.1 - resolution: "@babel/eslint-parser@npm:7.27.1" - dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals": "npm:5.1.1-v1" - eslint-visitor-keys: "npm:^2.1.0" - semver: "npm:^6.3.1" - peerDependencies: - "@babel/core": ^7.11.0 - eslint: ^7.5.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/dedb2bc7ef00307eaf8e40d5ec7f1e8ae4649838fa2e7ec5e1b47eaf9bd8708949503b05175de922e2431ce69a5f3b5fab1c1202003b1d9457d3c0b2c3bdc4ec - languageName: node - linkType: hard - "@babel/generator@npm:^7.22.5, @babel/generator@npm:^7.24.1, @babel/generator@npm:^7.7.2": version: 7.24.5 resolution: "@babel/generator@npm:7.24.5" @@ -1945,17 +1931,6 @@ __metadata: languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.49.0": - version: 0.49.0 - resolution: "@es-joy/jsdoccomment@npm:0.49.0" - dependencies: - comment-parser: "npm:1.4.1" - esquery: "npm:^1.6.0" - jsdoc-type-pratt-parser: "npm:~4.1.0" - checksum: 10c0/16717507d557d37e7b59456fedeefbe0a3bc93aa2d9c043d5db91e24e076509b6fcb10ee6fd1dafcb0c5bbe50ae329b45de5b83541cb5994a98c9e862a45641e - languageName: node - linkType: hard - "@esbuild/aix-ppc64@npm:0.27.3": version: 0.27.3 resolution: "@esbuild/aix-ppc64@npm:0.27.3" @@ -2320,105 +2295,6 @@ __metadata: languageName: node linkType: hard -"@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": - version: 4.4.0 - resolution: "@eslint-community/eslint-utils@npm:4.4.0" - dependencies: - eslint-visitor-keys: "npm:^3.3.0" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/7e559c4ce59cd3a06b1b5a517b593912e680a7f981ae7affab0d01d709e99cd5647019be8fafa38c350305bc32f1f7d42c7073edde2ab536c745e365f37b607e - languageName: node - linkType: hard - -"@eslint-community/eslint-utils@npm:^4.7.0": - version: 4.7.0 - resolution: "@eslint-community/eslint-utils@npm:4.7.0" - dependencies: - eslint-visitor-keys: "npm:^3.4.3" - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - checksum: 10c0/c0f4f2bd73b7b7a9de74b716a664873d08ab71ab439e51befe77d61915af41a81ecec93b408778b3a7856185244c34c2c8ee28912072ec14def84ba2dec70adf - languageName: node - linkType: hard - -"@eslint-community/regexpp@npm:^4.10.0, @eslint-community/regexpp@npm:^4.11.0": - version: 4.11.1 - resolution: "@eslint-community/regexpp@npm:4.11.1" - checksum: 10c0/fbcc1cb65ef5ed5b92faa8dc542e035269065e7ebcc0b39c81a4fe98ad35cfff20b3c8df048641de15a7757e07d69f85e2579c1a5055f993413ba18c055654f8 - languageName: node - linkType: hard - -"@eslint/compat@npm:^1.2.0": - version: 1.2.0 - resolution: "@eslint/compat@npm:1.2.0" - peerDependencies: - eslint: ^9.10.0 - peerDependenciesMeta: - eslint: - optional: true - checksum: 10c0/ad79bf1ef14462f829288c4e2ca8eeffdf576fa923d3f8a07e752e821bdbe5fd79360fe6254e9ddfe7eada2e4e3d22a7ee09f5d21763e67bc4fbc331efb3c3e9 - languageName: node - linkType: hard - -"@eslint/config-array@npm:^0.18.0": - version: 0.18.0 - resolution: "@eslint/config-array@npm:0.18.0" - dependencies: - "@eslint/object-schema": "npm:^2.1.4" - debug: "npm:^4.3.1" - minimatch: "npm:^3.1.2" - checksum: 10c0/0234aeb3e6b052ad2402a647d0b4f8a6aa71524bafe1adad0b8db1dfe94d7f5f26d67c80f79bb37ac61361a1d4b14bb8fb475efe501de37263cf55eabb79868f - languageName: node - linkType: hard - -"@eslint/core@npm:^0.6.0": - version: 0.6.0 - resolution: "@eslint/core@npm:0.6.0" - checksum: 10c0/fffdb3046ad6420f8cb9204b6466fdd8632a9baeebdaf2a97d458a4eac0e16653ba50d82d61835d7d771f6ced0ec942ec482b2fbccc300e45f2cbf784537f240 - languageName: node - linkType: hard - -"@eslint/eslintrc@npm:^3.1.0": - version: 3.1.0 - resolution: "@eslint/eslintrc@npm:3.1.0" - dependencies: - ajv: "npm:^6.12.4" - debug: "npm:^4.3.2" - espree: "npm:^10.0.1" - globals: "npm:^14.0.0" - ignore: "npm:^5.2.0" - import-fresh: "npm:^3.2.1" - js-yaml: "npm:^4.1.0" - minimatch: "npm:^3.1.2" - strip-json-comments: "npm:^3.1.1" - checksum: 10c0/5b7332ed781edcfc98caa8dedbbb843abfb9bda2e86538529c843473f580e40c69eb894410eddc6702f487e9ee8f8cfa8df83213d43a8fdb549f23ce06699167 - languageName: node - linkType: hard - -"@eslint/js@npm:9.12.0, @eslint/js@npm:^9.12.0": - version: 9.12.0 - resolution: "@eslint/js@npm:9.12.0" - checksum: 10c0/325650a59a1ce3d97c69441501ebaf415607248bacbe8c8ca35adc7cb73b524f592f266a75772f496b06f3239e3ee1996722a242148085f0ee5fb3dd7065897c - languageName: node - linkType: hard - -"@eslint/object-schema@npm:^2.1.4": - version: 2.1.4 - resolution: "@eslint/object-schema@npm:2.1.4" - checksum: 10c0/e9885532ea70e483fb007bf1275968b05bb15ebaa506d98560c41a41220d33d342e19023d5f2939fed6eb59676c1bda5c847c284b4b55fce521d282004da4dda - languageName: node - linkType: hard - -"@eslint/plugin-kit@npm:^0.2.0": - version: 0.2.0 - resolution: "@eslint/plugin-kit@npm:0.2.0" - dependencies: - levn: "npm:^0.4.1" - checksum: 10c0/00b92bc52ad09b0e2bbbb30591c02a895f0bec3376759562590e8a57a13d096b22f8c8773b6bf791a7cf2ea614123b3d592fd006c51ac5fd0edbb90ea6d8760c - languageName: node - linkType: hard - "@evocateur/libnpmaccess@npm:^3.1.2": version: 3.1.2 resolution: "@evocateur/libnpmaccess@npm:3.1.2" @@ -2665,37 +2541,6 @@ __metadata: languageName: node linkType: hard -"@humanfs/core@npm:^0.19.0": - version: 0.19.0 - resolution: "@humanfs/core@npm:0.19.0" - checksum: 10c0/f87952d5caba6ae427a620eff783c5d0b6cef0cfc256dec359cdaa636c5f161edb8d8dad576742b3de7f0b2f222b34aad6870248e4b7d2177f013426cbcda232 - languageName: node - linkType: hard - -"@humanfs/node@npm:^0.16.5": - version: 0.16.5 - resolution: "@humanfs/node@npm:0.16.5" - dependencies: - "@humanfs/core": "npm:^0.19.0" - "@humanwhocodes/retry": "npm:^0.3.0" - checksum: 10c0/41c365ab09e7c9eaeed373d09243195aef616d6745608a36fc3e44506148c28843872f85e69e2bf5f1e992e194286155a1c1cecfcece6a2f43875e37cd243935 - languageName: node - linkType: hard - -"@humanwhocodes/module-importer@npm:^1.0.1": - version: 1.0.1 - resolution: "@humanwhocodes/module-importer@npm:1.0.1" - checksum: 10c0/909b69c3b86d482c26b3359db16e46a32e0fb30bd306a3c176b8313b9e7313dba0f37f519de6aa8b0a1921349e505f259d19475e123182416a506d7f87e7f529 - languageName: node - linkType: hard - -"@humanwhocodes/retry@npm:^0.3.0, @humanwhocodes/retry@npm:^0.3.1": - version: 0.3.1 - resolution: "@humanwhocodes/retry@npm:0.3.1" - checksum: 10c0/f0da1282dfb45e8120480b9e2e275e2ac9bbe1cf016d046fdad8e27cc1285c45bb9e711681237944445157b430093412b4446c1ab3fc4bb037861b5904101d3b - languageName: node - linkType: hard - "@img/sharp-darwin-arm64@npm:0.33.5": version: 0.33.5 resolution: "@img/sharp-darwin-arm64@npm:0.33.5" @@ -4582,15 +4427,6 @@ __metadata: languageName: node linkType: hard -"@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1": - version: 5.1.1-v1 - resolution: "@nicolo-ribaudo/eslint-scope-5-internals@npm:5.1.1-v1" - dependencies: - eslint-scope: "npm:5.1.1" - checksum: 10c0/75dda3e623b8ad7369ca22552d6beee337a814b2d0e8a32d23edd13fcb65c8082b32c5d86e436f3860dd7ade30d91d5db55d4ef9a08fb5a976c718ecc0d88a74 - languageName: node - linkType: hard - "@nodelib/fs.scandir@npm:2.1.5": version: 2.1.5 resolution: "@nodelib/fs.scandir@npm:2.1.5" @@ -4882,6 +4718,139 @@ __metadata: languageName: node linkType: hard +"@oxlint/binding-android-arm-eabi@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-android-arm-eabi@npm:1.63.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxlint/binding-android-arm64@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-android-arm64@npm:1.63.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-darwin-arm64@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-darwin-arm64@npm:1.63.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-darwin-x64@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-darwin-x64@npm:1.63.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/binding-freebsd-x64@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-freebsd-x64@npm:1.63.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm-gnueabihf@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-arm-gnueabihf@npm:1.63.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm-musleabihf@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-arm-musleabihf@npm:1.63.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm64-gnu@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-arm64-gnu@npm:1.63.0" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-arm64-musl@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-arm64-musl@npm:1.63.0" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/binding-linux-ppc64-gnu@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-ppc64-gnu@npm:1.63.0" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-riscv64-gnu@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-riscv64-gnu@npm:1.63.0" + conditions: os=linux & cpu=riscv64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-riscv64-musl@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-riscv64-musl@npm:1.63.0" + conditions: os=linux & cpu=riscv64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/binding-linux-s390x-gnu@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-s390x-gnu@npm:1.63.0" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-x64-gnu@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-x64-gnu@npm:1.63.0" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxlint/binding-linux-x64-musl@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-linux-x64-musl@npm:1.63.0" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxlint/binding-openharmony-arm64@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-openharmony-arm64@npm:1.63.0" + conditions: os=openharmony & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-win32-arm64-msvc@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-win32-arm64-msvc@npm:1.63.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxlint/binding-win32-ia32-msvc@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-win32-ia32-msvc@npm:1.63.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxlint/binding-win32-x64-msvc@npm:1.63.0": + version: 1.63.0 + resolution: "@oxlint/binding-win32-x64-msvc@npm:1.63.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@parcel/bundler-default@npm:2.16.3": version: 2.16.3 resolution: "@parcel/bundler-default@npm:2.16.3" @@ -6424,13 +6393,6 @@ __metadata: languageName: node linkType: hard -"@pkgr/core@npm:^0.1.0": - version: 0.1.1 - resolution: "@pkgr/core@npm:0.1.1" - checksum: 10c0/3f7536bc7f57320ab2cf96f8973664bef624710c403357429fbf680a5c3b4843c1dbd389bb43daa6b1f6f1f007bb082f5abcb76bb2b5dc9f421647743b71d3d8 - languageName: node - linkType: hard - "@pkgr/core@npm:^0.2.9": version: 0.2.9 resolution: "@pkgr/core@npm:0.2.9" @@ -9704,13 +9666,6 @@ __metadata: languageName: node linkType: hard -"@rtsao/scc@npm:^1.1.0": - version: 1.1.0 - resolution: "@rtsao/scc@npm:1.1.0" - checksum: 10c0/b5bcfb0d87f7d1c1c7c0f7693f53b07866ed9fec4c34a97a8c948fb9a7c0082e416ce4d3b60beb4f5e167cbe04cdeefbf6771320f3ede059b9ce91188c409a5b - languageName: node - linkType: hard - "@shuding/opentype.js@npm:1.4.0-beta.0": version: 1.4.0-beta.0 resolution: "@shuding/opentype.js@npm:1.4.0-beta.0" @@ -10818,7 +10773,7 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:^1.0.6": +"@types/estree@npm:*": version: 1.0.6 resolution: "@types/estree@npm:1.0.6" checksum: 10c0/cdfd751f6f9065442cd40957c07fd80361c962869aa853c1c2fd03e101af8b9389d8ff4955a43a6fcfa223dd387a089937f95be0f3eec21ca527039fd2d9859a @@ -10969,20 +10924,6 @@ __metadata: languageName: node linkType: hard -"@types/json-schema@npm:^7.0.15": - version: 7.0.15 - resolution: "@types/json-schema@npm:7.0.15" - checksum: 10c0/a996a745e6c5d60292f36731dd41341339d4eeed8180bb09226e5c8d23759067692b1d88e5d91d72ee83dfc00d3aca8e7bd43ea120516c17922cbcb7c3e252db - languageName: node - linkType: hard - -"@types/json5@npm:^0.0.29": - version: 0.0.29 - resolution: "@types/json5@npm:0.0.29" - checksum: 10c0/6bf5337bc447b706bb5b4431d37686aa2ea6d07cfd6f79cc31de80170d6ff9b1c7384a9c0ccbc45b3f512bae9e9f75c2e12109806a15331dc94e8a8db6dbb4ac - languageName: node - linkType: hard - "@types/junit-report-builder@npm:^3.0.2": version: 3.0.2 resolution: "@types/junit-report-builder@npm:3.0.2" @@ -11210,203 +11151,6 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/eslint-plugin@npm:8.38.0" - dependencies: - "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.38.0" - "@typescript-eslint/type-utils": "npm:8.38.0" - "@typescript-eslint/utils": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - graphemer: "npm:^1.4.0" - ignore: "npm:^7.0.0" - natural-compare: "npm:^1.4.0" - ts-api-utils: "npm:^2.1.0" - peerDependencies: - "@typescript-eslint/parser": ^8.38.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/199b82e9f0136baecf515df7c31bfed926a7c6d4e6298f64ee1a77c8bdd7a8cb92a2ea55a5a345c9f2948a02f7be6d72530efbe803afa1892b593fbd529d0c27 - languageName: node - linkType: hard - -"@typescript-eslint/parser@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/parser@npm:8.38.0" - dependencies: - "@typescript-eslint/scope-manager": "npm:8.38.0" - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - debug: "npm:^4.3.4" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/5580c2a328f0c15f85e4a0961a07584013cc0aca85fe868486187f7c92e9e3f6602c6e3dab917b092b94cd492ed40827c6f5fea42730bef88eb17592c947adf4 - languageName: node - linkType: hard - -"@typescript-eslint/project-service@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/project-service@npm:8.38.0" - dependencies: - "@typescript-eslint/tsconfig-utils": "npm:^8.38.0" - "@typescript-eslint/types": "npm:^8.38.0" - debug: "npm:^4.3.4" - peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/87d2f55521e289bbcdc666b1f4587ee2d43039cee927310b05abaa534b528dfb1b5565c1545bb4996d7fbdf9d5a3b0aa0e6c93a8f1289e3fcfd60d246364a884 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/scope-manager@npm:8.38.0" - dependencies: - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - checksum: 10c0/ceaf489ea1f005afb187932a7ee363dfe1e0f7cc3db921283991e20e4c756411a5e25afbec72edd2095d6a4384f73591f4c750cf65b5eaa650c90f64ef9fe809 - languageName: node - linkType: hard - -"@typescript-eslint/scope-manager@npm:8.9.0": - version: 8.9.0 - resolution: "@typescript-eslint/scope-manager@npm:8.9.0" - dependencies: - "@typescript-eslint/types": "npm:8.9.0" - "@typescript-eslint/visitor-keys": "npm:8.9.0" - checksum: 10c0/1fb77a982e3384d8cabd64678ea8f9de328708080ff9324bf24a44da4e8d7b7692ae4820efc3ef36027bf0fd6a061680d3c30ce63d661fb31e18970fca5e86c5 - languageName: node - linkType: hard - -"@typescript-eslint/tsconfig-utils@npm:8.38.0, @typescript-eslint/tsconfig-utils@npm:^8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/tsconfig-utils@npm:8.38.0" - peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/1a90da16bf1f7cfbd0303640a8ead64a0080f2b1d5969994bdac3b80abfa1177f0c6fbf61250bae082e72cf5014308f2f5cc98edd6510202f13420a7ffd07a84 - languageName: node - linkType: hard - -"@typescript-eslint/type-utils@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/type-utils@npm:8.38.0" - dependencies: - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - "@typescript-eslint/utils": "npm:8.38.0" - debug: "npm:^4.3.4" - ts-api-utils: "npm:^2.1.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/27795c4bd0be395dda3424e57d746639c579b7522af1c17731b915298a6378fd78869e8e141526064b6047db2c86ba06444469ace19c98cda5779d06f4abd37c - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.38.0, @typescript-eslint/types@npm:^8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/types@npm:8.38.0" - checksum: 10c0/f0ac0060c98c0f3d1871f107177b6ae25a0f1846ca8bd8cfc7e1f1dd0ddce293cd8ac4a5764d6a767de3503d5d01defcd68c758cb7ba6de52f82b209a918d0d2 - languageName: node - linkType: hard - -"@typescript-eslint/types@npm:8.9.0": - version: 8.9.0 - resolution: "@typescript-eslint/types@npm:8.9.0" - checksum: 10c0/8d901b7ed2f943624c24f7fa67f7be9d49a92554d54c4f27397c05b329ceff59a9ea246810b53ff36fca08760c14305dd4ce78fbac7ca0474311b0575bf49010 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.38.0" - dependencies: - "@typescript-eslint/project-service": "npm:8.38.0" - "@typescript-eslint/tsconfig-utils": "npm:8.38.0" - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/visitor-keys": "npm:8.38.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^2.1.0" - peerDependencies: - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/00a00f6549877f4ae5c2847fa5ac52bf42cbd59a87533856c359e2746e448ed150b27a6137c92fd50c06e6a4b39e386d6b738fac97d80d05596e81ce55933230 - languageName: node - linkType: hard - -"@typescript-eslint/typescript-estree@npm:8.9.0": - version: 8.9.0 - resolution: "@typescript-eslint/typescript-estree@npm:8.9.0" - dependencies: - "@typescript-eslint/types": "npm:8.9.0" - "@typescript-eslint/visitor-keys": "npm:8.9.0" - debug: "npm:^4.3.4" - fast-glob: "npm:^3.3.2" - is-glob: "npm:^4.0.3" - minimatch: "npm:^9.0.4" - semver: "npm:^7.6.0" - ts-api-utils: "npm:^1.3.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10c0/bb5ec70727f07d1575e95f9d117762636209e1ab073a26c4e873e1e5b4617b000d300a23d294ad81693f7e99abe3e519725452c30b235a253edcd85b6ae052b0 - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/utils@npm:8.38.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.7.0" - "@typescript-eslint/scope-manager": "npm:8.38.0" - "@typescript-eslint/types": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/e97a45bf44f315f9ed8c2988429e18c88e3369c9ee3227ee86446d2d49f7325abebbbc9ce801e178f676baa986d3e1fd4b5391f1640c6eb8944c123423ae43bb - languageName: node - linkType: hard - -"@typescript-eslint/utils@npm:^6.0.0 || ^7.0.0 || ^8.0.0": - version: 8.9.0 - resolution: "@typescript-eslint/utils@npm:8.9.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.9.0" - "@typescript-eslint/types": "npm:8.9.0" - "@typescript-eslint/typescript-estree": "npm:8.9.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/af13e3d501060bdc5fa04b131b3f9a90604e5c1d4845d1f8bd94b703a3c146a76debfc21fe65a7f3a0459ed6c57cf2aa3f0a052469bb23b6f35ff853fe9495b1 - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.38.0": - version: 8.38.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.38.0" - dependencies: - "@typescript-eslint/types": "npm:8.38.0" - eslint-visitor-keys: "npm:^4.2.1" - checksum: 10c0/071a756e383f41a6c9e51d78c8c64bd41cd5af68b0faef5fbaec4fa5dbd65ec9e4cd610c2e2cdbe9e2facc362995f202850622b78e821609a277b5b601a1d4ec - languageName: node - linkType: hard - -"@typescript-eslint/visitor-keys@npm:8.9.0": - version: 8.9.0 - resolution: "@typescript-eslint/visitor-keys@npm:8.9.0" - dependencies: - "@typescript-eslint/types": "npm:8.9.0" - eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/e33208b946841f1838d87d64f4ee230f798e68bdce8c181d3ac0abb567f758cb9c4bdccc919d493167869f413ca4c400e7db0f7dd7e8fc84ab6a8344076a7458 - languageName: node - linkType: hard - "@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20251223.1": version: 7.0.0-dev.20251223.1 resolution: "@typescript/native-preview-darwin-arm64@npm:7.0.0-dev.20251223.1" @@ -12181,7 +11925,7 @@ __metadata: languageName: node linkType: hard -"acorn-jsx@npm:^5.0.0, acorn-jsx@npm:^5.3.2": +"acorn-jsx@npm:^5.0.0": version: 5.3.2 resolution: "acorn-jsx@npm:5.3.2" peerDependencies: @@ -12199,7 +11943,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.12.0, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.8.1": +"acorn@npm:^8.0.0, acorn@npm:^8.1.0, acorn@npm:^8.11.0, acorn@npm:^8.12.1, acorn@npm:^8.4.1, acorn@npm:^8.8.1": version: 8.12.1 resolution: "acorn@npm:8.12.1" bin: @@ -12293,7 +12037,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^6.12.3, ajv@npm:^6.12.4, ajv@npm:^6.12.6": +"ajv@npm:^6.12.3, ajv@npm:^6.12.6": version: 6.12.6 resolution: "ajv@npm:6.12.6" dependencies: @@ -12551,13 +12295,6 @@ __metadata: languageName: node linkType: hard -"are-docs-informative@npm:^0.0.2": - version: 0.0.2 - resolution: "are-docs-informative@npm:0.0.2" - checksum: 10c0/f0326981bd699c372d268b526b170a28f2e1aec2cf99d7de0686083528427ecdf6ae41fef5d9988e224a5616298af747ad8a76e7306b0a7c97cc085a99636d60 - languageName: node - linkType: hard - "are-we-there-yet@npm:~1.1.2": version: 1.1.5 resolution: "are-we-there-yet@npm:1.1.5" @@ -12609,15 +12346,6 @@ __metadata: languageName: node linkType: hard -"aria-query@npm:~5.1.3": - version: 5.1.3 - resolution: "aria-query@npm:5.1.3" - dependencies: - deep-equal: "npm:^2.0.5" - checksum: 10c0/edcbc8044c4663d6f88f785e983e6784f98cb62b4ba1e9dd8d61b725d0203e4cfca38d676aee984c31f354103461102a3d583aa4fbe4fd0a89b679744f4e5faf - languageName: node - linkType: hard - "arr-diff@npm:^4.0.0": version: 4.0.0 resolution: "arr-diff@npm:4.0.0" @@ -12639,7 +12367,7 @@ __metadata: languageName: node linkType: hard -"array-buffer-byte-length@npm:^1.0.0, array-buffer-byte-length@npm:^1.0.1": +"array-buffer-byte-length@npm:^1.0.1": version: 1.0.1 resolution: "array-buffer-byte-length@npm:1.0.1" dependencies: @@ -12694,20 +12422,6 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.6, array-includes@npm:^3.1.8": - version: 3.1.8 - resolution: "array-includes@npm:3.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - is-string: "npm:^1.0.7" - checksum: 10c0/5b1004d203e85873b96ddc493f090c9672fd6c80d7a60b798da8a14bff8a670ff95db5aafc9abc14a211943f05220dacf8ea17638ae0af1a6a47b8c0b48ce370 - languageName: node - linkType: hard - "array-slice@npm:^1.0.0": version: 1.1.0 resolution: "array-slice@npm:1.1.0" @@ -12738,58 +12452,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.findlast@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlast@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/ddc952b829145ab45411b9d6adcb51a8c17c76bf89c9dd64b52d5dffa65d033da8c076ed2e17091779e83bc892b9848188d7b4b33453c5565e65a92863cb2775 - languageName: node - linkType: hard - -"array.prototype.findlastindex@npm:^1.2.5": - version: 1.2.5 - resolution: "array.prototype.findlastindex@npm:1.2.5" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/962189487728b034f3134802b421b5f39e42ee2356d13b42d2ddb0e52057ffdcc170b9524867f4f0611a6f638f4c19b31e14606e8bcbda67799e26685b195aa3 - languageName: node - linkType: hard - -"array.prototype.flat@npm:^1.3.1, array.prototype.flat@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flat@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/a578ed836a786efbb6c2db0899ae80781b476200617f65a44846cb1ed8bd8b24c8821b83703375d8af639c689497b7b07277060024b9919db94ac3e10dc8a49b - languageName: node - linkType: hard - -"array.prototype.flatmap@npm:^1.3.2": - version: 1.3.2 - resolution: "array.prototype.flatmap@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.2.0" - es-abstract: "npm:^1.22.1" - es-shim-unscopables: "npm:^1.0.0" - checksum: 10c0/67b3f1d602bb73713265145853128b1ad77cc0f9b833c7e1e056b323fbeac41a4ff1c9c99c7b9445903caea924d9ca2450578d9011913191aa88cc3c3a4b54f4 - languageName: node - linkType: hard - "array.prototype.flatmap@npm:^1.3.3": version: 1.3.3 resolution: "array.prototype.flatmap@npm:1.3.3" @@ -12802,19 +12464,6 @@ __metadata: languageName: node linkType: hard -"array.prototype.tosorted@npm:^1.1.4": - version: 1.1.4 - resolution: "array.prototype.tosorted@npm:1.1.4" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-shim-unscopables: "npm:^1.0.2" - checksum: 10c0/eb3c4c4fc0381b0bf6dba2ea4d48d367c2827a0d4236a5718d97caaccc6b78f11f4cadf090736e86301d295a6aa4967ed45568f92ced51be8cbbacd9ca410943 - languageName: node - linkType: hard - "arraybuffer.prototype.slice@npm:^1.0.3": version: 1.0.3 resolution: "arraybuffer.prototype.slice@npm:1.0.3" @@ -12890,13 +12539,6 @@ __metadata: languageName: node linkType: hard -"ast-types-flow@npm:^0.0.8": - version: 0.0.8 - resolution: "ast-types-flow@npm:0.0.8" - checksum: 10c0/f2a0ba8055353b743c41431974521e5e852a9824870cd6fce2db0e538ac7bf4da406bbd018d109af29ff3f8f0993f6a730c9eddbd0abd031fbcb29ca75c1014e - languageName: node - linkType: hard - "ast-types@npm:0.16.1": version: 0.16.1 resolution: "ast-types@npm:0.16.1" @@ -13033,13 +12675,6 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:^4.10.0, axe-core@npm:^4.2.0, axe-core@npm:^4.5.1": - version: 4.10.0 - resolution: "axe-core@npm:4.10.0" - checksum: 10c0/732c171d48caaace5e784895c4dacb8ca6155e9d98045138ebe3952f78457dd05b92c57d05b41ce2a570aff87dbd0471e8398d2c0f6ebe79617b746c8f658998 - languageName: node - linkType: hard - "axe-core@npm:^4.10.1": version: 4.11.0 resolution: "axe-core@npm:4.11.0" @@ -13047,6 +12682,13 @@ __metadata: languageName: node linkType: hard +"axe-core@npm:^4.2.0, axe-core@npm:^4.5.1": + version: 4.10.0 + resolution: "axe-core@npm:4.10.0" + checksum: 10c0/732c171d48caaace5e784895c4dacb8ca6155e9d98045138ebe3952f78457dd05b92c57d05b41ce2a570aff87dbd0471e8398d2c0f6ebe79617b746c8f658998 + languageName: node + linkType: hard + "axe-html-reporter@npm:2.2.11": version: 2.2.11 resolution: "axe-html-reporter@npm:2.2.11" @@ -13109,13 +12751,6 @@ __metadata: languageName: node linkType: hard -"axobject-query@npm:^4.1.0": - version: 4.1.0 - resolution: "axobject-query@npm:4.1.0" - checksum: 10c0/c470e4f95008f232eadd755b018cb55f16c03ccf39c027b941cd8820ac6b68707ce5d7368a46756db4256fbc91bb4ead368f84f7fb034b2b7932f082f6dc0775 - languageName: node - linkType: hard - "b4a@npm:^1.6.4": version: 1.6.7 resolution: "b4a@npm:1.6.7" @@ -14681,13 +14316,6 @@ __metadata: languageName: node linkType: hard -"comment-parser@npm:1.4.1": - version: 1.4.1 - resolution: "comment-parser@npm:1.4.1" - checksum: 10c0/d6c4be3f5be058f98b24f2d557f745d8fe1cc9eb75bebbdccabd404a0e1ed41563171b16285f593011f8b6a5ec81f564fb1f2121418ac5cbf0f49255bf0840dd - languageName: node - linkType: hard - "commondir@npm:^1.0.1": version: 1.0.1 resolution: "commondir@npm:1.0.1" @@ -15218,7 +14846,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.1, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -15418,13 +15046,6 @@ __metadata: languageName: node linkType: hard -"damerau-levenshtein@npm:^1.0.8": - version: 1.0.8 - resolution: "damerau-levenshtein@npm:1.0.8" - checksum: 10c0/4c2647e0f42acaee7d068756c1d396e296c3556f9c8314bac1ac63ffb236217ef0e7e58602b18bb2173deec7ec8e0cac8e27cccf8f5526666b4ff11a13ad54a3 - languageName: node - linkType: hard - "dargs@npm:^4.0.1": version: 4.1.0 resolution: "dargs@npm:4.1.0" @@ -15566,7 +15187,7 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:4.4.0, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.6": +"debug@npm:4, debug@npm:4.4.0, debug@npm:^4.0.0, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.4": version: 4.4.0 resolution: "debug@npm:4.4.0" dependencies: @@ -15708,32 +15329,6 @@ __metadata: languageName: node linkType: hard -"deep-equal@npm:^2.0.5": - version: 2.2.1 - resolution: "deep-equal@npm:2.2.1" - dependencies: - array-buffer-byte-length: "npm:^1.0.0" - call-bind: "npm:^1.0.2" - es-get-iterator: "npm:^1.1.3" - get-intrinsic: "npm:^1.2.0" - is-arguments: "npm:^1.1.1" - is-array-buffer: "npm:^3.0.2" - is-date-object: "npm:^1.0.5" - is-regex: "npm:^1.1.4" - is-shared-array-buffer: "npm:^1.0.2" - isarray: "npm:^2.0.5" - object-is: "npm:^1.1.5" - object-keys: "npm:^1.1.1" - object.assign: "npm:^4.1.4" - regexp.prototype.flags: "npm:^1.5.0" - side-channel: "npm:^1.0.4" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.1" - which-typed-array: "npm:^1.1.9" - checksum: 10c0/9e32606f0e24ef4d6b100c68cadae81495c3638944e933afc4b8389b042e95c5fe1381492cf7a6d385bcbae564c9cfb7086f37f277e37521a632b008a6b208dc - languageName: node - linkType: hard - "deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -15741,13 +15336,6 @@ __metadata: languageName: node linkType: hard -"deep-is@npm:^0.1.3": - version: 0.1.3 - resolution: "deep-is@npm:0.1.3" - checksum: 10c0/f4e21bf6fbb51bca0214e04f079deadfc5a0df3d7822f4b5e45e78960ae1e9a379b93d650377b80ccd0fc6bd7cd995a0aeabbcc7496b8c2dd16ec57aece82d74 - languageName: node - linkType: hard - "deepmerge@npm:^4.2.2, deepmerge@npm:^4.3.1": version: 4.3.1 resolution: "deepmerge@npm:4.3.1" @@ -15998,15 +15586,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^2.1.0": - version: 2.1.0 - resolution: "doctrine@npm:2.1.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10c0/b6416aaff1f380bf56c3b552f31fdf7a69b45689368deca72d28636f41c16bb28ec3ebc40ace97db4c1afc0ceeb8120e8492fe0046841c94c2933b2e30a7d5ac - languageName: node - linkType: hard - "doctrine@npm:^3.0.0": version: 3.0.0 resolution: "doctrine@npm:3.0.0" @@ -16455,7 +16034,7 @@ __metadata: languageName: node linkType: hard -"es-abstract@npm:^1.17.0-next.1, es-abstract@npm:^1.17.5, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0, es-abstract@npm:^1.23.1, es-abstract@npm:^1.23.2, es-abstract@npm:^1.23.3": +"es-abstract@npm:^1.17.0-next.1, es-abstract@npm:^1.22.1, es-abstract@npm:^1.22.3, es-abstract@npm:^1.23.0": version: 1.23.3 resolution: "es-abstract@npm:1.23.3" dependencies: @@ -16585,52 +16164,6 @@ __metadata: languageName: node linkType: hard -"es-get-iterator@npm:^1.1.3": - version: 1.1.3 - resolution: "es-get-iterator@npm:1.1.3" - dependencies: - call-bind: "npm:^1.0.2" - get-intrinsic: "npm:^1.1.3" - has-symbols: "npm:^1.0.3" - is-arguments: "npm:^1.1.1" - is-map: "npm:^2.0.2" - is-set: "npm:^2.0.2" - is-string: "npm:^1.0.7" - isarray: "npm:^2.0.5" - stop-iteration-iterator: "npm:^1.0.0" - checksum: 10c0/ebd11effa79851ea75d7f079405f9d0dc185559fd65d986c6afea59a0ff2d46c2ed8675f19f03dce7429d7f6c14ff9aede8d121fbab78d75cfda6a263030bac0 - languageName: node - linkType: hard - -"es-iterator-helpers@npm:^1.0.19": - version: 1.1.0 - resolution: "es-iterator-helpers@npm:1.1.0" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.3" - es-errors: "npm:^1.3.0" - es-set-tostringtag: "npm:^2.0.3" - function-bind: "npm:^1.1.2" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.4" - has-property-descriptors: "npm:^1.0.2" - has-proto: "npm:^1.0.3" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - iterator.prototype: "npm:^1.1.3" - safe-array-concat: "npm:^1.1.2" - checksum: 10c0/84d6c240c7da6e62323b336cb1497781546dab16bebdbd879ccfdf588979712d3e941d41165b6c2ffce5a03a7b929d4e6131d3124d330da1a0e2bfa1da7cd99f - languageName: node - linkType: hard - -"es-module-lexer@npm:^1.5.3": - version: 1.5.4 - resolution: "es-module-lexer@npm:1.5.4" - checksum: 10c0/300a469488c2f22081df1e4c8398c78db92358496e639b0df7f89ac6455462aaf5d8893939087c1a1cbcbf20eed4610c70e0bcb8f3e4b0d80a5d2611c539408c - languageName: node - linkType: hard - "es-module-lexer@npm:^1.7.0": version: 1.7.0 resolution: "es-module-lexer@npm:1.7.0" @@ -16659,7 +16192,7 @@ __metadata: languageName: node linkType: hard -"es-shim-unscopables@npm:^1.0.0, es-shim-unscopables@npm:^1.0.2": +"es-shim-unscopables@npm:^1.0.2": version: 1.0.2 resolution: "es-shim-unscopables@npm:1.0.2" dependencies: @@ -16919,13 +16452,6 @@ __metadata: languageName: node linkType: hard -"escape-string-regexp@npm:^4.0.0": - version: 4.0.0 - resolution: "escape-string-regexp@npm:4.0.0" - checksum: 10c0/9497d4dd307d845bd7f75180d8188bb17ea8c151c1edbf6b6717c100e104d629dc2dfb687686181b0f4b7d732c7dfdc4d5e7a8ff72de1b0ca283a75bbb3a9cd9 - languageName: node - linkType: hard - "escodegen@npm:^2.0.0": version: 2.1.0 resolution: "escodegen@npm:2.1.0" @@ -16944,18 +16470,7 @@ __metadata: languageName: node linkType: hard -"eslint-import-resolver-node@npm:^0.3.9": - version: 0.3.9 - resolution: "eslint-import-resolver-node@npm:0.3.9" - dependencies: - debug: "npm:^3.2.7" - is-core-module: "npm:^2.13.0" - resolve: "npm:^1.22.4" - checksum: 10c0/0ea8a24a72328a51fd95aa8f660dcca74c1429806737cf10261ab90cfcaaf62fd1eff664b76a44270868e0a932711a81b250053942595bcd00a93b1c1575dd61 - languageName: node - linkType: hard - -"eslint-module-utils@npm:^2.1.1, eslint-module-utils@npm:^2.12.0": +"eslint-module-utils@npm:^2.1.1": version: 2.12.0 resolution: "eslint-module-utils@npm:2.12.0" dependencies: @@ -16967,100 +16482,6 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-import@npm:^2.31.0": - version: 2.31.0 - resolution: "eslint-plugin-import@npm:2.31.0" - dependencies: - "@rtsao/scc": "npm:^1.1.0" - array-includes: "npm:^3.1.8" - array.prototype.findlastindex: "npm:^1.2.5" - array.prototype.flat: "npm:^1.3.2" - array.prototype.flatmap: "npm:^1.3.2" - debug: "npm:^3.2.7" - doctrine: "npm:^2.1.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-module-utils: "npm:^2.12.0" - hasown: "npm:^2.0.2" - is-core-module: "npm:^2.15.1" - is-glob: "npm:^4.0.3" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - object.groupby: "npm:^1.0.3" - object.values: "npm:^1.2.0" - semver: "npm:^6.3.1" - string.prototype.trimend: "npm:^1.0.8" - tsconfig-paths: "npm:^3.15.0" - peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9 - checksum: 10c0/e21d116ddd1900e091ad120b3eb68c5dd5437fe2c930f1211781cd38b246f090a6b74d5f3800b8255a0ed29782591521ad44eb21c5534960a8f1fb4040fd913a - languageName: node - linkType: hard - -"eslint-plugin-jest@npm:^28.8.3": - version: 28.8.3 - resolution: "eslint-plugin-jest@npm:28.8.3" - dependencies: - "@typescript-eslint/utils": "npm:^6.0.0 || ^7.0.0 || ^8.0.0" - peerDependencies: - "@typescript-eslint/eslint-plugin": ^6.0.0 || ^7.0.0 || ^8.0.0 - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - jest: "*" - peerDependenciesMeta: - "@typescript-eslint/eslint-plugin": - optional: true - jest: - optional: true - checksum: 10c0/beacf85c2fbb39ef9b9839472a8a837cdbab6549b29abaff8999034ac41021e1f06d1779db3ea9d0f966be52e5daeacfd05c239d686370d8b8cb9c68d60e59b6 - languageName: node - linkType: hard - -"eslint-plugin-jsdoc@npm:^50.4.1": - version: 50.4.1 - resolution: "eslint-plugin-jsdoc@npm:50.4.1" - dependencies: - "@es-joy/jsdoccomment": "npm:~0.49.0" - are-docs-informative: "npm:^0.0.2" - comment-parser: "npm:1.4.1" - debug: "npm:^4.3.6" - escape-string-regexp: "npm:^4.0.0" - espree: "npm:^10.1.0" - esquery: "npm:^1.6.0" - parse-imports: "npm:^2.1.1" - semver: "npm:^7.6.3" - spdx-expression-parse: "npm:^4.0.0" - synckit: "npm:^0.9.1" - peerDependencies: - eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/d3b3947fc71acac2a790774729d96da4bd61dfc783558a998fca0b581b4dec059b5cdb048cd5873a8f188c5da1929307643909dd4f51063d2d6a00487b8b8940 - languageName: node - linkType: hard - -"eslint-plugin-jsx-a11y@npm:^6.10.0": - version: 6.10.0 - resolution: "eslint-plugin-jsx-a11y@npm:6.10.0" - dependencies: - aria-query: "npm:~5.1.3" - array-includes: "npm:^3.1.8" - array.prototype.flatmap: "npm:^1.3.2" - ast-types-flow: "npm:^0.0.8" - axe-core: "npm:^4.10.0" - axobject-query: "npm:^4.1.0" - damerau-levenshtein: "npm:^1.0.8" - emoji-regex: "npm:^9.2.2" - es-iterator-helpers: "npm:^1.0.19" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^3.3.5" - language-tags: "npm:^1.0.9" - minimatch: "npm:^3.1.2" - object.fromentries: "npm:^2.0.8" - safe-regex-test: "npm:^1.0.3" - string.prototype.includes: "npm:^2.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9 - checksum: 10c0/9f8e29a3317fb6a82e2ecd333fe0fab3a69fff786d087eb65dc723d6e954473ab681d14a252d7cb2971f5e7f68816cb6f7731766558e1833a77bd73af1b5ab34 - languageName: node - linkType: hard - "eslint-plugin-react-hooks@npm:^7.0.0": version: 7.0.0 resolution: "eslint-plugin-react-hooks@npm:7.0.0" @@ -17076,156 +16497,14 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-react@npm:^7.37.1": - version: 7.37.1 - resolution: "eslint-plugin-react@npm:7.37.1" - dependencies: - array-includes: "npm:^3.1.8" - array.prototype.findlast: "npm:^1.2.5" - array.prototype.flatmap: "npm:^1.3.2" - array.prototype.tosorted: "npm:^1.1.4" - doctrine: "npm:^2.1.0" - es-iterator-helpers: "npm:^1.0.19" - estraverse: "npm:^5.3.0" - hasown: "npm:^2.0.2" - jsx-ast-utils: "npm:^2.4.1 || ^3.0.0" - minimatch: "npm:^3.1.2" - object.entries: "npm:^1.1.8" - object.fromentries: "npm:^2.0.8" - object.values: "npm:^1.2.0" - prop-types: "npm:^15.8.1" - resolve: "npm:^2.0.0-next.5" - semver: "npm:^6.3.1" - string.prototype.matchall: "npm:^4.0.11" - string.prototype.repeat: "npm:^1.0.0" - peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7 - checksum: 10c0/13cf55666f16d2ca45b14aad1b0e14741d1817679c86d20aff0bc1e802439a8541f40a42c4c8e3486ffb710f1bcc2f3e56697f2b5f724306a7fca174e1ad6433 - languageName: node - linkType: hard - "eslint-plugin-rsp-rules@workspace:packages/dev/eslint-plugin-rsp-rules": version: 0.0.0-use.local resolution: "eslint-plugin-rsp-rules@workspace:packages/dev/eslint-plugin-rsp-rules" + dependencies: + find-up: "npm:^4.1.0" languageName: unknown linkType: soft -"eslint-plugin-rulesdir@npm:^0.2.2": - version: 0.2.2 - resolution: "eslint-plugin-rulesdir@npm:0.2.2" - checksum: 10c0/8d53a476abb538bb63f95051c4c8279f4960e64c78f6b045dfbfc9f9384dcf9c9b61df56303ac4970f4ce015bcf5e422c16d53d6877abac1431def2c4816e2f0 - languageName: node - linkType: hard - -"eslint-scope@npm:5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^4.1.1" - checksum: 10c0/d30ef9dc1c1cbdece34db1539a4933fe3f9b14e1ffb27ecc85987902ee663ad7c9473bbd49a9a03195a373741e62e2f807c4938992e019b511993d163450e70a - languageName: node - linkType: hard - -"eslint-scope@npm:^8.1.0": - version: 8.1.0 - resolution: "eslint-scope@npm:8.1.0" - dependencies: - esrecurse: "npm:^4.3.0" - estraverse: "npm:^5.2.0" - checksum: 10c0/ae1df7accae9ea90465c2ded70f7064d6d1f2962ef4cc87398855c4f0b3a5ab01063e0258d954bb94b184f6759febe04c3118195cab5c51978a7229948ba2875 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-visitor-keys@npm:2.1.0" - checksum: 10c0/9f0e3a2db751d84067d15977ac4b4472efd6b303e369e6ff241a99feac04da758f46d5add022c33d06b53596038dbae4b4aceb27c7e68b8dfc1055b35e495787 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^3.3.0, eslint-visitor-keys@npm:^3.4.3": - version: 3.4.3 - resolution: "eslint-visitor-keys@npm:3.4.3" - checksum: 10c0/92708e882c0a5ffd88c23c0b404ac1628cf20104a108c745f240a13c332a11aac54f49a22d5762efbffc18ecbc9a580d1b7ad034bf5f3cc3307e5cbff2ec9820 - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^4.1.0": - version: 4.1.0 - resolution: "eslint-visitor-keys@npm:4.1.0" - checksum: 10c0/5483ef114c93a136aa234140d7aa3bd259488dae866d35cb0d0b52e6a158f614760a57256ac8d549acc590a87042cb40f6951815caa821e55dc4fd6ef4c722eb - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^4.2.1": - version: 4.2.1 - resolution: "eslint-visitor-keys@npm:4.2.1" - checksum: 10c0/fcd43999199d6740db26c58dbe0c2594623e31ca307e616ac05153c9272f12f1364f5a0b1917a8e962268fdecc6f3622c1c2908b4fcc2e047a106fe6de69dc43 - languageName: node - linkType: hard - -"eslint@npm:^9.12.0": - version: 9.12.0 - resolution: "eslint@npm:9.12.0" - dependencies: - "@eslint-community/eslint-utils": "npm:^4.2.0" - "@eslint-community/regexpp": "npm:^4.11.0" - "@eslint/config-array": "npm:^0.18.0" - "@eslint/core": "npm:^0.6.0" - "@eslint/eslintrc": "npm:^3.1.0" - "@eslint/js": "npm:9.12.0" - "@eslint/plugin-kit": "npm:^0.2.0" - "@humanfs/node": "npm:^0.16.5" - "@humanwhocodes/module-importer": "npm:^1.0.1" - "@humanwhocodes/retry": "npm:^0.3.1" - "@types/estree": "npm:^1.0.6" - "@types/json-schema": "npm:^7.0.15" - ajv: "npm:^6.12.4" - chalk: "npm:^4.0.0" - cross-spawn: "npm:^7.0.2" - debug: "npm:^4.3.2" - escape-string-regexp: "npm:^4.0.0" - eslint-scope: "npm:^8.1.0" - eslint-visitor-keys: "npm:^4.1.0" - espree: "npm:^10.2.0" - esquery: "npm:^1.5.0" - esutils: "npm:^2.0.2" - fast-deep-equal: "npm:^3.1.3" - file-entry-cache: "npm:^8.0.0" - find-up: "npm:^5.0.0" - glob-parent: "npm:^6.0.2" - ignore: "npm:^5.2.0" - imurmurhash: "npm:^0.1.4" - is-glob: "npm:^4.0.0" - json-stable-stringify-without-jsonify: "npm:^1.0.1" - lodash.merge: "npm:^4.6.2" - minimatch: "npm:^3.1.2" - natural-compare: "npm:^1.4.0" - optionator: "npm:^0.9.3" - text-table: "npm:^0.2.0" - peerDependencies: - jiti: "*" - peerDependenciesMeta: - jiti: - optional: true - bin: - eslint: bin/eslint.js - checksum: 10c0/67cf6ea3ea28dcda7dd54aac33e2d4028eb36991d13defb0d2339c3eaa877d5dddd12cd4416ddc701a68bcde9e0bb9e65524c2e4e9914992c724f5b51e949dda - languageName: node - linkType: hard - -"espree@npm:^10.0.1, espree@npm:^10.1.0, espree@npm:^10.2.0": - version: 10.2.0 - resolution: "espree@npm:10.2.0" - dependencies: - acorn: "npm:^8.12.0" - acorn-jsx: "npm:^5.3.2" - eslint-visitor-keys: "npm:^4.1.0" - checksum: 10c0/2b6bfb683e7e5ab2e9513949879140898d80a2d9867ea1db6ff5b0256df81722633b60a7523a7c614f05a39aeea159dd09ad2a0e90c0e218732fc016f9086215 - languageName: node - linkType: hard - "esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": version: 4.0.1 resolution: "esprima@npm:4.0.1" @@ -17236,32 +16515,7 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.5.0, esquery@npm:^1.6.0": - version: 1.6.0 - resolution: "esquery@npm:1.6.0" - dependencies: - estraverse: "npm:^5.1.0" - checksum: 10c0/cb9065ec605f9da7a76ca6dadb0619dfb611e37a81e318732977d90fab50a256b95fee2d925fba7c2f3f0523aa16f91587246693bc09bc34d5a59575fe6e93d2 - languageName: node - linkType: hard - -"esrecurse@npm:^4.3.0": - version: 4.3.0 - resolution: "esrecurse@npm:4.3.0" - dependencies: - estraverse: "npm:^5.2.0" - checksum: 10c0/81a37116d1408ded88ada45b9fb16dbd26fba3aadc369ce50fcaf82a0bac12772ebd7b24cd7b91fc66786bf2c1ac7b5f196bc990a473efff972f5cb338877cf5 - languageName: node - linkType: hard - -"estraverse@npm:^4.1.1": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: 10c0/9cb46463ef8a8a4905d3708a652d60122a0c20bb58dec7e0e12ab0e7235123d74214fc0141d743c381813e1b992767e2708194f6f6e0f9fd00c1b4e0887b8b6d - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": +"estraverse@npm:^5.2.0": version: 5.3.0 resolution: "estraverse@npm:5.3.0" checksum: 10c0/1ff9447b96263dec95d6d67431c5e0771eb9776427421260a3e2f0fdd5d6bd4f8e37a7338f5ad2880c9f143450c9b1e4fc2069060724570a49cf9cf0312bd107 @@ -17735,7 +16989,7 @@ __metadata: languageName: node linkType: hard -"fast-glob@npm:^3.1.0, fast-glob@npm:^3.3.2, fast-glob@npm:^3.3.3": +"fast-glob@npm:^3.1.0, fast-glob@npm:^3.3.3": version: 3.3.3 resolution: "fast-glob@npm:3.3.3" dependencies: @@ -17755,13 +17009,6 @@ __metadata: languageName: node linkType: hard -"fast-levenshtein@npm:^2.0.6": - version: 2.0.6 - resolution: "fast-levenshtein@npm:2.0.6" - checksum: 10c0/111972b37338bcb88f7d9e2c5907862c280ebf4234433b95bc611e518d192ccb2d38119c4ac86e26b668d75f7f3894f4ff5c4982899afced7ca78633b08287c4 - languageName: node - linkType: hard - "fast-levenshtein@npm:^3.0.0": version: 3.0.0 resolution: "fast-levenshtein@npm:3.0.0" @@ -17879,15 +17126,6 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^8.0.0": - version: 8.0.0 - resolution: "file-entry-cache@npm:8.0.0" - dependencies: - flat-cache: "npm:^4.0.0" - checksum: 10c0/9e2b5938b1cd9b6d7e3612bdc533afd4ac17b2fc646569e9a8abbf2eb48e5eb8e316bc38815a3ef6a1b456f4107f0d0f055a614ca613e75db6bf9ff4d72c1638 - languageName: node - linkType: hard - "fill-range@npm:^4.0.0": version: 4.0.0 resolution: "fill-range@npm:4.0.0" @@ -18030,16 +17268,6 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^5.0.0": - version: 5.0.0 - resolution: "find-up@npm:5.0.0" - dependencies: - locate-path: "npm:^6.0.0" - path-exists: "npm:^4.0.0" - checksum: 10c0/062c5a83a9c02f53cdd6d175a37ecf8f87ea5bbff1fdfb828f04bfa021441bc7583e8ebc0872a4c1baab96221fb8a8a275a19809fb93fbc40bd69ec35634069a - languageName: node - linkType: hard - "find-yarn-workspace-root@npm:^1.2.1": version: 1.2.1 resolution: "find-yarn-workspace-root@npm:1.2.1" @@ -18082,23 +17310,6 @@ __metadata: languageName: node linkType: hard -"flat-cache@npm:^4.0.0": - version: 4.0.1 - resolution: "flat-cache@npm:4.0.1" - dependencies: - flatted: "npm:^3.2.9" - keyv: "npm:^4.5.4" - checksum: 10c0/2c59d93e9faa2523e4fda6b4ada749bed432cfa28c8e251f33b25795e426a1c6dbada777afb1f74fcfff33934fdbdea921ee738fcc33e71adc9d6eca984a1cfc - languageName: node - linkType: hard - -"flatted@npm:^3.2.9": - version: 3.3.1 - resolution: "flatted@npm:3.3.1" - checksum: 10c0/324166b125ee07d4ca9bcf3a5f98d915d5db4f39d711fba640a3178b959919aae1f7cfd8aabcfef5826ed8aa8a2aa14cc85b2d7d18ff638ddf4ae3df39573eaf - languageName: node - linkType: hard - "flow-parser@npm:0.*": version: 0.235.1 resolution: "flow-parser@npm:0.235.1" @@ -18540,7 +17751,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.1.3, get-intrinsic@npm:^1.2.0, get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.3.0": +"get-intrinsic@npm:^1.2.1, get-intrinsic@npm:^1.2.3, get-intrinsic@npm:^1.2.4, get-intrinsic@npm:^1.2.5, get-intrinsic@npm:^1.2.6, get-intrinsic@npm:^1.3.0": version: 1.3.0 resolution: "get-intrinsic@npm:1.3.0" dependencies: @@ -18970,13 +18181,6 @@ __metadata: languageName: node linkType: hard -"globals@npm:^14.0.0": - version: 14.0.0 - resolution: "globals@npm:14.0.0" - checksum: 10c0/b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d - languageName: node - linkType: hard - "globals@npm:^15.11.0": version: 15.11.0 resolution: "globals@npm:15.11.0" @@ -19082,13 +18286,6 @@ __metadata: languageName: node linkType: hard -"graphemer@npm:^1.4.0": - version: 1.4.0 - resolution: "graphemer@npm:1.4.0" - checksum: 10c0/e951259d8cd2e0d196c72ec711add7115d42eb9a8146c8eeda5b8d3ac91e5dd816b9cd68920726d9fd4490368e7ed86e9c423f40db87e2d8dfafa00fa17c3a31 - languageName: node - linkType: hard - "gray-matter@npm:^4.0.3": version: 4.0.3 resolution: "gray-matter@npm:4.0.3" @@ -19815,20 +19012,6 @@ __metadata: languageName: node linkType: hard -"ignore@npm:^5.2.0": - version: 5.3.2 - resolution: "ignore@npm:5.3.2" - checksum: 10c0/f9f652c957983634ded1e7f02da3b559a0d4cc210fca3792cb67f1b153623c9c42efdc1c4121af171e295444459fc4a9201101fb041b1104a3c000bccb188337 - languageName: node - linkType: hard - -"ignore@npm:^7.0.0": - version: 7.0.5 - resolution: "ignore@npm:7.0.5" - checksum: 10c0/ae00db89fe873064a093b8999fe4cc284b13ef2a178636211842cceb650b9c3e390d3339191acb145d81ed5379d2074840cf0c33a20bdbd6f32821f79eb4ad5d - languageName: node - linkType: hard - "immediate@npm:~3.0.5": version: 3.0.6 resolution: "immediate@npm:3.0.6" @@ -20004,7 +19187,7 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.4, internal-slot@npm:^1.0.7": +"internal-slot@npm:^1.0.7": version: 1.0.7 resolution: "internal-slot@npm:1.0.7" dependencies: @@ -20119,21 +19302,11 @@ __metadata: dependencies: is-alphabetical: "npm:^2.0.0" is-decimal: "npm:^2.0.0" - checksum: 10c0/4b35c42b18e40d41378293f82a3ecd9de77049b476f748db5697c297f686e1e05b072a6aaae2d16f54d2a57f85b00cbbe755c75f6d583d1c77d6657bd0feb5a2 - languageName: node - linkType: hard - -"is-arguments@npm:^1.1.1": - version: 1.1.1 - resolution: "is-arguments@npm:1.1.1" - dependencies: - call-bind: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.0" - checksum: 10c0/5ff1f341ee4475350adfc14b2328b38962564b7c2076be2f5bac7bd9b61779efba99b9f844a7b82ba7654adccf8e8eb19d1bb0cc6d1c1a085e498f6793d4328f + checksum: 10c0/4b35c42b18e40d41378293f82a3ecd9de77049b476f748db5697c297f686e1e05b072a6aaae2d16f54d2a57f85b00cbbe755c75f6d583d1c77d6657bd0feb5a2 languageName: node linkType: hard -"is-array-buffer@npm:^3.0.2, is-array-buffer@npm:^3.0.4": +"is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" dependencies: @@ -20267,15 +19440,6 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.13.0, is-core-module@npm:^2.15.1": - version: 2.15.1 - resolution: "is-core-module@npm:2.15.1" - dependencies: - hasown: "npm:^2.0.2" - checksum: 10c0/53432f10c69c40bfd2fa8914133a68709ff9498c86c3bf5fca3cdf3145a56fd2168cbf4a43b29843a6202a120a5f9c5ffba0a4322e1e3441739bc0b641682612 - languageName: node - linkType: hard - "is-core-module@npm:^2.16.1": version: 2.16.1 resolution: "is-core-module@npm:2.16.1" @@ -20417,15 +19581,6 @@ __metadata: languageName: node linkType: hard -"is-finalizationregistry@npm:^1.0.2": - version: 1.0.2 - resolution: "is-finalizationregistry@npm:1.0.2" - dependencies: - call-bind: "npm:^1.0.2" - checksum: 10c0/81caecc984d27b1a35c68741156fc651fb1fa5e3e6710d21410abc527eb226d400c0943a167922b2e920f6b3e58b0dede9aa795882b038b85f50b3a4b877db86 - languageName: node - linkType: hard - "is-finalizationregistry@npm:^1.1.0": version: 1.1.1 resolution: "is-finalizationregistry@npm:1.1.1" @@ -20543,7 +19698,7 @@ __metadata: languageName: node linkType: hard -"is-map@npm:^2.0.2, is-map@npm:^2.0.3": +"is-map@npm:^2.0.3": version: 2.0.3 resolution: "is-map@npm:2.0.3" checksum: 10c0/2c4d431b74e00fdda7162cd8e4b763d6f6f217edf97d4f8538b94b8702b150610e2c64961340015fe8df5b1fcee33ccd2e9b62619c4a8a3a155f8de6d6d355fc @@ -20748,7 +19903,7 @@ __metadata: languageName: node linkType: hard -"is-set@npm:^2.0.2, is-set@npm:^2.0.3": +"is-set@npm:^2.0.3": version: 2.0.3 resolution: "is-set@npm:2.0.3" checksum: 10c0/f73732e13f099b2dc879c2a12341cfc22ccaca8dd504e6edae26484bd5707a35d503fba5b4daad530a9b088ced1ae6c9d8200fd92e09b428fe14ea79ce8080b7 @@ -21132,19 +20287,6 @@ __metadata: languageName: node linkType: hard -"iterator.prototype@npm:^1.1.3": - version: 1.1.3 - resolution: "iterator.prototype@npm:1.1.3" - dependencies: - define-properties: "npm:^1.2.1" - get-intrinsic: "npm:^1.2.1" - has-symbols: "npm:^1.0.3" - reflect.getprototypeof: "npm:^1.0.4" - set-function-name: "npm:^2.0.1" - checksum: 10c0/68b0320c14291fbb3d8ed5a17e255d3127e7971bec19108076667e79c9ff4c7d69f99de4b0b3075c789c3f318366d7a0a35bb086eae0f2cf832dd58465b2f9e6 - languageName: node - linkType: hard - "jackspeak@npm:^3.1.2": version: 3.3.0 resolution: "jackspeak@npm:3.3.0" @@ -22290,13 +21432,6 @@ __metadata: languageName: node linkType: hard -"jsdoc-type-pratt-parser@npm:~4.1.0": - version: 4.1.0 - resolution: "jsdoc-type-pratt-parser@npm:4.1.0" - checksum: 10c0/7700372d2e733a32f7ea0a1df9cec6752321a5345c11a91b2ab478a031a426e934f16d5c1f15c8566c7b2c10af9f27892a29c2c789039f595470e929a4aa60ea - languageName: node - linkType: hard - "jsdom@npm:^20.0.0": version: 20.0.3 resolution: "jsdom@npm:20.0.3" @@ -22363,13 +21498,6 @@ __metadata: languageName: node linkType: hard -"json-buffer@npm:3.0.1": - version: 3.0.1 - resolution: "json-buffer@npm:3.0.1" - checksum: 10c0/0d1c91569d9588e7eef2b49b59851f297f3ab93c7b35c7c221e288099322be6b562767d11e4821da500f3219542b9afd2e54c5dc573107c1126ed1080f8e96d7 - languageName: node - linkType: hard - "json-parse-better-errors@npm:^1.0.0, json-parse-better-errors@npm:^1.0.1": version: 1.0.2 resolution: "json-parse-better-errors@npm:1.0.2" @@ -22412,13 +21540,6 @@ __metadata: languageName: node linkType: hard -"json-stable-stringify-without-jsonify@npm:^1.0.1": - version: 1.0.1 - resolution: "json-stable-stringify-without-jsonify@npm:1.0.1" - checksum: 10c0/cb168b61fd4de83e58d09aaa6425ef71001bae30d260e2c57e7d09a5fd82223e2f22a042dedaab8db23b7d9ae46854b08bb1f91675a8be11c5cffebef5fb66a5 - languageName: node - linkType: hard - "json-stringify-safe@npm:^5.0.1, json-stringify-safe@npm:~5.0.1": version: 5.0.1 resolution: "json-stringify-safe@npm:5.0.1" @@ -22426,17 +21547,6 @@ __metadata: languageName: node linkType: hard -"json5@npm:^1.0.2": - version: 1.0.2 - resolution: "json5@npm:1.0.2" - dependencies: - minimist: "npm:^1.2.0" - bin: - json5: lib/cli.js - checksum: 10c0/9ee316bf21f000b00752e6c2a3b79ecf5324515a5c60ee88983a1910a45426b643a4f3461657586e8aeca87aaf96f0a519b0516d2ae527a6c3e7eed80f68717f - languageName: node - linkType: hard - "json5@npm:^2.2.1, json5@npm:^2.2.3": version: 2.2.3 resolution: "json5@npm:2.2.3" @@ -22514,18 +21624,6 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.3.5": - version: 3.3.5 - resolution: "jsx-ast-utils@npm:3.3.5" - dependencies: - array-includes: "npm:^3.1.6" - array.prototype.flat: "npm:^1.3.1" - object.assign: "npm:^4.1.4" - object.values: "npm:^1.1.6" - checksum: 10c0/a32679e9cb55469cb6d8bbc863f7d631b2c98b7fc7bf172629261751a6e7bc8da6ae374ddb74d5fbd8b06cf0eb4572287b259813d92b36e384024ed35e4c13e1 - languageName: node - linkType: hard - "jszip@npm:^3.10.1": version: 3.10.1 resolution: "jszip@npm:3.10.1" @@ -22570,15 +21668,6 @@ __metadata: languageName: node linkType: hard -"keyv@npm:^4.5.4": - version: 4.5.4 - resolution: "keyv@npm:4.5.4" - dependencies: - json-buffer: "npm:3.0.1" - checksum: 10c0/aa52f3c5e18e16bb6324876bb8b59dd02acf782a4b789c7b2ae21107fab95fab3890ed448d4f8dba80ce05391eeac4bfabb4f02a20221342982f806fa2cf271e - languageName: node - linkType: hard - "kind-of@npm:^3.0.2, kind-of@npm:^3.0.3, kind-of@npm:^3.2.0": version: 3.2.2 resolution: "kind-of@npm:3.2.2" @@ -22634,22 +21723,6 @@ __metadata: languageName: node linkType: hard -"language-subtag-registry@npm:^0.3.20": - version: 0.3.23 - resolution: "language-subtag-registry@npm:0.3.23" - checksum: 10c0/e9b05190421d2cd36dd6c95c28673019c927947cb6d94f40ba7e77a838629ee9675c94accf897fbebb07923187deb843b8fbb8935762df6edafe6c28dcb0b86c - languageName: node - linkType: hard - -"language-tags@npm:^1.0.9": - version: 1.0.9 - resolution: "language-tags@npm:1.0.9" - dependencies: - language-subtag-registry: "npm:^0.3.20" - checksum: 10c0/9ab911213c4bd8bd583c850201c17794e52cb0660d1ab6e32558aadc8324abebf6844e46f92b80a5d600d0fbba7eface2c207bfaf270a1c7fd539e4c3a880bff - languageName: node - linkType: hard - "last-run@npm:^2.0.0": version: 2.0.0 resolution: "last-run@npm:2.0.0" @@ -22716,16 +21789,6 @@ __metadata: languageName: node linkType: hard -"levn@npm:^0.4.1": - version: 0.4.1 - resolution: "levn@npm:0.4.1" - dependencies: - prelude-ls: "npm:^1.2.1" - type-check: "npm:~0.4.0" - checksum: 10c0/effb03cad7c89dfa5bd4f6989364bfc79994c2042ec5966cb9b95990e2edee5cd8969ddf42616a0373ac49fac1403437deaf6e9050fbbaa3546093a59b9ac94e - languageName: node - linkType: hard - "lie@npm:~3.3.0": version: 3.3.0 resolution: "lie@npm:3.3.0" @@ -22996,15 +22059,6 @@ __metadata: languageName: node linkType: hard -"locate-path@npm:^6.0.0": - version: 6.0.0 - resolution: "locate-path@npm:6.0.0" - dependencies: - p-locate: "npm:^5.0.0" - checksum: 10c0/d3972ab70dfe58ce620e64265f90162d247e87159b6126b01314dd67be43d50e96a50b517bce2d9452a79409c7614054c277b5232377de50416564a77ac7aad3 - languageName: node - linkType: hard - "lockfile@npm:1.0.4": version: 1.0.4 resolution: "lockfile@npm:1.0.4" @@ -23168,13 +22222,6 @@ __metadata: languageName: node linkType: hard -"lodash.merge@npm:^4.6.2": - version: 4.6.2 - resolution: "lodash.merge@npm:4.6.2" - checksum: 10c0/402fa16a1edd7538de5b5903a90228aa48eb5533986ba7fa26606a49db2572bf414ff73a2c9f5d5fd36b31c46a5d5c7e1527749c07cbcf965ccff5fbdf32c506 - languageName: node - linkType: hard - "lodash.once@npm:^4.0.0": version: 4.1.1 resolution: "lodash.once@npm:4.1.1" @@ -24387,7 +23434,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -25362,16 +24409,6 @@ __metadata: languageName: node linkType: hard -"object-is@npm:^1.1.5": - version: 1.1.5 - resolution: "object-is@npm:1.1.5" - dependencies: - call-bind: "npm:^1.0.2" - define-properties: "npm:^1.1.3" - checksum: 10c0/8c263fb03fc28f1ffb54b44b9147235c5e233dc1ca23768e7d2569740b5d860154d7cc29a30220fe28ed6d8008e2422aefdebfe987c103e1c5d190cf02d9d886 - languageName: node - linkType: hard - "object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -25388,7 +24425,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": +"object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -25426,17 +24463,6 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.8": - version: 1.1.8 - resolution: "object.entries@npm:1.1.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/db9ea979d2956a3bc26c262da4a4d212d36f374652cc4c13efdd069c1a519c16571c137e2893d1c46e1cb0e15c88fd6419eaf410c945f329f09835487d7e65d3 - languageName: node - linkType: hard - "object.entries@npm:^1.1.9": version: 1.1.9 resolution: "object.entries@npm:1.1.9" @@ -25449,18 +24475,6 @@ __metadata: languageName: node linkType: hard -"object.fromentries@npm:^2.0.8": - version: 2.0.8 - resolution: "object.fromentries@npm:2.0.8" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/cd4327e6c3369cfa805deb4cbbe919bfb7d3aeebf0bcaba291bb568ea7169f8f8cdbcabe2f00b40db0c20cd20f08e11b5f3a5a36fb7dd3fe04850c50db3bf83b - languageName: node - linkType: hard - "object.getownpropertydescriptors@npm:^2.0.3": version: 2.1.0 resolution: "object.getownpropertydescriptors@npm:2.1.0" @@ -25471,17 +24485,6 @@ __metadata: languageName: node linkType: hard -"object.groupby@npm:^1.0.3": - version: 1.0.3 - resolution: "object.groupby@npm:1.0.3" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - checksum: 10c0/60d0455c85c736fbfeda0217d1a77525956f76f7b2495edeca9e9bbf8168a45783199e77b894d30638837c654d0cc410e0e02cbfcf445bc8de71c3da1ede6a9c - languageName: node - linkType: hard - "object.pick@npm:^1.3.0": version: 1.3.0 resolution: "object.pick@npm:1.3.0" @@ -25491,17 +24494,6 @@ __metadata: languageName: node linkType: hard -"object.values@npm:^1.1.6, object.values@npm:^1.2.0": - version: 1.2.0 - resolution: "object.values@npm:1.2.0" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/15809dc40fd6c5529501324fec5ff08570b7d70fb5ebbe8e2b3901afec35cf2b3dc484d1210c6c642cd3e7e0a5e18dd1d6850115337fef46bdae14ab0cb18ac3 - languageName: node - linkType: hard - "obug@npm:^2.1.1": version: 2.1.1 resolution: "obug@npm:2.1.1" @@ -25578,20 +24570,6 @@ __metadata: languageName: node linkType: hard -"optionator@npm:^0.9.3": - version: 0.9.4 - resolution: "optionator@npm:0.9.4" - dependencies: - deep-is: "npm:^0.1.3" - fast-levenshtein: "npm:^2.0.6" - levn: "npm:^0.4.1" - prelude-ls: "npm:^1.2.1" - type-check: "npm:^0.4.0" - word-wrap: "npm:^1.2.5" - checksum: 10c0/4afb687a059ee65b61df74dfe87d8d6815cd6883cb8b3d5883a910df72d0f5d029821f37025e4bccf4048873dbdb09acc6d303d27b8f76b1a80dd5a7d5334675 - languageName: node - linkType: hard - "ordered-binary@npm:^1.4.1": version: 1.4.1 resolution: "ordered-binary@npm:1.4.1" @@ -25713,6 +24691,79 @@ __metadata: languageName: node linkType: hard +"oxlint@npm:^1.63.0": + version: 1.63.0 + resolution: "oxlint@npm:1.63.0" + dependencies: + "@oxlint/binding-android-arm-eabi": "npm:1.63.0" + "@oxlint/binding-android-arm64": "npm:1.63.0" + "@oxlint/binding-darwin-arm64": "npm:1.63.0" + "@oxlint/binding-darwin-x64": "npm:1.63.0" + "@oxlint/binding-freebsd-x64": "npm:1.63.0" + "@oxlint/binding-linux-arm-gnueabihf": "npm:1.63.0" + "@oxlint/binding-linux-arm-musleabihf": "npm:1.63.0" + "@oxlint/binding-linux-arm64-gnu": "npm:1.63.0" + "@oxlint/binding-linux-arm64-musl": "npm:1.63.0" + "@oxlint/binding-linux-ppc64-gnu": "npm:1.63.0" + "@oxlint/binding-linux-riscv64-gnu": "npm:1.63.0" + "@oxlint/binding-linux-riscv64-musl": "npm:1.63.0" + "@oxlint/binding-linux-s390x-gnu": "npm:1.63.0" + "@oxlint/binding-linux-x64-gnu": "npm:1.63.0" + "@oxlint/binding-linux-x64-musl": "npm:1.63.0" + "@oxlint/binding-openharmony-arm64": "npm:1.63.0" + "@oxlint/binding-win32-arm64-msvc": "npm:1.63.0" + "@oxlint/binding-win32-ia32-msvc": "npm:1.63.0" + "@oxlint/binding-win32-x64-msvc": "npm:1.63.0" + peerDependencies: + oxlint-tsgolint: ">=0.22.1" + dependenciesMeta: + "@oxlint/binding-android-arm-eabi": + optional: true + "@oxlint/binding-android-arm64": + optional: true + "@oxlint/binding-darwin-arm64": + optional: true + "@oxlint/binding-darwin-x64": + optional: true + "@oxlint/binding-freebsd-x64": + optional: true + "@oxlint/binding-linux-arm-gnueabihf": + optional: true + "@oxlint/binding-linux-arm-musleabihf": + optional: true + "@oxlint/binding-linux-arm64-gnu": + optional: true + "@oxlint/binding-linux-arm64-musl": + optional: true + "@oxlint/binding-linux-ppc64-gnu": + optional: true + "@oxlint/binding-linux-riscv64-gnu": + optional: true + "@oxlint/binding-linux-riscv64-musl": + optional: true + "@oxlint/binding-linux-s390x-gnu": + optional: true + "@oxlint/binding-linux-x64-gnu": + optional: true + "@oxlint/binding-linux-x64-musl": + optional: true + "@oxlint/binding-openharmony-arm64": + optional: true + "@oxlint/binding-win32-arm64-msvc": + optional: true + "@oxlint/binding-win32-ia32-msvc": + optional: true + "@oxlint/binding-win32-x64-msvc": + optional: true + peerDependenciesMeta: + oxlint-tsgolint: + optional: true + bin: + oxlint: bin/oxlint + checksum: 10c0/ca3e0c36eb02be68494b900cf34242a4d5917a2f63e0bf7833aa017223f9768fa053228483dcb0b86eb077641e60b7c2e5960a3f5d0fa03145b4ee29748b44c6 + languageName: node + linkType: hard + "p-finally@npm:^1.0.0": version: 1.0.0 resolution: "p-finally@npm:1.0.0" @@ -25738,7 +24789,7 @@ __metadata: languageName: node linkType: hard -"p-limit@npm:^3.0.2, p-limit@npm:^3.1.0": +"p-limit@npm:^3.1.0": version: 3.1.0 resolution: "p-limit@npm:3.1.0" dependencies: @@ -25774,15 +24825,6 @@ __metadata: languageName: node linkType: hard -"p-locate@npm:^5.0.0": - version: 5.0.0 - resolution: "p-locate@npm:5.0.0" - dependencies: - p-limit: "npm:^3.0.2" - checksum: 10c0/2290d627ab7903b8b70d11d384fee714b797f6040d9278932754a6860845c4d3190603a0772a663c8cb5a7b21d1b16acb3a6487ebcafa9773094edc3dfe6009a - languageName: node - linkType: hard - "p-map-series@npm:^1.0.0": version: 1.0.0 resolution: "p-map-series@npm:1.0.0" @@ -26141,16 +25183,6 @@ __metadata: languageName: node linkType: hard -"parse-imports@npm:^2.1.1": - version: 2.2.1 - resolution: "parse-imports@npm:2.2.1" - dependencies: - es-module-lexer: "npm:^1.5.3" - slashes: "npm:^3.0.12" - checksum: 10c0/bc541ce4ef2ff77d53247de39a956e0ee7a1a4b9b175c3e0f898222fe7994595f011491154db4ed408cbaf5049ede9d0b6624125565be208e973a54420cbe069 - languageName: node - linkType: hard - "parse-json@npm:^2.2.0": version: 2.2.0 resolution: "parse-json@npm:2.2.0" @@ -26759,13 +25791,6 @@ __metadata: languageName: node linkType: hard -"prelude-ls@npm:^1.2.1": - version: 1.2.1 - resolution: "prelude-ls@npm:1.2.1" - checksum: 10c0/b00d617431e7886c520a6f498a2e14c75ec58f6d93ba48c3b639cf241b54232d90daa05d83a9e9b9fef6baa63cb7e1e4602c2372fea5bc169668401eb127d0cd - languageName: node - linkType: hard - "prepend-http@npm:^1.0.1": version: 1.0.4 resolution: "prepend-http@npm:1.0.4" @@ -27333,7 +26358,6 @@ __metadata: "@actions/github": "npm:^1.1.0" "@babel/cli": "npm:^7.24.1" "@babel/core": "npm:^7.24.3" - "@babel/eslint-parser": "npm:^7.27.1" "@babel/node": "npm:^7.23.9" "@babel/plugin-proposal-decorators": "npm:^7.24.1" "@babel/plugin-transform-runtime": "npm:^7.24.3" @@ -27341,9 +26365,6 @@ __metadata: "@babel/preset-react": "npm:^7.24.1" "@babel/preset-typescript": "npm:^7.24.1" "@babel/register": "npm:^7.23.7" - "@eslint/compat": "npm:^1.2.0" - "@eslint/eslintrc": "npm:^3.1.0" - "@eslint/js": "npm:^9.12.0" "@faker-js/faker": "npm:^8.4.1" "@jdb8/eslint-plugin-monorepo": "npm:^1.0.1" "@octokit/rest": "npm:*" @@ -27402,14 +26423,7 @@ __metadata: cross-spawn: "npm:^7.0.5" delta-e: "npm:^0.0.8" diff: "npm:^5.1.0" - eslint: "npm:^9.12.0" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-jest: "npm:^28.8.3" - eslint-plugin-jsdoc: "npm:^50.4.1" - eslint-plugin-jsx-a11y: "npm:^6.10.0" - eslint-plugin-react: "npm:^7.37.1" eslint-plugin-react-hooks: "npm:^7.0.0" - eslint-plugin-rulesdir: "npm:^0.2.2" exceljs: "npm:^4.4.0" fast-check: "npm:^2.19.0" fast-glob: "npm:^3.1.0" @@ -27430,6 +26444,7 @@ __metadata: motion: "npm:^12.23.6" npm-cli-login: "npm:^1.0.0" oxfmt: "npm:^0.48.0" + oxlint: "npm:^1.63.0" parcel: "npm:^2.16.3" parcel-optimizer-strict-mode: "workspace:^" patch-package: "npm:^6.2.0" @@ -27456,7 +26471,6 @@ __metadata: tailwindcss-animate: "npm:^1.0.7" tempy: "npm:^0.5.0" typescript: "npm:^5.8.2" - typescript-eslint: "npm:^8.38.0" unplugin-parcel-macros: "npm:^0.1.1" verdaccio: "npm:^6.0.0" vite: "npm:^7.3.2" @@ -27780,21 +26794,6 @@ __metadata: languageName: node linkType: hard -"reflect.getprototypeof@npm:^1.0.4": - version: 1.0.6 - resolution: "reflect.getprototypeof@npm:1.0.6" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.1" - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.4" - globalthis: "npm:^1.0.3" - which-builtin-type: "npm:^1.1.3" - checksum: 10c0/baf4ef8ee6ff341600f4720b251cf5a6cb552d6a6ab0fdc036988c451bf16f920e5feb0d46bd4f530a5cce568f1f7aca2d77447ca798920749cfc52783c39b55 - languageName: node - linkType: hard - "reflect.getprototypeof@npm:^1.0.6, reflect.getprototypeof@npm:^1.0.9": version: 1.0.10 resolution: "reflect.getprototypeof@npm:1.0.10" @@ -27867,7 +26866,7 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.5.0, regexp.prototype.flags@npm:^1.5.2": +"regexp.prototype.flags@npm:^1.5.2": version: 1.5.3 resolution: "regexp.prototype.flags@npm:1.5.3" dependencies: @@ -28244,7 +27243,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.4": +"resolve@npm:^1.1.7, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0": version: 1.22.11 resolution: "resolve@npm:1.22.11" dependencies: @@ -28271,7 +27270,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^2.0.0-next.5, resolve@npm:^2.0.0-next.6": +"resolve@npm:^2.0.0-next.6": version: 2.0.0-next.6 resolution: "resolve@npm:2.0.0-next.6" dependencies: @@ -28287,7 +27286,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin, resolve@patch:resolve@npm%3A^1.22.4#optional!builtin": +"resolve@patch:resolve@npm%3A^1.1.7#optional!builtin, resolve@patch:resolve@npm%3A^1.10.0#optional!builtin, resolve@patch:resolve@npm%3A^1.14.2#optional!builtin, resolve@patch:resolve@npm%3A^1.19.0#optional!builtin, resolve@patch:resolve@npm%3A^1.20.0#optional!builtin": version: 1.22.11 resolution: "resolve@patch:resolve@npm%3A1.22.11#optional!builtin::version=1.22.11&hash=c3c19d" dependencies: @@ -28314,7 +27313,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@npm%3A^2.0.0-next.5#optional!builtin, resolve@patch:resolve@npm%3A^2.0.0-next.6#optional!builtin": +"resolve@patch:resolve@npm%3A^2.0.0-next.6#optional!builtin": version: 2.0.0-next.6 resolution: "resolve@patch:resolve@npm%3A2.0.0-next.6#optional!builtin::version=2.0.0-next.6&hash=c3c19d" dependencies: @@ -28791,7 +27790,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3, semver@npm:^7.7.1": +"semver@npm:^7.3.5, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.3, semver@npm:^7.7.1": version: 7.7.2 resolution: "semver@npm:7.7.2" bin: @@ -28903,7 +27902,7 @@ __metadata: languageName: node linkType: hard -"set-function-name@npm:^2.0.1, set-function-name@npm:^2.0.2": +"set-function-name@npm:^2.0.2": version: 2.0.2 resolution: "set-function-name@npm:2.0.2" dependencies: @@ -29207,13 +28206,6 @@ __metadata: languageName: node linkType: hard -"slashes@npm:^3.0.12": - version: 3.0.12 - resolution: "slashes@npm:3.0.12" - checksum: 10c0/71ca2a1fcd1ab6814b0fdb8cf9c33a3d54321deec2aa8d173510f0086880201446021a9b9e6a18561f7c472b69a2145977c6a8fb9c53a8ff7be31778f203d175 - languageName: node - linkType: hard - "slide@npm:^1.1.3, slide@npm:^1.1.6": version: 1.1.6 resolution: "slide@npm:1.1.6" @@ -29500,16 +28492,6 @@ __metadata: languageName: node linkType: hard -"spdx-expression-parse@npm:^4.0.0": - version: 4.0.0 - resolution: "spdx-expression-parse@npm:4.0.0" - dependencies: - spdx-exceptions: "npm:^2.1.0" - spdx-license-ids: "npm:^3.0.0" - checksum: 10c0/965c487e77f4fb173f1c471f3eef4eb44b9f0321adc7f93d95e7620da31faa67d29356eb02523cd7df8a7fc1ec8238773cdbf9e45bd050329d2b26492771b736 - languageName: node - linkType: hard - "spdx-license-ids@npm:^3.0.0": version: 3.0.5 resolution: "spdx-license-ids@npm:3.0.5" @@ -29678,15 +28660,6 @@ __metadata: languageName: node linkType: hard -"stop-iteration-iterator@npm:^1.0.0": - version: 1.0.0 - resolution: "stop-iteration-iterator@npm:1.0.0" - dependencies: - internal-slot: "npm:^1.0.4" - checksum: 10c0/c4158d6188aac510d9e92925b58709207bd94699e9c31186a040c80932a687f84a51356b5895e6dc72710aad83addb9411c22171832c9ae0e6e11b7d61b0dfb9 - languageName: node - linkType: hard - "stop-iteration-iterator@npm:^1.1.0": version: 1.1.0 resolution: "stop-iteration-iterator@npm:1.1.0" @@ -29894,46 +28867,6 @@ __metadata: languageName: node linkType: hard -"string.prototype.includes@npm:^2.0.0": - version: 2.0.0 - resolution: "string.prototype.includes@npm:2.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10c0/32dff118c9e9dcc87e240b05462fa8ee7248d9e335c0015c1442fe18152261508a2146d9bb87ddae56abab69148a83c61dfaea33f53853812a6a2db737689ed2 - languageName: node - linkType: hard - -"string.prototype.matchall@npm:^4.0.11": - version: 4.0.11 - resolution: "string.prototype.matchall@npm:4.0.11" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - es-abstract: "npm:^1.23.2" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.0.0" - get-intrinsic: "npm:^1.2.4" - gopd: "npm:^1.0.1" - has-symbols: "npm:^1.0.3" - internal-slot: "npm:^1.0.7" - regexp.prototype.flags: "npm:^1.5.2" - set-function-name: "npm:^2.0.2" - side-channel: "npm:^1.0.6" - checksum: 10c0/915a2562ac9ab5e01b7be6fd8baa0b2b233a0a9aa975fcb2ec13cc26f08fb9a3e85d5abdaa533c99c6fc4c5b65b914eba3d80c4aff9792a4c9fed403f28f7d9d - languageName: node - linkType: hard - -"string.prototype.repeat@npm:^1.0.0": - version: 1.0.0 - resolution: "string.prototype.repeat@npm:1.0.0" - dependencies: - define-properties: "npm:^1.1.3" - es-abstract: "npm:^1.17.5" - checksum: 10c0/94c7978566cffa1327d470fd924366438af9b04b497c43a9805e476e2e908aa37a1fd34cc0911156c17556dab62159d12c7b92b3cc304c3e1281fe4c8e668f40 - languageName: node - linkType: hard - "string.prototype.trim@npm:^1.2.10": version: 1.2.10 resolution: "string.prototype.trim@npm:1.2.10" @@ -30296,16 +29229,6 @@ __metadata: languageName: node linkType: hard -"synckit@npm:^0.9.1": - version: 0.9.2 - resolution: "synckit@npm:0.9.2" - dependencies: - "@pkgr/core": "npm:^0.1.0" - tslib: "npm:^2.6.2" - checksum: 10c0/e0c262817444e5b872708adb6f5ad37951ba33f6b2d1d4477d45db1f57573a784618ceed5e6614e0225db330632b1f6b95bb74d21e4d013e45ad4bde03d0cb59 - languageName: node - linkType: hard - "tailwind-merge@npm:2.5.4": version: 2.5.4 resolution: "tailwind-merge@npm:2.5.4" @@ -30538,13 +29461,6 @@ __metadata: languageName: node linkType: hard -"text-table@npm:^0.2.0": - version: 0.2.0 - resolution: "text-table@npm:0.2.0" - checksum: 10c0/02805740c12851ea5982686810702e2f14369a5f4c5c40a836821e3eefc65ffeec3131ba324692a37608294b0fd8c1e55a2dd571ffed4909822787668ddbee5c - languageName: node - linkType: hard - "thenify-all@npm:^1.0.0": version: 1.6.0 resolution: "thenify-all@npm:1.6.0" @@ -30910,24 +29826,6 @@ __metadata: languageName: node linkType: hard -"ts-api-utils@npm:^1.3.0": - version: 1.3.0 - resolution: "ts-api-utils@npm:1.3.0" - peerDependencies: - typescript: ">=4.2.0" - checksum: 10c0/f54a0ba9ed56ce66baea90a3fa087a484002e807f28a8ccb2d070c75e76bde64bd0f6dce98b3802834156306050871b67eec325cb4e918015a360a3f0868c77c - languageName: node - linkType: hard - -"ts-api-utils@npm:^2.1.0": - version: 2.1.0 - resolution: "ts-api-utils@npm:2.1.0" - peerDependencies: - typescript: ">=4.8.4" - checksum: 10c0/9806a38adea2db0f6aa217ccc6bc9c391ddba338a9fe3080676d0d50ed806d305bb90e8cef0276e793d28c8a929f400abb184ddd7ff83a416959c0f4d2ce754f - languageName: node - linkType: hard - "ts-dedent@npm:^2.0.0": version: 2.2.0 resolution: "ts-dedent@npm:2.2.0" @@ -30983,18 +29881,6 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths@npm:^3.15.0": - version: 3.15.0 - resolution: "tsconfig-paths@npm:3.15.0" - dependencies: - "@types/json5": "npm:^0.0.29" - json5: "npm:^1.0.2" - minimist: "npm:^1.2.6" - strip-bom: "npm:^3.0.0" - checksum: 10c0/5b4f301a2b7a3766a986baf8fc0e177eb80bdba6e396792ff92dc23b5bca8bb279fc96517dcaaef63a3b49bebc6c4c833653ec58155780bc906bdbcf7dda0ef5 - languageName: node - linkType: hard - "tslib@npm:2.4.0": version: 2.4.0 resolution: "tslib@npm:2.4.0" @@ -31009,7 +29895,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.6.2, tslib@npm:^2.8.0": +"tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.4.0, tslib@npm:^2.8.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10c0/9c4759110a19c53f992d9aae23aac5ced636e99887b51b9e61def52611732872ff7668757d4e4c61f19691e36f4da981cd9485e869b4a7408d689f6bf1f14e62 @@ -31046,15 +29932,6 @@ __metadata: languageName: node linkType: hard -"type-check@npm:^0.4.0, type-check@npm:~0.4.0": - version: 0.4.0 - resolution: "type-check@npm:0.4.0" - dependencies: - prelude-ls: "npm:^1.2.1" - checksum: 10c0/7b3fd0ed43891e2080bf0c5c504b418fbb3e5c7b9708d3d015037ba2e6323a28152ec163bcb65212741fa5d2022e3075ac3c76440dbd344c9035f818e8ecee58 - languageName: node - linkType: hard - "type-detect@npm:4.0.8": version: 4.0.8 resolution: "type-detect@npm:4.0.8" @@ -31246,21 +30123,6 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.38.0": - version: 8.38.0 - resolution: "typescript-eslint@npm:8.38.0" - dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.38.0" - "@typescript-eslint/parser": "npm:8.38.0" - "@typescript-eslint/typescript-estree": "npm:8.38.0" - "@typescript-eslint/utils": "npm:8.38.0" - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" - checksum: 10c0/486b9862ee08f7827d808a2264ce03b58087b11c4c646c0da3533c192a67ae3fcb4e68d7a1e69d0f35a1edc274371a903a50ecfe74012d5eaa896cb9d5a81e0b - languageName: node - linkType: hard - "typescript@npm:^5.5.0, typescript@npm:^5.8.2": version: 5.8.2 resolution: "typescript@npm:5.8.2" @@ -32763,26 +31625,6 @@ __metadata: languageName: node linkType: hard -"which-builtin-type@npm:^1.1.3": - version: 1.1.4 - resolution: "which-builtin-type@npm:1.1.4" - dependencies: - function.prototype.name: "npm:^1.1.6" - has-tostringtag: "npm:^1.0.2" - is-async-function: "npm:^2.0.0" - is-date-object: "npm:^1.0.5" - is-finalizationregistry: "npm:^1.0.2" - is-generator-function: "npm:^1.0.10" - is-regex: "npm:^1.1.4" - is-weakref: "npm:^1.0.2" - isarray: "npm:^2.0.5" - which-boxed-primitive: "npm:^1.0.2" - which-collection: "npm:^1.0.2" - which-typed-array: "npm:^1.1.15" - checksum: 10c0/a4a76d20d869a81b1dbb4adea31edc7e6c1a4466d3ab7c2cd757c9219d48d3723b04076c85583257b0f0f8e3ebe5af337248b8ceed57b9051cb97bce5bd881d1 - languageName: node - linkType: hard - "which-builtin-type@npm:^1.2.1": version: 1.2.1 resolution: "which-builtin-type@npm:1.2.1" @@ -32804,7 +31646,7 @@ __metadata: languageName: node linkType: hard -"which-collection@npm:^1.0.1, which-collection@npm:^1.0.2": +"which-collection@npm:^1.0.2": version: 1.0.2 resolution: "which-collection@npm:1.0.2" dependencies: @@ -32823,7 +31665,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15, which-typed-array@npm:^1.1.9": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.15": version: 1.1.15 resolution: "which-typed-array@npm:1.1.15" dependencies: @@ -32932,13 +31774,6 @@ __metadata: languageName: node linkType: hard -"word-wrap@npm:^1.2.5": - version: 1.2.5 - resolution: "word-wrap@npm:1.2.5" - checksum: 10c0/e0e4a1ca27599c92a6ca4c32260e8a92e8a44f4ef6ef93f803f8ed823f486e0889fc0b93be4db59c8d51b3064951d25e43d434e95dc8c960cc3a63d65d00ba20 - languageName: node - linkType: hard - "wordwrap@npm:^1.0.0": version: 1.0.0 resolution: "wordwrap@npm:1.0.0" From c53ae4fe8f672c4af11b9a6cd954f0912d8de648 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Mon, 11 May 2026 13:06:28 -0700 Subject: [PATCH 2/7] Format jsdoc --- .oxfmtrc.json | 9 +- .../custom-addons/provider/preset.ts | 1 + .storybook-s2/preview.tsx | 2 +- CONTRIBUTING.md | 2 +- .../src/spectrum-preset.js | 10 +- .../react-spectrum/docs/labeledvalue/types.ts | 5 +- .../src/accordion/Accordion.tsx | 6 +- .../src/actionbar/ActionBar.tsx | 20 +- .../src/actionbar/ActionBarContainer.tsx | 5 +- .../src/actiongroup/ActionGroup.tsx | 19 +- .../src/autocomplete/SearchAutocomplete.tsx | 20 +- .../@adobe/react-spectrum/src/badge/Badge.tsx | 3 +- .../src/breadcrumbs/Breadcrumbs.tsx | 1 + .../src/button/ActionButton.tsx | 10 +- .../react-spectrum/src/button/Button.tsx | 1 + .../src/button/ToggleButton.tsx | 5 +- .../src/buttongroup/ButtonGroup.tsx | 2 + .../react-spectrum/src/calendar/Calendar.tsx | 8 +- .../src/calendar/RangeCalendar.tsx | 11 +- .../react-spectrum/src/card/BaseLayout.tsx | 1 + .../react-spectrum/src/card/GalleryLayout.tsx | 17 +- .../react-spectrum/src/card/GridLayout.tsx | 9 +- .../src/card/WaterfallLayout.tsx | 4 + .../react-spectrum/src/checkbox/Checkbox.tsx | 6 +- .../src/checkbox/CheckboxGroup.tsx | 1 + .../react-spectrum/src/color/ColorArea.tsx | 3 +- .../react-spectrum/src/color/ColorPicker.tsx | 6 +- .../react-spectrum/src/color/ColorSlider.tsx | 5 +- .../react-spectrum/src/color/ColorSwatch.tsx | 6 +- .../src/color/ColorSwatchPicker.tsx | 9 +- .../react-spectrum/src/combobox/ComboBox.tsx | 28 +- .../src/contextualhelp/ContextualHelp.tsx | 5 +- .../src/datepicker/DateField.tsx | 2 + .../src/datepicker/DatePicker.tsx | 13 +- .../src/datepicker/TimeField.tsx | 1 + .../react-spectrum/src/dialog/AlertDialog.tsx | 5 +- .../react-spectrum/src/dialog/Dialog.tsx | 5 +- .../src/dialog/DialogContainer.tsx | 6 +- .../src/dialog/DialogTrigger.tsx | 25 +- .../react-spectrum/src/divider/Divider.tsx | 3 + .../react-spectrum/src/dnd/useDragAndDrop.ts | 14 +- .../@adobe/react-spectrum/src/form/Form.tsx | 5 +- .../@adobe/react-spectrum/src/icon/Icon.tsx | 4 +- .../react-spectrum/src/icon/Illustration.tsx | 1 + .../@adobe/react-spectrum/src/image/Image.tsx | 7 +- .../src/inlinealert/InlineAlert.tsx | 5 +- .../react-spectrum/src/label/HelpText.tsx | 3 +- .../src/labeledvalue/LabeledValue.tsx | 3 +- .../@adobe/react-spectrum/src/layout/Grid.tsx | 3 + .../@adobe/react-spectrum/src/link/Link.tsx | 1 + .../react-spectrum/src/list/ListView.tsx | 17 +- .../react-spectrum/src/menu/ActionMenu.tsx | 5 +- .../react-spectrum/src/menu/MenuTrigger.tsx | 4 + .../@adobe/react-spectrum/src/meter/Meter.tsx | 1 + .../src/numberfield/NumberField.tsx | 4 +- .../react-spectrum/src/overlays/Popover.tsx | 31 +- .../react-spectrum/src/picker/Picker.tsx | 14 +- .../src/progress/ProgressBar.tsx | 4 +- .../src/progress/ProgressBarBase.tsx | 11 +- .../src/progress/ProgressCircle.tsx | 11 +- .../react-spectrum/src/provider/Provider.tsx | 4 +- .../react-spectrum/src/provider/types.ts | 12 +- .../react-spectrum/src/slider/RangeSlider.tsx | 9 +- .../react-spectrum/src/slider/Slider.tsx | 17 +- .../react-spectrum/src/slider/SliderBase.tsx | 11 +- .../react-spectrum/src/steplist/StepList.tsx | 3 + .../react-spectrum/src/table/TableView.tsx | 36 +- .../@adobe/react-spectrum/src/table/types.ts | 7 +- .../@adobe/react-spectrum/src/tabs/Tabs.tsx | 28 +- .../react-spectrum/src/tag/TagGroup.tsx | 12 +- .../react-spectrum/src/text/Heading.tsx | 2 + .../react-spectrum/src/text/Keyboard.tsx | 1 + .../@adobe/react-spectrum/src/text/Text.tsx | 1 + .../react-spectrum/src/tooltip/Tooltip.tsx | 1 + .../src/tooltip/TooltipTrigger.tsx | 2 + .../react-spectrum/src/tree/TreeView.tsx | 4 +- .../@adobe/react-spectrum/src/view/View.tsx | 5 +- .../@adobe/react-spectrum/src/well/Well.tsx | 5 +- .../stories/actiongroup/Toolbar.stories.tsx | 1 + .../react-spectrum/test/tabs/Tabs.test.js | 2 +- .../date/src/CalendarDate.ts | 50 ++- .../date/src/DateFormatter.ts | 5 +- .../date/src/calendars/GregorianCalendar.ts | 5 +- .../date/src/calendars/IslamicCalendar.ts | 33 +- .../date/src/calendars/JapaneseCalendar.ts | 7 +- .../@internationalized/date/src/conversion.ts | 13 +- .../@internationalized/date/src/queries.ts | 10 +- .../@internationalized/date/src/string.ts | 9 +- packages/@internationalized/date/src/types.ts | 10 +- .../number/src/NumberFormatter.ts | 10 +- .../string-compiler/src/stringCompiler.d.ts | 1 + .../i18n/src/useMessageFormatter.ts | 3 +- .../test-utils/src/checkboxgroup.ts | 6 +- .../@react-aria/test-utils/src/combobox.ts | 12 +- packages/@react-aria/test-utils/src/dialog.ts | 3 +- packages/@react-aria/test-utils/src/events.ts | 7 +- .../@react-aria/test-utils/src/gridlist.ts | 11 +- .../@react-aria/test-utils/src/listbox.ts | 30 +- packages/@react-aria/test-utils/src/menu.ts | 23 +- .../@react-aria/test-utils/src/radiogroup.ts | 3 +- packages/@react-aria/test-utils/src/select.ts | 15 +- packages/@react-aria/test-utils/src/table.ts | 24 +- packages/@react-aria/test-utils/src/tabs.ts | 3 +- packages/@react-aria/test-utils/src/tree.ts | 14 +- packages/@react-aria/test-utils/src/types.ts | 49 ++- packages/@react-aria/test-utils/src/user.ts | 8 +- packages/@react-spectrum/s2/src/Accordion.tsx | 28 +- packages/@react-spectrum/s2/src/ActionBar.tsx | 8 +- .../@react-spectrum/s2/src/ActionButton.tsx | 15 +- .../s2/src/ActionButtonGroup.tsx | 17 +- .../@react-spectrum/s2/src/AlertDialog.tsx | 4 +- packages/@react-spectrum/s2/src/Avatar.tsx | 1 + .../@react-spectrum/s2/src/AvatarGroup.tsx | 1 + packages/@react-spectrum/s2/src/Badge.tsx | 8 +- packages/@react-spectrum/s2/src/Button.tsx | 3 +- packages/@react-spectrum/s2/src/Calendar.tsx | 8 +- packages/@react-spectrum/s2/src/Card.tsx | 3 + packages/@react-spectrum/s2/src/CardView.tsx | 5 + packages/@react-spectrum/s2/src/CoachMark.tsx | 6 +- packages/@react-spectrum/s2/src/ColorArea.tsx | 3 +- .../@react-spectrum/s2/src/ColorSwatch.tsx | 2 + .../s2/src/ColorSwatchPicker.tsx | 3 + packages/@react-spectrum/s2/src/ComboBox.tsx | 13 +- .../@react-spectrum/s2/src/ContextualHelp.tsx | 7 +- .../@react-spectrum/s2/src/CustomDialog.tsx | 1 + .../@react-spectrum/s2/src/DatePicker.tsx | 7 +- .../s2/src/DateRangePicker.tsx | 4 +- packages/@react-spectrum/s2/src/Dialog.tsx | 5 +- .../@react-spectrum/s2/src/DialogTrigger.tsx | 6 +- .../@react-spectrum/s2/src/Disclosure.tsx | 14 +- packages/@react-spectrum/s2/src/Divider.tsx | 2 + packages/@react-spectrum/s2/src/DropZone.tsx | 1 + packages/@react-spectrum/s2/src/Form.tsx | 4 +- .../s2/src/FullscreenDialog.tsx | 6 +- packages/@react-spectrum/s2/src/Image.tsx | 11 +- .../s2/src/ImageCoordinator.tsx | 4 +- .../@react-spectrum/s2/src/InlineAlert.tsx | 6 +- .../@react-spectrum/s2/src/LabeledValue.tsx | 1 + packages/@react-spectrum/s2/src/Link.tsx | 1 + packages/@react-spectrum/s2/src/ListView.tsx | 5 +- packages/@react-spectrum/s2/src/Menu.tsx | 4 +- packages/@react-spectrum/s2/src/Meter.tsx | 5 +- .../@react-spectrum/s2/src/NumberField.tsx | 4 +- packages/@react-spectrum/s2/src/Picker.tsx | 11 +- packages/@react-spectrum/s2/src/Popover.tsx | 1 + .../@react-spectrum/s2/src/ProgressBar.tsx | 5 +- .../@react-spectrum/s2/src/ProgressCircle.tsx | 4 +- packages/@react-spectrum/s2/src/Provider.tsx | 9 +- .../@react-spectrum/s2/src/RangeCalendar.tsx | 4 +- .../@react-spectrum/s2/src/RangeSlider.tsx | 9 +- .../@react-spectrum/s2/src/SelectBoxGroup.tsx | 2 + .../s2/src/SkeletonCollection.tsx | 3 +- packages/@react-spectrum/s2/src/Slider.tsx | 3 +- packages/@react-spectrum/s2/src/TableView.tsx | 6 +- packages/@react-spectrum/s2/src/Tabs.tsx | 5 +- .../@react-spectrum/s2/src/TabsPicker.tsx | 9 +- packages/@react-spectrum/s2/src/TagGroup.tsx | 12 +- packages/@react-spectrum/s2/src/Toast.tsx | 3 +- .../@react-spectrum/s2/src/ToggleButton.tsx | 5 +- .../s2/src/ToggleButtonGroup.tsx | 5 +- packages/@react-spectrum/s2/src/TreeView.tsx | 5 +- packages/@react-spectrum/s2/src/pressScale.ts | 26 +- .../@react-spectrum/s2/src/style-utils.ts | 60 +-- packages/@react-spectrum/s2/style/index.ts | 66 +-- packages/@react-spectrum/s2/style/runtime.ts | 16 +- .../s2/style/spectrum-theme.ts | 102 ++--- .../@react-spectrum/s2/style/style-macro.ts | 16 +- packages/@react-spectrum/s2/style/tokens.ts | 4 +- .../s2/test/utils/dragAndDrop.ts | 15 +- .../test-utils/src/testSetup.ts | 8 +- .../@react-types/shared/src/collections.d.ts | 6 +- packages/@react-types/shared/src/dnd.d.ts | 31 +- packages/@react-types/shared/src/dom.d.ts | 119 ++++-- packages/@react-types/shared/src/events.d.ts | 4 +- packages/@react-types/shared/src/inputs.d.ts | 4 +- .../@react-types/shared/src/labelable.d.ts | 3 + packages/@react-types/shared/src/style.d.ts | 387 ++++++++++++++---- packages/@react-types/table/src/index.d.ts | 2 + .../build-tools/generateIcons.js | 1 + packages/dev/codemods/src/index.ts | 8 +- .../src/s1-to-s2/src/codemods/codemod.ts | 5 +- .../codemods/components/Avatar/transform.ts | 1 + .../components/DialogContainer/transform.ts | 7 +- .../components/DialogTrigger/transform.ts | 4 +- .../src/codemods/components/Link/transform.ts | 1 + .../components/TableView/transform.ts | 3 + .../src/codemods/shared/transforms.ts | 8 +- .../src/use-monopackages/src/codemod.ts | 8 +- .../rules/no-getByRole-toThrow.js | 8 +- .../rules/sort-imports.js | 5 +- .../MDXFragments.js | 118 +++--- .../MDXTransformer.js | 4 +- .../s2-docs/scripts/generateAgentSkills.mjs | 36 +- .../s2-docs/scripts/generateMarkdownDocs.mjs | 69 ++-- .../dev/s2-docs/scripts/testAccessibility.mjs | 25 +- .../s2-docs/scripts/validateS2DocsBuild.mjs | 3 +- packages/dev/s2-docs/src/LabeledValueTypes.ts | 20 +- packages/dev/s2-docs/src/Tabs.tsx | 3 +- packages/dev/s2-docs/src/color.macro.ts | 1 + .../gen-preview-modern.mjs | 29 +- .../react-aria-components/src/Breadcrumbs.tsx | 15 +- packages/react-aria-components/src/Button.tsx | 10 +- .../react-aria-components/src/Calendar.tsx | 85 ++-- .../react-aria-components/src/Checkbox.tsx | 37 +- .../react-aria-components/src/Collection.tsx | 19 +- .../react-aria-components/src/ColorArea.tsx | 8 +- .../react-aria-components/src/ColorField.tsx | 9 +- .../react-aria-components/src/ColorPicker.tsx | 5 +- .../react-aria-components/src/ColorSlider.tsx | 6 +- .../react-aria-components/src/ColorSwatch.tsx | 4 +- .../src/ColorSwatchPicker.tsx | 9 +- .../react-aria-components/src/ColorThumb.tsx | 12 +- .../react-aria-components/src/ColorWheel.tsx | 9 +- .../react-aria-components/src/ComboBox.tsx | 27 +- .../react-aria-components/src/DateField.tsx | 33 +- .../react-aria-components/src/DatePicker.tsx | 18 +- packages/react-aria-components/src/Dialog.tsx | 4 +- .../react-aria-components/src/Disclosure.tsx | 26 +- .../react-aria-components/src/DragAndDrop.tsx | 8 +- .../react-aria-components/src/DropZone.tsx | 9 +- .../react-aria-components/src/FieldError.tsx | 5 +- .../react-aria-components/src/FileTrigger.tsx | 3 +- packages/react-aria-components/src/Form.tsx | 5 +- .../react-aria-components/src/GridList.tsx | 45 +- packages/react-aria-components/src/Group.tsx | 10 +- .../react-aria-components/src/Heading.tsx | 5 +- .../src/HiddenDateInput.tsx | 3 +- packages/react-aria-components/src/Input.tsx | 9 +- packages/react-aria-components/src/Link.tsx | 10 +- .../react-aria-components/src/ListBox.tsx | 41 +- packages/react-aria-components/src/Menu.tsx | 22 +- packages/react-aria-components/src/Meter.tsx | 5 +- packages/react-aria-components/src/Modal.tsx | 16 +- .../react-aria-components/src/NumberField.tsx | 11 +- .../src/OverlayArrow.tsx | 5 +- .../react-aria-components/src/Popover.tsx | 15 +- .../react-aria-components/src/ProgressBar.tsx | 6 +- .../react-aria-components/src/RadioGroup.tsx | 39 +- .../react-aria-components/src/SearchField.tsx | 9 +- packages/react-aria-components/src/Select.tsx | 17 +- .../src/SelectionIndicator.tsx | 9 +- .../react-aria-components/src/Separator.tsx | 7 +- .../src/SharedElementTransition.tsx | 2 + packages/react-aria-components/src/Slider.tsx | 30 +- packages/react-aria-components/src/Switch.tsx | 27 +- packages/react-aria-components/src/Table.tsx | 131 ++++-- packages/react-aria-components/src/Tabs.tsx | 43 +- .../react-aria-components/src/TagGroup.tsx | 23 +- .../react-aria-components/src/TextArea.tsx | 4 +- .../react-aria-components/src/TextField.tsx | 8 +- packages/react-aria-components/src/Toast.tsx | 16 +- .../src/ToggleButton.tsx | 13 +- .../src/ToggleButtonGroup.tsx | 9 +- .../react-aria-components/src/Toolbar.tsx | 9 +- .../react-aria-components/src/Tooltip.tsx | 17 +- packages/react-aria-components/src/Tree.tsx | 54 ++- .../src/useDragAndDrop.tsx | 14 +- packages/react-aria-components/src/utils.tsx | 52 ++- .../stories/Tree.stories.tsx | 2 + .../test/ListBox.test.js | 24 +- .../src/actiongroup/useActionGroup.ts | 6 +- .../aria-modal-polyfill/ariaModalPolyfill.ts | 15 +- .../src/autocomplete/useAutocomplete.ts | 30 +- .../src/autocomplete/useSearchAutocomplete.ts | 23 +- .../src/breadcrumbs/useBreadcrumbItem.ts | 2 + packages/react-aria/src/button/useButton.ts | 38 +- .../react-aria/src/button/useToggleButton.ts | 3 +- .../src/button/useToggleButtonGroup.ts | 4 +- .../src/calendar/useCalendarCell.ts | 13 +- .../src/calendar/useCalendarGrid.ts | 8 +- .../src/calendar/useCalendarHeading.ts | 1 + .../src/calendar/useCalendarYearPicker.ts | 1 + .../src/calendar/useRangeCalendar.ts | 10 +- .../react-aria/src/checkbox/useCheckbox.ts | 1 + .../src/checkbox/useCheckboxGroup.ts | 1 + .../src/checkbox/useCheckboxGroupItem.ts | 5 +- .../src/collections/CollectionBuilder.tsx | 3 +- packages/react-aria/src/color/useColorArea.ts | 11 +- .../src/color/useColorChannelField.ts | 4 +- .../react-aria/src/combobox/useComboBox.ts | 8 +- .../react-aria/src/datepicker/useDateField.ts | 3 +- .../src/datepicker/useDatePicker.ts | 8 +- packages/react-aria/src/dialog/useDialog.ts | 1 + .../src/disclosure/useDisclosure.ts | 1 + .../src/dnd/ListDropTargetDelegate.ts | 3 + packages/react-aria/src/dnd/useDrag.ts | 15 +- .../src/dnd/useDraggableCollection.ts | 4 +- .../react-aria/src/dnd/useDraggableItem.ts | 13 +- packages/react-aria/src/dnd/useDrop.ts | 9 +- .../src/dnd/useDroppableCollection.ts | 4 +- packages/react-aria/src/dnd/utils.ts | 2 +- packages/react-aria/src/focus/FocusRing.tsx | 1 + packages/react-aria/src/focus/useFocusRing.ts | 1 + .../src/focus/useHasTabbableChild.ts | 1 + packages/react-aria/src/grid/useGrid.ts | 16 +- packages/react-aria/src/grid/useGridCell.ts | 14 +- packages/react-aria/src/grid/useGridRow.ts | 9 +- .../src/grid/useGridSelectionAnnouncement.ts | 4 +- .../src/grid/useGridSelectionCheckbox.ts | 1 + .../grid/useHighlightSelectionDescription.ts | 1 + .../react-aria/src/gridlist/useGridList.ts | 18 +- .../src/gridlist/useGridListItem.ts | 6 +- .../src/gridlist/useGridListSection.ts | 1 + .../gridlist/useGridListSelectionCheckbox.ts | 1 + packages/react-aria/src/i18n/useCollator.ts | 5 +- .../react-aria/src/i18n/useDateFormatter.ts | 5 +- packages/react-aria/src/i18n/useFilter.ts | 5 +- .../react-aria/src/i18n/useListFormatter.tsx | 5 +- .../src/i18n/useLocalizedStringFormatter.ts | 4 +- .../react-aria/src/i18n/useNumberFormatter.ts | 5 +- packages/react-aria/src/i18n/utils.ts | 3 +- .../src/interactions/createEventHandler.ts | 3 +- .../src/interactions/useFocusVisible.ts | 27 +- .../src/interactions/useLongPress.ts | 5 +- packages/react-aria/src/interactions/utils.ts | 7 +- packages/react-aria/src/label/useField.ts | 5 +- packages/react-aria/src/label/useLabel.ts | 2 + .../react-aria/src/landmark/useLandmark.ts | 8 +- packages/react-aria/src/link/useLink.ts | 1 + packages/react-aria/src/listbox/useListBox.ts | 11 +- .../src/listbox/useListBoxSection.ts | 1 + packages/react-aria/src/listbox/useOption.ts | 7 + packages/react-aria/src/menu/useMenu.ts | 2 + packages/react-aria/src/menu/useMenuItem.ts | 11 +- .../react-aria/src/menu/useMenuSection.ts | 1 + .../react-aria/src/menu/useMenuTrigger.ts | 1 + .../src/menu/useSafelyMouseToSubmenu.ts | 5 +- .../react-aria/src/menu/useSubmenuTrigger.ts | 9 +- .../src/numberfield/useNumberField.ts | 15 +- packages/react-aria/src/overlays/Overlay.tsx | 1 + .../src/overlays/PortalProvider.tsx | 5 +- .../src/overlays/ariaHideOutside.ts | 1 + .../src/overlays/calculatePosition.ts | 3 +- packages/react-aria/src/overlays/useModal.tsx | 15 +- .../src/overlays/useModalOverlay.ts | 2 + .../react-aria/src/overlays/useOverlay.ts | 2 + .../src/overlays/useOverlayPosition.ts | 10 + .../react-aria/src/progress/useProgressBar.ts | 6 +- packages/react-aria/src/radio/useRadio.ts | 1 + .../react-aria/src/radio/useRadioGroup.ts | 1 + .../src/searchfield/useSearchField.ts | 9 +- .../react-aria/src/select/HiddenSelect.tsx | 3 +- packages/react-aria/src/select/useSelect.ts | 4 +- .../src/selection/useSelectableCollection.ts | 12 +- .../src/selection/useSelectableItem.ts | 16 +- .../src/selection/useSelectableList.ts | 7 +- .../react-aria/src/separator/useSeparator.ts | 1 + packages/react-aria/src/slider/useSlider.ts | 9 +- .../react-aria/src/slider/useSliderThumb.ts | 4 +- packages/react-aria/src/switch/useSwitch.ts | 4 +- packages/react-aria/src/table/useTable.ts | 12 +- packages/react-aria/src/table/useTableCell.ts | 9 +- .../src/table/useTableColumnHeader.ts | 11 +- .../src/table/useTableColumnResize.ts | 18 +- .../react-aria/src/table/useTableHeaderRow.ts | 1 + packages/react-aria/src/table/useTableRow.ts | 1 + .../src/table/useTableSelectionCheckbox.ts | 2 + packages/react-aria/src/tabs/useTabList.ts | 2 + packages/react-aria/src/tabs/useTabPanel.ts | 4 +- packages/react-aria/src/tag/useTag.ts | 1 + packages/react-aria/src/tag/useTagGroup.ts | 10 +- .../react-aria/src/textfield/useTextField.ts | 35 +- packages/react-aria/src/toast/useToast.ts | 4 +- .../react-aria/src/toast/useToastRegion.ts | 8 +- packages/react-aria/src/toggle/useToggle.ts | 3 +- packages/react-aria/src/toolbar/useToolbar.ts | 2 + packages/react-aria/src/tree/useTree.ts | 6 +- packages/react-aria/src/tree/useTreeItem.ts | 6 +- packages/react-aria/src/utils/domHelpers.ts | 3 +- .../react-aria/src/utils/filterDOMProps.ts | 1 + packages/react-aria/src/utils/getNonce.ts | 5 +- .../react-aria/src/utils/isElementVisible.ts | 1 + packages/react-aria/src/utils/mergeProps.ts | 1 + .../react-aria/src/utils/scrollIntoView.ts | 8 +- .../src/utils/shadowdom/DOMFunctions.ts | 1 + packages/react-aria/src/utils/useId.ts | 2 + packages/react-aria/src/utils/useLabels.ts | 1 + packages/react-aria/src/utils/useLoadMore.ts | 10 +- .../src/utils/useLoadMoreSentinel.ts | 8 +- .../src/visually-hidden/VisuallyHidden.tsx | 1 + .../react-aria/test/focus/FocusScope.test.js | 6 +- .../src/autocomplete/useAutocompleteState.ts | 5 +- packages/react-stately/src/calendar/types.ts | 38 +- .../src/calendar/useCalendarState.ts | 15 +- .../src/calendar/useRangeCalendarState.ts | 17 +- .../src/checkbox/useCheckboxGroupState.ts | 1 + packages/react-stately/src/color/Color.ts | 14 +- .../src/color/useColorAreaState.ts | 29 +- .../src/color/useColorFieldState.ts | 5 +- .../src/color/useColorSliderState.ts | 5 +- .../src/color/useColorWheelState.ts | 6 +- .../src/combobox/useComboBoxState.ts | 23 +- .../react-stately/src/data/useAsyncList.ts | 4 +- .../react-stately/src/data/useListData.ts | 14 +- .../react-stately/src/data/useTreeData.ts | 11 + .../src/datepicker/IncompleteDate.ts | 16 +- .../react-stately/src/datepicker/types.ts | 46 ++- .../src/datepicker/useDateFieldState.ts | 17 +- .../src/datepicker/useDatePickerState.ts | 14 +- .../src/datepicker/useDateRangePickerState.ts | 15 +- .../src/dnd/useDraggableCollectionState.ts | 5 +- .../src/form/useFormValidationState.ts | 5 +- .../react-stately/src/grid/GridCollection.ts | 3 +- .../react-stately/src/grid/useGridState.ts | 10 +- .../react-stately/src/layout/GridLayout.ts | 12 +- .../react-stately/src/layout/ListLayout.ts | 46 ++- .../react-stately/src/layout/TableLayout.ts | 13 +- .../src/layout/WaterfallLayout.ts | 11 +- .../src/menu/useMenuTriggerState.ts | 4 +- .../src/menu/useSubmenuTriggerState.ts | 4 +- .../src/numberfield/useNumberFieldState.ts | 26 +- .../src/radio/useRadioGroupState.ts | 5 +- .../src/select/useSelectState.ts | 13 +- packages/react-stately/src/selection/types.ts | 5 +- .../selection/useMultipleSelectionState.ts | 2 + .../src/slider/useSliderState.ts | 20 + packages/react-stately/src/table/Column.ts | 5 +- packages/react-stately/src/table/Row.ts | 8 +- packages/react-stately/src/table/TableBody.ts | 5 +- .../src/table/TableCollection.ts | 5 +- .../src/table/TableColumnLayout.ts | 5 +- .../react-stately/src/table/TableHeader.ts | 10 +- .../react-stately/src/table/TableUtils.ts | 35 +- .../src/table/useTableColumnResizeState.ts | 8 +- .../react-stately/src/table/useTableState.ts | 21 +- .../src/table/useTreeGridState.ts | 5 +- .../src/toggle/useToggleGroupState.ts | 1 + .../src/toggle/useToggleState.ts | 3 +- .../src/tooltip/useTooltipTriggerState.ts | 10 +- packages/react-stately/src/utils/number.ts | 3 +- .../react-stately/src/virtualizer/Layout.ts | 7 +- .../src/virtualizer/LayoutInfo.ts | 13 +- .../react-stately/src/virtualizer/Rect.ts | 4 + .../src/virtualizer/Virtualizer.ts | 9 +- .../tooltip/useTooltipTriggerState.test.js | 3 +- scripts/buildBranchAPI.js | 7 +- scripts/buildPublishedAPI.js | 7 +- scripts/extractStarter.mjs | 7 +- scripts/getCommitsForTesting.mjs | 3 +- scripts/migrateIntl.mjs | 3 +- scripts/setupTests.js | 16 +- starters/docs/.storybook/main.js | 2 +- starters/docs/.storybook/preview.js | 2 +- starters/docs/src/Button.tsx | 1 + starters/docs/src/Slider.tsx | 1 + starters/docs/src/ToggleButton.tsx | 1 + starters/tailwind/.storybook/main.js | 2 +- starters/tailwind/.storybook/preview.js | 2 +- starters/tailwind/src/Slider.tsx | 1 + yarn.config.cjs | 1 + 450 files changed, 3669 insertions(+), 1468 deletions(-) diff --git a/.oxfmtrc.json b/.oxfmtrc.json index 92d1e75c0f3..a4e890ecb22 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -9,5 +9,12 @@ "bracketSpacing": false, "trailingComma": "none", "bracketSameLine": true, - "arrowParens": "avoid" + "arrowParens": "avoid", + "jsdoc": { + "addDefaultToDescription": false, + "capitalizeDescriptions": true, + "commentLineStrategy": "keep", + "descriptionWithDot": true, + "lineWrappingStyle": "balance" + } } diff --git a/.storybook-s2/custom-addons/provider/preset.ts b/.storybook-s2/custom-addons/provider/preset.ts index fafbb22081c..a8d04cba4ae 100644 --- a/.storybook-s2/custom-addons/provider/preset.ts +++ b/.storybook-s2/custom-addons/provider/preset.ts @@ -8,6 +8,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url)); * The manager builder will bundle register.tsx and transpile JSX there; * this file stays JS-free so Node can load it as a preset. * In plain english, this is needed so that register can be a tsx file. + * * @see https://github.com/storybookjs/addon-kit * @see https://storybook.js.org/docs/addons/writing-presets#managerentries */ diff --git a/.storybook-s2/preview.tsx b/.storybook-s2/preview.tsx index bd9e5fd1bff..ce6dd315a43 100644 --- a/.storybook-s2/preview.tsx +++ b/.storybook-s2/preview.tsx @@ -35,7 +35,7 @@ channel.on(DARK_MODE_EVENT_NAME, (isDark: boolean) => { document.documentElement.dataset.colorScheme = isDark ? 'dark' : 'light'; }); -/** @type { import('@storybook/react').Preview } */ +/** @type {import('@storybook/react').Preview} */ const preview = { parameters: { controls: { diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 962c7e04584..cb1a8aa119d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,7 +101,7 @@ yarn test --coverage ``` ### Linting -The code is linted with [eslint](https://eslint.org/). The linter runs whenever you run the tests, but you can also run it with +The code is linted with [oxlint](https://oxc.rs/docs/guide/usage/linter.html). The linter runs whenever you run the tests, but you can also run it with ```bash yarn lint ``` diff --git a/examples/rac-spectrum-tailwind/src/spectrum-preset.js b/examples/rac-spectrum-tailwind/src/spectrum-preset.js index 127202d74d2..5ab813145c0 100644 --- a/examples/rac-spectrum-tailwind/src/spectrum-preset.js +++ b/examples/rac-spectrum-tailwind/src/spectrum-preset.js @@ -378,7 +378,7 @@ module.exports = { error: 'var(--spectrum-alias-icon-color-error)' } }, - /** https://spectrum.adobe.com/page/states/#Keyboard-focus */ + /** https://spectrum.adobe.com/page/states/#Keyboard-focus. */ ringColor: { DEFAULT: 'var(--spectrum-alias-focus-ring-color)' }, @@ -390,12 +390,12 @@ module.exports = { /** For use when next to existing blue border. */ half: 'calc(var(--spectrum-alias-focus-ring-size) / 2)' }, - /** https://spectrum.adobe.com/page/object-styles/#Drop-shadow */ + /** https://spectrum.adobe.com/page/object-styles/#Drop-shadow. */ dropShadow: { DEFAULT: '0 var(--spectrum-alias-dropshadow-offset-y) var(--spectrum-alias-dropshadow-blur) var(--spectrum-alias-dropshadow-color)' }, - /** https://spectrum.adobe.com/page/object-styles/#Border-width */ + /** https://spectrum.adobe.com/page/object-styles/#Border-width. */ borderWidth: { DEFAULT: 'var(--spectrum-alias-border-size-thin)', none: '0', @@ -404,7 +404,7 @@ module.exports = { thicker: 'var(--spectrum-alias-border-size-thicker)', thickest: 'var(--spectrum-alias-border-size-thickest)' }, - /** https://spectrum.adobe.com/page/object-styles/#Rounding */ + /** https://spectrum.adobe.com/page/object-styles/#Rounding. */ borderRadius: { DEFAULT: 'var(--spectrum-alias-border-radius-regular)', xsmall: 'var(--spectrum-alias-border-radius-xsmall)', @@ -414,7 +414,7 @@ module.exports = { large: 'var(--spectrum-alias-border-radius-large)', full: '9999px' }, - /** https://spectrum.adobe.com/page/typography/#Font-sizes */ + /** https://spectrum.adobe.com/page/typography/#Font-sizes. */ fontSize: { DEFAULT: 'var(--spectrum-alias-font-size-default)', xs: 'var(--spectrum-global-dimension-font-size-50)', diff --git a/packages/@adobe/react-spectrum/docs/labeledvalue/types.ts b/packages/@adobe/react-spectrum/docs/labeledvalue/types.ts index fd262b87c92..5d81dd98643 100644 --- a/packages/@adobe/react-spectrum/docs/labeledvalue/types.ts +++ b/packages/@adobe/react-spectrum/docs/labeledvalue/types.ts @@ -14,6 +14,9 @@ export interface LabeledValueProps extends LabeledValueBaseProps { | DateTime | RangeValue | ReactElement; - /** Formatting options for the value. The available options depend on the type passed to the `value` prop. */ + /** + * Formatting options for the value. The available options depend on the type passed to the + * `value` prop. + */ formatOptions?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions | Intl.ListFormatOptions; } diff --git a/packages/@adobe/react-spectrum/src/accordion/Accordion.tsx b/packages/@adobe/react-spectrum/src/accordion/Accordion.tsx index c40578652f3..ebe670ab548 100644 --- a/packages/@adobe/react-spectrum/src/accordion/Accordion.tsx +++ b/packages/@adobe/react-spectrum/src/accordion/Accordion.tsx @@ -74,7 +74,10 @@ export interface SpectrumDisclosureProps StyleProps { /** Whether the Disclosure should be displayed with a quiet style. */ isQuiet?: boolean; - /** The contents of the disclosure. The first child should be the header, and the second child should be the panel. */ + /** + * The contents of the disclosure. The first child should be the header, and the second child + * should be the panel. + */ children: React.ReactNode; } @@ -140,6 +143,7 @@ export const DisclosurePanel = /*#__PURE__*/ (forwardRef as forwardRefType)( export interface SpectrumDisclosureTitleProps extends DOMProps, AriaLabelingProps, StyleProps { /** * The heading level of the disclosure header. + * * @default 3 */ level?: number; diff --git a/packages/@adobe/react-spectrum/src/actionbar/ActionBar.tsx b/packages/@adobe/react-spectrum/src/actionbar/ActionBar.tsx index 02e4f1cf33b..c486c5d515b 100644 --- a/packages/@adobe/react-spectrum/src/actionbar/ActionBar.tsx +++ b/packages/@adobe/react-spectrum/src/actionbar/ActionBar.tsx @@ -32,13 +32,19 @@ import {useProviderProps} from '../provider/Provider'; import {useStyleProps} from '../utils/styleProps'; interface ActionBarProps { - /** An list of `Item` elements or a function. If the latter, a list of items must be provided using the `items` prop. */ + /** + * An list of `Item` elements or a function. If the latter, a list of items must be provided using + * the `items` prop. + */ children: ItemElement | ItemElement[] | ItemRenderer; /** A list of items to display as children. Must be used with a function as the sole child. */ items?: Iterable; /** A list of keys to disable. */ disabledKeys?: Iterable; - /** The number of selected items that the ActionBar is currently linked to. If 0, the ActionBar is hidden. */ + /** + * The number of selected items that the ActionBar is currently linked to. If 0, the ActionBar is + * hidden. + */ selectedItemCount: number | 'all'; /** Handler that is called when the ActionBar clear button is pressed. */ onClearSelection: () => void; @@ -48,9 +54,10 @@ interface ActionBarProps { onAction?: (key: Key) => void; /** * Defines when the text within the buttons should be hidden and only the icon should be shown. - * When set to 'hide', the text is always shown in a tooltip. When set to 'collapse', the text is visible - * if space is available, and hidden when space is limited. The text is always visible when the item - * is collapsed into a menu. + * When set to 'hide', the text is always shown in a tooltip. When set to 'collapse', the text is + * visible if space is available, and hidden when space is limited. The text is always visible + * when the item is collapsed into a menu. + * * @default 'collapse' */ buttonLabelBehavior?: 'show' | 'collapse' | 'hide'; @@ -59,7 +66,8 @@ interface ActionBarProps { export interface SpectrumActionBarProps extends ActionBarProps, DOMProps, StyleProps {} /** - * Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time. + * Action bars are used for single and bulk selection patterns when a user needs to perform actions + * on one or more items at the same time. */ export const ActionBar = React.forwardRef(function ActionBar( props: SpectrumActionBarProps, diff --git a/packages/@adobe/react-spectrum/src/actionbar/ActionBarContainer.tsx b/packages/@adobe/react-spectrum/src/actionbar/ActionBarContainer.tsx index 1f71a8486f1..863a5b59ef5 100644 --- a/packages/@adobe/react-spectrum/src/actionbar/ActionBarContainer.tsx +++ b/packages/@adobe/react-spectrum/src/actionbar/ActionBarContainer.tsx @@ -21,7 +21,10 @@ import {useProviderProps} from '../provider/Provider'; import {useStyleProps} from '../utils/styleProps'; interface ActionBarContainerProps { - /** The contents of the ActionBarContainer. Should include a ActionBar and the renderable content it is associated with. */ + /** + * The contents of the ActionBarContainer. Should include a ActionBar and the renderable content + * it is associated with. + */ children: ReactNode; } diff --git a/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx b/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx index 2e9c8ef52a8..eabceba43ac 100644 --- a/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx +++ b/packages/@adobe/react-spectrum/src/actiongroup/ActionGroup.tsx @@ -54,16 +54,23 @@ import {useStyleProps} from '../utils/styleProps'; import {useValueEffect} from 'react-aria/private/utils/useValueEffect'; export interface SpectrumActionGroupProps extends AriaActionGroupProps, StyleProps { - /** Whether the ActionButtons should be displayed with a [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ + /** + * Whether the ActionButtons should be displayed with a [emphasized + * style](https://spectrum.adobe.com/page/action-button/#Emphasis). + */ isEmphasized?: boolean; /** * Sets the amount of space between buttons. + * * @default 'regular' */ density?: 'compact' | 'regular'; /** Whether the ActionButtons should be justified in their container. */ isJustified?: boolean; - /** Whether ActionButtons should use the [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ + /** + * Whether ActionButtons should use the [quiet + * style](https://spectrum.adobe.com/page/action-button/#Quiet). + */ isQuiet?: boolean; /** The static color style to apply. Useful when the ActionGroup appears over a color background. */ staticColor?: 'white' | 'black'; @@ -71,14 +78,16 @@ export interface SpectrumActionGroupProps extends AriaActionGroupProps, St * Defines the behavior of the ActionGroup when the buttons do not fit in the available space. * When set to 'wrap', the items wrap to form a new line. When set to 'collapse', the items that * do not fit are collapsed into a dropdown menu. + * * @default 'wrap' */ overflowMode?: 'wrap' | 'collapse'; /** * Defines when the text within the buttons should be hidden and only the icon should be shown. - * When set to 'hide', the text is always shown in a tooltip. When set to 'collapse', the text is visible - * if space is available, and hidden when space is limited. The text is always visible when the item - * is collapsed into a menu. + * When set to 'hide', the text is always shown in a tooltip. When set to 'collapse', the text is + * visible if space is available, and hidden when space is limited. The text is always visible + * when the item is collapsed into a menu. + * * @default 'show' */ buttonLabelBehavior?: 'show' | 'collapse' | 'hide'; diff --git a/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx b/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx index 12691bbee29..b098b193830 100644 --- a/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx +++ b/packages/@adobe/react-spectrum/src/autocomplete/SearchAutocomplete.tsx @@ -77,29 +77,41 @@ export interface SpectrumSearchAutocompleteProps StyleProps, Omit { /** - * The interaction required to display the SearchAutocomplete menu. Note that this prop has no effect on the mobile SearchAutocomplete experience. + * The interaction required to display the SearchAutocomplete menu. Note that this prop has no + * effect on the mobile SearchAutocomplete experience. + * * @default 'input' */ menuTrigger?: MenuTriggerAction; /** Whether the SearchAutocomplete should be displayed with a quiet style. */ isQuiet?: boolean; - /** Alignment of the menu relative to the input target. + /** + * Alignment of the menu relative to the input target. + * * @default 'start' */ align?: 'start' | 'end'; /** * Direction the menu will render relative to the SearchAutocomplete. + * * @default 'bottom' */ direction?: 'bottom' | 'top'; - /** The current loading state of the SearchAutocomplete. Determines whether or not the progress circle should be shown. */ + /** + * The current loading state of the SearchAutocomplete. Determines whether or not the progress + * circle should be shown. + */ loadingState?: LoadingState; /** * Whether the menu should automatically flip direction when space is limited. + * * @default true */ shouldFlip?: boolean; - /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */ + /** + * Width of the menu. By default, matches width of the trigger. Note that the minimum width of the + * dropdown is always equal to the trigger's width. + */ menuWidth?: DimensionValue; onLoadMore?: () => void; /** An icon to display at the start of the input. */ diff --git a/packages/@adobe/react-spectrum/src/badge/Badge.tsx b/packages/@adobe/react-spectrum/src/badge/Badge.tsx index 67ba761af2f..0ba42bd507e 100644 --- a/packages/@adobe/react-spectrum/src/badge/Badge.tsx +++ b/packages/@adobe/react-spectrum/src/badge/Badge.tsx @@ -42,7 +42,8 @@ export interface SpectrumBadgeProps extends DOMProps, StyleProps, AriaLabelingPr } /** - * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention. + * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a + * user's attention. */ export const Badge = forwardRef(function Badge( props: SpectrumBadgeProps, diff --git a/packages/@adobe/react-spectrum/src/breadcrumbs/Breadcrumbs.tsx b/packages/@adobe/react-spectrum/src/breadcrumbs/Breadcrumbs.tsx index 4008e9c6e31..801e1d195ce 100644 --- a/packages/@adobe/react-spectrum/src/breadcrumbs/Breadcrumbs.tsx +++ b/packages/@adobe/react-spectrum/src/breadcrumbs/Breadcrumbs.tsx @@ -36,6 +36,7 @@ export interface SpectrumBreadcrumbsProps extends AriaBreadcrumbsProps, Style onAction?: (key: Key) => void; /** * Size of the Breadcrumbs including spacing and layout. + * * @default 'L' */ size?: 'S' | 'M' | 'L'; diff --git a/packages/@adobe/react-spectrum/src/button/ActionButton.tsx b/packages/@adobe/react-spectrum/src/button/ActionButton.tsx index a9fbe11ed23..b22bd54fb76 100644 --- a/packages/@adobe/react-spectrum/src/button/ActionButton.tsx +++ b/packages/@adobe/react-spectrum/src/button/ActionButton.tsx @@ -28,15 +28,19 @@ import {useStyleProps} from '../utils/styleProps'; export interface SpectrumActionButtonProps extends AriaBaseButtonProps, Omit, StyleProps { - /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ + /** + * Whether the button should be displayed with a [quiet + * style](https://spectrum.adobe.com/page/action-button/#Quiet). + */ isQuiet?: boolean; /** The static color style to apply. Useful when the button appears over a color background. */ staticColor?: 'white' | 'black'; } /** - * ActionButtons allow users to perform an action. - * They’re used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of attention. + * ActionButtons allow users to perform an action. They’re used for similar, task-based options + * within a workflow, and are ideal for interfaces where buttons aren’t meant to draw a lot of + * attention. */ export const ActionButton = React.forwardRef(function ActionButton( props: SpectrumActionButtonProps, diff --git a/packages/@adobe/react-spectrum/src/button/Button.tsx b/packages/@adobe/react-spectrum/src/button/Button.tsx index 703902878ef..a88dacd04fb 100644 --- a/packages/@adobe/react-spectrum/src/button/Button.tsx +++ b/packages/@adobe/react-spectrum/src/button/Button.tsx @@ -49,6 +49,7 @@ export interface SpectrumButtonProps isPending?: boolean; /** * Whether the button should be displayed with a quiet style. + * * @deprecated */ isQuiet?: boolean; diff --git a/packages/@adobe/react-spectrum/src/button/ToggleButton.tsx b/packages/@adobe/react-spectrum/src/button/ToggleButton.tsx index 720a5697cee..0deb0095545 100644 --- a/packages/@adobe/react-spectrum/src/button/ToggleButton.tsx +++ b/packages/@adobe/react-spectrum/src/button/ToggleButton.tsx @@ -43,7 +43,10 @@ export interface SpectrumToggleButtonProps | 'name' | 'value' > { - /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ + /** + * Whether the button should be displayed with an [emphasized + * style](https://spectrum.adobe.com/page/action-button/#Emphasis). + */ isEmphasized?: boolean; } diff --git a/packages/@adobe/react-spectrum/src/buttongroup/ButtonGroup.tsx b/packages/@adobe/react-spectrum/src/buttongroup/ButtonGroup.tsx index cbd35ac5c25..dea4e73a105 100644 --- a/packages/@adobe/react-spectrum/src/buttongroup/ButtonGroup.tsx +++ b/packages/@adobe/react-spectrum/src/buttongroup/ButtonGroup.tsx @@ -29,6 +29,7 @@ export interface SpectrumButtonGroupProps extends DOMProps, StyleProps { /** * The axis the ButtonGroup should align with. Setting this to 'vertical' will prevent * any switching behaviors between 'vertical' and 'horizontal'. + * * @default 'horizontal' */ orientation?: Orientation; @@ -36,6 +37,7 @@ export interface SpectrumButtonGroupProps extends DOMProps, StyleProps { children: ReactNode; /** * The alignment of the buttons within the ButtonGroup. + * * @default 'start' */ align?: Alignment | 'center'; diff --git a/packages/@adobe/react-spectrum/src/calendar/Calendar.tsx b/packages/@adobe/react-spectrum/src/calendar/Calendar.tsx index 0546354b15d..10121af74e4 100644 --- a/packages/@adobe/react-spectrum/src/calendar/Calendar.tsx +++ b/packages/@adobe/react-spectrum/src/calendar/Calendar.tsx @@ -26,14 +26,16 @@ export interface SpectrumCalendarProps extends AriaCalendarProps, StyleProps { /** * The number of months to display at once. Up to 3 months are supported. + * * @default 1 */ visibleMonths?: number; /** - * A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) - * object for a given calendar identifier. If not provided, the `createCalendar` function - * from `@internationalized/date` will be used. + * A function to create a new + * [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) object for a + * given calendar identifier. If not provided, the `createCalendar` function from + * `@internationalized/date` will be used. */ createCalendar?: (identifier: CalendarIdentifier) => ICalendar; } diff --git a/packages/@adobe/react-spectrum/src/calendar/RangeCalendar.tsx b/packages/@adobe/react-spectrum/src/calendar/RangeCalendar.tsx index 3768a817b2e..83a7a567726 100644 --- a/packages/@adobe/react-spectrum/src/calendar/RangeCalendar.tsx +++ b/packages/@adobe/react-spectrum/src/calendar/RangeCalendar.tsx @@ -26,20 +26,23 @@ export interface SpectrumRangeCalendarProps extends AriaRangeCalendarProps, StyleProps { /** * The number of months to display at once. Up to 3 months are supported. + * * @default 1 */ visibleMonths?: number; /** - * A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) - * object for a given calendar identifier. If not provided, the `createCalendar` function - * from `@internationalized/date` will be used. + * A function to create a new + * [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) object for a + * given calendar identifier. If not provided, the `createCalendar` function from + * `@internationalized/date` will be used. */ createCalendar?: (identifier: CalendarIdentifier) => ICalendar; } /** - * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates. + * RangeCalendars display a grid of days in one or more months and allow users to select a + * contiguous range of dates. */ export const RangeCalendar = React.forwardRef(function RangeCalendar( props: SpectrumRangeCalendarProps, diff --git a/packages/@adobe/react-spectrum/src/card/BaseLayout.tsx b/packages/@adobe/react-spectrum/src/card/BaseLayout.tsx index 912d3c126a3..0b9a213e77a 100644 --- a/packages/@adobe/react-spectrum/src/card/BaseLayout.tsx +++ b/packages/@adobe/react-spectrum/src/card/BaseLayout.tsx @@ -29,6 +29,7 @@ export interface BaseLayoutOptions { scale?: Scale; /** * The margin around the grid view between the edges and the items. + * * @default 24 */ margin?: number; diff --git a/packages/@adobe/react-spectrum/src/card/GalleryLayout.tsx b/packages/@adobe/react-spectrum/src/card/GalleryLayout.tsx index 9af9966a1b8..463ce49ebcb 100644 --- a/packages/@adobe/react-spectrum/src/card/GalleryLayout.tsx +++ b/packages/@adobe/react-spectrum/src/card/GalleryLayout.tsx @@ -21,27 +21,32 @@ export interface GalleryLayoutOptions extends BaseLayoutOptions { // cardSize?: 'S' | 'M' | 'L', /** * The the default row height. Note this must be larger than the min item height. + * * @default 208 */ idealRowHeight?: number; /** * The spacing between items. + * * @default 18 x 18 */ itemSpacing?: Size; /** * The vertical padding for an item. + * * @default 78 */ itemPadding?: number; /** * Minimum size for a item in the grid. + * * @default 136 x 136 */ minItemSize?: Size; /** - * Target for adding extra weight to elements during linear partitioning. Anything with an aspect ratio smaler than this value - * will be targeted. + * Target for adding extra weight to elements during linear partitioning. Anything with an aspect + * ratio smaler than this value will be targeted. + * * @type {number} */ threshold?: number; @@ -95,10 +100,10 @@ export class GalleryLayout extends BaseLayout { } /** - * Takes a row of widths and if there are any widths smaller than the min-width, leech width starting from - * the widest in the row until it can't give anymore, then move to the second widest and so forth. - * Do this until all assets meet the min-width. - * */ + * Takes a row of widths and if there are any widths smaller than the min-width, leech width + * starting from the widest in the row until it can't give anymore, then move to the second widest + * and so forth. Do this until all assets meet the min-width. + */ _distributeWidths(widths: number[]): boolean { // create a copy of the widths array and sort it largest to smallest let sortedWidths = widths.concat().sort((a, b) => (a[1] > b[1] ? -1 : 1)); diff --git a/packages/@adobe/react-spectrum/src/card/GridLayout.tsx b/packages/@adobe/react-spectrum/src/card/GridLayout.tsx index 4820e986bb1..70c95785269 100644 --- a/packages/@adobe/react-spectrum/src/card/GridLayout.tsx +++ b/packages/@adobe/react-spectrum/src/card/GridLayout.tsx @@ -23,31 +23,38 @@ export interface GridLayoutOptions extends BaseLayoutOptions { // cardSize?: 'S' | 'M' | 'L', /** * The minimum item size. + * * @default 208 x 208 for horizontal card orientation. 102 x 102 for vertical card orientation. */ minItemSize?: Size; /** * The maximum item size. + * * @default Infinity */ maxItemSize?: Size; /** * The minimum space required between items. + * * @default 18 x 18 */ minSpace?: Size; /** * The maximum number of columns. + * * @default Infinity */ maxColumns?: number; /** - * The additional padding along the card's main axis. Affects the sizing of the content area following the card image. + * The additional padding along the card's main axis. Affects the sizing of the content area + * following the card image. + * * @default 95 */ itemPadding?: number; /** * The orientation of the cards withn the grid. + * * @default vertical */ cardOrientation?: Orientation; diff --git a/packages/@adobe/react-spectrum/src/card/WaterfallLayout.tsx b/packages/@adobe/react-spectrum/src/card/WaterfallLayout.tsx index 17e5d6f51d0..f608251dc38 100644 --- a/packages/@adobe/react-spectrum/src/card/WaterfallLayout.tsx +++ b/packages/@adobe/react-spectrum/src/card/WaterfallLayout.tsx @@ -19,21 +19,25 @@ import {Key, KeyboardDelegate} from '@react-types/shared'; export interface WaterfallLayoutOptions extends BaseLayoutOptions { /** * The minimum item size. + * * @default 240 x 136 */ minItemSize?: Size; /** * The maximum item size. + * * @default Infinity */ maxItemSize?: Size; /** * The minimum space required between items. + * * @default 18 x 18 */ minSpace?: Size; /** * The maximum number of columns. + * * @default Infinity */ maxColumns?: number; diff --git a/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx b/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx index 45a4596c8a4..a70606c6ede 100644 --- a/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx +++ b/packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx @@ -36,8 +36,10 @@ export interface SpectrumCheckboxProps extends Omit | ReactElement[]; /** * The axis the checkboxes should align with. + * * @default 'vertical' */ orientation?: Orientation; diff --git a/packages/@adobe/react-spectrum/src/color/ColorArea.tsx b/packages/@adobe/react-spectrum/src/color/ColorArea.tsx index b5be5803dc1..e48d72cf8dc 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorArea.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorArea.tsx @@ -33,7 +33,8 @@ export interface SpectrumColorAreaProps } /** - * ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background. + * ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a + * two-dimensional gradient background. */ export const ColorArea = React.forwardRef(function ColorArea( props: SpectrumColorAreaProps, diff --git a/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx b/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx index abf1e935c4f..515c24da863 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorPicker.tsx @@ -32,12 +32,14 @@ export interface SpectrumColorPickerProps children?: ReactNode; /** * The size of the color swatch. - * @default "M" + * + * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L'; /** * The corner rounding of the color swatch. - * @default "default" + * + * @default 'default' */ rounding?: 'default' | 'none' | 'full'; } diff --git a/packages/@adobe/react-spectrum/src/color/ColorSlider.tsx b/packages/@adobe/react-spectrum/src/color/ColorSlider.tsx index 32bc196ebfa..0db6b00544f 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorSlider.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorSlider.tsx @@ -30,7 +30,10 @@ import {useProviderProps} from '../provider/Provider'; import {useStyleProps} from '../utils/styleProps'; export interface SpectrumColorSliderProps extends AriaColorSliderProps, StyleProps { - /** Whether the value label is displayed. True by default if there is a label, false by default if not. */ + /** + * Whether the value label is displayed. True by default if there is a label, false by default if + * not. + */ showValueLabel?: boolean; /** A ContextualHelp element to place next to the label. */ contextualHelp?: ReactNode; diff --git a/packages/@adobe/react-spectrum/src/color/ColorSwatch.tsx b/packages/@adobe/react-spectrum/src/color/ColorSwatch.tsx index cbf29e6fe14..1bc88eb7b35 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorSwatch.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorSwatch.tsx @@ -24,12 +24,14 @@ import {useStyleProps} from '../utils/styleProps'; export interface SpectrumColorSwatchProps extends AriaColorSwatchProps, StyleProps { /** * The size of the ColorSwatch. - * @default "M" + * + * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L'; /** * The corner rounding of the ColorSwatch. - * @default "default" + * + * @default 'default' */ rounding?: 'default' | 'none' | 'full'; } diff --git a/packages/@adobe/react-spectrum/src/color/ColorSwatchPicker.tsx b/packages/@adobe/react-spectrum/src/color/ColorSwatchPicker.tsx index 66650d147a8..c551e50634b 100644 --- a/packages/@adobe/react-spectrum/src/color/ColorSwatchPicker.tsx +++ b/packages/@adobe/react-spectrum/src/color/ColorSwatchPicker.tsx @@ -29,17 +29,20 @@ export interface SpectrumColorSwatchPickerProps children: ReactNode; /** * The amount of padding between the swatches. - * @default "regular" + * + * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** * The size of the color swatches. - * @default "M" + * + * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L'; /** * The corner rounding of the color swatches. - * @default "none" + * + * @default 'none' */ rounding?: 'none' | 'default' | 'full'; } diff --git a/packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx b/packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx index 6465ce7aec5..eb984dc92fe 100644 --- a/packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx +++ b/packages/@adobe/react-spectrum/src/combobox/ComboBox.tsx @@ -90,40 +90,54 @@ export interface SpectrumComboBoxProps StyleProps, Omit { /** - * The interaction required to display the ComboBox menu. Note that this prop has no effect on the mobile ComboBox experience. + * The interaction required to display the ComboBox menu. Note that this prop has no effect on the + * mobile ComboBox experience. + * * @default 'input' */ menuTrigger?: MenuTriggerAction; /** Whether the ComboBox should be displayed with a quiet style. */ isQuiet?: boolean; - /** Alignment of the menu relative to the input target. + /** + * Alignment of the menu relative to the input target. + * * @default 'start' */ align?: 'start' | 'end'; /** * Direction the menu will render relative to the ComboBox. + * * @default 'bottom' */ direction?: 'bottom' | 'top'; - /** The current loading state of the ComboBox. Determines whether or not the progress circle should be shown. */ + /** + * The current loading state of the ComboBox. Determines whether or not the progress circle should + * be shown. + */ loadingState?: LoadingState; /** * Whether the menu should automatically flip direction when space is limited. + * * @default true */ shouldFlip?: boolean; - /** Width of the menu. By default, matches width of the combobox. Note that the minimum width of the dropdown is always equal to the combobox's width. */ + /** + * Width of the menu. By default, matches width of the combobox. Note that the minimum width of + * the dropdown is always equal to the combobox's width. + */ menuWidth?: DimensionValue; /** - * Whether the text or key of the selected item is submitted as part of an HTML form. - * When `allowsCustomValue` is `true`, this option does not apply and the text is always submitted. + * Whether the text or key of the selected item is submitted as part of an HTML form. When + * `allowsCustomValue` is `true`, this option does not apply and the text is always submitted. + * * @default 'text' */ formValue?: 'text' | 'key'; } /** - * ComboBoxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query. + * ComboBoxes combine a text entry with a picker menu, allowing users to filter longer lists to only + * the selections matching a query. */ export const ComboBox = React.forwardRef(function ComboBox( props: SpectrumComboBoxProps, diff --git a/packages/@adobe/react-spectrum/src/contextualhelp/ContextualHelp.tsx b/packages/@adobe/react-spectrum/src/contextualhelp/ContextualHelp.tsx index 15a061398bb..3dc5e9cdae5 100644 --- a/packages/@adobe/react-spectrum/src/contextualhelp/ContextualHelp.tsx +++ b/packages/@adobe/react-spectrum/src/contextualhelp/ContextualHelp.tsx @@ -35,18 +35,21 @@ export interface SpectrumContextualHelpProps children: ReactNode; /** * Indicates whether contents are informative or provides helpful guidance. + * * @default 'help' */ variant?: 'help' | 'info'; /** * The placement of the popover with respect to the action button. + * * @default 'bottom start' */ placement?: Placement; } /** - * Contextual help shows a user extra information about the state of an adjacent component, or a total view. + * Contextual help shows a user extra information about the state of an adjacent component, or a + * total view. */ export const ContextualHelp = React.forwardRef(function ContextualHelp( props: SpectrumContextualHelpProps, diff --git a/packages/@adobe/react-spectrum/src/datepicker/DateField.tsx b/packages/@adobe/react-spectrum/src/datepicker/DateField.tsx index b537e76a963..4be86f9e2ad 100644 --- a/packages/@adobe/react-spectrum/src/datepicker/DateField.tsx +++ b/packages/@adobe/react-spectrum/src/datepicker/DateField.tsx @@ -45,11 +45,13 @@ export interface SpectrumDateFieldBase StyleProps { /** * Whether the date picker should be displayed with a quiet style. + * * @default false */ isQuiet?: boolean; /** * Whether to show the localized date format as help text below the field. + * * @default false */ showFormatHelpText?: boolean; diff --git a/packages/@adobe/react-spectrum/src/datepicker/DatePicker.tsx b/packages/@adobe/react-spectrum/src/datepicker/DatePicker.tsx index 00f447cbd3e..6b3a2c61b7d 100644 --- a/packages/@adobe/react-spectrum/src/datepicker/DatePicker.tsx +++ b/packages/@adobe/react-spectrum/src/datepicker/DatePicker.tsx @@ -50,18 +50,22 @@ import {useProviderProps} from '../provider/Provider'; export interface SpectrumDatePickerBase extends SpectrumDateFieldBase, SpectrumLabelableProps, StyleProps { /** - * The maximum number of months to display at once in the calendar popover, if screen space permits. + * The maximum number of months to display at once in the calendar popover, if screen space + * permits. + * * @default 1 */ maxVisibleMonths?: number; /** * Whether the calendar popover should automatically flip direction when space is limited. + * * @default true */ shouldFlip?: boolean; /** - * A function to create a new [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) - * object for a given calendar identifier. This will be used for the popover calendar. If not provided, the + * A function to create a new + * [Calendar](https://react-spectrum.adobe.com/internationalized/date/Calendar.html) object for a + * given calendar identifier. This will be used for the popover calendar. If not provided, the * `createCalendar` function from `@internationalized/date` will be used. */ createCalendar?: (identifier: CalendarIdentifier) => ICalendar; @@ -73,7 +77,8 @@ export interface SpectrumDatePickerProps SpectrumDatePickerBase {} /** - * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value. + * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date + * and time value. */ export const DatePicker = React.forwardRef(function DatePicker( props: SpectrumDatePickerProps, diff --git a/packages/@adobe/react-spectrum/src/datepicker/TimeField.tsx b/packages/@adobe/react-spectrum/src/datepicker/TimeField.tsx index 1203a57b89e..2145384be52 100644 --- a/packages/@adobe/react-spectrum/src/datepicker/TimeField.tsx +++ b/packages/@adobe/react-spectrum/src/datepicker/TimeField.tsx @@ -44,6 +44,7 @@ export interface SpectrumTimeFieldProps InputDOMProps { /** * Whether the time field should be displayed with a quiet style. + * * @default false */ isQuiet?: boolean; diff --git a/packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx b/packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx index 9583141f1e9..e93f0ae8325 100644 --- a/packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx +++ b/packages/@adobe/react-spectrum/src/dialog/AlertDialog.tsx @@ -30,7 +30,7 @@ import {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatte import {useStyleProps} from '../utils/styleProps'; export interface SpectrumAlertDialogProps extends DOMProps, StyleProps { - /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */ + /** The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. */ variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning'; /** The title of the AlertDialog. */ title: string; @@ -58,7 +58,8 @@ export interface SpectrumAlertDialogProps extends DOMProps, StyleProps { } /** - * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge. + * AlertDialogs are a specific type of Dialog. They display important information that users need to + * acknowledge. */ export const AlertDialog = forwardRef(function AlertDialog( props: SpectrumAlertDialogProps, diff --git a/packages/@adobe/react-spectrum/src/dialog/Dialog.tsx b/packages/@adobe/react-spectrum/src/dialog/Dialog.tsx index a5df756202f..4bdcc4f298c 100644 --- a/packages/@adobe/react-spectrum/src/dialog/Dialog.tsx +++ b/packages/@adobe/react-spectrum/src/dialog/Dialog.tsx @@ -49,8 +49,9 @@ let sizeMap = { }; /** - * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface. - * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged. + * Dialogs are windows containing contextual information, tasks, or workflows that appear over the + * user interface. Depending on the kind of Dialog, further interactions may be blocked until the + * Dialog is acknowledged. */ export const Dialog = React.forwardRef(function Dialog(props: SpectrumDialogProps, ref: DOMRef) { props = useSlotProps(props, 'dialog'); diff --git a/packages/@adobe/react-spectrum/src/dialog/DialogContainer.tsx b/packages/@adobe/react-spectrum/src/dialog/DialogContainer.tsx index f0b1cd5ee4c..7891562c6df 100644 --- a/packages/@adobe/react-spectrum/src/dialog/DialogContainer.tsx +++ b/packages/@adobe/react-spectrum/src/dialog/DialogContainer.tsx @@ -22,10 +22,14 @@ export interface SpectrumDialogContainerProps { onDismiss: () => void; /** * The type of Dialog that should be rendered. See the visual options below for examples of each. + * * @default 'modal' */ type?: 'modal' | 'fullscreen' | 'fullscreenTakeover'; - /** Whether the Dialog is dismissable. See the [Dialog docs](Dialog.html#dismissable-dialogs) for more details. */ + /** + * Whether the Dialog is dismissable. See the [Dialog docs](Dialog.html#dismissable-dialogs) for + * more details. + */ isDismissable?: boolean; /** Whether pressing the escape key to close the dialog should be disabled. */ isKeyboardDismissDisabled?: boolean; diff --git a/packages/@adobe/react-spectrum/src/dialog/DialogTrigger.tsx b/packages/@adobe/react-spectrum/src/dialog/DialogTrigger.tsx index 789d30fdf0e..2df9be8d68f 100644 --- a/packages/@adobe/react-spectrum/src/dialog/DialogTrigger.tsx +++ b/packages/@adobe/react-spectrum/src/dialog/DialogTrigger.tsx @@ -29,20 +29,31 @@ import {useOverlayTrigger} from 'react-aria/useOverlayTrigger'; export type SpectrumDialogClose = (close: () => void) => ReactElement; export interface SpectrumDialogTriggerProps extends OverlayTriggerProps, PositionProps { - /** The Dialog and its trigger element. See the DialogTrigger [Content section](#content) for more information on what to provide as children. */ + /** + * The Dialog and its trigger element. See the DialogTrigger [Content section](#content) for more + * information on what to provide as children. + */ children: [ReactElement, SpectrumDialogClose | ReactElement]; /** - * The type of Dialog that should be rendered. See the DialogTrigger [types section](#dialog-types) for an explanation on each. + * The type of Dialog that should be rendered. See the DialogTrigger [types + * section](#dialog-types) for an explanation on each. + * * @default 'modal' */ type?: 'modal' | 'popover' | 'tray' | 'fullscreen' | 'fullscreenTakeover'; - /** The type of Dialog that should be rendered when on a mobile device. See DialogTrigger [types section](#dialog-types) for an explanation on each. */ + /** + * The type of Dialog that should be rendered when on a mobile device. See DialogTrigger [types + * section](#dialog-types) for an explanation on each. + */ mobileType?: 'modal' | 'tray' | 'fullscreen' | 'fullscreenTakeover'; /** * Whether a popover type Dialog's arrow should be hidden. */ hideArrow?: boolean; - /** The ref of the element the Dialog should visually attach itself to. Defaults to the trigger button if not defined. */ + /** + * The ref of the element the Dialog should visually attach itself to. Defaults to the trigger + * button if not defined. + */ targetRef?: RefObject; /** Whether a modal type Dialog should be dismissable. */ isDismissable?: boolean; @@ -171,9 +182,9 @@ DialogTrigger.getCollectionNode = function* (props: SpectrumDialogTriggerProps) }; /** - * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's - * open state with the trigger's press state. Additionally, it allows you to customize the type and - * positioning of the Dialog. + * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the + * Dialog's open state with the trigger's press state. Additionally, it allows you to customize the + * type and positioning of the Dialog. */ // We don't want getCollectionNode to show up in the type definition diff --git a/packages/@adobe/react-spectrum/src/divider/Divider.tsx b/packages/@adobe/react-spectrum/src/divider/Divider.tsx index 5d7fc82f936..883cacbbf32 100644 --- a/packages/@adobe/react-spectrum/src/divider/Divider.tsx +++ b/packages/@adobe/react-spectrum/src/divider/Divider.tsx @@ -22,18 +22,21 @@ import {useStyleProps} from '../utils/styleProps'; export interface SpectrumDividerProps extends DOMProps, AriaLabelingProps, StyleProps { /** * How thick the Divider should be. + * * @default 'L' */ size?: 'S' | 'M' | 'L'; /** * The axis the Divider should align with. + * * @default 'horizontal' */ orientation?: Orientation; /** * A slot to place the divider in. + * * @default 'divider' */ slot?: string; diff --git a/packages/@adobe/react-spectrum/src/dnd/useDragAndDrop.ts b/packages/@adobe/react-spectrum/src/dnd/useDragAndDrop.ts index a8b53bd1502..284146dfd35 100644 --- a/packages/@adobe/react-spectrum/src/dnd/useDragAndDrop.ts +++ b/packages/@adobe/react-spectrum/src/dnd/useDragAndDrop.ts @@ -92,7 +92,7 @@ interface DropHooks { } export interface DragAndDropHooks { - /** Drag and drop hooks for the collection element. */ + /** Drag and drop hooks for the collection element. */ dragAndDropHooks: DragHooks & DropHooks & { isVirtualDragging?: () => boolean; @@ -105,16 +105,22 @@ export interface DragAndDropOptions Omit, Omit { /** - * A function that returns the items being dragged. If not specified, we assume that the collection is not draggable. + * A function that returns the items being dragged. If not specified, we assume that the + * collection is not draggable. + * * @default () => [] */ getItems?: (keys: Set, items: T[]) => DragItem[]; - /** Provide a custom drag preview. `draggedKey` represents the key of the item the user actually dragged. */ + /** + * Provide a custom drag preview. `draggedKey` represents the key of the item the user actually + * dragged. + */ renderPreview?: (keys: Set, draggedKey: Key) => JSX.Element; } /** - * Provides the hooks required to enable drag and drop behavior for a drag and drop compatible React Spectrum component. + * Provides the hooks required to enable drag and drop behavior for a drag and drop compatible React + * Spectrum component. */ export function useDragAndDrop(options: DragAndDropOptions): DragAndDropHooks { let dragAndDropHooks = useMemo(() => { diff --git a/packages/@adobe/react-spectrum/src/form/Form.tsx b/packages/@adobe/react-spectrum/src/form/Form.tsx index 55b64747f73..cb39033eb15 100644 --- a/packages/@adobe/react-spectrum/src/form/Form.tsx +++ b/packages/@adobe/react-spectrum/src/form/Form.tsx @@ -49,6 +49,7 @@ export interface SpectrumFormProps isReadOnly?: boolean; /** * Whether the Form elements should display their "valid" or "invalid" visual styling. + * * @default 'valid' */ validationState?: ValidationState; @@ -56,6 +57,7 @@ export interface SpectrumFormProps * Whether to use native HTML form validation to prevent form submission * when a field value is missing or invalid, or mark fields as required * or invalid via ARIA. + * * @default 'aria' */ validationBehavior?: 'aria' | 'native'; @@ -87,7 +89,8 @@ const formPropNames = new Set([ ]); /** - * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields. + * Forms allow users to enter data that can be submitted while providing alignment and styling for + * form fields. */ export const Form = React.forwardRef(function Form( props: SpectrumFormProps, diff --git a/packages/@adobe/react-spectrum/src/icon/Icon.tsx b/packages/@adobe/react-spectrum/src/icon/Icon.tsx index 0f4e75ff667..838bcefab99 100644 --- a/packages/@adobe/react-spectrum/src/icon/Icon.tsx +++ b/packages/@adobe/react-spectrum/src/icon/Icon.tsx @@ -35,6 +35,7 @@ export interface IconProps extends DOMProps, AriaLabelingProps, StyleProps { size?: 'XXS' | 'XS' | 'S' | 'M' | 'L' | 'XL' | 'XXL'; /** * A slot to place the icon in. + * * @default 'icon' */ slot?: string; @@ -60,7 +61,8 @@ const iconStyleProps: StyleHandlers = { }; /** - * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and rational principles of the design system in both metaphor and style. + * Spectrum icons are clear, minimal, and consistent across platforms. They follow the focused and + * rational principles of the design system in both metaphor and style. */ export function Icon(props: IconProps): JSX.Element { props = useSlotProps(props, 'icon'); diff --git a/packages/@adobe/react-spectrum/src/icon/Illustration.tsx b/packages/@adobe/react-spectrum/src/icon/Illustration.tsx index fdfe81fe5b3..71ca03ddb06 100644 --- a/packages/@adobe/react-spectrum/src/icon/Illustration.tsx +++ b/packages/@adobe/react-spectrum/src/icon/Illustration.tsx @@ -27,6 +27,7 @@ export interface IllustrationProps extends DOMProps, AriaLabelingProps, StylePro children: ReactElement; /** * A slot to place the illustration in. + * * @default 'illustration' */ slot?: string; diff --git a/packages/@adobe/react-spectrum/src/image/Image.tsx b/packages/@adobe/react-spectrum/src/image/Image.tsx index 0845f60e630..209e5f61134 100644 --- a/packages/@adobe/react-spectrum/src/image/Image.tsx +++ b/packages/@adobe/react-spectrum/src/image/Image.tsx @@ -35,11 +35,13 @@ export interface ImageProps { */ objectFit?: any; // move to styleProps for images and type better /** - * Called if an error occurs while loading or rendering an image, see [Image loading errors](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors). + * Called if an error occurs while loading or rendering an image, see [Image loading + * errors](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#image_loading_errors). */ onError?: ReactEventHandler; /** - * Called when the image has successfully loaded, see [load event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event). + * Called when the image has successfully loaded, see [load + * event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/load_event). */ onLoad?: ReactEventHandler; /** @@ -52,6 +54,7 @@ export interface ImageProps { export interface SpectrumImageProps extends ImageProps, DOMProps, StyleProps { /** * A slot to place the image in. + * * @default 'image' */ slot?: string; diff --git a/packages/@adobe/react-spectrum/src/inlinealert/InlineAlert.tsx b/packages/@adobe/react-spectrum/src/inlinealert/InlineAlert.tsx index 6b823bf38f5..937c2183b5e 100644 --- a/packages/@adobe/react-spectrum/src/inlinealert/InlineAlert.tsx +++ b/packages/@adobe/react-spectrum/src/inlinealert/InlineAlert.tsx @@ -31,6 +31,7 @@ import {useStyleProps} from '../utils/styleProps'; export interface SpectrumInlineAlertProps extends DOMProps, StyleProps { /** * The [visual style](https://spectrum.adobe.com/page/in-line-alert/#Options) of the Inline Alert. + * * @default 'neutral' */ variant?: 'neutral' | 'info' | 'positive' | 'notice' | 'negative'; @@ -52,8 +53,8 @@ let ICONS = { }; /** - * Inline alerts display a non-modal message associated with objects in a view. - * These are often used in form validation, providing a place to aggregate feedback related to multiple fields. + * Inline alerts display a non-modal message associated with objects in a view. These are often used + * in form validation, providing a place to aggregate feedback related to multiple fields. */ export const InlineAlert = React.forwardRef(function InlineAlert( props: SpectrumInlineAlertProps, diff --git a/packages/@adobe/react-spectrum/src/label/HelpText.tsx b/packages/@adobe/react-spectrum/src/label/HelpText.tsx index 6c077626f7f..4040bc3120f 100644 --- a/packages/@adobe/react-spectrum/src/label/HelpText.tsx +++ b/packages/@adobe/react-spectrum/src/label/HelpText.tsx @@ -39,7 +39,8 @@ interface HelpTextProps } /** - * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms. + * Help text provides either an informative description or an error message that gives more context + * about what a user needs to input. It's commonly used in forms. */ export const HelpText = React.forwardRef(function HelpText( props: HelpTextProps, diff --git a/packages/@adobe/react-spectrum/src/labeledvalue/LabeledValue.tsx b/packages/@adobe/react-spectrum/src/labeledvalue/LabeledValue.tsx index 42e8f964b4b..7a8c88da9f2 100644 --- a/packages/@adobe/react-spectrum/src/labeledvalue/LabeledValue.tsx +++ b/packages/@adobe/react-spectrum/src/labeledvalue/LabeledValue.tsx @@ -114,7 +114,8 @@ type SpectrumLabeledValueTypes = export type SpectrumLabeledValueProps = LabeledValueProps & LabeledValueBaseProps; /** - * A LabeledValue displays a non-editable value with a label. It formats numbers, dates, times, and lists according to the user's locale. + * A LabeledValue displays a non-editable value with a label. It formats numbers, dates, times, and + * lists according to the user's locale. */ export const LabeledValue = React.forwardRef(function LabeledValue< T extends SpectrumLabeledValueTypes diff --git a/packages/@adobe/react-spectrum/src/layout/Grid.tsx b/packages/@adobe/react-spectrum/src/layout/Grid.tsx index 944e776e74a..e2e1d74f209 100644 --- a/packages/@adobe/react-spectrum/src/layout/Grid.tsx +++ b/packages/@adobe/react-spectrum/src/layout/Grid.tsx @@ -67,6 +67,7 @@ export const Grid = forwardRef(function Grid(props: GridProps, ref: DOMRef, Style children: ReactNode; /** * The [visual style](https://spectrum.adobe.com/page/link/#Options) of the link. + * * @default 'primary' */ variant?: 'primary' | 'secondary' | 'overBackground'; diff --git a/packages/@adobe/react-spectrum/src/list/ListView.tsx b/packages/@adobe/react-spectrum/src/list/ListView.tsx index b78836d9a5c..65a7baa0b76 100644 --- a/packages/@adobe/react-spectrum/src/list/ListView.tsx +++ b/packages/@adobe/react-spectrum/src/list/ListView.tsx @@ -66,27 +66,33 @@ export interface SpectrumListViewProps Omit { /** * Sets the amount of vertical padding within each cell. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** Whether the ListView should be displayed with a quiet style. */ isQuiet?: boolean; - /** The current loading state of the ListView. Determines whether or not the progress circle should be shown. */ + /** + * The current loading state of the ListView. Determines whether or not the progress circle should + * be shown. + */ loadingState?: LoadingState; /** * Sets the text behavior for the row contents. + * * @default 'truncate' */ overflowMode?: 'truncate' | 'wrap'; /** Sets what the ListView should render when there is no content to display. */ renderEmptyState?: () => JSX.Element; /** - * Handler that is called when a user performs an action on an item. The exact user event depends on - * the collection's `selectionStyle` prop and the interaction modality. + * Handler that is called when a user performs an action on an item. The exact user event depends + * on the collection's `selectionStyle` prop and the interaction modality. */ onAction?: (key: Key) => void; /** - * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the ListView. + * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for + * the ListView. */ dragAndDropHooks?: DragAndDropHooks>['dragAndDropHooks']; } @@ -140,7 +146,8 @@ function useListLayout( } /** - * A ListView displays a list of interactive items, and allows a user to navigate, select, or perform an action. + * A ListView displays a list of interactive items, and allows a user to navigate, select, or + * perform an action. */ export const ListView = React.forwardRef(function ListView( props: SpectrumListViewProps, diff --git a/packages/@adobe/react-spectrum/src/menu/ActionMenu.tsx b/packages/@adobe/react-spectrum/src/menu/ActionMenu.tsx index cd74715043f..8242788aa61 100644 --- a/packages/@adobe/react-spectrum/src/menu/ActionMenu.tsx +++ b/packages/@adobe/react-spectrum/src/menu/ActionMenu.tsx @@ -38,7 +38,10 @@ export interface SpectrumActionMenuProps AriaLabelingProps { /** Whether the button is disabled. */ isDisabled?: boolean; - /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ + /** + * Whether the button should be displayed with a [quiet + * style](https://spectrum.adobe.com/page/action-button/#Quiet). + */ isQuiet?: boolean; /** Whether the element should receive focus on render. */ autoFocus?: boolean; diff --git a/packages/@adobe/react-spectrum/src/menu/MenuTrigger.tsx b/packages/@adobe/react-spectrum/src/menu/MenuTrigger.tsx index c6a3545ffdc..28e9b389f27 100644 --- a/packages/@adobe/react-spectrum/src/menu/MenuTrigger.tsx +++ b/packages/@adobe/react-spectrum/src/menu/MenuTrigger.tsx @@ -33,21 +33,25 @@ export interface SpectrumMenuTriggerProps extends MenuTriggerProps { children: ReactElement[]; /** * Alignment of the menu relative to the trigger. + * * @default 'start' */ align?: Alignment; /** * Where the Menu opens relative to its trigger. + * * @default 'bottom' */ direction?: 'bottom' | 'top' | 'left' | 'right' | 'start' | 'end'; /** * Whether the menu should automatically flip direction when space is limited. + * * @default true */ shouldFlip?: boolean; /** * Whether the Menu closes when a selection is made. + * * @default true */ closeOnSelect?: boolean; diff --git a/packages/@adobe/react-spectrum/src/meter/Meter.tsx b/packages/@adobe/react-spectrum/src/meter/Meter.tsx index 226253e5903..3244a15011d 100644 --- a/packages/@adobe/react-spectrum/src/meter/Meter.tsx +++ b/packages/@adobe/react-spectrum/src/meter/Meter.tsx @@ -20,6 +20,7 @@ import {useMeter} from 'react-aria/useMeter'; export interface SpectrumMeterProps extends SpectrumProgressBarBaseProps { /** * The [visual style](https://spectrum.adobe.com/page/meter/#Options) of the Meter. + * * @default 'informative' */ variant?: 'informative' | 'positive' | 'warning' | 'critical'; diff --git a/packages/@adobe/react-spectrum/src/numberfield/NumberField.tsx b/packages/@adobe/react-spectrum/src/numberfield/NumberField.tsx index 784a6d76d16..e8bdf7bb3a1 100644 --- a/packages/@adobe/react-spectrum/src/numberfield/NumberField.tsx +++ b/packages/@adobe/react-spectrum/src/numberfield/NumberField.tsx @@ -48,13 +48,15 @@ export interface SpectrumNumberFieldProps isQuiet?: boolean; /** * Whether to hide the increment and decrement buttons. + * * @default false */ hideStepper?: boolean; } /** - * NumberFields allow users to enter a number, and increment or decrement the value using stepper buttons. + * NumberFields allow users to enter a number, and increment or decrement the value using stepper + * buttons. */ export const NumberField = React.forwardRef(function NumberField( props: SpectrumNumberFieldProps, diff --git a/packages/@adobe/react-spectrum/src/overlays/Popover.tsx b/packages/@adobe/react-spectrum/src/overlays/Popover.tsx index 18e63ea9eed..ff8f1aaaae6 100644 --- a/packages/@adobe/react-spectrum/src/overlays/Popover.tsx +++ b/packages/@adobe/react-spectrum/src/overlays/Popover.tsx @@ -61,11 +61,11 @@ interface ArrowProps { } /** - * Arrow placement can be done pointing right or down because those paths start at 0, x or y. Because the - * other two don't, they start at a fractional pixel value, it introduces rounding differences between browsers and - * between display types (retina with subpixels vs not retina). By flipping them with CSS we can ensure that - * the path always starts at 0 so that it perfectly overlaps the popover's border. - * See bottom of file for more explanation. + * Arrow placement can be done pointing right or down because those paths start at 0, x or y. + * Because the other two don't, they start at a fractional pixel value, it introduces rounding + * differences between browsers and between display types (retina with subpixels vs not retina). By + * flipping them with CSS we can ensure that the path always starts at 0 so that it perfectly + * overlaps the popover's border. See bottom of file for more explanation. */ let arrowPlacement = { left: 'right', @@ -262,15 +262,14 @@ function Arrow(props: ArrowProps) { } /** - * More explanation on popover tips. - * - I tried changing the calculation of the popover placement in an effort to get it squarely onto the pixel grid. - * This did not work because the problem was in the svg partial pixel end of the path in the popover right and popover bottom. - * - I tried creating an extra 'bandaid' path that matched the background color and would overlap the popover border. - * This didn't work because the border on the svg triangle didn't extend all the way to match nicely with the popover border. - * - I tried getting the client bounding box and setting the svg to that partial pixel value - * This didn't work because again the issue was inside the svg - * - I didn't try drawing the svg backwards - * This could still be tried - * - I tried changing the calculation of the popover placement AND the svg height/width so that they were all rounded - * This seems to have done the trick. + * More explanation on popover tips. - I tried changing the calculation of the popover placement in + * an effort to get it squarely onto the pixel grid. This did not work because the problem was in + * the svg partial pixel end of the path in the popover right and popover bottom. - I tried creating + * an extra 'bandaid' path that matched the background color and would overlap the popover border. + * This didn't work because the border on the svg triangle didn't extend all the way to match nicely + * with the popover border. - I tried getting the client bounding box and setting the svg to that + * partial pixel value This didn't work because again the issue was inside the svg - I didn't try + * drawing the svg backwards This could still be tried - I tried changing the calculation of the + * popover placement AND the svg height/width so that they were all rounded This seems to have done + * the trick. */ diff --git a/packages/@adobe/react-spectrum/src/picker/Picker.tsx b/packages/@adobe/react-spectrum/src/picker/Picker.tsx index a98aa9b3cce..b5db50eb030 100644 --- a/packages/@adobe/react-spectrum/src/picker/Picker.tsx +++ b/packages/@adobe/react-spectrum/src/picker/Picker.tsx @@ -71,28 +71,36 @@ export interface SpectrumPickerProps StyleProps { /** Whether the textfield should be displayed with a quiet style. */ isQuiet?: boolean; - /** Alignment of the menu relative to the input target. + /** + * Alignment of the menu relative to the input target. + * * @default 'start' */ align?: Alignment; /** * Direction the menu will render relative to the Picker. + * * @default 'bottom' */ direction?: 'bottom' | 'top'; /** * Whether the menu should automatically flip direction when space is limited. + * * @default true */ shouldFlip?: boolean; - /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */ + /** + * Width of the menu. By default, matches width of the trigger. Note that the minimum width of the + * dropdown is always equal to the trigger's width. + */ menuWidth?: DimensionValue; /** Whether the element should receive focus on render. */ autoFocus?: boolean; } /** - * Pickers allow users to choose a single option from a collapsible list of options when space is limited. + * Pickers allow users to choose a single option from a collapsible list of options when space is + * limited. */ // forwardRef doesn't support generic parameters, so cast the result to the correct type // https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref diff --git a/packages/@adobe/react-spectrum/src/progress/ProgressBar.tsx b/packages/@adobe/react-spectrum/src/progress/ProgressBar.tsx index 81c917a884e..5b0f4953444 100644 --- a/packages/@adobe/react-spectrum/src/progress/ProgressBar.tsx +++ b/packages/@adobe/react-spectrum/src/progress/ProgressBar.tsx @@ -18,8 +18,8 @@ import styles from '@adobe/spectrum-css-temp/components/barloader/vars.css'; import {useProgressBar} from 'react-aria/useProgressBar'; /** - * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way. - * They can represent either determinate or indeterminate progress. + * ProgressBars show the progression of a system operation: downloading, uploading, processing, + * etc., in a visual way. They can represent either determinate or indeterminate progress. */ export const ProgressBar = React.forwardRef(function ProgressBar( props: SpectrumProgressBarProps, diff --git a/packages/@adobe/react-spectrum/src/progress/ProgressBarBase.tsx b/packages/@adobe/react-spectrum/src/progress/ProgressBarBase.tsx index 94efc05deff..6a5bd6f8a69 100644 --- a/packages/@adobe/react-spectrum/src/progress/ProgressBarBase.tsx +++ b/packages/@adobe/react-spectrum/src/progress/ProgressBarBase.tsx @@ -23,15 +23,20 @@ import {useStyleProps} from '../utils/styleProps'; export interface SpectrumProgressBarBaseProps extends AriaProgressBarBaseProps, StyleProps { /** * How thick the bar should be. + * * @default 'L' */ size?: 'S' | 'L'; /** * The label's overall position relative to the element it is labeling. + * * @default 'top' */ labelPosition?: LabelPosition; - /** Whether the value's label is displayed. True by default if there's a label, false by default if not. */ + /** + * Whether the value's label is displayed. True by default if there's a label, false by default if + * not. + */ showValueLabel?: boolean; } @@ -39,7 +44,9 @@ export interface SpectrumProgressBarProps extends SpectrumProgressBarBaseProps, /** The static color style to apply. Useful when the button appears over a color background. */ staticColor?: 'white' | 'black'; /** - * The [visual style](https://spectrum.adobe.com/page/progress-bar/#Over-background-variant) of the ProgressBar. + * The [visual style](https://spectrum.adobe.com/page/progress-bar/#Over-background-variant) of + * the ProgressBar. + * * @deprecated - use staticColor instead. */ variant?: 'overBackground'; diff --git a/packages/@adobe/react-spectrum/src/progress/ProgressCircle.tsx b/packages/@adobe/react-spectrum/src/progress/ProgressCircle.tsx index 0c081adce90..9b0c82c1146 100644 --- a/packages/@adobe/react-spectrum/src/progress/ProgressCircle.tsx +++ b/packages/@adobe/react-spectrum/src/progress/ProgressCircle.tsx @@ -22,16 +22,19 @@ import {useStyleProps} from '../utils/styleProps'; export interface ProgressCircleProps { /** * The current value (controlled). + * * @default 0 */ value?: number; /** * The smallest value allowed for the input. + * * @default 0 */ minValue?: number; /** * The largest value allowed for the input. + * * @default 100 */ maxValue?: number; @@ -45,13 +48,15 @@ export interface AriaProgressCircleProps extends ProgressCircleProps, DOMProps, export interface SpectrumProgressCircleProps extends AriaProgressCircleProps, StyleProps { /** * What the ProgressCircle's diameter should be. + * * @default 'M' */ size?: 'S' | 'M' | 'L'; /** The static color style to apply. Useful when the button appears over a color background. */ staticColor?: 'white' | 'black'; /** - * The [visual style](https://spectrum.adobe.com/page/progress-circle/#Over-background-variant) of the ProgressCircle. + * The [visual style](https://spectrum.adobe.com/page/progress-circle/#Over-background-variant) of + * the ProgressCircle. * * @deprecated - use staticColor instead. */ @@ -59,8 +64,8 @@ export interface SpectrumProgressCircleProps extends AriaProgressCircleProps, St } /** - * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way. - * They can represent determinate or indeterminate progress. + * ProgressCircles show the progression of a system operation such as downloading, uploading, or + * processing, in a visual way. They can represent determinate or indeterminate progress. */ export const ProgressCircle = React.forwardRef(function ProgressCircle( props: SpectrumProgressCircleProps, diff --git a/packages/@adobe/react-spectrum/src/provider/Provider.tsx b/packages/@adobe/react-spectrum/src/provider/Provider.tsx index 7b12903afca..fe7e6ac0535 100644 --- a/packages/@adobe/react-spectrum/src/provider/Provider.tsx +++ b/packages/@adobe/react-spectrum/src/provider/Provider.tsx @@ -204,8 +204,8 @@ const ProviderWrapper = React.forwardRef(function ProviderWrapper( }); /** - * Returns the various settings and styles applied by the nearest parent Provider. - * Properties explicitly set by the nearest parent Provider override those provided by preceeding Providers. + * Returns the various settings and styles applied by the nearest parent Provider. Properties + * explicitly set by the nearest parent Provider override those provided by preceeding Providers. */ export function useProvider(): ProviderContext { let context = useContext(Context); diff --git a/packages/@adobe/react-spectrum/src/provider/types.ts b/packages/@adobe/react-spectrum/src/provider/types.ts index af3f41f9027..33be39e2533 100644 --- a/packages/@adobe/react-spectrum/src/provider/types.ts +++ b/packages/@adobe/react-spectrum/src/provider/types.ts @@ -75,6 +75,7 @@ export interface ProviderProps extends ContextProps, DOMProps, StyleProps { colorScheme?: ColorScheme; /** * The default color scheme if no operating system setting is available. + * * @default 'light' */ defaultColorScheme?: ColorScheme; @@ -83,19 +84,22 @@ export interface ProviderProps extends ContextProps, DOMProps, StyleProps { */ scale?: Scale; /** - * The locale for your application as a [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. - * Defaults to the browser/OS language setting. + * The locale for your application as a [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.txt) language + * code. Defaults to the browser/OS language setting. + * * @default 'en-US' */ locale?: string; /** * The breakpoints for styleProps. * Do not use `base` property. - * @default {S:380,M:768,L:1024} + * + * @default { S: 380, M: 768, L: 1024 } */ breakpoints?: Breakpoints; /** - * Provides a client side router to all nested React Spectrum links to enable client side navigation. + * Provides a client side router to all nested React Spectrum links to enable client side + * navigation. */ router?: Router; } diff --git a/packages/@adobe/react-spectrum/src/slider/RangeSlider.tsx b/packages/@adobe/react-spectrum/src/slider/RangeSlider.tsx index 63309b80bd5..c250e70feb0 100644 --- a/packages/@adobe/react-spectrum/src/slider/RangeSlider.tsx +++ b/packages/@adobe/react-spectrum/src/slider/RangeSlider.tsx @@ -29,11 +29,13 @@ import {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatte export interface SpectrumRangeSliderProps extends SpectrumBarSliderBase> { /** - * The name of the start input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). + * The name of the start input element, used when submitting an HTML form. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). */ startName?: string; /** - * The name of the end input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). + * The name of the end input element, used when submitting an HTML form. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). */ endName?: string; /** @@ -45,7 +47,8 @@ export interface SpectrumRangeSliderProps extends SpectrumBarSliderBase, InputDOMProps { /** * Whether a fill color is shown between the start of the slider and the current value. + * * @see https://spectrum.adobe.com/page/slider/#Fill. */ isFilled?: boolean; /** * The offset from which to start the fill. + * * @see https://spectrum.adobe.com/page/slider/#Fill-start. */ fillOffset?: number; /** - * The background of the track, specified as the stops for a CSS background: `linear-gradient(to right/left, ...trackGradient)`. - * @example trackGradient={['red', 'green']} - * @example trackGradient={['red 20%', 'green 40%']} + * The background of the track, specified as the stops for a CSS background: `linear-gradient(to + * right/left, ...trackGradient)`. + * + * @example + * trackGradient={['red', 'green']} + * + * @example + * trackGradient={['red 20%', 'green 40%']} + * * @see https://spectrum.adobe.com/page/slider/#Gradient. */ trackGradient?: string[]; } /** - * Sliders allow users to quickly select a value within a range. They should be used when the upper and lower bounds to the range are invariable. + * Sliders allow users to quickly select a value within a range. They should be used when the upper + * and lower bounds to the range are invariable. */ export const Slider = React.forwardRef(function Slider( props: SpectrumSliderProps, diff --git a/packages/@adobe/react-spectrum/src/slider/SliderBase.tsx b/packages/@adobe/react-spectrum/src/slider/SliderBase.tsx index 4c232b87cef..5b855af4425 100644 --- a/packages/@adobe/react-spectrum/src/slider/SliderBase.tsx +++ b/packages/@adobe/react-spectrum/src/slider/SliderBase.tsx @@ -30,12 +30,19 @@ export interface SpectrumBarSliderBase extends AriaSliderProps, ValueBase< formatOptions?: Intl.NumberFormatOptions; /** * The label's overall position relative to the element it is labeling. + * * @default 'top' */ labelPosition?: LabelPosition; - /** Whether the value's label is displayed. True by default if there's a `label`, false by default if not. */ + /** + * Whether the value's label is displayed. True by default if there's a `label`, false by default + * if not. + */ showValueLabel?: boolean; - /** A function that returns the content to display as the value's label. Overrides default formatted number. */ + /** + * A function that returns the content to display as the value's label. Overrides default + * formatted number. + */ getValueLabel?: (value: T) => string; /** * A ContextualHelp element to place next to the label. diff --git a/packages/@adobe/react-spectrum/src/steplist/StepList.tsx b/packages/@adobe/react-spectrum/src/steplist/StepList.tsx index d04e4036e2e..a5c9d793cda 100644 --- a/packages/@adobe/react-spectrum/src/steplist/StepList.tsx +++ b/packages/@adobe/react-spectrum/src/steplist/StepList.tsx @@ -26,16 +26,19 @@ import {useStyleProps} from '../utils/styleProps'; export interface SpectrumStepListProps extends AriaStepListProps, StyleProps { /** * Whether the step list should be displayed with a emphasized style. + * * @default false */ isEmphasized?: boolean; /** * The orientation of the step list. + * * @default 'horizontal' */ orientation?: Orientation; /** * The size of the step list. + * * @default 'M' */ size?: 'S' | 'M' | 'L' | 'XL'; diff --git a/packages/@adobe/react-spectrum/src/table/TableView.tsx b/packages/@adobe/react-spectrum/src/table/TableView.tsx index c99369852b4..13bfe9b5c94 100644 --- a/packages/@adobe/react-spectrum/src/table/TableView.tsx +++ b/packages/@adobe/react-spectrum/src/table/TableView.tsx @@ -45,11 +45,13 @@ export interface SpectrumTableProps StyleProps { /** * Sets the amount of vertical padding within each cell. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** * Sets the overflow behavior for the cell contents. + * * @default 'truncate' */ overflowMode?: 'wrap' | 'truncate'; @@ -59,7 +61,8 @@ export interface SpectrumTableProps renderEmptyState?: () => JSX.Element; /** * Whether `disabledKeys` applies to all interactions, or only selection. - * @default "selection" + * + * @default 'selection' */ disabledBehavior?: DisabledBehavior; /** Handler that is called when a user performs an action on a row. */ @@ -80,41 +83,52 @@ export interface SpectrumTableProps */ onResizeEnd?: (widths: Map) => void; /** - * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for the TableView. + * The drag and drop hooks returned by `useDragAndDrop` used to enable drag and drop behavior for + * the TableView. + * * @version beta */ dragAndDropHooks?: DragAndDropHooks>['dragAndDropHooks']; /** - * Whether the TableView should support expandable rows. Requires the feature flag to be enabled first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. - * @version alpha + * Whether the TableView should support expandable rows. Requires the feature flag to be enabled + * first, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. + * * @private + * @version alpha */ UNSTABLE_allowsExpandableRows?: boolean; /** * The currently expanded keys in the collection (controlled). Requires the feature flag to be - * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. - * @version alpha + * enabled along with UNSTABLE_allowsExpandableRows, see + * https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. + * * @private + * @version alpha */ UNSTABLE_expandedKeys?: 'all' | Iterable; /** * The initial expanded keys in the collection (uncontrolled). Requires the feature flag to be - * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. - * @version alpha + * enabled along with UNSTABLE_allowsExpandableRows, see + * https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. + * * @private + * @version alpha */ UNSTABLE_defaultExpandedKeys?: 'all' | Iterable; /** * Handler that is called when items are expanded or collapsed. Requires the feature flag to be - * enabled along with UNSTABLE_allowsExpandableRows, see https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. - * @version alpha + * enabled along with UNSTABLE_allowsExpandableRows, see + * https://react-spectrum.adobe.com/react-spectrum/TableView.html#expandable-rows. + * * @private + * @version alpha */ UNSTABLE_onExpandedChange?: (keys: Set) => any; } /** - * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data. + * Tables are containers for displaying information. They allow users to quickly scan, sort, + * compare, and take action on large amounts of data. */ const TableView = React.forwardRef(function TableView( props: SpectrumTableProps, diff --git a/packages/@adobe/react-spectrum/src/table/types.ts b/packages/@adobe/react-spectrum/src/table/types.ts index afb3337cadb..d0531a16b34 100644 --- a/packages/@adobe/react-spectrum/src/table/types.ts +++ b/packages/@adobe/react-spectrum/src/table/types.ts @@ -15,6 +15,7 @@ import {ColumnProps} from 'react-stately/useTableState'; export interface SpectrumColumnProps extends ColumnProps { /** * The alignment of the column's contents relative to its allotted width. + * * @default 'start' */ align?: 'start' | 'center' | 'end'; @@ -23,9 +24,9 @@ export interface SpectrumColumnProps extends ColumnProps { /** Whether the column should render a divider between it and the next column. */ showDivider?: boolean; /** - * Whether the column should hide its header text. A tooltip with the column's header text - * will be displayed when the column header is focused instead. Note that this prop is specifically for columns - * that contain ActionButtons in place of text content. + * Whether the column should hide its header text. A tooltip with the column's header text will be + * displayed when the column header is focused instead. Note that this prop is specifically for + * columns that contain ActionButtons in place of text content. */ hideHeader?: boolean; } diff --git a/packages/@adobe/react-spectrum/src/tabs/Tabs.tsx b/packages/@adobe/react-spectrum/src/tabs/Tabs.tsx index 02dd87b50dc..b35770fd439 100644 --- a/packages/@adobe/react-spectrum/src/tabs/Tabs.tsx +++ b/packages/@adobe/react-spectrum/src/tabs/Tabs.tsx @@ -73,7 +73,10 @@ export interface SpectrumTabsProps children: ReactNode; /** The item objects for each tab, for dynamic collections. */ items?: Iterable; - /** The keys of the tabs that are disabled. These tabs cannot be selected, focused, or otherwise interacted with. */ + /** + * The keys of the tabs that are disabled. These tabs cannot be selected, focused, or otherwise + * interacted with. + */ disabledKeys?: Iterable; /** Whether the Tabs are disabled. */ isDisabled?: boolean; @@ -91,11 +94,13 @@ export interface SpectrumTabsProps onSelectionChange?: (key: Key) => void; /** * Whether tabs are activated automatically on focus or manually. + * * @default 'automatic' */ keyboardActivation?: 'automatic' | 'manual'; /** * The orientation of the tabs. + * * @default 'horizontal' */ orientation?: Orientation; @@ -120,7 +125,8 @@ interface TabsContext { const TabContext = React.createContext | null>(null); /** - * Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit. + * Tabs organize content into multiple sections and allow users to navigate between them. The + * content under the set of tabs should be related and form a coherent unit. */ // forwardRef doesn't support generic parameters, so cast the result to the correct type // https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref @@ -348,13 +354,16 @@ function TabLine(props: TabLineProps) { } export interface SpectrumTabListProps extends DOMProps, StyleProps { - /** The tab items to display. Item keys should match the key of the corresponding `` within the `` element. */ + /** + * The tab items to display. Item keys should match the key of the corresponding `` within + * the `` element. + */ children: CollectionChildren; } /** - * A TabList is used within Tabs to group tabs that a user can switch between. - * The keys of the items within the must match up with a corresponding item inside the . + * A TabList is used within Tabs to group tabs that a user can switch between. The keys of the items + * within the must match up with a corresponding item inside the . */ export function TabList(props: SpectrumTabListProps): ReactElement { const tabContext = useContext(TabContext)!; @@ -438,13 +447,16 @@ export function TabList(props: SpectrumTabListProps): ReactElement { } export interface SpectrumTabPanelsProps extends DOMProps, StyleProps { - /** The contents of each tab. Item keys should match the key of the corresponding `` within the `` element. */ + /** + * The contents of each tab. Item keys should match the key of the corresponding `` within + * the `` element. + */ children: CollectionChildren; } /** - * TabPanels is used within Tabs as a container for the content of each tab. - * The keys of the items within the must match up with a corresponding item inside the . + * TabPanels is used within Tabs as a container for the content of each tab. The keys of the items + * within the must match up with a corresponding item inside the . */ export function TabPanels(props: SpectrumTabPanelsProps): ReactElement { const {tabState, tabProps} = useContext(TabContext)!; diff --git a/packages/@adobe/react-spectrum/src/tag/TagGroup.tsx b/packages/@adobe/react-spectrum/src/tag/TagGroup.tsx index 89d2b31b975..fcf93dad5c3 100644 --- a/packages/@adobe/react-spectrum/src/tag/TagGroup.tsx +++ b/packages/@adobe/react-spectrum/src/tag/TagGroup.tsx @@ -69,17 +69,23 @@ export interface SpectrumTagGroupProps StyleProps, Omit, Pick, 'isInvalid' | 'validationState'> { - /** The label to display on the action button. */ + /** The label to display on the action button. */ actionLabel?: string; /** Handler that is called when the action button is pressed. */ onAction?: () => void; /** Sets what the TagGroup should render when there are no tags to display. */ renderEmptyState?: () => JSX.Element; - /** Limit the number of rows initially shown. This will render a button that allows the user to expand to show all tags. */ + /** + * Limit the number of rows initially shown. This will render a button that allows the user to + * expand to show all tags. + */ maxRows?: number; } -/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */ +/** + * Tags allow users to categorize content. They can represent keywords or people, and are grouped to + * describe an item or a search request. + */ export const TagGroup = React.forwardRef(function TagGroup( props: SpectrumTagGroupProps, ref: DOMRef diff --git a/packages/@adobe/react-spectrum/src/text/Heading.tsx b/packages/@adobe/react-spectrum/src/text/Heading.tsx index 4198214b4ba..0919a88027d 100644 --- a/packages/@adobe/react-spectrum/src/text/Heading.tsx +++ b/packages/@adobe/react-spectrum/src/text/Heading.tsx @@ -26,11 +26,13 @@ export interface HeadingProps extends DOMProps, StyleProps { children: ReactNode; /** * A slot to place the heading in. + * * @default 'heading' */ slot?: string; /** * Sets heading level, h1 through h6. + * * @default 3 */ level?: 1 | 2 | 3 | 4 | 5 | 6; diff --git a/packages/@adobe/react-spectrum/src/text/Keyboard.tsx b/packages/@adobe/react-spectrum/src/text/Keyboard.tsx index f8318670928..379e966909f 100644 --- a/packages/@adobe/react-spectrum/src/text/Keyboard.tsx +++ b/packages/@adobe/react-spectrum/src/text/Keyboard.tsx @@ -24,6 +24,7 @@ export interface KeyboardProps extends DOMProps, StyleProps { children: ReactNode; /** * A slot to place the keyboard shortcut in. + * * @default 'keyboard' */ slot?: string; diff --git a/packages/@adobe/react-spectrum/src/text/Text.tsx b/packages/@adobe/react-spectrum/src/text/Text.tsx index a3041e1a057..97c7530a06f 100644 --- a/packages/@adobe/react-spectrum/src/text/Text.tsx +++ b/packages/@adobe/react-spectrum/src/text/Text.tsx @@ -24,6 +24,7 @@ export interface TextProps extends DOMProps, StyleProps { children: ReactNode; /** * A slot to place the text in. + * * @default 'text' */ slot?: string; diff --git a/packages/@adobe/react-spectrum/src/tooltip/Tooltip.tsx b/packages/@adobe/react-spectrum/src/tooltip/Tooltip.tsx index b1d53312deb..23d2089f980 100644 --- a/packages/@adobe/react-spectrum/src/tooltip/Tooltip.tsx +++ b/packages/@adobe/react-spectrum/src/tooltip/Tooltip.tsx @@ -31,6 +31,7 @@ export interface SpectrumTooltipProps extends AriaTooltipProps, StyleProps { /** * The placement of the element with respect to its anchor element. + * * @default 'top' */ placement?: 'start' | 'end' | 'right' | 'left' | 'top' | 'bottom'; diff --git a/packages/@adobe/react-spectrum/src/tooltip/TooltipTrigger.tsx b/packages/@adobe/react-spectrum/src/tooltip/TooltipTrigger.tsx index ad1510e8430..8aea3cf9707 100644 --- a/packages/@adobe/react-spectrum/src/tooltip/TooltipTrigger.tsx +++ b/packages/@adobe/react-spectrum/src/tooltip/TooltipTrigger.tsx @@ -26,11 +26,13 @@ export interface SpectrumTooltipTriggerProps /** * The additional offset applied along the main axis between the element and its * anchor element. + * * @default 7 */ offset?: number; /** * The placement of the tooltip with respect to the trigger. + * * @default 'top' */ placement?: Placement; diff --git a/packages/@adobe/react-spectrum/src/tree/TreeView.tsx b/packages/@adobe/react-spectrum/src/tree/TreeView.tsx index 8b80b0ef33f..c473de14711 100644 --- a/packages/@adobe/react-spectrum/src/tree/TreeView.tsx +++ b/packages/@adobe/react-spectrum/src/tree/TreeView.tsx @@ -62,8 +62,8 @@ export interface SpectrumTreeViewProps /** Provides content to display when there are no items in the tree. */ renderEmptyState?: () => JSX.Element; /** - * Handler that is called when a user performs an action on an item. The exact user event depends on - * the collection's `selectionStyle` prop and the interaction modality. + * Handler that is called when a user performs an action on an item. The exact user event depends + * on the collection's `selectionStyle` prop and the interaction modality. */ onAction?: (key: Key) => void; /** diff --git a/packages/@adobe/react-spectrum/src/view/View.tsx b/packages/@adobe/react-spectrum/src/view/View.tsx index 0fe6483be67..7ad0a3de409 100644 --- a/packages/@adobe/react-spectrum/src/view/View.tsx +++ b/packages/@adobe/react-spectrum/src/view/View.tsx @@ -30,8 +30,9 @@ export interface ViewProps extends ViewStyleProps, DO } /** - * View is a general purpose container with no specific semantics that can be used for custom styling purposes. - * It supports Spectrum style props to ensure consistency with other Spectrum components. + * View is a general purpose container with no specific semantics that can be used for custom + * styling purposes. It supports Spectrum style props to ensure consistency with other Spectrum + * components. */ export const View = forwardRef(function View( props: ViewProps, diff --git a/packages/@adobe/react-spectrum/src/well/Well.tsx b/packages/@adobe/react-spectrum/src/well/Well.tsx index 7de38062070..fc69bf5a024 100644 --- a/packages/@adobe/react-spectrum/src/well/Well.tsx +++ b/packages/@adobe/react-spectrum/src/well/Well.tsx @@ -32,8 +32,9 @@ export interface SpectrumWellProps extends DOMProps, AriaLabelingProps, StylePro } /** - * A Well is a content container that displays non-editable content separate from other content on the screen. - * Often this is used to display preformatted text, such as code/markup examples on a documentation page. + * A Well is a content container that displays non-editable content separate from other content on + * the screen. Often this is used to display preformatted text, such as code/markup examples on a + * documentation page. */ export const Well = forwardRef(function Well( props: SpectrumWellProps, diff --git a/packages/@adobe/react-spectrum/stories/actiongroup/Toolbar.stories.tsx b/packages/@adobe/react-spectrum/stories/actiongroup/Toolbar.stories.tsx index 22597082dab..08a7685c1ac 100644 --- a/packages/@adobe/react-spectrum/stories/actiongroup/Toolbar.stories.tsx +++ b/packages/@adobe/react-spectrum/stories/actiongroup/Toolbar.stories.tsx @@ -38,6 +38,7 @@ export interface SpectrumToolbarProps extends AriaLabelingProps { children: ReactNode | ReactElement[]; /** * The orientation of the entire toolbar. + * * @default 'horizontal' */ orientation?: Orientation; diff --git a/packages/@adobe/react-spectrum/test/tabs/Tabs.test.js b/packages/@adobe/react-spectrum/test/tabs/Tabs.test.js index a7ef88fc9ef..5f09f928321 100644 --- a/packages/@adobe/react-spectrum/test/tabs/Tabs.test.js +++ b/packages/@adobe/react-spectrum/test/tabs/Tabs.test.js @@ -144,7 +144,7 @@ describe('Tabs', function () { expect(selectedItem).toHaveAttribute('aria-selected', 'true'); expect(arrowLeft.defaultPrevented).toBe(true); - /** prevent changing tabs for horizontal orientations in aria-selected */ + /** Prevent changing tabs for horizontal orientations in aria-selected. */ let arrowUp = createEvent.keyDown(selectedItem, {key: 'ArrowUp', code: 38, charCode: 38}); fireEvent(selectedItem, arrowUp); expect(selectedItem).toHaveAttribute('aria-selected', 'true'); diff --git a/packages/@internationalized/date/src/CalendarDate.ts b/packages/@internationalized/date/src/CalendarDate.ts index 8c0b3322a00..35ab3943c7e 100644 --- a/packages/@internationalized/date/src/CalendarDate.ts +++ b/packages/@internationalized/date/src/CalendarDate.ts @@ -122,7 +122,10 @@ export class CalendarDate { return subtract(this, duration); } - /** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */ + /** + * Returns a new `CalendarDate` with the given fields set to the provided values. Other fields + * will be constrained accordingly. + */ set(fields: DateFields): CalendarDate { return set(this, fields); } @@ -135,7 +138,10 @@ export class CalendarDate { return cycleDate(this, field, amount, options); } - /** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */ + /** + * Converts the date to a native JavaScript Date object, with the time set to midnight in the + * given time zone. + */ toDate(timeZone: string): Date { return toDate(this, timeZone); } @@ -145,7 +151,10 @@ export class CalendarDate { return dateToString(this); } - /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ + /** + * Compares this date with another. A negative result indicates that this date is before the given + * one, and a positive date indicates that it is after. + */ compare(b: AnyCalendarDate): number { return compareDate(this, b); } @@ -188,7 +197,10 @@ export class Time { return subtractTime(this, duration); } - /** Returns a new `Time` with the given fields set to the provided values. Other fields will be constrained accordingly. */ + /** + * Returns a new `Time` with the given fields set to the provided values. Other fields will be + * constrained accordingly. + */ set(fields: TimeFields): Time { return setTime(this, fields); } @@ -206,7 +218,10 @@ export class Time { return timeToString(this); } - /** Compares this time with another. A negative result indicates that this time is before the given one, and a positive time indicates that it is after. */ + /** + * Compares this time with another. A negative result indicates that this time is before the given + * one, and a positive time indicates that it is after. + */ compare(b: AnyTime): number { return compareTime(this, b); } @@ -333,7 +348,10 @@ export class CalendarDateTime { return subtract(this, duration); } - /** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ + /** + * Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields + * will be constrained accordingly. + */ set(fields: DateFields & TimeFields): CalendarDateTime { return set(setTime(this, fields), fields); } @@ -368,7 +386,10 @@ export class CalendarDateTime { return dateTimeToString(this); } - /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ + /** + * Compares this date with another. A negative result indicates that this date is before the given + * one, and a positive date indicates that it is after. + */ compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number { let res = compareDate(this, b); if (res === 0) { @@ -520,7 +541,10 @@ export class ZonedDateTime { return subtractZoned(this, duration); } - /** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */ + /** + * Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields + * will be constrained accordingly. + */ set(fields: DateFields & TimeFields, disambiguation?: Disambiguation): ZonedDateTime { return setZoned(this, fields, disambiguation); } @@ -538,7 +562,10 @@ export class ZonedDateTime { return zonedToDate(this); } - /** Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone identifier. */ + /** + * Converts the date to an ISO 8601 formatted string, including the UTC offset and time zone + * identifier. + */ toString(): string { return zonedDateTimeToString(this); } @@ -548,7 +575,10 @@ export class ZonedDateTime { return this.toDate().toISOString(); } - /** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */ + /** + * Compares this date with another. A negative result indicates that this date is before the given + * one, and a positive date indicates that it is after. + */ compare(b: CalendarDate | CalendarDateTime | ZonedDateTime): number { // TODO: Is this a bad idea?? return this.toDate().getTime() - toZoned(b, this.timeZone).toDate().getTime(); diff --git a/packages/@internationalized/date/src/DateFormatter.ts b/packages/@internationalized/date/src/DateFormatter.ts index 06bdcf2b113..ad933014f01 100644 --- a/packages/@internationalized/date/src/DateFormatter.ts +++ b/packages/@internationalized/date/src/DateFormatter.ts @@ -27,7 +27,10 @@ export class DateFormatter implements Intl.DateTimeFormat { this.options = options; } - /** Formats a date as a string according to the locale and format options passed to the constructor. */ + /** + * Formats a date as a string according to the locale and format options passed to the + * constructor. + */ format(value: Date): string { return this.formatter.format(value); } diff --git a/packages/@internationalized/date/src/calendars/GregorianCalendar.ts b/packages/@internationalized/date/src/calendars/GregorianCalendar.ts index 91e5db7f2f9..ff9a6850c19 100644 --- a/packages/@internationalized/date/src/calendars/GregorianCalendar.ts +++ b/packages/@internationalized/date/src/calendars/GregorianCalendar.ts @@ -69,8 +69,9 @@ const daysInMonth = { }; /** - * The Gregorian calendar is the most commonly used calendar system in the world. It supports two eras: BC, and AD. - * Years always contain 12 months, and 365 or 366 days depending on whether it is a leap year. + * The Gregorian calendar is the most commonly used calendar system in the world. It supports two + * eras: BC, and AD. Years always contain 12 months, and 365 or 366 days depending on whether it is + * a leap year. */ export class GregorianCalendar implements Calendar { identifier: CalendarIdentifier = 'gregory'; diff --git a/packages/@internationalized/date/src/calendars/IslamicCalendar.ts b/packages/@internationalized/date/src/calendars/IslamicCalendar.ts index 644e59cd326..d664ff67521 100644 --- a/packages/@internationalized/date/src/calendars/IslamicCalendar.ts +++ b/packages/@internationalized/date/src/calendars/IslamicCalendar.ts @@ -49,11 +49,12 @@ function isLeapYear(year: number): boolean { } /** - * The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world. - * The civil variant uses simple arithmetic rules rather than astronomical calculations to approximate - * the traditional calendar, which is based on sighting of the crescent moon. It uses Friday, July 16 622 CE (Julian) as the epoch. - * Each year has 12 months, with either 354 or 355 days depending on whether it is a leap year. - * Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types). + * The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab + * world. The civil variant uses simple arithmetic rules rather than astronomical calculations to + * approximate the traditional calendar, which is based on sighting of the crescent moon. It uses + * Friday, July 16 622 CE (Julian) as the epoch. Each year has 12 months, with either 354 or 355 + * days depending on whether it is a leap year. Learn more about the available Islamic calendars + * [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types). */ export class IslamicCivilCalendar implements Calendar { identifier: CalendarIdentifier = 'islamic-civil'; @@ -102,11 +103,12 @@ export class IslamicCivilCalendar implements Calendar { } /** - * The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world. - * The tabular variant uses simple arithmetic rules rather than astronomical calculations to approximate - * the traditional calendar, which is based on sighting of the crescent moon. It uses Thursday, July 15 622 CE (Julian) as the epoch. - * Each year has 12 months, with either 354 or 355 days depending on whether it is a leap year. - * Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types). + * The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab + * world. The tabular variant uses simple arithmetic rules rather than astronomical calculations to + * approximate the traditional calendar, which is based on sighting of the crescent moon. It uses + * Thursday, July 15 622 CE (Julian) as the epoch. Each year has 12 months, with either 354 or 355 + * days depending on whether it is a leap year. Learn more about the available Islamic calendars + * [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types). */ export class IslamicTabularCalendar extends IslamicCivilCalendar { identifier: CalendarIdentifier = 'islamic-tbla'; @@ -156,11 +158,12 @@ function umalquraYearLength(year: number): number { } /** - * The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab world. - * The Umalqura variant is primarily used in Saudi Arabia. It is a lunar calendar, based on astronomical - * calculations that predict the sighting of a crescent moon. Month and year lengths vary between years - * depending on these calculations. - * Learn more about the available Islamic calendars [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types). + * The Islamic calendar, also known as the "Hijri" calendar, is used throughout much of the Arab + * world. The Umalqura variant is primarily used in Saudi Arabia. It is a lunar calendar, based on + * astronomical calculations that predict the sighting of a crescent moon. Month and year lengths + * vary between years depending on these calculations. Learn more about the available Islamic + * calendars + * [here](https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types). */ export class IslamicUmalquraCalendar extends IslamicCivilCalendar { identifier: CalendarIdentifier = 'islamic-umalqura'; diff --git a/packages/@internationalized/date/src/calendars/JapaneseCalendar.ts b/packages/@internationalized/date/src/calendars/JapaneseCalendar.ts index 52978c98f5c..d1cf7b43a29 100644 --- a/packages/@internationalized/date/src/calendars/JapaneseCalendar.ts +++ b/packages/@internationalized/date/src/calendars/JapaneseCalendar.ts @@ -72,9 +72,10 @@ function toGregorian(date: AnyCalendarDate) { } /** - * The Japanese calendar is based on the Gregorian calendar, but with eras for the reign of each Japanese emperor. - * Whenever a new emperor ascends to the throne, a new era begins and the year starts again from 1. - * Note that eras before 1868 (Gregorian) are not currently supported by this implementation. + * The Japanese calendar is based on the Gregorian calendar, but with eras for the reign of each + * Japanese emperor. Whenever a new emperor ascends to the throne, a new era begins and the year + * starts again from 1. Note that eras before 1868 (Gregorian) are not currently supported by this + * implementation. */ export class JapaneseCalendar extends GregorianCalendar { identifier: CalendarIdentifier = 'japanese'; diff --git a/packages/@internationalized/date/src/conversion.ts b/packages/@internationalized/date/src/conversion.ts index 8a6b72f00cf..bcc18906022 100644 --- a/packages/@internationalized/date/src/conversion.ts +++ b/packages/@internationalized/date/src/conversion.ts @@ -262,7 +262,10 @@ export function fromDateToLocal(date: Date): ZonedDateTime { return fromDate(date, getLocalTimeZone()); } -/** Converts a value with date components such as a `CalendarDateTime` or `ZonedDateTime` into a `CalendarDate`. */ +/** + * Converts a value with date components such as a `CalendarDateTime` or `ZonedDateTime` into a + * `CalendarDate`. + */ export function toCalendarDate(dateTime: AnyCalendarDate): CalendarDate { return new CalendarDate( dateTime.calendar, @@ -292,8 +295,8 @@ export function toTimeFields(date: AnyTime): TimeFields { } /** - * Converts a date value to a `CalendarDateTime`. An optional `Time` value can be passed to set the time - * of the resulting value, otherwise it will default to midnight. + * Converts a date value to a `CalendarDateTime`. An optional `Time` value can be passed to set the + * time of the resulting value, otherwise it will default to midnight. */ export function toCalendarDateTime( date: CalendarDate | CalendarDateTime | ZonedDateTime, @@ -349,8 +352,8 @@ export function toCalendar(date: T, calendar: Calenda } /** - * Converts a date value to a `ZonedDateTime` in the provided time zone. The `disambiguation` option can be set - * to control how values that fall on daylight saving time changes are interpreted. + * Converts a date value to a `ZonedDateTime` in the provided time zone. The `disambiguation` option + * can be set to control how values that fall on daylight saving time changes are interpreted. */ export function toZoned( date: CalendarDate | CalendarDateTime | ZonedDateTime, diff --git a/packages/@internationalized/date/src/queries.ts b/packages/@internationalized/date/src/queries.ts index ee890978a8b..c26cdcbed40 100644 --- a/packages/@internationalized/date/src/queries.ts +++ b/packages/@internationalized/date/src/queries.ts @@ -21,7 +21,10 @@ export function isSameDay(a: DateValue, b: DateValue): boolean { return a.era === b.era && a.year === b.year && a.month === b.month && a.day === b.day; } -/** Returns whether the given dates occur in the same month, using the calendar system of the first date. */ +/** + * Returns whether the given dates occur in the same month, using the calendar system of the first + * date. + */ export function isSameMonth(a: DateValue, b: DateValue): boolean { b = toCalendar(b, a.calendar); // In the Japanese calendar, months can span multiple eras/years, so only compare the first of the month. @@ -30,7 +33,10 @@ export function isSameMonth(a: DateValue, b: DateValue): boolean { return a.era === b.era && a.year === b.year && a.month === b.month; } -/** Returns whether the given dates occur in the same year, using the calendar system of the first date. */ +/** + * Returns whether the given dates occur in the same year, using the calendar system of the first + * date. + */ export function isSameYear(a: DateValue, b: DateValue): boolean { b = toCalendar(b, a.calendar); a = startOfYear(a); diff --git a/packages/@internationalized/date/src/string.ts b/packages/@internationalized/date/src/string.ts index 72b115b336f..c74244586a6 100644 --- a/packages/@internationalized/date/src/string.ts +++ b/packages/@internationalized/date/src/string.ts @@ -102,10 +102,10 @@ export function parseDateTime(value: string): CalendarDateTime { } /** - * Parses an ISO 8601 date and time string with a time zone extension and optional UTC offset - * (e.g. "2021-11-07T00:45[America/Los_Angeles]" or "2021-11-07T00:45-07:00[America/Los_Angeles]"). - * Ambiguous times due to daylight saving time transitions are resolved according to the `disambiguation` - * parameter. + * Parses an ISO 8601 date and time string with a time zone extension and optional UTC offset (e.g. + * "2021-11-07T00:45[America/Los_Angeles]" or "2021-11-07T00:45-07:00[America/Los_Angeles]"). + * Ambiguous times due to daylight saving time transitions are resolved according to the + * `disambiguation` parameter. */ export function parseZonedDateTime(value: string, disambiguation?: Disambiguation): ZonedDateTime { let m = value.match(ZONED_DATE_TIME_RE); @@ -254,6 +254,7 @@ export function zonedDateTimeToString(date: ZonedDateTime): string { /** * Parses an ISO 8601 duration string (e.g. "P3Y6M6W4DT12H30M5S"). + * * @param value An ISO 8601 duration string. * @returns A DateTimeDuration object. */ diff --git a/packages/@internationalized/date/src/types.ts b/packages/@internationalized/date/src/types.ts index f68b25f904b..63e020f75c2 100644 --- a/packages/@internationalized/date/src/types.ts +++ b/packages/@internationalized/date/src/types.ts @@ -61,8 +61,8 @@ export type CalendarIdentifier = */ export interface Calendar { /** - * A string identifier for the calendar, as defined by Unicode CLDR. - * See [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types). + * A string identifier for the calendar, as defined by Unicode CLDR. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types). */ identifier: CalendarIdentifier; @@ -141,7 +141,10 @@ export interface TimeDuration { milliseconds?: number; } -/** Represents an amount of time with both date and time components, for use when performing arithmetic. */ +/** + * Represents an amount of time with both date and time components, for use when performing + * arithmetic. + */ export interface DateTimeDuration extends DateDuration, TimeDuration {} export interface DateFields { @@ -173,6 +176,7 @@ export interface CycleTimeOptions extends CycleOptions { * Whether to use 12 or 24 hour time. If 12 hour time is chosen, the resulting value * will remain in the same day period as the original value (e.g. if the value is AM, * the resulting value also be AM). + * * @default 24 */ hourCycle?: 12 | 24; diff --git a/packages/@internationalized/number/src/NumberFormatter.ts b/packages/@internationalized/number/src/NumberFormatter.ts index f045a0d24b9..e1066afe294 100644 --- a/packages/@internationalized/number/src/NumberFormatter.ts +++ b/packages/@internationalized/number/src/NumberFormatter.ts @@ -54,7 +54,8 @@ interface NumberRangeFormatPart extends Intl.NumberFormatPart { } /** - * A wrapper around Intl.NumberFormat providing additional options, polyfills, and caching for performance. + * A wrapper around Intl.NumberFormat providing additional options, polyfills, and caching for + * performance. */ export class NumberFormatter implements Intl.NumberFormat { private numberFormatter: Intl.NumberFormat; @@ -65,7 +66,10 @@ export class NumberFormatter implements Intl.NumberFormat { this.options = options; } - /** Formats a number value as a string, according to the locale and options provided to the constructor. */ + /** + * Formats a number value as a string, according to the locale and options provided to the + * constructor. + */ format(value: number): string { let res = ''; if (!supportsSignDisplay && this.options.signDisplay != null) { @@ -184,7 +188,7 @@ function getCachedNumberFormatter( return numberFormatter; } -/** @private - exported for tests */ +/** @private - Exported for tests */ export function numberFormatSignDisplayPolyfill( numberFormat: Intl.NumberFormat, signDisplay: string, diff --git a/packages/@internationalized/string-compiler/src/stringCompiler.d.ts b/packages/@internationalized/string-compiler/src/stringCompiler.d.ts index c3801f09f17..7ef1b05fa11 100644 --- a/packages/@internationalized/string-compiler/src/stringCompiler.d.ts +++ b/packages/@internationalized/string-compiler/src/stringCompiler.d.ts @@ -13,6 +13,7 @@ interface Options { /** * Output module format. + * * @default 'cjs' */ format?: 'cjs' | 'esm'; diff --git a/packages/@react-aria/i18n/src/useMessageFormatter.ts b/packages/@react-aria/i18n/src/useMessageFormatter.ts index 185ca7832f3..e8f55095d4a 100644 --- a/packages/@react-aria/i18n/src/useMessageFormatter.ts +++ b/packages/@react-aria/i18n/src/useMessageFormatter.ts @@ -30,8 +30,9 @@ function getCachedDictionary(strings: LocalizedStrings) { /** * Handles formatting ICU Message strings to create localized strings for the current locale. * Automatically updates when the locale changes, and handles caching of messages for performance. - * @param strings - A mapping of languages to strings by key. + * * @deprecated - use useLocalizedStringFormatter instead. + * @param strings - A mapping of languages to strings by key. */ export function useMessageFormatter(strings: LocalizedStrings): FormatMessage { let {locale} = useLocale(); diff --git a/packages/@react-aria/test-utils/src/checkboxgroup.ts b/packages/@react-aria/test-utils/src/checkboxgroup.ts index e6d6e47a33b..d36ad75fe10 100644 --- a/packages/@react-aria/test-utils/src/checkboxgroup.ts +++ b/packages/@react-aria/test-utils/src/checkboxgroup.ts @@ -16,7 +16,8 @@ import {pressElement} from './events'; interface TriggerCheckboxOptions { /** - * What interaction type to use when triggering a checkbox. Defaults to the interaction type set on the tester. + * What interaction type to use when triggering a checkbox. Defaults to the interaction type set + * on the tester. */ interactionType?: UserOpts['interactionType']; /** @@ -111,7 +112,8 @@ export class CheckboxGroupTester { } /** - * Toggles the specified checkbox. Defaults to using the interaction type set on the checkbox tester. + * Toggles the specified checkbox. Defaults to using the interaction type set on the checkbox + * tester. */ async toggleCheckbox(opts: TriggerCheckboxOptions): Promise { let {checkbox, interactionType = this._interactionType} = opts; diff --git a/packages/@react-aria/test-utils/src/combobox.ts b/packages/@react-aria/test-utils/src/combobox.ts index 7717d67b3b7..5d67e78e0e2 100644 --- a/packages/@react-aria/test-utils/src/combobox.ts +++ b/packages/@react-aria/test-utils/src/combobox.ts @@ -16,11 +16,13 @@ import {ComboBoxTesterOpts, UserOpts} from './types'; interface ComboBoxOpenOpts { /** * Whether the combobox opens on focus or needs to be manually opened via user action. + * * @default 'manual' */ triggerBehavior?: 'focus' | 'manual'; /** - * What interaction type to use when opening the combobox. Defaults to the interaction type set on the tester. + * What interaction type to use when opening the combobox. Defaults to the interaction type set on + * the tester. */ interactionType?: UserOpts['interactionType']; } @@ -143,8 +145,9 @@ export class ComboBoxTester { } /** - * Selects the desired combobox option. Defaults to using the interaction type set on the combobox tester. If necessary, will open the combobox dropdown beforehand. - * The desired option can be targeted via the option's node, the option's text, or the option's index. + * Selects the desired combobox option. Defaults to using the interaction type set on the combobox + * tester. If necessary, will open the combobox dropdown beforehand. The desired option can be + * targeted via the option's node, the option's text, or the option's index. */ async selectOption(opts: ComboBoxSelectOpts): Promise { let {option, triggerBehavior, interactionType = this._interactionType} = opts; @@ -244,7 +247,8 @@ export class ComboBoxTester { } /** - * Returns the combobox's options if present. Can be filtered to a subsection of the listbox if provided via `element`. + * Returns the combobox's options if present. Can be filtered to a subsection of the listbox if + * provided via `element`. */ options(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this.listbox} = opts; diff --git a/packages/@react-aria/test-utils/src/dialog.ts b/packages/@react-aria/test-utils/src/dialog.ts index 699161810be..3f3795fe4c4 100644 --- a/packages/@react-aria/test-utils/src/dialog.ts +++ b/packages/@react-aria/test-utils/src/dialog.ts @@ -15,7 +15,8 @@ import {DialogTesterOpts, UserOpts} from './types'; interface DialogOpenOpts { /** - * What interaction type to use when opening the dialog. Defaults to the interaction type set on the tester. + * What interaction type to use when opening the dialog. Defaults to the interaction type set on + * the tester. */ interactionType?: UserOpts['interactionType']; } diff --git a/packages/@react-aria/test-utils/src/events.ts b/packages/@react-aria/test-utils/src/events.ts index b37ad6626fd..7631cf5f203 100644 --- a/packages/@react-aria/test-utils/src/events.ts +++ b/packages/@react-aria/test-utils/src/events.ts @@ -48,10 +48,13 @@ export function getMetaKey(): 'MetaLeft' | 'ControlLeft' { /** * Simulates a "long press" event on a element. + * * @param opts - Options for the long press. * @param opts.element - Element to long press. - * @param opts.advanceTimer - Function that when called advances the timers in your test suite by a specific amount of time(ms). - * @param opts.pointeropts - Options to pass to the simulated event. Defaults to mouse. See https://testing-library.com/docs/dom-testing-library/api-events/#fireevent for more info. + * @param opts.advanceTimer - Function that when called advances the timers in your test suite by a + * specific amount of time(ms). + * @param opts.pointeropts - Options to pass to the simulated event. Defaults to mouse. See + * https://testing-library.com/docs/dom-testing-library/api-events/#fireevent for more info. */ export async function triggerLongPress(opts: { element: HTMLElement; diff --git a/packages/@react-aria/test-utils/src/gridlist.ts b/packages/@react-aria/test-utils/src/gridlist.ts index 5f7a9b532f7..1d26138b8cc 100644 --- a/packages/@react-aria/test-utils/src/gridlist.ts +++ b/packages/@react-aria/test-utils/src/gridlist.ts @@ -104,8 +104,9 @@ export class GridListTester { } /** - * Toggles the selection for the specified gridlist row. Defaults to using the interaction type set on the gridlist tester. - * Note that this will endevor to always add/remove JUST the provided row to the set of selected rows. + * Toggles the selection for the specified gridlist row. Defaults to using the interaction type + * set on the gridlist tester. Note that this will endevor to always add/remove JUST the provided + * row to the set of selected rows. */ async toggleRowSelection(opts: GridListToggleRowOpts): Promise { let { @@ -185,7 +186,8 @@ export class GridListTester { // TODO: There is a more difficult use case where the row has/behaves as link, don't think we have a good way to determine that unless the // user specificlly tells us /** - * Triggers the action for the specified gridlist row. Defaults to using the interaction type set on the gridlist tester. + * Triggers the action for the specified gridlist row. Defaults to using the interaction type set + * on the gridlist tester. */ async triggerRowAction(opts: GridListRowActionOpts): Promise { let {row, needsDoubleClick, interactionType = this._interactionType} = opts; @@ -234,7 +236,8 @@ export class GridListTester { } /** - * Returns the gridlist's cells if any. Can be filtered against a specific row if provided via `element`. + * Returns the gridlist's cells if any. Can be filtered against a specific row if provided via + * `element`. */ cells(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this.gridlist} = opts; diff --git a/packages/@react-aria/test-utils/src/listbox.ts b/packages/@react-aria/test-utils/src/listbox.ts index e715fb521b9..12565e2f2d1 100644 --- a/packages/@react-aria/test-utils/src/listbox.ts +++ b/packages/@react-aria/test-utils/src/listbox.ts @@ -16,7 +16,8 @@ import {ListBoxTesterOpts, UserOpts} from './types'; interface ListBoxToggleOptionOpts { /** - * What interaction type to use when toggling selection for an option. Defaults to the interaction type set on the tester. + * What interaction type to use when toggling selection for an option. Defaults to the interaction + * type set on the tester. */ interactionType?: UserOpts['interactionType']; /** @@ -25,18 +26,23 @@ interface ListBoxToggleOptionOpts { option: number | string | HTMLElement; /** * Whether the option should be triggered by Space or Enter in keyboard modality. + * * @default 'Enter' */ keyboardActivation?: 'Space' | 'Enter'; /** - * Whether the option needs to be long pressed to be selected. Depends on the listbox's implementation. + * Whether the option needs to be long pressed to be selected. Depends on the listbox's + * implementation. */ needsLongPress?: boolean; /** - * Whether the listbox has a selectionBehavior of "toggle" or "replace" (aka highlight selection). This affects the user operations - * required to toggle option selection by adding modifier keys during user actions, useful when performing multi-option selection in a "selectionBehavior: 'replace'" listbox. - * If you would like to still simulate user actions (aka press) without these modifiers keys for a "selectionBehavior: replace" listbox, simply omit this option. - * See the [RAC Listbox docs](https://react-spectrum.adobe.com/react-aria/ListBox.html#selection-behavior) for more info on this behavior. + * Whether the listbox has a selectionBehavior of "toggle" or "replace" (aka highlight selection). + * This affects the user operations required to toggle option selection by adding modifier keys + * during user actions, useful when performing multi-option selection in a "selectionBehavior: + * 'replace'" listbox. If you would like to still simulate user actions (aka press) without these + * modifiers keys for a "selectionBehavior: replace" listbox, simply omit this option. See the + * [RAC Listbox docs](https://react-spectrum.adobe.com/react-aria/ListBox.html#selection-behavior) + * for more info on this behavior. * * @default 'toggle' */ @@ -48,7 +54,8 @@ interface ListBoxOptionActionOpts extends Omit< 'keyboardActivation' | 'needsLongPress' > { /** - * Whether or not the option needs a double click to trigger the option action. Depends on the listbox's implementation. + * Whether or not the option needs a double click to trigger the option action. Depends on the + * listbox's implementation. */ needsDoubleClick?: boolean; } @@ -137,7 +144,8 @@ export class ListBoxTester { } /** - * Toggles the selection for the specified listbox option. Defaults to using the interaction type set on the listbox tester. + * Toggles the selection for the specified listbox option. Defaults to using the interaction type + * set on the listbox tester. */ async toggleOptionSelection(opts: ListBoxToggleOptionOpts): Promise { let { @@ -199,7 +207,8 @@ export class ListBoxTester { } /** - * Triggers the action for the specified listbox option. Defaults to using the interaction type set on the listbox tester. + * Triggers the action for the specified listbox option. Defaults to using the interaction type + * set on the listbox tester. */ async triggerOptionAction(opts: ListBoxOptionActionOpts): Promise { let {option, needsDoubleClick, interactionType = this._interactionType} = opts; @@ -234,7 +243,8 @@ export class ListBoxTester { } /** - * Returns the listbox options. Can be filtered to a subsection of the listbox if provided via `element`. + * Returns the listbox options. Can be filtered to a subsection of the listbox if provided via + * `element`. */ options(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this._listbox} = opts; diff --git a/packages/@react-aria/test-utils/src/menu.ts b/packages/@react-aria/test-utils/src/menu.ts index ae18008590a..940c4412fe9 100644 --- a/packages/@react-aria/test-utils/src/menu.ts +++ b/packages/@react-aria/test-utils/src/menu.ts @@ -20,7 +20,8 @@ interface MenuOpenOpts { */ needsLongPress?: boolean; /** - * What interaction type to use when opening the menu. Defaults to the interaction type set on the tester. + * What interaction type to use when opening the menu. Defaults to the interaction type set on the + * tester. */ interactionType?: UserOpts['interactionType']; /** @@ -35,17 +36,21 @@ interface MenuSelectOpts extends MenuOpenOpts { */ option: number | string | HTMLElement; /** - * The menu's selection mode. Will affect whether or not the menu is expected to be closed upon option selection. + * The menu's selection mode. Will affect whether or not the menu is expected to be closed upon + * option selection. + * * @default 'single' */ menuSelectionMode?: 'single' | 'multiple'; /** * Whether or not the menu closes on select. Depends on menu implementation and configuration. + * * @default true */ closesOnSelect?: boolean; /** * Whether the option should be triggered by Space or Enter in keyboard modality. + * * @default 'Enter' */ keyboardActivation?: 'Space' | 'Enter'; @@ -53,7 +58,8 @@ interface MenuSelectOpts extends MenuOpenOpts { interface MenuOpenSubmenuOpts extends MenuOpenOpts { /** - * The text or node of the submenu trigger to open. Available submenu trigger nodes can be sourced via `submenuTriggers`. + * The text or node of the submenu trigger to open. Available submenu trigger nodes can be sourced + * via `submenuTriggers`. */ submenuTrigger: string | HTMLElement; } @@ -177,8 +183,9 @@ export class MenuTester { // TODO: also very similar to select, barring potential long press support // Close on select is also kinda specific? /** - * Selects the desired menu option. Defaults to using the interaction type set on the menu tester. If necessary, will open the menu dropdown beforehand. - * The desired option can be targeted via the option's node, the option's text, or the option's index. + * Selects the desired menu option. Defaults to using the interaction type set on the menu tester. + * If necessary, will open the menu dropdown beforehand. The desired option can be targeted via + * the option's node, the option's text, or the option's index. */ async selectOption(opts: MenuSelectOpts): Promise { let { @@ -300,7 +307,8 @@ export class MenuTester { // TODO: update this to remove needsLongPress if we wanna make the user call open first always /** - * Opens the submenu. Defaults to using the interaction type set on the menu tester. The submenu trigger can be targeted via the trigger's node or the trigger's text. + * Opens the submenu. Defaults to using the interaction type set on the menu tester. The submenu + * trigger can be targeted via the trigger's node or the trigger's text. */ async openSubmenu(opts: MenuOpenSubmenuOpts): Promise { let {submenuTrigger, needsLongPress, interactionType = this._interactionType} = opts; @@ -432,7 +440,8 @@ export class MenuTester { } /** - * Returns the menu's options if present. Can be filtered to a subsection of the menu if provided via `element`. + * Returns the menu's options if present. Can be filtered to a subsection of the menu if provided + * via `element`. */ options(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this.menu} = opts; diff --git a/packages/@react-aria/test-utils/src/radiogroup.ts b/packages/@react-aria/test-utils/src/radiogroup.ts index 36cf189b09e..deec38e3533 100644 --- a/packages/@react-aria/test-utils/src/radiogroup.ts +++ b/packages/@react-aria/test-utils/src/radiogroup.ts @@ -16,7 +16,8 @@ import {pressElement} from './events'; interface TriggerRadioOptions { /** - * What interaction type to use when triggering a radio. Defaults to the interaction type set on the tester. + * What interaction type to use when triggering a radio. Defaults to the interaction type set on + * the tester. */ interactionType?: UserOpts['interactionType']; /** diff --git a/packages/@react-aria/test-utils/src/select.ts b/packages/@react-aria/test-utils/src/select.ts index c164afd04fd..1dadfd77dbf 100644 --- a/packages/@react-aria/test-utils/src/select.ts +++ b/packages/@react-aria/test-utils/src/select.ts @@ -15,7 +15,8 @@ import {SelectTesterOpts, UserOpts} from './types'; interface SelectOpenOpts { /** - * What interaction type to use when opening the select. Defaults to the interaction type set on the tester. + * What interaction type to use when opening the select. Defaults to the interaction type set on + * the tester. */ interactionType?: UserOpts['interactionType']; } @@ -26,7 +27,9 @@ interface SelectTriggerOptionOpts extends SelectOpenOpts { */ option: number | string | HTMLElement; /** - * Whether or not the select closes on selection. Depends on select implementation and configuration. + * Whether or not the select closes on selection. Depends on select implementation and + * configuration. + * * @default true */ closesOnSelect?: boolean; @@ -165,8 +168,9 @@ export class SelectTester { } /** - * Selects the desired select option. Defaults to using the interaction type set on the select tester. If necessary, will open the select dropdown beforehand. - * The desired option can be targeted via the option's node, the option's text, or the option's index. + * Selects the desired select option. Defaults to using the interaction type set on the select + * tester. If necessary, will open the select dropdown beforehand. The desired option can be + * targeted via the option's node, the option's text, or the option's index. */ async selectOption(opts: SelectTriggerOptionOpts): Promise { let {option, closesOnSelect, interactionType = this._interactionType} = opts || {}; @@ -232,7 +236,8 @@ export class SelectTester { } /** - * Returns the select's options if present. Can be filtered to a subsection of the listbox if provided via `element`. + * Returns the select's options if present. Can be filtered to a subsection of the listbox if + * provided via `element`. */ options(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this.listbox} = opts; diff --git a/packages/@react-aria/test-utils/src/table.ts b/packages/@react-aria/test-utils/src/table.ts index ffdefecbba6..2541dbeb6c5 100644 --- a/packages/@react-aria/test-utils/src/table.ts +++ b/packages/@react-aria/test-utils/src/table.ts @@ -28,7 +28,8 @@ interface TableToggleSortOpts { */ column: number | string | HTMLElement; /** - * What interaction type to use when sorting the column. Defaults to the interaction type set on the tester. + * What interaction type to use when sorting the column. Defaults to the interaction type set on + * the tester. */ interactionType?: UserOpts['interactionType']; } @@ -117,7 +118,8 @@ export class TableTester { } /** - * Toggles the selection for the specified table row. Defaults to using the interaction type set on the table tester. + * Toggles the selection for the specified table row. Defaults to using the interaction type set + * on the table tester. */ async toggleRowSelection(opts: TableToggleRowOpts): Promise { let { @@ -183,7 +185,8 @@ export class TableTester { } /** - * Toggles the expansion for the specified tree row. Defaults to using the interaction type set on the tree tester. + * Toggles the expansion for the specified tree row. Defaults to using the interaction type set on + * the tree tester. */ async toggleRowExpansion(opts: TableToggleExpansionOpts): Promise { let {row, interactionType = this._interactionType} = opts; @@ -224,7 +227,8 @@ export class TableTester { } /** - * Toggles the sort order for the specified table column. Defaults to using the interaction type set on the table tester. + * Toggles the sort order for the specified table column. Defaults to using the interaction type + * set on the table tester. */ async toggleSort(opts: TableToggleSortOpts): Promise { let {column, interactionType = this._interactionType} = opts; @@ -323,7 +327,8 @@ export class TableTester { } /** - * Triggers an action for the specified table column menu. Defaults to using the interaction type set on the table tester. + * Triggers an action for the specified table column menu. Defaults to using the interaction type + * set on the table tester. */ async triggerColumnHeaderAction(opts: TableColumnHeaderActionOpts): Promise { let {column, interactionType = this._interactionType, action} = opts; @@ -413,7 +418,8 @@ export class TableTester { } /** - * Triggers the action for the specified table row. Defaults to using the interaction type set on the table tester. + * Triggers the action for the specified table row. Defaults to using the interaction type set on + * the table tester. */ async triggerRowAction(opts: TableRowActionOpts): Promise { let {row, needsDoubleClick, interactionType = this._interactionType} = opts; @@ -442,7 +448,8 @@ export class TableTester { // Additionally, should we also support keyboard navigation/typeahead? Those felt like they could be very easily replicated by the user via user.keyboard already and don't really // add much value if we provide that to them /** - * Toggle selection for all rows in the table. Defaults to using the interaction type set on the table tester. + * Toggle selection for all rows in the table. Defaults to using the interaction type set on the + * table tester. */ async toggleSelectAll(opts: {interactionType?: UserOpts['interactionType']} = {}): Promise { let {interactionType = this._interactionType} = opts; @@ -541,7 +548,8 @@ export class TableTester { } /** - * Returns the cells within the table if any. Can be filtered against a specific row if provided via `element`. + * Returns the cells within the table if any. Can be filtered against a specific row if provided + * via `element`. */ cells(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this.table} = opts; diff --git a/packages/@react-aria/test-utils/src/tabs.ts b/packages/@react-aria/test-utils/src/tabs.ts index 1f2b4e6a571..d58ae129cc8 100644 --- a/packages/@react-aria/test-utils/src/tabs.ts +++ b/packages/@react-aria/test-utils/src/tabs.ts @@ -16,7 +16,8 @@ import {pressElement} from './events'; interface TriggerTabOptions { /** - * What interaction type to use when triggering a tab. Defaults to the interaction type set on the tester. + * What interaction type to use when triggering a tab. Defaults to the interaction type set on the + * tester. */ interactionType?: UserOpts['interactionType']; /** diff --git a/packages/@react-aria/test-utils/src/tree.ts b/packages/@react-aria/test-utils/src/tree.ts index 3be1ef079ad..9cd06f73e9a 100644 --- a/packages/@react-aria/test-utils/src/tree.ts +++ b/packages/@react-aria/test-utils/src/tree.ts @@ -114,8 +114,9 @@ export class TreeTester { } /** - * Toggles the selection for the specified tree row. Defaults to using the interaction type set on the tree tester. - * Note that this will endevor to always add/remove JUST the provided row to the set of selected rows. + * Toggles the selection for the specified tree row. Defaults to using the interaction type set on + * the tree tester. Note that this will endevor to always add/remove JUST the provided row to the + * set of selected rows. */ async toggleRowSelection(opts: TreeToggleRowOpts): Promise { let { @@ -194,7 +195,8 @@ export class TreeTester { } /** - * Toggles the expansion for the specified tree row. Defaults to using the interaction type set on the tree tester. + * Toggles the expansion for the specified tree row. Defaults to using the interaction type set on + * the tree tester. */ async toggleRowExpansion(opts: TreeToggleExpansionOpts): Promise { let {row, interactionType = this._interactionType} = opts; @@ -235,7 +237,8 @@ export class TreeTester { } /** - * Triggers the action for the specified tree row. Defaults to using the interaction type set on the tree tester. + * Triggers the action for the specified tree row. Defaults to using the interaction type set on + * the tree tester. */ async triggerRowAction(opts: TreeRowActionOpts): Promise { let {row, needsDoubleClick, interactionType = this._interactionType} = opts; @@ -286,7 +289,8 @@ export class TreeTester { } /** - * Returns the tree's cells if any. Can be filtered against a specific row if provided via `element`. + * Returns the tree's cells if any. Can be filtered against a specific row if provided via + * `element`. */ cells(opts: {element?: HTMLElement} = {}): HTMLElement[] { let {element = this.tree} = opts; diff --git a/packages/@react-aria/test-utils/src/types.ts b/packages/@react-aria/test-utils/src/types.ts index 6944aa8c931..727316debee 100644 --- a/packages/@react-aria/test-utils/src/types.ts +++ b/packages/@react-aria/test-utils/src/types.ts @@ -17,8 +17,9 @@ export type Direction = 'ltr' | 'rtl'; // curent way is like https://testing-library.com/docs/user-event/options/#advancetimers, export interface UserOpts { /** - * The interaction type (mouse, touch, keyboard) that the test util user will use when interacting with a component. This can be overridden - * at the aria pattern tester level if needed. + * The interaction type (mouse, touch, keyboard) that the test util user will use when interacting + * with a component. This can be overridden at the aria pattern tester level if needed. + * * @default mouse */ interactionType?: 'mouse' | 'touch' | 'keyboard'; @@ -26,8 +27,8 @@ export interface UserOpts { // A real timer user would pass (waitTime) => new Promise((resolve) => setTimeout(resolve, waitTime)) // Time is in ms. /** - * A function used by the test utils to advance timers during interactions. Required for certain aria patterns (e.g. table). This can be overridden - * at the aria pattern tester level if needed. + * A function used by the test utils to advance timers during interactions. Required for certain + * aria patterns (e.g. table). This can be overridden at the aria pattern tester level if needed. */ advanceTimer?: (time: number) => unknown | Promise; } @@ -43,13 +44,14 @@ export interface CheckboxGroupTesterOpts extends BaseTesterOpts {} export interface ComboBoxTesterOpts extends BaseTesterOpts { /** - * The base element for the combobox. If provided the wrapping element around the target combobox (as is the the case with a ref provided to RSP ComboBox), - * will automatically search for the combobox element within. + * The base element for the combobox. If provided the wrapping element around the target combobox + * (as is the the case with a ref provided to RSP ComboBox), will automatically search for the + * combobox element within. */ root: HTMLElement; /** - * The node of the combobox trigger button if any. If not provided, we will try to automatically use any button - * within the `root` provided or that the `root` serves as the trigger. + * The node of the combobox trigger button if any. If not provided, we will try to automatically + * use any button within the `root` provided or that the `root` serves as the trigger. */ trigger?: HTMLElement; } @@ -92,6 +94,7 @@ export interface MenuTesterOpts extends BaseTesterOpts { export interface RadioGroupTesterOpts extends BaseTesterOpts { /** * The horizontal layout direction, typically affected by locale. + * * @default 'ltr' */ direction?: Direction; @@ -99,8 +102,9 @@ export interface RadioGroupTesterOpts extends BaseTesterOpts { export interface SelectTesterOpts extends BaseTesterOpts { /** - * The trigger element for the select. If provided the wrapping element around the target select (as is the case with a ref provided to RSP Select), - * will automatically search for the select's trigger element within. + * The trigger element for the select. If provided the wrapping element around the target select + * (as is the case with a ref provided to RSP Select), will automatically search for the select's + * trigger element within. */ root: HTMLElement; } @@ -115,6 +119,7 @@ export interface TableTesterOpts extends BaseTesterOpts { export interface TabsTesterOpts extends BaseTesterOpts { /** * The horizontal layout direction, typically affected by locale. + * * @default 'ltr' */ direction?: Direction; @@ -133,27 +138,34 @@ export interface BaseGridRowInteractionOpts { */ row: number | string | HTMLElement; /** - * What interaction type to use when interacting with the row. Defaults to the interaction type set on the tester. + * What interaction type to use when interacting with the row. Defaults to the interaction type + * set on the tester. */ interactionType?: UserOpts['interactionType']; } export interface ToggleGridRowOpts extends BaseGridRowInteractionOpts { /** - * Whether the row needs to be long pressed to be selected. Depends on the components implementation. + * Whether the row needs to be long pressed to be selected. Depends on the components + * implementation. */ needsLongPress?: boolean; /** - * Whether the checkbox should be used to select the row. If false, will attempt to select the row via press. + * Whether the checkbox should be used to select the row. If false, will attempt to select the row + * via press. + * * @default 'true' */ checkboxSelection?: boolean; // TODO: this api feels a bit confusing tbh... /** - * Whether the grid has a selectionBehavior of "toggle" or "replace" (aka highlight selection). This affects the user operations - * required to toggle row selection by adding modifier keys during user actions, useful when performing multi-row selection in a "selectionBehavior: 'replace'" grid. - * If you would like to still simulate user actions (aka press) without these modifiers keys for a "selectionBehavior: replace" grid, simply omit this option. - * See the "Selection Behavior" section of the appropriate React Aria Component docs for more information (e.g. https://react-spectrum.adobe.com/react-aria/Tree.html#selection-behavior). + * Whether the grid has a selectionBehavior of "toggle" or "replace" (aka highlight selection). + * This affects the user operations required to toggle row selection by adding modifier keys + * during user actions, useful when performing multi-row selection in a "selectionBehavior: + * 'replace'" grid. If you would like to still simulate user actions (aka press) without these + * modifiers keys for a "selectionBehavior: replace" grid, simply omit this option. See the + * "Selection Behavior" section of the appropriate React Aria Component docs for more information + * (e.g. https://react-spectrum.adobe.com/react-aria/Tree.html#selection-behavior). * * @default 'toggle' */ @@ -162,7 +174,8 @@ export interface ToggleGridRowOpts extends BaseGridRowInteractionOpts { export interface GridRowActionOpts extends BaseGridRowInteractionOpts { /** - * Whether or not the row needs a double click to trigger the row action. Depends on the components implementation. + * Whether or not the row needs a double click to trigger the row action. Depends on the + * components implementation. */ needsDoubleClick?: boolean; } diff --git a/packages/@react-aria/test-utils/src/user.ts b/packages/@react-aria/test-utils/src/user.ts index 944cc117a2d..27131200cb9 100644 --- a/packages/@react-aria/test-utils/src/user.ts +++ b/packages/@react-aria/test-utils/src/user.ts @@ -120,13 +120,15 @@ let defaultAdvanceTimer = (waitTime: number | undefined) => export class User { private user; /** - * The interaction type (mouse, touch, keyboard) that the test util user will use when interacting with a component. This can be overridden - * at the aria pattern util level if needed. + * The interaction type (mouse, touch, keyboard) that the test util user will use when interacting + * with a component. This can be overridden at the aria pattern util level if needed. + * * @default mouse */ interactionType: UserOpts['interactionType']; /** - * A function used by the test utils to advance timers during interactions. Required for certain aria patterns (e.g. table). + * A function used by the test utils to advance timers during interactions. Required for certain + * aria patterns (e.g. table). */ advanceTimer: UserOpts['advanceTimer']; diff --git a/packages/@react-spectrum/s2/src/Accordion.tsx b/packages/@react-spectrum/s2/src/Accordion.tsx index 91f8b18b5bc..807780cc486 100644 --- a/packages/@react-spectrum/s2/src/Accordion.tsx +++ b/packages/@react-spectrum/s2/src/Accordion.tsx @@ -39,11 +39,13 @@ export interface AccordionProps extends UnsafeStyles, DOMProps, SlotProps { styles?: StylesPropWithHeight; /** * The size of the accordion. + * * @default 'M' */ size?: 'S' | 'M' | 'L' | 'XL'; /** * The amount of space between the accordion items. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; @@ -111,16 +113,19 @@ export interface AccordionItemState { export interface AccordionItemRenderProps { /** * Whether the accordion item is expanded. + * * @selector [data-expanded] */ isExpanded: boolean; /** * Whether the accordion item has keyboard focus. + * * @selector [data-focus-visible-within] */ isFocusVisibleWithin: boolean; /** * Whether the accordion item is disabled. + * * @selector [data-disabled] */ isDisabled: boolean; @@ -137,17 +142,22 @@ export interface AccordionItemProps StyleProps { /** * The size of the accordion item. + * * @default 'M' */ size?: 'S' | 'M' | 'L' | 'XL'; /** * The amount of space between the accordion item. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** Whether the accordion item should be displayed with a quiet style. */ isQuiet?: boolean; - /** The contents of the accordion item, consisting of a accordion item title and accordion item panel. */ + /** + * The contents of the accordion item, consisting of a accordion item title and accordion item + * panel. + */ children: ReactNode; /** An id for the accordion item, matching the id used in `expandedKeys`. */ id?: Key; @@ -162,7 +172,8 @@ export interface AccordionItemProps } /** - * A accordion item is a collapsible section of content. It is composed of a header with a heading and trigger button, and a panel that contains the content. + * A accordion item is a collapsible section of content. It is composed of a header with a heading + * and trigger button, and a panel that contains the content. */ export const AccordionItem = forwardRef(function AccordionItem( props: AccordionItemProps, @@ -172,7 +183,8 @@ export const AccordionItem = forwardRef(function AccordionItem( }); export interface AccordionItemTitleProps extends UnsafeStyles, DOMProps { - /** The heading level of the accordion item title. + /** + * The heading level of the accordion item title. * * @default 3 */ @@ -182,7 +194,8 @@ export interface AccordionItemTitleProps extends UnsafeStyles, DOMProps { } /** - * An accordion item title consisting of a heading and a trigger button to expand/collapse the panel. + * An accordion item title consisting of a heading and a trigger button to expand/collapse the + * panel. */ export const AccordionItemTitle = forwardRef(function AccordionItemTitle( props: AccordionItemTitleProps, @@ -197,7 +210,8 @@ export interface AccordionItemHeaderProps extends UnsafeStyles, DOMProps { } /** - * A wrapper element for the accordion item title that can contain other elements not part of the trigger. + * A wrapper element for the accordion item title that can contain other elements not part of the + * trigger. */ export const AccordionItemHeader = forwardRef(function AccordionItemHeader( props: AccordionItemHeaderProps, @@ -211,13 +225,15 @@ export interface AccordionItemPanelProps extends UnsafeStyles, DOMProps, AriaLab children: React.ReactNode; /** * The accessibility role for the accordion item panel. + * * @default 'group' */ role?: 'group' | 'region'; } /** - * An accordion item panel is a collapsible section of content that is hidden until the accordion item is expanded. + * An accordion item panel is a collapsible section of content that is hidden until the accordion + * item is expanded. */ export const AccordionItemPanel = forwardRef(function AccordionItemPanel( props: AccordionItemPanelProps, diff --git a/packages/@react-spectrum/s2/src/ActionBar.tsx b/packages/@react-spectrum/s2/src/ActionBar.tsx index f6d6c3a637d..a108a1644ab 100644 --- a/packages/@react-spectrum/s2/src/ActionBar.tsx +++ b/packages/@react-spectrum/s2/src/ActionBar.tsx @@ -95,7 +95,10 @@ export interface ActionBarProps extends SlotProps, StyleProps, DOMProps { children: ReactNode; /** Whether the ActionBar should be displayed with a emphasized style. */ isEmphasized?: boolean; - /** The number of selected items that the ActionBar is currently linked to. If 0, the ActionBar is hidden. */ + /** + * The number of selected items that the ActionBar is currently linked to. If 0, the ActionBar is + * hidden. + */ selectedItemCount?: number | 'all'; /** Handler that is called when the ActionBar clear button is pressed. */ onClearSelection?: () => void; @@ -107,7 +110,8 @@ export const ActionBarContext = createContext, DOMRefValue>>(null); /** - * Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time. + * Action bars are used for single and bulk selection patterns when a user needs to perform actions + * on one or more items at the same time. */ export const ActionBar = forwardRef(function ActionBar( props: ActionBarProps, diff --git a/packages/@react-spectrum/s2/src/ActionButton.tsx b/packages/@react-spectrum/s2/src/ActionButton.tsx index a7ce10bea12..0f5b6245add 100644 --- a/packages/@react-spectrum/s2/src/ActionButton.tsx +++ b/packages/@react-spectrum/s2/src/ActionButton.tsx @@ -49,14 +49,20 @@ export interface ActionButtonStyleProps { size?: 'XS' | 'S' | 'M' | 'L' | 'XL'; /** The static color style to apply. Useful when the ActionButton appears over a color background. */ staticColor?: 'black' | 'white' | 'auto'; - /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ + /** + * Whether the button should be displayed with a [quiet + * style](https://spectrum.adobe.com/page/action-button/#Quiet). + */ isQuiet?: boolean; } interface ToggleButtonStyleProps { /** Whether the ActionButton should be selected (controlled). */ isSelected?: boolean; - /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ + /** + * Whether the button should be displayed with an [emphasized + * style](https://spectrum.adobe.com/page/action-button/#Emphasis). + */ isEmphasized?: boolean; } @@ -307,8 +313,9 @@ export const ActionButtonContext = ); /** - * ActionButtons allow users to perform an action. - * They're used for similar, task-based options within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of attention. + * ActionButtons allow users to perform an action. They're used for similar, task-based options + * within a workflow, and are ideal for interfaces where buttons aren't meant to draw a lot of + * attention. */ export const ActionButton = forwardRef(function ActionButton( props: ActionButtonProps, diff --git a/packages/@react-spectrum/s2/src/ActionButtonGroup.tsx b/packages/@react-spectrum/s2/src/ActionButtonGroup.tsx index 908bd18a052..7530098a6d5 100644 --- a/packages/@react-spectrum/s2/src/ActionButtonGroup.tsx +++ b/packages/@react-spectrum/s2/src/ActionButtonGroup.tsx @@ -29,22 +29,31 @@ export interface ActionButtonGroupProps extends AriaLabelingProps, UnsafeStyles, children: ReactNode; /** * Size of the buttons. - * @default "M" + * + * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L' | 'XL'; /** * Spacing between the buttons. - * @default "regular" + * + * @default 'regular' */ density?: 'compact' | 'regular'; - /** Whether the button should be displayed with a [quiet style](https://spectrum.adobe.com/page/action-button/#Quiet). */ + /** + * Whether the button should be displayed with a [quiet + * style](https://spectrum.adobe.com/page/action-button/#Quiet). + */ isQuiet?: boolean; /** Whether the buttons should divide the container width equally. */ isJustified?: boolean; - /** The static color style to apply. Useful when the ActionButtonGroup appears over a color background. */ + /** + * The static color style to apply. Useful when the ActionButtonGroup appears over a color + * background. + */ staticColor?: 'white' | 'black' | 'auto'; /** * The axis the group should align with. + * * @default 'horizontal' */ orientation?: 'horizontal' | 'vertical'; diff --git a/packages/@react-spectrum/s2/src/AlertDialog.tsx b/packages/@react-spectrum/s2/src/AlertDialog.tsx index 94237308ae4..32312004334 100644 --- a/packages/@react-spectrum/s2/src/AlertDialog.tsx +++ b/packages/@react-spectrum/s2/src/AlertDialog.tsx @@ -31,6 +31,7 @@ import {useLocalizedStringFormatter} from 'react-aria/useLocalizedStringFormatte export interface AlertDialogProps extends DOMProps, UnsafeStyles { /** * The [visual style](https://spectrum.adobe.com/page/alert-dialog/#Options) of the AlertDialog. + * * @default 'confirmation' */ variant?: 'confirmation' | 'information' | 'destructive' | 'error' | 'warning'; @@ -78,7 +79,8 @@ const icon = style({ }); /** - * AlertDialogs are a specific type of Dialog. They display important information that users need to acknowledge. + * AlertDialogs are a specific type of Dialog. They display important information that users need to + * acknowledge. */ export const AlertDialog = forwardRef(function AlertDialog(props: AlertDialogProps, ref: DOMRef) { let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/s2'); diff --git a/packages/@react-spectrum/s2/src/Avatar.tsx b/packages/@react-spectrum/s2/src/Avatar.tsx index 5a136da38d4..20c8347a5ba 100644 --- a/packages/@react-spectrum/s2/src/Avatar.tsx +++ b/packages/@react-spectrum/s2/src/Avatar.tsx @@ -35,6 +35,7 @@ export interface AvatarProps extends UnsafeStyles, DOMProps, SlotProps { styles?: StylesPropWithoutWidth; /** * The size of the avatar. + * * @default 24 */ size?: 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56 | 64 | 80 | 96 | 112 | (number & {}); diff --git a/packages/@react-spectrum/s2/src/AvatarGroup.tsx b/packages/@react-spectrum/s2/src/AvatarGroup.tsx index 7c2dcc094d9..89a896daa21 100644 --- a/packages/@react-spectrum/s2/src/AvatarGroup.tsx +++ b/packages/@react-spectrum/s2/src/AvatarGroup.tsx @@ -32,6 +32,7 @@ export interface AvatarGroupProps extends UnsafeStyles, DOMProps, AriaLabelingPr label?: string; /** * The size of the avatar group. + * * @default 24 */ size?: 16 | 20 | 24 | 28 | 32 | 36 | 40; diff --git a/packages/@react-spectrum/s2/src/Badge.tsx b/packages/@react-spectrum/s2/src/Badge.tsx index 034de44856c..9bdb65e0b14 100644 --- a/packages/@react-spectrum/s2/src/Badge.tsx +++ b/packages/@react-spectrum/s2/src/Badge.tsx @@ -32,7 +32,8 @@ export interface BadgeStyleProps { */ size?: 'S' | 'M' | 'L' | 'XL'; /** - * The variant changes the background color of the badge. When badge has a semantic meaning, they should use the variant for semantic colors. + * The variant changes the background color of the badge. When badge has a semantic meaning, they + * should use the variant for semantic colors. * * @default 'neutral' */ @@ -64,11 +65,13 @@ export interface BadgeStyleProps { | 'silver'; /** * The fill of the badge. + * * @default 'bold' */ fillStyle?: 'bold' | 'subtle' | 'outline'; /** * Sets the text behavior for the contents. + * * @default 'wrap' */ overflowMode?: 'wrap' | 'truncate'; @@ -194,7 +197,8 @@ const badge = style( ); /** - * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention. + * Badges are used for showing a small amount of color-categorized metadata, ideal for getting a + * user's attention. */ export const Badge = forwardRef(function Badge(props: BadgeProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, BadgeContext); diff --git a/packages/@react-spectrum/s2/src/Button.tsx b/packages/@react-spectrum/s2/src/Button.tsx index 6293aa3a9ab..d841ea51c27 100644 --- a/packages/@react-spectrum/s2/src/Button.tsx +++ b/packages/@react-spectrum/s2/src/Button.tsx @@ -515,7 +515,8 @@ export const Button = forwardRef(function Button( }); /** - * A LinkButton combines the functionality of a link with the appearance of a button. Useful for allowing users to navigate to another page. + * A LinkButton combines the functionality of a link with the appearance of a button. Useful for + * allowing users to navigate to another page. */ export const LinkButton = forwardRef(function LinkButton( props: LinkButtonProps, diff --git a/packages/@react-spectrum/s2/src/Calendar.tsx b/packages/@react-spectrum/s2/src/Calendar.tsx index cd68c0f3383..9e90445a261 100644 --- a/packages/@react-spectrum/s2/src/Calendar.tsx +++ b/packages/@react-spectrum/s2/src/Calendar.tsx @@ -81,6 +81,7 @@ export interface CalendarProps ReactNode); /** * The size of the Card. + * * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L' | 'XL'; /** * The amount of internal padding within the Card. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** * The visual style of the Card. + * * @default 'primary' */ variant?: 'primary' | 'secondary' | 'tertiary' | 'quiet'; diff --git a/packages/@react-spectrum/s2/src/CardView.tsx b/packages/@react-spectrum/s2/src/CardView.tsx index 161a4c55d86..6579fb4a224 100644 --- a/packages/@react-spectrum/s2/src/CardView.tsx +++ b/packages/@react-spectrum/s2/src/CardView.tsx @@ -69,26 +69,31 @@ export interface CardViewProps UnsafeStyles { /** * The layout of the cards. + * * @default 'grid' */ layout?: 'grid' | 'waterfall'; /** * The size of the cards. + * * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L' | 'XL'; /** * The amount of space between the cards. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** * The visual style of the cards. + * * @default 'primary' */ variant?: 'primary' | 'secondary' | 'tertiary' | 'quiet'; /** * How selection should be displayed. + * * @default 'checkbox' */ selectionStyle?: 'checkbox' | 'highlight'; diff --git a/packages/@react-spectrum/s2/src/CoachMark.tsx b/packages/@react-spectrum/s2/src/CoachMark.tsx index 0edc12d9e18..b6137f81286 100644 --- a/packages/@react-spectrum/s2/src/CoachMark.tsx +++ b/packages/@react-spectrum/s2/src/CoachMark.tsx @@ -385,9 +385,9 @@ export const CoachMark = forwardRef((props: CoachMarkProps, ref: ForwardedRef(null); diff --git a/packages/@react-spectrum/s2/src/ColorArea.tsx b/packages/@react-spectrum/s2/src/ColorArea.tsx index a13601fa88b..90f51458ece 100644 --- a/packages/@react-spectrum/s2/src/ColorArea.tsx +++ b/packages/@react-spectrum/s2/src/ColorArea.tsx @@ -37,7 +37,8 @@ export const ColorAreaContext = createContext, DOMRefValue>>(null); /** - * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background. + * A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a + * two-dimensional gradient background. */ export const ColorArea = forwardRef(function ColorArea( props: ColorAreaProps, diff --git a/packages/@react-spectrum/s2/src/ColorSwatch.tsx b/packages/@react-spectrum/s2/src/ColorSwatch.tsx index 00706595278..5f917a49209 100644 --- a/packages/@react-spectrum/s2/src/ColorSwatch.tsx +++ b/packages/@react-spectrum/s2/src/ColorSwatch.tsx @@ -34,11 +34,13 @@ export interface ColorSwatchProps UnsafeStyles { /** * The size of the ColorSwatch. + * * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L'; /** * The corner rounding of the ColorSwatch. + * * @default 'default' */ rounding?: 'default' | 'none' | 'full'; diff --git a/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx b/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx index 22130c8d855..b4b730d4e87 100644 --- a/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx +++ b/packages/@react-spectrum/s2/src/ColorSwatchPicker.tsx @@ -31,16 +31,19 @@ export interface ColorSwatchPickerProps children: ReactNode; /** * The amount of padding between the swatches. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; /** * The size of the color swatches. + * * @default 'M' */ size?: 'XS' | 'S' | 'M' | 'L'; /** * The corner rounding of the color swatches. + * * @default 'none' */ rounding?: 'none' | 'default' | 'full'; diff --git a/packages/@react-spectrum/s2/src/ComboBox.tsx b/packages/@react-spectrum/s2/src/ComboBox.tsx index 92d94d51453..75208690563 100644 --- a/packages/@react-spectrum/s2/src/ComboBox.tsx +++ b/packages/@react-spectrum/s2/src/ComboBox.tsx @@ -142,9 +142,15 @@ export interface ComboBoxProps * @default 'start' */ align?: 'start' | 'end'; - /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */ + /** + * Width of the menu. By default, matches width of the trigger. Note that the minimum width of the + * dropdown is always equal to the trigger's width. + */ menuWidth?: number; - /** The current loading state of the ComboBox. Determines whether or not the progress circle should be shown. */ + /** + * The current loading state of the ComboBox. Determines whether or not the progress circle should + * be shown. + */ loadingState?: LoadingState; } @@ -377,7 +383,8 @@ export const LOADER_ROW_HEIGHTS = { let InternalComboboxContext = createContext<{size: 'S' | 'M' | 'L' | 'XL'}>({size: 'M'}); /** - * ComboBox allow users to choose a single option from a collapsible list of options when space is limited. + * ComboBox allow users to choose a single option from a collapsible list of options when space is + * limited. */ export const ComboBox = /*#__PURE__*/ (forwardRef as forwardRefType)(function ComboBox< T extends object diff --git a/packages/@react-spectrum/s2/src/ContextualHelp.tsx b/packages/@react-spectrum/s2/src/ContextualHelp.tsx index e86c3e363a7..9e80254240e 100644 --- a/packages/@react-spectrum/s2/src/ContextualHelp.tsx +++ b/packages/@react-spectrum/s2/src/ContextualHelp.tsx @@ -29,7 +29,8 @@ import {useSpectrumContextProps} from './useSpectrumContextProps'; export interface ContextualHelpPopoverProps extends PopoverDialogProps { /** - * The children of the contextual help popover. Supports Heading, Content, and Footer elements. */ + * The children of the contextual help popover. Supports Heading, Content, and Footer elements. + */ children: ReactNode; } @@ -135,6 +136,7 @@ export interface ContextualHelpProps AriaLabelingProps { /** * The placement of the popover with respect to the action button. + * * @default 'bottom start' */ placement?: Placement; @@ -154,7 +156,8 @@ export const ContextualHelpContext = ); /** - * Contextual help shows a user extra information about the state of an adjacent component, or a total view. + * Contextual help shows a user extra information about the state of an adjacent component, or a + * total view. */ export const ContextualHelp = forwardRef(function ContextualHelp( props: ContextualHelpProps, diff --git a/packages/@react-spectrum/s2/src/CustomDialog.tsx b/packages/@react-spectrum/s2/src/CustomDialog.tsx index 63d90fb4a78..36845f9732e 100644 --- a/packages/@react-spectrum/s2/src/CustomDialog.tsx +++ b/packages/@react-spectrum/s2/src/CustomDialog.tsx @@ -41,6 +41,7 @@ export interface CustomDialogProps isKeyboardDismissDisabled?: boolean; /** * The amount of padding around the contents of the dialog. + * * @default 'default' */ padding?: 'default' | 'none'; diff --git a/packages/@react-spectrum/s2/src/DatePicker.tsx b/packages/@react-spectrum/s2/src/DatePicker.tsx index cae4964b185..4dd3d54e565 100644 --- a/packages/@react-spectrum/s2/src/DatePicker.tsx +++ b/packages/@react-spectrum/s2/src/DatePicker.tsx @@ -79,7 +79,9 @@ export interface DatePickerProps */ size?: 'S' | 'M' | 'L' | 'XL'; /** - * The maximum number of months to display at once in the calendar popover, if screen space permits. + * The maximum number of months to display at once in the calendar popover, if screen space + * permits. + * * @default 1 */ maxVisibleMonths?: number; @@ -148,7 +150,8 @@ export const timeField = style({ }); /** - * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value. + * DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date + * and time value. */ export const DatePicker = /*#__PURE__*/ (forwardRef as forwardRefType)(function DatePicker< T extends DateValue diff --git a/packages/@react-spectrum/s2/src/DateRangePicker.tsx b/packages/@react-spectrum/s2/src/DateRangePicker.tsx index 5d4140677a5..f6c0da712dc 100644 --- a/packages/@react-spectrum/s2/src/DateRangePicker.tsx +++ b/packages/@react-spectrum/s2/src/DateRangePicker.tsx @@ -63,7 +63,9 @@ export interface DateRangePickerProps */ size?: 'S' | 'M' | 'L' | 'XL'; /** - * The maximum number of months to display at once in the calendar popover, if screen space permits. + * The maximum number of months to display at once in the calendar popover, if screen space + * permits. + * * @default 1 */ maxVisibleMonths?: number; diff --git a/packages/@react-spectrum/s2/src/Dialog.tsx b/packages/@react-spectrum/s2/src/Dialog.tsx index 93689106425..49001499ee5 100644 --- a/packages/@react-spectrum/s2/src/Dialog.tsx +++ b/packages/@react-spectrum/s2/src/Dialog.tsx @@ -104,8 +104,9 @@ export const dialogInner = style({ }); /** - * Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface. - * Depending on the kind of Dialog, further interactions may be blocked until the Dialog is acknowledged. + * Dialogs are windows containing contextual information, tasks, or workflows that appear over the + * user interface. Depending on the kind of Dialog, further interactions may be blocked until the + * Dialog is acknowledged. */ export const Dialog = forwardRef(function Dialog(props: DialogProps, ref: DOMRef) { let {size = 'M', isDismissible, isKeyboardDismissDisabled} = props; diff --git a/packages/@react-spectrum/s2/src/DialogTrigger.tsx b/packages/@react-spectrum/s2/src/DialogTrigger.tsx index 38a0133be8b..cb40f28eae7 100644 --- a/packages/@react-spectrum/s2/src/DialogTrigger.tsx +++ b/packages/@react-spectrum/s2/src/DialogTrigger.tsx @@ -20,9 +20,9 @@ import {ReactNode} from 'react'; export interface DialogTriggerProps extends AriaDialogTriggerProps {} /** - * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the Dialog's - * open state with the trigger's press state. Additionally, it allows you to customize the type and - * positioning of the Dialog. + * DialogTrigger serves as a wrapper around a Dialog and its associated trigger, linking the + * Dialog's open state with the trigger's press state. Additionally, it allows you to customize the + * type and positioning of the Dialog. */ export function DialogTrigger(props: DialogTriggerProps): ReactNode { return ( diff --git a/packages/@react-spectrum/s2/src/Disclosure.tsx b/packages/@react-spectrum/s2/src/Disclosure.tsx index 2a70116de82..21f510d8d46 100644 --- a/packages/@react-spectrum/s2/src/Disclosure.tsx +++ b/packages/@react-spectrum/s2/src/Disclosure.tsx @@ -57,11 +57,13 @@ export interface DisclosureProps StyleProps { /** * The size of the disclosure. + * * @default 'M' */ size?: 'S' | 'M' | 'L' | 'XL'; /** * The amount of space between the disclosures. + * * @default 'regular' */ density?: 'compact' | 'regular' | 'spacious'; @@ -102,7 +104,8 @@ const disclosure = style( ); /** - * A disclosure is a collapsible section of content. It is composed of a header with a heading and trigger button, and a panel that contains the content. + * A disclosure is a collapsible section of content. It is composed of a header with a heading and + * trigger button, and a panel that contains the content. */ export const Disclosure = forwardRef(function Disclosure( props: DisclosureProps, @@ -128,7 +131,8 @@ export const Disclosure = forwardRef(function Disclosure( }); export interface DisclosureTitleProps extends UnsafeStyles, DOMProps { - /** The heading level of the disclosure header. + /** + * The heading level of the disclosure header. * * @default 3 */ @@ -275,7 +279,8 @@ function DisclosureHeaderWithForwardRef(props: DisclosureHeaderProps, ref: DOMRe } /** - * A wrapper element for the disclosure title that can contain other elements not part of the trigger. + * A wrapper element for the disclosure title that can contain other elements not part of the + * trigger. */ export const DisclosureHeader = /*#__PURE__*/ (forwardRef as forwardRefType)( DisclosureHeaderWithForwardRef @@ -354,7 +359,8 @@ const panelInner = style({ }); /** - * A disclosure panel is a collapsible section of content that is hidden until the disclosure is expanded. + * A disclosure panel is a collapsible section of content that is hidden until the disclosure is + * expanded. */ export const DisclosurePanel = forwardRef(function DisclosurePanel( props: DisclosurePanelProps, diff --git a/packages/@react-spectrum/s2/src/Divider.tsx b/packages/@react-spectrum/s2/src/Divider.tsx index 1e6dfd90221..ea83b8aad37 100644 --- a/packages/@react-spectrum/s2/src/Divider.tsx +++ b/packages/@react-spectrum/s2/src/Divider.tsx @@ -30,11 +30,13 @@ import {useSpectrumContextProps} from './useSpectrumContextProps'; interface DividerSpectrumProps { /** * How thick the Divider should be. + * * @default 'M' */ size?: 'S' | 'M' | 'L'; /** * The orientation of the Divider. + * * @default 'horizontal' */ orientation?: 'horizontal' | 'vertical'; diff --git a/packages/@react-spectrum/s2/src/DropZone.tsx b/packages/@react-spectrum/s2/src/DropZone.tsx index 260147fee9d..5b85cf85331 100644 --- a/packages/@react-spectrum/s2/src/DropZone.tsx +++ b/packages/@react-spectrum/s2/src/DropZone.tsx @@ -58,6 +58,7 @@ export interface DropZoneProps isFilled?: boolean; /** * The message to replace the default banner message that is shown when the drop zone is filled. + * * @default 'Drop file to replace' */ replaceMessage?: string; diff --git a/packages/@react-spectrum/s2/src/Form.tsx b/packages/@react-spectrum/s2/src/Form.tsx index b904ccd0b0e..327a423204c 100644 --- a/packages/@react-spectrum/s2/src/Form.tsx +++ b/packages/@react-spectrum/s2/src/Form.tsx @@ -21,6 +21,7 @@ import {useIsSkeleton} from './Skeleton'; interface FormStyleProps extends Omit { /** * Size of the Form elements. + * * @default 'M' */ size?: 'S' | 'M' | 'L' | 'XL'; @@ -67,7 +68,8 @@ export function useFormProps(props: T): T { } /** - * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields. + * Forms allow users to enter data that can be submitted while providing alignment and styling for + * form fields. */ export const Form = /*#__PURE__*/ forwardRef(function Form( props: FormProps, diff --git a/packages/@react-spectrum/s2/src/FullscreenDialog.tsx b/packages/@react-spectrum/s2/src/FullscreenDialog.tsx index 7a2e4590287..000c0a4cb0e 100644 --- a/packages/@react-spectrum/s2/src/FullscreenDialog.tsx +++ b/packages/@react-spectrum/s2/src/FullscreenDialog.tsx @@ -33,7 +33,8 @@ export interface FullscreenDialogProps StyleProps { /** * The variant of fullscreen dialog to display. - * @default "fullscreen" + * + * @default 'fullscreen' */ variant?: 'fullscreen' | 'fullscreenTakeover'; /** Whether pressing the escape key to close the dialog should be disabled. */ @@ -106,7 +107,8 @@ export const dialogInner = style({ }); /** - * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be used for modal experiences with complex workflows. + * Takeover dialogs are large types of dialogs. They use the totality of the screen and should be + * used for modal experiences with complex workflows. */ export const FullscreenDialog = forwardRef(function FullscreenDialog( props: FullscreenDialogProps, diff --git a/packages/@react-spectrum/s2/src/Image.tsx b/packages/@react-spectrum/s2/src/Image.tsx index babdb74c308..0d0a14937b9 100644 --- a/packages/@react-spectrum/s2/src/Image.tsx +++ b/packages/@react-spectrum/s2/src/Image.tsx @@ -30,7 +30,8 @@ export interface ImageSource { */ srcSet?: string | undefined; /** - * The color scheme for this image source. Unlike `media`, this respects the `Provider` color scheme setting. + * The color scheme for this image source. Unlike `media`, this respects the `Provider` color + * scheme setting. */ colorScheme?: 'light' | 'dark'; /** @@ -108,13 +109,13 @@ export interface ImageProps extends UnsafeStyles, SlotProps { /** A function that is called to render a fallback when the image fails to load. */ renderError?: () => ReactNode; /** - * A group of images to coordinate between, matching the group passed to the `` component. - * If not provided, the default image group is used. + * A group of images to coordinate between, matching the group passed to the `` + * component. If not provided, the default image group is used. */ group?: ImageGroup; /** - * Associates the image with a microdata object. - * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/itemprop). + * Associates the image with a microdata object. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/itemprop). */ itemProp?: string; } diff --git a/packages/@react-spectrum/s2/src/ImageCoordinator.tsx b/packages/@react-spectrum/s2/src/ImageCoordinator.tsx index 0df4515f5b6..4d169f0200b 100644 --- a/packages/@react-spectrum/s2/src/ImageCoordinator.tsx +++ b/packages/@react-spectrum/s2/src/ImageCoordinator.tsx @@ -13,7 +13,9 @@ export interface ImageCoordinatorProps { /** Children within the ImageCoordinator. */ children: ReactNode; /** - * Time in milliseconds after which images are always displayed, even if all images are not yet loaded. + * Time in milliseconds after which images are always displayed, even if all images are not yet + * loaded. + * * @default 5000 */ timeout?: number; diff --git a/packages/@react-spectrum/s2/src/InlineAlert.tsx b/packages/@react-spectrum/s2/src/InlineAlert.tsx index e76c8224f7e..4361bf760d9 100644 --- a/packages/@react-spectrum/s2/src/InlineAlert.tsx +++ b/packages/@react-spectrum/s2/src/InlineAlert.tsx @@ -43,11 +43,13 @@ export interface InlineAlertProps extends DOMProps, StyleProps, InlineStylesProp interface InlineStylesProps { /** * The semantic tone of a Inline Alert. + * * @default neutral */ variant?: 'informative' | 'positive' | 'notice' | 'negative' | 'neutral'; /** * The visual style of the Inline Alert. + * * @default border */ fillStyle?: 'border' | 'subtleFill' | 'boldFill'; @@ -199,8 +201,8 @@ const content = style({ }); /** - * Inline alerts display a non-modal message associated with objects in a view. - * These are often used in form validation, providing a place to aggregate feedback related to multiple fields. + * Inline alerts display a non-modal message associated with objects in a view. These are often used + * in form validation, providing a place to aggregate feedback related to multiple fields. */ export const InlineAlert = /*#__PURE__*/ forwardRef(function InlineAlert( props: InlineAlertProps, diff --git a/packages/@react-spectrum/s2/src/LabeledValue.tsx b/packages/@react-spectrum/s2/src/LabeledValue.tsx index 4bcfc417611..6357d465295 100644 --- a/packages/@react-spectrum/s2/src/LabeledValue.tsx +++ b/packages/@react-spectrum/s2/src/LabeledValue.tsx @@ -89,6 +89,7 @@ interface ReactElementProps { export interface LabeledValueStyleProps { /** * The size of the component. + * * @default 'M' */ size?: 'S' | 'M' | 'L' | 'XL'; diff --git a/packages/@react-spectrum/s2/src/Link.tsx b/packages/@react-spectrum/s2/src/Link.tsx index a7353f8212d..5a3cc9e59b8 100644 --- a/packages/@react-spectrum/s2/src/Link.tsx +++ b/packages/@react-spectrum/s2/src/Link.tsx @@ -28,6 +28,7 @@ import {useSpectrumContextProps} from './useSpectrumContextProps'; interface LinkStyleProps { /** * The [visual style](https://spectrum.adobe.com/page/link/#Options) of the link. + * * @default 'primary' */ variant?: 'primary' | 'secondary'; diff --git a/packages/@react-spectrum/s2/src/ListView.tsx b/packages/@react-spectrum/s2/src/ListView.tsx index 90337eddb24..d7e4a4a72a0 100644 --- a/packages/@react-spectrum/s2/src/ListView.tsx +++ b/packages/@react-spectrum/s2/src/ListView.tsx @@ -117,11 +117,13 @@ interface ListViewStylesProps { isQuiet?: boolean; /** * How selection should be displayed. + * * @default 'checkbox' */ selectionStyle?: 'highlight' | 'checkbox'; /** * Sets the overflow behavior for item contents. + * * @default 'truncate' */ overflowMode?: 'wrap' | 'truncate'; @@ -206,7 +208,8 @@ const listView = style({ }); /** - * A ListView displays a list of interactive items, and allows a user to navigate, select, or perform an action. + * A ListView displays a list of interactive items, and allows a user to navigate, select, or + * perform an action. */ export const ListView = /*#__PURE__*/ (forwardRef as forwardRefType)(function ListView< T extends object diff --git a/packages/@react-spectrum/s2/src/Menu.tsx b/packages/@react-spectrum/s2/src/Menu.tsx index 0d865dc0fd5..01a17b56cfd 100644 --- a/packages/@react-spectrum/s2/src/Menu.tsx +++ b/packages/@react-spectrum/s2/src/Menu.tsx @@ -791,11 +791,13 @@ function SubmenuTrigger(props: SubmenuTriggerProps): JSX.Element { export interface UnavailableMenuItemTriggerProps { /** - * The contents of the UnavailableMenuItemTrigger. The first child should be a MenuItem and the second child be a ContextualHelpPopover. + * The contents of the UnavailableMenuItemTrigger. The first child should be a MenuItem and the + * second child be a ContextualHelpPopover. */ children: ReactElement[]; /** * Whether the menu item is currently unavailable. + * * @default false */ isUnavailable?: boolean; diff --git a/packages/@react-spectrum/s2/src/Meter.tsx b/packages/@react-spectrum/s2/src/Meter.tsx index 54484e2902e..bbf50c87547 100644 --- a/packages/@react-spectrum/s2/src/Meter.tsx +++ b/packages/@react-spectrum/s2/src/Meter.tsx @@ -25,7 +25,9 @@ import {useDOMRef} from './useDOMRef'; import {useSpectrumContextProps} from './useSpectrumContextProps'; interface MeterStyleProps { - /** The [visual style](https://spectrum.adobe.com/page/meter/#-Options) of the Meter. + /** + * The [visual style](https://spectrum.adobe.com/page/meter/#-Options) of the Meter. + * * @default 'informative' */ variant?: 'informative' | 'positive' | 'notice' | 'negative'; @@ -41,6 +43,7 @@ interface MeterStyleProps { staticColor?: 'white' | 'black' | 'auto'; /** * The label's overall position relative to the element it is labeling. + * * @default 'top' */ labelPosition?: LabelPosition; diff --git a/packages/@react-spectrum/s2/src/NumberField.tsx b/packages/@react-spectrum/s2/src/NumberField.tsx index ca83a5275b1..eef3c41bee2 100644 --- a/packages/@react-spectrum/s2/src/NumberField.tsx +++ b/packages/@react-spectrum/s2/src/NumberField.tsx @@ -69,6 +69,7 @@ export interface NumberFieldProps Pick { /** * Whether to hide the increment and decrement buttons. + * * @default false */ hideStepper?: boolean; @@ -164,7 +165,8 @@ const stepperContainerStyles = style({ }); /** - * NumberFields allow users to input number values with a keyboard or increment/decrement with step buttons. + * NumberFields allow users to input number values with a keyboard or increment/decrement with step + * buttons. */ export const NumberField = forwardRef(function NumberField( props: NumberFieldProps, diff --git a/packages/@react-spectrum/s2/src/Picker.tsx b/packages/@react-spectrum/s2/src/Picker.tsx index 4e7dc1350ee..d34e26c56e2 100644 --- a/packages/@react-spectrum/s2/src/Picker.tsx +++ b/packages/@react-spectrum/s2/src/Picker.tsx @@ -151,12 +151,16 @@ export interface PickerProps({size: let InsideSelectValueContext = createContext(false); /** - * Pickers allow users to choose a single option from a collapsible list of options when space is limited. + * Pickers allow users to choose a single option from a collapsible list of options when space is + * limited. */ export const Picker = /*#__PURE__*/ (forwardRef as forwardRefType)(function Picker< T extends object, diff --git a/packages/@react-spectrum/s2/src/Popover.tsx b/packages/@react-spectrum/s2/src/Popover.tsx index f4181529965..6ead949d693 100644 --- a/packages/@react-spectrum/s2/src/Popover.tsx +++ b/packages/@react-spectrum/s2/src/Popover.tsx @@ -303,6 +303,7 @@ export interface PopoverDialogProps children?: ReactNode; /** * The amount of padding around the contents of the dialog. + * * @default 'default' */ padding?: 'default' | 'none'; diff --git a/packages/@react-spectrum/s2/src/ProgressBar.tsx b/packages/@react-spectrum/s2/src/ProgressBar.tsx index f9925fae436..426888f88d4 100644 --- a/packages/@react-spectrum/s2/src/ProgressBar.tsx +++ b/packages/@react-spectrum/s2/src/ProgressBar.tsx @@ -45,6 +45,7 @@ interface ProgressBarStyleProps { staticColor?: 'white' | 'black' | 'auto'; /** * The label's overall position relative to the element it is labeling. + * * @default 'top' */ labelPosition?: LabelPosition; @@ -168,8 +169,8 @@ const indeterminateAnimation = style({ }); /** - * ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way. - * They can represent either determinate or indeterminate progress. + * ProgressBars show the progression of a system operation: downloading, uploading, processing, + * etc., in a visual way. They can represent either determinate or indeterminate progress. */ export const ProgressBar = /*#__PURE__*/ forwardRef(function ProgressBar( props: ProgressBarProps, diff --git a/packages/@react-spectrum/s2/src/ProgressCircle.tsx b/packages/@react-spectrum/s2/src/ProgressCircle.tsx index 61854b8b845..837d6b4d145 100644 --- a/packages/@react-spectrum/s2/src/ProgressCircle.tsx +++ b/packages/@react-spectrum/s2/src/ProgressCircle.tsx @@ -159,8 +159,8 @@ const dashoffsetAnimation = keyframes(` `); /** - * ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way. - * They can represent determinate or indeterminate progress. + * ProgressCircles show the progression of a system operation such as downloading, uploading, or + * processing, in a visual way. They can represent determinate or indeterminate progress. */ export const ProgressCircle = /*#__PURE__*/ forwardRef(function ProgressCircle( props: ProgressCircleProps, diff --git a/packages/@react-spectrum/s2/src/Provider.tsx b/packages/@react-spectrum/s2/src/Provider.tsx index 24967b11b5d..02a5d8d253e 100644 --- a/packages/@react-spectrum/s2/src/Provider.tsx +++ b/packages/@react-spectrum/s2/src/Provider.tsx @@ -32,13 +32,15 @@ export interface ProviderProps extends UnsafeStyles, DOMProps { /** The content of the Provider. */ children: ReactNode; /** - * The locale for your application as a [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code. - * Defaults to the browser/OS language setting. + * The locale for your application as a [BCP 47](https://www.ietf.org/rfc/bcp/bcp47.txt) language + * code. Defaults to the browser/OS language setting. + * * @default 'en-US' */ locale?: string; /** - * Provides a client side router to all nested React Spectrum links to enable client side navigation. + * Provides a client side router to all nested React Spectrum links to enable client side + * navigation. */ router?: Router; /** @@ -52,6 +54,7 @@ export interface ProviderProps extends UnsafeStyles, DOMProps { styles?: StyleString; /** * The DOM element to render. + * * @default div */ elementType?: keyof JSX.IntrinsicElements; diff --git a/packages/@react-spectrum/s2/src/RangeCalendar.tsx b/packages/@react-spectrum/s2/src/RangeCalendar.tsx index 67307de46a5..d270c259bb6 100644 --- a/packages/@react-spectrum/s2/src/RangeCalendar.tsx +++ b/packages/@react-spectrum/s2/src/RangeCalendar.tsx @@ -49,6 +49,7 @@ export interface RangeCalendarProps errorMessage?: ReactNode; /** * The number of months to display at once. + * * @default 1 */ visibleMonths?: number; @@ -95,7 +96,8 @@ const calendarStyles = style<{isMultiMonth?: boolean}>( ); /** - * RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates. + * RangeCalendars display a grid of days in one or more months and allow users to select a + * contiguous range of dates. */ export const RangeCalendar = /*#__PURE__*/ (forwardRef as forwardRefType)(function RangeCalendar< T extends DateValue diff --git a/packages/@react-spectrum/s2/src/RangeSlider.tsx b/packages/@react-spectrum/s2/src/RangeSlider.tsx index dadb9c31865..6469ace4652 100644 --- a/packages/@react-spectrum/s2/src/RangeSlider.tsx +++ b/packages/@react-spectrum/s2/src/RangeSlider.tsx @@ -34,11 +34,13 @@ import {useSpectrumContextProps} from './useSpectrumContextProps'; export interface RangeSliderProps extends Omit>, 'children'> { /** - * The name of the start input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). + * The name of the start input element, used when submitting an HTML form. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). */ startName?: string; /** - * The name of the end input element, used when submitting an HTML form. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). + * The name of the end input element, used when submitting an HTML form. See + * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). */ endName?: string; /** @@ -53,7 +55,8 @@ export const RangeSliderContext = createContext, FocusableRefValue>>(null); /** - * RangeSliders allow users to quickly select a subset range. They should be used when the upper and lower bounds to the range are invariable. + * RangeSliders allow users to quickly select a subset range. They should be used when the upper and + * lower bounds to the range are invariable. */ export const RangeSlider = /*#__PURE__*/ forwardRef(function RangeSlider( props: RangeSliderProps, diff --git a/packages/@react-spectrum/s2/src/SelectBoxGroup.tsx b/packages/@react-spectrum/s2/src/SelectBoxGroup.tsx index 6cc18eea904..bc236199eec 100644 --- a/packages/@react-spectrum/s2/src/SelectBoxGroup.tsx +++ b/packages/@react-spectrum/s2/src/SelectBoxGroup.tsx @@ -50,11 +50,13 @@ export interface SelectBoxGroupProps children: ReactNode | ((item: T) => ReactNode); /** * The layout direction of the content in each SelectBox. + * * @default 'vertical' */ orientation?: Orientation; /** * The selection mode for the SelectBoxGroup. + * * @default 'single' */ selectionMode?: 'single' | 'multiple'; diff --git a/packages/@react-spectrum/s2/src/SkeletonCollection.tsx b/packages/@react-spectrum/s2/src/SkeletonCollection.tsx index 0a687c8fec2..af24887af26 100644 --- a/packages/@react-spectrum/s2/src/SkeletonCollection.tsx +++ b/packages/@react-spectrum/s2/src/SkeletonCollection.tsx @@ -26,7 +26,8 @@ class SkeletonNode extends CollectionNode { } /** - * A SkeletonCollection generates placeholder content within a collection component such as CardView. + * A SkeletonCollection generates placeholder content within a collection component such as + * CardView. */ export const SkeletonCollection = createLeafComponent( SkeletonNode, diff --git a/packages/@react-spectrum/s2/src/Slider.tsx b/packages/@react-spectrum/s2/src/Slider.tsx index e207d3e4cc4..002595f522a 100644 --- a/packages/@react-spectrum/s2/src/Slider.tsx +++ b/packages/@react-spectrum/s2/src/Slider.tsx @@ -444,7 +444,8 @@ export function SliderBase( } /** - * Sliders allow users to quickly select a value within a range. They should be used when the upper and lower bounds to the range are invariable. + * Sliders allow users to quickly select a value within a range. They should be used when the upper + * and lower bounds to the range are invariable. */ export const Slider = /*#__PURE__*/ forwardRef(function Slider( props: SliderProps, diff --git a/packages/@react-spectrum/s2/src/TableView.tsx b/packages/@react-spectrum/s2/src/TableView.tsx index 6ddd5b9e841..7405a04b7af 100644 --- a/packages/@react-spectrum/s2/src/TableView.tsx +++ b/packages/@react-spectrum/s2/src/TableView.tsx @@ -135,11 +135,13 @@ interface S2TableProps { isQuiet?: boolean; /** * Sets the amount of vertical padding within each cell. + * * @default 'regular' */ density?: 'compact' | 'spacious' | 'regular'; /** * Sets the overflow behavior for the cell contents. + * * @default 'truncate' */ overflowMode?: 'wrap' | 'truncate'; @@ -358,7 +360,8 @@ export const TableContext = createContext, DOMRefValue>>(null); /** - * Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data. + * Tables are containers for displaying information. They allow users to quickly scan, sort, + * compare, and take action on large amounts of data. */ export const TableView = forwardRef(function TableView( props: TableViewProps, @@ -652,6 +655,7 @@ export interface ColumnProps extends Omit< allowsResizing?: boolean; /** * The alignment of the column's contents relative to its allotted width. + * * @default 'start' */ align?: 'start' | 'center' | 'end'; diff --git a/packages/@react-spectrum/s2/src/Tabs.tsx b/packages/@react-spectrum/s2/src/Tabs.tsx index 897475abc3d..bb3ba797fd4 100644 --- a/packages/@react-spectrum/s2/src/Tabs.tsx +++ b/packages/@react-spectrum/s2/src/Tabs.tsx @@ -80,12 +80,14 @@ export interface TabsProps children: ReactNode; /** * The amount of space between the tabs. + * * @default 'regular' */ density?: 'compact' | 'regular'; /** * Defines if the text within the tabs should be hidden and only the icon should be shown. * The text is always visible when the item is collapsed into a picker. + * * @default 'show' */ labelBehavior?: 'show' | 'hide'; @@ -174,7 +176,8 @@ const tabs = style( ); /** - * Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit. + * Tabs organize content into multiple sections and allow users to navigate between them. The + * content under the set of tabs should be related and form a coherent unit. */ export const Tabs = forwardRef(function Tabs(props: TabsProps, ref: DOMRef) { [props, ref] = useSpectrumContextProps(props, ref, TabsContext); diff --git a/packages/@react-spectrum/s2/src/TabsPicker.tsx b/packages/@react-spectrum/s2/src/TabsPicker.tsx index f9033785906..654418090b8 100644 --- a/packages/@react-spectrum/s2/src/TabsPicker.tsx +++ b/packages/@react-spectrum/s2/src/TabsPicker.tsx @@ -63,12 +63,16 @@ export interface PickerProps * @default 'start' */ align?: 'start' | 'end'; - /** Width of the menu. By default, matches width of the trigger. Note that the minimum width of the dropdown is always equal to the trigger's width. */ + /** + * Width of the menu. By default, matches width of the trigger. Note that the minimum width of the + * dropdown is always equal to the trigger's width. + */ menuWidth?: number; /** Density of the tabs, affects the height of the picker. */ density: 'compact' | 'regular'; /** * If the tab picker should only display icon and no text for the button label. + * * @default 'show */ labelBehavior?: 'show' | 'hide'; @@ -305,7 +309,8 @@ function Picker(props: PickerProps, ref: FocusableRef isInvalid?: boolean; /** An error message for the field. */ errorMessage?: ReactNode; - /** Limit the number of rows initially shown. This will render a button that allows the user to expand to show all tags. */ + /** + * Limit the number of rows initially shown. This will render a button that allows the user to + * expand to show all tags. + */ maxRows?: number; - /** The label to display on the action button. */ + /** The label to display on the action button. */ groupActionLabel?: string; /** Handler that is called when the action button is pressed. */ onGroupAction?: () => void; @@ -122,7 +125,10 @@ export const TagGroupContext = const InternalTagGroupContext = createContext>({}); -/** Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request. */ +/** + * Tags allow users to categorize content. They can represent keywords or people, and are grouped to + * describe an item or a search request. + */ export const TagGroup = /*#__PURE__*/ (forwardRef as forwardRefType)(function TagGroup< T extends object >(props: TagGroupProps, ref: DOMRef) { diff --git a/packages/@react-spectrum/s2/src/Toast.tsx b/packages/@react-spectrum/s2/src/Toast.tsx index 02404e0d72a..70331df53eb 100644 --- a/packages/@react-spectrum/s2/src/Toast.tsx +++ b/packages/@react-spectrum/s2/src/Toast.tsx @@ -55,7 +55,8 @@ export interface ToastContainerProps extends Omit< > { /** * Placement of the toast container on the page. - * @default "bottom" + * + * @default 'bottom' */ placement?: ToastPlacement; } diff --git a/packages/@react-spectrum/s2/src/ToggleButton.tsx b/packages/@react-spectrum/s2/src/ToggleButton.tsx index 8624d751f75..9e90ffc3713 100644 --- a/packages/@react-spectrum/s2/src/ToggleButton.tsx +++ b/packages/@react-spectrum/s2/src/ToggleButton.tsx @@ -49,7 +49,10 @@ export interface ToggleButtonProps ActionButtonStyleProps { /** The content to display in the button. */ children: ReactNode; - /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ + /** + * Whether the button should be displayed with an [emphasized + * style](https://spectrum.adobe.com/page/action-button/#Emphasis). + */ isEmphasized?: boolean; } diff --git a/packages/@react-spectrum/s2/src/ToggleButtonGroup.tsx b/packages/@react-spectrum/s2/src/ToggleButtonGroup.tsx index 21e3c99b24d..e447bfe3c57 100644 --- a/packages/@react-spectrum/s2/src/ToggleButtonGroup.tsx +++ b/packages/@react-spectrum/s2/src/ToggleButtonGroup.tsx @@ -30,7 +30,10 @@ export interface ToggleButtonGroupProps 'children' | 'style' | 'className' | 'render' | keyof GlobalDOMAttributes >, DOMProps { - /** Whether the button should be displayed with an [emphasized style](https://spectrum.adobe.com/page/action-button/#Emphasis). */ + /** + * Whether the button should be displayed with an [emphasized + * style](https://spectrum.adobe.com/page/action-button/#Emphasis). + */ isEmphasized?: boolean; } diff --git a/packages/@react-spectrum/s2/src/TreeView.tsx b/packages/@react-spectrum/s2/src/TreeView.tsx index 18e11d145c9..eb081c137ce 100644 --- a/packages/@react-spectrum/s2/src/TreeView.tsx +++ b/packages/@react-spectrum/s2/src/TreeView.tsx @@ -69,7 +69,10 @@ interface S2TreeProps { interface TreeViewStyleProps { /** - * How selection should be displayed. For guidance on when to use which option, refer to the [Spectrum](https://spectrum.adobe.com/page/tree-view/#Checkbox-or-highlight-selection-style) page. + * How selection should be displayed. For guidance on when to use which option, refer to the + * [Spectrum](https://spectrum.adobe.com/page/tree-view/#Checkbox-or-highlight-selection-style) + * page. + * * @default 'checkbox' */ selectionStyle?: 'highlight' | 'checkbox'; diff --git a/packages/@react-spectrum/s2/src/pressScale.ts b/packages/@react-spectrum/s2/src/pressScale.ts index ecc777535ee..95804cd9718 100644 --- a/packages/@react-spectrum/s2/src/pressScale.ts +++ b/packages/@react-spectrum/s2/src/pressScale.ts @@ -17,23 +17,23 @@ import {CSSProperties, RefObject} from 'react'; * Returns a render prop style function that applies a subtle Spectrum "press" scale * effect to an element while it is being pressed. * + * @example + * ```tsx + * import {Button} from 'react-aria-components/Button'; + * import {pressScale} from '@react-spectrum/s2'; + * import {useRef} from 'react'; + * + * function MyButton(props) { + * let ref = useRef(null); + * return \n', - * position: Position { - * start: { line: 28, column: 1, offset: 646 }, - * end: { line: 30, column: 4, offset: 700 }, - * indent: [ 1, 1 ] - * }, - * data: { - * hProperties: { className: [ 'tree-sitter', 'language-tsx' ] }, - * hChildren: [ - * { - * type: 'element', - * tagName: 'span', - * properties: { className: [ 'source', 'ts' ] }, - * children: [ - * { - * type: 'element', - * tagName: 'span', - * properties: { className: [ 'keyword', 'operator', 'js' ] }, - * children: [ { type: 'text', value: '<' } ] - * }, - * { - * type: 'element', - * tagName: 'span', - * properties: { className: [ 'keyword', 'operator', 'js' ] }, - * children: [ { type: 'text', value: '>' } ] - * }, - * { type: 'text', value: '\n' }, - * ... - * { type: 'text', value: '\n' }, - * { - * type: 'element', - * tagName: 'span', - * properties: { className: [ 'keyword', 'operator', 'js' ] }, - * children: [ { type: 'text', value: '<' } ] - * }, - * { - * type: 'element', - * tagName: 'span', - * properties: { className: [ 'keyword', 'operator', 'js' ] }, - * children: [ { type: 'text', value: '/' } ] - * }, - * { - * type: 'element', - * tagName: 'span', - * properties: { className: [ 'keyword', 'operator', 'js' ] }, - * children: [ { type: 'text', value: '>' } ] - * } - * } - * } - * } - * ``` + * ``` + * { + * type: 'code', + * lang: 'tsx', + * meta: 'example', + * value: '<>\n\n', + * position: Position { + * start: { line: 28, column: 1, offset: 646 }, + * end: { line: 30, column: 4, offset: 700 }, + * indent: [ 1, 1 ] + * }, + * data: { + * hProperties: { className: [ 'tree-sitter', 'language-tsx' ] }, + * hChildren: [ + * { + * type: 'element', + * tagName: 'span', + * properties: { className: [ 'source', 'ts' ] }, + * children: [ + * { + * type: 'element', + * tagName: 'span', + * properties: { className: [ 'keyword', 'operator', 'js' ] }, + * children: [ { type: 'text', value: '<' } ] + * }, + * { + * type: 'element', + * tagName: 'span', + * properties: { className: [ 'keyword', 'operator', 'js' ] }, + * children: [ { type: 'text', value: '>' } ] + * }, + * { type: 'text', value: '\n' }, + * ... + * { type: 'text', value: '\n' }, + * { + * type: 'element', + * tagName: 'span', + * properties: { className: [ 'keyword', 'operator', 'js' ] }, + * children: [ { type: 'text', value: '<' } ] + * }, + * { + * type: 'element', + * tagName: 'span', + * properties: { className: [ 'keyword', 'operator', 'js' ] }, + * children: [ { type: 'text', value: '/' } ] + * }, + * { + * type: 'element', + * tagName: 'span', + * properties: { className: [ 'keyword', 'operator', 'js' ] }, + * children: [ { type: 'text', value: '>' } ] + * } + * } + * } + * } + * ``` */ diff --git a/packages/dev/parcel-transformer-mdx-docs/MDXTransformer.js b/packages/dev/parcel-transformer-mdx-docs/MDXTransformer.js index ccc2ee4f905..8e79418c7f5 100644 --- a/packages/dev/parcel-transformer-mdx-docs/MDXTransformer.js +++ b/packages/dev/parcel-transformer-mdx-docs/MDXTransformer.js @@ -262,7 +262,9 @@ module.exports = new Transformer({ /** * Go from complex structure that the mdx plugin renders from to a simpler one * it starts as an array because we start with the h2's not h1. - * @example [{id, textContent, children: [{id, textContent, children: ...}, ...]}, ...] + * + * @example + * [{id, textContent, children: [{id, textContent, children: ...}, ...]}, ...] */ function treeConverter(tree, first = false) { let newTree = {}; diff --git a/packages/dev/s2-docs/scripts/generateAgentSkills.mjs b/packages/dev/s2-docs/scripts/generateAgentSkills.mjs index bc42c1423a6..81121573528 100644 --- a/packages/dev/s2-docs/scripts/generateAgentSkills.mjs +++ b/packages/dev/s2-docs/scripts/generateAgentSkills.mjs @@ -6,13 +6,13 @@ * This script creates skills in the Agent Skills format (https://agentskills.io/specification) * * Usage: - * node packages/dev/s2-docs/scripts/generateAgentSkills.mjs + * node packages/dev/s2-docs/scripts/generateAgentSkills.mjs. * * The script will: - * 1. Run the markdown docs generation if dist doesn't exist - * 2. Create .well-known/skills directories inside the docs dist output - * 3. Copy relevant documentation to references/ subdirectories - * 4. Generate .well-known/skills/index.json for discovery + * 1. Run the markdown docs generation if dist doesn't exist + * 2. Create .well-known/skills directories inside the docs dist output + * 3. Copy relevant documentation to references/ subdirectories + * 4. Generate .well-known/skills/index.json for discovery. */ import {execSync} from 'child_process'; @@ -99,7 +99,7 @@ const CUSTOM_SKILL_CONTENT = { }; /** - * Ensure markdown docs are generated + * Ensure markdown docs are generated. */ function ensureMarkdownDocs() { const s2LlmsTxt = path.join(MARKDOWN_DOCS_DIST, 's2', 'llms.txt'); @@ -158,7 +158,7 @@ function getCustomSkillNotesMarkdown(skillName) { } /** - * Parse llms.txt to get documentation entries + * Parse llms.txt to get documentation entries. */ function parseLlmsTxt(llmsTxtPath) { const content = fs.readFileSync(llmsTxtPath, 'utf8'); @@ -234,9 +234,10 @@ function parseLlmsTxt(llmsTxtPath) { } /** - * Extract the section export from an MDX file - * @param {string} mdxPath - Path to the MDX file - * @returns {string|null} - The section value or null if not found + * Extract the section export from an MDX file. + * + * @param {string} mdxPath - Path to the MDX file. + * @returns {string | null} - The section value or null if not found */ function extractSectionFromMdx(mdxPath) { if (!fs.existsSync(mdxPath)) { @@ -249,7 +250,8 @@ function extractSectionFromMdx(mdxPath) { } /** - * Get the MDX file path for a given entry + * Get the MDX file path for a given entry. + * * @param {string} sourceDir - The source directory (e.g., "s2" or "react-aria") * @param {string} entryPath - The path from llms.txt (e.g., "Button.md") * @returns {string} - The full path to the MDX file @@ -261,7 +263,7 @@ function getMdxPath(sourceDir, entryPath) { } /** - * Map section names to category keys + * Map section names to category keys. */ const SECTION_TO_CATEGORY = { // Guides @@ -287,7 +289,7 @@ const SECTION_TO_CATEGORY = { }; /** - * Files to filter out per source directory + * Files to filter out per source directory. */ const FILTERED_FILES = { s2: ['index.md', 'error.md'], @@ -295,7 +297,7 @@ const FILTERED_FILES = { }; /** - * Categorize documentation entries by reading section exports from MDX files + * Categorize documentation entries by reading section exports from MDX files. */ function categorizeEntries(entries, sourceDir) { const categories = { @@ -366,7 +368,7 @@ metadata: } /** - * Generate the SKILL.md content + * Generate the SKILL.md content. */ function generateDocsSkillMd(skillConfig, categories, isS2) { const customGuideEntries = getCustomGuideEntries(skillConfig.name); @@ -588,7 +590,7 @@ Use these when you need more component-by-component or API-level detail: } /** - * Copy documentation files to the skill's references directory + * Copy documentation files to the skill's references directory. */ function copyDocsDocumentation(skillConfig, categories, skillDir) { const refsDir = path.join(skillDir, 'references'); @@ -799,7 +801,7 @@ function writeIndexJson(wellKnownRoot, skills) { } /** - * Generate a single skill + * Generate a single skill. */ function generateSkill(skillConfig, wellKnownRoot) { const skillDir = path.join(wellKnownRoot, skillConfig.name); diff --git a/packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs b/packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs index 5cda984b5ee..fb9e3147b72 100644 --- a/packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs +++ b/packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs @@ -153,8 +153,8 @@ function cleanTypeText(t) { * defined in scope as ['green', 'blue']. * * @param {object} node - A Babel AST node (StringLiteral, ArrayExpression, etc.) - * @param {Map} scope - A Map of variable names to their evaluated values - * @returns {*} The evaluated value (string, number, array, object, Set, etc.) or undefined + * @param {Map} scope - A Map of variable names to their evaluated values. + * @returns {any} The evaluated value (string, number, array, object, Set, etc.) or undefined */ function evaluateStylePropertiesNode(node, scope) { if (!node) { @@ -297,10 +297,10 @@ function evaluateStylePropertiesNode(node, scope) { * and evaluates all variable declarations to extract style property metadata. * * The styleProperties.ts file contains definitions like: - * const properties = { - * spacing: { margin: ['0', '4', '8', '12'], padding: [...] }, - * layout: { display: ['flex', 'grid', 'block'] } - * } + * const properties = { + * spacing: { margin: ['0', '4', '8', '12'], padding: [...] }, + * layout: { display: ['flex', 'grid', 'block'] } + * } * * This function evaluates these declarations and returns a structured object with: * - properties: categorized style properties and their allowed values @@ -308,7 +308,7 @@ function evaluateStylePropertiesNode(node, scope) { * - mdnTypeLinks/mdnPropertyLinks: documentation URLs * - various Sets for property categorization (spacing, sizing, etc.) * - * @returns {object|null} Parsed style macro data or null if file doesn't exist/parse fails + * @returns {object | null} Parsed style macro data or null if file doesn't exist/parse fails */ function loadStyleMacroData() { if (styleMacroDataCache !== null) { @@ -387,23 +387,23 @@ function loadStyleMacroData() { * * Example: For category 'spacing', this returns an object like: * { - * margin: { - * values: ['0', '4', '8', '12', '16'], - * additionalTypes: ['baseSpacing', 'number'], - * links: { '0': {href: 'https://...'} }, - * description: 'Sets the margin on all sides' - * }, - * marginX: { - * values: [...], - * additionalTypes: [...], - * links: {...}, - * mapping: ['marginLeft', 'marginRight'], // for shorthands - * description: 'Sets horizontal margins' - * } + * margin: { + * values: ['0', '4', '8', '12', '16'], + * additionalTypes: ['baseSpacing', 'number'], + * links: { '0': {href: 'https://...'} }, + * description: 'Sets the margin on all sides' + * }, + * marginX: { + * values: [...], + * additionalTypes: [...], + * links: {...}, + * mapping: ['marginLeft', 'marginRight'], // for shorthands + * description: 'Sets horizontal margins' + * } * } * * @param {string} category - The property category (e.g., 'spacing', 'layout', 'colors') - * @returns {object|null} Property definitions or null if category doesn't exist + * @returns {object | null} Property definitions or null if category doesn't exist */ function getStyleMacroPropertyDefinitions(category) { const data = loadStyleMacroData(); @@ -509,21 +509,24 @@ function getStyleMacroPropertyDefinitions(category) { * Generates a markdown table documenting style macro properties and their allowed values. * * Example output for category 'spacing': - * | Property | Values | - * |---------|--------| - * | margin | `0`, `4`, `8`, `12`, `baseSpacing (0, 4, 8, 12, 16, 20, 24, 28, 32)`, `number`, `lengthPercentage` | - * | marginX | `0`, `4`, `8`, `baseSpacing (...)`, `number` | - * | padding | `0`, `4`, `8`, `12`, `baseSpacing (...)` | + * + * | Property | Values | + * | -------- | -------------------------------------------------------------------------------------------------- | + * | margin | `0`, `4`, `8`, `12`, `baseSpacing (0, 4, 8, 12, 16, 20, 24, 28, 32)`, `number`, `lengthPercentage` | + * | marginX | `0`, `4`, `8`, `baseSpacing (...)`, `number` | + * | padding | `0`, `4`, `8`, `12`, `baseSpacing (...)` | * * The table includes: + * * - Explicit allowed values (e.g., '0', '4', '8') * - Type categories with their full value sets (e.g., 'baseSpacing (0, 4, 8, ...)') * - Generic types (e.g., 'number', 'lengthPercentage') * - * @param {string} category - Property category to generate table for (e.g., 'spacing', 'layout', 'colors') + * @param {string} category - Property category to generate table for (e.g., 'spacing', 'layout', + * 'colors') * @param {object} options - Configuration options (e.g., {sort: true}) * @param {boolean} options.sort - Whether to sort properties alphabetically (default: true) - * @returns {string|null} Markdown table string or null if no properties found + * @returns {string | null} Markdown table string or null if no properties found */ function generateStyleMacroTable(category, {sort = true} = {}) { const cacheKey = `${category}:${sort ? 'sorted' : 'original'}`; @@ -1062,7 +1065,8 @@ function resolveComponentPath(componentName, file, docsSource) { } /** - * Extract the leading JSDoc description comment placed immediately above the export for a component. + * Extract the leading JSDoc description comment placed immediately above the export for a + * component. */ function getComponentDescription(componentName, file, docsSource) { // Check cache first @@ -1172,6 +1176,7 @@ function shouldOmitSymbol(sym) { /** * Extracts one or more `@example` tag contents from JSDoc comments. + * * @param {string} text - The text to extract examples from. * @returns {string[]} An array of examples. */ @@ -3383,9 +3388,9 @@ function generateLibraryLlmsTxt(lib, files) { } /** - * Scans the MDX pages in packages/dev/s2-docs/pages and produces a text-based markdown variant of each file. - * React-specific JSX elements such as and are replaced with plain markdown equivalents so - * that the resulting *.md files can be consumed by LLMs. + * Scans the MDX pages in packages/dev/s2-docs/pages and produces a text-based markdown variant of + * each file. React-specific JSX elements such as and are replaced + * with plain markdown equivalents so that the resulting *.md files can be consumed by LLMs. */ async function main() { const mdxFiles = await glob('*/**/*.mdx', { diff --git a/packages/dev/s2-docs/scripts/testAccessibility.mjs b/packages/dev/s2-docs/scripts/testAccessibility.mjs index 8630e658e11..65a46f8beab 100644 --- a/packages/dev/s2-docs/scripts/testAccessibility.mjs +++ b/packages/dev/s2-docs/scripts/testAccessibility.mjs @@ -1,23 +1,22 @@ #!/usr/bin/env node /** - * Accessibility Testing Script for s2-docs + * Accessibility Testing Script for s2-docs. * * This script opens each documentation page in Playwright and checks for Axe accessibility errors. * * Usage: - * node scripts/testAccessibility.mjs [options] + * node scripts/testAccessibility.mjs [options] * * Options: - * --library Which docs to test (default: all) - * --base-url Base URL for the docs server (default: http://localhost:1234) - * --headless Run in headless mode (default: true) - * --no-html-ext Don't add .html extension to URLs (for CloudFront deployments) - * --strip-prefix Strip the s2/ or react-aria/ prefix from URLs + * --library Which docs to test (default: all) + * --base-url Base URL for the docs server (default: http://localhost:1234) + * --headless Run in headless mode (default: true) + * --no-html-ext Don't add .html extension to URLs (for CloudFront deployments) + * --strip-prefix Strip the s2/ or react-aria/ prefix from URLs. * - * Examples: - * node scripts/testAccessibility.mjs - * node scripts/testAccessibility.mjs --library s2 - * node scripts/testAccessibility.mjs --base-url https://cloudfront.net/pr/xyz --no-html-ext --strip-prefix + * Examples: node scripts/testAccessibility.mjs node scripts/testAccessibility.mjs --library s2 node + * scripts/testAccessibility.mjs --base-url https://cloudfront.net/pr/xyz --no-html-ext + * --strip-prefix. */ import {chromium} from 'playwright'; @@ -34,11 +33,11 @@ const pagesDir = path.resolve(__dirname, '../pages'); /** * Known false positives in React Spectrum components. * These are documented accessibility tool issues that don't represent actual a11y problems. - * See: https://react-spectrum.adobe.com/react-spectrum/accessibility.html + * See: https://react-spectrum.adobe.com/react-spectrum/accessibility.html. * * Format: { pagePattern: [ruleIds to ignore] } * - pagePattern can be a string (exact match) or regex pattern - * - ruleIds are axe-core rule identifiers + * - ruleIds are axe-core rule identifiers. */ const KNOWN_FALSE_POSITIVES = { // ListBox: WAI-ARIA 1.2 supports groups in listbox, but axe-core hasn't caught up diff --git a/packages/dev/s2-docs/scripts/validateS2DocsBuild.mjs b/packages/dev/s2-docs/scripts/validateS2DocsBuild.mjs index 26e11175ca1..38498c17793 100644 --- a/packages/dev/s2-docs/scripts/validateS2DocsBuild.mjs +++ b/packages/dev/s2-docs/scripts/validateS2DocsBuild.mjs @@ -1,11 +1,12 @@ #!/usr/bin/env node /** * Script to validate s2-docs build output. + * * - Confirms the build directory exists and contains files. * - Checks for duplicate occurrences in HTML files. * * Usage: node scripts/validateS2DocsBuild.mjs [directory] - * Default directory: ./dist + * Default directory: ./dist. */ import {dirname, join} from 'path'; diff --git a/packages/dev/s2-docs/src/LabeledValueTypes.ts b/packages/dev/s2-docs/src/LabeledValueTypes.ts index 7dd58c2df7b..d6cf2e39183 100644 --- a/packages/dev/s2-docs/src/LabeledValueTypes.ts +++ b/packages/dev/s2-docs/src/LabeledValueTypes.ts @@ -17,25 +17,37 @@ export interface LabeledValueProps extends LabeledValueBaseProps, LabeledValueSt | DateTime | RangeValue | ReactElement; - /** Formatting options for the value. The available options depend on the type passed to the `value` prop. */ + /** + * Formatting options for the value. The available options depend on the type passed to the + * `value` prop. + */ formatOptions?: Intl.NumberFormatOptions | Intl.DateTimeFormatOptions | Intl.ListFormatOptions; } export interface LabeledValueNumberProps extends LabeledValueBaseProps, LabeledValueStyleProps { /** The value to display. */ value: number | RangeValue; - /** Formatting options for the value. The available options depend on the type passed to the `value` prop. */ + /** + * Formatting options for the value. The available options depend on the type passed to the + * `value` prop. + */ formatOptions?: Intl.NumberFormatOptions; } export interface LabeledValueDateTimeProps extends LabeledValueBaseProps, LabeledValueStyleProps { /** The value to display. */ value: DateTime | RangeValue; - /** Formatting options for the value. The available options depend on the type passed to the `value` prop. */ + /** + * Formatting options for the value. The available options depend on the type passed to the + * `value` prop. + */ formatOptions?: Intl.DateTimeFormatOptions; } export interface LabeledValueListProps extends LabeledValueBaseProps, LabeledValueStyleProps { /** The value to display. */ value: string[]; - /** Formatting options for the value. The available options depend on the type passed to the `value` prop. */ + /** + * Formatting options for the value. The available options depend on the type passed to the + * `value` prop. + */ formatOptions?: Intl.ListFormatOptions; } diff --git a/packages/dev/s2-docs/src/Tabs.tsx b/packages/dev/s2-docs/src/Tabs.tsx index d455529fc41..9a929a3d3f7 100644 --- a/packages/dev/s2-docs/src/Tabs.tsx +++ b/packages/dev/s2-docs/src/Tabs.tsx @@ -64,7 +64,8 @@ const tabs = style({ }); /** - * Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit. + * Tabs organize content into multiple sections and allow users to navigate between them. The + * content under the set of tabs should be related and form a coherent unit. */ export const Tabs = forwardRef(function Tabs(props: TabsProps, ref: DOMRef) { let domRef = useDOMRef(ref); diff --git a/packages/dev/s2-docs/src/color.macro.ts b/packages/dev/s2-docs/src/color.macro.ts index 4db0f29d3a2..0d05ce72c6f 100644 --- a/packages/dev/s2-docs/src/color.macro.ts +++ b/packages/dev/s2-docs/src/color.macro.ts @@ -37,6 +37,7 @@ export function colorSwatch( /** * Gets the RGB values for a color token. + * * @param tokenName - The token name to look up. * @param mode - 'light' or 'dark' mode. * @returns [r, g, b] or null if not found. diff --git a/packages/dev/storybook-builder-parcel/gen-preview-modern.mjs b/packages/dev/storybook-builder-parcel/gen-preview-modern.mjs index 68b1cbf48e5..c885fa3ede9 100644 --- a/packages/dev/storybook-builder-parcel/gen-preview-modern.mjs +++ b/packages/dev/storybook-builder-parcel/gen-preview-modern.mjs @@ -84,15 +84,16 @@ async function generatePreviewModern(options, generatedEntries) { * Main preview module loaded directly by iframe.html as