@neo4j-ndl/react 4.11.7 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/avatar/Avatar.js +2 -2
- package/lib/cjs/avatar/Avatar.js.map +1 -1
- package/lib/cjs/avatar/stories/avatar-custom-icon.story.js +31 -0
- package/lib/cjs/avatar/stories/avatar-custom-icon.story.js.map +1 -0
- package/lib/cjs/avatar/stories/index.js +5 -1
- package/lib/cjs/avatar/stories/index.js.map +1 -1
- package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
- package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
- package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
- package/lib/cjs/selectable-tag/SelectableTag.js +53 -0
- package/lib/cjs/selectable-tag/SelectableTag.js.map +1 -0
- package/lib/cjs/selectable-tag/index.js +26 -0
- package/lib/cjs/selectable-tag/index.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/index.js +52 -0
- package/lib/cjs/selectable-tag/stories/index.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-default.story.js +32 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-default.story.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js +30 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js +33 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-truncation.story.js +33 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-truncation.story.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-with-badge.story.js +32 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-with-badge.story.js.map +1 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-with-leading-icon.story.js +33 -0
- package/lib/cjs/selectable-tag/stories/selectable-tag-with-leading-icon.story.js.map +1 -0
- package/lib/cjs/tag/Tag.js +2 -0
- package/lib/cjs/tag/Tag.js.map +1 -1
- package/lib/cjs/tag-base/stories/index.js +32 -0
- package/lib/cjs/tag-base/stories/index.js.map +1 -0
- package/lib/cjs/tag-base/stories/tag-variants.story.js +32 -0
- package/lib/cjs/tag-base/stories/tag-variants.story.js.map +1 -0
- package/lib/esm/avatar/Avatar.js +2 -2
- package/lib/esm/avatar/Avatar.js.map +1 -1
- package/lib/esm/avatar/stories/avatar-custom-icon.story.js +29 -0
- package/lib/esm/avatar/stories/avatar-custom-icon.story.js.map +1 -0
- package/lib/esm/avatar/stories/index.js +3 -0
- package/lib/esm/avatar/stories/index.js.map +1 -1
- package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
- package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
- package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
- package/lib/esm/selectable-tag/SelectableTag.js +46 -0
- package/lib/esm/selectable-tag/SelectableTag.js.map +1 -0
- package/lib/esm/selectable-tag/index.js +22 -0
- package/lib/esm/selectable-tag/index.js.map +1 -0
- package/lib/esm/selectable-tag/stories/index.js +40 -0
- package/lib/esm/selectable-tag/stories/index.js.map +1 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-default.story.js +30 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-default.story.js.map +1 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js +28 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js +31 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-truncation.story.js +31 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-truncation.story.js.map +1 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-with-badge.story.js +30 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-with-badge.story.js.map +1 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-with-leading-icon.story.js +31 -0
- package/lib/esm/selectable-tag/stories/selectable-tag-with-leading-icon.story.js.map +1 -0
- package/lib/esm/tag/Tag.js +2 -0
- package/lib/esm/tag/Tag.js.map +1 -1
- package/lib/esm/tag-base/stories/index.js +25 -0
- package/lib/esm/tag-base/stories/index.js.map +1 -0
- package/lib/esm/tag-base/stories/tag-variants.story.js +30 -0
- package/lib/esm/tag-base/stories/tag-variants.story.js.map +1 -0
- package/lib/types/avatar/Avatar.d.ts +3 -1
- package/lib/types/avatar/Avatar.d.ts.map +1 -1
- package/lib/types/avatar/stories/avatar-custom-icon.story.d.ts +24 -0
- package/lib/types/avatar/stories/avatar-custom-icon.story.d.ts.map +1 -0
- package/lib/types/avatar/stories/index.d.ts +2 -0
- package/lib/types/avatar/stories/index.d.ts.map +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/selectable-tag/SelectableTag.d.ts +42 -0
- package/lib/types/selectable-tag/SelectableTag.d.ts.map +1 -0
- package/lib/types/selectable-tag/index.d.ts +22 -0
- package/lib/types/selectable-tag/index.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/index.d.ts +33 -0
- package/lib/types/selectable-tag/stories/index.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/selectable-tag-default.story.d.ts +24 -0
- package/lib/types/selectable-tag/stories/selectable-tag-default.story.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/selectable-tag-disabled.story.d.ts +24 -0
- package/lib/types/selectable-tag/stories/selectable-tag-disabled.story.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/selectable-tag-sizes.story.d.ts +24 -0
- package/lib/types/selectable-tag/stories/selectable-tag-sizes.story.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/selectable-tag-truncation.story.d.ts +24 -0
- package/lib/types/selectable-tag/stories/selectable-tag-truncation.story.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/selectable-tag-with-badge.story.d.ts +24 -0
- package/lib/types/selectable-tag/stories/selectable-tag-with-badge.story.d.ts.map +1 -0
- package/lib/types/selectable-tag/stories/selectable-tag-with-leading-icon.story.d.ts +24 -0
- package/lib/types/selectable-tag/stories/selectable-tag-with-leading-icon.story.d.ts.map +1 -0
- package/lib/types/tag/Tag.d.ts +2 -0
- package/lib/types/tag/Tag.d.ts.map +1 -1
- package/lib/types/tag-base/stories/index.d.ts +23 -0
- package/lib/types/tag-base/stories/index.d.ts.map +1 -0
- package/lib/types/tag-base/stories/tag-variants.story.d.ts +24 -0
- package/lib/types/tag-base/stories/tag-variants.story.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { SelectableTag } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
27
|
+
return (_jsx(SelectableTag, { isSelected: isSelected, onClick: () => setIsSelected(!isSelected), children: "Selectable Tag" }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=selectable-tag-default.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-default.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,KAAC,aAAa,IACZ,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,+BAG3B,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isSelected, setIsSelected] = useState(false);\n\n return (\n <SelectableTag\n isSelected={isSelected}\n onClick={() => setIsSelected(!isSelected)}\n >\n Selectable Tag\n </SelectableTag>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { SelectableTag } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs("div", { className: "n-flex n-gap-token-8 n-items-center", children: [_jsx(SelectableTag, { isSelected: false, isDisabled: true, onClick: () => null, children: "Disabled unselected tag" }), _jsx(SelectableTag, { isSelected: true, isDisabled: true, onClick: () => null, children: "Disabled selected tag" })] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=selectable-tag-disabled.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-disabled.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-disabled.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,qCAAqC,aAClD,KAAC,aAAa,IAAC,UAAU,EAAE,KAAK,EAAE,UAAU,QAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,wCAEhD,EAChB,KAAC,aAAa,IAAC,UAAU,EAAE,IAAI,EAAE,UAAU,QAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,sCAE/C,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-gap-token-8 n-items-center\">\n <SelectableTag isSelected={false} isDisabled onClick={() => null}>\n Disabled unselected tag\n </SelectableTag>\n <SelectableTag isSelected={true} isDisabled onClick={() => null}>\n Disabled selected tag\n </SelectableTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { SelectableTag } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
var _a, _b, _c, _d;
|
|
27
|
+
const [selected, setSelected] = useState({});
|
|
28
|
+
return (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-8", children: [_jsx(SelectableTag, { size: "x-small", isSelected: (_a = selected['x-small']) !== null && _a !== void 0 ? _a : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['x-small']: !s['x-small'] }))), children: "X-Small" }), _jsx(SelectableTag, { size: "small", isSelected: (_b = selected['small']) !== null && _b !== void 0 ? _b : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['small']: !s['small'] }))), children: "Small" }), _jsx(SelectableTag, { size: "medium", isSelected: (_c = selected['medium']) !== null && _c !== void 0 ? _c : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['medium']: !s['medium'] }))), children: "Medium" }), _jsx(SelectableTag, { size: "large", isSelected: (_d = selected['large']) !== null && _d !== void 0 ? _d : false, onClick: () => setSelected((s) => (Object.assign(Object.assign({}, s), { ['large']: !s['large'] }))), children: "Large" })] }));
|
|
29
|
+
};
|
|
30
|
+
export default Component;
|
|
31
|
+
//# sourceMappingURL=selectable-tag-sizes.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;;IACrB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAA0B,EAAE,CAAC,CAAC;IAEtE,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,aAAa,IACZ,IAAI,EAAC,SAAS,EACd,UAAU,EAAE,MAAA,QAAQ,CAAC,SAAS,CAAC,mCAAI,KAAK,EACxC,OAAO,EAAE,GAAG,EAAE,CACZ,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,IAAG,CAAC,wBAI9C,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,MAAA,QAAQ,CAAC,OAAO,CAAC,mCAAI,KAAK,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAG,CAAC,sBAGvD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,QAAQ,EACb,UAAU,EAAE,MAAA,QAAQ,CAAC,QAAQ,CAAC,mCAAI,KAAK,EACvC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAG,CAAC,uBAGzD,EAChB,KAAC,aAAa,IACZ,IAAI,EAAC,OAAO,EACZ,UAAU,EAAE,MAAA,QAAQ,CAAC,OAAO,CAAC,mCAAI,KAAK,EACtC,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,iCAAM,CAAC,KAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAG,CAAC,sBAGvD,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [selected, setSelected] = useState<Record<string, boolean>>({});\n\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <SelectableTag\n size=\"x-small\"\n isSelected={selected['x-small'] ?? false}\n onClick={() =>\n setSelected((s) => ({ ...s, ['x-small']: !s['x-small'] }))\n }\n >\n X-Small\n </SelectableTag>\n <SelectableTag\n size=\"small\"\n isSelected={selected['small'] ?? false}\n onClick={() => setSelected((s) => ({ ...s, ['small']: !s['small'] }))}\n >\n Small\n </SelectableTag>\n <SelectableTag\n size=\"medium\"\n isSelected={selected['medium'] ?? false}\n onClick={() => setSelected((s) => ({ ...s, ['medium']: !s['medium'] }))}\n >\n Medium\n </SelectableTag>\n <SelectableTag\n size=\"large\"\n isSelected={selected['large'] ?? false}\n onClick={() => setSelected((s) => ({ ...s, ['large']: !s['large'] }))}\n >\n Large\n </SelectableTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { SelectableTag, Tooltip } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const label = 'This is a very very very long tag label that should be truncated';
|
|
26
|
+
const Component = () => {
|
|
27
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
28
|
+
return (_jsx("div", { style: { maxWidth: 200 }, children: _jsxs(Tooltip, { type: "simple", children: [_jsx(Tooltip.Trigger, { hasButtonWrapper: true, children: _jsx(SelectableTag, { isSelected: isSelected, onClick: () => setIsSelected(!isSelected), badgeCount: 8, children: label }) }), _jsx(Tooltip.Content, { children: label })] }) }));
|
|
29
|
+
};
|
|
30
|
+
export default Component;
|
|
31
|
+
//# sourceMappingURL=selectable-tag-truncation.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-truncation.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-truncation.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,KAAK,GACT,kEAAkE,CAAC;AAErE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,cAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC3B,MAAC,OAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,KAAC,OAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,KAAC,aAAa,IACZ,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,EACzC,UAAU,EAAE,CAAC,YAEZ,KAAK,GACQ,GACA,EAClB,KAAC,OAAO,CAAC,OAAO,cAAE,KAAK,GAAmB,IAClC,GACN,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag, Tooltip } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst label =\n 'This is a very very very long tag label that should be truncated';\n\nconst Component = () => {\n const [isSelected, setIsSelected] = useState(false);\n\n return (\n <div style={{ maxWidth: 200 }}>\n <Tooltip type=\"simple\">\n <Tooltip.Trigger hasButtonWrapper>\n <SelectableTag\n isSelected={isSelected}\n onClick={() => setIsSelected(!isSelected)}\n badgeCount={8}\n >\n {label}\n </SelectableTag>\n </Tooltip.Trigger>\n <Tooltip.Content>{label}</Tooltip.Content>\n </Tooltip>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { SelectableTag } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
27
|
+
return (_jsx(SelectableTag, { badgeCount: 8, isSelected: isSelected, onClick: () => setIsSelected(!isSelected), children: "Selectable Tag with badge" }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=selectable-tag-with-badge.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-with-badge.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-with-badge.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,KAAC,aAAa,IACZ,UAAU,EAAE,CAAC,EACb,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,0CAG3B,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isSelected, setIsSelected] = useState(false);\n\n return (\n <SelectableTag\n badgeCount={8}\n isSelected={isSelected}\n onClick={() => setIsSelected(!isSelected)}\n >\n Selectable Tag with badge\n </SelectableTag>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { SelectableTag } from '@neo4j-ndl/react';
|
|
24
|
+
import { DatabasePlusIcon } from '@neo4j-ndl/react/icons';
|
|
25
|
+
import { useState } from 'react';
|
|
26
|
+
const Component = () => {
|
|
27
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
28
|
+
return (_jsx(SelectableTag, { isSelected: isSelected, leadingVisual: _jsx(DatabasePlusIcon, {}), onClick: () => setIsSelected(!isSelected), children: "Selectable Tag with leading icon" }));
|
|
29
|
+
};
|
|
30
|
+
export default Component;
|
|
31
|
+
//# sourceMappingURL=selectable-tag-with-leading-icon.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-with-leading-icon.story.js","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-with-leading-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,KAAC,aAAa,IACZ,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,KAAC,gBAAgB,KAAG,EACnC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,iDAG3B,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { SelectableTag } from '@neo4j-ndl/react';\nimport { DatabasePlusIcon } from '@neo4j-ndl/react/icons';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isSelected, setIsSelected] = useState(false);\n\n return (\n <SelectableTag\n isSelected={isSelected}\n leadingVisual={<DatabasePlusIcon />}\n onClick={() => setIsSelected(!isSelected)}\n >\n Selectable Tag with leading icon\n </SelectableTag>\n );\n};\n\nexport default Component;\n"]}
|
package/lib/esm/tag/Tag.js
CHANGED
|
@@ -34,6 +34,8 @@ import classNames from 'classnames';
|
|
|
34
34
|
import { ConditionalWrap } from '../conditional-wrap';
|
|
35
35
|
import { XMarkIconOutline } from '../icons';
|
|
36
36
|
/**
|
|
37
|
+
* @deprecated Use `ReadOnlyTag`, `DismissibleTag`, or `SelectableTag` instead. This component will be removed in v5.
|
|
38
|
+
*
|
|
37
39
|
* Tag component is a small visual element that represents a tag.
|
|
38
40
|
* A tag is always removable. If you want a non removable tag, use the StatusLabel component instead.
|
|
39
41
|
*/
|
package/lib/esm/tag/Tag.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAa5C
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAa5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAUW,EAAE,EAAE;QAVf,EAClB,QAAQ,EACR,IAAI,GAAG,SAAS,EAChB,IAAI,GAAG,QAAQ,EACf,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,GAAG,OAE0B,EAD1B,SAAS,cATM,sFAUnB,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE;QAC/C,iBAAiB,EAAE,IAAI,KAAK,aAAa;QACzC,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,OAAO,CACL,6BACE,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,KAAC,eAAe,IACd,UAAU,EAAE,IAAI,KAAK,aAAa,EAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,iBAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACnC,QAAQ,GACF,CACV,YAED,eAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,GACnC,EACjB,IAAI,KAAK,aAAa,IAAI,CACzB,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,OAAO,gBACL,YAAY,YAEvB,KAAC,gBAAgB,KAAG,GACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type CommonProps } from '../_common/types';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { XMarkIconOutline } from '../icons';\n\ninterface TagProps {\n /** The content of the tag */\n children: React.ReactNode;\n /** Type of the tag */\n type?: 'destructive' | 'default';\n /** Size of the tag */\n size?: 'small' | 'medium' | 'large';\n /** Callback function triggered when tag should be removed */\n onClick?: React.MouseEventHandler<HTMLButtonElement>;\n}\n\n/**\n * @deprecated Use `ReadOnlyTag`, `DismissibleTag`, or `SelectableTag` instead. This component will be removed in v5.\n *\n * Tag component is a small visual element that represents a tag.\n * A tag is always removable. If you want a non removable tag, use the StatusLabel component instead.\n */\nexport const Tag = ({\n children,\n type = 'default',\n size = 'medium',\n onClick,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'div', TagProps>) => {\n const classes = classNames(`ndl-tag`, className, {\n 'ndl-destructive': type === 'destructive',\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n });\n\n return (\n <div\n className={classes}\n ref={ref}\n style={style}\n {...restProps}\n {...htmlAttributes}\n >\n <ConditionalWrap\n shouldWrap={type === 'destructive'}\n wrap={(children) => (\n <button type=\"button\" onClick={onClick}>\n {children}\n </button>\n )}\n >\n <span className=\"ndl-tag-content\">{children}</span>\n </ConditionalWrap>\n {type !== 'destructive' && (\n <button\n type=\"button\"\n className=\"ndl-remove-icon\"\n onClick={onClick}\n aria-label=\"Remove tag\"\n >\n <XMarkIconOutline />\n </button>\n )}\n </div>\n );\n};\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as TagVariants } from './tag-variants.story';
|
|
22
|
+
import { removeLicenseHeader } from '../../_common/export-stories-utils';
|
|
23
|
+
import TagVariantsSourceRaw from './tag-variants.story?raw';
|
|
24
|
+
export const TagVariantsSource = removeLicenseHeader(TagVariantsSourceRaw);
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/tag-base/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAE5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as TagVariants } from './tag-variants.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TagVariantsSourceRaw from './tag-variants.story?raw';\n\nexport const TagVariantsSource = removeLicenseHeader(TagVariantsSourceRaw);\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) "Neo4j"
|
|
5
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
6
|
+
*
|
|
7
|
+
* This file is part of Neo4j.
|
|
8
|
+
*
|
|
9
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
10
|
+
* it under the terms of the GNU General Public License as published by
|
|
11
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
12
|
+
* (at your option) any later version.
|
|
13
|
+
*
|
|
14
|
+
* This program is distributed in the hope that it will be useful,
|
|
15
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
+
* GNU General Public License for more details.
|
|
18
|
+
*
|
|
19
|
+
* You should have received a copy of the GNU General Public License
|
|
20
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
+
*/
|
|
22
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
+
import { DismissibleTag, ReadOnlyTag, SelectableTag } from '@neo4j-ndl/react';
|
|
24
|
+
import { useState } from 'react';
|
|
25
|
+
const Component = () => {
|
|
26
|
+
const [isSelected, setIsSelected] = useState(false);
|
|
27
|
+
return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-8 n-items-start", children: [_jsx(ReadOnlyTag, { children: "Read-only" }), _jsx(DismissibleTag, { onRemove: () => console.info('DismissibleTag onRemove was called'), children: "Dismissible" }), _jsx(SelectableTag, { isSelected: isSelected, onClick: () => setIsSelected(!isSelected), children: "Selectable" })] }));
|
|
28
|
+
};
|
|
29
|
+
export default Component;
|
|
30
|
+
//# sourceMappingURL=tag-variants.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-variants.story.js","sourceRoot":"","sources":["../../../../src/tag-base/stories/tag-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,eAAK,SAAS,EAAC,+CAA+C,aAC5D,KAAC,WAAW,4BAAwB,EACpC,KAAC,cAAc,IACb,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAAC,4BAGnD,EACjB,KAAC,aAAa,IACZ,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,2BAG3B,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { DismissibleTag, ReadOnlyTag, SelectableTag } from '@neo4j-ndl/react';\nimport { useState } from 'react';\n\nconst Component = () => {\n const [isSelected, setIsSelected] = useState(false);\n\n return (\n <div className=\"n-flex n-flex-col n-gap-token-8 n-items-start\">\n <ReadOnlyTag>Read-only</ReadOnlyTag>\n <DismissibleTag\n onRemove={() => console.info('DismissibleTag onRemove was called')}\n >\n Dismissible\n </DismissibleTag>\n <SelectableTag\n isSelected={isSelected}\n onClick={() => setIsSelected(!isSelected)}\n >\n Selectable\n </SelectableTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -38,12 +38,14 @@ type AvatarProps = {
|
|
|
38
38
|
status?: 'offline' | 'online' | 'unknown';
|
|
39
39
|
/** The type of avatar content. If `type="image"` and no source is provided, automatically falls back to `icon` */
|
|
40
40
|
type?: 'icon' | 'image' | 'letters';
|
|
41
|
+
/** Custom icon to display when `type` is `"icon"`. Defaults to `UserIconOutline` */
|
|
42
|
+
icon?: React.ReactNode;
|
|
41
43
|
} & ({
|
|
42
44
|
as: 'button';
|
|
43
45
|
onClick: () => void;
|
|
44
46
|
} | {
|
|
45
47
|
as?: React.ElementType;
|
|
46
48
|
});
|
|
47
|
-
export declare const Avatar: <T extends React.ElementType = "div">({ as, hasStatus, isDisabled, name, shape, size, source, status, type: initialType, className, style, htmlAttributes, ref, ...restProps }: PolymorphicCommonProps<T, AvatarProps>) => import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
export declare const Avatar: <T extends React.ElementType = "div">({ as, hasStatus, icon, isDisabled, name, shape, size, source, status, type: initialType, className, style, htmlAttributes, ref, ...restProps }: PolymorphicCommonProps<T, AvatarProps>) => import("react/jsx-runtime").JSX.Element;
|
|
48
50
|
export {};
|
|
49
51
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../src/avatar/Avatar.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAiF/D,KAAK,WAAW,GAAG;IACjB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,4IAA4I;IAC5I,UAAU,CAAC,E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SAAS,CAAC;CACxB,GAAG,CACA;IACE,EAAE,EAAE,QAAQ,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,GACD;IACE,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CACxB,CACJ,CAAC;AAaF,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,KAAK,EAAE,gJAgBzD,sBAAsB,CAAC,CAAC,EAAE,WAAW,CAAC,4CAyExC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Component;
|
|
24
|
+
//# sourceMappingURL=avatar-custom-icon.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"avatar-custom-icon.story.d.ts","sourceRoot":"","sources":["../../../../src/avatar/stories/avatar-custom-icon.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AASjD,QAAA,MAAM,SAAS,+CAQd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -18,12 +18,14 @@
|
|
|
18
18
|
* You should have received a copy of the GNU General Public License
|
|
19
19
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*/
|
|
21
|
+
export { default as AvatarCustomIcon } from './avatar-custom-icon.story';
|
|
21
22
|
export { default as AvatarDefault } from './avatar-default.story';
|
|
22
23
|
export { default as AvatarDisabled } from './avatar-disabled.story';
|
|
23
24
|
export { default as AvatarSizes } from './avatar-sizes.story';
|
|
24
25
|
export { default as AvatarShapes } from './avatar-shapes.story';
|
|
25
26
|
export { default as AvatarTypes } from './avatar-types.story';
|
|
26
27
|
export { default as AvatarStatuses } from './avatar-statuses.story';
|
|
28
|
+
export declare const AvatarCustomIconSource: string;
|
|
27
29
|
export declare const AvatarDefaultSource: string;
|
|
28
30
|
export declare const AvatarDisabledSource: string;
|
|
29
31
|
export declare const AvatarSizesSource: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/avatar/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/avatar/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAWpE,eAAO,MAAM,sBAAsB,QAElC,CAAC;AACF,eAAO,MAAM,mBAAmB,QAA8C,CAAC;AAC/E,eAAO,MAAM,oBAAoB,QAEhC,CAAC;AACF,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,kBAAkB,QAA6C,CAAC;AAC7E,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,eAAO,MAAM,oBAAoB,QAEhC,CAAC"}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -79,4 +79,5 @@ export { Kbd } from './kbd';
|
|
|
79
79
|
export { SelectIconButton } from './select-icon-button';
|
|
80
80
|
export { ReadOnlyTag } from './read-only-tag';
|
|
81
81
|
export { DismissibleTag } from './dismissible-tag';
|
|
82
|
+
export { SelectableTag } from './selectable-tag';
|
|
82
83
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,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gB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
import type React from 'react';
|
|
23
|
+
import { type CommonProps } from '../_common/types';
|
|
24
|
+
import type { TagSize } from '../tag-base';
|
|
25
|
+
export interface SelectableTagProps {
|
|
26
|
+
/** The content of the tag */
|
|
27
|
+
children?: React.ReactNode;
|
|
28
|
+
/** Whether the tag is disabled */
|
|
29
|
+
isDisabled?: boolean;
|
|
30
|
+
/** Whether the tag is selected */
|
|
31
|
+
isSelected: boolean;
|
|
32
|
+
/** Number displayed in a badge after the content */
|
|
33
|
+
badgeCount?: number;
|
|
34
|
+
/** Icon to display before the content */
|
|
35
|
+
leadingVisual?: React.ReactNode;
|
|
36
|
+
/** Size of the tag */
|
|
37
|
+
size?: TagSize;
|
|
38
|
+
/** Callback fired when the tag is clicked */
|
|
39
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
40
|
+
}
|
|
41
|
+
export declare const SelectableTag: ({ children, className, htmlAttributes, isSelected, badgeCount, leadingVisual, onClick, ref, isDisabled, size, style, ...restProps }: CommonProps<"button", SelectableTagProps>) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
//# sourceMappingURL=SelectableTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectableTag.d.ts","sourceRoot":"","sources":["../../../src/selectable-tag/SelectableTag.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kCAAkC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,sBAAsB;IACtB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,OAAO,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACrD;AAED,eAAO,MAAM,aAAa,GAAI,qIAa3B,WAAW,CAAC,QAAQ,EAAE,kBAAkB,CAAC,4CAiC3C,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { SelectableTag } from './SelectableTag';
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/selectable-tag/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
export { default as SelectableTagDefault } from './selectable-tag-default.story';
|
|
22
|
+
export { default as SelectableTagDisabled } from './selectable-tag-disabled.story';
|
|
23
|
+
export { default as SelectableTagSizes } from './selectable-tag-sizes.story';
|
|
24
|
+
export { default as SelectableTagTruncation } from './selectable-tag-truncation.story';
|
|
25
|
+
export { default as SelectableTagWithLeadingIcon } from './selectable-tag-with-leading-icon.story';
|
|
26
|
+
export { default as SelectableTagWithBadge } from './selectable-tag-with-badge.story';
|
|
27
|
+
export declare const SelectableTagDefaultSrc: string;
|
|
28
|
+
export declare const SelectableTagDisabledSrc: string;
|
|
29
|
+
export declare const SelectableTagSizesSrc: string;
|
|
30
|
+
export declare const SelectableTagTruncationSrc: string;
|
|
31
|
+
export declare const SelectableTagWithLeadingIconSrc: string;
|
|
32
|
+
export declare const SelectableTagWithBadgeSrc: string;
|
|
33
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACnF,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,OAAO,IAAI,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,4BAA4B,EAAE,MAAM,0CAA0C,CAAC;AACnG,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAUtF,eAAO,MAAM,uBAAuB,QAEnC,CAAC;AACF,eAAO,MAAM,wBAAwB,QAEpC,CAAC;AACF,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,0BAA0B,QAEtC,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,yBAAyB,QAErC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Component;
|
|
24
|
+
//# sourceMappingURL=selectable-tag-default.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectable-tag-default.story.d.ts","sourceRoot":"","sources":["../../../../src/selectable-tag/stories/selectable-tag-default.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAKjD,QAAA,MAAM,SAAS,+CAWd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* Copyright (c) "Neo4j"
|
|
4
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
5
|
+
*
|
|
6
|
+
* This file is part of Neo4j.
|
|
7
|
+
*
|
|
8
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
9
|
+
* it under the terms of the GNU General Public License as published by
|
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
11
|
+
* (at your option) any later version.
|
|
12
|
+
*
|
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
* GNU General Public License for more details.
|
|
17
|
+
*
|
|
18
|
+
* You should have received a copy of the GNU General Public License
|
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*/
|
|
21
|
+
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
22
|
+
declare const Component: () => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export default Component;
|
|
24
|
+
//# sourceMappingURL=selectable-tag-disabled.story.d.ts.map
|