@neo4j-ndl/react 4.18.13 → 4.19.0
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/LICENSES.txt +54 -0
- package/lib/NOTICE.txt +8 -0
- package/lib/cjs/_common/use-semi-controlled-state.js +6 -1
- package/lib/cjs/_common/use-semi-controlled-state.js.map +1 -1
- package/lib/cjs/combobox/Combobox.js +1031 -0
- package/lib/cjs/combobox/Combobox.js.map +1 -0
- package/lib/cjs/combobox/combobox-types.js +23 -0
- package/lib/cjs/combobox/combobox-types.js.map +1 -0
- package/lib/cjs/combobox/combobox-utils.js +129 -0
- package/lib/cjs/combobox/combobox-utils.js.map +1 -0
- package/lib/cjs/combobox/index.js +26 -0
- package/lib/cjs/combobox/index.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-action-on-select.story.js +82 -0
- package/lib/cjs/combobox/stories/combobox-action-on-select.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-actions.story.js +78 -0
- package/lib/cjs/combobox/stories/combobox-actions.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-async.story.js +75 -0
- package/lib/cjs/combobox/stories/combobox-async.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-clean.story.js +38 -0
- package/lib/cjs/combobox/stories/combobox-clean.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-creatable.story.js +41 -0
- package/lib/cjs/combobox/stories/combobox-creatable.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-custom-multi.story.js +45 -0
- package/lib/cjs/combobox/stories/combobox-custom-multi.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-custom-single.story.js +44 -0
- package/lib/cjs/combobox/stories/combobox-custom-single.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-custom-trigger.story.js +60 -0
- package/lib/cjs/combobox/stories/combobox-custom-trigger.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-default.story.js +42 -0
- package/lib/cjs/combobox/stories/combobox-default.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-descriptions.story.js +45 -0
- package/lib/cjs/combobox/stories/combobox-descriptions.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-disabled.story.js +34 -0
- package/lib/cjs/combobox/stories/combobox-disabled.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-fluid.story.js +34 -0
- package/lib/cjs/combobox/stories/combobox-fluid.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-groups.story.js +49 -0
- package/lib/cjs/combobox/stories/combobox-groups.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-hidden-label.story.js +33 -0
- package/lib/cjs/combobox/stories/combobox-hidden-label.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-icons.story.js +46 -0
- package/lib/cjs/combobox/stories/combobox-icons.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-in-dialog.story.js +40 -0
- package/lib/cjs/combobox/stories/combobox-in-dialog.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js +40 -0
- package/lib/cjs/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-in-popover.story.js +36 -0
- package/lib/cjs/combobox/stories/combobox-in-popover.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-large-data-set.story.js +36 -0
- package/lib/cjs/combobox/stories/combobox-large-data-set.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-max-rows.story.js +42 -0
- package/lib/cjs/combobox/stories/combobox-max-rows.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-multi.story.js +45 -0
- package/lib/cjs/combobox/stories/combobox-multi.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-native-form.story.js +49 -0
- package/lib/cjs/combobox/stories/combobox-native-form.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-select-only.story.js +38 -0
- package/lib/cjs/combobox/stories/combobox-select-only.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-sizes.story.js +33 -0
- package/lib/cjs/combobox/stories/combobox-sizes.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-unlimited-rows.story.js +42 -0
- package/lib/cjs/combobox/stories/combobox-unlimited-rows.story.js.map +1 -0
- package/lib/cjs/combobox/stories/combobox-validation.story.js +33 -0
- package/lib/cjs/combobox/stories/combobox-validation.story.js.map +1 -0
- package/lib/cjs/combobox/stories/index.js +133 -0
- package/lib/cjs/combobox/stories/index.js.map +1 -0
- package/lib/cjs/combobox/use-combobox-multi-value-overflow.js +173 -0
- package/lib/cjs/combobox/use-combobox-multi-value-overflow.js.map +1 -0
- package/lib/cjs/combobox/use-combobox-popover.js +80 -0
- package/lib/cjs/combobox/use-combobox-popover.js.map +1 -0
- package/lib/cjs/date-picker/DatePicker.js.map +1 -1
- package/lib/cjs/dismissible-tag/DismissibleTag.js +1 -1
- package/lib/cjs/dismissible-tag/DismissibleTag.js.map +1 -1
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/select/Select.js +3 -0
- package/lib/cjs/select/Select.js.map +1 -1
- package/lib/cjs/text-area/TextArea.js.map +1 -1
- package/lib/cjs/text-input/TextInput.js.map +1 -1
- package/lib/esm/_common/use-semi-controlled-state.js +6 -1
- package/lib/esm/_common/use-semi-controlled-state.js.map +1 -1
- package/lib/esm/combobox/Combobox.js +1024 -0
- package/lib/esm/combobox/Combobox.js.map +1 -0
- package/lib/esm/combobox/combobox-types.js +22 -0
- package/lib/esm/combobox/combobox-types.js.map +1 -0
- package/lib/esm/combobox/combobox-utils.js +112 -0
- package/lib/esm/combobox/combobox-utils.js.map +1 -0
- package/lib/esm/combobox/index.js +22 -0
- package/lib/esm/combobox/index.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-action-on-select.story.js +80 -0
- package/lib/esm/combobox/stories/combobox-action-on-select.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-actions.story.js +76 -0
- package/lib/esm/combobox/stories/combobox-actions.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-async.story.js +73 -0
- package/lib/esm/combobox/stories/combobox-async.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-clean.story.js +36 -0
- package/lib/esm/combobox/stories/combobox-clean.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-creatable.story.js +39 -0
- package/lib/esm/combobox/stories/combobox-creatable.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-custom-multi.story.js +43 -0
- package/lib/esm/combobox/stories/combobox-custom-multi.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-custom-single.story.js +42 -0
- package/lib/esm/combobox/stories/combobox-custom-single.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-custom-trigger.story.js +58 -0
- package/lib/esm/combobox/stories/combobox-custom-trigger.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-default.story.js +40 -0
- package/lib/esm/combobox/stories/combobox-default.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-descriptions.story.js +43 -0
- package/lib/esm/combobox/stories/combobox-descriptions.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-disabled.story.js +32 -0
- package/lib/esm/combobox/stories/combobox-disabled.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-fluid.story.js +32 -0
- package/lib/esm/combobox/stories/combobox-fluid.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-groups.story.js +47 -0
- package/lib/esm/combobox/stories/combobox-groups.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-hidden-label.story.js +31 -0
- package/lib/esm/combobox/stories/combobox-hidden-label.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-icons.story.js +44 -0
- package/lib/esm/combobox/stories/combobox-icons.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-in-dialog.story.js +38 -0
- package/lib/esm/combobox/stories/combobox-in-dialog.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js +38 -0
- package/lib/esm/combobox/stories/combobox-in-popover-dialog.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-in-popover.story.js +34 -0
- package/lib/esm/combobox/stories/combobox-in-popover.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-large-data-set.story.js +34 -0
- package/lib/esm/combobox/stories/combobox-large-data-set.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-max-rows.story.js +40 -0
- package/lib/esm/combobox/stories/combobox-max-rows.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-multi.story.js +43 -0
- package/lib/esm/combobox/stories/combobox-multi.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-native-form.story.js +47 -0
- package/lib/esm/combobox/stories/combobox-native-form.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-select-only.story.js +36 -0
- package/lib/esm/combobox/stories/combobox-select-only.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-sizes.story.js +31 -0
- package/lib/esm/combobox/stories/combobox-sizes.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-unlimited-rows.story.js +40 -0
- package/lib/esm/combobox/stories/combobox-unlimited-rows.story.js.map +1 -0
- package/lib/esm/combobox/stories/combobox-validation.story.js +31 -0
- package/lib/esm/combobox/stories/combobox-validation.story.js.map +1 -0
- package/lib/esm/combobox/stories/index.js +100 -0
- package/lib/esm/combobox/stories/index.js.map +1 -0
- package/lib/esm/combobox/use-combobox-multi-value-overflow.js +166 -0
- package/lib/esm/combobox/use-combobox-multi-value-overflow.js.map +1 -0
- package/lib/esm/combobox/use-combobox-popover.js +77 -0
- package/lib/esm/combobox/use-combobox-popover.js.map +1 -0
- package/lib/esm/date-picker/DatePicker.js.map +1 -1
- package/lib/esm/dismissible-tag/DismissibleTag.js +1 -1
- package/lib/esm/dismissible-tag/DismissibleTag.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/select/Select.js +3 -0
- package/lib/esm/select/Select.js.map +1 -1
- package/lib/esm/text-area/TextArea.js.map +1 -1
- package/lib/esm/text-input/TextInput.js.map +1 -1
- package/lib/types/_common/use-semi-controlled-state.d.ts +5 -1
- package/lib/types/_common/use-semi-controlled-state.d.ts.map +1 -1
- package/lib/types/combobox/Combobox.d.ts +24 -0
- package/lib/types/combobox/Combobox.d.ts.map +1 -0
- package/lib/types/combobox/combobox-types.d.ts +419 -0
- package/lib/types/combobox/combobox-types.d.ts.map +1 -0
- package/lib/types/combobox/combobox-utils.d.ts +81 -0
- package/lib/types/combobox/combobox-utils.d.ts.map +1 -0
- package/lib/types/combobox/index.d.ts +23 -0
- package/lib/types/combobox/index.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-action-on-select.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-action-on-select.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-actions.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-actions.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-async.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-async.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-clean.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-clean.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-creatable.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-creatable.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-custom-multi.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-custom-multi.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-custom-single.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-custom-single.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-custom-trigger.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-custom-trigger.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-default.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-default.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-descriptions.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-descriptions.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-disabled.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-disabled.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-fluid.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-fluid.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-groups.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-groups.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-hidden-label.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-hidden-label.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-icons.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-icons.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-in-dialog.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-in-dialog.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-in-popover-dialog.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-in-popover-dialog.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-in-popover.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-in-popover.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-large-data-set.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-large-data-set.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-max-rows.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-max-rows.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-multi.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-multi.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-native-form.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-native-form.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-select-only.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-select-only.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-sizes.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-sizes.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-unlimited-rows.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-unlimited-rows.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/combobox-validation.story.d.ts +24 -0
- package/lib/types/combobox/stories/combobox-validation.story.d.ts.map +1 -0
- package/lib/types/combobox/stories/index.d.ts +73 -0
- package/lib/types/combobox/stories/index.d.ts.map +1 -0
- package/lib/types/combobox/use-combobox-multi-value-overflow.d.ts +76 -0
- package/lib/types/combobox/use-combobox-multi-value-overflow.d.ts.map +1 -0
- package/lib/types/combobox/use-combobox-popover.d.ts +66 -0
- package/lib/types/combobox/use-combobox-popover.d.ts.map +1 -0
- package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
- package/lib/types/dismissible-tag/DismissibleTag.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/select/Select.d.ts +3 -0
- package/lib/types/select/Select.d.ts.map +1 -1
- package/lib/types/text-input/TextInput.d.ts.map +1 -1
- package/package.json +10 -4
- package/skills/ndl-react/SKILL.md +20 -0
- package/skills/ndl-react/components/combobox.md +1487 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
const options = [
|
|
25
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
26
|
+
{ label: 'Aura', value: 'aura' },
|
|
27
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
28
|
+
{ label: 'Data Importer', value: 'data-importer' },
|
|
29
|
+
];
|
|
30
|
+
const Component = () => (_jsx("div", { className: "n-w-full", children: _jsx(Combobox, { label: "Product", helpText: "This combobox fills the width of its parent.", isClearable: true, isFluid: true, options: options }) }));
|
|
31
|
+
export default Component;
|
|
32
|
+
//# sourceMappingURL=combobox-fluid.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-fluid.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-fluid.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;CACnD,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,cAAK,SAAS,EAAC,UAAU,YACvB,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,8CAA8C,EACvD,WAAW,QACX,OAAO,QACP,OAAO,EAAE,OAAO,GAChB,GACE,CACP,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 { Combobox } from '@neo4j-ndl/react';\n\nconst options = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { label: 'Data Importer', value: 'data-importer' },\n];\n\nconst Component = () => (\n <div className=\"n-w-full\">\n <Combobox\n label=\"Product\"\n helpText=\"This combobox fills the width of its parent.\"\n isClearable\n isFluid\n options={options}\n />\n </div>\n);\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
let options = [
|
|
26
|
+
{
|
|
27
|
+
label: 'Group 1',
|
|
28
|
+
options: [
|
|
29
|
+
{ label: 'Option 1', value: 'option-1' },
|
|
30
|
+
{ label: 'Option 2', value: 'option-2' },
|
|
31
|
+
{ label: 'Option 3', value: 'option-3' },
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
label: 'Group 2',
|
|
36
|
+
options: [
|
|
37
|
+
{ label: 'Option 4', value: 'option-4' },
|
|
38
|
+
{ isDisabled: true, label: 'Option 5', value: 'option-5' },
|
|
39
|
+
{ label: 'Option 6', value: 'option-6' },
|
|
40
|
+
{ label: 'Option 7', value: 'option-7' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
return _jsx(Combobox, { label: "Products by category", options: options });
|
|
45
|
+
};
|
|
46
|
+
export default Component;
|
|
47
|
+
//# sourceMappingURL=combobox-groups.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-groups.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-groups.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,IAAI,OAAO,GAAG;QACZ;YACE,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;gBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;gBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;aACzC;SACF;QACD;YACE,KAAK,EAAE,SAAS;YAChB,OAAO,EAAE;gBACP,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;gBACxC,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;gBAC1D,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;gBACxC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE;aACzC;SACF;KACF,CAAC;IAEF,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAC,sBAAsB,EAAC,OAAO,EAAE,OAAO,GAAI,CAAC;AACrE,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 { Combobox } from '@neo4j-ndl/react';\n\nconst Component = () => {\n let options = [\n {\n label: 'Group 1',\n options: [\n { label: 'Option 1', value: 'option-1' },\n { label: 'Option 2', value: 'option-2' },\n { label: 'Option 3', value: 'option-3' },\n ],\n },\n {\n label: 'Group 2',\n options: [\n { label: 'Option 4', value: 'option-4' },\n { isDisabled: true, label: 'Option 5', value: 'option-5' },\n { label: 'Option 6', value: 'option-6' },\n { label: 'Option 7', value: 'option-7' },\n ],\n },\n ];\n\n return <Combobox label=\"Products by category\" options={options} />;\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 { Combobox, Typography } from '@neo4j-ndl/react';
|
|
24
|
+
const options = [
|
|
25
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
26
|
+
{ label: 'Aura', value: 'aura' },
|
|
27
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
28
|
+
];
|
|
29
|
+
const Component = () => (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-4", children: [_jsx(Typography, { variant: "body-medium", children: "Filter results by product" }), _jsx(Combobox, { label: "Product", hasVisuallyHiddenLabel: true, options: options, placeholder: "All products" })] }));
|
|
30
|
+
export default Component;
|
|
31
|
+
//# sourceMappingURL=combobox-hidden-label.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-hidden-label.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-hidden-label.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;CACnC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,0CAAuC,EACxE,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,sBAAsB,QACtB,OAAO,EAAE,OAAO,EAChB,WAAW,EAAC,cAAc,GAC1B,IACE,CACP,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 { Combobox, Typography } from '@neo4j-ndl/react';\n\nconst options = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n];\n\nconst Component = () => (\n <div className=\"n-flex n-flex-col n-gap-token-4\">\n <Typography variant=\"body-medium\">Filter results by product</Typography>\n <Combobox\n label=\"Product\"\n hasVisuallyHiddenLabel\n options={options}\n placeholder=\"All products\"\n />\n </div>\n);\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
import { BeakerIconOutline, BoltIconOutline, CloudIconOutline, } from '@neo4j-ndl/react/icons';
|
|
25
|
+
const options = [
|
|
26
|
+
{
|
|
27
|
+
label: 'AuraDB',
|
|
28
|
+
leadingVisual: _jsx(CloudIconOutline, {}),
|
|
29
|
+
value: 'auradb',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: 'Graph Data Science',
|
|
33
|
+
leadingVisual: _jsx(BeakerIconOutline, {}),
|
|
34
|
+
value: 'graph-data-science',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: 'Neo4j Bloom',
|
|
38
|
+
leadingVisual: _jsx(BoltIconOutline, {}),
|
|
39
|
+
value: 'neo4j-bloom',
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
const Component = () => (_jsx(Combobox, { label: "Products", options: options, placeholder: "Select product" }));
|
|
43
|
+
export default Component;
|
|
44
|
+
//# sourceMappingURL=combobox-icons.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-icons.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-icons.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,OAAO,GAAG;IACd;QACE,KAAK,EAAE,QAAQ;QACf,aAAa,EAAE,KAAC,gBAAgB,KAAG;QACnC,KAAK,EAAE,QAAQ;KAChB;IACD;QACE,KAAK,EAAE,oBAAoB;QAC3B,aAAa,EAAE,KAAC,iBAAiB,KAAG;QACpC,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,KAAK,EAAE,aAAa;QACpB,aAAa,EAAE,KAAC,eAAe,KAAG;QAClC,KAAK,EAAE,aAAa;KACrB;CACF,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,KAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAC,gBAAgB,GAAG,CAC7E,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 { Combobox } from '@neo4j-ndl/react';\nimport {\n BeakerIconOutline,\n BoltIconOutline,\n CloudIconOutline,\n} from '@neo4j-ndl/react/icons';\n\nconst options = [\n {\n label: 'AuraDB',\n leadingVisual: <CloudIconOutline />,\n value: 'auradb',\n },\n {\n label: 'Graph Data Science',\n leadingVisual: <BeakerIconOutline />,\n value: 'graph-data-science',\n },\n {\n label: 'Neo4j Bloom',\n leadingVisual: <BoltIconOutline />,\n value: 'neo4j-bloom',\n },\n];\n\nconst Component = () => (\n <Combobox label=\"Products\" options={options} placeholder=\"Select product\" />\n);\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { Combobox, Dialog, FilledButton } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const options = [
|
|
26
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
27
|
+
{ label: 'Aura', value: 'aura' },
|
|
28
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
29
|
+
{ label: 'Data Importer', value: 'data-importer' },
|
|
30
|
+
{ label: 'GraphQL Library', value: 'graphql-library' },
|
|
31
|
+
{ label: 'Cypher', value: 'cypher' },
|
|
32
|
+
];
|
|
33
|
+
const Component = () => {
|
|
34
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsx(FilledButton, { onClick: () => setIsOpen(true), children: "Open dialog" }), _jsxs(Dialog, { isOpen: isOpen, onClose: () => setIsOpen(false), size: "medium", children: [_jsx(Dialog.Header, { children: "Combobox in a dialog" }), _jsx(Dialog.Description, { children: "The panel automatically uses fixed positioning and stays inside the dialog rather than being portaled." }), _jsx(Dialog.Content, { children: _jsx(Combobox, { label: "Product", helpText: "Open the list to inspect clipping and stacking.", isFluid: true, options: options, searchPlaceholder: "Search products" }) })] })] }));
|
|
36
|
+
};
|
|
37
|
+
export default Component;
|
|
38
|
+
//# sourceMappingURL=combobox-in-dialog.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-in-dialog.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-in-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IAClD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACrC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAA4B,EACxE,MAAC,MAAM,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAC,QAAQ,aACpE,KAAC,MAAM,CAAC,MAAM,uCAAqC,EACnD,KAAC,MAAM,CAAC,WAAW,yHAGE,EACrB,KAAC,MAAM,CAAC,OAAO,cACb,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,iDAAiD,EAC1D,OAAO,QACP,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAC,iBAAiB,GACnC,GACa,IACV,IACR,CACJ,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 { Combobox, Dialog, FilledButton } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst options = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { label: 'Data Importer', value: 'data-importer' },\n { label: 'GraphQL Library', value: 'graphql-library' },\n { label: 'Cypher', value: 'cypher' },\n];\n\nconst Component = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <FilledButton onClick={() => setIsOpen(true)}>Open dialog</FilledButton>\n <Dialog isOpen={isOpen} onClose={() => setIsOpen(false)} size=\"medium\">\n <Dialog.Header>Combobox in a dialog</Dialog.Header>\n <Dialog.Description>\n The panel automatically uses fixed positioning and stays inside the\n dialog rather than being portaled.\n </Dialog.Description>\n <Dialog.Content>\n <Combobox\n label=\"Product\"\n helpText=\"Open the list to inspect clipping and stacking.\"\n isFluid\n options={options}\n searchPlaceholder=\"Search products\"\n />\n </Dialog.Content>\n </Dialog>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { Combobox, Dialog, FilledButton, Popover } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const options = [
|
|
26
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
27
|
+
{ label: 'Aura', value: 'aura' },
|
|
28
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
29
|
+
{ label: 'Data Importer', value: 'data-importer' },
|
|
30
|
+
{ label: 'GraphQL Library', value: 'graphql-library' },
|
|
31
|
+
{ label: 'Cypher', value: 'cypher' },
|
|
32
|
+
];
|
|
33
|
+
const Component = () => {
|
|
34
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
35
|
+
return (_jsxs(_Fragment, { children: [_jsx(FilledButton, { onClick: () => setIsOpen(true), children: "Open dialog" }), _jsxs(Dialog, { isOpen: isOpen, onClose: () => setIsOpen(false), size: "medium", children: [_jsx(Dialog.Header, { children: "Combobox in a popover in a dialog" }), _jsx(Dialog.Description, { children: "This exercises nested portals, fixed positioning, focus handling, and stacking across all three components." }), _jsx(Dialog.Content, { children: _jsxs(Popover, { isPortaled: true, hasAnchorPortal: true, strategy: "fixed", children: [_jsx(Popover.Trigger, { hasButtonWrapper: true, children: _jsx(FilledButton, { children: "Open popover" }) }), _jsx(Popover.Content, { className: "n-w-[400px] n-p-token-16", children: _jsx(Combobox, { label: "Product", errorText: "This error styling should inherit the dialog theme.", isFluid: true, options: options, searchPlaceholder: "Search products" }) })] }) })] })] }));
|
|
36
|
+
};
|
|
37
|
+
export default Component;
|
|
38
|
+
//# sourceMappingURL=combobox-in-popover-dialog.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-in-popover-dialog.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-in-popover-dialog.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IAClD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACrC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,CACL,8BACE,KAAC,YAAY,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAA4B,EACxE,MAAC,MAAM,IAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,IAAI,EAAC,QAAQ,aACpE,KAAC,MAAM,CAAC,MAAM,oDAAkD,EAChE,KAAC,MAAM,CAAC,WAAW,8HAGE,EACrB,KAAC,MAAM,CAAC,OAAO,cACb,MAAC,OAAO,IAAC,UAAU,QAAC,eAAe,QAAC,QAAQ,EAAC,OAAO,aAClD,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,KAAC,YAAY,+BAA4B,GACzB,EAClB,KAAC,OAAO,CAAC,OAAO,IAAC,SAAS,EAAC,0BAA0B,YACnD,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,SAAS,EAAC,qDAAqD,EAC/D,OAAO,QACP,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAC,iBAAiB,GACnC,GACc,IACV,GACK,IACV,IACR,CACJ,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 { Combobox, Dialog, FilledButton, Popover } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst options = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { label: 'Data Importer', value: 'data-importer' },\n { label: 'GraphQL Library', value: 'graphql-library' },\n { label: 'Cypher', value: 'cypher' },\n];\n\nconst Component = () => {\n const [isOpen, setIsOpen] = useState(false);\n\n return (\n <>\n <FilledButton onClick={() => setIsOpen(true)}>Open dialog</FilledButton>\n <Dialog isOpen={isOpen} onClose={() => setIsOpen(false)} size=\"medium\">\n <Dialog.Header>Combobox in a popover in a dialog</Dialog.Header>\n <Dialog.Description>\n This exercises nested portals, fixed positioning, focus handling, and\n stacking across all three components.\n </Dialog.Description>\n <Dialog.Content>\n <Popover isPortaled hasAnchorPortal strategy=\"fixed\">\n <Popover.Trigger hasButtonWrapper>\n <FilledButton>Open popover</FilledButton>\n </Popover.Trigger>\n <Popover.Content className=\"n-w-[400px] n-p-token-16\">\n <Combobox\n label=\"Product\"\n errorText=\"This error styling should inherit the dialog theme.\"\n isFluid\n options={options}\n searchPlaceholder=\"Search products\"\n />\n </Popover.Content>\n </Popover>\n </Dialog.Content>\n </Dialog>\n </>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
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 { Combobox, FilledButton, Popover, Typography } from '@neo4j-ndl/react';
|
|
24
|
+
const options = [
|
|
25
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
26
|
+
{ label: 'Aura', value: 'aura' },
|
|
27
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
28
|
+
{ label: 'Data Importer', value: 'data-importer' },
|
|
29
|
+
{ label: 'GraphQL Library', value: 'graphql-library' },
|
|
30
|
+
{ label: 'Cypher', value: 'cypher' },
|
|
31
|
+
];
|
|
32
|
+
const Component = () => (_jsxs(Popover, { isPortaled: true, children: [_jsx(Popover.Trigger, { hasButtonWrapper: true, children: _jsx(FilledButton, { children: "Open popover" }) }), _jsx(Popover.Content, { className: "n-max-h-[240px] n-w-[400px] n-overflow-y-auto n-p-token-16", children: _jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsx(Typography, { variant: "body-medium", children: "Scroll this popover while the combobox panel is open to verify that it remains anchored and is not clipped by the overflow container." }), _jsx("div", { className: "n-h-[120px] n-shrink-0 n-rounded-sm n-border n-border-neutral-border-strong n-bg-neutral-bg-weak" }), _jsx(Combobox, { label: "Product", helpText: "The combobox panel is independently portaled above this popover.", isFluid: true, options: options, searchPlaceholder: "Search products" }), _jsx("div", { className: "n-h-[120px] n-shrink-0 n-rounded-sm n-border n-border-neutral-border-strong n-bg-neutral-bg-weak" })] }) })] }));
|
|
33
|
+
export default Component;
|
|
34
|
+
//# sourceMappingURL=combobox-in-popover.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-in-popover.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-in-popover.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE/E,MAAM,OAAO,GAAG;IACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;IAClD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;IACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;CACrC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,MAAC,OAAO,IAAC,UAAU,mBACjB,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,KAAC,YAAY,+BAA4B,GACzB,EAClB,KAAC,OAAO,CAAC,OAAO,IAAC,SAAS,EAAC,4DAA4D,YACrF,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,sJAGpB,EACb,cAAK,SAAS,EAAC,kGAAkG,GAAG,EACpH,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,QAAQ,EAAC,kEAAkE,EAC3E,OAAO,QACP,OAAO,EAAE,OAAO,EAChB,iBAAiB,EAAC,iBAAiB,GACnC,EACF,cAAK,SAAS,EAAC,kGAAkG,GAAG,IAChH,GACU,IACV,CACX,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 { Combobox, FilledButton, Popover, Typography } from '@neo4j-ndl/react';\n\nconst options = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { label: 'Data Importer', value: 'data-importer' },\n { label: 'GraphQL Library', value: 'graphql-library' },\n { label: 'Cypher', value: 'cypher' },\n];\n\nconst Component = () => (\n <Popover isPortaled>\n <Popover.Trigger hasButtonWrapper>\n <FilledButton>Open popover</FilledButton>\n </Popover.Trigger>\n <Popover.Content className=\"n-max-h-[240px] n-w-[400px] n-overflow-y-auto n-p-token-16\">\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <Typography variant=\"body-medium\">\n Scroll this popover while the combobox panel is open to verify that it\n remains anchored and is not clipped by the overflow container.\n </Typography>\n <div className=\"n-h-[120px] n-shrink-0 n-rounded-sm n-border n-border-neutral-border-strong n-bg-neutral-bg-weak\" />\n <Combobox\n label=\"Product\"\n helpText=\"The combobox panel is independently portaled above this popover.\"\n isFluid\n options={options}\n searchPlaceholder=\"Search products\"\n />\n <div className=\"n-h-[120px] n-shrink-0 n-rounded-sm n-border n-border-neutral-border-strong n-bg-neutral-bg-weak\" />\n </div>\n </Popover.Content>\n </Popover>\n);\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const options = Array.from({ length: 10000 }, (_, index) => ({
|
|
26
|
+
label: `Node ${index + 1}`,
|
|
27
|
+
value: `node-${index + 1}`,
|
|
28
|
+
}));
|
|
29
|
+
const Component = () => {
|
|
30
|
+
const [value, setValue] = useState(options.slice(0, 1500));
|
|
31
|
+
return (_jsx(Combobox, { label: "Nodes", isClearable: true, isMulti: true, options: options, value: value, onChange: (nextValue) => setValue(nextValue), helpText: "10,000 options with 1,500 selected: the list renders only its visible rows and the counter rounds to thousands." }));
|
|
32
|
+
};
|
|
33
|
+
export default Component;
|
|
34
|
+
//# sourceMappingURL=combobox-large-data-set.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-large-data-set.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-large-data-set.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOjC,MAAM,OAAO,GAAa,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;IACrE,KAAK,EAAE,QAAQ,KAAK,GAAG,CAAC,EAAE;IAC1B,KAAK,EAAE,QAAQ,KAAK,GAAG,CAAC,EAAE;CAC3B,CAAC,CAAC,CAAC;AAEJ,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAE3D,OAAO,CACL,KAAC,QAAQ,IACP,KAAK,EAAC,OAAO,EACb,WAAW,QACX,OAAO,QACP,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAC5C,QAAQ,EAAC,iHAAiH,GAC1H,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 { Combobox } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype Option = {\n label: string;\n value: string;\n};\n\nconst options: Option[] = Array.from({ length: 10000 }, (_, index) => ({\n label: `Node ${index + 1}`,\n value: `node-${index + 1}`,\n}));\n\nconst Component = () => {\n const [value, setValue] = useState(options.slice(0, 1500));\n\n return (\n <Combobox\n label=\"Nodes\"\n isClearable\n isMulti\n options={options}\n value={value}\n onChange={(nextValue) => setValue(nextValue)}\n helpText=\"10,000 options with 1,500 selected: the list renders only its visible rows and the counter rounds to thousands.\"\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const options = [
|
|
27
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
28
|
+
{ label: 'Aura', value: 'aura' },
|
|
29
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
30
|
+
{ label: 'Data Importer', value: 'data-importer' },
|
|
31
|
+
{ label: 'GraphQL Library', value: 'graphql-library' },
|
|
32
|
+
{ label: 'Cypher', value: 'cypher' },
|
|
33
|
+
{ label: 'Operations Manager', value: 'operations-manager' },
|
|
34
|
+
{ label: 'Graph Data Science', value: 'graph-data-science' },
|
|
35
|
+
];
|
|
36
|
+
const [value, setValue] = useState(options);
|
|
37
|
+
return (_jsx(Combobox, { label: "Products", isClearable: true, isMulti: true, maxRows: 2, options: options, value: value, onChange: (nextValue) => setValue(nextValue), helpText: "Set maxRows to 2 to limit the number of rows to 2." }));
|
|
38
|
+
};
|
|
39
|
+
export default Component;
|
|
40
|
+
//# sourceMappingURL=combobox-max-rows.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-max-rows.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-max-rows.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAOjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAa;QACxB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAClC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;QAClD,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,iBAAiB,EAAE;QACtD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACpC,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;QAC5D,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;KAC7D,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;IAE5C,OAAO,CACL,KAAC,QAAQ,IACP,KAAK,EAAC,UAAU,EAChB,WAAW,QACX,OAAO,QACP,OAAO,EAAE,CAAC,EACV,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAC5C,QAAQ,EAAC,oDAAoD,GAC7D,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 { Combobox } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\ntype Option = {\n label: string;\n value: string;\n};\n\nconst Component = () => {\n const options: Option[] = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { label: 'Data Importer', value: 'data-importer' },\n { label: 'GraphQL Library', value: 'graphql-library' },\n { label: 'Cypher', value: 'cypher' },\n { label: 'Operations Manager', value: 'operations-manager' },\n { label: 'Graph Data Science', value: 'graph-data-science' },\n ];\n const [value, setValue] = useState(options);\n\n return (\n <Combobox\n label=\"Products\"\n isClearable\n isMulti\n maxRows={2}\n options={options}\n value={value}\n onChange={(nextValue) => setValue(nextValue)}\n helpText=\"Set maxRows to 2 to limit the number of rows to 2.\"\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const options = [
|
|
27
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
28
|
+
{ label: 'Aura', value: 'aura' },
|
|
29
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
30
|
+
{ label: 'Data Importer', value: 'data-importer' },
|
|
31
|
+
{
|
|
32
|
+
label: 'GraphQL Library has a really really long label',
|
|
33
|
+
value: 'graphql-library',
|
|
34
|
+
},
|
|
35
|
+
{ label: 'Cypher', value: 'cypher' },
|
|
36
|
+
{ isDisabled: true, label: 'Unavailable', value: 'unavailable' },
|
|
37
|
+
{ label: 'Operations Manager', value: 'operations-manager' },
|
|
38
|
+
];
|
|
39
|
+
const [value, setValue] = useState(options.slice(0, 5));
|
|
40
|
+
return (_jsx(Combobox, { label: "Products", isClearable: true, isMulti: true, options: options, value: value, onChange: (nextValue) => setValue(nextValue) }));
|
|
41
|
+
};
|
|
42
|
+
export default Component;
|
|
43
|
+
//# sourceMappingURL=combobox-multi.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-multi.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-multi.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAkB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAUjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAa;QACxB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAClC,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE;QAClD;YACE,KAAK,EAAE,gDAAgD;YACvD,KAAK,EAAE,iBAAiB;SACzB;QACD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;QACpC,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;QAChE,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE;KAC7D,CAAC;IACF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAExD,OAAO,CACL,KAAC,QAAQ,IACP,KAAK,EAAC,UAAU,EAChB,WAAW,QACX,OAAO,QACP,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,GAC5C,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 { Combobox } from '@neo4j-ndl/react';\nimport { type ReactNode, useState } from 'react';\n\ntype Option = {\n label: string;\n value: string;\n leadingVisual?: ReactNode;\n description?: string;\n isDisabled?: boolean;\n};\n\nconst Component = () => {\n const options: Option[] = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { label: 'Data Importer', value: 'data-importer' },\n {\n label: 'GraphQL Library has a really really long label',\n value: 'graphql-library',\n },\n { label: 'Cypher', value: 'cypher' },\n { isDisabled: true, label: 'Unavailable', value: 'unavailable' },\n { label: 'Operations Manager', value: 'operations-manager' },\n ];\n const [value, setValue] = useState(options.slice(0, 5));\n\n return (\n <Combobox\n label=\"Products\"\n isClearable\n isMulti\n options={options}\n value={value}\n onChange={(nextValue) => setValue(nextValue)}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { Combobox, FilledButton, OutlinedButton, TextButton, Typography, } from '@neo4j-ndl/react';
|
|
24
|
+
import { useRef, useState } from 'react';
|
|
25
|
+
const products = [
|
|
26
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
27
|
+
{ label: 'Aura', value: 'aura' },
|
|
28
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
29
|
+
];
|
|
30
|
+
const environments = [
|
|
31
|
+
{ label: 'Development', value: 'development' },
|
|
32
|
+
{ label: 'Staging', value: 'staging' },
|
|
33
|
+
{ label: 'Production', value: 'production' },
|
|
34
|
+
];
|
|
35
|
+
const Component = () => {
|
|
36
|
+
const triggerRef = useRef(null);
|
|
37
|
+
const [submittedValues, setSubmittedValues] = useState([]);
|
|
38
|
+
const handleSubmit = (event) => {
|
|
39
|
+
event.preventDefault();
|
|
40
|
+
setSubmittedValues(Array.from(new FormData(event.currentTarget).entries()).map(([name, value]) => `${name}: ${String(value)}`));
|
|
41
|
+
};
|
|
42
|
+
return (_jsxs("form", { className: "n-flex n-max-w-xl n-flex-col n-gap-token-6", onSubmit: handleSubmit, children: [_jsx(Combobox, { label: "Product", name: "product", options: products, defaultValue: products[0], isRequired: true, hasRequiredIndicator: true, triggerRef: triggerRef }), _jsx(Combobox, { label: "Environments", name: "environment", options: environments, defaultValue: [environments[0], environments[1]], isMulti: true }), _jsxs("div", { className: "n-flex n-flex-wrap n-gap-token-2", children: [_jsx(FilledButton, { type: "submit", children: "Submit" }), _jsx(OutlinedButton, { type: "reset", children: "Reset" }), _jsx(TextButton, { type: "button", onClick: () => { var _a; return (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }, children: "Focus product" })] }), _jsxs("div", { "aria-live": "polite", children: [_jsx(Typography, { variant: "body-medium", children: "Submitted form data" }), _jsx("pre", { className: "n-mt-token-2", children: submittedValues.length > 0
|
|
43
|
+
? submittedValues.join('\n')
|
|
44
|
+
: 'Submit the form to inspect its values.' })] })] }));
|
|
45
|
+
};
|
|
46
|
+
export default Component;
|
|
47
|
+
//# sourceMappingURL=combobox-native-form.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-native-form.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-native-form.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,UAAU,EACV,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAkB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,MAAM,QAAQ,GAAG;IACf,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;CACnC,CAAC;AAEF,MAAM,YAAY,GAAG;IACnB,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE;IAC9C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE;CAC7C,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,UAAU,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IACpD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC,CAAC;IAErE,MAAM,YAAY,GAAG,CAAC,KAAiC,EAAE,EAAE;QACzD,KAAK,CAAC,cAAc,EAAE,CAAC;QACvB,kBAAkB,CAChB,KAAK,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,GAAG,CACzD,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,KAAK,MAAM,CAAC,KAAK,CAAC,EAAE,CAC/C,CACF,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,CACL,gBACE,SAAS,EAAC,4CAA4C,EACtD,QAAQ,EAAE,YAAY,aAEtB,KAAC,QAAQ,IACP,KAAK,EAAC,SAAS,EACf,IAAI,EAAC,SAAS,EACd,OAAO,EAAE,QAAQ,EACjB,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC,EACzB,UAAU,QACV,oBAAoB,QACpB,UAAU,EAAE,UAAU,GACtB,EACF,KAAC,QAAQ,IACP,KAAK,EAAC,cAAc,EACpB,IAAI,EAAC,aAAa,EAClB,OAAO,EAAE,YAAY,EACrB,YAAY,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAChD,OAAO,SACP,EACF,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,YAAY,IAAC,IAAI,EAAC,QAAQ,uBAAsB,EACjD,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,sBAAuB,EACnD,KAAC,UAAU,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,WAAC,OAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,KAAK,EAAE,CAAA,EAAA,8BAEvD,IACT,EACN,4BAAe,QAAQ,aACrB,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,oCAAiC,EAClE,cAAK,SAAS,EAAC,cAAc,YAC1B,eAAe,CAAC,MAAM,GAAG,CAAC;4BACzB,CAAC,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC;4BAC5B,CAAC,CAAC,wCAAwC,GACxC,IACF,IACD,CACR,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 Combobox,\n FilledButton,\n OutlinedButton,\n TextButton,\n Typography,\n} from '@neo4j-ndl/react';\nimport { type FormEvent, useRef, useState } from 'react';\n\nconst products = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n];\n\nconst environments = [\n { label: 'Development', value: 'development' },\n { label: 'Staging', value: 'staging' },\n { label: 'Production', value: 'production' },\n];\n\nconst Component = () => {\n const triggerRef = useRef<HTMLElement | null>(null);\n const [submittedValues, setSubmittedValues] = useState<string[]>([]);\n\n const handleSubmit = (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n setSubmittedValues(\n Array.from(new FormData(event.currentTarget).entries()).map(\n ([name, value]) => `${name}: ${String(value)}`,\n ),\n );\n };\n\n return (\n <form\n className=\"n-flex n-max-w-xl n-flex-col n-gap-token-6\"\n onSubmit={handleSubmit}\n >\n <Combobox\n label=\"Product\"\n name=\"product\"\n options={products}\n defaultValue={products[0]}\n isRequired\n hasRequiredIndicator\n triggerRef={triggerRef}\n />\n <Combobox\n label=\"Environments\"\n name=\"environment\"\n options={environments}\n defaultValue={[environments[0], environments[1]]}\n isMulti\n />\n <div className=\"n-flex n-flex-wrap n-gap-token-2\">\n <FilledButton type=\"submit\">Submit</FilledButton>\n <OutlinedButton type=\"reset\">Reset</OutlinedButton>\n <TextButton type=\"button\" onClick={() => triggerRef.current?.focus()}>\n Focus product\n </TextButton>\n </div>\n <div aria-live=\"polite\">\n <Typography variant=\"body-medium\">Submitted form data</Typography>\n <pre className=\"n-mt-token-2\">\n {submittedValues.length > 0\n ? submittedValues.join('\\n')\n : 'Submit the form to inspect its values.'}\n </pre>\n </div>\n </form>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { Combobox } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
const options = [
|
|
26
|
+
{ label: 'Neo4j', value: 'neo4j' },
|
|
27
|
+
{ label: 'Aura', value: 'aura' },
|
|
28
|
+
{ label: 'Bloom', value: 'bloom' },
|
|
29
|
+
{ isDisabled: true, label: 'Cypher', value: 'cypher' },
|
|
30
|
+
];
|
|
31
|
+
// A list this short has nothing to filter, so the search input is turned
|
|
32
|
+
// off and the combobox follows the select-only pattern.
|
|
33
|
+
return _jsx(Combobox, { label: "Products", isSearchable: false, options: options });
|
|
34
|
+
};
|
|
35
|
+
export default Component;
|
|
36
|
+
//# sourceMappingURL=combobox-select-only.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combobox-select-only.story.js","sourceRoot":"","sources":["../../../../src/combobox/stories/combobox-select-only.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG;QACd,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAClC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAChC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;QAClC,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE;KACvD,CAAC;IAEF,yEAAyE;IACzE,wDAAwD;IACxD,OAAO,KAAC,QAAQ,IAAC,KAAK,EAAC,UAAU,EAAC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;AAC9E,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 { Combobox } from '@neo4j-ndl/react';\n\nconst Component = () => {\n const options = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Aura', value: 'aura' },\n { label: 'Bloom', value: 'bloom' },\n { isDisabled: true, label: 'Cypher', value: 'cypher' },\n ];\n\n // A list this short has nothing to filter, so the search input is turned\n // off and the combobox follows the select-only pattern.\n return <Combobox label=\"Products\" isSearchable={false} options={options} />;\n};\n\nexport default Component;\n"]}
|