opus-toolkit-components 1.9.8 → 2.0.0
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/Accordions/index.d.ts +1 -0
- package/lib/components/BarLayout/index.js +125 -0
- package/lib/components/BarLayout/index.js.map +1 -0
- package/lib/components/Callout/index.js +1092 -0
- package/lib/components/Callout/index.js.map +1 -0
- package/lib/components/Cookie/index.js +4601 -0
- package/lib/components/Cookie/index.js.map +1 -0
- package/lib/components/Footer/index.js +705 -0
- package/lib/components/Footer/index.js.map +1 -0
- package/lib/components/FooterLogo/index.js +608 -0
- package/lib/components/FooterLogo/index.js.map +1 -0
- package/lib/components/Forms/Checkbox/index.js +347 -0
- package/lib/components/Forms/Checkbox/index.js.map +1 -0
- package/lib/components/Forms/FilterPopover/index.js +658 -0
- package/lib/components/Forms/FilterPopover/index.js.map +1 -0
- package/lib/components/Forms/ToggleSwitch/index.js +336 -0
- package/lib/components/Forms/ToggleSwitch/index.js.map +1 -0
- package/lib/components/Header/index.js +312 -0
- package/lib/components/Header/index.js.map +1 -0
- package/lib/components/Icon/Icon.d.ts +25 -0
- package/lib/components/Icon/index.d.ts +17 -14
- package/lib/components/Icon/index.js +359 -0
- package/lib/components/Icon/index.js.map +1 -0
- package/lib/components/IconButton/index.js +461 -0
- package/lib/components/IconButton/index.js.map +1 -0
- package/lib/components/Link/index.js +4 -4
- package/lib/components/Loader/index.js +297 -0
- package/lib/components/Loader/index.js.map +1 -0
- package/lib/components/Navbar/index.js +615 -0
- package/lib/components/Navbar/index.js.map +1 -0
- package/lib/components/PageTemplate/index.js +2153 -0
- package/lib/components/PageTemplate/index.js.map +1 -0
- package/lib/components/Profile/ProfileCard/index.js +339 -0
- package/lib/components/Profile/ProfileCard/index.js.map +1 -0
- package/lib/components/Sidebar/index.js +1743 -0
- package/lib/components/Sidebar/index.js.map +1 -0
- package/lib/components/Text/index.js +214 -0
- package/lib/components/Text/index.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/main.js +1583 -39258
- package/lib/main.js.map +1 -1
- package/package.json +6 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/FooterLogo/index.js","mappings":";;;;;;;;;;;;;;;AAAA;AACgH;AACjB;AAC/F,8BAA8B,mFAA2B,CAAC,4FAAqC;AAC/F;AACA,6DAA6D,qBAAqB,kBAAkB,aAAa,qDAAqD,aAAa,oDAAoD,qBAAqB,OAAO,kNAAkN,4BAA4B,KAAK,2BAA2B,oBAAoB,KAAK,mEAAmE,oBAAoB,KAAK,kEAAkE,4BAA4B,KAAK,uBAAuB;AAChwB;AACA,iEAAe,uBAAuB,EAAC;;;;;;;;ACP1B;;AAEb;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,qDAAqD;AACrD;AACA;AACA,gDAAgD;AAChD;AACA;AACA,qFAAqF;AACrF;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,qBAAqB;AACrB;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,iBAAiB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,qBAAqB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sFAAsF,qBAAqB;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,iDAAiD,qBAAqB;AACtE;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV,sDAAsD,qBAAqB;AAC3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;ACpFa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,cAAc;AACrE;AACA;AACA;AACA;AACA,E;;;;;;;;;;;;;;;;;;;;;;;;;ACdA,MAAqG;AACrG,MAA2F;AAC3F,MAAkG;AAClG,MAAqH;AACrH,MAA8G;AAC9G,MAA8G;AAC9G,MAA0L;AAC1L;AACA;;AAEA;;AAEA,4BAA4B,qGAAmB;AAC/C,wBAAwB,kHAAa;AACrC,iBAAiB,uGAAa;AAC9B,iBAAiB,+FAAM;AACvB,6BAA6B,sGAAkB;;AAE/C,aAAa,0GAAG,CAAC,0JAAO;;;;AAIoI;AAC5J,OAAO,iEAAe,0JAAO,IAAI,0JAAO,UAAU,0JAAO,mBAAmB,EAAC;;;;;;;;ACxBhE;;AAEb;AACA;AACA;AACA,kBAAkB,wBAAwB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,iBAAiB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,4BAA4B;AAChD;AACA;AACA;AACA;AACA;AACA,qBAAqB,6BAA6B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,E;;;;;;;ACnFa;;AAEb;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kC;;;;;;;ACjCa;;AAEb;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oC;;;;;;;ACTa;;AAEb;AACA;AACA,cAAc,KAAwC,GAAG,sBAAiB,GAAG,CAAI;AACjF;AACA;AACA;AACA;AACA,gD;;;;;;;ACTa;;AAEb;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,0CAA0C;AAC1C;AACA;AACA;AACA,iFAAiF;AACjF;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,yDAAyD;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,kCAAkC;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,wB;;;;;;;AC5Da;;AAEb;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA,mC;;;;;;;ACbA,gF;;;;;;;ACAA,iF;;;;;;;ACAA,8C;;;;;;;ACAA,kC;;;;;;UCAA;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;;;;;WCNA,mC;;;;;;;;;;;;;;;;;;ACA0B;AACmD;AACF;AAC/C;;AAE5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AAJA;AAKe,SAASS,UAAUA,CAAAC,IAAA,EAA0C;EAAA,IAAzC;IAAEC,IAAI,GAAG,GAAG;IAAEC,SAAS,GAAG,EAAE;IAAE,GAAGC;EAAK,CAAC,GAAAH,IAAA;EACxE,MAAMI,OAAO,gBACXN,uDAAA,CAAAF,uDAAA;IAAAS,QAAA,gBACEX,sDAAA;MACEY,GAAG,EAAEf,6FAAU;MACfgB,GAAG,EAAC,WAAW;MACfL,SAAS,EAAC;IAA+B,CAC1C,CAAC,eACFR,sDAAA;MACEY,GAAG,EAAEd,4FAAS;MACde,GAAG,EAAC,WAAW;MACfL,SAAS,EAAC;IAA8B,CACzC,CAAC;EAAA,CACF,CACH;EAED,oBACER,sDAAA;IACEQ,SAAS,EAAE,wCAAwCA,SAAS,EAAG;IAAA,GAC3DC,IAAI;IAAAE,QAAA,EAEPJ,IAAI,gBACHP,sDAAA;MACEO,IAAI,EAAEA,IAAK;MACXC,SAAS,EAAC,0BAA0B;MACpC,cAAW,WAAW;MAAAG,QAAA,EAErBD;IAAO,CACP,CAAC,GAEJA;EACD,CACE,CAAC;AAEV,C","sources":["webpack://opus-toolkit-components/./src/components/FooterLogo/footer-logo.scss","webpack://opus-toolkit-components/./node_modules/css-loader/dist/runtime/api.js","webpack://opus-toolkit-components/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://opus-toolkit-components/./src/components/FooterLogo/footer-logo.scss?98ba","webpack://opus-toolkit-components/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://opus-toolkit-components/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://opus-toolkit-components/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://opus-toolkit-components/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://opus-toolkit-components/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://opus-toolkit-components/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://opus-toolkit-components/external commonjs \"opus-toolkit-styles/assets/logos/opus-dark-logo.svg\"","webpack://opus-toolkit-components/external commonjs \"opus-toolkit-styles/assets/logos/opus-light-logo.svg\"","webpack://opus-toolkit-components/external commonjs2 \"react/jsx-runtime\"","webpack://opus-toolkit-components/external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","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/webpack/runtime/nonce","webpack://opus-toolkit-components/./src/components/FooterLogo/FooterLogo.jsx"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.footer-logo-light{display:inline-block}.footer-logo-dark{display:none}:where(html,div)[data-theme=dark] .footer-logo-light{display:none}:where(html,div)[data-theme=dark] .footer-logo-dark{display:inline-block}`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/FooterLogo/footer-logo.scss\"],\"names\":[],\"mappings\":\"AAAA,mBACE,oBAAA,CAGF,kBACE,YAAA,CAGF,qDACE,YAAA,CAGF,oDACE,oBAAA\",\"sourcesContent\":[\".footer-logo-light {\\r\\n display: inline-block;\\r\\n}\\r\\n\\r\\n.footer-logo-dark {\\r\\n display: none;\\r\\n}\\r\\n\\r\\n:where(html, div)[data-theme=\\\"dark\\\"] .footer-logo-light {\\r\\n display: none;\\r\\n}\\r\\n\\r\\n:where(html, div)[data-theme=\\\"dark\\\"] .footer-logo-dark {\\r\\n display: inline-block;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./footer-logo.scss\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js!../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./footer-logo.scss\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","module.exports = require(\"opus-toolkit-styles/assets/logos/opus-dark-logo.svg\");","module.exports = require(\"opus-toolkit-styles/assets/logos/opus-light-logo.svg\");","module.exports = require(\"react/jsx-runtime\");","module.exports = require(\"react\");","// 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\tid: moduleId,\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};","__webpack_require__.nc = undefined;","import React from \"react\";\r\nimport lightLogo from \"opus-toolkit-styles/assets/logos/opus-light-logo.svg\";\r\nimport darkLogo from \"opus-toolkit-styles/assets/logos/opus-dark-logo.svg\";\r\nimport \"./footer-logo.scss\";\r\n\r\n/**\r\n * Props for the FooterLogo component.\r\n *\r\n * @typedef {Object} FooterLogoProps\r\n *\r\n * @property {string} [href]\r\n * Optional link target for the logo.\r\n *\r\n * @property {string} [className]\r\n * Optional wrapper class names.\r\n */\r\n\r\n/**\r\n * Theme-aware company logo for footer usage.\r\n *\r\n * @param {FooterLogoProps & React.HTMLAttributes<HTMLDivElement>} props\r\n */\r\nexport default function FooterLogo({ href = \"/\", className = \"\", ...rest }) {\r\n const content = (\r\n <>\r\n <img\r\n src={lightLogo}\r\n alt=\"Opus logo\"\r\n className=\"footer-logo-light h-10 w-auto\"\r\n />\r\n <img\r\n src={darkLogo}\r\n alt=\"Opus logo\"\r\n className=\"footer-logo-dark h-10 w-auto\"\r\n />\r\n </>\r\n );\r\n\r\n return (\r\n <div\r\n className={`footer-logo inline-flex items-center ${className}`}\r\n {...rest}\r\n >\r\n {href ? (\r\n <a\r\n href={href}\r\n className=\"inline-flex items-center\"\r\n aria-label=\"Opus home\"\r\n >\r\n {content}\r\n </a>\r\n ) : (\r\n content\r\n )}\r\n </div>\r\n );\r\n}\r\n"],"names":["React","lightLogo","darkLogo","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FooterLogo","_ref","href","className","rest","content","children","src","alt"],"sourceRoot":""}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ 1111
|
|
6
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
|
|
8
|
+
__webpack_require__.r(__webpack_exports__);
|
|
9
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10
|
+
/* harmony export */ "default": () => (/* binding */ Text)
|
|
11
|
+
/* harmony export */ });
|
|
12
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9206);
|
|
13
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
14
|
+
/* harmony import */ var _utils_getDataCy__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7339);
|
|
15
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4178);
|
|
16
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
const variantMap = {
|
|
21
|
+
h1: "text-4xl font-bold leading-tight",
|
|
22
|
+
h2: "text-3xl leading-snug",
|
|
23
|
+
h3: "text-2xl font-semibold leading-snug",
|
|
24
|
+
h4: "text-xl font-medium",
|
|
25
|
+
h5: "text-lg font-medium",
|
|
26
|
+
h6: "text-base font-medium",
|
|
27
|
+
body: "text-base",
|
|
28
|
+
small: "text-sm",
|
|
29
|
+
caption: "text-xs",
|
|
30
|
+
label: "text-md"
|
|
31
|
+
};
|
|
32
|
+
const elementMap = {
|
|
33
|
+
h1: "h1",
|
|
34
|
+
h2: "h2",
|
|
35
|
+
h3: "h3",
|
|
36
|
+
h4: "h4",
|
|
37
|
+
h5: "h5",
|
|
38
|
+
h6: "h6",
|
|
39
|
+
body: "p",
|
|
40
|
+
small: "small",
|
|
41
|
+
caption: "span",
|
|
42
|
+
label: "label"
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Allowed typographical variants for the Text component.
|
|
47
|
+
* @typedef {'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'body'|'small'|'caption'|'label'} TextVariant
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Polymorphic HTML element types supported in `as`.
|
|
52
|
+
* @typedef {keyof JSX.IntrinsicElements | React.ComponentType<any>} TextAs
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Props for the Text component.
|
|
57
|
+
*
|
|
58
|
+
* @typedef {Object} TextProps
|
|
59
|
+
*
|
|
60
|
+
* @property {TextVariant} [variant='body']
|
|
61
|
+
* Controls the typography style.
|
|
62
|
+
*
|
|
63
|
+
* @property {TextAs} [as]
|
|
64
|
+
* Optional override for the underlying HTML element.
|
|
65
|
+
*
|
|
66
|
+
* @property {string} [className]
|
|
67
|
+
* Extra CSS classes.
|
|
68
|
+
*
|
|
69
|
+
* @property {string} [color='text-[--color-text-strong]']
|
|
70
|
+
* Tailwind/text color classes.
|
|
71
|
+
*
|
|
72
|
+
* @property {React.ReactNode} [children]
|
|
73
|
+
* Text content.
|
|
74
|
+
*
|
|
75
|
+
* @property {string} [name]
|
|
76
|
+
* Name used to generate `data-cy`.
|
|
77
|
+
*
|
|
78
|
+
* @property {string} [dataCy]
|
|
79
|
+
* Optional override for auto-generated data-cy attribute.
|
|
80
|
+
*/
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Text component with typography variants and polymorphic rendering.
|
|
84
|
+
*
|
|
85
|
+
* @param {TextProps & React.HTMLAttributes<HTMLElement>} props
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
function Text(_ref) {
|
|
89
|
+
let {
|
|
90
|
+
variant = "body",
|
|
91
|
+
as,
|
|
92
|
+
className = "",
|
|
93
|
+
color = "text-[--color-text-strong]",
|
|
94
|
+
children,
|
|
95
|
+
name,
|
|
96
|
+
dataCy,
|
|
97
|
+
...rest
|
|
98
|
+
} = _ref;
|
|
99
|
+
const Component = as || elementMap[variant] || "p";
|
|
100
|
+
const variantClass = variantMap[variant] || variantMap.body;
|
|
101
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)(Component, {
|
|
102
|
+
className: `${variantClass} ${color} ${className}`,
|
|
103
|
+
"data-cy": (0,_utils_getDataCy__WEBPACK_IMPORTED_MODULE_1__.getDataCy)({
|
|
104
|
+
name,
|
|
105
|
+
dataCy
|
|
106
|
+
}),
|
|
107
|
+
...rest,
|
|
108
|
+
children: children
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/***/ },
|
|
113
|
+
|
|
114
|
+
/***/ 7339
|
|
115
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
116
|
+
|
|
117
|
+
__webpack_require__.r(__webpack_exports__);
|
|
118
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
119
|
+
/* harmony export */ getDataCy: () => (/* binding */ getDataCy)
|
|
120
|
+
/* harmony export */ });
|
|
121
|
+
const getDataCy = function () {
|
|
122
|
+
let {
|
|
123
|
+
name,
|
|
124
|
+
value,
|
|
125
|
+
dataCy
|
|
126
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
127
|
+
if (dataCy) return dataCy;
|
|
128
|
+
if (name && value) return `${name}-${value}`;
|
|
129
|
+
return name || '';
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/***/ },
|
|
133
|
+
|
|
134
|
+
/***/ 4178
|
|
135
|
+
(module) {
|
|
136
|
+
|
|
137
|
+
module.exports = require("react/jsx-runtime");
|
|
138
|
+
|
|
139
|
+
/***/ },
|
|
140
|
+
|
|
141
|
+
/***/ 9206
|
|
142
|
+
(module) {
|
|
143
|
+
|
|
144
|
+
module.exports = require("react");
|
|
145
|
+
|
|
146
|
+
/***/ }
|
|
147
|
+
|
|
148
|
+
/******/ });
|
|
149
|
+
/************************************************************************/
|
|
150
|
+
/******/ // The module cache
|
|
151
|
+
/******/ var __webpack_module_cache__ = {};
|
|
152
|
+
/******/
|
|
153
|
+
/******/ // The require function
|
|
154
|
+
/******/ function __webpack_require__(moduleId) {
|
|
155
|
+
/******/ // Check if module is in cache
|
|
156
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
157
|
+
/******/ if (cachedModule !== undefined) {
|
|
158
|
+
/******/ return cachedModule.exports;
|
|
159
|
+
/******/ }
|
|
160
|
+
/******/ // Create a new module (and put it into the cache)
|
|
161
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
162
|
+
/******/ // no module.id needed
|
|
163
|
+
/******/ // no module.loaded needed
|
|
164
|
+
/******/ exports: {}
|
|
165
|
+
/******/ };
|
|
166
|
+
/******/
|
|
167
|
+
/******/ // Execute the module function
|
|
168
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
169
|
+
/******/
|
|
170
|
+
/******/ // Return the exports of the module
|
|
171
|
+
/******/ return module.exports;
|
|
172
|
+
/******/ }
|
|
173
|
+
/******/
|
|
174
|
+
/************************************************************************/
|
|
175
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
176
|
+
/******/ (() => {
|
|
177
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
178
|
+
/******/ __webpack_require__.n = (module) => {
|
|
179
|
+
/******/ var getter = module && module.__esModule ?
|
|
180
|
+
/******/ () => (module['default']) :
|
|
181
|
+
/******/ () => (module);
|
|
182
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
183
|
+
/******/ return getter;
|
|
184
|
+
/******/ };
|
|
185
|
+
/******/ })();
|
|
186
|
+
/******/
|
|
187
|
+
/******/ /* webpack/runtime/define property getters */
|
|
188
|
+
/******/ (() => {
|
|
189
|
+
/******/ // define getter functions for harmony exports
|
|
190
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
191
|
+
/******/ for(var key in definition) {
|
|
192
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
193
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
194
|
+
/******/ }
|
|
195
|
+
/******/ }
|
|
196
|
+
/******/ };
|
|
197
|
+
/******/ })();
|
|
198
|
+
/******/
|
|
199
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
200
|
+
/******/ (() => {
|
|
201
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
202
|
+
/******/ })();
|
|
203
|
+
/******/
|
|
204
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
205
|
+
/******/ (() => {
|
|
206
|
+
/******/ // define __esModule on exports
|
|
207
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
208
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
209
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
210
|
+
/******/ }
|
|
211
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
212
|
+
/******/ };
|
|
213
|
+
/******/ })();
|
|
214
|
+
/******/
|
|
215
|
+
/************************************************************************/
|
|
216
|
+
var __webpack_exports__ = {};
|
|
217
|
+
__webpack_require__.r(__webpack_exports__);
|
|
218
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
219
|
+
/* harmony export */ "default": () => (/* binding */ Checkbox)
|
|
220
|
+
/* harmony export */ });
|
|
221
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9206);
|
|
222
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
223
|
+
/* harmony import */ var _Text_Text__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1111);
|
|
224
|
+
/* harmony import */ var _utils_getDataCy__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7339);
|
|
225
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4178);
|
|
226
|
+
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Custom change event format used across your form components.
|
|
233
|
+
* Matches your Input / Dropdown / DatePicker pattern.
|
|
234
|
+
*
|
|
235
|
+
* @typedef {{ target: { name: string, value: boolean } }} CheckboxChangeEvent
|
|
236
|
+
*/
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Props for Checkbox.
|
|
240
|
+
*
|
|
241
|
+
* @typedef {Object} CheckboxProps
|
|
242
|
+
*
|
|
243
|
+
* @property {string} [label]
|
|
244
|
+
* Label displayed next to the checkbox.
|
|
245
|
+
*
|
|
246
|
+
* @property {boolean} [hideLabel]
|
|
247
|
+
* Hides the visible label while keeping it available to assistive technology.
|
|
248
|
+
*
|
|
249
|
+
* @property {string} name
|
|
250
|
+
* Name used in the emitted onChange event.
|
|
251
|
+
*
|
|
252
|
+
* @property {(event: CheckboxChangeEvent) => void} [onChange]
|
|
253
|
+
* Receives `{ target: { name, value } }`.
|
|
254
|
+
*
|
|
255
|
+
* @property {boolean} [value]
|
|
256
|
+
* Whether the checkbox is checked.
|
|
257
|
+
*
|
|
258
|
+
* @property {boolean} [isValid]
|
|
259
|
+
* Controls error styling.
|
|
260
|
+
*
|
|
261
|
+
* @property {string} [errorMessage]
|
|
262
|
+
* Error text shown below the checkbox.
|
|
263
|
+
*
|
|
264
|
+
* @property {boolean} [disabled]
|
|
265
|
+
* Prevents user interaction.
|
|
266
|
+
*
|
|
267
|
+
* @property {string} [title]
|
|
268
|
+
*
|
|
269
|
+
* @property {string} [dataCy]
|
|
270
|
+
* Override test selector.
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @param {CheckboxProps & React.HTMLAttributes<HTMLDivElement>} props
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
function Checkbox(_ref) {
|
|
278
|
+
let {
|
|
279
|
+
label,
|
|
280
|
+
hideLabel = false,
|
|
281
|
+
name,
|
|
282
|
+
onChange,
|
|
283
|
+
value = false,
|
|
284
|
+
isValid = true,
|
|
285
|
+
errorMessage = "",
|
|
286
|
+
disabled = false,
|
|
287
|
+
title,
|
|
288
|
+
dataCy,
|
|
289
|
+
className = "",
|
|
290
|
+
...rest
|
|
291
|
+
} = _ref;
|
|
292
|
+
const id = `checkbox-${name}`;
|
|
293
|
+
const errorId = `${id}-error`;
|
|
294
|
+
const showError = !isValid && errorMessage;
|
|
295
|
+
const hasLabel = Boolean(label);
|
|
296
|
+
const handleChange = event => {
|
|
297
|
+
onChange?.({
|
|
298
|
+
target: {
|
|
299
|
+
name,
|
|
300
|
+
value: event.target.checked
|
|
301
|
+
}
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
|
|
305
|
+
className: `mb-4 flex flex-col ${className}`,
|
|
306
|
+
...rest,
|
|
307
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
|
|
308
|
+
className: "flex items-center",
|
|
309
|
+
children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)("input", {
|
|
310
|
+
id: id,
|
|
311
|
+
type: "checkbox",
|
|
312
|
+
name: name,
|
|
313
|
+
checked: value,
|
|
314
|
+
onChange: handleChange,
|
|
315
|
+
disabled: disabled,
|
|
316
|
+
title: title,
|
|
317
|
+
"data-cy": (0,_utils_getDataCy__WEBPACK_IMPORTED_MODULE_2__.getDataCy)({
|
|
318
|
+
name,
|
|
319
|
+
dataCy
|
|
320
|
+
}),
|
|
321
|
+
"aria-invalid": !isValid,
|
|
322
|
+
"aria-describedby": showError ? errorId : undefined,
|
|
323
|
+
"aria-disabled": disabled,
|
|
324
|
+
style: {
|
|
325
|
+
accentColor: "var(--color-primary-btn)"
|
|
326
|
+
},
|
|
327
|
+
className: `mr-2 rounded-sm ${disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`
|
|
328
|
+
}), hasLabel && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Text_Text__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
329
|
+
variant: "label",
|
|
330
|
+
as: "label",
|
|
331
|
+
htmlFor: id,
|
|
332
|
+
className: hideLabel ? "sr-only" : undefined,
|
|
333
|
+
children: label
|
|
334
|
+
})]
|
|
335
|
+
}), !isValid && errorMessage && /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx)(_Text_Text__WEBPACK_IMPORTED_MODULE_1__["default"], {
|
|
336
|
+
id: errorId,
|
|
337
|
+
variant: "small",
|
|
338
|
+
as: "span",
|
|
339
|
+
className: "mt-1 text-[--color-util-red]",
|
|
340
|
+
children: errorMessage
|
|
341
|
+
})]
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
module.exports = __webpack_exports__;
|
|
345
|
+
/******/ })()
|
|
346
|
+
;
|
|
347
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/Forms/Checkbox/index.js","mappings":";;;;;;;;;;;;;;;;AAA0B;AACwB;AAAA;AAElD,MAAMI,UAAU,GAAG;EACjBC,EAAE,EAAE,kCAAkC;EACtCC,EAAE,EAAE,uBAAuB;EAC3BC,EAAE,EAAE,qCAAqC;EACzCC,EAAE,EAAE,qBAAqB;EACzBC,EAAE,EAAE,qBAAqB;EACzBC,EAAE,EAAE,uBAAuB;EAC3BC,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,SAAS;EAChBC,OAAO,EAAE,SAAS;EAClBC,KAAK,EAAE;AACT,CAAC;AAED,MAAMC,UAAU,GAAG;EACjBV,EAAE,EAAE,IAAI;EACRC,EAAE,EAAE,IA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C,8BAA8B;MAAAE,QAAA,EAEvCgB;IAAY,CACT,CACP;EAAA,CACE,CAAC;AAEV,C","sources":["webpack://opus-toolkit-components/./src/components/Text/Text.jsx","webpack://opus-toolkit-components/./src/utils/getDataCy.js","webpack://opus-toolkit-components/external commonjs2 \"react/jsx-runtime\"","webpack://opus-toolkit-components/external commonjs2 {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","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/Forms/Checkbox/Checkbox.jsx"],"sourcesContent":["import React from \"react\";\r\nimport { getDataCy } from \"../../utils/getDataCy\";\r\n\r\nconst variantMap = {\r\n h1: \"text-4xl font-bold leading-tight\",\r\n h2: \"text-3xl leading-snug\",\r\n h3: \"text-2xl font-semibold leading-snug\",\r\n h4: \"text-xl font-medium\",\r\n h5: \"text-lg font-medium\",\r\n h6: \"text-base font-medium\",\r\n body: \"text-base\",\r\n small: \"text-sm\",\r\n caption: \"text-xs\",\r\n label: \"text-md\",\r\n};\r\n\r\nconst elementMap = {\r\n h1: \"h1\",\r\n h2: \"h2\",\r\n h3: \"h3\",\r\n h4: \"h4\",\r\n h5: \"h5\",\r\n h6: \"h6\",\r\n body: \"p\",\r\n small: \"small\",\r\n caption: \"span\",\r\n label: \"label\",\r\n};\r\n\r\n/**\r\n * Allowed typographical variants for the Text component.\r\n * @typedef {'h1'|'h2'|'h3'|'h4'|'h5'|'h6'|'body'|'small'|'caption'|'label'} TextVariant\r\n */\r\n\r\n/**\r\n * Polymorphic HTML element types supported in `as`.\r\n * @typedef {keyof JSX.IntrinsicElements | React.ComponentType<any>} TextAs\r\n */\r\n\r\n/**\r\n * Props for the Text component.\r\n *\r\n * @typedef {Object} TextProps\r\n *\r\n * @property {TextVariant} [variant='body']\r\n * Controls the typography style.\r\n *\r\n * @property {TextAs} [as]\r\n * Optional override for the underlying HTML element.\r\n *\r\n * @property {string} [className]\r\n * Extra CSS classes.\r\n *\r\n * @property {string} [color='text-[--color-text-strong]']\r\n * Tailwind/text color classes.\r\n *\r\n * @property {React.ReactNode} [children]\r\n * Text content.\r\n *\r\n * @property {string} [name]\r\n * Name used to generate `data-cy`.\r\n *\r\n * @property {string} [dataCy]\r\n * Optional override for auto-generated data-cy attribute.\r\n */\r\n\r\n/**\r\n * Text component with typography variants and polymorphic rendering.\r\n *\r\n * @param {TextProps & React.HTMLAttributes<HTMLElement>} props\r\n */\r\n\r\nexport default function Text({\r\n variant = \"body\",\r\n as,\r\n className = \"\",\r\n color = \"text-[--color-text-strong]\",\r\n children,\r\n name,\r\n dataCy,\r\n ...rest\r\n}) {\r\n const Component = as || elementMap[variant] || \"p\";\r\n const variantClass = variantMap[variant] || variantMap.body;\r\n\r\n return (\r\n <Component\r\n className={`${variantClass} ${color} ${className}`}\r\n data-cy={getDataCy({ name, dataCy })}\r\n {...rest}\r\n >\r\n {children}\r\n </Component>\r\n );\r\n}\r\n","export const getDataCy = ({ name, value, dataCy } = {}) => {\r\n if (dataCy) return dataCy;\r\n if (name && value) return `${name}-${value}`;\r\n return name || '';\r\n };","module.exports = require(\"react/jsx-runtime\");","module.exports = require(\"react\");","// 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 React from \"react\";\nimport Text from \"../../Text/Text\";\nimport { getDataCy } from \"../../../utils/getDataCy\";\n\n/**\n * Custom change event format used across your form components.\n * Matches your Input / Dropdown / DatePicker pattern.\n *\n * @typedef {{ target: { name: string, value: boolean } }} CheckboxChangeEvent\n */\n\n/**\n * Props for Checkbox.\n *\n * @typedef {Object} CheckboxProps\n *\n * @property {string} [label]\n * Label displayed next to the checkbox.\n *\n * @property {boolean} [hideLabel]\n * Hides the visible label while keeping it available to assistive technology.\n *\n * @property {string} name\n * Name used in the emitted onChange event.\n *\n * @property {(event: CheckboxChangeEvent) => void} [onChange]\n * Receives `{ target: { name, value } }`.\n *\n * @property {boolean} [value]\n * Whether the checkbox is checked.\n *\n * @property {boolean} [isValid]\n * Controls error styling.\n *\n * @property {string} [errorMessage]\n * Error text shown below the checkbox.\n *\n * @property {boolean} [disabled]\n * Prevents user interaction.\n *\n * @property {string} [title]\n *\n * @property {string} [dataCy]\n * Override test selector.\n */\n\n/**\n * @param {CheckboxProps & React.HTMLAttributes<HTMLDivElement>} props\n */\n\nexport default function Checkbox({\n label,\n hideLabel = false,\n name,\n onChange,\n value = false,\n isValid = true,\n errorMessage = \"\",\n disabled = false,\n title,\n dataCy,\n className = \"\",\n ...rest\n}) {\n const id = `checkbox-${name}`;\n const errorId = `${id}-error`;\n const showError = !isValid && errorMessage;\n const hasLabel = Boolean(label);\n\n const handleChange = (event) => {\n onChange?.({\n target: {\n name,\n value: event.target.checked,\n },\n });\n };\n\n return (\n <div className={`mb-4 flex flex-col ${className}`} {...rest}>\n <div className=\"flex items-center\">\n <input\n id={id}\n type=\"checkbox\"\n name={name}\n checked={value}\n onChange={handleChange}\n disabled={disabled}\n title={title}\n data-cy={getDataCy({ name, dataCy })}\n aria-invalid={!isValid}\n aria-describedby={showError ? errorId : undefined}\n aria-disabled={disabled}\n style={{ accentColor: \"var(--color-primary-btn)\" }}\n className={`mr-2 rounded-sm ${disabled ? \"cursor-not-allowed opacity-50\" : \"cursor-pointer\"}`}\n />\n {hasLabel && (\n <Text\n variant=\"label\"\n as=\"label\"\n htmlFor={id}\n className={hideLabel ? \"sr-only\" : undefined}\n >\n {label}\n </Text>\n )}\n </div>\n {!isValid && errorMessage && (\n <Text\n id={errorId}\n variant=\"small\"\n as=\"span\"\n className=\"mt-1 text-[--color-util-red]\"\n >\n {errorMessage}\n </Text>\n )}\n </div>\n );\n}\n"],"names":["React","getDataCy","jsx","_jsx","variantMap","h1","h2","h3","h4","h5","h6","body","small","caption","label","elementMap","Text","_ref","variant","as","className","color","children","name","dataCy","rest","Component","variantClass","value","arguments","length","undefined","jsxs","_jsxs","Checkbox","hideLabel","onChange","isValid","errorMessage","disabled","title","id","errorId","showError","hasLabel","Boolean","handleChange","event","target","checked","type","style","accentColor","htmlFor"],"sourceRoot":""}
|