@neo4j-ndl/react 4.11.7 → 4.12.1

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.
Files changed (105) hide show
  1. package/lib/cjs/avatar/Avatar.js +2 -2
  2. package/lib/cjs/avatar/Avatar.js.map +1 -1
  3. package/lib/cjs/avatar/stories/avatar-custom-icon.story.js +31 -0
  4. package/lib/cjs/avatar/stories/avatar-custom-icon.story.js.map +1 -0
  5. package/lib/cjs/avatar/stories/index.js +5 -1
  6. package/lib/cjs/avatar/stories/index.js.map +1 -1
  7. package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
  8. package/lib/cjs/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
  9. package/lib/cjs/index.js +3 -1
  10. package/lib/cjs/index.js.map +1 -1
  11. package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
  12. package/lib/cjs/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
  13. package/lib/cjs/selectable-tag/SelectableTag.js +53 -0
  14. package/lib/cjs/selectable-tag/SelectableTag.js.map +1 -0
  15. package/lib/cjs/selectable-tag/index.js +26 -0
  16. package/lib/cjs/selectable-tag/index.js.map +1 -0
  17. package/lib/cjs/selectable-tag/stories/index.js +52 -0
  18. package/lib/cjs/selectable-tag/stories/index.js.map +1 -0
  19. package/lib/cjs/selectable-tag/stories/selectable-tag-default.story.js +32 -0
  20. package/lib/cjs/selectable-tag/stories/selectable-tag-default.story.js.map +1 -0
  21. package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js +30 -0
  22. package/lib/cjs/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -0
  23. package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js +33 -0
  24. package/lib/cjs/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -0
  25. package/lib/cjs/selectable-tag/stories/selectable-tag-truncation.story.js +33 -0
  26. package/lib/cjs/selectable-tag/stories/selectable-tag-truncation.story.js.map +1 -0
  27. package/lib/cjs/selectable-tag/stories/selectable-tag-with-badge.story.js +32 -0
  28. package/lib/cjs/selectable-tag/stories/selectable-tag-with-badge.story.js.map +1 -0
  29. package/lib/cjs/selectable-tag/stories/selectable-tag-with-leading-icon.story.js +33 -0
  30. package/lib/cjs/selectable-tag/stories/selectable-tag-with-leading-icon.story.js.map +1 -0
  31. package/lib/cjs/tag/Tag.js +2 -0
  32. package/lib/cjs/tag/Tag.js.map +1 -1
  33. package/lib/cjs/tag-base/stories/index.js +32 -0
  34. package/lib/cjs/tag-base/stories/index.js.map +1 -0
  35. package/lib/cjs/tag-base/stories/tag-variants.story.js +32 -0
  36. package/lib/cjs/tag-base/stories/tag-variants.story.js.map +1 -0
  37. package/lib/esm/avatar/Avatar.js +2 -2
  38. package/lib/esm/avatar/Avatar.js.map +1 -1
  39. package/lib/esm/avatar/stories/avatar-custom-icon.story.js +29 -0
  40. package/lib/esm/avatar/stories/avatar-custom-icon.story.js.map +1 -0
  41. package/lib/esm/avatar/stories/index.js +3 -0
  42. package/lib/esm/avatar/stories/index.js.map +1 -1
  43. package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js +1 -1
  44. package/lib/esm/dismissible-tag/stories/dismissible-tag-sizes.story.js.map +1 -1
  45. package/lib/esm/index.js +1 -0
  46. package/lib/esm/index.js.map +1 -1
  47. package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js +1 -1
  48. package/lib/esm/read-only-tag/stories/read-only-tag-sizes.story.js.map +1 -1
  49. package/lib/esm/selectable-tag/SelectableTag.js +46 -0
  50. package/lib/esm/selectable-tag/SelectableTag.js.map +1 -0
  51. package/lib/esm/selectable-tag/index.js +22 -0
  52. package/lib/esm/selectable-tag/index.js.map +1 -0
  53. package/lib/esm/selectable-tag/stories/index.js +40 -0
  54. package/lib/esm/selectable-tag/stories/index.js.map +1 -0
  55. package/lib/esm/selectable-tag/stories/selectable-tag-default.story.js +30 -0
  56. package/lib/esm/selectable-tag/stories/selectable-tag-default.story.js.map +1 -0
  57. package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js +28 -0
  58. package/lib/esm/selectable-tag/stories/selectable-tag-disabled.story.js.map +1 -0
  59. package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js +31 -0
  60. package/lib/esm/selectable-tag/stories/selectable-tag-sizes.story.js.map +1 -0
  61. package/lib/esm/selectable-tag/stories/selectable-tag-truncation.story.js +31 -0
  62. package/lib/esm/selectable-tag/stories/selectable-tag-truncation.story.js.map +1 -0
  63. package/lib/esm/selectable-tag/stories/selectable-tag-with-badge.story.js +30 -0
  64. package/lib/esm/selectable-tag/stories/selectable-tag-with-badge.story.js.map +1 -0
  65. package/lib/esm/selectable-tag/stories/selectable-tag-with-leading-icon.story.js +31 -0
  66. package/lib/esm/selectable-tag/stories/selectable-tag-with-leading-icon.story.js.map +1 -0
  67. package/lib/esm/tag/Tag.js +2 -0
  68. package/lib/esm/tag/Tag.js.map +1 -1
  69. package/lib/esm/tag-base/stories/index.js +25 -0
  70. package/lib/esm/tag-base/stories/index.js.map +1 -0
  71. package/lib/esm/tag-base/stories/tag-variants.story.js +30 -0
  72. package/lib/esm/tag-base/stories/tag-variants.story.js.map +1 -0
  73. package/lib/types/avatar/Avatar.d.ts +3 -1
  74. package/lib/types/avatar/Avatar.d.ts.map +1 -1
  75. package/lib/types/avatar/stories/avatar-custom-icon.story.d.ts +24 -0
  76. package/lib/types/avatar/stories/avatar-custom-icon.story.d.ts.map +1 -0
  77. package/lib/types/avatar/stories/index.d.ts +2 -0
  78. package/lib/types/avatar/stories/index.d.ts.map +1 -1
  79. package/lib/types/index.d.ts +1 -0
  80. package/lib/types/index.d.ts.map +1 -1
  81. package/lib/types/selectable-tag/SelectableTag.d.ts +42 -0
  82. package/lib/types/selectable-tag/SelectableTag.d.ts.map +1 -0
  83. package/lib/types/selectable-tag/index.d.ts +22 -0
  84. package/lib/types/selectable-tag/index.d.ts.map +1 -0
  85. package/lib/types/selectable-tag/stories/index.d.ts +33 -0
  86. package/lib/types/selectable-tag/stories/index.d.ts.map +1 -0
  87. package/lib/types/selectable-tag/stories/selectable-tag-default.story.d.ts +24 -0
  88. package/lib/types/selectable-tag/stories/selectable-tag-default.story.d.ts.map +1 -0
  89. package/lib/types/selectable-tag/stories/selectable-tag-disabled.story.d.ts +24 -0
  90. package/lib/types/selectable-tag/stories/selectable-tag-disabled.story.d.ts.map +1 -0
  91. package/lib/types/selectable-tag/stories/selectable-tag-sizes.story.d.ts +24 -0
  92. package/lib/types/selectable-tag/stories/selectable-tag-sizes.story.d.ts.map +1 -0
  93. package/lib/types/selectable-tag/stories/selectable-tag-truncation.story.d.ts +24 -0
  94. package/lib/types/selectable-tag/stories/selectable-tag-truncation.story.d.ts.map +1 -0
  95. package/lib/types/selectable-tag/stories/selectable-tag-with-badge.story.d.ts +24 -0
  96. package/lib/types/selectable-tag/stories/selectable-tag-with-badge.story.d.ts.map +1 -0
  97. package/lib/types/selectable-tag/stories/selectable-tag-with-leading-icon.story.d.ts +24 -0
  98. package/lib/types/selectable-tag/stories/selectable-tag-with-leading-icon.story.d.ts.map +1 -0
  99. package/lib/types/tag/Tag.d.ts +2 -0
  100. package/lib/types/tag/Tag.d.ts.map +1 -1
  101. package/lib/types/tag-base/stories/index.d.ts +23 -0
  102. package/lib/types/tag-base/stories/index.d.ts.map +1 -0
  103. package/lib/types/tag-base/stories/tag-variants.story.d.ts +24 -0
  104. package/lib/types/tag-base/stories/tag-variants.story.d.ts.map +1 -0
  105. package/package.json +2 -2
