@toptal/picasso-button 4.0.6-alpha-FX-NULL-fix-options-rendering-dfe170a27.1 → 4.0.6
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-package/src/ButtonBase/styles.js +1 -1
- package/dist-package/src/ButtonBase/styles.js.map +1 -1
- package/dist-package/src/ButtonGroup/ButtonGroup.d.ts.map +1 -1
- package/dist-package/src/ButtonGroup/ButtonGroup.js +1 -1
- package/dist-package/src/ButtonGroup/ButtonGroup.js.map +1 -1
- package/dist-package/src/ButtonGroup/styles.d.ts.map +1 -1
- package/dist-package/src/ButtonGroup/styles.js +2 -0
- package/dist-package/src/ButtonGroup/styles.js.map +1 -1
- package/dist-package/src/ButtonSplit/ButtonSplit.js +1 -1
- package/dist-package/src/ButtonSplit/ButtonSplit.js.map +1 -1
- package/package.json +17 -18
- package/src/Button/__snapshots__/test.tsx.snap +2 -2
- package/src/ButtonBase/__snapshots__/test.tsx.snap +11 -11
- package/src/ButtonBase/styles.ts +1 -1
- package/src/ButtonCheckbox/__snapshots__/test.tsx.snap +1 -1
- package/src/ButtonGroup/ButtonGroup.tsx +7 -1
- package/src/ButtonGroup/__snapshots__/test.tsx.snap +5 -4
- package/src/ButtonGroup/styles.ts +2 -0
- package/src/ButtonRadio/__snapshots__/test.tsx.snap +1 -1
- package/src/ButtonSplit/ButtonSplit.tsx +1 -1
- package/src/ButtonSplit/__snapshots__/test.tsx.snap +5 -4
- package/src/ButtonSplit/story/Sizes.example.tsx +1 -2
- package/src/ButtonSplit/story/States.example.tsx +1 -9
- package/src/ButtonSplit/story/Variants.example.tsx +1 -2
- package/LICENSE +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/ButtonBase/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,QAAQ,EACR,OAAO,GAKR,EAAY,EAAE;IACb,MAAM,UAAU,GAAG;QACjB,SAAS;QACT,aAAa;QACb,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,iBAAiB;QACjB,KAAK;QACL,UAAU;QACV,aAAa;QACb,cAAc;QACd,mBAAmB;QACnB,cAAc;QACd,UAAU;QACV,UAAU;QACV,cAAc;QACd,
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/ButtonBase/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EACnC,QAAQ,EACR,OAAO,GAKR,EAAY,EAAE;IACb,MAAM,UAAU,GAAG;QACjB,SAAS;QACT,aAAa;QACb,cAAc;QACd,gBAAgB;QAChB,aAAa;QACb,iBAAiB;QACjB,KAAK;QACL,UAAU;QACV,aAAa;QACb,cAAc;QACd,mBAAmB;QACnB,cAAc;QACd,UAAU;QACV,UAAU;QACV,cAAc;QACd,yCAAyC;KAC1C,CAAA;IAED,IAAI,CAAC,QAAQ,IAAI,CAAC,OAAO,EAAE;QACzB,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;KAClC;SAAM;QACL,UAAU,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;QACjC,UAAU,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;KACvC;IAED,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,4EAA4E;IAC5E,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ButtonGroup.d.ts","sourceRoot":"","sources":["../../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAA;AACtD,OAAO,KAAqB,MAAM,OAAO,CAAA;AAEzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAKvD,MAAM,WAAW,KAAM,SAAQ,SAAS,EAAE,cAAc,CAAC,cAAc,CAAC;IACtE,4EAA4E;IAC5E,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED,eAAO,MAAM,WAAW,8EAkBvB,CAAA;;;;AAMD,wBAAoE"}
|
|
@@ -16,7 +16,7 @@ import { createRootClassNames } from './styles';
|
|
|
16
16
|
export const ButtonGroup = forwardRef(function ButtonGroup(props, ref) {
|
|
17
17
|
const { children, className, style } = props, rest = __rest(props, ["children", "className", "style"]);
|
|
18
18
|
const finalClassName = twMerge(createRootClassNames(), className);
|
|
19
|
-
return (React.createElement("div", Object.assign({}, rest, { ref: ref, className: finalClassName, style: style }), children));
|
|
19
|
+
return (React.createElement("div", Object.assign({}, rest, { ref: ref, "data-component-type": 'button', className: finalClassName, style: style }), children));
|
|
20
20
|
});
|
|
21
21
|
ButtonGroup.defaultProps = {};
|
|
22
22
|
ButtonGroup.displayName = 'ButtonGroup';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonGroup.js","sourceRoot":"","sources":["../../../src/ButtonGroup/ButtonGroup.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE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,EAAE,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ButtonGroup/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/ButtonGroup/styles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,gBA8BhC,CAAA"}
|
|
@@ -2,6 +2,8 @@ export const createRootClassNames = () => {
|
|
|
2
2
|
const classNames = [
|
|
3
3
|
'flex',
|
|
4
4
|
'justify-start',
|
|
5
|
+
'items-start',
|
|
6
|
+
'[[data-component-type="button"]+&]:ml-4',
|
|
5
7
|
'[&>[data-component-type="button"]:hover]:z-[1]',
|
|
6
8
|
'[&>[data-component-type="button"]:first-child:not(:last-child)]:rounded-r-none',
|
|
7
9
|
'[&>[data-component-type="button"]:first-child:not(:last-child)]:ml-0',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/ButtonGroup/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,MAAM,UAAU,GAAa;QAC3B,MAAM;QACN,eAAe;
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/ButtonGroup/styles.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,MAAM,UAAU,GAAa;QAC3B,MAAM;QACN,eAAe;QACf,aAAa;QACb,yCAAyC;QAEzC,gDAAgD;QAEhD,gFAAgF;QAChF,sEAAsE;QAEtE,oFAAoF;QACpF,iFAAiF;QAEjF,gFAAgF;QAChF,2EAA2E;QAE3E,iBAAiB;QACjB,iFAAiF;QACjF,uEAAuE;QAEvE,qFAAqF;QACrF,kFAAkF;QAElF,iFAAiF;QACjF,4EAA4E;KAC7E,CAAA;IAED,OAAO,UAAU,CAAA;AACnB,CAAC,CAAA"}
|
|
@@ -55,7 +55,7 @@ export const ButtonSplit = forwardRef(function ButtonSplit(props, ref) {
|
|
|
55
55
|
}), createActionButtonClassNames({
|
|
56
56
|
variant,
|
|
57
57
|
}), actionButtonProps === null || actionButtonProps === void 0 ? void 0 : actionButtonProps.className);
|
|
58
|
-
const dropdownClassName = twMerge('
|
|
58
|
+
const dropdownClassName = twMerge('inline-flex cursor-pointer', disabled && '[&>div]:cursor-auto');
|
|
59
59
|
return (React.createElement(ButtonGroup, Object.assign({}, rest, { ref: ref, style: style, className: className }),
|
|
60
60
|
React.createElement(Button, Object.assign({}, actionButtonProps, { className: actionButtonClassName, size: size, variant: variant, disabled: disabled, onClick: onClick, "data-testid": testIds.actionButton }), children),
|
|
61
61
|
React.createElement(Dropdown, { content: menu, className: dropdownClassName }, ({ isOpen }) => renderMenuButton({ isOpen }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonSplit.js","sourceRoot":"","sources":["../../../src/ButtonSplit/ButtonSplit.tsx"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAEzC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAC5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAA;AAC3E,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,UAAU,CAAA;AA0BjB,MAAM,YAAY,GAAG,CAAC,EACpB,IAAI,EACJ,SAAS,GAIV,EAAE,EAAE;IACH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
|
|
2
2
|
"name": "@toptal/picasso-button",
|
|
3
|
-
"version": "4.0.6
|
|
3
|
+
"version": "4.0.6",
|
|
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
|
-
"@
|
|
26
|
-
"@toptal/picasso-
|
|
27
|
-
"@toptal/picasso-
|
|
28
|
-
"@toptal/picasso-
|
|
29
|
-
"@toptal/picasso-
|
|
30
|
-
"@toptal/picasso-
|
|
31
|
-
"@toptal/picasso-
|
|
32
|
-
"@toptal/picasso-
|
|
33
|
-
"@toptal/picasso-
|
|
34
|
-
"@toptal/picasso-utils": "2.0.1-alpha-FX-NULL-fix-options-rendering-dfe170a27.15+dfe170a27",
|
|
25
|
+
"@toptal/picasso-checkbox": "5.0.2",
|
|
26
|
+
"@toptal/picasso-container": "3.1.0",
|
|
27
|
+
"@toptal/picasso-dropdown": "4.1.1",
|
|
28
|
+
"@toptal/picasso-icons": "1.6.1",
|
|
29
|
+
"@toptal/picasso-loader": "3.0.1",
|
|
30
|
+
"@toptal/picasso-radio": "5.0.2",
|
|
31
|
+
"@toptal/picasso-shared": "15.0.0",
|
|
32
|
+
"@toptal/picasso-utils": "2.0.0",
|
|
33
|
+
"@toptal/picasso-link": "3.0.2",
|
|
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
|
},
|
|
38
38
|
"sideEffects": [
|
|
@@ -40,23 +40,22 @@
|
|
|
40
40
|
"**/styles.js"
|
|
41
41
|
],
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@toptal/picasso-provider": "*",
|
|
44
|
-
"@toptal/picasso-tailwind": ">=2.7",
|
|
45
43
|
"@toptal/picasso-tailwind-merge": "^2.0.0",
|
|
44
|
+
"@toptal/picasso-tailwind": ">=2.7",
|
|
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-
|
|
53
|
-
"@toptal/picasso-
|
|
54
|
-
"@toptal/picasso-test-utils": "1.1.
|
|
52
|
+
"@toptal/picasso-tailwind-merge": "2.0.1",
|
|
53
|
+
"@toptal/picasso-provider": "5.0.0",
|
|
54
|
+
"@toptal/picasso-test-utils": "1.1.1"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist-package/**",
|
|
58
58
|
"!dist-package/tsconfig.tsbuildinfo",
|
|
59
59
|
"src"
|
|
60
|
-
]
|
|
61
|
-
"gitHead": "dfe170a273a7bce59d9ccd64bef91d470d398548"
|
|
60
|
+
]
|
|
62
61
|
}
|
|
@@ -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="font-inherit focus:outline-none 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 [
|
|
10
|
+
class="font-inherit focus:outline-none 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 [[data-component-type="button"]+&]:ml 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"
|
|
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 [
|
|
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 [[data-component-type="button"]+&]:ml 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"
|
|
@@ -7,7 +7,7 @@ exports[`ButtonBase when "as" prop is passed when "as" prop does not equal "butt
|
|
|
7
7
|
>
|
|
8
8
|
<span
|
|
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 [
|
|
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
11
11
|
data-component-type="button"
|
|
12
12
|
href="/"
|
|
13
13
|
role="button"
|
|
@@ -31,7 +31,7 @@ exports[`ButtonBase when "as" prop is passed when "as" prop does not equal "butt
|
|
|
31
31
|
>
|
|
32
32
|
<span
|
|
33
33
|
aria-disabled="false"
|
|
34
|
-
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 [
|
|
34
|
+
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
35
35
|
data-component-type="button"
|
|
36
36
|
role="button"
|
|
37
37
|
tabindex="0"
|
|
@@ -55,7 +55,7 @@ exports[`ButtonBase when "as" prop is passed when "as" prop equals "Link" compon
|
|
|
55
55
|
>
|
|
56
56
|
<a
|
|
57
57
|
aria-disabled="false"
|
|
58
|
-
class="font-inherit focus:outline-none hover:underline text-blue visited:text-purple no-underline 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 [
|
|
58
|
+
class="font-inherit focus:outline-none hover:underline text-blue visited:text-purple no-underline 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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
59
59
|
data-component-type="button"
|
|
60
60
|
href="URL"
|
|
61
61
|
role="button"
|
|
@@ -79,7 +79,7 @@ exports[`ButtonBase when "as" prop is passed when "as" prop equals "Link" compon
|
|
|
79
79
|
>
|
|
80
80
|
<a
|
|
81
81
|
aria-disabled="true"
|
|
82
|
-
class="font-inherit focus:outline-none hover:underline text-blue visited:text-purple no-underline 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 [
|
|
82
|
+
class="font-inherit focus:outline-none hover:underline text-blue visited:text-purple no-underline 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 [[data-component-type="button"]+&]:ml cursor-default pointer-events"
|
|
83
83
|
data-component-type="button"
|
|
84
84
|
href="URL"
|
|
85
85
|
role="button"
|
|
@@ -103,7 +103,7 @@ exports[`ButtonBase when "as" prop is passed when "as" prop equals "Link" compon
|
|
|
103
103
|
>
|
|
104
104
|
<a
|
|
105
105
|
aria-disabled="false"
|
|
106
|
-
class="font-inherit focus:outline-none hover:underline text-blue visited:text-purple no-underline 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 [
|
|
106
|
+
class="font-inherit focus:outline-none hover:underline text-blue visited:text-purple no-underline 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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
107
107
|
data-component-type="button"
|
|
108
108
|
href=""
|
|
109
109
|
role="button"
|
|
@@ -127,7 +127,7 @@ exports[`ButtonBase when "as" prop is passed when "as" prop equals "a" renders B
|
|
|
127
127
|
>
|
|
128
128
|
<a
|
|
129
129
|
aria-disabled="false"
|
|
130
|
-
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 [
|
|
130
|
+
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
131
131
|
data-component-type="button"
|
|
132
132
|
href="/"
|
|
133
133
|
role="button"
|
|
@@ -151,7 +151,7 @@ exports[`ButtonBase when "disabled" prop is false renders Button and does not tr
|
|
|
151
151
|
>
|
|
152
152
|
<button
|
|
153
153
|
aria-disabled="false"
|
|
154
|
-
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 [
|
|
154
|
+
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
155
155
|
data-component-type="button"
|
|
156
156
|
role="button"
|
|
157
157
|
tabindex="0"
|
|
@@ -174,7 +174,7 @@ exports[`ButtonBase when "disabled" prop is true renders Button and does not tri
|
|
|
174
174
|
>
|
|
175
175
|
<button
|
|
176
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 [
|
|
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 [[data-component-type="button"]+&]:ml cursor-default pointer-events"
|
|
178
178
|
data-component-type="button"
|
|
179
179
|
disabled=""
|
|
180
180
|
role="button"
|
|
@@ -198,7 +198,7 @@ exports[`ButtonBase when "loading" prop is true renders Button with loading stat
|
|
|
198
198
|
>
|
|
199
199
|
<button
|
|
200
200
|
aria-disabled="false"
|
|
201
|
-
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 [
|
|
201
|
+
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
202
202
|
data-component-type="button"
|
|
203
203
|
role="button"
|
|
204
204
|
tabindex="0"
|
|
@@ -248,7 +248,7 @@ exports[`ButtonBase when "role" prop is passed renders Button with a custom role
|
|
|
248
248
|
>
|
|
249
249
|
<button
|
|
250
250
|
aria-disabled="false"
|
|
251
|
-
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 [
|
|
251
|
+
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
252
252
|
data-component-type="button"
|
|
253
253
|
role="custom"
|
|
254
254
|
tabindex="0"
|
|
@@ -271,7 +271,7 @@ exports[`ButtonBase when "titleCase" prop is true renders Button with transforme
|
|
|
271
271
|
>
|
|
272
272
|
<button
|
|
273
273
|
aria-disabled="false"
|
|
274
|
-
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 [
|
|
274
|
+
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 [[data-component-type="button"]+&]:ml cursor-pointer"
|
|
275
275
|
data-component-type="button"
|
|
276
276
|
role="button"
|
|
277
277
|
tabindex="0"
|
package/src/ButtonBase/styles.ts
CHANGED
|
@@ -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 [
|
|
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 [[data-component-type="button"]+&]:ml 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"
|
|
@@ -18,7 +18,13 @@ export const ButtonGroup = forwardRef<HTMLDivElement, Props>(
|
|
|
18
18
|
const finalClassName = twMerge(createRootClassNames(), className)
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<div
|
|
21
|
+
<div
|
|
22
|
+
{...rest}
|
|
23
|
+
ref={ref}
|
|
24
|
+
data-component-type='button'
|
|
25
|
+
className={finalClassName}
|
|
26
|
+
style={style}
|
|
27
|
+
>
|
|
22
28
|
{children}
|
|
23
29
|
</div>
|
|
24
30
|
)
|
|
@@ -6,11 +6,12 @@ exports[`ButtonGroup render 1`] = `
|
|
|
6
6
|
class="Picasso-root"
|
|
7
7
|
>
|
|
8
8
|
<div
|
|
9
|
-
class="flex justify-start [&>[data-component-type="button"]:hover]:z [&>[data-component-type="button"]:first-child:not(:last-child)]:rounded-r [&>[data-component-type="button"]:first-child:not(:last-child)]:ml [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:rounded [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:ml-[ [&>[data-component-type="button"]:last-child:not(:first-child)]:rounded-l [&>[data-component-type="button"]:last-child:not(:first-child)]:ml-[ [&_:first-child:not(:last-child)_[data-component-type="button"]]:rounded-r [&_:first-child:not(:last-child)_[data-component-type="button"]]:ml [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:rounded [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:ml-[ [&_:last-child:not(:first-child)_[data-component-type="button"]]:rounded-l [&_:last-child:not(:first-child)_[data-component-type="button"]]:ml-["
|
|
9
|
+
class="flex justify-start items-start [[data-component-type="button"]+&]:ml [&>[data-component-type="button"]:hover]:z [&>[data-component-type="button"]:first-child:not(:last-child)]:rounded-r [&>[data-component-type="button"]:first-child:not(:last-child)]:ml [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:rounded [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:ml-[ [&>[data-component-type="button"]:last-child:not(:first-child)]:rounded-l [&>[data-component-type="button"]:last-child:not(:first-child)]:ml-[ [&_:first-child:not(:last-child)_[data-component-type="button"]]:rounded-r [&_:first-child:not(:last-child)_[data-component-type="button"]]:ml [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:rounded [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:ml-[ [&_:last-child:not(:first-child)_[data-component-type="button"]]:rounded-l [&_:last-child:not(:first-child)_[data-component-type="button"]]:ml-["
|
|
10
|
+
data-component-type="button"
|
|
10
11
|
>
|
|
11
12
|
<button
|
|
12
13
|
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 [
|
|
14
|
+
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 [[data-component-type="button"]+&]:ml 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
15
|
data-component-type="button"
|
|
15
16
|
role="button"
|
|
16
17
|
tabindex="0"
|
|
@@ -24,7 +25,7 @@ exports[`ButtonGroup render 1`] = `
|
|
|
24
25
|
</button>
|
|
25
26
|
<button
|
|
26
27
|
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 [
|
|
28
|
+
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 [[data-component-type="button"]+&]:ml 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
29
|
data-component-type="button"
|
|
29
30
|
role="button"
|
|
30
31
|
tabindex="0"
|
|
@@ -38,7 +39,7 @@ exports[`ButtonGroup render 1`] = `
|
|
|
38
39
|
</button>
|
|
39
40
|
<button
|
|
40
41
|
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 [
|
|
42
|
+
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 [[data-component-type="button"]+&]:ml 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
43
|
data-component-type="button"
|
|
43
44
|
role="button"
|
|
44
45
|
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 [
|
|
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 [[data-component-type="button"]+&]:ml 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"
|
|
@@ -18,11 +18,12 @@ exports[`ButtonSplit default render 1`] = `
|
|
|
18
18
|
class="Picasso-root"
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
|
-
class="flex justify-start [&>[data-component-type="button"]:hover]:z [&>[data-component-type="button"]:first-child:not(:last-child)]:rounded-r [&>[data-component-type="button"]:first-child:not(:last-child)]:ml [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:rounded [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:ml-[ [&>[data-component-type="button"]:last-child:not(:first-child)]:rounded-l [&>[data-component-type="button"]:last-child:not(:first-child)]:ml-[ [&_:first-child:not(:last-child)_[data-component-type="button"]]:rounded-r [&_:first-child:not(:last-child)_[data-component-type="button"]]:ml [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:rounded [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:ml-[ [&_:last-child:not(:first-child)_[data-component-type="button"]]:rounded-l [&_:last-child:not(:first-child)_[data-component-type="button"]]:ml-["
|
|
21
|
+
class="flex justify-start items-start [[data-component-type="button"]+&]:ml [&>[data-component-type="button"]:hover]:z [&>[data-component-type="button"]:first-child:not(:last-child)]:rounded-r [&>[data-component-type="button"]:first-child:not(:last-child)]:ml [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:rounded [&>[data-component-type="button"]:not(:first-child):not(:last-child)]:ml-[ [&>[data-component-type="button"]:last-child:not(:first-child)]:rounded-l [&>[data-component-type="button"]:last-child:not(:first-child)]:ml-[ [&_:first-child:not(:last-child)_[data-component-type="button"]]:rounded-r [&_:first-child:not(:last-child)_[data-component-type="button"]]:ml [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:rounded [&_:not(:first-child):not(:last-child)_[data-component-type="button"]]:ml-[ [&_:last-child:not(:first-child)_[data-component-type="button"]]:rounded-l [&_:last-child:not(:first-child)_[data-component-type="button"]]:ml-["
|
|
22
|
+
data-component-type="button"
|
|
22
23
|
>
|
|
23
24
|
<button
|
|
24
25
|
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 [
|
|
26
|
+
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 [[data-component-type="button"]+&]:ml 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
27
|
data-component-type="button"
|
|
27
28
|
role="button"
|
|
28
29
|
tabindex="0"
|
|
@@ -35,14 +36,14 @@ exports[`ButtonSplit default render 1`] = `
|
|
|
35
36
|
</span>
|
|
36
37
|
</button>
|
|
37
38
|
<div
|
|
38
|
-
class="items-center
|
|
39
|
+
class="items-center inline-flex cursor-pointer"
|
|
39
40
|
>
|
|
40
41
|
<div
|
|
41
42
|
class="inline-flex items-center cursor-pointer"
|
|
42
43
|
>
|
|
43
44
|
<button
|
|
44
45
|
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 [
|
|
46
|
+
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 [[data-component-type="button"]+&]:ml 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
47
|
data-component-type="button"
|
|
47
48
|
role="button"
|
|
48
49
|
tabindex="0"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Button, Menu, Container } from '@toptal/picasso'
|
|
3
|
-
import { SPACING_4 } from '@toptal/picasso-utils'
|
|
4
3
|
|
|
5
4
|
const Example = () => {
|
|
6
5
|
const handleClick = () => console.info('Item is clicked')
|
|
@@ -14,7 +13,7 @@ const Example = () => {
|
|
|
14
13
|
)
|
|
15
14
|
|
|
16
15
|
return (
|
|
17
|
-
<Container flex
|
|
16
|
+
<Container flex>
|
|
18
17
|
<Button.Split size='small' menu={menu}>
|
|
19
18
|
Button
|
|
20
19
|
</Button.Split>
|
|
@@ -16,19 +16,16 @@ const Example = () => {
|
|
|
16
16
|
</Menu>
|
|
17
17
|
)
|
|
18
18
|
|
|
19
|
-
const customStyles = { marginRight: '1em' }
|
|
20
|
-
|
|
21
19
|
const renderStates = ({
|
|
22
20
|
variant = 'primary',
|
|
23
21
|
}: { variant?: ButtonSplitProps['variant'] } = {}) => {
|
|
24
22
|
return (
|
|
25
23
|
<>
|
|
26
|
-
<Button.Split
|
|
24
|
+
<Button.Split variant={variant} menu={menu}>
|
|
27
25
|
Normal
|
|
28
26
|
</Button.Split>
|
|
29
27
|
|
|
30
28
|
<Button.Split
|
|
31
|
-
style={customStyles}
|
|
32
29
|
variant={variant}
|
|
33
30
|
menu={menu}
|
|
34
31
|
actionButtonProps={{ hovered: true }}
|
|
@@ -36,7 +33,6 @@ const Example = () => {
|
|
|
36
33
|
Action Hovered
|
|
37
34
|
</Button.Split>
|
|
38
35
|
<Button.Split
|
|
39
|
-
style={customStyles}
|
|
40
36
|
variant={variant}
|
|
41
37
|
menu={menu}
|
|
42
38
|
menuButtonProps={{ hovered: true }}
|
|
@@ -45,7 +41,6 @@ const Example = () => {
|
|
|
45
41
|
</Button.Split>
|
|
46
42
|
|
|
47
43
|
<Button.Split
|
|
48
|
-
style={customStyles}
|
|
49
44
|
variant={variant}
|
|
50
45
|
menu={menu}
|
|
51
46
|
actionButtonProps={{ focused: true }}
|
|
@@ -54,7 +49,6 @@ const Example = () => {
|
|
|
54
49
|
</Button.Split>
|
|
55
50
|
|
|
56
51
|
<Button.Split
|
|
57
|
-
style={customStyles}
|
|
58
52
|
variant={variant}
|
|
59
53
|
menu={menu}
|
|
60
54
|
menuButtonProps={{ focused: true }}
|
|
@@ -63,7 +57,6 @@ const Example = () => {
|
|
|
63
57
|
</Button.Split>
|
|
64
58
|
|
|
65
59
|
<Button.Split
|
|
66
|
-
style={customStyles}
|
|
67
60
|
variant={variant}
|
|
68
61
|
menu={menu}
|
|
69
62
|
actionButtonProps={{ active: true }}
|
|
@@ -72,7 +65,6 @@ const Example = () => {
|
|
|
72
65
|
</Button.Split>
|
|
73
66
|
|
|
74
67
|
<Button.Split
|
|
75
|
-
style={customStyles}
|
|
76
68
|
variant={variant}
|
|
77
69
|
menu={menu}
|
|
78
70
|
menuButtonProps={{ active: true }}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { Button, Menu, Container } from '@toptal/picasso'
|
|
3
|
-
import { SPACING_4 } from '@toptal/picasso-utils'
|
|
4
3
|
|
|
5
4
|
const Example = () => {
|
|
6
5
|
const handleClick = () => console.info('Item is clicked')
|
|
@@ -14,7 +13,7 @@ const Example = () => {
|
|
|
14
13
|
)
|
|
15
14
|
|
|
16
15
|
return (
|
|
17
|
-
<Container flex
|
|
16
|
+
<Container flex>
|
|
18
17
|
<Button.Split menu={menu} variant='primary'>
|
|
19
18
|
Primary
|
|
20
19
|
</Button.Split>
|
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.
|