@neo4j-ndl/react 5.4.1 → 5.4.3

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.
Files changed (27) hide show
  1. package/lib/cjs/button/ButtonBase.js +2 -2
  2. package/lib/cjs/button/ButtonBase.js.map +1 -1
  3. package/lib/cjs/button/stories/button-leading-icon.story.js +1 -1
  4. package/lib/cjs/button/stories/button-leading-icon.story.js.map +1 -1
  5. package/lib/cjs/button/stories/button-trailing-icon.story.js +31 -0
  6. package/lib/cjs/button/stories/button-trailing-icon.story.js.map +1 -0
  7. package/lib/cjs/button/stories/index.js +5 -1
  8. package/lib/cjs/button/stories/index.js.map +1 -1
  9. package/lib/esm/button/ButtonBase.js +2 -2
  10. package/lib/esm/button/ButtonBase.js.map +1 -1
  11. package/lib/esm/button/stories/button-leading-icon.story.js +2 -2
  12. package/lib/esm/button/stories/button-leading-icon.story.js.map +1 -1
  13. package/lib/esm/button/stories/button-trailing-icon.story.js +29 -0
  14. package/lib/esm/button/stories/button-trailing-icon.story.js.map +1 -0
  15. package/lib/esm/button/stories/index.js +3 -0
  16. package/lib/esm/button/stories/index.js.map +1 -1
  17. package/lib/types/button/ButtonBase.d.ts +3 -1
  18. package/lib/types/button/ButtonBase.d.ts.map +1 -1
  19. package/lib/types/button/stories/button-trailing-icon.story.d.ts +24 -0
  20. package/lib/types/button/stories/button-trailing-icon.story.d.ts.map +1 -0
  21. package/lib/types/button/stories/index.d.ts +2 -0
  22. package/lib/types/button/stories/index.d.ts.map +1 -1
  23. package/package.json +2 -2
  24. package/skills/ndl-react/SKILL.md +2 -2
  25. package/skills/ndl-react/components/filled-button.md +1 -0
  26. package/skills/ndl-react/components/outlined-button.md +1 -0
  27. package/skills/ndl-react/components/text-button.md +1 -0
@@ -39,7 +39,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
39
39
  const classnames_1 = __importDefault(require("classnames"));
40
40
  const ButtonSpinner_1 = require("../_common/ButtonSpinner");