@@ -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,mDAAiD;AAEjD,4CAA0D;AAC1D,iCAAiC;AAEjC,MAAM,KAAK,GACT,kEAAkE,CAAC;AAErE,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,gCAAK,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,YAC3B,wBAAC,eAAO,IAAC,IAAI,EAAC,QAAQ,aACpB,uBAAC,eAAO,CAAC,OAAO,IAAC,gBAAgB,kBAC/B,uBAAC,qBAAa,IACZ,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,EACzC,UAAU,EAAE,CAAC,YAEZ,KAAK,GACQ,GACA,EAClB,uBAAC,eAAO,CAAC,OAAO,cAAE,KAAK,GAAmB,IAClC,GACN,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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,32 @@
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 react_2 = require("react");
27
+ const Component = () => {
28
+ const [isSelected, setIsSelected] = (0, react_2.useState)(false);
29
+ return ((0, jsx_runtime_1.jsx)(react_1.SelectableTag, { badgeCount: 8, isSelected: isSelected, onClick: () => setIsSelected(!isSelected), children: "Selectable Tag with badge" }));
30
+ };
31
+ exports.default = Component;
32
+ //# 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,mDAAiD;AAEjD,4CAAiD;AACjD,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,uBAAC,qBAAa,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,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 { 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,33 @@
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 icons_1 = require("@neo4j-ndl/react/icons");
27
+ const react_2 = require("react");
28
+ const Component = () => {
29
+ const [isSelected, setIsSelected] = (0, react_2.useState)(false);
30
+ return ((0, jsx_runtime_1.jsx)(react_1.SelectableTag, { isSelected: isSelected, leadingVisual: (0, jsx_runtime_1.jsx)(icons_1.DatabasePlusIcon, {}), onClick: () => setIsSelected(!isSelected), children: "Selectable Tag with leading icon" }));
31
+ };
32
+ exports.default = Component;
33
+ //# 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,mDAAiD;AAEjD,4CAAiD;AACjD,kDAA0D;AAC1D,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,uBAAC,qBAAa,IACZ,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,uBAAC,wBAAgB,KAAG,EACnC,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,iDAG3B,CACjB,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 { 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"]}
@@ -40,6 +40,8 @@ const classnames_1 = __importDefault(require("classnames"));
40
40
  const conditional_wrap_1 = require("../conditional-wrap");
41
41
  const icons_1 = require("../icons");
