@neo4j-ndl/react 5.3.1 → 5.3.2

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/ai/presence/stories/ai-presence-thinking.story.js +0 -1
  2. package/lib/cjs/ai/presence/stories/ai-presence-thinking.story.js.map +1 -1
  3. package/lib/cjs/code/Code.js +2 -1
  4. package/lib/cjs/code/Code.js.map +1 -1
  5. package/lib/cjs/loading-bar/LoadingBar.js +2 -2
  6. package/lib/cjs/loading-bar/LoadingBar.js.map +1 -1
  7. package/lib/cjs/loading-spinner/LoadingSpinner.js +2 -2
  8. package/lib/cjs/loading-spinner/LoadingSpinner.js.map +1 -1
  9. package/lib/esm/ai/presence/stories/ai-presence-thinking.story.js +0 -1
  10. package/lib/esm/ai/presence/stories/ai-presence-thinking.story.js.map +1 -1
  11. package/lib/esm/code/Code.js +2 -1
  12. package/lib/esm/code/Code.js.map +1 -1
  13. package/lib/esm/loading-bar/LoadingBar.js +2 -2
  14. package/lib/esm/loading-bar/LoadingBar.js.map +1 -1
  15. package/lib/esm/loading-spinner/LoadingSpinner.js +2 -2
  16. package/lib/esm/loading-spinner/LoadingSpinner.js.map +1 -1
  17. package/lib/types/ai/presence/stories/ai-presence-thinking.story.d.ts.map +1 -1
  18. package/lib/types/code/Code.d.ts.map +1 -1
  19. package/lib/types/loading-bar/LoadingBar.d.ts +4 -1
  20. package/lib/types/loading-bar/LoadingBar.d.ts.map +1 -1
  21. package/lib/types/loading-spinner/LoadingSpinner.d.ts +8 -1
  22. package/lib/types/loading-spinner/LoadingSpinner.d.ts.map +1 -1
  23. package/package.json +5 -5
  24. package/skills/ndl-react/SKILL.md +3 -3
  25. package/skills/ndl-react/components/ai/presence.md +0 -1
  26. package/skills/ndl-react/components/loading-bar.md +18 -1
  27. package/skills/ndl-react/components/loading-spinner.md +12 -2
@@ -23,7 +23,6 @@ const jsx_runtime_1 = require("react/jsx-runtime");
23
23
  */
24
24
  require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
25
25
  const ai_1 = require("@neo4j-ndl/react/ai");
26
- // TODO: consider this story when happo is ready
27
26
  const Component = () => {
28
27
  return (0, jsx_runtime_1.jsx)(ai_1.Presence, { isThinking: true, className: "size-token-32" });
29
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ai-presence-thinking.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA+C;AAE/C,gDAAgD;AAChD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,uBAAC,aAAQ,IAAC,UAAU,QAAC,SAAS,EAAC,eAAe,GAAG,CAAC;AAC3D,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 { Presence } from '@neo4j-ndl/react/ai';\n\n// TODO: consider this story when happo is ready\nconst Component = () => {\n return <Presence isThinking className=\"size-token-32\" />;\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"ai-presence-thinking.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA+C;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,uBAAC,aAAQ,IAAC,UAAU,QAAC,SAAS,EAAC,eAAe,GAAG,CAAC;AAC3D,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 { Presence } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Presence isThinking className=\"size-token-32\" />;\n};\n\nexport default Component;\n"]}
@@ -42,6 +42,7 @@ const tooltip_1 = require("../tooltip");
42
42
  const Code = (_a) => {
43
43
  var { children, className, isDisabled = false, style, isRunnable = false, description, onClick, as, ref, htmlAttributes } = _a, restProps = __rest(_a, ["children", "className", "isDisabled", "style", "isRunnable", "description", "onClick", "as", "ref", "htmlAttributes"]);
44
44
  const Component = as !== null && as !== void 0 ? as : (onClick ? 'button' : 'span');
45
+ const isButton = Component === 'button';
45
46
  const classes = (0, classnames_1.default)('ndl-code', {
46
47
  'ndl-disabled': isDisabled,
47
48
  'ndl-runnable': isRunnable,
@@ -53,7 +54,7 @@ const Code = (_a) => {
53
54
  }
54
55
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
55
56
  };
56
- return ((0, jsx_runtime_1.jsx)(conditional_wrap_1.ConditionalWrap, { shouldWrap: Boolean(description) === true, wrap: (children) => ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { type: "simple", children: [(0, jsx_runtime_1.jsx)(tooltip_1.Tooltip.Trigger, { hasButtonWrapper: Component === 'button', children: children }), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip.Content, { children: description })] })), children: (0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, style: style, onClick: handleClick, disabled: isDisabled, ref: ref }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsx)("code", { children: children }) })) }));
57
+ return ((0, jsx_runtime_1.jsx)(conditional_wrap_1.ConditionalWrap, { shouldWrap: Boolean(description) === true, wrap: (children) => ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { type: "simple", children: [(0, jsx_runtime_1.jsx)(tooltip_1.Tooltip.Trigger, { hasButtonWrapper: Component === 'button', children: children }), (0, jsx_runtime_1.jsx)(tooltip_1.Tooltip.Content, { children: description })] })), children: (0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, style: style, onClick: handleClick, disabled: isButton ? isDisabled : undefined, "aria-disabled": !isButton && isDisabled ? true : undefined, ref: ref }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsx)("code", { children: children }) })) }));
57
58
  };
