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

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 (140) hide show
  1. package/assets/avatares/caja-ruedas.svg +1 -0
  2. package/assets/avatares/cohete-azul.svg +1 -0
  3. package/assets/avatares/criatura-tres-ojos.svg +1 -0
  4. package/assets/avatares/cubo-brazos.svg +1 -0
  5. package/assets/avatares/cubo-morado.svg +1 -0
  6. package/assets/avatares/dino-placas-amarillas.svg +1 -0
  7. package/assets/avatares/dino-placas-azules.svg +1 -0
  8. package/assets/avatares/edificio-cupulas.svg +1 -0
  9. package/assets/avatares/globo-anillo.svg +1 -0
  10. package/assets/avatares/pulpo-morado.svg +1 -0
  11. package/assets/avatares/robot-lente.svg +1 -0
  12. package/assets/avatares/ventana-codigo.svg +1 -0
  13. package/assets/css/expresivo.css +37 -0
  14. package/dist/components/01-atoms/CodeBlock/CodeBlock.d.ts +11 -3
  15. package/dist/components/01-atoms/CodeBlock/CodeBlock.d.ts.map +1 -1
  16. package/dist/components/01-atoms/CodeBlock/CodeBlock.jsx +13 -5
  17. package/dist/components/01-atoms/CodeBlock/CodeBlock.jsx.map +1 -1
  18. package/dist/components/01-atoms/OtpInput/OtpInput.d.ts +1 -1
  19. package/dist/components/01-atoms/OtpInput/OtpInput.jsx +3 -2
  20. package/dist/components/01-atoms/OtpInput/OtpInput.jsx.map +1 -1
  21. package/dist/components/02-molecules/ActionMenu/ActionMenu.d.ts +39 -0
  22. package/dist/components/02-molecules/ActionMenu/ActionMenu.d.ts.map +1 -0
  23. package/dist/components/02-molecules/ActionMenu/ActionMenu.jsx +36 -0
  24. package/dist/components/02-molecules/ActionMenu/ActionMenu.jsx.map +1 -0
  25. package/dist/components/02-molecules/ActionMenu/index.d.ts +2 -0
  26. package/dist/components/02-molecules/ActionMenu/index.d.ts.map +1 -0
  27. package/dist/components/02-molecules/ActionMenu/index.js +2 -0
  28. package/dist/components/02-molecules/ActionMenu/index.js.map +1 -0
  29. package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts +35 -3
  30. package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts.map +1 -1
  31. package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx +193 -31
  32. package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx.map +1 -1
  33. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.d.ts +52 -0
  34. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.d.ts.map +1 -0
  35. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.jsx +78 -0
  36. package/dist/components/02-molecules/ImageViewer/ImageViewerDocument.jsx.map +1 -0
  37. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts +8 -2
  38. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts.map +1 -1
  39. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx +10 -4
  40. package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx.map +1 -1
  41. package/dist/components/02-molecules/ImageViewer/usePdfPages.d.ts +20 -0
  42. package/dist/components/02-molecules/ImageViewer/usePdfPages.d.ts.map +1 -0
  43. package/dist/components/02-molecules/ImageViewer/usePdfPages.js +113 -0
  44. package/dist/components/02-molecules/ImageViewer/usePdfPages.js.map +1 -0
  45. package/dist/components/02-molecules/Tab/TabList.d.ts.map +1 -1
  46. package/dist/components/02-molecules/Tab/TabList.jsx +10 -6
  47. package/dist/components/02-molecules/Tab/TabList.jsx.map +1 -1
  48. package/dist/components/02-molecules/index.d.ts +1 -0
  49. package/dist/components/02-molecules/index.d.ts.map +1 -1
  50. package/dist/components/02-molecules/index.js +1 -0
  51. package/dist/components/02-molecules/index.js.map +1 -1
  52. package/dist/components/03-organisms/BarChart/BarChart.d.ts +52 -0
  53. package/dist/components/03-organisms/BarChart/BarChart.d.ts.map +1 -0
  54. package/dist/components/03-organisms/BarChart/BarChart.jsx +116 -0
  55. package/dist/components/03-organisms/BarChart/BarChart.jsx.map +1 -0
  56. package/dist/components/03-organisms/BarChart/index.d.ts +2 -0
  57. package/dist/components/03-organisms/BarChart/index.d.ts.map +1 -0
  58. package/dist/components/03-organisms/BarChart/index.js +2 -0
  59. package/dist/components/03-organisms/BarChart/index.js.map +1 -0
  60. package/dist/components/03-organisms/DataTable/DataTable.d.ts +5 -2
  61. package/dist/components/03-organisms/DataTable/DataTable.d.ts.map +1 -1
  62. package/dist/components/03-organisms/DataTable/DataTable.jsx +10 -7
  63. package/dist/components/03-organisms/DataTable/DataTable.jsx.map +1 -1
  64. package/dist/components/03-organisms/index.d.ts +1 -0
  65. package/dist/components/03-organisms/index.d.ts.map +1 -1
  66. package/dist/components/03-organisms/index.js +1 -0
  67. package/dist/components/03-organisms/index.js.map +1 -1
  68. package/dist/components/04-templates/LoginTemplate/LoginForm.d.ts +6 -1
  69. package/dist/components/04-templates/LoginTemplate/LoginForm.d.ts.map +1 -1
  70. package/dist/components/04-templates/LoginTemplate/LoginForm.jsx +29 -7
  71. package/dist/components/04-templates/LoginTemplate/LoginForm.jsx.map +1 -1
  72. package/dist/components/04-templates/LoginTemplate/SetupMfa/StepThree.d.ts.map +1 -1
  73. package/dist/components/04-templates/LoginTemplate/SetupMfa/StepThree.jsx +8 -4
  74. package/dist/components/04-templates/LoginTemplate/SetupMfa/StepThree.jsx.map +1 -1
  75. package/dist/components/04-templates/LoginTemplate/SetupMfa/StepTwo.d.ts.map +1 -1
  76. package/dist/components/04-templates/LoginTemplate/SetupMfa/StepTwo.jsx +10 -3
  77. package/dist/components/04-templates/LoginTemplate/SetupMfa/StepTwo.jsx.map +1 -1
  78. package/dist/components/04-templates/LoginTemplate/index.d.ts +1 -1
  79. package/dist/components/04-templates/LoginTemplate/index.d.ts.map +1 -1
  80. package/dist/components/04-templates/LoginTemplate/submitOnEnter.d.ts +9 -0
  81. package/dist/components/04-templates/LoginTemplate/submitOnEnter.d.ts.map +1 -0
  82. package/dist/components/04-templates/LoginTemplate/submitOnEnter.js +15 -0
  83. package/dist/components/04-templates/LoginTemplate/submitOnEnter.js.map +1 -0
  84. package/expresivo/ExpAccentNote/ExpAccentNote.d.ts +25 -0
  85. package/expresivo/ExpAccentNote/ExpAccentNote.d.ts.map +1 -0
  86. package/expresivo/ExpAccentNote/ExpAccentNote.jsx +47 -0
  87. package/expresivo/ExpAccentNote/ExpAccentNote.jsx.map +1 -0
  88. package/expresivo/ExpAccentNote/index.d.ts +2 -0
  89. package/expresivo/ExpAccentNote/index.d.ts.map +1 -0
  90. package/expresivo/ExpAccentNote/index.js +2 -0
  91. package/expresivo/ExpAccentNote/index.js.map +1 -0
  92. package/expresivo/ExpCodeHostIcon/ExpCodeHostIcon.d.ts +29 -0
  93. package/expresivo/ExpCodeHostIcon/ExpCodeHostIcon.d.ts.map +1 -0
  94. package/expresivo/ExpCodeHostIcon/ExpCodeHostIcon.jsx +44 -0
  95. package/expresivo/ExpCodeHostIcon/ExpCodeHostIcon.jsx.map +1 -0
  96. package/expresivo/ExpCodeHostIcon/index.d.ts +2 -0
  97. package/expresivo/ExpCodeHostIcon/index.d.ts.map +1 -0
  98. package/expresivo/ExpCodeHostIcon/index.js +2 -0
  99. package/expresivo/ExpCodeHostIcon/index.js.map +1 -0
  100. package/expresivo/ExpFigureBand/ExpFigureBand.d.ts +61 -0
  101. package/expresivo/ExpFigureBand/ExpFigureBand.d.ts.map +1 -0
  102. package/expresivo/ExpFigureBand/ExpFigureBand.jsx +102 -0
  103. package/expresivo/ExpFigureBand/ExpFigureBand.jsx.map +1 -0
  104. package/expresivo/ExpFigureBand/index.d.ts +2 -0
  105. package/expresivo/ExpFigureBand/index.d.ts.map +1 -0
  106. package/expresivo/ExpFigureBand/index.js +2 -0
  107. package/expresivo/ExpFigureBand/index.js.map +1 -0
  108. package/expresivo/ExpGrowBar/ExpGrowBar.d.ts +13 -2
  109. package/expresivo/ExpGrowBar/ExpGrowBar.d.ts.map +1 -1
  110. package/expresivo/ExpGrowBar/ExpGrowBar.jsx +16 -4
  111. package/expresivo/ExpGrowBar/ExpGrowBar.jsx.map +1 -1
  112. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts +3 -0
  113. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts.map +1 -1
  114. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx +3 -0
  115. package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx.map +1 -1
  116. package/expresivo/ExpRepoAvatar/catalog.d.ts +6 -2
  117. package/expresivo/ExpRepoAvatar/catalog.d.ts.map +1 -1
  118. package/expresivo/ExpRepoAvatar/catalog.js +29 -1
  119. package/expresivo/ExpRepoAvatar/catalog.js.map +1 -1
  120. package/expresivo/ExpSplitCard/ExpSplitCard.d.ts +38 -0
  121. package/expresivo/ExpSplitCard/ExpSplitCard.d.ts.map +1 -0
  122. package/expresivo/ExpSplitCard/ExpSplitCard.jsx +48 -0
  123. package/expresivo/ExpSplitCard/ExpSplitCard.jsx.map +1 -0
  124. package/expresivo/ExpSplitCard/index.d.ts +2 -0
  125. package/expresivo/ExpSplitCard/index.d.ts.map +1 -0
  126. package/expresivo/ExpSplitCard/index.js +2 -0
  127. package/expresivo/ExpSplitCard/index.js.map +1 -0
  128. package/expresivo/ExpStatusTag/ExpStatusTag.d.ts +26 -0
  129. package/expresivo/ExpStatusTag/ExpStatusTag.d.ts.map +1 -0
  130. package/expresivo/ExpStatusTag/ExpStatusTag.jsx +44 -0
  131. package/expresivo/ExpStatusTag/ExpStatusTag.jsx.map +1 -0
  132. package/expresivo/ExpStatusTag/index.d.ts +2 -0
  133. package/expresivo/ExpStatusTag/index.d.ts.map +1 -0
  134. package/expresivo/ExpStatusTag/index.js +2 -0
  135. package/expresivo/ExpStatusTag/index.js.map +1 -0
  136. package/expresivo/index.d.ts +5 -0
  137. package/expresivo/index.d.ts.map +1 -1
  138. package/expresivo/index.js +5 -0
  139. package/expresivo/index.js.map +1 -1
  140. package/package.json +2 -1
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><ellipse cx="8.6" cy="26.5" rx="3.2" ry="2.6" transform="rotate(-15 8.6 26.5)" fill="#FDB653" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="39.4" cy="26.5" rx="3.2" ry="2.6" transform="rotate(15 39.4 26.5)" fill="#FDB653" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><rect x="9.5" y="11" width="29" height="25" rx="4" fill="#FDB653"/><rect x="10.7" y="30" width="26.6" height="4.8" rx="2.8" fill="#F09B3B"/><rect x="9.5" y="11" width="29" height="25" rx="4" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><rect x="20.5" y="11" width="7" height="6.5" rx="0.8" fill="#E9822A" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="16" cy="38" r="4.6" fill="#3A3F6B" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><circle cx="16" cy="38" r="1.6" fill="#AEB8EC"/><circle cx="32" cy="38" r="4.6" fill="#3A3F6B" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><circle cx="32" cy="38" r="1.6" fill="#AEB8EC"/><ellipse cx="18.5" cy="23.5" rx="2" ry="2.5" fill="#222329"/><circle cx="19.1" cy="22.62" r="0.7" fill="#FFFFFF"/><ellipse cx="29.5" cy="23.5" rx="2" ry="2.5" fill="#222329"/><circle cx="30.1" cy="22.62" r="0.7" fill="#FFFFFF"/><ellipse cx="14.8" cy="27.6" rx="1.8" ry="1.1" fill="#FF8A70"/><ellipse cx="33.2" cy="27.6" rx="1.8" ry="1.1" fill="#FF8A70"/><path d="M21.6 27.2Q24 29.6 26.4 27.2" stroke="#222329" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><path d="M19.5 39.5C19.5 44 22 46.5 24 46.5S28.5 44 28.5 39.5Z" fill="#F7922E" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><path d="M22 40C22 42.8 23 44.2 24 44.2S26 42.8 26 40Z" fill="#FCCB3C"/><path d="M17.5 28L11 35.5C10 36.8 10.5 39 12.5 39H18Z" fill="#2F63C9" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M30.5 28L37 35.5C38 36.8 37.5 39 35.5 39H30Z" fill="#2F63C9" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M24 4.5C30.5 9 33 17 32.2 27L31.3 40H16.7L15.8 27C15 17 17.5 9 24 4.5Z" fill="#8EC3FA"/><path d="M28.4 10.5C30.6 14.5 31.4 20 30.9 27L30.1 38.8H27.6C28.8 30 29.4 19 28.4 10.5Z" fill="#6AA4EE"/><path d="M16.4 33.6H31.6" stroke="#222329" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/><path d="M24 4.5C30.5 9 33 17 32.2 27L31.3 40H16.7L15.8 27C15 17 17.5 9 24 4.5Z" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M24 4.5C26.6 6.3 28.5 8.6 29.8 11.3H18.2C19.5 8.6 21.4 6.3 24 4.5Z" fill="#F7922E" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><circle cx="24" cy="20.5" r="4.6" fill="#EAF4FF" stroke="#222329" stroke-width="2" stroke-linejoin="round"/><circle cx="24" cy="20.5" r="2.7" fill="#2F63C9"/><circle cx="22.8" cy="19.3" r="1" fill="#FFFFFF"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><ellipse cx="15" cy="39.5" rx="3.4" ry="2.6" fill="#5C9C6A" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><ellipse cx="33" cy="39.5" rx="3.4" ry="2.6" fill="#5C9C6A" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><ellipse cx="24" cy="40.5" rx="3.4" ry="2.6" fill="#5C9C6A" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><path d="M8 33C6.5 27.5 10.5 22.5 16 22.5C16.5 15 19.5 9.5 24 9.5S31.5 15 32 22.5C37.5 22.5 41.5 27.5 40 33C39 38 32.5 40 24 40S9 38 8 33Z" fill="#7FBF83" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="20.3" cy="13.2" rx="1.7" ry="1" transform="rotate(-35 20.3 13.2)" fill="#AEDDA8"/><circle cx="17" cy="33.5" r="1.1" fill="#5C9C6A"/><circle cx="31" cy="34" r="1.3" fill="#5C9C6A"/><circle cx="10.8" cy="25.5" r="3.8" fill="#FFFFFF" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><circle cx="11.4" cy="26" r="1.9" fill="#222329"/><circle cx="10.64" cy="25.16" r="0.65" fill="#FFFFFF"/><circle cx="37.2" cy="25.5" r="3.8" fill="#FFFFFF" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><circle cx="36.6" cy="26" r="1.9" fill="#222329"/><circle cx="35.84" cy="25.16" r="0.65" fill="#FFFFFF"/><circle cx="24" cy="17.5" r="4.4" fill="#FFFFFF" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><circle cx="24" cy="18.3" r="2.2" fill="#222329"/><circle cx="23.12" cy="17.33" r="0.75" fill="#FFFFFF"/><path d="M20.5 30.5Q24 33.5 27.5 30.5" stroke="#222329" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><ellipse cx="8.6" cy="29.5" rx="4.2" ry="3.2" transform="rotate(15 8.6 29.5)" fill="#3B3F58" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="39.4" cy="29.5" rx="4.2" ry="3.2" transform="rotate(-15 39.4 29.5)" fill="#3B3F58" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="18.5" cy="41" rx="4.2" ry="2.8" fill="#3B3F58" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="29.5" cy="41" rx="4.2" ry="2.8" fill="#3B3F58" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><rect x="11" y="8.5" width="26" height="31" rx="6" fill="#FDB82A"/><rect x="12.2" y="9.7" width="23.6" height="6" rx="4.8" fill="#FED465"/><rect x="11" y="8.5" width="26" height="31" rx="6" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><circle cx="19.5" cy="22.5" r="3.2" fill="#FFFFFF" stroke="#222329" stroke-width="1.4" stroke-linejoin="round"/><circle cx="20.2" cy="23.1" r="1.6" fill="#222329"/><circle cx="19.56" cy="22.4" r="0.54" fill="#FFFFFF"/><circle cx="28.5" cy="22.5" r="3.2" fill="#FFFFFF" stroke="#222329" stroke-width="1.4" stroke-linejoin="round"/><circle cx="27.8" cy="23.1" r="1.6" fill="#222329"/><circle cx="27.16" cy="22.4" r="0.54" fill="#FFFFFF"/><path d="M20.5 29C21.5 32.5 26.5 32.5 27.5 29Z" fill="#8A3324" stroke="#222329" stroke-width="1.4" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><polygon points="24 5.5 41 14.5 24 23.5 7 14.5" fill="#EADCFF" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><polygon points="7 14.5 24 23.5 24 43.5 7 34.5" fill="#B57BEA" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><polygon points="24 23.5 41 14.5 41 34.5 24 43.5" fill="#8F5AD6" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="24" cy="14.5" rx="4.4" ry="2.4" fill="#8E55F0" stroke="#222329" stroke-width="1.4" stroke-linejoin="round"/><path d="M32.5 25L33.6 27.9L36.5 29L33.6 30.1L32.5 33L31.4 30.1L28.5 29L31.4 27.9Z" fill="#FFFFFF"/><circle cx="15.5" cy="29" r="2" fill="#D9B8FA"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><circle cx="11.5" cy="27.5" r="2.6" fill="#F2C94C" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="16" cy="20" r="2.8" fill="#F2C94C" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="22.5" cy="13.2" r="3" fill="#F2C94C" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="29.2" cy="15" r="2.8" fill="#F2C94C" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="33.8" cy="20.4" r="2.5" fill="#F2C94C" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><ellipse cx="12" cy="39.8" rx="3.4" ry="2.4" fill="#5FA56A" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="28" cy="39.8" rx="3.4" ry="2.4" fill="#5FA56A" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M4 39.5C8 34 12 24 19 16.5C21.5 13.8 25.5 13.5 28 16C31.5 19.5 34 24 35.5 26.8C38 25.3 42.5 25.8 44 29.5C45.5 33.5 42.5 37.5 38.5 37.5C37 37.5 36 38 35.5 39.5Z" fill="#86CC86"/><path d="M8.5 38.3C15 35.6 28 35.6 34.5 38.3Z" fill="#B8E2A2"/><circle cx="20" cy="30" r="1.8" fill="#F2C94C"/><circle cx="25.5" cy="23" r="1.3" fill="#F2C94C"/><circle cx="14.5" cy="34" r="1.2" fill="#F2C94C"/><circle cx="28.5" cy="31" r="1.1" fill="#F2C94C"/><path d="M4 39.5C8 34 12 24 19 16.5C21.5 13.8 25.5 13.5 28 16C31.5 19.5 34 24 35.5 26.8C38 25.3 42.5 25.8 44 29.5C45.5 33.5 42.5 37.5 38.5 37.5C37 37.5 36 38 35.5 39.5Z" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="39.5" cy="30.5" rx="1.6" ry="1.6" fill="#222329"/><circle cx="39.98" cy="29.94" r="0.56" fill="#FFFFFF"/><path d="M40.4 34.4Q42.2 34.9 43.3 33.5" stroke="#222329" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><circle cx="20.5" cy="19" r="2.8" fill="#4E8FE6" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="25.5" cy="15.2" r="2.8" fill="#4E8FE6" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="31.5" cy="14.6" r="2.8" fill="#4E8FE6" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="37" cy="18" r="2.6" fill="#4E8FE6" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><ellipse cx="14.5" cy="38.5" rx="3.6" ry="2.6" fill="#62A964" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="30.5" cy="38.5" rx="3.6" ry="2.6" fill="#62A964" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M6.5 32C6 26.5 9.5 22.5 14 22.5C16 22.5 17.5 23.5 18.5 24.5C20.5 18.5 25 15 30 15C37 15 41 21.5 41 29C41 33 43 36.5 45 39C40.5 40 36.5 39.5 34 38.5H10.5C8 38.5 6.8 35.5 6.5 32Z" fill="#8CCB7A"/><path d="M11 37.3C17 34 29 34 36 37.3Z" fill="#C3E08F"/><circle cx="29" cy="22" r="1.5" fill="#62A964"/><circle cx="34.5" cy="25.5" r="1.1" fill="#62A964"/><circle cx="25" cy="25" r="1.1" fill="#62A964"/><path d="M6.5 32C6 26.5 9.5 22.5 14 22.5C16 22.5 17.5 23.5 18.5 24.5C20.5 18.5 25 15 30 15C37 15 41 21.5 41 29C41 33 43 36.5 45 39C40.5 40 36.5 39.5 34 38.5H10.5C8 38.5 6.8 35.5 6.5 32Z" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="12" cy="28.5" rx="1.7" ry="1.7" fill="#222329"/><circle cx="12.51" cy="27.91" r="0.59" fill="#FFFFFF"/><path d="M8.6 33Q10.6 34.3 12.6 33.4" stroke="#222329" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><path d="M24 8.6V5.2" stroke="#222329" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/><circle cx="24" cy="4.6" r="1.5" fill="#FBC33D" stroke="#222329" stroke-width="1.4" stroke-linejoin="round"/><rect x="9" y="18" width="9" height="24" rx="1" fill="#6FCF9E"/><rect x="15" y="19" width="2" height="22" rx="0.6" fill="#52B585"/><rect x="9" y="18" width="9" height="24" rx="1" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><rect x="30" y="18" width="9" height="24" rx="1" fill="#6FCF9E"/><rect x="36" y="19" width="2" height="22" rx="0.6" fill="#52B585"/><rect x="30" y="18" width="9" height="24" rx="1" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><rect x="18.5" y="14" width="11" height="28" rx="1" fill="#6FCF9E"/><rect x="26.5" y="15" width="2" height="26" rx="0.6" fill="#52B585"/><rect x="18.5" y="14" width="11" height="28" rx="1" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M9 18A4.5 4.5 0 0 1 18 18Z" fill="#5AA0E8" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M30 18A4.5 4.5 0 0 1 39 18Z" fill="#5AA0E8" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M18.5 14A5.5 5.5 0 0 1 29.5 14Z" fill="#5AA0E8" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="22" cy="11" rx="1.6" ry="0.9" transform="rotate(-20 22 11)" fill="#B5D6FF"/><path d="M11.8 29V24.7A1.7 1.7 0 0 1 15.2 24.7V29Z" fill="#2E5E6E"/><rect x="11.8" y="33" width="3.4" height="3.4" rx="0.6" fill="#2E5E6E"/><path d="M32.8 29V24.7A1.7 1.7 0 0 1 36.2 24.7V29Z" fill="#2E5E6E"/><rect x="32.8" y="33" width="3.4" height="3.4" rx="0.6" fill="#2E5E6E"/><circle cx="24" cy="21" r="2.2" fill="#5AA0E8" stroke="#222329" stroke-width="1.4" stroke-linejoin="round"/><path d="M21 42V32.5A3 3 0 0 1 27 32.5V42Z" fill="#2E5E6E" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><circle cx="23" cy="25" r="16.8" fill="#EE6A3C" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M10.5 18A14 14 0 0 1 17 12" stroke="#FF9E70" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><circle cx="23" cy="25" r="11.2" fill="#3F86E8" stroke="#222329" stroke-width="2.2" stroke-linejoin="round"/><path d="M16.5 19.5C18.5 17 22 16.5 23.5 18C25 19.5 23.5 21.5 21.5 22C19.5 22.5 20 25 18 25.5C16 26 15.2 22.5 16.5 19.5Z" fill="#FCCB3C"/><path d="M25 27C27 25.5 30 26 30.5 28.5C31 31 29 33.5 26.5 33.5C24.5 33.5 23.5 31.5 24.5 30C25 29 24 28 25 27Z" fill="#FCCB3C"/><ellipse cx="29" cy="19.5" rx="1.8" ry="1.2" fill="#FCCB3C"/><circle cx="38.5" cy="9.5" r="3" fill="#EE6A3C" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><circle cx="37.45" cy="8.45" r="0.9" fill="#FF9E70"/><circle cx="39.6" cy="39.6" r="2.4" fill="#EE6A3C" stroke="#222329" stroke-width="1.8" stroke-linejoin="round"/><circle cx="38.76" cy="38.76" r="0.72" fill="#FF9E70"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><ellipse cx="24" cy="33" rx="11" ry="5" fill="#8E55F0" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M16 29C14 34 9 35 8 39C7.5 42 11.5 42.5 11.8 39.5" stroke="#222329" stroke-width="7" stroke-linecap="round"/><path d="M22.2 30C21.4 35 16 38.5 17.5 41.5C19 43.5 22.5 42 21 39.5" stroke="#222329" stroke-width="7" stroke-linecap="round"/><path d="M25.8 30C26.6 35 32 38.5 30.5 41.5C29 43.5 25.5 42 27 39.5" stroke="#222329" stroke-width="7" stroke-linecap="round"/><path d="M32 29C34 34 39 35 40 39C40.5 42 36.5 42.5 36.2 39.5" stroke="#222329" stroke-width="7" stroke-linecap="round"/><path d="M16 29C14 34 9 35 8 39C7.5 42 11.5 42.5 11.8 39.5" stroke="#8E55F0" stroke-width="4.2" stroke-linecap="round"/><path d="M22.2 30C21.4 35 16 38.5 17.5 41.5C19 43.5 22.5 42 21 39.5" stroke="#8E55F0" stroke-width="4.2" stroke-linecap="round"/><path d="M25.8 30C26.6 35 32 38.5 30.5 41.5C29 43.5 25.5 42 27 39.5" stroke="#8E55F0" stroke-width="4.2" stroke-linecap="round"/><path d="M32 29C34 34 39 35 40 39C40.5 42 36.5 42.5 36.2 39.5" stroke="#8E55F0" stroke-width="4.2" stroke-linecap="round"/><path d="M10 25C10 13.5 16.5 6 24 6S38 13.5 38 25C38 31 32 33.5 24 33.5S10 31 10 25Z" fill="#8E55F0" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="16.5" cy="13.5" rx="3" ry="1.8" transform="rotate(-35 16.5 13.5)" fill="#BD98FF"/><ellipse cx="18" cy="21.5" rx="3.8" ry="3.4" fill="#FFFFFF" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="19" cy="22.4" r="1.9" fill="#222329"/><polygon points="13 15 23.5 15 23.5 20.4 13 17.6" fill="#8E55F0"/><path d="M13.7 17.8L22.8 20.4" stroke="#222329" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><ellipse cx="30" cy="21.5" rx="3.8" ry="3.4" fill="#FFFFFF" stroke="#222329" stroke-width="1.6" stroke-linejoin="round"/><circle cx="29" cy="22.4" r="1.9" fill="#222329"/><polygon points="35 15 24.5 15 24.5 20.4 35 17.6" fill="#8E55F0"/><path d="M34.3 17.8L25.2 20.4" stroke="#222329" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M21.8 27.6Q24 28.8 26.2 27.6" stroke="#222329" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><ellipse cx="12.5" cy="33" rx="4.2" ry="7" transform="rotate(18 12.5 33)" fill="#3E7FE0" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="35.5" cy="33" rx="4.2" ry="7" transform="rotate(-18 35.5 33)" fill="#3E7FE0" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="19" cy="41.5" rx="3.6" ry="2.8" fill="#FBC33D" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="29" cy="41.5" rx="3.6" ry="2.8" fill="#FBC33D" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><rect x="13" y="14" width="22" height="27" rx="6" fill="#A9D8FB"/><rect x="29.6" y="20" width="4.2" height="19.8" rx="2.6" fill="#82BCEF"/><rect x="13" y="14" width="22" height="27" rx="6" fill="none" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><path d="M13 21V17C13 11.5 16.5 8.5 21 8.2L31.5 7C34 6.8 35.6 8.6 35.3 11L35 21Z" fill="#FBC33D" stroke="#222329" stroke-width="2.4" stroke-linejoin="round"/><ellipse cx="19.5" cy="12.4" rx="2.6" ry="1.3" transform="rotate(-8 19.5 12.4)" fill="#FFE59A"/><circle cx="24" cy="29.5" r="6.4" fill="#EAF4FF" stroke="#222329" stroke-width="2.2" stroke-linejoin="round"/><circle cx="24" cy="29.5" r="3.6" fill="#2B3F66"/><circle cx="22.6" cy="28.1" r="1.2" fill="#FFFFFF"/></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48" fill="none"><rect x="8" y="10" width="32" height="28" rx="5" fill="#F2F2F2" stroke="#616265" stroke-width="2.4" stroke-linejoin="round"/><path d="M8 16.5H40" stroke="#616265" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/><circle cx="12" cy="13.3" r="1" fill="#A5A5A7"/><circle cx="15.2" cy="13.3" r="1" fill="#A5A5A7"/><circle cx="18.4" cy="13.3" r="1" fill="#A5A5A7"/><path d="M19.5 22.5L15 27.2L19.5 32" stroke="#616265" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/><path d="M28.5 22.5L33 27.2L28.5 32" stroke="#616265" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/><path d="M25.6 21.5L22.4 33" stroke="#616265" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -698,6 +698,13 @@
698
698
  color: var(--exp-field-ink);
