@react-aria/tabs 3.9.2-nightly.4701 → 3.9.2-nightly.4709

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
@@ -1,6 +1,5 @@
1
1
  import { AriaTabProps, AriaTabPanelProps, AriaTabListProps } from "@react-types/tabs";
2
- import { DOMAttributes, FocusableElement } from "@react-types/shared";
3
- import { RefObject } from "react";
2
+ import { DOMAttributes, FocusableElement, RefObject } from "@react-types/shared";
4
3
  import { TabListState } from "@react-stately/tabs";
5
4
  export interface TabAria {
6
5
  /** Props for the tab element. */
@@ -1 +1 @@
1
- {"mappings":";;;;ACoBA;IACE,iCAAiC;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,uBAAuB,CAAC,EACtB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,aAAa,CAAC,CAAC,EACtB,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GACtC,OAAO,CAsCT;ACzDD;IACE,uCAAuC;IACvC,aAAa,EAAE,aAAa,CAAA;CAC7B;AAGD;;;GAGG;AACH,4BAA4B,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,GAAG,YAAY,CAiB7H;AEzBD,oCAAoC,CAAC,CAAE,SAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC;CAAG;AAEvF;IACE,uCAAuC;IACvC,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED;;;GAGG;AACH,2BAA2B,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,WAAW,CAyCnI;AC5DD,YAAY,EAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AACzF,YAAY,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/utils.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/useTab.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/useTabPanel.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/TabsKeyboardDelegate.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/useTabList.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/index.ts","packages/@react-aria/tabs/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"/*\n * Copyright 2020 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 */\nexport {useTab} from './useTab';\nexport {useTabPanel} from './useTabPanel';\nexport {useTabList} from './useTabList';\nexport type {AriaTabListProps, AriaTabPanelProps, AriaTabProps} from '@react-types/tabs';\nexport type {Orientation} from '@react-types/shared';\nexport type {TabAria} from './useTab';\nexport type {TabPanelAria} from './useTabPanel';\nexport type {AriaTabListOptions, TabListAria} from './useTabList';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;ACmBA;IACE,iCAAiC;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,6CAA6C;IAC7C,UAAU,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,UAAU,EAAE,OAAO,CAAC;IACpB,uDAAuD;IACvD,SAAS,EAAE,OAAO,CAAA;CACnB;AAED;;;GAGG;AACH,uBAAuB,CAAC,EACtB,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,aAAa,CAAC,CAAC,EACtB,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GACtC,OAAO,CAsCT;ACzDD;IACE,uCAAuC;IACvC,aAAa,EAAE,aAAa,CAAA;CAC7B;AAGD;;;GAGG;AACH,4BAA4B,CAAC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,OAAO,GAAG,IAAI,CAAC,GAAG,YAAY,CAiB7H;AExBD,oCAAoC,CAAC,CAAE,SAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,UAAU,CAAC;CAAG;AAEvF;IACE,uCAAuC;IACvC,YAAY,EAAE,aAAa,CAAA;CAC5B;AAED;;;GAGG;AACH,2BAA2B,CAAC,EAAE,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,EAAE,GAAG,EAAE,UAAU,WAAW,GAAG,IAAI,CAAC,GAAG,WAAW,CAyCnI;AC5DD,YAAY,EAAC,gBAAgB,EAAE,iBAAiB,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AACzF,YAAY,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAC","sources":["packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/utils.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/useTab.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/useTabPanel.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/TabsKeyboardDelegate.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/useTabList.ts","packages/@react-aria/tabs/src/packages/@react-aria/tabs/src/index.ts","packages/@react-aria/tabs/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,"/*\n * Copyright 2020 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 */\nexport {useTab} from './useTab';\nexport {useTabPanel} from './useTabPanel';\nexport {useTabList} from './useTabList';\nexport type {AriaTabListProps, AriaTabPanelProps, AriaTabProps} from '@react-types/tabs';\nexport type {Orientation} from '@react-types/shared';\nexport type {TabAria} from './useTab';\nexport type {TabPanelAria} from './useTabPanel';\nexport type {AriaTabListOptions, TabListAria} from './useTabList';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAyBM,SAAS,0CACd,KAAmB,EACnB,KAAsB,EACtB,GAAuC;IAEvC,IAAI,OAAC,GAAG,EAAE,YAAY,aAAa,yBAAE,qBAAqB,EAAC,GAAG;IAC9D,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,QAAQ;IAEzB,IAAI,aAAa,iBAAiB,MAAM,UAAU,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC;IACxF,IAAI,aAAC,SAAS,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;QAC7C,kBAAkB;aAClB;aACA;oBACA;+BACA;QACA,cAAc;IAChB;IAEA,IAAI,QAAQ,CAAA,GAAA,oCAAS,EAAE,OAAO,KAAK;IACnC,IAAI,aAAa,CAAA,GAAA,oCAAS,EAAE,OAAO,KAAK;IACxC,IAAI,YAAC,QAAQ,EAAC,GAAG;IAEjB,IAAI,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;IACpC,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,iBAAA,2BAAA,KAAM,KAAK,EAAE;QAAC,WAAW;IAAI;IAC3D,OAAO,SAAS,EAAE;IAClB,IAAI,YAAY,CAAA,GAAA,kCAAW,EAAE,iBAAA,2BAAA,KAAM,KAAK;IAExC,OAAO;QACL,UAAU,CAAA,GAAA,gCAAS,EAAE,UAAU,WAAW,WAAW;YACnD,IAAI;YACJ,iBAAiB;YACjB,iBAAiB,cAAc;YAC/B,iBAAiB,aAAa,aAAa;YAC3C,UAAU,aAAa,YAAY;YACnC,MAAM;QACR;oBACA;oBACA;mBACA;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTab.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabProps} from '@react-types/tabs';\nimport {DOMAttributes, FocusableElement} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useLinkProps} from '@react-aria/utils';\nimport {generateId} from './utils';\nimport {RefObject} from 'react';\nimport {TabListState} from '@react-stately/tabs';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface TabAria {\n /** Props for the tab element. */\n tabProps: DOMAttributes,\n /** Whether the tab is currently selected. */\n isSelected: boolean,\n /** Whether the tab is disabled. */\n isDisabled: boolean,\n /** Whether the tab is currently in a pressed state. */\n isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab.\n * When selected, the associated tab panel is shown.\n */\nexport function useTab<T>(\n props: AriaTabProps,\n state: TabListState<T>,\n ref: RefObject<FocusableElement | null>\n): TabAria {\n let {key, isDisabled: propsDisabled, shouldSelectOnPressUp} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isSelected = key === selectedKey;\n\n let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);\n let {itemProps, isPressed} = useSelectableItem({\n selectionManager: manager,\n key,\n ref,\n isDisabled,\n shouldSelectOnPressUp,\n linkBehavior: 'selection'\n });\n\n let tabId = generateId(state, key, 'tab');\n let tabPanelId = generateId(state, key, 'tabpanel');\n let {tabIndex} = itemProps;\n\n let item = state.collection.getItem(key);\n let domProps = filterDOMProps(item?.props, {labelable: true});\n delete domProps.id;\n let linkProps = useLinkProps(item?.props);\n\n return {\n tabProps: mergeProps(domProps, linkProps, itemProps, {\n id: tabId,\n 'aria-selected': isSelected,\n 'aria-disabled': isDisabled || undefined,\n 'aria-controls': isSelected ? tabPanelId : undefined,\n tabIndex: isDisabled ? undefined : tabIndex,\n role: 'tab'\n }),\n isSelected,\n isDisabled,\n isPressed\n };\n}\n"],"names":[],"version":3,"file":"useTab.main.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAwBM,SAAS,0CACd,KAAmB,EACnB,KAAsB,EACtB,GAAuC;IAEvC,IAAI,OAAC,GAAG,EAAE,YAAY,aAAa,yBAAE,qBAAqB,EAAC,GAAG;IAC9D,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,QAAQ;IAEzB,IAAI,aAAa,iBAAiB,MAAM,UAAU,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC;IACxF,IAAI,aAAC,SAAS,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,2CAAgB,EAAE;QAC7C,kBAAkB;aAClB;aACA;oBACA;+BACA;QACA,cAAc;IAChB;IAEA,IAAI,QAAQ,CAAA,GAAA,oCAAS,EAAE,OAAO,KAAK;IACnC,IAAI,aAAa,CAAA,GAAA,oCAAS,EAAE,OAAO,KAAK;IACxC,IAAI,YAAC,QAAQ,EAAC,GAAG;IAEjB,IAAI,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;IACpC,IAAI,WAAW,CAAA,GAAA,oCAAa,EAAE,iBAAA,2BAAA,KAAM,KAAK,EAAE;QAAC,WAAW;IAAI;IAC3D,OAAO,SAAS,EAAE;IAClB,IAAI,YAAY,CAAA,GAAA,kCAAW,EAAE,iBAAA,2BAAA,KAAM,KAAK;IAExC,OAAO;QACL,UAAU,CAAA,GAAA,gCAAS,EAAE,UAAU,WAAW,WAAW;YACnD,IAAI;YACJ,iBAAiB;YACjB,iBAAiB,cAAc;YAC/B,iBAAiB,aAAa,aAAa;YAC3C,UAAU,aAAa,YAAY;YACnC,MAAM;QACR;oBACA;oBACA;mBACA;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTab.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabProps} from '@react-types/tabs';\nimport {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useLinkProps} from '@react-aria/utils';\nimport {generateId} from './utils';\nimport {TabListState} from '@react-stately/tabs';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface TabAria {\n /** Props for the tab element. */\n tabProps: DOMAttributes,\n /** Whether the tab is currently selected. */\n isSelected: boolean,\n /** Whether the tab is disabled. */\n isDisabled: boolean,\n /** Whether the tab is currently in a pressed state. */\n isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab.\n * When selected, the associated tab panel is shown.\n */\nexport function useTab<T>(\n props: AriaTabProps,\n state: TabListState<T>,\n ref: RefObject<FocusableElement | null>\n): TabAria {\n let {key, isDisabled: propsDisabled, shouldSelectOnPressUp} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isSelected = key === selectedKey;\n\n let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);\n let {itemProps, isPressed} = useSelectableItem({\n selectionManager: manager,\n key,\n ref,\n isDisabled,\n shouldSelectOnPressUp,\n linkBehavior: 'selection'\n });\n\n let tabId = generateId(state, key, 'tab');\n let tabPanelId = generateId(state, key, 'tabpanel');\n let {tabIndex} = itemProps;\n\n let item = state.collection.getItem(key);\n let domProps = filterDOMProps(item?.props, {labelable: true});\n delete domProps.id;\n let linkProps = useLinkProps(item?.props);\n\n return {\n tabProps: mergeProps(domProps, linkProps, itemProps, {\n id: tabId,\n 'aria-selected': isSelected,\n 'aria-disabled': isDisabled || undefined,\n 'aria-controls': isSelected ? tabPanelId : undefined,\n tabIndex: isDisabled ? undefined : tabIndex,\n role: 'tab'\n }),\n isSelected,\n isDisabled,\n isPressed\n };\n}\n"],"names":[],"version":3,"file":"useTab.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAyBM,SAAS,0CACd,KAAmB,EACnB,KAAsB,EACtB,GAAuC;IAEvC,IAAI,OAAC,GAAG,EAAE,YAAY,aAAa,yBAAE,qBAAqB,EAAC,GAAG;IAC9D,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,QAAQ;IAEzB,IAAI,aAAa,iBAAiB,MAAM,UAAU,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC;IACxF,IAAI,aAAC,SAAS,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAC7C,kBAAkB;aAClB;aACA;oBACA;+BACA;QACA,cAAc;IAChB;IAEA,IAAI,QAAQ,CAAA,GAAA,yCAAS,EAAE,OAAO,KAAK;IACnC,IAAI,aAAa,CAAA,GAAA,yCAAS,EAAE,OAAO,KAAK;IACxC,IAAI,YAAC,QAAQ,EAAC,GAAG;IAEjB,IAAI,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;IACpC,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,iBAAA,2BAAA,KAAM,KAAK,EAAE;QAAC,WAAW;IAAI;IAC3D,OAAO,SAAS,EAAE;IAClB,IAAI,YAAY,CAAA,GAAA,mBAAW,EAAE,iBAAA,2BAAA,KAAM,KAAK;IAExC,OAAO;QACL,UAAU,CAAA,GAAA,iBAAS,EAAE,UAAU,WAAW,WAAW;YACnD,IAAI;YACJ,iBAAiB;YACjB,iBAAiB,cAAc;YAC/B,iBAAiB,aAAa,aAAa;YAC3C,UAAU,aAAa,YAAY;YACnC,MAAM;QACR;oBACA;oBACA;mBACA;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTab.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabProps} from '@react-types/tabs';\nimport {DOMAttributes, FocusableElement} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useLinkProps} from '@react-aria/utils';\nimport {generateId} from './utils';\nimport {RefObject} from 'react';\nimport {TabListState} from '@react-stately/tabs';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface TabAria {\n /** Props for the tab element. */\n tabProps: DOMAttributes,\n /** Whether the tab is currently selected. */\n isSelected: boolean,\n /** Whether the tab is disabled. */\n isDisabled: boolean,\n /** Whether the tab is currently in a pressed state. */\n isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab.\n * When selected, the associated tab panel is shown.\n */\nexport function useTab<T>(\n props: AriaTabProps,\n state: TabListState<T>,\n ref: RefObject<FocusableElement | null>\n): TabAria {\n let {key, isDisabled: propsDisabled, shouldSelectOnPressUp} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isSelected = key === selectedKey;\n\n let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);\n let {itemProps, isPressed} = useSelectableItem({\n selectionManager: manager,\n key,\n ref,\n isDisabled,\n shouldSelectOnPressUp,\n linkBehavior: 'selection'\n });\n\n let tabId = generateId(state, key, 'tab');\n let tabPanelId = generateId(state, key, 'tabpanel');\n let {tabIndex} = itemProps;\n\n let item = state.collection.getItem(key);\n let domProps = filterDOMProps(item?.props, {labelable: true});\n delete domProps.id;\n let linkProps = useLinkProps(item?.props);\n\n return {\n tabProps: mergeProps(domProps, linkProps, itemProps, {\n id: tabId,\n 'aria-selected': isSelected,\n 'aria-disabled': isDisabled || undefined,\n 'aria-controls': isSelected ? tabPanelId : undefined,\n tabIndex: isDisabled ? undefined : tabIndex,\n role: 'tab'\n }),\n isSelected,\n isDisabled,\n isPressed\n };\n}\n"],"names":[],"version":3,"file":"useTab.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAwBM,SAAS,0CACd,KAAmB,EACnB,KAAsB,EACtB,GAAuC;IAEvC,IAAI,OAAC,GAAG,EAAE,YAAY,aAAa,yBAAE,qBAAqB,EAAC,GAAG;IAC9D,IAAI,EAAC,kBAAkB,OAAO,eAAE,WAAW,EAAC,GAAG;IAE/C,IAAI,aAAa,QAAQ;IAEzB,IAAI,aAAa,iBAAiB,MAAM,UAAU,IAAI,MAAM,gBAAgB,CAAC,UAAU,CAAC;IACxF,IAAI,aAAC,SAAS,aAAE,SAAS,EAAC,GAAG,CAAA,GAAA,wBAAgB,EAAE;QAC7C,kBAAkB;aAClB;aACA;oBACA;+BACA;QACA,cAAc;IAChB;IAEA,IAAI,QAAQ,CAAA,GAAA,yCAAS,EAAE,OAAO,KAAK;IACnC,IAAI,aAAa,CAAA,GAAA,yCAAS,EAAE,OAAO,KAAK;IACxC,IAAI,YAAC,QAAQ,EAAC,GAAG;IAEjB,IAAI,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC;IACpC,IAAI,WAAW,CAAA,GAAA,qBAAa,EAAE,iBAAA,2BAAA,KAAM,KAAK,EAAE;QAAC,WAAW;IAAI;IAC3D,OAAO,SAAS,EAAE;IAClB,IAAI,YAAY,CAAA,GAAA,mBAAW,EAAE,iBAAA,2BAAA,KAAM,KAAK;IAExC,OAAO;QACL,UAAU,CAAA,GAAA,iBAAS,EAAE,UAAU,WAAW,WAAW;YACnD,IAAI;YACJ,iBAAiB;YACjB,iBAAiB,cAAc;YAC/B,iBAAiB,aAAa,aAAa;YAC3C,UAAU,aAAa,YAAY;YACnC,MAAM;QACR;oBACA;oBACA;mBACA;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTab.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabProps} from '@react-types/tabs';\nimport {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';\nimport {filterDOMProps, mergeProps, useLinkProps} from '@react-aria/utils';\nimport {generateId} from './utils';\nimport {TabListState} from '@react-stately/tabs';\nimport {useSelectableItem} from '@react-aria/selection';\n\nexport interface TabAria {\n /** Props for the tab element. */\n tabProps: DOMAttributes,\n /** Whether the tab is currently selected. */\n isSelected: boolean,\n /** Whether the tab is disabled. */\n isDisabled: boolean,\n /** Whether the tab is currently in a pressed state. */\n isPressed: boolean\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab.\n * When selected, the associated tab panel is shown.\n */\nexport function useTab<T>(\n props: AriaTabProps,\n state: TabListState<T>,\n ref: RefObject<FocusableElement | null>\n): TabAria {\n let {key, isDisabled: propsDisabled, shouldSelectOnPressUp} = props;\n let {selectionManager: manager, selectedKey} = state;\n\n let isSelected = key === selectedKey;\n\n let isDisabled = propsDisabled || state.isDisabled || state.selectionManager.isDisabled(key);\n let {itemProps, isPressed} = useSelectableItem({\n selectionManager: manager,\n key,\n ref,\n isDisabled,\n shouldSelectOnPressUp,\n linkBehavior: 'selection'\n });\n\n let tabId = generateId(state, key, 'tab');\n let tabPanelId = generateId(state, key, 'tabpanel');\n let {tabIndex} = itemProps;\n\n let item = state.collection.getItem(key);\n let domProps = filterDOMProps(item?.props, {labelable: true});\n delete domProps.id;\n let linkProps = useLinkProps(item?.props);\n\n return {\n tabProps: mergeProps(domProps, linkProps, itemProps, {\n id: tabId,\n 'aria-selected': isSelected,\n 'aria-disabled': isDisabled || undefined,\n 'aria-controls': isSelected ? tabPanelId : undefined,\n tabIndex: isDisabled ? undefined : tabIndex,\n role: 'tab'\n }),\n isSelected,\n isDisabled,\n isPressed\n };\n}\n"],"names":[],"version":3,"file":"useTab.module.js.map"}
@@ -1,8 +1,8 @@
1
1
  var $a217ebca77471970$exports = require("./utils.main.js");