58
59
  exports.Code = Code;
59
60
  //# sourceMappingURL=Code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AAGpC,0DAAsD;AACtD,wCAAqC;AAmB9B,MAAM,IAAI,GAAG,CAAyC,EAYtB,EAAE,EAAE;QAZkB,EAC3D,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,OAAO,EACP,EAAE,EACF,GAAG,EACH,cAAc,OAEuB,EADlC,SAAS,cAX+C,uHAY5D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,UAAU,EACV;QACE,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;KAC3B,EACD,SAAS,CACV,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,KAAgD,EAAE,EAAE;QACvE,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,kCAAe,IACd,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,EACzC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,wBAAC,iBAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,uBAAC,iBAAO,CAAC,OAAO,IAAC,gBAAgB,EAAE,SAAS,KAAK,QAAQ,YACtD,QAAQ,GACO,EAClB,uBAAC,iBAAO,CAAC,OAAO,cAAE,WAAW,GAAmB,IACxC,CACX,YAED,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,EACpB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,2CAAO,QAAQ,GAAQ,IACb,GACI,CACnB,CAAC;AACJ,CAAC,CAAC;AA1DW,QAAA,IAAI,QA0Df","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 classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Tooltip } from '../tooltip';\n\ntype CodeProps = {\n /** The content of the code */\n children?: React.ReactNode;\n /** Whether the code is disabled */\n isDisabled?: boolean;\n /** Whether the code is runnable */\n isRunnable?: boolean;\n /** The description of the code, will be displayed in a tooltip */\n description?: string;\n /** The callback function triggered when the inline code is clicked */\n onClick?: (\n event:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\nexport const Code = <T extends React.ElementType = 'button'>({\n children,\n className,\n isDisabled = false,\n style,\n isRunnable = false,\n description,\n onClick,\n as,\n ref,\n htmlAttributes,\n ...restProps\n}: PolymorphicCommonProps<T, CodeProps>) => {\n const Component: React.ElementType = as ?? (onClick ? 'button' : 'span');\n\n const classes = classNames(\n 'ndl-code',\n {\n 'ndl-disabled': isDisabled,\n 'ndl-runnable': isRunnable,\n },\n className,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <ConditionalWrap\n shouldWrap={Boolean(description) === true}\n wrap={(children) => (\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper={Component === 'button'}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content>{description}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Component\n className={classes}\n style={style}\n onClick={handleClick}\n disabled={isDisabled}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <code>{children}</code>\n </Component>\n </ConditionalWrap>\n );\n};\n"]}
1
+ {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4DAAoC;AAGpC,0DAAsD;AACtD,wCAAqC;AAmB9B,MAAM,IAAI,GAAG,CAAyC,EAYtB,EAAE,EAAE;QAZkB,EAC3D,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,OAAO,EACP,EAAE,EACF,GAAG,EACH,cAAc,OAEuB,EADlC,SAAS,cAX+C,uHAY5D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,QAAQ,GAAG,SAAS,KAAK,QAAQ,CAAC;IAExC,MAAM,OAAO,GAAG,IAAA,oBAAU,EACxB,UAAU,EACV;QACE,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;KAC3B,EACD,SAAS,CACV,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,KAAgD,EAAE,EAAE;QACvE,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,uBAAC,kCAAe,IACd,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,EACzC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,wBAAC,iBAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,uBAAC,iBAAO,CAAC,OAAO,IAAC,gBAAgB,EAAE,SAAS,KAAK,QAAQ,YACtD,QAAQ,GACO,EAClB,uBAAC,iBAAO,CAAC,OAAO,cAAE,WAAW,GAAmB,IACxC,CACX,YAED,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,mBAC5B,CAAC,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACzD,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,2CAAO,QAAQ,GAAQ,IACb,GACI,CACnB,CAAC;AACJ,CAAC,CAAC;AA7DW,QAAA,IAAI,QA6Df","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 classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Tooltip } from '../tooltip';\n\ntype CodeProps = {\n /** The content of the code */\n children?: React.ReactNode;\n /** Whether the code is disabled */\n isDisabled?: boolean;\n /** Whether the code is runnable */\n isRunnable?: boolean;\n /** The description of the code, will be displayed in a tooltip */\n description?: string;\n /** The callback function triggered when the inline code is clicked */\n onClick?: (\n event:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\nexport const Code = <T extends React.ElementType = 'button'>({\n children,\n className,\n isDisabled = false,\n style,\n isRunnable = false,\n description,\n onClick,\n as,\n ref,\n htmlAttributes,\n ...restProps\n}: PolymorphicCommonProps<T, CodeProps>) => {\n const Component: React.ElementType = as ?? (onClick ? 'button' : 'span');\n\n const isButton = Component === 'button';\n\n const classes = classNames(\n 'ndl-code',\n {\n 'ndl-disabled': isDisabled,\n 'ndl-runnable': isRunnable,\n },\n className,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <ConditionalWrap\n shouldWrap={Boolean(description) === true}\n wrap={(children) => (\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper={Component === 'button'}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content>{description}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Component\n className={classes}\n style={style}\n onClick={handleClick}\n disabled={isButton ? isDisabled : undefined}\n aria-disabled={!isButton && isDisabled ? true : undefined}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <code>{children}</code>\n </Component>\n </ConditionalWrap>\n );\n};\n"]}
@@ -38,12 +38,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
38
38
  */
39
39
  const classnames_1 = __importDefault(require("classnames"));
40
40
  const LoadingBar = (_a) => {
41
- var { as, hasRail = false, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "hasRail", "className", "htmlAttributes", "style", "ref"]);
41
+ var { as, hasRail = false, loadingMessage = 'Loading', className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "hasRail", "loadingMessage", "className", "htmlAttributes", "style", "ref"]);
42
42
  const Component = as !== null && as !== void 0 ? as : 'div';
43
43
  const classes = (0, classnames_1.default)('ndl-loading-bar', className, {
44
44
  'ndl-loading-bar-rail': hasRail,
45
45
  });
46
- return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, restProps, htmlAttributes)));
46
+ return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsx)("span", { className: "ndl-loading-bar-text", children: loadingMessage }) })));
47
47
  };