699
699
  }
700
700
 
701
+ :root:has(.exp-scope)
702
+ :is(input, textarea)[data-orion-part='field-control']:read-only:not(
703
+ :disabled
704
+ ) {
705
+ color: var(--exp-field-label);
706
+ }
707
+
701
708
  :root:has(.exp-scope) [data-orion-part='field-control']::placeholder {
702
709
  color: var(--color-gray-2);
703
710
  }
@@ -870,6 +877,27 @@
870
877
  var(--exp-card-bg);
871
878
  }
872
879
 
880
+ /* ExpSplitCard reads as an `accent` card split into columns. */
881
+ :root:has(.exp-scope) [data-orion-part='exp-split-card'] {
882
+ border-color: var(--exp-card-edge);
883
+ background:
884
+ var(--exp-card-band) top / 100% 4px no-repeat,
885
+ var(--exp-card-bg);
886
+ box-shadow: var(--exp-card-drop);
887
+ }
888
+
889
+ /* `data-exp-band="cool"` on an element switches the band of the cards and
890
+ framed tables inside it: blue to orange instead of orange to violet. */
891
+ :root:has(.exp-scope) [data-exp-band='cool'] {
892
+ --exp-card-band: linear-gradient(
893
+ 90deg,
894
+ var(--color-info) 0%,
895
+ var(--color-lavender) 45%,
896
+ #b07fd0 72%,
897
+ #f7882f 100%
898
+ );
899
+ }
900
+
873
901
  /* Skin: framed tables (DataTable card) ---------------------------------- */
