@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
@@ -18,6 +18,7 @@ import { SecondMenu } from './SecondMenu';
18
18
  *
19
19
  * @param {Object} props - The properties of the Header component.
20
20
  * @param {string} [props.homeHref='/'] - The URL for the home link.
21
+ * @param {ReactNode} [props.logo=<Logo />] - Content of the home link.
21
22
  * @param {ComponentProps<typeof Menu>['menu']} [props.primaryMenu] - The primary menu configuration.
22
23
  * @param {ComponentProps<typeof Menu>['menu']} [props.secondMenu] - The secondary menu configuration.
23
24
  * @param {Omit<AvatarProps, 'className' | 'position'>} [props.avatar] - The avatar properties.
@@ -25,13 +26,11 @@ import { SecondMenu } from './SecondMenu';
25
26
  *
26
27
  * @returns {ReactNode} The rendered Header component.
27
28
  */
28
- export function Header({ homeHref = '/', primaryMenu, secondMenu, avatar, bellNotifications, onFavoriteToggle, themeSwitch, }) {
29
- return (<Container as="header" className="relative flex flex-row justify-between py-2 dark:text-white">
29
+ export function Header({ homeHref = '/', logo, primaryMenu, secondMenu, avatar, bellNotifications, onFavoriteToggle, themeSwitch, }) {
30
+ return (<Container as="header" data-orion-part="header" className="relative flex flex-row justify-between py-2 dark:text-white">
30
31
  <div className="flex items-center gap-4">
31
32
  <div>
32
- <Link href={homeHref}>
33
- <Logo id="logo"/>
34
- </Link>
33
+ <Link href={homeHref}>{logo ?? <Logo id="logo"/>}</Link>
35
34
  </div>
36
35
  {!!secondMenu && (<SecondMenu menu={secondMenu} onFavoriteToggle={onFavoriteToggle}/>)}
37
36
  {!!primaryMenu && (<div className="hidden lg:block">
@@ -1 +1 @@
1
- {"version":3,"file":"Header.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAe,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,GAAG,GAAG,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,GACC;IACZ,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,QAAQ,CACX,SAAS,CAAC,6DAA6D,CAEvE;MAAA,CAAC,GAAG,CAAC,SAAS,CAAC,yBAAyB,CACtC;QAAA,CAAC,GAAG,CACF;UAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CACnB;YAAA,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EACjB;UAAA,EAAE,IAAI,CACR;QAAA,EAAE,GAAG,CACL;QAAA,CAAC,CAAC,CAAC,UAAU,IAAI,CACf,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,EAAG,CACrE,CACD;QAAA,CAAC,CAAC,CAAC,WAAW,IAAI,CAChB,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAC9B;YAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,YAAY,EACnD;UAAA,EAAE,GAAG,CAAC,C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,CAAC,gBAAgB,CAAC,EAAG,CACrE,CACD;QAAA,CAAC,CAAC,CAAC,WAAW,IAAI,CAChB,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAC9B;YAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,YAAY,EACnD;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,aAAa,CACZ,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,WAAW,CAAC,CAAC,WAAW,CAAC,EAE7B;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC"}
@@ -1,8 +1,13 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { HeaderProps } from '../../03-organisms/Header/Header';
3
+ import { HeadingWithTitleLevel } from './HeadingWithTitle';
3
4
  type DashboardTemplateProps = {
4
5
  readonly headerProps: HeaderProps;
5
6
  readonly pageTitles: Record<string, string>;
7
+ readonly headingTitles?: Record<string, string>;
8
+ readonly headingLevel?: HeadingWithTitleLevel;
9
+ readonly titleAdornment?: ReactNode;
10
+ readonly titleDescription?: ReactNode;
6
11
  readonly titleChildren?: ReactNode;
7
12
  readonly children: ReactNode;
8
13
  readonly breadcrumbLoadingLabel?: string;
@@ -22,15 +27,30 @@ type DashboardTemplateProps = {
22
27
  * <div>Main Content</div>
23
28
  * </DashboardTemplate>
24
29
  *
30
+ * @example
31
+ * // A detail page whose title is not its breadcrumb, with a badge and a summary
32
+ * <DashboardTemplate
33
+ * headerProps={headerProps}
34
+ * pageTitles={{ '/orders': 'Orders', '/orders/1043': '1043' }}
35
+ * headingTitles={{ '/orders/1043': 'Order 1043' }}
36
+ * titleAdornment={<Badge modifier="success">Delivered</Badge>}
37
+ * titleDescription="3 items · Created on 12 Oct"
38
+ * >
39
+ * <OrderDetail />
40
+ * </DashboardTemplate>
41
+ *
25
42
  * @param {Object} props - The properties of the DashboardTemplate component.
26
43
  * @param {HeaderProps} props.headerProps - The properties for the Header component.
27
- * @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
28
- * @param {Record<string, string>} props.customTitle - An object mapping pathnames to their corresponding page titles.
29
- * @param {ReactNode} [props.titleChildren] - Optional additional content to be rendered in the title section.
44
+ * @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles, used by the breadcrumb and the heading.
45
+ * @param {Record<string, string>} [props.headingTitles] - Heading per pathname when it differs from the breadcrumb segment. Pathnames missing here use `pageTitles`.
46
+ * @param {'h3' | 'h4' | 'h5'} [props.headingLevel='h5'] - Heading level of the page title.
47
+ * @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
48
+ * @param {ReactNode} [props.titleDescription] - Content under the title, inside the title band.
49
+ * @param {ReactNode} [props.titleChildren] - Content at the right of the title; it moves under the title on small screens.
30
50
  * @param {ReactNode} props.children - The main content to be rendered within the dashboard.
31
51
  *
32
52
  * @returns {ReactNode} The rendered DashboardTemplate component.
33
53
  */
34
- export declare function DashboardTemplate({ headerProps, pageTitles, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }: DashboardTemplateProps): ReactNode;
54
+ export declare function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }: DashboardTemplateProps): ReactNode;
35
55
  export {};
36
56
  //# sourceMappingURL=DashboardTemplate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DashboardTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAU,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAKvE,KAAK,sBAAsB,GAAG;IAC5B,QAA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AAC;IAC7B,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,sBAAsB,EACtB,mBAAmB,GACpB,EAAE,sBAAsB,GAAG,SAAS,CAiDpC"}
@@ -19,16 +19,31 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
19
19
  * <div>Main Content</div>
20
20
  * </DashboardTemplate>
21
21
  *
22
+ * @example
23
+ * // A detail page whose title is not its breadcrumb, with a badge and a summary
24
+ * <DashboardTemplate
25
+ * headerProps={headerProps}
26
+ * pageTitles={{ '/orders': 'Orders', '/orders/1043': '1043' }}
27
+ * headingTitles={{ '/orders/1043': 'Order 1043' }}
28
+ * titleAdornment={<Badge modifier="success">Delivered</Badge>}
29
+ * titleDescription="3 items · Created on 12 Oct"
30
+ * >
31
+ * <OrderDetail />
32
+ * </DashboardTemplate>
33
+ *
22
34
  * @param {Object} props - The properties of the DashboardTemplate component.
23
35
  * @param {HeaderProps} props.headerProps - The properties for the Header component.
24
- * @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
25
- * @param {Record<string, string>} props.customTitle - An object mapping pathnames to their corresponding page titles.
26
- * @param {ReactNode} [props.titleChildren] - Optional additional content to be rendered in the title section.
36
+ * @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles, used by the breadcrumb and the heading.
37
+ * @param {Record<string, string>} [props.headingTitles] - Heading per pathname when it differs from the breadcrumb segment. Pathnames missing here use `pageTitles`.
38
+ * @param {'h3' | 'h4' | 'h5'} [props.headingLevel='h5'] - Heading level of the page title.
39
+ * @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
40
+ * @param {ReactNode} [props.titleDescription] - Content under the title, inside the title band.
41
+ * @param {ReactNode} [props.titleChildren] - Content at the right of the title; it moves under the title on small screens.
27
42
  * @param {ReactNode} props.children - The main content to be rendered within the dashboard.
28
43
  *
29
44
  * @returns {ReactNode} The rendered DashboardTemplate component.
30
45
  */
31
- export function DashboardTemplate({ headerProps, pageTitles, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
46
+ export function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
32
47
  return (<>
33
48
  <Header {...headerProps}/>
34
49
  <hr className="border-gray-5 dark:border-gray-dark-1"/>
@@ -36,10 +51,18 @@ export function DashboardTemplate({ headerProps, pageTitles, titleChildren, chil
36
51
  <Suspense fallback={<BreadcrumbSkeleton loadingLabel={breadcrumbLoadingLabel}/>}>
37
52
  <BreadcrumbWithPathname homeHref={headerProps.homeHref} pageTitles={pageTitles}/>
38
53
  </Suspense>
39
- <div className="flex justify-between">
40
- <Suspense fallback={<HeadingWithTitleSkeleton loadingLabel={headingLoadingLabel}/>}>
41
- <HeadingWithTitle pageTitles={pageTitles}/>
42
- </Suspense>
54
+ <div className="flex flex-col items-start gap-3 sm:flex-row sm:justify-between">
55
+ <div className="flex min-w-0 flex-col gap-1">
56
+ <div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1">
57
+ <Suspense fallback={<HeadingWithTitleSkeleton loadingLabel={headingLoadingLabel}/>}>
58
+ <HeadingWithTitle pageTitles={pageTitles} headingTitles={headingTitles} level={headingLevel}/>
59
+ </Suspense>
60
+ {titleAdornment}
61
+ </div>
62
+ {!!titleDescription && (<div className="text-gray-1 dark:text-gray-2 text-sm">
63
+ {titleDescription}
64
+ </div>)}
65
+ </div>
43
66
  {titleChildren}
44
67
  </div>
45
68
  </Container>
@@ -1 +1 @@
1
- {"version":3,"file":"Dash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AAU,CAAC,EAC3C;UAAA,EAAE,QAAQ,CACV;UAAA,CAAC,aAAa,CAChB;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,SAAS,CACX;MAAA,CAAC,EAAE,CAAC,SAAS,CAAC,uCAAuC,EACrD;MAAA,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CACnC;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAS,CACb;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,MAAM,EAAe,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAetE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,sBAAsB,EACtB,mBAAmB,GACI;IACvB,OAAO,CACL,EACE;MAAA,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,EACxB;MAAA,CAAC,EAAE,CAAC,SAAS,CAAC,uCAAuC,EACrD;MAAA,CAAC,SAAS,CAAC,SAAS,CAAC,iBAAiB,CACpC;QAAA,CAAC,QAAQ,CACP,QAAQ,CAAC,CACP,CAAC,kBAAkB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ithTitle component for rendering a heading based on the current pathname.
4
5
  *
@@ -9,11 +10,14 @@ import { ReactNode } from 'react';
9
10
  *
10
11
  * @param {Object} props - The properties of the HeadingWithTitle component.
11
12
  * @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
13
+ * @param {Record<string, string>} [props.headingTitles] - Title per pathname when it differs from the breadcrumb. Falls back to `pageTitles`.
14
+ * @param {'h3' | 'h4' | 'h5'} [props.level='h5'] - Heading level of the title.
12
15
  *
13
16
  * @returns {ReactNode} The rendered HeadingWithTitle component.
14
17
  */
15
- export declare function HeadingWithTitle({ pageTitles, }: {
18
+ export declare function HeadingWithTitle({ pageTitles, headingTitles, level, }: {
16
19
  pageTitles: Record<string, string>;
17
- customTitle?: Record<string, string>;
20
+ headingTitles?: Record<string, string>;
21
+ level?: HeadingWithTitleLevel;
18
22
  }): ReactNode;
19
23
  //# sourceMappingURL=HeadingWithTitle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeadingWithTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,GACX,EAAE;IACD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,GAAG,SAAS,CAaZ"}
1
+ {"version":3,"file":"HeadingWithTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,aAAa,EACb,KAAY,GACb,EAAE;IACD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B,GAAG,SAAS,CAgBZ"}
@@ -13,15 +13,19 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
13
13
  *
14
14
  * @param {Object} props - The properties of the HeadingWithTitle component.
15
15
  * @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
16
+ * @param {Record<string, string>} [props.headingTitles] - Title per pathname when it differs from the breadcrumb. Falls back to `pageTitles`.
17
+ * @param {'h3' | 'h4' | 'h5'} [props.level='h5'] - Heading level of the title.
16
18
  *
17
19
  * @returns {ReactNode} The rendered HeadingWithTitle component.
18
20
  */
19
- export function HeadingWithTitle({ pageTitles, }) {
21
+ export function HeadingWithTitle({ pageTitles, headingTitles, level = 'h5', }) {
20
22
  const pathname = usePathname() || '/lorem/ipsum';
21
- const title = pageTitles[pathname] || 'Dashboard';
23
+ const title = headingTitles?.[pathname] || pageTitles[pathname] || 'Dashboard';
22
24
  return (<Show>
23
25
  <Show.When isTrue={Boolean(title)}>
24
- <Heading level={'h5'}>{title}</Heading>
26
+ <Heading level={level} className="min-w-0 break-words">
27
+ {title}
28
+ </Heading>
25
29
  </Show.When>
26
30
  <Show.Else>
27
31
  <HeadingWithTitleSkeleton />
@@ -1 +1 @@
1
- {"version":3,"file":"HeadingWithTitle.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,UAAU,GAIX;IACC,MAAM,QAAQ,GAAG,WAAW,EAAE,IAAI,cAAc,CAAC;IACjD,MAAM,KAAK,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC;IAClD,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAChC;QAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,CACxC;MAAA,EAAE,IAAI,CAAC,IAAI,CACX;MAAA,CAAC,IAAI,CAAC,IAAI,CACR;QAAA,CAAC,wBAAwB,CAAC,AAAD,EAC3B;MAAA,EAAE,IAAI,CAAC,IAAI,CACb;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"HeadingWithTitle.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAItE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,UAAU,EACV,aAAa,EACb,KAAK,GAAG,IAAI,GAKb;IACC,MAAM,QAAQ,GAAG,WAAW,EAAE,IAAI,cAAc,CAAC;IACjD,MAAM,KAAK,GACT,aAAa,EAAE,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC;IACnE,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAChC;QAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,qBAAqB,CACpD;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,OAAO,CACX;MAAA,EAAE,IAAI,CAAC,IAAI,CACX;MAAA,CAAC,IAAI,CAAC,IAAI,CACR;QAAA,CAAC,wBAAwB,CAAC,AAAD,EAC3B;MAAA,EAAE,IAAI,CAAC,IAAI,CACb;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
@@ -4,6 +4,7 @@ type LoginTemplateProps = {
4
4
  children: ReactNode;
5
5
  loginImg?: StaticImageData;
6
6
  logoAriaLabel?: string;
7
+ logo?: ReactNode;
7
8
  };
8
9
  /**
9
10
  * LoginTemplate component for rendering the login page layout.
@@ -17,6 +18,7 @@ type LoginTemplateProps = {
17
18
  *
18
19
  * @param {Object} props - The properties of the LoginTemplate component.
19
20
  * @param {ReactNode} props.children - The content to be rendered inside the login template.
21
+ * @param {ReactNode} [props.logo=<Logo />] - Brand mark above the content. Replaces the clicOH logo, so `logoAriaLabel` no longer applies.
20
22
  *
21
23
  * @returns {ReactNode} The rendered LoginTemplate component.
22
24
  */
@@ -1 +1 @@
1
- {"version":3,"file":"LoginTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/LoginTemplate/LoginTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAuBlE"}
1
+ {"version":3,"file":"LoginTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/LoginTemplate/LoginTemplate.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAErE,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,SAAS,CAyBlE"}
@@ -14,6 +14,7 @@ import { dataUrl } from './dataUrl';
14
14
  *
15
15
  * @param {Object} props - The properties of the LoginTemplate component.
16
16
  * @param {ReactNode} props.children - The content to be rendered inside the login template.
17
+ * @param {ReactNode} [props.logo=<Logo />] - Brand mark above the content. Replaces the clicOH logo, so `logoAriaLabel` no longer applies.
17
18
  *
18
19
  * @returns {ReactNode} The rendered LoginTemplate component.
19
20
  */
@@ -24,7 +25,7 @@ export function LoginTemplate(props) {
24
25
  </div>
25
26
  <main className="flex min-h-svh w-[460px] items-center justify-center bg-white text-black dark:bg-black dark:text-white">
26
27
  <div className="flex flex-col items-center justify-center gap-4">
27
- <Logo width={94} height={40} aria-label={props.logoAriaLabel}/>
28
+ {props.logo ?? (<Logo width={94} height={40} aria-label={props.logoAriaLabel}/>)}
28
29
  {props.children}
29
30
  </div>
30
31
  </main>
@@ -1 +1 @@
1
- {"version":3,"file":"LoginTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/LoginTemplate/LoginTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,EAAW,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AASpC;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,OAAO,CACL,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CACnB;MAAA,CAAC,GAAG,CAAC,SAAS,CAAC,oCAAoC,CACjD;QAAA,CAAC,KAAK,CACJ,GAAG,CAAC,CAAE,KAAK,CAAC,QAA4B,IAAI,QAAQ,CAAC,CACrD,GAAG,CAAC,EAAE,CACN,WAAW,CAAC,MAAM,CAClB,KAAK,CAAC,mCAAmC,CACzC,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,SAAS,CAAC,cAAc,CACxB,WAAW,CAAC,MAAM,CAClB,WAAW,CAAC,CAAC,OAAO,CAAC,EAEzB;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,wGAAwG,CACtH;QAAA,CAAC,GAAG,CAAC,SAAS,CAAC,iDAAiD,CAC9D;UAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAC7D;UAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"LoginTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/LoginTemplate/LoginTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,OAAO,QAAQ,MAAM,4CAA4C,CAAC;AAClE,OAAO,EAAW,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,OAAO,CACL,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CACnB;MAAA,CAAC,GAAG,CAAC,SAAS,CAAC,oCAAoC,CACjD;QAAA,CAAC,KAAK,CACJ,GAAG,CAAC,CAAE,KAAK,CAAC,QAA4B,IAAI,QAAQ,CAAC,CACrD,GAAG,CAAC,EAAE,CACN,WAAW,CAAC,MAAM,CAClB,KAAK,CAAC,mCAAmC,CACzC,IAAI,CAAC,CAAC,IAAI,CAAC,CACX,SAAS,CAAC,cAAc,CACxB,WAAW,CAAC,MAAM,CAClB,WAAW,CAAC,CAAC,OAAO,CAAC,EAEzB;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,IAAI,CAAC,SAAS,CAAC,wGAAwG,CACtH;QAAA,CAAC,GAAG,CAAC,SAAS,CAAC,iDAAiD,CAC9D;UAAA,CAAC,KAAK,CAAC,IAAI,IAAI,CACb,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,EAAG,CACjE,CACD;UAAA,CAAC,KAAK,CAAC,QAAQ,CACjB;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { HTMLAttributes, ReactNode } from 'react';
2
+ import { type InlineMessageModifier } from '@clicoh/orion-library';
3
+ import type { ExpMascotName } from '../ExpMascot/catalog';
4
+ export type ExpBubbleTail = 'left' | 'right' | 'bottom';
5
+ export type ExpBubbleProps = {
6
+ title?: ReactNode;
7
+ /** Body text, under the title. */
8
+ children?: ReactNode;
9
+ /** Side the tail points to. With a `mascot`, the mascot sits on that side. */
10
+ tail?: ExpBubbleTail;
11
+ /** Sets the title larger, in the display font, when the scope uses `titles="playful"`. */
12
+ display?: boolean;
13
+ /** Short success note pinned under the text, such as a result. */
14
+ badge?: ReactNode;
15
+ mascot?: ExpMascotName;
16
+ mascotSize?: number;
17
+ /** Tone of the core `InlineMessage` rendered outside an `ExpScope`. */
18
+ fallbackModifier?: InlineMessageModifier;
19
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'title'>;
20
+ /**
21
+ * Speech bubble with a tail, optionally spoken by a mascot. Use it for a short
22
+ * remark from the product (an empty state, a tip, a result), never for errors
23
+ * that block the user.
24
+ *
25
+ * It is a polite live region (`role="status"`). Outside an `ExpScope` it falls
26
+ * back to the core `InlineMessage`, with the title and the text in one line.
27
+ *
28
+ * @component
29
+ * @example
30
+ * <ExpBubble title="Nothing to review" mascot="oculus-08-satisfecho">
31
+ * Every case has an answer.
32
+ * </ExpBubble>
33
+ *
34
+ * @example
35
+ * // Above the mascot, with the title in the display font
36
+ * <ExpBubble tail="bottom" display title="Found it" mascot="fixi-06-celebrando" badge="Solved" />
37
+ *
38
+ * @param {Object} props - The properties of the ExpBubble component.
39
+ * @param {ReactNode} [props.title] - First line, in semibold.
40
+ * @param {ReactNode} [props.children] - Body text, under the title.
41
+ * @param {'left' | 'right' | 'bottom'} [props.tail='left'] - Side the tail points to, and the side of the mascot.
42
+ * @param {boolean} [props.display=false] - Larger title in the display font when the scope uses `titles="playful"`.
43
+ * @param {ReactNode} [props.badge] - Short success note under the text.
44
+ * @param {ExpMascotName} [props.mascot] - Mascot that speaks the bubble. Hidden when the scope hides mascots.
45
+ * @param {number} [props.mascotSize=64] - Mascot size, in pixels.
46
+ * @param {'info' | 'warning' | 'error' | 'success'} [props.fallbackModifier='info'] - Tone of the `InlineMessage` outside an `ExpScope`.
47
+ *
48
+ * @returns {ReactNode} The bubble, or an `InlineMessage` outside an `ExpScope`.
49
+ */
50
+ export declare function ExpBubble({ title, children, tail, display, badge, mascot, mascotSize, fallbackModifier, ...restProps }: ExpBubbleProps): ReactNode;
51
+ //# sourceMappingURL=ExpBubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpBubble.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpBubble/ExpBubble.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,uBAAuB,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,8EAA8E;IAC9E,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uEAAuE;IACvE,gBAAgB,CAAC,EAAE,qBAAqB,CAAC;CAC1C,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;AAclD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,IAAa,EACb,OAAe,EACf,KAAK,EACL,MAAM,EACN,UAAe,EACf,gBAAyB,EACzB,GAAG,SAAS,EACb,EAAE,cAAc,GAAG,SAAS,CAsE5B"}
@@ -0,0 +1,74 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { InlineMessage, } from '@clicoh/orion-library';
4
+ import { useExpScopeOptions } from '../ExpScope/ExpScope';
5
+ import { ExpMascot } from '../ExpMascot/ExpMascot';
6
+ const layoutMap = {
7
+ left: 'flex-row-reverse items-start',
8
+ right: 'flex-row items-start',
9
+ bottom: 'flex-col items-start',
10
+ };
11
+ const tailMap = {
12
+ left: '-left-1.5 top-[22px] border-t-0 border-r-0',
13
+ right: '-right-1.5 top-[22px] border-b-0 border-l-0',
14
+ bottom: '-bottom-1.5 left-7 border-t-0 border-l-0',
15
+ };
16
+ /**
17
+ * Speech bubble with a tail, optionally spoken by a mascot. Use it for a short
18
+ * remark from the product (an empty state, a tip, a result), never for errors
19
+ * that block the user.
20
+ *
21
+ * It is a polite live region (`role="status"`). Outside an `ExpScope` it falls
22
+ * back to the core `InlineMessage`, with the title and the text in one line.
23
+ *
24
+ * @component
25
+ * @example
26
+ * <ExpBubble title="Nothing to review" mascot="oculus-08-satisfecho">
27
+ * Every case has an answer.
28
+ * </ExpBubble>
29
+ *
30
+ * @example
31
+ * // Above the mascot, with the title in the display font
32
+ * <ExpBubble tail="bottom" display title="Found it" mascot="fixi-06-celebrando" badge="Solved" />
33
+ *
34
+ * @param {Object} props - The properties of the ExpBubble component.
35
+ * @param {ReactNode} [props.title] - First line, in semibold.
36
+ * @param {ReactNode} [props.children] - Body text, under the title.
37
+ * @param {'left' | 'right' | 'bottom'} [props.tail='left'] - Side the tail points to, and the side of the mascot.
38
+ * @param {boolean} [props.display=false] - Larger title in the display font when the scope uses `titles="playful"`.
39
+ * @param {ReactNode} [props.badge] - Short success note under the text.
40
+ * @param {ExpMascotName} [props.mascot] - Mascot that speaks the bubble. Hidden when the scope hides mascots.
41
+ * @param {number} [props.mascotSize=64] - Mascot size, in pixels.
42
+ * @param {'info' | 'warning' | 'error' | 'success'} [props.fallbackModifier='info'] - Tone of the `InlineMessage` outside an `ExpScope`.
43
+ *
44
+ * @returns {ReactNode} The bubble, or an `InlineMessage` outside an `ExpScope`.
45
+ */
46
+ export function ExpBubble({ title, children, tail = 'left', display = false, badge, mascot, mascotSize = 64, fallbackModifier = 'info', ...restProps }) {
47
+ const options = useExpScopeOptions();
48
+ if (!options) {
49
+ return (<InlineMessage {...restProps} modifier={fallbackModifier}>
50
+ {!!title && <strong className="font-semibold">{title} </strong>}
51
+ {children}
52
+ {!!badge && <> · {badge}</>}
53
+ </InlineMessage>);
54
+ }
55
+ const playfulTitle = display && options.titles === 'playful';
56
+ return (<div role="status" {...restProps} className={clsx('inline-flex gap-3', layoutMap[tail], restProps.className)}>
57
+ <div className="border-gray-5 dark:border-gray-1 relative max-w-[280px] rounded-lg border bg-white px-4 py-3 shadow-[0_2px_3px_rgba(34,35,41,0.08)] dark:bg-black">
58
+ <span aria-hidden="true" className={clsx('border-gray-5 dark:border-gray-1 absolute size-2.5 rotate-45 border bg-white dark:bg-black', tailMap[tail])}/>
59
+ {!!title && (<p className={clsx('font-semibold text-black dark:text-white', playfulTitle
60
+ ? 'font-(family-name:--exp-title-font) text-lg leading-6'
61
+ : 'text-sm leading-5')}>
62
+ {title}
63
+ </p>)}
64
+ {!!children && (<p className={clsx('text-gray-1 dark:text-gray-2 text-xs leading-[18px] text-pretty', !!title && 'mt-0.5')}>
65
+ {children}
66
+ </p>)}
67
+ {!!badge && (<span className="border-success text-success-strong dark:text-success mt-2 inline-flex rounded-full border px-2 py-px text-[11px] leading-4 font-semibold">
68
+ {badge}
69
+ </span>)}
70
+ </div>
71
+ {!!mascot && (<ExpMascot name={mascot} size={mascotSize} className={clsx(tail === 'bottom' && 'ml-2')}/>)}
72
+ </div>);
73
+ }
74
+ //# sourceMappingURL=ExpBubble.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpBubble.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpBubble/ExpBubble.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAA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ExpBubble';
2
+ export type { ExpBubbleProps, ExpBubbleTail } from './ExpBubble';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpBubble/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpBubble } from './ExpBubble';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpBubble/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ export type ExpCollapseToggleProps = {
3
+ collapsed: boolean;
4
+ onToggle: () => void;
5
+ /** Accessible name while collapsed, such as "Expand header". */
6
+ expandLabel: string;
7
+ /** Accessible name while expanded, such as "Collapse header". */
8
+ collapseLabel: string;
9
+ } & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick' | 'aria-label' | 'aria-expanded'>;
10
+ /**
11
+ * Round corner button that collapses or expands a section, such as a page
12
+ * header. While the section is expanded, a lavender ring pulses around it to
13
+ * invite the user to tuck it away; the chevron flips when collapsed.
14
+ *
15
+ * Pass `aria-controls` with the id of the section it toggles. Outside an
16
+ * `ExpScope` it falls back to the core `IconButton` with a chevron.
17
+ *
18
+ * @component
19
+ * @example
20
+ * <ExpCollapseToggle
21
+ * collapsed={collapsed}
22
+ * onToggle={() => setCollapsed(!collapsed)}
23
+ * expandLabel="Expand header"
24
+ * collapseLabel="Collapse header"
25
+ * aria-controls="case-header"
26
+ * />
27
+ *
28
+ * @param {Object} props - The properties of the ExpCollapseToggle component.
29
+ * @param {boolean} props.collapsed - Whether the section is collapsed.
30
+ * @param {() => void} props.onToggle - Called on click.
31
+ * @param {string} props.expandLabel - Accessible name while collapsed.
32
+ * @param {string} props.collapseLabel - Accessible name while expanded.
33
+ *
34
+ * @returns {ReactNode} The toggle, or an `IconButton` outside an `ExpScope`.
35
+ */
36
+ export declare function ExpCollapseToggle({ collapsed, onToggle, expandLabel, collapseLabel, ...restProps }: ExpCollapseToggleProps): ReactNode;
37
+ //# sourceMappingURL=ExpCollapseToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpCollapseToggle.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpCollapseToggle/ExpCollapseToggle.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAK7D,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,iEAAiE;IACjE,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,IAAI,CACN,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,GAAG,SAAS,GAAG,YAAY,GAAG,eAAe,CACxD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,QAAQ,EACR,WAAW,EACX,aAAa,EACb,GAAG,SAAS,EACb,EAAE,sBAAsB,GAAG,SAAS,CA6CpC"}
@@ -0,0 +1,43 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { FiChevronDown, FiChevronUp } from 'react-icons/fi';
4
+ import { IconButton } from '@clicoh/orion-library';
5
+ import { useExpScope } from '../ExpScope/ExpScope';
6
+ /**
7
+ * Round corner button that collapses or expands a section, such as a page
8
+ * header. While the section is expanded, a lavender ring pulses around it to
9
+ * invite the user to tuck it away; the chevron flips when collapsed.
10
+ *
11
+ * Pass `aria-controls` with the id of the section it toggles. Outside an
12
+ * `ExpScope` it falls back to the core `IconButton` with a chevron.
13
+ *
14
+ * @component
15
+ * @example
16
+ * <ExpCollapseToggle
17
+ * collapsed={collapsed}
18
+ * onToggle={() => setCollapsed(!collapsed)}
19
+ * expandLabel="Expand header"
20
+ * collapseLabel="Collapse header"
21
+ * aria-controls="case-header"
22
+ * />
23
+ *
24
+ * @param {Object} props - The properties of the ExpCollapseToggle component.
25
+ * @param {boolean} props.collapsed - Whether the section is collapsed.
26
+ * @param {() => void} props.onToggle - Called on click.
27
+ * @param {string} props.expandLabel - Accessible name while collapsed.
28
+ * @param {string} props.collapseLabel - Accessible name while expanded.
29
+ *
30
+ * @returns {ReactNode} The toggle, or an `IconButton` outside an `ExpScope`.
31
+ */
32
+ export function ExpCollapseToggle({ collapsed, onToggle, expandLabel, collapseLabel, ...restProps }) {
33
+ const inScope = useExpScope();
34
+ const label = collapsed ? expandLabel : collapseLabel;
35
+ if (!inScope) {
36
+ return (<IconButton {...restProps} icon={collapsed ? <FiChevronDown /> : <FiChevronUp />} label={label} aria-expanded={!collapsed} onClick={onToggle}/>);
37
+ }
38
+ return (<button type="button" {...restProps} aria-label={label} aria-expanded={!collapsed} onClick={onToggle} className={clsx('border-lavender-1 text-lavender hover:border-lavender focus-visible:ring-lavender relative flex size-8 shrink-0 cursor-pointer items-center justify-center rounded-full border bg-white transition-colors focus-visible:ring-2 focus-visible:outline-none', 'dark:border-lavender-dark-1 dark:text-lavender-dark dark:hover:border-lavender-dark dark:bg-black', restProps.className)}>
39
+ {!collapsed && (<span aria-hidden="true" className="exp-hint-pulse border-lavender dark:border-lavender-dark pointer-events-none absolute -inset-px rounded-full border-2"/>)}
40
+ <FiChevronUp aria-hidden="true" strokeWidth={2.4} className={clsx('size-4 transition-transform duration-260 ease-(--exp-ease-spring) motion-reduce:transition-none', collapsed && 'rotate-180')}/>
41
+ </button>);
42
+ }
43
+ //# sourceMappingURL=ExpCollapseTo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mG,EACnG,SAAS,CAAC,SAAS,CACpB,CAAC,CAEF;MAAA,CAAC,CAAC,SAAS,IAAI,CACb,CAAC,IAAI,CACH,WAAW,CAAC,MAAM,CAClB,SAAS,CAAC,uHAAuH,EACjI,CACH,CACD;MAAA,CAAC,WAAW,CACV,WAAW,CAAC,MAAM,CAClB,WAAW,CAAC,CAAC,GAAG,CAAC,CACjB,SAAS,CAAC,CAAC,IAAI,CACb,iGAAiG,EACjG,SAAS,IAAI,YAAY,CAC1B,CAAC,EAEN;IAAA,EAAE,MAAM,CAAC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { ExpCollapseToggle } from './ExpCollapseToggle';
2
+ export type { ExpCollapseToggleProps } from './ExpCollapseToggle';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpCollapseToggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ExpCollapseToggle } from './ExpCollapseToggle';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpCollapseToggle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
+ export type ExpGrowBarProps = {
3
+ /** Progress between 0 and 100. */
4
+ value: number;
5
+ /** Accessible name of what the bar measures. */
6
+ ariaLabel: string;
7
+ } & Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'role'>;
8
+ /**
9
+ * Progress bar whose fill grows in the clicOH gradient when it mounts. For
10
+ * scores and shares shown at rest; for an operation that is still running,
11
+ * use the core `ProgressBar`.
12
+ *
13
+ * Outside an `ExpScope` it falls back to the core `ProgressBar`.
14
+ *
15
+ * @component
16
+ * @example
17
+ * <ExpGrowBar value={57} ariaLabel="Share of cases solved" />
18
+ *
19
+ * @param {Object} props - The properties of the ExpGrowBar component.
20
+ * @param {number} props.value - Progress between 0 and 100.
21
+ * @param {string} props.ariaLabel - Accessible name of what the bar measures.
22
+ *
23
+ * @returns {ReactNode} The bar, or a core `ProgressBar` outside an `ExpScope`.
24
+ */
25
+ export declare function ExpGrowBar({ value, ariaLabel, ...restProps }: ExpGrowBarProps): ReactNode;
26
+ //# sourceMappingURL=ExpGrowBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpGrowBar.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpGrowBar/ExpGrowBar.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAGf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,eAAe,GAAG;IAC5B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,GAAG,MAAM,CAAC,CAAC;AAI9D;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAS,EACT,GAAG,SAAS,EACb,EAAE,eAAe,GAAG,SAAS,CAiC7B"}
@@ -0,0 +1,39 @@
1
+ 'use client';
2
+ import clsx from 'clsx';
3
+ import { useEffect, useState, } from 'react';
4
+ import { ProgressBar } from '@clicoh/orion-library';
5
+ import { useExpScope } from '../ExpScope/ExpScope';
6
+ const clamp = (value) => Math.min(100, Math.max(0, value));
7
+ /**
8
+ * Progress bar whose fill grows in the clicOH gradient when it mounts. For
9
+ * scores and shares shown at rest; for an operation that is still running,
10
+ * use the core `ProgressBar`.
11
+ *
12
+ * Outside an `ExpScope` it falls back to the core `ProgressBar`.
13
+ *
14
+ * @component
15
+ * @example
16
+ * <ExpGrowBar value={57} ariaLabel="Share of cases solved" />
17
+ *
18
+ * @param {Object} props - The properties of the ExpGrowBar component.
19
+ * @param {number} props.value - Progress between 0 and 100.
20
+ * @param {string} props.ariaLabel - Accessible name of what the bar measures.
21
+ *
22
+ * @returns {ReactNode} The bar, or a core `ProgressBar` outside an `ExpScope`.
23
+ */
24
+ export function ExpGrowBar({ value, ariaLabel, ...restProps }) {
25
+ const inScope = useExpScope();
26
+ const [shown, setShown] = useState(0);
27
+ const percent = clamp(value);
28
+ useEffect(() => {
29
+ const timer = setTimeout(() => setShown(percent), 60);
30
+ return () => clearTimeout(timer);
31
+ }, [percent]);
32
+ if (!inScope) {
33
+ return <ProgressBar {...restProps} value={percent} ariaLabel={ariaLabel}/>;
34
+ }
35
+ return (<div {...restProps} role="progressbar" aria-label={ariaLabel} aria-valuemin={0} aria-valuemax={100} aria-valuenow={percent} className={clsx('bg-gray-5 dark:bg-gray-dark-1 relative h-2 overflow-hidden rounded-full', restProps.className)}>
36
+ <span className="from-lavender to-violet absolute inset-y-0 left-0 rounded-full bg-linear-90 transition-[width] duration-900 ease-[cubic-bezier(.22,1,.36,1)] motion-reduce:transition-none" style={{ width: `${shown}%` }}/>
37
+ </div>);
38
+ }
39
+ //# sourceMappingURL=ExpGrowBar.jsx.map