@neo4j-ndl/react 4.16.7 → 4.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/color-picker/ColorPicker.js +3 -1
- package/lib/cjs/color-picker/ColorPicker.js.map +1 -1
- package/lib/cjs/color-picker/stories/color-picker-dialog.story.js +40 -0
- package/lib/cjs/color-picker/stories/color-picker-dialog.story.js.map +1 -0
- package/lib/cjs/color-picker/stories/color-picker-popover.story.js +32 -0
- package/lib/cjs/color-picker/stories/color-picker-popover.story.js.map +1 -0
- package/lib/cjs/color-picker/stories/index.js +9 -1
- package/lib/cjs/color-picker/stories/index.js.map +1 -1
- package/lib/cjs/popover/use-popover.js +1 -1
- package/lib/cjs/popover/use-popover.js.map +1 -1
- package/lib/cjs/select/Select.js +2 -0
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/esm/color-picker/ColorPicker.js +3 -1
- package/lib/esm/color-picker/ColorPicker.js.map +1 -1
- package/lib/esm/color-picker/stories/color-picker-dialog.story.js +38 -0
- package/lib/esm/color-picker/stories/color-picker-dialog.story.js.map +1 -0
- package/lib/esm/color-picker/stories/color-picker-popover.story.js +30 -0
- package/lib/esm/color-picker/stories/color-picker-popover.story.js.map +1 -0
- package/lib/esm/color-picker/stories/index.js +6 -0
- package/lib/esm/color-picker/stories/index.js.map +1 -1
- package/lib/esm/popover/use-popover.js +1 -1
- package/lib/esm/popover/use-popover.js.map +1 -1
- package/lib/esm/select/Select.js +2 -0
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/types/color-picker/ColorPicker.d.ts +4 -0
- package/lib/types/color-picker/ColorPicker.d.ts.map +1 -1
- package/lib/types/color-picker/stories/color-picker-dialog.story.d.ts +24 -0
- package/lib/types/color-picker/stories/color-picker-dialog.story.d.ts.map +1 -0
- package/lib/types/color-picker/stories/color-picker-popover.story.d.ts +24 -0
- package/lib/types/color-picker/stories/color-picker-popover.story.d.ts.map +1 -0
- package/lib/types/color-picker/stories/index.d.ts +4 -0
- package/lib/types/color-picker/stories/index.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts.map +1 -1
- package/package.json +5 -2
- package/skills/ndl-react/SKILL.md +152 -0
- package/skills/ndl-react/components/accordion.md +386 -0
- package/skills/ndl-react/components/ai/code-preview.md +128 -0
- package/skills/ndl-react/components/ai/file-tag.md +90 -0
- package/skills/ndl-react/components/ai/image-tag.md +91 -0
- package/skills/ndl-react/components/ai/more-files.md +73 -0
- package/skills/ndl-react/components/ai/presence.md +54 -0
- package/skills/ndl-react/components/ai/preview.md +498 -0
- package/skills/ndl-react/components/ai/prompt.md +362 -0
- package/skills/ndl-react/components/ai/reasoning.md +95 -0
- package/skills/ndl-react/components/ai/response.md +1109 -0
- package/skills/ndl-react/components/ai/suggestion.md +84 -0
- package/skills/ndl-react/components/ai/thinking.md +43 -0
- package/skills/ndl-react/components/ai/tool-call.md +43 -0
- package/skills/ndl-react/components/ai/user-bubble.md +187 -0
- package/skills/ndl-react/components/avatar.md +169 -0
- package/skills/ndl-react/components/banner.md +225 -0
- package/skills/ndl-react/components/box.md +39 -0
- package/skills/ndl-react/components/breadcrumbs.md +245 -0
- package/skills/ndl-react/components/checkbox.md +269 -0
- package/skills/ndl-react/components/clean-icon-button.md +294 -0
- package/skills/ndl-react/components/clipboard-button.md +154 -0
- package/skills/ndl-react/components/code-block.md +276 -0
- package/skills/ndl-react/components/code.md +68 -0
- package/skills/ndl-react/components/color-picker.md +131 -0
- package/skills/ndl-react/components/conditional-wrap.md +46 -0
- package/skills/ndl-react/components/data-grid.md +3121 -0
- package/skills/ndl-react/components/date-picker.md +652 -0
- package/skills/ndl-react/components/dialog.md +485 -0
- package/skills/ndl-react/components/dismissible-tag.md +136 -0
- package/skills/ndl-react/components/divider.md +96 -0
- package/skills/ndl-react/components/drawer.md +543 -0
- package/skills/ndl-react/components/dropdown-button.md +161 -0
- package/skills/ndl-react/components/dropzone.md +371 -0
- package/skills/ndl-react/components/filled-button.md +26 -0
- package/skills/ndl-react/components/flex.md +82 -0
- package/skills/ndl-react/components/graph-label.md +167 -0
- package/skills/ndl-react/components/icon-button-array.md +187 -0
- package/skills/ndl-react/components/icon-button.md +193 -0
- package/skills/ndl-react/components/inline-edit.md +209 -0
- package/skills/ndl-react/components/kbd.md +63 -0
- package/skills/ndl-react/components/loading-bar.md +43 -0
- package/skills/ndl-react/components/loading-spinner.md +57 -0
- package/skills/ndl-react/components/logo.md +57 -0
- package/skills/ndl-react/components/menu.md +993 -0
- package/skills/ndl-react/components/modal.md +27 -0
- package/skills/ndl-react/components/next/tree-view.md +966 -0
- package/skills/ndl-react/components/outlined-button.md +26 -0
- package/skills/ndl-react/components/popover.md +283 -0
- package/skills/ndl-react/components/progress-bar.md +70 -0
- package/skills/ndl-react/components/radio.md +150 -0
- package/skills/ndl-react/components/read-only-tag.md +96 -0
- package/skills/ndl-react/components/segmented-control.md +200 -0
- package/skills/ndl-react/components/select-icon-button.md +183 -0
- package/skills/ndl-react/components/select.md +530 -0
- package/skills/ndl-react/components/selectable-tag.md +203 -0
- package/skills/ndl-react/components/side-navigation.md +652 -0
- package/skills/ndl-react/components/skeleton.md +274 -0
- package/skills/ndl-react/components/slider.md +308 -0
- package/skills/ndl-react/components/spotlight.md +796 -0
- package/skills/ndl-react/components/status-indicator.md +57 -0
- package/skills/ndl-react/components/status-label.md +132 -0
- package/skills/ndl-react/components/switch.md +167 -0
- package/skills/ndl-react/components/tabs.md +433 -0
- package/skills/ndl-react/components/tag.md +91 -0
- package/skills/ndl-react/components/text-area.md +178 -0
- package/skills/ndl-react/components/text-button.md +25 -0
- package/skills/ndl-react/components/text-input.md +475 -0
- package/skills/ndl-react/components/text-link.md +119 -0
- package/skills/ndl-react/components/time-picker.md +137 -0
- package/skills/ndl-react/components/timezone-picker.md +496 -0
- package/skills/ndl-react/components/tooltip.md +478 -0
- package/skills/ndl-react/components/tree-view.md +545 -0
- package/skills/ndl-react/components/typography.md +72 -0
- package/skills/ndl-react/components/wizard.md +152 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { ColorPicker, Dialog, FilledButton } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
27
|
+
const handleClick = () => setIsOpen((prev) => !prev);
|
|
28
|
+
const handleClose = () => setIsOpen(false);
|
|
29
|
+
const [color, setColor] = useState({
|
|
30
|
+
a: 1,
|
|
31
|
+
b: 0,
|
|
32
|
+
g: 0,
|
|
33
|
+
r: 0,
|
|
34
|
+
});
|
|
35
|
+
return (_jsxs("div", { className: "n-flex n-items-center n-justify-centern-w-full", children: [_jsx(FilledButton, { onClick: handleClick, htmlAttributes: { 'aria-haspopup': 'dialog' }, children: "Open Dialog" }), _jsxs(Dialog, { onClose: handleClose, isOpen: isOpen, children: [_jsx(Dialog.Header, { children: "Header" }), _jsx(Dialog.Content, { className: "n-max-h-96 n-overflow-y-auto", children: _jsx(ColorPicker, { color: color, onChange: (newColor) => setColor(newColor.rgb), floatingStrategy: "fixed" }) })] })] }));
|
|
36
|
+
};
|
|
37
|
+
export default Component;
|
|
38
|
+
//# sourceMappingURL=color-picker-dialog.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker-dialog.story.js","sourceRoot":"","sources":["../../../../src/color-picker/stories/color-picker-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAU,KAAK,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IACrD,MAAM,WAAW,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAE3C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC;QACjC,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL,CAAC,CAAC;IAEH,OAAO,CACL,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,YAAY,IACX,OAAO,EAAE,WAAW,EACpB,cAAc,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,4BAGhC,EACf,MAAC,MAAM,IAAC,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,aAC1C,KAAC,MAAM,CAAC,MAAM,yBAAuB,EACrC,KAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,8BAA8B,YACtD,KAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,EAC9C,gBAAgB,EAAC,OAAO,GACxB,GACa,IACV,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 { ColorPicker, Dialog, FilledButton } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isOpen, setIsOpen] = useState<boolean>(false);\n const handleClick = () => setIsOpen((prev) => !prev);\n const handleClose = () => setIsOpen(false);\n\n const [color, setColor] = useState({\n a: 1,\n b: 0,\n g: 0,\n r: 0,\n });\n\n return (\n <div className=\"n-flex n-items-center n-justify-centern-w-full\">\n <FilledButton\n onClick={handleClick}\n htmlAttributes={{ 'aria-haspopup': 'dialog' }}\n >\n Open Dialog\n </FilledButton>\n <Dialog onClose={handleClose} isOpen={isOpen}>\n <Dialog.Header>Header</Dialog.Header>\n <Dialog.Content className=\"n-max-h-96 n-overflow-y-auto\">\n <ColorPicker\n color={color}\n onChange={(newColor) => setColor(newColor.rgb)}\n floatingStrategy=\"fixed\"\n />\n </Dialog.Content>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { ColorPicker, FilledButton, Popover } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs(Popover, { children: [_jsx(Popover.Trigger, { hasButtonWrapper: true, children: _jsx(FilledButton, { children: "Open Popover" }) }), _jsxs(Popover.Content, { className: "n-overflow-y-auto n-overflow-x-hidden n-p-4 n-max-h-64", children: ["Popover content", _jsx(ColorPicker, { color: "#ff0000", onChange: () => {
|
|
26
|
+
console.info('color changed');
|
|
27
|
+
}, floatingStrategy: "fixed", portalTarget: document.body })] })] }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=color-picker-popover.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker-popover.story.js","sourceRoot":"","sources":["../../../../src/color-picker/stories/color-picker-popover.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,OAAO,eACN,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,KAAC,YAAY,+BAA4B,GACzB,EAClB,MAAC,OAAO,CAAC,OAAO,IAAC,SAAS,EAAC,wDAAwD,gCAEjF,KAAC,WAAW,IACV,KAAK,EAAC,SAAS,EACf,QAAQ,EAAE,GAAG,EAAE;4BACb,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;wBAChC,CAAC,EACD,gBAAgB,EAAC,OAAO,EACxB,YAAY,EAAE,QAAQ,CAAC,IAAI,GAC3B,IACc,IACV,CACX,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 { ColorPicker, FilledButton, Popover } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Popover>\n <Popover.Trigger hasButtonWrapper>\n <FilledButton>Open Popover</FilledButton>\n </Popover.Trigger>\n <Popover.Content className=\"n-overflow-y-auto n-overflow-x-hidden n-p-4 n-max-h-64\">\n Popover content\n <ColorPicker\n color=\"#ff0000\"\n onChange={() => {\n console.info('color changed');\n }}\n floatingStrategy=\"fixed\"\n portalTarget={document.body}\n />\n </Popover.Content>\n </Popover>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -21,11 +21,17 @@
|
|
|
21
21
|
export { default as ColorPickerDefault } from './color-picker-default.story';
|
|
22
22
|
export { default as ColorPickerWithoutEyeDropper } from './color-picker-without-eyedropper.story';
|
|
23
23
|
export { default as ColorPickerCustomSwatches } from './color-picker-custom-swatches.story';
|
|
24
|
+
export { default as ColorPickerDialog } from './color-picker-dialog.story';
|
|
25
|
+
export { default as ColorPickerPopover } from './color-picker-popover.story';
|
|
24
26
|
import { removeLicenseHeader } from '../../_common/export-stories-utils';
|
|
25
27
|
import ColorPickerCustomSwatchesSourceRaw from './color-picker-custom-swatches.story.tsx?raw';
|
|
26
28
|
import ColorPickerDefaultSourceRaw from './color-picker-default.story.tsx?raw';
|
|
29
|
+
import ColorPickerDialogSourceRaw from './color-picker-dialog.story.tsx?raw';
|
|
30
|
+
import ColorPickerPopoverSourceRaw from './color-picker-popover.story.tsx?raw';
|
|
27
31
|
import ColorPickerWithoutEyeDropperSourceRaw from './color-picker-without-eyedropper.story.tsx?raw';
|
|
28
32
|
export const ColorPickerDefaultSource = removeLicenseHeader(ColorPickerDefaultSourceRaw);
|
|
29
33
|
export const ColorPickerWithoutEyeDropperSource = removeLicenseHeader(ColorPickerWithoutEyeDropperSourceRaw);
|
|
30
34
|
export const ColorPickerCustomSwatchesSource = removeLicenseHeader(ColorPickerCustomSwatchesSourceRaw);
|
|
35
|
+
export const ColorPickerDialogSource = removeLicenseHeader(ColorPickerDialogSourceRaw);
|
|
36
|
+
export const ColorPickerPopoverSource = removeLicenseHeader(ColorPickerPopoverSourceRaw);
|
|
31
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/color-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/color-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,kCAAkC,MAAM,8CAA8C,CAAC;AAC9F,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAC/E,OAAO,0BAA0B,MAAM,qCAAqC,CAAC;AAC7E,OAAO,2BAA2B,MAAM,sCAAsC,CAAC;AAC/E,OAAO,qCAAqC,MAAM,iDAAiD,CAAC;AAEpG,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,kCAAkC,GAAG,mBAAmB,CACnE,qCAAqC,CACtC,CAAC;AACF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,kCAAkC,CACnC,CAAC;AACF,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CACxD,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as ColorPickerDefault } from './color-picker-default.story';\nexport { default as ColorPickerWithoutEyeDropper } from './color-picker-without-eyedropper.story';\nexport { default as ColorPickerCustomSwatches } from './color-picker-custom-swatches.story';\nexport { default as ColorPickerDialog } from './color-picker-dialog.story';\nexport { default as ColorPickerPopover } from './color-picker-popover.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport ColorPickerCustomSwatchesSourceRaw from './color-picker-custom-swatches.story.tsx?raw';\nimport ColorPickerDefaultSourceRaw from './color-picker-default.story.tsx?raw';\nimport ColorPickerDialogSourceRaw from './color-picker-dialog.story.tsx?raw';\nimport ColorPickerPopoverSourceRaw from './color-picker-popover.story.tsx?raw';\nimport ColorPickerWithoutEyeDropperSourceRaw from './color-picker-without-eyedropper.story.tsx?raw';\n\nexport const ColorPickerDefaultSource = removeLicenseHeader(\n ColorPickerDefaultSourceRaw,\n);\nexport const ColorPickerWithoutEyeDropperSource = removeLicenseHeader(\n ColorPickerWithoutEyeDropperSourceRaw,\n);\nexport const ColorPickerCustomSwatchesSource = removeLicenseHeader(\n ColorPickerCustomSwatchesSourceRaw,\n);\nexport const ColorPickerDialogSource = removeLicenseHeader(\n ColorPickerDialogSourceRaw,\n);\nexport const ColorPickerPopoverSource = removeLicenseHeader(\n ColorPickerPopoverSourceRaw,\n);\n"]}
|
|
@@ -41,6 +41,7 @@ export function usePopover({ isInitialOpen = false, placement = 'bottom', isOpen
|
|
|
41
41
|
fallbackAxisSideDirection: 'end',
|
|
42
42
|
padding: 5,
|
|
43
43
|
}),
|
|
44
|
+
shift(),
|
|
44
45
|
...(shouldConstrainSize
|
|
45
46
|
? [
|
|
46
47
|
size({
|
|
@@ -54,7 +55,6 @@ export function usePopover({ isInitialOpen = false, placement = 'bottom', isOpen
|
|
|
54
55
|
}),
|
|
55
56
|
]
|
|
56
57
|
: []),
|
|
57
|
-
shift(),
|
|
58
58
|
],
|
|
59
59
|
// Floating UI calls this when interactions (useClick, useDismiss, etc.)
|
|
60
60
|
// trigger an open/close. We always sync internal state so uncontrolled
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-popover.js","sourceRoot":"","sources":["../../../src/popover/use-popover.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,UAAU,EACV,IAAI,EAEJ,MAAM,EAGN,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,cAAc,EACd,UAAU,EACV,WAAW,EACX,eAAe,EAEf,OAAO,EACP,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AA+C1C,MAAM,UAAU,UAAU,CAAC,EACzB,aAAa,GAAG,KAAK,EACrB,SAAS,GAAG,QAAQ,EACpB,MAAM,EAAE,cAAc,EACtB,YAAY,EAAE,iBAAiB,EAC/B,YAAY,GAAG,EAAE,EACjB,aAAa,EACb,cAAc,EACd,2BAA2B,EA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WAAW,GAAG,cAAc,CAAC,OAAO,EAAE;QAC1C,OAAO,EAAE,cAAc,KAAK,SAAS;QACrC,CAAC,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,CAAC;QACpB,CAAC,EAAE,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,CAAC;KACrB,CAAC,CAAC;IAEH,MAAM,YAAY,GAAG,eAAe,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;IAE1E,MAAM,EAAE,MAAM,EAAE,gBAAgB,EAAE,GAAG,mBAAmB,CAAC,OAAO,EAAE;QAChE,QAAQ,EAAE,MAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,mCAAI,CAAC;KAC7D,CAAC,CAAC;IAEH,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,+CACD,IAAI,GACJ,YAAY,KACf,2BAA2B;QAC3B,aAAa;QACb,YAAY;QACZ,MAAM;QACN,UAAU;QACV,OAAO;QACP,WAAW;QACX,gBAAgB;QAChB,UAAU;QACV,kBAAkB;QAClB,gBAAgB,IAChB,EACF;QACE,MAAM;QACN,YAAY;QACZ,IAAI;QACJ,gBAAgB;QAChB,OAAO;QACP,aAAa;QACb,2BAA2B;QAC3B,kBAAkB;QAClB,YAAY;QACZ,UAAU;QACV,WAAW;KACZ,CACF,CAAC;AACJ,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 {\n autoUpdate,\n flip,\n type FloatingFocusManagerProps,\n offset,\n type OffsetOptions,\n type Placement,\n shift,\n size,\n useClick,\n useClientPoint,\n useDismiss,\n useFloating,\n useInteractions,\n type UseInteractionsReturn,\n useRole,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport { useMemo, useState } from 'react';\n\nexport interface PopoverOptions {\n isInitialOpen?: boolean;\n placement?: Placement;\n isOpen?: boolean;\n onOpenChange?: (open: boolean, event?: Event) => void;\n offsetOption?: OffsetOptions;\n anchorElement?: Element | null;\n anchorPosition?: {\n x: number;\n y: number;\n };\n anchorElementAsPortalAnchor?: boolean;\n shouldCaptureFocus?: boolean;\n initialFocus?: number | React.RefObject<HTMLElement | null>;\n role?:\n | 'tooltip'\n | 'dialog'\n | 'alertdialog'\n | 'menu'\n | 'listbox'\n | 'grid'\n | 'tree';\n closeOnClickOutside?: boolean;\n closeOnReferencePress?: boolean;\n returnFocus?: FloatingFocusManagerProps['returnFocus'];\n strategy?: 'fixed' | 'absolute';\n isPortaled?: boolean;\n shouldConstrainSize?: boolean;\n}\n\nexport interface UsePopoverReturn\n extends UseInteractionsReturn, ReturnType<typeof useFloating> {\n isOpen: boolean;\n labelId: string | undefined;\n descriptionId: string | undefined;\n transitionStyles: React.CSSProperties;\n setLabelId: (labelId: string | undefined) => void;\n setDescriptionId: (descriptionId: string | undefined) => void;\n anchorElementAsPortalAnchor: boolean | undefined;\n shouldCaptureFocus: boolean | undefined;\n initialFocus: number | React.RefObject<HTMLElement | null> | undefined;\n isPortaled: boolean;\n returnFocus: FloatingFocusManagerProps['returnFocus'];\n}\n\nexport function usePopover({\n isInitialOpen = false,\n placement = 'bottom',\n isOpen: controlledOpen,\n onOpenChange: setControlledOpen,\n offsetOption = 10,\n anchorElement,\n anchorPosition,\n anchorElementAsPortalAnchor,\n shouldCaptureFocus,\n initialFocus,\n role: roleProp,\n closeOnClickOutside,\n closeOnReferencePress,\n returnFocus,\n strategy = 'absolute',\n isPortaled = true,\n shouldConstrainSize = false,\n}: PopoverOptions = {}): UsePopoverReturn {\n // Internal state for uncontrolled mode (no `isOpen` prop provided).\n const [isOpenUncontrolled, setIsOpenUncontrolled] = useState(isInitialOpen);\n const [labelId, setLabelId] = useState<string | undefined>();\n const [descriptionId, setDescriptionId] = useState<string | undefined>();\n\n // Controlled/uncontrolled pattern: prefer the consumer-provided `isOpen`,\n // falling back to internal state when not provided.\n const isOpen = controlledOpen ?? isOpenUncontrolled;\n\n const data = useFloating({\n elements: {\n reference: anchorElement,\n },\n middleware: [\n offset(offsetOption),\n flip({\n crossAxis: placement.includes('-'),\n fallbackAxisSideDirection: 'end',\n padding: 5,\n }),\n shift(),\n ...(shouldConstrainSize\n ? [\n size({\n apply({ availableHeight, availableWidth, elements }) {\n Object.assign(elements.floating.style, {\n maxHeight: `${availableHeight}px`,\n maxWidth: `${availableWidth}px`,\n });\n },\n padding: 5,\n }),\n ]\n : []),\n ],\n // Floating UI calls this when interactions (useClick, useDismiss, etc.)\n // trigger an open/close. We always sync internal state so uncontrolled\n // mode works, and notify the consumer callback exactly once if provided.\n onOpenChange: (open, event) => {\n setIsOpenUncontrolled(open);\n setControlledOpen?.(open, event);\n },\n open: isOpen,\n placement: placement,\n strategy,\n whileElementsMounted: autoUpdate,\n });\n const context = data.context;\n\n // Only enable built-in click-to-toggle in uncontrolled mode. In controlled\n // mode the consumer owns the open state and wires up their own trigger.\n const click = useClick(context, {\n enabled: controlledOpen === undefined,\n });\n\n const dismiss = useDismiss(context, {\n outsidePress: closeOnClickOutside,\n referencePress: closeOnReferencePress,\n });\n const role = useRole(context, {\n role: roleProp,\n });\n\n const clientPoint = useClientPoint(context, {\n enabled: anchorPosition !== undefined,\n x: anchorPosition?.x,\n y: anchorPosition?.y,\n });\n\n const interactions = useInteractions([click, dismiss, role, clientPoint]);\n\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n return useMemo(\n () => ({\n ...data,\n ...interactions,\n anchorElementAsPortalAnchor,\n descriptionId,\n initialFocus,\n isOpen,\n isPortaled,\n labelId,\n returnFocus,\n setDescriptionId,\n setLabelId,\n shouldCaptureFocus,\n transitionStyles,\n }),\n [\n isOpen,\n interactions,\n data,\n transitionStyles,\n labelId,\n descriptionId,\n anchorElementAsPortalAnchor,\n shouldCaptureFocus,\n initialFocus,\n isPortaled,\n returnFocus,\n ],\n );\n}\n"]}
|
package/lib/esm/select/Select.js
CHANGED
|
@@ -30,6 +30,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
30
30
|
* You should have received a copy of the GNU General Public License
|
|
31
31
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
32
32
|
*/
|
|
33
|
+
import { tokens } from '@neo4j-ndl/base';
|
|
33
34
|
import classNames from 'classnames';
|
|
34
35
|
import { useEffect, useId, useMemo, useState } from 'react';
|
|
35
36
|
import ReactSelect from 'react-select';
|
|
@@ -79,6 +80,7 @@ const customStyles = () => {
|
|
|
79
80
|
maxHeight: provided.maxHeight,
|
|
80
81
|
minHeight: provided.minHeight,
|
|
81
82
|
}),
|
|
83
|
+
menuPortal: (provided) => (Object.assign(Object.assign({}, provided), { zIndex: tokens.zIndex.popover })),
|
|
82
84
|
option: () => ({}),
|
|
83
85
|
placeholder: () => ({}),
|
|
84
86
|
singleValue: () => ({}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,WAA+B,MAAM,cAAc,C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AC,UAAU;QACtC,WAAW,EAAE,OAAO;QACpB,eAAe,EAAE,OAAO,CAAC,SAAS,CAAC;QACnC,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,WAAW,CAAC,OAAO;QAChC,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAEjB,OAAO,CAAC,KAAK,CAAC,IAAI,gBAAO,OAAO,EAAE,UAAU,YAAG,KAAK,GAAS,EAC7D,aAAa,EACb,OAAO,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,SAAS,CAAC,KAAK,KAAK,IAAI,CACpD,KAAC,UAAU,IACT,OAAO,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,EACxD,SAAS,EAAC,cAAc,EACxB,cAAc,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,YAEjC,QAAQ,GACE,CACd,EACA,OAAO,CAAC,SAAS,CAAC,IAAI,CACrB,eAAK,SAAS,EAAC,gDAAgD,aAC7D,KAAC,0BAA0B,IACzB,SAAS,EAAC,gBAAgB,EAC1B,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,GAC9C,EACF,eAAM,EAAE,EAAE,WAAW,EAAE,SAAS,EAAC,6BAA6B,YAC3D,SAAS,GACL,IACH,CACP,KACS,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useMemo, useState } from 'react';\nimport ReactSelect, { type GroupBase } from 'react-select';\nimport AsyncSelect from 'react-select/async';\n/** Different types of select components */\nimport Creatable from 'react-select/creatable';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { Typography } from '../typography';\nimport {\n CustomClearIndication,\n CustomControl,\n CustomIndicatorsContainer,\n CustomInput,\n CustomMenu,\n CustomMenuList,\n CustomMenuPortal,\n CustomMultiValue,\n CustomOption,\n CustomPlaceholder,\n CustomSingleValue,\n CustomValueContainer,\n DropdownIndicatorCurrying,\n} from './Overrides';\nimport { type SelectOverrideCustomProps, type SelectProps } from './types';\n\n/**\n *\n *\n * Helpers\n *\n *\n */\n\nconst overrideComponents = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>(\n props: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>,\n) =>\n ({\n ClearIndicator: CustomClearIndication(props),\n Control: CustomControl(props),\n DropdownIndicator: DropdownIndicatorCurrying(props),\n IndicatorSeparator: null,\n IndicatorsContainer: CustomIndicatorsContainer(props),\n Input: CustomInput(props),\n Menu: CustomMenu(props),\n MenuList: CustomMenuList(props),\n MenuPortal: CustomMenuPortal(props),\n MultiValue: CustomMultiValue(props),\n Option: CustomOption(props),\n Placeholder: CustomPlaceholder(props),\n SingleValue: CustomSingleValue(props),\n ValueContainer: CustomValueContainer(props),\n }) as SelectProps<\n OptionType,\n IsMulti,\n GroupType\n >['selectProps']['components'];\n\nconst customStyles = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>() => {\n return {\n clearIndicator: () => ({}),\n control: () => ({}),\n dropdownIndicator: () => ({}),\n indicatorsContainer: () => ({}),\n input: () => ({}),\n menu: (provided) => ({\n bottom: provided.bottom,\n top: provided.top,\n }),\n menuList: (provided) => ({\n maxHeight: provided.maxHeight,\n minHeight: provided.minHeight,\n }),\n option: () => ({}),\n placeholder: () => ({}),\n singleValue: () => ({}),\n valueContainer: (provided) => ({\n ...provided,\n padding: '0',\n }),\n } as SelectProps<OptionType, IsMulti, GroupType>['selectProps']['styles'];\n};\n\nexport const Select = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n T extends React.ElementType = 'div',\n>({\n as,\n label,\n helpText,\n errorText,\n isFluid = true,\n size = 'medium',\n type = 'select',\n ariaLabel,\n selectProps = {},\n isClean = false,\n isDisabled,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SelectProps<OptionType, IsMulti, GroupType>>) => {\n const isInsideDialog = useIsInsideDialog();\n const menuPosition = isInsideDialog ? 'fixed' : 'absolute';\n const identifier = useId();\n const helpTextId = useId();\n const errorTextId = useId();\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const handleMenuOpen = () => {\n setIsMenuOpen(true);\n if (selectProps.onMenuOpen) {\n selectProps.onMenuOpen();\n }\n };\n\n const handleMenuClose = () => {\n setIsMenuOpen(false);\n if (selectProps.onMenuClose) {\n selectProps.onMenuClose();\n }\n };\n\n // Handle Escape and Enter key to prevent it from bubbling up to dialog\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n (event.key === 'Escape' && isMenuOpen) ||\n (event.key === 'Enter' && isMenuOpen)\n ) {\n event.stopPropagation();\n }\n\n if (selectProps.onKeyDown) {\n selectProps.onKeyDown(event);\n }\n };\n\n const Component: React.ElementType = as ?? 'div';\n\n const ComponentOverrides = useMemo(\n () =>\n overrideComponents<OptionType, IsMulti, GroupType>({\n errorText,\n errorTextId,\n helpText,\n helpTextId,\n isClean,\n size,\n }),\n [errorText, errorTextId, helpText, helpTextId, size, isClean],\n );\n\n const StyleOverrides = useMemo(\n () => customStyles<OptionType, IsMulti, GroupType>(),\n [],\n );\n\n useEffect(() => {\n if (label === undefined && ariaLabel === undefined) {\n needleWarningMessage(\n 'A Select needs to have a label or an aria label to be accessible. link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n }, [label, ariaLabel]);\n\n let SelectElement: React.JSX.Element;\n switch (type) {\n case 'async': {\n SelectElement = (\n <AsyncSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n aria-label={ariaLabel}\n aria-invalid={Boolean(errorText)}\n {...selectProps}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n }\n case 'creatable':\n SelectElement = (\n <Creatable\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n aria-invalid={Boolean(errorText)}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n default:\n SelectElement = (\n <ReactSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n aria-invalid={Boolean(errorText)}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n }\n\n const classes = classNames('ndl-select', className, {\n 'ndl-creatable': type === 'creatable',\n 'ndl-disabled': selectProps.isDisabled,\n 'ndl-fluid': isFluid,\n 'ndl-has-error': Boolean(errorText),\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-multi': selectProps.isMulti,\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {Boolean(label) && <label htmlFor={identifier}>{label}</label>}\n {SelectElement}\n {Boolean(helpText) && Boolean(errorText) === false && (\n <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-sub-text\"\n htmlAttributes={{ id: helpTextId }}\n >\n {helpText}\n </Typography>\n )}\n {Boolean(errorText) && (\n <div className=\"n-flex n-flex-row n-gap-token-4 n-items-center\">\n <ExclamationCircleIconSolid\n className=\"ndl-error-icon\"\n htmlAttributes={{ role: 'img', type: 'solid' }}\n />\n <span id={errorTextId} className=\"ndl-sub-text ndl-error-text\">\n {errorText}\n </span>\n </div>\n )}\n </Component>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"Select.js","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAA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AE,WAAW,EAAE,SAAS,EAAC,6BAA6B,YAC3D,SAAS,GACL,IACH,CACP,KACS,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useMemo, useState } from 'react';\nimport ReactSelect, { type GroupBase } from 'react-select';\nimport AsyncSelect from 'react-select/async';\n/** Different types of select components */\nimport Creatable from 'react-select/creatable';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { needleWarningMessage } from '../_common/utils';\nimport { useIsInsideDialog } from '../dialog/dialog-context';\nimport { ExclamationCircleIconSolid } from '../icons/generated/heroIcons/ExclamationCircleIconSolid';\nimport { Typography } from '../typography';\nimport {\n CustomClearIndication,\n CustomControl,\n CustomIndicatorsContainer,\n CustomInput,\n CustomMenu,\n CustomMenuList,\n CustomMenuPortal,\n CustomMultiValue,\n CustomOption,\n CustomPlaceholder,\n CustomSingleValue,\n CustomValueContainer,\n DropdownIndicatorCurrying,\n} from './Overrides';\nimport { type SelectOverrideCustomProps, type SelectProps } from './types';\n\n/**\n *\n *\n * Helpers\n *\n *\n */\n\nconst overrideComponents = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>(\n props: SelectOverrideCustomProps<OptionType, IsMulti, GroupType>,\n) =>\n ({\n ClearIndicator: CustomClearIndication(props),\n Control: CustomControl(props),\n DropdownIndicator: DropdownIndicatorCurrying(props),\n IndicatorSeparator: null,\n IndicatorsContainer: CustomIndicatorsContainer(props),\n Input: CustomInput(props),\n Menu: CustomMenu(props),\n MenuList: CustomMenuList(props),\n MenuPortal: CustomMenuPortal(props),\n MultiValue: CustomMultiValue(props),\n Option: CustomOption(props),\n Placeholder: CustomPlaceholder(props),\n SingleValue: CustomSingleValue(props),\n ValueContainer: CustomValueContainer(props),\n }) as SelectProps<\n OptionType,\n IsMulti,\n GroupType\n >['selectProps']['components'];\n\nconst customStyles = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n>() => {\n return {\n clearIndicator: () => ({}),\n control: () => ({}),\n dropdownIndicator: () => ({}),\n indicatorsContainer: () => ({}),\n input: () => ({}),\n menu: (provided) => ({\n bottom: provided.bottom,\n top: provided.top,\n }),\n menuList: (provided) => ({\n maxHeight: provided.maxHeight,\n minHeight: provided.minHeight,\n }),\n menuPortal: (provided) => ({\n ...provided,\n zIndex: tokens.zIndex.popover,\n }),\n option: () => ({}),\n placeholder: () => ({}),\n singleValue: () => ({}),\n valueContainer: (provided) => ({\n ...provided,\n padding: '0',\n }),\n } as SelectProps<OptionType, IsMulti, GroupType>['selectProps']['styles'];\n};\n\nexport const Select = <\n OptionType,\n IsMulti extends boolean = false,\n GroupType extends GroupBase<OptionType> = GroupBase<OptionType>,\n T extends React.ElementType = 'div',\n>({\n as,\n label,\n helpText,\n errorText,\n isFluid = true,\n size = 'medium',\n type = 'select',\n ariaLabel,\n selectProps = {},\n isClean = false,\n isDisabled,\n htmlAttributes,\n className,\n style,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, SelectProps<OptionType, IsMulti, GroupType>>) => {\n const isInsideDialog = useIsInsideDialog();\n const menuPosition = isInsideDialog ? 'fixed' : 'absolute';\n const identifier = useId();\n const helpTextId = useId();\n const errorTextId = useId();\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n\n const handleMenuOpen = () => {\n setIsMenuOpen(true);\n if (selectProps.onMenuOpen) {\n selectProps.onMenuOpen();\n }\n };\n\n const handleMenuClose = () => {\n setIsMenuOpen(false);\n if (selectProps.onMenuClose) {\n selectProps.onMenuClose();\n }\n };\n\n // Handle Escape and Enter key to prevent it from bubbling up to dialog\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (\n (event.key === 'Escape' && isMenuOpen) ||\n (event.key === 'Enter' && isMenuOpen)\n ) {\n event.stopPropagation();\n }\n\n if (selectProps.onKeyDown) {\n selectProps.onKeyDown(event);\n }\n };\n\n const Component: React.ElementType = as ?? 'div';\n\n const ComponentOverrides = useMemo(\n () =>\n overrideComponents<OptionType, IsMulti, GroupType>({\n errorText,\n errorTextId,\n helpText,\n helpTextId,\n isClean,\n size,\n }),\n [errorText, errorTextId, helpText, helpTextId, size, isClean],\n );\n\n const StyleOverrides = useMemo(\n () => customStyles<OptionType, IsMulti, GroupType>(),\n [],\n );\n\n useEffect(() => {\n if (label === undefined && ariaLabel === undefined) {\n needleWarningMessage(\n 'A Select needs to have a label or an aria label to be accessible. link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n }, [label, ariaLabel]);\n\n let SelectElement: React.JSX.Element;\n switch (type) {\n case 'async': {\n SelectElement = (\n <AsyncSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n aria-label={ariaLabel}\n aria-invalid={Boolean(errorText)}\n {...selectProps}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n }\n case 'creatable':\n SelectElement = (\n <Creatable\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n aria-invalid={Boolean(errorText)}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n break;\n default:\n SelectElement = (\n <ReactSelect\n name={identifier}\n inputId={identifier}\n isDisabled={Boolean(isDisabled) || selectProps.isDisabled}\n menuPlacement=\"auto\"\n {...selectProps}\n aria-label={ariaLabel}\n aria-invalid={Boolean(errorText)}\n onKeyDown={handleKeyDown}\n onMenuOpen={handleMenuOpen}\n onMenuClose={handleMenuClose}\n menuPosition={selectProps.menuPosition ?? menuPosition}\n hideSelectedOptions={false}\n closeMenuOnSelect={Boolean(selectProps.isMulti) === false}\n styles={{ ...StyleOverrides, ...selectProps.styles }}\n components={{ ...ComponentOverrides, ...selectProps.components }}\n />\n );\n }\n\n const classes = classNames('ndl-select', className, {\n 'ndl-creatable': type === 'creatable',\n 'ndl-disabled': selectProps.isDisabled,\n 'ndl-fluid': isFluid,\n 'ndl-has-error': Boolean(errorText),\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-multi': selectProps.isMulti,\n 'ndl-small': size === 'small',\n });\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n {Boolean(label) && <label htmlFor={identifier}>{label}</label>}\n {SelectElement}\n {Boolean(helpText) && Boolean(errorText) === false && (\n <Typography\n variant={size === 'large' ? 'body-medium' : 'body-small'}\n className=\"ndl-sub-text\"\n htmlAttributes={{ id: helpTextId }}\n >\n {helpText}\n </Typography>\n )}\n {Boolean(errorText) && (\n <div className=\"n-flex n-flex-row n-gap-token-4 n-items-center\">\n <ExclamationCircleIconSolid\n className=\"ndl-error-icon\"\n htmlAttributes={{ role: 'img', type: 'solid' }}\n />\n <span id={errorTextId} className=\"ndl-sub-text ndl-error-text\">\n {errorText}\n </span>\n </div>\n )}\n </Component>\n );\n};\n"]}
|
|
@@ -50,6 +50,10 @@ type ColorPickerProps = {
|
|
|
50
50
|
className?: string;
|
|
51
51
|
/** Additional inline styles to apply to the root color picker container. */
|
|
52
52
|
style?: React.CSSProperties;
|
|
53
|
+
/** The target element to portal the menu to. If not provided, the menu will not be portaled. */
|
|
54
|
+
portalTarget?: HTMLElement | null;
|
|
55
|
+
/** The floating strategy to use for the menu. If not provided, the menu will be positioned absolutely. */
|
|
56
|
+
floatingStrategy?: 'absolute' | 'fixed';
|
|
53
57
|
};
|
|
54
58
|
export declare const ColorPicker: import("react").ForwardRefExoticComponent<ColorPickerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
59
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../src/color-picker/ColorPicker.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,qBAAqB,CAAC;AAG7B,OAAO,EACL,KAAK,QAAQ,EAEb,KAAK,SAAS,EAKd,KAAK,SAAS,EAKf,MAAM,kBAAkB,CAAC;AAS1B;;;;;;;;;;;;GAYG;AACH,KAAK,gBAAgB,GAAG;IACtB,iJAAiJ;IACjJ,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACxC,wHAAwH;IACxH,QAAQ,CAAC,EAAE,CAAC,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC,EAAE,CAAC;IAChD,8GAA8G;IAC9G,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,mKAAmK;IACnK,QAAQ,EAAE,CAAC,QAAQ,EAAE;QACnB,GAAG,EAAE,Q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/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Component;
|
|
24
|
+
//# sourceMappingURL=color-picker-dialog.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker-dialog.story.d.ts","sourceRoot":"","sources":["../../../../src/color-picker/stories/color-picker-dialog.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CAgCd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Component;
|
|
24
|
+
//# sourceMappingURL=color-picker-popover.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-picker-popover.story.d.ts","sourceRoot":"","sources":["../../../../src/color-picker/stories/color-picker-popover.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+CAmBd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -21,7 +21,11 @@
|
|
|
21
21
|
export { default as ColorPickerDefault } from './color-picker-default.story';
|
|
22
22
|
export { default as ColorPickerWithoutEyeDropper } from './color-picker-without-eyedropper.story';
|
|
23
23
|
export { default as ColorPickerCustomSwatches } from './color-picker-custom-swatches.story';
|
|
24
|
+
export { default as ColorPickerDialog } from './color-picker-dialog.story';
|
|
25
|
+
export { default as ColorPickerPopover } from './color-picker-popover.story';
|
|
24
26
|
export declare const ColorPickerDefaultSource: string;
|
|
25
27
|
export declare const ColorPickerWithoutEyeDropperSource: string;
|
|
26
28
|
export declare const ColorPickerCustomSwatchesSource: string;
|
|
29
|
+
export declare const ColorPickerDialogSource: string;
|
|
30
|
+
export declare const ColorPickerPopoverSource: string;
|
|
27
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/color-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/color-picker/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAS7E,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AACF,eAAO,MAAM,kCAAkC,QAE9C,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,uBAAuB,QAEnC,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/select/Select.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAoB,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAK3D,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAoB/D,OAAO,EAAkC,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAuE3E,eAAO,MAAM,MAAM,GACjB,UAAU,EACV,OAAO,SAAS,OAAO,GAAG,KAAK,EAC/B,SAAS,SAAS,SAAS,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC,UAAU,CAAC,EAC/D,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EACnC,2JAiBC,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,4CA8KxE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.9",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -354,7 +354,8 @@
|
|
|
354
354
|
},
|
|
355
355
|
"files": [
|
|
356
356
|
"lib",
|
|
357
|
-
"icons"
|
|
357
|
+
"icons",
|
|
358
|
+
"skills"
|
|
358
359
|
],
|
|
359
360
|
"publishConfig": {
|
|
360
361
|
"access": "public"
|
|
@@ -427,6 +428,8 @@
|
|
|
427
428
|
"scripts": {
|
|
428
429
|
"generate-component": "node ./scripts/component-generator.js",
|
|
429
430
|
"docs:generate": "pnpm --dir ../.. run docs:generate -- --package react",
|
|
431
|
+
"docs:generate-skills": "pnpm --dir ../.. run docs:generate-skills -- --package react",
|
|
432
|
+
"docs:generate-all": "pnpm run docs:generate && pnpm run docs:generate-skills",
|
|
430
433
|
"generate:exports": "node ./scripts/generate-exports.js",
|
|
431
434
|
"check:exports": "node ./scripts/generate-exports.js --check",
|
|
432
435
|
"pretest": "pnpm run lint && pnpm run check:exports",
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ndl-react
|
|
3
|
+
description: >-
|
|
4
|
+
Build and edit UI with the Neo4j Needle React design system
|
|
5
|
+
(@neo4j-ndl/react). Use when adding, composing, or modifying Needle components
|
|
6
|
+
in a React app. Provides per-component props, accessibility requirements, and
|
|
7
|
+
runnable usage examples. Works with any agent that supports skills (Cursor,
|
|
8
|
+
Claude, etc.).
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Neo4j Needle (@neo4j-ndl/react)
|
|
12
|
+
|
|
13
|
+
> 📌 Shipped with `@neo4j-ndl/react`. Once installed into your repo (e.g. via
|
|
14
|
+
> `npx skills add`) this folder is detached from the package — the installed
|
|
15
|
+
> package (TypeScript types in `node_modules/@neo4j-ndl/react`) is the source of
|
|
16
|
+
> truth.
|
|
17
|
+
|
|
18
|
+
Use Neo4j Needle components instead of hand-rolling equivalent UI.
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
- Import the base stylesheet once at the app root (if not already wired):
|
|
23
|
+
`import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';`
|
|
24
|
+
- Import components from `@neo4j-ndl/react`; some live under the
|
|
25
|
+
`@neo4j-ndl/react/next` and `@neo4j-ndl/react/ai` subpaths (see the catalog).
|
|
26
|
+
- Prefer icons exported from `@neo4j-ndl/react/icons` (e.g.
|
|
27
|
+
`MagnifyingGlassIconOutline`) for design-system parity.
|
|
28
|
+
|
|
29
|
+
## Rules
|
|
30
|
+
|
|
31
|
+
- **Never hallucinate props.** Before using any prop — including common-sounding
|
|
32
|
+
ones like `size`, `tone`, or `shadow` — confirm it appears in the component's
|
|
33
|
+
doc here or in the package's TypeScript types. Do not assume APIs from other
|
|
34
|
+
libraries (MUI, Radix, Chakra). If something is unclear, ask the user — or when
|
|
35
|
+
running unattended, prefer the TypeScript types and omit the uncertain prop
|
|
36
|
+
rather than guessing.
|
|
37
|
+
- These docs are the primary source for props, accessibility, and examples. The
|
|
38
|
+
package's `.d.ts` type contract is authoritative: if the types disagree with
|
|
39
|
+
these docs, the **types win**. Do not reverse-engineer behavior from the
|
|
40
|
+
compiled implementation source in `node_modules`.
|
|
41
|
+
- Pass native HTML attributes, `aria-*`, and `data-*` via the `htmlAttributes`
|
|
42
|
+
prop, only where the component's doc says so.
|
|
43
|
+
- Compound components are exposed as subcomponents (e.g. `Tooltip.Trigger`,
|
|
44
|
+
`Tooltip.Content`). Follow each component's own doc — don't assume one
|
|
45
|
+
component's compound shape matches another's.
|
|
46
|
+
- Follow the accessibility guidance in each component's doc; don't strip built-in
|
|
47
|
+
roles or keyboard behavior.
|
|
48
|
+
|
|
49
|
+
## How to use this skill
|
|
50
|
+
|
|
51
|
+
1. Find the component in the catalog below to get its docs file and import path.
|
|
52
|
+
2. Read `components/<file>` for that component's props, accessibility
|
|
53
|
+
requirements, and runnable examples; prefer those examples.
|
|
54
|
+
|
|
55
|
+
## Components
|
|
56
|
+
|
|
57
|
+
Import from `@neo4j-ndl/react`.
|
|
58
|
+
|
|
59
|
+
| Component | Docs | Accessibility | Examples |
|
|
60
|
+
|-----------|------|---------------|----------|
|
|
61
|
+
| `Accordion` | [components/accordion.md](components/accordion.md) | ✅ | 6 |
|
|
62
|
+
| `Avatar` | [components/avatar.md](components/avatar.md) | ✅ | 7 |
|
|
63
|
+
| `Banner` | [components/banner.md](components/banner.md) | ✅ | 6 |
|
|
64
|
+
| `Box` | [components/box.md](components/box.md) | | 1 |
|
|
65
|
+
| `Breadcrumbs` | [components/breadcrumbs.md](components/breadcrumbs.md) | ✅ | 4 |
|
|
66
|
+
| `Checkbox` | [components/checkbox.md](components/checkbox.md) | ✅ | 9 |
|
|
67
|
+
| `CleanIconButton` | [components/clean-icon-button.md](components/clean-icon-button.md) | ✅ | 8 |
|
|
68
|
+
| `ClipboardButton` | [components/clipboard-button.md](components/clipboard-button.md) | | 7 |
|
|
69
|
+
| `Code` | [components/code.md](components/code.md) | ✅ | 2 |
|
|
70
|
+
| `CodeBlock` | [components/code-block.md](components/code-block.md) | | 8 |
|
|
71
|
+
| `ColorPicker` | [components/color-picker.md](components/color-picker.md) | | 3 |
|
|
72
|
+
| `ConditionalWrap` | [components/conditional-wrap.md](components/conditional-wrap.md) | | 1 |
|
|
73
|
+
| `DataGrid` | [components/data-grid.md](components/data-grid.md) | | 20 |
|
|
74
|
+
| `DatePicker` | [components/date-picker.md](components/date-picker.md) | ✅ | 14 |
|
|
75
|
+
| `Dialog` | [components/dialog.md](components/dialog.md) | ✅ | 7 |
|
|
76
|
+
| `DismissibleTag` | [components/dismissible-tag.md](components/dismissible-tag.md) | | 4 |
|
|
77
|
+
| `Divider` | [components/divider.md](components/divider.md) | | 3 |
|
|
78
|
+
| `Drawer` | [components/drawer.md](components/drawer.md) | ✅ | 8 |
|
|
79
|
+
| `DropdownButton` | [components/dropdown-button.md](components/dropdown-button.md) | | 7 |
|
|
80
|
+
| `Dropzone` | [components/dropzone.md](components/dropzone.md) | | 6 |
|
|
81
|
+
| `FilledButton` | [components/filled-button.md](components/filled-button.md) | | 0 |
|
|
82
|
+
| `Flex` | [components/flex.md](components/flex.md) | | 1 |
|
|
83
|
+
| `GraphLabel` | [components/graph-label.md](components/graph-label.md) | | 7 |
|
|
84
|
+
| `IconButton` | [components/icon-button.md](components/icon-button.md) | ✅ | 7 |
|
|
85
|
+
| `IconButtonArrayComponent` | [components/icon-button-array.md](components/icon-button-array.md) | | 5 |
|
|
86
|
+
| `InlineEdit` | [components/inline-edit.md](components/inline-edit.md) | ✅ | 9 |
|
|
87
|
+
| `Kbd` | [components/kbd.md](components/kbd.md) | ✅ | 2 |
|
|
88
|
+
| `LoadingBar` | [components/loading-bar.md](components/loading-bar.md) | | 2 |
|
|
89
|
+
| `LoadingSpinner` | [components/loading-spinner.md](components/loading-spinner.md) | ✅ | 2 |
|
|
90
|
+
| `Logo` | [components/logo.md](components/logo.md) | | 3 |
|
|
91
|
+
| `Menu` | [components/menu.md](components/menu.md) | ✅ | 13 |
|
|
92
|
+
| `Modal` | [components/modal.md](components/modal.md) | ✅ | 0 |
|
|
93
|
+
| `OutlinedButton` | [components/outlined-button.md](components/outlined-button.md) | | 0 |
|
|
94
|
+
| `Popover` | [components/popover.md](components/popover.md) | ✅ | 6 |
|
|
95
|
+
| `ProgressBar` | [components/progress-bar.md](components/progress-bar.md) | ✅ | 3 |
|
|
96
|
+
| `Radio` | [components/radio.md](components/radio.md) | ✅ | 7 |
|
|
97
|
+
| `ReadOnlyTag` | [components/read-only-tag.md](components/read-only-tag.md) | | 4 |
|
|
98
|
+
| `SegmentedControl` | [components/segmented-control.md](components/segmented-control.md) | ✅ | 5 |
|
|
99
|
+
| `Select` | [components/select.md](components/select.md) | | 13 |
|
|
100
|
+
| `SelectIconButton` | [components/select-icon-button.md](components/select-icon-button.md) | | 4 |
|
|
101
|
+
| `SelectableTag` | [components/selectable-tag.md](components/selectable-tag.md) | | 6 |
|
|
102
|
+
| `SideNavigation` | [components/side-navigation.md](components/side-navigation.md) | | 4 |
|
|
103
|
+
| `Skeleton` | [components/skeleton.md](components/skeleton.md) | | 5 |
|
|
104
|
+
| `Slider` | [components/slider.md](components/slider.md) | ✅ | 8 |
|
|
105
|
+
| `Spotlight` | [components/spotlight.md](components/spotlight.md) | ✅ | 9 |
|
|
106
|
+
| `StatusIndicator` | [components/status-indicator.md](components/status-indicator.md) | ✅ | 1 |
|
|
107
|
+
| `StatusLabel` | [components/status-label.md](components/status-label.md) | | 4 |
|
|
108
|
+
| `Switch` | [components/switch.md](components/switch.md) | ✅ | 7 |
|
|
109
|
+
| `Tabs` | [components/tabs.md](components/tabs.md) | ✅ | 7 |
|
|
110
|
+
| `Tag` | [components/tag.md](components/tag.md) | | 2 |
|
|
111
|
+
| `TextArea` | [components/text-area.md](components/text-area.md) | ✅ | 8 |
|
|
112
|
+
| `TextButton` | [components/text-button.md](components/text-button.md) | | 0 |
|
|
113
|
+
| `TextInput` | [components/text-input.md](components/text-input.md) | ✅ | 16 |
|
|
114
|
+
| `TextLink` | [components/text-link.md](components/text-link.md) | ✅ | 5 |
|
|
115
|
+
| `TimePicker` | [components/time-picker.md](components/time-picker.md) | | 4 |
|
|
116
|
+
| `TimeZonePicker` | [components/timezone-picker.md](components/timezone-picker.md) | | 9 |
|
|
117
|
+
| `Tooltip` | [components/tooltip.md](components/tooltip.md) | ✅ | 13 |
|
|
118
|
+
| `TreeView` | [components/tree-view.md](components/tree-view.md) | | 3 |
|
|
119
|
+
| `Typography` | [components/typography.md](components/typography.md) | | 3 |
|
|
120
|
+
| `Wizard` | [components/wizard.md](components/wizard.md) | | 5 |
|
|
121
|
+
|
|
122
|
+
## Next components
|
|
123
|
+
|
|
124
|
+
Import from `@neo4j-ndl/react/next`.
|
|
125
|
+
|
|
126
|
+
Next-generation components, imported from the `@neo4j-ndl/react/next` subpath. A `next` component may share a name with a stable one (e.g. `TreeView`) but is a **distinct** implementation with its own API — import it from this subpath, and do not mix it with the same-named default component.
|
|
127
|
+
|
|
128
|
+
| Component | Docs | Accessibility | Examples |
|
|
129
|
+
|-----------|------|---------------|----------|
|
|
130
|
+
| `TreeView` | [components/next/tree-view.md](components/next/tree-view.md) | ✅ | 8 |
|
|
131
|
+
|
|
132
|
+
## AI components
|
|
133
|
+
|
|
134
|
+
Import from `@neo4j-ndl/react/ai`.
|
|
135
|
+
|
|
136
|
+
Building blocks for AI chat / agent UIs, imported from the `@neo4j-ndl/react/ai` subpath.
|
|
137
|
+
|
|
138
|
+
| Component | Docs | Accessibility | Examples |
|
|
139
|
+
|-----------|------|---------------|----------|
|
|
140
|
+
| `CodePreview` | [components/ai/code-preview.md](components/ai/code-preview.md) | | 4 |
|
|
141
|
+
| `FileTag` | [components/ai/file-tag.md](components/ai/file-tag.md) | | 3 |
|
|
142
|
+
| `ImageTag` | [components/ai/image-tag.md](components/ai/image-tag.md) | | 3 |
|
|
143
|
+
| `MoreFilesComponent` | [components/ai/more-files.md](components/ai/more-files.md) | | 1 |
|
|
144
|
+
| `Presence` | [components/ai/presence.md](components/ai/presence.md) | | 2 |
|
|
145
|
+
| `Preview` | [components/ai/preview.md](components/ai/preview.md) | | 9 |
|
|
146
|
+
| `Prompt` | [components/ai/prompt.md](components/ai/prompt.md) | | 6 |
|
|
147
|
+
| `Reasoning` | [components/ai/reasoning.md](components/ai/reasoning.md) | | 1 |
|
|
148
|
+
| `Response` | [components/ai/response.md](components/ai/response.md) | | 7 |
|
|
149
|
+
| `Suggestion` | [components/ai/suggestion.md](components/ai/suggestion.md) | | 4 |
|
|
150
|
+
| `Thinking` | [components/ai/thinking.md](components/ai/thinking.md) | | 2 |
|
|
151
|
+
| `ToolCall` | [components/ai/tool-call.md](components/ai/tool-call.md) | | 2 |
|
|
152
|
+
| `UserBubbleComponent` | [components/ai/user-bubble.md](components/ai/user-bubble.md) | | 4 |
|