Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@ orbs:
executors:
rsp:
docker:
- image: cimg/node:24.13.0
- image: cimg/node:24.14.1
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-large:
docker:
- image: cimg/node:24.13.0
- image: cimg/node:24.14.1
resource_class: large
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-xlarge:
docker:
- image: cimg/node:24.13.0
- image: cimg/node:24.14.1
resource_class: xlarge
environment:
CACHE_VERSION: v1
working_directory: ~/react-spectrum

rsp-2xlarge:
docker:
- image: cimg/node:24.13.0
- image: cimg/node:24.14.1
resource_class: 2xlarge
environment:
CACHE_VERSION: v1
Expand All @@ -63,10 +63,17 @@ commands:
- run:
name: Check AWS credentials
command: |
if [ -z "$AWS_ACCESS_KEY_ID" ] || [ -z "$AWS_SECRET_ACCESS_KEY" ]; then
if [ -z "$AWS_ROLE_ARN" ]; then
echo "AWS credentials not found"
circleci-agent step halt
fi
- aws-cli/setup:
role_arn: $AWS_ROLE_ARN
region: $AWS_DEFAULT_REGION
role_session_name: "CircleCI-Deploy-Session"
- run:
name: Verify AWS CLI setup
command: aws sts get-caller-identity
- run:
name: Configure AWS CLI for concurrent requests
command: aws configure set default.s3.max_concurrent_requests 100
Expand Down Expand Up @@ -933,20 +940,26 @@ workflows:
- install
filters:
branches:
ignore: main
ignore:
- /main$/
- /gh-readonly-queue\/.*$/
- ts-build-branch:
requires:
- install
filters:
branches:
ignore: main
ignore:
- /main$/
- /gh-readonly-queue\/.*$/
- ts-diff:
requires:
- ts-build-fork-point
- ts-build-branch
filters:
branches:
ignore: main
ignore:
- /main$/
- /gh-readonly-queue\/.*$/
- typecheck-docs:
requires:
- install
Expand Down
17 changes: 12 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ If you are looking for place to start, consider the following options:

