@neo4j-ndl/react 5.4.3 → 5.4.5
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/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
- package/lib/cjs/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
- package/lib/cjs/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/cjs/select/stories/select-async.story.js +1 -3
- package/lib/cjs/select/stories/select-async.story.js.map +1 -1
- package/lib/cjs/select/stories/select-clean.story.js +1 -3
- package/lib/cjs/select/stories/select-clean.story.js.map +1 -1
- package/lib/cjs/select/stories/select-controlled.story.js +1 -3
- package/lib/cjs/select/stories/select-controlled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-creatable.story.js +1 -3
- package/lib/cjs/select/stories/select-creatable.story.js.map +1 -1
- package/lib/cjs/select/stories/select-custom-label.story.js +1 -3
- package/lib/cjs/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/cjs/select/stories/select-default.story.js +1 -3
- package/lib/cjs/select/stories/select-default.story.js.map +1 -1
- package/lib/cjs/select/stories/select-disabled.story.js +1 -3
- package/lib/cjs/select/stories/select-disabled.story.js.map +1 -1
- package/lib/cjs/select/stories/select-empty.story.js +1 -3
- package/lib/cjs/select/stories/select-empty.story.js.map +1 -1
- package/lib/cjs/select/stories/select-error-state.story.js +1 -3
- package/lib/cjs/select/stories/select-error-state.story.js.map +1 -1
- package/lib/cjs/select/stories/select-inside-dialog.story.js +1 -3
- package/lib/cjs/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/cjs/select/stories/select-menu-positionings.story.js +1 -5
- package/lib/cjs/select/stories/select-menu-positionings.story.js.map +1 -1
- package/lib/cjs/select/stories/select-multi.story.js +1 -3
- package/lib/cjs/select/stories/select-multi.story.js.map +1 -1
- package/lib/cjs/select/stories/select-sizes.story.js +1 -5
- package/lib/cjs/select/stories/select-sizes.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js +3 -9
- package/lib/cjs/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js +2 -8
- package/lib/cjs/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-image.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-image.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-label.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-label.story.js.map +1 -1
- package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js +2 -9
- package/lib/cjs/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
- package/lib/cjs/timezone-picker/TimeZonePicker.js +6 -5
- package/lib/cjs/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js +0 -1
- package/lib/esm/data-grid/stories/datagrid-pinned-columns.stories.js.map +1 -1
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js +0 -1
- package/lib/esm/data-grid/stories/datagrid-search-and-filters.stories.js.map +1 -1
- package/lib/esm/select/stories/select-async.story.js +1 -3
- package/lib/esm/select/stories/select-async.story.js.map +1 -1
- package/lib/esm/select/stories/select-clean.story.js +1 -3
- package/lib/esm/select/stories/select-clean.story.js.map +1 -1
- package/lib/esm/select/stories/select-controlled.story.js +1 -3
- package/lib/esm/select/stories/select-controlled.story.js.map +1 -1
- package/lib/esm/select/stories/select-creatable.story.js +1 -3
- package/lib/esm/select/stories/select-creatable.story.js.map +1 -1
- package/lib/esm/select/stories/select-custom-label.story.js +1 -3
- package/lib/esm/select/stories/select-custom-label.story.js.map +1 -1
- package/lib/esm/select/stories/select-default.story.js +1 -3
- package/lib/esm/select/stories/select-default.story.js.map +1 -1
- package/lib/esm/select/stories/select-disabled.story.js +1 -3
- package/lib/esm/select/stories/select-disabled.story.js.map +1 -1
- package/lib/esm/select/stories/select-empty.story.js +1 -3
- package/lib/esm/select/stories/select-empty.story.js.map +1 -1
- package/lib/esm/select/stories/select-error-state.story.js +1 -3
- package/lib/esm/select/stories/select-error-state.story.js.map +1 -1
- package/lib/esm/select/stories/select-inside-dialog.story.js +1 -3
- package/lib/esm/select/stories/select-inside-dialog.story.js.map +1 -1
- package/lib/esm/select/stories/select-menu-positionings.story.js +1 -5
- package/lib/esm/select/stories/select-menu-positionings.story.js.map +1 -1
- package/lib/esm/select/stories/select-multi.story.js +1 -3
- package/lib/esm/select/stories/select-multi.story.js.map +1 -1
- package/lib/esm/select/stories/select-sizes.story.js +1 -5
- package/lib/esm/select/stories/select-sizes.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-fixed-positioning.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js +4 -10
- package/lib/esm/spotlight/stories/spotlight-in-dialog.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js +3 -9
- package/lib/esm/spotlight/stories/spotlight-in-side-nav.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-icon.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-icon.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-image.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-image.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-label.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-label.story.js.map +1 -1
- package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js +2 -9
- package/lib/esm/spotlight/stories/spotlight-with-pointer.story.js.map +1 -1
- package/lib/esm/timezone-picker/TimeZonePicker.js +6 -5
- package/lib/esm/timezone-picker/TimeZonePicker.js.map +1 -1
- package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts +0 -3
- package/lib/types/data-grid/stories/datagrid-pinned-columns.stories.d.ts.map +1 -1
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts +0 -3
- package/lib/types/data-grid/stories/datagrid-search-and-filters.stories.d.ts.map +1 -1
- package/lib/types/select/stories/select-async.story.d.ts +1 -2
- package/lib/types/select/stories/select-async.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-clean.story.d.ts +1 -2
- package/lib/types/select/stories/select-clean.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-controlled.story.d.ts +2 -2
- package/lib/types/select/stories/select-controlled.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-creatable.story.d.ts +1 -2
- package/lib/types/select/stories/select-creatable.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-custom-label.story.d.ts +1 -2
- package/lib/types/select/stories/select-custom-label.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-default.story.d.ts +1 -2
- package/lib/types/select/stories/select-default.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-disabled.story.d.ts +1 -2
- package/lib/types/select/stories/select-disabled.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-empty.story.d.ts +1 -2
- package/lib/types/select/stories/select-empty.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-error-state.story.d.ts +1 -2
- package/lib/types/select/stories/select-error-state.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-inside-dialog.story.d.ts +1 -2
- package/lib/types/select/stories/select-inside-dialog.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-menu-positionings.story.d.ts +1 -2
- package/lib/types/select/stories/select-menu-positionings.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-multi.story.d.ts +1 -2
- package/lib/types/select/stories/select-multi.story.d.ts.map +1 -1
- package/lib/types/select/stories/select-sizes.story.d.ts +1 -2
- package/lib/types/select/stories/select-sizes.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-fixed-positioning.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-in-dialog.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-in-side-nav.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-icon.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-image.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-label.story.d.ts.map +1 -1
- package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts +1 -3
- package/lib/types/spotlight/stories/spotlight-with-pointer.story.d.ts.map +1 -1
- package/lib/types/timezone-picker/TimeZonePicker.d.ts.map +1 -1
- package/package.json +2 -3
- package/skills/ndl-react/SKILL.md +2 -2
- package/skills/ndl-react/components/select.md +13 -30
- package/skills/ndl-react/components/spotlight.md +11 -75
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datagrid-pinned-columns.stories.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-pinned-columns.stories.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAwD;AACxD,uDAK+B;AAE/B,kBAAe;IACb,SAAS,EAAE,gBAAQ;IACnB,EAAE,EAAE,qCAAqC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AAI,EAC3B,OAAO,EAAE;oBACP,WAAW,EAAE,WAAW;oBACxB,gBAAgB,EAAE,KAAK;iBACxB,EACD,aAAa,EAAE,KAAK,GACpB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,eAAe,mBA+B1B","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 { DataGrid, Typography } from '@neo4j-ndl/react';\nimport {\n createColumnHelper,\n getCoreRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nexport default {\n component: DataGrid,\n id: 'components-data-grid-pinned-columns',\n parameters: {\n chromatic: { disableSnapshot: true },\n controls: { disable: true },\n },\n title: 'Components/DataGrid/Pinned Columns',\n};\n\nexport type TestDataFormat = {\n age: number;\n cypherCommand: string;\n name: string;\n pinnedLeft: string;\n pinnedRight: string;\n};\n\nconst columnHelper = createColumnHelper<TestDataFormat>();\n\nconst columnHelperRight =\n createColumnHelper<Omit<TestDataFormat, 'pinnedLeft'>>();\n\nconst columnHelperLeft =\n createColumnHelper<Omit<TestDataFormat, 'pinnedRight'>>();\n\nconst tablePropsRight = {\n columns: [\n columnHelperRight.accessor('name', {\n cell: (info) => info.getValue(),\n minSize: 180,\n }),\n columnHelperRight.accessor('age', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelperRight.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelperRight.accessor('pinnedRight', {\n cell: (info) => info.getValue(),\n size: 300,\n }),\n ],\n data: [\n {\n age: 31,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 1',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 32,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 2',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 33,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 3',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 34,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 4',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 35,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 5',\n pinnedRight: 'Pinned Right',\n },\n ],\n};\n\nconst tablePropsBoth = {\n columns: [\n columnHelper.accessor('pinnedLeft', {\n cell: (info) => info.getValue(),\n size: 200,\n }),\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n minSize: 180,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelper.accessor('pinnedRight', {\n cell: (info) => info.getValue(),\n size: 200,\n }),\n ],\n data: [\n {\n age: 31,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 1',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 32,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 2',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 33,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 3',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 34,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 4',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 35,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 5',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n ],\n};\n\nconst tablePropsLeft = {\n columns: [\n columnHelperLeft.accessor('pinnedLeft', {\n cell: (info) => info.getValue(),\n size: 300,\n }),\n columnHelperLeft.accessor('name', {\n cell: (info) => info.getValue(),\n minSize: 180,\n }),\n columnHelperLeft.accessor('age', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelperLeft.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n ],\n data: [\n {\n age: 31,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 1',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 32,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 2',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 33,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 3',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 34,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 4',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 35,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 5',\n pinnedLeft: 'Pinned Left',\n },\n ],\n};\n\nexport const PinnedBothSides = () => {\n const table = useReactTable({\n ...tablePropsBoth,\n enableColumnPinning: true,\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n columnPinning: {\n left: ['pinnedLeft'],\n right: ['pinnedRight'],\n },\n },\n });\n\n return (\n <div className=\"w-w-full max-w-[1200px]\">\n <Typography variant=\"title-2\">\n Make the window smaller to test the overflow\n </Typography>\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={false}\n portalTarget={document.body}\n styling={{\n borderStyle: 'all-sides',\n hasZebraStriping: false,\n }}\n tableInstance={table}\n />\n </div>\n );\n};\n\nexport const PinnedLeftSide = () => {\n const table = useReactTable({\n ...tablePropsLeft,\n enableColumnPinning: true,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n columnPinning: {\n left: ['pinnedLeft'],\n },\n },\n });\n\n return (\n <div className=\"w-w-full max-w-[1200px]\">\n <Typography variant=\"title-2\">\n Make the window smaller to test the overflow\n </Typography>\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={false}\n styling={{\n borderStyle: 'all-sides',\n hasZebraStriping: false,\n }}\n tableInstance={table}\n />\n </div>\n );\n};\n\nexport const PinnedRightSide = () => {\n const table = useReactTable({\n ...tablePropsRight,\n enableColumnPinning: true,\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n columnPinning: {\n right: ['pinnedRight'],\n },\n },\n });\n\n return (\n <div className=\"w-full max-w-[1200px]\">\n <Typography variant=\"title-2\">\n Make the window smaller to test the overflow\n </Typography>\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={false}\n portalTarget={document.body}\n styling={{\n borderStyle: 'all-sides',\n hasZebraStriping: false,\n }}\n tableInstance={table}\n />\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"datagrid-pinned-columns.stories.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-pinned-columns.stories.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAwD;AACxD,uDAK+B;AAE/B,kBAAe;IACb,SAAS,EAAE,gBAAQ;IACnB,EAAE,EAAE,qCAAqC;IACzC,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,KAAK,EAAE,oCAAoC;CAC5C,CAAC;AAUF,MAAM,YAAY,GAAG,IAAA,gCAAkB,GAAkB,CAAC;AAE1D,MAAM,iBAAiB,GACrB,IAAA,gCAAkB,GAAsC,CAAC;AAE3D,MAAM,gBAAgB,GACpB,IAAA,gCAAkB,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AE;YACL,aAAa,EAAE;gBACb,IAAI,EAAE,CAAC,YAAY,CAAC;aACrB;SACF,IACD,CAAC;IAEH,OAAO,CACL,iCAAK,SAAS,EAAC,yBAAyB,aACtC,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,6DAEhB,EACb,uBAAC,gBAAQ,IACP,mBAAmB,EAAE,IAAI,EACzB,WAAW,EAAE,KAAK,EAClB,OAAO,EAAE;oBACP,WAAW,EAAE,WAAW;oBACxB,gBAAgB,EAAE,KAAK;iBACxB,EACD,aAAa,EAAE,KAAK,GACpB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AA7BW,QAAA,cAAc,kBA6BzB;AAEK,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,MAAM,KAAK,GAAG,IAAA,2BAAa,kCACtB,eAAe,KAClB,mBAAmB,EAAE,IAAI,EACzB,aAAa,EAAE,IAAI,EACnB,eAAe,EAAE,IAAA,6BAAe,GAAE,EAClC,iBAAiB,EAAE,IAAA,+BAAiB,GAAE,EACtC,KAAK,EAAE;YACL,aAAa,EAAE;gBACb,KAAK,EAAE,CAAC,aAAa,CAAC;aACvB;SACF,IACD,CAAC;IAEH,OAAO,CACL,iCAAK,SAAS,EAAC,uBAAuB,aACpC,uBAAC,kBAAU,IAAC,OAAO,EAAC,SAAS,6DAEhB,EACb,uBAAC,gBAAQ,IACP,mBAAmB,EAAE,IAAI,EACzB,WAAW,EAAE,KAAK,EAClB,YAAY,EAAE,QAAQ,CAAC,IAAI,EAC3B,OAAO,EAAE;oBACP,WAAW,EAAE,WAAW;oBACxB,gBAAgB,EAAE,KAAK;iBACxB,EACD,aAAa,EAAE,KAAK,GACpB,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AA/BW,QAAA,eAAe,mBA+B1B","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 { DataGrid, Typography } from '@neo4j-ndl/react';\nimport {\n createColumnHelper,\n getCoreRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\n\nexport default {\n component: DataGrid,\n id: 'components-data-grid-pinned-columns',\n parameters: {\n controls: { disable: true },\n },\n title: 'Components/DataGrid/Pinned Columns',\n};\n\nexport type TestDataFormat = {\n age: number;\n cypherCommand: string;\n name: string;\n pinnedLeft: string;\n pinnedRight: string;\n};\n\nconst columnHelper = createColumnHelper<TestDataFormat>();\n\nconst columnHelperRight =\n createColumnHelper<Omit<TestDataFormat, 'pinnedLeft'>>();\n\nconst columnHelperLeft =\n createColumnHelper<Omit<TestDataFormat, 'pinnedRight'>>();\n\nconst tablePropsRight = {\n columns: [\n columnHelperRight.accessor('name', {\n cell: (info) => info.getValue(),\n minSize: 180,\n }),\n columnHelperRight.accessor('age', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelperRight.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelperRight.accessor('pinnedRight', {\n cell: (info) => info.getValue(),\n size: 300,\n }),\n ],\n data: [\n {\n age: 31,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 1',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 32,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 2',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 33,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 3',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 34,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 4',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 35,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 5',\n pinnedRight: 'Pinned Right',\n },\n ],\n};\n\nconst tablePropsBoth = {\n columns: [\n columnHelper.accessor('pinnedLeft', {\n cell: (info) => info.getValue(),\n size: 200,\n }),\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n minSize: 180,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelper.accessor('pinnedRight', {\n cell: (info) => info.getValue(),\n size: 200,\n }),\n ],\n data: [\n {\n age: 31,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 1',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 32,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 2',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 33,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 3',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 34,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 4',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n {\n age: 35,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 5',\n pinnedLeft: 'Pinned Left',\n pinnedRight: 'Pinned Right',\n },\n ],\n};\n\nconst tablePropsLeft = {\n columns: [\n columnHelperLeft.accessor('pinnedLeft', {\n cell: (info) => info.getValue(),\n size: 300,\n }),\n columnHelperLeft.accessor('name', {\n cell: (info) => info.getValue(),\n minSize: 180,\n }),\n columnHelperLeft.accessor('age', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n columnHelperLeft.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 80,\n }),\n ],\n data: [\n {\n age: 31,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 1',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 32,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 2',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 33,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 3',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 34,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 4',\n pinnedLeft: 'Pinned Left',\n },\n {\n age: 35,\n cypherCommand: 'MATCH (n) RETURN n',\n name: 'Name 5',\n pinnedLeft: 'Pinned Left',\n },\n ],\n};\n\nexport const PinnedBothSides = () => {\n const table = useReactTable({\n ...tablePropsBoth,\n enableColumnPinning: true,\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n columnPinning: {\n left: ['pinnedLeft'],\n right: ['pinnedRight'],\n },\n },\n });\n\n return (\n <div className=\"w-w-full max-w-[1200px]\">\n <Typography variant=\"title-2\">\n Make the window smaller to test the overflow\n </Typography>\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={false}\n portalTarget={document.body}\n styling={{\n borderStyle: 'all-sides',\n hasZebraStriping: false,\n }}\n tableInstance={table}\n />\n </div>\n );\n};\n\nexport const PinnedLeftSide = () => {\n const table = useReactTable({\n ...tablePropsLeft,\n enableColumnPinning: true,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n columnPinning: {\n left: ['pinnedLeft'],\n },\n },\n });\n\n return (\n <div className=\"w-w-full max-w-[1200px]\">\n <Typography variant=\"title-2\">\n Make the window smaller to test the overflow\n </Typography>\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={false}\n styling={{\n borderStyle: 'all-sides',\n hasZebraStriping: false,\n }}\n tableInstance={table}\n />\n </div>\n );\n};\n\nexport const PinnedRightSide = () => {\n const table = useReactTable({\n ...tablePropsRight,\n enableColumnPinning: true,\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getSortedRowModel: getSortedRowModel(),\n state: {\n columnPinning: {\n right: ['pinnedRight'],\n },\n },\n });\n\n return (\n <div className=\"w-full max-w-[1200px]\">\n <Typography variant=\"title-2\">\n Make the window smaller to test the overflow\n </Typography>\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={false}\n portalTarget={document.body}\n styling={{\n borderStyle: 'all-sides',\n hasZebraStriping: false,\n }}\n tableInstance={table}\n />\n </div>\n );\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datagrid-search-and-filters.stories.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-search-and-filters.stories.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAU0B;AAC1B,kDAIgC;AAChC,uDAU+B;AAC/B,iCAAyC;AAEzC,6CAA+C;AAQ/C,kBAAe;IACb,SAAS,EAAE,gBAAQ;IACnB,EAAE,EAAE,yCAAyC;IAC7C,UAAU,EAAE;QACV,SAAS,EAAE,EAAE,eAAe,EAAE,IAAI,EAAE;QACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,KAAK,EAAE,wCAAwC;CAChD,CAAC;AAOF;;;GAGG;AACH,MAAM,cAAc,GAA6B,CAC/C,GAAG,EACH,QAAQ,EACR,WAAmB,EACnB,EAAE;IACF,MAAM,MAAM,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAEzC,IAAI,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAW,CAAC;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,uBAAL,KAAK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E,CAAC,kDAAc;YAC5B,IAAI,oBACC,aAAa,CACjB;YACD,OAAO,EAAE,EAAE;SACZ,CAAC;QACF,YAAY,CAAC,QAAQ,CAAC,eAAe,EAAE;YACrC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC/B,OAAO,EAAE,GAAG;YACZ,IAAI,EAAE,GAAG;SACV,CAAC;KACH,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,2BAAa,EAAC;QAC1B,gBAAgB,EAAE,UAAU;QAC5B,OAAO;QACP,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE;YACb,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,IAAA,6BAAe,GAAE;QAClC,qBAAqB,EAAE,IAAA,mCAAqB,GAAE;QAC9C,iBAAiB,EAAE,IAAA,+BAAiB,GAAE;QACtC,YAAY,EAAE;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,CAAC;aACZ;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,gCAAK,SAAS,EAAC,iDAAiD,YAC9D,uBAAC,gBAAQ,IACP,mBAAmB,EAAE,IAAI,EACzB,WAAW,EAAE,IAAI,EACjB,aAAa,EAAE,KAAK,GACpB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAlFW,QAAA,eAAe,mBAkF1B","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 Checkbox,\n CleanIconButton,\n DataGrid,\n Divider,\n IconButton,\n Popover,\n TextButton,\n TextInput,\n Typography,\n} from '@neo4j-ndl/react';\nimport {\n FunnelIconOutline,\n MagnifyingGlassIconOutline,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport {\n type ColumnFiltersState,\n type ColumnMeta,\n createColumnHelper,\n type FilterFn,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport { useRef, useState } from 'react';\n\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nexport default {\n component: DataGrid,\n id: 'components-data-grid-search-and-filters',\n parameters: {\n chromatic: { disableSnapshot: true },\n controls: { disable: true },\n },\n title: 'Components/DataGrid/Search And Filters',\n};\n\ninterface AgeFilterOptions {\n min?: number;\n max?: number;\n}\n\n/**\n * Custom global function as there is a bug in current version:\n * https://github.com/TanStack/table/issues/4280#issuecomment-1244878232\n */\nconst globalFilterFn: FilterFn<TestDataFormat> = (\n row,\n columnId,\n filterValue: string,\n) => {\n const search = filterValue.toLowerCase();\n\n let value = row.getValue(columnId) as string;\n if (typeof value === 'number') {\n value = String(value);\n }\n\n return value?.toLowerCase().includes(search);\n};\n\nconst OpenFilterMenuIconButton = ({\n onClick,\n isOpen,\n description,\n ref,\n}: {\n isOpen: boolean;\n} & Omit<React.ComponentProps<typeof IconButton>, 'children'>) => (\n <IconButton\n ref={ref}\n onClick={onClick}\n aria-controls={isOpen ? 'default-menu' : undefined}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n description={description}\n size=\"medium\"\n >\n <FunnelIconOutline />\n </IconButton>\n);\n\nexport const Searchable = () => {\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n const isOpen = Boolean(anchorEl);\n const ref = useRef<HTMLDivElement>(null);\n const [globalFilter, setGlobalFilter] = useState('');\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n\n const handleClick = (\n event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const columnHelper = createColumnHelper<TestDataFormat>();\n\n const columns = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Name',\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.renderValue(),\n footer: (info) => info.column.id,\n header: () => 'Age',\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Cypher Command',\n minSize: 400,\n size: 400,\n }),\n ];\n\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: TABLE_DEMO_DATA,\n debugColumns: true,\n debugHeaders: true,\n debugTable: true,\n defaultColumn: {\n maxSize: 800,\n minSize: 80,\n },\n enableSorting: false,\n filterFns: {},\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n globalFilterFn: globalFilterFn,\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n onColumnFiltersChange: setColumnFilters,\n onGlobalFilterChange: setGlobalFilter,\n state: {\n columnFilters,\n globalFilter,\n },\n });\n\n const toggleAgeFilter = ({ min, max }: AgeFilterOptions) => {\n const ageColumn = table.getColumn('age');\n\n if (!ageColumn) {\n return;\n }\n\n const currentFilter = ageColumn.getFilterValue() as\n | [number?, number?]\n | undefined;\n\n // Helper function to determine the new filter value for a specific bound\n const determineNewBound = (currentBound?: number, newBound?: number) => {\n if (newBound !== undefined && currentBound === newBound) {\n return undefined;\n }\n return newBound !== undefined ? newBound : currentBound;\n };\n\n const newFilter: [number?, number?] = [\n determineNewBound(currentFilter?.[0], min),\n determineNewBound(currentFilter?.[1], max),\n ];\n\n // Update the filter value in the table state\n ageColumn.setFilterValue(\n newFilter[0] === undefined && newFilter[1] === undefined\n ? undefined\n : newFilter,\n );\n };\n\n const isAgeFilterApplied = (type: 'min' | 'max', value: number) => {\n const ageFilter = columnFilters.find((filter) => filter.id === 'age');\n if (ageFilter) {\n const [min, max] = ageFilter.value as [number, number];\n if (type === 'min') {\n return min === value;\n }\n if (type === 'max') {\n return max === value;\n }\n }\n return false;\n };\n\n return (\n <div className=\"flex flex-col\" ref={ref}>\n <div className=\"flex flex-col gap-token-16 pb-token-16\">\n <div className=\"flex gap-token-8\">\n <TextInput\n aria-label=\"Table search\"\n value={globalFilter}\n placeholder=\"Search\"\n leadingElement={<MagnifyingGlassIconOutline />}\n isClearable={true}\n onChange={(event) => setGlobalFilter(event.target.value)}\n />\n <OpenFilterMenuIconButton\n isOpen={isOpen}\n onClick={handleClick}\n description=\"Filter Menu\"\n />\n </div>\n </div>\n <Divider />\n <DataGrid isResizable={true} tableInstance={table} />\n <Popover\n isOpen={isOpen}\n anchorElement={anchorEl}\n onOpenChange={(isOpen) => {\n if (!isOpen) {\n handleClose();\n }\n }}\n offset={({ rects }) => ({\n crossAxis: -rects.floating.width,\n })}\n >\n <Popover.Content>\n <div className=\"grid gap-token-16 p-token-24 w-[300px]\">\n <div className=\"w-full flex justify-between items-center\">\n <Typography variant=\"title-4\">Filter</Typography>\n <CleanIconButton\n onClick={handleClose}\n description=\"Close filter menu\"\n size=\"medium\"\n htmlAttributes={{\n title: 'Close filter menu',\n }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n </div>\n <div className=\"flex flex-col gap-2\">\n <Typography\n variant=\"body-medium\"\n className=\"text-neutral-text-weaker pb-token-4\"\n >\n Age\n </Typography>\n <Checkbox\n isChecked={isAgeFilterApplied('min', 18)}\n label=\"Age >= 18\"\n onClick={() => toggleAgeFilter({ min: 18 })}\n />\n <Checkbox\n isChecked={isAgeFilterApplied('max', 63)}\n label=\"Age <= 63\"\n onClick={() => toggleAgeFilter({ max: 63 })}\n />\n </div>\n <TextButton\n className=\"mt-token-32 justify-self-end\"\n variant=\"danger\"\n aria-label=\"Clear filters\"\n onClick={() => {\n table.resetColumnFilters();\n }}\n >\n <Typography\n variant=\"body-medium\"\n className=\"text-danger-text font-bold\"\n >\n Clear all\n </Typography>\n </TextButton>\n </div>\n </Popover.Content>\n </Popover>\n </div>\n );\n};\n\nexport const ColumnFiltering = () => {\n const [tableData, setTableData] = useState(TABLE_DEMO_DATA);\n const [isAgeFilterApplied, setIsAgeFilterApplied] = useState(false);\n const columnHelper = createColumnHelper<TestDataFormat>();\n\n const ColumnActions: ColumnMeta<TestDataFormat, unknown> = {\n columnActions: {\n actions: [\n {\n onClick: () => {\n // Filter the input table data value, TABLE_DEMO_DATA\n if (isAgeFilterApplied) {\n setTableData(TABLE_DEMO_DATA);\n setIsAgeFilterApplied(false);\n return;\n } else {\n const filteredData = TABLE_DEMO_DATA.filter(\n (data) => data.age >= 18,\n );\n setTableData(filteredData);\n setIsAgeFilterApplied(true);\n }\n },\n title: 'Age >= 18',\n },\n ],\n },\n };\n\n const columns = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n header: () => <div>Age</div>,\n meta: {\n ...ColumnActions,\n },\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 400,\n size: 400,\n }),\n ];\n\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: tableData,\n debugColumns: true,\n debugHeaders: true,\n debugTable: true,\n defaultColumn: {\n maxSize: 800,\n minSize: 80,\n },\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n });\n\n return (\n <div className=\"h-[1000px] w-full bg-primary-bg-weak p-token-32\">\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={true}\n tableInstance={table}\n />\n </div>\n );\n};\n"]}
|
|
1
|
+
{"version":3,"file":"datagrid-search-and-filters.stories.js","sourceRoot":"","sources":["../../../../src/data-grid/stories/datagrid-search-and-filters.stories.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAU0B;AAC1B,kDAIgC;AAChC,uDAU+B;AAC/B,iCAAyC;AAEzC,6CAA+C;AAQ/C,kBAAe;IACb,SAAS,EAAE,gBAAQ;IACnB,EAAE,EAAE,yCAAyC;IAC7C,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE;KAC5B;IACD,KAAK,EAAE,wCAAwC;CAChD,CAAC;AAOF;;;GAGG;AACH,MAAM,cAAc,GAA6B,CAC/C,GAAG,EACH,QAAQ,EACR,WAAmB,EACnB,EAAE;IACF,MAAM,MAAM,GAAG,WAAW,CAAC,WAAW,EAAE,CAAC;IAEzC,IAAI,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAW,CAAC;IAC7C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;IAED,OAAO,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,CAAC,EAChC,OAAO,EACP,MAAM,EACN,WAAW,EACX,GAAG,GAGwD,EAAE,EAAE,CAAC,CAChE,uBAAC,kBAAU,IACT,GAAG,EAAE,GAAG,EACR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AG;YACZ,IAAI,EAAE,GAAG;SACV,CAAC;KACH,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,2BAAa,EAAC;QAC1B,gBAAgB,EAAE,UAAU;QAC5B,OAAO;QACP,IAAI,EAAE,SAAS;QACf,YAAY,EAAE,IAAI;QAClB,YAAY,EAAE,IAAI;QAClB,UAAU,EAAE,IAAI;QAChB,aAAa,EAAE;YACb,OAAO,EAAE,GAAG;YACZ,OAAO,EAAE,EAAE;SACZ;QACD,aAAa,EAAE,IAAI;QACnB,eAAe,EAAE,IAAA,6BAAe,GAAE;QAClC,qBAAqB,EAAE,IAAA,mCAAqB,GAAE;QAC9C,iBAAiB,EAAE,IAAA,+BAAiB,GAAE;QACtC,YAAY,EAAE;YACZ,UAAU,EAAE;gBACV,QAAQ,EAAE,CAAC;aACZ;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,gCAAK,SAAS,EAAC,iDAAiD,YAC9D,uBAAC,gBAAQ,IACP,mBAAmB,EAAE,IAAI,EACzB,WAAW,EAAE,IAAI,EACjB,aAAa,EAAE,KAAK,GACpB,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAlFW,QAAA,eAAe,mBAkF1B","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 Checkbox,\n CleanIconButton,\n DataGrid,\n Divider,\n IconButton,\n Popover,\n TextButton,\n TextInput,\n Typography,\n} from '@neo4j-ndl/react';\nimport {\n FunnelIconOutline,\n MagnifyingGlassIconOutline,\n XMarkIconOutline,\n} from '@neo4j-ndl/react/icons';\nimport {\n type ColumnFiltersState,\n type ColumnMeta,\n createColumnHelper,\n type FilterFn,\n getCoreRowModel,\n getFilteredRowModel,\n getPaginationRowModel,\n getSortedRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport { useRef, useState } from 'react';\n\nimport { TABLE_DEMO_DATA } from './staticData';\n\ntype TestDataFormat = {\n name: string;\n age: number;\n cypherCommand: string;\n};\n\nexport default {\n component: DataGrid,\n id: 'components-data-grid-search-and-filters',\n parameters: {\n controls: { disable: true },\n },\n title: 'Components/DataGrid/Search And Filters',\n};\n\ninterface AgeFilterOptions {\n min?: number;\n max?: number;\n}\n\n/**\n * Custom global function as there is a bug in current version:\n * https://github.com/TanStack/table/issues/4280#issuecomment-1244878232\n */\nconst globalFilterFn: FilterFn<TestDataFormat> = (\n row,\n columnId,\n filterValue: string,\n) => {\n const search = filterValue.toLowerCase();\n\n let value = row.getValue(columnId) as string;\n if (typeof value === 'number') {\n value = String(value);\n }\n\n return value?.toLowerCase().includes(search);\n};\n\nconst OpenFilterMenuIconButton = ({\n onClick,\n isOpen,\n description,\n ref,\n}: {\n isOpen: boolean;\n} & Omit<React.ComponentProps<typeof IconButton>, 'children'>) => (\n <IconButton\n ref={ref}\n onClick={onClick}\n aria-controls={isOpen ? 'default-menu' : undefined}\n aria-haspopup=\"true\"\n aria-expanded={isOpen}\n description={description}\n size=\"medium\"\n >\n <FunnelIconOutline />\n </IconButton>\n);\n\nexport const Searchable = () => {\n const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null);\n const isOpen = Boolean(anchorEl);\n const ref = useRef<HTMLDivElement>(null);\n const [globalFilter, setGlobalFilter] = useState('');\n const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);\n\n const handleClick = (\n event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n ) => {\n setAnchorEl(event.currentTarget);\n };\n\n const handleClose = () => {\n setAnchorEl(null);\n };\n\n const columnHelper = createColumnHelper<TestDataFormat>();\n\n const columns = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Name',\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.renderValue(),\n footer: (info) => info.column.id,\n header: () => 'Age',\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n footer: (info) => info.column.id,\n header: () => 'Cypher Command',\n minSize: 400,\n size: 400,\n }),\n ];\n\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: TABLE_DEMO_DATA,\n debugColumns: true,\n debugHeaders: true,\n debugTable: true,\n defaultColumn: {\n maxSize: 800,\n minSize: 80,\n },\n enableSorting: false,\n filterFns: {},\n getCoreRowModel: getCoreRowModel(),\n getFilteredRowModel: getFilteredRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n globalFilterFn: globalFilterFn,\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n onColumnFiltersChange: setColumnFilters,\n onGlobalFilterChange: setGlobalFilter,\n state: {\n columnFilters,\n globalFilter,\n },\n });\n\n const toggleAgeFilter = ({ min, max }: AgeFilterOptions) => {\n const ageColumn = table.getColumn('age');\n\n if (!ageColumn) {\n return;\n }\n\n const currentFilter = ageColumn.getFilterValue() as\n | [number?, number?]\n | undefined;\n\n // Helper function to determine the new filter value for a specific bound\n const determineNewBound = (currentBound?: number, newBound?: number) => {\n if (newBound !== undefined && currentBound === newBound) {\n return undefined;\n }\n return newBound !== undefined ? newBound : currentBound;\n };\n\n const newFilter: [number?, number?] = [\n determineNewBound(currentFilter?.[0], min),\n determineNewBound(currentFilter?.[1], max),\n ];\n\n // Update the filter value in the table state\n ageColumn.setFilterValue(\n newFilter[0] === undefined && newFilter[1] === undefined\n ? undefined\n : newFilter,\n );\n };\n\n const isAgeFilterApplied = (type: 'min' | 'max', value: number) => {\n const ageFilter = columnFilters.find((filter) => filter.id === 'age');\n if (ageFilter) {\n const [min, max] = ageFilter.value as [number, number];\n if (type === 'min') {\n return min === value;\n }\n if (type === 'max') {\n return max === value;\n }\n }\n return false;\n };\n\n return (\n <div className=\"flex flex-col\" ref={ref}>\n <div className=\"flex flex-col gap-token-16 pb-token-16\">\n <div className=\"flex gap-token-8\">\n <TextInput\n aria-label=\"Table search\"\n value={globalFilter}\n placeholder=\"Search\"\n leadingElement={<MagnifyingGlassIconOutline />}\n isClearable={true}\n onChange={(event) => setGlobalFilter(event.target.value)}\n />\n <OpenFilterMenuIconButton\n isOpen={isOpen}\n onClick={handleClick}\n description=\"Filter Menu\"\n />\n </div>\n </div>\n <Divider />\n <DataGrid isResizable={true} tableInstance={table} />\n <Popover\n isOpen={isOpen}\n anchorElement={anchorEl}\n onOpenChange={(isOpen) => {\n if (!isOpen) {\n handleClose();\n }\n }}\n offset={({ rects }) => ({\n crossAxis: -rects.floating.width,\n })}\n >\n <Popover.Content>\n <div className=\"grid gap-token-16 p-token-24 w-[300px]\">\n <div className=\"w-full flex justify-between items-center\">\n <Typography variant=\"title-4\">Filter</Typography>\n <CleanIconButton\n onClick={handleClose}\n description=\"Close filter menu\"\n size=\"medium\"\n htmlAttributes={{\n title: 'Close filter menu',\n }}\n >\n <XMarkIconOutline />\n </CleanIconButton>\n </div>\n <div className=\"flex flex-col gap-2\">\n <Typography\n variant=\"body-medium\"\n className=\"text-neutral-text-weaker pb-token-4\"\n >\n Age\n </Typography>\n <Checkbox\n isChecked={isAgeFilterApplied('min', 18)}\n label=\"Age >= 18\"\n onClick={() => toggleAgeFilter({ min: 18 })}\n />\n <Checkbox\n isChecked={isAgeFilterApplied('max', 63)}\n label=\"Age <= 63\"\n onClick={() => toggleAgeFilter({ max: 63 })}\n />\n </div>\n <TextButton\n className=\"mt-token-32 justify-self-end\"\n variant=\"danger\"\n aria-label=\"Clear filters\"\n onClick={() => {\n table.resetColumnFilters();\n }}\n >\n <Typography\n variant=\"body-medium\"\n className=\"text-danger-text font-bold\"\n >\n Clear all\n </Typography>\n </TextButton>\n </div>\n </Popover.Content>\n </Popover>\n </div>\n );\n};\n\nexport const ColumnFiltering = () => {\n const [tableData, setTableData] = useState(TABLE_DEMO_DATA);\n const [isAgeFilterApplied, setIsAgeFilterApplied] = useState(false);\n const columnHelper = createColumnHelper<TestDataFormat>();\n\n const ColumnActions: ColumnMeta<TestDataFormat, unknown> = {\n columnActions: {\n actions: [\n {\n onClick: () => {\n // Filter the input table data value, TABLE_DEMO_DATA\n if (isAgeFilterApplied) {\n setTableData(TABLE_DEMO_DATA);\n setIsAgeFilterApplied(false);\n return;\n } else {\n const filteredData = TABLE_DEMO_DATA.filter(\n (data) => data.age >= 18,\n );\n setTableData(filteredData);\n setIsAgeFilterApplied(true);\n }\n },\n title: 'Age >= 18',\n },\n ],\n },\n };\n\n const columns = [\n columnHelper.accessor('name', {\n cell: (info) => info.getValue(),\n maxSize: 300,\n minSize: 180,\n size: 220,\n }),\n columnHelper.accessor('age', {\n cell: (info) => info.getValue(),\n header: () => <div>Age</div>,\n meta: {\n ...ColumnActions,\n },\n minSize: 80,\n }),\n columnHelper.accessor('cypherCommand', {\n cell: (info) => info.getValue(),\n minSize: 400,\n size: 400,\n }),\n ];\n\n const table = useReactTable({\n columnResizeMode: 'onChange',\n columns,\n data: tableData,\n debugColumns: true,\n debugHeaders: true,\n debugTable: true,\n defaultColumn: {\n maxSize: 800,\n minSize: 80,\n },\n enableSorting: true,\n getCoreRowModel: getCoreRowModel(),\n getPaginationRowModel: getPaginationRowModel(),\n getSortedRowModel: getSortedRowModel(),\n initialState: {\n pagination: {\n pageSize: 5,\n },\n },\n });\n\n return (\n <div className=\"h-[1000px] w-full bg-primary-bg-weak p-token-32\">\n <DataGrid\n isKeyboardNavigable={true}\n isResizable={true}\n tableInstance={table}\n />\n </div>\n );\n};\n"]}
|
|
@@ -37,14 +37,12 @@ const loadOptions = (inputValue) => {
|
|
|
37
37
|
}, 1000);
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
const Component = (
|
|
41
|
-
var _a;
|
|
40
|
+
const Component = () => {
|
|
42
41
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", helpText: "Start typing to load options dynamically", type: "async", selectProps: {
|
|
43
42
|
cacheOptions: true,
|
|
44
43
|
defaultOptions: true,
|
|
45
44
|
isClearable: true,
|
|
46
45
|
loadOptions,
|
|
47
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
48
46
|
placeholder: 'Type to search...',
|
|
49
47
|
} }));
|
|
50
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-async.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-async.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxD,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;YACF,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-async.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-async.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,UAAkB,EAAE,EAAE;IACzC,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;QACrD,UAAU,CAAC,GAAG,EAAE;YACd,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CACxD,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAC9D,CAAC;YACF,OAAO,CAAC,eAAe,CAAC,CAAC;QAC3B,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,0CAA0C,EACnD,IAAI,EAAC,OAAO,EACZ,WAAW,EAAE;YACX,YAAY,EAAE,IAAI;YAClB,cAAc,EAAE,IAAI;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW;YACX,WAAW,EAAE,mBAAmB;SACjC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst loadOptions = (inputValue: string) => {\n return new Promise<typeof EXAMPLE_OPTIONS>((resolve) => {\n setTimeout(() => {\n const filteredOptions = EXAMPLE_OPTIONS.filter((option) =>\n option.label.toLowerCase().includes(inputValue.toLowerCase()),\n );\n resolve(filteredOptions);\n }, 1000);\n });\n};\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Start typing to load options dynamically\"\n type=\"async\"\n selectProps={{\n cacheOptions: true,\n defaultOptions: true,\n isClearable: true,\n loadOptions,\n placeholder: 'Type to search...',\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,10 +29,8 @@ const EXAMPLE_OPTIONS = [
|
|
|
29
29
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
30
30
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
31
31
|
];
|
|
32
|
-
const Component = (
|
|
33
|
-
var _a;
|
|
32
|
+
const Component = () => {
|
|
34
33
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", type: "select", isClean: true, isFluid: false, selectProps: {
|
|
35
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
36
34
|
options: EXAMPLE_OPTIONS,
|
|
37
35
|
} }));
|
|
38
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-clean.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-clean.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-clean.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-clean.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,IAAI,EACb,OAAO,EAAE,KAAK,EACd,WAAW,EAAE;YACX,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n isClean={true}\n isFluid={false}\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,12 +29,10 @@ const EXAMPLE_OPTIONS = [
|
|
|
29
29
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
30
30
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
31
31
|
];
|
|
32
|
-
const Component = (
|
|
33
|
-
var _a;
|
|
32
|
+
const Component = () => {
|
|
34
33
|
const [value, setValue] = (0, react_2.useState)(EXAMPLE_OPTIONS[0]);
|
|
35
34
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex flex-col gap-token-8", children: [(0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", type: "select", selectProps: {
|
|
36
35
|
isMulti: false,
|
|
37
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
38
36
|
menuPortalTarget: document.querySelector('body'),
|
|
39
37
|
onChange: (newValue) => newValue && setValue(newValue),
|
|
40
38
|
options: EXAMPLE_OPTIONS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-controlled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-controlled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAAsD;AACtD,iCAAiC;AAEjC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-controlled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-controlled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4CAAsD;AACtD,iCAAiC;AAEjC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EAChC,eAAe,CAAC,CAAC,CAAC,CACnB,CAAC;IAEF,OAAO,CACL,iCAAK,SAAS,EAAC,2BAA2B,aACxC,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,OAAO,EAAE,KAAK;oBACd,gBAAgB,EAAE,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC;oBAChD,QAAQ,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,IAAI,QAAQ,CAAC,QAAQ,CAAC;oBACtD,OAAO,EAAE,eAAe;oBACxB,KAAK,EAAE,KAAK;iBACb,GACD,EACF,wBAAC,kBAAU,IAAC,OAAO,EAAC,YAAY,iCACb,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAC3B,IACT,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Select, Typography } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n const [value, setValue] = useState<(typeof EXAMPLE_OPTIONS)[number]>(\n EXAMPLE_OPTIONS[0],\n );\n\n return (\n <div className=\"flex flex-col gap-token-8\">\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isMulti: false,\n menuPortalTarget: document.querySelector('body'),\n onChange: (newValue) => newValue && setValue(newValue),\n options: EXAMPLE_OPTIONS,\n value: value,\n }}\n />\n <Typography variant=\"body-small\">\n Value Selected: {JSON.stringify(value)}\n </Typography>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,11 +29,9 @@ const EXAMPLE_OPTIONS = [
|
|
|
29
29
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
30
30
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
31
31
|
];
|
|
32
|
-
const Component = (
|
|
33
|
-
var _a;
|
|
32
|
+
const Component = () => {
|
|
34
33
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", helpText: "You can create values even if they don't exist as options", type: "creatable", selectProps: {
|
|
35
34
|
isClearable: true,
|
|
36
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
37
35
|
options: EXAMPLE_OPTIONS,
|
|
38
36
|
} }));
|
|
39
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-creatable.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-creatable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-creatable.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-creatable.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,2DAA2D,EACpE,IAAI,EAAC,WAAW,EAChB,WAAW,EAAE;YACX,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n helpText=\"You can create values even if they don't exist as options\"\n type=\"creatable\"\n selectProps={{\n isClearable: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -30,11 +30,9 @@ const EXAMPLE_OPTIONS = [
|
|
|
30
30
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
31
31
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
32
32
|
];
|
|
33
|
-
const Component = (
|
|
34
|
-
var _a;
|
|
33
|
+
const Component = () => {
|
|
35
34
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: (0, jsx_runtime_1.jsxs)("div", { className: "flex flex-row gap-token-4 h-7 items-center", children: ["Custom JSX element", (0, jsx_runtime_1.jsx)(icons_1.QuestionMarkCircleIconOutline, { className: "h-token-16" })] }), helpText: "You can have a custom label with JSX code \uD83D\uDE31", type: "select", selectProps: {
|
|
36
35
|
defaultValue: EXAMPLE_OPTIONS[1],
|
|
37
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
38
36
|
options: EXAMPLE_OPTIONS,
|
|
39
37
|
} }));
|
|
40
38
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-custom-label.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-custom-label.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAC1C,kDAAuE;AAEvE,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AACF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-custom-label.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-custom-label.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAC1C,kDAAuE;AAEvE,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AACF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EACH,iCAAK,SAAS,EAAC,4CAA4C,mCAEzD,uBAAC,qCAA6B,IAAC,SAAS,EAAC,YAAY,GAAG,IACpD,EAER,QAAQ,EAAC,wDAA8C,EACvD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\nimport { QuestionMarkCircleIconOutline } from '@neo4j-ndl/react/icons';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\nconst Component = () => {\n return (\n <Select\n label={\n <div className=\"flex flex-row gap-token-4 h-7 items-center\">\n Custom JSX element\n <QuestionMarkCircleIconOutline className=\"h-token-16\" />\n </div>\n }\n helpText=\"You can have a custom label with JSX code 😱\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -33,10 +33,8 @@ const EXAMPLE_OPTIONS = [
|
|
|
33
33
|
},
|
|
34
34
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
35
35
|
];
|
|
36
|
-
const Component = (
|
|
37
|
-
var _a;
|
|
36
|
+
const Component = () => {
|
|
38
37
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Select an option", helpText: "Help text", type: "select", selectProps: {
|
|
39
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
40
38
|
options: EXAMPLE_OPTIONS,
|
|
41
39
|
} }));
|
|
42
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-default.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD;QACE,KAAK,EAAE,gDAAgD;QACvD,KAAK,EAAE,YAAY;KACpB;IACD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-default.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-default.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD;QACE,KAAK,EAAE,gDAAgD;QACvD,KAAK,EAAE,YAAY;KACpB;IACD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,kBAAkB,EACxB,QAAQ,EAAC,WAAW,EACpB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n {\n label: 'Really long label that does not fit on one row',\n value: 'long-label',\n },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Select an option\"\n helpText=\"Help text\"\n type=\"select\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,11 +29,9 @@ const EXAMPLE_OPTIONS = [
|
|
|
29
29
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
30
30
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
31
31
|
];
|
|
32
|
-
const Component = (
|
|
33
|
-
var _a;
|
|
32
|
+
const Component = () => {
|
|
34
33
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", type: "select", selectProps: {
|
|
35
34
|
isDisabled: true,
|
|
36
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
37
35
|
options: EXAMPLE_OPTIONS,
|
|
38
36
|
} }));
|
|
39
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-disabled.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-disabled.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,UAAU,EAAE,IAAI;YAChB,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n isDisabled: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -23,10 +23,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
23
23
|
*/
|
|
24
24
|
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
25
|
const react_1 = require("@neo4j-ndl/react");
|
|
26
|
-
const Component = (
|
|
27
|
-
var _a;
|
|
26
|
+
const Component = () => {
|
|
28
27
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", helpText: "Help text", type: "select", selectProps: {
|
|
29
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
30
28
|
options: [],
|
|
31
29
|
} }));
|
|
32
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-empty.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-empty.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-empty.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-empty.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,QAAQ,EAAC,WAAW,EACpB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,OAAO,EAAE,EAAE;SACZ,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n helpText=\"Help text\"\n type=\"select\"\n selectProps={{\n options: [],\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,10 +29,8 @@ const EXAMPLE_OPTIONS = [
|
|
|
29
29
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
30
30
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
31
31
|
];
|
|
32
|
-
const Component = (
|
|
33
|
-
var _a;
|
|
32
|
+
const Component = () => {
|
|
34
33
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", errorText: "Validate that your selection is correct", type: "select", selectProps: {
|
|
35
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
36
34
|
options: EXAMPLE_OPTIONS,
|
|
37
35
|
} }));
|
|
38
36
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-error-state.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-error-state.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-error-state.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-error-state.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,SAAS,EAAC,yCAAyC,EACnD,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n errorText=\"Validate that your selection is correct\"\n type=\"select\"\n selectProps={{\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -30,13 +30,11 @@ const EXAMPLE_OPTIONS = [
|
|
|
30
30
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
31
31
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
32
32
|
];
|
|
33
|
-
const Component = (
|
|
34
|
-
var _a;
|
|
33
|
+
const Component = () => {
|
|
35
34
|
const ref = (0, react_2.useRef)(null);
|
|
36
35
|
const [isOpen, setIsOpen] = (0, react_2.useState)(false);
|
|
37
36
|
return ((0, jsx_runtime_1.jsxs)("div", { ref: ref, className: "flex flex-col items-center justify-center relative h-[500px]", children: [(0, jsx_runtime_1.jsx)(react_1.FilledButton, { size: "medium", onClick: () => setIsOpen(true), children: "Open Dialog" }), (0, jsx_runtime_1.jsxs)(react_1.Dialog, { container: (ref === null || ref === void 0 ? void 0 : ref.current) || undefined, isOpen: isOpen, onClose: () => setIsOpen(false), "aria-label": "Dialog", children: [(0, jsx_runtime_1.jsx)(react_1.Dialog.Header, { children: "Using Select inside a dialog" }), (0, jsx_runtime_1.jsxs)(react_1.Dialog.Description, { className: "flex flex-col gap-token-32", children: [(0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["To use select inside a dialog and avoid the cut-off, you need to use the property ", (0, jsx_runtime_1.jsx)("code", { children: "menuPosition: \"fixed\"" }), " inside the", ' ', (0, jsx_runtime_1.jsx)("code", { children: "selectProps" }), ". This is done automatically if used in a Needle Dialog, but can always be overridden manually."] }), (0, jsx_runtime_1.jsx)(react_1.Select, { label: "Inside a dialog", type: "select", selectProps: {
|
|
38
37
|
defaultValue: EXAMPLE_OPTIONS[1],
|
|
39
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
40
38
|
options: EXAMPLE_OPTIONS,
|
|
41
39
|
} })] })] })] }));
|
|
42
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA4E;AAC5E,iCAAyC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-inside-dialog.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-inside-dialog.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA4E;AAC5E,iCAAyC;AAEzC,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,GAAG,GAAG,IAAA,cAAM,EAAwB,IAAI,CAAC,CAAC;IAChD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAU,KAAK,CAAC,CAAC;IAErD,OAAO,CACL,iCACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAC,8DAA8D,aAExE,uBAAC,oBAAY,IAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,4BAE3C,EACf,wBAAC,cAAM,IACL,SAAS,EAAE,CAAA,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,OAAO,KAAI,SAAS,EACpC,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,gBACpB,QAAQ,aAEnB,uBAAC,cAAM,CAAC,MAAM,+CAA6C,EAC3D,wBAAC,cAAM,CAAC,WAAW,IAAC,SAAS,EAAC,4BAA4B,aACxD,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,mGAElB,uEAA4C,iBAAY,GAAG,EACxE,2DAAwB,uGAEb,EACb,uBAAC,cAAM,IACL,KAAK,EAAC,iBAAiB,EACvB,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oCACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;oCAChC,OAAO,EAAE,eAAe;iCACzB,GACD,IACiB,IACd,IACL,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Dialog, FilledButton, Select, Typography } from '@neo4j-ndl/react';\nimport { useRef, useState } from 'react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n const ref = useRef<HTMLDivElement | null>(null);\n const [isOpen, setIsOpen] = useState<boolean>(false);\n\n return (\n <div\n ref={ref}\n className=\"flex flex-col items-center justify-center relative h-[500px]\"\n >\n <FilledButton size=\"medium\" onClick={() => setIsOpen(true)}>\n Open Dialog\n </FilledButton>\n <Dialog\n container={ref?.current || undefined}\n isOpen={isOpen}\n onClose={() => setIsOpen(false)}\n aria-label=\"Dialog\"\n >\n <Dialog.Header>Using Select inside a dialog</Dialog.Header>\n <Dialog.Description className=\"flex flex-col gap-token-32\">\n <Typography variant=\"body-medium\">\n To use select inside a dialog and avoid the cut-off, you need to use\n the property <code>menuPosition: "fixed"</code> inside the{' '}\n <code>selectProps</code>. This is done automatically if used in a\n Needle Dialog, but can always be overridden manually.\n </Typography>\n <Select\n label=\"Inside a dialog\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n options: EXAMPLE_OPTIONS,\n }}\n />\n </Dialog.Description>\n </Dialog>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -27,18 +27,14 @@ const EXAMPLE_OPTIONS = [
|
|
|
27
27
|
{ label: 'Neo4j', value: 'neo4j' },
|
|
28
28
|
{ label: 'Needle 🪡', value: 'needle' },
|
|
29
29
|
];
|
|
30
|
-
const Component = (
|
|
31
|
-
var _a, _b, _c;
|
|
30
|
+
const Component = () => {
|
|
32
31
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "flex gap-token-16 pt-token-64", children: [(0, jsx_runtime_1.jsx)(react_1.Select, { label: "Automatic menu placement", type: "select", selectProps: {
|
|
33
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
34
32
|
menuPlacement: 'auto',
|
|
35
33
|
options: EXAMPLE_OPTIONS,
|
|
36
34
|
} }), (0, jsx_runtime_1.jsx)(react_1.Select, { label: "Bottom menu placement", type: "select", selectProps: {
|
|
37
|
-
menuIsOpen: (_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.menuIsOpen,
|
|
38
35
|
menuPlacement: 'bottom',
|
|
39
36
|
options: EXAMPLE_OPTIONS,
|
|
40
37
|
} }), (0, jsx_runtime_1.jsx)(react_1.Select, { label: "Top menu placement", type: "select", selectProps: {
|
|
41
|
-
menuIsOpen: (_c = props.selectProps) === null || _c === void 0 ? void 0 : _c.menuIsOpen,
|
|
42
38
|
menuPlacement: 'top',
|
|
43
39
|
options: EXAMPLE_OPTIONS,
|
|
44
40
|
} })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-menu-positionings.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-menu-positionings.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;CACxC,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-menu-positionings.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-menu-positionings.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;CACxC,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,iCAAK,SAAS,EAAC,+BAA+B,aAC5C,uBAAC,cAAM,IACL,KAAK,EAAC,0BAA0B,EAChC,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,aAAa,EAAE,MAAM;oBACrB,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,uBAAC,cAAM,IACL,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,aAAa,EAAE,QAAQ;oBACvB,OAAO,EAAE,eAAe;iBACzB,GACD,EACF,uBAAC,cAAM,IACL,KAAK,EAAC,oBAAoB,EAC1B,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;oBACX,aAAa,EAAE,KAAK;oBACpB,OAAO,EAAE,eAAe;iBACzB,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n];\n\nconst Component = () => {\n return (\n <div className=\"flex gap-token-16 pt-token-64\">\n <Select\n label=\"Automatic menu placement\"\n type=\"select\"\n selectProps={{\n menuPlacement: 'auto',\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Bottom menu placement\"\n type=\"select\"\n selectProps={{\n menuPlacement: 'bottom',\n options: EXAMPLE_OPTIONS,\n }}\n />\n <Select\n label=\"Top menu placement\"\n type=\"select\"\n selectProps={{\n menuPlacement: 'top',\n options: EXAMPLE_OPTIONS,\n }}\n />\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -29,13 +29,11 @@ const EXAMPLE_OPTIONS = [
|
|
|
29
29
|
{ label: 'Graph Databases', value: 'graph-database' },
|
|
30
30
|
{ isDisabled: true, label: 'Disabled database option', value: 'disabled' },
|
|
31
31
|
];
|
|
32
|
-
const Component = (
|
|
33
|
-
var _a;
|
|
32
|
+
const Component = () => {
|
|
34
33
|
return ((0, jsx_runtime_1.jsx)(react_1.Select, { label: "Label", type: "select", selectProps: {
|
|
35
34
|
defaultValue: EXAMPLE_OPTIONS[1],
|
|
36
35
|
isClearable: true,
|
|
37
36
|
isMulti: true,
|
|
38
|
-
menuIsOpen: (_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.menuIsOpen,
|
|
39
37
|
options: EXAMPLE_OPTIONS,
|
|
40
38
|
} }));
|
|
41
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-multi.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-multi.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,
|
|
1
|
+
{"version":3,"file":"select-multi.story.js","sourceRoot":"","sources":["../../../../src/select/stories/select-multi.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAA0C;AAE1C,MAAM,eAAe,GAAG;IACtB,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE;IACvC,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gBAAgB,EAAE;IACrD,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,0BAA0B,EAAE,KAAK,EAAE,UAAU,EAAE;CAC3E,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,uBAAC,cAAM,IACL,KAAK,EAAC,OAAO,EACb,IAAI,EAAC,QAAQ,EACb,WAAW,EAAE;YACX,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;YAChC,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,eAAe;SACzB,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { Select } from '@neo4j-ndl/react';\n\nconst EXAMPLE_OPTIONS = [\n { label: 'Neo4j', value: 'neo4j' },\n { label: 'Needle 🪡', value: 'needle' },\n { label: 'Graph Databases', value: 'graph-database' },\n { isDisabled: true, label: 'Disabled database option', value: 'disabled' },\n];\n\nconst Component = () => {\n return (\n <Select\n label=\"Label\"\n type=\"select\"\n selectProps={{\n defaultValue: EXAMPLE_OPTIONS[1],\n isClearable: true,\n isMulti: true,\n options: EXAMPLE_OPTIONS,\n }}\n />\n );\n};\n\nexport default Component;\n"]}
|