UNPKG

@neo4j-ndl/react

Version:

React implementation of Neo4j Design System

226 lines (225 loc) 7.04 kB
/** * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ "use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.InDialog = exports.MenuPositionings = exports.Sizes = exports.CustomLabel = exports.Clean = exports.Disabled = exports.ErrorState = exports.Empty = exports.MultipleSelections = exports.Controlled = exports.Creatable = exports.Async = exports.Default = void 0; const jsx_runtime_1 = require("react/jsx-runtime"); const isChromatic_1 = __importDefault(require("chromatic/isChromatic")); const index_1 = require("../../index"); const _1 = require("."); const centeredContainerDecorator = (Story) => ((0, jsx_runtime_1.jsx)("div", { className: "n-flex n-justify-center", children: (0, jsx_runtime_1.jsx)(Story, {}) })); const widthDecorator = (Story) => ((0, jsx_runtime_1.jsx)("div", { className: "n-w-80", children: (0, jsx_runtime_1.jsx)(Story, {}) })); const fullSizeDecorator = (Story) => ((0, jsx_runtime_1.jsx)("div", { className: "n-w-full n-h-full", children: (0, jsx_runtime_1.jsx)(Story, {}) })); const componentMeta = { component: index_1.Select, decorators: [centeredContainerDecorator], id: 'components-select', parameters: { controls: { disable: true }, }, tags: ['docsPage'], title: 'Components/Select', }; exports.default = componentMeta; exports.Default = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectDefaultSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectDefault, }; exports.Async = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectAsyncSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectAsync, }; exports.Creatable = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectCreatableSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectCreatable, }; exports.Controlled = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectControlledSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectControlled, }; exports.MultipleSelections = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectMultiSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectMulti, }; exports.Empty = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectEmptySource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectEmpty, }; exports.ErrorState = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectErrorStateSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectErrorState, }; exports.Disabled = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectDisabledSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectDisabled, }; exports.Clean = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectCleanSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectClean, }; exports.CustomLabel = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [widthDecorator], parameters: { docs: { source: { code: _1.SelectCustomLabelSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectCustomLabel, }; exports.Sizes = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, parameters: { docs: { source: { code: _1.SelectSizesSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectSizes, }; exports.MenuPositionings = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, parameters: { docs: { source: { code: _1.SelectMenuPositioningsSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectMenuPositionings, }; exports.InDialog = { args: { selectProps: { menuIsOpen: (0, isChromatic_1.default)() || undefined } }, decorators: [fullSizeDecorator], parameters: { docs: { source: { code: _1.SelectInsideDialogSource, language: 'tsx', type: 'code', }, }, }, render: _1.SelectInsideDialog, }; //# sourceMappingURL=select.stories.js.map