@neo4j-ndl/react 5.4.3 → 5.4.4

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 (141) hide show
  1. package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
  2. package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
  3. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
  4. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  5. package/lib/cjs/select/stories/select-async.story.js +1 -3
  6. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  7. package/lib/cjs/select/stories/select-clean.story.js +1 -3
  8. package/lib/cjs/select/stories/select-clean.story.js.map +1 -1
  9. package/lib/cjs/select/stories/select-controlled.story.js +1 -3
  10. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  11. package/lib/cjs/select/stories/select-creatable.story.js +1 -3
  12. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  13. package/lib/cjs/select/stories/select-custom-label.story.js +1 -3
  14. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  15. package/lib/cjs/select/stories/select-default.story.js +1 -3
  16. package/lib/cjs/select/stories/select-default.story.js.map +1 -1
  17. package/lib/cjs/select/stories/select-disabled.story.js +1 -3
  18. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  19. package/lib/cjs/select/stories/select-empty.story.js +1 -3
  20. package/lib/cjs/select/stories/select-empty.story.js.map +1 -1
  21. package/lib/cjs/select/stories/select-error-state.story.js +1 -3
  22. package/lib/cjs/select/stories/select-error-state.story.js.map +1 -1
  23. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -3
  24. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  25. package/lib/cjs/select/stories/select-menu-positionings.story.js +1 -5
  26. package/lib/cjs/select/stories/select-menu-positionings.story.js.map +1 -1
  27. package/lib/cjs/select/stories/select-multi.story.js +1 -3
  28. package/lib/cjs/select/stories/select-multi.story.js.map +1 -1
  29. package/lib/cjs/select/stories/select-sizes.story.js +1 -5
  30. package/lib/cjs/select/stories/select-sizes.story.js.map +1 -1
  31. package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
  32. package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
  33. package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js +3 -9
  34. package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
  35. package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js +2 -8
  36. package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
  37. package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js +2 -9
  38. package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
  39. package/lib/cjs/spotlight/stories/spotlight-with-image.story.js +2 -9
  40. package/lib/cjs/spotlight/stories/spotlight-with-image.story.js.map +1 -1
  41. package/lib/cjs/spotlight/stories/spotlight-with-label.story.js +2 -9
  42. package/lib/cjs/spotlight/stories/spotlight-with-label.story.js.map +1 -1
  43. package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js +2 -9
  44. package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
  45. package/lib/cjs/timezone-picker/TimeZonePicker.js +6 -5
  46. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  47. package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
  48. package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
  49. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
  50. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  51. package/lib/esm/select/stories/select-async.story.js +1 -3
  52. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  53. package/lib/esm/select/stories/select-clean.story.js +1 -3
  54. package/lib/esm/select/stories/select-clean.story.js.map +1 -1
  55. package/lib/esm/select/stories/select-controlled.story.js +1 -3
  56. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  57. package/lib/esm/select/stories/select-creatable.story.js +1 -3
  58. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  59. package/lib/esm/select/stories/select-custom-label.story.js +1 -3
  60. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  61. package/lib/esm/select/stories/select-default.story.js +1 -3
  62. package/lib/esm/select/stories/select-default.story.js.map +1 -1
  63. package/lib/esm/select/stories/select-disabled.story.js +1 -3
  64. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  65. package/lib/esm/select/stories/select-empty.story.js +1 -3
  66. package/lib/esm/select/stories/select-empty.story.js.map +1 -1
  67. package/lib/esm/select/stories/select-error-state.story.js +1 -3
  68. package/lib/esm/select/stories/select-error-state.story.js.map +1 -1
  69. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -3
  70. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  71. package/lib/esm/select/stories/select-menu-positionings.story.js +1 -5
  72. package/lib/esm/select/stories/select-menu-positionings.story.js.map +1 -1
  73. package/lib/esm/select/stories/select-multi.story.js +1 -3
  74. package/lib/esm/select/stories/select-multi.story.js.map +1 -1
  75. package/lib/esm/select/stories/select-sizes.story.js +1 -5
  76. package/lib/esm/select/stories/select-sizes.story.js.map +1 -1
  77. package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
  78. package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
  79. package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js +4 -10
  80. package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
  81. package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js +3 -9
  82. package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
  83. package/lib/esm/spotlight/stories/spotlight-with-icon.story.js +2 -9
  84. package/lib/esm/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
  85. package/lib/esm/spotlight/stories/spotlight-with-image.story.js +2 -9
  86. package/lib/esm/spotlight/stories/spotlight-with-image.story.js.map +1 -1
  87. package/lib/esm/spotlight/stories/spotlight-with-label.story.js +2 -9
  88. package/lib/esm/spotlight/stories/spotlight-with-label.story.js.map +1 -1
  89. package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js +2 -9
  90. package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
  91. package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
  92. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  93. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +0 -3
  94. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts.map +1 -1
  95. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +0 -3
  96. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
  97. package/lib/types/select/stories/select-async.story.d.ts +1 -2
  98. package/lib/types/select/stories/select-async.story.d.ts.map +1 -1
  99. package/lib/types/select/stories/select-clean.story.d.ts +1 -2
  100. package/lib/types/select/stories/select-clean.story.d.ts.map +1 -1
  101. package/lib/types/select/stories/select-controlled.story.d.ts +2 -2
  102. package/lib/types/select/stories/select-controlled.story.d.ts.map +1 -1
  103. package/lib/types/select/stories/select-creatable.story.d.ts +1 -2
  104. package/lib/types/select/stories/select-creatable.story.d.ts.map +1 -1
  105. package/lib/types/select/stories/select-custom-label.story.d.ts +1 -2
  106. package/lib/types/select/stories/select-custom-label.story.d.ts.map +1 -1
  107. package/lib/types/select/stories/select-default.story.d.ts +1 -2
  108. package/lib/types/select/stories/select-default.story.d.ts.map +1 -1
  109. package/lib/types/select/stories/select-disabled.story.d.ts +1 -2
  110. package/lib/types/select/stories/select-disabled.story.d.ts.map +1 -1
  111. package/lib/types/select/stories/select-empty.story.d.ts +1 -2
  112. package/lib/types/select/stories/select-empty.story.d.ts.map +1 -1
  113. package/lib/types/select/stories/select-error-state.story.d.ts +1 -2
  114. package/lib/types/select/stories/select-error-state.story.d.ts.map +1 -1
  115. package/lib/types/select/stories/select-inside-dialog.story.d.ts +1 -2
  116. package/lib/types/select/stories/select-inside-dialog.story.d.ts.map +1 -1
  117. package/lib/types/select/stories/select-menu-positionings.story.d.ts +1 -2
  118. package/lib/types/select/stories/select-menu-positionings.story.d.ts.map +1 -1
  119. package/lib/types/select/stories/select-multi.story.d.ts +1 -2
  120. package/lib/types/select/stories/select-multi.story.d.ts.map +1 -1
  121. package/lib/types/select/stories/select-sizes.story.d.ts +1 -2
  122. package/lib/types/select/stories/select-sizes.story.d.ts.map +1 -1
  123. package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts +1 -3
  124. package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts.map +1 -1
  125. package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts +1 -3
  126. package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts.map +1 -1
  127. package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts +1 -3
  128. package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts.map +1 -1
  129. package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts +1 -3
  130. package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts.map +1 -1
  131. package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts +1 -3
  132. package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts.map +1 -1
  133. package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts +1 -3
  134. package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts.map +1 -1
  135. package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts +1 -3
  136. package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts.map +1 -1
  137. package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
  138. package/package.json +1 -2
  139. package/skills/ndl-react/SKILL.md +2 -2
  140. package/skills/ndl-react/components/select.md +13 -30
  141. package/skills/ndl-react/components/spotlight.md +11 -75
