@toptal/picasso-pagination 1.0.13 → 2.0.1

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.
@@ -36,12 +36,12 @@ export const Pagination = forwardRef(function Pagination(props, ref) {
36
36
  return (React.createElement(Container, { key: index, className: classes.ellipsis },
37
37
  React.createElement(Typography, { size: 'xsmall', weight: 'semibold', color: 'black' }, ELLIPSIS)));
38
38
  }
39
- return (React.createElement(PaginationButton, { key: index, className: classes.button, page: Number(page), activePage: activePage, disabled: disabled, onClick: onPageChange }));
39
+ return (React.createElement(PaginationButton, { key: index, className: '[&+&]:ml-2', page: Number(page), activePage: activePage, disabled: disabled, onClick: onPageChange }));
40
40
  });
41
41
  return (React.createElement(Container, Object.assign({}, rest, { ref: ref, flex: true, inline: true, alignItems: 'center' }),
42
- React.createElement(Button, { className: classes.button, disabled: isFirstActive || disabled, onClick: handlePrevClick, variant: 'secondary', size: 'small' }, "Prev"),
42
+ React.createElement(Button, { className: '[&+&]:ml-2', disabled: isFirstActive || disabled, onClick: handlePrevClick, variant: 'secondary', size: 'small' }, "Prev"),
43
43
  variant === 'compact' ? null : pageButtons,
44
- React.createElement(Button, { className: classes.button, disabled: isLastActive || disabled, onClick: handleNextClick, variant: 'secondary', size: 'small' }, "Next")));
44
+ React.createElement(Button, { className: '[&+&]:ml-2', disabled: isLastActive || disabled, onClick: handleNextClick, variant: 'secondary', size: 'small' }, "Next")));
45
45
  });
46
46
  Pagination.defaultProps = {
47
47
  disabled: false,
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/Pagination/Pagination.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,O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OAAO,EAAE,eAAe,EACxB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,OAAO,WAGL,CACC,CACb,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,UAAU,CAAC,YAAY,GAAG;IACxB,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,CAAC;IACf,OAAO,EAAE,SAAS;CACnB,CAAA;AAED,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,eAAe,UAAU,CAAA"}
@@ -1,3 +1,3 @@
1
- declare const _default: () => import("@material-ui/styles").StyleRules<{}, "button" | "ellipsis">;
1
+ declare const _default: () => import("@material-ui/styles").StyleRules<{}, "ellipsis">;
2
2
  export default _default;
3
3
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Pagination/styles.ts"],"names":[],"mappings":";AAEA,wBAWI"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Pagination/styles.ts"],"names":[],"mappings":";AAEA,wBAMI"}
@@ -1,10 +1,5 @@
1
1
  import { createStyles } from '@material-ui/core/styles';