48
48
  exports.LoadingBar = LoadingBar;
49
49
  //# sourceMappingURL=LoadingBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAS7B,MAAM,UAAU,GAAG,CAAsC,EAQnB,EAAE,EAAE;QARe,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEwC,EADxC,SAAS,cAPkD,gEAQ/D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,EAClB,CACH,CAAC;AACJ,CAAC,CAAC;AAxBW,QAAA,UAAU,cAwBrB","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 { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAY7B,MAAM,UAAU,GAAG,CAAsC,EASnB,EAAE,EAAE;QATe,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,cAAc,GAAG,SAAS,EAC1B,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEwC,EADxC,SAAS,cARkD,kFAS/D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAElB,iCAAM,SAAS,EAAC,sBAAsB,YAAE,cAAc,GAAQ,IACpD,CACb,CAAC;AACJ,CAAC,CAAC;AA3BW,QAAA,UAAU,cA2BrB","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 { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n /** Visually hidden message for screen readers, for example \"Loading search results\". */\n loadingMessage?: string;\n /** Whether the loading bar has a background rail */\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n loadingMessage = 'Loading',\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <span className=\"ndl-loading-bar-text\">{loadingMessage}</span>\n </Component>\n );\n};\n"]}
@@ -45,14 +45,14 @@ const classnames_1 = __importDefault(require("classnames"));
45
45
  *
46
46
  */
47
47
  const LoadingSpinner = (_a) => {
48
- var { as, size = 'small', className, htmlAttributes, ref } = _a, restProps = __rest(_a, ["as", "size", "className", "htmlAttributes", "ref"]);
48
+ var { as, loadingMessage = 'Loading content', size = 'small', className, htmlAttributes, ref } = _a, restProps = __rest(_a, ["as", "loadingMessage", "size", "className", "htmlAttributes", "ref"]);
49
49
  const Component = as || 'div';
50
50
  const classes = (0, classnames_1.default)('ndl-spin-wrapper', className, {
51
51
  'ndl-large': size === 'large',
52
52
  'ndl-medium': size === 'medium',
53
53
  'ndl-small': size === 'small',
54
54
  });
55
- return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: ref }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsx)("div", { className: "ndl-spin" }) })));
55
+ return ((0, jsx_runtime_1.jsx)(Component, Object.assign({ className: classes, role: "status", "aria-label": loadingMessage, "aria-live": "polite", ref: ref }, restProps, htmlAttributes, { children: (0, jsx_runtime_1.jsx)("div", { className: "ndl-spin" }) })));
56
56
  };
57
57
  exports.LoadingSpinner = LoadingSpinner;
58
58
  //# sourceMappingURL=LoadingSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAiBpC;;;;;;GAMG;AAEI,MAAM,cAAc,GAAG,CAAsC,EAOnB,EAAE,EAAE;QAPe,EAClE,EAAE,EACF,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cANsD,oDAOnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,eAClB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,gCAAK,SAAS,EAAC,UAAU,GAAG,IAClB,CACb,CAAC;AACJ,CAAC,CAAC;AA5BW,QAAA,cAAc,kBA4BzB","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 { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label=\"Loading content\"\n aria-live=\"polite\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAyBpC;;;;;;GAMG;AAEI,MAAM,cAAc,GAAG,CAAsC,EAQnB,EAAE,EAAE;QARe,EAClE,EAAE,EACF,cAAc,GAAG,iBAAiB,EAClC,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cAPsD,sEAQnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACD,cAAc,eAChB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,gCAAK,SAAS,EAAC,UAAU,GAAG,IAClB,CACb,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,cAAc,kBA6BzB","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 { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n // TODO v6: Change default text to \"Loading\" and implement as a hidden text element instead of aria-label\n /**\n * The aria label for the loading spinner. If not provided, defaults to \"Loading content\".\n */\n loadingMessage?: string;\n /**\n * The size of the loading spinner.\n */\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n loadingMessage = 'Loading content',\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label={loadingMessage}\n aria-live=\"polite\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
