@toptal/picasso-tabs 5.0.11-alpha-MP-672-support-end-adornment-properly-in-number-input-992bd4cfc.6 → 5.0.11
Sign up to get free protection for your applications and to get access to all the features.
- package/dist-package/src/Tab/styles.d.ts +1 -1
- package/dist-package/src/TabScrollButton/TabScrollButton.d.ts.map +1 -1
- package/dist-package/src/TabScrollButton/TabScrollButton.js +6 -16
- package/dist-package/src/TabScrollButton/TabScrollButton.js.map +1 -1
- package/package.json +13 -14
- package/src/TabScrollButton/TabScrollButton.tsx +13 -18
- package/LICENSE +0 -20
- package/dist-package/src/TabScrollButton/styles.d.ts +0 -4
- package/dist-package/src/TabScrollButton/styles.d.ts.map +0 -1
- package/dist-package/src/TabScrollButton/styles.js +0 -35
- package/dist-package/src/TabScrollButton/styles.js.map +0 -1
- package/src/TabScrollButton/styles.ts +0 -37
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { Theme } from '@material-ui/core/styles';
|
2
|
-
declare const _default: ({ sizes, palette, shadows, transitions }: Theme) => import("@material-ui/styles").StyleRules<{}, "
|
2
|
+
declare const _default: ({ sizes, palette, shadows, transitions }: Theme) => import("@material-ui/styles").StyleRules<{}, "selected" | "horizontal" | "vertical" | "wrapper">;
|
3
3
|
export default _default;
|
4
4
|
//# sourceMappingURL=styles.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TabScrollButton.d.ts","sourceRoot":"","sources":["../../../src/TabScrollButton/TabScrollButton.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"TabScrollButton.d.ts","sourceRoot":"","sources":["../../../src/TabScrollButton/TabScrollButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKvD,aAAK,aAAa,GAAG,MAAM,GAAG,OAAO,CAAA;AAErC,MAAM,WAAW,KAAM,SAAQ,SAAS;IACtC,gDAAgD;IAChD,SAAS,EAAE,aAAa,CAAA;IACxB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,eAAe,8EAsC3B,CAAA;AAID,eAAe,eAAe,CAAA"}
|
@@ -9,31 +9,21 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
9
9
|
}
|
10
10
|
return t;
|
11
11
|
};
|
12
|
-
import cx from 'classnames';
|
13
12
|
import React, { forwardRef } from 'react';
|
14
13
|
import { ButtonBase } from '@material-ui/core';
|
15
|
-
import { makeStyles } from '@material-ui/core/styles';
|
16
14
|
import { BackMinor16, ChevronMinor16 } from '@toptal/picasso-icons';
|
17
15
|
import { Container } from '@toptal/picasso-container';
|
18
|
-
import
|
19
|
-
const useStyles = makeStyles(styles, {
|
20
|
-
name: 'PicassoTabScrollButton',
|
21
|
-
});
|
16
|
+
import { twMerge } from '@toptal/picasso-tailwind-merge';
|
22
17
|
export const TabScrollButton = forwardRef(function TabScrollButton(props, ref) {
|
23
18
|
const { className, style, direction, disabled } = props, rest = __rest(props, ["className", "style", "direction", "disabled"]);
|
24
|
-
const classes = useStyles();
|
25
19
|
if (disabled) {
|
26
20
|
return null;
|
27
21
|
}
|
28
|
-
return (React.createElement(Container, Object.assign({}, rest, { ref: ref, className:
|
29
|
-
React.createElement(Container, { className:
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
React.createElement(ButtonBase, { className: cx(classes.button, {
|
34
|
-
[classes.left]: direction === 'left',
|
35
|
-
[classes.right]: direction === 'right',
|
36
|
-
}), "aria-label": `${direction} button`, "data-testid": `tab-scroll-button-${direction}` }, direction === 'left' ? React.createElement(BackMinor16, null) : React.createElement(ChevronMinor16, null)))));
|
22
|
+
return (React.createElement(Container, Object.assign({}, rest, { ref: ref, className: twMerge('relative', className), style: style }),
|
23
|
+
React.createElement(Container, { className: twMerge('absolute w-10 h-full z-10', direction === 'left'
|
24
|
+
? 'bg-gradient-to-r from-white via-white to-transparent'
|
25
|
+
: 'bg-gradient-to-l from-white via-white to-transparent', direction === 'left' ? 'left-0' : 'right-0') },
|
26
|
+
React.createElement(ButtonBase, { className: twMerge('absolute w-4 h-full', direction === 'left' ? 'left-0' : 'right-0'), "aria-label": `${direction} button`, "data-testid": `tab-scroll-button-${direction}` }, direction === 'left' ? React.createElement(BackMinor16, null) : React.createElement(ChevronMinor16, null)))));
|
37
27
|
});
|
38
28
|
TabScrollButton.displayName = 'TabScrollButton';
|
39
29
|
export default TabScrollButton;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TabScrollButton.js","sourceRoot":"","sources":["../../../src/TabScrollButton/TabScrollButton.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,
|
1
|
+
{"version":3,"file":"TabScrollButton.js","sourceRoot":"","sources":["../../../src/TabScrollButton/TabScrollButton.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAE9C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAWxD,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CACvC,SAAS,eAAe,CAAC,KAAK,EAAE,GAAG;IACjC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,KAAc,KAAK,EAAd,IAAI,UAAK,KAAK,EAA1D,+CAAkD,CAAQ,CAAA;IAEhE,IAAI,QAAQ,EAAE;QACZ,OAAO,IAAI,CAAA;KACZ;IAED,OAAO,CACL,oBAAC,SAAS,oBACJ,IAAI,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,EACzC,KAAK,EAAE,KAAK;QAEZ,oBAAC,SAAS,IACR,SAAS,EAAE,OAAO,CAChB,2BAA2B,EAC3B,SAAS,KAAK,MAAM;gBAClB,CAAC,CAAC,sDAAsD;gBACxD,CAAC,CAAC,sDAAsD,EAC1D,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAC5C;YAED,oBAAC,UAAU,IACT,SAAS,EAAE,OAAO,CAChB,qBAAqB,EACrB,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAC5C,gBACW,GAAG,SAAS,SAAS,iBACpB,qBAAqB,SAAS,EAAE,IAE5C,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,oBAAC,WAAW,OAAG,CAAC,CAAC,CAAC,oBAAC,cAAc,OAAG,CACjD,CACH,CACF,CACb,CAAA;AACH,CAAC,CACF,CAAA;AAED,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAA;AAE/C,eAAe,eAAe,CAAA"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@toptal/picasso-tabs",
|
3
|
-
"version": "5.0.11
|
3
|
+
"version": "5.0.11",
|
4
4
|
"description": "Toptal UI components library - Tabs",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -22,15 +22,14 @@
|
|
22
22
|
},
|
23
23
|
"homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
|
24
24
|
"dependencies": {
|
25
|
-
"@toptal/picasso-container": "3.1.
|
26
|
-
"@toptal/picasso-icons": "1.11.
|
27
|
-
"@toptal/picasso-shared": "15.0.
|
28
|
-
"@toptal/picasso-typography": "4.0.
|
29
|
-
"@toptal/picasso-typography-overflow": "4.0.
|
30
|
-
"@toptal/picasso-user-badge": "5.1.
|
31
|
-
"@toptal/picasso-utils": "3.0.
|
32
|
-
"ap-style-title-case": "^1.1.2"
|
33
|
-
"classnames": "^2.5.1"
|
25
|
+
"@toptal/picasso-container": "3.1.1",
|
26
|
+
"@toptal/picasso-icons": "1.11.0",
|
27
|
+
"@toptal/picasso-shared": "15.0.0",
|
28
|
+
"@toptal/picasso-typography": "4.0.2",
|
29
|
+
"@toptal/picasso-typography-overflow": "4.0.2",
|
30
|
+
"@toptal/picasso-user-badge": "5.1.9",
|
31
|
+
"@toptal/picasso-utils": "3.0.0",
|
32
|
+
"ap-style-title-case": "^1.1.2"
|
34
33
|
},
|
35
34
|
"sideEffects": [
|
36
35
|
"**/styles.ts",
|
@@ -39,20 +38,20 @@
|
|
39
38
|
"peerDependencies": {
|
40
39
|
"@material-ui/core": "4.12.4",
|
41
40
|
"@toptal/picasso-provider": "*",
|
41
|
+
"@toptal/picasso-tailwind-merge": "^2.0.0",
|
42
42
|
"react": ">=16.12.0 < 19.0.0"
|
43
43
|
},
|
44
44
|
"exports": {
|
45
45
|
".": "./dist-package/src/index.js"
|
46
46
|
},
|
47
47
|
"devDependencies": {
|
48
|
+
"@toptal/picasso-provider": "5.0.0",
|
48
49
|
"@material-ui/core": "4.12.4",
|
49
|
-
"@toptal/picasso-
|
50
|
-
"@toptal/picasso-test-utils": "1.1.2-alpha-MP-672-support-end-adornment-properly-in-number-input-992bd4cfc.283+992bd4cfc"
|
50
|
+
"@toptal/picasso-test-utils": "1.1.1"
|
51
51
|
},
|
52
52
|
"files": [
|
53
53
|
"dist-package/**",
|
54
54
|
"!dist-package/tsconfig.tsbuildinfo",
|
55
55
|
"src"
|
56
|
-
]
|
57
|
-
"gitHead": "992bd4cfcc7ead101ea1815874ba2e4366979ee1"
|
56
|
+
]
|
58
57
|
}
|
@@ -1,12 +1,9 @@
|
|
1
|
-
import cx from 'classnames'
|
2
1
|
import React, { forwardRef } from 'react'
|
3
2
|
import { ButtonBase } from '@material-ui/core'
|
4
|
-
import { makeStyles } from '@material-ui/core/styles'
|
5
3
|
import type { BaseProps } from '@toptal/picasso-shared'
|
6
4
|
import { BackMinor16, ChevronMinor16 } from '@toptal/picasso-icons'
|
7
5
|
import { Container } from '@toptal/picasso-container'
|
8
|
-
|
9
|
-
import styles from './styles'
|
6
|
+
import { twMerge } from '@toptal/picasso-tailwind-merge'
|
10
7
|
|
11
8
|
type DirectionType = 'left' | 'right'
|
12
9
|
|
@@ -17,14 +14,9 @@ export interface Props extends BaseProps {
|
|
17
14
|
disabled?: boolean
|
18
15
|
}
|
19
16
|
|
20
|
-
const useStyles = makeStyles(styles, {
|
21
|
-
name: 'PicassoTabScrollButton',
|
22
|
-
})
|
23
|
-
|
24
17
|
export const TabScrollButton = forwardRef<HTMLDivElement, Props>(
|
25
18
|
function TabScrollButton(props, ref) {
|
26
19
|
const { className, style, direction, disabled, ...rest } = props
|
27
|
-
const classes = useStyles()
|
28
20
|
|
29
21
|
if (disabled) {
|
30
22
|
return null
|
@@ -34,20 +26,23 @@ export const TabScrollButton = forwardRef<HTMLDivElement, Props>(
|
|
34
26
|
<Container
|
35
27
|
{...rest}
|
36
28
|
ref={ref}
|
37
|
-
className={
|
29
|
+
className={twMerge('relative', className)}
|
38
30
|
style={style}
|
39
31
|
>
|
40
32
|
<Container
|
41
|
-
className={
|
42
|
-
|
43
|
-
|
44
|
-
|
33
|
+
className={twMerge(
|
34
|
+
'absolute w-10 h-full z-10',
|
35
|
+
direction === 'left'
|
36
|
+
? 'bg-gradient-to-r from-white via-white to-transparent'
|
37
|
+
: 'bg-gradient-to-l from-white via-white to-transparent',
|
38
|
+
direction === 'left' ? 'left-0' : 'right-0'
|
39
|
+
)}
|
45
40
|
>
|
46
41
|
<ButtonBase
|
47
|
-
className={
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
className={twMerge(
|
43
|
+
'absolute w-4 h-full',
|
44
|
+
direction === 'left' ? 'left-0' : 'right-0'
|
45
|
+
)}
|
51
46
|
aria-label={`${direction} button`}
|
52
47
|
data-testid={`tab-scroll-button-${direction}`}
|
53
48
|
>
|
package/LICENSE
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2021-2022 Toptal, LLC
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
-
this software and associated documentation files (the “Software”), to deal in
|
7
|
-
the Software without restriction, including without limitation the rights to
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
-
subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/TabScrollButton/styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;sCAGxB,KAAK;AAAlC,wBAgCC"}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import { createStyles } from '@material-ui/core';
|
2
|
-
import { alpha } from '@toptal/picasso-shared';
|
3
|
-
export default ({ palette }) => {
|
4
|
-
const color = palette.common.white;
|
5
|
-
const colorStops = `${color} 0%, ${color} 50%, ${alpha(color, 0)} 100%`;
|
6
|
-
return createStyles({
|
7
|
-
root: {
|
8
|
-
position: 'relative',
|
9
|
-
},
|
10
|
-
gradient: {
|
11
|
-
position: 'absolute',
|
12
|
-
width: '2.5rem',
|
13
|
-
height: '100%',
|
14
|
-
zIndex: 2,
|
15
|
-
'&$left': {
|
16
|
-
background: `linear-gradient(90deg, ${colorStops})`,
|
17
|
-
},
|
18
|
-
'&$right': {
|
19
|
-
background: `linear-gradient(270deg, ${colorStops})`,
|
20
|
-
},
|
21
|
-
},
|
22
|
-
button: {
|
23
|
-
position: 'absolute',
|
24
|
-
width: '1rem',
|
25
|
-
height: '100%',
|
26
|
-
},
|
27
|
-
left: {
|
28
|
-
left: 0,
|
29
|
-
},
|
30
|
-
right: {
|
31
|
-
right: 0,
|
32
|
-
},
|
33
|
-
});
|
34
|
-
};
|
35
|
-
//# sourceMappingURL=styles.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/TabScrollButton/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAE9C,eAAe,CAAC,EAAE,OAAO,EAAS,EAAE,EAAE;IACpC,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,KAAK,CAAA;IAClC,MAAM,UAAU,GAAG,GAAG,KAAK,QAAQ,KAAK,SAAS,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,OAAO,CAAA;IAEvE,OAAO,YAAY,CAAC;QAClB,IAAI,EAAE;YACJ,QAAQ,EAAE,UAAU;SACrB;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,QAAQ;YACf,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,CAAC;YACT,QAAQ,EAAE;gBACR,UAAU,EAAE,0BAA0B,UAAU,GAAG;aACpD;YACD,SAAS,EAAE;gBACT,UAAU,EAAE,2BAA2B,UAAU,GAAG;aACrD;SACF;QACD,MAAM,EAAE;YACN,QAAQ,EAAE,UAAU;YACpB,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;SACf;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,CAAC;SACR;QACD,KAAK,EAAE;YACL,KAAK,EAAE,CAAC;SACT;KACF,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import { createStyles } from '@material-ui/core'
|
2
|
-
import type { Theme } from '@material-ui/core/styles'
|
3
|
-
import { alpha } from '@toptal/picasso-shared'
|
4
|
-
|
5
|
-
export default ({ palette }: Theme) => {
|
6
|
-
const color = palette.common.white
|
7
|
-
const colorStops = `${color} 0%, ${color} 50%, ${alpha(color, 0)} 100%`
|
8
|
-
|
9
|
-
return createStyles({
|
10
|
-
root: {
|
11
|
-
position: 'relative',
|
12
|
-
},
|
13
|
-
gradient: {
|
14
|
-
position: 'absolute',
|
15
|
-
width: '2.5rem',
|
16
|
-
height: '100%',
|
17
|
-
zIndex: 2,
|
18
|
-
'&$left': {
|
19
|
-
background: `linear-gradient(90deg, ${colorStops})`,
|
20
|
-
},
|
21
|
-
'&$right': {
|
22
|
-
background: `linear-gradient(270deg, ${colorStops})`,
|
23
|
-
},
|
24
|
-
},
|
25
|
-
button: {
|
26
|
-
position: 'absolute',
|
27
|
-
width: '1rem',
|
28
|
-
height: '100%',
|
29
|
-
},
|
30
|
-
left: {
|
31
|
-
left: 0,
|
32
|
-
},
|
33
|
-
right: {
|
34
|
-
right: 0,
|
35
|
-
},
|
36
|
-
})
|
37
|
-
}
|