2
2
  export default () => createStyles({
3
- button: {
4
- '&+&': {
5
- marginLeft: '0.5em',
6
- },
7
- },
8
3
  ellipsis: {
9
4
  padding: '0 0.5em',
10
5
  cursor: 'default',
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Pagination/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,MAAM,EAAE;QACN,KAAK,EAAE;YACL,UAAU,EAAE,OAAO;SACpB;KACF;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAA"}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Pagination/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAEvD,eAAe,GAAG,EAAE,CAClB,YAAY,CAAC;IACX,QAAQ,EAAE;QACR,OAAO,EAAE,SAAS;QAClB,MAAM,EAAE,SAAS;KAClB;CACF,CAAC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationButton.d.ts","sourceRoot":"","sources":["../../../src/PaginationButton/PaginationButton.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAY3D,MAAM,WAAW,KAAM,SAAQ,aAAa;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAED,QAAA,MAAM,gBAAgB,UAAW,KAAK,gBAkBrC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"PaginationButton.d.ts","sourceRoot":"","sources":["../../../src/PaginationButton/PaginationButton.tsx"],"names":[],"mappings":";AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAA;AAI3D,MAAM,WAAW,KAAM,SAAQ,aAAa;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CAChC;AAED,QAAA,MAAM,gBAAgB,UAAW,KAAK,gBA0BrC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1,16 +1,11 @@
1
1
  import React from 'react';
2
- import { makeStyles } from '@material-ui/core';
3
- import cx from 'classnames';
2
+ import { twMerge } from 'tailwind-merge';
4
3
  import { Button } from '@toptal/picasso-button';
5
- import styles from './styles';
6
- const useStyles = makeStyles(styles, {
7
- name: 'PicassoPaginationButton',
8
- });
9
4
  const PaginationButton = (props) => {
10
5
  const { page, activePage, disabled, onClick, className } = props;
11
- const classes = useStyles();
12
6
  const isActive = page === activePage;
13
- return (React.createElement(Button, { className: cx(classes.root, { [classes.active]: isActive }, className), "aria-current": isActive, active: isActive, disabled: disabled, onClick: () => onClick(page), variant: 'secondary', size: 'small' }, page));
7
+ const finalClassName = twMerge('min-w-[1.5em] px-[0.3em] ', 'active:bg-graphite-700 active:border-graphite-700 active:text-white', isActive && 'bg-graphite-700 border-graphite-700 text-white', 'disabled:text-gray-500', disabled && 'text-gray-500', className);
8
+ return (React.createElement(Button, { className: finalClassName, "aria-current": isActive, active: isActive, disabled: disabled, onClick: () => onClick(page), variant: 'secondary', size: 'small' }, page));
14
9
  };
15
10
  export default PaginationButton;
16
11
  //# sourceMappingURL=PaginationButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationButton.js","sourceRoot":"","sources":["../../../src/PaginationButton/PaginationButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAE/C,OAAO,MAAM,MAAM,UAAU,CAAA;AAE7B,MAAM,SAAS,GAAG,UAAU,CAAQ,MAAM,EAAE;IAC1C,IAAI,EAAE,yBAAyB;CAChC,CAAC,CAAA;AASF,MAAM,gBAAgB,GAAG,CAAC,KAAY,EAAE,EAAE;IACxC,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,KAAK,CAAA;IAChE,MAAM,OAAO,GAAG,SAAS,EAAE,CAAA;IAC3B,MAAM,QAAQ,GAAG,IAAI,KAAK,UAAU,CAAA;IAEpC,OAAO,CACL,oBAAC,MAAM,IACL,SAAS,EAAE,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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-pagination",
3
- "version": "1.0.13",
3
+ "version": "2.0.1",
4
4
  "description": "Toptal UI components library - Pagination",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,11 +22,12 @@
22
22
  },
23
23
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
24
24
  "dependencies": {
25
- "@toptal/picasso-button": "1.0.13",
26
- "@toptal/picasso-container": "1.0.2",
27
- "@toptal/picasso-typography": "2.0.0",
28
- "@toptal/picasso-utils": "1.0.2",
29
- "classnames": "^2.5.1"
25
+ "@toptal/picasso-button": "2.0.1",
26
+ "@toptal/picasso-container": "1.0.3",
27
+ "@toptal/picasso-typography": "2.0.1",
28
+ "@toptal/picasso-utils": "1.0.3",
29
+ "classnames": "^2.5.1",
30
+ "tailwind-merge": "^2.2.2"
30
31
  },
31
32
  "sideEffects": [
32
33
  "**/styles.ts",
@@ -34,13 +35,14 @@
34
35
  ],
35
36
  "peerDependencies": {
36
37
  "@material-ui/core": "4.12.4",
37
- "react": ">=16.12.0 < 19.0.0"
38
+ "react": ">=16.12.0 < 19.0.0",
39
+ "@toptal/picasso-tailwind": "^2.5.0"
38
40
  },
39
41
  "exports": {
40
42
  ".": "./dist-package/src/index.js"
41
43
  },
42
44
  "devDependencies": {
43
- "@toptal/picasso-test-utils": "1.1.0"
45
+ "@toptal/picasso-test-utils": "1.1.1"
44
46
  },
45
47
  "files": [
46
48
  "dist-package/**",
@@ -75,7 +75,7 @@ export const Pagination = forwardRef<HTMLDivElement, Props>(function Pagination(
75
75
  return (
76
76
  <PaginationButton
77
77
  key={index}
78
- className={classes.button}
78
+ className='[&+&]:ml-2'
79
79
  page={Number(page)}
80
80
  activePage={activePage}
81
81
  disabled={disabled}
@@ -87,7 +87,7 @@ export const Pagination = forwardRef<HTMLDivElement, Props>(function Pagination(
87
87
  return (
88
88
  <Container {...rest} ref={ref} flex inline alignItems='center'>
89
89
  <Button
90
- className={classes.button}
90
+ className='[&+&]:ml-2'
91
91
  disabled={isFirstActive || disabled}
92
92
  onClick={handlePrevClick}
93
93
  variant='secondary'
@@ -99,7 +99,7 @@ export const Pagination = forwardRef<HTMLDivElement, Props>(function Pagination(
99
99
  {variant === 'compact' ? null : pageButtons}
100
100
 
101
101
  <Button
102
- className={classes.button}
102
+ className='[&+&]:ml-2'
103
103
  disabled={isLastActive || disabled}
104
104
  onClick={handleNextClick}
105
105
  variant='secondary'
@@ -9,26 +9,30 @@ exports[`Pagination renders 1`] = `
9
9
  class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline"
10
10
  >
11
11
  <button
12
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPagination-button"
12
+ aria-disabled="false"
13
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black active:bg-gray active:border-black bg-white border-gray min-w h-6 py-0 px-3 [&+&]:ml-2"
13
14
  data-component-type="button"
15
+ role="button"
14
16
  tabindex="0"
15
17
  type="button"
16
18
  >
17
19
  <span
18
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
20
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
19
21
  >
20
22
  Prev
21
23
  </span>
22
24
  </button>
23
25
  <button
24
26
  aria-current="false"
25
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button"
27
+ aria-disabled="false"
28
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black bg-white border-gray h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray [&+&]:ml-2"
26
29
  data-component-type="button"
30
+ role="button"
27
31
  tabindex="0"
28
32
  type="button"
29
33
  >
30
34
  <span
31
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
35
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
32
36
  >
33
37
  1
34
38
  </span>
@@ -44,65 +48,75 @@ exports[`Pagination renders 1`] = `
44
48
  </div>
45
49
  <button
46
50
  aria-current="false"
47
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button"
51
+ aria-disabled="false"
52
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black bg-white border-gray h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray [&+&]:ml-2"
48
53
  data-component-type="button"
54
+ role="button"
49
55
  tabindex="0"
50
56
  type="button"
51
57
  >
52
58
  <span
53
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
59
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
54
60
  >
55
61
  3
56
62
  </span>
57
63
  </button>
58
64
  <button
59
65
  aria-current="false"
60
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button"
66
+ aria-disabled="false"
67
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black bg-white border-gray h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray [&+&]:ml-2"
61
68
  data-component-type="button"
69
+ role="button"
62
70
  tabindex="0"
63
71
  type="button"
64
72
  >
65
73
  <span
66
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
74
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
67
75
  >
68
76
  4
69
77
  </span>
70
78
  </button>
71
79
  <button
72
80
  aria-current="true"
73
- class="MuiButtonBase-root PicassoButton-active PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPaginationButton-active PicassoPagination-button"
81
+ aria-disabled="false"
82
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] shadow-none border border-solid hover:border-black visited:text-black h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white bg-graphite border-graphite text-white disabled:text-gray [&+&]:ml-2"
74
83
  data-component-type="button"
84
+ role="button"
75
85
  tabindex="0"
76
86
  type="button"
77
87
  >
78
88
  <span
79
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
89
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
80
90
  >
81
91
  5
82
92
  </span>
83
93
  </button>
84
94
  <button
85
95
  aria-current="false"
86
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button"
96
+ aria-disabled="false"
97
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black bg-white border-gray h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray [&+&]:ml-2"
87
98
  data-component-type="button"
99
+ role="button"
88
100
  tabindex="0"
89
101
  type="button"
90
102
  >
91
103
  <span
92
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
104
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
93
105
  >
94
106
  6
95
107
  </span>
96
108
  </button>
97
109
  <button
98
110
  aria-current="false"
99
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button"
111
+ aria-disabled="false"
112
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black bg-white border-gray h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray [&+&]:ml-2"
100
113
  data-component-type="button"
114
+ role="button"
101
115
  tabindex="0"
102
116
  type="button"
103
117
  >
104
118
  <span
105
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
119
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
106
120
  >
107
121
  7
108
122
  </span>
@@ -118,25 +132,29 @@ exports[`Pagination renders 1`] = `
118
132
  </div>
119
133
  <button
120
134
  aria-current="false"
121
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button"
135
+ aria-disabled="false"
136
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black bg-white border-gray h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray [&+&]:ml-2"
122
137
  data-component-type="button"
138
+ role="button"
123
139
  tabindex="0"
124
140
  type="button"
125
141
  >
126
142
  <span
127
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
143
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
128
144
  >
129
145
  20
130
146
  </span>
131
147
  </button>
132
148
  <button
133
- class="MuiButtonBase-root PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPagination-button"
149
+ aria-disabled="false"
150
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-pointer no-underline rounded-sm shadow-none focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)] border border-solid text-black hover:border-black visited:text-black active:bg-gray active:border-black bg-white border-gray min-w h-6 py-0 px-3 [&+&]:ml-2"
134
151
  data-component-type="button"
152
+ role="button"
135
153
  tabindex="0"
136
154
  type="button"
137
155
  >
138
156
  <span
139
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
157
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
140
158
  >
141
159
  Next
142
160
  </span>
@@ -155,28 +173,32 @@ exports[`Pagination renders disabled 1`] = `
155
173
  class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline"
156
174
  >
157
175
  <button
158
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPagination-button Mui-disabled"
176
+ aria-disabled="true"
177
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid text-gray border-gray bg-white min-w h-6 py-0 px-3 [&+&]:ml-2"
159
178
  data-component-type="button"
160
179
  disabled=""
180
+ role="button"
161
181
  tabindex="-1"
162
182
  type="button"
163
183
  >
164
184
  <span
165
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
185
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
166
186
  >
167
187
  Prev
168
188
  </span>
169
189
  </button>
170
190
  <button
171
191
  aria-current="false"
172
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button Mui-disabled"
192
+ aria-disabled="true"
193
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid border-gray bg-white h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray text-gray [&+&]:ml-2"
173
194
  data-component-type="button"
174
195
  disabled=""
196
+ role="button"
175
197
  tabindex="-1"
176
198
  type="button"
177
199
  >
178
200
  <span
179
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
201
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
180
202
  >
181
203
  1
182
204
  </span>
@@ -192,70 +214,80 @@ exports[`Pagination renders disabled 1`] = `
192
214
  </div>
193
215
  <button
194
216
  aria-current="false"
195
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button Mui-disabled"
217
+ aria-disabled="true"
218
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid border-gray bg-white h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray text-gray [&+&]:ml-2"
196
219
  data-component-type="button"
197
220
  disabled=""
221
+ role="button"
198
222
  tabindex="-1"
199
223
  type="button"
200
224
  >
201
225
  <span
202
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
226
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
203
227
  >
204
228
  3
205
229
  </span>
206
230
  </button>
207
231
  <button
208
232
  aria-current="false"
209
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button Mui-disabled"
233
+ aria-disabled="true"
234
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid border-gray bg-white h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray text-gray [&+&]:ml-2"
210
235
  data-component-type="button"
211
236
  disabled=""
237
+ role="button"
212
238
  tabindex="-1"
213
239
  type="button"
214
240
  >
215
241
  <span
216
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
242
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
217
243
  >
218
244
  4
219
245
  </span>
220
246
  </button>
221
247
  <button
222
248
  aria-current="true"
223
- class="MuiButtonBase-root PicassoButton-active PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPaginationButton-active PicassoPagination-button Mui-disabled"
249
+ aria-disabled="true"
250
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white bg-graphite border-graphite disabled:text-gray text-gray [&+&]:ml-2"
224
251
  data-component-type="button"
225
252
  disabled=""
253
+ role="button"
226
254
  tabindex="-1"
227
255
  type="button"
228
256
  >
229
257
  <span
230
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
258
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
231
259
  >
232
260
  5
233
261
  </span>
234
262
  </button>
235
263
  <button
236
264
  aria-current="false"
237
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button Mui-disabled"
265
+ aria-disabled="true"
266
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid border-gray bg-white h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray text-gray [&+&]:ml-2"
238
267
  data-component-type="button"
239
268
  disabled=""
269
+ role="button"
240
270
  tabindex="-1"
241
271
  type="button"
242
272
  >
243
273
  <span
244
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
274
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
245
275
  >
246
276
  6
247
277
  </span>
248
278
  </button>
249
279
  <button
250
280
  aria-current="false"
251
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button Mui-disabled"
281
+ aria-disabled="true"
282
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid border-gray bg-white h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray text-gray [&+&]:ml-2"
252
283
  data-component-type="button"
253
284
  disabled=""
285
+ role="button"
254
286
  tabindex="-1"
255
287
  type="button"
256
288
  >
257
289
  <span
258
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
290
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
259
291
  >
260
292
  7
261
293
  </span>
@@ -271,27 +303,31 @@ exports[`Pagination renders disabled 1`] = `
271
303
  </div>
272
304
  <button
273
305
  aria-current="false"
274
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPaginationButton-root PicassoPagination-button Mui-disabled"
306
+ aria-disabled="true"
307
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid border-gray bg-white h-6 py-0 min-w px-[0.3em] active:bg-graphite active:border-graphite active:text-white disabled:text-gray text-gray [&+&]:ml-2"
275
308
  data-component-type="button"
276
309
  disabled=""
310
+ role="button"
277
311
  tabindex="-1"
278
312
  type="button"
279
313
  >
280
314
  <span
281
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
315
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
282
316
  >
283
317
  20
284
318
  </span>
285
319
  </button>
286
320
  <button
287
- class="MuiButtonBase-root PicassoButton-disabled PicassoButton-small PicassoButton-secondary PicassoButton-root PicassoPagination-button Mui-disabled"
321
+ aria-disabled="true"
322
+ class="base-Button base- text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle transition-colors duration-350 ease-out shrink-0 outline-none cursor-default pointer-events no-underline rounded-sm shadow-none border border-solid text-gray border-gray bg-white min-w h-6 py-0 px-3 [&+&]:ml-2"
288
323
  data-component-type="button"
289
324
  disabled=""
325
+ role="button"
290
326
  tabindex="-1"
291
327
  type="button"
292
328
  >
293
329
  <span
294
- class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline PicassoButton-content"
330
+ class="PicassoContainer-centerAlignItems PicassoContainer-flex PicassoContainer-inline font-semibold whitespace-nowrap text-button"
295
331
  >
296
332
  Next
297
333
  </span>
@@ -2,11 +2,6 @@ import { createStyles } from '@material-ui/core/styles'
2
2
 
3
3
  export default () =>
4
4
  createStyles({
5
- button: {
6
- '&+&': {
7
- marginLeft: '0.5em',
8
- },
9
- },
10
5
  ellipsis: {
11
6
  padding: '0 0.5em',
12
7
  cursor: 'default',
@@ -1,16 +1,8 @@
1
1
  import React from 'react'
2
2
  import type { StandardProps } from '@toptal/picasso-shared'
3
- import type { Theme } from '@material-ui/core'
4
- import { makeStyles } from '@material-ui/core'
5
- import cx from 'classnames'
3
+ import { twMerge } from 'tailwind-merge'
6
4
  import { Button } from '@toptal/picasso-button'
7
5
 
8
- import styles from './styles'
9
-
10
- const useStyles = makeStyles<Theme>(styles, {
11
- name: 'PicassoPaginationButton',
12
- })
13
-
14
6
  export interface Props extends StandardProps {
15
7
  activePage: number
16
8
  disabled?: boolean
@@ -20,12 +12,20 @@ export interface Props extends StandardProps {
20
12
 
21
13
  const PaginationButton = (props: Props) => {
22
14
  const { page, activePage, disabled, onClick, className } = props
23
- const classes = useStyles()
24
15
  const isActive = page === activePage
25
16
 
17
+ const finalClassName = twMerge(
18
+ 'min-w-[1.5em] px-[0.3em] ',
19
+ 'active:bg-graphite-700 active:border-graphite-700 active:text-white',
20
+ isActive && 'bg-graphite-700 border-graphite-700 text-white',
21
+ 'disabled:text-gray-500',
22
+ disabled && 'text-gray-500',
23
+ className
24
+ )
25
+
26
26
  return (
27
27
  <Button
28
- className={cx(classes.root, { [classes.active]: isActive }, className)}
28
+ className={finalClassName}
29
29
  aria-current={isActive}
30
30
  active={isActive}
31
31
  disabled={disabled}
@@ -1,4 +0,0 @@
1
- import type { Theme } from '@material-ui/core/styles';
2
- declare const _default: (theme: Theme) => import("@material-ui/styles").StyleRules<{}, "active" | "disabled" | "root" | "hovered">;
3
- export default _default;
4
- //# sourceMappingURL=styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/PaginationButton/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;gCAQ9B,KAAK;AAA5B,wBAaI"}
@@ -1,9 +0,0 @@
1
- import { createStyles } from '@material-ui/core/styles';
2
- import { createOutlineCommons, activeGroup, disabledGroup, } from '@toptal/picasso-button';
3
- export default (theme) => createStyles({
4
- root: Object.assign(Object.assign({ minWidth: '1.5em', padding: '0 0.3em' }, createOutlineCommons(theme)), { '&:active, &$active': activeGroup(theme), '&:disabled, &$disabled': disabledGroup(theme) }),
5
- active: {},
6
- hovered: {},
7
- disabled: {},
8
- });
9
- //# sourceMappingURL=styles.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/PaginationButton/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EACL,oBAAoB,EACpB,WAAW,EACX,aAAa,GACd,MAAM,wBAAwB,CAAA;AAE/B,eAAe,CAAC,KAAY,EAAE,EAAE,CAC9B,YAAY,CAAC;IACX,IAAI,gCACF,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,SAAS,IAEf,oBAAoB,CAAC,KAAK,CAAC,KAC9B,oBAAoB,EAAE,WAAW,CAAC,KAAK,CAAC,EACxC,wBAAwB,EAAE,aAAa,CAAC,KAAK,CAAC,GAC/C;IACD,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,EAAE;CACb,CAAC,CAAA"}
@@ -1,22 +0,0 @@
1
- import type { Theme } from '@material-ui/core/styles'
2
- import { createStyles } from '@material-ui/core/styles'
3
- import {
4
- createOutlineCommons,
5
- activeGroup,
6
- disabledGroup,
7
- } from '@toptal/picasso-button'
8
-
9
- export default (theme: Theme) =>
10
- createStyles({
11
- root: {
12
- minWidth: '1.5em',
13
- padding: '0 0.3em',
14
-
15
- ...createOutlineCommons(theme),
16
- '&:active, &$active': activeGroup(theme),
17
- '&:disabled, &$disabled': disabledGroup(theme),
18
- },
19
- active: {},
20
- hovered: {},
21
- disabled: {},
22
- })