@@ -21,7 +21,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { Presence } from '@neo4j-ndl/react/ai';
24
- // TODO: consider this story when happo is ready
25
24
  const Component = () => {
26
25
  return _jsx(Presence, { isThinking: true, className: "size-token-32" });
27
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ai-presence-thinking.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,gDAAgD;AAChD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,UAAU,QAAC,SAAS,EAAC,eAAe,GAAG,CAAC;AAC3D,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 { Presence } from '@neo4j-ndl/react/ai';\n\n// TODO: consider this story when happo is ready\nconst Component = () => {\n return <Presence isThinking className=\"size-token-32\" />;\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"ai-presence-thinking.story.js","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,KAAC,QAAQ,IAAC,UAAU,QAAC,SAAS,EAAC,eAAe,GAAG,CAAC;AAC3D,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 { Presence } from '@neo4j-ndl/react/ai';\n\nconst Component = () => {\n return <Presence isThinking className=\"size-token-32\" />;\n};\n\nexport default Component;\n"]}
@@ -36,6 +36,7 @@ import { Tooltip } from '../tooltip';
36
36
  export const Code = (_a) => {
37
37
  var { children, className, isDisabled = false, style, isRunnable = false, description, onClick, as, ref, htmlAttributes } = _a, restProps = __rest(_a, ["children", "className", "isDisabled", "style", "isRunnable", "description", "onClick", "as", "ref", "htmlAttributes"]);
38
38
  const Component = as !== null && as !== void 0 ? as : (onClick ? 'button' : 'span');
39
+ const isButton = Component === 'button';
39
40
  const classes = classNames('ndl-code', {
40
41
  'ndl-disabled': isDisabled,
41
42
  'ndl-runnable': isRunnable,
@@ -47,6 +48,6 @@ export const Code = (_a) => {
47
48
  }
48
49
  onClick === null || onClick === void 0 ? void 0 : onClick(event);
49
50
  };
50
- return (_jsx(ConditionalWrap, { shouldWrap: Boolean(description) === true, wrap: (children) => (_jsxs(Tooltip, { type: "simple", children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: Component === 'button', children: children }), _jsx(Tooltip.Content, { children: description })] })), children: _jsx(Component, Object.assign({ className: classes, style: style, onClick: handleClick, disabled: isDisabled, ref: ref }, restProps, htmlAttributes, { children: _jsx("code", { children: children }) })) }));
51
+ return (_jsx(ConditionalWrap, { shouldWrap: Boolean(description) === true, wrap: (children) => (_jsxs(Tooltip, { type: "simple", children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: Component === 'button', children: children }), _jsx(Tooltip.Content, { children: description })] })), children: _jsx(Component, Object.assign({ className: classes, style: style, onClick: handleClick, disabled: isButton ? isDisabled : undefined, "aria-disabled": !isButton && isDisabled ? true : undefined, ref: ref }, restProps, htmlAttributes, { children: _jsx("code", { children: children }) })) }));
51
52
  };
52
53
  //# sourceMappingURL=Code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAmBrC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAyC,EAYtB,EAAE,EAAE;QAZkB,EAC3D,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,OAAO,EACP,EAAE,EACF,GAAG,EACH,cAAc,OAEuB,EADlC,SAAS,cAX+C,uHAY5D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,OAAO,GAAG,UAAU,CACxB,UAAU,EACV;QACE,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;KAC3B,EACD,SAAS,CACV,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,KAAgD,EAAE,EAAE;QACvE,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,eAAe,IACd,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,EACzC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,EAAE,SAAS,KAAK,QAAQ,YACtD,QAAQ,GACO,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,WAAW,GAAmB,IACxC,CACX,YAED,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,EACpB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,yBAAO,QAAQ,GAAQ,IACb,GACI,CACnB,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 */\n\nimport classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Tooltip } from '../tooltip';\n\ntype CodeProps = {\n /** The content of the code */\n children?: React.ReactNode;\n /** Whether the code is disabled */\n isDisabled?: boolean;\n /** Whether the code is runnable */\n isRunnable?: boolean;\n /** The description of the code, will be displayed in a tooltip */\n description?: string;\n /** The callback function triggered when the inline code is clicked */\n onClick?: (\n event:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\nexport const Code = <T extends React.ElementType = 'button'>({\n children,\n className,\n isDisabled = false,\n style,\n isRunnable = false,\n description,\n onClick,\n as,\n ref,\n htmlAttributes,\n ...restProps\n}: PolymorphicCommonProps<T, CodeProps>) => {\n const Component: React.ElementType = as ?? (onClick ? 'button' : 'span');\n\n const classes = classNames(\n 'ndl-code',\n {\n 'ndl-disabled': isDisabled,\n 'ndl-runnable': isRunnable,\n },\n className,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <ConditionalWrap\n shouldWrap={Boolean(description) === true}\n wrap={(children) => (\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper={Component === 'button'}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content>{description}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Component\n className={classes}\n style={style}\n onClick={handleClick}\n disabled={isDisabled}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <code>{children}</code>\n </Component>\n </ConditionalWrap>\n );\n};\n"]}
