@clicoh/orion-library 1.2.0-beta.12 → 1.2.0-beta.13

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 (211) hide show
  1. package/assets/css/expresivo.css +895 -0
  2. package/assets/mascotas/svg/bugi-mascota-01-alerta.svg +39 -0
  3. package/assets/mascotas/svg/bugi-mascota-02-investigando.svg +36 -0
  4. package/assets/mascotas/svg/bugi-mascota-05-sorprendido.svg +38 -0
  5. package/assets/mascotas/svg/oculus-mascota-01-feliz.svg +52 -0
  6. package/assets/mascotas/svg/oculus-mascota-02-investigando.svg +51 -0
  7. package/assets/mascotas/svg/oculus-mascota-03-dudando.svg +51 -0
  8. package/assets/mascotas/svg/oculus-mascota-04-analizando-documento.svg +53 -0
  9. package/assets/mascotas/svg/oculus-mascota-06-celebrando.svg +54 -0
  10. package/assets/mascotas/svg/oculus-mascota-07-buscando-rapido.svg +57 -0
  11. package/assets/mascotas/svg/oculus-mascota-08-satisfecho.svg +55 -0
  12. package/assets/mascotas/webp/fixi-mascota-01-feliz-sm.webp +0 -0
  13. package/assets/mascotas/webp/fixi-mascota-02-investigando-sm.webp +0 -0
  14. package/assets/mascotas/webp/fixi-mascota-03-dudando-sm.webp +0 -0
  15. package/assets/mascotas/webp/fixi-mascota-04-reparando-sm.webp +0 -0
  16. package/assets/mascotas/webp/fixi-mascota-05-sorprendido-sm.webp +0 -0
  17. package/assets/mascotas/webp/fixi-mascota-06-celebrando-sm.webp +0 -0
  18. package/assets/mascotas/webp/fixi-mascota-07-corriendo-sm.webp +0 -0
  19. package/dist/components/01-atoms/Button/Button.d.ts +18 -1
  20. package/dist/components/01-atoms/Button/Button.d.ts.map +1 -1
  21. package/dist/components/01-atoms/Button/Button.jsx +25 -5
  22. package/dist/components/01-atoms/Button/Button.jsx.map +1 -1
  23. package/dist/components/01-atoms/Heading/Heading.jsx +1 -1
  24. package/dist/components/01-atoms/Heading/Heading.jsx.map +1 -1
  25. package/dist/components/01-atoms/Input/Input.d.ts.map +1 -1
  26. package/dist/components/01-atoms/Input/Input.jsx +9 -7
  27. package/dist/components/01-atoms/Input/Input.jsx.map +1 -1
  28. package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.d.ts.map +1 -1
  29. package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.jsx +1 -1
  30. package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.jsx.map +1 -1
  31. package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
  32. package/dist/components/01-atoms/Select/Select.jsx +7 -7
  33. package/dist/components/01-atoms/Select/Select.jsx.map +1 -1
  34. package/dist/components/01-atoms/Spinner/Spinner.d.ts +24 -3
  35. package/dist/components/01-atoms/Spinner/Spinner.d.ts.map +1 -1
  36. package/dist/components/01-atoms/Spinner/Spinner.jsx +30 -4
  37. package/dist/components/01-atoms/Spinner/Spinner.jsx.map +1 -1
  38. package/dist/components/01-atoms/Spinner/index.d.ts +1 -0
  39. package/dist/components/01-atoms/Spinner/index.d.ts.map +1 -1
  40. package/dist/components/01-atoms/Stat/Stat.d.ts +4 -1
  41. package/dist/components/01-atoms/Stat/Stat.d.ts.map +1 -1
  42. package/dist/components/01-atoms/Stat/Stat.jsx +6 -2
  43. package/dist/components/01-atoms/Stat/Stat.jsx.map +1 -1
  44. package/dist/components/01-atoms/Textarea/Textarea.d.ts.map +1 -1
  45. package/dist/components/01-atoms/Textarea/Textarea.jsx +3 -3
  46. package/dist/components/01-atoms/Textarea/Textarea.jsx.map +1 -1
  47. package/dist/components/02-molecules/Accordion/AccordionSection.d.ts.map +1 -1
  48. package/dist/components/02-molecules/Accordion/AccordionSection.jsx +26 -3
  49. package/dist/components/02-molecules/Accordion/AccordionSection.jsx.map +1 -1
  50. package/dist/components/02-molecules/Card/Card.d.ts +74 -0
  51. package/dist/components/02-molecules/Card/Card.d.ts.map +1 -0
  52. package/dist/components/02-molecules/Card/Card.jsx +83 -0
  53. package/dist/components/02-molecules/Card/Card.jsx.map +1 -0
  54. package/dist/components/02-molecules/Card/index.d.ts +2 -0
  55. package/dist/components/02-molecules/Card/index.d.ts.map +1 -0
  56. package/dist/components/02-molecules/Card/index.js +2 -0
  57. package/dist/components/02-molecules/Card/index.js.map +1 -0
  58. package/dist/components/02-molecules/DatePicker/DatePicker.d.ts +37 -2
  59. package/dist/components/02-molecules/DatePicker/DatePicker.d.ts.map +1 -1
  60. package/dist/components/02-molecules/DatePicker/DatePicker.jsx +187 -32
  61. package/dist/components/02-molecules/DatePicker/DatePicker.jsx.map +1 -1
  62. package/dist/components/02-molecules/EmptyState/EmptyState.d.ts +52 -0
  63. package/dist/components/02-molecules/EmptyState/EmptyState.d.ts.map +1 -0
  64. package/dist/components/02-molecules/EmptyState/EmptyState.jsx +66 -0
  65. package/dist/components/02-molecules/EmptyState/EmptyState.jsx.map +1 -0
  66. package/dist/components/02-molecules/EmptyState/index.d.ts +2 -0
  67. package/dist/components/02-molecules/EmptyState/index.d.ts.map +1 -0
  68. package/dist/components/02-molecules/EmptyState/index.js +2 -0
  69. package/dist/components/02-molecules/EmptyState/index.js.map +1 -0
  70. package/dist/components/02-molecules/Filter/Filter.d.ts +7 -1
  71. package/dist/components/02-molecules/Filter/Filter.d.ts.map +1 -1
  72. package/dist/components/02-molecules/Filter/Filter.jsx +10 -7
  73. package/dist/components/02-molecules/Filter/Filter.jsx.map +1 -1
  74. package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts +15 -1
  75. package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts.map +1 -1
  76. package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx +18 -3
  77. package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx.map +1 -1
  78. package/dist/components/02-molecules/Menu/MenuItem.d.ts.map +1 -1
  79. package/dist/components/02-molecules/Menu/MenuItem.jsx +2 -2
  80. package/dist/components/02-molecules/Menu/MenuItem.jsx.map +1 -1
  81. package/dist/components/02-molecules/Menu/MenuList.d.ts.map +1 -1
  82. package/dist/components/02-molecules/Menu/MenuList.jsx +1 -1
  83. package/dist/components/02-molecules/Menu/MenuList.jsx.map +1 -1
  84. package/dist/components/02-molecules/Table/Table.d.ts +3 -1
  85. package/dist/components/02-molecules/Table/Table.d.ts.map +1 -1
  86. package/dist/components/02-molecules/Table/Table.jsx +6 -5
  87. package/dist/components/02-molecules/Table/Table.jsx.map +1 -1
  88. package/dist/components/02-molecules/index.d.ts +2 -0
  89. package/dist/components/02-molecules/index.d.ts.map +1 -1
  90. package/dist/components/02-molecules/index.js +2 -0
  91. package/dist/components/02-molecules/index.js.map +1 -1
  92. package/dist/components/03-organisms/DataTable/DataTable.d.ts +1 -1
  93. package/dist/components/03-organisms/DataTable/DataTable.d.ts.map +1 -1
  94. package/dist/components/03-organisms/DataTable/DataTable.jsx.map +1 -1
  95. package/dist/components/03-organisms/Header/Header.d.ts +3 -1
  96. package/dist/components/03-organisms/Header/Header.d.ts.map +1 -1
  97. package/dist/components/03-organisms/Header/Header.jsx +4 -5
  98. package/dist/components/03-organisms/Header/Header.jsx.map +1 -1
  99. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts +24 -4
  100. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts.map +1 -1
  101. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx +31 -8
  102. package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx.map +1 -1
  103. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.d.ts +6 -2
  104. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.d.ts.map +1 -1
  105. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.jsx +7 -3
  106. package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.jsx.map +1 -1
  107. package/dist/components/04-templates/LoginTemplate/LoginTemplate.d.ts +2 -0
  108. package/dist/components/04-templates/LoginTemplate/LoginTemplate.d.ts.map +1 -1
  109. package/dist/components/04-templates/LoginTemplate/LoginTemplate.jsx +2 -1
  110. package/dist/components/04-templates/LoginTemplate/LoginTemplate.jsx.map +1 -1
  111. package/expresivo/ExpBubble/ExpBubble.d.ts +51 -0
  112. package/expresivo/ExpBubble/ExpBubble.d.ts.map +1 -0
  113. package/expresivo/ExpBubble/ExpBubble.jsx +74 -0
  114. package/expresivo/ExpBubble/ExpBubble.jsx.map +1 -0
  115. package/expresivo/ExpBubble/index.d.ts +3 -0
  116. package/expresivo/ExpBubble/index.d.ts.map +1 -0
  117. package/expresivo/ExpBubble/index.js +2 -0
  118. package/expresivo/ExpBubble/index.js.map +1 -0
  119. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.d.ts +37 -0
  120. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.d.ts.map +1 -0
  121. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.jsx +43 -0
  122. package/expresivo/ExpCollapseToggle/ExpCollapseToggle.jsx.map +1 -0
  123. package/expresivo/ExpCollapseToggle/index.d.ts +3 -0
  124. package/expresivo/ExpCollapseToggle/index.d.ts.map +1 -0
  125. package/expresivo/ExpCollapseToggle/index.js +2 -0
  126. package/expresivo/ExpCollapseToggle/index.js.map +1 -0
  127. package/expresivo/ExpGrowBar/ExpGrowBar.d.ts +26 -0
  128. package/expresivo/ExpGrowBar/ExpGrowBar.d.ts.map +1 -0
  129. package/expresivo/ExpGrowBar/ExpGrowBar.jsx +39 -0
  130. package/expresivo/ExpGrowBar/ExpGrowBar.jsx.map +1 -0
  131. package/expresivo/ExpGrowBar/index.d.ts +3 -0
  132. package/expresivo/ExpGrowBar/index.d.ts.map +1 -0
  133. package/expresivo/ExpGrowBar/index.js +2 -0
  134. package/expresivo/ExpGrowBar/index.js.map +1 -0
  135. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts +65 -0
  136. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts.map +1 -0
  137. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx +156 -0
  138. package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx.map +1 -0
  139. package/expresivo/ExpJourneyTrack/index.d.ts +3 -0
  140. package/expresivo/ExpJourneyTrack/index.d.ts.map +1 -0
  141. package/expresivo/ExpJourneyTrack/index.js +2 -0
  142. package/expresivo/ExpJourneyTrack/index.js.map +1 -0
  143. package/expresivo/ExpKeyButton/ExpKeyButton.d.ts +49 -0
  144. package/expresivo/ExpKeyButton/ExpKeyButton.d.ts.map +1 -0
  145. package/expresivo/ExpKeyButton/ExpKeyButton.jsx +60 -0
  146. package/expresivo/ExpKeyButton/ExpKeyButton.jsx.map +1 -0
  147. package/expresivo/ExpKeyButton/index.d.ts +3 -0
  148. package/expresivo/ExpKeyButton/index.d.ts.map +1 -0
  149. package/expresivo/ExpKeyButton/index.js +2 -0
  150. package/expresivo/ExpKeyButton/index.js.map +1 -0
  151. package/expresivo/ExpLensIcon/ExpLensIcon.d.ts +29 -0
  152. package/expresivo/ExpLensIcon/ExpLensIcon.d.ts.map +1 -0
  153. package/expresivo/ExpLensIcon/ExpLensIcon.jsx +29 -0
  154. package/expresivo/ExpLensIcon/ExpLensIcon.jsx.map +1 -0
  155. package/expresivo/ExpLensIcon/index.d.ts +3 -0
  156. package/expresivo/ExpLensIcon/index.d.ts.map +1 -0
  157. package/expresivo/ExpLensIcon/index.js +2 -0
  158. package/expresivo/ExpLensIcon/index.js.map +1 -0
  159. package/expresivo/ExpMascot/ExpMascot.d.ts +38 -0
  160. package/expresivo/ExpMascot/ExpMascot.d.ts.map +1 -0
  161. package/expresivo/ExpMascot/ExpMascot.jsx +41 -0
  162. package/expresivo/ExpMascot/ExpMascot.jsx.map +1 -0
  163. package/expresivo/ExpMascot/catalog.d.ts +12 -0
  164. package/expresivo/ExpMascot/catalog.d.ts.map +1 -0
  165. package/expresivo/ExpMascot/catalog.js +41 -0
  166. package/expresivo/ExpMascot/catalog.js.map +1 -0
  167. package/expresivo/ExpMascot/index.d.ts +4 -0
  168. package/expresivo/ExpMascot/index.d.ts.map +1 -0
  169. package/expresivo/ExpMascot/index.js +2 -0
  170. package/expresivo/ExpMascot/index.js.map +1 -0
  171. package/expresivo/ExpMedalBadge/ExpMedalBadge.d.ts +29 -0
  172. package/expresivo/ExpMedalBadge/ExpMedalBadge.d.ts.map +1 -0
  173. package/expresivo/ExpMedalBadge/ExpMedalBadge.jsx +87 -0
  174. package/expresivo/ExpMedalBadge/ExpMedalBadge.jsx.map +1 -0
  175. package/expresivo/ExpMedalBadge/index.d.ts +3 -0
  176. package/expresivo/ExpMedalBadge/index.d.ts.map +1 -0
  177. package/expresivo/ExpMedalBadge/index.js +2 -0
  178. package/expresivo/ExpMedalBadge/index.js.map +1 -0
  179. package/expresivo/ExpPillButton/ExpPillButton.d.ts +44 -0
  180. package/expresivo/ExpPillButton/ExpPillButton.d.ts.map +1 -0
  181. package/expresivo/ExpPillButton/ExpPillButton.jsx +75 -0
  182. package/expresivo/ExpPillButton/ExpPillButton.jsx.map +1 -0
  183. package/expresivo/ExpPillButton/index.d.ts +3 -0
  184. package/expresivo/ExpPillButton/index.d.ts.map +1 -0
  185. package/expresivo/ExpPillButton/index.js +2 -0
  186. package/expresivo/ExpPillButton/index.js.map +1 -0
  187. package/expresivo/ExpScope/ExpScope.d.ts +63 -0
  188. package/expresivo/ExpScope/ExpScope.d.ts.map +1 -0
  189. package/expresivo/ExpScope/ExpScope.jsx +67 -0
  190. package/expresivo/ExpScope/ExpScope.jsx.map +1 -0
  191. package/expresivo/ExpScope/index.d.ts +3 -0
  192. package/expresivo/ExpScope/index.d.ts.map +1 -0
  193. package/expresivo/ExpScope/index.js +2 -0
  194. package/expresivo/ExpScope/index.js.map +1 -0
  195. package/expresivo/ExpScoreRing/ExpScoreRing.d.ts +35 -0
  196. package/expresivo/ExpScoreRing/ExpScoreRing.d.ts.map +1 -0
  197. package/expresivo/ExpScoreRing/ExpScoreRing.jsx +67 -0
  198. package/expresivo/ExpScoreRing/ExpScoreRing.jsx.map +1 -0
  199. package/expresivo/ExpScoreRing/index.d.ts +3 -0
  200. package/expresivo/ExpScoreRing/index.d.ts.map +1 -0
  201. package/expresivo/ExpScoreRing/index.js +2 -0
  202. package/expresivo/ExpScoreRing/index.js.map +1 -0
  203. package/expresivo/index.d.ts +12 -0
  204. package/expresivo/index.d.ts.map +1 -0
  205. package/expresivo/index.js +12 -0
  206. package/expresivo/index.js.map +1 -0
  207. package/expresivo/shared/glyphs.d.ts +20 -0
  208. package/expresivo/shared/glyphs.d.ts.map +1 -0
  209. package/expresivo/shared/glyphs.jsx +60 -0
  210. package/expresivo/shared/glyphs.jsx.map +1 -0
  211. package/package.json +3 -2