874
902
 
875
903
  /* A framed table reads as one card: the brand band along the top, like
@@ -885,6 +913,15 @@
885
913
  box-shadow: var(--exp-card-drop);
886
914
  }
887
915
 
916
+ /* Skin: tab bar (TabList second) ----------------------------------------- */
917
+
918
+ /* In dark mode the core `second` bar is gray-1, lighter than the cards
919
+ around it; in the layer it takes the dark surface of a card. */
920
+ :root.dark:has(.exp-scope) [data-orion-part='tab-bar'][data-modifier='second'] {
921
+ background: var(--exp-card-bg);
922
+ box-shadow: inset 0 0 0 1px var(--exp-field-line);
923
+ }
924
+
888
925
  /* Skin: table rows as cards (ExpScope tables="cards") ------------------- */
889
926
 
890
927
  :root:has(.exp-scope[data-exp-tables='cards'])
@@ -14,13 +14,20 @@ export type CodeBlockProps = {
14
14
  startLine?: number;
15
15
  /** Lines to emphasize, as inclusive ranges in the same numbering. */
16
16
  highlight?: CodeBlockRange[];
17
+ /** Long lines continue on the next row instead of scrolling sideways. */
18
+ wrap?: boolean;
17
19
  /** Called when the browser refuses to write to the clipboard. */
18
20
  onCopyError?: (error: unknown) => void;
19
21
  } & Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