1
+ {"version":3,"file":"Code.js","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AAGpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAmBrC,MAAM,CAAC,MAAM,IAAI,GAAG,CAAyC,EAYtB,EAAE,EAAE;QAZkB,EAC3D,QAAQ,EACR,SAAS,EACT,UAAU,GAAG,KAAK,EAClB,KAAK,EACL,UAAU,GAAG,KAAK,EAClB,WAAW,EACX,OAAO,EACP,EAAE,EACF,GAAG,EACH,cAAc,OAEuB,EADlC,SAAS,cAX+C,uHAY5D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAEzE,MAAM,QAAQ,GAAG,SAAS,KAAK,QAAQ,CAAC;IAExC,MAAM,OAAO,GAAG,UAAU,CACxB,UAAU,EACV;QACE,cAAc,EAAE,UAAU;QAC1B,cAAc,EAAE,UAAU;KAC3B,EACD,SAAS,CACV,CAAC;IAEF,MAAM,WAAW,GAAG,CAAC,KAAgD,EAAE,EAAE;QACvE,IAAI,UAAU,EAAE,CAAC;YACf,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,OAAO;QACT,CAAC;QAED,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAG,KAAK,CAAC,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,eAAe,IACd,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,KAAK,IAAI,EACzC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,EAAE,SAAS,KAAK,QAAQ,YACtD,QAAQ,GACO,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,WAAW,GAAmB,IACxC,CACX,YAED,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,mBAC5B,CAAC,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EACzD,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,yBAAO,QAAQ,GAAQ,IACb,GACI,CACnB,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 */\n\nimport classNames from 'classnames';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Tooltip } from '../tooltip';\n\ntype CodeProps = {\n /** The content of the code */\n children?: React.ReactNode;\n /** Whether the code is disabled */\n isDisabled?: boolean;\n /** Whether the code is runnable */\n isRunnable?: boolean;\n /** The description of the code, will be displayed in a tooltip */\n description?: string;\n /** The callback function triggered when the inline code is clicked */\n onClick?: (\n event:\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.KeyboardEvent<HTMLElement>,\n ) => void;\n};\n\nexport const Code = <T extends React.ElementType = 'button'>({\n children,\n className,\n isDisabled = false,\n style,\n isRunnable = false,\n description,\n onClick,\n as,\n ref,\n htmlAttributes,\n ...restProps\n}: PolymorphicCommonProps<T, CodeProps>) => {\n const Component: React.ElementType = as ?? (onClick ? 'button' : 'span');\n\n const isButton = Component === 'button';\n\n const classes = classNames(\n 'ndl-code',\n {\n 'ndl-disabled': isDisabled,\n 'ndl-runnable': isRunnable,\n },\n className,\n );\n\n const handleClick = (event: React.MouseEvent<HTMLElement, MouseEvent>) => {\n if (isDisabled) {\n event.preventDefault();\n return;\n }\n\n onClick?.(event);\n };\n\n return (\n <ConditionalWrap\n shouldWrap={Boolean(description) === true}\n wrap={(children) => (\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper={Component === 'button'}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content>{description}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Component\n className={classes}\n style={style}\n onClick={handleClick}\n disabled={isButton ? isDisabled : undefined}\n aria-disabled={!isButton && isDisabled ? true : undefined}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <code>{children}</code>\n </Component>\n </ConditionalWrap>\n );\n};\n"]}
@@ -32,11 +32,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
32
32
  */
33
33
  import classNames from 'classnames';
34
34
  export const LoadingBar = (_a) => {
35
- var { as, hasRail = false, className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "hasRail", "className", "htmlAttributes", "style", "ref"]);
35
+ var { as, hasRail = false, loadingMessage = 'Loading', className, htmlAttributes, style, ref } = _a, restProps = __rest(_a, ["as", "hasRail", "loadingMessage", "className", "htmlAttributes", "style", "ref"]);
36
36
  const Component = as !== null && as !== void 0 ? as : 'div';
37
37
  const classes = classNames('ndl-loading-bar', className, {
38
38
  'ndl-loading-bar-rail': hasRail,
39
39
  });
40
- return (_jsx(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, restProps, htmlAttributes)));
40
+ return (_jsx(Component, Object.assign({ className: classes, ref: ref, role: "status", style: style }, restProps, htmlAttributes, { children: _jsx("span", { className: "ndl-loading-bar-text", children: loadingMessage }) })));
41
41
  };
