@clicoh/orion-library 1.2.0-beta.2 → 1.2.0-beta.21

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 (462) hide show
  1. package/assets/avatares/caja-chispa.png +0 -0
  2. package/assets/avatares/caja.png +0 -0
  3. package/assets/avatares/cohete.png +0 -0
  4. package/assets/avatares/dino.png +0 -0
  5. package/assets/avatares/pulpo-lentes.png +0 -0
  6. package/assets/avatares/pulpo-verde.png +0 -0
  7. package/assets/avatares/pulpo.png +0 -0
  8. package/assets/cifras/alerta.png +0 -0
  9. package/assets/cifras/duda.png +0 -0
  10. package/assets/cifras/error.png +0 -0
  11. package/assets/cifras/monedas.png +0 -0
  12. package/assets/cifras/reloj.png +0 -0
  13. package/assets/cifras/visto.png +0 -0
  14. package/assets/css/expresivo.css +1069 -0
  15. package/assets/logos/oculus-icon.svg +1 -0
  16. package/assets/logos/oculus-logo-sm-dark.svg +1 -0
  17. package/assets/logos/oculus-logo-sm.svg +1 -0
  18. package/assets/mascotas/svg/bugi-mascota-01-alerta.svg +39 -0
  19. package/assets/mascotas/svg/bugi-mascota-02-investigando.svg +36 -0
  20. package/assets/mascotas/svg/bugi-mascota-05-sorprendido.svg +38 -0
  21. package/assets/mascotas/svg/oculus-mascota-01-feliz.svg +52 -0
  22. package/assets/mascotas/svg/oculus-mascota-02-investigando.svg +51 -0
  23. package/assets/mascotas/svg/oculus-mascota-03-dudando.svg +51 -0
  24. package/assets/mascotas/svg/oculus-mascota-04-analizando-documento.svg +53 -0
  25. package/assets/mascotas/svg/oculus-mascota-06-celebrando.svg +54 -0
  26. package/assets/mascotas/svg/oculus-mascota-07-buscando-rapido.svg +57 -0
  27. package/assets/mascotas/svg/oculus-mascota-08-satisfecho.svg +55 -0
  28. package/assets/mascotas/webp/fixi-mascota-01-feliz-sm.webp +0 -0
  29. package/assets/mascotas/webp/fixi-mascota-02-investigando-sm.webp +0 -0
  30. package/assets/mascotas/webp/fixi-mascota-03-dudando-sm.webp +0 -0
  31. package/assets/mascotas/webp/fixi-mascota-04-reparando-sm.webp +0 -0
  32. package/assets/mascotas/webp/fixi-mascota-05-sorprendido-sm.webp +0 -0
  33. package/assets/mascotas/webp/fixi-mascota-06-celebrando-sm.webp +0 -0
  34. package/assets/mascotas/webp/fixi-mascota-07-corriendo-sm.webp +0 -0
  35. package/dist/components/01-atoms/Button/Button.d.ts +21 -1
  36. package/dist/components/01-atoms/Button/Button.d.ts.map +1 -1
  37. package/dist/components/01-atoms/Button/Button.jsx +38 -4
  38. package/dist/components/01-atoms/Button/Button.jsx.map +1 -1
  39. package/dist/components/01-atoms/CodeBlock/CodeBlock.d.ts +56 -0
  40. package/dist/components/01-atoms/CodeBlock/CodeBlock.d.ts.map +1 -0
  41. package/dist/components/01-atoms/CodeBlock/CodeBlock.jsx +97 -0
  42. package/dist/components/01-atoms/CodeBlock/CodeBlock.jsx.map +1 -0
  43. package/dist/components/01-atoms/CodeBlock/index.d.ts +2 -0
  44. package/dist/components/01-atoms/CodeBlock/index.d.ts.map +1 -0
  45. package/dist/components/01-atoms/CodeBlock/index.js +2 -0
  46. package/dist/components/01-atoms/CodeBlock/index.js.map +1 -0
  47. package/dist/components/01-atoms/Heading/Heading.jsx +1 -1
  48. package/dist/components/01-atoms/Heading/Heading.jsx.map +1 -1
  49. package/dist/components/01-atoms/IconButton/IconButton.d.ts +28 -0
  50. package/dist/components/01-atoms/IconButton/IconButton.d.ts.map +1 -0
  51. package/dist/components/01-atoms/IconButton/IconButton.jsx +32 -0
  52. package/dist/components/01-atoms/IconButton/IconButton.jsx.map +1 -0
  53. package/dist/components/01-atoms/IconButton/index.d.ts +2 -0
  54. package/dist/components/01-atoms/IconButton/index.d.ts.map +1 -0
  55. package/dist/components/01-atoms/IconButton/index.js +2 -0
  56. package/dist/components/01-atoms/IconButton/index.js.map +1 -0
  57. package/dist/components/01-atoms/Input/Input.d.ts +1 -1
  58. package/dist/components/01-atoms/Input/Input.d.ts.map +1 -1
  59. package/dist/components/01-atoms/Input/Input.jsx +13 -9
  60. package/dist/components/01-atoms/Input/Input.jsx.map +1 -1
  61. package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.d.ts.map +1 -1
  62. package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.jsx +1 -1
  63. package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.jsx.map +1 -1
  64. package/dist/components/01-atoms/MultiSelect/MultiSelect.d.ts.map +1 -1
  65. package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx +2 -1
  66. package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx.map +1 -1
  67. package/dist/components/01-atoms/ProgressBar/ProgressBar.d.ts +12 -1
  68. package/dist/components/01-atoms/ProgressBar/ProgressBar.d.ts.map +1 -1
  69. package/dist/components/01-atoms/ProgressBar/ProgressBar.jsx +18 -2
  70. package/dist/components/01-atoms/ProgressBar/ProgressBar.jsx.map +1 -1
  71. package/dist/components/01-atoms/Select/Select.d.ts +7 -1
  72. package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
  73. package/dist/components/01-atoms/Select/Select.jsx +61 -13
  74. package/dist/components/01-atoms/Select/Select.jsx.map +1 -1
  75. package/dist/components/01-atoms/Select/SelectList.d.ts +41 -0
  76. package/dist/components/01-atoms/Select/SelectList.d.ts.map +1 -0
  77. package/dist/components/01-atoms/Select/SelectList.jsx +116 -0
  78. package/dist/components/01-atoms/Select/SelectList.jsx.map +1 -0
  79. package/dist/components/01-atoms/SmallInput/SmallInput.d.ts.map +1 -1
  80. package/dist/components/01-atoms/SmallInput/SmallInput.jsx +1 -0
  81. package/dist/components/01-atoms/SmallInput/SmallInput.jsx.map +1 -1
  82. package/dist/components/01-atoms/Spinner/Spinner.d.ts +24 -3
  83. package/dist/components/01-atoms/Spinner/Spinner.d.ts.map +1 -1
  84. package/dist/components/01-atoms/Spinner/Spinner.jsx +30 -4
  85. package/dist/components/01-atoms/Spinner/Spinner.jsx.map +1 -1
  86. package/dist/components/01-atoms/Spinner/index.d.ts +1 -0
  87. package/dist/components/01-atoms/Spinner/index.d.ts.map +1 -1
  88. package/dist/components/01-atoms/Stat/Stat.d.ts +47 -0
  89. package/dist/components/01-atoms/Stat/Stat.d.ts.map +1 -0
  90. package/dist/components/01-atoms/Stat/Stat.jsx +64 -0
  91. package/dist/components/01-atoms/Stat/Stat.jsx.map +1 -0
  92. package/dist/components/01-atoms/Stat/index.d.ts +2 -0
  93. package/dist/components/01-atoms/Stat/index.d.ts.map +1 -0
  94. package/dist/components/01-atoms/Stat/index.js +2 -0
  95. package/dist/components/01-atoms/Stat/index.js.map +1 -0
  96. package/dist/components/01-atoms/Switch/Switch.d.ts +5 -2
  97. package/dist/components/01-atoms/Switch/Switch.d.ts.map +1 -1
  98. package/dist/components/01-atoms/Switch/Switch.jsx +15 -12
  99. package/dist/components/01-atoms/Switch/Switch.jsx.map +1 -1
  100. package/dist/components/01-atoms/Textarea/Textarea.d.ts +38 -0
  101. package/dist/components/01-atoms/Textarea/Textarea.d.ts.map +1 -0
  102. package/dist/components/01-atoms/Textarea/Textarea.jsx +50 -0
  103. package/dist/components/01-atoms/Textarea/Textarea.jsx.map +1 -0
  104. package/dist/components/01-atoms/Textarea/index.d.ts +2 -0
  105. package/dist/components/01-atoms/Textarea/index.d.ts.map +1 -0
  106. package/dist/components/01-atoms/Textarea/index.js +2 -0
  107. package/dist/components/01-atoms/Textarea/index.js.map +1 -0
  108. package/dist/components/01-atoms/Toast/Toast.d.ts.map +1 -1
  109. package/dist/components/01-atoms/Toast/Toast.jsx +3 -1
  110. package/dist/components/01-atoms/Toast/Toast.jsx.map +1 -1
  111. package/dist/components/01-atoms/Tooltip/Tooltip.d.ts.map +1 -1
  112. package/dist/components/01-atoms/Tooltip/Tooltip.jsx +4 -1
  113. package/dist/components/01-atoms/Tooltip/Tooltip.jsx.map +1 -1
  114. package/dist/components/01-atoms/index.d.ts +4 -0
  115. package/dist/components/01-atoms/index.d.ts.map +1 -1
  116. package/dist/components/01-atoms/index.js +4 -0
  117. package/dist/components/01-atoms/index.js.map +1 -1
  118. package/dist/components/02-molecules/Accordion/Accordion.d.ts +15 -4
  119. package/dist/components/02-molecules/Accordion/Accordion.d.ts.map +1 -1
  120. package/dist/components/02-molecules/Accordion/Accordion.jsx +20 -6
  121. package/dist/components/02-molecules/Accordion/Accordion.jsx.map +1 -1
  122. package/dist/components/02-molecules/Accordion/AccordionContext.d.ts +5 -1
  123. package/dist/components/02-molecules/Accordion/AccordionContext.d.ts.map +1 -1
  124. package/dist/components/02-molecules/Accordion/AccordionContext.jsx +7 -6
  125. package/dist/components/02-molecules/Accordion/AccordionContext.jsx.map +1 -1
  126. package/dist/components/02-molecules/Accordion/AccordionSection.d.ts +2 -1
  127. package/dist/components/02-molecules/Accordion/AccordionSection.d.ts.map +1 -1
  128. package/dist/components/02-molecules/Accordion/AccordionSection.jsx +62 -11
  129. package/dist/components/02-molecules/Accordion/AccordionSection.jsx.map +1 -1
  130. package/dist/components/02-molecules/Accordion/index.d.ts +1 -0
  131. package/dist/components/02-molecules/Accordion/index.d.ts.map +1 -1
  132. package/dist/components/02-molecules/Accordion/index.js.map +1 -1
  133. package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts +4 -1
  134. package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
  135. package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx +34 -15
  136. package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx.map +1 -1
  137. package/dist/components/02-molecules/Card/Card.d.ts +74 -0
  138. package/dist/components/02-molecules/Card/Card.d.ts.map +1 -0
  139. package/dist/components/02-molecules/Card/Card.jsx +87 -0
  140. package/dist/components/02-molecules/Card/Card.jsx.map +1 -0
  141. package/dist/components/02-molecules/Card/index.d.ts +2 -0
  142. package/dist/components/02-molecules/Card/index.d.ts.map +1 -0
  143. package/dist/components/02-molecules/Card/index.js +2 -0
  144. package/dist/components/02-molecules/Card/index.js.map +1 -0
  145. package/dist/components/02-molecules/DatePicker/DatePicker.d.ts +41 -3
  146. package/dist/components/02-molecules/DatePicker/DatePicker.d.ts.map +1 -1
  147. package/dist/components/02-molecules/DatePicker/DatePicker.jsx +190 -34
  148. package/dist/components/02-molecules/DatePicker/DatePicker.jsx.map +1 -1
  149. package/dist/components/02-molecules/Dropdown/Dropdown.d.ts.map +1 -1
  150. package/dist/components/02-molecules/Dropdown/Dropdown.jsx +1 -0
  151. package/dist/components/02-molecules/Dropdown/Dropdown.jsx.map +1 -1
  152. package/dist/components/02-molecules/EmptyState/EmptyState.d.ts +52 -0
  153. package/dist/components/02-molecules/EmptyState/EmptyState.d.ts.map +1 -0
  154. package/dist/components/02-molecules/EmptyState/EmptyState.jsx +66 -0
  155. package/dist/components/02-molecules/EmptyState/EmptyState.jsx.map +1 -0
  156. package/dist/components/02-molecules/EmptyState/index.d.ts +2 -0
  157. package/dist/components/02-molecules/EmptyState/index.d.ts.map +1 -0
  158. package/dist/components/02-molecules/EmptyState/index.js +2 -0
  159. package/dist/components/02-molecules/EmptyState/index.js.map +1 -0
  160. package/dist/components/02-molecules/Filter/Filter.d.ts +8 -1
  161. package/dist/components/02-molecules/Filter/Filter.d.ts.map +1 -1
  162. package/dist/components/02-molecules/Filter/Filter.jsx +35 -11
  163. package/dist/components/02-molecules/Filter/Filter.jsx.map +1 -1
  164. package/dist/components/02-molecules/Filter/index.d.ts +1 -0
  165. package/dist/components/02-molecules/Filter/index.d.ts.map +1 -1
  166. package/dist/components/02-molecules/Filter/index.js +1 -0
  167. package/dist/components/02-molecules/Filter/index.js.map +1 -1
  168. package/dist/components/02-molecules/Filter/types.d.ts +24 -5
  169. package/dist/components/02-molecules/Filter/types.d.ts.map +1 -1
  170. package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.d.ts +34 -0
  171. package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.d.ts.map +1 -0
  172. package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.js +70 -0
  173. package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.js.map +1 -0
  174. package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts +55 -5
  175. package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts.map +1 -1
  176. package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx +118 -27
  177. package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx.map +1 -1
  178. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts +40 -0
  179. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts.map +1 -0
  180. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx +109 -0
  181. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx.map +1 -0
  182. package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts +15 -1
  183. package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts.map +1 -1
  184. package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx +18 -3
  185. package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx.map +1 -1
  186. package/dist/components/02-molecules/Menu/MenuItem.d.ts.map +1 -1
  187. package/dist/components/02-molecules/Menu/MenuItem.jsx +2 -2
  188. package/dist/components/02-molecules/Menu/MenuItem.jsx.map +1 -1
  189. package/dist/components/02-molecules/Menu/MenuList.d.ts.map +1 -1
  190. package/dist/components/02-molecules/Menu/MenuList.jsx +1 -1
  191. package/dist/components/02-molecules/Menu/MenuList.jsx.map +1 -1
  192. package/dist/components/02-molecules/Modal/Modal.d.ts +5 -1
  193. package/dist/components/02-molecules/Modal/Modal.d.ts.map +1 -1
  194. package/dist/components/02-molecules/Modal/Modal.jsx +4 -2
  195. package/dist/components/02-molecules/Modal/Modal.jsx.map +1 -1
  196. package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.d.ts +80 -0
  197. package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.d.ts.map +1 -0
  198. package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.jsx +261 -0
  199. package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.jsx.map +1 -0
  200. package/dist/components/02-molecules/MultiAutocomplete/index.d.ts +2 -0
  201. package/dist/components/02-molecules/MultiAutocomplete/index.d.ts.map +1 -0
  202. package/dist/components/02-molecules/MultiAutocomplete/index.js +2 -0
  203. package/dist/components/02-molecules/MultiAutocomplete/index.js.map +1 -0
  204. package/dist/components/02-molecules/Stepper/Stepper.d.ts +70 -0
  205. package/dist/components/02-molecules/Stepper/Stepper.d.ts.map +1 -0
  206. package/dist/components/02-molecules/Stepper/Stepper.jsx +204 -0
  207. package/dist/components/02-molecules/Stepper/Stepper.jsx.map +1 -0
  208. package/dist/components/02-molecules/Stepper/index.d.ts +2 -0
  209. package/dist/components/02-molecules/Stepper/index.d.ts.map +1 -0
  210. package/dist/components/02-molecules/Stepper/index.js +2 -0
  211. package/dist/components/02-molecules/Stepper/index.js.map +1 -0
  212. package/dist/components/02-molecules/Table/Table.d.ts +3 -1
  213. package/dist/components/02-molecules/Table/Table.d.ts.map +1 -1
  214. package/dist/components/02-molecules/Table/Table.jsx +6 -5
  215. package/dist/components/02-molecules/Table/Table.jsx.map +1 -1
  216. package/dist/components/02-molecules/Timeline/Timeline.d.ts +47 -0
  217. package/dist/components/02-molecules/Timeline/Timeline.d.ts.map +1 -0
  218. package/dist/components/02-molecules/Timeline/Timeline.jsx +65 -0
  219. package/dist/components/02-molecules/Timeline/Timeline.jsx.map +1 -0
  220. package/dist/components/02-molecules/Timeline/index.d.ts +2 -0
  221. package/dist/components/02-molecules/Timeline/index.d.ts.map +1 -0
  222. package/dist/components/02-molecules/Timeline/index.js +2 -0
  223. package/dist/components/02-molecules/Timeline/index.js.map +1 -0
  224. package/dist/components/02-molecules/index.d.ts +5 -0
  225. package/dist/components/02-molecules/index.d.ts.map +1 -1
  226. package/dist/components/02-molecules/index.js +5 -0
  227. package/dist/components/02-molecules/index.js.map +1 -1
  228. package/dist/components/03-organisms/DataTable/DataTable.d.ts +1 -1
  229. package/dist/components/03-organisms/DataTable/DataTable.d.ts.map +1 -1
  230. package/dist/components/03-organisms/DataTable/DataTable.jsx +1 -1
  231. package/dist/components/03-organisms/DataTable/DataTable.jsx.map +1 -1
  232. package/dist/components/03-organisms/Header/Header.d.ts +3 -1
  233. package/dist/components/03-organisms/Header/Header.d.ts.map +1 -1
  234. package/dist/components/03-organisms/Header/Header.jsx +4 -5
  235. package/dist/components/03-organisms/Header/Header.jsx.map +1 -1
  236. package/dist/components/03-organisms/MapView/MapView.d.ts +14 -3
  237. package/dist/components/03-organisms/MapView/MapView.d.ts.map +1 -1
  238. package/dist/components/03-organisms/MapView/MapView.jsx +40 -9
  239. package/dist/components/03-organisms/MapView/MapView.jsx.map +1 -1
  240. package/dist/components/03-organisms/ModalMultiple/ModalMultiple.d.ts.map +1 -1
  241. package/dist/components/03-organisms/ModalMultiple/ModalMultiple.jsx +1 -0
  242. package/dist/components/03-organisms/ModalMultiple/ModalMultiple.jsx.map +1 -1
  243. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts +36 -4
  244. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts.map +1 -1
  245. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx +44 -10
  246. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx.map +1 -1
  247. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.d.ts +6 -2
  248. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.d.ts.map +1 -1
  249. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.jsx +7 -3
  250. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.jsx.map +1 -1
  251. package/dist/components/04-templates/LoginTemplate/LoginForm.d.ts +66 -3
  252. package/dist/components/04-templates/LoginTemplate/LoginForm.d.ts.map +1 -1
  253. package/dist/components/04-templates/LoginTemplate/LoginForm.jsx +80 -16
  254. package/dist/components/04-templates/LoginTemplate/LoginForm.jsx.map +1 -1
  255. package/dist/components/04-templates/LoginTemplate/LoginTemplate.d.ts +24 -4
  256. package/dist/components/04-templates/LoginTemplate/LoginTemplate.d.ts.map +1 -1
  257. package/dist/components/04-templates/LoginTemplate/LoginTemplate.jsx +27 -7
  258. package/dist/components/04-templates/LoginTemplate/LoginTemplate.jsx.map +1 -1
  259. package/dist/components/04-templates/LoginTemplate/index.d.ts +1 -0
  260. package/dist/components/04-templates/LoginTemplate/index.d.ts.map +1 -1
  261. package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.d.ts.map +1 -1
  262. package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.jsx +4 -1
  263. package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.jsx.map +1 -1
  264. package/dist/hooks/useSegments.d.ts.map +1 -1
  265. package/dist/hooks/useSegments.js +2 -3
  266. package/dist/hooks/useSegments.js.map +1 -1
  267. package/dist/hooks/useTheme.d.ts.map +1 -1
  268. package/dist/hooks/useTheme.jsx +1 -0
  269. package/dist/hooks/useTheme.jsx.map +1 -1
  270. package/expresivo/ExpBubble/ExpBubble.d.ts +51 -0
  271. package/expresivo/ExpBubble/ExpBubble.d.ts.map +1 -0
  272. package/expresivo/ExpBubble/ExpBubble.jsx +74 -0
  273. package/expresivo/ExpBubble/ExpBubble.jsx.map +1 -0
  274. package/expresivo/ExpBubble/index.d.ts +3 -0
  275. package/expresivo/ExpBubble/index.d.ts.map +1 -0
  276. package/expresivo/ExpBubble/index.js +2 -0
  277. package/expresivo/ExpBubble/index.js.map +1 -0
  278. package/expresivo/ExpChip/ExpChip.d.ts +40 -0
  279. package/expresivo/ExpChip/ExpChip.d.ts.map +1 -0
  280. package/expresivo/ExpChip/ExpChip.jsx +67 -0
  281. package/expresivo/ExpChip/ExpChip.jsx.map +1 -0
  282. package/expresivo/ExpChip/index.d.ts +3 -0
  283. package/expresivo/ExpChip/index.d.ts.map +1 -0
  284. package/expresivo/ExpChip/index.js +2 -0
  285. package/expresivo/ExpChip/index.js.map +1 -0
  286. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.d.ts +37 -0
  287. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.d.ts.map +1 -0
  288. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.jsx +43 -0
  289. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.jsx.map +1 -0
  290. package/expresivo/ExpCollapseToggle/index.d.ts +3 -0
  291. package/expresivo/ExpCollapseToggle/index.d.ts.map +1 -0
  292. package/expresivo/ExpCollapseToggle/index.js +2 -0
  293. package/expresivo/ExpCollapseToggle/index.js.map +1 -0
  294. package/expresivo/ExpEnterIcon/ExpEnterIcon.d.ts +32 -0
  295. package/expresivo/ExpEnterIcon/ExpEnterIcon.d.ts.map +1 -0
  296. package/expresivo/ExpEnterIcon/ExpEnterIcon.jsx +32 -0
  297. package/expresivo/ExpEnterIcon/ExpEnterIcon.jsx.map +1 -0
  298. package/expresivo/ExpEnterIcon/index.d.ts +3 -0
  299. package/expresivo/ExpEnterIcon/index.d.ts.map +1 -0
  300. package/expresivo/ExpEnterIcon/index.js +2 -0
  301. package/expresivo/ExpEnterIcon/index.js.map +1 -0
  302. package/expresivo/ExpGrowBar/ExpGrowBar.d.ts +26 -0
  303. package/expresivo/ExpGrowBar/ExpGrowBar.d.ts.map +1 -0
  304. package/expresivo/ExpGrowBar/ExpGrowBar.jsx +39 -0
  305. package/expresivo/ExpGrowBar/ExpGrowBar.jsx.map +1 -0
  306. package/expresivo/ExpGrowBar/index.d.ts +3 -0
  307. package/expresivo/ExpGrowBar/index.d.ts.map +1 -0
  308. package/expresivo/ExpGrowBar/index.js +2 -0
  309. package/expresivo/ExpGrowBar/index.js.map +1 -0
  310. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts +69 -0
  311. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts.map +1 -0
  312. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx +160 -0
  313. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx.map +1 -0
  314. package/expresivo/ExpJourneyTrack/index.d.ts +3 -0
  315. package/expresivo/ExpJourneyTrack/index.d.ts.map +1 -0
  316. package/expresivo/ExpJourneyTrack/index.js +2 -0
  317. package/expresivo/ExpJourneyTrack/index.js.map +1 -0
  318. package/expresivo/ExpKeyButton/ExpKeyButton.d.ts +49 -0
  319. package/expresivo/ExpKeyButton/ExpKeyButton.d.ts.map +1 -0
  320. package/expresivo/ExpKeyButton/ExpKeyButton.jsx +60 -0
  321. package/expresivo/ExpKeyButton/ExpKeyButton.jsx.map +1 -0
  322. package/expresivo/ExpKeyButton/index.d.ts +3 -0
  323. package/expresivo/ExpKeyButton/index.d.ts.map +1 -0
  324. package/expresivo/ExpKeyButton/index.js +2 -0
  325. package/expresivo/ExpKeyButton/index.js.map +1 -0
  326. package/expresivo/ExpLadder/ExpLadder.d.ts +42 -0
  327. package/expresivo/ExpLadder/ExpLadder.d.ts.map +1 -0
  328. package/expresivo/ExpLadder/ExpLadder.jsx +82 -0
  329. package/expresivo/ExpLadder/ExpLadder.jsx.map +1 -0
  330. package/expresivo/ExpLadder/index.d.ts +3 -0
  331. package/expresivo/ExpLadder/index.d.ts.map +1 -0
  332. package/expresivo/ExpLadder/index.js +2 -0
  333. package/expresivo/ExpLadder/index.js.map +1 -0
  334. package/expresivo/ExpLensIcon/ExpLensIcon.d.ts +29 -0
  335. package/expresivo/ExpLensIcon/ExpLensIcon.d.ts.map +1 -0
  336. package/expresivo/ExpLensIcon/ExpLensIcon.jsx +29 -0
  337. package/expresivo/ExpLensIcon/ExpLensIcon.jsx.map +1 -0
  338. package/expresivo/ExpLensIcon/index.d.ts +3 -0
  339. package/expresivo/ExpLensIcon/index.d.ts.map +1 -0
  340. package/expresivo/ExpLensIcon/index.js +2 -0
  341. package/expresivo/ExpLensIcon/index.js.map +1 -0
  342. package/expresivo/ExpLogo/ExpLogo.d.ts +33 -0
  343. package/expresivo/ExpLogo/ExpLogo.d.ts.map +1 -0
  344. package/expresivo/ExpLogo/ExpLogo.jsx +42 -0
  345. package/expresivo/ExpLogo/ExpLogo.jsx.map +1 -0
  346. package/expresivo/ExpLogo/catalog.d.ts +17 -0
  347. package/expresivo/ExpLogo/catalog.d.ts.map +1 -0
  348. package/expresivo/ExpLogo/catalog.js +11 -0
  349. package/expresivo/ExpLogo/catalog.js.map +1 -0
  350. package/expresivo/ExpLogo/index.d.ts +4 -0
  351. package/expresivo/ExpLogo/index.d.ts.map +1 -0
  352. package/expresivo/ExpLogo/index.js +2 -0
  353. package/expresivo/ExpLogo/index.js.map +1 -0
  354. package/expresivo/ExpMascot/ExpMascot.d.ts +42 -0
  355. package/expresivo/ExpMascot/ExpMascot.d.ts.map +1 -0
  356. package/expresivo/ExpMascot/ExpMascot.jsx +46 -0
  357. package/expresivo/ExpMascot/ExpMascot.jsx.map +1 -0
  358. package/expresivo/ExpMascot/catalog.d.ts +12 -0
  359. package/expresivo/ExpMascot/catalog.d.ts.map +1 -0
  360. package/expresivo/ExpMascot/catalog.js +41 -0
  361. package/expresivo/ExpMascot/catalog.js.map +1 -0
  362. package/expresivo/ExpMascot/index.d.ts +4 -0
  363. package/expresivo/ExpMascot/index.d.ts.map +1 -0
  364. package/expresivo/ExpMascot/index.js +2 -0
  365. package/expresivo/ExpMascot/index.js.map +1 -0
  366. package/expresivo/ExpMedalBadge/ExpMedalBadge.d.ts +29 -0
  367. package/expresivo/ExpMedalBadge/ExpMedalBadge.d.ts.map +1 -0
  368. package/expresivo/ExpMedalBadge/ExpMedalBadge.jsx +87 -0
  369. package/expresivo/ExpMedalBadge/ExpMedalBadge.jsx.map +1 -0
  370. package/expresivo/ExpMedalBadge/index.d.ts +3 -0
  371. package/expresivo/ExpMedalBadge/index.d.ts.map +1 -0
  372. package/expresivo/ExpMedalBadge/index.js +2 -0
  373. package/expresivo/ExpMedalBadge/index.js.map +1 -0
  374. package/expresivo/ExpPageHero/ExpPageHero.d.ts +82 -0
  375. package/expresivo/ExpPageHero/ExpPageHero.d.ts.map +1 -0
  376. package/expresivo/ExpPageHero/ExpPageHero.jsx +113 -0
  377. package/expresivo/ExpPageHero/ExpPageHero.jsx.map +1 -0
  378. package/expresivo/ExpPageHero/index.d.ts +3 -0
  379. package/expresivo/ExpPageHero/index.d.ts.map +1 -0
  380. package/expresivo/ExpPageHero/index.js +2 -0
  381. package/expresivo/ExpPageHero/index.js.map +1 -0
  382. package/expresivo/ExpPeek/ExpPeek.d.ts +56 -0
  383. package/expresivo/ExpPeek/ExpPeek.d.ts.map +1 -0
  384. package/expresivo/ExpPeek/ExpPeek.jsx +131 -0
  385. package/expresivo/ExpPeek/ExpPeek.jsx.map +1 -0
  386. package/expresivo/ExpPeek/index.d.ts +3 -0
  387. package/expresivo/ExpPeek/index.d.ts.map +1 -0
  388. package/expresivo/ExpPeek/index.js +2 -0
  389. package/expresivo/ExpPeek/index.js.map +1 -0
  390. package/expresivo/ExpPillButton/ExpPillButton.d.ts +47 -0
  391. package/expresivo/ExpPillButton/ExpPillButton.d.ts.map +1 -0
  392. package/expresivo/ExpPillButton/ExpPillButton.jsx +77 -0
  393. package/expresivo/ExpPillButton/ExpPillButton.jsx.map +1 -0
  394. package/expresivo/ExpPillButton/index.d.ts +3 -0
  395. package/expresivo/ExpPillButton/index.d.ts.map +1 -0
  396. package/expresivo/ExpPillButton/index.js +2 -0
  397. package/expresivo/ExpPillButton/index.js.map +1 -0
  398. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts +28 -0
  399. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts.map +1 -0
  400. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx +32 -0
  401. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx.map +1 -0
  402. package/expresivo/ExpRepoAvatar/catalog.d.ts +6 -0
  403. package/expresivo/ExpRepoAvatar/catalog.d.ts.map +1 -0
  404. package/expresivo/ExpRepoAvatar/catalog.js +18 -0
  405. package/expresivo/ExpRepoAvatar/catalog.js.map +1 -0
  406. package/expresivo/ExpRepoAvatar/index.d.ts +4 -0
  407. package/expresivo/ExpRepoAvatar/index.d.ts.map +1 -0
  408. package/expresivo/ExpRepoAvatar/index.js +2 -0
  409. package/expresivo/ExpRepoAvatar/index.js.map +1 -0
  410. package/expresivo/ExpScope/ExpScope.d.ts +63 -0
  411. package/expresivo/ExpScope/ExpScope.d.ts.map +1 -0
  412. package/expresivo/ExpScope/ExpScope.jsx +67 -0
  413. package/expresivo/ExpScope/ExpScope.jsx.map +1 -0
  414. package/expresivo/ExpScope/index.d.ts +3 -0
  415. package/expresivo/ExpScope/index.d.ts.map +1 -0
  416. package/expresivo/ExpScope/index.js +2 -0
  417. package/expresivo/ExpScope/index.js.map +1 -0
  418. package/expresivo/ExpScoreRing/ExpScoreRing.d.ts +35 -0
  419. package/expresivo/ExpScoreRing/ExpScoreRing.d.ts.map +1 -0
  420. package/expresivo/ExpScoreRing/ExpScoreRing.jsx +67 -0
  421. package/expresivo/ExpScoreRing/ExpScoreRing.jsx.map +1 -0
  422. package/expresivo/ExpScoreRing/index.d.ts +3 -0
  423. package/expresivo/ExpScoreRing/index.d.ts.map +1 -0
  424. package/expresivo/ExpScoreRing/index.js +2 -0
  425. package/expresivo/ExpScoreRing/index.js.map +1 -0
  426. package/expresivo/ExpSearchField/ExpSearchField.d.ts +49 -0
  427. package/expresivo/ExpSearchField/ExpSearchField.d.ts.map +1 -0
  428. package/expresivo/ExpSearchField/ExpSearchField.jsx +81 -0
  429. package/expresivo/ExpSearchField/ExpSearchField.jsx.map +1 -0
  430. package/expresivo/ExpSearchField/index.d.ts +3 -0
  431. package/expresivo/ExpSearchField/index.d.ts.map +1 -0
  432. package/expresivo/ExpSearchField/index.js +2 -0
  433. package/expresivo/ExpSearchField/index.js.map +1 -0
  434. package/expresivo/ExpStatIcon/ExpStatIcon.d.ts +25 -0
  435. package/expresivo/ExpStatIcon/ExpStatIcon.d.ts.map +1 -0
  436. package/expresivo/ExpStatIcon/ExpStatIcon.jsx +29 -0
  437. package/expresivo/ExpStatIcon/ExpStatIcon.jsx.map +1 -0
  438. package/expresivo/ExpStatIcon/catalog.d.ts +6 -0
  439. package/expresivo/ExpStatIcon/catalog.d.ts.map +1 -0
  440. package/expresivo/ExpStatIcon/catalog.js +16 -0
  441. package/expresivo/ExpStatIcon/catalog.js.map +1 -0
  442. package/expresivo/ExpStatIcon/index.d.ts +4 -0
  443. package/expresivo/ExpStatIcon/index.d.ts.map +1 -0
  444. package/expresivo/ExpStatIcon/index.js +2 -0
  445. package/expresivo/ExpStatIcon/index.js.map +1 -0
  446. package/expresivo/ExpStepBadge/ExpStepBadge.d.ts +25 -0
  447. package/expresivo/ExpStepBadge/ExpStepBadge.d.ts.map +1 -0
  448. package/expresivo/ExpStepBadge/ExpStepBadge.jsx +30 -0
  449. package/expresivo/ExpStepBadge/ExpStepBadge.jsx.map +1 -0
  450. package/expresivo/ExpStepBadge/index.d.ts +2 -0
  451. package/expresivo/ExpStepBadge/index.d.ts.map +1 -0
  452. package/expresivo/ExpStepBadge/index.js +2 -0
  453. package/expresivo/ExpStepBadge/index.js.map +1 -0
  454. package/expresivo/index.d.ts +22 -0
  455. package/expresivo/index.d.ts.map +1 -0
  456. package/expresivo/index.js +22 -0
  457. package/expresivo/index.js.map +1 -0
  458. package/expresivo/shared/glyphs.d.ts +20 -0
  459. package/expresivo/shared/glyphs.d.ts.map +1 -0
  460. package/expresivo/shared/glyphs.jsx +60 -0
  461. package/expresivo/shared/glyphs.jsx.map +1 -0
  462. package/package.json +6 -4
