@neo4j-ndl/react 4.5.10 → 4.5.11
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/text-link/TextLink.js +3 -2
- package/lib/cjs/text-link/TextLink.js.map +1 -1
- package/lib/cjs/text-link/stories/index.js +5 -1
- package/lib/cjs/text-link/stories/index.js.map +1 -1
- package/lib/cjs/text-link/stories/text-link-external-underline.story.js +30 -0
- package/lib/cjs/text-link/stories/text-link-external-underline.story.js.map +1 -0
- package/lib/cjs/text-link/stories/text-link-internal-underline.story.js +1 -1
- package/lib/cjs/text-link/stories/text-link-internal-underline.story.js.map +1 -1
- package/lib/cjs/text-link/stories/text-link.stories.js +14 -1
- package/lib/cjs/text-link/stories/text-link.stories.js.map +1 -1
- package/lib/esm/text-link/TextLink.js +3 -2
- package/lib/esm/text-link/TextLink.js.map +1 -1
- package/lib/esm/text-link/stories/index.js +3 -0
- package/lib/esm/text-link/stories/index.js.map +1 -1
- package/lib/esm/text-link/stories/text-link-external-underline.story.js +28 -0
- package/lib/esm/text-link/stories/text-link-external-underline.story.js.map +1 -0
- package/lib/esm/text-link/stories/text-link-internal-underline.story.js +3 -3
- package/lib/esm/text-link/stories/text-link-internal-underline.story.js.map +1 -1
- package/lib/esm/text-link/stories/text-link.stories.js +14 -1
- package/lib/esm/text-link/stories/text-link.stories.js.map +1 -1
- package/lib/types/text-link/TextLink.d.ts +6 -5
- package/lib/types/text-link/TextLink.d.ts.map +1 -1
- package/lib/types/text-link/stories/index.d.ts +2 -0
- package/lib/types/text-link/stories/index.d.ts.map +1 -1
- package/lib/types/text-link/stories/text-link-external-underline.story.d.ts +24 -0
- package/lib/types/text-link/stories/text-link-external-underline.story.d.ts.map +1 -0
- package/lib/types/text-link/stories/text-link-internal-underline.story.d.ts.map +1 -1
- package/lib/types/text-link/stories/text-link.stories.d.ts +1 -0
- package/lib/types/text-link/stories/text-link.stories.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -39,14 +39,15 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
39
39
|
const classnames_1 = __importDefault(require("classnames"));
|
|
40
40
|
const icons_1 = require("../icons");
|
|
41
41
|
const TextLink = (_a) => {
|
|
42
|
-
var { children, href, type = 'internal', as, className, target = type === 'external' ? '_blank' : '', style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "href", "type", "as", "className", "target", "style", "htmlAttributes", "ref"]);
|
|
42
|
+
var { children, href, type = 'internal', as, className, target = type === 'external' || type === 'external-underline' ? '_blank' : '', style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "href", "type", "as", "className", "target", "style", "htmlAttributes", "ref"]);
|
|
43
43
|
const Component = as !== null && as !== void 0 ? as : 'a';
|
|
44
44
|
const classes = (0, classnames_1.default)('ndl-text-link', className, {
|
|
45
45
|
'ndl-external-link': type === 'external',
|
|
46
|
+
'ndl-external-underline': type === 'external-underline',
|
|
46
47
|
'ndl-internal-icon': type === 'internal-icon',
|
|
47
48
|
'ndl-internal-underline': type === 'internal-underline',
|
|
48
49
|
});
|
|
49
|
-
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ className: classes, href: href, ref: ref, style: style, target: target }, restProps, htmlAttributes, { children: [children, type === 'external' && ((0, jsx_runtime_1.jsx)(icons_1.ArrowUpRightIconOutline, { className: "ndl-external-link-icon" })), type === 'internal-icon' && ((0, jsx_runtime_1.jsx)(icons_1.ChevronRightIconOutline, { className: "ndl-external-link-icon" }))] })));
|
|
50
|
+
return ((0, jsx_runtime_1.jsxs)(Component, Object.assign({ className: classes, href: href, ref: ref, style: style, target: target }, restProps, htmlAttributes, { children: [children, (type === 'external' || type === 'external-underline') && ((0, jsx_runtime_1.jsx)(icons_1.ArrowUpRightIconOutline, { className: "ndl-external-link-icon" })), type === 'internal-icon' && ((0, jsx_runtime_1.jsx)(icons_1.ChevronRightIconOutline, { className: "ndl-external-link-icon" }))] })));
|
|
50
51
|
};
|
|
51
52
|
exports.TextLink = TextLink;
|
|
52
53
|
//# sourceMappingURL=TextLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,oCAA4E;
|
|
1
|
+
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,oCAA4E;AAkCrE,MAAM,QAAQ,GAAG,CAAoC,EAWjB,EAAE,EAAE;QAXa,EAC1D,QAAQ,EACR,IAAI,EACJ,IAAI,GAAG,UAAU,EACjB,EAAE,EACF,SAAS,EACT,MAAM,GAAG,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,oBAAoB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAC7E,KAAK,EACL,cAAc,EACd,GAAG,OAEsC,EADtC,SAAS,cAV8C,2FAW3D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,GAAG,CAAC;IAE/C,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,eAAe,EAAE,SAAS,EAAE;QACrD,mBAAmB,EAAE,IAAI,KAAK,UAAU;QACxC,wBAAwB,EAAE,IAAI,KAAK,oBAAoB;QACvD,mBAAmB,EAAE,IAAI,KAAK,eAAe;QAC7C,wBAAwB,EAAE,IAAI,KAAK,oBAAoB;KACxD,CAAC,CAAC;IAEH,OAAO,CACL,wBAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,IACV,SAAS,EACT,cAAc,eAEjB,QAAQ,EACR,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,oBAAoB,CAAC,IAAI,CACzD,uBAAC,+BAAuB,IAAC,SAAS,EAAC,wBAAwB,GAAG,CAC/D,EACA,IAAI,KAAK,eAAe,IAAI,CAC3B,uBAAC,+BAAuB,IAAC,SAAS,EAAC,wBAAwB,GAAG,CAC/D,KACS,CACb,CAAC;AACJ,CAAC,CAAC;AAxCW,QAAA,QAAQ,YAwCnB","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 PolymorphicCommonProps } from '../_common/types';\nimport { ArrowUpRightIconOutline, ChevronRightIconOutline } from '../icons';\n\ntype TextLinkType =\n | 'internal'\n | 'internal-underline'\n | 'internal-icon'\n | 'external'\n | 'external-underline';\n\ntype TextLinkProps = {\n /** The content displayed inside the link */\n children: React.ReactNode;\n\n /** The URL the link points to */\n href?: string;\n\n /**\n * The type of the text link\n * - 'internal': A link to another page within the application\n * - 'internal-underline': A link to another page within the application with an underline\n * - 'internal-icon': A link to another page within the application with an icon\n * - 'external': A link to an external website. An external link icon is appended.\n * - 'external-underline': A link to an external website with an underline and an external link icon is appended.\n * @default 'internal'\n */\n type?: TextLinkType;\n\n /** Specifies where to open the linked document. If omitted and `type` is `\"external\"` it defaults to `\"_blank\"`. */\n target?: HTMLAnchorElement['target'];\n\n /** Additional class name */\n className?: string;\n};\n\nexport const TextLink = <T extends React.ElementType = 'a'>({\n children,\n href,\n type = 'internal',\n as,\n className,\n target = type === 'external' || type === 'external-underline' ? '_blank' : '',\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TextLinkProps>) => {\n const Component: React.ElementType = as ?? 'a';\n\n const classes = classNames('ndl-text-link', className, {\n 'ndl-external-link': type === 'external',\n 'ndl-external-underline': type === 'external-underline',\n 'ndl-internal-icon': type === 'internal-icon',\n 'ndl-internal-underline': type === 'internal-underline',\n });\n\n return (\n <Component\n className={classes}\n href={href}\n ref={ref}\n style={style}\n target={target}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n {(type === 'external' || type === 'external-underline') && (\n <ArrowUpRightIconOutline className=\"ndl-external-link-icon\" />\n )}\n {type === 'internal-icon' && (\n <ChevronRightIconOutline className=\"ndl-external-link-icon\" />\n )}\n </Component>\n );\n};\n"]}
|
|
@@ -23,11 +23,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
23
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.TextLinkInternalUnderlineSource = exports.TextLinkInternalIconSource = exports.TextLinkExternalSource = exports.TextLinkDefaultSource = exports.TextLinkInternalUnderline = exports.TextLinkInternalIcon = exports.TextLinkExternal = exports.TextLinkDefault = void 0;
|
|
26
|
+
exports.TextLinkInternalUnderlineSource = exports.TextLinkInternalIconSource = exports.TextLinkExternalUnderlineSource = exports.TextLinkExternalSource = exports.TextLinkDefaultSource = exports.TextLinkInternalUnderline = exports.TextLinkInternalIcon = exports.TextLinkExternalUnderline = exports.TextLinkExternal = exports.TextLinkDefault = void 0;
|
|
27
27
|
var text_link_default_story_1 = require("./text-link-default.story");
|
|
28
28
|
Object.defineProperty(exports, "TextLinkDefault", { enumerable: true, get: function () { return __importDefault(text_link_default_story_1).default; } });
|
|
29
29
|
var text_link_external_story_1 = require("./text-link-external.story");
|
|
30
30
|
Object.defineProperty(exports, "TextLinkExternal", { enumerable: true, get: function () { return __importDefault(text_link_external_story_1).default; } });
|
|
31
|
+
var text_link_external_underline_story_1 = require("./text-link-external-underline.story");
|
|
32
|
+
Object.defineProperty(exports, "TextLinkExternalUnderline", { enumerable: true, get: function () { return __importDefault(text_link_external_underline_story_1).default; } });
|
|
31
33
|
var text_link_internal_icon_story_1 = require("./text-link-internal-icon.story");
|
|
32
34
|
Object.defineProperty(exports, "TextLinkInternalIcon", { enumerable: true, get: function () { return __importDefault(text_link_internal_icon_story_1).default; } });
|
|
33
35
|
var text_link_internal_underline_story_1 = require("./text-link-internal-underline.story");
|
|
@@ -35,10 +37,12 @@ Object.defineProperty(exports, "TextLinkInternalUnderline", { enumerable: true,
|
|
|
35
37
|
const export_stories_utils_1 = require("../../_common/export-stories-utils");
|
|
36
38
|
const text_link_default_story_raw_1 = __importDefault(require("./text-link-default.story?raw"));
|
|
37
39
|
const text_link_external_story_raw_1 = __importDefault(require("./text-link-external.story?raw"));
|
|
40
|
+
const text_link_external_underline_story_raw_1 = __importDefault(require("./text-link-external-underline.story?raw"));
|
|
38
41
|
const text_link_internal_icon_story_raw_1 = __importDefault(require("./text-link-internal-icon.story?raw"));
|
|
39
42
|
const text_link_internal_underline_story_raw_1 = __importDefault(require("./text-link-internal-underline.story?raw"));
|
|
40
43
|
exports.TextLinkDefaultSource = (0, export_stories_utils_1.removeLicenseHeader)(text_link_default_story_raw_1.default);
|
|
41
44
|
exports.TextLinkExternalSource = (0, export_stories_utils_1.removeLicenseHeader)(text_link_external_story_raw_1.default);
|
|
45
|
+
exports.TextLinkExternalUnderlineSource = (0, export_stories_utils_1.removeLicenseHeader)(text_link_external_underline_story_raw_1.default);
|
|
42
46
|
exports.TextLinkInternalIconSource = (0, export_stories_utils_1.removeLicenseHeader)(text_link_internal_icon_story_raw_1.default);
|
|
43
47
|
exports.TextLinkInternalUnderlineSource = (0, export_stories_utils_1.removeLicenseHeader)(text_link_internal_underline_story_raw_1.default);
|
|
44
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text-link/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,iFAAkF;AAAzE,sJAAA,OAAO,OAAwB;AACxC,2FAA4F;AAAnF,gKAAA,OAAO,OAA6B;AAE7C,6EAAyE;AACzE,gGAAqE;AACrE,kGAAuE;AACvE,4GAAgF;AAChF,sHAA0F;AAE7E,QAAA,qBAAqB,GAAG,IAAA,0CAAmB,EACtD,qCAAwB,CACzB,CAAC;AACW,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,sCAAyB,CAC1B,CAAC;AACW,QAAA,0BAA0B,GAAG,IAAA,0CAAmB,EAC3D,2CAA6B,CAC9B,CAAC;AACW,QAAA,+BAA+B,GAAG,IAAA,0CAAmB,EAChE,gDAAkC,CACnC,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 TextLinkDefault } from './text-link-default.story';\nexport { default as TextLinkExternal } from './text-link-external.story';\nexport { default as TextLinkInternalIcon } from './text-link-internal-icon.story';\nexport { default as TextLinkInternalUnderline } from './text-link-internal-underline.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TextLinkDefaultSourceRaw from './text-link-default.story?raw';\nimport TextLinkExternalSourceRaw from './text-link-external.story?raw';\nimport TextLinkInternalIconSourceRaw from './text-link-internal-icon.story?raw';\nimport TextLinkInternalUnderlineSourceRaw from './text-link-internal-underline.story?raw';\n\nexport const TextLinkDefaultSource = removeLicenseHeader(\n TextLinkDefaultSourceRaw,\n);\nexport const TextLinkExternalSource = removeLicenseHeader(\n TextLinkExternalSourceRaw,\n);\nexport const TextLinkInternalIconSource = removeLicenseHeader(\n TextLinkInternalIconSourceRaw,\n);\nexport const TextLinkInternalUnderlineSource = removeLicenseHeader(\n TextLinkInternalUnderlineSourceRaw,\n);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text-link/stories/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;AAEH,qEAAuE;AAA9D,2IAAA,OAAO,OAAmB;AACnC,uEAAyE;AAAhE,6IAAA,OAAO,OAAoB;AACpC,2FAA4F;AAAnF,gKAAA,OAAO,OAA6B;AAC7C,iFAAkF;AAAzE,sJAAA,OAAO,OAAwB;AACxC,2FAA4F;AAAnF,gKAAA,OAAO,OAA6B;AAE7C,6EAAyE;AACzE,gGAAqE;AACrE,kGAAuE;AACvE,sHAA0F;AAC1F,4GAAgF;AAChF,sHAA0F;AAE7E,QAAA,qBAAqB,GAAG,IAAA,0CAAmB,EACtD,qCAAwB,CACzB,CAAC;AACW,QAAA,sBAAsB,GAAG,IAAA,0CAAmB,EACvD,sCAAyB,CAC1B,CAAC;AACW,QAAA,+BAA+B,GAAG,IAAA,0CAAmB,EAChE,gDAAkC,CACnC,CAAC;AACW,QAAA,0BAA0B,GAAG,IAAA,0CAAmB,EAC3D,2CAA6B,CAC9B,CAAC;AACW,QAAA,+BAA+B,GAAG,IAAA,0CAAmB,EAChE,gDAAkC,CACnC,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 TextLinkDefault } from './text-link-default.story';\nexport { default as TextLinkExternal } from './text-link-external.story';\nexport { default as TextLinkExternalUnderline } from './text-link-external-underline.story';\nexport { default as TextLinkInternalIcon } from './text-link-internal-icon.story';\nexport { default as TextLinkInternalUnderline } from './text-link-internal-underline.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TextLinkDefaultSourceRaw from './text-link-default.story?raw';\nimport TextLinkExternalSourceRaw from './text-link-external.story?raw';\nimport TextLinkExternalUnderlineSourceRaw from './text-link-external-underline.story?raw';\nimport TextLinkInternalIconSourceRaw from './text-link-internal-icon.story?raw';\nimport TextLinkInternalUnderlineSourceRaw from './text-link-internal-underline.story?raw';\n\nexport const TextLinkDefaultSource = removeLicenseHeader(\n TextLinkDefaultSourceRaw,\n);\nexport const TextLinkExternalSource = removeLicenseHeader(\n TextLinkExternalSourceRaw,\n);\nexport const TextLinkExternalUnderlineSource = removeLicenseHeader(\n TextLinkExternalUnderlineSourceRaw,\n);\nexport const TextLinkInternalIconSource = removeLicenseHeader(\n TextLinkInternalIconSourceRaw,\n);\nexport const TextLinkInternalUnderlineSource = removeLicenseHeader(\n TextLinkInternalUnderlineSourceRaw,\n);\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) "Neo4j"
|
|
7
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
8
|
+
*
|
|
9
|
+
* This file is part of Neo4j.
|
|
10
|
+
*
|
|
11
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
12
|
+
* it under the terms of the GNU General Public License as published by
|
|
13
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
14
|
+
* (at your option) any later version.
|
|
15
|
+
*
|
|
16
|
+
* This program is distributed in the hope that it will be useful,
|
|
17
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
|
+
* GNU General Public License for more details.
|
|
20
|
+
*
|
|
21
|
+
* You should have received a copy of the GNU General Public License
|
|
22
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
23
|
+
*/
|
|
24
|
+
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
|
+
const react_1 = require("@neo4j-ndl/react");
|
|
26
|
+
const Component = () => {
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["The quick brown fox", ' ', (0, jsx_runtime_1.jsx)(react_1.TextLink, { href: "https://neo4j.com", type: "external-underline", children: "jumps" }), ' ', "over the lazy dog."] }));
|
|
28
|
+
};
|
|
29
|
+
exports.default = Component;
|
|
30
|
+
//# sourceMappingURL=text-link-external-underline.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-link-external-underline.story.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-external-underline.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAwD;AAExD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,oCACX,GAAG,EACvB,uBAAC,gBAAQ,IAAC,IAAI,EAAC,mBAAmB,EAAC,IAAI,EAAC,oBAAoB,sBAEjD,EAAC,GAAG,0BAEJ,CACd,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 { TextLink, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Typography variant=\"body-medium\">\n The quick brown fox{' '}\n <TextLink href=\"https://neo4j.com\" type=\"external-underline\">\n jumps\n </TextLink>{' '}\n over the lazy dog.\n </Typography>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -24,7 +24,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
24
24
|
require("@neo4j-ndl/base/lib/neo4j-ds-styles.css");
|
|
25
25
|
const react_1 = require("@neo4j-ndl/react");
|
|
26
26
|
const Component = () => {
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(react_1.TextLink, { href: "/", type: "internal-underline", children: "
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Typography, { variant: "body-medium", children: ["The quick brown fox", ' ', (0, jsx_runtime_1.jsx)(react_1.TextLink, { href: "/", type: "internal-underline", children: "jumps" }), ' ', "over the lazy dog."] }));
|
|
28
28
|
};
|
|
29
29
|
exports.default = Component;
|
|
30
30
|
//# sourceMappingURL=text-link-internal-underline.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link-internal-underline.story.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-internal-underline.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,
|
|
1
|
+
{"version":3,"file":"text-link-internal-underline.story.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-internal-underline.story.tsx"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mDAAiD;AAEjD,4CAAwD;AAExD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,wBAAC,kBAAU,IAAC,OAAO,EAAC,aAAa,oCACX,GAAG,EACvB,uBAAC,gBAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,oBAAoB,sBAEjC,EAAC,GAAG,0BAEJ,CACd,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 { TextLink, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Typography variant=\"body-medium\">\n The quick brown fox{' '}\n <TextLink href=\"/\" type=\"internal-underline\">\n jumps\n </TextLink>{' '}\n over the lazy dog.\n </Typography>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InternalIcon = exports.External = exports.InternalUnderline = exports.Default = void 0;
|
|
3
|
+
exports.InternalIcon = exports.ExternalUnderline = exports.External = exports.InternalUnderline = exports.Default = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -73,6 +73,19 @@ exports.External = {
|
|
|
73
73
|
},
|
|
74
74
|
render: _1.TextLinkExternal,
|
|
75
75
|
};
|
|
76
|
+
exports.ExternalUnderline = {
|
|
77
|
+
args: {},
|
|
78
|
+
parameters: {
|
|
79
|
+
docs: {
|
|
80
|
+
source: {
|
|
81
|
+
code: _1.TextLinkExternalUnderlineSource,
|
|
82
|
+
language: 'tsx',
|
|
83
|
+
type: 'code',
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
render: _1.TextLinkExternalUnderline,
|
|
88
|
+
};
|
|
76
89
|
exports.InternalIcon = {
|
|
77
90
|
args: {},
|
|
78
91
|
parameters: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.stories.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link.stories.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4C;AAG5C,
|
|
1
|
+
{"version":3,"file":"text-link.stories.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link.stories.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,4CAA4C;AAG5C,wBAWW;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,gBAAQ;IACnB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,gCAAK,SAAS,EAAC,yBAAyB,YACtC,uBAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,sBAAsB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,qBAAqB;CAC7B,CAAC;AAEF,kBAAe,aAAa,CAAC;AAGhB,QAAA,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,wBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,kBAAe;CACxB,CAAC;AAEW,QAAA,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kCAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,4BAAyB;CAClC,CAAC;AAEW,QAAA,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,yBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,mBAAgB;CACzB,CAAC;AAEW,QAAA,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,kCAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,4BAAyB;CAClC,CAAC;AAEW,QAAA,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,6BAA0B;gBAChC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,uBAAoB;CAC7B,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 { TextLink } from '@neo4j-ndl/react';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport {\n TextLinkDefault,\n TextLinkDefaultSource,\n TextLinkExternal,\n TextLinkExternalSource,\n TextLinkExternalUnderline,\n TextLinkExternalUnderlineSource,\n TextLinkInternalIcon,\n TextLinkInternalIconSource,\n TextLinkInternalUnderline,\n TextLinkInternalUnderlineSource,\n} from '.';\n\nconst componentMeta: Meta<typeof TextLink> = {\n component: TextLink,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-text-link',\n tags: ['docsPage'],\n title: 'Components/TextLink',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof TextLink>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkDefault,\n};\n\nexport const InternalUnderline: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkInternalUnderlineSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkInternalUnderline,\n};\n\nexport const External: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkExternalSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkExternal,\n};\n\nexport const ExternalUnderline: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkExternalUnderlineSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkExternalUnderline,\n};\n\nexport const InternalIcon: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkInternalIconSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkInternalIcon,\n};\n"]}
|
|
@@ -33,13 +33,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
33
33
|
import classNames from 'classnames';
|
|
34
34
|
import { ArrowUpRightIconOutline, ChevronRightIconOutline } from '../icons';
|
|
35
35
|
export const TextLink = (_a) => {
|
|
36
|
-
var { children, href, type = 'internal', as, className, target = type === 'external' ? '_blank' : '', style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "href", "type", "as", "className", "target", "style", "htmlAttributes", "ref"]);
|
|
36
|
+
var { children, href, type = 'internal', as, className, target = type === 'external' || type === 'external-underline' ? '_blank' : '', style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["children", "href", "type", "as", "className", "target", "style", "htmlAttributes", "ref"]);
|
|
37
37
|
const Component = as !== null && as !== void 0 ? as : 'a';
|
|
38
38
|
const classes = classNames('ndl-text-link', className, {
|
|
39
39
|
'ndl-external-link': type === 'external',
|
|
40
|
+
'ndl-external-underline': type === 'external-underline',
|
|
40
41
|
'ndl-internal-icon': type === 'internal-icon',
|
|
41
42
|
'ndl-internal-underline': type === 'internal-underline',
|
|
42
43
|
});
|
|
43
|
-
return (_jsxs(Component, Object.assign({ className: classes, href: href, ref: ref, style: style, target: target }, restProps, htmlAttributes, { children: [children, type === 'external' && (_jsx(ArrowUpRightIconOutline, { className: "ndl-external-link-icon" })), type === 'internal-icon' && (_jsx(ChevronRightIconOutline, { className: "ndl-external-link-icon" }))] })));
|
|
44
|
+
return (_jsxs(Component, Object.assign({ className: classes, href: href, ref: ref, style: style, target: target }, restProps, htmlAttributes, { children: [children, (type === 'external' || type === 'external-underline') && (_jsx(ArrowUpRightIconOutline, { className: "ndl-external-link-icon" })), type === 'internal-icon' && (_jsx(ChevronRightIconOutline, { className: "ndl-external-link-icon" }))] })));
|
|
44
45
|
};
|
|
45
46
|
//# sourceMappingURL=TextLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"TextLink.js","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAkC5E,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAoC,EAWjB,EAAE,EAAE;QAXa,EAC1D,QAAQ,EACR,IAAI,EACJ,IAAI,GAAG,UAAU,EACjB,EAAE,EACF,SAAS,EACT,MAAM,GAAG,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,oBAAoB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAC7E,KAAK,EACL,cAAc,EACd,GAAG,OAEsC,EADtC,SAAS,cAV8C,2FAW3D,CADa;IAEZ,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,GAAG,CAAC;IAE/C,MAAM,OAAO,GAAG,UAAU,CAAC,eAAe,EAAE,SAAS,EAAE;QACrD,mBAAmB,EAAE,IAAI,KAAK,UAAU;QACxC,wBAAwB,EAAE,IAAI,KAAK,oBAAoB;QACvD,mBAAmB,EAAE,IAAI,KAAK,eAAe;QAC7C,wBAAwB,EAAE,IAAI,KAAK,oBAAoB;KACxD,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,IAAI,EAAE,IAAI,EACV,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,IACV,SAAS,EACT,cAAc,eAEjB,QAAQ,EACR,CAAC,IAAI,KAAK,UAAU,IAAI,IAAI,KAAK,oBAAoB,CAAC,IAAI,CACzD,KAAC,uBAAuB,IAAC,SAAS,EAAC,wBAAwB,GAAG,CAC/D,EACA,IAAI,KAAK,eAAe,IAAI,CAC3B,KAAC,uBAAuB,IAAC,SAAS,EAAC,wBAAwB,GAAG,CAC/D,KACS,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { ArrowUpRightIconOutline, ChevronRightIconOutline } from '../icons';\n\ntype TextLinkType =\n | 'internal'\n | 'internal-underline'\n | 'internal-icon'\n | 'external'\n | 'external-underline';\n\ntype TextLinkProps = {\n /** The content displayed inside the link */\n children: React.ReactNode;\n\n /** The URL the link points to */\n href?: string;\n\n /**\n * The type of the text link\n * - 'internal': A link to another page within the application\n * - 'internal-underline': A link to another page within the application with an underline\n * - 'internal-icon': A link to another page within the application with an icon\n * - 'external': A link to an external website. An external link icon is appended.\n * - 'external-underline': A link to an external website with an underline and an external link icon is appended.\n * @default 'internal'\n */\n type?: TextLinkType;\n\n /** Specifies where to open the linked document. If omitted and `type` is `\"external\"` it defaults to `\"_blank\"`. */\n target?: HTMLAnchorElement['target'];\n\n /** Additional class name */\n className?: string;\n};\n\nexport const TextLink = <T extends React.ElementType = 'a'>({\n children,\n href,\n type = 'internal',\n as,\n className,\n target = type === 'external' || type === 'external-underline' ? '_blank' : '',\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, TextLinkProps>) => {\n const Component: React.ElementType = as ?? 'a';\n\n const classes = classNames('ndl-text-link', className, {\n 'ndl-external-link': type === 'external',\n 'ndl-external-underline': type === 'external-underline',\n 'ndl-internal-icon': type === 'internal-icon',\n 'ndl-internal-underline': type === 'internal-underline',\n });\n\n return (\n <Component\n className={classes}\n href={href}\n ref={ref}\n style={style}\n target={target}\n {...restProps}\n {...htmlAttributes}\n >\n {children}\n {(type === 'external' || type === 'external-underline') && (\n <ArrowUpRightIconOutline className=\"ndl-external-link-icon\" />\n )}\n {type === 'internal-icon' && (\n <ChevronRightIconOutline className=\"ndl-external-link-icon\" />\n )}\n </Component>\n );\n};\n"]}
|
|
@@ -20,15 +20,18 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export { default as TextLinkDefault } from './text-link-default.story';
|
|
22
22
|
export { default as TextLinkExternal } from './text-link-external.story';
|
|
23
|
+
export { default as TextLinkExternalUnderline } from './text-link-external-underline.story';
|
|
23
24
|
export { default as TextLinkInternalIcon } from './text-link-internal-icon.story';
|
|
24
25
|
export { default as TextLinkInternalUnderline } from './text-link-internal-underline.story';
|
|
25
26
|
import { removeLicenseHeader } from '../../_common/export-stories-utils';
|
|
26
27
|
import TextLinkDefaultSourceRaw from './text-link-default.story?raw';
|
|
27
28
|
import TextLinkExternalSourceRaw from './text-link-external.story?raw';
|
|
29
|
+
import TextLinkExternalUnderlineSourceRaw from './text-link-external-underline.story?raw';
|
|
28
30
|
import TextLinkInternalIconSourceRaw from './text-link-internal-icon.story?raw';
|
|
29
31
|
import TextLinkInternalUnderlineSourceRaw from './text-link-internal-underline.story?raw';
|
|
30
32
|
export const TextLinkDefaultSource = removeLicenseHeader(TextLinkDefaultSourceRaw);
|
|
31
33
|
export const TextLinkExternalSource = removeLicenseHeader(TextLinkExternalSourceRaw);
|
|
34
|
+
export const TextLinkExternalUnderlineSource = removeLicenseHeader(TextLinkExternalUnderlineSourceRaw);
|
|
32
35
|
export const TextLinkInternalIconSource = removeLicenseHeader(TextLinkInternalIconSourceRaw);
|
|
33
36
|
export const TextLinkInternalUnderlineSource = removeLicenseHeader(TextLinkInternalUnderlineSourceRaw);
|
|
34
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text-link/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AACvE,OAAO,6BAA6B,MAAM,qCAAqC,CAAC;AAChF,OAAO,kCAAkC,MAAM,0CAA0C,CAAC;AAE1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,CAAC;AACF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,kCAAkC,CACnC,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 TextLinkDefault } from './text-link-default.story';\nexport { default as TextLinkExternal } from './text-link-external.story';\nexport { default as TextLinkInternalIcon } from './text-link-internal-icon.story';\nexport { default as TextLinkInternalUnderline } from './text-link-internal-underline.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TextLinkDefaultSourceRaw from './text-link-default.story?raw';\nimport TextLinkExternalSourceRaw from './text-link-external.story?raw';\nimport TextLinkInternalIconSourceRaw from './text-link-internal-icon.story?raw';\nimport TextLinkInternalUnderlineSourceRaw from './text-link-internal-underline.story?raw';\n\nexport const TextLinkDefaultSource = removeLicenseHeader(\n TextLinkDefaultSourceRaw,\n);\nexport const TextLinkExternalSource = removeLicenseHeader(\n TextLinkExternalSourceRaw,\n);\nexport const TextLinkInternalIconSource = removeLicenseHeader(\n TextLinkInternalIconSourceRaw,\n);\nexport const TextLinkInternalUnderlineSource = removeLicenseHeader(\n TextLinkInternalUnderlineSourceRaw,\n);\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/text-link/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAE5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AACrE,OAAO,yBAAyB,MAAM,gCAAgC,CAAC;AACvE,OAAO,kCAAkC,MAAM,0CAA0C,CAAC;AAC1F,OAAO,6BAA6B,MAAM,qCAAqC,CAAC;AAChF,OAAO,kCAAkC,MAAM,0CAA0C,CAAC;AAE1F,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,kCAAkC,CACnC,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,CAAC;AACF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,kCAAkC,CACnC,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 TextLinkDefault } from './text-link-default.story';\nexport { default as TextLinkExternal } from './text-link-external.story';\nexport { default as TextLinkExternalUnderline } from './text-link-external-underline.story';\nexport { default as TextLinkInternalIcon } from './text-link-internal-icon.story';\nexport { default as TextLinkInternalUnderline } from './text-link-internal-underline.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TextLinkDefaultSourceRaw from './text-link-default.story?raw';\nimport TextLinkExternalSourceRaw from './text-link-external.story?raw';\nimport TextLinkExternalUnderlineSourceRaw from './text-link-external-underline.story?raw';\nimport TextLinkInternalIconSourceRaw from './text-link-internal-icon.story?raw';\nimport TextLinkInternalUnderlineSourceRaw from './text-link-internal-underline.story?raw';\n\nexport const TextLinkDefaultSource = removeLicenseHeader(\n TextLinkDefaultSourceRaw,\n);\nexport const TextLinkExternalSource = removeLicenseHeader(\n TextLinkExternalSourceRaw,\n);\nexport const TextLinkExternalUnderlineSource = removeLicenseHeader(\n TextLinkExternalUnderlineSourceRaw,\n);\nexport const TextLinkInternalIconSource = removeLicenseHeader(\n TextLinkInternalIconSourceRaw,\n);\nexport const TextLinkInternalUnderlineSource = removeLicenseHeader(\n TextLinkInternalUnderlineSourceRaw,\n);\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 { TextLink, Typography } from '@neo4j-ndl/react';
|
|
24
|
+
const Component = () => {
|
|
25
|
+
return (_jsxs(Typography, { variant: "body-medium", children: ["The quick brown fox", ' ', _jsx(TextLink, { href: "https://neo4j.com", type: "external-underline", children: "jumps" }), ' ', "over the lazy dog."] }));
|
|
26
|
+
};
|
|
27
|
+
export default Component;
|
|
28
|
+
//# sourceMappingURL=text-link-external-underline.story.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-link-external-underline.story.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-external-underline.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,oCACX,GAAG,EACvB,KAAC,QAAQ,IAAC,IAAI,EAAC,mBAAmB,EAAC,IAAI,EAAC,oBAAoB,sBAEjD,EAAC,GAAG,0BAEJ,CACd,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 { TextLink, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Typography variant=\"body-medium\">\n The quick brown fox{' '}\n <TextLink href=\"https://neo4j.com\" type=\"external-underline\">\n jumps\n </TextLink>{' '}\n over the lazy dog.\n </Typography>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) "Neo4j"
|
|
@@ -20,9 +20,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
22
|
import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
|
|
23
|
-
import { TextLink } from '@neo4j-ndl/react';
|
|
23
|
+
import { TextLink, Typography } from '@neo4j-ndl/react';
|
|
24
24
|
const Component = () => {
|
|
25
|
-
return (_jsx(TextLink, { href: "/", type: "internal-underline", children: "
|
|
25
|
+
return (_jsxs(Typography, { variant: "body-medium", children: ["The quick brown fox", ' ', _jsx(TextLink, { href: "/", type: "internal-underline", children: "jumps" }), ' ', "over the lazy dog."] }));
|
|
26
26
|
};
|
|
27
27
|
export default Component;
|
|
28
28
|
//# sourceMappingURL=text-link-internal-underline.story.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link-internal-underline.story.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-internal-underline.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"text-link-internal-underline.story.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-internal-underline.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAExD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,MAAC,UAAU,IAAC,OAAO,EAAC,aAAa,oCACX,GAAG,EACvB,KAAC,QAAQ,IAAC,IAAI,EAAC,GAAG,EAAC,IAAI,EAAC,oBAAoB,sBAEjC,EAAC,GAAG,0BAEJ,CACd,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 { TextLink, Typography } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <Typography variant=\"body-medium\">\n The quick brown fox{' '}\n <TextLink href=\"/\" type=\"internal-underline\">\n jumps\n </TextLink>{' '}\n over the lazy dog.\n </Typography>\n );\n};\n\nexport default Component;\n"]}
|
|
@@ -20,7 +20,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
20
20
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
21
|
*/
|
|
22
22
|
import { TextLink } from '@neo4j-ndl/react';
|
|
23
|
-
import { TextLinkDefault, TextLinkDefaultSource, TextLinkExternal, TextLinkExternalSource, TextLinkInternalIcon, TextLinkInternalIconSource, TextLinkInternalUnderline, TextLinkInternalUnderlineSource, } from '.';
|
|
23
|
+
import { TextLinkDefault, TextLinkDefaultSource, TextLinkExternal, TextLinkExternalSource, TextLinkExternalUnderline, TextLinkExternalUnderlineSource, TextLinkInternalIcon, TextLinkInternalIconSource, TextLinkInternalUnderline, TextLinkInternalUnderlineSource, } from '.';
|
|
24
24
|
const componentMeta = {
|
|
25
25
|
component: TextLink,
|
|
26
26
|
decorators: [
|
|
@@ -70,6 +70,19 @@ export const External = {
|
|
|
70
70
|
},
|
|
71
71
|
render: TextLinkExternal,
|
|
72
72
|
};
|
|
73
|
+
export const ExternalUnderline = {
|
|
74
|
+
args: {},
|
|
75
|
+
parameters: {
|
|
76
|
+
docs: {
|
|
77
|
+
source: {
|
|
78
|
+
code: TextLinkExternalUnderlineSource,
|
|
79
|
+
language: 'tsx',
|
|
80
|
+
type: 'code',
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
render: TextLinkExternalUnderline,
|
|
85
|
+
};
|
|
73
86
|
export const InternalIcon = {
|
|
74
87
|
args: {},
|
|
75
88
|
parameters: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.stories.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,sBAAsB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,qBAAqB;CAC7B,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,+BAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,yBAAyB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,0BAA0B;gBAChC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAoB;CAC7B,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 { TextLink } from '@neo4j-ndl/react';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport {\n TextLinkDefault,\n TextLinkDefaultSource,\n TextLinkExternal,\n TextLinkExternalSource,\n TextLinkInternalIcon,\n TextLinkInternalIconSource,\n TextLinkInternalUnderline,\n TextLinkInternalUnderlineSource,\n} from '.';\n\nconst componentMeta: Meta<typeof TextLink> = {\n component: TextLink,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-text-link',\n tags: ['docsPage'],\n title: 'Components/TextLink',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof TextLink>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkDefault,\n};\n\nexport const InternalUnderline: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkInternalUnderlineSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkInternalUnderline,\n};\n\nexport const External: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkExternalSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkExternal,\n};\n\nexport const InternalIcon: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkInternalIconSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkInternalIcon,\n};\n"]}
|
|
1
|
+
{"version":3,"file":"text-link.stories.js","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link.stories.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,+BAA+B,EAC/B,oBAAoB,EACpB,0BAA0B,EAC1B,yBAAyB,EACzB,+BAA+B,GAChC,MAAM,GAAG,CAAC;AAEX,MAAM,aAAa,GAA0B;IAC3C,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,EAAE,CAAC,CACT,cAAK,SAAS,EAAC,yBAAyB,YACtC,KAAC,KAAK,KAAG,GACL,CACP;KACF;IACD,EAAE,EAAE,sBAAsB;IAC1B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,KAAK,EAAE,qBAAqB;CAC7B,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,qBAAqB;gBAC3B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,eAAe;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,+BAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,yBAAyB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,sBAAsB;gBAC5B,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,gBAAgB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAU;IACtC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,+BAA+B;gBACrC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,yBAAyB;CAClC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,IAAI,EAAE,EAAE;IACR,UAAU,EAAE;QACV,IAAI,EAAE;YACJ,MAAM,EAAE;gBACN,IAAI,EAAE,0BAA0B;gBAChC,QAAQ,EAAE,KAAK;gBACf,IAAI,EAAE,MAAM;aACb;SACF;KACF;IACD,MAAM,EAAE,oBAAoB;CAC7B,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 { TextLink } from '@neo4j-ndl/react';\nimport { type Meta, type StoryObj } from '@storybook/react-vite';\n\nimport {\n TextLinkDefault,\n TextLinkDefaultSource,\n TextLinkExternal,\n TextLinkExternalSource,\n TextLinkExternalUnderline,\n TextLinkExternalUnderlineSource,\n TextLinkInternalIcon,\n TextLinkInternalIconSource,\n TextLinkInternalUnderline,\n TextLinkInternalUnderlineSource,\n} from '.';\n\nconst componentMeta: Meta<typeof TextLink> = {\n component: TextLink,\n decorators: [\n (Story) => (\n <div className=\"n-flex n-justify-center\">\n <Story />\n </div>\n ),\n ],\n id: 'components-text-link',\n tags: ['docsPage'],\n title: 'Components/TextLink',\n};\n\nexport default componentMeta;\ntype Story = StoryObj<typeof TextLink>;\n\nexport const Default: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkDefaultSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkDefault,\n};\n\nexport const InternalUnderline: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkInternalUnderlineSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkInternalUnderline,\n};\n\nexport const External: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkExternalSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkExternal,\n};\n\nexport const ExternalUnderline: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkExternalUnderlineSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkExternalUnderline,\n};\n\nexport const InternalIcon: Story = {\n args: {},\n parameters: {\n docs: {\n source: {\n code: TextLinkInternalIconSource,\n language: 'tsx',\n type: 'code',\n },\n },\n },\n render: TextLinkInternalIcon,\n};\n"]}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import type React from 'react';
|
|
23
23
|
import { type PolymorphicCommonProps } from '../_common/types';
|
|
24
|
-
type TextLinkType = 'internal' | 'internal-underline' | 'internal-icon' | 'external';
|
|
24
|
+
type TextLinkType = 'internal' | 'internal-underline' | 'internal-icon' | 'external' | 'external-underline';
|
|
25
25
|
type TextLinkProps = {
|
|
26
26
|
/** The content displayed inside the link */
|
|
27
27
|
children: React.ReactNode;
|
|
@@ -29,10 +29,11 @@ type TextLinkProps = {
|
|
|
29
29
|
href?: string;
|
|
30
30
|
/**
|
|
31
31
|
* The type of the text link
|
|
32
|
-
* - 'internal':
|
|
33
|
-
* - 'internal-underline':
|
|
34
|
-
* - 'internal-icon':
|
|
35
|
-
* - 'external':
|
|
32
|
+
* - 'internal': A link to another page within the application
|
|
33
|
+
* - 'internal-underline': A link to another page within the application with an underline
|
|
34
|
+
* - 'internal-icon': A link to another page within the application with an icon
|
|
35
|
+
* - 'external': A link to an external website. An external link icon is appended.
|
|
36
|
+
* - 'external-underline': A link to an external website with an underline and an external link icon is appended.
|
|
36
37
|
* @default 'internal'
|
|
37
38
|
*/
|
|
38
39
|
type?: TextLinkType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,KAAK,YAAY,GACb,UAAU,GACV,oBAAoB,GACpB,eAAe,GACf,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"TextLink.d.ts","sourceRoot":"","sources":["../../../src/text-link/TextLink.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG/D,KAAK,YAAY,GACb,UAAU,GACV,oBAAoB,GACpB,eAAe,GACf,UAAU,GACV,oBAAoB,CAAC;AAEzB,KAAK,aAAa,GAAG;IACnB,4CAA4C;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAE1B,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,YAAY,CAAC;IAEpB,oHAAoH;IACpH,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IAErC,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,KAAK,CAAC,WAAW,GAAG,GAAG,EAAE,2FAWzD,sBAAsB,CAAC,CAAC,EAAE,aAAa,CAAC,4CA6B1C,CAAC"}
|
|
@@ -20,10 +20,12 @@
|
|
|
20
20
|
*/
|
|
21
21
|
export { default as TextLinkDefault } from './text-link-default.story';
|
|
22
22
|
export { default as TextLinkExternal } from './text-link-external.story';
|
|
23
|
+
export { default as TextLinkExternalUnderline } from './text-link-external-underline.story';
|
|
23
24
|
export { default as TextLinkInternalIcon } from './text-link-internal-icon.story';
|
|
24
25
|
export { default as TextLinkInternalUnderline } from './text-link-internal-underline.story';
|
|
25
26
|
export declare const TextLinkDefaultSource: string;
|
|
26
27
|
export declare const TextLinkExternalSource: string;
|
|
28
|
+
export declare const TextLinkExternalUnderlineSource: string;
|
|
27
29
|
export declare const TextLinkInternalIconSource: string;
|
|
28
30
|
export declare const TextLinkInternalUnderlineSource: string;
|
|
29
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAS5F,eAAO,MAAM,qBAAqB,QAEjC,CAAC;AACF,eAAO,MAAM,sBAAsB,QAElC,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,CAAC;AACF,eAAO,MAAM,0BAA0B,QAEtC,CAAC;AACF,eAAO,MAAM,+BAA+B,QAE3C,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=text-link-external-underline.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-link-external-underline.story.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-external-underline.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+CAUd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link-internal-underline.story.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-internal-underline.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+
|
|
1
|
+
{"version":3,"file":"text-link-internal-underline.story.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link-internal-underline.story.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAIjD,QAAA,MAAM,SAAS,+CAUd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -26,5 +26,6 @@ type Story = StoryObj<typeof TextLink>;
|
|
|
26
26
|
export declare const Default: Story;
|
|
27
27
|
export declare const InternalUnderline: Story;
|
|
28
28
|
export declare const External: Story;
|
|
29
|
+
export declare const ExternalUnderline: Story;
|
|
29
30
|
export declare const InternalIcon: Story;
|
|
30
31
|
//# sourceMappingURL=text-link.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-link.stories.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"text-link.stories.d.ts","sourceRoot":"","sources":["../../../../src/text-link/stories/text-link.stories.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAejE,QAAA,MAAM,aAAa,EAAE,IAAI,CAAC,OAAO,QAAQ,CAYxC,CAAC;AAEF,eAAe,aAAa,CAAC;AAC7B,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,QAAQ,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAYrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAYtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAY1B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neo4j-ndl/react",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.11",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React implementation of Neo4j Design System",
|
|
6
6
|
"keywords": [
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@tanstack/react-table": "8.21.3",
|
|
86
86
|
"react": ">=19.0.0",
|
|
87
87
|
"react-dom": ">=19.0.0",
|
|
88
|
-
"@neo4j-ndl/base": "^4.5.
|
|
88
|
+
"@neo4j-ndl/base": "^4.5.6"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"@dnd-kit/core": "6.3.1",
|