42
42
  //# sourceMappingURL=LoadingBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AASpC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAsC,EAQnB,EAAE,EAAE;QARe,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEwC,EADxC,SAAS,cAPkD,gEAQ/D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,EAClB,CACH,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 { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...restProps}\n {...htmlAttributes}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"LoadingBar.js","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAYpC,MAAM,CAAC,MAAM,UAAU,GAAG,CAAsC,EASnB,EAAE,EAAE;QATe,EAC9D,EAAE,EACF,OAAO,GAAG,KAAK,EACf,cAAc,GAAG,SAAS,EAC1B,SAAS,EACT,cAAc,EACd,KAAK,EACL,GAAG,OAEwC,EADxC,SAAS,cARkD,kFAS/D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,iBAAiB,EAAE,SAAS,EAAE;QACvD,sBAAsB,EAAE,OAAO;KAChC,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,cAElB,eAAM,SAAS,EAAC,sBAAsB,YAAE,cAAc,GAAQ,IACpD,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 { type PolymorphicCommonProps } from '../_common/types';\n\ntype LoadingBarProps = {\n /** Visually hidden message for screen readers, for example \"Loading search results\". */\n loadingMessage?: string;\n /** Whether the loading bar has a background rail */\n hasRail?: boolean;\n};\n\nexport const LoadingBar = <T extends React.ElementType = 'div'>({\n as,\n hasRail = false,\n loadingMessage = 'Loading',\n className,\n htmlAttributes,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingBarProps>) => {\n const Component: React.ElementType = as ?? 'div';\n const classes = classNames('ndl-loading-bar', className, {\n 'ndl-loading-bar-rail': hasRail,\n });\n\n return (\n <Component\n className={classes}\n ref={ref}\n role=\"status\"\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <span className=\"ndl-loading-bar-text\">{loadingMessage}</span>\n </Component>\n );\n};\n"]}
@@ -39,13 +39,13 @@ import classNames from 'classnames';
39
39
  *
40
40
  */
