opus-toolkit-components 1.8.9 → 1.9.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.
- package/lib/components/Link/index.js +20 -28
- package/lib/components/Link/index.js.map +1 -1
- package/lib/main.js +52100 -51968
- package/lib/main.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,8 +2,15 @@
|
|
|
2
2
|
/******/ "use strict";
|
|
3
3
|
/******/ var __webpack_modules__ = ({
|
|
4
4
|
|
|
5
|
-
/***/
|
|
6
|
-
|
|
5
|
+
/***/ 94178
|
|
6
|
+
(module) {
|
|
7
|
+
|
|
8
|
+
module.exports = require("react/jsx-runtime");
|
|
9
|
+
|
|
10
|
+
/***/ },
|
|
11
|
+
|
|
12
|
+
/***/ 34164
|
|
13
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7
14
|
|
|
8
15
|
__webpack_require__.r(__webpack_exports__);
|
|
9
16
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -12,14 +19,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
12
19
|
/* harmony export */ });
|
|
13
20
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
|
|
14
21
|
|
|
15
|
-
/***/ }
|
|
16
|
-
|
|
17
|
-
/***/ 94178:
|
|
18
|
-
/***/ ((module) => {
|
|
19
|
-
|
|
20
|
-
module.exports = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
|
-
/***/ })
|
|
22
|
+
/***/ }
|
|
23
23
|
|
|
24
24
|
/******/ });
|
|
25
25
|
/************************************************************************/
|
|
@@ -97,33 +97,25 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
97
97
|
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(34164);
|
|
98
98
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94178);
|
|
99
99
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__);
|
|
100
|
-
const _excluded = ["href", "children", "className", "newTab"];
|
|
101
|
-
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; }
|
|
102
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).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; }
|
|
103
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
104
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
105
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
106
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
107
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
108
100
|
|
|
109
101
|
|
|
110
102
|
function Link(_ref) {
|
|
111
103
|
let {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
104
|
+
href,
|
|
105
|
+
children,
|
|
106
|
+
className,
|
|
107
|
+
newTab,
|
|
108
|
+
...props
|
|
109
|
+
} = _ref;
|
|
118
110
|
const isExternal = href.startsWith("http");
|
|
119
|
-
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a",
|
|
111
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("a", {
|
|
120
112
|
href: href,
|
|
121
113
|
target: newTab || isExternal ? "_blank" : undefined,
|
|
122
114
|
rel: newTab || isExternal ? "noopener noreferrer" : undefined,
|
|
123
|
-
className: (0,clsx__WEBPACK_IMPORTED_MODULE_0__["default"])("text-[--color-text-strong] hover:underline", className)
|
|
124
|
-
|
|
115
|
+
className: (0,clsx__WEBPACK_IMPORTED_MODULE_0__["default"])("text-[--color-text-strong] hover:underline", className),
|
|
116
|
+
...props,
|
|
125
117
|
children: children
|
|
126
|
-
})
|
|
118
|
+
});
|
|
127
119
|
}
|
|
128
120
|
module.exports = __webpack_exports__;
|
|
129
121
|
/******/ })()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Link/index.js","mappings":"
|
|
1
|
+
{"version":3,"file":"components/Link/index.js","mappings":";;;;;;;AAAA,8C;;;;;;;;;;;;ACAA,cAAc,aAAa,+CAA+C,gDAAgD,eAAe,QAAQ,IAAI,0CAA0C,yCAAyC,SAAgB,gBAAgB,wCAAwC,IAAI,mDAAmD,SAAS,iEAAe,IAAI,E;;;;;;UCAnY;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA,E;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA,E;;;;;WCPA,wF;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D,E;;;;;;;;;;;;ACNwB;AAAA;AAET,SAASG,IAAIA,CAAAC,IAAA,EAAkD;EAAA,IAAjD;IAAEC,IAAI;IAAEC,QAAQ;IAAEC,SAAS;IAAEC,MAAM;IAAE,GAAGC;EAAM,CAAC,GAAAL,IAAA;EAC1E,MAAMM,UAAU,GAAGL,IAAI,CAACM,UAAU,CAAC,MAAM,CAAC;EAE1C,oBACET,sDAAA;IACEG,IAAI,EAAEA,IAAK;IACXO,MAAM,EAAEJ,MAAM,IAAIE,UAAU,GAAG,QAAQ,GAAGG,SAAU;IACpDC,GAAG,EAAEN,MAAM,IAAIE,UAAU,GAAG,qBAAqB,GAAGG,SAAU;IAC9DN,SAAS,EAAEP,gDAAI,CAAC,4CAA4C,EAAEO,SAAS,CAAE;IAAA,GACrEE,KAAK;IAAAH,QAAA,EAERA;EAAQ,CACR,CAAC;AAER,C","sources":["webpack://opus-toolkit-components/external commonjs2 \"react/jsx-runtime\"","webpack://opus-toolkit-components/./node_modules/clsx/dist/clsx.mjs","webpack://opus-toolkit-components/webpack/bootstrap","webpack://opus-toolkit-components/webpack/runtime/compat get default export","webpack://opus-toolkit-components/webpack/runtime/define property getters","webpack://opus-toolkit-components/webpack/runtime/hasOwnProperty shorthand","webpack://opus-toolkit-components/webpack/runtime/make namespace object","webpack://opus-toolkit-components/./src/components/Link/Link.jsx"],"sourcesContent":["module.exports = require(\"react/jsx-runtime\");","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import clsx from \"clsx\";\r\n\r\nexport default function Link({ href, children, className, newTab, ...props }) {\r\n const isExternal = href.startsWith(\"http\");\r\n\r\n return (\r\n <a\r\n href={href}\r\n target={newTab || isExternal ? \"_blank\" : undefined}\r\n rel={newTab || isExternal ? \"noopener noreferrer\" : undefined}\r\n className={clsx(\"text-[--color-text-strong] hover:underline\", className)}\r\n {...props}\r\n >\r\n {children}\r\n </a>\r\n );\r\n}\r\n"],"names":["clsx","jsx","_jsx","Link","_ref","href","children","className","newTab","props","isExternal","startsWith","target","undefined","rel"],"sourceRoot":""}
|