41
41
  const ButtonBase = (_a) => {
42
- var { as, buttonFill = 'filled', children, className, variant = 'primary', htmlAttributes, isDisabled = false, isFloating = false, isFluid = false, isLoading = false, leadingVisual, onClick, ref, size = 'medium', style, type = 'button', loadingMessage = 'Loading' } = _a, restProps = __rest(_a, ["as", "buttonFill", "children", "className", "variant", "htmlAttributes", "isDisabled", "isFloating", "isFluid", "isLoading", "leadingVisual", "onClick", "ref", "size", "style", "type", "loadingMessage"]);
42
+ var { as, buttonFill = 'filled', children, className, variant = 'primary', htmlAttributes, isDisabled = false, isFloating = false, isFluid = false, isLoading = false, leadingVisual, trailingVisual, onClick, ref, size = 'medium', style, type = 'button', loadingMessage = 'Loading' } = _a, restProps = __rest(_a, ["as", "buttonFill", "children", "className", "variant", "htmlAttributes", "isDisabled", "isFloating", "isFluid", "isLoading", "leadingVisual", "trailingVisual", "onClick", "ref", "size", "style", "type", "loadingMessage"]);
43
43
  const Component = as !== null && as !== void 0 ? as : 'button';
44
44
  const isInteractable = !isDisabled && !isLoading;
45
45
  const classes = (0, classnames_1.default)(className, 'ndl-btn', {
@@ -65,7 +65,7 @@ const ButtonBase = (_a) => {
65
65
  onClick(event);
66
66
  }
67
67
  };
68
- return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ type: type, onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsxs)("div", { className: "ndl-btn-inner", children: [Boolean(leadingVisual) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-btn-leading-element", children: leadingVisual })), Boolean(children) && ((0, jsx_runtime_1.jsx)("span", { className: "ndl-btn-content", children: children })), isLoading && ((0, jsx_runtime_1.jsx)(ButtonSpinner_1.ButtonSpinner, { loadingMessage: loadingMessage, size: size }))] }) })));
68
+ return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ type: type, onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsxs)("div", { className: "ndl-btn-inner", children: [Boolean(leadingVisual) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-btn-leading-element", children: leadingVisual })), Boolean(children) && ((0, jsx_runtime_1.jsx)("span", { className: "ndl-btn-content", children: children })), isLoading && ((0, jsx_runtime_1.jsx)(ButtonSpinner_1.ButtonSpinner, { loadingMessage: loadingMessage, size: size })), Boolean(trailingVisual) && ((0, jsx_runtime_1.jsx)("div", { className: "ndl-btn-trailing-element", children: trailingVisual }))] }) })));
69
69
  };
70
70
  exports.ButtonBase = ButtonBase;
71
71
  //# sourceMappingURL=ButtonBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.js","sourceRoot":"","sources":["../../../src/button/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAGpC,4DAAyD;AAgElD,MAAM,UAAU,GAAG,CAAyC,EAmBtB,EAAE,EAAE;QAnBkB,EACjE,EAAE,EACF,UAAU,GAAG,QAAQ,EACrB,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,cAAc,EACd,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,KAAK,EACjB,aAAa,EACb,OAAO,EACP,GAAG,EACH,IAAI,GAAG,QAAQ,EACf,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,cAAc,GAAG,SAAS,OAEiB,EADxC,SAAS,cAlBqD,4MAmBlE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IACpD,MAAM,cAAc,GAAG,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC;IAEjD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,SAAS,EAAE,SAAS,EAAE;QAC/C,cAAc,EAAE,UAAU;QAC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://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { ButtonSpinner } from '../_common/ButtonSpinner';\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\n\n/**\n *\n * Types\n *\n */\n\ntype ButtonTypes = 'submit' | 'button' | 'reset';\nexport type ButtonSizes = 'small' | 'medium' | 'large';\nexport type ButtonVariants = 'primary' | 'danger' | 'neutral';\n\nexport type CommonButtonProps = {\n children?: React.ReactNode;\n /** Icon to display before the button content */\n leadingVisual?: React.ReactNode;\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** If the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is fluid, it will take the full width of its container */\n isFluid?: boolean;\n /** Type of button */\n type?: ButtonTypes;\n /** Size of button */\n size?: ButtonSizes;\n /** onClick callback */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** onKeyDown callback */\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n /** Accessible message for screen readers when the button is in a loading state */\n loadingMessage?: string;\n} /**\n * If `as=\"a\"`, `href` is required and `target` is available.\n * For all other elements, these props are not present.\n */ & (\n | {\n as: 'a';\n /** The URL to link to. Only applies when `as=\"a\"` */\n href?: HtmlAttributes<'a'>['href'];\n /**\n * The target window for the link. Only applies when `as=\"a\"`.\n * Not present or required for other element types.\n */\n target?: HtmlAttributes<'a'>['target'];\n }\n | {\n as?: React.ElementType;\n }\n);\n\ntype ButtonBaseProps = CommonButtonProps & {\n /** If the button is in floating state */\n isFloating?: boolean;\n /** variant of the button */\n variant?: ButtonVariants;\n /** fill of the button */\n buttonFill?: 'filled' | 'outlined' | 'text';\n};\n\nexport const ButtonBase = <T extends React.ElementType = 'button'>({\n as,\n buttonFill = 'filled',\n children,\n className,\n variant = 'primary',\n htmlAttributes,\n isDisabled = false,\n isFloating = false,\n isFluid = false,\n isLoading = false,\n leadingVisual,\n onClick,\n ref,\n size = 'medium',\n style,\n type = 'button',\n loadingMessage = 'Loading',\n ...restProps\n}: PolymorphicCommonProps<T, ButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n const isInteractable = !isDisabled && !isLoading;\n\n const classes = classNames(className, 'ndl-btn', {\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-fluid': isFluid,\n 'ndl-loading': isLoading,\n [`ndl-${size}`]: size,\n [`ndl-${buttonFill}-button`]: buttonFill,\n [`ndl-${variant}`]: variant,\n });\n\n const handleClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <Component\n type={type}\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-btn-inner\">\n {Boolean(leadingVisual) && (\n <div className=\"ndl-btn-leading-element\">{leadingVisual}</div>\n )}\n {Boolean(children) && (\n <span className=\"ndl-btn-content\">{children}</span>\n )}\n {isLoading && (\n <ButtonSpinner loadingMessage={loadingMessage} size={size} />\n )}\n </div>\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonBase.js","sourceRoot":"","s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OAAO;QACT,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,SAAS,kBACR,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,mBACL,CAAC,cAAc,EAC9B,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,iCAAK,SAAS,EAAC,eAAe,aAC3B,OAAO,CAAC,aAAa,CAAC,IAAI,CACzB,gCAAK,SAAS,EAAC,yBAAyB,YAAE,aAAa,GAAO,CAC/D,EACA,OAAO,CAAC,QAAQ,CAAC,IAAI,CACpB,iCAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,CACpD,EACA,SAAS,IAAI,CACZ,uBAAC,6BAAa,IAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAI,CAC9D,EACA,OAAO,CAAC,cAAc,CAAC,IAAI,CAC1B,gCAAK,SAAS,EAAC,0BAA0B,YAAE,cAAc,GAAO,CACjE,IACG,IACI,CACb,CAAC;AACJ,CAAC,CAAC;AAhFW,QAAA,UAAU,cAgFrB","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { ButtonSpinner } from '../_common/ButtonSpinner';\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\n\n/**\n *\n * Types\n *\n */\n\ntype ButtonTypes = 'submit' | 'button' | 'reset';\nexport type ButtonSizes = 'small' | 'medium' | 'large';\nexport type ButtonVariants = 'primary' | 'danger' | 'neutral';\n\nexport type CommonButtonProps = {\n children?: React.ReactNode;\n /** Icon to display before the button content */\n leadingVisual?: React.ReactNode;\n /** Icon to display after the button content */\n trailingVisual?: React.ReactNode;\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** If the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is fluid, it will take the full width of its container */\n isFluid?: boolean;\n /** Type of button */\n type?: ButtonTypes;\n /** Size of button */\n size?: ButtonSizes;\n /** onClick callback */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** onKeyDown callback */\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n /** Accessible message for screen readers when the button is in a loading state */\n loadingMessage?: string;\n} /**\n * If `as=\"a\"`, `href` is required and `target` is available.\n * For all other elements, these props are not present.\n */ & (\n | {\n as: 'a';\n /** The URL to link to. Only applies when `as=\"a\"` */\n href?: HtmlAttributes<'a'>['href'];\n /**\n * The target window for the link. Only applies when `as=\"a\"`.\n * Not present or required for other element types.\n */\n target?: HtmlAttributes<'a'>['target'];\n }\n | {\n as?: React.ElementType;\n }\n);\n\ntype ButtonBaseProps = CommonButtonProps & {\n /** If the button is in floating state */\n isFloating?: boolean;\n /** variant of the button */\n variant?: ButtonVariants;\n /** fill of the button */\n buttonFill?: 'filled' | 'outlined' | 'text';\n};\n\nexport const ButtonBase = <T extends React.ElementType = 'button'>({\n as,\n buttonFill = 'filled',\n children,\n className,\n variant = 'primary',\n htmlAttributes,\n isDisabled = false,\n isFloating = false,\n isFluid = false,\n isLoading = false,\n leadingVisual,\n trailingVisual,\n onClick,\n ref,\n size = 'medium',\n style,\n type = 'button',\n loadingMessage = 'Loading',\n ...restProps\n}: PolymorphicCommonProps<T, ButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n const isInteractable = !isDisabled && !isLoading;\n\n const classes = classNames(className, 'ndl-btn', {\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-fluid': isFluid,\n 'ndl-loading': isLoading,\n [`ndl-${size}`]: size,\n [`ndl-${buttonFill}-button`]: buttonFill,\n [`ndl-${variant}`]: variant,\n });\n\n const handleClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <Component\n type={type}\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-btn-inner\">\n {Boolean(leadingVisual) && (\n <div className=\"ndl-btn-leading-element\">{leadingVisual}</div>\n )}\n {Boolean(children) && (\n <span className=\"ndl-btn-content\">{children}</span>\n )}\n {isLoading && (\n <ButtonSpinner loadingMessage={loadingMessage} size={size} />\n )}\n {Boolean(trailingVisual) && (\n <div className=\"ndl-btn-trailing-element\">{trailingVisual}</div>\n )}\n </div>\n </Component>\n );\n};\n"]}
@@ -25,7 +25,7 @@ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
25
  const react_1 = require("@neo4j-ndl/react");
26
26
  const icons_1 = require("@neo4j-ndl/react/icons");
27
27
  const Component = () => {
28
- return ((0, jsx_runtime_1.jsx)(react_1.FilledButton, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PanelLeftCollapseIcon, {}), children: "Download" }));
28
+ return ((0, jsx_runtime_1.jsx)(react_1.FilledButton, { leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.PanelLeftCollapseOutlineIcon, {}), children: "Download" }));
29
29
  };
30
30
  exports.default = Component;
31
31
  //# sourceMappingURL=button-leading-icon.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-leading-icon.story.js","sourceRoot":"","sources":["../../../../src/button/stories/button-leading-icon.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAgD;AAChD,kDAA+D;AAE/D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,oBAAY,IAAC,aAAa,EAAE,uBAAC,6BAAqB,KAAG,yBAEvC,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { PanelLeftCollapseIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FilledButton leadingVisual={<PanelLeftCollapseIcon />}>\n Download\n </FilledButton>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"button-leading-icon.story.js","sourceRoot":"","sources":["../../../../src/button/stories/button-leading-icon.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAgD;AAChD,kDAAsE;AAEtE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,oBAAY,IAAC,aAAa,EAAE,uBAAC,oCAA4B,KAAG,yBAE9C,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { PanelLeftCollapseOutlineIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FilledButton leadingVisual={<PanelLeftCollapseOutlineIcon />}>\n Download\n </FilledButton>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /*!
5
+ *
6
+ * Copyright (c) "Neo4j"
7
+ * Neo4j Sweden AB [http://neo4j.com]
8
+ *
9
+ * This file is part of Neo4j.
10
+ *
11
+ * Neo4j is free software: you can redistribute it and/or modify
12
+ * it under the terms of the GNU General Public License as published by
13
+ * the Free Software Foundation, either version 3 of the License, or
14
+ * (at your option) any later version.
15
+ *
16
+ * This program is distributed in the hope that it will be useful,
17
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
+ * GNU General Public License for more details.
20
+ *
21
+ * You should have received a copy of the GNU General Public License
22
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
23
+ */
24
+ require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
+ const react_1 = require("@neo4j-ndl/react");
26
+ const icons_1 = require("@neo4j-ndl/react/icons");
27
+ const Component = () => {
28
+ return ((0, jsx_runtime_1.jsx)(react_1.FilledButton, { trailingVisual: (0, jsx_runtime_1.jsx)(icons_1.PanelRightCollapseOutlineIcon, {}), children: "Download" }));
29
+ };
30
+ exports.default = Component;
31
+ //# sourceMappingURL=button-trailing-icon.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-trailing-icon.story.js","sourceRoot":"","sources":["../../../../src/button/stories/button-trailing-icon.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAgD;AAChD,kDAAuE;AAEvE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,oBAAY,IAAC,cAAc,EAAE,uBAAC,qCAA6B,KAAG,yBAEhD,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { PanelRightCollapseOutlineIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FilledButton trailingVisual={<PanelRightCollapseOutlineIcon />}>\n Download\n </FilledButton>\n );\n};\n\nexport default Component;\n"]}
@@ -23,11 +23,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
23
23
  return (mod && mod.__esModule) ? mod : { "default": mod };
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.ButtonRunningCancelSrc = exports.ButtonFloatingSrc = exports.ButtonDisabledSrc = exports.ButtonLoadingSrc = exports.ButtonVariantsSrc = exports.ButtonFluidSrc = exports.ButtonLeadingIconSrc = exports.ButtonSizesSrc = exports.ButtonRunningCancel = exports.ButtonFloating = exports.ButtonDisabled = exports.ButtonLoading = exports.ButtonVariants = exports.ButtonFluid = exports.ButtonLeadingIcon = exports.ButtonSizes = void 0;
26
+ exports.ButtonRunningCancelSrc = exports.ButtonFloatingSrc = exports.ButtonDisabledSrc = exports.ButtonLoadingSrc = exports.ButtonVariantsSrc = exports.ButtonFluidSrc = exports.ButtonTrailingIconSrc = exports.ButtonLeadingIconSrc = exports.ButtonSizesSrc = exports.ButtonRunningCancel = exports.ButtonFloating = exports.ButtonDisabled = exports.ButtonLoading = exports.ButtonVariants = exports.ButtonFluid = exports.ButtonTrailingIcon = exports.ButtonLeadingIcon = exports.ButtonSizes = void 0;
27
27
  var button_sizes_story_1 = require("./button-sizes.story");
28
28
  Object.defineProperty(exports, "ButtonSizes", { enumerable: true, get: function () { return __importDefault(button_sizes_story_1).default; } });
29
29
  var button_leading_icon_story_1 = require("./button-leading-icon.story");
30
30
  Object.defineProperty(exports, "ButtonLeadingIcon", { enumerable: true, get: function () { return __importDefault(button_leading_icon_story_1).default; } });
31
+ var button_trailing_icon_story_1 = require("./button-trailing-icon.story");
32
+ Object.defineProperty(exports, "ButtonTrailingIcon", { enumerable: true, get: function () { return __importDefault(button_trailing_icon_story_1).default; } });
31
33
  var button_fluid_story_1 = require("./button-fluid.story");
32
34
  Object.defineProperty(exports, "ButtonFluid", { enumerable: true, get: function () { return __importDefault(button_fluid_story_1).default; } });
33
35
  var button_variants_story_1 = require("./button-variants.story");
@@ -48,9 +50,11 @@ const button_leading_icon_story_raw_1 = __importDefault(require("./button-leadin
48
50
  const button_loading_story_raw_1 = __importDefault(require("./button-loading.story?raw"));
49
51
  const button_running_cancel_story_raw_1 = __importDefault(require("./button-running-cancel.story?raw"));
50
52
  const button_sizes_story_raw_1 = __importDefault(require("./button-sizes.story?raw"));
53
+ const button_trailing_icon_story_raw_1 = __importDefault(require("./button-trailing-icon.story?raw"));
51
54
  const button_variants_story_raw_1 = __importDefault(require("./button-variants.story?raw"));
52
55
  exports.ButtonSizesSrc = (0, export_stories_utils_1.removeLicenseHeader)(button_sizes_story_raw_1.default);
53
56
  exports.ButtonLeadingIconSrc = (0, export_stories_utils_1.removeLicenseHeader)(button_leading_icon_story_raw_1.default);
57
+ exports.ButtonTrailingIconSrc = (0, export_stories_utils_1.removeLicenseHeader)(button_trailing_icon_story_raw_1.default);
54
58
  exports.ButtonFluidSrc = (0, export_stories_utils_1.removeLicenseHeader)(button_fluid_story_raw_1.default);
55
59
  exports.ButtonVariantsSrc = (0, export_stories_utils_1.removeLicenseHeader)(button_variants_story_raw_1.default);
56
60
  exports.ButtonLoadingSrc = (0, export_stories_utils_1.removeLicenseHeader)(button_loading_story_raw_1.default);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAC/B,yEAA2E;AAAlE,+IAAA,OAAO,OAAqB;AACrC,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAC/B,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,6EAA+E;AAAtE,mJAAA,OAAO,OAAuB;AAEvC,6EAAyE;AACzE,4FAA+D;AAC/D,4FAA+D;AAC/D,sFAAyD;AACzD,oGAAsE;AACtE,0FAA6D;AAC7D,wGAA0E;AAC1E,sFAAyD;AACzD,4FAA+D;AAElD,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,gCAAiB,CAAC,CAAC;AACxD,QAAA,oBAAoB,GAAG,IAAA,0CAAmB,EACrD,uCAAuB,CACxB,CAAC;AACW,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,gCAAiB,CAAC,CAAC;AACxD,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,kCAAmB,CAAC,CAAC;AAC5D,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,yCAAyB,CAC1B,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ButtonSizes } from './button-sizes.story';\nexport { default as ButtonLeadingIcon } from './button-leading-icon.story';\nexport { default as ButtonFluid } from './button-fluid.story';\nexport { default as ButtonVariants } from './button-variants.story';\nexport { default as ButtonLoading } from './button-loading.story';\nexport { default as ButtonDisabled } from './button-disabled.story';\nexport { default as ButtonFloating } from './button-floating.story';\nexport { default as ButtonRunningCancel } from './button-running-cancel.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport ButtonDisabledSrcRaw from './button-disabled.story?raw';\nimport ButtonFloatingSrcRaw from './button-floating.story?raw';\nimport ButtonFluidSrcRaw from './button-fluid.story?raw';\nimport ButtonLeadingIconSrcRaw from './button-leading-icon.story?raw';\nimport ButtonLoadingSrcRaw from './button-loading.story?raw';\nimport ButtonRunningCancelSrcRaw from './button-running-cancel.story?raw';\nimport ButtonSizesSrcRaw from './button-sizes.story?raw';\nimport ButtonVariantsSrcRaw from './button-variants.story?raw';\n\nexport const ButtonSizesSrc = removeLicenseHeader(ButtonSizesSrcRaw);\nexport const ButtonLeadingIconSrc = removeLicenseHeader(\n ButtonLeadingIconSrcRaw,\n);\nexport const ButtonFluidSrc = removeLicenseHeader(ButtonFluidSrcRaw);\nexport const ButtonVariantsSrc = removeLicenseHeader(ButtonVariantsSrcRaw);\nexport const ButtonLoadingSrc = removeLicenseHeader(ButtonLoadingSrcRaw);\nexport const ButtonDisabledSrc = removeLicenseHeader(ButtonDisabledSrcRaw);\nexport const ButtonFloatingSrc = removeLicenseHeader(ButtonFloatingSrcRaw);\nexport const ButtonRunningCancelSrc = removeLicenseHeader(\n ButtonRunningCancelSrcRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAC/B,yEAA2E;AAAlE,+IAAA,OAAO,OAAqB;AACrC,2EAA6E;AAApE,iJAAA,OAAO,OAAsB;AACtC,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAC/B,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,+DAAkE;AAAzD,sIAAA,OAAO,OAAiB;AACjC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,iEAAoE;AAA3D,wIAAA,OAAO,OAAkB;AAClC,6EAA+E;AAAtE,mJAAA,OAAO,OAAuB;AAEvC,6EAAyE;AACzE,4FAA+D;AAC/D,4FAA+D;AAC/D,sFAAyD;AACzD,oGAAsE;AACtE,0FAA6D;AAC7D,wGAA0E;AAC1E,sFAAyD;AACzD,sGAAwE;AACxE,4FAA+D;AAElD,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,gCAAiB,CAAC,CAAC;AACxD,QAAA,oBAAoB,GAAG,IAAA,0CAAmB,EACrD,uCAAuB,CACxB,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAA,0CAAmB,EACtD,wCAAwB,CACzB,CAAC;AACW,QAAA,cAAc,GAAG,IAAA,0CAAmB,EAAC,gCAAiB,CAAC,CAAC;AACxD,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,gBAAgB,GAAG,IAAA,0CAAmB,EAAC,kCAAmB,CAAC,CAAC;AAC5D,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,mCAAoB,CAAC,CAAC;AAC9D,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,yCAAyB,CAC1B,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ButtonSizes } from './button-sizes.story';\nexport { default as ButtonLeadingIcon } from './button-leading-icon.story';\nexport { default as ButtonTrailingIcon } from './button-trailing-icon.story';\nexport { default as ButtonFluid } from './button-fluid.story';\nexport { default as ButtonVariants } from './button-variants.story';\nexport { default as ButtonLoading } from './button-loading.story';\nexport { default as ButtonDisabled } from './button-disabled.story';\nexport { default as ButtonFloating } from './button-floating.story';\nexport { default as ButtonRunningCancel } from './button-running-cancel.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport ButtonDisabledSrcRaw from './button-disabled.story?raw';\nimport ButtonFloatingSrcRaw from './button-floating.story?raw';\nimport ButtonFluidSrcRaw from './button-fluid.story?raw';\nimport ButtonLeadingIconSrcRaw from './button-leading-icon.story?raw';\nimport ButtonLoadingSrcRaw from './button-loading.story?raw';\nimport ButtonRunningCancelSrcRaw from './button-running-cancel.story?raw';\nimport ButtonSizesSrcRaw from './button-sizes.story?raw';\nimport ButtonTrailingIconSrcRaw from './button-trailing-icon.story?raw';\nimport ButtonVariantsSrcRaw from './button-variants.story?raw';\n\nexport const ButtonSizesSrc = removeLicenseHeader(ButtonSizesSrcRaw);\nexport const ButtonLeadingIconSrc = removeLicenseHeader(\n ButtonLeadingIconSrcRaw,\n);\nexport const ButtonTrailingIconSrc = removeLicenseHeader(\n ButtonTrailingIconSrcRaw,\n);\nexport const ButtonFluidSrc = removeLicenseHeader(ButtonFluidSrcRaw);\nexport const ButtonVariantsSrc = removeLicenseHeader(ButtonVariantsSrcRaw);\nexport const ButtonLoadingSrc = removeLicenseHeader(ButtonLoadingSrcRaw);\nexport const ButtonDisabledSrc = removeLicenseHeader(ButtonDisabledSrcRaw);\nexport const ButtonFloatingSrc = removeLicenseHeader(ButtonFloatingSrcRaw);\nexport const ButtonRunningCancelSrc = removeLicenseHeader(\n ButtonRunningCancelSrcRaw,\n);\n"]}
@@ -33,7 +33,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
33
33
  import classNames from 'classnames';
34
34
  import { ButtonSpinner } from '../_common/ButtonSpinner';
35
35
  export const ButtonBase = (_a) => {
36
- var { as, buttonFill = 'filled', children, className, variant = 'primary', htmlAttributes, isDisabled = false, isFloating = false, isFluid = false, isLoading = false, leadingVisual, onClick, ref, size = 'medium', style, type = 'button', loadingMessage = 'Loading' } = _a, restProps = __rest(_a, ["as", "buttonFill", "children", "className", "variant", "htmlAttributes", "isDisabled", "isFloating", "isFluid", "isLoading", "leadingVisual", "onClick", "ref", "size", "style", "type", "loadingMessage"]);
36
+ var { as, buttonFill = 'filled', children, className, variant = 'primary', htmlAttributes, isDisabled = false, isFloating = false, isFluid = false, isLoading = false, leadingVisual, trailingVisual, onClick, ref, size = 'medium', style, type = 'button', loadingMessage = 'Loading' } = _a, restProps = __rest(_a, ["as", "buttonFill", "children", "className", "variant", "htmlAttributes", "isDisabled", "isFloating", "isFluid", "isLoading", "leadingVisual", "trailingVisual", "onClick", "ref", "size", "style", "type", "loadingMessage"]);
37
37
  const Component = as !== null && as !== void 0 ? as : 'button';
38
38
  const isInteractable = !isDisabled && !isLoading;
39
39
  const classes = classNames(className, 'ndl-btn', {
@@ -59,6 +59,6 @@ export const ButtonBase = (_a) => {
59
59
  onClick(event);
60
60
  }
61
61
  };
62
- return (_jsx(Component, Object.assign({ type: type, onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: _jsxs("div", { className: "ndl-btn-inner", children: [Boolean(leadingVisual) && (_jsx("div", { className: "ndl-btn-leading-element", children: leadingVisual })), Boolean(children) && (_jsx("span", { className: "ndl-btn-content", children: children })), isLoading && (_jsx(ButtonSpinner, { loadingMessage: loadingMessage, size: size }))] }) })));
62
+ return (_jsx(Component, Object.assign({ type: type, onClick: handleClick, disabled: isDisabled, "aria-disabled": !isInteractable, className: classes, style: style, ref: ref }, restProps, htmlAttributes, { children: _jsxs("div", { className: "ndl-btn-inner", children: [Boolean(leadingVisual) && (_jsx("div", { className: "ndl-btn-leading-element", children: leadingVisual })), Boolean(children) && (_jsx("span", { className: "ndl-btn-content", children: children })), isLoading && (_jsx(ButtonSpinner, { loadingMessage: loadingMessage, size: size })), Boolean(trailingVisual) && (_jsx("div", { className: "ndl-btn-trailing-element", children: trailingVisual }))] }) })));
63
63
  };
64
64
  //# sourceMappingURL=ButtonBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.js","sourceRoot":"","sources":["../../../src/button/ButtonBase.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAgEzD,MAAM,CAAC,MAAM,UAAU,GAAG,CAAyC,EAmBtB,EAAE,EAAE;QAnBkB,EACjE,EAAE,EACF,UAAU,GAAG,QAAQ,EACrB,QAAQ,EACR,SAAS,EACT,OAAO,GAAG,SAAS,EACnB,cAAc,EACd,UAAU,GAAG,KAAK,EAClB,UAAU,GAAG,KAAK,EAClB,OAAO,GAAG,KAAK,EACf,SAAS,GAAG,KAAK,EACjB,aAAa,EACb,OAAO,EACP,GAAG,EACH,IAAI,GAAG,QAAQ,EACf,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,cAAc,GAAG,SAAS,OAEiB,EADxC,SAAS,cAlBqD,4MAmBlE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,QAAQ,CAAC;IACpD,MAAM,cAAc,GAAG,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC;IAEjD,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE;QAC/C,cAAc,EAAE,UAAU;QAC1B,cAAc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is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { ButtonSpinner } from '../_common/ButtonSpinner';\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\n\n/**\n *\n * Types\n *\n */\n\ntype ButtonTypes = 'submit' | 'button' | 'reset';\nexport type ButtonSizes = 'small' | 'medium' | 'large';\nexport type ButtonVariants = 'primary' | 'danger' | 'neutral';\n\nexport type CommonButtonProps = {\n children?: React.ReactNode;\n /** Icon to display before the button content */\n leadingVisual?: React.ReactNode;\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** If the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is fluid, it will take the full width of its container */\n isFluid?: boolean;\n /** Type of button */\n type?: ButtonTypes;\n /** Size of button */\n size?: ButtonSizes;\n /** onClick callback */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** onKeyDown callback */\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n /** Accessible message for screen readers when the button is in a loading state */\n loadingMessage?: string;\n} /**\n * If `as=\"a\"`, `href` is required and `target` is available.\n * For all other elements, these props are not present.\n */ & (\n | {\n as: 'a';\n /** The URL to link to. Only applies when `as=\"a\"` */\n href?: HtmlAttributes<'a'>['href'];\n /**\n * The target window for the link. Only applies when `as=\"a\"`.\n * Not present or required for other element types.\n */\n target?: HtmlAttributes<'a'>['target'];\n }\n | {\n as?: React.ElementType;\n }\n);\n\ntype ButtonBaseProps = CommonButtonProps & {\n /** If the button is in floating state */\n isFloating?: boolean;\n /** variant of the button */\n variant?: ButtonVariants;\n /** fill of the button */\n buttonFill?: 'filled' | 'outlined' | 'text';\n};\n\nexport const ButtonBase = <T extends React.ElementType = 'button'>({\n as,\n buttonFill = 'filled',\n children,\n className,\n variant = 'primary',\n htmlAttributes,\n isDisabled = false,\n isFloating = false,\n isFluid = false,\n isLoading = false,\n leadingVisual,\n onClick,\n ref,\n size = 'medium',\n style,\n type = 'button',\n loadingMessage = 'Loading',\n ...restProps\n}: PolymorphicCommonProps<T, ButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n const isInteractable = !isDisabled && !isLoading;\n\n const classes = classNames(className, 'ndl-btn', {\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-fluid': isFluid,\n 'ndl-loading': isLoading,\n [`ndl-${size}`]: size,\n [`ndl-${buttonFill}-button`]: buttonFill,\n [`ndl-${variant}`]: variant,\n });\n\n const handleClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <Component\n type={type}\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-btn-inner\">\n {Boolean(leadingVisual) && (\n <div className=\"ndl-btn-leading-element\">{leadingVisual}</div>\n )}\n {Boolean(children) && (\n <span className=\"ndl-btn-content\">{children}</span>\n )}\n {isLoading && (\n <ButtonSpinner loadingMessage={loadingMessage} size={size} />\n )}\n </div>\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"ButtonBase.js","sourceRoot":"","sources":["../../../src/button/ButtonBase.tsx"],"names":[],"mappings":";;;;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,CAAC;YACxB,OAAO;QACT,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,OAAO,CAAC,KAAK,CAAC,CAAC;QACjB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,SAAS,kBACR,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,mBACL,CAAC,cAAc,EAC9B,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,eAAK,SAAS,EAAC,eAAe,aAC3B,OAAO,CAAC,aAAa,CAAC,IAAI,CACzB,cAAK,SAAS,EAAC,yBAAyB,YAAE,aAAa,GAAO,CAC/D,EACA,OAAO,CAAC,QAAQ,CAAC,IAAI,CACpB,eAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,CACpD,EACA,SAAS,IAAI,CACZ,KAAC,aAAa,IAAC,cAAc,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,GAAI,CAC9D,EACA,OAAO,CAAC,cAAc,CAAC,IAAI,CAC1B,cAAK,SAAS,EAAC,0BAA0B,YAAE,cAAc,GAAO,CACjE,IACG,IACI,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { ButtonSpinner } from '../_common/ButtonSpinner';\nimport {\n type HtmlAttributes,\n type PolymorphicCommonProps,\n} from '../_common/types';\n\n/**\n *\n * Types\n *\n */\n\ntype ButtonTypes = 'submit' | 'button' | 'reset';\nexport type ButtonSizes = 'small' | 'medium' | 'large';\nexport type ButtonVariants = 'primary' | 'danger' | 'neutral';\n\nexport type CommonButtonProps = {\n children?: React.ReactNode;\n /** Icon to display before the button content */\n leadingVisual?: React.ReactNode;\n /** Icon to display after the button content */\n trailingVisual?: React.ReactNode;\n /** If the button is doing something Async, it will display a loading spinner */\n isLoading?: boolean;\n /** If the button is in disabled state */\n isDisabled?: boolean;\n /** If the button is fluid, it will take the full width of its container */\n isFluid?: boolean;\n /** Type of button */\n type?: ButtonTypes;\n /** Size of button */\n size?: ButtonSizes;\n /** onClick callback */\n onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** onKeyDown callback */\n onKeyDown?: (event: React.KeyboardEvent<HTMLButtonElement>) => void;\n /** Accessible message for screen readers when the button is in a loading state */\n loadingMessage?: string;\n} /**\n * If `as=\"a\"`, `href` is required and `target` is available.\n * For all other elements, these props are not present.\n */ & (\n | {\n as: 'a';\n /** The URL to link to. Only applies when `as=\"a\"` */\n href?: HtmlAttributes<'a'>['href'];\n /**\n * The target window for the link. Only applies when `as=\"a\"`.\n * Not present or required for other element types.\n */\n target?: HtmlAttributes<'a'>['target'];\n }\n | {\n as?: React.ElementType;\n }\n);\n\ntype ButtonBaseProps = CommonButtonProps & {\n /** If the button is in floating state */\n isFloating?: boolean;\n /** variant of the button */\n variant?: ButtonVariants;\n /** fill of the button */\n buttonFill?: 'filled' | 'outlined' | 'text';\n};\n\nexport const ButtonBase = <T extends React.ElementType = 'button'>({\n as,\n buttonFill = 'filled',\n children,\n className,\n variant = 'primary',\n htmlAttributes,\n isDisabled = false,\n isFloating = false,\n isFluid = false,\n isLoading = false,\n leadingVisual,\n trailingVisual,\n onClick,\n ref,\n size = 'medium',\n style,\n type = 'button',\n loadingMessage = 'Loading',\n ...restProps\n}: PolymorphicCommonProps<T, ButtonBaseProps>) => {\n const Component: React.ElementType = as ?? 'button';\n const isInteractable = !isDisabled && !isLoading;\n\n const classes = classNames(className, 'ndl-btn', {\n 'ndl-disabled': isDisabled,\n 'ndl-floating': isFloating,\n 'ndl-fluid': isFluid,\n 'ndl-loading': isLoading,\n [`ndl-${size}`]: size,\n [`ndl-${buttonFill}-button`]: buttonFill,\n [`ndl-${variant}`]: variant,\n });\n\n const handleClick = (\n event: React.MouseEvent<HTMLButtonElement, MouseEvent>,\n ) => {\n if (!isInteractable) {\n // By default, a <button /> element with disabled set to true will not get its\n // on click handler called. To support the same behavior on <a /> tags we\n // swallow the event here when disabled, since the <a /> tag with disabled set to\n // true will have its onClick handler called\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <Component\n type={type}\n onClick={handleClick}\n disabled={isDisabled}\n aria-disabled={!isInteractable}\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-btn-inner\">\n {Boolean(leadingVisual) && (\n <div className=\"ndl-btn-leading-element\">{leadingVisual}</div>\n )}\n {Boolean(children) && (\n <span className=\"ndl-btn-content\">{children}</span>\n )}\n {isLoading && (\n <ButtonSpinner loadingMessage={loadingMessage} size={size} />\n )}\n {Boolean(trailingVisual) && (\n <div className=\"ndl-btn-trailing-element\">{trailingVisual}</div>\n )}\n </div>\n </Component>\n );\n};\n"]}
@@ -21,9 +21,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton } from '@neo4j-ndl/react';
24
- import { PanelLeftCollapseIcon } from '@neo4j-ndl/react/icons';
24
+ import { PanelLeftCollapseOutlineIcon } from '@neo4j-ndl/react/icons';
25
25
  const Component = () => {
26
- return (_jsx(FilledButton, { leadingVisual: _jsx(PanelLeftCollapseIcon, {}), children: "Download" }));
26
+ return (_jsx(FilledButton, { leadingVisual: _jsx(PanelLeftCollapseOutlineIcon, {}), children: "Download" }));
27
27
  };
28
28
  export default Component;
29
29
  //# sourceMappingURL=button-leading-icon.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-leading-icon.story.js","sourceRoot":"","sources":["../../../../src/button/stories/button-leading-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAE/D,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,YAAY,IAAC,aAAa,EAAE,KAAC,qBAAqB,KAAG,yBAEvC,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { PanelLeftCollapseIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FilledButton leadingVisual={<PanelLeftCollapseIcon />}>\n Download\n </FilledButton>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"button-leading-icon.story.js","sourceRoot":"","sources":["../../../../src/button/stories/button-leading-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAEtE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,YAAY,IAAC,aAAa,EAAE,KAAC,4BAA4B,KAAG,yBAE9C,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { PanelLeftCollapseOutlineIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FilledButton leadingVisual={<PanelLeftCollapseOutlineIcon />}>\n Download\n </FilledButton>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*!
3
+ *
4
+ * Copyright (c) "Neo4j"
5
+ * Neo4j Sweden AB [http://neo4j.com]
6
+ *
7
+ * This file is part of Neo4j.
8
+ *
9
+ * Neo4j is free software: you can redistribute it and/or modify
10
+ * it under the terms of the GNU General Public License as published by
11
+ * the Free Software Foundation, either version 3 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU General Public License
20
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+ */
22
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
+ import { FilledButton } from '@neo4j-ndl/react';
24
+ import { PanelRightCollapseOutlineIcon } from '@neo4j-ndl/react/icons';
25
+ const Component = () => {
26
+ return (_jsx(FilledButton, { trailingVisual: _jsx(PanelRightCollapseOutlineIcon, {}), children: "Download" }));
27
+ };
28
+ export default Component;
29
+ //# sourceMappingURL=button-trailing-icon.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-trailing-icon.story.js","sourceRoot":"","sources":["../../../../src/button/stories/button-trailing-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,YAAY,IAAC,cAAc,EAAE,KAAC,6BAA6B,KAAG,yBAEhD,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { FilledButton } from '@neo4j-ndl/react';\nimport { PanelRightCollapseOutlineIcon } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <FilledButton trailingVisual={<PanelRightCollapseOutlineIcon />}>\n Download\n </FilledButton>\n );\n};\n\nexport default Component;\n"]}
@@ -20,6 +20,7 @@
20
20
  */
21
21
  export { default as ButtonSizes } from './button-sizes.story';
22
22
  export { default as ButtonLeadingIcon } from './button-leading-icon.story';
23
+ export { default as ButtonTrailingIcon } from './button-trailing-icon.story';
23
24
  export { default as ButtonFluid } from './button-fluid.story';
24
25
  export { default as ButtonVariants } from './button-variants.story';
25
26
  export { default as ButtonLoading } from './button-loading.story';
@@ -34,9 +35,11 @@ import ButtonLeadingIconSrcRaw from './button-leading-icon.story?raw';
34
35
  import ButtonLoadingSrcRaw from './button-loading.story?raw';
35
36
  import ButtonRunningCancelSrcRaw from './button-running-cancel.story?raw';
36
37
  import ButtonSizesSrcRaw from './button-sizes.story?raw';
38
+ import ButtonTrailingIconSrcRaw from './button-trailing-icon.story?raw';
37
39
  import ButtonVariantsSrcRaw from './button-variants.story?raw';
38
40
  export const ButtonSizesSrc = removeLicenseHeader(ButtonSizesSrcRaw);
39
41
  export const ButtonLeadingIconSrc = removeLicenseHeader(ButtonLeadingIconSrcRaw);
42
+ export const ButtonTrailingIconSrc = removeLicenseHeader(ButtonTrailingIconSrcRaw);
40
43
  export const ButtonFluidSrc = removeLicenseHeader(ButtonFluidSrcRaw);
41
44
  export const ButtonVariantsSrc = removeLicenseHeader(ButtonVariantsSrcRaw);
42
45
  export const ButtonLoadingSrc = removeLicenseHeader(ButtonLoadingSrcRaw);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":"AA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AC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ButtonSizes } from './button-sizes.story';\nexport { default as ButtonLeadingIcon } from './button-leading-icon.story';\nexport { default as ButtonFluid } from './button-fluid.story';\nexport { default as ButtonVariants } from './button-variants.story';\nexport { default as ButtonLoading } from './button-loading.story';\nexport { default as ButtonDisabled } from './button-disabled.story';\nexport { default as ButtonFloating } from './button-floating.story';\nexport { default as ButtonRunningCancel } from './button-running-cancel.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport ButtonDisabledSrcRaw from './button-disabled.story?raw';\nimport ButtonFloatingSrcRaw from './button-floating.story?raw';\nimport ButtonFluidSrcRaw from './button-fluid.story?raw';\nimport ButtonLeadingIconSrcRaw from './button-leading-icon.story?raw';\nimport ButtonLoadingSrcRaw from './button-loading.story?raw';\nimport ButtonRunningCancelSrcRaw from './button-running-cancel.story?raw';\nimport ButtonSizesSrcRaw from './button-sizes.story?raw';\nimport ButtonVariantsSrcRaw from './button-variants.story?raw';\n\nexport const ButtonSizesSrc = removeLicenseHeader(ButtonSizesSrcRaw);\nexport const ButtonLeadingIconSrc = removeLicenseHeader(\n ButtonLeadingIconSrcRaw,\n);\nexport const ButtonFluidSrc = removeLicenseHeader(ButtonFluidSrcRaw);\nexport const ButtonVariantsSrc = removeLicenseHeader(ButtonVariantsSrcRaw);\nexport const ButtonLoadingSrc = removeLicenseHeader(ButtonLoadingSrcRaw);\nexport const ButtonDisabledSrc = removeLicenseHeader(ButtonDisabledSrcRaw);\nexport const ButtonFloatingSrc = removeLicenseHeader(ButtonFloatingSrcRaw);\nexport const ButtonRunningCancelSrc = removeLicenseHeader(\n ButtonRunningCancelSrcRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,oBAAoB,MAAM,6BAA6B,CAAC;AAC/D,OAAO,oBAAoB,MAAM,6BAA6B,CAAC;AAC/D,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,uBAAuB,MAAM,iCAAiC,CAAC;AACtE,OAAO,mBAAmB,MAAM,4BAA4B,CAAC;AAC7D,OAAO,yBAAyB,MAAM,mCAAmC,CAAC;AAC1E,OAAO,iBAAiB,MAAM,0BAA0B,CAAC;AACzD,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,oBAAoB,MAAM,6BAA6B,CAAC;AAE/D,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAAC,iBAAiB,CAAC,CAAC;AACrE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,mBAAmB,CAAC,CAAC;AACzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ButtonSizes } from './button-sizes.story';\nexport { default as ButtonLeadingIcon } from './button-leading-icon.story';\nexport { default as ButtonTrailingIcon } from './button-trailing-icon.story';\nexport { default as ButtonFluid } from './button-fluid.story';\nexport { default as ButtonVariants } from './button-variants.story';\nexport { default as ButtonLoading } from './button-loading.story';\nexport { default as ButtonDisabled } from './button-disabled.story';\nexport { default as ButtonFloating } from './button-floating.story';\nexport { default as ButtonRunningCancel } from './button-running-cancel.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport ButtonDisabledSrcRaw from './button-disabled.story?raw';\nimport ButtonFloatingSrcRaw from './button-floating.story?raw';\nimport ButtonFluidSrcRaw from './button-fluid.story?raw';\nimport ButtonLeadingIconSrcRaw from './button-leading-icon.story?raw';\nimport ButtonLoadingSrcRaw from './button-loading.story?raw';\nimport ButtonRunningCancelSrcRaw from './button-running-cancel.story?raw';\nimport ButtonSizesSrcRaw from './button-sizes.story?raw';\nimport ButtonTrailingIconSrcRaw from './button-trailing-icon.story?raw';\nimport ButtonVariantsSrcRaw from './button-variants.story?raw';\n\nexport const ButtonSizesSrc = removeLicenseHeader(ButtonSizesSrcRaw);\nexport const ButtonLeadingIconSrc = removeLicenseHeader(\n ButtonLeadingIconSrcRaw,\n);\nexport const ButtonTrailingIconSrc = removeLicenseHeader(\n ButtonTrailingIconSrcRaw,\n);\nexport const ButtonFluidSrc = removeLicenseHeader(ButtonFluidSrcRaw);\nexport const ButtonVariantsSrc = removeLicenseHeader(ButtonVariantsSrcRaw);\nexport const ButtonLoadingSrc = removeLicenseHeader(ButtonLoadingSrcRaw);\nexport const ButtonDisabledSrc = removeLicenseHeader(ButtonDisabledSrcRaw);\nexport const ButtonFloatingSrc = removeLicenseHeader(ButtonFloatingSrcRaw);\nexport const ButtonRunningCancelSrc = removeLicenseHeader(\n ButtonRunningCancelSrcRaw,\n);\n"]}
@@ -33,6 +33,8 @@ export type CommonButtonProps = {
33
33
  children?: React.ReactNode;
34
34
  /** Icon to display before the button content */
35
35
  leadingVisual?: React.ReactNode;
36
+ /** Icon to display after the button content */
37
+ trailingVisual?: React.ReactNode;
36
38
  /** If the button is doing something Async, it will display a loading spinner */
37
39
  isLoading?: boolean;
38
40
  /** If the button is in disabled state */
@@ -72,6 +74,6 @@ type ButtonBaseProps = CommonButtonProps & {
72
74
  /** fill of the button */
73
75
  buttonFill?: 'filled' | 'outlined' | 'text';
74
76
  };
75
- export declare const ButtonBase: <T extends React.ElementType = "button">({ as, buttonFill, children, className, variant, htmlAttributes, isDisabled, isFloating, isFluid, isLoading, leadingVisual, onClick, ref, size, style, type, loadingMessage, ...restProps }: PolymorphicCommonProps<T, ButtonBaseProps>) => import("react/jsx-runtime").JSX.Element;
77
+ export declare const ButtonBase: <T extends React.ElementType = "button">({ as, buttonFill, children, className, variant, htmlAttributes, isDisabled, isFloating, isFluid, isLoading, leadingVisual, trailingVisual, onClick, ref, size, style, type, loadingMessage, ...restProps }: PolymorphicCommonProps<T, ButtonBaseProps>) => import("react/jsx-runtime").JSX.Element;
76
78
  export {};
77
79
  //# sourceMappingURL=ButtonBase.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ButtonBase.d.ts","sourceRoot":"","sources":["../../../src/button/ButtonBase.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,sBAAsB,EAC5B,MAAM,kBAAkB,CAAC;AAE1B;;;;GAIG;AAEH,KAAK,WAAW,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AACvD,MAAM,MAAM,cAAc,GAAG,SAAS,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AK,EAAE,KAAK,CAAC,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACpE,kFAAkF;IAClF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;;;GAGC,GAAG,CACF;IACE,EAAE,EAAE,GAAG,CAAC;IACR,qDAAqD;IACrD,IAAI,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;IACnC;;;OAGG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;CACxC,GACD;IACE,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CACJ,CAAC;AAEF,KAAK,eAAe,GAAG,iBAAiB,GAAG;IACzC,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,yBAAyB;IACzB,UAAU,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAAE,4MAoBhE,sBAAsB,CAAC,CAAC,EAAE,eAAe,CAAC,4CA4D5C,CAAC"}
@@ -0,0 +1,24 @@
1
+ /*!
2
+ *
3
+ * Copyright (c) "Neo4j"
4
+ * Neo4j Sweden AB [http://neo4j.com]
5
+ *
6
+ * This file is part of Neo4j.
7
+ *
8
+ * Neo4j is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU General Public License as published by
10
+ * the Free Software Foundation, either version 3 of the License, or
11
+ * (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU General Public License
19
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
+ */
21
+ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
22
+ declare const Component: () => import("react/jsx-runtime").JSX.Element;
23
+ export default Component;
24
+ //# sourceMappingURL=button-trailing-icon.story.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-trailing-icon.story.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/button-trailing-icon.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CAMd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -20,6 +20,7 @@
20
20
  */
21
21
  export { default as ButtonSizes } from './button-sizes.story';
22
22
  export { default as ButtonLeadingIcon } from './button-leading-icon.story';
23
+ export { default as ButtonTrailingIcon } from './button-trailing-icon.story';
23
24
  export { default as ButtonFluid } from './button-fluid.story';
24
25
  export { default as ButtonVariants } from './button-variants.story';
25
26
  export { default as ButtonLoading } from './button-loading.story';
@@ -28,6 +29,7 @@ export { default as ButtonFloating } from './button-floating.story';
28
29
  export { default as ButtonRunningCancel } from './button-running-cancel.story';
29
30
  export declare const ButtonSizesSrc: string;
30
31
  export declare const ButtonLeadingIconSrc: string;
32
+ export declare const ButtonTrailingIconSrc: string;
31
33
  export declare const ButtonFluidSrc: string;
32
34
  export declare const ButtonVariantsSrc: string;
33
35
  export declare const ButtonLoadingSrc: string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/button/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,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B,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAa/E,eAAO,MAAM,cAAc,QAAyC,CAAC;AACrE,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,cAAc,QAAyC,CAAC;AACrE,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,gBAAgB,QAA2C,CAAC;AACzE,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,sBAAsB,QAElC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "5.4.1",
3
+ "version": "5.4.3",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -429,7 +429,7 @@
429
429
  "@tanstack/react-table": "8.21.3",
430
430
  "react": ">=19.0.0",
431
431
  "react-dom": ">=19.0.0",
432
- "@neo4j-ndl/base": "^5.1.7"
432
+ "@neo4j-ndl/base": "^5.1.8"
433
433
  },
434
434
  "dependencies": {
435
435
  "@dnd-kit/core": "6.3.1",
@@ -2,7 +2,7 @@
2
2
  name: ndl-react
3
3
  metadata:
4
4
  package: '@neo4j-ndl/react'
5
- version: '5.4.1'
5
+ version: '5.4.3'
6
6
  description: >-
7
7
  Build and edit UI with the Neo4j Needle React design system
8
8
  (@neo4j-ndl/react). Use when adding, composing, or modifying Needle components
@@ -15,7 +15,7 @@ description: >-
15
15
 
16
16
  # Neo4j Needle (@neo4j-ndl/react)
17
17
 
18
- > 📌 Shipped with `@neo4j-ndl/react` v5.4.1. Once installed into your repo (e.g. via
18
+ > 📌 Shipped with `@neo4j-ndl/react` v5.4.3. Once installed into your repo (e.g. via
19
19
  > `npx skills add`) this folder is detached from the package — the installed
20
20
  > package (TypeScript types in `node_modules/@neo4j-ndl/react`) is the source of
21
21
  > truth.
@@ -24,5 +24,6 @@ Import: `import { FilledButton } from '@neo4j-ndl/react'`
24
24
  | `ref` | `any` | | | A ref to apply to the root element. |
25
25
  | `size` | `'large' \| 'medium' \| 'small'` | | `medium` | Size of button |
26
26
  | `target` | `HTMLAttributeAnchorTarget` | | | The target window for the link. Only applies when `as="a"`. Not present or required for other element types. |
27
+ | `trailingVisual` | `ReactNode` | | | Icon to display after the button content |
27
28
  | `type` | `'button' \| 'reset' \| 'submit'` | | `button` | Type of button |
28
29
  | `variant` | `'danger' \| 'primary'` | | `primary` | Variant of the button |
@@ -24,5 +24,6 @@ Import: `import { OutlinedButton } from '@neo4j-ndl/react'`
24
24
  | `ref` | `any` | | | A ref to apply to the root element. |
25
25
  | `size` | `'large' \| 'medium' \| 'small'` | | `medium` | Size of button |
26
26
  | `target` | `HTMLAttributeAnchorTarget` | | | The target window for the link. Only applies when `as="a"`. Not present or required for other element types. |
27
+ | `trailingVisual` | `ReactNode` | | | Icon to display after the button content |
27
28
  | `type` | `'button' \| 'reset' \| 'submit'` | | `button` | Type of button |
28
29
  | `variant` | `'danger' \| 'neutral' \| 'primary'` | | `primary` | Variant of the button |
@@ -23,5 +23,6 @@ Import: `import { TextButton } from '@neo4j-ndl/react'`
23
23
  | `ref` | `any` | | | A ref to apply to the root element. |
24
24
  | `size` | `'large' \| 'medium' \| 'small'` | | `medium` | Size of button |
25
25
  | `target` | `HTMLAttributeAnchorTarget` | | | The target window for the link. Only applies when `as="a"`. Not present or required for other element types. |
26
+ | `trailingVisual` | `ReactNode` | | | Icon to display after the button content |
26
27
  | `type` | `'button' \| 'reset' \| 'submit'` | | `button` | Type of button |
27
28
  | `variant` | `'danger' \| 'neutral' \| 'primary'` | | `primary` | Variant of the button |