@cerberus-design/react 0.14.2-next-a928afd → 0.14.2-next-0052cda

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 (188) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +111 -34
  2. package/build/legacy/components/Accordion.cjs +4 -187
  3. package/build/legacy/components/Accordion.cjs.map +1 -1
  4. package/build/legacy/components/Accordion.client.cjs +64 -0
  5. package/build/legacy/components/Accordion.client.cjs.map +1 -0
  6. package/build/legacy/components/AccordionItemGroup.cjs +41 -185
  7. package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
  8. package/build/legacy/components/Admonition.cjs +89 -239
  9. package/build/legacy/components/Admonition.cjs.map +1 -1
  10. package/build/legacy/components/Admonition.client.cjs +219 -0
  11. package/build/legacy/components/Admonition.client.cjs.map +1 -0
  12. package/build/legacy/components/AnimatingUploadIcon.cjs.map +1 -1
  13. package/build/legacy/components/Avatar.cjs +23 -174
  14. package/build/legacy/components/Avatar.cjs.map +1 -1
  15. package/build/legacy/components/Checkbox.cjs +22 -168
  16. package/build/legacy/components/Checkbox.cjs.map +1 -1
  17. package/build/legacy/components/DatePicker.client.cjs +119 -268
  18. package/build/legacy/components/DatePicker.client.cjs.map +1 -1
  19. package/build/legacy/components/DatePicker.server.cjs +17 -271
  20. package/build/legacy/components/DatePicker.server.cjs.map +1 -1
  21. package/build/legacy/components/FileStatus.cjs +62 -212
  22. package/build/legacy/components/FileStatus.cjs.map +1 -1
  23. package/build/legacy/components/FileUploader.cjs +29 -180
  24. package/build/legacy/components/FileUploader.cjs.map +1 -1
  25. package/build/legacy/components/Input.cjs +20 -172
  26. package/build/legacy/components/Input.cjs.map +1 -1
  27. package/build/legacy/components/Notification.cjs +25 -176
  28. package/build/legacy/components/Notification.cjs.map +1 -1
  29. package/build/legacy/components/Select.cjs +26 -178
  30. package/build/legacy/components/Select.cjs.map +1 -1
  31. package/build/legacy/components/Tag.cjs +16 -167
  32. package/build/legacy/components/Tag.cjs.map +1 -1
  33. package/build/legacy/components/Toggle.cjs +20 -172
  34. package/build/legacy/components/Toggle.cjs.map +1 -1
  35. package/build/legacy/config/defineIcons.cjs +3 -39
  36. package/build/legacy/config/defineIcons.cjs.map +1 -1
  37. package/build/legacy/config/{cerbIcons.cjs → index.cjs} +22 -29
  38. package/build/legacy/config/index.cjs.map +1 -0
  39. package/build/legacy/config/types.cjs +19 -0
  40. package/build/legacy/config/types.cjs.map +1 -0
  41. package/build/legacy/context/cerberus.cjs +46 -0
  42. package/build/legacy/context/cerberus.cjs.map +1 -0
  43. package/build/legacy/context/confirm-modal.cjs +58 -207
  44. package/build/legacy/context/confirm-modal.cjs.map +1 -1
  45. package/build/legacy/context/cta-modal.cjs +57 -209
  46. package/build/legacy/context/cta-modal.cjs.map +1 -1
  47. package/build/legacy/context/notification-center.cjs +55 -206
  48. package/build/legacy/context/notification-center.cjs.map +1 -1
  49. package/build/legacy/context/prompt-modal.cjs +83 -233
  50. package/build/legacy/context/prompt-modal.cjs.map +1 -1
  51. package/build/legacy/index.cjs +950 -930
  52. package/build/legacy/index.cjs.map +1 -1
  53. package/build/modern/_tsup-dts-rollup.d.ts +111 -34
  54. package/build/modern/{chunk-BVCXVZAF.js → chunk-25HMVHLT.js} +6 -5
  55. package/build/modern/chunk-25HMVHLT.js.map +1 -0
  56. package/build/modern/chunk-36N4527B.js +1 -0
  57. package/build/modern/chunk-5EWCH7AI.js +82 -0
  58. package/build/modern/chunk-5EWCH7AI.js.map +1 -0
  59. package/build/modern/chunk-5SNLQZYP.js +25 -0
  60. package/build/modern/chunk-5SNLQZYP.js.map +1 -0
  61. package/build/modern/{chunk-6BH5J5GF.js → chunk-CCTLGF5U.js} +18 -17
  62. package/build/modern/chunk-CCTLGF5U.js.map +1 -0
  63. package/build/modern/{chunk-HKJMLWVP.js → chunk-EDARV2EI.js} +5 -4
  64. package/build/modern/chunk-EDARV2EI.js.map +1 -0
  65. package/build/modern/{chunk-FXLLRVAM.js → chunk-EMNBMH7Z.js} +13 -11
  66. package/build/modern/chunk-EMNBMH7Z.js.map +1 -0
  67. package/build/modern/{chunk-PVIMOXSO.js → chunk-GCQMH4QA.js} +5 -4
  68. package/build/modern/chunk-GCQMH4QA.js.map +1 -0
  69. package/build/modern/chunk-GITT5645.js +20 -0
  70. package/build/modern/chunk-GITT5645.js.map +1 -0
  71. package/build/modern/{chunk-TJCFYL5W.js → chunk-IGHMP4WA.js} +1 -20
  72. package/build/modern/chunk-IGHMP4WA.js.map +1 -0
  73. package/build/modern/chunk-ISCJ542I.js +82 -0
  74. package/build/modern/chunk-ISCJ542I.js.map +1 -0
  75. package/build/modern/{chunk-HVKM54BA.js → chunk-IW3LIRDG.js} +1 -1
  76. package/build/modern/chunk-IW3LIRDG.js.map +1 -0
  77. package/build/modern/{chunk-KWJ5FKX7.js → chunk-JQCRDZNI.js} +8 -6
  78. package/build/modern/chunk-JQCRDZNI.js.map +1 -0
  79. package/build/modern/chunk-KDDPAJMR.js +9 -0
  80. package/build/modern/chunk-KDDPAJMR.js.map +1 -0
  81. package/build/modern/{chunk-JJZQGR7A.js → chunk-KF35CYT4.js} +8 -6
  82. package/build/modern/chunk-KF35CYT4.js.map +1 -0
  83. package/build/modern/{chunk-XOROL3JY.js → chunk-KKHL3ZO4.js} +5 -4
  84. package/build/modern/chunk-KKHL3ZO4.js.map +1 -0
  85. package/build/modern/{chunk-U36UZJGZ.js → chunk-MZ3UCDUL.js} +5 -4
  86. package/build/modern/chunk-MZ3UCDUL.js.map +1 -0
  87. package/build/modern/{chunk-T2JOPPGL.js → chunk-N24COMHJ.js} +11 -4
  88. package/build/modern/chunk-N24COMHJ.js.map +1 -0
  89. package/build/modern/{chunk-CVTON5DQ.js → chunk-N3L3PEMF.js} +2 -2
  90. package/build/modern/chunk-NJSETNRL.js +68 -0
  91. package/build/modern/chunk-NJSETNRL.js.map +1 -0
  92. package/build/modern/{chunk-XXWR7UGH.js → chunk-QKZZHZL4.js} +22 -21
  93. package/build/modern/chunk-QKZZHZL4.js.map +1 -0
  94. package/build/modern/{chunk-KPUYKHLW.js → chunk-UMF2TWZN.js} +59 -9
  95. package/build/modern/chunk-UMF2TWZN.js.map +1 -0
  96. package/build/modern/{chunk-QK7R2XJM.js → chunk-XQICKZH4.js} +6 -5
  97. package/build/modern/chunk-XQICKZH4.js.map +1 -0
  98. package/build/modern/chunk-XZGXRRSQ.js +31 -0
  99. package/build/modern/chunk-XZGXRRSQ.js.map +1 -0
  100. package/build/modern/{chunk-5OVH3INN.js → chunk-Z64YZ5IH.js} +18 -18
  101. package/build/modern/chunk-Z64YZ5IH.js.map +1 -0
  102. package/build/modern/components/Accordion.client.js +9 -0
  103. package/build/modern/components/Accordion.client.js.map +1 -0
  104. package/build/modern/components/Accordion.js +1 -7
  105. package/build/modern/components/AccordionItemGroup.js +4 -6
  106. package/build/modern/components/Admonition.client.js +11 -0
  107. package/build/modern/components/Admonition.client.js.map +1 -0
  108. package/build/modern/components/Admonition.js +4 -6
  109. package/build/modern/components/AnimatingUploadIcon.js +1 -1
  110. package/build/modern/components/Avatar.js +3 -5
  111. package/build/modern/components/Checkbox.js +2 -5
  112. package/build/modern/components/DatePicker.client.js +8 -7
  113. package/build/modern/components/DatePicker.server.js +3 -13
  114. package/build/modern/components/FileStatus.js +4 -7
  115. package/build/modern/components/FileUploader.js +3 -6
  116. package/build/modern/components/Input.js +2 -5
  117. package/build/modern/components/Notification.js +2 -5
  118. package/build/modern/components/Select.js +2 -5
  119. package/build/modern/components/Tag.js +3 -5
  120. package/build/modern/components/Toggle.js +2 -5
  121. package/build/modern/config/defineIcons.js +2 -5
  122. package/build/modern/config/index.js +14 -0
  123. package/build/modern/config/index.js.map +1 -0
  124. package/build/modern/config/types.js +2 -0
  125. package/build/modern/config/types.js.map +1 -0
  126. package/build/modern/context/cerberus.js +10 -0
  127. package/build/modern/context/cerberus.js.map +1 -0
  128. package/build/modern/context/confirm-modal.js +6 -9
  129. package/build/modern/context/cta-modal.js +6 -9
  130. package/build/modern/context/notification-center.js +3 -6
  131. package/build/modern/context/prompt-modal.js +8 -11
  132. package/build/modern/index.js +105 -94
  133. package/build/modern/index.js.map +1 -1
  134. package/package.json +4 -8
  135. package/src/components/Accordion.client.tsx +46 -0
  136. package/src/components/Accordion.tsx +0 -37
  137. package/src/components/AccordionItemGroup.tsx +1 -1
  138. package/src/components/Admonition.client.tsx +73 -0
  139. package/src/components/Admonition.tsx +1 -70
  140. package/src/components/AnimatingUploadIcon.tsx +3 -3
  141. package/src/components/Avatar.tsx +5 -2
  142. package/src/components/Checkbox.tsx +10 -3
  143. package/src/components/DatePicker.client.tsx +79 -7
  144. package/src/components/DatePicker.server.tsx +2 -75
  145. package/src/components/FileStatus.tsx +5 -3
  146. package/src/components/FileUploader.tsx +3 -2
  147. package/src/components/Input.tsx +4 -2
  148. package/src/components/Notification.tsx +7 -4
  149. package/src/components/Select.tsx +5 -2
  150. package/src/components/Tag.tsx +5 -2
  151. package/src/components/Toggle.tsx +4 -3
  152. package/src/config/defineIcons.ts +28 -16
  153. package/src/config/index.ts +28 -0
  154. package/src/config/types.ts +42 -0
  155. package/src/context/cerberus.tsx +44 -0
  156. package/src/context/confirm-modal.tsx +4 -2
  157. package/src/context/cta-modal.tsx +5 -4
  158. package/src/context/prompt-modal.tsx +4 -2
  159. package/src/index.ts +3 -1
  160. package/build/legacy/config/cerbIcons.cjs.map +0 -1
  161. package/build/modern/chunk-5OVH3INN.js.map +0 -1
  162. package/build/modern/chunk-6BH5J5GF.js.map +0 -1
  163. package/build/modern/chunk-BC5SZDYY.js +0 -132
  164. package/build/modern/chunk-BC5SZDYY.js.map +0 -1
  165. package/build/modern/chunk-BVCXVZAF.js.map +0 -1
  166. package/build/modern/chunk-CRII2HNX.js +0 -55
  167. package/build/modern/chunk-CRII2HNX.js.map +0 -1
  168. package/build/modern/chunk-FXLLRVAM.js.map +0 -1
  169. package/build/modern/chunk-HKJMLWVP.js.map +0 -1
  170. package/build/modern/chunk-HVKM54BA.js.map +0 -1
  171. package/build/modern/chunk-JJZQGR7A.js.map +0 -1
  172. package/build/modern/chunk-KPUYKHLW.js.map +0 -1
  173. package/build/modern/chunk-KWJ5FKX7.js.map +0 -1
  174. package/build/modern/chunk-PVIMOXSO.js.map +0 -1
  175. package/build/modern/chunk-QK7R2XJM.js.map +0 -1
  176. package/build/modern/chunk-QMF5ZNDG.js +0 -27
  177. package/build/modern/chunk-QMF5ZNDG.js.map +0 -1
  178. package/build/modern/chunk-QQOWWMZ3.js +0 -138
  179. package/build/modern/chunk-QQOWWMZ3.js.map +0 -1
  180. package/build/modern/chunk-T2JOPPGL.js.map +0 -1
  181. package/build/modern/chunk-TJCFYL5W.js.map +0 -1
  182. package/build/modern/chunk-U36UZJGZ.js.map +0 -1
  183. package/build/modern/chunk-XOROL3JY.js.map +0 -1
  184. package/build/modern/chunk-XXWR7UGH.js.map +0 -1
  185. package/build/modern/config/cerbIcons.js +0 -9
  186. package/src/config/cerbIcons.ts +0 -73
  187. /package/build/modern/{config/cerbIcons.js.map → chunk-36N4527B.js.map} +0 -0
  188. /package/build/modern/{chunk-CVTON5DQ.js.map → chunk-N3L3PEMF.js.map} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/config/defineIcons.ts","../../../src/config/cerbIcons.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/components/AnimatingUploadIcon.tsx"],"sourcesContent":["import { defaultIcons, type DefinedIcons } from './cerbIcons'\n\nfunction _validateIconsProperties(icons: DefinedIcons) {\n if (!icons.invalid) {\n throw new Error(\n 'The an invalid property must be defined in your custom icons library.',\n )\n }\n}\n\nexport function defineIcons(icons: DefinedIcons): Required<DefinedIcons> {\n _validateIconsProperties(icons)\n $cerberusIcons = {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons>\n return $cerberusIcons\n}\n\n// Default icons\n\nexport let $cerberusIcons = defaultIcons as Required<DefinedIcons>\n","import {\n Calendar,\n Checkmark,\n CheckmarkOutline,\n ChevronDown,\n ChevronLeft,\n ChevronRight,\n Close,\n CloudUpload,\n Information,\n Restart,\n TrashCan,\n UserFilled,\n Warning,\n WarningAlt,\n WarningFilled,\n type CarbonIconType,\n} from '@cerberus/icons'\nimport type { ElementType } from 'react'\nimport { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\n\nexport type IconType = CarbonIconType | ElementType\n\nexport interface DefinedIcons {\n accordionIndicator?: IconType\n avatar?: IconType\n calendar?: IconType\n calendarPrev?: IconType\n calendarNext?: IconType\n checkbox?: IconType\n close?: IconType\n confirmModal?: IconType\n delete?: IconType\n promptModal?: IconType\n waitingFileUploader?: IconType\n fileUploader?: IconType\n indeterminate?: IconType\n infoNotification?: IconType\n successNotification?: IconType\n warningNotification?: IconType\n dangerNotification?: IconType\n invalid: IconType\n invalidAlt?: IconType\n redo?: IconType\n selectArrow?: IconType\n toggleChecked?: IconType\n}\n\nexport const defaultIcons: DefinedIcons = {\n accordionIndicator: ChevronDown,\n avatar: UserFilled,\n calendar: Calendar,\n calendarPrev: ChevronLeft,\n calendarNext: ChevronRight,\n checkbox: CheckmarkIcon,\n close: Close,\n confirmModal: Information,\n delete: TrashCan,\n promptModal: Information,\n waitingFileUploader: CloudUpload,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n infoNotification: Information,\n successNotification: CheckmarkOutline,\n warningNotification: WarningAlt,\n dangerNotification: WarningFilled,\n invalid: WarningFilled,\n invalidAlt: Warning,\n redo: Restart,\n selectArrow: ChevronDown,\n toggleChecked: Checkmark,\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\nexport type CheckboxIconProps = SVGProps<SVGSVGElement>\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\nexport type IndeterminateIconProps = SVGProps<SVGSVGElement>\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n","import { type CarbonIconProps } from '@cerberus/icons'\n\n/**\n * This module contains an animating icon to use for the FileStatus component.\n * @module\n */\n\nexport type AnimatingUploadIconProps = CarbonIconProps\n\nexport function AnimatingUploadIcon(props: AnimatingUploadIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={props.size ?? '1em'}\n height={props.size ?? '1em'}\n viewBox=\"0 0 24 24\"\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path\n data-name=\"animating-trail\"\n strokeDasharray=\"2 4\"\n strokeDashoffset={6}\n d=\"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9\"\n >\n <animate\n attributeName=\"stroke-dashoffset\"\n dur=\"0.45s\"\n repeatCount=\"indefinite\"\n values=\"6;0\"\n ></animate>\n </path>\n\n <path\n data-name=\"half-circle\"\n strokeDasharray={32}\n strokeDashoffset={32}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n begin=\"0.075s\"\n dur=\"0.3s\"\n values=\"32;0\"\n ></animate>\n </path>\n\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0.8em\"\n height=\"0.8em\"\n x=\"27%\"\n y=\"27%\"\n viewBox=\"0 0 24 24\"\n >\n <polygon\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.8}\n opacity=\"1\"\n points=\"3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 \"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"opacity\"\n values=\"1;0;1\"\n dur=\"2s\"\n repeatCount=\"indefinite\"\n ></animate>\n </polygon>\n </svg>\n </g>\n </svg>\n )\n}\n"],"mappings":"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","names":["import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/config/defineIcons.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/components/AnimatingUploadIcon.tsx"],"sourcesContent":["import { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\nimport type { DefinedIcons, IconType } from './types'\n\nconst defaultIcons: Pick<\n DefinedIcons,\n 'checkbox' | 'fileUploader' | 'indeterminate'\n> = {\n checkbox: CheckmarkIcon,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n}\n\n/**\n * Defines the icons that will be used in Cerberus React components via the\n * CerberusProvider.\n * @param icons The icons that will be used in Cerberus React components.\n * @returns Icons object compatible with the CerberusProvider SystemConfig.\n * @example\n * ```tsx\n * const icons = defineIcons({\n * accordionIndicator: MyAccordionIndicatorIcon,\n * ...\n * })\n * ```\n */\nexport function defineIcons<T extends IconType>(\n icons: DefinedIcons,\n): Required<DefinedIcons<T>> {\n return {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons<T>>\n}\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\nexport type CheckboxIconProps = SVGProps<SVGSVGElement>\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\nexport type IndeterminateIconProps = SVGProps<SVGSVGElement>\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n","/**\n * This module contains an animating icon to use for the FileStatus component.\n * @module\n */\n\nexport interface AnimatingUploadIconProps {\n size?: 16 | 20 | 24 | 32\n}\n\nexport function AnimatingUploadIcon(props: AnimatingUploadIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={props.size ?? '1em'}\n height={props.size ?? '1em'}\n viewBox=\"0 0 24 24\"\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path\n data-name=\"animating-trail\"\n strokeDasharray=\"2 4\"\n strokeDashoffset={6}\n d=\"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9\"\n >\n <animate\n attributeName=\"stroke-dashoffset\"\n dur=\"0.45s\"\n repeatCount=\"indefinite\"\n values=\"6;0\"\n ></animate>\n </path>\n\n <path\n data-name=\"half-circle\"\n strokeDasharray={32}\n strokeDashoffset={32}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n begin=\"0.075s\"\n dur=\"0.3s\"\n values=\"32;0\"\n ></animate>\n </path>\n\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0.8em\"\n height=\"0.8em\"\n x=\"27%\"\n y=\"27%\"\n viewBox=\"0 0 24 24\"\n >\n <polygon\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.8}\n opacity=\"1\"\n points=\"3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 \"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"opacity\"\n values=\"1;0;1\"\n dur=\"2s\"\n repeatCount=\"indefinite\"\n ></animate>\n </polygon>\n </svg>\n </g>\n </svg>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACsBM;AAVC,SAAS,cAAc,OAA0B;AACtD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAOO,SAAS,kBAAkB,OAA+B;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ,sDAAC,UAAK,MAAK,gBAAe,GAAE,qBAAoB;AAAA;AAAA,EAClD;AAEJ;;;AC9BM,IAAAA,sBAAA;AATC,SAAS,oBAAoB,OAAiC;AACnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,OAAO,MAAM,QAAQ;AAAA,MACrB,QAAQ,MAAM,QAAQ;AAAA,MACtB,SAAQ;AAAA,MAER;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,aAAa;AAAA,UAEb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,aAAU;AAAA,gBACV,iBAAgB;AAAA,gBAChB,kBAAkB;AAAA,gBAClB,GAAE;AAAA,gBAEF;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAc;AAAA,oBACd,KAAI;AAAA,oBACJ,aAAY;AAAA,oBACZ,QAAO;AAAA;AAAA,gBACR;AAAA;AAAA,YACH;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,aAAU;AAAA,gBACV,iBAAiB;AAAA,gBACjB,kBAAkB;AAAA,gBAClB,GAAE;AAAA,gBAEF;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,eAAc;AAAA,oBACd,OAAM;AAAA,oBACN,KAAI;AAAA,oBACJ,QAAO;AAAA;AAAA,gBACR;AAAA;AAAA,YACH;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,OAAM;AAAA,gBACN,OAAM;AAAA,gBACN,QAAO;AAAA,gBACP,GAAE;AAAA,gBACF,GAAE;AAAA,gBACF,SAAQ;AAAA,gBAER;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,aAAa;AAAA,oBACb,SAAQ;AAAA,oBACR,QAAO;AAAA,oBAEP;AAAA,sBAAC;AAAA;AAAA,wBACC,MAAK;AAAA,wBACL,eAAc;AAAA,wBACd,QAAO;AAAA,wBACP,KAAI;AAAA,wBACJ,aAAY;AAAA;AAAA,oBACb;AAAA;AAAA,gBACH;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;;;AF9EA,IAAM,eAGF;AAAA,EACF,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AACjB;AAeO,SAAS,YACd,OAC2B;AAC3B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;","names":["import_jsx_runtime"]}
@@ -17,13 +17,13 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/config/cerbIcons.ts
21
- var cerbIcons_exports = {};
22
- __export(cerbIcons_exports, {
23
- defaultIcons: () => defaultIcons
20
+ // src/config/index.ts
21
+ var config_exports = {};
22
+ __export(config_exports, {
23
+ defineIcons: () => defineIcons,
24
+ makeSystemConfig: () => makeSystemConfig
24
25
  });
25
- module.exports = __toCommonJS(cerbIcons_exports);
26
- var import_icons = require("@cerberus/icons");
26
+ module.exports = __toCommonJS(config_exports);
27
27
 
28
28
  // src/config/icons/checkbox.icons.tsx
29
29
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -158,33 +158,26 @@ function AnimatingUploadIcon(props) {
158
158
  );
159
159
  }
160
160
 
161
- // src/config/cerbIcons.ts
161
+ // src/config/defineIcons.ts
162
162
  var defaultIcons = {
163
- accordionIndicator: import_icons.ChevronDown,
164
- avatar: import_icons.UserFilled,
165
- calendar: import_icons.Calendar,
166
- calendarPrev: import_icons.ChevronLeft,
167
- calendarNext: import_icons.ChevronRight,
168
163
  checkbox: CheckmarkIcon,
169
- close: import_icons.Close,
170
- confirmModal: import_icons.Information,
171
- delete: import_icons.TrashCan,
172
- promptModal: import_icons.Information,
173
- waitingFileUploader: import_icons.CloudUpload,
174
164
  fileUploader: AnimatingUploadIcon,
175
- indeterminate: IndeterminateIcon,
176
- infoNotification: import_icons.Information,
177
- successNotification: import_icons.CheckmarkOutline,
178
- warningNotification: import_icons.WarningAlt,
179
- dangerNotification: import_icons.WarningFilled,
180
- invalid: import_icons.WarningFilled,
181
- invalidAlt: import_icons.Warning,
182
- redo: import_icons.Restart,
183
- selectArrow: import_icons.ChevronDown,
184
- toggleChecked: import_icons.Checkmark
165
+ indeterminate: IndeterminateIcon
185
166
  };
167
+ function defineIcons(icons) {
168
+ return {
169
+ ...defaultIcons,
170
+ ...icons
171
+ };
172
+ }
173
+
174
+ // src/config/index.ts
175
+ function makeSystemConfig(options) {
176
+ return options;
177
+ }
186
178
  // Annotate the CommonJS export names for ESM import in node:
187
179
  0 && (module.exports = {
188
- defaultIcons
180
+ defineIcons,
181
+ makeSystemConfig
189
182
  });
190
- //# sourceMappingURL=cerbIcons.cjs.map
183
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/index.ts","../../../src/config/icons/checkbox.icons.tsx","../../../src/components/AnimatingUploadIcon.tsx","../../../src/config/defineIcons.ts"],"sourcesContent":["import type { SystemConfig } from './types'\n\n/**\n * Create a system configuration object to be used on the CerberusProvider.\n * @param options The system configuration options you want to customize.\n * @returns A CerberusProvider-compatible system configuration object.\n * @example\n * ```tsx\n * const icons = defineIcons({\n * accordionIndicator: MyAccordionIndicatorIcon,\n * ...\n * })\n * const config = makeSystemConfig({\n * icons,\n * })\n *\n * // In your app\n * <CerberusProvider config={config}>\n * <App />\n * </CerberusProvider>\n * ```\n */\nexport function makeSystemConfig(options: SystemConfig): SystemConfig {\n return options\n}\n\nexport * from './defineIcons'\nexport * from './types'\n","import type { SVGProps } from 'react'\n\n/**\n * This module contains substitute icons for the Checkbox component.\n * @module\n */\n\nexport type CheckboxIconProps = SVGProps<SVGSVGElement>\n\n/**\n * Checkmark icon for Checkbox component\n */\nexport function CheckmarkIcon(props: CheckboxIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n role=\"img\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path\n fill=\"currentColor\"\n d=\"M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z\"\n />\n </svg>\n )\n}\n\nexport type IndeterminateIconProps = SVGProps<SVGSVGElement>\n\n/**\n * Indeterminate icon for Checkbox component\n */\nexport function IndeterminateIcon(props: IndeterminateIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n role=\"img\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n {...props}\n >\n <path fill=\"currentColor\" d=\"M4 11h16v2.667H4z\" />\n </svg>\n )\n}\n","/**\n * This module contains an animating icon to use for the FileStatus component.\n * @module\n */\n\nexport interface AnimatingUploadIconProps {\n size?: 16 | 20 | 24 | 32\n}\n\nexport function AnimatingUploadIcon(props: AnimatingUploadIconProps) {\n return (\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width={props.size ?? '1em'}\n height={props.size ?? '1em'}\n viewBox=\"0 0 24 24\"\n >\n <g\n fill=\"none\"\n stroke=\"currentColor\"\n strokeLinecap=\"square\"\n strokeLinejoin=\"round\"\n strokeWidth={1.5}\n >\n <path\n data-name=\"animating-trail\"\n strokeDasharray=\"2 4\"\n strokeDashoffset={6}\n d=\"M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9\"\n >\n <animate\n attributeName=\"stroke-dashoffset\"\n dur=\"0.45s\"\n repeatCount=\"indefinite\"\n values=\"6;0\"\n ></animate>\n </path>\n\n <path\n data-name=\"half-circle\"\n strokeDasharray={32}\n strokeDashoffset={32}\n d=\"M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9\"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"stroke-dashoffset\"\n begin=\"0.075s\"\n dur=\"0.3s\"\n values=\"32;0\"\n ></animate>\n </path>\n\n <svg\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"0.8em\"\n height=\"0.8em\"\n x=\"27%\"\n y=\"27%\"\n viewBox=\"0 0 24 24\"\n >\n <polygon\n fill=\"currentColor\"\n stroke=\"currentColor\"\n strokeWidth={0.8}\n opacity=\"1\"\n points=\"3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 \"\n >\n <animate\n fill=\"freeze\"\n attributeName=\"opacity\"\n values=\"1;0;1\"\n dur=\"2s\"\n repeatCount=\"indefinite\"\n ></animate>\n </polygon>\n </svg>\n </g>\n </svg>\n )\n}\n","import { CheckmarkIcon, IndeterminateIcon } from './icons/checkbox.icons'\nimport { AnimatingUploadIcon } from '../components/AnimatingUploadIcon'\nimport type { DefinedIcons, IconType } from './types'\n\nconst defaultIcons: Pick<\n DefinedIcons,\n 'checkbox' | 'fileUploader' | 'indeterminate'\n> = {\n checkbox: CheckmarkIcon,\n fileUploader: AnimatingUploadIcon,\n indeterminate: IndeterminateIcon,\n}\n\n/**\n * Defines the icons that will be used in Cerberus React components via the\n * CerberusProvider.\n * @param icons The icons that will be used in Cerberus React components.\n * @returns Icons object compatible with the CerberusProvider SystemConfig.\n * @example\n * ```tsx\n * const icons = defineIcons({\n * accordionIndicator: MyAccordionIndicatorIcon,\n * ...\n * })\n * ```\n */\nexport function defineIcons<T extends IconType>(\n icons: DefinedIcons,\n): Required<DefinedIcons<T>> {\n return {\n ...defaultIcons,\n ...icons,\n } as Required<DefinedIcons<T>>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACsBM;AAVC,SAAS,cAAc,OAA0B;AACtD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,GAAE;AAAA;AAAA,MACJ;AAAA;AAAA,EACF;AAEJ;AAOO,SAAS,kBAAkB,OAA+B;AAC/D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,MAAK;AAAA,MACL,MAAK;AAAA,MACL,SAAQ;AAAA,MACP,GAAG;AAAA,MAEJ,sDAAC,UAAK,MAAK,gBAAe,GAAE,qBAAoB;AAAA;AAAA,EAClD;AAEJ;;;AC9BM,IAAAA,sBAAA;AATC,SAAS,oBAAoB,OAAiC;AACnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,OAAM;AAAA,MACN,OAAO,MAAM,QAAQ;AAAA,MACrB,QAAQ,MAAM,QAAQ;AAAA,MACtB,SAAQ;AAAA,MAER;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAO;AAAA,UACP,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,aAAa;AAAA,UAEb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,aAAU;AAAA,gBACV,iBAAgB;AAAA,gBAChB,kBAAkB;AAAA,gBAClB,GAAE;AAAA,gBAEF;AAAA,kBAAC;AAAA;AAAA,oBACC,eAAc;AAAA,oBACd,KAAI;AAAA,oBACJ,aAAY;AAAA,oBACZ,QAAO;AAAA;AAAA,gBACR;AAAA;AAAA,YACH;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,aAAU;AAAA,gBACV,iBAAiB;AAAA,gBACjB,kBAAkB;AAAA,gBAClB,GAAE;AAAA,gBAEF;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,eAAc;AAAA,oBACd,OAAM;AAAA,oBACN,KAAI;AAAA,oBACJ,QAAO;AAAA;AAAA,gBACR;AAAA;AAAA,YACH;AAAA,YAEA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,OAAM;AAAA,gBACN,OAAM;AAAA,gBACN,QAAO;AAAA,gBACP,GAAE;AAAA,gBACF,GAAE;AAAA,gBACF,SAAQ;AAAA,gBAER;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAK;AAAA,oBACL,QAAO;AAAA,oBACP,aAAa;AAAA,oBACb,SAAQ;AAAA,oBACR,QAAO;AAAA,oBAEP;AAAA,sBAAC;AAAA;AAAA,wBACC,MAAK;AAAA,wBACL,eAAc;AAAA,wBACd,QAAO;AAAA,wBACP,KAAI;AAAA,wBACJ,aAAY;AAAA;AAAA,oBACb;AAAA;AAAA,gBACH;AAAA;AAAA,YACF;AAAA;AAAA;AAAA,MACF;AAAA;AAAA,EACF;AAEJ;;;AC9EA,IAAM,eAGF;AAAA,EACF,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AACjB;AAeO,SAAS,YACd,OAC2B;AAC3B,SAAO;AAAA,IACL,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF;;;AHXO,SAAS,iBAAiB,SAAqC;AACpE,SAAO;AACT;","names":["import_jsx_runtime"]}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/config/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
19
+ //# sourceMappingURL=types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/config/types.ts"],"sourcesContent":["import type { ElementType } from 'react'\n\n/**\n * This module contains the types for the Cerberus React configuration.\n * @module config.types\n */\n\nexport interface SystemConfig {\n /**\n * The icons that will be used in Cerberus React components.\n */\n icons: Required<DefinedIcons>\n}\n\nexport interface DefinedIcons<T extends IconType = IconType> {\n accordionIndicator: T\n avatar: T\n calendar: T\n calendarPrev: T\n calendarNext: T\n checkbox?: T\n close: T\n confirmModal: T\n delete: T\n promptModal: T\n waitingFileUploader: T\n fileUploader?: T\n indeterminate?: T\n infoNotification: T\n successNotification: T\n warningNotification: T\n dangerNotification: T\n invalid: T\n invalidAlt: T\n redo: T\n selectArrow: T\n toggleChecked: T\n}\n\n// types\n\nexport type IconType = ElementType\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/context/cerberus.tsx
22
+ var cerberus_exports = {};
23
+ __export(cerberus_exports, {
24
+ CerberusProvider: () => CerberusProvider,
25
+ useCerberusContext: () => useCerberusContext
26
+ });
27
+ module.exports = __toCommonJS(cerberus_exports);
28
+ var import_react = require("react");
29
+ var import_jsx_runtime = require("react/jsx-runtime");
30
+ var CerberusContext = (0, import_react.createContext)(null);
31
+ function CerberusProvider(props) {
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CerberusContext.Provider, { value: props.config, children: props.children });
33
+ }
34
+ function useCerberusContext() {
35
+ const context = (0, import_react.useContext)(CerberusContext);
36
+ if (!context) {
37
+ throw new Error("useCerberus must be used within a CerberusProvider");
38
+ }
39
+ return context;
40
+ }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ CerberusProvider,
44
+ useCerberusContext
45
+ });
46
+ //# sourceMappingURL=cerberus.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/context/cerberus.tsx"],"sourcesContent":["'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAWhE,SAAS,iBACd,OACA;AACA,SACE,4CAAC,gBAAgB,UAAhB,EAAyB,OAAO,MAAM,QACpC,gBAAM,UACT;AAEJ;AAMO,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;","names":[]}
@@ -25,7 +25,7 @@ __export(confirm_modal_exports, {
25
25
  useConfirmModal: () => useConfirmModal
26
26
  });
