@toptal/picasso 31.3.1 → 31.4.0
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/Tabs/Tabs.d.ts +2 -0
- package/Tabs/Tabs.js +2 -2
- package/Tabs/Tabs.js.map +1 -1
- package/package.json +1 -1
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export interface Props extends BaseProps, Omit<ButtonOrAnchorProps, 'onChange'>
|
|
|
10
10
|
value: TabsProps['value'];
|
|
11
11
|
/** The tabs orientation (layout flow direction). */
|
|
12
12
|
orientation?: 'horizontal' | 'vertical';
|
|
13
|
+
/** Determines additional display behavior of the tabs */
|
|
14
|
+
variant?: Extract<TabsProps['variant'], 'scrollable' | 'fullWidth'>;
|
|
13
15
|
}
|
|
14
16
|
export declare const TabsOrientationContext: React.Context<"horizontal" | "vertical">;
|
|
15
17
|
export declare const Tabs: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLButtonElement>>;
|
package/Tabs/Tabs.js
CHANGED
|
@@ -21,11 +21,11 @@ const useStyles = makeStyles(styles, {
|
|
|
21
21
|
export const TabsOrientationContext = React.createContext('horizontal');
|
|
22
22
|
// eslint-disable-next-line react/display-name
|
|
23
23
|
export const Tabs = forwardRef(function Tabs(props, ref) {
|
|
24
|
-
const { children, orientation, onChange, value } = props, rest = __rest(props, ["children", "orientation", "onChange", "value"]);
|
|
24
|
+
const { children, orientation, onChange, value, variant = 'scrollable' } = props, rest = __rest(props, ["children", "orientation", "onChange", "value", "variant"]);
|
|
25
25
|
const classes = useStyles(props);
|
|
26
26
|
const action = useTabAction();
|
|
27
27
|
return (React.createElement(TabsOrientationContext.Provider, { value: orientation },
|
|
28
|
-
React.createElement(MUITabs, Object.assign({}, rest, { classes: { root: classes[orientation] }, ref: ref, onChange: onChange, value: value,
|
|
28
|
+
React.createElement(MUITabs, Object.assign({}, rest, { classes: { root: classes[orientation] }, ref: ref, onChange: onChange, value: value, action: action, scrollButtons: 'auto', ScrollButtonComponent: TabScrollButton, orientation: orientation, variant: variant }), children)));
|
|
29
29
|
});
|
|
30
30
|
Tabs.displayName = 'Tabs';
|
|
31
31
|
Tabs.defaultProps = {
|
package/Tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/Tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAa,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,UAAU,EAAS,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,IAAI,IAAI,OAAO,EAAa,MAAM,mBAAmB,CAAA;AAG9D,OAAO,eAAe,MAAM,oBAAoB,CAAA;AAChD,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,YAAY,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/Tabs/Tabs.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAa,MAAM,OAAO,CAAA;AACpD,OAAO,EAAE,UAAU,EAAS,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,IAAI,IAAI,OAAO,EAAa,MAAM,mBAAmB,CAAA;AAG9D,OAAO,eAAe,MAAM,oBAAoB,CAAA;AAChD,OAAO,MAAM,MAAM,UAAU,CAAA;AAC7B,OAAO,YAAY,MAAM,kBAAkB,CAAA;AAqB3C,MAAM,SAAS,GAAG,UAAU,CAAQ,MAAM,EAAE;IAC1C,IAAI,EAAE,MAAM;CACb,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAEvD,YAAY,CAAC,CAAA;AAEf,8CAA8C;AAC9C,MAAM,CAAC,MAAM,IAAI,GAAG,UAAU,CAA2B,SAAS,IAAI,CACpE,KAAK,EACL,GAAG;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