@@ -0,0 +1,113 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { useId } from 'react';
4
+ import { Heading } from '@clicoh/orion-library';
5
+ import { ExpBubble } from '../ExpBubble/ExpBubble';
6
+ import { ExpCollapseToggle } from '../ExpCollapseToggle/ExpCollapseToggle';
7
+ import { ExpMascot } from '../ExpMascot/ExpMascot';
8
+ import { useExpScopeOptions } from '../ExpScope/ExpScope';
9
+ /**
10
+ * Page header for the top of a screen, meant for the `heading` slot of
11
+ * `DashboardTemplate`: an eyebrow, the title, a description, optional content
12
+ * under it, and a mascot with a speech bubble on the right.
13
+ *
14
+ * On wide screens it draws a band with a dotted lavender background. With
15
+ * `collapse`, a corner button tucks it down to the title, and the mascot hangs
16
+ * from a thread instead; the consumer keeps the state. On small screens it is
17
+ * a plain title row without eyebrow, description, mascot or bubble, and
18
+ * `collapse` has no effect. Children still show there.
19
+ *
20
+ * Outside an `ExpScope` it renders the core title row of `DashboardTemplate`:
21
+ * title, adornment, description, children and actions.
22
+ *
23
+ * @component
24
+ * @example
25
+ * <ExpPageHero
26
+ * eyebrow="Case memory"
27
+ * title="Cases"
28
+ * description="Review past diagnoses before starting from scratch."
29
+ * mascot="fixi-02-investigando"
30
+ * bubble={{ title: 'Lead found', text: 'Search by ticket or symptom.' }}
31
+ * />
32
+ *
33
+ * @example
34
+ * // Collapsible, with the state kept by the consumer
35
+ * <ExpPageHero
36
+ * title="Cases"
37
+ * mascot="fixi-02-investigando"
38
+ * collapse={{
39
+ * collapsed,
40
+ * onToggle: () => setCollapsed(!collapsed),
41
+ * expandLabel: 'Expand header',
42
+ * collapseLabel: 'Collapse header',
43
+ * }}
44
+ * />
45
+ *
46
+ * @param {Object} props - The properties of the ExpPageHero component.
47
+ * @param {ReactNode} props.title - Page title.
48
+ * @param {ReactNode} [props.eyebrow] - Short uppercase line above the title, only on wide screens.
49
+ * @param {'h3' | 'h4' | 'h5'} [props.headingLevel='h3'] - Heading level of the title.
50
+ * @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
51
+ * @param {ReactNode} [props.description] - Text under the title, only on wide screens; hidden while collapsed.
52
+ * @param {ReactNode} [props.children] - Content under the description, such as stat chips; hidden while collapsed.
53
+ * @param {ReactNode} [props.actions] - Content on the right, such as buttons; it moves under the title on small screens.
54
+ * @param {ExpMascotName} [props.mascot] - Mascot on the right, 104px; 56px and hanging while collapsed.
55
+ * @param {ExpPageHeroBubble} [props.bubble] - Speech bubble next to the mascot: `title`, `text` and `badge`.
56
+ * @param {ExpPageHeroCollapse} [props.collapse] - Makes the header collapsible: `collapsed`, `onToggle`, `expandLabel` and `collapseLabel`.
57
+ *
58
+ * @returns {ReactNode} The page header.
59
+ */
60
+ export function ExpPageHero({ title, eyebrow, headingLevel = 'h3', titleAdornment, description, children, actions, mascot, bubble, collapse, ...restProps }) {
61
+ const options = useExpScopeOptions();
62
+ const generatedId = useId();
63
+ const id = restProps.id ?? generatedId;
64
+ const collapsed = !!collapse?.collapsed;
65
+ const hasAside = !!mascot || !!bubble;
66
+ const titleRow = (<div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1">
67
+ <Heading level={headingLevel}>{title}</Heading>
68
+ {titleAdornment}
69
+ </div>);
70
+ if (!options) {
71
+ return (<div {...restProps} className={clsx('flex flex-col items-start gap-3 sm:flex-row sm:justify-between', restProps.className)}>
72
+ <div className="flex min-w-0 flex-col gap-1">
73
+ {titleRow}
74
+ {!!description && (<div className="text-gray-1 dark:text-gray-2 text-sm">
75
+ {description}
76
+ </div>)}
77
+ {children}
78
+ </div>
79
+ {actions}
80
+ </div>);
81
+ }
82
+ return (<div {...restProps} id={id} data-state={collapsed ? 'collapsed' : 'expanded'} className={clsx('exp-hero relative flex flex-col items-start gap-3 sm:flex-row sm:items-center sm:justify-between lg:gap-6', collapsed
83
+ ? 'lg:min-h-[72px] lg:py-3.5 lg:pr-30 lg:pl-6'
84
+ : 'lg:px-8 lg:py-6', !collapsed && !!collapse && !hasAside && 'lg:pr-20', restProps.className)}>
85
+ <div className="flex min-w-0 flex-col items-start gap-1 lg:flex-[1_1_420px]">
86
+ {!!eyebrow && (<p className={clsx('text-lavender dark:text-lavender-dark hidden text-xs leading-4 font-semibold tracking-[0.04em] uppercase', !collapsed && 'lg:block')}>
87
+ <span aria-hidden="true">✦ </span>
88
+ {eyebrow}
89
+ </p>)}
90
+ {titleRow}
91
+ {!!description && (<div className={clsx('text-gray-1 dark:text-gray-2 hidden max-w-[680px] text-sm leading-[22px] text-pretty', !collapsed && 'lg:block')}>
92
+ {description}
93
+ </div>)}
94
+ {!!children && (<div className={clsx('mt-2 w-full', collapsed && 'lg:hidden')}>
95
+ {children}
96
+ </div>)}
97
+ </div>
98
+ {actions}
99
+ {!!hasAside && (<div className={clsx('hidden shrink-0 items-center gap-4', !collapsed && 'lg:flex', !!collapse && 'lg:mr-7')}>
100
+ {!!bubble && (<ExpBubble tail="right" title={bubble.title} badge={bubble.badge}>
101
+ {bubble.text}
102
+ </ExpBubble>)}
103
+ {!!mascot && <ExpMascot name={mascot} size={104}/>}
104
+ </div>)}
105
+ {!!collapsed && !!mascot && (<span className="absolute top-0 right-18 hidden lg:block">
106
+ <ExpMascot name={mascot} size={56} motion="hang"/>
107
+ </span>)}
108
+ {!!collapse && (<div className="absolute top-5 right-5 hidden lg:block">
109
+ <ExpCollapseToggle collapsed={collapsed} onToggle={collapse.onToggle} expandLabel={collapse.expandLabel} collapseLabel={collapse.collapseLabel} aria-controls={id}/>
110
+ </div>)}
111
+ </div>);
112
+ }
113
+ //# sourceMappingURL=ExpPageHero.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpPageHero.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpPageHero/ExpPageHero.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAuC,KAAK,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAiC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,MAAM,UA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ExpPageHero';
2
+ export type { ExpPageHeroBubble, ExpPageHeroCollapse, ExpPageHeroLevel, ExpPageHeroProps, } from './ExpPageHero';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpPageHero/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EACV,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpPageHero } from './ExpPageHero';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpPageHero/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import type { ExpMascotName } from '../ExpMascot/catalog';
3
+ export type ExpPeekProps = {
4
+ /** What the mascots peek from behind, usually a single button. */
5
+ children: ReactNode;
6
+ /**
7
+ * Mascots in the order they take turns, as groups of poses. Each turn shows
8
+ * one pose of its group, picked at random, and the order repeats.
9
+ */
10
+ cast?: readonly (readonly ExpMascotName[])[];
11
+ /** Width and height of the mascot, in pixels. */
12
+ size?: number;
13
+ /** Hides the mascot and stops the turns, for instance while the action runs. */
14
+ paused?: boolean;
15
+ /** How long each mascot stays out, in milliseconds. */
16
+ visibleMs?: number;
17
+ /** Pause between one mascot and the next, in milliseconds. */
18
+ gapMs?: number;
19
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
20
+ /**
21
+ * Wraps a button so the clicOH mascots peek out from behind its edges, one at
22
+ * a time: from the top edge at any point, or from the left or right side, with
23
+ * a random pose and tilt. Each one springs out, stays a few seconds, hides and
24
+ * makes room for the next, in the order of `cast`.
25
+ *
26
+ * The mascot sits behind the wrapped element, which covers its lower part;
27
+ * nothing is clipped, so leave some room around it. It is decorative and
28
+ * never takes clicks. Pause it while the action runs.
29
+ *
30
+ * Shows no mascot with reduced motion, outside an `ExpScope`, or when the
31
+ * scope hides mascots; the wrapped element renders as usual.
32
+ *
33
+ * @component
34
+ * @example
35
+ * <ExpPeek paused={isSending} className="w-full">
36
+ * <Button type="submit" className="w-full">Sign in</Button>
37
+ * </ExpPeek>
38
+ *
39
+ * @example
40
+ * // Only Fixi, bigger and slower
41
+ * <ExpPeek cast={[['fixi-01-feliz', 'fixi-06-celebrando']]} size={56} visibleMs={4000}>
42
+ * <Button>Fix it</Button>
43
+ * </ExpPeek>
44
+ *
45
+ * @param {Object} props - The properties of the ExpPeek component.
46
+ * @param {ReactNode} props.children - What the mascots peek from behind, usually a single button.
47
+ * @param {ExpMascotName[][]} [props.cast] - Mascots in turn order, as groups of poses; each turn picks one pose of its group. Defaults to Oculus searching, Bugi showing up and Fixi fixing.
48
+ * @param {number} [props.size=44] - Width and height of the mascot, in pixels.
49
+ * @param {boolean} [props.paused=false] - Hides the mascot and stops the turns.
50
+ * @param {number} [props.visibleMs=3000] - How long each mascot stays out, in milliseconds.
51
+ * @param {number} [props.gapMs=2000] - Pause between one mascot and the next, in milliseconds.
52
+ *
53
+ * @returns {ReactNode} The wrapped element with the mascots behind it.
54
+ */
55
+ export declare function ExpPeek({ children, cast, size, paused, visibleMs, gapMs, className, ...restProps }: ExpPeekProps): ReactNode;
56
+ //# sourceMappingURL=ExpPeek.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpPeek.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpPeek/ExpPeek.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAe1D,MAAM,MAAM,YAAY,GAAG;IACzB,kEAAkE;IAClE,QAAQ,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,aAAa,EAAE,CAAC,EAAE,CAAC;IAC7C,iDAAiD;IACjD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAoDrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,IAAiB,EACjB,IAAS,EACT,MAAc,EACd,SAAgB,EAChB,KAAY,EACZ,SAAS,EACT,GAAG,SAAS,EACb,EAAE,YAAY,GAAG,SAAS,CA6D1B"}
@@ -0,0 +1,131 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { useEffect, useState, } from 'react';
4
+ import { ExpMascot } from '../ExpMascot/ExpMascot';
5
+ import { useExpScopeOptions } from '../ExpScope/ExpScope';
6
+ /** Oculus searches, Bugi shows up, Fixi fixes it. */
7
+ const STORY_CAST = [
8
+ [
9
+ 'oculus-02-investigando',
10
+ 'oculus-07-buscando-rapido',
11
+ 'oculus-04-analizando-documento',
12
+ ],
13
+ ['bugi-01-alerta', 'bugi-05-sorprendido', 'bugi-02-investigando'],
14
+ ['fixi-04-reparando', 'fixi-01-feliz', 'fixi-06-celebrando'],
15
+ ];
16
+ /** The top edge comes up three times as often as each side. */
17
+ const SPOTS = ['top', 'top', 'top', 'left', 'right'];
18
+ const FIRST_DELAY_MS = 900;
19
+ const RISE_DELAY_MS = 40;
20
+ const HIDE_MS = 420;
21
+ const BOUNCE = 'cubic-bezier(.34,1.56,.64,1)';
22
+ const SINK = 'cubic-bezier(.55,0,.75,.2)';
23
+ function pick(items) {
24
+ return items[Math.floor(Math.random() * items.length)];
25
+ }
26
+ function peekStyle(peek, size, out) {
27
+ const sideways = { top: '50%', marginTop: -size / 2 };
28
+ const place = {
29
+ top: { top: 0, left: `calc(${12 + peek.along * 74}% - ${size / 2}px)` },
30
+ left: { ...sideways, left: 10 },
31
+ right: { ...sideways, right: 10 },
32
+ };
33
+ const outTransform = {
34
+ top: `translateY(-${Math.round(size * 0.68)}px) rotate(${peek.tilt}deg)`,
35
+ left: `translateX(-${size * 0.95}px) rotate(-10deg)`,
36
+ right: `translateX(${size * 0.95}px) rotate(10deg)`,
37
+ };
38
+ return {
39
+ width: size,
40
+ height: size,
41
+ ...place[peek.spot],
42
+ transformOrigin: peek.spot === 'top' ? '50% 100%' : '50% 50%',
43
+ transform: out ? outTransform[peek.spot] : 'none',
44
+ opacity: out ? 1 : 0,
45
+ transition: out
46
+ ? `transform 520ms ${BOUNCE}, opacity 80ms linear`
47
+ : `transform 360ms ${SINK}, opacity 120ms linear 260ms`,
48
+ };
49
+ }
50
+ /**
51
+ * Wraps a button so the clicOH mascots peek out from behind its edges, one at
52
+ * a time: from the top edge at any point, or from the left or right side, with
53
+ * a random pose and tilt. Each one springs out, stays a few seconds, hides and
54
+ * makes room for the next, in the order of `cast`.
55
+ *
56
+ * The mascot sits behind the wrapped element, which covers its lower part;
57
+ * nothing is clipped, so leave some room around it. It is decorative and
58
+ * never takes clicks. Pause it while the action runs.
59
+ *
60
+ * Shows no mascot with reduced motion, outside an `ExpScope`, or when the
61
+ * scope hides mascots; the wrapped element renders as usual.
62
+ *
63
+ * @component
64
+ * @example
65
+ * <ExpPeek paused={isSending} className="w-full">
66
+ * <Button type="submit" className="w-full">Sign in</Button>
67
+ * </ExpPeek>
68
+ *
69
+ * @example
70
+ * // Only Fixi, bigger and slower
71
+ * <ExpPeek cast={[['fixi-01-feliz', 'fixi-06-celebrando']]} size={56} visibleMs={4000}>
72
+ * <Button>Fix it</Button>
73
+ * </ExpPeek>
74
+ *
75
+ * @param {Object} props - The properties of the ExpPeek component.
76
+ * @param {ReactNode} props.children - What the mascots peek from behind, usually a single button.
77
+ * @param {ExpMascotName[][]} [props.cast] - Mascots in turn order, as groups of poses; each turn picks one pose of its group. Defaults to Oculus searching, Bugi showing up and Fixi fixing.
78
+ * @param {number} [props.size=44] - Width and height of the mascot, in pixels.
79
+ * @param {boolean} [props.paused=false] - Hides the mascot and stops the turns.
80
+ * @param {number} [props.visibleMs=3000] - How long each mascot stays out, in milliseconds.
81
+ * @param {number} [props.gapMs=2000] - Pause between one mascot and the next, in milliseconds.
82
+ *
83
+ * @returns {ReactNode} The wrapped element with the mascots behind it.
84
+ */
85
+ export function ExpPeek({ children, cast = STORY_CAST, size = 44, paused = false, visibleMs = 3000, gapMs = 2000, className, ...restProps }) {
86
+ const options = useExpScopeOptions();
87
+ const [peek, setPeek] = useState(null);
88
+ const [out, setOut] = useState(false);
89
+ const active = !!options && options.mascots !== 'hidden' && !paused;
90
+ const castKey = cast.map((group) => group.join(',')).join('|');
91
+ useEffect(() => {
92
+ const groups = castKey
93
+ .split('|')
94
+ .map((group) => group.split(','))
95
+ .filter((group) => group[0] !== '');
96
+ const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
97
+ if (!active || reduceMotion || groups.length === 0)
98
+ return;
99
+ let turn = 0;
100
+ const timers = [];
101
+ const later = (run, ms) => {
102
+ timers.push(setTimeout(run, ms));
103
+ };
104
+ const next = () => {
105
+ const group = groups[turn % groups.length];
106
+ turn += 1;
107
+ setPeek({
108
+ turn,
109
+ name: pick(group),
110
+ spot: pick(SPOTS),
111
+ along: Math.random(),
112
+ tilt: Math.round((Math.random() - 0.5) * 24),
113
+ });
114
+ later(() => setOut(true), RISE_DELAY_MS);
115
+ later(() => setOut(false), RISE_DELAY_MS + visibleMs);
116
+ later(next, RISE_DELAY_MS + visibleMs + HIDE_MS + gapMs);
117
+ };
118
+ later(next, FIRST_DELAY_MS);
119
+ return () => {
120
+ timers.forEach(clearTimeout);
121
+ setOut(false);
122
+ };
123
+ }, [active, castKey, visibleMs, gapMs]);
124
+ return (<div {...restProps} className={clsx('relative isolate', className)}>
125
+ {!!peek && (<span key={peek.turn} aria-hidden="true" className="pointer-events-none absolute z-0" style={peekStyle(peek, size, out && active)}>
126
+ <ExpMascot name={peek.name} size={size}/>
127
+ </span>)}
128
+ <div className="relative z-1">{children}</div>
129
+ </div>);
130
+ }
131
+ //# sourceMappingURL=ExpPeek.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpPeek.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpPeek/ExpPeek.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAgC1D,qDAAqD;AACrD,MAAM,UAAU,GAA0C;IACxD;QACE,wBAAwB;QACxB,2BAA2B;QAC3B,gCAAgC;KACjC;IACD,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,sBAAsB,CAAC;IACjE,CAAC,mBAAmB,EAAE,eAAe,EAAE,oBAAoB,CAAC;CAC7D,CAAC;AAEF,+DAA+D;AAC/D,MAAM,KAAK,GAAwB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAE1E,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,aAAa,GAAG,EAAE,CAAC;AACzB,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,MAAM,GAAG,8BAA8B,CAAC;AAC9C,MAAM,IAAI,GAAG,4BAA4B,CAAC;AAE1C,SAAS,IAAI,CAAI,KAAmB;IAClC,OAAO,KAAK,CAAC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CACL,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,SAAS,CAAC,CAAC,CACjE;MAAA,CAAC,CAAC,CAAC,IAAI,IAAI,CACT,CAAC,IAAI,CACH,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACf,WAAW,CAAC,MAAM,CAClB,SAAS,CAAC,kCAAkC,CAC5C,KAAK,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,CAE5C;UAAA,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EACzC;QAAA,EAAE,IAAI,CAAC,CACR,CACD;MAAA,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,QAAQ,CAAC,EAAE,GAAG,CAC/C;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpPeek } from './ExpPeek';
2
+ export type { ExpPeekProps } from './ExpPeek';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpPeek/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpPeek } from './ExpPeek';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpPeek/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,47 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export type ExpPillButtonTone = 'brand' | 'soft';
3
+ export type ExpPillButtonIcon = 'lens' | 'sync' | 'enter' | 'none';
4
+ export type ExpPillButtonProps = {
5
+ tone?: ExpPillButtonTone;
6
+ icon?: ExpPillButtonIcon;
7
+ /** Blocks the button and animates its glyph while the action runs. */
8
+ busy?: boolean;
9
+ /** Label shown while `busy`. Defaults to `children`. */
10
+ busyLabel?: string;
11
+ /** Takes the full width of its container. */
12
+ block?: boolean;
13
+ /** Fills the height of its container and does not lift, for a button inside a field. */
14
+ flush?: boolean;
15
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
16
+ /**
17
+ * Light pill-shaped call to action, the same 44px height as the core
18
+ * `Button`. `brand` is a filled lavender pill that turns into the clicOH
19
+ * gradient on hover, with its glyph in a white disc; `soft` is a tinted pill
20
+ * for secondary actions, such as a button inside a field.
21
+ *
22
+ * Outside an `ExpScope` it falls back to the core `Button`: `brand` maps to
23
+ * `principal` and `soft` to `second`.
24
+ *
25
+ * @component
26
+ * @example
27
+ * <ExpPillButton onClick={search}>Search</ExpPillButton>
28
+ *
29
+ * @example
30
+ * <ExpPillButton tone="soft" icon="sync" busy={isSyncing} busyLabel="Syncing…">
31
+ * Sync
32
+ * </ExpPillButton>
33
+ *
34
+ * @param {Object} props - The properties of the ExpPillButton component.
35
+ * @param {'brand' | 'soft'} [props.tone='brand'] - Filled lavender or tinted.
36
+ * @param {'lens' | 'sync' | 'enter' | 'none'} [props.icon='lens'] - Glyph before the label.
37
+ * @param {boolean} [props.busy=false] - Blocks the button and animates its glyph.
38
+ * @param {string} [props.busyLabel] - Label shown while `busy`.
39
+ * @param {boolean} [props.block=false] - Takes the full width of its container.
40
+ * @param {boolean} [props.flush=false] - Fills the height of its container and does not lift, for a button inside a field.
41
+ * @param {ReactNode} props.children - Label of the action.
42
+ * @param {ButtonHTMLAttributes<HTMLButtonElement>} restProps - Additional properties for the button element.
43
+ *
44
+ * @returns {ReactNode} The rendered pill, or a core `Button` outside an `ExpScope`.
45
+ */
46
+ export declare function ExpPillButton({ tone, icon, busy, busyLabel, block, flush, disabled, children, ...restProps }: ExpPillButtonProps): ReactNode;
47
+ //# sourceMappingURL=ExpPillButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpPillButton.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpPillButton/ExpPillButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAW7D,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,MAAM,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,sEAAsE;IACtE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,wFAAwF;IACxF,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAiC5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAc,EACd,IAAa,EACb,IAAY,EACZ,SAAS,EACT,KAAa,EACb,KAAa,EACb,QAAgB,EAChB,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,kBAAkB,GAAG,SAAS,CAiEhC"}
@@ -0,0 +1,77 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { FiLogIn, FiRefreshCw, FiSearch } from 'react-icons/fi';
4
+ import { Button } from '@clicoh/orion-library';
5
+ import { useExpScope } from '../ExpScope/ExpScope';
6
+ import { EnterGlyph, LensGlyph, SyncBadgeGlyph, SyncGlyph, } from '../shared/glyphs';
7
+ const fallbackIconMap = {
8
+ lens: <FiSearch />,
9
+ sync: <FiRefreshCw />,
10
+ enter: <FiLogIn />,
11
+ none: undefined,
12
+ };
13
+ const liftClass = 'hover:-translate-y-px active:translate-y-0 active:scale-[.98]';
14
+ const toneMap = {
15
+ brand: {
16
+ idle: clsx('bg-lavender dark:bg-lavender-dark text-white shadow-[0_3px_10px_rgba(106,93,249,0.22)]', 'hover:from-lavender hover:to-violet hover:bg-linear-135 hover:shadow-[0_8px_20px_rgba(200,84,228,0.28)]'),
17
+ busy: 'bg-lavender dark:bg-lavender-dark cursor-progress text-white shadow-[0_3px_10px_rgba(106,93,249,0.22)]',
18
+ disabled: 'bg-gray-5 text-gray-2 dark:bg-gray-dark-1 cursor-not-allowed',
19
+ },
20
+ soft: {
21
+ idle: clsx('bg-lavender-2 text-lavender dark:bg-lavender-dark-1 dark:text-lavender-dark', 'hover:bg-lavender-1'),
22
+ busy: 'bg-lavender-2 text-lavender dark:bg-lavender-dark-1 dark:text-lavender-dark cursor-progress',
23
+ disabled: 'bg-gray-5 text-gray-2 dark:bg-gray-dark-1 cursor-not-allowed',
24
+ },
25
+ };
26
+ /**
27
+ * Light pill-shaped call to action, the same 44px height as the core
28
+ * `Button`. `brand` is a filled lavender pill that turns into the clicOH
29
+ * gradient on hover, with its glyph in a white disc; `soft` is a tinted pill
30
+ * for secondary actions, such as a button inside a field.
31
+ *
32
+ * Outside an `ExpScope` it falls back to the core `Button`: `brand` maps to
33
+ * `principal` and `soft` to `second`.
34
+ *
35
+ * @component
36
+ * @example
37
+ * <ExpPillButton onClick={search}>Search</ExpPillButton>
38
+ *
39
+ * @example
40
+ * <ExpPillButton tone="soft" icon="sync" busy={isSyncing} busyLabel="Syncing…">
41
+ * Sync
42
+ * </ExpPillButton>
43
+ *
44
+ * @param {Object} props - The properties of the ExpPillButton component.
45
+ * @param {'brand' | 'soft'} [props.tone='brand'] - Filled lavender or tinted.
46
+ * @param {'lens' | 'sync' | 'enter' | 'none'} [props.icon='lens'] - Glyph before the label.
47
+ * @param {boolean} [props.busy=false] - Blocks the button and animates its glyph.
48
+ * @param {string} [props.busyLabel] - Label shown while `busy`.
49
+ * @param {boolean} [props.block=false] - Takes the full width of its container.
50
+ * @param {boolean} [props.flush=false] - Fills the height of its container and does not lift, for a button inside a field.
51
+ * @param {ReactNode} props.children - Label of the action.
52
+ * @param {ButtonHTMLAttributes<HTMLButtonElement>} restProps - Additional properties for the button element.
53
+ *
54
+ * @returns {ReactNode} The rendered pill, or a core `Button` outside an `ExpScope`.
55
+ */
56
+ export function ExpPillButton({ tone = 'brand', icon = 'lens', busy = false, busyLabel, block = false, flush = false, disabled = false, children, ...restProps }) {
57
+ const inScope = useExpScope();
58
+ const label = busy && busyLabel ? busyLabel : children;
59
+ if (!inScope) {
60
+ return (<Button {...restProps} modifier={tone === 'brand' ? 'principal' : 'second'} iconL={fallbackIconMap[icon]} disabled={disabled || busy} aria-busy={busy || undefined} className={clsx(block && 'w-full', restProps.className)}>
61
+ {label}
62
+ </Button>);
63
+ }
64
+ const state = disabled ? 'disabled' : busy ? 'busy' : 'idle';
65
+ const hasDisc = tone === 'brand' && (icon === 'lens' || icon === 'sync');
66
+ return (<button {...restProps} disabled={disabled || busy} aria-busy={busy || undefined} className={clsx('items-center gap-2.5 rounded-full text-sm leading-5 font-semibold whitespace-nowrap', 'transition-[background-color,box-shadow,translate,scale] duration-200 motion-reduce:translate-none motion-reduce:scale-none motion-reduce:transition-none', flush ? 'h-full' : 'h-11', !flush && state === 'idle' && liftClass, block ? 'flex w-full justify-center' : 'inline-flex', icon === 'none' && 'px-6', icon !== 'none' && (hasDisc ? 'pr-[22px] pl-1.5' : 'pr-[18px] pl-3'), toneMap[tone][state], restProps.className)}>
67
+ {tone === 'brand' && icon === 'lens' && (<span aria-hidden="true" className={clsx('flex size-8 shrink-0 items-center justify-center rounded-full', disabled ? 'bg-gray-6' : 'bg-white')}>
68
+ <LensGlyph size={22} busy={busy} disabled={disabled}/>
69
+ </span>)}
70
+ {tone === 'brand' && icon === 'sync' && (<SyncBadgeGlyph size={32} busy={busy} disabled={disabled}/>)}
71
+ {tone === 'soft' && icon === 'lens' && (<LensGlyph size={20} busy={busy} disabled={disabled}/>)}
72
+ {tone === 'soft' && icon === 'sync' && (<SyncGlyph size={20} busy={busy} disabled={disabled}/>)}
73
+ {icon === 'enter' && (<EnterGlyph size={20} busy={busy} disabled={disabled}/>)}
74
+ {label}
75
+ </button>);
76
+ }
77
+ //# sourceMappingURL=ExpPillButton.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpPillButton.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpPillButton/ExpPillButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EACL,UAAU,EACV,SAAS,EACT,cAAc,EACd,SAAS,GACV,MAAM,kBAAkB,CAAC;AAqB1B,MAAM,eAAe,GAAyC;IAC5D,IAAI,EAAE,CAAC,QAAQ,CAAC,AAAD,EAAG;IAClB,IAAI,EAAE,CAAC,WAAW,CAAC,AAAD,EAAG;IACrB,KAAK,EAAE,CAAC,OAAO,CAAC,AAAD,EAAG;IAClB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,SAAS,GACb,+DAA+D,CAAC;AAElE,MAAM,OAAO,GAAyD;IACpE,KAAK,EAAE;QACL,IAAI,EAAE,IAAI,CACR,wFAAwF,EACxF,yGAAyG,CAC1G;QACD,IAAI,EAAE,wGAAwG;QAC9G,QAAQ,EAAE,8DAA8D;KACzE;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,IAAI,CACR,6EAA6E,E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AA,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,IAAI,CACrC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CACxD,CACD;MAAA,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,MAAM,IAAI,CACrC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CACxD,CACD;MAAA,CAAC,IAAI,KAAK,OAAO,IAAI,CACnB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CACzD,CACD;MAAA,CAAC,KAAK,CACR;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpPillButton } from './ExpPillButton';
2
+ export type { ExpPillButtonIcon, ExpPillButtonProps, ExpPillButtonTone, } from './ExpPillButton';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpPillButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpPillButton } from './ExpPillButton';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpPillButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,28 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import { type ExpRepoAvatarName } from './catalog';
3
+ export type ExpRepoAvatarProps = {
4
+ name: ExpRepoAvatarName;
5
+ /** Width and height on screen, in pixels. */
6
+ size?: number;
7
+ } & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>;
8
+ /**
9
+ * Little creature that stands for a repository next to its name. Decorative:
10
+ * always `aria-hidden`, so the repo name next to it carries the meaning.
11
+ *
12
+ * Outside an `ExpScope`, or with `mascots="hidden"`, it renders nothing.
13
+ *
14
+ * @component
15
+ * @example
16
+ * <span className="flex items-center gap-2">
17
+ * <ExpRepoAvatar name="pulpo-lentes" size={36} />
18
+ * core-logistics
19
+ * </span>
20
+ *
21
+ * @param {ExpRepoAvatarProps} props - The properties of the ExpRepoAvatar component.
22
+ * @param {ExpRepoAvatarName} props.name - Avatar from the catalog.
23
+ * @param {number} [props.size=32] - Width and height on screen, in pixels.
24
+ *
25
+ * @returns {ReactNode} The avatar, or nothing outside an `ExpScope`.
26
+ */
27
+ export declare function ExpRepoAvatar({ name, size, ...restProps }: ExpRepoAvatarProps): ReactNode;
28
+ //# sourceMappingURL=ExpRepoAvatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpRepoAvatar.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpRepoAvatar/ExpRepoAvatar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,KAAK,iBAAiB,EAAqB,MAAM,WAAW,CAAC;AAEtE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,iBAAiB,CAAC;IACxB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,IAAS,EACT,GAAG,SAAS,EACb,EAAE,kBAAkB,GAAG,SAAS,CAqBhC"}
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { useExpScopeOptions } from '../ExpScope/ExpScope';
4
+ import { repoAvatarCatalog } from './catalog';
5
+ /**
6
+ * Little creature that stands for a repository next to its name. Decorative:
7
+ * always `aria-hidden`, so the repo name next to it carries the meaning.
8
+ *
9
+ * Outside an `ExpScope`, or with `mascots="hidden"`, it renders nothing.
10
+ *
11
+ * @component
12
+ * @example
13
+ * <span className="flex items-center gap-2">
14
+ * <ExpRepoAvatar name="pulpo-lentes" size={36} />
15
+ * core-logistics
16
+ * </span>
17
+ *
18
+ * @param {ExpRepoAvatarProps} props - The properties of the ExpRepoAvatar component.
19
+ * @param {ExpRepoAvatarName} props.name - Avatar from the catalog.
20
+ * @param {number} [props.size=32] - Width and height on screen, in pixels.
21
+ *
22
+ * @returns {ReactNode} The avatar, or nothing outside an `ExpScope`.
23
+ */
24
+ export function ExpRepoAvatar({ name, size = 32, ...restProps }) {
25
+ const options = useExpScopeOptions();
26
+ if (!options || options.mascots === 'hidden')
27
+ return null;
28
+ return (<span {...restProps} aria-hidden="true" className={clsx('inline-flex shrink-0', restProps.className)}>
29
+ <img src={repoAvatarCatalog[name].src} alt="" width={size} height={size} draggable={false} className="block object-contain"/>
30
+ </span>);
31
+ }
32
+ //# sourceMappingURL=ExpRepoAvatar.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpRepoAvatar.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpRepoAvatar/ExpRepoAvatar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAA0B,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAQtE;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EACJ,IAAI,GAAG,EAAE,EACT,GAAG,SAAS,EACO;IACnB,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE1D,OAAO,CACL,CAAC,IAAI,CACH,IAAI,SAAS,CAAC,CACd,WAAW,CAAC,MAAM,CAClB,SAAS,CAAC,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC,CAE7D;MAAA,CAAC,GAAG,CACF,GAAG,CAAC,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CACjC,GAAG,CAAC,EAAE,CACN,KAAK,CAAC,CAAC,IAAI,CAAC,CACZ,MAAM,CAAC,CAAC,IAAI,CAAC,CACb,SAAS,CAAC,CAAC,KAAK,CAAC,CACjB,SAAS,CAAC,sBAAsB,EAEpC;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { StaticImageData } from 'next/image';
2
+ /** Repo avatars, named after the drawing like their files. Which repo gets which one is the consumer's call. */
3
+ export type ExpRepoAvatarName = 'pulpo' | 'pulpo-lentes' | 'pulpo-verde' | 'cohete' | 'dino' | 'caja' | 'caja-chispa';
4
+ /** PNGs about 60px wide: sharp up to 30px on high-density screens. */
5
+ export declare const repoAvatarCatalog: Record<ExpRepoAvatarName, StaticImageData>;
6
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpRepoAvatar/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AASlD,gHAAgH;AAChH,MAAM,MAAM,iBAAiB,GACzB,OAAO,GACP,cAAc,GACd,aAAa,GACb,QAAQ,GACR,MAAM,GACN,MAAM,GACN,aAAa,CAAC;AAElB,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,eAAe,CAQxE,CAAC"}
@@ -0,0 +1,18 @@
1
+ import cajaChispa from '@clicoh/orion-library/assets/avatares/caja-chispa.png';
2
+ import caja from '@clicoh/orion-library/assets/avatares/caja.png';
3
+ import cohete from '@clicoh/orion-library/assets/avatares/cohete.png';
4
+ import dino from '@clicoh/orion-library/assets/avatares/dino.png';
5
+ import pulpoLentes from '@clicoh/orion-library/assets/avatares/pulpo-lentes.png';
6
+ import pulpoVerde from '@clicoh/orion-library/assets/avatares/pulpo-verde.png';
7
+ import pulpo from '@clicoh/orion-library/assets/avatares/pulpo.png';
8
+ /** PNGs about 60px wide: sharp up to 30px on high-density screens. */
9
+ export const repoAvatarCatalog = {
10
+ pulpo,
11
+ 'pulpo-lentes': pulpoLentes,
12
+ 'pulpo-verde': pulpoVerde,
13
+ cohete,
14
+ dino,
15
+ caja,
16
+ 'caja-chispa': cajaChispa,
17
+ };
18
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/expresivo/ExpRepoAvatar/catalog.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,uDAAuD,CAAC;AAC/E,OAAO,IAAI,MAAM,gDAAgD,CAAC;AAClE,OAAO,MAAM,MAAM,kDAAkD,CAAC;AACtE,OAAO,IAAI,MAAM,gDAAgD,CAAC;AAClE,OAAO,WAAW,MAAM,wDAAwD,CAAC;AACjF,OAAO,UAAU,MAAM,uDAAuD,CAAC;AAC/E,OAAO,KAAK,MAAM,iDAAiD,CAAC;AAYpE,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAA+C;IAC3E,KAAK;IACL,cAAc,EAAE,WAAW;IAC3B,aAAa,EAAE,UAAU;IACzB,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,aAAa,EAAE,UAAU;CAC1B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ExpRepoAvatar } from './ExpRepoAvatar';
2
+ export type { ExpRepoAvatarProps } from './ExpRepoAvatar';
3
+ export type { ExpRepoAvatarName } from './catalog';
4
+ //# sourceMappingURL=index.d.ts.map