@toptal/picasso-button 2.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8 → 2.1.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.
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE7D,eAAO,MAAM,oBAAoB,SACzB,OAAO,GAAG,QAAQ,GAAG,OAAO,KACjC,MAAM,EAWR,CAAA;AAED,eAAO,MAAM,uBAAuB,YACzB,WAAW;;;;;MAYnB,MAAM,EAmIR,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;MAS7B,MAAM,EAiBT,CAAA;AAED,eAAO,MAAM,oBAAoB;;UAKzB,SAAS,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;MAC1C,MAAM,EAeT,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/Button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAE7D,eAAO,MAAM,oBAAoB,SACzB,OAAO,GAAG,QAAQ,GAAG,OAAO,KACjC,MAAM,EAWR,CAAA;AAED,eAAO,MAAM,uBAAuB,YACzB,WAAW;;;;;MAYnB,MAAM,EAoIR,CAAA;AAED,eAAO,MAAM,oBAAoB;;;;;MAS7B,MAAM,EAqBT,CAAA;AAED,eAAO,MAAM,oBAAoB;;UAKzB,SAAS,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;MAC1C,MAAM,EAeT,CAAA"}
@@ -76,6 +76,7 @@ export const createVariantClassNames = (variant, { disabled, focused, hovered, a
76
76
  variantClassNames.push('border border-solid');
77
77
  if (disabled) {
78
78
  variantClassNames.push('text-gray-500');
79
+ variantClassNames.push('visited:text-gray-500');
79
80
  variantClassNames.push('border-gray-500');
80
81
  variantClassNames.push('bg-white');
81
82
  }
@@ -135,7 +136,11 @@ export const createVariantClassNames = (variant, { disabled, focused, hovered, a
135
136
  return variantClassNames;
136
137
  };
137
138
  export const createCoreClassNames = ({ disabled, focused, active, }) => {
138
- const classNames = ['no-underline', 'rounded-sm', 'shadow-none'];
139
+ const classNames = [
140
+ 'no-underline hover:no-underline',
141
+ 'rounded-sm',
142
+ 'shadow-none',
143
+ ];
139
144
  if (!disabled) {
140
145
  classNames.push('focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)]');
141
146
  classNames.push('focus-within:shadow-[0_0_0_3px_rgba(32,78,207,0.48)]');
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/Button/styles.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAkC,EACxB,EAAE;IACZ,MAAM,cAAc,GAGhB;QACF,KAAK,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAC1C,MAAM,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAC3C,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KAC5C,CAAA;IAED,OAAO,cAAc,CAAC,IAAI,CAAC,CAAA;AAC7B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,OAAoB,EACpB,EACE,QAAQ,EACR,OAAO,EACP,OAAO,EACP,MAAM,GAMP,EACS,EAAE;IACZ,MAAM,iBAAiB,GAAG,EAAE,CAAA;IAE5B,QAAQ,OAAO,EAAE;QACf,KAAK,SAAS;YACZ,iBAAiB,CAA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G,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,MAAM,GAMP,EAAY,EAAE;IACb,MAAM,UAAU,GAAG;QACjB,iCAAiC;QACjC,YAAY;QACZ,aAAa;KACd,CAAA;IAED,IAAI,CAAC,QAAQ,EAAE;QACb,UAAU,CAAC,IAAI,CAAC,uDAAuD,CAAC,CAAA;QACxE,UAAU,CAAC,IAAI,CAAC,sDAAsD,CAAC,CAAA;QAEvE,IAAI,OAAO,EAAE;YACX,UAAU,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAA;SAC3D;QAED,IAAI,MAAM,EAAE;YACV,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;SAC/B;KACF;IAED,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,YAAY,EACZ,IAAI,GAIL,EAAY,EAAE;IACb,MAAM,cAAc,GAGhB;QACF,KAAK,EAAE,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,eAAe,CAAC;QACpE,MAAM,EAAE,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;QACnE,KAAK,EAAE,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;KACjE,CAAA;IAED,OAAO;QACL,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;QAC9B,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;QAC3C,YAAY,KAAK,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;KAC7C,CAAA;AACH,CAAC,CAAA"}
@@ -27,7 +27,12 @@ const getIcon = ({ children, icon, iconPosition, }) => {
27
27
  };
28
28
  const loaderIcon = React.createElement(Loader, { size: 'small', variant: 'inherit' });
29
29
  export const ButtonAction = forwardRef(function ButtonAction(props, ref) {
30
- const { className, active, focused, hovered, disabled, loading, icon, iconPosition, onClick } = props, rest = __rest(props, ["className", "active", "focused", "hovered", "disabled", "loading", "icon", "iconPosition", "onClick"]);
30
+ const {
31
+ /* eslint-disable @typescript-eslint/no-unused-vars */
32
+ // We use these props only to determine styles
33
+ active, focused, hovered,
34
+ /* eslint-enable @typescript-eslint/no-unused-vars */
35
+ className, disabled, loading, icon, iconPosition, onClick } = props, rest = __rest(props, ["active", "focused", "hovered", "className", "disabled", "loading", "icon", "iconPosition", "onClick"]);
31
36
  const usedIcon = loading ? loaderIcon : icon;
32
37
  const usedIconPosition = icon ? iconPosition : 'right';
33
38
  const finalClassName = cx(createRootClassNames(props), className);
@@ -36,7 +41,7 @@ export const ButtonAction = forwardRef(function ButtonAction(props, ref) {
36
41
  icon: usedIcon,
37
42
  iconPosition: usedIconPosition,
38
43
  });
39
- return (React.createElement(ButtonBase, Object.assign({}, rest, { ref: ref, icon: finalIcon, iconPosition: usedIconPosition, onClick: loading ? undefined : onClick, className: finalClassName, contentClassName: 'font-semibold text-blue-500 text-md', active: active, hovered: hovered, focused: focused, disabled: disabled })));
44
+ return (React.createElement(ButtonBase, Object.assign({}, rest, { ref: ref, icon: finalIcon, iconPosition: usedIconPosition, onClick: loading ? undefined : onClick, className: finalClassName, contentClassName: 'font-semibold text-blue-500 text-md', disabled: disabled })));
40
45
  });
41
46
  ButtonAction.defaultProps = {
42
47
  iconPosition: 'left',
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonAction.js","sourceRoot":"","sources":["../../../src/ButtonAction/ButtonAction.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,MAAM,YAAY,CAAA;AAM3B,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe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 +27,17 @@ const getIcon = ({ icon }) => {
27
27
  key: 'button-icon',
28
28
  });
29
29
  };
30
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
- const isReactComponent = (component) => {
32
- return (component &&
33
- (component.$$typeof === Symbol.for('react.forward_ref') ||
34
- typeof component === 'function'));
35
- };
30
+ const RootElement = forwardRef((props, ref) => {
31
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
32
+ const { ownerState, as: Root } = props, rest = __rest(props, ["ownerState", "as"]);
33
+ return React.createElement(Root, Object.assign({}, rest, { ref: ref }));
34
+ });
36
35
  export const ButtonBase = forwardRef(function ButtonBase(props, ref) {
37
36
  var _a, _b;
38
37
  const { icon, iconPosition, loading, children, className, contentClassName, style, disabled, onClick, title, value, type, as = 'button', titleCase: propsTitleCase } = props, rest = __rest(props, ["icon", "iconPosition", "loading", "children", "className", "contentClassName", "style", "disabled", "onClick", "title", "value", "type", "as", "titleCase"]);
39
- let RootElement = as;
40
- if (isReactComponent(RootElement)) {
41
- RootElement = forwardRef(
42
- // We don't need to pass ownerState to the root component
43
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
44
- (_a, rootRef) => {
45
- var { ownerState } = _a, restProps = __rest(_a, ["ownerState"]);
46
- const Root = as;
47
- return React.createElement(Root, Object.assign({ ref: rootRef }, restProps));
48
- });
49
- }
50
38
  const titleCase = useTitleCase(propsTitleCase);
51
39
  const finalChildren = [titleCase ? toTitleCase(children) : children];
52
- /*
53
- Workaround for the case: <Button as={Link} href='' /> (with empty href!), we have to determine "rootElementName" like below
54
- Mui/base throws an error when "href" or "to" are empty
55
- */
56
- const rootElementName = as !== 'button' && ('href' in props || 'to' in props) ? 'a' : undefined;
40
+ const finalRootElementName = typeof as === 'string' ? as : 'a';
57
41
  if (icon) {
58
42
  const iconComponent = getIcon({ icon });
59
43
  if (iconPosition === 'left') {
@@ -64,7 +48,9 @@ export const ButtonBase = forwardRef(function ButtonBase(props, ref) {
64
48
  }
65
49
  }
66
50
  const finalClassName = twMerge(createCoreClassNames({ disabled }), className);
67
- return (React.createElement(MUIButtonBase, Object.assign({}, rest, { ref: ref, onClick: getClickHandler(loading, onClick), className: finalClassName, style: style, "aria-disabled": disabled, disabled: disabled, title: title, value: value, type: type, "data-component-type": 'button', tabIndex: ((_a = rest.tabIndex) !== null && _a !== void 0 ? _a : disabled) ? -1 : 0, role: (_b = rest.role) !== null && _b !== void 0 ? _b : 'button', rootElementName: rootElementName, slots: { root: RootElement } }),
51
+ return (React.createElement(MUIButtonBase, Object.assign({}, rest, { ref: ref, onClick: getClickHandler(loading, onClick), className: finalClassName, style: style, "aria-disabled": disabled, disabled: disabled, title: title, value: value, type: type, "data-component-type": 'button', tabIndex: ((_a = rest.tabIndex) !== null && _a !== void 0 ? _a : disabled) ? -1 : 0, role: (_b = rest.role) !== null && _b !== void 0 ? _b : 'button', rootElementName: finalRootElementName, slots: { root: RootElement },
52
+ // @ts-ignore
53
+ slotProps: { root: { as } } }),
68
54
  React.createElement(Container, { as: 'span', inline: true, flex: true, direction: 'row', alignItems: 'center', className: contentClassName }, finalChildren),
69
55
  loading && (React.createElement(Loader, { variant: 'inherit', className: 'absolute top-1/2 left-1/2 translate-x-[-50%] translate-y-[-50%]', inline: true, size: 'small' }))));
70
56
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.js","sourceRoot":"","sources":["../../../src/ButtonBase/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;AAOA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AAOxC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AACrD,OAAO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aAAa;QACb,SAAS,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE;QAE3B,oBAAC,SAAS,IACR,EAAE,EAAC,MAAM,EACT,MAAM,QACN,IAAI,QACJ,SAAS,EAAC,KAAK,EACf,UAAU,EAAC,QAAQ,EACnB,SAAS,EAAE,gBAAgB,IAE1B,aAAa,CACJ;QAEX,OAAO,IAAI,CACV,oBAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,SAAS,EAAC,iEAAiE,EAC3E,MAAM,QACN,IAAI,EAAC,OAAO,GACZ,CACH,CACa,CACjB,CAAA;AACH,CAAC,CAAC,CAAA;AAEF,UAAU,CAAC,YAAY,GAAG;IACxB,EAAE,EAAE,QAAQ;IACZ,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,KAAK;IACf,YAAY,EAAE,MAAM;IACpB,OAAO,EAAE,KAAK;IACd,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,QAAQ;CACf,CAAA;AAED,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,eAAe,UAAU,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/picasso-button",
3
- "version": "2.0.8-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90",
3
+ "version": "2.1.0",
4
4
  "description": "Toptal UI components library - Button",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -22,17 +22,17 @@
22
22
  },
23
23
  "homepage": "https://github.com/toptal/picasso/tree/master/packages/picasso#readme",
24
24
  "dependencies": {
25
- "@mui/base": "5.0.0-beta.40",
26
- "@toptal/picasso-checkbox": "2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90",
27
- "@toptal/picasso-container": "1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90",
28
- "@toptal/picasso-dropdown": "2.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.40+c2b204d90",
29
- "@toptal/picasso-icons": "1.4.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90",
30
- "@toptal/picasso-link": "1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90",
31
- "@toptal/picasso-loader": "1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90",
32
- "@toptal/picasso-radio": "2.0.7-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.8+c2b204d90",
33
- "@toptal/picasso-shared": "15.0.1-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90",
34
- "@toptal/picasso-utils": "1.0.4-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90",
25
+ "@toptal/picasso-checkbox": "2.0.6",
26
+ "@toptal/picasso-container": "1.0.3",
27
+ "@toptal/picasso-dropdown": "2.0.3",
28
+ "@toptal/picasso-icons": "1.4.0",
29
+ "@toptal/picasso-loader": "1.0.3",
30
+ "@toptal/picasso-radio": "2.0.6",
31
+ "@toptal/picasso-shared": "15.0.0",
32
+ "@toptal/picasso-utils": "1.0.3",
33
+ "@toptal/picasso-link": "1.0.3",
35
34
  "ap-style-title-case": "^1.1.2",
35
+ "@mui/base": "5.0.0-beta.40",
36
36
  "classnames": "^2.5.1",
37
37
  "tailwind-merge": "^2.2.2"
38
38
  },
@@ -41,21 +41,20 @@
41
41
  "**/styles.js"
42
42
  ],
43
43
  "peerDependencies": {
44
- "@toptal/picasso-provider": "*",
45
44
  "@toptal/picasso-tailwind": ">=2.5.0",
45
+ "@toptal/picasso-provider": "*",
46
46
  "react": ">=16.12.0 < 19.0.0"
47
47
  },
48
48
  "exports": {
49
49
  ".": "./dist-package/src/index.js"
50
50
  },
51
51
  "devDependencies": {
52
- "@toptal/picasso-provider": "4.2.2-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.50+c2b204d90",
53
- "@toptal/picasso-test-utils": "1.1.2-alpha-fix-picasso-tailwind-dep-on-merge-c2b204d90.42+c2b204d90"
52
+ "@toptal/picasso-provider": "4.2.1",
53
+ "@toptal/picasso-test-utils": "1.1.1"
54
54
  },
55
55
  "files": [
56
56
  "dist-package/**",
57
57
  "!dist-package/tsconfig.tsbuildinfo",
58
58
  "src"
59
- ],
60
- "gitHead": "c2b204d9057d2c3d480f11ea8930eba5d2695b53"
59
+ ]
61
60
  }
@@ -7,7 +7,7 @@ exports[`Button disabled button as link renders disabled version 1`] = `
7
7
  >
8
8
  <a
9
9
  aria-disabled="true"
10
- class="MuiTypography-root MuiLink-root MuiLink-underlineHover PicassoLink-root 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 [&+&]:ml-4 cursor-default pointer-events no-underline rounded-sm shadow-none border-none text-white visited:text-white bg-gray min-w h-8 py-0 px-4 PicassoLink-blue MuiTypography-colorPrimary"
10
+ class="MuiTypography-root MuiLink-root MuiLink-underlineHover PicassoLink-root 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 [&+&]:ml-4 cursor-default pointer-events no-underline hover:no-underline rounded-sm shadow-none border-none text-white visited:text-white bg-gray min-w h-8 py-0 px-4 PicassoLink-blue MuiTypography-colorPrimary"
11
11
  data-component-type="button"
12
12
  href="URL"
13
13
  role="button"
@@ -31,7 +31,7 @@ exports[`Button disabled button renders disabled version 1`] = `
31
31
  >
32
32
  <button
33
33
  aria-disabled="true"
34
- 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 [&+&]:ml-4 cursor-default pointer-events no-underline rounded-sm shadow-none border-none text-white visited:text-white bg-gray min-w h-8 py-0 px-4"
34
+ 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 [&+&]:ml-4 cursor-default pointer-events no-underline hover:no-underline rounded-sm shadow-none border-none text-white visited:text-white bg-gray min-w h-8 py-0 px-4"
35
35
  data-component-type="button"
36
36
  disabled=""
37
37
  role="button"
@@ -100,6 +100,7 @@ export const createVariantClassNames = (
100
100
 
101
101
  if (disabled) {
102
102
  variantClassNames.push('text-gray-500')
103
+ variantClassNames.push('visited:text-gray-500')
103
104
  variantClassNames.push('border-gray-500')
104
105
  variantClassNames.push('bg-white')
105
106
  } else {
@@ -173,7 +174,11 @@ export const createCoreClassNames = ({
173
174
  hovered?: boolean
174
175
  active?: boolean
175
176
  }): string[] => {
176
- const classNames = ['no-underline', 'rounded-sm', 'shadow-none']
177
+ const classNames = [
178
+ 'no-underline hover:no-underline',
179
+ 'rounded-sm',
180
+ 'shadow-none',
181
+ ]
177
182
 
178
183
  if (!disabled) {
179
184
  classNames.push('focus-visible:shadow-[0_0_0_3px_rgba(32,78,207,0.48)]')
@@ -64,10 +64,13 @@ export const ButtonAction: OverridableComponent<Props> = forwardRef<
64
64
  Props
65
65
  >(function ButtonAction(props, ref) {
66
66
  const {
67
- className,
67
+ /* eslint-disable @typescript-eslint/no-unused-vars */
68
+ // We use these props only to determine styles
68
69
  active,
69
70
  focused,
70
71
  hovered,
72
+ /* eslint-enable @typescript-eslint/no-unused-vars */
73
+ className,
71
74
  disabled,
72
75
  loading,
73
76
  icon,
@@ -95,9 +98,6 @@ export const ButtonAction: OverridableComponent<Props> = forwardRef<
95
98
  onClick={loading ? undefined : onClick}
96
99
  className={finalClassName}
97
100
  contentClassName='font-semibold text-blue-500 text-md'
98
- active={active}
99
- hovered={hovered}
100
- focused={focused}
101
101
  disabled={disabled}
102
102
  />
103
103
  )
@@ -1,10 +1,5 @@
1
- import type {
2
- ReactNode,
3
- ReactElement,
4
- MouseEvent,
5
- ElementType,
6
- FC,
7
- } from 'react'
1
+ /* eslint-disable complexity */
2
+ import type { ReactNode, ReactElement, MouseEvent, ElementType } from 'react'
8
3
  import React, { forwardRef } from 'react'
9
4
  import { twMerge } from 'tailwind-merge'
10
5
  import type {
@@ -15,6 +10,7 @@ import type {
15
10
  } from '@toptal/picasso-shared'
16
11
  import { useTitleCase } from '@toptal/picasso-shared'
17
12
  import { Button as MUIButtonBase } from '@mui/base/Button'
13
+ import type { ButtonRootSlotProps } from '@mui/base/Button'
18
14
  import { Loader } from '@toptal/picasso-loader'
19
15
  import { Container } from '@toptal/picasso-container'
20
16
  import { noop, toTitleCase } from '@toptal/picasso-utils'
@@ -64,14 +60,14 @@ const getIcon = ({ icon }: { icon?: ReactElement }) => {
64
60
  })
65
61
  }
66
62
 
67
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
68
- const isReactComponent = (component: any) => {
69
- return (
70
- component &&
71
- (component.$$typeof === Symbol.for('react.forward_ref') ||
72
- typeof component === 'function')
73
- )
74
- }
63
+ const RootElement = forwardRef(
64
+ (props: ButtonRootSlotProps & { as: ElementType }, ref) => {
65
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
66
+ const { ownerState, as: Root, ...rest } = props
67
+
68
+ return <Root {...rest} ref={ref} />
69
+ }
70
+ )
75
71
 
76
72
  export const ButtonBase: OverridableComponent<Props> = forwardRef<
77
73
  HTMLButtonElement,
@@ -95,28 +91,9 @@ export const ButtonBase: OverridableComponent<Props> = forwardRef<
95
91
  ...rest
96
92
  } = props
97
93
 
98
- let RootElement: ElementType | FC = as
99
-
100
- if (isReactComponent(RootElement)) {
101
- RootElement = forwardRef(
102
- // We don't need to pass ownerState to the root component
103
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
104
- ({ ownerState, ...restProps }: { ownerState: object }, rootRef) => {
105
- const Root = as
106
-
107
- return <Root ref={rootRef} {...restProps} />
108
- }
109
- )
110
- }
111
-
112
94
  const titleCase = useTitleCase(propsTitleCase)
113
95
  const finalChildren = [titleCase ? toTitleCase(children) : children]
114
- /*
115
- Workaround for the case: <Button as={Link} href='' /> (with empty href!), we have to determine "rootElementName" like below
116
- Mui/base throws an error when "href" or "to" are empty
117
- */
118
- const rootElementName =
119
- as !== 'button' && ('href' in props || 'to' in props) ? 'a' : undefined
96
+ const finalRootElementName = typeof as === 'string' ? as : 'a'
120
97
 
121
98
  if (icon) {
122
99
  const iconComponent = getIcon({ icon })
@@ -145,8 +122,10 @@ export const ButtonBase: OverridableComponent<Props> = forwardRef<
145
122
  data-component-type='button'
146
123
  tabIndex={rest.tabIndex ?? disabled ? -1 : 0}
147
124
  role={rest.role ?? 'button'}
148
- rootElementName={rootElementName}
125
+ rootElementName={finalRootElementName as keyof HTMLElementTagNameMap}
149
126
  slots={{ root: RootElement }}
127
+ // @ts-ignore
128
+ slotProps={{ root: { as } }}
150
129
  >
151
130
  <Container
152
131
  as='span'
@@ -7,7 +7,7 @@ exports[`ButtonCheckbox renders 1`] = `
7
7
  >
8
8
  <label
9
9
  aria-disabled="false"
10
- 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 [&+&]:ml-4 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-8 px-4 text-center py-2 pr-6 pl-4"
10
+ 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 [&+&]:ml-4 cursor-pointer no-underline hover: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-8 px-4 text-center py-2 pr-6 pl-4"
11
11
  data-component-type="button"
12
12
  role="button"
13
13
  tabindex="0"
@@ -10,7 +10,7 @@ exports[`ButtonGroup render 1`] = `
10
10
  >
11
11
  <button
12
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 duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 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 bg-white min-w h-8 py-0 px-4 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] visited:text-black border-solid active:bg-graphite active:border-graphite active:text-white hover:border-black border-gray text-black"
13
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline hover: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 bg-white min-w h-8 py-0 px-4 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] visited:text-black border-solid active:bg-graphite active:border-graphite active:text-white hover:border-black border-gray text-black"
14
14
  data-component-type="button"
15
15
  role="button"
16
16
  tabindex="0"
@@ -24,7 +24,7 @@ exports[`ButtonGroup render 1`] = `
24
24
  </button>
25
25
  <button
26
26
  aria-disabled="false"
27
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 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)] border min-w h-8 py-0 px-4 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] z-[1] visited:text-black border-solid active:bg-graphite active:border-graphite active:text-white hover:border-black bg-graphite border-graphite text-white shadow-none"
27
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline hover: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)] border min-w h-8 py-0 px-4 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] z-[1] visited:text-black border-solid active:bg-graphite active:border-graphite active:text-white hover:border-black bg-graphite border-graphite text-white shadow-none"
28
28
  data-component-type="button"
29
29
  role="button"
30
30
  tabindex="0"
@@ -38,7 +38,7 @@ exports[`ButtonGroup render 1`] = `
38
38
  </button>
39
39
  <button
40
40
  aria-disabled="false"
41
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 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 bg-white min-w h-8 py-0 px-4 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] visited:text-black border-solid active:bg-graphite active:border-graphite active:text-white hover:border-black border-gray text-black"
41
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline hover: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 bg-white min-w h-8 py-0 px-4 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] visited:text-black border-solid active:bg-graphite active:border-graphite active:text-white hover:border-black border-gray text-black"
42
42
  data-component-type="button"
43
43
  role="button"
44
44
  tabindex="0"
@@ -7,7 +7,7 @@ exports[`ButtonRadio renders 1`] = `
7
7
  >
8
8
  <label
9
9
  aria-disabled="false"
10
- 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 [&+&]:ml-4 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-8 px-4 text-center py-2 pr-6 pl-4"
10
+ 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 [&+&]:ml-4 cursor-pointer no-underline hover: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-8 px-4 text-center py-2 pr-6 pl-4"
11
11
  data-component-type="button"
12
12
  role="button"
13
13
  tabindex="0"
@@ -22,7 +22,7 @@ exports[`ButtonSplit default render 1`] = `
22
22
  >
23
23
  <button
24
24
  aria-disabled="false"
25
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 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)] text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4 active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] transition-[color,background] border-r border-l border-y border-solid border-blue"
25
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline hover: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)] text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue min-w h-8 py-0 px-4 active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] transition-[color,background] border-r border-l border-y border-solid border-blue"
26
26
  data-component-type="button"
27
27
  role="button"
28
28
  tabindex="0"
@@ -42,7 +42,7 @@ exports[`ButtonSplit default render 1`] = `
42
42
  >
43
43
  <button
44
44
  aria-disabled="false"
45
- class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 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)] text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue h-8 py-0 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] min-w px-[0.5em] border-l border-r border-y border-solid border-blue"
45
+ class="base-Button text-lg inline-flex items-center justify-center select-none appearance-none m-0 relative normal-case align-middle duration-350 ease-out shrink-0 outline-none [&+&]:ml-4 cursor-pointer no-underline hover: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)] text-white visited:text-white hover:bg-[#4269D6] active:bg-[#1A41AB] bg-blue h-8 py-0 transition-[color,background] active:z-[1] hover:z-[1] focus-visible:z-[1] disabled:z-[1] min-w px-[0.5em] border-l border-r border-y border-solid border-blue"
46
46
  data-component-type="button"
47
47
  role="button"
48
48
  tabindex="0"
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.