20
22
  /**
21
23
  * Read-only block of source code with a copy button. Shows an excerpt
22
- * exactly as written: monospace, no wrapping, horizontal scroll when a line
23
- * is longer than the block.
24
+ * exactly as written: monospace and, by default, no wrapping, with horizontal
25
+ * scroll when a line is longer than the block.
26
+ *
27
+ * With `wrap`, a line longer than the block continues on the next row, under
28
+ * the code and not under the line numbers. Use it where scrolling sideways is
29
+ * awkward, such as narrow screens or a command to read whole. Copying always
30
+ * takes the original text.
24
31
  *
25
32
  * Setting `startLine` numbers the lines, so an excerpt from the middle of a
26
33
  * file keeps its real line numbers; `highlight` then marks ranges in that
@@ -48,9 +55,10 @@ export type CodeBlockProps = {
48
55
  * @param {string} [props.language] - Label shown in the header.
49
56
  * @param {number} [props.startLine] - Number of the first line; enables line numbers.
50
57
  * @param {CodeBlockRange[]} [props.highlight=[]] - Inclusive line ranges to emphasize.
58
+ * @param {boolean} [props.wrap=false] - Long lines continue on the next row instead of scrolling.
51
59
  * @param {(error: unknown) => void} [props.onCopyError] - Called when the clipboard write fails.
52
60
  *
53
61
  * @returns {ReactNode} The rendered CodeBlock component.
54
62
  */