@@ -1 +1 @@
1
- {"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isDisabled: true,\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,eAAe;SACzB,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isDisabled: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -21,10 +21,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { Select } from '@neo4j-ndl/react';
24
- const Component = (props) => {
25
- var _a;
24
+ const Component = () => {
26
25
  return (_jsx(Select, { label: "Label", helpText: "Help text", type: "select", selectProps: {
27
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
28
26
  options: [],
29
27
  } }));
30
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-empty.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-empty.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,WAAW,EACpB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,EAAE;SACZ,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Help text\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: [],\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-empty.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-empty.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,WAAW,EACpB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,OAAO,EAAE,EAAE;SACZ,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Help text\"\n type=\"select\"\n selectProps={{\n options: [],\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -27,10 +27,8 @@ const EXAMPLE_OPTIONS = [
27
27
  { label: 'Graph Databases', value: 'graph-database' },
28
28
  { isDisabled: true, label: 'Disabled database option', value: 'disabled' },
29
29
  ];
30
- const Component = (props) => {
31
- var _a;
30
+ const Component = () => {
32
31
  return (_jsx(Select, { label: "Label", errorText: "Validate that your selection is correct", type: "select", selectProps: {
33
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
34
32
  options: EXAMPLE_OPTIONS,
35
33
  } }));
36
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-error-state.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-error-state.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,yCAAyC,EACnD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n errorText=\"Validate that your selection is correct\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-error-state.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-error-state.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,yCAAyC,EACnD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,OAAO,EAAE,eAAe;SACzB,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n errorText=\"Validate that your selection is correct\"\n type=\"select\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -28,13 +28,11 @@ const EXAMPLE_OPTIONS = [
28
28
  { label: 'Graph Databases', value: 'graph-database' },
29
29
  { isDisabled: true, label: 'Disabled database option', value: 'disabled' },
30
30
  ];
31
- const Component = (props) => {
32
- var _a;
31
+ const Component = () => {
33
32
  const ref = useRef(null);
34
33
  const [isOpen, setIsOpen] = useState(false);
35
34
  return (_jsxs("div", { ref: ref, className: "flex flex-col items-center justify-center relative h-[500px]", children: [_jsx(FilledButton, { size: "medium", onClick: () => setIsOpen(true), children: "Open Dialog" }), _jsxs(Dialog, { container: (ref === null || ref === void 0 ? void 0 : ref.current) || undefined, isOpen: isOpen, onClose: () => setIsOpen(false), "aria-label": "Dialog", children: [_jsx(Dialog.Header, { children: "Using Select inside a dialog" }), _jsxs(Dialog.Description, { className: "flex flex-col gap-token-32", children: [_jsxs(Typography, { variant: "body-medium", children: ["To use select inside a dialog and avoid the cut-off, you need to use the property ", _jsx("code", { children: "menuPosition: \"fixed\"" }), " inside the", ' ', _jsx("code", { children: "selectProps" }), ". This is done automatically if used in a Needle Dialog, but can always be overridden manually."] }), _jsx(Select, { label: "Inside a dialog", type: "select", selectProps: {
36
35
  defaultValue: EXAMPLE_OPTIONS[1],
37
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
38
36
  options: EXAMPLE_OPTIONS,
39
37
  } })] })] })] }));
40
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,MAAM,GAAG,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,8DAA8D,aAExE,KAAC,YAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAE3C,EACf,MAAC,MAAM,IACL,SAAS,EAAE,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,KAAI,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,gBACpB,QAAQ,aAEnB,KAAC,MAAM,CAAC,MAAM,+CAA6C,EAC3D,MAAC,MAAM,CAAC,WAAW,IAAC,SAAS,EAAC,4BAA4B,aACxD,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,mGAElB,qDAA4C,iBAAY,GAAG,EACxE,yCAAwB,uGAEb,EACb,KAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;oCAChC,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oCACzC,OAAO,EAAE,eAAe;iCACzB,GACD,IACiB,IACd,IACL,CACP,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 { Dialog, FilledButton, Select, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n return (\n <div\n ref={ref}\n className=\"flex flex-col items-center justify-center relative h-[500px]\"\n >\n <FilledButton size=\"medium\" onClick={() => setIsOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n container={ref?.current || undefined}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n aria-label=\"Dialog\"\n >\n <Dialog.Header>Using Select inside a dialog</Dialog.Header>\n <Dialog.Description className=\"flex flex-col gap-token-32\">\n <Typography variant=\"body-medium\">\n To use select inside a dialog and avoid the cut-off, you need to use\n the property <code>menuPosition: &quot;fixed&quot;</code> inside the{' '}\n <code>selectProps</code>. This is done automatically if used in a\n Needle Dialog, but can always be overridden manually.\n </Typography>\n <Select\n label=\"Inside a dialog\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n </Dialog.Description>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,GAAG,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,eACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,8DAA8D,aAExE,KAAC,YAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAE3C,EACf,MAAC,MAAM,IACL,SAAS,EAAE,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,KAAI,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,gBACpB,QAAQ,aAEnB,KAAC,MAAM,CAAC,MAAM,+CAA6C,EAC3D,MAAC,MAAM,CAAC,WAAW,IAAC,SAAS,EAAC,4BAA4B,aACxD,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,mGAElB,qDAA4C,iBAAY,GAAG,EACxE,yCAAwB,uGAEb,EACb,KAAC,MAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;oCAChC,OAAO,EAAE,eAAe;iCACzB,GACD,IACiB,IACd,IACL,CACP,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 { Dialog, FilledButton, Select, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n return (\n <div\n ref={ref}\n className=\"flex flex-col items-center justify-center relative h-[500px]\"\n >\n <FilledButton size=\"medium\" onClick={() => setIsOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n container={ref?.current || undefined}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n aria-label=\"Dialog\"\n >\n <Dialog.Header>Using Select inside a dialog</Dialog.Header>\n <Dialog.Description className=\"flex flex-col gap-token-32\">\n <Typography variant=\"body-medium\">\n To use select inside a dialog and avoid the cut-off, you need to use\n the property <code>menuPosition: &quot;fixed&quot;</code> inside the{' '}\n <code>selectProps</code>. This is done automatically if used in a\n Needle Dialog, but can always be overridden manually.\n </Typography>\n <Select\n label=\"Inside a dialog\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n options: EXAMPLE_OPTIONS,\n }}\n />\n </Dialog.Description>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -25,18 +25,14 @@ const EXAMPLE_OPTIONS = [
25
25
  { label: 'Neo4j', value: 'neo4j' },
26
26
  { label: 'Needle 🪡', value: 'needle' },
27
27
  ];
28
- const Component = (props) => {
29
- var _a, _b, _c;
28
+ const Component = () => {
30
29
  return (_jsxs("div", { className: "flex gap-token-16 pt-token-64", children: [_jsx(Select, { label: "Automatic menu placement", type: "select", selectProps: {
31
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
32
30
  menuPlacement: 'auto',
33
31
  options: EXAMPLE_OPTIONS,
34
32
  } }), _jsx(Select, { label: "Bottom menu placement", type: "select", selectProps: {
35
- menuIsOpen: (_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.menuIsOpen,
36
33
  menuPlacement: 'bottom',
37
34
  options: EXAMPLE_OPTIONS,
38
35
  } }), _jsx(Select, { label: "Top menu placement", type: "select", selectProps: {
39
- menuIsOpen: (_c = props.selectProps) === null || _c === void 0 ? void 0 : _c.menuIsOpen,
40
36
  menuPlacement: 'top',
41
37
  options: EXAMPLE_OPTIONS,
42
38
  } })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"select-menu-positionings.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-menu-positionings.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;CACxC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,eAAK,SAAS,EAAC,+BAA+B,aAC5C,KAAC,MAAM,IACL,KAAK,EAAC,0BAA0B,EAChC,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,aAAa,EAAE,MAAM;oBACrB,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,aAAa,EAAE,QAAQ;oBACvB,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,aAAa,EAAE,KAAK;oBACpB,OAAO,EAAE,eAAe;iBACzB,GACD,IACE,CACP,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <div className=\"flex gap-token-16 pt-token-64\">\n <Select\n label=\"Automatic menu placement\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n menuPlacement: 'auto',\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Bottom menu placement\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n menuPlacement: 'bottom',\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Top menu placement\"\n type=\"select\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n menuPlacement: 'top',\n options: EXAMPLE_OPTIONS,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-menu-positionings.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-menu-positionings.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;CACxC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,+BAA+B,aAC5C,KAAC,MAAM,IACL,KAAK,EAAC,0BAA0B,EAChC,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,aAAa,EAAE,MAAM;oBACrB,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,aAAa,EAAE,QAAQ;oBACvB,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,aAAa,EAAE,KAAK;oBACpB,OAAO,EAAE,eAAe;iBACzB,GACD,IACE,CACP,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n];\n\nconst Component = () => {\n return (\n <div className=\"flex gap-token-16 pt-token-64\">\n <Select\n label=\"Automatic menu placement\"\n type=\"select\"\n selectProps={{\n menuPlacement: 'auto',\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Bottom menu placement\"\n type=\"select\"\n selectProps={{\n menuPlacement: 'bottom',\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Top menu placement\"\n type=\"select\"\n selectProps={{\n menuPlacement: 'top',\n options: EXAMPLE_OPTIONS,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -27,13 +27,11 @@ const EXAMPLE_OPTIONS = [
27
27
  { label: 'Graph Databases', value: 'graph-database' },
28
28
  { isDisabled: true, label: 'Disabled database option', value: 'disabled' },
29
29
  ];
30
- const Component = (props) => {
31
- var _a;
30
+ const Component = () => {
32
31
  return (_jsx(Select, { label: "Label", type: "select", selectProps: {
33
32
  defaultValue: EXAMPLE_OPTIONS[1],
34
33
  isClearable: true,
35
34
  isMulti: true,
36
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
37
35
  options: EXAMPLE_OPTIONS,
38
36
  } }));
39
37
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-multi.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-multi.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n isClearable: true,\n isMulti: true,\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-multi.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-multi.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,eAAe;SACzB,GACD,CACH,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n isClearable: true,\n isMulti: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -27,16 +27,12 @@ const EXAMPLE_OPTIONS = [
27
27
  { label: 'Graph Databases', value: 'graph-database' },
28
28
  { isDisabled: true, label: 'Disabled database option', value: 'disabled' },
29
29
  ];
30
- const Component = (props) => {
31
- var _a, _b, _c;
30
+ const Component = () => {
32
31
  return (_jsxs("div", { className: "flex gap-token-16", children: [_jsx(Select, { label: "Small", type: "select", size: "small", selectProps: {
33
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
34
32
  options: EXAMPLE_OPTIONS,
35
33
  } }), _jsx(Select, { label: "Medium", type: "select", size: "medium", selectProps: {
36
- menuIsOpen: (_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.menuIsOpen,
37
34
  options: EXAMPLE_OPTIONS,
38
35
  } }), _jsx(Select, { label: "Large", type: "select", size: "large", selectProps: {
39
- menuIsOpen: (_c = props.selectProps) === null || _c === void 0 ? void 0 : _c.menuIsOpen,
40
36
  options: EXAMPLE_OPTIONS,
41
37
  } })] }));
42
38
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-sizes.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,QAAQ,EACd,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;oBACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,OAAO,EAAE,eAAe;iBACzB,GACD,IACE,CACP,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <div className=\"flex gap-token-16\">\n <Select\n label=\"Small\"\n type=\"select\"\n size=\"small\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Medium\"\n type=\"select\"\n size=\"medium\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Large\"\n type=\"select\"\n size=\"large\"\n selectProps={{\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-sizes.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;oBACX,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,QAAQ,EACd,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;oBACX,OAAO,EAAE,eAAe;iBACzB,GACD,IACE,CACP,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 { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <div className=\"flex gap-token-16\">\n <Select\n label=\"Small\"\n type=\"select\"\n size=\"small\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Medium\"\n type=\"select\"\n size=\"medium\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Large\"\n type=\"select\"\n size=\"large\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
- import { useEffect } from 'react';
25
- const Component = (props) => {
24
+ const Component = () => {
26
25
  const { themeClassName } = useNeedleTheme();
27
26
  const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
28
27
  const targetId = `test-target-${themeClassName}`;
29
- useEffect(() => {
30
- if (props.isChromatic) {
31
- setActiveSpotlight(targetId);
32
- setIsOpen(true);
33
- }
34
- }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
35
- return (_jsxs("div", { className: "flex justify-center gap-token-64 h-[100px]", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx("div", { className: "left-[auto] top-[110px] fixed", children: _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, shouldRenderAsChild: true, indicatorVariant: "border", indicatorPlacement: "middle-middle", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
28
+ return (_jsxs("div", { className: "flex justify-center gap-token-64 h-[100px]", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx("div", { className: "left-[auto] top-[110px] fixed", children: _jsx(SpotlightTarget, { id: targetId, shouldRenderAsChild: true, indicatorVariant: "border", indicatorPlacement: "middle-middle", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
36
29
  setIsOpen(false);
37
30
  setActiveSpotlight(null);
38
31
  }, children: "Close" }), children: [_jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-fixed-positioning.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-fixed-positioning.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,SAAS,GAA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F,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useEffect } from 'react';\n\nconst Component = (props: { isChromatic: boolean }) => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n useEffect(() => {\n if (props.isChromatic) {\n setActiveSpotlight(targetId);\n setIsOpen(true);\n }\n }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);\n\n return (\n <div className=\"flex justify-center gap-token-64 h-[100px]\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <div className=\"left-[auto] top-[110px] fixed\">\n <SpotlightTarget\n id={targetId}\n hasPulse={!props.isChromatic}\n shouldRenderAsChild\n indicatorVariant=\"border\"\n indicatorPlacement=\"middle-middle\"\n >\n <FilledButton onClick={() => alert('Target button clicked')}>\n Target\n </FilledButton>\n </SpotlightTarget>\n </div>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"spotlight-fixed-positioning.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-fixed-positioning.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,4CAA4C,aACzD,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,cAAK,SAAS,EAAC,+BAA+B,YAC5C,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,mBAAmB,QACnB,gBAAgB,EAAC,QAAQ,EACzB,kBAAkB,EAAC,eAAe,YAElC,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACC,GACd,EACN,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64 h-[100px]\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <div className=\"left-[auto] top-[110px] fixed\">\n <SpotlightTarget\n id={targetId}\n shouldRenderAsChild\n indicatorVariant=\"border\"\n indicatorPlacement=\"middle-middle\"\n >\n <FilledButton onClick={() => alert('Target button clicked')}>\n Target\n </FilledButton>\n </SpotlightTarget>\n </div>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,19 +21,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { Dialog, FilledButton, OutlinedButton, Spotlight, SpotlightTarget, Typography, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
- import { useEffect, useState } from 'react';
25
- const Component = (props) => {
24
+ import { useState } from 'react';
25
+ const Component = () => {
26
26
  const { themeClassName } = useNeedleTheme();
27
27
  const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
28
- const [isModalOpen, setIsModalOpen] = useState(props.isChromatic);
28
+ const [isModalOpen, setIsModalOpen] = useState(false);
29
29
  const targetId = `test-target-${themeClassName}`;
30
- useEffect(() => {
31
- if (props.isChromatic && isModalOpen) {
32
- setActiveSpotlight(targetId);
33
- setIsOpen(true);
34
- }
35
- }, [isModalOpen, setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
36
- return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setIsModalOpen(true), children: "Open Dialog" }), _jsxs(Dialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), className: themeClassName, children: [_jsx(Dialog.Header, { children: "Using Spotlight inside a dialog" }), _jsxs(Dialog.Content, { className: "flex flex-col gap-token-32", children: [_jsxs(Typography, { variant: "body-medium", children: ["Spotlight and SpotlightTarget should behave automatically correct when used inside a dialog. If positioning is not on top of everything, you might want to override the", _jsx("code", { children: "--spotlight-z-index" }), " css variable."] }), _jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, shouldRenderAsChild: true, indicatorVariant: "border", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) })] })] }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
30
+ return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setIsModalOpen(true), children: "Open Dialog" }), _jsxs(Dialog, { isOpen: isModalOpen, onClose: () => setIsModalOpen(false), className: themeClassName, children: [_jsx(Dialog.Header, { children: "Using Spotlight inside a dialog" }), _jsxs(Dialog.Content, { className: "flex flex-col gap-token-32", children: [_jsxs(Typography, { variant: "body-medium", children: ["Spotlight and SpotlightTarget should behave automatically correct when used inside a dialog. If positioning is not on top of everything, you might want to override the", _jsx("code", { children: "--spotlight-z-index" }), " css variable."] }), _jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, shouldRenderAsChild: true, indicatorVariant: "border", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) })] })] }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
37
31
  setIsOpen(false);
38
32
  setActiveSpotlight(null);
39
33
  }, children: "Close" }), children: [_jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-in-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,SAAS,GAAG,CAAC,KAA+B,EAAE,EAAE;IACpD,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc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AAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACC,IACd,IACS,EACjB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;gCACZ,SAAS,CAAC,KAAK,CAAC,CAAC;gCACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;4BAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACL,IACL,CACP,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 {\n Dialog,\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n Typography,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useEffect, useState } from 'react';\n\nconst Component = (props: { isChromatic: boolean }) => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const [isModalOpen, setIsModalOpen] = useState<boolean>(props.isChromatic);\n const targetId = `test-target-${themeClassName}`;\n\n useEffect(() => {\n if (props.isChromatic && isModalOpen) {\n setActiveSpotlight(targetId);\n setIsOpen(true);\n }\n }, [isModalOpen, setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setIsModalOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n className={themeClassName}\n >\n <Dialog.Header>Using Spotlight inside a dialog</Dialog.Header>\n <Dialog.Content className=\"flex flex-col gap-token-32\">\n <Typography variant=\"body-medium\">\n Spotlight and SpotlightTarget should behave automatically correct\n when used inside a dialog. If positioning is not on top of\n everything, you might want to override the\n <code>--spotlight-z-index</code> css variable.\n </Typography>\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n hasPulse={!props.isChromatic}\n shouldRenderAsChild\n indicatorVariant=\"border\"\n >\n <FilledButton onClick={() => alert('Target button clicked')}>\n Target\n </FilledButton>\n </SpotlightTarget>\n </div>\n </Dialog.Content>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"spotlight-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-in-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,MAAM,EACN,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC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AAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACL,IACL,CACP,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 {\n Dialog,\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n Typography,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const [isModalOpen, setIsModalOpen] = useState<boolean>(false);\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setIsModalOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n className={themeClassName}\n >\n <Dialog.Header>Using Spotlight inside a dialog</Dialog.Header>\n <Dialog.Content className=\"flex flex-col gap-token-32\">\n <Typography variant=\"body-medium\">\n Spotlight and SpotlightTarget should behave automatically correct\n when used inside a dialog. If positioning is not on top of\n everything, you might want to override the\n <code>--spotlight-z-index</code> css variable.\n </Typography>\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n shouldRenderAsChild\n indicatorVariant=\"border\"\n >\n <FilledButton onClick={() => alert('Target button clicked')}>\n Target\n </FilledButton>\n </SpotlightTarget>\n </div>\n </Dialog.Content>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,8 +21,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, OutlinedButton, SideNavigation, Spotlight, SpotlightTarget, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
- import { useEffect, useState } from 'react';
25
- const Component = (props) => {
24
+ import { useState } from 'react';
25
+ const Component = () => {
26
26
  const { themeClassName } = useNeedleTheme();
27
27
  const { setActiveSpotlight, setIsOpen } = useSpotlightContext();
28
28
  const [isSelected, setIsSelected] = useState('aura-db-instances');
@@ -30,13 +30,7 @@ const Component = (props) => {
30
30
  const handleClick = (item) => {
31
31
  setIsSelected(item);
32
32
  };
33
- useEffect(() => {
34
- if (props.isChromatic) {
35
- setActiveSpotlight(targetId);
36
- setIsOpen(true);
37
- }
38
- }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
39
- return (_jsxs("div", { className: "h-[500px] flex", children: [_jsxs(SideNavigation, { isExpanded: true, ariaLabel: "Main side navigation", children: [_jsx(SideNavigation.CategoryHeader, { children: "AuraDB" }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-instances'), isActive: isSelected === 'aura-db-instances', label: "Instances" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-connect'), isActive: isSelected === 'aura-db-connect', label: "Connect" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-python'), isActive: isSelected === 'aura-db-python', label: "Python" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, borderRadius: 4, indicatorVariant: "point", indicatorPlacement: "top-right", shouldRenderAsChild: true, children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-javascript'), isActive: isSelected === 'aura-db-javascript', label: "JavaScript" }) }) }), _jsx(SideNavigation.CategoryHeader, { children: "AuraDS" }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-ds-instances'), isActive: isSelected === 'aura-ds-instances', label: "Instances" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-ds-getting-started'), isActive: isSelected === 'aura-ds-getting-started', label: "Getting Started" }) })] }), _jsx("div", { className: "w-full h-full flex flex-col items-center justify-center rounded-md p-token-16", children: _jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }) }), _jsxs(Spotlight, { placement: "top-end-top-start", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
33
+ return (_jsxs("div", { className: "h-[500px] flex", children: [_jsxs(SideNavigation, { isExpanded: true, ariaLabel: "Main side navigation", children: [_jsx(SideNavigation.CategoryHeader, { children: "AuraDB" }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-instances'), isActive: isSelected === 'aura-db-instances', label: "Instances" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-connect'), isActive: isSelected === 'aura-db-connect', label: "Connect" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-python'), isActive: isSelected === 'aura-db-python', label: "Python" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SpotlightTarget, { id: targetId, borderRadius: 4, indicatorVariant: "point", indicatorPlacement: "top-right", shouldRenderAsChild: true, children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-db-javascript'), isActive: isSelected === 'aura-db-javascript', label: "JavaScript" }) }) }), _jsx(SideNavigation.CategoryHeader, { children: "AuraDS" }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-ds-instances'), isActive: isSelected === 'aura-ds-instances', label: "Instances" }) }), _jsx(SideNavigation.ListItem, { children: _jsx(SideNavigation.NavItem, { onClick: () => handleClick('aura-ds-getting-started'), isActive: isSelected === 'aura-ds-getting-started', label: "Getting Started" }) })] }), _jsx("div", { className: "w-full h-full flex flex-col items-center justify-center rounded-md p-token-16", children: _jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }) }), _jsxs(Spotlight, { placement: "top-end-top-start", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
40
34
  setIsOpen(false);
41
35
  setActiveSpotlight(null);
42
36
  }, children: "Close" }), children: [_jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-in-side-nav.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-in-side-nav.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,SAAS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AAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n SideNavigation,\n Spotlight,\n SpotlightTarget,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useEffect, useState } from 'react';\n\nconst Component = (props: { isChromatic: boolean }) => {\n const { themeClassName } = useNeedleTheme();\n const { setActiveSpotlight, setIsOpen } = useSpotlightContext();\n\n const [isSelected, setIsSelected] = useState<string | null>(\n 'aura-db-instances',\n );\n const targetId = `test-target-${themeClassName}`;\n\n const handleClick = (item: string) => {\n setIsSelected(item);\n };\n\n useEffect(() => {\n if (props.isChromatic) {\n setActiveSpotlight(targetId);\n setIsOpen(true);\n }\n }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);\n\n return (\n <div className=\"h-[500px] flex\">\n <SideNavigation isExpanded={true} ariaLabel=\"Main side navigation\">\n <SideNavigation.CategoryHeader>AuraDB</SideNavigation.CategoryHeader>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-instances')}\n isActive={isSelected === 'aura-db-instances'}\n label=\"Instances\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-connect')}\n isActive={isSelected === 'aura-db-connect'}\n label=\"Connect\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-python')}\n isActive={isSelected === 'aura-db-python'}\n label=\"Python\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SpotlightTarget\n id={targetId}\n hasPulse={!props.isChromatic}\n borderRadius={4}\n indicatorVariant=\"point\"\n indicatorPlacement=\"top-right\"\n shouldRenderAsChild\n >\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-javascript')}\n isActive={isSelected === 'aura-db-javascript'}\n label=\"JavaScript\"\n />\n </SpotlightTarget>\n </SideNavigation.ListItem>\n <SideNavigation.CategoryHeader>AuraDS</SideNavigation.CategoryHeader>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-ds-instances')}\n isActive={isSelected === 'aura-ds-instances'}\n label=\"Instances\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-ds-getting-started')}\n isActive={isSelected === 'aura-ds-getting-started'}\n label=\"Getting Started\"\n />\n </SideNavigation.ListItem>\n </SideNavigation>\n <div className=\"w-full h-full flex flex-col items-center justify-center rounded-md p-token-16\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n </div>\n <Spotlight\n placement=\"top-end-top-start\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"spotlight-in-side-nav.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-in-side-nav.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,cAAc,EACd,SAAS,EACT,eAAe,EACf,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAC1C,mBAAmB,CACpB,CAAC;IACF,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,EAAE;QACnC,aAAa,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,gBAAgB,aAC7B,MAAC,cAAc,IAAC,UAAU,EAAE,IAAI,EAAE,SAAS,EAAC,sBAAsB,aAChE,KAAC,cAAc,CAAC,cAAc,yBAAuC,EACrE,KAAC,cAAc,CAAC,QAAQ,cACtB,KAAC,cAAc,CAAC,OAAO,IACrB,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAC/C,QAAQ,EAAE,UAAU,KAAK,mBAAmB,EAC5C,KAAK,EAAC,WAAW,GACjB,GACsB,EAC1B,KAAC,cAAc,CAAC,QAAQ,cACtB,KAAC,cAAc,CAAC,OA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,CAAC,QAAQ,CAAC,mCAE1C,GACX,EACN,MAAC,SAAS,IACR,SAAS,EAAC,mBAAmB,EAC7B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n SideNavigation,\n Spotlight,\n SpotlightTarget,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setActiveSpotlight, setIsOpen } = useSpotlightContext();\n\n const [isSelected, setIsSelected] = useState<string | null>(\n 'aura-db-instances',\n );\n const targetId = `test-target-${themeClassName}`;\n\n const handleClick = (item: string) => {\n setIsSelected(item);\n };\n\n return (\n <div className=\"h-[500px] flex\">\n <SideNavigation isExpanded={true} ariaLabel=\"Main side navigation\">\n <SideNavigation.CategoryHeader>AuraDB</SideNavigation.CategoryHeader>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-instances')}\n isActive={isSelected === 'aura-db-instances'}\n label=\"Instances\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-connect')}\n isActive={isSelected === 'aura-db-connect'}\n label=\"Connect\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-python')}\n isActive={isSelected === 'aura-db-python'}\n label=\"Python\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SpotlightTarget\n id={targetId}\n borderRadius={4}\n indicatorVariant=\"point\"\n indicatorPlacement=\"top-right\"\n shouldRenderAsChild\n >\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-db-javascript')}\n isActive={isSelected === 'aura-db-javascript'}\n label=\"JavaScript\"\n />\n </SpotlightTarget>\n </SideNavigation.ListItem>\n <SideNavigation.CategoryHeader>AuraDS</SideNavigation.CategoryHeader>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-ds-instances')}\n isActive={isSelected === 'aura-ds-instances'}\n label=\"Instances\"\n />\n </SideNavigation.ListItem>\n <SideNavigation.ListItem>\n <SideNavigation.NavItem\n onClick={() => handleClick('aura-ds-getting-started')}\n isActive={isSelected === 'aura-ds-getting-started'}\n label=\"Getting Started\"\n />\n </SideNavigation.ListItem>\n </SideNavigation>\n <div className=\"w-full h-full flex flex-col items-center justify-center rounded-md p-token-16\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n </div>\n <Spotlight\n placement=\"top-end-top-start\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -22,18 +22,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, TextButton, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
24
  import { FingerPrintIconOutline } from '@neo4j-ndl/react/icons';
25
- import { useEffect } from 'react';
26
- const Component = (props) => {
25
+ const Component = () => {
27
26
  const { themeClassName } = useNeedleTheme();
28
27
  const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
29
28
  const targetId = `test-target-${themeClassName}`;
30
- useEffect(() => {
31
- if (props.isChromatic) {
32
- setActiveSpotlight(targetId);
33
- setIsOpen(true);
34
- }
35
- }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
36
- return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
29
+ return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
37
30
  setIsOpen(false);
38
31
  setActiveSpotlight(null);
39
32
  }, children: "Close" }), children: [_jsx(Spotlight.IconWrapper, { children: _jsx(FingerPrintIconOutline, {}) }), _jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-with-icon.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,SAAS,GAAG,CAAC,KAA+B,EAAE,EAAE;IACpD,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAC7B,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,EAAE,CAAC,kBAAkB,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAEjE,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,WAAW,EAC5B,gBAAgB,EAAC,QAAQ,EACzB,mBAAmB,kBAEnB,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,WAAW,cACpB,KAAC,sBAAsB,KAAG,GACJ,EACxB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { FingerPrintIconOutline } from '@neo4j-ndl/react/icons';\nimport { useEffect } from 'react';\n\nconst Component = (props: { isChromatic: boolean }) => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n useEffect(() => {\n if (props.isChromatic) {\n setActiveSpotlight(targetId);\n setIsOpen(true);\n }\n }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n hasPulse={!props.isChromatic}\n indicatorVariant=\"border\"\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.IconWrapper>\n <FingerPrintIconOutline />\n </Spotlight.IconWrapper>\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"spotlight-with-icon.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,gBAAgB,EAAC,QAAQ,EACzB,mBAAmB,kBAEnB,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,WAAW,cACpB,KAAC,sBAAsB,KAAG,GACJ,EACxB,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { FingerPrintIconOutline } from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n indicatorVariant=\"border\"\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.IconWrapper>\n <FingerPrintIconOutline />\n </Spotlight.IconWrapper>\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, TextButton, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
- import { useEffect } from 'react';
25
- const Component = (props) => {
24
+ const Component = () => {
26
25
  const { themeClassName } = useNeedleTheme();
27
26
  const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
28
27
  const targetId = `test-target-${themeClassName}`;
29
- useEffect(() => {
30
- if (props.isChromatic) {
31
- setActiveSpotlight(targetId);
32
- setIsOpen(true);
33
- }
34
- }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
35
- return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
28
+ return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
36
29
  setIsOpen(false);
37
30
  setActiveSpotlight(null);
38
31
  }, children: "Close" }), children: [_jsx(Spotlight.Image, { src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjY2NjIi8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkV4YW1wbGUgSW1hZ2U8L3RleHQ+PC9zdmc+", alt: "example image" }), _jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-with-image.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-image.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,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AAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useEffect } from 'react';\n\nconst Component = (props: { isChromatic: boolean }) => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n useEffect(() => {\n if (props.isChromatic) {\n setActiveSpotlight(targetId);\n setIsOpen(true);\n }\n }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n hasPulse={!props.isChromatic}\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Image\n src=\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjY2NjIi8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkV4YW1wbGUgSW1hZ2U8L3RleHQ+PC9zdmc+\"\n alt=\"example image\"\n />\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"spotlight-with-image.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-image.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IAAC,EAAE,EAAE,QAAQ,EAAE,mBAAmB,kBAChD,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,KAAK,IACd,GAAG,EAAC,wVAAwV,EAC5V,GAAG,EAAC,eAAe,GACnB,EACF,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget id={targetId} shouldRenderAsChild>\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Image\n src=\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjEwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSIjY2NjIi8+PHRleHQgeD0iNTAlIiB5PSI1MCUiIGZvbnQtZmFtaWx5PSJBcmlhbCIgZm9udC1zaXplPSIxNCIgZmlsbD0iIzMzMyIgdGV4dC1hbmNob3I9Im1pZGRsZSIgZHk9Ii4zZW0iPkV4YW1wbGUgSW1hZ2U8L3RleHQ+PC9zdmc+\"\n alt=\"example image\"\n />\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, TextButton, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
- import { useEffect } from 'react';
25
- const Component = (props) => {
24
+ const Component = () => {
26
25
  const { themeClassName } = useNeedleTheme();
27
26
  const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
28
27
  const targetId = `test-target-${themeClassName}`;
29
- useEffect(() => {
30
- if (props.isChromatic) {
31
- setActiveSpotlight(targetId);
32
- setIsOpen(true);
33
- }
34
- }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
35
- return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
28
+ return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, indicatorVariant: "border", shouldRenderAsChild: true, children: _jsx(TextButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
36
29
  setIsOpen(false);
37
30
  setActiveSpotlight(null);
38
31
  }, children: "Close" }), children: [_jsx(Spotlight.Label, { children: "NEW" }), _jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight-with-label.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,MAAM,SAAS,GAAG,CAAC,KAA+B,EAAE,EAAE;IACpD,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAC7B,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,EAAE,CAAC,kBAAkB,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAEjE,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,QAAQ,EAAE,CAAC,KAAK,CAAC,WAAW,EAC5B,gBAAgB,EAAC,QAAQ,EACzB,mBAAmB,kBAEnB,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,KAAK,sBAAsB,EACtC,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\nimport { useEffect } from 'react';\n\nconst Component = (props: { isChromatic: boolean }) => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n useEffect(() => {\n if (props.isChromatic) {\n setActiveSpotlight(targetId);\n setIsOpen(true);\n }\n }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n hasPulse={!props.isChromatic}\n indicatorVariant=\"border\"\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Label>NEW</Spotlight.Label>\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"spotlight-with-label.story.js","sourceRoot":"","sources":["../../../../src/spotlight/stories/spotlight-with-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,YAAY,EACZ,cAAc,EACd,SAAS,EACT,eAAe,EACf,UAAU,EACV,cAAc,EACd,mBAAmB,GACpB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,QAAQ,CAAC,mCAE1C,EACf,KAAC,eAAe,IACd,EAAE,EAAE,QAAQ,EACZ,gBAAgB,EAAC,QAAQ,EACzB,mBAAmB,kBAEnB,KAAC,UAAU,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,uBAAuB,CAAC,uBAE5C,GACG,EAClB,MAAC,SAAS,IACR,SAAS,EAAC,oBAAoB,EAC9B,MAAM,EAAE,QAAQ,EAChB,OAAO,EACL,KAAC,cAAc,IACb,OAAO,EAAE,GAAG,EAAE;wBACZ,SAAS,CAAC,KAAK,CAAC,CAAC;wBACjB,kBAAkB,CAAC,IAAI,CAAC,CAAC;oBAC3B,CAAC,sBAGc,aAGnB,KAAC,SAAS,CAAC,KAAK,sBAAsB,EACtC,KAAC,SAAS,CAAC,MAAM,mCAAoC,EACrD,KAAC,SAAS,CAAC,IAAI,kCAAiC,IACtC,IACR,CACP,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 {\n FilledButton,\n OutlinedButton,\n Spotlight,\n SpotlightTarget,\n TextButton,\n useNeedleTheme,\n useSpotlightContext,\n} from '@neo4j-ndl/react';\n\nconst Component = () => {\n const { themeClassName } = useNeedleTheme();\n const { setIsOpen, setActiveSpotlight } = useSpotlightContext();\n\n const targetId = `test-target-${themeClassName}`;\n\n return (\n <div className=\"flex justify-center gap-token-64\">\n <FilledButton onClick={() => setActiveSpotlight(targetId)}>\n Activate Spotlight\n </FilledButton>\n <SpotlightTarget\n id={targetId}\n indicatorVariant=\"border\"\n shouldRenderAsChild\n >\n <TextButton onClick={() => alert('Target button clicked')}>\n Target\n </TextButton>\n </SpotlightTarget>\n <Spotlight\n placement=\"bottom-end-top-end\"\n target={targetId}\n actions={\n <OutlinedButton\n onClick={() => {\n setIsOpen(false);\n setActiveSpotlight(null);\n }}\n >\n Close\n </OutlinedButton>\n }\n >\n <Spotlight.Label>NEW</Spotlight.Label>\n <Spotlight.Header>This is a header</Spotlight.Header>\n <Spotlight.Body>This is content</Spotlight.Body>\n </Spotlight>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -21,18 +21,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
21
21
  */
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { FilledButton, OutlinedButton, Spotlight, SpotlightTarget, useNeedleTheme, useSpotlightContext, } from '@neo4j-ndl/react';
24
- import { useEffect } from 'react';
25
- const Component = (props) => {
24
+ const Component = () => {
26
25
  const { themeClassName } = useNeedleTheme();
27
26
  const { setIsOpen, setActiveSpotlight } = useSpotlightContext();
28
27
  const targetId = `test-target-${themeClassName}`;
29
- useEffect(() => {
30
- if (props.isChromatic) {
31
- setActiveSpotlight(targetId);
32
- setIsOpen(true);
33
- }
34
- }, [setActiveSpotlight, setIsOpen, targetId, props.isChromatic]);
35
- return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, hasPulse: !props.isChromatic, shouldRenderAsChild: true, indicatorVariant: "point", indicatorPlacement: "top-right", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
28
+ return (_jsxs("div", { className: "flex justify-center gap-token-64", children: [_jsx(FilledButton, { onClick: () => setActiveSpotlight(targetId), children: "Activate Spotlight" }), _jsx(SpotlightTarget, { id: targetId, shouldRenderAsChild: true, indicatorVariant: "point", indicatorPlacement: "top-right", children: _jsx(FilledButton, { onClick: () => alert('Target button clicked'), children: "Target" }) }), _jsxs(Spotlight, { placement: "bottom-end-top-end", target: targetId, actions: _jsx(OutlinedButton, { onClick: () => {
36
29
  setIsOpen(false);
37
30
  setActiveSpotlight(null);
38
31
  }, children: "Close" }), children: [_jsx(Spotlight.Header, { children: "This is a header" }), _jsx(Spotlight.Body, { children: "This is content" })] })] }));