42
42
  /**
43
+ * @deprecated Use `ReadOnlyTag`, `DismissibleTag`, or `SelectableTag` instead. This component will be removed in v5.
44
+ *
43
45
  * Tag component is a small visual element that represents a tag.
44
46
  * A tag is always removable. If you want a non removable tag, use the StatusLabel component instead.
45
47
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,0DAAsD;AACtD,oCAA4C;AAa5C;;;GAGG;AACI,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,IAAA,oBAAU,EAAC,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,+CACE,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,uBAAC,kCAAe,IACd,UAAU,EAAE,IAAI,KAAK,aAAa,EAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,mCAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACnC,QAAQ,GACF,CACV,YAED,iCAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,GACnC,EACjB,IAAI,KAAK,aAAa,IAAI,CACzB,mCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,OAAO,gBACL,YAAY,YAEvB,uBAAC,wBAAgB,KAAG,GACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,GAAG,OAgDd","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 * 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"]}
1
+ {"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../src/tag/Tag.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,4DAAoC;AAIpC,0DAAsD;AACtD,oCAA4C;AAa5C;;;;;GAKG;AACI,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,IAAA,oBAAU,EAAC,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,+CACE,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,SAAS,EACT,cAAc,eAElB,uBAAC,kCAAe,IACd,UAAU,EAAE,IAAI,KAAK,aAAa,EAClC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,CAClB,mCAAQ,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,OAAO,YACnC,QAAQ,GACF,CACV,YAED,iCAAM,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAQ,GACnC,EACjB,IAAI,KAAK,aAAa,IAAI,CACzB,mCACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,iBAAiB,EAC3B,OAAO,EAAE,OAAO,gBACL,YAAY,YAEvB,uBAAC,wBAAgB,KAAG,GACb,CACV,KACG,CACP,CAAC;AACJ,CAAC,CAAC;AAhDW,QAAA,GAAG,OAgDd","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,32 @@
1
+ "use strict";
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
23
+ return (mod && mod.__esModule) ? mod : { "default": mod };
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.TagVariantsSource = exports.TagVariants = void 0;
27
+ var tag_variants_story_1 = require("./tag-variants.story");
28
+ Object.defineProperty(exports, "TagVariants", { enumerable: true, get: function () { return __importDefault(tag_variants_story_1).default; } });
29
+ const export_stories_utils_1 = require("../../_common/export-stories-utils");
30
+ const tag_variants_story_raw_1 = __importDefault(require("./tag-variants.story?raw"));
31
+ exports.TagVariantsSource = (0, export_stories_utils_1.removeLicenseHeader)(tag_variants_story_raw_1.default);
32
+ //# 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,2DAA8D;AAArD,kIAAA,OAAO,OAAe;AAE/B,6EAAyE;AACzE,sFAA4D;AAE/C,QAAA,iBAAiB,GAAG,IAAA,0CAAmB,EAAC,gCAAoB,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,32 @@
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 react_2 = require("react");
27
+ const Component = () => {
28
+ const [isSelected, setIsSelected] = (0, react_2.useState)(false);
29
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "n-flex n-flex-col n-gap-token-8 n-items-start", children: [(0, jsx_runtime_1.jsx)(react_1.ReadOnlyTag, { children: "Read-only" }), (0, jsx_runtime_1.jsx)(react_1.DismissibleTag, { onRemove: () => console.info('DismissibleTag onRemove was called'), children: "Dismissible" }), (0, jsx_runtime_1.jsx)(react_1.SelectableTag, { isSelected: isSelected, onClick: () => setIsSelected(!isSelected), children: "Selectable" })] }));
30
+ };
31
+ exports.default = Component;
32
+ //# 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,mDAAiD;AAEjD,4CAA8E;AAC9E,iCAAiC;AAEjC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAEpD,OAAO,CACL,iCAAK,SAAS,EAAC,+CAA+C,aAC5D,uBAAC,mBAAW,4BAAwB,EACpC,uBAAC,sBAAc,IACb,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,oCAAoC,CAAC,4BAGnD,EACjB,uBAAC,qBAAa,IACZ,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,CAAC,UAAU,CAAC,2BAG3B,IACZ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport '@neo4j-ndl/base/lib/neo4j-ds-styles.css';\n\nimport { 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"]}
@@ -71,7 +71,7 @@ const getLettersDisplay = (displayName) => {
71
71
  .toUpperCase();
72
72
  };
73
73
  export const Avatar = (_a) => {
74
- var { as, hasStatus = false, isDisabled = false, name, shape = 'circle', size = 'medium', source, status, type: initialType = 'image', className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["as", "hasStatus", "isDisabled", "name", "shape", "size", "source", "status", "type", "className", "style", "htmlAttributes", "ref"]);
74
+ var { as, hasStatus = false, icon, isDisabled = false, name, shape = 'circle', size = 'medium', source, status, type: initialType = 'image', className, style, htmlAttributes, ref } = _a, restProps = __rest(_a, ["as", "hasStatus", "icon", "isDisabled", "name", "shape", "size", "source", "status", "type", "className", "style", "htmlAttributes", "ref"]);
75
75
  // If source is not provided, fallback to icon
76
76
  const type = initialType === 'image' && (source === undefined || source === '')
77
77
  ? 'icon'
@@ -84,7 +84,7 @@ export const Avatar = (_a) => {
84
84
  });
85
85
  const typeClass = `ndl-avatar-${type}`;
86
86
  const renderImageType = () => (_jsxs(_Fragment, { children: [_jsx("img", { "data-testid": "ndl-avatar-image", src: source, alt: name }), _jsx("div", { "data-testid": "ndl-avatar-image-overlay", className: `${shapeClasses} ndl-avatar-image-overlay` })] }));
87
- const renderIconType = () => _jsx(UserIconOutline, {});
87
+ const renderIconType = () => _jsx(_Fragment, { children: icon !== null && icon !== void 0 ? icon : _jsx(UserIconOutline, {}) });
88
88
  const renderLettersType = () => {
89
89
  return (_jsx(Typography, { variant: "subheading-small", className: "ndl-avatar-typography", children: getLettersDisplay(name !== null && name !== void 0 ? name : '') }));
90
90
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../src/avatar/Avatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAgB3C,SAAS,iBAAiB,CAAC,IAAc;IACvC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS,CAAC;QACf,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ;YACX,OAAO;gBACL,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,CAAC;gBACX,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,GAAG;aACZ,CAAC;QACJ,KAAK,OAAO,CAAC;QACb,KAAK,SAAS,CAAC;QACf;YACE,OAAO;gBACL,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,EAAE;gBACZ,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,CAAC;aACV,CAAC;IACN,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EACvB,IAAI,EACJ,MAAM,GAIP;IACC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,uCAAuC,MAAM,EAAE,CAAC;IAEtE,OAAO,CACL,cACE,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EACvD,IAAI,EAAC,cAAc,YAEnB,eACE,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,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;gBACnC,CAAC,CAAC,iBAAiB,EAAE;gBACrB,CAAC,CAAC,IAAI,CAAC;IAEf,MAAM,wBAAwB,GAC5B,SAAS,IAAI,CAAC,UAAU,IAAI,MAAM,KAAK,SAAS,CAAC;IAEnD,OAAO,CACL,MAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,iBACC,CAAC,QAAQ,IAClB,CAAC,QAAQ,IAAI;QACf,QAAQ,EAAE,UAAU;KACrB,CAAC,kBACU,UAAU,IAAI,EAAE,IACxB,SAAS,EACT,cAAc,eAElB,cAAK,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,YAAG,aAAa,GAAO,EACzE,wBAAwB,IAAI,CAC3B,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,CAChD,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 { UserIconOutline } from '../icons';\nimport { Typography } from '../typography';\n\ntype SizeType = AvatarProps['size'];\ntype StatusType = NonNullable<AvatarProps['status']>;\n\ninterface CircleProperties {\n /** Center coordinates of the circles */\n cxAndCy: number;\n /** Diameter of the circles */\n diameter: number;\n /** Radius of the inner circle */\n rInner: number;\n /** Radius of the outer circle */\n rOuter: number;\n}\n\nfunction circleSizeFactory(size: SizeType): CircleProperties {\n switch (size) {\n case 'x-small':\n case 'small':\n case 'medium':\n return {\n cxAndCy: 4.5,\n diameter: 9,\n rInner: 3,\n rOuter: 4.5,\n };\n case 'large':\n case 'x-large':\n default:\n return {\n cxAndCy: 6,\n diameter: 12,\n rInner: 4,\n rOuter: 6,\n };\n }\n}\n\nfunction StatusIndicator({\n size,\n status,\n}: {\n size: SizeType;\n status: StatusType;\n}) {\n const { cxAndCy, diameter, rInner, rOuter } = circleSizeFactory(size);\n const statusClasses = `ndl-avatar-status ndl-avatar-status-${status}`;\n\n return (\n <div\n className={statusClasses}\n title={status.charAt(0).toUpperCase() + status.slice(1)}\n role=\"presentation\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={diameter}\n width={diameter}\n viewBox={`0 0 ${diameter} ${diameter}`}\n fill=\"none\"\n >\n <circle\n cx={cxAndCy}\n cy={cxAndCy}\n r={rOuter}\n className=\"ndl-avatar-status-circle-outer\"\n />\n <circle\n cx={cxAndCy}\n cy={cxAndCy}\n r={status === 'unknown' ? rInner - 1 : rInner}\n className=\"ndl-avatar-status-circle-inner\"\n />\n </svg>\n </div>\n );\n}\n\ntype AvatarProps = {\n /** Whether to display a status indicator */\n hasStatus?: boolean;\n /** Whether the avatar is disabled. When disabled, status indicators are hidden and `onClick` handlers are disabled when cast as a button */\n isDisabled?: boolean;\n /** The name associated with the avatar. Used for alt text and aria-label. For letters type, this text is displayed */\n name?: string;\n /** The shape of the avatar */\n shape?: 'circle' | 'square';\n /** The size of the avatar */\n size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';\n /** Source URI for the image. When provided with `type=\"image`\", displays the image */\n source?: string;\n /** The status to display. Only shown when `hasStatus` is `true` and component is not disabled */\n status?: 'offline' | 'online' | 'unknown';\n /** The type of avatar content. If `type=\"image\"` and no source is provided, automatically falls back to `icon` */\n type?: 'icon' | 'image' | 'letters';\n} & (\n | {\n as: 'button';\n onClick: () => void;\n }\n | {\n as?: React.ElementType;\n }\n);\n\nconst getLettersDisplay = (displayName: string) => {\n const words = displayName.trim().split(/\\s+/).filter(Boolean);\n if (words.length <= 1) {\n return displayName.trim();\n }\n return words\n .map((word) => word.charAt(0))\n .join('')\n .toUpperCase();\n};\n\nexport const Avatar = <T extends React.ElementType = 'div'>({\n as,\n hasStatus = false,\n isDisabled = false,\n name,\n shape = 'circle',\n size = 'medium',\n source,\n status,\n type: initialType = 'image',\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, AvatarProps>) => {\n // If source is not provided, fallback to icon\n const type =\n initialType === 'image' && (source === undefined || source === '')\n ? 'icon'\n : initialType;\n\n const Component: React.ElementType = as ?? 'div';\n const isButton = Component === 'button';\n const classes = classNames(\n `ndl-avatar ndl-avatar-${shape} ndl-avatar-${size}`,\n className,\n );\n const shapeClasses = classNames(\n `ndl-avatar-shape ndl-avatar-${shape} ndl-avatar-${shape}-${size}`,\n {\n 'ndl-avatar-disabled': isDisabled,\n },\n );\n\n const typeClass = `ndl-avatar-${type}`;\n\n const renderImageType = () => (\n <>\n <img data-testid=\"ndl-avatar-image\" src={source} alt={name} />\n <div\n data-testid=\"ndl-avatar-image-overlay\"\n className={`${shapeClasses} ndl-avatar-image-overlay`}\n />\n </>\n );\n\n const renderIconType = () => <UserIconOutline />;\n\n const renderLettersType = () => {\n return (\n <Typography variant=\"subheading-small\" className=\"ndl-avatar-typography\">\n {getLettersDisplay(name ?? '')}\n </Typography>\n );\n };\n\n const TypeComponent =\n type === 'image'\n ? renderImageType()\n : type === 'icon'\n ? renderIconType()\n : type === 'letters' && Boolean(name)\n ? renderLettersType()\n : null;\n\n const isStatusIndicatorVisible =\n hasStatus && !isDisabled && status !== undefined;\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n aria-hidden={!isButton}\n {...(isButton && {\n disabled: isDisabled,\n })}\n aria-label={`Avatar ${name}`}\n {...restProps}\n {...htmlAttributes}\n >\n <div className={classNames(shapeClasses, typeClass)}>{TypeComponent}</div>\n {isStatusIndicatorVisible && (\n <StatusIndicator size={size} status={status} />\n )}\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../../src/avatar/Avatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAgB3C,SAAS,iBAAiB,CAAC,IAAc;IACvC,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,SAAS,CAAC;QACf,KAAK,OAAO,CAAC;QACb,KAAK,QAAQ;YACX,OAAO;gBACL,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,CAAC;gBACX,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,GAAG;aACZ,CAAC;QACJ,KAAK,OAAO,CAAC;QACb,KAAK,SAAS,CAAC;QACf;YACE,OAAO;gBACL,OAAO,EAAE,CAAC;gBACV,QAAQ,EAAE,EAAE;gBACZ,MAAM,EAAE,CAAC;gBACT,MAAM,EAAE,CAAC;aACV,CAAC;IACN,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,EACvB,IAAI,EACJ,MAAM,GAIP;IACC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACtE,MAAM,aAAa,GAAG,uCAAuC,MAAM,EAAE,CAAC;IAEtE,OAAO,CACL,cACE,SAAS,EAAE,aAAa,EACxB,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,MAAM,CAAC,K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AAa,GACjB,IAAI,KAAK,OAAO;QACd,CAAC,CAAC,eAAe,EAAE;QACnB,CAAC,CAAC,IAAI,KAAK,MAAM;YACf,CAAC,CAAC,cAAc,EAAE;YAClB,CAAC,CAAC,IAAI,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;gBACnC,CAAC,CAAC,iBAAiB,EAAE;gBACrB,CAAC,CAAC,IAAI,CAAC;IAEf,MAAM,wBAAwB,GAC5B,SAAS,IAAI,CAAC,UAAU,IAAI,MAAM,KAAK,SAAS,CAAC;IAEnD,OAAO,CACL,MAAC,SAAS,kBACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,iBACC,CAAC,QAAQ,IAClB,CAAC,QAAQ,IAAI;QACf,QAAQ,EAAE,UAAU;KACrB,CAAC,kBACU,UAAU,IAAI,EAAE,IACxB,SAAS,EACT,cAAc,eAElB,cAAK,SAAS,EAAE,UAAU,CAAC,YAAY,EAAE,SAAS,CAAC,YAAG,aAAa,GAAO,EACzE,wBAAwB,IAAI,CAC3B,KAAC,eAAe,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,GAAI,CAChD,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 { UserIconOutline } from '../icons';\nimport { Typography } from '../typography';\n\ntype SizeType = AvatarProps['size'];\ntype StatusType = NonNullable<AvatarProps['status']>;\n\ninterface CircleProperties {\n /** Center coordinates of the circles */\n cxAndCy: number;\n /** Diameter of the circles */\n diameter: number;\n /** Radius of the inner circle */\n rInner: number;\n /** Radius of the outer circle */\n rOuter: number;\n}\n\nfunction circleSizeFactory(size: SizeType): CircleProperties {\n switch (size) {\n case 'x-small':\n case 'small':\n case 'medium':\n return {\n cxAndCy: 4.5,\n diameter: 9,\n rInner: 3,\n rOuter: 4.5,\n };\n case 'large':\n case 'x-large':\n default:\n return {\n cxAndCy: 6,\n diameter: 12,\n rInner: 4,\n rOuter: 6,\n };\n }\n}\n\nfunction StatusIndicator({\n size,\n status,\n}: {\n size: SizeType;\n status: StatusType;\n}) {\n const { cxAndCy, diameter, rInner, rOuter } = circleSizeFactory(size);\n const statusClasses = `ndl-avatar-status ndl-avatar-status-${status}`;\n\n return (\n <div\n className={statusClasses}\n title={status.charAt(0).toUpperCase() + status.slice(1)}\n role=\"presentation\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n height={diameter}\n width={diameter}\n viewBox={`0 0 ${diameter} ${diameter}`}\n fill=\"none\"\n >\n <circle\n cx={cxAndCy}\n cy={cxAndCy}\n r={rOuter}\n className=\"ndl-avatar-status-circle-outer\"\n />\n <circle\n cx={cxAndCy}\n cy={cxAndCy}\n r={status === 'unknown' ? rInner - 1 : rInner}\n className=\"ndl-avatar-status-circle-inner\"\n />\n </svg>\n </div>\n );\n}\n\ntype AvatarProps = {\n /** Whether to display a status indicator */\n hasStatus?: boolean;\n /** Whether the avatar is disabled. When disabled, status indicators are hidden and `onClick` handlers are disabled when cast as a button */\n isDisabled?: boolean;\n /** The name associated with the avatar. Used for alt text and aria-label. For letters type, this text is displayed */\n name?: string;\n /** The shape of the avatar */\n shape?: 'circle' | 'square';\n /** The size of the avatar */\n size?: 'x-small' | 'small' | 'medium' | 'large' | 'x-large';\n /** Source URI for the image. When provided with `type=\"image`\", displays the image */\n source?: string;\n /** The status to display. Only shown when `hasStatus` is `true` and component is not disabled */\n status?: 'offline' | 'online' | 'unknown';\n /** The type of avatar content. If `type=\"image\"` and no source is provided, automatically falls back to `icon` */\n type?: 'icon' | 'image' | 'letters';\n /** Custom icon to display when `type` is `\"icon\"`. Defaults to `UserIconOutline` */\n icon?: React.ReactNode;\n} & (\n | {\n as: 'button';\n onClick: () => void;\n }\n | {\n as?: React.ElementType;\n }\n);\n\nconst getLettersDisplay = (displayName: string) => {\n const words = displayName.trim().split(/\\s+/).filter(Boolean);\n if (words.length <= 1) {\n return displayName.trim();\n }\n return words\n .map((word) => word.charAt(0))\n .join('')\n .toUpperCase();\n};\n\nexport const Avatar = <T extends React.ElementType = 'div'>({\n as,\n hasStatus = false,\n icon,\n isDisabled = false,\n name,\n shape = 'circle',\n size = 'medium',\n source,\n status,\n type: initialType = 'image',\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, AvatarProps>) => {\n // If source is not provided, fallback to icon\n const type =\n initialType === 'image' && (source === undefined || source === '')\n ? 'icon'\n : initialType;\n\n const Component: React.ElementType = as ?? 'div';\n const isButton = Component === 'button';\n const classes = classNames(\n `ndl-avatar ndl-avatar-${shape} ndl-avatar-${size}`,\n className,\n );\n const shapeClasses = classNames(\n `ndl-avatar-shape ndl-avatar-${shape} ndl-avatar-${shape}-${size}`,\n {\n 'ndl-avatar-disabled': isDisabled,\n },\n );\n\n const typeClass = `ndl-avatar-${type}`;\n\n const renderImageType = () => (\n <>\n <img data-testid=\"ndl-avatar-image\" src={source} alt={name} />\n <div\n data-testid=\"ndl-avatar-image-overlay\"\n className={`${shapeClasses} ndl-avatar-image-overlay`}\n />\n </>\n );\n\n const renderIconType = () => <>{icon ?? <UserIconOutline />}</>;\n\n const renderLettersType = () => {\n return (\n <Typography variant=\"subheading-small\" className=\"ndl-avatar-typography\">\n {getLettersDisplay(name ?? '')}\n </Typography>\n );\n };\n\n const TypeComponent =\n type === 'image'\n ? renderImageType()\n : type === 'icon'\n ? renderIconType()\n : type === 'letters' && Boolean(name)\n ? renderLettersType()\n : null;\n\n const isStatusIndicatorVisible =\n hasStatus && !isDisabled && status !== undefined;\n\n return (\n <Component\n ref={ref}\n className={classes}\n style={style}\n aria-hidden={!isButton}\n {...(isButton && {\n disabled: isDisabled,\n })}\n aria-label={`Avatar ${name}`}\n {...restProps}\n {...htmlAttributes}\n >\n <div className={classNames(shapeClasses, typeClass)}>{TypeComponent}</div>\n {isStatusIndicatorVisible && (\n <StatusIndicator size={size} status={status} />\n )}\n </Component>\n );\n};\n"]}
@@ -0,0 +1,29 @@
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 { Avatar } from '@neo4j-ndl/react';
24
+ import { BellIconOutline, HeartIconOutline, StarIconOutline, } from '@neo4j-ndl/react/icons';
25
+ const Component = () => {
26
+ return (_jsxs("div", { className: "n-flex n-gap-token-16", children: [_jsx(Avatar, { type: "icon", name: "Favorites", icon: _jsx(StarIconOutline, {}) }), _jsx(Avatar, { type: "icon", name: "Notifications", icon: _jsx(BellIconOutline, {}) }), _jsx(Avatar, { type: "icon", name: "Likes", icon: _jsx(HeartIconOutline, {}) })] }));
27
+ };
28
+ export default Component;
29
+ //# sourceMappingURL=avatar-custom-icon.story.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar-custom-icon.story.js","sourceRoot":"","sources":["../../../../src/avatar/stories/avatar-custom-icon.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,wBAAwB,CAAC;AAEhC,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,WAAW,EAAC,IAAI,EAAE,KAAC,eAAe,KAAG,GAAI,EAClE,KAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,eAAe,EAAC,IAAI,EAAE,KAAC,eAAe,KAAG,GAAI,EACtE,KAAC,MAAM,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAE,KAAC,gBAAgB,KAAG,GAAI,IAC3D,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 { Avatar } from '@neo4j-ndl/react';\nimport {\n BellIconOutline,\n HeartIconOutline,\n StarIconOutline,\n} from '@neo4j-ndl/react/icons';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-gap-token-16\">\n <Avatar type=\"icon\" name=\"Favorites\" icon={<StarIconOutline />} />\n <Avatar type=\"icon\" name=\"Notifications\" icon={<BellIconOutline />} />\n <Avatar type=\"icon\" name=\"Likes\" icon={<HeartIconOutline />} />\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -18,6 +18,7 @@
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';
@@ -25,12 +26,14 @@ 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';
27
28
  import { removeLicenseHeader } from '../../_common/export-stories-utils';