55
- export declare function CodeBlock({ code, copyLabel, copiedLabel, language, startLine, highlight, onCopyError, ...restProps }: CodeBlockProps): ReactNode;
63
+ export declare function CodeBlock({ code, copyLabel, copiedLabel, language, startLine, highlight, wrap, onCopyError, ...restProps }: CodeBlockProps): ReactNode;
56
64
  //# sourceMappingURL=CodeBlock.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.d.ts","sourceRoot":"","sources":["../../../../src/components/01-atoms/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAKf,iEAAiE;AACjE,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG;IAC3B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,sDAAsD;IACtD,SAAS,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,CAAC;IA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Ac,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAQrD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,SAAS,EACT,WAAW,EACX,QAAQ,EACR,SAAS,EACT,SAAc,EACd,IAAY,EACZ,WAAW,EACX,GAAG,SAAS,EACb,EAAE,cAAc,GAAG,SAAS,CAmG5B"}
@@ -10,8 +10,13 @@ function isHighlighted(line, ranges) {
10
10
  }
11
11
  /**
12
12
  * Read-only block of source code with a copy button. Shows an excerpt
13
- * exactly as written: monospace, no wrapping, horizontal scroll when a line
14
- * is longer than the block.
13
+ * exactly as written: monospace and, by default, no wrapping, with horizontal
14
+ * scroll when a line is longer than the block.
15
+ *
16
+ * With `wrap`, a line longer than the block continues on the next row, under
17
+ * the code and not under the line numbers. Use it where scrolling sideways is
18
+ * awkward, such as narrow screens or a command to read whole. Copying always
19
+ * takes the original text.
15
20
  *
16
21
  * Setting `startLine` numbers the lines, so an excerpt from the middle of a
17
22
  * file keeps its real line numbers; `highlight` then marks ranges in that
@@ -39,11 +44,12 @@ function isHighlighted(line, ranges) {
39
44
  * @param {string} [props.language] - Label shown in the header.
40
45
  * @param {number} [props.startLine] - Number of the first line; enables line numbers.
41
46
  * @param {CodeBlockRange[]} [props.highlight=[]] - Inclusive line ranges to emphasize.
47
+ * @param {boolean} [props.wrap=false] - Long lines continue on the next row instead of scrolling.
42
48
  * @param {(error: unknown) => void} [props.onCopyError] - Called when the clipboard write fails.
43
49
  *
44
50
  * @returns {ReactNode} The rendered CodeBlock component.
45
51
  */
