@react-spectrum/tabs 3.1.2-nightly.3037 → 3.1.2-nightly.3059
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/main.css +1 -2
- package/dist/main.js +433 -488
- package/dist/main.js.map +1 -1
- package/dist/module.js +418 -419
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +4 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +20 -20
- package/dist/main.css.map +0 -1
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,2CAAiB;AACf,wBAAsB,2BADP;AAEf,oCAAkC,uCAFnB;AAGf,kCAAgC,qCAHjB;AAIf,mBAAiB,sBAJF;AAKf,wBAAsB,2BALP;AAMf,iBAAe,oBANA;AAOf,6BAA2B,gCAPZ;AAQf,mBAAiB,sBARF;AASf,sCAAoC,yCATrB;AAUf,+BAA6B,kCAVd;AAWf,4BAA0B,+BAXX;AAYf,gCAA8B,mCAZf;AAaf,0BAAwB,6BAbT;AAcf,6BAA2B,gCAdZ;AAef,wCAAsC,2CAfvB;AAgBf,6BAA2B,gCAhBZ;AAiBf,iCAA+B,oCAjBhB;AAkBf,gBAAc,mBAlBC;AAmBf,gBAAc,mBAnBC;AAoBf,iBAAe;AApBA,CAAjB;;ACiDA,MAAMG,gDAAU,gBAAGC,MAAK,CAACC,aAAN,CAAsC,IAAtC,CAAnB;;;;AAEA,SAASC,0CAAT,CAAgCC,KAAhC,EAA6DC,GAA7D,EAA0F;AACxFD,EAAAA,KAAK,GAAGE,gBAAgB,CAACF,KAAD,CAAxB;;AACA,MAAI;AACFG,IAAAA,WAAW,GAAG,YADZ;AAEFC,IAAAA,O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E,EAAEtD,EAFN;AAGE,IAAA,KAAK,EAAEwC,KAHT;AAIE,IAAA,GAAG,EAAE3G,GAJP;AAKE,IAAA,OAAO,MALT;AAME,IAAA,UAAU,EAAEuD,UANd;AAOE,IAAA,WAAW,EAAED,KAAK,CAAC5B,WAPrB;AAQE,IAAA,YAAY,EAAE4B,KAAK,CAACK,YARtB;AASE,IAAA,iBAAiB,EAAEL,KAAK,CAACsE;AAT3B,MAUGvE,IAAI,iBAAI,qBAAC,KAAD;AAAM,IAAA,SAAS,EAAEA,IAAI,CAACmE;AAAtB,KAAkCnE,IAAI,CAACK,QAAvC,CAVX,CAVF,EAsBG0D,UAAU,iBAAI,qBAAC,6CAAD;AAAS,IAAA,WAAW,EAAC,YAArB;AAAkC,IAAA,WAAW,EAAEA,UAA/C;AAA2D,IAAA,WAAW,EAAE9D,KAAK,CAAC5B;AAA9E,IAtBjB,CAZF,CADF;AAuCD;AAED;;;AAGA;AACA;;;OACA,MAAMmG,IAAK,gBAAGjI,MAAK,CAACkI,UAAN,CAAiBhI,0CAAjB,CAAd","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/tabs/vars.css","./packages/@react-spectrum/tabs/src/Tabs.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\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\n@import './index.css';\n@import './skin.css';\n","/*\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 {classNames, SlotProvider, unwrapDOMRef, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, DOMRef, Node, Orientation} from '@react-types/shared';\nimport {filterDOMProps, useValueEffect} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Item, Picker} from '@react-spectrum/picker';\nimport {ListCollection, SingleSelectListState} from '@react-stately/list';\nimport {mergeProps, useId, useLayoutEffect} from '@react-aria/utils';\nimport React, {Key, MutableRefObject, ReactElement, useCallback, useContext, useEffect, useRef, useState} from 'react';\nimport {SpectrumPickerProps} from '@react-types/select';\nimport {SpectrumTabListProps, SpectrumTabPanelsProps, SpectrumTabsProps} from '@react-types/tabs';\nimport styles from '@adobe/spectrum-css-temp/components/tabs/vars.css';\nimport {TabListState, useTabListState} from '@react-stately/tabs';\nimport {Text} from '@react-spectrum/text';\nimport {useCollection} from '@react-stately/collections';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {useResizeObserver} from '@react-aria/utils';\nimport {useTab, useTabList, useTabPanel} from '@react-aria/tabs';\n\ninterface TabsContext<T> {\n tabProps: SpectrumTabsProps<T>,\n tabState: {\n tabListState: TabListState<T>,\n setTabListState: (state: TabListState<T>) => void,\n selectedTab: HTMLElement,\n collapse: boolean\n },\n refs: {\n wrapperRef: MutableRefObject<HTMLDivElement>,\n tablistRef: MutableRefObject<HTMLDivElement>\n },\n tabPanelProps: {\n 'aria-labelledby': string\n }\n}\n\nconst TabContext = React.createContext<TabsContext<any>>(null);\n\nfunction Tabs<T extends object>(props: SpectrumTabsProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n orientation = 'horizontal' as Orientation,\n density = 'regular',\n children,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let tablistRef = useRef<HTMLDivElement>();\n let wrapperRef = useRef<HTMLDivElement>();\n\n let {direction} = useLocale();\n let {styleProps} = useStyleProps(otherProps);\n let [collapse, setCollapse] = useValueEffect(false);\n let [selectedTab, setSelectedTab] = useState<HTMLElement>();\n const [tabListState, setTabListState] = useState<TabListState<T>>(null);\n\n useEffect(() => {\n if (tablistRef.current) {\n let selectedTab: HTMLElement = tablistRef.current.querySelector(`[data-key=\"${tabListState?.selectedKey}\"]`);\n\n if (selectedTab != null) {\n setSelectedTab(selectedTab);\n }\n }\n // collapse is in the dep array so selectedTab can be updated for TabLine positioning\n }, [children, tabListState?.selectedKey, collapse, tablistRef]);\n\n let checkShouldCollapse = useCallback(() => {\n let computeShouldCollapse = () => {\n if (wrapperRef.current) {\n let tabsComponent = wrapperRef.current;\n let tabs = tablistRef.current.querySelectorAll('[role=\"tab\"]');\n let lastTab = tabs[tabs.length - 1];\n\n let end = direction === 'rtl' ? 'left' : 'right';\n let farEdgeTabList = tabsComponent.getBoundingClientRect()[end];\n let farEdgeLastTab = lastTab?.getBoundingClientRect()[end];\n let shouldCollapse = direction === 'rtl' ? farEdgeLastTab < farEdgeTabList : farEdgeTabList < farEdgeLastTab;\n\n return shouldCollapse;\n }\n };\n\n if (orientation !== 'vertical') {\n setCollapse(function* () {\n // Make Tabs render in non-collapsed state\n yield false;\n\n // Compute if Tabs should collapse and update\n yield computeShouldCollapse();\n });\n }\n }, [tablistRef, wrapperRef, direction, orientation, setCollapse]);\n\n useEffect(() => {\n checkShouldCollapse();\n }, [children, checkShouldCollapse]);\n\n useResizeObserver({ref: wrapperRef, onResize: checkShouldCollapse});\n\n let tabPanelProps = {\n 'aria-labelledby': undefined\n };\n\n // When the tabs are collapsed, the tabPanel should be labelled by the Picker button element.\n let collapsibleTabListId = useId();\n if (collapse && orientation !== 'vertical') {\n tabPanelProps['aria-labelledby'] = collapsibleTabListId;\n }\n return (\n <TabContext.Provider\n value={{\n tabProps: {...props, orientation, density},\n tabState: {tabListState, setTabListState, selectedTab, collapse},\n refs: {tablistRef, wrapperRef},\n tabPanelProps\n }}>\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}\n className={classNames(\n styles,\n 'spectrum-TabsPanel',\n `spectrum-TabsPanel--${orientation}`,\n styleProps.className\n )}>\n {props.children}\n </div>\n </TabContext.Provider>\n );\n}\n\ninterface TabProps<T> extends DOMProps {\n item: Node<T>,\n state: SingleSelectListState<T>,\n isDisabled?: boolean,\n orientation?: Orientation\n}\n\n// @private\nfunction Tab<T>(props: TabProps<T>) {\n let {item, state, isDisabled: propsDisabled} = props;\n let {key, rendered} = item;\n let isDisabled = propsDisabled || state.disabledKeys.has(key);\n\n let ref = useRef<HTMLDivElement>();\n let {tabProps} = useTab({key, isDisabled}, state, ref);\n\n let {hoverProps, isHovered} = useHover({\n ...props\n });\n let isSelected = state.selectedKey === key;\n let domProps = filterDOMProps(item.props);\n delete domProps.id;\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(tabProps, hoverProps, domProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Tabs-item',\n {\n 'is-selected': isSelected,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n }\n )}>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-Tabs-itemLabel')\n }\n }}>\n {typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered}\n </SlotProvider>\n </div>\n </FocusRing>\n );\n}\n\ninterface TabLineProps {\n orientation?: Orientation,\n selectedTab?: HTMLElement,\n selectedKey?: Key\n}\n\n// @private\nfunction TabLine(props: TabLineProps) {\n let {\n orientation,\n // Is either the tab node (non-collapsed) or the picker node (collapsed)\n selectedTab,\n // selectedKey is provided so that the TabLine styles are updated when the TabPicker's width updates from a selection change\n selectedKey\n } = props;\n\n let {direction} = useLocale();\n let {scale} = useProvider();\n\n let [style, setStyle] = useState({\n width: undefined,\n height: undefined\n });\n\n useLayoutEffect(() => {\n if (selectedTab) {\n let styleObj = {transform: undefined, width: undefined, height: undefined};\n // In RTL, calculate the transform from the right edge of the tablist so that resizing the window doesn't break the Tabline position due to offsetLeft changes\n let offset = direction === 'rtl' ? -1 * ((selectedTab.offsetParent as HTMLElement)?.offsetWidth - selectedTab.offsetWidth - selectedTab.offsetLeft) : selectedTab.offsetLeft;\n styleObj.transform = orientation === 'vertical'\n ? `translateY(${selectedTab.offsetTop}px)`\n : `translateX(${offset}px)`;\n\n if (orientation === 'horizontal') {\n styleObj.width = `${selectedTab.offsetWidth}px`;\n } else {\n styleObj.height = `${selectedTab.offsetHeight}px`;\n }\n setStyle(styleObj);\n }\n\n }, [direction, setStyle, selectedTab, orientation, scale, selectedKey]);\n\n return <div className={classNames(styles, 'spectrum-Tabs-selectionIndicator')} role=\"presentation\" style={style} />;\n}\n\n/**\n * A TabList is used within Tabs to group tabs that a user can switch between.\n * The keys of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.\n */\nexport function TabList<T>(props: SpectrumTabListProps<T>) {\n const tabContext = useContext(TabContext);\n const {refs, tabState, tabProps, tabPanelProps} = tabContext;\n const {isQuiet, density, isDisabled, orientation} = tabProps;\n const {selectedTab, collapse, setTabListState} = tabState;\n const {tablistRef, wrapperRef} = refs;\n // Pass original Tab props but override children to create the collection.\n const state = useTabListState({...tabProps, children: props.children});\n\n let {styleProps} = useStyleProps(props);\n const {tabListProps} = useTabList({...tabProps, ...props}, state, tablistRef);\n\n useEffect(() => {\n // Passing back to root as useTabPanel needs the TabListState\n setTabListState(state);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.disabledKeys, state.selectedItem, state.selectedKey, props.children]);\n let stylePropsForVertical = orientation === 'vertical' ? styleProps : {};\n\n let tabListclassName = classNames(styles, 'spectrum-TabsPanel-tabs');\n const tabContent = (\n <div\n {...stylePropsForVertical}\n {...tabListProps}\n ref={tablistRef}\n className={classNames(\n styles,\n 'spectrum-Tabs',\n `spectrum-Tabs--${orientation}`,\n tabListclassName,\n {\n 'spectrum-Tabs--quiet': isQuiet,\n ['spectrum-Tabs--compact']: density === 'compact'\n },\n orientation === 'vertical' && styleProps.className\n )\n }>\n {[...state.collection].map((item) => (\n <Tab key={item.key} item={item} state={state} isDisabled={isDisabled} orientation={orientation} />\n ))}\n <TabLine orientation={orientation} selectedTab={selectedTab} />\n </div>\n );\n\n\n if (orientation === 'vertical') {\n return tabContent;\n } else {\n return (\n <div\n {...styleProps}\n ref={wrapperRef}\n className={classNames(\n styles,\n 'spectrum-TabsPanel-collapseWrapper',\n styleProps.className\n )}>\n {collapse ? <TabPicker {...props} {...tabProps} id={tabPanelProps['aria-labelledby']} state={state} className={tabListclassName} /> : tabContent}\n </div>\n );\n }\n}\n\n/**\n * TabPanels is used within Tabs as a container for the content of each tab.\n * The keys of the items within the <TabPanels> must match up with a corresponding item inside the <TabList>.\n */\nexport function TabPanels<T>(props: SpectrumTabPanelsProps<T>) {\n const {tabState, tabProps} = useContext(TabContext);\n const {tabListState} = tabState;\n\n const factory = nodes => new ListCollection(nodes);\n const collection = useCollection({items: tabProps.items, ...props}, factory, {suppressTextValueWarning: true});\n const selectedItem = tabListState ? collection.getItem(tabListState.selectedKey) : null;\n\n return (\n <TabPanel {...props} key={tabListState?.selectedKey}>\n {selectedItem && selectedItem.props.children}\n </TabPanel>\n );\n}\n\n// @private\nfunction TabPanel<T>(props: SpectrumTabPanelsProps<T>) {\n const {tabState, tabPanelProps: ctxTabPanelProps} = useContext(TabContext);\n const {tabListState} = tabState;\n let ref = useRef();\n const {tabPanelProps} = useTabPanel(props, tabListState, ref);\n let {styleProps} = useStyleProps(props);\n\n if (ctxTabPanelProps['aria-labelledby']) {\n tabPanelProps['aria-labelledby'] = ctxTabPanelProps['aria-labelledby'];\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div {...styleProps} {...tabPanelProps} ref={ref} className={classNames(styles, 'spectrum-TabsPanel-tabpanel', styleProps.className)}>\n {props.children}\n </div>\n </FocusRing>\n );\n}\n\ninterface TabPickerProps<T> extends Omit<SpectrumPickerProps<T>, 'children'> {\n density?: 'compact' | 'regular',\n state: SingleSelectListState<T>,\n className?: string\n}\n\nfunction TabPicker<T>(props: TabPickerProps<T>) {\n let {\n isDisabled,\n isQuiet,\n state,\n 'aria-labelledby': ariaLabeledBy,\n 'aria-label': ariaLabel,\n density,\n className,\n id\n } = props;\n\n let ref = useRef();\n let [pickerNode, setPickerNode] = useState(null);\n\n useEffect(() => {\n let node = unwrapDOMRef(ref);\n setPickerNode(node.current);\n }, [ref]);\n\n let items = [...state.collection].map((item) => ({\n rendered: item.rendered,\n textValue: item.textValue,\n id: item.key\n }));\n\n let pickerProps = {\n 'aria-labelledby': ariaLabeledBy,\n 'aria-label': ariaLabel\n };\n\n // TODO: Figure out if tabListProps should go onto the div here, v2 doesn't do it\n return (\n <div\n className={classNames(\n styles,\n 'spectrum-Tabs',\n 'spectrum-Tabs--horizontal',\n 'spectrum-Tabs--isCollapsed',\n {\n 'spectrum-Tabs--quiet': isQuiet,\n ['spectrum-Tabs--compact']: density === 'compact'\n },\n className\n )}>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n button: {\n focusRingClass: classNames(styles, 'focus-ring')\n }\n }}>\n <Picker\n {...pickerProps}\n id={id}\n items={items}\n ref={ref}\n isQuiet\n isDisabled={isDisabled}\n selectedKey={state.selectedKey}\n disabledKeys={state.disabledKeys}\n onSelectionChange={state.setSelectedKey}>\n {item => <Item textValue={item.textValue}>{item.rendered}</Item>}\n </Picker>\n {pickerNode && <TabLine orientation=\"horizontal\" selectedTab={pickerNode} selectedKey={state.selectedKey} />}\n </SlotProvider>\n </div>\n );\n}\n\n/**\n * 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.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Tabs = React.forwardRef(Tabs) as <T>(props: SpectrumTabsProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_Tabs as Tabs};\n"],"names":["$parcel$interopDefault","a","__esModule","default","TabContext","React","createContext","Tabs","props","ref","useProviderProps","orientation","density","children","otherProps","domRef","useDOMRef","tablistRef","useRef","wrapperRef","direction","useLocale","styleProps","useStyleProps","collapse","setCollapse","useValueEffect","selectedTab","setSelectedTab","useState","tabListState","setTabListState","useEffect","current","querySelector","selectedKey","checkShouldCollapse","useCallback","computeShouldCollapse","tabsComponent","tabs","querySelectorAll","lastTab","length","end","farEdgeTabList","getBoundingClientRect","farEdgeLastTab","shouldCollapse","useResizeObserver","onResize","tabPanelProps","undefined","collapsibleTabListId","useId","tabProps","tabState","refs","filterDOMProps","classNames","className","Tab","item","state","isDisabled","propsDisabled","key","rendered","disabledKeys","has","useTab","hoverProps","isHovered","useHover","isSelected","domProps","id","mergeProps","icon","size","UNSAFE_className","text","TabLine","scale","useProvider","style","setStyle","width","height","useLayoutEffect","styleObj","transform","offset","offsetParent","offsetWidth","offsetLeft","offsetTop","offsetHeight","TabList","tabContext","useContext","isQuiet","useTabListState","tabListProps","useTabList","selectedItem","stylePropsForVertical","tabListclassName","tabContent","collection","map","TabPanels","factory","nodes","ListCollection","useCollection","items","suppressTextValueWarning","getItem","TabPanel","ctxTabPanelProps","useTabPanel","TabPicker","ariaLabeledBy","ariaLabel","pickerNode","setPickerNode","node","unwrapDOMRef","textValue","pickerProps","button","focusRingClass","setSelectedKey","_Tabs","forwardRef"],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAoC;AACpC,GAAgD;AAChD,GAA8C;AAC9C,GAA+B;AAC/B,GAAoC;AACpC,GAA6B;AAC7B,GAAyC;AACzC,GAA+B;AAC/B,GAAkD;AAClD,GAA2C;AAC3C,GAAwC;AACxC,GAA4C;AAC5C,GAAsC;AACtC,GAAyC;AACzC,GAAoD;AACpD,GAAyC;AACzC,GAA6C;AAC7C,GAA4B;AAC5B,GAA4B;AAC5B,GAA6B;AAnB7B,wCAAoC,GAAG,CAA4B;AACnE,yCAAgD,GAAG,CAAwC;AAC3F,yCAA8C,GAAG,CAAsC;AACvF,yCAA+B,GAAG,CAAuB;AACzD,yCAAoC,GAAG,CAA4B;AACnE,yCAA6B,GAAG,CAAqB;AACrD,yCAAyC,GAAG,CAAiC;AAC7E,yCAA+B,GAAG,CAAuB;AACzD,yCAAkD,GAAG,CAA0C;AAC/F,yCAA2C,GAAG,CAAmC;AACjF,yCAAwC,GAAG,CAAgC;AAC3E,yCAA4C,GAAG,CAAoC;AACnF,yCAAsC,GAAG,CAA8B;AACvE,yCAAyC,GAAG,CAAiC;AAC7E,yCAAoD,GAAG,CAA4C;AACnG,yCAAyC,GAAG,CAAiC;AAC7E,yCAA6C,GAAG,CAAq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CAAK,WAAI;YAAC,SAAS,EAAE,IAAI,CAAC,SAAS;WAAG,IAAI,CAAC,QAAQ;OAEzD,UAAU,6CAAK,6BAAO;QAAC,WAAW,EAAC,CAAY;QAAC,WAAW,EAAE,UAAU;QAAE,WAAW,EAAE,KAAK,CAAC,WAAW;;AAIhH,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,EAAwF,AAAxF,sFAAwF;AACxF,EAA2G,AAA3G,yGAA2G;AAC3G,KAAK,CAAC,yCAAK,iBAAG,YAAK,CAAC,UAAU,CAAC,0BAAI","sources":["packages/@react-spectrum/tabs/src/index.ts","packages/@react-spectrum/tabs/src/Tabs.tsx","packages/@adobe/spectrum-css-temp/components/tabs/vars.css"],"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\n/// <reference types=\"css-module-types\" />\n\nexport * from './Tabs';\nexport {Item} from '@react-stately/collections';\n","/*\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 {classNames, SlotProvider, unwrapDOMRef, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMProps, DOMRef, Node, Orientation} from '@react-types/shared';\nimport {filterDOMProps, useValueEffect} from '@react-aria/utils';\nimport {FocusRing} from '@react-aria/focus';\nimport {Item, Picker} from '@react-spectrum/picker';\nimport {ListCollection, SingleSelectListState} from '@react-stately/list';\nimport {mergeProps, useId, useLayoutEffect} from '@react-aria/utils';\nimport React, {Key, MutableRefObject, ReactElement, useCallback, useContext, useEffect, useRef, useState} from 'react';\nimport {SpectrumPickerProps} from '@react-types/select';\nimport {SpectrumTabListProps, SpectrumTabPanelsProps, SpectrumTabsProps} from '@react-types/tabs';\nimport styles from '@adobe/spectrum-css-temp/components/tabs/vars.css';\nimport {TabListState, useTabListState} from '@react-stately/tabs';\nimport {Text} from '@react-spectrum/text';\nimport {useCollection} from '@react-stately/collections';\nimport {useHover} from '@react-aria/interactions';\nimport {useLocale} from '@react-aria/i18n';\nimport {useProvider, useProviderProps} from '@react-spectrum/provider';\nimport {useResizeObserver} from '@react-aria/utils';\nimport {useTab, useTabList, useTabPanel} from '@react-aria/tabs';\n\ninterface TabsContext<T> {\n tabProps: SpectrumTabsProps<T>,\n tabState: {\n tabListState: TabListState<T>,\n setTabListState: (state: TabListState<T>) => void,\n selectedTab: HTMLElement,\n collapse: boolean\n },\n refs: {\n wrapperRef: MutableRefObject<HTMLDivElement>,\n tablistRef: MutableRefObject<HTMLDivElement>\n },\n tabPanelProps: {\n 'aria-labelledby': string\n }\n}\n\nconst TabContext = React.createContext<TabsContext<any>>(null);\n\nfunction Tabs<T extends object>(props: SpectrumTabsProps<T>, ref: DOMRef<HTMLDivElement>) {\n props = useProviderProps(props);\n let {\n orientation = 'horizontal' as Orientation,\n density = 'regular',\n children,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let tablistRef = useRef<HTMLDivElement>();\n let wrapperRef = useRef<HTMLDivElement>();\n\n let {direction} = useLocale();\n let {styleProps} = useStyleProps(otherProps);\n let [collapse, setCollapse] = useValueEffect(false);\n let [selectedTab, setSelectedTab] = useState<HTMLElement>();\n const [tabListState, setTabListState] = useState<TabListState<T>>(null);\n\n useEffect(() => {\n if (tablistRef.current) {\n let selectedTab: HTMLElement = tablistRef.current.querySelector(`[data-key=\"${tabListState?.selectedKey}\"]`);\n\n if (selectedTab != null) {\n setSelectedTab(selectedTab);\n }\n }\n // collapse is in the dep array so selectedTab can be updated for TabLine positioning\n }, [children, tabListState?.selectedKey, collapse, tablistRef]);\n\n let checkShouldCollapse = useCallback(() => {\n let computeShouldCollapse = () => {\n if (wrapperRef.current) {\n let tabsComponent = wrapperRef.current;\n let tabs = tablistRef.current.querySelectorAll('[role=\"tab\"]');\n let lastTab = tabs[tabs.length - 1];\n\n let end = direction === 'rtl' ? 'left' : 'right';\n let farEdgeTabList = tabsComponent.getBoundingClientRect()[end];\n let farEdgeLastTab = lastTab?.getBoundingClientRect()[end];\n let shouldCollapse = direction === 'rtl' ? farEdgeLastTab < farEdgeTabList : farEdgeTabList < farEdgeLastTab;\n\n return shouldCollapse;\n }\n };\n\n if (orientation !== 'vertical') {\n setCollapse(function* () {\n // Make Tabs render in non-collapsed state\n yield false;\n\n // Compute if Tabs should collapse and update\n yield computeShouldCollapse();\n });\n }\n }, [tablistRef, wrapperRef, direction, orientation, setCollapse]);\n\n useEffect(() => {\n checkShouldCollapse();\n }, [children, checkShouldCollapse]);\n\n useResizeObserver({ref: wrapperRef, onResize: checkShouldCollapse});\n\n let tabPanelProps = {\n 'aria-labelledby': undefined\n };\n\n // When the tabs are collapsed, the tabPanel should be labelled by the Picker button element.\n let collapsibleTabListId = useId();\n if (collapse && orientation !== 'vertical') {\n tabPanelProps['aria-labelledby'] = collapsibleTabListId;\n }\n return (\n <TabContext.Provider\n value={{\n tabProps: {...props, orientation, density},\n tabState: {tabListState, setTabListState, selectedTab, collapse},\n refs: {tablistRef, wrapperRef},\n tabPanelProps\n }}>\n <div\n {...filterDOMProps(otherProps)}\n {...styleProps}\n ref={domRef}\n className={classNames(\n styles,\n 'spectrum-TabsPanel',\n `spectrum-TabsPanel--${orientation}`,\n styleProps.className\n )}>\n {props.children}\n </div>\n </TabContext.Provider>\n );\n}\n\ninterface TabProps<T> extends DOMProps {\n item: Node<T>,\n state: SingleSelectListState<T>,\n isDisabled?: boolean,\n orientation?: Orientation\n}\n\n// @private\nfunction Tab<T>(props: TabProps<T>) {\n let {item, state, isDisabled: propsDisabled} = props;\n let {key, rendered} = item;\n let isDisabled = propsDisabled || state.disabledKeys.has(key);\n\n let ref = useRef<HTMLDivElement>();\n let {tabProps} = useTab({key, isDisabled}, state, ref);\n\n let {hoverProps, isHovered} = useHover({\n ...props\n });\n let isSelected = state.selectedKey === key;\n let domProps = filterDOMProps(item.props);\n delete domProps.id;\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div\n {...mergeProps(tabProps, hoverProps, domProps)}\n ref={ref}\n className={classNames(\n styles,\n 'spectrum-Tabs-item',\n {\n 'is-selected': isSelected,\n 'is-disabled': isDisabled,\n 'is-hovered': isHovered\n }\n )}>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n text: {\n UNSAFE_className: classNames(styles, 'spectrum-Tabs-itemLabel')\n }\n }}>\n {typeof rendered === 'string'\n ? <Text>{rendered}</Text>\n : rendered}\n </SlotProvider>\n </div>\n </FocusRing>\n );\n}\n\ninterface TabLineProps {\n orientation?: Orientation,\n selectedTab?: HTMLElement,\n selectedKey?: Key\n}\n\n// @private\nfunction TabLine(props: TabLineProps) {\n let {\n orientation,\n // Is either the tab node (non-collapsed) or the picker node (collapsed)\n selectedTab,\n // selectedKey is provided so that the TabLine styles are updated when the TabPicker's width updates from a selection change\n selectedKey\n } = props;\n\n let {direction} = useLocale();\n let {scale} = useProvider();\n\n let [style, setStyle] = useState({\n width: undefined,\n height: undefined\n });\n\n useLayoutEffect(() => {\n if (selectedTab) {\n let styleObj = {transform: undefined, width: undefined, height: undefined};\n // In RTL, calculate the transform from the right edge of the tablist so that resizing the window doesn't break the Tabline position due to offsetLeft changes\n let offset = direction === 'rtl' ? -1 * ((selectedTab.offsetParent as HTMLElement)?.offsetWidth - selectedTab.offsetWidth - selectedTab.offsetLeft) : selectedTab.offsetLeft;\n styleObj.transform = orientation === 'vertical'\n ? `translateY(${selectedTab.offsetTop}px)`\n : `translateX(${offset}px)`;\n\n if (orientation === 'horizontal') {\n styleObj.width = `${selectedTab.offsetWidth}px`;\n } else {\n styleObj.height = `${selectedTab.offsetHeight}px`;\n }\n setStyle(styleObj);\n }\n\n }, [direction, setStyle, selectedTab, orientation, scale, selectedKey]);\n\n return <div className={classNames(styles, 'spectrum-Tabs-selectionIndicator')} role=\"presentation\" style={style} />;\n}\n\n/**\n * A TabList is used within Tabs to group tabs that a user can switch between.\n * The keys of the items within the <TabList> must match up with a corresponding item inside the <TabPanels>.\n */\nexport function TabList<T>(props: SpectrumTabListProps<T>) {\n const tabContext = useContext(TabContext);\n const {refs, tabState, tabProps, tabPanelProps} = tabContext;\n const {isQuiet, density, isDisabled, orientation} = tabProps;\n const {selectedTab, collapse, setTabListState} = tabState;\n const {tablistRef, wrapperRef} = refs;\n // Pass original Tab props but override children to create the collection.\n const state = useTabListState({...tabProps, children: props.children});\n\n let {styleProps} = useStyleProps(props);\n const {tabListProps} = useTabList({...tabProps, ...props}, state, tablistRef);\n\n useEffect(() => {\n // Passing back to root as useTabPanel needs the TabListState\n setTabListState(state);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [state.disabledKeys, state.selectedItem, state.selectedKey, props.children]);\n let stylePropsForVertical = orientation === 'vertical' ? styleProps : {};\n\n let tabListclassName = classNames(styles, 'spectrum-TabsPanel-tabs');\n const tabContent = (\n <div\n {...stylePropsForVertical}\n {...tabListProps}\n ref={tablistRef}\n className={classNames(\n styles,\n 'spectrum-Tabs',\n `spectrum-Tabs--${orientation}`,\n tabListclassName,\n {\n 'spectrum-Tabs--quiet': isQuiet,\n ['spectrum-Tabs--compact']: density === 'compact'\n },\n orientation === 'vertical' && styleProps.className\n )\n }>\n {[...state.collection].map((item) => (\n <Tab key={item.key} item={item} state={state} isDisabled={isDisabled} orientation={orientation} />\n ))}\n <TabLine orientation={orientation} selectedTab={selectedTab} />\n </div>\n );\n\n\n if (orientation === 'vertical') {\n return tabContent;\n } else {\n return (\n <div\n {...styleProps}\n ref={wrapperRef}\n className={classNames(\n styles,\n 'spectrum-TabsPanel-collapseWrapper',\n styleProps.className\n )}>\n {collapse ? <TabPicker {...props} {...tabProps} id={tabPanelProps['aria-labelledby']} state={state} className={tabListclassName} /> : tabContent}\n </div>\n );\n }\n}\n\n/**\n * TabPanels is used within Tabs as a container for the content of each tab.\n * The keys of the items within the <TabPanels> must match up with a corresponding item inside the <TabList>.\n */\nexport function TabPanels<T>(props: SpectrumTabPanelsProps<T>) {\n const {tabState, tabProps} = useContext(TabContext);\n const {tabListState} = tabState;\n\n const factory = nodes => new ListCollection(nodes);\n const collection = useCollection({items: tabProps.items, ...props}, factory, {suppressTextValueWarning: true});\n const selectedItem = tabListState ? collection.getItem(tabListState.selectedKey) : null;\n\n return (\n <TabPanel {...props} key={tabListState?.selectedKey}>\n {selectedItem && selectedItem.props.children}\n </TabPanel>\n );\n}\n\n// @private\nfunction TabPanel<T>(props: SpectrumTabPanelsProps<T>) {\n const {tabState, tabPanelProps: ctxTabPanelProps} = useContext(TabContext);\n const {tabListState} = tabState;\n let ref = useRef();\n const {tabPanelProps} = useTabPanel(props, tabListState, ref);\n let {styleProps} = useStyleProps(props);\n\n if (ctxTabPanelProps['aria-labelledby']) {\n tabPanelProps['aria-labelledby'] = ctxTabPanelProps['aria-labelledby'];\n }\n\n return (\n <FocusRing focusRingClass={classNames(styles, 'focus-ring')}>\n <div {...styleProps} {...tabPanelProps} ref={ref} className={classNames(styles, 'spectrum-TabsPanel-tabpanel', styleProps.className)}>\n {props.children}\n </div>\n </FocusRing>\n );\n}\n\ninterface TabPickerProps<T> extends Omit<SpectrumPickerProps<T>, 'children'> {\n density?: 'compact' | 'regular',\n state: SingleSelectListState<T>,\n className?: string\n}\n\nfunction TabPicker<T>(props: TabPickerProps<T>) {\n let {\n isDisabled,\n isQuiet,\n state,\n 'aria-labelledby': ariaLabeledBy,\n 'aria-label': ariaLabel,\n density,\n className,\n id\n } = props;\n\n let ref = useRef();\n let [pickerNode, setPickerNode] = useState(null);\n\n useEffect(() => {\n let node = unwrapDOMRef(ref);\n setPickerNode(node.current);\n }, [ref]);\n\n let items = [...state.collection].map((item) => ({\n rendered: item.rendered,\n textValue: item.textValue,\n id: item.key\n }));\n\n let pickerProps = {\n 'aria-labelledby': ariaLabeledBy,\n 'aria-label': ariaLabel\n };\n\n // TODO: Figure out if tabListProps should go onto the div here, v2 doesn't do it\n return (\n <div\n className={classNames(\n styles,\n 'spectrum-Tabs',\n 'spectrum-Tabs--horizontal',\n 'spectrum-Tabs--isCollapsed',\n {\n 'spectrum-Tabs--quiet': isQuiet,\n ['spectrum-Tabs--compact']: density === 'compact'\n },\n className\n )}>\n <SlotProvider\n slots={{\n icon: {\n size: 'S',\n UNSAFE_className: classNames(styles, 'spectrum-Icon')\n },\n button: {\n focusRingClass: classNames(styles, 'focus-ring')\n }\n }}>\n <Picker\n {...pickerProps}\n id={id}\n items={items}\n ref={ref}\n isQuiet\n isDisabled={isDisabled}\n selectedKey={state.selectedKey}\n disabledKeys={state.disabledKeys}\n onSelectionChange={state.setSelectedKey}>\n {item => <Item textValue={item.textValue}>{item.rendered}</Item>}\n </Picker>\n {pickerNode && <TabLine orientation=\"horizontal\" selectedTab={pickerNode} selectedKey={state.selectedKey} />}\n </SlotProvider>\n </div>\n );\n}\n\n/**\n * 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.\n */\n// forwardRef doesn't support generic parameters, so cast the result to the correct type\n// https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref\nconst _Tabs = React.forwardRef(Tabs) as <T>(props: SpectrumTabsProps<T> & {ref?: DOMRef<HTMLDivElement>}) => ReactElement;\nexport {_Tabs as Tabs};\n","/*\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DOMRef } from "@react-types/shared";
|
|
2
|
+
import { ReactElement } from "react";
|
|
2
3
|
import { SpectrumTabListProps, SpectrumTabPanelsProps, SpectrumTabsProps } from "@react-types/tabs";
|
|
3
4
|
/**
|
|
4
5
|
* A TabList is used within Tabs to group tabs that a user can switch between.
|
|
@@ -14,8 +15,8 @@ export function TabPanels<T>(props: SpectrumTabPanelsProps<T>): JSX.Element;
|
|
|
14
15
|
* 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.
|
|
15
16
|
*/
|
|
16
17
|
export const Tabs: <T>(props: SpectrumTabsProps<T> & {
|
|
17
|
-
ref?:
|
|
18
|
-
}) =>
|
|
18
|
+
ref?: DOMRef<HTMLDivElement>;
|
|
19
|
+
}) => ReactElement;
|
|
19
20
|
export { Item } from '@react-stately/collections';
|
|
20
21
|
|
|
21
22
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;AAyPA;;;GAGG;AACH,wBAAwB,CAAC,EAAE,KAAK,EAAE,qBAAqB,CAAC,CAAC,eA6DxD;AAED;;;GAGG;AACH,0BAA0B,CAAC,EAAE,KAAK,EAAE,uBAAuB,CAAC,CAAC,eAa5D;AAsGD;;GAEG;AAGH,OAAA,MAAM;UAA2E,OAAO,cAAc,CAAC;MAAM,YAAY,CAAC;ACza1H,OAAO,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC","sources":["packages/@react-spectrum/tabs/src/packages/@react-spectrum/tabs/src/Tabs.tsx","packages/@react-spectrum/tabs/src/packages/@react-spectrum/tabs/src/index.ts","packages/@react-spectrum/tabs/src/index.ts"],"sourcesContent":[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 */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Tabs';\nexport {Item} from '@react-stately/collections';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/tabs",
|
|
3
|
-
"version": "3.1.2-nightly.
|
|
3
|
+
"version": "3.1.2-nightly.3059+2842ff524",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,26 +32,26 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/focus": "3.0.0-nightly.
|
|
36
|
-
"@react-aria/i18n": "3.0.0-nightly.
|
|
37
|
-
"@react-aria/interactions": "3.0.0-nightly.
|
|
38
|
-
"@react-aria/tabs": "3.1.1-nightly.
|
|
39
|
-
"@react-aria/utils": "3.0.0-nightly.
|
|
40
|
-
"@react-spectrum/button": "3.0.0-nightly.
|
|
41
|
-
"@react-spectrum/menu": "3.5.2-nightly.
|
|
42
|
-
"@react-spectrum/picker": "3.5.1-nightly.
|
|
43
|
-
"@react-spectrum/text": "3.1.4-nightly.
|
|
44
|
-
"@react-spectrum/utils": "3.0.0-nightly.
|
|
45
|
-
"@react-stately/collections": "3.0.0-nightly.
|
|
46
|
-
"@react-stately/list": "3.4.2-nightly.
|
|
47
|
-
"@react-stately/tabs": "3.0.0-nightly.
|
|
48
|
-
"@react-types/select": "3.5.2-nightly.
|
|
49
|
-
"@react-types/shared": "3.0.0-nightly.
|
|
50
|
-
"@react-types/tabs": "3.0.2-nightly.
|
|
51
|
-
"@spectrum-icons/workflow": "3.0.0-nightly.
|
|
35
|
+
"@react-aria/focus": "3.0.0-nightly.1368+2842ff524",
|
|
36
|
+
"@react-aria/i18n": "3.0.0-nightly.1368+2842ff524",
|
|
37
|
+
"@react-aria/interactions": "3.0.0-nightly.1368+2842ff524",
|
|
38
|
+
"@react-aria/tabs": "3.1.1-nightly.3059+2842ff524",
|
|
39
|
+
"@react-aria/utils": "3.0.0-nightly.1368+2842ff524",
|
|
40
|
+
"@react-spectrum/button": "3.0.0-nightly.1368+2842ff524",
|
|
41
|
+
"@react-spectrum/menu": "3.5.2-nightly.3059+2842ff524",
|
|
42
|
+
"@react-spectrum/picker": "3.5.1-nightly.3059+2842ff524",
|
|
43
|
+
"@react-spectrum/text": "3.1.4-nightly.3059+2842ff524",
|
|
44
|
+
"@react-spectrum/utils": "3.0.0-nightly.1368+2842ff524",
|
|
45
|
+
"@react-stately/collections": "3.0.0-nightly.1368+2842ff524",
|
|
46
|
+
"@react-stately/list": "3.4.2-nightly.3059+2842ff524",
|
|
47
|
+
"@react-stately/tabs": "3.0.0-nightly.1368+2842ff524",
|
|
48
|
+
"@react-types/select": "3.5.2-nightly.3059+2842ff524",
|
|
49
|
+
"@react-types/shared": "3.0.0-nightly.1368+2842ff524",
|
|
50
|
+
"@react-types/tabs": "3.0.2-nightly.3059+2842ff524",
|
|
51
|
+
"@spectrum-icons/workflow": "3.0.0-nightly.1368+2842ff524"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@adobe/spectrum-css-temp": "3.0.0-nightly.
|
|
54
|
+
"@adobe/spectrum-css-temp": "3.0.0-nightly.1368+2842ff524"
|
|
55
55
|
},
|
|
56
56
|
"peerDependencies": {
|
|
57
57
|
"@react-spectrum/provider": "^3.0.0",
|
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "2842ff524282eb9847eadb1d98d9a293ecbaa0a2"
|
|
65
65
|
}
|
package/dist/main.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"mappings":"AAmBA,2BACE,mBAAa,CAAb,YAAa,CAGb,UACF,CAEA,uCACE,yBAAsB,CAAtB,qBACF,CAEA,qCACE,sBAAmB,CAAnB,kBACF,CAEA,sBACE,mBAAa,CAAb,YAAa,CAGb,iBAAkB,CAClB,SAAU,CAEV,QAAS,CACT,SAAU,CAGV,kBAAmB,CAEnB,YAAa,CACb,wBAAiB,CAAjB,oBAAiB,CAAjB,gBACF,CAEA,2BAEE,iBAAkB,CAElB,qBAAsB,CAEtB,iJAA4C,CAC5C,sJAA6C,CAG7C,SAAU,CAEV,oBAAqB,CACrB,kBAAmB,CAEnB,8BAAwE,CACxE,cAAe,CACf,YAsCF,CAjCI,4HACE,cACF,CAGF,iDAEE,iJAA4C,CAC5C,6BAAuE,CAEvE,uBAKF,CAHE,2FACE,qDACF,CAFA,2FACE,sDACF,CAGF,4CASE,yDAMF,CAfA,wFAUE,0DAKF,CAfA,4CAUE,yDAKF,CAfA,kCACE,UAAW,CACX,iBAAkB,CAClB,OAAQ,CAER,qBAAsB,CAEtB,yFAAkD,CAClD,wMAAwH,CAGxH,gHAA8D,CAC9D,2DAA4D,CAE5D,mBACF,CAGF,gCACE,cAAe,CACf,kBAAmB,CACnB,oBA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YAAa,CACb,iBACF,CAEA,gCACE,mBAAY,CAAZ,WAAY,CACZ,mBAAc,CAAd,aAAc,CACd,0BAAc,CAAd,aAKF,CAHE,+DACE,mBAAY,CAAZ,WACF,CAGF,oCACE,mBAAY,CAAZ,WAAY,CACZ,gHACF,CAGE,2DACE,uDACF,CClRF,sBACE,yDAYF,CATI,2EAEE,eAKF,CAHE,kFACE,2FACF,CAKN,0CACE,uDACF,CAFA,0CACE,wDACF,CAEA,yCACE,sDACF,CAEA,2BACE,kFAyCF,CAvCE,iDACE,2EACF,CAEA,6CACE,kFAKF,CAHE,mEACE,iFACF,CAGF,8CACE,2CAKF,CAHE,oEACE,0CACF,CAGF,6CACE,kFASF,CAPE,oDACE,2FACF,CAEA,mEACE,iFACF,CAGF,8CACE,qFAKF,CAHE,oEACE,oFACF,CAIJ,6BACE,8EAKF,CAHE,sEACE,sDACF,CAIA,8IAEE,4EAKF,CAPA,8IAEE,6EAKF,CAHE,4MACE,sDACF,CAKF,0CACE,YACF,CAEA,sDACE,2FACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/tabs/index.css","./node_modules/@adobe/spectrum-css-temp/components/tabs/skin.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n --spectrum-tabs-item-height: calc(var(--spectrum-tabs-height) - var(--spectrum-tabs-rule-height));\n --spectrum-tabs-compact-item-height: calc(var(--spectrum-tabs-quiet-compact-height) - var(--spectrum-tabs-rule-height));\n}\n\n.spectrum-TabsPanel {\n display: flex;\n /* This is so TabsPanel can collapse with wrapping block/flex containers out of the box. If end user wants to place element next to tabpanel,\n they must include flex: 1 1 auto and min-width: 0 on the Tabs component. */\n width: 100%;\n}\n\n.spectrum-TabsPanel--horizontal {\n flex-direction: column;\n}\n\n.spectrum-TabsPanel--vertical {\n flex-direction: row;\n}\n\n.spectrum-Tabs {\n display: flex;\n\n /* Contain the selection indicator */\n position: relative;\n z-index: 0;\n\n margin: 0;\n padding: 0;\n\n /* Friends should align to the top of the tabs */\n vertical-align: top;\n\n outline: none;\n user-select: none;\n}\n\n.spectrum-Tabs-item {\n /* Contain the focus ring */\n position: relative;\n\n box-sizing: border-box;\n\n block-size: var(--spectrum-tabs-item-height);\n line-height: var(--spectrum-tabs-item-height);\n\n /* Float above the tab line */\n z-index: 1;\n\n text-decoration: none;\n white-space: nowrap;\n\n transition: color var(--spectrum-global-animation-duration-100) ease-out;\n cursor: default;\n outline: none;\n\n &.is-disabled {\n cursor: default;\n\n .spectrum-Tabs-itemLabel {\n cursor: default;\n }\n }\n\n .spectrum-Icon {\n /* Vertical centering */\n block-size: var(--spectrum-tabs-item-height);\n transition: fill var(--spectrum-global-animation-duration-100) ease-out;\n /* Prevents a wiggle in Safari when switching tabs. */\n transform: translate3d(0, 0, 0);\n\n & + .spectrum-Tabs-itemLabel {\n margin-inline-start: var(--spectrum-tabs-icon-gap);\n }\n }\n\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n\n box-sizing: border-box;\n\n block-size: var(--spectrum-tabs-focus-ring-height);\n margin-block-start: calc(calc(var(--spectrum-tabs-focus-ring-height) / -2) + calc(var(--spectrum-tabs-rule-height) / 2));\n inset-inline-start: calc(var(--spectrum-tabs-focus-ring-padding-x) * -1);\n inset-inline-end: calc(var(--spectrum-tabs-focus-ring-padding-x) * -1);\n border: var(--spectrum-tabs-focus-ring-size) solid transparent;\n border-radius: var(--spectrum-tabs-focus-ring-border-radius);\n\n pointer-events: none;\n }\n}\n\n.spectrum-Tabs-itemLabel {\n cursor: default;\n vertical-align: top;\n display: inline-block;\n\n font-size: var(--spectrum-tabs-text-size);\n font-weight: var(--spectrum-tabs-text-font-weight);\n\n &:empty {\n /* Hide the tab label if it's not being used */\n display: none;\n }\n}\n\n.spectrum-Tabs-selectionIndicator {\n position: absolute;\n inset-inline-start: 0;\n\n /* Be below the tab */\n z-index: 0;\n transform-origin: top left;\n\n\n [dir='ltr'] .spectrum-Tabs--horizontal & {\n transform: translateX(var(--spectrum-tabs-focus-ring-padding-x));\n }\n\n [dir='rtl'] .spectrum-Tabs--horizontal & {\n transform: translateX(calc(var(--spectrum-tabs-focus-ring-padding-x) * -1));\n }\n\n border-radius: var(--spectrum-tabs-rule-border-radius);\n}\n\n.spectrum-Tabs--compact {\n .spectrum-Tabs-item {\n block-size: var(--spectrum-tabs-compact-item-height);\n line-height: var(--spectrum-tabs-compact-item-height);\n\n .spectrum-Icon {\n /* Vertical centering */\n block-size: var(--spectrum-tabs-compact-item-height);\n }\n }\n}\n\n.spectrum-Tabs--horizontal {\n align-items: center;\n\n border-block-end: var(--spectrum-tabs-rule-height) solid;\n\n .spectrum-Tabs-item {\n vertical-align: top;\n\n /* Target anything since React likes to add lots of happy <div>s around all things */\n & + *:not(.spectrum-Tabs-selectionIndicator) {\n margin-inline-start: var(--spectrum-tabs-item-gap);\n }\n }\n\n .spectrum-Tabs-selectionIndicator {\n position: absolute;\n block-size: var(--spectrum-tabs-rule-height);\n\n inset-block-end: calc(var(--spectrum-tabs-rule-height) * -1);\n transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out, width var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;\n }\n\n &.spectrum-Tabs--isCollapsed {\n inset-inline-start: 0;\n block-size: var(--spectrum-tabs-item-height);\n\n /* FieldButton Picker focus ring override */\n & button {\n &::before {\n content: '';\n position: absolute;\n top: 50%;\n\n box-sizing: border-box;\n\n block-size: var(--spectrum-tabs-focus-ring-height);\n margin-block-start: calc(calc(var(--spectrum-tabs-focus-ring-height) / -2) + calc(var(--spectrum-tabs-rule-height) / 2));\n inset-inline-start: calc(var(--spectrum-tabs-focus-ring-padding-x) * -1);\n inset-inline-end: calc(var(--spectrum-tabs-focus-ring-padding-x) * -1);\n border: var(--spectrum-tabs-focus-ring-size) solid transparent;\n border-radius: var(--spectrum-tabs-focus-ring-border-radius);\n\n pointer-events: none;\n }\n }\n\n &.spectrum-Tabs--compact {\n & button {\n height: calc(var(--spectrum-tabs-compact-item-height));\n }\n }\n }\n\n &.spectrum-Tabs--compact {\n /* The ActionButton is taller than the tabs, so don't push tabs around */\n box-sizing: content-box;\n block-size: var(--spectrum-tabs-compact-item-height);\n align-items: end;\n }\n}\n\n/* Quiet tabs should not extend all the way across the screen as their line doesn't */\n.spectrum-Tabs--quiet {\n display: inline-flex;\n}\n\n.spectrum-Tabs--vertical {\n display: inline-flex;\n flex-direction: column;\n padding: 0;\n border-inline-start: var(--spectrum-tabs-vertical-rule-width) solid;\n\n .spectrum-Tabs-item {\n block-size: var(--spectrum-tabs-vertical-item-height);\n padding: 0 var(--spectrum-tabs-focus-ring-padding-x);\n /* Subtract focus ring padding from margin-left since the padding value already offsets tabs-items */\n margin-inline-start: calc(var(--spectrum-tabs-vertical-item-margin-left) - var(--spectrum-tabs-focus-ring-padding-x));\n margin-block-end: var(--spectrum-tabs-vertical-item-gap);\n\n &::before {\n /* padding is included in click area of tab items, so only need to offset by the size of the focus ring's border */\n inset-inline-start: calc(var(--spectrum-tabs-focus-ring-size) * -1);\n inset-inline-end: calc(var(--spectrum-tabs-focus-ring-size) * -1);\n margin-block-start: calc(calc(var(--spectrum-tabs-focus-ring-height) / -2));\n }\n }\n\n &.spectrum-Tabs--compact {\n .spectrum-Tabs-item {\n block-size: var(--spectrum-tabs-compact-vertical-item-height);\n line-height: var(--spectrum-tabs-compact-vertical-item-height);\n margin-block-end: var(--spectrum-tabs-compact-vertical-item-gap);\n\n .spectrum-Icon {\n /* Vertical centering */\n block-size: var(--spectrum-tabs-compact-vertical-item-height);\n }\n }\n }\n\n .spectrum-Tabs-selectionIndicator {\n position: absolute;\n inline-size: var(--spectrum-tabs-vertical-rule-width);\n\n inset-inline-start: calc(var(--spectrum-tabs-vertical-rule-width) * -1);\n transition: transform var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out, height var(--spectrum-tabs-selection-indicator-animation-duration) ease-in-out;\n }\n}\n\n.spectrum-TabsPanel-collapseWrapper {\n display: flex;\n position: relative;\n}\n\n.spectrum-TabsPanel-tabs {\n flex-grow: 1;\n flex-shrink: 0;\n flex-basis: 0%;\n\n &.spectrum-Tabs--vertical {\n flex-grow: 0;\n }\n}\n\n.spectrum-TabsPanel-tabpanel {\n flex-grow: 1;\n border: var(--spectrum-tabs-focus-ring-size) solid transparent;\n}\n\n.spectrum-TabsPanel--vertical {\n .spectrum-Tabs {\n padding-right: var(--spectrum-global-dimension-size-160);\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-Tabs {\n border-block-end-color: var(--spectrum-tabs-rule-color);\n\n &.spectrum-Tabs--isCollapsed {\n :focus-ring {\n /* FieldButton Picker focus ring override */\n box-shadow: none;\n\n &::before {\n border-color: var(--spectrum-tabs-focus-ring-color);\n }\n }\n }\n}\n\n.spectrum-Tabs--vertical {\n border-inline-start-color: var(--spectrum-tabs-vertical-rule-color);\n}\n\n.spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-selection-indicator-color);\n}\n\n.spectrum-Tabs-item {\n color: var(--spectrum-tabs-text-color);\n\n .spectrum-Icon {\n fill: var(--spectrum-tabs-icon-color)\n }\n\n &:hover {\n color: var(--spectrum-tabs-text-color-hover);\n\n .spectrum-Icon {\n fill: var(--spectrum-tabs-icon-color-hover)\n }\n }\n\n &.is-selected {\n color: var(--spectrum-tabs-text-color-selected);\n\n .spectrum-Icon {\n fill: var(--spectrum-tabs-icon-color-selected)\n }\n }\n\n &:focus-ring {\n color: var(--spectrum-tabs-text-color-key-focus);\n\n &::before {\n border-color: var(--spectrum-tabs-focus-ring-color);\n }\n\n .spectrum-Icon {\n fill: var(--spectrum-tabs-icon-color-key-focus)\n }\n }\n\n &.is-disabled {\n color: var(--spectrum-tabs-text-color-disabled);\n\n .spectrum-Icon {\n fill: var(--spectrum-tabs-icon-color-disabled)\n }\n }\n}\n\n.spectrum-Tabs--quiet {\n border-block-end-color: var(--spectrum-tabs-quiet-rule-color);\n\n .spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-quiet-selection-indicator-color);\n }\n}\n\n.spectrum-Tabs--vertical {\n &.spectrum-Tabs--quiet,\n &.spectrum-Tabs--compact {\n border-inline-start-color: var(--spectrum-tabs-quiet-vertical-rule-color);\n\n .spectrum-Tabs-selectionIndicator {\n background-color: var(--spectrum-tabs-quiet-selection-indicator-color);\n }\n }\n}\n\n.spectrum-TabsPanel-tabpanel {\n &:focus {\n outline: none;\n }\n\n &:focus-ring {\n border-color: var(--spectrum-tabs-focus-ring-color);\n }\n}\n"],"names":[],"version":3,"file":"main.css.map"}
|