2
2
  var $283e5d8830177ead$exports = require("./TabsKeyboardDelegate.main.js");
3
3
  var $c5HcZ$reactariautils = require("@react-aria/utils");
4
- var $c5HcZ$react = require("react");
5
4
  var $c5HcZ$reactariai18n = require("@react-aria/i18n");
5
+ var $c5HcZ$react = require("react");
6
6
  var $c5HcZ$reactariaselection = require("@react-aria/selection");
7
7
 
8
8
 
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;AAUA;;;;;;AAuBO,SAAS,0CAAc,KAA4B,EAAE,KAAsB,EAAE,GAAkC;IACpH,IAAI,eACF,cAAc,kCACd,qBAAqB,aACtB,GAAG;IACJ,IAAI,cACF,UAAU,EACV,kBAAkB,OAAO,gBACzB,YAAY,EACb,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,WAAW,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,CAAA,GAAA,8CAAmB,EAClD,YACA,WACA,aACA,eAAe;QAAC;QAAY;QAAc;QAAa;KAAU;IAEnE,IAAI,mBAAC,eAAe,EAAC,GAAG,CAAA,GAAA,iDAAsB,EAAE;aAC9C;QACA,kBAAkB;QAClB,kBAAkB;QAClB,eAAe,uBAAuB;QACtC,wBAAwB;QACxB,WAAW;QACX,cAAc;IAChB;IAEA,+BAA+B;IAC/B,IAAI,SAAS,CAAA,GAAA,2BAAI;IACjB,CAAA,GAAA,iCAAM,EAAE,GAAG,CAAC,OAAO;IAEnB,IAAI,oBAAoB,CAAA,GAAA,+BAAQ,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI;IAAM;IAEvD,OAAO;QACL,cAAc;YACZ,GAAG,CAAA,GAAA,gCAAS,EAAE,iBAAiB,kBAAkB;YACjD,MAAM;YACN,oBAAoB;YACpB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabList.ts"],"sourcesContent":["/*\n* Copyright 2020 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 {AriaTabListProps} from '@react-types/tabs';\nimport {DOMAttributes} from '@react-types/shared';\nimport {mergeProps, useId, useLabels} from '@react-aria/utils';\nimport {RefObject, useMemo} from 'react';\nimport {TabListState} from '@react-stately/tabs';\nimport {tabsIds} from './utils';\nimport {TabsKeyboardDelegate} from './TabsKeyboardDelegate';\nimport {useLocale} from '@react-aria/i18n';\nimport {useSelectableCollection} from '@react-aria/selection';\n\nexport interface AriaTabListOptions<T> extends Omit<AriaTabListProps<T>, 'children'> {}\n\nexport interface TabListAria {\n /** Props for the tablist container. */\n tabListProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab list.\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport function useTabList<T>(props: AriaTabListOptions<T>, state: TabListState<T>, ref: RefObject<HTMLElement | null>): TabListAria {\n let {\n orientation = 'horizontal',\n keyboardActivation = 'automatic'\n } = props;\n let {\n collection,\n selectionManager: manager,\n disabledKeys\n } = state;\n let {direction} = useLocale();\n let delegate = useMemo(() => new TabsKeyboardDelegate(\n collection,\n direction,\n orientation,\n disabledKeys), [collection, disabledKeys, orientation, direction]);\n\n let {collectionProps} = useSelectableCollection({\n ref,\n selectionManager: manager,\n keyboardDelegate: delegate,\n selectOnFocus: keyboardActivation === 'automatic',\n disallowEmptySelection: true,\n scrollRef: ref,\n linkBehavior: 'selection'\n });\n\n // Compute base id for all tabs\n let tabsId = useId();\n tabsIds.set(state, tabsId);\n\n let tabListLabelProps = useLabels({...props, id: tabsId});\n\n return {\n tabListProps: {\n ...mergeProps(collectionProps, tabListLabelProps),\n role: 'tablist',\n 'aria-orientation': orientation,\n tabIndex: undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useTabList.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;AAAA;;;;;;;;;;AAUA;;;;;;AAuBO,SAAS,0CAAc,KAA4B,EAAE,KAAsB,EAAE,GAAkC;IACpH,IAAI,eACF,cAAc,kCACd,qBAAqB,aACtB,GAAG;IACJ,IAAI,cACF,UAAU,EACV,kBAAkB,OAAO,gBACzB,YAAY,EACb,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,8BAAQ;IAC1B,IAAI,WAAW,CAAA,GAAA,oBAAM,EAAE,IAAM,IAAI,CAAA,GAAA,8CAAmB,EAClD,YACA,WACA,aACA,eAAe;QAAC;QAAY;QAAc;QAAa;KAAU;IAEnE,IAAI,mBAAC,eAAe,EAAC,GAAG,CAAA,GAAA,iDAAsB,EAAE;aAC9C;QACA,kBAAkB;QAClB,kBAAkB;QAClB,eAAe,uBAAuB;QACtC,wBAAwB;QACxB,WAAW;QACX,cAAc;IAChB;IAEA,+BAA+B;IAC/B,IAAI,SAAS,CAAA,GAAA,2BAAI;IACjB,CAAA,GAAA,iCAAM,EAAE,GAAG,CAAC,OAAO;IAEnB,IAAI,oBAAoB,CAAA,GAAA,+BAAQ,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI;IAAM;IAEvD,OAAO;QACL,cAAc;YACZ,GAAG,CAAA,GAAA,gCAAS,EAAE,iBAAiB,kBAAkB;YACjD,MAAM;YACN,oBAAoB;YACpB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabList.ts"],"sourcesContent":["/*\n* Copyright 2020 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 {AriaTabListProps} from '@react-types/tabs';\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {mergeProps, useId, useLabels} from '@react-aria/utils';\nimport {TabListState} from '@react-stately/tabs';\nimport {tabsIds} from './utils';\nimport {TabsKeyboardDelegate} from './TabsKeyboardDelegate';\nimport {useLocale} from '@react-aria/i18n';\nimport {useMemo} from 'react';\nimport {useSelectableCollection} from '@react-aria/selection';\n\nexport interface AriaTabListOptions<T> extends Omit<AriaTabListProps<T>, 'children'> {}\n\nexport interface TabListAria {\n /** Props for the tablist container. */\n tabListProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab list.\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport function useTabList<T>(props: AriaTabListOptions<T>, state: TabListState<T>, ref: RefObject<HTMLElement | null>): TabListAria {\n let {\n orientation = 'horizontal',\n keyboardActivation = 'automatic'\n } = props;\n let {\n collection,\n selectionManager: manager,\n disabledKeys\n } = state;\n let {direction} = useLocale();\n let delegate = useMemo(() => new TabsKeyboardDelegate(\n collection,\n direction,\n orientation,\n disabledKeys), [collection, disabledKeys, orientation, direction]);\n\n let {collectionProps} = useSelectableCollection({\n ref,\n selectionManager: manager,\n keyboardDelegate: delegate,\n selectOnFocus: keyboardActivation === 'automatic',\n disallowEmptySelection: true,\n scrollRef: ref,\n linkBehavior: 'selection'\n });\n\n // Compute base id for all tabs\n let tabsId = useId();\n tabsIds.set(state, tabsId);\n\n let tabListLabelProps = useLabels({...props, id: tabsId});\n\n return {\n tabListProps: {\n ...mergeProps(collectionProps, tabListLabelProps),\n role: 'tablist',\n 'aria-orientation': orientation,\n tabIndex: undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useTabList.main.js.map"}
@@ -1,8 +1,8 @@
1
1
  import {tabsIds as $99b62ae3ff97ec45$export$c5f62239608282b6} from "./utils.mjs";
2
2
  import {TabsKeyboardDelegate as $bfc6f2d60b8a4c40$export$15010ca3c1abe90b} from "./TabsKeyboardDelegate.mjs";
3
3
  import {useId as $bQNZs$useId, useLabels as $bQNZs$useLabels, mergeProps as $bQNZs$mergeProps} from "@react-aria/utils";
4
- import {useMemo as $bQNZs$useMemo} from "react";
5
4
  import {useLocale as $bQNZs$useLocale} from "@react-aria/i18n";
5
+ import {useMemo as $bQNZs$useMemo} from "react";
6
6
  import {useSelectableCollection as $bQNZs$useSelectableCollection} from "@react-aria/selection";
7
7
 
8
8
  /*
@@ -1,8 +1,8 @@
1
1
  import {tabsIds as $99b62ae3ff97ec45$export$c5f62239608282b6} from "./utils.module.js";
2
2
  import {TabsKeyboardDelegate as $bfc6f2d60b8a4c40$export$15010ca3c1abe90b} from "./TabsKeyboardDelegate.module.js";
3
3
  import {useId as $bQNZs$useId, useLabels as $bQNZs$useLabels, mergeProps as $bQNZs$mergeProps} from "@react-aria/utils";
4
- import {useMemo as $bQNZs$useMemo} from "react";
5
4
  import {useLocale as $bQNZs$useLocale} from "@react-aria/i18n";
5
+ import {useMemo as $bQNZs$useMemo} from "react";
6
6
  import {useSelectableCollection as $bQNZs$useSelectableCollection} from "@react-aria/selection";
7
7
 
8
8
  /*
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AAAA;;;;;;;;;;AAUA;;;;;;AAuBO,SAAS,0CAAc,KAA4B,EAAE,KAAsB,EAAE,GAAkC;IACpH,IAAI,eACF,cAAc,kCACd,qBAAqB,aACtB,GAAG;IACJ,IAAI,cACF,UAAU,EACV,kBAAkB,OAAO,gBACzB,YAAY,EACb,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,CAAA,GAAA,yCAAmB,EAClD,YACA,WACA,aACA,eAAe;QAAC;QAAY;QAAc;QAAa;KAAU;IAEnE,IAAI,mBAAC,eAAe,EAAC,GAAG,CAAA,GAAA,8BAAsB,EAAE;aAC9C;QACA,kBAAkB;QAClB,kBAAkB;QAClB,eAAe,uBAAuB;QACtC,wBAAwB;QACxB,WAAW;QACX,cAAc;IAChB;IAEA,+BAA+B;IAC/B,IAAI,SAAS,CAAA,GAAA,YAAI;IACjB,CAAA,GAAA,yCAAM,EAAE,GAAG,CAAC,OAAO;IAEnB,IAAI,oBAAoB,CAAA,GAAA,gBAAQ,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI;IAAM;IAEvD,OAAO;QACL,cAAc;YACZ,GAAG,CAAA,GAAA,iBAAS,EAAE,iBAAiB,kBAAkB;YACjD,MAAM;YACN,oBAAoB;YACpB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabList.ts"],"sourcesContent":["/*\n* Copyright 2020 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 {AriaTabListProps} from '@react-types/tabs';\nimport {DOMAttributes} from '@react-types/shared';\nimport {mergeProps, useId, useLabels} from '@react-aria/utils';\nimport {RefObject, useMemo} from 'react';\nimport {TabListState} from '@react-stately/tabs';\nimport {tabsIds} from './utils';\nimport {TabsKeyboardDelegate} from './TabsKeyboardDelegate';\nimport {useLocale} from '@react-aria/i18n';\nimport {useSelectableCollection} from '@react-aria/selection';\n\nexport interface AriaTabListOptions<T> extends Omit<AriaTabListProps<T>, 'children'> {}\n\nexport interface TabListAria {\n /** Props for the tablist container. */\n tabListProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab list.\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport function useTabList<T>(props: AriaTabListOptions<T>, state: TabListState<T>, ref: RefObject<HTMLElement | null>): TabListAria {\n let {\n orientation = 'horizontal',\n keyboardActivation = 'automatic'\n } = props;\n let {\n collection,\n selectionManager: manager,\n disabledKeys\n } = state;\n let {direction} = useLocale();\n let delegate = useMemo(() => new TabsKeyboardDelegate(\n collection,\n direction,\n orientation,\n disabledKeys), [collection, disabledKeys, orientation, direction]);\n\n let {collectionProps} = useSelectableCollection({\n ref,\n selectionManager: manager,\n keyboardDelegate: delegate,\n selectOnFocus: keyboardActivation === 'automatic',\n disallowEmptySelection: true,\n scrollRef: ref,\n linkBehavior: 'selection'\n });\n\n // Compute base id for all tabs\n let tabsId = useId();\n tabsIds.set(state, tabsId);\n\n let tabListLabelProps = useLabels({...props, id: tabsId});\n\n return {\n tabListProps: {\n ...mergeProps(collectionProps, tabListLabelProps),\n role: 'tablist',\n 'aria-orientation': orientation,\n tabIndex: undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useTabList.module.js.map"}
1
+ {"mappings":";;;;;;;AAAA;;;;;;;;;;AAUA;;;;;;AAuBO,SAAS,0CAAc,KAA4B,EAAE,KAAsB,EAAE,GAAkC;IACpH,IAAI,eACF,cAAc,kCACd,qBAAqB,aACtB,GAAG;IACJ,IAAI,cACF,UAAU,EACV,kBAAkB,OAAO,gBACzB,YAAY,EACb,GAAG;IACJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,gBAAQ;IAC1B,IAAI,WAAW,CAAA,GAAA,cAAM,EAAE,IAAM,IAAI,CAAA,GAAA,yCAAmB,EAClD,YACA,WACA,aACA,eAAe;QAAC;QAAY;QAAc;QAAa;KAAU;IAEnE,IAAI,mBAAC,eAAe,EAAC,GAAG,CAAA,GAAA,8BAAsB,EAAE;aAC9C;QACA,kBAAkB;QAClB,kBAAkB;QAClB,eAAe,uBAAuB;QACtC,wBAAwB;QACxB,WAAW;QACX,cAAc;IAChB;IAEA,+BAA+B;IAC/B,IAAI,SAAS,CAAA,GAAA,YAAI;IACjB,CAAA,GAAA,yCAAM,EAAE,GAAG,CAAC,OAAO;IAEnB,IAAI,oBAAoB,CAAA,GAAA,gBAAQ,EAAE;QAAC,GAAG,KAAK;QAAE,IAAI;IAAM;IAEvD,OAAO;QACL,cAAc;YACZ,GAAG,CAAA,GAAA,iBAAS,EAAE,iBAAiB,kBAAkB;YACjD,MAAM;YACN,oBAAoB;YACpB,UAAU;QACZ;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabList.ts"],"sourcesContent":["/*\n* Copyright 2020 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 {AriaTabListProps} from '@react-types/tabs';\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {mergeProps, useId, useLabels} from '@react-aria/utils';\nimport {TabListState} from '@react-stately/tabs';\nimport {tabsIds} from './utils';\nimport {TabsKeyboardDelegate} from './TabsKeyboardDelegate';\nimport {useLocale} from '@react-aria/i18n';\nimport {useMemo} from 'react';\nimport {useSelectableCollection} from '@react-aria/selection';\n\nexport interface AriaTabListOptions<T> extends Omit<AriaTabListProps<T>, 'children'> {}\n\nexport interface TabListAria {\n /** Props for the tablist container. */\n tabListProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a tab list.\n * Tabs organize content into multiple sections and allow users to navigate between them.\n */\nexport function useTabList<T>(props: AriaTabListOptions<T>, state: TabListState<T>, ref: RefObject<HTMLElement | null>): TabListAria {\n let {\n orientation = 'horizontal',\n keyboardActivation = 'automatic'\n } = props;\n let {\n collection,\n selectionManager: manager,\n disabledKeys\n } = state;\n let {direction} = useLocale();\n let delegate = useMemo(() => new TabsKeyboardDelegate(\n collection,\n direction,\n orientation,\n disabledKeys), [collection, disabledKeys, orientation, direction]);\n\n let {collectionProps} = useSelectableCollection({\n ref,\n selectionManager: manager,\n keyboardDelegate: delegate,\n selectOnFocus: keyboardActivation === 'automatic',\n disallowEmptySelection: true,\n scrollRef: ref,\n linkBehavior: 'selection'\n });\n\n // Compute base id for all tabs\n let tabsId = useId();\n tabsIds.set(state, tabsId);\n\n let tabListLabelProps = useLabels({...props, id: tabsId});\n\n return {\n tabListProps: {\n ...mergeProps(collectionProps, tabListLabelProps),\n role: 'tablist',\n 'aria-orientation': orientation,\n tabIndex: undefined\n }\n };\n}\n"],"names":[],"version":3,"file":"useTabList.module.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAoBM,SAAS,0CAAe,KAAwB,EAAE,KAAsB,EAAE,GAA8B;IAC7G,qFAAqF;IACrF,2FAA2F;IAC3F,uBAAuB;IACvB,IAAI,WAAW,CAAA,GAAA,yCAAkB,EAAE,OAAO,YAAY;QAEzB;IAA7B,MAAM,KAAK,CAAA,GAAA,oCAAS,EAAE,OAAO,CAAA,YAAA,MAAM,EAAE,cAAR,uBAAA,YAAY,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAC7D,MAAM,gBAAgB,CAAA,GAAA,+BAAQ,EAAE;QAAC,GAAG,KAAK;YAAE;QAAI,mBAAmB,CAAA,GAAA,oCAAS,EAAE,OAAO,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAAM;IAE9G,OAAO;QACL,eAAe,CAAA,GAAA,gCAAS,EAAE,eAAe;sBACvC;YACA,MAAM;YACN,oBAAoB,KAAK,CAAC,mBAAmB;YAC7C,gBAAgB,KAAK,CAAC,eAAe;QACvC;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabPanel.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabPanelProps} from '@react-types/tabs';\nimport {DOMAttributes} from '@react-types/shared';\nimport {generateId} from './utils';\nimport {mergeProps, useLabels} from '@react-aria/utils';\nimport {RefObject} from 'react';\nimport {TabListState} from '@react-stately/tabs';\nimport {useHasTabbableChild} from '@react-aria/focus';\n\nexport interface TabPanelAria {\n /** Props for the tab panel element. */\n tabPanelProps: DOMAttributes\n}\n\n\n/**\n * Provides the behavior and accessibility implementation for a tab panel. A tab panel is a container for\n * the contents of a tab, and is shown when the tab is selected.\n */\nexport function useTabPanel<T>(props: AriaTabPanelProps, state: TabListState<T>, ref: RefObject<Element | null>): TabPanelAria {\n // The tabpanel should have tabIndex=0 when there are no tabbable elements within it.\n // Otherwise, tabbing from the focused tab should go directly to the first tabbable element\n // within the tabpanel.\n let tabIndex = useHasTabbableChild(ref) ? undefined : 0;\n\n const id = generateId(state, props.id ?? state?.selectedKey, 'tabpanel');\n const tabPanelProps = useLabels({...props, id, 'aria-labelledby': generateId(state, state?.selectedKey, 'tab')});\n\n return {\n tabPanelProps: mergeProps(tabPanelProps, {\n tabIndex,\n role: 'tabpanel',\n 'aria-describedby': props['aria-describedby'],\n 'aria-details': props['aria-details']\n })\n };\n}\n"],"names":[],"version":3,"file":"useTabPanel.main.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAmBM,SAAS,0CAAe,KAAwB,EAAE,KAAsB,EAAE,GAA8B;IAC7G,qFAAqF;IACrF,2FAA2F;IAC3F,uBAAuB;IACvB,IAAI,WAAW,CAAA,GAAA,yCAAkB,EAAE,OAAO,YAAY;QAEzB;IAA7B,MAAM,KAAK,CAAA,GAAA,oCAAS,EAAE,OAAO,CAAA,YAAA,MAAM,EAAE,cAAR,uBAAA,YAAY,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAC7D,MAAM,gBAAgB,CAAA,GAAA,+BAAQ,EAAE;QAAC,GAAG,KAAK;YAAE;QAAI,mBAAmB,CAAA,GAAA,oCAAS,EAAE,OAAO,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAAM;IAE9G,OAAO;QACL,eAAe,CAAA,GAAA,gCAAS,EAAE,eAAe;sBACvC;YACA,MAAM;YACN,oBAAoB,KAAK,CAAC,mBAAmB;YAC7C,gBAAgB,KAAK,CAAC,eAAe;QACvC;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabPanel.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabPanelProps} from '@react-types/tabs';\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {generateId} from './utils';\nimport {mergeProps, useLabels} from '@react-aria/utils';\nimport {TabListState} from '@react-stately/tabs';\nimport {useHasTabbableChild} from '@react-aria/focus';\n\nexport interface TabPanelAria {\n /** Props for the tab panel element. */\n tabPanelProps: DOMAttributes\n}\n\n\n/**\n * Provides the behavior and accessibility implementation for a tab panel. A tab panel is a container for\n * the contents of a tab, and is shown when the tab is selected.\n */\nexport function useTabPanel<T>(props: AriaTabPanelProps, state: TabListState<T>, ref: RefObject<Element | null>): TabPanelAria {\n // The tabpanel should have tabIndex=0 when there are no tabbable elements within it.\n // Otherwise, tabbing from the focused tab should go directly to the first tabbable element\n // within the tabpanel.\n let tabIndex = useHasTabbableChild(ref) ? undefined : 0;\n\n const id = generateId(state, props.id ?? state?.selectedKey, 'tabpanel');\n const tabPanelProps = useLabels({...props, id, 'aria-labelledby': generateId(state, state?.selectedKey, 'tab')});\n\n return {\n tabPanelProps: mergeProps(tabPanelProps, {\n tabIndex,\n role: 'tabpanel',\n 'aria-describedby': props['aria-describedby'],\n 'aria-details': props['aria-details']\n })\n };\n}\n"],"names":[],"version":3,"file":"useTabPanel.main.js.map"}
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAoBM,SAAS,0CAAe,KAAwB,EAAE,KAAsB,EAAE,GAA8B;IAC7G,qFAAqF;IACrF,2FAA2F;IAC3F,uBAAuB;IACvB,IAAI,WAAW,CAAA,GAAA,0BAAkB,EAAE,OAAO,YAAY;QAEzB;IAA7B,MAAM,KAAK,CAAA,GAAA,yCAAS,EAAE,OAAO,CAAA,YAAA,MAAM,EAAE,cAAR,uBAAA,YAAY,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAC7D,MAAM,gBAAgB,CAAA,GAAA,gBAAQ,EAAE;QAAC,GAAG,KAAK;YAAE;QAAI,mBAAmB,CAAA,GAAA,yCAAS,EAAE,OAAO,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAAM;IAE9G,OAAO;QACL,eAAe,CAAA,GAAA,iBAAS,EAAE,eAAe;sBACvC;YACA,MAAM;YACN,oBAAoB,KAAK,CAAC,mBAAmB;YAC7C,gBAAgB,KAAK,CAAC,eAAe;QACvC;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabPanel.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabPanelProps} from '@react-types/tabs';\nimport {DOMAttributes} from '@react-types/shared';\nimport {generateId} from './utils';\nimport {mergeProps, useLabels} from '@react-aria/utils';\nimport {RefObject} from 'react';\nimport {TabListState} from '@react-stately/tabs';\nimport {useHasTabbableChild} from '@react-aria/focus';\n\nexport interface TabPanelAria {\n /** Props for the tab panel element. */\n tabPanelProps: DOMAttributes\n}\n\n\n/**\n * Provides the behavior and accessibility implementation for a tab panel. A tab panel is a container for\n * the contents of a tab, and is shown when the tab is selected.\n */\nexport function useTabPanel<T>(props: AriaTabPanelProps, state: TabListState<T>, ref: RefObject<Element | null>): TabPanelAria {\n // The tabpanel should have tabIndex=0 when there are no tabbable elements within it.\n // Otherwise, tabbing from the focused tab should go directly to the first tabbable element\n // within the tabpanel.\n let tabIndex = useHasTabbableChild(ref) ? undefined : 0;\n\n const id = generateId(state, props.id ?? state?.selectedKey, 'tabpanel');\n const tabPanelProps = useLabels({...props, id, 'aria-labelledby': generateId(state, state?.selectedKey, 'tab')});\n\n return {\n tabPanelProps: mergeProps(tabPanelProps, {\n tabIndex,\n role: 'tabpanel',\n 'aria-describedby': props['aria-describedby'],\n 'aria-details': props['aria-details']\n })\n };\n}\n"],"names":[],"version":3,"file":"useTabPanel.module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC;;;AAmBM,SAAS,0CAAe,KAAwB,EAAE,KAAsB,EAAE,GAA8B;IAC7G,qFAAqF;IACrF,2FAA2F;IAC3F,uBAAuB;IACvB,IAAI,WAAW,CAAA,GAAA,0BAAkB,EAAE,OAAO,YAAY;QAEzB;IAA7B,MAAM,KAAK,CAAA,GAAA,yCAAS,EAAE,OAAO,CAAA,YAAA,MAAM,EAAE,cAAR,uBAAA,YAAY,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAC7D,MAAM,gBAAgB,CAAA,GAAA,gBAAQ,EAAE;QAAC,GAAG,KAAK;YAAE;QAAI,mBAAmB,CAAA,GAAA,yCAAS,EAAE,OAAO,kBAAA,4BAAA,MAAO,WAAW,EAAE;IAAM;IAE9G,OAAO;QACL,eAAe,CAAA,GAAA,iBAAS,EAAE,eAAe;sBACvC;YACA,MAAM;YACN,oBAAoB,KAAK,CAAC,mBAAmB;YAC7C,gBAAgB,KAAK,CAAC,eAAe;QACvC;IACF;AACF","sources":["packages/@react-aria/tabs/src/useTabPanel.ts"],"sourcesContent":["/*\n * Copyright 2020 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 {AriaTabPanelProps} from '@react-types/tabs';\nimport {DOMAttributes, RefObject} from '@react-types/shared';\nimport {generateId} from './utils';\nimport {mergeProps, useLabels} from '@react-aria/utils';\nimport {TabListState} from '@react-stately/tabs';\nimport {useHasTabbableChild} from '@react-aria/focus';\n\nexport interface TabPanelAria {\n /** Props for the tab panel element. */\n tabPanelProps: DOMAttributes\n}\n\n\n/**\n * Provides the behavior and accessibility implementation for a tab panel. A tab panel is a container for\n * the contents of a tab, and is shown when the tab is selected.\n */\nexport function useTabPanel<T>(props: AriaTabPanelProps, state: TabListState<T>, ref: RefObject<Element | null>): TabPanelAria {\n // The tabpanel should have tabIndex=0 when there are no tabbable elements within it.\n // Otherwise, tabbing from the focused tab should go directly to the first tabbable element\n // within the tabpanel.\n let tabIndex = useHasTabbableChild(ref) ? undefined : 0;\n\n const id = generateId(state, props.id ?? state?.selectedKey, 'tabpanel');\n const tabPanelProps = useLabels({...props, id, 'aria-labelledby': generateId(state, state?.selectedKey, 'tab')});\n\n return {\n tabPanelProps: mergeProps(tabPanelProps, {\n tabIndex,\n role: 'tabpanel',\n 'aria-describedby': props['aria-describedby'],\n 'aria-details': props['aria-details']\n })\n };\n}\n"],"names":[],"version":3,"file":"useTabPanel.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/tabs",
3
- "version": "3.9.2-nightly.4701+76365df43",
3
+ "version": "3.9.2-nightly.4709+4fc70174a",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,13 +22,13 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/focus": "3.0.0-nightly.2989+76365df43",
26
- "@react-aria/i18n": "3.0.0-nightly.2989+76365df43",
27
- "@react-aria/selection": "3.0.0-nightly.2989+76365df43",
28
- "@react-aria/utils": "3.0.0-nightly.2989+76365df43",
29
- "@react-stately/tabs": "3.0.0-nightly.2989+76365df43",
30
- "@react-types/shared": "3.0.0-nightly.2989+76365df43",
31
- "@react-types/tabs": "3.3.8-nightly.4701+76365df43",
25
+ "@react-aria/focus": "3.0.0-nightly.2997+4fc70174a",
26
+ "@react-aria/i18n": "3.0.0-nightly.2997+4fc70174a",
27
+ "@react-aria/selection": "3.0.0-nightly.2997+4fc70174a",
28
+ "@react-aria/utils": "3.0.0-nightly.2997+4fc70174a",
29
+ "@react-stately/tabs": "3.0.0-nightly.2997+4fc70174a",
30
+ "@react-types/shared": "3.0.0-nightly.2997+4fc70174a",
31
+ "@react-types/tabs": "3.3.8-nightly.4709+4fc70174a",
32
32
  "@swc/helpers": "^0.5.0"
33
33
  },