## Developing
When you are ready to start developing you can clone the repo and start storybook.
Make sure you have the following requirements installed: [node](https://nodejs.org/) (v24.13.0+) and [yarn](https://yarnpkg.com/en/) (v1.22.0+)

Make sure you have the following requirements installed: [node](https://nodejs.org/) (v24.14.1+) and [yarn](https://yarnpkg.com/en/) (v1.22.0+)

Fork the repo first using [this guide](https://help.github.com/articles/fork-a-repo), then clone it locally.
```
Expand All @@ -74,7 +75,7 @@ yarn start

Or run the documentation and browse to [http://localhost:1234/](http://localhost:1234/) with:
```bash
yarn start:docs
yarn start:s2-docs
```

### Tests
Expand All @@ -90,13 +91,13 @@ We use [jest](https://jestjs.io/) for unit tests and [react-testing-library](htt
You can run the tests with:

```bash
yarn jest
yarn test
```

You can also get a code coverage report by running:

```bash
yarn jest --coverage
yarn test --coverage
```

### Linting
Expand All @@ -118,12 +119,18 @@ yarn start
```
Then, open [http://localhost:9003](http://localhost:9003) in your browser to play around with the components and test your changes.

For S2 Storybook, run:
```bash
yarn start:s2
```
Then, open [http://localhost:6006](http://localhost:6006).

### Documentation
Our documentation should always remain up to date. When making changes to components, make sure the appropriate documentation has been updated to reflect those changes. Documentation for each component can be found in the docs folder within a component's package. Other documentation pages can be found in the [packages/dev/docs](https://github.com/adobe/react-spectrum/tree/main/packages/dev/docs) folder in the codebase.

Documentation can be run locally by using
```bash
yarn start:docs
yarn start:s2-docs
```
Then, open [http://localhost:1234](http://localhost:1234) in your browser.

Expand Down
3 changes: 2 additions & 1 deletion packages/@adobe/react-spectrum/src/checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const Checkbox = forwardRef(function Checkbox(props: SpectrumCheckboxProp
// This is a bit unorthodox. Typically, hooks cannot be called in a conditional,
// but since the checkbox won't move in and out of a group, it should be safe.
let groupState = useContext(CheckboxGroupContext);
let {inputProps, isInvalid, isDisabled} = groupState
let {labelProps, inputProps, isInvalid, isDisabled} = groupState
// eslint-disable-next-line react-hooks/rules-of-hooks
? useCheckboxGroupItem({
...props,
Expand Down Expand Up @@ -104,6 +104,7 @@ export const Checkbox = forwardRef(function Checkbox(props: SpectrumCheckboxProp

return (
<label
{...labelProps}
{...styleProps}
{...hoverProps}
ref={domRef}
Expand Down
3 changes: 2 additions & 1 deletion packages/@adobe/react-spectrum/src/radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,15 @@ export const Radio = forwardRef(function Radio(props: SpectrumRadioProps, ref: F
state
} = radioGroupProps;

let {inputProps} = useRadio({
let {labelProps, inputProps} = useRadio({
...props,
...radioGroupProps,
isDisabled
}, state, inputRef);

return (
<label
{...labelProps}
{...styleProps}
{...hoverProps}
ref={domRef}
Expand Down
3 changes: 2 additions & 1 deletion packages/@adobe/react-spectrum/src/switch/Switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ export const Switch = forwardRef(function Switch(props: SpectrumSwitchProps, ref
let inputRef = useRef<HTMLInputElement>(null);
let domRef = useFocusableRef(ref, inputRef);
let state = useToggleState(props);
let {inputProps} = useSwitch(props, state, inputRef);
let {labelProps, inputProps} = useSwitch(props, state, inputRef);


return (
<label
{...labelProps}
{...styleProps}
{...hoverProps}
ref={domRef}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1621,8 +1621,8 @@ describe('DatePicker', function () {
testInput('era,', new CalendarDate(new JapaneseCalendar(), 'reiwa', 5, 2, 3), 'h', new CalendarDate(new JapaneseCalendar(), 'heisei', 5, 2, 3), false, {locale: 'en-US-u-ca-japanese'});
testInput('era,', new CalendarDate(new JapaneseCalendar(), 'reiwa', 5, 2, 3), 's', new CalendarDate(new JapaneseCalendar(), 'showa', 5, 2, 3), false, {locale: 'en-US-u-ca-japanese'});
testInput('era,', new CalendarDate(new JapaneseCalendar(), 'showa', 5, 2, 3), 'r', new CalendarDate(new JapaneseCalendar(), 'reiwa', 5, 2, 3), false, {locale: 'en-US-u-ca-japanese'});
testInput('era,', new CalendarDate(new EthiopicCalendar(), 'AM', 2012, 2, 3), '0', new CalendarDate(new EthiopicCalendar(), 'AA', 2012, 2, 3), false, {locale: 'en-US-u-ca-ethiopic'});
testInput('era,', new CalendarDate(new EthiopicCalendar(), 'AA', 2012, 2, 3), '1', new CalendarDate(new EthiopicCalendar(), 'AM', 2012, 2, 3), false, {locale: 'en-US-u-ca-ethiopic'});
testInput('era,', new CalendarDate(new EthiopicCalendar(), 'AM', 2012, 2, 3), 'A', new CalendarDate(new EthiopicCalendar(), 'AA', 2012, 2, 3), false, {locale: 'en-US-u-ca-ethiopic'});
testInput('era,', new CalendarDate(new EthiopicCalendar(), 'AA', 2012, 2, 3), 'M', new CalendarDate(new EthiopicCalendar(), 'AM', 2012, 2, 3), false, {locale: 'en-US-u-ca-ethiopic'});
});

it('should allow entering invalid dates, and constrain on blur', async function () {
Expand Down
5 changes: 5 additions & 0 deletions packages/@internationalized/number/src/NumberParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ class NumberParserImpl {
value = replaceAll(value, "'", this.symbols.group);
}

// On newer ICU versions, the special single quote has been normalized, so we need to backport.
if (this.symbols.group === "'" && value.includes('’') && isGroupSymbolAllowed) {
value = replaceAll(value, '’', this.symbols.group);
}

// fr-FR group character is narrow non-breaking space, char code 8239 (U+202F), but that's not a key on the french keyboard,
// so allow space and non-breaking space as a group char as well
if (this.options.locale === 'fr-FR' && this.symbols.group && isGroupSymbolAllowed) {
Expand Down
Loading
Loading