@@ -0,0 +1,41 @@
1
+ import bugi01 from '@clicoh/orion-library/assets/mascotas/svg/bugi-mascota-01-alerta.svg';
2
+ import bugi02 from '@clicoh/orion-library/assets/mascotas/svg/bugi-mascota-02-investigando.svg';
3
+ import bugi05 from '@clicoh/orion-library/assets/mascotas/svg/bugi-mascota-05-sorprendido.svg';
4
+ import oculus01 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-01-feliz.svg';
5
+ import oculus02 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-02-investigando.svg';
6
+ import oculus03 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-03-dudando.svg';
7
+ import oculus04 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-04-analizando-documento.svg';
8
+ import oculus06 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-06-celebrando.svg';
9
+ import oculus07 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-07-buscando-rapido.svg';
10
+ import oculus08 from '@clicoh/orion-library/assets/mascotas/svg/oculus-mascota-08-satisfecho.svg';
11
+ import fixi01 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-01-feliz-sm.webp';
12
+ import fixi02 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-02-investigando-sm.webp';
13
+ import fixi03 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-03-dudando-sm.webp';
14
+ import fixi04 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-04-reparando-sm.webp';
15
+ import fixi05 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-05-sorprendido-sm.webp';
16
+ import fixi06 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-06-celebrando-sm.webp';
17
+ import fixi07 from '@clicoh/orion-library/assets/mascotas/webp/fixi-mascota-07-corriendo-sm.webp';
18
+ /**
19
+ * Oculus and Bugi are vectors. Fixi is a 256px WebP, sharp up to 128px on
20
+ * high-density screens.
21
+ */
22
+ export const mascotCatalog = {
23
+ 'oculus-01-feliz': oculus01,
24
+ 'oculus-02-investigando': oculus02,
25
+ 'oculus-03-dudando': oculus03,
26
+ 'oculus-04-analizando-documento': oculus04,
27
+ 'oculus-06-celebrando': oculus06,
28
+ 'oculus-07-buscando-rapido': oculus07,
29
+ 'oculus-08-satisfecho': oculus08,
30
+ 'bugi-01-alerta': bugi01,
31
+ 'bugi-02-investigando': bugi02,
32
+ 'bugi-05-sorprendido': bugi05,
33
+ 'fixi-01-feliz': fixi01,
34
+ 'fixi-02-investigando': fixi02,
35
+ 'fixi-03-dudando': fixi03,
36
+ 'fixi-04-reparando': fixi04,
37
+ 'fixi-05-sorprendido': fixi05,
38
+ 'fixi-06-celebrando': fixi06,
39
+ 'fixi-07-corriendo': fixi07,
40
+ };
41
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/expresivo/ExpMascot/catalog.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,sEAAsE,CAAC;AAC1F,OAAO,MAAM,MAAM,4EAA4E,CAAC;AAChG,OAAO,MAAM,MAAM,2EAA2E,CAAC;AAC/F,OAAO,QAAQ,MAAM,uEAAuE,CAAC;AAC7F,OAAO,QAAQ,MAAM,8EAA8E,CAAC;AACpG,OAAO,QAAQ,MAAM,yEAAyE,CAAC;AAC/F,OAAO,QAAQ,MAAM,sFAAsF,CAAC;AAC5G,OAAO,QAAQ,MAAM,4EAA4E,CAAC;AAClG,OAAO,QAAQ,MAAM,iFAAiF,CAAC;AACvG,OAAO,QAAQ,MAAM,4EAA4E,CAAC;AAClG,OAAO,MAAM,MAAM,0EAA0E,CAAC;AAC9F,OAAO,MAAM,MAAM,iFAAiF,CAAC;AACrG,OAAO,MAAM,MAAM,4EAA4E,CAAC;AAChG,OAAO,MAAM,MAAM,8EAA8E,CAAC;AAClG,OAAO,MAAM,MAAM,gFAAgF,CAAC;AACpG,OAAO,MAAM,MAAM,+EAA+E,CAAC;AACnG,OAAO,MAAM,MAAM,8EAA8E,CAAC;AAyBlG;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAA2C;IACnE,iBAAiB,EAAE,QAAQ;IAC3B,wBAAwB,EAAE,QAAQ;IAClC,mBAAmB,EAAE,QAAQ;IAC7B,gCAAgC,EAAE,QAAQ;IAC1C,sBAAsB,EAAE,QAAQ;IAChC,2BAA2B,EAAE,QAAQ;IACrC,sBAAsB,EAAE,QAAQ;IAChC,gBAAgB,EAAE,MAAM;IACxB,sBAAsB,EAAE,MAAM;IAC9B,qBAAqB,EAAE,MAAM;IAC7B,eAAe,EAAE,MAAM;IACvB,sBAAsB,EAAE,MAAM;IAC9B,iBAAiB,EAAE,MAAM;IACzB,mBAAmB,EAAE,MAAM;IAC3B,qBAAqB,EAAE,MAAM;IAC7B,oBAAoB,EAAE,MAAM;IAC5B,mBAAmB,EAAE,MAAM;CAC5B,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ExpMascot } from './ExpMascot';
2
+ export type { ExpMascotMotion, ExpMascotProps } from './ExpMascot';
3
+ export type { ExpMascotName } from './catalog';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpMascot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnE,YAAY,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpMascot } from './ExpMascot';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpMascot/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ export type ExpMedalBadgeModifier = 'success' | 'warning' | 'error' | 'info' | 'progress' | 'disabled';
3
+ export type ExpMedalBadgeProps = {
4
+ modifier: ExpMedalBadgeModifier;
5
+ /** One character or a tiny icon inside the medal. */
6
+ glyph?: ReactNode;
7
+ children: ReactNode;
8
+ } & Omit<HTMLAttributes<HTMLSpanElement>, 'children'>;
9
+ /**
10
+ * Status badge drawn as an octagonal medal with a ribbon, pinned to a tinted
11
+ * pill. Same status modifiers as the core `Badge`; the label carries the
12
+ * message and the medal only decorates it.
13
+ *
14
+ * Outside an `ExpScope` it falls back to the core `Badge` with the same
15
+ * `modifier`.
16
+ *
17
+ * @component
18
+ * @example
19
+ * <ExpMedalBadge modifier="success" glyph="✓">Passed</ExpMedalBadge>
20
+ *
21
+ * @param {Object} props - The properties of the ExpMedalBadge component.
22
+ * @param {'success' | 'warning' | 'error' | 'info' | 'progress' | 'disabled'} props.modifier - Status color.
23
+ * @param {ReactNode} [props.glyph='•'] - One character or a tiny icon inside the medal.
24
+ * @param {ReactNode} props.children - Label of the status.
25
+ *
26
+ * @returns {ReactNode} The medal badge, or a core `Badge` outside an `ExpScope`.
27
+ */
28
+ export declare function ExpMedalBadge({ modifier, glyph, children, ...restProps }: ExpMedalBadgeProps): ReactNode;
29
+ //# sourceMappingURL=ExpMedalBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpMedalBadge.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpMedalBadge/ExpMedalBadge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,MAAM,MAAM,qBAAqB,GAC7B,SAAS,GACT,SAAS,GACT,OAAO,GACP,MAAM,GACN,UAAU,GACV,UAAU,CAAC;AAEf,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,qBAAqB,CAAC;IAChC,qDAAqD;IACrD,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,CAAC;AAgDtD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,KAAW,EACX,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,kBAAkB,GAAG,SAAS,CAkDhC"}
@@ -0,0 +1,87 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { Badge } from '@clicoh/orion-library';
4
+ import { useExpScope } from '../ExpScope/ExpScope';
5
+ // The ribbon and the pill label use the strong shade: the base `warning`
6
+ // and `success` hues sit below 4.5:1 on their tint.
7
+ const colorMap = {
8
+ success: {
9
+ ring: 'bg-success',
10
+ ribbon: 'bg-success-strong',
11
+ pill: 'border-success bg-success-1 text-success-strong dark:bg-success/16 dark:text-success',
12
+ },
13
+ warning: {
14
+ ring: 'bg-amber',
15
+ ribbon: 'bg-amber-strong',
16
+ pill: 'border-amber bg-warning-1 text-amber-strong dark:bg-warning/16 dark:text-amber',
17
+ },
18
+ error: {
19
+ ring: 'bg-error',
20
+ ribbon: 'bg-error-strong',
21
+ pill: 'border-error bg-error-1 text-error-strong dark:bg-error/16 dark:text-error',
22
+ },
23
+ info: {
24
+ ring: 'bg-info',
25
+ ribbon: 'bg-info-dark-3 dark:bg-info',
26
+ pill: 'border-info bg-info-1 text-info-dark-3 dark:bg-info/16 dark:text-info',
27
+ },
28
+ progress: {
29
+ ring: 'bg-lavender',
30
+ ribbon: 'bg-lavender',
31
+ pill: 'border-lavender bg-lavender-2 text-lavender dark:bg-lavender/18 dark:text-lavender',
32
+ },
33
+ disabled: {
34
+ ring: 'bg-gray-1',
35
+ ribbon: 'bg-gray-1',
36
+ pill: 'border-gray-1 bg-gray-6 text-gray-1 dark:bg-gray-2/16 dark:text-gray-2',
37
+ },
38
+ };
39
+ const glyphColorMap = {
40
+ success: 'text-success',
41
+ warning: 'text-amber',
42
+ error: 'text-error',
43
+ info: 'text-info',
44
+ progress: 'text-lavender',
45
+ disabled: 'text-gray-1 dark:text-gray-2',
46
+ };
47
+ /**
48
+ * Status badge drawn as an octagonal medal with a ribbon, pinned to a tinted
49
+ * pill. Same status modifiers as the core `Badge`; the label carries the
50
+ * message and the medal only decorates it.
51
+ *
52
+ * Outside an `ExpScope` it falls back to the core `Badge` with the same
53
+ * `modifier`.
54
+ *
55
+ * @component
56
+ * @example
57
+ * <ExpMedalBadge modifier="success" glyph="✓">Passed</ExpMedalBadge>
58
+ *
59
+ * @param {Object} props - The properties of the ExpMedalBadge component.
60
+ * @param {'success' | 'warning' | 'error' | 'info' | 'progress' | 'disabled'} props.modifier - Status color.
61
+ * @param {ReactNode} [props.glyph='•'] - One character or a tiny icon inside the medal.
62
+ * @param {ReactNode} props.children - Label of the status.
63
+ *
64
+ * @returns {ReactNode} The medal badge, or a core `Badge` outside an `ExpScope`.
65
+ */
66
+ export function ExpMedalBadge({ modifier, glyph = '•', children, ...restProps }) {
67
+ const inScope = useExpScope();
68
+ if (!inScope) {
69
+ return (<Badge {...restProps} modifier={modifier}>
70
+ {children}
71
+ </Badge>);
72
+ }
73
+ const colors = colorMap[modifier];
74
+ return (<span {...restProps} className={clsx('relative inline-flex h-[22px] items-center pl-2.5 whitespace-nowrap', restProps.className)}>
75
+ <span className={clsx('inline-flex h-[18px] items-center rounded-full border pr-2 pl-3.5 text-[11px] leading-4 font-semibold', colors.pill)}>
76
+ {children}
77
+ </span>
78
+ <span aria-hidden="true" className="absolute top-px left-0 size-5">
79
+ <span className={clsx('exp-medal-ribbon absolute top-3 left-[5px] h-[11px] w-2.5', colors.ribbon)}/>
80
+ <span className={clsx('exp-medal-octagon absolute inset-0', colors.ring)}/>
81
+ <span className={clsx('exp-medal-octagon absolute inset-0.5 flex items-center justify-center bg-white text-[10px] leading-none font-extrabold dark:bg-black', glyphColorMap[modifier])}>
82
+ {glyph}
83
+ </span>
84
+ </span>
85
+ </span>);
86
+ }
87
+ //# sourceMappingURL=ExpMedalBadge.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpMedalBadge.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpMedalBadge/ExpMedalBadge.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAmBnD,yEAAyE;AACzE,oDAAoD;AACpD,MAAM,QAAQ,GAA+C;IAC3D,OAAO,EAAE;QACP,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,mBAAmB;QAC3B,IAAI,EAAE,sFAAsF;KAC7F;IACD,OAAO,EAAE;QACP,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,iBAAiB;QACzB,IAAI,EAAE,gFAAgF;KACvF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,UAAU;QAChB,MAAM,EAAE,iBAAiB;QACzB,IAAI,EAAE,4EAA4E;KACnF;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,6BAA6B;QACrC,IAAI,EAAE,uEAAuE;KAC9E;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,aAAa;QACnB,MAAM,EAAE,aAAa;QACrB,I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C,IAAI,CACH,SAAS,CAAC,CAAC,IAAI,CAAC,oCAAoC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,EAErE;QAAA,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,IAAI,CACb,sIAAsI,EACtI,aAAa,CAAC,QAAQ,CAAC,CACxB,CAAC,CAEF;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpMedalBadge } from './ExpMedalBadge';
2
+ export type { ExpMedalBadgeModifier, ExpMedalBadgeProps, } from './ExpMedalBadge';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpMedalBadge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpMedalBadge } from './ExpMedalBadge';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpMedalBadge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,44 @@
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
+ } & ButtonHTMLAttributes<HTMLButtonElement>;
14
+ /**
15
+ * Light pill-shaped call to action, the same 44px height as the core
16
+ * `Button`. `brand` is a filled lavender pill that turns into the clicOH
17
+ * gradient on hover, with its glyph in a white disc; `soft` is a tinted pill
18
+ * for secondary actions, such as a button inside a field.
19
+ *
20
+ * Outside an `ExpScope` it falls back to the core `Button`: `brand` maps to
21
+ * `principal` and `soft` to `second`.
22
+ *
23
+ * @component
24
+ * @example
25
+ * <ExpPillButton onClick={search}>Search</ExpPillButton>
26
+ *
27
+ * @example
28
+ * <ExpPillButton tone="soft" icon="sync" busy={isSyncing} busyLabel="Syncing…">
29
+ * Sync
30
+ * </ExpPillButton>
31
+ *
32
+ * @param {Object} props - The properties of the ExpPillButton component.
33
+ * @param {'brand' | 'soft'} [props.tone='brand'] - Filled lavender or tinted.
34
+ * @param {'lens' | 'sync' | 'enter' | 'none'} [props.icon='lens'] - Glyph before the label.
35
+ * @param {boolean} [props.busy=false] - Blocks the button and animates its glyph.
36
+ * @param {string} [props.busyLabel] - Label shown while `busy`.
37
+ * @param {boolean} [props.block=false] - Takes the full width of its container.
38
+ * @param {ReactNode} props.children - Label of the action.
39
+ * @param {ButtonHTMLAttributes<HTMLButtonElement>} restProps - Additional properties for the button element.
40
+ *
41
+ * @returns {ReactNode} The rendered pill, or a core `Button` outside an `ExpScope`.
42
+ */
43
+ export declare function ExpPillButton({ tone, icon, busy, busyLabel, block, disabled, children, ...restProps }: ExpPillButtonProps): ReactNode;
44
+ //# 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;CACjB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AA+B5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAc,EACd,IAAa,EACb,IAAY,EACZ,SAAS,EACT,KAAa,EACb,QAAgB,EAChB,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,kBAAkB,GAAG,SAAS,CA+DhC"}
@@ -0,0 +1,75 @@
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 toneMap = {
14
+ brand: {
15
+ 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)]', 'hover:-translate-y-px active:translate-y-0 active:scale-[.98]'),
16
+ busy: 'bg-lavender dark:bg-lavender-dark cursor-progress text-white shadow-[0_3px_10px_rgba(106,93,249,0.22)]',
17
+ disabled: 'bg-gray-5 text-gray-2 dark:bg-gray-dark-1 cursor-not-allowed',
18
+ },
19
+ soft: {
20
+ idle: clsx('bg-lavender-2 text-lavender dark:bg-lavender-dark-1 dark:text-lavender-dark', 'hover:bg-lavender-1 hover:-translate-y-px active:translate-y-0 active:scale-[.98]'),
21
+ busy: 'bg-lavender-2 text-lavender dark:bg-lavender-dark-1 dark:text-lavender-dark cursor-progress',
22
+ disabled: 'bg-gray-5 text-gray-2 dark:bg-gray-dark-1 cursor-not-allowed',
23
+ },
24
+ };
25
+ /**
26
+ * Light pill-shaped call to action, the same 44px height as the core
27
+ * `Button`. `brand` is a filled lavender pill that turns into the clicOH
28
+ * gradient on hover, with its glyph in a white disc; `soft` is a tinted pill
29
+ * for secondary actions, such as a button inside a field.
30
+ *
31
+ * Outside an `ExpScope` it falls back to the core `Button`: `brand` maps to
32
+ * `principal` and `soft` to `second`.
33
+ *
34
+ * @component
35
+ * @example
36
+ * <ExpPillButton onClick={search}>Search</ExpPillButton>
37
+ *
38
+ * @example
39
+ * <ExpPillButton tone="soft" icon="sync" busy={isSyncing} busyLabel="Syncing…">
40
+ * Sync
41
+ * </ExpPillButton>
42
+ *
43
+ * @param {Object} props - The properties of the ExpPillButton component.
44
+ * @param {'brand' | 'soft'} [props.tone='brand'] - Filled lavender or tinted.
45
+ * @param {'lens' | 'sync' | 'enter' | 'none'} [props.icon='lens'] - Glyph before the label.
46
+ * @param {boolean} [props.busy=false] - Blocks the button and animates its glyph.
47
+ * @param {string} [props.busyLabel] - Label shown while `busy`.
48
+ * @param {boolean} [props.block=false] - Takes the full width of its container.
49
+ * @param {ReactNode} props.children - Label of the action.
50
+ * @param {ButtonHTMLAttributes<HTMLButtonElement>} restProps - Additional properties for the button element.
51
+ *
52
+ * @returns {ReactNode} The rendered pill, or a core `Button` outside an `ExpScope`.
53
+ */
54
+ export function ExpPillButton({ tone = 'brand', icon = 'lens', busy = false, busyLabel, block = false, disabled = false, children, ...restProps }) {
55
+ const inScope = useExpScope();
56
+ const label = busy && busyLabel ? busyLabel : children;
57
+ if (!inScope) {
58
+ 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)}>
59
+ {label}
60
+ </Button>);
61
+ }
62
+ const state = disabled ? 'disabled' : busy ? 'busy' : 'idle';
63
+ const hasDisc = tone === 'brand' && (icon === 'lens' || icon === 'sync');
64
+ return (<button {...restProps} disabled={disabled || busy} aria-busy={busy || undefined} className={clsx('h-11 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', 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)}>
65
+ {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')}>
66
+ <LensGlyph size={22} busy={busy} disabled={disabled}/>
67
+ </span>)}
68
+ {tone === 'brand' && icon === 'sync' && (<SyncBadgeGlyph size={32} busy={busy} disabled={disabled}/>)}
69
+ {tone === 'soft' && icon === 'lens' && (<LensGlyph size={20} busy={busy} disabled={disabled}/>)}
70
+ {tone === 'soft' && icon === 'sync' && (<SyncGlyph size={20} busy={busy} disabled={disabled}/>)}
71
+ {icon === 'enter' && (<EnterGlyph size={20} busy={busy} disabled={disabled}/>)}
72
+ {label}
73
+ </button>);
74
+ }
75
+ //# 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,MA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AAC"}
@@ -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,63 @@
1
+ import { type ReactNode } from 'react';
2
+ export type ExpScopeTitles = 'playful' | 'plain';
3
+ export type ExpScopeTables = 'cards' | 'plain';
4
+ export type ExpScopeMascots = 'shown' | 'hidden';
5
+ export type ExpScopeOptions = {
6
+ /** `playful` sets core headings, top menu links and table headers in the title font. */
7
+ titles: ExpScopeTitles;
8
+ /** `cards` turns core table rows into separate cards that lift on hover. */
9
+ tables: ExpScopeTables;
10
+ /** `hidden` silences every mascot, for users who prefer a quiet interface. */
11
+ mascots: ExpScopeMascots;
12
+ };
13
+ export type ExpScopeProps = {
14
+ children: ReactNode;
15
+ } & Partial<ExpScopeOptions>;
16
+ /**
17
+ * ExpScope turns on Orion's expressive layer for the page it renders in.
18
+ *
19
+ * Inside it, `Exp*` components render in full; outside it, they fall back to
20
+ * their core equivalent. While it is mounted, `assets/css/expresivo.css`
21
+ * reskins the core parts marked with `data-orion-part`, including the ones
22
+ * rendered in portals (tooltips, side filters, header menus).
23
+ *
24
+ * The options tune how loud the layer is, so a product can let its users
25
+ * pick a calmer look without leaving the scope.
26
+ *
27
+ * Only for consumers whose own docs declare `capa expresiva: sí`.
28
+ *
29
+ * @component
30
+ * @example
31
+ * <ExpScope>
32
+ * <App />
33
+ * </ExpScope>
34
+ *
35
+ * @example
36
+ * // Core table rows and plain titles, no mascots
37
+ * <ExpScope titles="plain" tables="plain" mascots="hidden">
38
+ * <App />
39
+ * </ExpScope>
40
+ *
41
+ * @param {ExpScopeProps} props
42
+ * @param {ReactNode} props.children - Content that gets the expressive layer.
43
+ * @param {'playful' | 'plain'} [props.titles='playful'] - `playful` sets core headings, top menu links and table headers in the title font.
44
+ * @param {'cards' | 'plain'} [props.tables='cards'] - `cards` turns core table rows into separate cards; `plain` keeps the core rows.
45
+ * @param {'shown' | 'hidden'} [props.mascots='shown'] - `hidden` stops every `Exp*` component from drawing a mascot.
46
+ * @returns {ReactNode} The children inside a wrapper that adds no box.
47
+ */
48
+ export declare function ExpScope({ children, titles, tables, mascots, }: ExpScopeProps): ReactNode;
49
+ /**
50
+ * Tells whether the caller renders inside an `ExpScope`. `Exp*` components
51
+ * use it to choose between their full look and their core fallback.
52
+ *
53
+ * @returns {boolean} `true` inside an `ExpScope`.
54
+ */
55
+ export declare function useExpScope(): boolean;
56
+ /**
57
+ * Options of the nearest `ExpScope`, for `Exp*` components that change with
58
+ * them.
59
+ *
60
+ * @returns {ExpScopeOptions | null} The options, or `null` outside an `ExpScope`.
61
+ */
62
+ export declare function useExpScopeOptions(): ExpScopeOptions | null;
63
+ //# sourceMappingURL=ExpScope.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpScope.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpScope/ExpScope.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAE3E,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,OAAO,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG;IAC5B,wFAAwF;IACxF,MAAM,EAAE,cAAc,CAAC;IACvB,4EAA4E;IAC5E,MAAM,EAAE,cAAc,CAAC;IACvB,8EAA8E;IAC9E,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;AAM7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,QAAQ,CAAC,EACvB,QAAQ,EACR,MAAkB,EAClB,MAAgB,EAChB,OAAiB,GAClB,EAAE,aAAa,GAAG,SAAS,CAqB3B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,GAAG,IAAI,CAE3D"}
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+ import { DynaPuff } from 'next/font/google';
3
+ import { createContext, useContext, useMemo } from 'react';
4
+ const titleFont = DynaPuff({ subsets: ['latin'], display: 'swap' });
5
+ const ExpScopeContext = createContext(null);
6
+ /**
7
+ * ExpScope turns on Orion's expressive layer for the page it renders in.
8
+ *
9
+ * Inside it, `Exp*` components render in full; outside it, they fall back to
10
+ * their core equivalent. While it is mounted, `assets/css/expresivo.css`
11
+ * reskins the core parts marked with `data-orion-part`, including the ones
12
+ * rendered in portals (tooltips, side filters, header menus).
13
+ *
14
+ * The options tune how loud the layer is, so a product can let its users
15
+ * pick a calmer look without leaving the scope.
16
+ *
17
+ * Only for consumers whose own docs declare `capa expresiva: sí`.
18
+ *
19
+ * @component
20
+ * @example
21
+ * <ExpScope>
22
+ * <App />
23
+ * </ExpScope>
24
+ *
25
+ * @example
26
+ * // Core table rows and plain titles, no mascots
27
+ * <ExpScope titles="plain" tables="plain" mascots="hidden">
28
+ * <App />
29
+ * </ExpScope>
30
+ *
31
+ * @param {ExpScopeProps} props
32
+ * @param {ReactNode} props.children - Content that gets the expressive layer.
33
+ * @param {'playful' | 'plain'} [props.titles='playful'] - `playful` sets core headings, top menu links and table headers in the title font.
34
+ * @param {'cards' | 'plain'} [props.tables='cards'] - `cards` turns core table rows into separate cards; `plain` keeps the core rows.
35
+ * @param {'shown' | 'hidden'} [props.mascots='shown'] - `hidden` stops every `Exp*` component from drawing a mascot.
36
+ * @returns {ReactNode} The children inside a wrapper that adds no box.
37
+ */
38
+ export function ExpScope({ children, titles = 'playful', tables = 'cards', mascots = 'shown', }) {
39
+ const options = useMemo(() => ({ titles, tables, mascots }), [titles, tables, mascots]);
40
+ return (<ExpScopeContext.Provider value={options}>
41
+ <style href="exp-title-font" precedence="exp">
42
+ {`:root{--exp-title-font:${titleFont.style.fontFamily}}`}
43
+ </style>
44
+ <div className="exp-scope" data-exp-titles={titles} data-exp-tables={tables} data-exp-mascots={mascots}>
45
+ {children}
46
+ </div>
47
+ </ExpScopeContext.Provider>);
48
+ }
49
+ /**
50
+ * Tells whether the caller renders inside an `ExpScope`. `Exp*` components
51
+ * use it to choose between their full look and their core fallback.
52
+ *
53
+ * @returns {boolean} `true` inside an `ExpScope`.
54
+ */
55
+ export function useExpScope() {
56
+ return useContext(ExpScopeContext) !== null;
57
+ }
58
+ /**
59
+ * Options of the nearest `ExpScope`, for `Exp*` components that change with
60
+ * them.
61
+ *
62
+ * @returns {ExpScopeOptions | null} The options, or `null` outside an `ExpScope`.
63
+ */
64
+ export function useExpScopeOptions() {
65
+ return useContext(ExpScopeContext);
66
+ }
67
+ //# sourceMappingURL=ExpScope.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpScope.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpScope/ExpScope.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,QAAQ,EAAE,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;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AACrC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpScope, useExpScope } from './ExpScope';
2
+ export type { ExpScopeMascots, ExpScopeOptions, ExpScopeProps, ExpScopeTables, ExpScopeTitles, } from './ExpScope';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpScope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACnD,YAAY,EACV,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,cAAc,GACf,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpScope, useExpScope } from './ExpScope';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpScope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,35 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ export type ExpScoreRingProps = {
3
+ /** Score between 0 and 100. */
4
+ value: number;
5
+ /** Target score between 0 and 100, marked with a tick on the ring. */
6
+ goal?: number;
7
+ /** Width and height in pixels. */
8
+ size?: number;
9
+ /** Content centered inside the ring, such as the score and its caption. */
10
+ children?: ReactNode;
11
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
12
+ /**
13
+ * Score ring with an optional goal tick. The arc grows in the clicOH
14
+ * gradient when it mounts. The ring is decorative: put the score as text in
15
+ * `children`, centered inside it.
16
+ *
17
+ * Outside an `ExpScope` it falls back to the core `RadialProgressBar`, with
18
+ * `children` still centered on top.
19
+ *
20
+ * @component
21
+ * @example
22
+ * <ExpScoreRing value={57} goal={70}>
23
+ * <Heading level="h4">57</Heading>
24
+ * </ExpScoreRing>
25
+ *
26
+ * @param {Object} props - The properties of the ExpScoreRing component.
27
+ * @param {number} props.value - Score between 0 and 100.
28
+ * @param {number} [props.goal] - Target score, marked with a tick.
29
+ * @param {number} [props.size=120] - Width and height in pixels.
30
+ * @param {ReactNode} [props.children] - Content centered inside the ring.
31
+ *
32
+ * @returns {ReactNode} The ring, or a core `RadialProgressBar` outside an `ExpScope`.
33
+ */
34
+ export declare function ExpScoreRing({ value, goal, size, children, ...restProps }: ExpScoreRingProps): ReactNode;
35
+ //# sourceMappingURL=ExpScoreRing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpScoreRing.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpScoreRing/ExpScoreRing.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,iBAAiB,GAAG;IAC9B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAOrD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,IAAU,EACV,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,iBAAiB,GAAG,SAAS,CAoF/B"}
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { useEffect, useId, useState, } from 'react';
4
+ import { RadialProgressBar, Show } from '@clicoh/orion-library';
5
+ import { useExpScope } from '../ExpScope/ExpScope';
6
+ const RADIUS = 50;
7
+ const CIRCUMFERENCE = 2 * Math.PI * RADIUS;
8
+ const clamp = (value) => Math.min(100, Math.max(0, value));
9
+ /**
10
+ * Score ring with an optional goal tick. The arc grows in the clicOH
11
+ * gradient when it mounts. The ring is decorative: put the score as text in
12
+ * `children`, centered inside it.
13
+ *
14
+ * Outside an `ExpScope` it falls back to the core `RadialProgressBar`, with
15
+ * `children` still centered on top.
16
+ *
17
+ * @component
18
+ * @example
19
+ * <ExpScoreRing value={57} goal={70}>
20
+ * <Heading level="h4">57</Heading>
21
+ * </ExpScoreRing>
22
+ *
23
+ * @param {Object} props - The properties of the ExpScoreRing component.
24
+ * @param {number} props.value - Score between 0 and 100.
25
+ * @param {number} [props.goal] - Target score, marked with a tick.
26
+ * @param {number} [props.size=120] - Width and height in pixels.
27
+ * @param {ReactNode} [props.children] - Content centered inside the ring.
28
+ *
29
+ * @returns {ReactNode} The ring, or a core `RadialProgressBar` outside an `ExpScope`.
30
+ */
31
+ export function ExpScoreRing({ value, goal, size = 120, children, ...restProps }) {
32
+ const inScope = useExpScope();
33
+ const gradientId = useId();
34
+ const [shown, setShown] = useState(0);
35
+ const percent = clamp(value);
36
+ useEffect(() => {
37
+ const timer = setTimeout(() => setShown(percent), 60);
38
+ return () => clearTimeout(timer);
39
+ }, [percent]);
40
+ const goalAngle = typeof goal === 'number'
41
+ ? ((clamp(goal) / 100) * 360 - 90) * (Math.PI / 180)
42
+ : null;
43
+ return (<div {...restProps} style={{ width: size, height: size, ...restProps.style }} className={clsx('relative inline-flex shrink-0', restProps.className)}>
44
+ <Show>
45
+ <Show.When isTrue={inScope}>
46
+ <svg aria-hidden="true" width={size} height={size} viewBox="0 0 120 120">
47
+ <defs>
48
+ <linearGradient id={gradientId} x1={0} y1={0} x2={1} y2={1}>
49
+ <stop offset={0} className="[stop-color:var(--color-lavender)]"/>
50
+ <stop offset={1} className="[stop-color:var(--color-violet)]"/>
51
+ </linearGradient>
52
+ </defs>
53
+ <circle cx={60} cy={60} r={RADIUS} fill="none" strokeWidth={10} className="stroke-gray-5 dark:stroke-gray-dark-1"/>
54
+ <circle cx={60} cy={60} r={RADIUS} fill="none" stroke={`url(#${gradientId})`} strokeWidth={10} strokeLinecap="round" strokeDasharray={CIRCUMFERENCE} strokeDashoffset={CIRCUMFERENCE * (1 - shown / 100)} transform="rotate(-90 60 60)" className="transition-[stroke-dashoffset] duration-900 ease-[cubic-bezier(.22,1,.36,1)] motion-reduce:transition-none"/>
55
+ {goalAngle !== null && (<line x1={60 + Math.cos(goalAngle) * 42} y1={60 + Math.sin(goalAngle) * 42} x2={60 + Math.cos(goalAngle) * 58} y2={60 + Math.sin(goalAngle) * 58} strokeWidth={2.5} strokeLinecap="round" className="stroke-black dark:stroke-white"/>)}
56
+ </svg>
57
+ </Show.When>
58
+ <Show.Else>
59
+ <RadialProgressBar value={percent} className="h-full w-full"/>
60
+ </Show.Else>
61
+ </Show>
62
+ {!!children && (<div className="absolute inset-0 flex flex-col items-center justify-center text-center">
63
+ {children}
64
+ </div>)}
65
+ </div>);
66
+ }
67
+ //# sourceMappingURL=ExpScoreRing.jsx.map