@vector-im/compound-web 7.12.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/IconButton/IconButton.cjs +4 -2
- package/dist/components/Button/IconButton/IconButton.cjs.map +1 -1
- package/dist/components/Button/IconButton/IconButton.d.ts +10 -1
- package/dist/components/Button/IconButton/IconButton.d.ts.map +1 -1
- package/dist/components/Button/IconButton/IconButton.js +4 -2
- package/dist/components/Button/IconButton/IconButton.js.map +1 -1
- package/dist/components/Button/IconButton/IconButton.module.css.cjs +3 -3
- package/dist/components/Button/IconButton/IconButton.module.css.js +3 -3
- package/dist/style.css.css +39 -16
- package/package.json +1 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +1 -1
- package/src/components/Button/IconButton/IconButton.module.css +32 -9
- package/src/components/Button/IconButton/IconButton.tsx +14 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.cjs","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { HTMLProps, JSX, MouseEventHandler, KeyboardEvent } from \"react\";\nimport { IconButton } from \"../Button\";\nimport Chevron from \"@vector-im/compound-design-tokens/assets/web/icons/chevron-left\";\nimport styles from \"./Breadcrumb.module.css\";\nimport { Link } from \"../Link/Link.tsx\";\nimport classNames from \"classnames\";\n\ninterface BreadcrumbProps extends HTMLProps<HTMLElement> {\n /**\n * The label for the back button.\n */\n backLabel: string;\n /**\n * The click handler for the back button.\n */\n onBackClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * The pages to display in the breadcrumb.\n * All the pages except the last one are displayed as links.\n */\n pages: string[];\n /**\n * The click handler for a page.\n * @param page - The page that was clicked.\n * @param index - The index of the page that was clicked.\n */\n onPageClick: (page: string, index: number) => void;\n}\n\n/**\n * A breadcrumb component.\n */\nexport function Breadcrumb({\n backLabel,\n onBackClick,\n pages,\n onPageClick,\n className,\n ...props\n}: BreadcrumbProps): JSX.Element {\n return (\n <nav className={classNames(styles.breadcrumb, className)} {...props}>\n <IconButton\n
|
|
1
|
+
{"version":3,"file":"Breadcrumb.cjs","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { HTMLProps, JSX, MouseEventHandler, KeyboardEvent } from \"react\";\nimport { IconButton } from \"../Button\";\nimport Chevron from \"@vector-im/compound-design-tokens/assets/web/icons/chevron-left\";\nimport styles from \"./Breadcrumb.module.css\";\nimport { Link } from \"../Link/Link.tsx\";\nimport classNames from \"classnames\";\n\ninterface BreadcrumbProps extends HTMLProps<HTMLElement> {\n /**\n * The label for the back button.\n */\n backLabel: string;\n /**\n * The click handler for the back button.\n */\n onBackClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * The pages to display in the breadcrumb.\n * All the pages except the last one are displayed as links.\n */\n pages: string[];\n /**\n * The click handler for a page.\n * @param page - The page that was clicked.\n * @param index - The index of the page that was clicked.\n */\n onPageClick: (page: string, index: number) => void;\n}\n\n/**\n * A breadcrumb component.\n */\nexport function Breadcrumb({\n backLabel,\n onBackClick,\n pages,\n onPageClick,\n className,\n ...props\n}: BreadcrumbProps): JSX.Element {\n return (\n <nav className={classNames(styles.breadcrumb, className)} {...props}>\n <IconButton\n kind=\"secondary\"\n size=\"28px\"\n aria-label={backLabel}\n onClick={onBackClick}\n >\n <Chevron />\n </IconButton>\n <ol className={styles.pages}>\n {pages.map((page, index) => (\n <Page\n key={index}\n page={page}\n isLastPage={index === pages.length - 1}\n onClick={() => onPageClick(page, index)}\n />\n ))}\n </ol>\n </nav>\n );\n}\n\ninterface PageProps {\n /**\n * The page to display.\n */\n page: string;\n /**\n * Whether this is the last page in the breadcrumb.\n */\n isLastPage: boolean;\n /**\n * The click handler for the page, ignore for last page.\n */\n onClick: () => void;\n}\n\n/**\n * A breadcrumb page.\n * If not the last page, the page is displayed in a link.\n */\nfunction Page({ page, isLastPage, onClick }: PageProps): JSX.Element {\n const onKeyDown = (event: KeyboardEvent<HTMLAnchorElement>) => {\n if (event.key === \" \") {\n onClick();\n }\n };\n\n return (\n <li>\n {isLastPage ? (\n <span className={styles[\"last-page\"]} aria-current=\"page\">\n {page}\n </span>\n ) : (\n <Link\n size=\"small\"\n role=\"button\"\n onClick={onClick}\n onKeyDown={onKeyDown}\n tabIndex={0}\n >\n {page}\n </Link>\n )}\n </li>\n );\n}\n"],"names":["jsxs","styles","jsx","IconButton","Link"],"mappings":";;;;;;;;AAuCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAiC;AAE7B,SAAAA,gCAAC,SAAI,WAAW,WAAWC,0BAAO,YAAY,SAAS,GAAI,GAAG,OAC5D,UAAA;AAAA,IAAAC,2BAAA;AAAA,MAACC,WAAA;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,SAAS;AAAA,QAET,yCAAC,SAAQ,CAAA,CAAA;AAAA,MAAA;AAAA,IACX;AAAA,IACAD,2BAAAA,IAAC,QAAG,WAAWD,kBAAA,QAAO,OACnB,UAAM,MAAA,IAAI,CAAC,MAAM,UAChBC,2BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC;AAAA,QACA,YAAY,UAAU,MAAM,SAAS;AAAA,QACrC,SAAS,MAAM,YAAY,MAAM,KAAK;AAAA,MAAA;AAAA,MAHjC;AAAA,IAAA,CAKR,EACH,CAAA;AAAA,EAAA,GACF;AAEJ;AAqBA,SAAS,KAAK,EAAE,MAAM,YAAY,WAAmC;AAC7D,QAAA,YAAY,CAAC,UAA4C;AACzD,QAAA,MAAM,QAAQ,KAAK;AACb,cAAA;AAAA,IAAA;AAAA,EAEZ;AAEA,SACGA,2BAAAA,IAAA,MAAA,EACE,UACC,aAAAA,2BAAAA,IAAC,QAAK,EAAA,WAAWD,kBAAAA,QAAO,WAAW,GAAG,gBAAa,QAChD,UAAA,KACH,CAAA,IAEAC,2BAAA;AAAA,IAACE,KAAA;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MAET,UAAA;AAAA,IAAA;AAAA,EAAA,GAGP;AAEJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { HTMLProps, JSX, MouseEventHandler, KeyboardEvent } from \"react\";\nimport { IconButton } from \"../Button\";\nimport Chevron from \"@vector-im/compound-design-tokens/assets/web/icons/chevron-left\";\nimport styles from \"./Breadcrumb.module.css\";\nimport { Link } from \"../Link/Link.tsx\";\nimport classNames from \"classnames\";\n\ninterface BreadcrumbProps extends HTMLProps<HTMLElement> {\n /**\n * The label for the back button.\n */\n backLabel: string;\n /**\n * The click handler for the back button.\n */\n onBackClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * The pages to display in the breadcrumb.\n * All the pages except the last one are displayed as links.\n */\n pages: string[];\n /**\n * The click handler for a page.\n * @param page - The page that was clicked.\n * @param index - The index of the page that was clicked.\n */\n onPageClick: (page: string, index: number) => void;\n}\n\n/**\n * A breadcrumb component.\n */\nexport function Breadcrumb({\n backLabel,\n onBackClick,\n pages,\n onPageClick,\n className,\n ...props\n}: BreadcrumbProps): JSX.Element {\n return (\n <nav className={classNames(styles.breadcrumb, className)} {...props}>\n <IconButton\n
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { HTMLProps, JSX, MouseEventHandler, KeyboardEvent } from \"react\";\nimport { IconButton } from \"../Button\";\nimport Chevron from \"@vector-im/compound-design-tokens/assets/web/icons/chevron-left\";\nimport styles from \"./Breadcrumb.module.css\";\nimport { Link } from \"../Link/Link.tsx\";\nimport classNames from \"classnames\";\n\ninterface BreadcrumbProps extends HTMLProps<HTMLElement> {\n /**\n * The label for the back button.\n */\n backLabel: string;\n /**\n * The click handler for the back button.\n */\n onBackClick: MouseEventHandler<HTMLButtonElement>;\n /**\n * The pages to display in the breadcrumb.\n * All the pages except the last one are displayed as links.\n */\n pages: string[];\n /**\n * The click handler for a page.\n * @param page - The page that was clicked.\n * @param index - The index of the page that was clicked.\n */\n onPageClick: (page: string, index: number) => void;\n}\n\n/**\n * A breadcrumb component.\n */\nexport function Breadcrumb({\n backLabel,\n onBackClick,\n pages,\n onPageClick,\n className,\n ...props\n}: BreadcrumbProps): JSX.Element {\n return (\n <nav className={classNames(styles.breadcrumb, className)} {...props}>\n <IconButton\n kind=\"secondary\"\n size=\"28px\"\n aria-label={backLabel}\n onClick={onBackClick}\n >\n <Chevron />\n </IconButton>\n <ol className={styles.pages}>\n {pages.map((page, index) => (\n <Page\n key={index}\n page={page}\n isLastPage={index === pages.length - 1}\n onClick={() => onPageClick(page, index)}\n />\n ))}\n </ol>\n </nav>\n );\n}\n\ninterface PageProps {\n /**\n * The page to display.\n */\n page: string;\n /**\n * Whether this is the last page in the breadcrumb.\n */\n isLastPage: boolean;\n /**\n * The click handler for the page, ignore for last page.\n */\n onClick: () => void;\n}\n\n/**\n * A breadcrumb page.\n * If not the last page, the page is displayed in a link.\n */\nfunction Page({ page, isLastPage, onClick }: PageProps): JSX.Element {\n const onKeyDown = (event: KeyboardEvent<HTMLAnchorElement>) => {\n if (event.key === \" \") {\n onClick();\n }\n };\n\n return (\n <li>\n {isLastPage ? (\n <span className={styles[\"last-page\"]} aria-current=\"page\">\n {page}\n </span>\n ) : (\n <Link\n size=\"small\"\n role=\"button\"\n onClick={onClick}\n onKeyDown={onKeyDown}\n tabIndex={0}\n >\n {page}\n </Link>\n )}\n </li>\n );\n}\n"],"names":[],"mappings":";;;;;;AAuCO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAiC;AAE7B,SAAA,qBAAC,SAAI,WAAW,WAAW,OAAO,YAAY,SAAS,GAAI,GAAG,OAC5D,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,SAAS;AAAA,QAET,8BAAC,SAAQ,CAAA,CAAA;AAAA,MAAA;AAAA,IACX;AAAA,IACA,oBAAC,QAAG,WAAW,OAAO,OACnB,UAAM,MAAA,IAAI,CAAC,MAAM,UAChB;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC;AAAA,QACA,YAAY,UAAU,MAAM,SAAS;AAAA,QACrC,SAAS,MAAM,YAAY,MAAM,KAAK;AAAA,MAAA;AAAA,MAHjC;AAAA,IAAA,CAKR,EACH,CAAA;AAAA,EAAA,GACF;AAEJ;AAqBA,SAAS,KAAK,EAAE,MAAM,YAAY,WAAmC;AAC7D,QAAA,YAAY,CAAC,UAA4C;AACzD,QAAA,MAAM,QAAQ,KAAK;AACb,cAAA;AAAA,IAAA;AAAA,EAEZ;AAEA,SACG,oBAAA,MAAA,EACE,UACC,aAAA,oBAAC,QAAK,EAAA,WAAW,OAAO,WAAW,GAAG,gBAAa,QAChD,UAAA,KACH,CAAA,IAEA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,MAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA,UAAU;AAAA,MAET,UAAA;AAAA,IAAA;AAAA,EAAA,GAGP;AAEJ;"}
|
|
@@ -8,6 +8,7 @@ const UnstyledButton = require("../UnstyledButton.cjs");
|
|
|
8
8
|
const IndicatorIcon = require("../../Icon/IndicatorIcon/IndicatorIcon.cjs");
|
|
9
9
|
const Tooltip = require("../../Tooltip/Tooltip.cjs");
|
|
10
10
|
const IconButton = React.forwardRef(function IconButton2({
|
|
11
|
+
kind = "primary",
|
|
11
12
|
children,
|
|
12
13
|
className,
|
|
13
14
|
indicator,
|
|
@@ -16,12 +17,12 @@ const IconButton = React.forwardRef(function IconButton2({
|
|
|
16
17
|
disabled,
|
|
17
18
|
destructive,
|
|
18
19
|
tooltip,
|
|
19
|
-
|
|
20
|
+
noBackground = false,
|
|
20
21
|
...props
|
|
21
22
|
}, ref) {
|
|
22
23
|
const classes = classNames(IconButton_module.default["icon-button"], className, {
|
|
23
24
|
[IconButton_module.default.destructive]: destructive,
|
|
24
|
-
[IconButton_module.default["
|
|
25
|
+
[IconButton_module.default["no-background"]]: noBackground
|
|
25
26
|
});
|
|
26
27
|
const button = /* @__PURE__ */ jsxRuntime.jsx(
|
|
27
28
|
UnstyledButton.UnstyledButton,
|
|
@@ -36,6 +37,7 @@ const IconButton = React.forwardRef(function IconButton2({
|
|
|
36
37
|
disabled,
|
|
37
38
|
...props,
|
|
38
39
|
"data-indicator": indicator,
|
|
40
|
+
"data-kind": kind,
|
|
39
41
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
40
42
|
IndicatorIcon.IndicatorIcon,
|
|
41
43
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.cjs","sources":["../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { PropsWithChildren, forwardRef } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./IconButton.module.css\";\nimport { UnstyledButton, UnstyledButtonPropsFor } from \"../UnstyledButton\";\nimport { IndicatorIcon } from \"../../Icon/IndicatorIcon/IndicatorIcon\";\nimport { Tooltip } from \"../../Tooltip/Tooltip\";\n\ntype IconButtonProps = UnstyledButtonPropsFor<\"button\"> & {\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The size of the button in CSS units, e.g. `\"24px\"`.\n * Note that this is the size of the *button* itself: the icon will be 0.75 * this size\n * @default 32px\n */\n size?: CSSStyleDeclaration[\"height\"];\n /**\n * The icon button indicator dot displayed on the top right\n * As in IndicatorIcon\n */\n indicator?: \"default\" | \"success\" | \"critical\";\n /**\n * Whether the button is interactable\n */\n disabled?: boolean;\n /**\n * Whether this button triggers a destructive action.\n * @default false\n */\n destructive?: boolean;\n /**\n * Optional tooltip for the button\n */\n tooltip?: string;\n
|
|
1
|
+
{"version":3,"file":"IconButton.cjs","sources":["../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { PropsWithChildren, forwardRef } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./IconButton.module.css\";\nimport { UnstyledButton, UnstyledButtonPropsFor } from \"../UnstyledButton\";\nimport { IndicatorIcon } from \"../../Icon/IndicatorIcon/IndicatorIcon\";\nimport { Tooltip } from \"../../Tooltip/Tooltip\";\n\ntype IconButtonProps = UnstyledButtonPropsFor<\"button\"> & {\n /**\n * The type of button.\n * @default \"primary\"\n */\n kind?: \"primary\" | \"secondary\";\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The size of the button in CSS units, e.g. `\"24px\"`.\n * Note that this is the size of the *button* itself: the icon will be 0.75 * this size\n * @default 32px\n */\n size?: CSSStyleDeclaration[\"height\"];\n /**\n * The icon button indicator dot displayed on the top right\n * As in IndicatorIcon\n */\n indicator?: \"default\" | \"success\" | \"critical\";\n /**\n * Whether the button is interactable\n */\n disabled?: boolean;\n /**\n * Whether this button triggers a destructive action.\n * @default false\n */\n destructive?: boolean;\n /**\n * Optional tooltip for the button\n */\n tooltip?: string;\n /**\n * Hide the background when the button is not active or hovered.\n * @default false\n */\n noBackground?: boolean;\n};\n\n/**\n * Display an icon as a button. Can render an indicator\n */\nexport const IconButton = forwardRef<\n HTMLButtonElement,\n PropsWithChildren<IconButtonProps>\n>(function IconButton(\n {\n kind = \"primary\",\n children,\n className,\n indicator,\n size = \"32px\",\n style,\n disabled,\n destructive,\n tooltip,\n noBackground = false,\n ...props\n },\n ref,\n) {\n const classes = classnames(styles[\"icon-button\"], className, {\n [styles.destructive]: destructive,\n [styles[\"no-background\"]]: noBackground,\n });\n\n const button = (\n <UnstyledButton\n as=\"button\"\n ref={ref}\n className={classes}\n style={\n {\n \"--cpd-icon-button-size\": size,\n ...style,\n } as React.CSSProperties\n }\n disabled={disabled}\n {...props}\n data-indicator={indicator}\n data-kind={kind}\n >\n <IndicatorIcon\n indicator={indicator}\n colour={disabled ? \"var(--cpd-color-icon-disabled)\" : undefined}\n >\n {React.Children.only(children)}\n </IndicatorIcon>\n </UnstyledButton>\n );\n\n return tooltip ? <Tooltip label={tooltip}>{button}</Tooltip> : button;\n});\n"],"names":["forwardRef","IconButton","classnames","styles","jsx","UnstyledButton","IndicatorIcon","Tooltip"],"mappings":";;;;;;;;;AA2Da,MAAA,aAAaA,MAAAA,WAGxB,SAASC,YACT;AAAA,EACE,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,GACA,KACA;AACA,QAAM,UAAUC,WAAWC,kBAAO,QAAA,aAAa,GAAG,WAAW;AAAA,IAC3D,CAACA,kBAAAA,QAAO,WAAW,GAAG;AAAA,IACtB,CAACA,kBAAAA,QAAO,eAAe,CAAC,GAAG;AAAA,EAAA,CAC5B;AAED,QAAM,SACJC,2BAAA;AAAA,IAACC,eAAA;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW;AAAA,MACX,OACE;AAAA,QACE,0BAA0B;AAAA,QAC1B,GAAG;AAAA,MACL;AAAA,MAEF;AAAA,MACC,GAAG;AAAA,MACJ,kBAAgB;AAAA,MAChB,aAAW;AAAA,MAEX,UAAAD,2BAAA;AAAA,QAACE,cAAA;AAAA,QAAA;AAAA,UACC;AAAA,UACA,QAAQ,WAAW,mCAAmC;AAAA,UAErD,UAAA,MAAM,SAAS,KAAK,QAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/B;AAAA,EACF;AAGF,SAAO,UAAWF,+BAAAG,QAAAA,SAAA,EAAQ,OAAO,SAAU,iBAAO,CAAA,IAAa;AACjE,CAAC;;"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { UnstyledButtonPropsFor } from '../UnstyledButton';
|
|
3
3
|
type IconButtonProps = UnstyledButtonPropsFor<"button"> & {
|
|
4
|
+
/**
|
|
5
|
+
* The type of button.
|
|
6
|
+
* @default "primary"
|
|
7
|
+
*/
|
|
8
|
+
kind?: "primary" | "secondary";
|
|
4
9
|
/**
|
|
5
10
|
* The CSS class name.
|
|
6
11
|
*/
|
|
@@ -29,7 +34,11 @@ type IconButtonProps = UnstyledButtonPropsFor<"button"> & {
|
|
|
29
34
|
* Optional tooltip for the button
|
|
30
35
|
*/
|
|
31
36
|
tooltip?: string;
|
|
32
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Hide the background when the button is not active or hovered.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
noBackground?: boolean;
|
|
33
42
|
};
|
|
34
43
|
/**
|
|
35
44
|
* Display an icon as a button. Can render an indicator
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/IconButton/IconButton.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAkB,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAI3E,KAAK,eAAe,GAAG,sBAAsB,CAAC,QAAQ,CAAC,GAAG;IACxD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/Button/IconButton/IconButton.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,EAAkB,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAI3E,KAAK,eAAe,GAAG,sBAAsB,CAAC,QAAQ,CAAC,GAAG;IACxD;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,iIAkDrB,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { UnstyledButton } from "../UnstyledButton.js";
|
|
|
6
6
|
import { IndicatorIcon } from "../../Icon/IndicatorIcon/IndicatorIcon.js";
|
|
7
7
|
import { Tooltip } from "../../Tooltip/Tooltip.js";
|
|
8
8
|
const IconButton = forwardRef(function IconButton2({
|
|
9
|
+
kind = "primary",
|
|
9
10
|
children,
|
|
10
11
|
className,
|
|
11
12
|
indicator,
|
|
@@ -14,12 +15,12 @@ const IconButton = forwardRef(function IconButton2({
|
|
|
14
15
|
disabled,
|
|
15
16
|
destructive,
|
|
16
17
|
tooltip,
|
|
17
|
-
|
|
18
|
+
noBackground = false,
|
|
18
19
|
...props
|
|
19
20
|
}, ref) {
|
|
20
21
|
const classes = classNames(styles["icon-button"], className, {
|
|
21
22
|
[styles.destructive]: destructive,
|
|
22
|
-
[styles["
|
|
23
|
+
[styles["no-background"]]: noBackground
|
|
23
24
|
});
|
|
24
25
|
const button = /* @__PURE__ */ jsx(
|
|
25
26
|
UnstyledButton,
|
|
@@ -34,6 +35,7 @@ const IconButton = forwardRef(function IconButton2({
|
|
|
34
35
|
disabled,
|
|
35
36
|
...props,
|
|
36
37
|
"data-indicator": indicator,
|
|
38
|
+
"data-kind": kind,
|
|
37
39
|
children: /* @__PURE__ */ jsx(
|
|
38
40
|
IndicatorIcon,
|
|
39
41
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { PropsWithChildren, forwardRef } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./IconButton.module.css\";\nimport { UnstyledButton, UnstyledButtonPropsFor } from \"../UnstyledButton\";\nimport { IndicatorIcon } from \"../../Icon/IndicatorIcon/IndicatorIcon\";\nimport { Tooltip } from \"../../Tooltip/Tooltip\";\n\ntype IconButtonProps = UnstyledButtonPropsFor<\"button\"> & {\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The size of the button in CSS units, e.g. `\"24px\"`.\n * Note that this is the size of the *button* itself: the icon will be 0.75 * this size\n * @default 32px\n */\n size?: CSSStyleDeclaration[\"height\"];\n /**\n * The icon button indicator dot displayed on the top right\n * As in IndicatorIcon\n */\n indicator?: \"default\" | \"success\" | \"critical\";\n /**\n * Whether the button is interactable\n */\n disabled?: boolean;\n /**\n * Whether this button triggers a destructive action.\n * @default false\n */\n destructive?: boolean;\n /**\n * Optional tooltip for the button\n */\n tooltip?: string;\n
|
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/Button/IconButton/IconButton.tsx"],"sourcesContent":["/*\nCopyright 2023 New Vector Ltd.\n\nSPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { PropsWithChildren, forwardRef } from \"react\";\nimport classnames from \"classnames\";\n\nimport styles from \"./IconButton.module.css\";\nimport { UnstyledButton, UnstyledButtonPropsFor } from \"../UnstyledButton\";\nimport { IndicatorIcon } from \"../../Icon/IndicatorIcon/IndicatorIcon\";\nimport { Tooltip } from \"../../Tooltip/Tooltip\";\n\ntype IconButtonProps = UnstyledButtonPropsFor<\"button\"> & {\n /**\n * The type of button.\n * @default \"primary\"\n */\n kind?: \"primary\" | \"secondary\";\n /**\n * The CSS class name.\n */\n className?: string;\n /**\n * The size of the button in CSS units, e.g. `\"24px\"`.\n * Note that this is the size of the *button* itself: the icon will be 0.75 * this size\n * @default 32px\n */\n size?: CSSStyleDeclaration[\"height\"];\n /**\n * The icon button indicator dot displayed on the top right\n * As in IndicatorIcon\n */\n indicator?: \"default\" | \"success\" | \"critical\";\n /**\n * Whether the button is interactable\n */\n disabled?: boolean;\n /**\n * Whether this button triggers a destructive action.\n * @default false\n */\n destructive?: boolean;\n /**\n * Optional tooltip for the button\n */\n tooltip?: string;\n /**\n * Hide the background when the button is not active or hovered.\n * @default false\n */\n noBackground?: boolean;\n};\n\n/**\n * Display an icon as a button. Can render an indicator\n */\nexport const IconButton = forwardRef<\n HTMLButtonElement,\n PropsWithChildren<IconButtonProps>\n>(function IconButton(\n {\n kind = \"primary\",\n children,\n className,\n indicator,\n size = \"32px\",\n style,\n disabled,\n destructive,\n tooltip,\n noBackground = false,\n ...props\n },\n ref,\n) {\n const classes = classnames(styles[\"icon-button\"], className, {\n [styles.destructive]: destructive,\n [styles[\"no-background\"]]: noBackground,\n });\n\n const button = (\n <UnstyledButton\n as=\"button\"\n ref={ref}\n className={classes}\n style={\n {\n \"--cpd-icon-button-size\": size,\n ...style,\n } as React.CSSProperties\n }\n disabled={disabled}\n {...props}\n data-indicator={indicator}\n data-kind={kind}\n >\n <IndicatorIcon\n indicator={indicator}\n colour={disabled ? \"var(--cpd-color-icon-disabled)\" : undefined}\n >\n {React.Children.only(children)}\n </IndicatorIcon>\n </UnstyledButton>\n );\n\n return tooltip ? <Tooltip label={tooltip}>{button}</Tooltip> : button;\n});\n"],"names":["IconButton","classnames"],"mappings":";;;;;;;AA2Da,MAAA,aAAa,WAGxB,SAASA,YACT;AAAA,EACE,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,GAAG;AACL,GACA,KACA;AACA,QAAM,UAAUC,WAAW,OAAO,aAAa,GAAG,WAAW;AAAA,IAC3D,CAAC,OAAO,WAAW,GAAG;AAAA,IACtB,CAAC,OAAO,eAAe,CAAC,GAAG;AAAA,EAAA,CAC5B;AAED,QAAM,SACJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH;AAAA,MACA,WAAW;AAAA,MACX,OACE;AAAA,QACE,0BAA0B;AAAA,QAC1B,GAAG;AAAA,MACL;AAAA,MAEF;AAAA,MACC,GAAG;AAAA,MACJ,kBAAgB;AAAA,MAChB,aAAW;AAAA,MAEX,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,QAAQ,WAAW,mCAAmC;AAAA,UAErD,UAAA,MAAM,SAAS,KAAK,QAAQ;AAAA,QAAA;AAAA,MAAA;AAAA,IAC/B;AAAA,EACF;AAGF,SAAO,UAAW,oBAAA,SAAA,EAAQ,OAAO,SAAU,iBAAO,CAAA,IAAa;AACjE,CAAC;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const destructive = "
|
|
3
|
+
const destructive = "_destructive_1pz9o_95";
|
|
4
4
|
const styles = {
|
|
5
|
-
"icon-button": "_icon-
|
|
6
|
-
"
|
|
5
|
+
"icon-button": "_icon-button_1pz9o_8",
|
|
6
|
+
"no-background": "_no-background_1pz9o_42",
|
|
7
7
|
destructive
|
|
8
8
|
};
|
|
9
9
|
exports.default = styles;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const destructive = "
|
|
1
|
+
const destructive = "_destructive_1pz9o_95";
|
|
2
2
|
const styles = {
|
|
3
|
-
"icon-button": "_icon-
|
|
4
|
-
"
|
|
3
|
+
"icon-button": "_icon-button_1pz9o_8",
|
|
4
|
+
"no-background": "_no-background_1pz9o_42",
|
|
5
5
|
destructive
|
|
6
6
|
};
|
|
7
7
|
export {
|
package/dist/style.css.css
CHANGED
|
@@ -247,7 +247,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
247
247
|
Please see LICENSE files in the repository root for full details.
|
|
248
248
|
*/
|
|
249
249
|
|
|
250
|
-
._icon-
|
|
250
|
+
._icon-button_1pz9o_8 {
|
|
251
251
|
--cpd-icon-button-indicator-border-size: calc(
|
|
252
252
|
var(--cpd-icon-button-size) * 0.0625
|
|
253
253
|
);
|
|
@@ -258,7 +258,6 @@ Please see LICENSE files in the repository root for full details.
|
|
|
258
258
|
/* the icon is 0.75 the size of the button, so add padding to put it in the middle */
|
|
259
259
|
padding: calc(var(--cpd-icon-button-size) * 0.125);
|
|
260
260
|
aspect-ratio: 1 / 1;
|
|
261
|
-
color: var(--cpd-color-icon-tertiary);
|
|
262
261
|
border: 0;
|
|
263
262
|
appearance: none;
|
|
264
263
|
cursor: pointer;
|
|
@@ -268,14 +267,30 @@ Please see LICENSE files in the repository root for full details.
|
|
|
268
267
|
line-height: 0px;
|
|
269
268
|
}
|
|
270
269
|
|
|
271
|
-
.
|
|
272
|
-
|
|
270
|
+
._icon-button_1pz9o_8[data-kind="primary"] {
|
|
271
|
+
* {
|
|
272
|
+
color: var(--cpd-color-icon-tertiary);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
._icon-button_1pz9o_8[data-kind="secondary"] {
|
|
273
277
|
background: var(--cpd-color-bg-subtle-secondary);
|
|
278
|
+
|
|
279
|
+
* {
|
|
280
|
+
color: var(--cpd-color-icon-secondary);
|
|
281
|
+
}
|
|
274
282
|
}
|
|
275
283
|
|
|
276
|
-
.
|
|
277
|
-
|
|
284
|
+
._no-background_1pz9o_42[data-kind="secondary"] {
|
|
285
|
+
background: transparent;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
._icon-button_1pz9o_8[aria-disabled="true"] {
|
|
278
289
|
cursor: not-allowed;
|
|
290
|
+
|
|
291
|
+
* {
|
|
292
|
+
color: var(--cpd-color-icon-disabled);
|
|
293
|
+
}
|
|
279
294
|
}
|
|
280
295
|
|
|
281
296
|
/**
|
|
@@ -283,19 +298,25 @@ Please see LICENSE files in the repository root for full details.
|
|
|
283
298
|
*/
|
|
284
299
|
|
|
285
300
|
@media (hover) {
|
|
286
|
-
._icon-
|
|
287
|
-
color: var(--cpd-color-icon-primary);
|
|
301
|
+
._icon-button_1pz9o_8:not([aria-disabled="true"]):hover {
|
|
288
302
|
background: var(--cpd-color-bg-subtle-primary);
|
|
303
|
+
|
|
304
|
+
* {
|
|
305
|
+
color: var(--cpd-color-icon-primary);
|
|
306
|
+
}
|
|
289
307
|
}
|
|
290
308
|
}
|
|
291
309
|
|
|
292
|
-
._icon-
|
|
293
|
-
color: var(--cpd-color-icon-primary);
|
|
310
|
+
._icon-button_1pz9o_8:not([aria-disabled="true"]):active {
|
|
294
311
|
background: var(--cpd-color-bg-subtle-primary);
|
|
312
|
+
|
|
313
|
+
* {
|
|
314
|
+
color: var(--cpd-color-icon-primary);
|
|
315
|
+
}
|
|
295
316
|
}
|
|
296
317
|
|
|
297
318
|
@media (hover) {
|
|
298
|
-
._icon-
|
|
319
|
+
._icon-button_1pz9o_8:not([aria-disabled="true"])[data-indicator]:is(:hover)::before {
|
|
299
320
|
/* Same colour as the background */
|
|
300
321
|
border: var(--cpd-icon-button-indicator-border-size) solid
|
|
301
322
|
var(--cpd-color-bg-subtle-primary);
|
|
@@ -304,7 +325,7 @@ Please see LICENSE files in the repository root for full details.
|
|
|
304
325
|
}
|
|
305
326
|
}
|
|
306
327
|
|
|
307
|
-
._icon-
|
|
328
|
+
._icon-button_1pz9o_8:not([aria-disabled="true"])[data-indicator]:is(:active)::before {
|
|
308
329
|
/* Same colour as the background */
|
|
309
330
|
border: var(--cpd-icon-button-indicator-border-size) solid
|
|
310
331
|
var(--cpd-color-bg-subtle-primary);
|
|
@@ -313,14 +334,16 @@ Please see LICENSE files in the repository root for full details.
|
|
|
313
334
|
}
|
|
314
335
|
|
|
315
336
|
@media (hover) {
|
|
316
|
-
._icon-
|
|
317
|
-
background: var(--cpd-color-bg-critical-subtle);
|
|
337
|
+
._icon-button_1pz9o_8:not([aria-disabled="true"])._destructive_1pz9o_95:hover {
|
|
338
|
+
background: var(--cpd-color-bg-critical-subtle-hovered);
|
|
318
339
|
outline: 1px solid var(--cpd-color-border-critical-subtle);
|
|
319
340
|
}
|
|
320
341
|
}
|
|
321
342
|
|
|
322
|
-
._icon-
|
|
323
|
-
|
|
343
|
+
._icon-button_1pz9o_8:not([aria-disabled="true"])._destructive_1pz9o_95 {
|
|
344
|
+
* {
|
|
345
|
+
color: var(--cpd-color-icon-critical-primary);
|
|
346
|
+
}
|
|
324
347
|
}
|
|
325
348
|
/*
|
|
326
349
|
Copyright 2024 New Vector Ltd.
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ Please see LICENSE files in the repository root for full details.
|
|
|
16
16
|
/* the icon is 0.75 the size of the button, so add padding to put it in the middle */
|
|
17
17
|
padding: calc(var(--cpd-icon-button-size) * 0.125);
|
|
18
18
|
aspect-ratio: 1 / 1;
|
|
19
|
-
color: var(--cpd-color-icon-tertiary);
|
|
20
19
|
border: 0;
|
|
21
20
|
appearance: none;
|
|
22
21
|
cursor: pointer;
|
|
@@ -26,14 +25,30 @@ Please see LICENSE files in the repository root for full details.
|
|
|
26
25
|
line-height: 0px;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
|
-
.
|
|
30
|
-
|
|
28
|
+
.icon-button[data-kind="primary"] {
|
|
29
|
+
* {
|
|
30
|
+
color: var(--cpd-color-icon-tertiary);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.icon-button[data-kind="secondary"] {
|
|
31
35
|
background: var(--cpd-color-bg-subtle-secondary);
|
|
36
|
+
|
|
37
|
+
* {
|
|
38
|
+
color: var(--cpd-color-icon-secondary);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.no-background[data-kind="secondary"] {
|
|
43
|
+
background: transparent;
|
|
32
44
|
}
|
|
33
45
|
|
|
34
46
|
.icon-button[aria-disabled="true"] {
|
|
35
|
-
color: var(--cpd-color-icon-disabled);
|
|
36
47
|
cursor: not-allowed;
|
|
48
|
+
|
|
49
|
+
* {
|
|
50
|
+
color: var(--cpd-color-icon-disabled);
|
|
51
|
+
}
|
|
37
52
|
}
|
|
38
53
|
|
|
39
54
|
/**
|
|
@@ -42,14 +57,20 @@ Please see LICENSE files in the repository root for full details.
|
|
|
42
57
|
|
|
43
58
|
@media (hover) {
|
|
44
59
|
.icon-button:not([aria-disabled="true"]):hover {
|
|
45
|
-
color: var(--cpd-color-icon-primary);
|
|
46
60
|
background: var(--cpd-color-bg-subtle-primary);
|
|
61
|
+
|
|
62
|
+
* {
|
|
63
|
+
color: var(--cpd-color-icon-primary);
|
|
64
|
+
}
|
|
47
65
|
}
|
|
48
66
|
}
|
|
49
67
|
|
|
50
68
|
.icon-button:not([aria-disabled="true"]):active {
|
|
51
|
-
color: var(--cpd-color-icon-primary);
|
|
52
69
|
background: var(--cpd-color-bg-subtle-primary);
|
|
70
|
+
|
|
71
|
+
* {
|
|
72
|
+
color: var(--cpd-color-icon-primary);
|
|
73
|
+
}
|
|
53
74
|
}
|
|
54
75
|
|
|
55
76
|
@media (hover) {
|
|
@@ -72,11 +93,13 @@ Please see LICENSE files in the repository root for full details.
|
|
|
72
93
|
|
|
73
94
|
@media (hover) {
|
|
74
95
|
.icon-button:not([aria-disabled="true"]).destructive:hover {
|
|
75
|
-
background: var(--cpd-color-bg-critical-subtle);
|
|
96
|
+
background: var(--cpd-color-bg-critical-subtle-hovered);
|
|
76
97
|
outline: 1px solid var(--cpd-color-border-critical-subtle);
|
|
77
98
|
}
|
|
78
99
|
}
|
|
79
100
|
|
|
80
|
-
.icon-button:not([aria-disabled="true"]).destructive
|
|
81
|
-
|
|
101
|
+
.icon-button:not([aria-disabled="true"]).destructive {
|
|
102
|
+
* {
|
|
103
|
+
color: var(--cpd-color-icon-critical-primary);
|
|
104
|
+
}
|
|
82
105
|
}
|
|
@@ -14,6 +14,11 @@ import { IndicatorIcon } from "../../Icon/IndicatorIcon/IndicatorIcon";
|
|
|
14
14
|
import { Tooltip } from "../../Tooltip/Tooltip";
|
|
15
15
|
|
|
16
16
|
type IconButtonProps = UnstyledButtonPropsFor<"button"> & {
|
|
17
|
+
/**
|
|
18
|
+
* The type of button.
|
|
19
|
+
* @default "primary"
|
|
20
|
+
*/
|
|
21
|
+
kind?: "primary" | "secondary";
|
|
17
22
|
/**
|
|
18
23
|
* The CSS class name.
|
|
19
24
|
*/
|
|
@@ -42,7 +47,11 @@ type IconButtonProps = UnstyledButtonPropsFor<"button"> & {
|
|
|
42
47
|
* Optional tooltip for the button
|
|
43
48
|
*/
|
|
44
49
|
tooltip?: string;
|
|
45
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Hide the background when the button is not active or hovered.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
noBackground?: boolean;
|
|
46
55
|
};
|
|
47
56
|
|
|
48
57
|
/**
|
|
@@ -53,6 +62,7 @@ export const IconButton = forwardRef<
|
|
|
53
62
|
PropsWithChildren<IconButtonProps>
|
|
54
63
|
>(function IconButton(
|
|
55
64
|
{
|
|
65
|
+
kind = "primary",
|
|
56
66
|
children,
|
|
57
67
|
className,
|
|
58
68
|
indicator,
|
|
@@ -61,14 +71,14 @@ export const IconButton = forwardRef<
|
|
|
61
71
|
disabled,
|
|
62
72
|
destructive,
|
|
63
73
|
tooltip,
|
|
64
|
-
|
|
74
|
+
noBackground = false,
|
|
65
75
|
...props
|
|
66
76
|
},
|
|
67
77
|
ref,
|
|
68
78
|
) {
|
|
69
79
|
const classes = classnames(styles["icon-button"], className, {
|
|
70
80
|
[styles.destructive]: destructive,
|
|
71
|
-
[styles["
|
|
81
|
+
[styles["no-background"]]: noBackground,
|
|
72
82
|
});
|
|
73
83
|
|
|
74
84
|
const button = (
|
|
@@ -85,6 +95,7 @@ export const IconButton = forwardRef<
|
|
|
85
95
|
disabled={disabled}
|
|
86
96
|
{...props}
|
|
87
97
|
data-indicator={indicator}
|
|
98
|
+
data-kind={kind}
|
|
88
99
|
>
|
|
89
100
|
<IndicatorIcon
|
|
90
101
|
indicator={indicator}
|