@neo4j-ndl/react 5.4.2 → 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 (166) hide show
  1. package/lib/cjs/button/ButtonBase.js +2 -2
  2. package/lib/cjs/button/ButtonBase.js.map +1 -1
  3. package/lib/cjs/button/stories/button-leading-icon.story.js +1 -1
  4. package/lib/cjs/button/stories/button-leading-icon.story.js.map +1 -1
  5. package/lib/cjs/button/stories/button-trailing-icon.story.js +31 -0
  6. package/lib/cjs/button/stories/button-trailing-icon.story.js.map +1 -0
  7. package/lib/cjs/button/stories/index.js +5 -1
  8. package/lib/cjs/button/stories/index.js.map +1 -1
  9. package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
  10. package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
  11. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
  12. package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  13. package/lib/cjs/select/stories/select-async.story.js +1 -3
  14. package/lib/cjs/select/stories/select-async.story.js.map +1 -1
  15. package/lib/cjs/select/stories/select-clean.story.js +1 -3
  16. package/lib/cjs/select/stories/select-clean.story.js.map +1 -1
  17. package/lib/cjs/select/stories/select-controlled.story.js +1 -3
  18. package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
  19. package/lib/cjs/select/stories/select-creatable.story.js +1 -3
  20. package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
  21. package/lib/cjs/select/stories/select-custom-label.story.js +1 -3
  22. package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
  23. package/lib/cjs/select/stories/select-default.story.js +1 -3
  24. package/lib/cjs/select/stories/select-default.story.js.map +1 -1
  25. package/lib/cjs/select/stories/select-disabled.story.js +1 -3
  26. package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
  27. package/lib/cjs/select/stories/select-empty.story.js +1 -3
  28. package/lib/cjs/select/stories/select-empty.story.js.map +1 -1
  29. package/lib/cjs/select/stories/select-error-state.story.js +1 -3
  30. package/lib/cjs/select/stories/select-error-state.story.js.map +1 -1
  31. package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -3
  32. package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
  33. package/lib/cjs/select/stories/select-menu-positionings.story.js +1 -5
  34. package/lib/cjs/select/stories/select-menu-positionings.story.js.map +1 -1
  35. package/lib/cjs/select/stories/select-multi.story.js +1 -3
  36. package/lib/cjs/select/stories/select-multi.story.js.map +1 -1
  37. package/lib/cjs/select/stories/select-sizes.story.js +1 -5
  38. package/lib/cjs/select/stories/select-sizes.story.js.map +1 -1
  39. package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
  40. package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
  41. package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js +3 -9
  42. package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
  43. package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js +2 -8
  44. package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
  45. package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js +2 -9
  46. package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
  47. package/lib/cjs/spotlight/stories/spotlight-with-image.story.js +2 -9
  48. package/lib/cjs/spotlight/stories/spotlight-with-image.story.js.map +1 -1
  49. package/lib/cjs/spotlight/stories/spotlight-with-label.story.js +2 -9
  50. package/lib/cjs/spotlight/stories/spotlight-with-label.story.js.map +1 -1
  51. package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js +2 -9
  52. package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
  53. package/lib/cjs/timezone-picker/TimeZonePicker.js +6 -5
  54. package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
  55. package/lib/esm/button/ButtonBase.js +2 -2
  56. package/lib/esm/button/ButtonBase.js.map +1 -1
  57. package/lib/esm/button/stories/button-leading-icon.story.js +2 -2
  58. package/lib/esm/button/stories/button-leading-icon.story.js.map +1 -1
  59. package/lib/esm/button/stories/button-trailing-icon.story.js +29 -0
  60. package/lib/esm/button/stories/button-trailing-icon.story.js.map +1 -0
  61. package/lib/esm/button/stories/index.js +3 -0
  62. package/lib/esm/button/stories/index.js.map +1 -1
  63. package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
  64. package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
  65. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
  66. package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
  67. package/lib/esm/select/stories/select-async.story.js +1 -3
  68. package/lib/esm/select/stories/select-async.story.js.map +1 -1
  69. package/lib/esm/select/stories/select-clean.story.js +1 -3
  70. package/lib/esm/select/stories/select-clean.story.js.map +1 -1
  71. package/lib/esm/select/stories/select-controlled.story.js +1 -3
  72. package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
  73. package/lib/esm/select/stories/select-creatable.story.js +1 -3
  74. package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
  75. package/lib/esm/select/stories/select-custom-label.story.js +1 -3
  76. package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
  77. package/lib/esm/select/stories/select-default.story.js +1 -3
  78. package/lib/esm/select/stories/select-default.story.js.map +1 -1
  79. package/lib/esm/select/stories/select-disabled.story.js +1 -3
  80. package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
  81. package/lib/esm/select/stories/select-empty.story.js +1 -3
  82. package/lib/esm/select/stories/select-empty.story.js.map +1 -1
  83. package/lib/esm/select/stories/select-error-state.story.js +1 -3
  84. package/lib/esm/select/stories/select-error-state.story.js.map +1 -1
  85. package/lib/esm/select/stories/select-inside-dialog.story.js +1 -3
  86. package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
  87. package/lib/esm/select/stories/select-menu-positionings.story.js +1 -5
  88. package/lib/esm/select/stories/select-menu-positionings.story.js.map +1 -1
  89. package/lib/esm/select/stories/select-multi.story.js +1 -3
  90. package/lib/esm/select/stories/select-multi.story.js.map +1 -1
  91. package/lib/esm/select/stories/select-sizes.story.js +1 -5
  92. package/lib/esm/select/stories/select-sizes.story.js.map +1 -1
  93. package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
  94. package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
  95. package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js +4 -10
  96. package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
  97. package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js +3 -9
  98. package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
  99. package/lib/esm/spotlight/stories/spotlight-with-icon.story.js +2 -9
  100. package/lib/esm/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
  101. package/lib/esm/spotlight/stories/spotlight-with-image.story.js +2 -9
  102. package/lib/esm/spotlight/stories/spotlight-with-image.story.js.map +1 -1
  103. package/lib/esm/spotlight/stories/spotlight-with-label.story.js +2 -9
  104. package/lib/esm/spotlight/stories/spotlight-with-label.story.js.map +1 -1
  105. package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js +2 -9
  106. package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
  107. package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
  108. package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
  109. package/lib/types/button/ButtonBase.d.ts +3 -1
  110. package/lib/types/button/ButtonBase.d.ts.map +1 -1
  111. package/lib/types/button/stories/button-trailing-icon.story.d.ts +24 -0
  112. package/lib/types/button/stories/button-trailing-icon.story.d.ts.map +1 -0
  113. package/lib/types/button/stories/index.d.ts +2 -0
  114. package/lib/types/button/stories/index.d.ts.map +1 -1
  115. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +0 -3
  116. package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts.map +1 -1
  117. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +0 -3
  118. package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
  119. package/lib/types/select/stories/select-async.story.d.ts +1 -2
  120. package/lib/types/select/stories/select-async.story.d.ts.map +1 -1
  121. package/lib/types/select/stories/select-clean.story.d.ts +1 -2
  122. package/lib/types/select/stories/select-clean.story.d.ts.map +1 -1
  123. package/lib/types/select/stories/select-controlled.story.d.ts +2 -2
  124. package/lib/types/select/stories/select-controlled.story.d.ts.map +1 -1
  125. package/lib/types/select/stories/select-creatable.story.d.ts +1 -2
  126. package/lib/types/select/stories/select-creatable.story.d.ts.map +1 -1
  127. package/lib/types/select/stories/select-custom-label.story.d.ts +1 -2
  128. package/lib/types/select/stories/select-custom-label.story.d.ts.map +1 -1
  129. package/lib/types/select/stories/select-default.story.d.ts +1 -2
  130. package/lib/types/select/stories/select-default.story.d.ts.map +1 -1
  131. package/lib/types/select/stories/select-disabled.story.d.ts +1 -2
  132. package/lib/types/select/stories/select-disabled.story.d.ts.map +1 -1
  133. package/lib/types/select/stories/select-empty.story.d.ts +1 -2
  134. package/lib/types/select/stories/select-empty.story.d.ts.map +1 -1
  135. package/lib/types/select/stories/select-error-state.story.d.ts +1 -2
  136. package/lib/types/select/stories/select-error-state.story.d.ts.map +1 -1
  137. package/lib/types/select/stories/select-inside-dialog.story.d.ts +1 -2
  138. package/lib/types/select/stories/select-inside-dialog.story.d.ts.map +1 -1
  139. package/lib/types/select/stories/select-menu-positionings.story.d.ts +1 -2
  140. package/lib/types/select/stories/select-menu-positionings.story.d.ts.map +1 -1
  141. package/lib/types/select/stories/select-multi.story.d.ts +1 -2
  142. package/lib/types/select/stories/select-multi.story.d.ts.map +1 -1
  143. package/lib/types/select/stories/select-sizes.story.d.ts +1 -2
  144. package/lib/types/select/stories/select-sizes.story.d.ts.map +1 -1
  145. package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts +1 -3
  146. package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts.map +1 -1
  147. package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts +1 -3
  148. package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts.map +1 -1
  149. package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts +1 -3
  150. package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts.map +1 -1
  151. package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts +1 -3
  152. package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts.map +1 -1
  153. package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts +1 -3
  154. package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts.map +1 -1
  155. package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts +1 -3
  156. package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts.map +1 -1
  157. package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts +1 -3
  158. package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts.map +1 -1
  159. package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
  160. package/package.json +1 -2
  161. package/skills/ndl-react/SKILL.md +2 -2
  162. package/skills/ndl-react/components/filled-button.md +1 -0
  163. package/skills/ndl-react/components/outlined-button.md +1 -0
  164. package/skills/ndl-react/components/select.md +13 -30
  165. package/skills/ndl-react/components/spotlight.md +11 -75
  166. package/skills/ndl-react/components/text-button.md +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"select-async.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-async.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,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxD,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;YACF,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,0CAA0C,EACnD,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW;YACX,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;YACzC,WAAW,EAAE,mBAAmB;SACjC,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 loadOptions = (inputValue: string) => {\n return new Promise<typeof EXAMPLE_OPTIONS>((resolve) => {\n setTimeout(() => {\n const filteredOptions = EXAMPLE_OPTIONS.filter((option) =>\n option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n resolve(filteredOptions);\n }, 1000);\n });\n};\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Start typing to load options dynamically\"\n type=\"async\"\n selectProps={{\n cacheOptions: true,\n defaultOptions: true,\n isClearable: true,\n loadOptions,\n menuIsOpen: props.selectProps?.menuIsOpen,\n placeholder: 'Type to search...',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-async.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-async.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,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxD,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;YACF,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,0CAA0C,EACnD,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW;YACX,WAAW,EAAE,mBAAmB;SACjC,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 loadOptions = (inputValue: string) => {\n return new Promise<typeof EXAMPLE_OPTIONS>((resolve) => {\n setTimeout(() => {\n const filteredOptions = EXAMPLE_OPTIONS.filter((option) =>\n option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n resolve(filteredOptions);\n }, 1000);\n });\n};\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Start typing to load options dynamically\"\n type=\"async\"\n selectProps={{\n cacheOptions: true,\n defaultOptions: true,\n isClearable: true,\n loadOptions,\n placeholder: 'Type to search...',\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", type: "select", isClean: true, isFluid: false, 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-clean.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-clean.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,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,KAAK,EACd,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 type=\"select\"\n isClean={true}\n isFluid={false}\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-clean.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-clean.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,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,KAAK,EACd,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 type=\"select\"\n isClean={true}\n isFluid={false}\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -27,12 +27,10 @@ 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
  const [value, setValue] = useState(EXAMPLE_OPTIONS[0]);