29
+ import AvatarCustomIconSourceRaw from './avatar-custom-icon.story?raw';
28
30
  import AvatarDefaultSourceRaw from './avatar-default.story?raw';
29
31
  import AvatarDisabledSourceRaw from './avatar-disabled.story?raw';
30
32
  import AvatarShapesSourceRaw from './avatar-shapes.story?raw';
31
33
  import AvatarSizesSourceRaw from './avatar-sizes.story?raw';
32
34
  import AvatarStatusesSourceRaw from './avatar-statuses.story?raw';
33
35
  import AvatarTypesSourceRaw from './avatar-types.story?raw';
36
+ export const AvatarCustomIconSource = removeLicenseHeader(AvatarCustomIconSourceRaw);
34
37
  export const AvatarDefaultSource = removeLicenseHeader(AvatarDefaultSourceRaw);
35
38
  export const AvatarDisabledSource = removeLicenseHeader(AvatarDisabledSourceRaw);
36
39
  export const AvatarSizesSource = removeLicenseHeader(AvatarSizesSourceRaw);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","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;AAEpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,sBAAsB,MAAM,4BAA4B,CAAC;AAChE,OAAO,uBAAuB,MAAM,6BAA6B,CAAC;AAClE,OAAO,qBAAqB,MAAM,2BAA2B,CAAC;AAC9D,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAC5D,OAAO,uBAAuB,MAAM,6BAA6B,CAAC;AAClE,OAAO,oBAAoB,MAAM,0BAA0B,CAAC;AAE5D,MAAM,CAAC,MAAM,mBAAmB,GAAG,mBAAmB,CAAC,sBAAsB,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,CAAC;AACF,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,kBAAkB,GAAG,mBAAmB,CAAC,qBAAqB,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,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 AvatarDefault } from './avatar-default.story';\nexport { default as AvatarDisabled } from './avatar-disabled.story';\nexport { default as AvatarSizes } from './avatar-sizes.story';\nexport { default as AvatarShapes } from './avatar-shapes.story';\nexport { default as AvatarTypes } from './avatar-types.story';\nexport { default as AvatarStatuses } from './avatar-statuses.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport AvatarDefaultSourceRaw from './avatar-default.story?raw';\nimport AvatarDisabledSourceRaw from './avatar-disabled.story?raw';\nimport AvatarShapesSourceRaw from './avatar-shapes.story?raw';\nimport AvatarSizesSourceRaw from './avatar-sizes.story?raw';\nimport AvatarStatusesSourceRaw from './avatar-statuses.story?raw';\nimport AvatarTypesSourceRaw from './avatar-types.story?raw';\n\nexport const AvatarDefaultSource = removeLicenseHeader(AvatarDefaultSourceRaw);\nexport const AvatarDisabledSource = removeLicenseHeader(\n AvatarDisabledSourceRaw,\n);\nexport const AvatarSizesSource = removeLicenseHeader(AvatarSizesSourceRaw);\nexport const AvatarShapesSource = removeLicenseHeader(AvatarShapesSourceRaw);\nexport const AvatarTypesSource = removeLicenseHeader(AvatarTypesSourceRaw);\nexport const AvatarStatusesSource = removeLicenseHeader(\n AvatarStatusesSourceRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js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AAC,CAAC;AAC7E,MAAM,CAAC,MAAM,iBAAiB,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,mBAAmB,CACrD,uBAAuB,CACxB,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 AvatarCustomIcon } from './avatar-custom-icon.story';\nexport { default as AvatarDefault } from './avatar-default.story';\nexport { default as AvatarDisabled } from './avatar-disabled.story';\nexport { default as AvatarSizes } from './avatar-sizes.story';\nexport { default as AvatarShapes } from './avatar-shapes.story';\nexport { default as AvatarTypes } from './avatar-types.story';\nexport { default as AvatarStatuses } from './avatar-statuses.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport AvatarCustomIconSourceRaw from './avatar-custom-icon.story?raw';\nimport AvatarDefaultSourceRaw from './avatar-default.story?raw';\nimport AvatarDisabledSourceRaw from './avatar-disabled.story?raw';\nimport AvatarShapesSourceRaw from './avatar-shapes.story?raw';\nimport AvatarSizesSourceRaw from './avatar-sizes.story?raw';\nimport AvatarStatusesSourceRaw from './avatar-statuses.story?raw';\nimport AvatarTypesSourceRaw from './avatar-types.story?raw';\n\nexport const AvatarCustomIconSource = removeLicenseHeader(\n AvatarCustomIconSourceRaw,\n);\nexport const AvatarDefaultSource = removeLicenseHeader(AvatarDefaultSourceRaw);\nexport const AvatarDisabledSource = removeLicenseHeader(\n AvatarDisabledSourceRaw,\n);\nexport const AvatarSizesSource = removeLicenseHeader(AvatarSizesSourceRaw);\nexport const AvatarShapesSource = removeLicenseHeader(AvatarShapesSourceRaw);\nexport const AvatarTypesSource = removeLicenseHeader(AvatarTypesSourceRaw);\nexport const AvatarStatusesSource = removeLicenseHeader(\n AvatarStatusesSourceRaw,\n);\n"]}