46
- export function CodeBlock({ code, copyLabel, copiedLabel, language, startLine, highlight = [], onCopyError, ...restProps }) {
52
+ export function CodeBlock({ code, copyLabel, copiedLabel, language, startLine, highlight = [], wrap = false, onCopyError, ...restProps }) {
47
53
  const [isCopied, setIsCopied] = useState(false);
48
54
  const resetTimer = useRef(undefined);
49
55
  useEffect(() => () => clearTimeout(resetTimer.current), []);
@@ -74,7 +80,7 @@ export function CodeBlock({ code, copyLabel, copiedLabel, language, startLine, h
74
80
  </span>
75
81
  </div>
76
82
  <pre tabIndex={0} className="focus-visible:ring-lavender dark:focus-visible:ring-lavender-dark m-0 overflow-x-auto py-2 font-mono text-xs leading-5 text-black focus-visible:ring-2 focus-visible:outline-none focus-visible:ring-inset dark:text-white">
77
- <code className="block min-w-max">
83
+ <code className={clsx('block', !wrap && 'min-w-max')}>
78
84
  <Each of={lines} render={(line, index) => {
79
85
  const number = firstLine + index;
80
86
  const isMarked = isHighlighted(number, highlight);
@@ -84,7 +90,9 @@ export function CodeBlock({ code, copyLabel, copiedLabel, language, startLine, h
84
90
  : 'text-gray-1 dark:text-gray-2')}>
85
91
  {number}
86
92
  </span>)}
87
- <span className={clsx('pr-3 whitespace-pre', !isNumbered && 'pl-3')}>
93
+ <span className={clsx('pr-3', wrap
94
+ ? 'min-w-0 flex-1 wrap-anywhere whitespace-pre-wrap'
95
+ : 'whitespace-pre', !isNumbered && 'pl-3')}>
88
96
  {line || ' '}
89
97
  </span>
90
98
  {'\n'}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeBlock.jsx","sourceRoot":"","sources":["../../../../src/components/01-atoms/CodeBlock/CodeBlock.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAGL,SAAS,EACT,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAsB3C,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,SAAS,aAAa,CAAC,IAAY,EAAE,MAAwB;IAC3D,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE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;YACtB,MAAM,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;YACjC,MAAM,QAAQ,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;YAElD,OAAO,CACL,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,IAAI,CACb,MAAM,EACN,QAAQ,IAAI,uCAAuC,CACpD,CAAC,CAEF;kBAAA,CAAC,CAAC,CAAC,UAAU,IAAI,CACf,CAAC,IAAI,CACH,WAAW,CAAC,MAAM,CAClB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAC9B,SAAS,CAAC,CAAC,IAAI,CACb,kDAAkD,EAClD,QAAQ;wBACN,CAAC,CAAC,qDAAqD;wBACvD,CAAC,CAAC,8BAA8B,CACnC,CAAC,CAEF;sBAAA,CAAC,MAAM,CACT;oBAAA,EAAE,IAAI,CAAC,CACR,CACD;kBAAA,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,IAAI,CACb,MAAM,EACN,IAAI;oBACF,CAAC,CAAC,kDAAkD;oBACpD,CAAC,CAAC,gBAAgB,EACpB,CAAC,UAAU,IAAI,MAAM,CACtB,CAAC,CAEF;oBAAA,CAAC,IAAI,IAAI,GAAG,CACd;kBAAA,EAAE,IAAI,CACN;kBAAA,CAAC,IAAI,CACP;gBAAA,EAAE,IAAI,CAAC,CACR,CAAC;QACJ,CAAC,CAAC,EAEN;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,GAAG,CACP;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
@@ -28,7 +28,7 @@ type OtpInputProps = {
28
28
  * @param {boolean} [props.disabled=false] - Whether the input fields are disabled.
29
29
  * @param {string} [props.labelStyle] - Additional CSS classes for the label.
30
30
  * @param {string} [props.error] - Error message to be displayed below the input fields.
31
- * @param {(otp: string) => void} props.handleSubmit - Callback function called when the OTP is complete (all boxes filled).
31
+ * @param {(otp: string) => void} props.handleSubmit - Callback function called as soon as the OTP is complete (all boxes filled), in the same change.
32
32
  * @param {(digit: number) => string} [props.getDigitAriaLabel] - Generates an accessible label for each one-based digit position.
33
33
  * @param {React.HTMLAttributes<HTMLDivElement>} [props.restProps] - Additional HTML attributes for the container div.
34
34
  * @required props.label, props.handleSubmit
@@ -23,7 +23,7 @@ import { Paragraph } from '../Paragraph';
23
23
  * @param {boolean} [props.disabled=false] - Whether the input fields are disabled.
24
24
  * @param {string} [props.labelStyle] - Additional CSS classes for the label.
25
25
  * @param {string} [props.error] - Error message to be displayed below the input fields.
26
- * @param {(otp: string) => void} props.handleSubmit - Callback function called when the OTP is complete (all boxes filled).
26
+ * @param {(otp: string) => void} props.handleSubmit - Callback function called as soon as the OTP is complete (all boxes filled), in the same change.
27
27
  * @param {(digit: number) => string} [props.getDigitAriaLabel] - Generates an accessible label for each one-based digit position.
28
28
  * @param {React.HTMLAttributes<HTMLDivElement>} [props.restProps] - Additional HTML attributes for the container div.
29
29
  * @required props.label, props.handleSubmit
@@ -36,7 +36,8 @@ export function OtpInput({ length = 4, disabled = false, label, labelStyle, erro
36
36
  const accessibilityId = useId();
37
37
  const labelId = `${accessibilityId}-label`;
38
38
  const errorId = `${accessibilityId}-error`;
39
- const onSubmit = (newCode) => setTimeout(() => handleSubmit(newCode.join('')), 100);
39
+ // Right away: a form that reads the code on Enter must already have it.
40
+ const onSubmit = (newCode) => handleSubmit(newCode.join(''));
40
41
  const handleInputChange = (index, value) => {
41
42
  if (value && !/^\d$/.test(value))
42
43
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"OtpInput.jsx","sourceRoot":"","sources":["../../../../src/components/01-atoms/OtpInput/OtpInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAKL,KAAK,EACL,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,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AACJ,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import { IconButton } from '../../01-atoms/IconButton';
3
+ import { type DropdownProps } from '../Dropdown/Dropdown';
4
+ export type ActionMenuProps = {
5
+ /** Accessible name of the button and text of its tooltip. */
6
+ label: string;
7
+ /** The actions of the menu, as in `Dropdown`. */
8
+ actions: DropdownProps['actions'];
9
+ tooltipPlacement?: ComponentProps<typeof IconButton>['tooltipPlacement'];
10
+ } & Omit<DropdownProps, 'children' | 'actions'>;
11
+ /**
12
+ * Button with three vertical dots that opens a menu of actions. For the
13
+ * secondary actions of a table row or a card, where a button for each one
14
+ * does not fit. The menu is a `Dropdown`: it opens below the button when the
15
+ * right side has no room, and it is driven with the keyboard.
16
+ *
17
+ * `label` names what the menu acts on (`Options for core-logistics`): with
18
+ * several menus on a page, the dots alone do not say which row they belong to.
19
+ *
20
+ * @component
21
+ * @example
22
+ * <ActionMenu
23
+ * label="Options for core-logistics"
24
+ * actions={[
25
+ * { text: 'View cases', action: openCases },
26
+ * { text: 'Sync', action: sync, disabled: isSyncing },
27
+ * ]}
28
+ * />
29
+ *
30
+ * @param {ActionMenuProps} props - The properties of the ActionMenu component.
31
+ * @param {string} props.label - Accessible name of the button and text of its tooltip.
32
+ * @param {DropdownProps['actions']} props.actions - The actions of the menu.
33
+ * @param {UseFloatingOptions['placement']} [props.tooltipPlacement='top'] - Placement of the tooltip.
34
+ * @param {string} [props.className] - Classes for the open menu, as in `Dropdown`.
35
+ *
36
+ * @returns {ReactNode} The rendered ActionMenu component.
37
+ */
38
+ export declare function ActionMenu({ label, actions, tooltipPlacement, ...restProps }: ActionMenuProps): ReactNode;
39
+ //# sourceMappingURL=ActionMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionMenu.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG;IAC5B,6DAA6D;IAC7D,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IAClC,gBAAgB,CAAC,EAAE,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC,kBAAkB,CAAC,CAAC;CAC1E,GAAG,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;AAEhD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,GAAG,SAAS,EACb,EAAE,eAAe,GAAG,SAAS,CAU7B"}
@@ -0,0 +1,36 @@
1
+ import { IoEllipsisVertical } from 'react-icons/io5';
2
+ import { IconButton } from '../../01-atoms/IconButton';
3
+ import { Dropdown } from '../Dropdown/Dropdown';
4
+ /**
5
+ * Button with three vertical dots that opens a menu of actions. For the
6
+ * secondary actions of a table row or a card, where a button for each one
7
+ * does not fit. The menu is a `Dropdown`: it opens below the button when the
8
+ * right side has no room, and it is driven with the keyboard.
9
+ *
10
+ * `label` names what the menu acts on (`Options for core-logistics`): with
11
+ * several menus on a page, the dots alone do not say which row they belong to.
12
+ *
13
+ * @component
14
+ * @example
15
+ * <ActionMenu
16
+ * label="Options for core-logistics"
17
+ * actions={[
18
+ * { text: 'View cases', action: openCases },
19
+ * { text: 'Sync', action: sync, disabled: isSyncing },
20
+ * ]}
21
+ * />
22
+ *
23
+ * @param {ActionMenuProps} props - The properties of the ActionMenu component.
24
+ * @param {string} props.label - Accessible name of the button and text of its tooltip.
25
+ * @param {DropdownProps['actions']} props.actions - The actions of the menu.
26
+ * @param {UseFloatingOptions['placement']} [props.tooltipPlacement='top'] - Placement of the tooltip.
27
+ * @param {string} [props.className] - Classes for the open menu, as in `Dropdown`.
28
+ *
29
+ * @returns {ReactNode} The rendered ActionMenu component.
30
+ */
31
+ export function ActionMenu({ label, actions, tooltipPlacement, ...restProps }) {
32
+ return (<Dropdown {...restProps} actions={actions}>
33
+ <IconButton icon={<IoEllipsisVertical />} label={label} tooltipPlacement={tooltipPlacement}/>
34
+ </Dropdown>);
35
+ }
36
+ //# sourceMappingURL=ActionMenu.jsx.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActionMenu.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/ActionMenu/ActionMenu.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAsB,MAAM,sBAAsB,CAAC;AAUpE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,GAAG,SAAS,EACI;IAChB,OAAO,CACL,CAAC,QAAQ,CAAC,IAAI,SAAS,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CACxC;MAAA,CAAC,UAAU,CACT,IAAI,CAAC,CAAC,CAAC,kBAAkB,CAAC,AAAD,EAAG,CAAC,CAC7B,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,EAEvC;IAAA,EAAE,QAAQ,CAAC,CACZ,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ActionMenu';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/ActionMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './ActionMenu';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/02-molecules/ActionMenu/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -1,11 +1,15 @@
1
1
  import { type HTMLAttributes, type ReactNode } from 'react';
2
+ import { type TImageViewerDocumentLabels } from './ImageViewerDocument';
2
3
  import { type TImageCrop } from './ImageViewerImage';
3
4
  export type { TImageCrop } from './ImageViewerImage';
5
+ export type { TImageViewerDocumentLabels } from './ImageViewerDocument';
6
+ export type TImageViewType = 'image' | 'pdf';
4
7
  export type TImageView = {
5
8
  id: string;
6
9
  label: string;
7
10
  src: string;
8
11
  alt: string;
12
+ type?: TImageViewType;
9
13
  indicator?: ReactNode;
10
14
  crop?: TImageCrop;
11
15
  };
@@ -16,7 +20,7 @@ export type TImageViewerLabels = {
16
20
  rotate: string;
17
21
  enterFullscreen: string;
18
22
  exitFullscreen: string;
19
- };
23
+ } & TImageViewerDocumentLabels;
20
24
  type ImageViewerProps = {
21
25
  views: TImageView[];
22
26
  labels: TImageViewerLabels;
@@ -34,6 +38,12 @@ type ImageViewerProps = {
34
38
  * changes, whether the user picked a tab or the consumer moved `activeId`: a
35
39
  * transform that made sense for one angle rarely makes sense for the next.
36
40
  *
41
+ * Once zoomed in, the image can be panned: by dragging it with the pointer
42
+ * (mouse, touch or pen) or with the arrow keys while the panel has focus. The
43
+ * pan never leaves a gap between the image and the frame; zooming in keeps the
44
+ * point under inspection centered, zooming out to the minimum, rotating and
45
+ * toggling full screen center the image again.
46
+ *
37
47
  * Uncontrolled by default. Passing `activeId` makes the consumer own the active
38
48
  * view, so something outside the viewer (a side panel, a "next pending" action)
39
49
  * can follow or drive it; `onViewChange` reports tab picks in both modes.
@@ -49,6 +59,14 @@ type ImageViewerProps = {
49
59
  * A view's `crop` draws only that region of its image, fitted to the frame
50
60
  * like the whole image would be — a face inside a document, for instance.
51
61
  *
62
+ * A view with `type: 'pdf'` is rendered page by page into images with pdf.js,
63
+ * loaded on first use, so zoom, rotation and pan work on it exactly as on a
64
+ * photo and there is a single toolbar. A document with several pages shows a
65
+ * pager over the page; the toolbar gains an "open in a new tab" action for
66
+ * the original file. The browser fetches the PDF itself, so its origin must
67
+ * allow CORS; when it cannot be loaded, the view shows its description and
68
+ * the same link.
69
+ *
52
70
  * @component
53
71
  * @example
54
72
  * const [viewId, setViewId] = useState('front');
@@ -94,9 +112,23 @@ type ImageViewerProps = {
94
112
  * labels={labels}
95
113
  * />
96
114
  *
115
+ * @example
116
+ * <ImageViewer
117
+ * title="Insurance policy"
118
+ * views={[
119
+ * { id: 'policy', label: 'Policy', src: '/policy.pdf', alt: 'Insurance policy', type: 'pdf' },
120
+ * ]}
121
+ * labels={{
122
+ * ...labels,
123
+ * openDocument: 'Open PDF',
124
+ * previousPage: 'Previous page',
125
+ * nextPage: 'Next page',
126
+ * }}
127
+ * />
128
+ *
97
129
  * @param {Object} props - The properties of the ImageViewer component.
98
- * @param {TImageView[]} props.views - Images to display. In `tabs`, more than one renders a tab per view; in `split`, a pane per view. A view's optional `indicator` sits after its label and becomes part of the tab's accessible name, so give it its own (for an icon, `role="img"` and `aria-label`). In `tabs` with a single view there are no tabs, so no indicator is shown. A view's optional `crop` (`left`, `top`, `width`, `height` as fractions from 0 to 1 of the image) shows only that region; a crop outside the image is clamped to it, and one with no area left falls back to the whole image.
99
- * @param {TImageViewerLabels} props.labels - Accessible names of the toolbar actions.
130
+ * @param {TImageView[]} props.views - Files to display. In `tabs`, more than one renders a tab per view; in `split`, a pane per view. A view's optional `indicator` sits after its label and becomes part of the tab's accessible name, so give it its own (for an icon, `role="img"` and `aria-label`). In `tabs` with a single view there are no tabs, so no indicator is shown. A view's optional `crop` (`left`, `top`, `width`, `height` as fractions from 0 to 1 of the image) shows only that region; a crop outside the image is clamped to it, and one with no area left falls back to the whole image. A view's `type` is `image` unless set to `pdf`; `crop` is ignored on a `pdf`.
131
+ * @param {TImageViewerLabels} props.labels - Accessible names of the toolbar actions. With `pdf` views, `openDocument` names the action that opens the original file in a new tab, and `previousPage` / `nextPage` name the pager of a document with several pages; without the pair, only the first page is reachable.
100
132
  * @param {TImageViewerLayout} [props.layout='tabs'] - `tabs` shows one view at a time; `split` shows every view at once, one pane each.
101
133
  * @param {ReactNode} [props.title] - Optional heading rendered on the left of the toolbar.
102
134
  * @param {ReactNode} [props.emptyState] - Content rendered when there is no image.
@@ -1 +1 @@
1
- {"version":3,"file":"ImageViewer.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/ImageViewer/ImageViewer.tsx"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAYf,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEvE,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,KA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