34
34
  "peerDependencies": {
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "76365df434b6f65b137113557ba14a32ea466c8f"
41
+ "gitHead": "4fc70174ac35a5ebf06379f5cafaf943519a1eac"
42
42
  }
package/src/useTab.ts CHANGED
@@ -11,10 +11,9 @@
11
11
  */
12
12
 
13
13
  import {AriaTabProps} from '@react-types/tabs';
14
- import {DOMAttributes, FocusableElement} from '@react-types/shared';
14
+ import {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
15
15
  import {filterDOMProps, mergeProps, useLinkProps} from '@react-aria/utils';
16
16
  import {generateId} from './utils';
17
- import {RefObject} from 'react';
18
17
  import {TabListState} from '@react-stately/tabs';
19
18
  import {useSelectableItem} from '@react-aria/selection';
20
19
 
package/src/useTabList.ts CHANGED
@@ -11,13 +11,13 @@
11
11
  */
12
12
 
13
13
  import {AriaTabListProps} from '@react-types/tabs';
14
- import {DOMAttributes} from '@react-types/shared';
14
+ import {DOMAttributes, RefObject} from '@react-types/shared';
15
15
  import {mergeProps, useId, useLabels} from '@react-aria/utils';
16
- import {RefObject, useMemo} from 'react';
17
16
  import {TabListState} from '@react-stately/tabs';
18
17
  import {tabsIds} from './utils';
19
18
  import {TabsKeyboardDelegate} from './TabsKeyboardDelegate';
20
19
  import {useLocale} from '@react-aria/i18n';
20
+ import {useMemo} from 'react';
21
21
  import {useSelectableCollection} from '@react-aria/selection';
22
22
 
23
23
  export interface AriaTabListOptions<T> extends Omit<AriaTabListProps<T>, 'children'> {}
@@ -11,10 +11,9 @@
11
11
  */
12
12
 
13
13
  import {AriaTabPanelProps} from '@react-types/tabs';
14
- import {DOMAttributes} from '@react-types/shared';
14
+ import {DOMAttributes, RefObject} from '@react-types/shared';
15
15
  import {generateId} from './utils';
16
16
  import {mergeProps, useLabels} from '@react-aria/utils';
17
- import {RefObject} from 'react';
18
17
  import {TabListState} from '@react-stately/tabs';
19
18
  import {useHasTabbableChild} from '@react-aria/focus';
20
19