41
41
  export const LoadingSpinner = (_a) => {
42
- var { as, size = 'small', className, htmlAttributes, ref } = _a, restProps = __rest(_a, ["as", "size", "className", "htmlAttributes", "ref"]);
42
+ var { as, loadingMessage = 'Loading content', size = 'small', className, htmlAttributes, ref } = _a, restProps = __rest(_a, ["as", "loadingMessage", "size", "className", "htmlAttributes", "ref"]);
43
43
  const Component = as || 'div';
44
44
  const classes = classNames('ndl-spin-wrapper', className, {
45
45
  'ndl-large': size === 'large',
46
46
  'ndl-medium': size === 'medium',
47
47
  'ndl-small': size === 'small',
48
48
  });
49
- return (_jsx(Component, Object.assign({ className: classes, role: "status", "aria-label": "Loading content", "aria-live": "polite", ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-spin" }) })));
49
+ return (_jsx(Component, Object.assign({ className: classes, role: "status", "aria-label": loadingMessage, "aria-live": "polite", ref: ref }, restProps, htmlAttributes, { children: _jsx("div", { className: "ndl-spin" }) })));
50
50
  };
51
51
  //# sourceMappingURL=LoadingSpinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAiBpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsC,EAOnB,EAAE,EAAE;QAPe,EAClE,EAAE,EACF,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cANsD,oDAOnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACF,iBAAiB,eAClB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,cAAK,SAAS,EAAC,UAAU,GAAG,IAClB,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 { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label=\"Loading content\"\n aria-live=\"polite\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"LoadingSpinner.js","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAyBpC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAsC,EAQnB,EAAE,EAAE;QARe,EAClE,EAAE,EACF,cAAc,GAAG,iBAAiB,EAClC,IAAI,GAAG,OAAO,EACd,SAAS,EACT,cAAc,EACd,GAAG,OAE4C,EAD5C,SAAS,cAPsD,sEAQnE,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,IAAI,KAAK,CAAC;IACjD,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,SAAS,EAAE;QACxD,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,KAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAC,QAAQ,gBACD,cAAc,eAChB,QAAQ,EAClB,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,cAAK,SAAS,EAAC,UAAU,GAAG,IAClB,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 { type PolymorphicCommonProps } from '../_common/types';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype LoadingSpinnerProps = {\n // TODO v6: Change default text to \"Loading\" and implement as a hidden text element instead of aria-label\n /**\n * The aria label for the loading spinner. If not provided, defaults to \"Loading content\".\n */\n loadingMessage?: string;\n /**\n * The size of the loading spinner.\n */\n size?: 'small' | 'medium' | 'large';\n};\n\n/**\n *\n *\n * LoadingSpinner Component\n *\n *\n */\n\nexport const LoadingSpinner = <T extends React.ElementType = 'div'>({\n as,\n loadingMessage = 'Loading content',\n size = 'small',\n className,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, LoadingSpinnerProps>) => {\n const Component: React.ElementType = as || 'div';\n const classes = classNames('ndl-spin-wrapper', className, {\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n className={classes}\n role=\"status\"\n aria-label={loadingMessage}\n aria-live=\"polite\"\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-spin\" />\n </Component>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ai-presence-thinking.story.d.ts","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CAEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"ai-presence-thinking.story.d.ts","sourceRoot":"","sources":["../../../../../src/ai/presence/stories/ai-presence-thinking.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+CAEd,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI/D,KAAK,SAAS,GAAG;IACf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,CACR,KAAK,EACD,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,GACzC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KACjC,IAAI,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAAE,qHAY1D,sBAAsB,CAAC,CAAC,EAAE,SAAS,CAAC,4CA8CtC,CAAC"}
1
+ {"version":3,"file":"Code.d.ts","sourceRoot":"","sources":["../../../src/code/Code.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAI/D,KAAK,SAAS,GAAG;IACf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sEAAsE;IACtE,OAAO,CAAC,EAAE,CACR,KAAK,EACD,KAAK,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,GACzC,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,KACjC,IAAI,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,QAAQ,EAAE,qHAY1D,sBAAsB,CAAC,CAAC,EAAE,SAAS,CAAC,4CAiDtC,CAAC"}
@@ -22,8 +22,11 @@
22
22
  import type React from 'react';
23
23
  import { type PolymorphicCommonProps } from '../_common/types';
24
24
  type LoadingBarProps = {
25
+ /** Visually hidden message for screen readers, for example "Loading search results". */
26
+ loadingMessage?: string;
27
+ /** Whether the loading bar has a background rail */
25
28
  hasRail?: boolean;
26
29
  };
27
- export declare const LoadingBar: <T extends React.ElementType = "div">({ as, hasRail, className, htmlAttributes, style, ref, ...restProps }: PolymorphicCommonProps<T, LoadingBarProps>) => import("react/jsx-runtime").JSX.Element;
30
+ export declare const LoadingBar: <T extends React.ElementType = "div">({ as, hasRail, loadingMessage, className, htmlAttributes, style, ref, ...restProps }: PolymorphicCommonProps<T, LoadingBarProps>) => import("react/jsx-runtime").JSX.Element;
28
31
  export {};
29
32
  //# sourceMappingURL=LoadingBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingBar.d.ts","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,KAAK,eAAe,GAAG;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,sEAQ7D,sBAAsB,CAAC,CAAC,EAAE,eAAe,CAAC,4CAgB5C,CAAC"}
1
+ {"version":3,"file":"LoadingBar.d.ts","sourceRoot":"","sources":["../../../src/loading-bar/LoadingBar.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D,KAAK,eAAe,GAAG;IACrB,wFAAwF;IACxF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oDAAoD;IACpD,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,sFAS7D,sBAAsB,CAAC,CAAC,EAAE,eAAe,CAAC,4CAkB5C,CAAC"}
@@ -29,6 +29,13 @@ import { type PolymorphicCommonProps } from '../_common/types';
29
29
  *
30
30
  */
31
31
  type LoadingSpinnerProps = {
32
+ /**
33
+ * The aria label for the loading spinner. If not provided, defaults to "Loading content".
34
+ */
35
+ loadingMessage?: string;
36
+ /**
37
+ * The size of the loading spinner.
38
+ */
32
39
  size?: 'small' | 'medium' | 'large';
33
40
  };
34
41
  /**
@@ -38,6 +45,6 @@ type LoadingSpinnerProps = {
38
45
  *
39
46
  *
40
47
  */
41
- export declare const LoadingSpinner: <T extends React.ElementType = "div">({ as, size, className, htmlAttributes, ref, ...restProps }: PolymorphicCommonProps<T, LoadingSpinnerProps>) => import("react/jsx-runtime").JSX.Element;
48
+ export declare const LoadingSpinner: <T extends React.ElementType = "div">({ as, loadingMessage, size, className, htmlAttributes, ref, ...restProps }: PolymorphicCommonProps<T, LoadingSpinnerProps>) => import("react/jsx-runtime").JSX.Element;
42
49
  export {};
43
50
  //# sourceMappingURL=LoadingSpinner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;;GAMG;AAEH,KAAK,mBAAmB,GAAG;IACzB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC,CAAC;AAEF;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,4DAOjE,sBAAsB,CAAC,CAAC,EAAE,mBAAmB,CAAC,4CAqBhD,CAAC"}
1
+ {"version":3,"file":"LoadingSpinner.d.ts","sourceRoot":"","sources":["../../../src/loading-spinner/LoadingSpinner.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAE/D;;;;;;GAMG;AAEH,KAAK,mBAAmB,GAAG;IAEzB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;CACrC,CAAC;AAEF;;;;;;GAMG;AAEH,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,4EAQjE,sBAAsB,CAAC,CAAC,EAAE,mBAAmB,CAAC,4CAqBhD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neo4j-ndl/react",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "sideEffects": false,
5
5
  "description": "React implementation of Neo4j Design System",
6
6
  "keywords": [
@@ -396,8 +396,8 @@
396
396
  "@babel/types": "8.0.10",
397
397
  "@playwright/experimental-ct-react": "1.60.0",
398
398
  "@playwright/test": "1.60.0",
399
- "@storybook/addon-docs": "10.2.19",
400
- "@storybook/react-vite": "10.2.19",
399
+ "@storybook/addon-docs": "10.6.6",
400
+ "@storybook/react-vite": "10.6.6",
401
401
  "@svgr/cli": "6.5.1",
402
402
  "@testing-library/jest-dom": "6.9.1",
403
403
  "@testing-library/react": "16.3.2",
@@ -419,7 +419,7 @@
419
419
  "react-dom": "19.2.5",
420
420
  "resize-observer-polyfill": "1.5.1",
421
421
  "sinon": "21.0.3",
422
- "storybook": "10.5.8",
422
+ "storybook": "10.6.6",
423
423
  "tsx": "4.21.0",
424
424
  "typescript": "5.9.3",
425
425
  "vitest": "4.1.10",
@@ -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.5"
432
+ "@neo4j-ndl/base": "^5.1.6"
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.3.1'
5
+ version: '5.3.2'
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.3.1. Once installed into your repo (e.g. via
18
+ > 📌 Shipped with `@neo4j-ndl/react` v5.3.2. 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.
@@ -172,7 +172,7 @@ Import from `@neo4j-ndl/react`.
172
172
  | `IconButtonArrayComponent` | [components/icon-button-array.md](components/icon-button-array.md) | | 5 |
173
173
  | `InlineEdit` | [components/inline-edit.md](components/inline-edit.md) | ✅ | 9 |
174
174
  | `Kbd` | [components/kbd.md](components/kbd.md) | ✅ | 2 |
175
- | `LoadingBar` | [components/loading-bar.md](components/loading-bar.md) | | 2 |
175
+ | `LoadingBar` | [components/loading-bar.md](components/loading-bar.md) | ✅ | 2 |
176
176
  | `LoadingSpinner` | [components/loading-spinner.md](components/loading-spinner.md) | ✅ | 2 |
177
177
  | `Logo` | [components/logo.md](components/logo.md) | | 3 |
178
178
  | `Menu` | [components/menu.md](components/menu.md) | ✅ | 13 |
@@ -47,7 +47,6 @@ import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
47
47
 
48
48
  import { Presence } from '@neo4j-ndl/react/ai';
49
49
 
50
- // TODO: consider this story when happo is ready
51
50
  const Component = () => {
52
51
  return <Presence isThinking className="size-token-32" />;
53
52
  };
@@ -11,9 +11,26 @@ Import: `import { LoadingBar } from '@neo4j-ndl/react'`
11
11
  | Prop | Type | Required | Default | Description |
12
12
  |------|------|----------|---------|-------------|
13
13
  | `as` | `ElementType<any, keyof IntrinsicElements>` | | | An override of the default HTML tag of the root of the component. Can also be another React component. |
14
- | `hasRail` | `boolean` | | `false` | |
14
+ | `hasRail` | `boolean` | | `false` | Whether the loading bar has a background rail |
15
+ | `loadingMessage` | `string` | | `Loading` | Visually hidden message for screen readers, for example "Loading search results". |
15
16
  | `ref` | `any` | | | A ref to apply to the root element. |
16
17
 
18
+ ## Accessibility
19
+
20
+ ## Implementation guidelines
21
+
22
+ `LoadingBar` renders an element with `role="status"` that contains visually hidden text.
23
+
24
+ - The text defaults to "Loading". Use `loadingMessage` to say what is loading, for example "Loading search results".
25
+ - Screen readers may not announce the bar when it is added to the page already populated. Announce the loading state yourself, for example by updating a persistent `role="status"` element in your application.
26
+
27
+ ### Related WCAG criteria
28
+
29
+ - [1.1.1 Non-text Content](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (A): The bar has a visually hidden text alternative that can be customized
30
+ - [2.2.2 Pause, Stop, Hide](https://www.w3.org/WAI/WCAG22/Understanding/pause-stop-hide.html) (A): The indicator animates continuously but loading indicators are generally treated as essential movement.
31
+ - [4.1.2 Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html) (A): The bar exposes the `status` role
32
+ - [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (AA): The application is responsible for announcing the loading state, see above
33
+
17
34
  ## Examples
18
35
 
19
36
  ### Default
@@ -11,14 +11,24 @@ Import: `import { LoadingSpinner } from '@neo4j-ndl/react'`
11
11
  | Prop | Type | Required | Default | Description |
12
12
  |------|------|----------|---------|-------------|
13
13
  | `as` | `ElementType<any, keyof IntrinsicElements>` | | | An override of the default HTML tag of the root of the component. Can also be another React component. |
14
+ | `loadingMessage` | `string` | | `Loading content` | The aria label for the loading spinner. If not provided, defaults to "Loading content". |
14
15
  | `ref` | `any` | | | A ref to apply to the root element. |
15
- | `size` | `'large' \| 'medium' \| 'small'` | | `small` | |
16
+ | `size` | `'large' \| 'medium' \| 'small'` | | `small` | The size of the loading spinner. |
16
17
 
17
18
  ## Accessibility
18
19
 
19
20
  ## Implementation guidelines
20
21
 
21
- The loading spinner component uses `role='status'` and `aria-label='Loading content'` to notify assistive technologies that a background process is occurring. The `aria-live='polite'` setting ensures screen readers announce the message non-intrusively when the spinner appears or updates. This informs users that content is loading without interrupting their workflow.
22
+ `LoadingSpinner` renders an element with `role="status"` and an accessible name.
23
+
24
+ - The accessible name defaults to "Loading content". Use `loadingMessage` to say what is loading, for example "Loading dashboard".
25
+ - The spinner is a visual indicator without text content, so screen readers may not announce it when it appears. Announce the loading state yourself, for example by updating a persistent `role="status"` element in your application.
26
+
27
+ ### Related WCAG criteria
28
+
29
+ - [1.1.1 Non-text Content](https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html) (A): The spinner has an accessible name that can be customized
30
+ - [4.1.2 Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html) (A): The spinner exposes the `status` role with a name
31
+ - [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG22/Understanding/status-messages.html) (AA): The application is responsible for announcing the loading state, see above
22
32
 
23
33
  ## Examples
24
34