@neo4j-ndl/react 5.6.2 → 5.6.3

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.
@@ -4,7 +4,7 @@ Object.defineProperties(exports, {
4
4
  [Symbol.toStringTag]: { value: "Module" }
5
5
  });
6
6
  const require_runtime = require("../_virtual/_rolldown/runtime.js");
7
- const require_icons_generated_heroIcons_ArrowUpRightIconOutline = require("../icons/generated/heroIcons/ArrowUpRightIconOutline.js");
7
+ const require_icons_generated_custom_ArrowUpRightOutline = require("../icons/generated/custom/ArrowUpRightOutline.js");
8
8
  const require_objectWithoutProperties = require("../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.js");
9
9
  const require_objectSpread2 = require("../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js");
10
10
  let classnames = require("classnames");
@@ -52,7 +52,7 @@ const TextLink = (_ref) => {
52
52
  ref,
53
53
  style,
54
54
  target
55
- }, restProps), htmlAttributes), {}, { children: [children, type === "external" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_generated_heroIcons_ArrowUpRightIconOutline.ArrowUpRightIconOutline, { className: "ndl-external-link-icon" })] }));
55
+ }, restProps), htmlAttributes), {}, { children: [children, type === "external" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_generated_custom_ArrowUpRightOutline.default, { className: "ndl-external-link-icon" })] }));
56
56
  };
57
57
  exports.TextLink = TextLink;
58
58
 
@@ -1 +1 @@
1
- {"version":3,"file":"TextLink.js","names":["classNames","ArrowUpRightIconOutline"],"sources":["../../../src/text-link/TextLink.tsx"],"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 } from '../icons/generated/heroIcons/ArrowUpRightIconOutline';\n\ntype TextLinkType = 'internal' | 'external';\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 * All types render with an underline and primary text color by default. Additional color styling can be applied via `className`.\n * - 'internal': A link to another page within the application\n * - 'external': A link to an external website. 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\nexport const TextLink = <T extends React.ElementType = 'a'>({\n children,\n href,\n type = 'internal',\n as,\n className,\n target = type === 'external' ? '_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 });\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' && (\n <ArrowUpRightIconOutline className=\"ndl-external-link-icon\" />\n )}\n </Component>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AATF,MAAa,YAA+C,SAWZ;CAXY,IAAA,EAC1D,UACA,MACA,OAAO,YACP,IACA,WACA,SAAS,SAAS,aAAa,WAAW,IAC1C,OACA,gBACA,QAAA,MACG,YAAA,gCAAA,QAAA,MAAA,SAAA;CAEH,MAAM,YAA+B,OAAA,QAAA,OAAA,KAAA,IAAA,KAAM;CAE3C,MAAM,WAAA,GAAUA,WAAAA,QAAAA,CAAW,iBAAiB,WAAW,EACrD,qBAAqB,SAAS,WAChC,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAA,sBAAA,QAAA,sBAAA,QAAA,sBAAA,QAAA;EACC,WAAW;EACL;EACD;EACE;EACC;CACJ,GAAA,SAAA,GACA,cAAA,GAAA,CAAA,GAAA,EAAA,UAPN,CASG,UACA,SAAS,cACR,iBAAA,GAAA,kBAAA,IAAA,CAACC,0DAAAA,yBAAD,EAAyB,WAAU,yBAA0B,CAAA,CAEtD,EAAA,CAAA,CAAA;AAEf"}
1
+ {"version":3,"file":"TextLink.js","names":["classNames","ArrowUpRightOutlineIcon"],"sources":["../../../src/text-link/TextLink.tsx"],"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 { ArrowUpRightOutlineIcon } from '../icons/generated/custom';\n\ntype TextLinkType = 'internal' | 'external';\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 * All types render with an underline and primary text color by default. Additional color styling can be applied via `className`.\n * - 'internal': A link to another page within the application\n * - 'external': A link to an external website. 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\nexport const TextLink = <T extends React.ElementType = 'a'>({\n children,\n href,\n type = 'internal',\n as,\n className,\n target = type === 'external' ? '_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 });\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' && (\n <ArrowUpRightOutlineIcon className=\"ndl-external-link-icon\" />\n )}\n </Component>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDE;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;AATF,MAAa,YAA+C,SAWZ;CAXY,IAAA,EAC1D,UACA,MACA,OAAO,YACP,IACA,WACA,SAAS,SAAS,aAAa,WAAW,IAC1C,OACA,gBACA,QAAA,MACG,YAAA,gCAAA,QAAA,MAAA,SAAA;CAEH,MAAM,YAA+B,OAAA,QAAA,OAAA,KAAA,IAAA,KAAM;CAE3C,MAAM,WAAA,GAAUA,WAAAA,QAAAA,CAAW,iBAAiB,WAAW,EACrD,qBAAqB,SAAS,WAChC,CAAC;CAED,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,WAAA,sBAAA,QAAA,sBAAA,QAAA,sBAAA,QAAA;EACC,WAAW;EACL;EACD;EACE;EACC;CACJ,GAAA,SAAA,GACA,cAAA,GAAA,CAAA,GAAA,EAAA,UAPN,CASG,UACA,SAAS,cACR,iBAAA,GAAA,kBAAA,IAAA,CAACC,mDAAAA,SAAD,EAAyB,WAAU,yBAA0B,CAAA,CAEtD,EAAA,CAAA,CAAA;AAEf"}