@@ -25,7 +25,7 @@ const Component = () => {
25
25
  const handleRemove = () => {
26
26
  console.info('onRemove was called');
27
27
  };
28
- return (_jsxs("div", { className: "n-flex n-flex-col n-gap-token-16", children: [_jsx(DismissibleTag, { size: "x-small", onRemove: handleRemove, children: "X-Small" }), _jsx(DismissibleTag, { size: "small", onRemove: handleRemove, children: "Small" }), _jsx(DismissibleTag, { size: "medium", onRemove: handleRemove, children: "Medium" }), _jsx(DismissibleTag, { size: "large", onRemove: handleRemove, children: "Large" })] }));
28
+ return (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-8", children: [_jsx(DismissibleTag, { size: "x-small", onRemove: handleRemove, children: "X-Small" }), _jsx(DismissibleTag, { size: "small", onRemove: handleRemove, children: "Small" }), _jsx(DismissibleTag, { size: "medium", onRemove: handleRemove, children: "Medium" }), _jsx(DismissibleTag, { size: "large", onRemove: handleRemove, children: "Large" })] }));
29
29
  };
30
30
  export default Component;
31
31
  //# sourceMappingURL=dismissible-tag-sizes.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dismissible-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/dismissible-tag/stories/dismissible-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,kCAAkC,aAC/C,KAAC,cAAc,IAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,EAAE,YAAY,wBAEpC,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,YAAY,sBAElC,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,YAAY,uBAEnC,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,YAAY,sBAElC,IACb,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 } from '@neo4j-ndl/react';\n\nconst Component = () => {\n const handleRemove = () => {\n console.info('onRemove was called');\n };\n\n return (\n <div className=\"n-flex n-flex-col n-gap-token-16\">\n <DismissibleTag size=\"x-small\" onRemove={handleRemove}>\n X-Small\n </DismissibleTag>\n <DismissibleTag size=\"small\" onRemove={handleRemove}>\n Small\n </DismissibleTag>\n <DismissibleTag size=\"medium\" onRemove={handleRemove}>\n Medium\n </DismissibleTag>\n <DismissibleTag size=\"large\" onRemove={handleRemove}>\n Large\n </DismissibleTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"dismissible-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/dismissible-tag/stories/dismissible-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,OAAO,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,cAAc,IAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,EAAE,YAAY,wBAEpC,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,YAAY,sBAElC,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,YAAY,uBAEnC,EACjB,KAAC,cAAc,IAAC,IAAI,EAAC,OAAO,EAAC,QAAQ,EAAE,YAAY,sBAElC,IACb,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 } from '@neo4j-ndl/react';\n\nconst Component = () => {\n const handleRemove = () => {\n console.info('onRemove was called');\n };\n\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <DismissibleTag size=\"x-small\" onRemove={handleRemove}>\n X-Small\n </DismissibleTag>\n <DismissibleTag size=\"small\" onRemove={handleRemove}>\n Small\n </DismissibleTag>\n <DismissibleTag size=\"medium\" onRemove={handleRemove}>\n Medium\n </DismissibleTag>\n <DismissibleTag size=\"large\" onRemove={handleRemove}>\n Large\n </DismissibleTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
package/lib/esm/index.js 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.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAA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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 { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\nexport { SelectIconButton } from './select-icon-button';\nexport { ReadOnlyTag } from './read-only-tag';\nexport { DismissibleTag } from './dismissible-tag';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAA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AAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,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 { Accordion } from './accordion';\nexport { StatusLabel } from './status-label';\nexport { Banner } from './banner';\nexport { Checkbox } from './checkbox';\nexport { Switch } from './switch';\nexport { Radio } from './radio';\nexport { Menu } from './menu';\nexport { DatePicker } from './date-picker';\nexport { Dialog } from './dialog';\nexport { LoadingSpinner } from './loading-spinner';\nexport { Tabs } from './tabs';\nexport { SegmentedControl } from './segmented-control';\nexport { Popover } from './popover';\nexport { ProgressBar } from './progress-bar';\nexport { Dropzone } from './dropzone';\nexport {\n DataGrid,\n useDataGridContext,\n useTableNav,\n dataGridUtils,\n DataGridNav,\n} from './data-grid';\nexport { TextInput } from './text-input';\nexport { TextArea } from './text-area';\nexport { TextLink } from './text-link';\nexport { Select } from './select';\nexport { Tag } from './tag';\nexport * from './theme';\nexport { Wizard } from './wizard';\nexport { GraphLabel } from './graph-label';\nexport { CodeBlock } from './code-block';\nexport { StatusIndicator } from './status-indicator';\nexport { SideNavigation } from './side-navigation';\nexport { Typography } from './typography';\nexport { Drawer } from './drawer';\nexport { Breadcrumbs } from './breadcrumbs';\nexport * from './hooks';\nexport { Box } from './box';\nexport { Flex } from './flex';\nexport { Avatar } from './avatar';\nexport { Logo } from './logo';\nexport { ClipboardButton } from './clipboard-button';\nexport { Slider } from './slider';\nexport { InlineEdit } from './inline-edit';\nexport { DropdownButton } from './dropdown-button';\nexport { Divider } from './divider';\nexport * from './tree-view';\nexport { ToasterControlled, Toaster, toast, type ToastId } from './toast';\nexport { Tooltip } from './tooltip';\nexport { Skeleton } from './skeleton';\nexport { TimePicker, NeedleTime } from './time-picker';\nexport { TimeZonePicker } from './timezone-picker';\nexport {\n Spotlight,\n SpotlightProvider,\n SpotlightTarget,\n SpotlightTour,\n useSpotlightContext,\n} from './spotlight';\nexport { LoadingBar } from './loading-bar';\nexport { IconButton } from './icon-button';\nexport { CleanIconButton } from './clean-icon-button';\nexport { IconButtonArray } from './icon-button-array';\nexport { ConditionalWrap } from './conditional-wrap';\nexport { ColorPicker } from './color-picker';\nexport { OutlinedButton } from './outlined-button';\nexport { FilledButton } from './filled-button';\nexport { TextButton } from './text-button';\nexport { Code } from './code';\nexport { Kbd } from './kbd';\nexport { SelectIconButton } from './select-icon-button';\nexport { ReadOnlyTag } from './read-only-tag';\nexport { DismissibleTag } from './dismissible-tag';\nexport { SelectableTag } from './selectable-tag';\n"]}
@@ -22,7 +22,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  import '@neo4j-ndl/base/lib/neo4j-ds-styles.css';
23
23
  import { ReadOnlyTag } from '@neo4j-ndl/react';
24
24
  const Component = () => {
25
- return (_jsxs("div", { className: "n-flex n-gap-token-16 n-items-start", children: [_jsx(ReadOnlyTag, { size: "x-small", children: "X-Small" }), _jsx(ReadOnlyTag, { size: "small", children: "Small" }), _jsx(ReadOnlyTag, { size: "medium", children: "Medium" }), _jsx(ReadOnlyTag, { size: "large", children: "Large" })] }));
25
+ return (_jsxs("div", { className: "n-flex n-flex-row n-gap-token-8", children: [_jsx(ReadOnlyTag, { size: "x-small", children: "X-Small" }), _jsx(ReadOnlyTag, { size: "small", children: "Small" }), _jsx(ReadOnlyTag, { size: "medium", children: "Medium" }), _jsx(ReadOnlyTag, { size: "large", children: "Large" })] }));
26
26
  };
27
27
  export default Component;
28
28
  //# sourceMappingURL=read-only-tag-sizes.story.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"read-only-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/read-only-tag/stories/read-only-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,qCAAqC,aAClD,KAAC,WAAW,IAAC,IAAI,EAAC,SAAS,wBAAsB,EACjD,KAAC,WAAW,IAAC,IAAI,EAAC,OAAO,sBAAoB,EAC7C,KAAC,WAAW,IAAC,IAAI,EAAC,QAAQ,uBAAqB,EAC/C,KAAC,WAAW,IAAC,IAAI,EAAC,OAAO,sBAAoB,IACzC,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 { ReadOnlyTag } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-gap-token-16 n-items-start\">\n <ReadOnlyTag size=\"x-small\">X-Small</ReadOnlyTag>\n <ReadOnlyTag size=\"small\">Small</ReadOnlyTag>\n <ReadOnlyTag size=\"medium\">Medium</ReadOnlyTag>\n <ReadOnlyTag size=\"large\">Large</ReadOnlyTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"read-only-tag-sizes.story.js","sourceRoot":"","sources":["../../../../src/read-only-tag/stories/read-only-tag-sizes.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,yCAAyC,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,iCAAiC,aAC9C,KAAC,WAAW,IAAC,IAAI,EAAC,SAAS,wBAAsB,EACjD,KAAC,WAAW,IAAC,IAAI,EAAC,OAAO,sBAAoB,EAC7C,KAAC,WAAW,IAAC,IAAI,EAAC,QAAQ,uBAAqB,EAC/C,KAAC,WAAW,IAAC,IAAI,EAAC,OAAO,sBAAoB,IACzC,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 { ReadOnlyTag } from '@neo4j-ndl/react';\n\nconst Component = () => {\n return (\n <div className=\"n-flex n-flex-row n-gap-token-8\">\n <ReadOnlyTag size=\"x-small\">X-Small</ReadOnlyTag>\n <ReadOnlyTag size=\"small\">Small</ReadOnlyTag>\n <ReadOnlyTag size=\"medium\">Medium</ReadOnlyTag>\n <ReadOnlyTag size=\"large\">Large</ReadOnlyTag>\n </div>\n );\n};\n\nexport default Component;\n"]}
@@ -0,0 +1,46 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ /**
14
+ *
15
+ * Copyright (c) "Neo4j"
16
+ * Neo4j Sweden AB [http://neo4j.com]
17
+ *
18
+ * This file is part of Neo4j.
19
+ *
20
+ * Neo4j is free software: you can redistribute it and/or modify
21
+ * it under the terms of the GNU General Public License as published by
22
+ * the Free Software Foundation, either version 3 of the License, or
23
+ * (at your option) any later version.
24
+ *
25
+ * This program is distributed in the hope that it will be useful,
26
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
+ * GNU General Public License for more details.
29
+ *
30
+ * You should have received a copy of the GNU General Public License
31
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
32
+ */
33
+ import classNames from 'classnames';
34
+ export const SelectableTag = (_a) => {
35
+ var { children, className, htmlAttributes, isSelected, badgeCount, leadingVisual, onClick, ref, isDisabled = false, size = 'medium', style } = _a, restProps = __rest(_a, ["children", "className", "htmlAttributes", "isSelected", "badgeCount", "leadingVisual", "onClick", "ref", "isDisabled", "size", "style"]);
36
+ const classes = classNames('ndl-tag-selectable', className, {
37
+ 'ndl-disabled': isDisabled,
38
+ 'ndl-large': size === 'large',
39
+ 'ndl-medium': size === 'medium',
40
+ 'ndl-small': size === 'small',
41
+ 'ndl-tag-selected': isSelected,
42
+ 'ndl-x-small': size === 'x-small',
43
+ });
44
+ return (_jsxs("button", Object.assign({ type: "button", "aria-pressed": isSelected, className: classes, disabled: isDisabled, onClick: onClick, ref: ref, style: style }, htmlAttributes, restProps, { children: [Boolean(leadingVisual) && (_jsx("span", { className: "ndl-selectable-tag-leading-visual", children: leadingVisual })), _jsx("span", { className: "ndl-selectable-tag-content", children: children }), badgeCount !== undefined && (_jsx("span", { className: "ndl-selectable-tag-badge", children: badgeCount }))] })));
45
+ };
46
+ //# sourceMappingURL=SelectableTag.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectableTag.js","sourceRoot":"","sources":["../../../src/selectable-tag/SelectableTag.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAuBpC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAac,EAAE,EAAE;QAblB,EAC5B,QAAQ,EACR,SAAS,EACT,cAAc,EACd,UAAU,EACV,UAAU,EACV,aAAa,EACb,OAAO,EACP,GAAG,EACH,UAAU,GAAG,KAAK,EAClB,IAAI,GAAG,QAAQ,EACf,KAAK,OAEqC,EADvC,SAAS,cAZgB,yIAa7B,CADa;IAEZ,MAAM,OAAO,GAAG,UAAU,CAAC,oBAAoB,EAAE,SAAS,EAAE;QAC1D,cAAc,EAAE,UAAU;QAC1B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,kBAAkB,EAAE,UAAU;QAC9B,aAAa,EAAE,IAAI,KAAK,SAAS;KAClC,CAAC,CAAC;IAEH,OAAO,CACL,gCACE,IAAI,EAAC,QAAQ,kBACC,UAAU,EACxB,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,IACR,cAAc,EACd,SAAS,eAEZ,OAAO,CAAC,aAAa,CAAC,IAAI,CACzB,eAAM,SAAS,EAAC,mCAAmC,YAChD,aAAa,GACT,CACR,EACD,eAAM,SAAS,EAAC,4BAA4B,YAAE,QAAQ,GAAQ,EAC7D,UAAU,KAAK,SAAS,IAAI,CAC3B,eAAM,SAAS,EAAC,0BAA0B,YAAE,UAAU,GAAQ,CAC/D,KACM,CACV,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 type { TagSize } from '../tag-base';\n\nexport interface SelectableTagProps {\n /** The content of the tag */\n children?: React.ReactNode;\n /** Whether the tag is disabled */\n isDisabled?: boolean;\n /** Whether the tag is selected */\n isSelected: boolean;\n /** Number displayed in a badge after the content */\n badgeCount?: number;\n /** Icon to display before the content */\n leadingVisual?: React.ReactNode;\n /** Size of the tag */\n size?: TagSize;\n /** Callback fired when the tag is clicked */\n onClick: React.MouseEventHandler<HTMLButtonElement>;\n}\n\nexport const SelectableTag = ({\n children,\n className,\n htmlAttributes,\n isSelected,\n badgeCount,\n leadingVisual,\n onClick,\n ref,\n isDisabled = false,\n size = 'medium',\n style,\n ...restProps\n}: CommonProps<'button', SelectableTagProps>) => {\n const classes = classNames('ndl-tag-selectable', className, {\n 'ndl-disabled': isDisabled,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-small': size === 'small',\n 'ndl-tag-selected': isSelected,\n 'ndl-x-small': size === 'x-small',\n });\n\n return (\n <button\n type=\"button\"\n aria-pressed={isSelected}\n className={classes}\n disabled={isDisabled}\n onClick={onClick}\n ref={ref}\n style={style}\n {...htmlAttributes}\n {...restProps}\n >\n {Boolean(leadingVisual) && (\n <span className=\"ndl-selectable-tag-leading-visual\">\n {leadingVisual}\n </span>\n )}\n <span className=\"ndl-selectable-tag-content\">{children}</span>\n {badgeCount !== undefined && (\n <span className=\"ndl-selectable-tag-badge\">{badgeCount}</span>\n )}\n </button>\n );\n};\n"]}
@@ -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.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/selectable-tag/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,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 { SelectableTag } from './SelectableTag';\n"]}
@@ -0,0 +1,40 @@
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
+ import { removeLicenseHeader } from '../../_common/export-stories-utils';
28
+ import SelectableTagDefaultSrcRaw from './selectable-tag-default.story?raw';
29
+ import SelectableTagDisabledSrcRaw from './selectable-tag-disabled.story?raw';
30
+ import SelectableTagSizesSrcRaw from './selectable-tag-sizes.story?raw';
31
+ import SelectableTagTruncationSrcRaw from './selectable-tag-truncation.story?raw';
32
+ import SelectableTagWithBadgeSrcRaw from './selectable-tag-with-badge.story?raw';
33
+ import SelectableTagWithLeadingIconSrcRaw from './selectable-tag-with-leading-icon.story?raw';
34
+ export const SelectableTagDefaultSrc = removeLicenseHeader(SelectableTagDefaultSrcRaw);
35
+ export const SelectableTagDisabledSrc = removeLicenseHeader(SelectableTagDisabledSrcRaw);
36
+ export const SelectableTagSizesSrc = removeLicenseHeader(SelectableTagSizesSrcRaw);
37
+ export const SelectableTagTruncationSrc = removeLicenseHeader(SelectableTagTruncationSrcRaw);
38
+ export const SelectableTagWithLeadingIconSrc = removeLicenseHeader(SelectableTagWithLeadingIconSrcRaw);
39
+ export const SelectableTagWithBadgeSrc = removeLicenseHeader(SelectableTagWithBadgeSrcRaw);
40
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","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;AAEtF,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,0BAA0B,MAAM,oCAAoC,CAAC;AAC5E,OAAO,2BAA2B,MAAM,qCAAqC,CAAC;AAC9E,OAAO,wBAAwB,MAAM,kCAAkC,CAAC;AACxE,OAAO,6BAA6B,MAAM,uCAAuC,CAAC;AAClF,OAAO,4BAA4B,MAAM,uCAAuC,CAAC;AACjF,OAAO,kCAAkC,MAAM,8CAA8C,CAAC;AAE9F,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CACxD,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC;AACF,MAAM,CAAC,MAAM,qBAAqB,GAAG,mBAAmB,CACtD,wBAAwB,CACzB,CAAC;AACF,MAAM,CAAC,MAAM,0BAA0B,GAAG,mBAAmB,CAC3D,6BAA6B,CAC9B,CAAC;AACF,MAAM,CAAC,MAAM,+BAA+B,GAAG,mBAAmB,CAChE,kCAAkC,CACnC,CAAC;AACF,MAAM,CAAC,MAAM,yBAAyB,GAAG,mBAAmB,CAC1D,4BAA4B,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\nexport { default as SelectableTagDefault } from './selectable-tag-default.story';\nexport { default as SelectableTagDisabled } from './selectable-tag-disabled.story';\nexport { default as SelectableTagSizes } from './selectable-tag-sizes.story';\nexport { default as SelectableTagTruncation } from './selectable-tag-truncation.story';\nexport { default as SelectableTagWithLeadingIcon } from './selectable-tag-with-leading-icon.story';\nexport { default as SelectableTagWithBadge } from './selectable-tag-with-badge.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport SelectableTagDefaultSrcRaw from './selectable-tag-default.story?raw';\nimport SelectableTagDisabledSrcRaw from './selectable-tag-disabled.story?raw';\nimport SelectableTagSizesSrcRaw from './selectable-tag-sizes.story?raw';\nimport SelectableTagTruncationSrcRaw from './selectable-tag-truncation.story?raw';\nimport SelectableTagWithBadgeSrcRaw from './selectable-tag-with-badge.story?raw';\nimport SelectableTagWithLeadingIconSrcRaw from './selectable-tag-with-leading-icon.story?raw';\n\nexport const SelectableTagDefaultSrc = removeLicenseHeader(\n SelectableTagDefaultSrcRaw,\n);\nexport const SelectableTagDisabledSrc = removeLicenseHeader(\n SelectableTagDisabledSrcRaw,\n);\nexport const SelectableTagSizesSrc = removeLicenseHeader(\n SelectableTagSizesSrcRaw,\n);\nexport const SelectableTagTruncationSrc = removeLicenseHeader(\n SelectableTagTruncationSrcRaw,\n);\nexport const SelectableTagWithLeadingIconSrc = removeLicenseHeader(\n SelectableTagWithLeadingIconSrcRaw,\n);\nexport const SelectableTagWithBadgeSrc = removeLicenseHeader(\n SelectableTagWithBadgeSrcRaw,\n);\n"]}