33
32
  return (_jsxs("div", { className: "flex flex-col gap-token-8", children: [_jsx(Select, { label: "Label", type: "select", selectProps: {
34
33
  isMulti: false,
35
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
36
34
  menuPortalTarget: document.querySelector('body'),
37
35
  onChange: (newValue) => newValue && setValue(newValue),
38
36
  options: EXAMPLE_OPTIONS,
@@ -1 +1 @@
1
- {"version":3,"file":"select-controlled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-controlled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,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,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,2BAA2B,aACxC,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,OAAO,EAAE,KAAK;oBACd,UAAU,EAAE,MAAA,KAAK,CAAC,WAAW,0CAAE,UAAU;oBACzC,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;oBAChD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;oBACtD,OAAO,EAAE,eAAe;oBACxB,KAAK,EAAE,KAAK;iBACb,GACD,EACF,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,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 */\nimport { Select, Typography } from '@neo4j-ndl/react';\nimport { 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 [value, setValue] = useState<(typeof EXAMPLE_OPTIONS)[number]>(\n EXAMPLE_OPTIONS[0],\n );\n\n return (\n <div className=\"flex flex-col gap-token-8\">\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isMulti: false,\n menuIsOpen: props.selectProps?.menuIsOpen,\n menuPortalTarget: document.querySelector('body'),\n onChange: (newValue) => newValue && setValue(newValue),\n options: EXAMPLE_OPTIONS,\n value: value,\n }}\n />\n <Typography variant=\"body-small\">\n Value Selected: {JSON.stringify(value)}\n </Typography>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-controlled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-controlled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,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,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,2BAA2B,aACxC,KAAC,MAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,OAAO,EAAE,KAAK;oBACd,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;oBAChD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;oBACtD,OAAO,EAAE,eAAe;oBACxB,KAAK,EAAE,KAAK;iBACb,GACD,EACF,MAAC,UAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,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 */\nimport { Select, Typography } from '@neo4j-ndl/react';\nimport { 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 [value, setValue] = useState<(typeof EXAMPLE_OPTIONS)[number]>(\n EXAMPLE_OPTIONS[0],\n );\n\n return (\n <div className=\"flex flex-col gap-token-8\">\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isMulti: false,\n menuPortalTarget: document.querySelector('body'),\n onChange: (newValue) => newValue && setValue(newValue),\n options: EXAMPLE_OPTIONS,\n value: value,\n }}\n />\n <Typography variant=\"body-small\">\n Value Selected: {JSON.stringify(value)}\n </Typography>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -27,11 +27,9 @@ 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", helpText: "You can create values even if they don't exist as options", type: "creatable", selectProps: {
33
32
  isClearable: true,
34
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
35
33
  options: EXAMPLE_OPTIONS,
36
34
  } }));
37
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-creatable.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-creatable.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,QAAQ,EAAC,2DAA2D,EACpE,IAAI,EAAC,WAAW,EAChB,WAAW,EAAE;YACX,WAAW,EAAE,IAAI;YACjB,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 helpText=\"You can create values even if they don't exist as options\"\n type=\"creatable\"\n selectProps={{\n isClearable: true,\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-creatable.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-creatable.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,QAAQ,EAAC,2DAA2D,EACpE,IAAI,EAAC,WAAW,EAChB,WAAW,EAAE;YACX,WAAW,EAAE,IAAI;YACjB,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 helpText=\"You can create values even if they don't exist as options\"\n type=\"creatable\"\n selectProps={{\n isClearable: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -28,11 +28,9 @@ 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
  return (_jsx(Select, { label: _jsxs("div", { className: "flex flex-row gap-token-4 h-7 items-center", children: ["Custom JSX element", _jsx(QuestionMarkCircleIconOutline, { className: "h-token-16" })] }), helpText: "You can have a custom label with JSX code \uD83D\uDE31", type: "select", selectProps: {
34
33
  defaultValue: EXAMPLE_OPTIONS[1],
35
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
36
34
  options: EXAMPLE_OPTIONS,
37
35
  } }));
38
36
  };
@@ -1 +1 @@
1
- {"version":3,"file":"select-custom-label.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-custom-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,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;AACF,MAAM,SAAS,GAAG,CAAC,KAA0C,EAAE,EAAE;;IAC/D,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EACH,eAAK,SAAS,EAAC,4CAA4C,mCAEzD,KAAC,6BAA6B,IAAC,SAAS,EAAC,YAAY,GAAG,IACpD,EAER,QAAQ,EAAC,wDAA8C,EACvD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,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';\nimport { QuestionMarkCircleIconOutline } from '@neo4j-ndl/react/icons';\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];\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label={\n <div className=\"flex flex-row gap-token-4 h-7 items-center\">\n Custom JSX element\n <QuestionMarkCircleIconOutline className=\"h-token-16\" />\n </div>\n }\n helpText=\"You can have a custom label with JSX code 😱\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n menuIsOpen: props.selectProps?.menuIsOpen,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"select-custom-label.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-custom-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAEvE,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;AACF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,KAAC,MAAM,IACL,KAAK,EACH,eAAK,SAAS,EAAC,4CAA4C,mCAEzD,KAAC,6BAA6B,IAAC,SAAS,EAAC,YAAY,GAAG,IACpD,EAER,QAAQ,EAAC,wDAA8C,EACvD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,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';\nimport { QuestionMarkCircleIconOutline } from '@neo4j-ndl/react/icons';\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];\nconst Component = () => {\n return (\n <Select\n label={\n <div className=\"flex flex-row gap-token-4 h-7 items-center\">\n Custom JSX element\n <QuestionMarkCircleIconOutline className=\"h-token-16\" />\n </div>\n }\n helpText=\"You can have a custom label with JSX code 😱\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -31,10 +31,8 @@ const EXAMPLE_OPTIONS = [
31
31
  },
32
32
  { isDisabled: true, label: 'Disabled database option', value: 'disabled' },
33
33
  ];
34
- const Component = (props) => {
35
- var _a;
34
+ const Component = () => {
36
35
  return (_jsx(Select, { label: "Select an option", helpText: "Help text", type: "select", selectProps: {
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-default.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-default.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;QACE,KAAK,EAAE,gDAAgD;QACvD,KAAK,EAAE,YAAY;KACpB;IACD,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,kBAAkB,EACxB,QAAQ,EAAC,WAAW,EACpB,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 {\n label: 'Really long label that does not fit on one row',\n value: 'long-label',\n },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = (props: React.ComponentProps<typeof Select>) => {\n return (\n <Select\n label=\"Select an option\"\n helpText=\"Help text\"\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-default.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-default.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;QACE,KAAK,EAAE,gDAAgD;QACvD,KAAK,EAAE,YAAY;KACpB;IACD,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,kBAAkB,EACxB,QAAQ,EAAC,WAAW,EACpB,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 {\n label: 'Really long label that does not fit on one row',\n value: 'long-label',\n },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Select an option\"\n helpText=\"Help text\"\n type=\"select\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
@@ -27,11 +27,9 @@ 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
  isDisabled: true,
34
- menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
35
33
  options: EXAMPLE_OPTIONS,
36
34
  } }));
37
35
  };
@@ -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,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,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,QAAQ,EAAE,CAAC,KAAK,CAAC,WAAW,EAC5B,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';\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,EAAE,CAAC;IAC5C,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,GAAG,mBAAmB,EAAE,CAAC;IAEhE,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,WAAW,CAAC,CAAC;IAC3E,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,KAAK,CAAC,WAAW,IAAI,WAAW,EAAE,CAAC;YACrC,kBAAkB,CAAC,QAAQ,CAAC,CAAC;YAC7B,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,EAAE,CAAC,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAE9E,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,4BAElC,EACf,MAAC,MAAM,IACL,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EACpC,SAAS,EAAE,cAAc,aAEzB,KAAC,MAAM,CAAC,MAAM,kDAAgD,EAC9D,MAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,4BAA4B,aACpD,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wLAI/B,iDAAgC,sBACrB,EACb,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,mBAAmB,QACnB,gBAAgB,EAAC,QAAQ,YAEzB,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,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,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,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IAC/D,MAAM,QAAQ,GAAG,eAAe,cAAc,EAAE,CAAC;IAEjD,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,4BAElC,EACf,MAAC,MAAM,IACL,MAAM,EAAE,WAAW,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EACpC,SAAS,EAAE,cAAc,aAEzB,KAAC,MAAM,CAAC,MAAM,kDAAgD,EAC9D,MAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,4BAA4B,aACpD,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,wLAI/B,iDAAgC,sBACrB,EACb,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,mBAAmB,QACnB,gBAAgB,EAAC,QAAQ,YAEzB,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,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 { 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" })] })] }));