@bigbinary/neeto-molecules 5.3.15 → 5.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/v2/MadeWith.js
CHANGED
|
@@ -4,6 +4,7 @@ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
7
|
+
var classnames = require('classnames');
|
|
7
8
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
8
9
|
var initializers = require('@bigbinary/neeto-commons-frontend/v2/initializers');
|
|
9
10
|
var Icons = require('@bigbinary/neeto-icons/logos');
|
|
@@ -31,24 +32,25 @@ function _interopNamespaceDefault(e) {
|
|
|
31
32
|
|
|
32
33
|
var Icons__namespace = /*#__PURE__*/_interopNamespaceDefault(Icons);
|
|
33
34
|
|
|
34
|
-
var _excluded = ["productName", "productIcon"];
|
|
35
|
+
var _excluded = ["productName", "productIcon", "className"];
|
|
35
36
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
36
37
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
37
38
|
var MadeWith = function MadeWith(_ref) {
|
|
38
39
|
var _globalProps$organiza;
|
|
39
40
|
var productName = _ref.productName,
|
|
40
41
|
ProductIcon = _ref.productIcon,
|
|
42
|
+
className = _ref.className,
|
|
41
43
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
42
44
|
var name = neetoCist.capitalize(productName || initializers.globalProps.appName || "Neeto");
|
|
43
45
|
var subdomain = (_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain;
|
|
44
46
|
var utmParams = "utm_source=madewith".concat(subdomain ? "&utm_campaign=".concat(subdomain) : "");
|
|
45
47
|
var IconComponent = ProductIcon || Icons__namespace[index$1.uppercamelcase(name)];
|
|
46
48
|
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread(_objectSpread({
|
|
47
|
-
className: "bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none",
|
|
48
49
|
"data-testid": "made-with-".concat(name.toLowerCase()),
|
|
49
50
|
href: "https://www.neeto.com/".concat(name.toLowerCase(), "?").concat(utmParams),
|
|
50
51
|
rel: "noreferrer",
|
|
51
|
-
target: "_blank"
|
|
52
|
+
target: "_blank",
|
|
53
|
+
className: classnames("neeto-molecules-made-with__wrapper", "bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none", className)
|
|
52
54
|
}, otherProps), {}, {
|
|
53
55
|
children: [IconComponent && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
54
56
|
"data-testid": "made-with-".concat(name.toLowerCase(), "-icon"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MadeWith.js","sources":["../../../src/v2/components/MadeWith/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport { capitalize } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport * as Icons from \"neetoicons/logos\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\nimport uppercamelcase from \"uppercamelcase\";\n\nconst MadeWith = ({
|
|
1
|
+
{"version":3,"file":"MadeWith.js","sources":["../../../src/v2/components/MadeWith/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { capitalize } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport * as Icons from \"neetoicons/logos\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\nimport uppercamelcase from \"uppercamelcase\";\n\nconst MadeWith = ({\n productName,\n productIcon: ProductIcon,\n className,\n ...otherProps\n}) => {\n const name = capitalize(productName || globalProps.appName || \"Neeto\");\n const subdomain = globalProps.organization?.subdomain;\n const utmParams = `utm_source=madewith${\n subdomain ? `&utm_campaign=${subdomain}` : \"\"\n }`;\n\n const IconComponent = ProductIcon || Icons[uppercamelcase(name)];\n\n return (\n <a\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}?${utmParams}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n className={classnames(\n \"neeto-molecules-made-with__wrapper\",\n \"bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none\",\n className\n )}\n {...otherProps}\n >\n {IconComponent && (\n <span data-testid={`made-with-${name.toLowerCase()}-icon`}>\n <IconComponent size={14} />\n </span>\n )}\n <Typography className=\"leading-snug\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </Typography>\n </a>\n );\n};\n\nMadeWith.propTypes = {\n /**\n * Product name to be displayed on the component (optional).\n */\n productName: PropTypes.string,\n\n /**\n * Product icon component to be displayed on the badge (optional).\n */\n productIcon: PropTypes.elementType,\n\n /**\n * Additional class names to merge onto the badge root (optional).\n */\n className: PropTypes.string,\n};\n\nexport default memo(MadeWith);\n"],"names":["MadeWith","_ref","_globalProps$organiza","productName","ProductIcon","productIcon","className","otherProps","_objectWithoutProperties","_excluded","name","capitalize","globalProps","appName","subdomain","organization","utmParams","concat","IconComponent","Icons","uppercamelcase","_jsxs","_objectSpread","toLowerCase","href","rel","target","classnames","children","_jsx","size","Typography","variant","Trans","i18nKey","values","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAKR;AAAA,EAAA,IAAAC,qBAAA;AAAA,EAAA,IAJJC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACEC,WAAW,GAAAH,IAAA,CAAxBI,WAAW;IACXC,SAAS,GAAAL,IAAA,CAATK,SAAS;AACNC,IAAAA,UAAU,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA;EAEb,IAAMC,IAAI,GAAGC,oBAAU,CAACR,WAAW,IAAIS,wBAAW,CAACC,OAAO,IAAI,OAAO,CAAC;AACtE,EAAA,IAAMC,SAAS,GAAA,CAAAZ,qBAAA,GAAGU,wBAAW,CAACG,YAAY,MAAA,IAAA,IAAAb,qBAAA,KAAA,MAAA,GAAA,MAAA,GAAxBA,qBAAA,CAA0BY,SAAS;EACrD,IAAME,SAAS,GAAA,qBAAA,CAAAC,MAAA,CACbH,SAAS,GAAA,gBAAA,CAAAG,MAAA,CAAoBH,SAAS,CAAA,GAAK,EAAE,CAC7C;EAEF,IAAMI,aAAa,GAAGd,WAAW,IAAIe,gBAAK,CAACC,sBAAc,CAACV,IAAI,CAAC,CAAC;AAEhE,EAAA,oBACEW,eAAA,CAAA,GAAA,EAAAC,aAAA,CAAAA,aAAA,CAAA;AACE,IAAA,aAAA,EAAA,YAAA,CAAAL,MAAA,CAA0BP,IAAI,CAACa,WAAW,EAAE,CAAG;AAC/CC,IAAAA,IAAI,EAAA,wBAAA,CAAAP,MAAA,CAA2BP,IAAI,CAACa,WAAW,EAAE,EAAA,GAAA,CAAA,CAAAN,MAAA,CAAID,SAAS,CAAG;AACjES,IAAAA,GAAG,EAAC,YAAY;AAChBC,IAAAA,MAAM,EAAC,QAAQ;AACfpB,IAAAA,SAAS,EAAEqB,UAAU,CACnB,oCAAoC,EACpC,mQAAmQ,EACnQrB,SACF;AAAE,GAAA,EACEC,UAAU,CAAA,EAAA,EAAA,EAAA;IAAAqB,QAAA,EAAA,CAEbV,aAAa,iBACZW,cAAA,CAAA,MAAA,EAAA;AAAM,MAAA,aAAA,EAAA,YAAA,CAAAZ,MAAA,CAA0BP,IAAI,CAACa,WAAW,EAAE,EAAA,OAAA,CAAQ;MAAAK,QAAA,eACxDC,cAAA,CAACX,aAAa,EAAA;AAACY,QAAAA,IAAI,EAAE;OAAK;AAAC,KACvB,CACP,eACDD,cAAA,CAACE,qBAAU,EAAA;AAACzB,MAAAA,SAAS,EAAC,cAAc;AAAC0B,MAAAA,OAAO,EAAC,OAAO;MAAAJ,QAAA,eAClDC,cAAA,CAACI,kBAAK,EAAA;AACJC,QAAAA,OAAO,EAAC,gCAAgC;AACxCC,QAAAA,MAAM,EAAE;AAAEhC,UAAAA,WAAW,EAAEO;AAAK;OAC7B;AAAC,KACQ,CAAC;AAAA,GAAA,CACZ,CAAC;AAER,CAAC;AAmBD,YAAA,aAAe0B,UAAI,CAACpC,QAAQ,CAAC;;;;"}
|
package/dist/v2/MadeWith.js
CHANGED
|
@@ -2,6 +2,7 @@ import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
import { Typography } from '@bigbinary/neeto-atoms';
|
|
5
|
+
import classnames from 'classnames';
|
|
5
6
|
import { capitalize } from '@bigbinary/neeto-cist';
|
|
6
7
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/v2/initializers';
|
|
7
8
|
import * as Icons from '@bigbinary/neeto-icons/logos';
|
|
@@ -10,24 +11,25 @@ import { u as uppercamelcase } from '../index-DF5MKxql.js';
|
|
|
10
11
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
11
12
|
import '../_commonjsHelpers-BFTU3MAI.js';
|
|
12
13
|
|
|
13
|
-
var _excluded = ["productName", "productIcon"];
|
|
14
|
+
var _excluded = ["productName", "productIcon", "className"];
|
|
14
15
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
15
16
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
16
17
|
var MadeWith = function MadeWith(_ref) {
|
|
17
18
|
var _globalProps$organiza;
|
|
18
19
|
var productName = _ref.productName,
|
|
19
20
|
ProductIcon = _ref.productIcon,
|
|
21
|
+
className = _ref.className,
|
|
20
22
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
21
23
|
var name = capitalize(productName || globalProps.appName || "Neeto");
|
|
22
24
|
var subdomain = (_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain;
|
|
23
25
|
var utmParams = "utm_source=madewith".concat(subdomain ? "&utm_campaign=".concat(subdomain) : "");
|
|
24
26
|
var IconComponent = ProductIcon || Icons[uppercamelcase(name)];
|
|
25
27
|
return /*#__PURE__*/jsxs("a", _objectSpread(_objectSpread({
|
|
26
|
-
className: "bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none",
|
|
27
28
|
"data-testid": "made-with-".concat(name.toLowerCase()),
|
|
28
29
|
href: "https://www.neeto.com/".concat(name.toLowerCase(), "?").concat(utmParams),
|
|
29
30
|
rel: "noreferrer",
|
|
30
|
-
target: "_blank"
|
|
31
|
+
target: "_blank",
|
|
32
|
+
className: classnames("neeto-molecules-made-with__wrapper", "bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none", className)
|
|
31
33
|
}, otherProps), {}, {
|
|
32
34
|
children: [IconComponent && /*#__PURE__*/jsx("span", {
|
|
33
35
|
"data-testid": "made-with-".concat(name.toLowerCase(), "-icon"),
|
package/dist/v2/MadeWith.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MadeWith.js","sources":["../../src/v2/components/MadeWith/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport { capitalize } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport * as Icons from \"neetoicons/logos\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\nimport uppercamelcase from \"uppercamelcase\";\n\nconst MadeWith = ({
|
|
1
|
+
{"version":3,"file":"MadeWith.js","sources":["../../src/v2/components/MadeWith/index.jsx"],"sourcesContent":["import { memo } from \"react\";\n\nimport { Typography } from \"@bigbinary/neeto-atoms\";\nimport classnames from \"classnames\";\nimport { capitalize } from \"neetocist\";\nimport { globalProps } from \"neetocommons/v2/initializers\";\nimport * as Icons from \"neetoicons/logos\";\nimport PropTypes from \"prop-types\";\nimport { Trans } from \"react-i18next\";\nimport uppercamelcase from \"uppercamelcase\";\n\nconst MadeWith = ({\n productName,\n productIcon: ProductIcon,\n className,\n ...otherProps\n}) => {\n const name = capitalize(productName || globalProps.appName || \"Neeto\");\n const subdomain = globalProps.organization?.subdomain;\n const utmParams = `utm_source=madewith${\n subdomain ? `&utm_campaign=${subdomain}` : \"\"\n }`;\n\n const IconComponent = ProductIcon || Icons[uppercamelcase(name)];\n\n return (\n <a\n data-testid={`made-with-${name.toLowerCase()}`}\n href={`https://www.neeto.com/${name.toLowerCase()}?${utmParams}`}\n rel=\"noreferrer\"\n target=\"_blank\"\n className={classnames(\n \"neeto-molecules-made-with__wrapper\",\n \"bg-background text-foreground border-border hover:ring-border inline-flex items-center gap-1.5 rounded-md border px-2 py-1.5 text-sm font-normal no-underline transition-all duration-300 select-none hover:ring-1 hover:ring-inset motion-reduce:transition-none\",\n className\n )}\n {...otherProps}\n >\n {IconComponent && (\n <span data-testid={`made-with-${name.toLowerCase()}-icon`}>\n <IconComponent size={14} />\n </span>\n )}\n <Typography className=\"leading-snug\" variant=\"body2\">\n <Trans\n i18nKey=\"neetoMolecules.common.madeWith\"\n values={{ productName: name }}\n />\n </Typography>\n </a>\n );\n};\n\nMadeWith.propTypes = {\n /**\n * Product name to be displayed on the component (optional).\n */\n productName: PropTypes.string,\n\n /**\n * Product icon component to be displayed on the badge (optional).\n */\n productIcon: PropTypes.elementType,\n\n /**\n * Additional class names to merge onto the badge root (optional).\n */\n className: PropTypes.string,\n};\n\nexport default memo(MadeWith);\n"],"names":["MadeWith","_ref","_globalProps$organiza","productName","ProductIcon","productIcon","className","otherProps","_objectWithoutProperties","_excluded","name","capitalize","globalProps","appName","subdomain","organization","utmParams","concat","IconComponent","Icons","uppercamelcase","_jsxs","_objectSpread","toLowerCase","href","rel","target","classnames","children","_jsx","size","Typography","variant","Trans","i18nKey","values","memo"],"mappings":";;;;;;;;;;;;;;;;AAWA,IAAMA,QAAQ,GAAG,SAAXA,QAAQA,CAAAC,IAAA,EAKR;AAAA,EAAA,IAAAC,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AA0BP,IAAI,CAACa,WAAW,EAAE,EAAA,OAAA,CAAQ;MAAAK,QAAA,eACxDC,GAAA,CAACX,aAAa,EAAA;AAACY,QAAAA,IAAI,EAAE;OAAK;AAAC,KACvB,CACP,eACDD,GAAA,CAACE,UAAU,EAAA;AAACzB,MAAAA,SAAS,EAAC,cAAc;AAAC0B,MAAAA,OAAO,EAAC,OAAO;MAAAJ,QAAA,eAClDC,GAAA,CAACI,KAAK,EAAA;AACJC,QAAAA,OAAO,EAAC,gCAAgC;AACxCC,QAAAA,MAAM,EAAE;AAAEhC,UAAAA,WAAW,EAAEO;AAAK;OAC7B;AAAC,KACQ,CAAC;AAAA,GAAA,CACZ,CAAC;AAER,CAAC;AAmBD,YAAA,aAAe0B,IAAI,CAACpC,QAAQ,CAAC;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.16",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|