27
27
  module.exports = __toCommonJS(confirm_modal_exports);
28
- var import_react5 = require("react");
28
+ var import_react6 = require("react");
29
29
 
30
30
  // src/components/Portal.tsx
31
31
  var import_react = require("@ark-ui/react");
@@ -57,171 +57,6 @@ function Button(props) {
57
57
  var import_css7 = require("@cerberus/styled-system/css");
58
58
  var import_patterns3 = require("@cerberus/styled-system/patterns");
59
59
 
60
- // src/config/cerbIcons.ts
61
- var import_icons = require("@cerberus/icons");
62
-
63
- // src/config/icons/checkbox.icons.tsx
64
- var import_jsx_runtime2 = require("react/jsx-runtime");
65
- function CheckmarkIcon(props) {
66
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
67
- "svg",
68
- {
69
- "aria-hidden": "true",
70
- xmlns: "http://www.w3.org/2000/svg",
71
- fill: "none",
72
- role: "img",
73
- viewBox: "0 0 24 24",
74
- ...props,
75
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
76
- "path",
77
- {
78
- fill: "currentColor",
79
- d: "M9.714 18 4 12.335l1.818-1.764 3.896 3.824L18.181 6 20 7.803 9.714 18Z"
80
- }
81
- )
82
- }
83
- );
84
- }
85
- function IndeterminateIcon(props) {
86
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
87
- "svg",
88
- {
89
- "aria-hidden": "true",
90
- xmlns: "http://www.w3.org/2000/svg",
91
- role: "img",
92
- fill: "none",
93
- viewBox: "0 0 24 24",
94
- ...props,
95
- children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { fill: "currentColor", d: "M4 11h16v2.667H4z" })
96
- }
97
- );
98
- }
99
-
100
- // src/components/AnimatingUploadIcon.tsx
101
- var import_jsx_runtime3 = require("react/jsx-runtime");
102
- function AnimatingUploadIcon(props) {
103
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
104
- "svg",
105
- {
106
- "aria-hidden": "true",
107
- xmlns: "http://www.w3.org/2000/svg",
108
- width: props.size ?? "1em",
109
- height: props.size ?? "1em",
110
- viewBox: "0 0 24 24",
111
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
112
- "g",
113
- {
114
- fill: "none",
115
- stroke: "currentColor",
116
- strokeLinecap: "square",
117
- strokeLinejoin: "round",
118
- strokeWidth: 1.5,
119
- children: [
120
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
121
- "path",
122
- {
123
- "data-name": "animating-trail",
124
- strokeDasharray: "2 4",
125
- strokeDashoffset: 6,
126
- d: "M12 21c-4.97 0 -9 -4.03 -9 -9c0 -4.97 4.03 -9 9 -9",
127
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
128
- "animate",
129
- {
130
- attributeName: "stroke-dashoffset",
131
- dur: "0.45s",
132
- repeatCount: "indefinite",
133
- values: "6;0"
134
- }
135
- )
136
- }
137
- ),
138
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
139
- "path",
140
- {
141
- "data-name": "half-circle",
142
- strokeDasharray: 32,
143
- strokeDashoffset: 32,
144
- d: "M12 3c4.97 0 9 4.03 9 9c0 4.97 -4.03 9 -9 9",
145
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
146
- "animate",
147
- {
148
- fill: "freeze",
149
- attributeName: "stroke-dashoffset",
150
- begin: "0.075s",
151
- dur: "0.3s",
152
- values: "32;0"
153
- }
154
- )
155
- }
156
- ),
157
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
158
- "svg",
159
- {
160
- "aria-hidden": "true",
161
- xmlns: "http://www.w3.org/2000/svg",
162
- width: "0.8em",
163
- height: "0.8em",
164
- x: "27%",
165
- y: "27%",
166
- viewBox: "0 0 24 24",
167
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
168
- "polygon",
169
- {
170
- fill: "currentColor",
171
- stroke: "currentColor",
172
- strokeWidth: 0.8,
173
- opacity: "1",
174
- points: "3.7,6.7 7.5,2.9 7.5,15 8.5,15 8.5,2.9 12.3,6.7 13,6 8,1 3,6 ",
175
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
176
- "animate",
177
- {
178
- fill: "freeze",
179
- attributeName: "opacity",
180
- values: "1;0;1",
181
- dur: "2s",
182
- repeatCount: "indefinite"
183
- }
184
- )
185
- }
186
- )
187
- }
188
- )
189
- ]
190
- }
191
- )
192
- }
193
- );
194
- }
195
-
196
- // src/config/cerbIcons.ts
197
- var defaultIcons = {
198
- accordionIndicator: import_icons.ChevronDown,
199
- avatar: import_icons.UserFilled,
200
- calendar: import_icons.Calendar,
201
- calendarPrev: import_icons.ChevronLeft,
202
- calendarNext: import_icons.ChevronRight,
203
- checkbox: CheckmarkIcon,
204
- close: import_icons.Close,
205
- confirmModal: import_icons.Information,
206
- delete: import_icons.TrashCan,
207
- promptModal: import_icons.Information,
208
- waitingFileUploader: import_icons.CloudUpload,
209
- fileUploader: AnimatingUploadIcon,
210
- indeterminate: IndeterminateIcon,
211
- infoNotification: import_icons.Information,
212
- successNotification: import_icons.CheckmarkOutline,
213
- warningNotification: import_icons.WarningAlt,
214
- dangerNotification: import_icons.WarningFilled,
215
- invalid: import_icons.WarningFilled,
216
- invalidAlt: import_icons.Warning,
217
- redo: import_icons.Restart,
218
- selectArrow: import_icons.ChevronDown,
219
- toggleChecked: import_icons.Checkmark
220
- };
221
-
222
- // src/config/defineIcons.ts
223
- var $cerberusIcons = defaultIcons;
224
-
225
60
  // src/aria-helpers/trap-focus.aria.ts
