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.
Files changed (42) hide show
  1. package/lib/components/Accordions/index.d.ts +1 -0
  2. package/lib/components/BarLayout/index.js +125 -0
  3. package/lib/components/BarLayout/index.js.map +1 -0
  4. package/lib/components/Callout/index.js +1092 -0
  5. package/lib/components/Callout/index.js.map +1 -0
  6. package/lib/components/Cookie/index.js +4601 -0
  7. package/lib/components/Cookie/index.js.map +1 -0
  8. package/lib/components/Footer/index.js +705 -0
  9. package/lib/components/Footer/index.js.map +1 -0
  10. package/lib/components/FooterLogo/index.js +608 -0
  11. package/lib/components/FooterLogo/index.js.map +1 -0
  12. package/lib/components/Forms/Checkbox/index.js +347 -0
  13. package/lib/components/Forms/Checkbox/index.js.map +1 -0
  14. package/lib/components/Forms/FilterPopover/index.js +658 -0
  15. package/lib/components/Forms/FilterPopover/index.js.map +1 -0
  16. package/lib/components/Forms/ToggleSwitch/index.js +336 -0
  17. package/lib/components/Forms/ToggleSwitch/index.js.map +1 -0
  18. package/lib/components/Header/index.js +312 -0
  19. package/lib/components/Header/index.js.map +1 -0
  20. package/lib/components/Icon/Icon.d.ts +25 -0
  21. package/lib/components/Icon/index.d.ts +17 -14
  22. package/lib/components/Icon/index.js +359 -0
  23. package/lib/components/Icon/index.js.map +1 -0
  24. package/lib/components/IconButton/index.js +461 -0
  25. package/lib/components/IconButton/index.js.map +1 -0
  26. package/lib/components/Link/index.js +4 -4
  27. package/lib/components/Loader/index.js +297 -0
  28. package/lib/components/Loader/index.js.map +1 -0
  29. package/lib/components/Navbar/index.js +615 -0
  30. package/lib/components/Navbar/index.js.map +1 -0
  31. package/lib/components/PageTemplate/index.js +2153 -0
  32. package/lib/components/PageTemplate/index.js.map +1 -0
  33. package/lib/components/Profile/ProfileCard/index.js +339 -0
  34. package/lib/components/Profile/ProfileCard/index.js.map +1 -0
  35. package/lib/components/Sidebar/index.js +1743 -0
  36. package/lib/components/Sidebar/index.js.map +1 -0
  37. package/lib/components/Text/index.js +214 -0
  38. package/lib/components/Text/index.js.map +1 -0
  39. package/lib/index.d.ts +1 -1
  40. package/lib/main.js +1583 -39258
  41. package/lib/main.js.map +1 -1
  42. package/package.json +6 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components/Profile/ProfileCard/index.js","mappings":";;;;;;;;;;;;;;AAAwB;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;;;;;;;;;;;;;;;;AChB0B;AACwB;AAAA;AAElD,MAAMW,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,IAAI;EACRC,EAAE,EAAE,IAAI;EACRC,EA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BACEJ,sDAAA,CAAC2B,kDAAI;QAACC,OAAO,EAAC,MAAM;QAACC,EAAE,EAAC,GAAG;QAAAzB,QAAA,EACxBuC,IAAI,CAACZ;MAAI,CACN,CAAC,eACP/B,sDAAA,CAAC2B,kDAAI;QAACC,OAAO,EAAC,SAAS;QAACC,EAAE,EAAC,GAAG;QAAAzB,QAAA,EAC3BuC,IAAI,CAACE;MAAI,CACN,CAAC;IAAA,CACJ,CAAC,eAEN7C,sDAAA,CAACuC,yEAAkB;MAAClC,SAAS,EAAC;IAA4B,CAAE,CAAC;EAAA,CACtD,CAAC;AAEd,C","sources":["webpack://opus-toolkit-components/./src/components/Link/Link.jsx","webpack://opus-toolkit-components/./src/components/Text/Text.jsx","webpack://opus-toolkit-components/./src/utils/getDataCy.js","webpack://opus-toolkit-components/external commonjs \"@heroicons/react/24/solid\"","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/./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/Profile/ProfileCard/ProfileCard.jsx"],"sourcesContent":["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","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(\"@heroicons/react/24/solid\");","module.exports = require(\"react/jsx-runtime\");","module.exports = require(\"react\");","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 Link from \"../../Link/Link\";\nimport Text from \"../../Text/Text\";\nimport { IdentificationIcon } from \"@heroicons/react/24/solid\";\n\n/**\n * Shape of the user object\n * @typedef {Object} ProfileCardUser\n * @property {string} name\n * @property {string} role\n */\n\n/**\n * Props for ProfileCard.\n *\n * @typedef {Object} ProfileCardProps\n *\n * @property {ProfileCardUser} user\n * The user object containing name + role.\n *\n * @property {string} [href]\n * If provided, the card becomes a link instead of a div.\n */\n\n/**\n * ProfileCard with polymorphic wrapper (Link or div).\n *\n * @param {ProfileCardProps & React.HTMLAttributes<HTMLDivElement>} props\n */\n\nexport default function ProfileCard({ user, href, className = \"\", ...rest }) {\n const Wrapper = href ? Link : \"div\";\n\n return (\n <Wrapper\n href={href}\n className={`flex items-center rounded-lg border-2 border-[--color-stroke] px-4 py-2 transition-all ${href ? \"cursor-pointer hover:border-[--color-primary] hover:bg-[--color-primary-bg-hover]\" : \"\"} ${className}`}\n data-cy=\"profileCard\"\n {...rest}\n >\n <div>\n <Text variant=\"body\" as=\"p\">\n {user.name}\n </Text>\n <Text variant=\"caption\" as=\"p\">\n {user.role}\n </Text>\n </div>\n\n <IdentificationIcon className=\"ml-4 h-6 w-6 text-gray-500\" />\n </Wrapper>\n );\n}\n"],"names":["clsx","jsx","_jsx","Link","_ref","href","children","className","newTab","props","isExternal","startsWith","target","undefined","rel","React","getDataCy","variantMap","h1","h2","h3","h4","h5","h6","body","small","caption","label","elementMap","Text","variant","as","color","name","dataCy","rest","Component","variantClass","value","arguments","length","IdentificationIcon","jsxs","_jsxs","ProfileCard","user","Wrapper","role"],"sourceRoot":""}