@react-aria/steplist 3.0.0-nightly.4674 → 3.0.0-nightly.4681

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types.d.ts CHANGED
@@ -6,7 +6,7 @@ export interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProp
6
6
  export interface StepListAria {
7
7
  listProps: HTMLAttributes<HTMLElement>;
8
8
  }
9
- export function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria;
9
+ export function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement | null>): StepListAria;
10
10
  export interface AriaStepListItemProps {
11
11
  key: Key;
12
12
  }
@@ -18,6 +18,6 @@ export interface StepListItemAria {
18
18
  /** Text content for the visually hidden message indicating the status of the step state. */
19
19
  stepStateText?: String;
20
20
  }
21
- export function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria;
21
+ export function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement | null>): StepListItemAria;
22
22
 
23
23
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;AAqBA,mCAAmC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ;CAAG;AAE9F;IACE,SAAS,EAAE,eAAe,WAAW,CAAC,CAAA;CACvC;AAED,4BAA4B,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,CAAC,GAAG,YAAY,CAuBnI;ACjCD;IACE,GAAG,EAAE,GAAG,CAAA;CACT;AAED;IACE,uCAAuC;IACvC,SAAS,EAAE,eAAe,WAAW,CAAC,CAAC;IACvC,uEAAuE;IACvE,cAAc,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,gCAAgC,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,CAAC,GAAG,gBAAgB,CAoCvI","sources":["packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/useStepListItem.ts","packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useStepList} from './useStepList';\nexport {useStepListItem} from './useStepListItem';\n\nexport type {AriaStepListProps, StepListAria} from './useStepList';\nexport type {AriaStepListItemProps, StepListItemAria} from './useStepListItem';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAqBA,mCAAmC,CAAC,CAAE,SAAQ,cAAc,CAAC,CAAC,EAAE,iBAAiB,EAAE,QAAQ;CAAG;AAE9F;IACE,SAAS,EAAE,eAAe,WAAW,CAAC,CAAA;CACvC;AAED,4BAA4B,CAAC,EAAE,KAAK,EAAE,kBAAkB,CAAC,CAAC,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,YAAY,CAuB1I;ACjCD;IACE,GAAG,EAAE,GAAG,CAAA;CACT;AAED;IACE,uCAAuC;IACvC,SAAS,EAAE,eAAe,WAAW,CAAC,CAAC;IACvC,uEAAuE;IACvE,cAAc,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC7C,4FAA4F;IAC5F,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,gCAAgC,CAAC,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,gBAAgB,CAoC9I","sources":["packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/useStepList.ts","packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/useStepListItem.ts","packages/@react-aria/steplist/src/packages/@react-aria/steplist/src/index.ts","packages/@react-aria/steplist/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport {useStepList} from './useStepList';\nexport {useStepListItem} from './useStepListItem';\n\nexport type {AriaStepListProps, StepListAria} from './useStepList';\nexport type {AriaStepListItemProps, StepListItemAria} from './useStepListItem';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBM,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAgC;IACnH,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,gCAAS,EAAE,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepList.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n"],"names":[],"version":3,"file":"useStepList.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBM,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAuC;IAC1H,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,gCAAS,EAAE,WAAW,CAAA,GAAA,oCAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepList.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement | null>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n"],"names":[],"version":3,"file":"useStepList.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBM,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAgC;IACnH,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,iBAAS,EAAE,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepList.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n"],"names":[],"version":3,"file":"useStepList.module.js.map"}
1
+ {"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBM,SAAS,0CAAe,KAA2B,EAAE,KAAuB,EAAE,GAAuC;IAC1H,IAAI,EACF,cAAc,SAAS,EACxB,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAClC,GAAG,KAAK;QACR,GAAG,KAAK;QACR,qBAAqB;aACrB;IACF;IAEA,MAAM,UAAU,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAC1D,MAAM,gBAA6C;QACjD,GAAG,CAAA,GAAA,iBAAS,EAAE,WAAW,CAAA,GAAA,qBAAa,EAAE,OAAO;YAAC,WAAW;QAAI,GAAG;QAClE,cAAc,aAAa,QAAQ,MAAM,CAAC;IAC5C;IAEA,OAAO;QACL,WAAW;YACT,GAAG,aAAa;YAChB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepList.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {StepListProps, StepListState} from '@react-stately/steplist';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useSelectableList} from '@react-aria/selection';\n\nexport interface AriaStepListProps<T> extends StepListProps<T>, AriaLabelingProps, DOMProps {}\n\nexport interface StepListAria {\n listProps: HTMLAttributes<HTMLElement>\n}\n\nexport function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement | null>): StepListAria {\n let {\n 'aria-label': ariaLabel\n } = props;\n let {listProps} = useSelectableList({\n ...props,\n ...state,\n allowsTabNavigation: true,\n ref\n });\n\n const strings = useLocalizedStringFormatter(intlMessages, '@react-aria/steplist');\n const stepListProps: HTMLAttributes<HTMLElement> = {\n ...mergeProps(listProps, filterDOMProps(props, {labelable: true})),\n 'aria-label': ariaLabel || strings.format('steplist')\n };\n\n return {\n listProps: {\n ...stepListProps,\n tabIndex: undefined\n }\n };\n}\n\n\n"],"names":[],"version":3,"file":"useStepList.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAA2B;IACnH,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;YAQf;QAPA,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;SAEA,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IACxB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown?.(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useStepListItem.main.js.map"}
1
+ {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAAkC;IAC1H,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;YAQf;QAPA,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;SAEA,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IACxB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement | null>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown?.(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useStepListItem.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;AAAA;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAA2B;IACnH,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;YAQf;QAPA,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;SAEA,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IACxB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown?.(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useStepListItem.module.js.map"}
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAoBM,SAAS,0CAAmB,KAA4B,EAAE,KAAuB,EAAE,GAAkC;IAC1H,MAAM,OAAC,GAAG,EAAC,GAAG;IACd,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,CAAC,MAAM,YAAY,CAAC;IAErC,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;oBAClC;aACA;aACA;QACA,kBAAkB;IACpB;IAEA,MAAM,aAAa,gBAAgB;IAEnC,IAAI,YAAY,CAAC;YAQf;QAPA,MAAM,EAAC,KAAK,QAAQ,EAAC,GAAG;QAExB,IAAI,aAAa,eAAe,aAAa,WAAW;YACtD,MAAM,cAAc;YACpB,MAAM,eAAe;QACvB;SAEA,uBAAA,UAAU,SAAS,cAAnB,2CAAA,0BAAA,WAAsB;IACxB;IAEA,OAAO;QACL,WAAW;YACT,GAAG,SAAS;uBACZ;YACA,MAAM;YACN,gBAAgB,aAAa,SAAS;YACtC,iBAAiB,aAAa,OAAO;YACrC,UAAU,CAAC,aAAa,IAAI;QAC9B;IACF;AACF","sources":["packages/@react-aria/steplist/src/useStepListItem.ts"],"sourcesContent":["/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {HTMLAttributes, RefObject} from 'react';\nimport {Key} from '@react-types/shared';\nimport {StepListState} from '@react-stately/steplist';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface AriaStepListItemProps {\n key: Key\n}\n\nexport interface StepListItemAria {\n /** Props for the step link element. */\n stepProps: HTMLAttributes<HTMLElement>,\n /** Props for the visually hidden element indicating the step state. */\n stepStateProps?: HTMLAttributes<HTMLElement>,\n /** Text content for the visually hidden message indicating the status of the step state. */\n stepStateText?: String\n}\n\nexport function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement | null>): StepListItemAria {\n const {key} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isDisabled = !state.isSelectable(key);\n\n let {itemProps} = useSelectableItem({\n isDisabled,\n key,\n ref,\n selectionManager: manager\n });\n\n const isSelected = selectedKey === key;\n\n let onKeyDown = (event) => {\n const {key: eventKey} = event;\n\n if (eventKey === 'ArrowDown' || eventKey === 'ArrowUp') {\n event.preventDefault();\n event.stopPropagation();\n }\n\n itemProps.onKeyDown?.(event);\n };\n\n return {\n stepProps: {\n ...itemProps,\n onKeyDown,\n role: 'link',\n 'aria-current': isSelected ? 'step' : undefined,\n 'aria-disabled': isDisabled ? true : undefined,\n tabIndex: !isDisabled ? 0 : undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useStepListItem.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/steplist",
3
- "version": "3.0.0-nightly.4674+59136f78e",
3
+ "version": "3.0.0-nightly.4681+2fd87d9f1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,19 +22,19 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/i18n": "3.0.0-nightly.2962+59136f78e",
26
- "@react-aria/selection": "3.0.0-nightly.2962+59136f78e",
27
- "@react-aria/utils": "3.0.0-nightly.2962+59136f78e",
28
- "@react-stately/steplist": "3.0.0-nightly.4674+59136f78e",
29
- "@react-types/shared": "3.0.0-nightly.2962+59136f78e",
25
+ "@react-aria/i18n": "3.0.0-nightly.2969+2fd87d9f1",
26
+ "@react-aria/selection": "3.0.0-nightly.2969+2fd87d9f1",
27
+ "@react-aria/utils": "3.0.0-nightly.2969+2fd87d9f1",
28
+ "@react-stately/steplist": "3.0.0-nightly.4681+2fd87d9f1",
29
+ "@react-types/shared": "3.0.0-nightly.2969+2fd87d9f1",
30
30
  "@swc/helpers": "^0.5.0"
31
31
  },
32
32
  "peerDependencies": {
33
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0",
34
- "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
33
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0",
34
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"
38
38
  },
39
- "gitHead": "59136f78e853e97bb4067a1268750c9f85900bf6"
39
+ "gitHead": "2fd87d9f1d894e6b00a595cce73c6e8828029132"
40
40
  }
@@ -25,7 +25,7 @@ export interface StepListAria {
25
25
  listProps: HTMLAttributes<HTMLElement>
26
26
  }
27
27
 
28
- export function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement>): StepListAria {
28
+ export function useStepList<T>(props: AriaStepListProps<T>, state: StepListState<T>, ref: RefObject<HTMLOListElement | null>): StepListAria {
29
29
  let {
30
30
  'aria-label': ariaLabel
31
31
  } = props;
@@ -28,7 +28,7 @@ export interface StepListItemAria {
28
28
  stepStateText?: String
29
29
  }
30
30
 
31
- export function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement>): StepListItemAria {
31
+ export function useStepListItem<T>(props: AriaStepListItemProps, state: StepListState<T>, ref: RefObject<HTMLElement | null>): StepListItemAria {
32
32
  const {key} = props;
33
33
  let {selectionManager: manager, selectedKey} = state;
34
34