226
61
  function trapFocus(modalRef) {
227
62
  var _a;
@@ -263,9 +98,9 @@ function Show(props) {
263
98
  var import_css2 = require("@cerberus/styled-system/css");
264
99
  var import_recipes2 = require("@cerberus/styled-system/recipes");
265
100
  var import_react3 = require("react");
266
- var import_jsx_runtime4 = require("react/jsx-runtime");
101
+ var import_jsx_runtime2 = require("react/jsx-runtime");
267
102
  function ModalEl(props, ref) {
268
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
103
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
269
104
  "dialog",
270
105
  {
271
106
  ...props,
@@ -304,9 +139,9 @@ function useModal() {
304
139
  // src/components/ModalHeader.tsx
305
140
  var import_css3 = require("@cerberus/styled-system/css");
306
141
  var import_patterns = require("@cerberus/styled-system/patterns");
307
- var import_jsx_runtime5 = require("react/jsx-runtime");
142
+ var import_jsx_runtime3 = require("react/jsx-runtime");
308
143
  function ModalHeader(props) {
309
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
144
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
310
145
  "div",
311
146
  {
312
147
  ...props,
@@ -325,24 +160,38 @@ function ModalHeader(props) {
325
160
  // src/components/ModalHeading.tsx
326
161
  var import_css4 = require("@cerberus/styled-system/css");
327
162
  var import_recipes3 = require("@cerberus/styled-system/recipes");
328
- var import_jsx_runtime6 = require("react/jsx-runtime");
163
+ var import_jsx_runtime4 = require("react/jsx-runtime");
329
164
  function ModalHeading(props) {
330
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { ...props, className: (0, import_css4.cx)(props.className, (0, import_recipes3.modal)().heading) });
165
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("p", { ...props, className: (0, import_css4.cx)(props.className, (0, import_recipes3.modal)().heading) });
331
166
  }
332
167
 
333
168
  // src/components/ModalDescription.tsx
334
169
  var import_css5 = require("@cerberus/styled-system/css");
335
170
  var import_recipes4 = require("@cerberus/styled-system/recipes");
336
- var import_jsx_runtime7 = require("react/jsx-runtime");
171
+ var import_jsx_runtime5 = require("react/jsx-runtime");
337
172
  function ModalDescription(props) {
338
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { ...props, className: (0, import_css5.cx)(props.className, (0, import_recipes4.modal)().description) });
173
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { ...props, className: (0, import_css5.cx)(props.className, (0, import_recipes4.modal)().description) });
339
174
  }
340
175
 
341
176
  // src/components/Avatar.tsx
342
177
  var import_css6 = require("@cerberus/styled-system/css");
343
178
  var import_patterns2 = require("@cerberus/styled-system/patterns");
344
179
  var import_recipes5 = require("@cerberus/styled-system/recipes");
345
- var import_jsx_runtime8 = require("react/jsx-runtime");
180
+
181
+ // src/context/cerberus.tsx
182
+ var import_react5 = require("react");
183
+ var import_jsx_runtime6 = require("react/jsx-runtime");
184
+ var CerberusContext = (0, import_react5.createContext)(null);
185
+ function useCerberusContext() {
186
+ const context = (0, import_react5.useContext)(CerberusContext);
187
+ if (!context) {
188
+ throw new Error("useCerberus must be used within a CerberusProvider");
189
+ }
190
+ return context;
191
+ }
192
+
193
+ // src/components/Avatar.tsx
194
+ var import_jsx_runtime7 = require("react/jsx-runtime");
346
195
  function Avatar(props) {
347
196
  const {
348
197
  ariaLabel,
@@ -355,9 +204,10 @@ function Avatar(props) {
355
204
  icon,
356
205
  ...nativeProps
357
206
  } = props;
358
- const { avatar: AvatarIcon } = $cerberusIcons;
207
+ const { icons } = useCerberusContext();
208
+ const { avatar: AvatarIcon } = icons;
359
209
  const initials = (ariaLabel || "").split(" ").map((word) => word[0]).join("").slice(0, 2);
360
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
210
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
361
211
  "div",
362
212
  {
363
213
  ...nativeProps,
@@ -366,19 +216,19 @@ function Avatar(props) {
366
216
  (0, import_recipes5.avatar)({ gradient, size }),
367
217
  (0, import_patterns2.circle)()
368
218
  ),
369
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
219
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
370
220
  Show,
371
221
  {
372
222
  when: Boolean(src) || Boolean(as),
373
- fallback: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
223
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
374
224
  Show,
375
225
  {
376
226
  when: Boolean(initials),
377
- fallback: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
227
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
378
228
  Show,
379
229
  {
380
230
  when: Boolean(icon),
381
- fallback: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
231
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
382
232
  AvatarIcon,
383
233
  {
384
234
  size: iconSizeMap[size]
@@ -390,11 +240,11 @@ function Avatar(props) {
390
240
  children: initials
391
241
  }
392
242
  ),
393
- children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
243
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
394
244
  Show,
395
245
  {
396
246
  when: Boolean(as),
397
- fallback: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
247
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
398
248
  "img",
399
249
  {
400
250
  alt: props.ariaLabel,
@@ -431,20 +281,21 @@ var iconSizeMap = {
431
281
 
432
282
  // src/context/confirm-modal.tsx
433
283
  var import_jsx = require("@cerberus/styled-system/jsx");
434
- var import_jsx_runtime9 = require("react/jsx-runtime");
435
- var ConfirmModalContext = (0, import_react5.createContext)(null);
284
+ var import_jsx_runtime8 = require("react/jsx-runtime");
285
+ var ConfirmModalContext = (0, import_react6.createContext)(null);
436
286
  function ConfirmModal(props) {
437
287
  const { modalRef, show, close } = useModal();
438
- const resolveRef = (0, import_react5.useRef)(null);
439
- const [content, setContent] = (0, import_react5.useState)(null);
288
+ const resolveRef = (0, import_react6.useRef)(null);
289
+ const [content, setContent] = (0, import_react6.useState)(null);
440
290
  const focusTrap = trapFocus(modalRef);
441
- const ConfirmIcon = $cerberusIcons.confirmModal;
442
291
  const kind = (content == null ? void 0 : content.kind) ?? "non-destructive";
443
- const palette = (0, import_react5.useMemo)(
292
+ const { icons } = useCerberusContext();
293
+ const { confirmModal: ConfirmIcon } = icons;
294
+ const palette = (0, import_react6.useMemo)(
444
295
  () => kind === "destructive" ? "danger" : "action",
445
296
  [kind]
446
297
  );
447
- const handleChoice = (0, import_react5.useCallback)(
298
+ const handleChoice = (0, import_react6.useCallback)(
448
299
  (e) => {
449
300
  var _a, _b;
450
301
  const target = e.currentTarget;
@@ -456,7 +307,7 @@ function ConfirmModal(props) {
456
307
  },
457
308
  [close]
458
309
  );
459
- const handleShow = (0, import_react5.useCallback)(
310
+ const handleShow = (0, import_react6.useCallback)(
460
311
  (options) => {
461
312
  return new Promise((resolve) => {
462
313
  setContent({ ...options });
@@ -466,42 +317,42 @@ function ConfirmModal(props) {
466
317
  },
467
318
  [show]
468
319
  );
469
- const value = (0, import_react5.useMemo)(
320
+ const value = (0, import_react6.useMemo)(
470
321
  () => ({
471
322
  show: handleShow
472
323
  }),
473
324
  [handleShow]
474
325
  );
475
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(ConfirmModalContext.Provider, { value, children: [
326
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(ConfirmModalContext.Provider, { value, children: [
476
327
  props.children,
477
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx.VStack, { gap: "xl", w: "full", children: [
478
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(ModalHeader, { children: [
479
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
328
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Modal, { onKeyDown: focusTrap, ref: modalRef, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx.VStack, { gap: "xl", w: "full", children: [
329
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(ModalHeader, { children: [
330
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
480
331
  "div",
481
332
  {
482
333
  className: (0, import_patterns3.hstack)({
483
334
  justify: "center",
484
335
  w: "full"
485
336
  }),
486
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
337
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
487
338
  Show,
488
339
  {
489
340
  when: palette === "danger",
490
- fallback: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
341
+ fallback: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
491
342
  Avatar,
492
343
  {
493
344
  ariaLabel: "",
494
345
  gradient: "charon-light",
495
- icon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ConfirmIcon, { size: 24 }),
346
+ icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ConfirmIcon, { size: 24 }),
496
347
  src: ""
497
348
  }
498
349
  ),
499
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
350
+ children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
500
351
  Avatar,
501
352
  {
502
353
  ariaLabel: "",
503
354
  gradient: "hades-dark",
504
- icon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ConfirmIcon, { size: 24 }),
355
+ icon: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ConfirmIcon, { size: 24 }),
505
356
  src: ""
506
357
  }
507
358
  )
@@ -509,11 +360,11 @@ function ConfirmModal(props) {
509
360
  )
510
361
  }
511
362
  ),
512
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
513
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
363
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ModalHeading, { children: content == null ? void 0 : content.heading }),
364
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ModalDescription, { children: content == null ? void 0 : content.description })
514
365
  ] }),
515
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx.HStack, { gap: "4", w: "full", children: [
516
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
366
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx.HStack, { gap: "4", w: "full", children: [
367
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
517
368
  Button,
518
369
  {
519
370
  autoFocus: true,
@@ -527,7 +378,7 @@ function ConfirmModal(props) {
527
378
  children: content == null ? void 0 : content.actionText
528
379
  }
529
380
  ),
530
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
381
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
531
382
  Button,
532
383
  {
533
384
  className: (0, import_css7.css)({
@@ -545,7 +396,7 @@ function ConfirmModal(props) {
545
396
  ] });
546
397
  }
547
398
  function useConfirmModal() {
548
- const context = (0, import_react5.useContext)(ConfirmModalContext);
399
+ const context = (0, import_react6.useContext)(ConfirmModalContext);
549
400
  if (context === null) {
550
401
  throw new Error(
551
402
  "useConfirmModal must be used within a ConfirmModal Provider"