@orangelogic/design-system 4.52.0 → 4.54.0

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 (179) hide show
  1. package/library/chunks/{abnfDiagram-N423BO3Z.BdDkSL0S.js → abnfDiagram-N423BO3Z.H1zwr_k6.js} +3 -3
  2. package/library/chunks/{architectureDiagram-T3A2C74G.BPW98p0m.js → architectureDiagram-T3A2C74G.AxjW1Pvo.js} +5 -5
  3. package/library/chunks/{array-line-clamp.DKxxZlon.js → array-line-clamp.B0CgDqAd.js} +2 -2
  4. package/library/chunks/{asset-link-format.B_gS4nTL.js → asset-link-format.B0bxKsRR.js} +9 -9
  5. package/library/chunks/{bicolor-picker.YUjpxOEl.js → bicolor-picker.DB9EVS8f.js} +1 -1
  6. package/library/chunks/{block-width.BDpJyD-F.js → block-width.DPq3qimI.js} +35 -35
  7. package/library/chunks/{blockDiagram-VBNYF7ZC.2el4_mfU.js → blockDiagram-VBNYF7ZC.BA5YJ5tg.js} +6 -6
  8. package/library/chunks/{border-input-group.D5V40_dV.js → border-input-group.fjG64WIi.js} +2 -2
  9. package/library/chunks/{button.DnOMjl_G.js → button.BnTohvSe.js} +1 -1
  10. package/library/chunks/{c4Diagram-5PPSVZJV.CB1meuC0.js → c4Diagram-5PPSVZJV.B1weqOqz.js} +3 -3
  11. package/library/chunks/{channel.Df7qi9B0.js → channel.Bqlqmufs.js} +1 -1
  12. package/library/chunks/{checkbox.aFoOxk2j.js → checkbox.BdSpQlwf.js} +1 -1
  13. package/library/chunks/{chunk-2GRJ4B5K.gGaxW0lA.js → chunk-2GRJ4B5K.BOBf1_FX.js} +1 -1
  14. package/library/chunks/{chunk-4I5QYGJK.BfgT5lel.js → chunk-4I5QYGJK.DfO_P7bO.js} +1 -1
  15. package/library/chunks/{chunk-5RXB4S5H.CF2ZeQiS.js → chunk-5RXB4S5H.oisV3Q1b.js} +5 -5
  16. package/library/chunks/{chunk-6Q2QTUOP.BKuPYCzj.js → chunk-6Q2QTUOP.ByglL7sM.js} +2 -2
  17. package/library/chunks/{chunk-7Z6QIM7H.ChD5saA-.js → chunk-7Z6QIM7H.BXSFN_6B.js} +6 -6
  18. package/library/chunks/{chunk-GF5L2VYU.D7Kyf8tv.js → chunk-GF5L2VYU.BBRVN_Sz.js} +5 -5
  19. package/library/chunks/{chunk-I66GZJ75.H0-SV6eJ.js → chunk-I66GZJ75.lUTR0Zxp.js} +1 -1
  20. package/library/chunks/{chunk-JQJVKLGR.vSmZrVfn.js → chunk-JQJVKLGR.dOAJ_eec.js} +7 -7
  21. package/library/chunks/{chunk-KBJHAD2P.BFtv98WB.js → chunk-KBJHAD2P.Bfz5cQAa.js} +1 -1
  22. package/library/chunks/{chunk-NSK5VX7P.CigvU-YZ.js → chunk-NSK5VX7P.BkWzMz1o.js} +1 -1
  23. package/library/chunks/{chunk-QR6OTTB3.DXgKvg29.js → chunk-QR6OTTB3.DyBl4spZ.js} +6 -6
  24. package/library/chunks/{chunk-UBXNYLIW.Cwnmh6rE.js → chunk-UBXNYLIW.BjkOeuJd.js} +2 -2
  25. package/library/chunks/{chunk-W5SLKNZC.BGc7e7pD.js → chunk-W5SLKNZC.DzlXmWcA.js} +1 -1
  26. package/library/chunks/{chunk-WRU74C26.DI6bT2w6.js → chunk-WRU74C26.BDl8PZFV.js} +3 -3
  27. package/library/chunks/{classDiagram-JCYQIIEL.64BYmngb.js → classDiagram-JCYQIIEL.P36yteOv.js} +12 -12
  28. package/library/chunks/{classDiagram-v2-OCEON4UE.BZauU1et.js → classDiagram-v2-OCEON4UE.C05djrx3.js} +12 -12
  29. package/library/chunks/{color-picker.B6zsp9q3.js → color-picker.DkbU0_4f.js} +8 -8
  30. package/library/chunks/{color-swatch-group.C-4jpi7T.js → color-swatch-group.D99_BsTs.js} +28 -28
  31. package/library/chunks/{color-swatch.Biz89VJr.js → color-swatch.CvynJPeG.js} +1 -1
  32. package/library/chunks/{config-manager.D4XcNU1d.js → config-manager.C-RYOYzN.js} +27 -27
  33. package/library/chunks/{configs-controller.C8z7oMRd.js → configs-controller.kn8RjF1m.js} +19 -19
  34. package/library/chunks/{confirm-popover.UUhlXSDu.js → confirm-popover.buH5MWGz.js} +3 -3
  35. package/library/chunks/{corner-position-input-group.vhSOueRn.js → corner-position-input-group.C76I7S9W.js} +3 -3
  36. package/library/chunks/{cynefinDiagram-MW4NZA55.DcUv6X--.js → cynefinDiagram-MW4NZA55.CN3dX-zy.js} +3 -3
  37. package/library/chunks/{dagre-VZM6K2ZE.REv4K_Qj.js → dagre-VZM6K2ZE.DpSsP2YW.js} +8 -8
  38. package/library/chunks/{diagram-7IWD3JNH.C6XfUay-.js → diagram-7IWD3JNH.C3K0gCHG.js} +4 -4
  39. package/library/chunks/{diagram-B4RE2ZJO.Bp-nT294.js → diagram-B4RE2ZJO.BULgC23C.js} +2 -2
  40. package/library/chunks/{diagram-LBJQPF4R.DM8MEbI5.js → diagram-LBJQPF4R.BmYYTkym.js} +3 -3
  41. package/library/chunks/{diagram-Q27KOJAE.DYhFE9pI.js → diagram-Q27KOJAE.Bj5ayV3p.js} +5 -5
  42. package/library/chunks/{diagram-UB23O5K3.BONLndDU.js → diagram-UB23O5K3.Bu_lTx_A.js} +3 -3
  43. package/library/chunks/{dialog.BKSCSk0r.js → dialog.DprCsbFG.js} +1 -1
  44. package/library/chunks/{diff.DZjfy2VU.js → diff.Bmdpmpvo.js} +1 -1
  45. package/library/chunks/{document-viewer.DVV4HsLS.js → document-viewer.B82zT0Zq.js} +5 -5
  46. package/library/chunks/{dom.BsVeSE01.js → dom.BLHsooDR.js} +1 -1
  47. package/library/chunks/{drawer.BEXLFfil.js → drawer.Ba0CKg86.js} +1 -1
  48. package/library/chunks/{dropdown.CcjP36wF.js → dropdown.EJbgwPgi.js} +3 -3
  49. package/library/chunks/{dynamic-select.DmTXLyzH.js → dynamic-select.3VAXf0Tb.js} +3 -3
  50. package/library/chunks/{ebnfDiagram-BXEA7PRR.vgCVWkh_.js → ebnfDiagram-BXEA7PRR.Cg96HHIs.js} +3 -3
  51. package/library/chunks/{element-clamp.CwFlUOET.js → element-clamp.M1QI20RB.js} +1 -1
  52. package/library/chunks/{erDiagram-JOGREHBK.l02-sIjI.js → erDiagram-JOGREHBK.CrJ962th.js} +11 -11
  53. package/library/chunks/{file-on-demand.CLwTe72F.js → file-on-demand.CftwNAbV.js} +11 -11
  54. package/library/chunks/flowDiagram-UKHOOZJN.Bj_loY7-.js +16 -0
  55. package/library/chunks/{folder-select.BF1l6Zah.js → folder-select.D8VOcyyD.js} +15 -15
  56. package/library/chunks/{form.JYXtmwQ2.js → form.D_eBa3AQ.js} +1 -1
  57. package/library/chunks/{ganttDiagram-PKOTCBZU.CD-H_noy.js → ganttDiagram-PKOTCBZU.D216_p5R.js} +2 -2
  58. package/library/chunks/{gitGraphDiagram-DS77QQ5N.eu4pijfq.js → gitGraphDiagram-DS77QQ5N.BGTaYiUE.js} +2 -2
  59. package/library/chunks/{infoDiagram-6WML65LV.Xm33NlcD.js → infoDiagram-6WML65LV.BHVojFJh.js} +2 -2
  60. package/library/chunks/{input.D1UkXp3F.js → input.Cqg_VUUU.js} +1 -1
  61. package/library/chunks/{ishikawaDiagram-WSZJBQD7.B-DjIT2K.js → ishikawaDiagram-WSZJBQD7.nZsYnPcQ.js} +3 -3
  62. package/library/chunks/{journeyDiagram-NVQOT4AX.ByuFaAO4.js → journeyDiagram-NVQOT4AX.BXUxAk98.js} +2 -2
  63. package/library/chunks/{kanban-definition-27J2QSJJ.BEAgE6i7.js → kanban-definition-27J2QSJJ.Bg8-oEtc.js} +8 -8
  64. package/library/chunks/{katex.DaGFosgJ.js → katex.BqirFtOb.js} +1 -1
  65. package/library/chunks/katex.KcI9vfm6.js +21947 -0
  66. package/library/chunks/{line-clamp.COXyDBRB.js → line-clamp.DfbWHPf2.js} +1 -1
  67. package/library/chunks/{markdown.Evcme-Lw.js → markdown.DX6E6sHb.js} +187 -100
  68. package/library/chunks/{mermaid.core.CUTdrxBG.js → mermaid.core.m1JI7kDY.js} +48 -48
  69. package/library/chunks/{mindmap-definition-FAOFIHXS.rbw_pav-.js → mindmap-definition-FAOFIHXS.DwjOzYq5.js} +10 -10
  70. package/library/chunks/{modal.775mgCbW.js → modal.eB-mqL-y.js} +1 -1
  71. package/library/chunks/option.g339be2v.js +136 -0
  72. package/library/chunks/{padding-input-group.CGDq3Cct.js → padding-input-group.B0hKvaQw.js} +1 -1
  73. package/library/chunks/{pagination.Mr-XiQBd.js → pagination.C1a6I0Np.js} +4 -4
  74. package/library/chunks/{pegDiagram-VL7TDLO6.BAxarQjC.js → pegDiagram-VL7TDLO6.BaVddVr3.js} +3 -3
  75. package/library/chunks/{pieDiagram-7S7Q4E2Y.Du6akIPM.js → pieDiagram-7S7Q4E2Y.lZiCqBKs.js} +3 -3
  76. package/library/chunks/{position-picker.DzRyAx7a.js → position-picker.ZNQJCQeD.js} +1 -1
  77. package/library/chunks/{quadrantDiagram-CIZ2JOQS.0LTMJXU8.js → quadrantDiagram-CIZ2JOQS.DswnHa_z.js} +1 -1
  78. package/library/chunks/{radio-card.jROctGtI.js → radio-card.DIbQQQHJ.js} +1 -1
  79. package/library/chunks/{radio-group.DSnDDjKe.js → radio-group.CHlxPcrs.js} +1 -1
  80. package/library/chunks/{railroadDiagram-AXF67PYL.BU5cQCmX.js → railroadDiagram-AXF67PYL.RYtWvnP4.js} +3 -3
  81. package/library/chunks/{range.CQzHuhd9.js → range.BbymfcRB.js} +1 -1
  82. package/library/chunks/{requirementDiagram-LRYGKXZP.BM4tLaE8.js → requirementDiagram-LRYGKXZP.BhxZAEJL.js} +10 -10
  83. package/library/chunks/{sankeyDiagram-W5VNT64P.r2kIOMLC.js → sankeyDiagram-W5VNT64P.Dk8npZSg.js} +1 -1
  84. package/library/chunks/{select.CEgt2ciT.js → select.jh554mmg.js} +151 -99
  85. package/library/chunks/{sequenceDiagram-SI44F4Z6.CJ50A-EW.js → sequenceDiagram-SI44F4Z6.BNjBc769.js} +4 -4
  86. package/library/chunks/{shadow-input-group.DTEIzl1s.js → shadow-input-group.CVVmDUWM.js} +2 -2
  87. package/library/chunks/{share-option-list.CdQeYk-I.js → share-option-list.DJhjvLt5.js} +1 -1
  88. package/library/chunks/sidebar.DvMb2Ug6.js +120 -0
  89. package/library/chunks/{size-input-group.DtldCuqS.js → size-input-group.CS5sCYFS.js} +2 -2
  90. package/library/chunks/{src.BjEmxalH.js → src.CcXIUp6p.js} +29 -29
  91. package/library/chunks/{src.BJpSLSUr.js → src.DY4Vfem2.js} +3 -3
  92. package/library/chunks/{stateDiagram-OKZ733FA.DZ7h0fa_.js → stateDiagram-OKZ733FA.DkiIgxjd.js} +12 -12
  93. package/library/chunks/{stateDiagram-v2-UEYNNEHI.BhaYePWf.js → stateDiagram-v2-UEYNNEHI.oVj_Ex1_.js} +12 -12
  94. package/library/chunks/{step.BlnWLzqI.js → step.QBmFqnA4.js} +1 -1
  95. package/library/chunks/{stepper-wizard.t7enm9Uz.js → stepper-wizard.D0zrSaVI.js} +2 -2
  96. package/library/chunks/{stepper.DzhUPTLW.js → stepper.BBZ3Sunl.js} +1 -1
  97. package/library/chunks/{string.DAuTpyw8.js → string.9yahdkB8.js} +39 -1
  98. package/library/chunks/{swimlanes-SLNWSIFB.B31m3AJi.js → swimlanes-SLNWSIFB.DKU7qXJ7.js} +8 -8
  99. package/library/chunks/{swimlanesDiagram-ULZ7WXOC.DkcvdPqC.js → swimlanesDiagram-ULZ7WXOC.DYwYMO_K.js} +12 -12
  100. package/library/chunks/{switch.CBho2RVW.js → switch.BM9msK5T.js} +1 -1
  101. package/library/chunks/{tab-group.DIVmzKse.js → tab-group.DkF7nLim.js} +4 -4
  102. package/library/chunks/{tab.C0oUx7MY.js → tab.ACKD6jJ8.js} +1 -1
  103. package/library/chunks/{tabbable.Bflg1dha.js → tabbable.BSwpOHdm.js} +1 -1
  104. package/library/chunks/{tag.B2S21_nF.js → tag.uwkILLDo.js} +1 -1
  105. package/library/chunks/{textarea.BgWdR_7D.js → textarea.CHSZI8vt.js} +1 -1
  106. package/library/chunks/{timecode.DME2imtx.js → timecode.DjI1OTXD.js} +1 -1
  107. package/library/chunks/{timeline-definition-Z64GVDOM.CNKRW4xi.js → timeline-definition-Z64GVDOM.agRZ87Zs.js} +3 -3
  108. package/library/chunks/{tree.Bq4vAQ6w.js → tree.Dc1p0HOj.js} +11 -5
  109. package/library/chunks/{typeface.Dr9m4SZE.js → typeface.DacggLTX.js} +1 -1
  110. package/library/chunks/{vennDiagram-T6HMQDX7.CObwvEEr.js → vennDiagram-T6HMQDX7.Cd9lVObe.js} +3 -3
  111. package/library/chunks/{wardleyDiagram-T6FBY63Y.BTL3nwWJ.js → wardleyDiagram-T6FBY63Y.yCklp5Oa.js} +3 -3
  112. package/library/chunks/{xychartDiagram-ELKLHX3M.DMDlz8tK.js → xychartDiagram-ELKLHX3M.CLuRN0XK.js} +5 -5
  113. package/library/components/array-line-clamp.js +1 -1
  114. package/library/components/asset-link-format.js +1 -1
  115. package/library/components/atoms.js +33 -33
  116. package/library/components/bicolor-picker.js +1 -1
  117. package/library/components/border-input-group.js +1 -1
  118. package/library/components/button.js +1 -1
  119. package/library/components/checkbox.js +1 -1
  120. package/library/components/color-picker.js +1 -1
  121. package/library/components/color-swatch-group.js +1 -1
  122. package/library/components/color-swatch.js +1 -1
  123. package/library/components/confirm-popover.js +1 -1
  124. package/library/components/corner-position-input-group.js +1 -1
  125. package/library/components/dialog.js +1 -1
  126. package/library/components/diff.js +1 -1
  127. package/library/components/document-viewer.js +1 -1
  128. package/library/components/drawer.js +1 -1
  129. package/library/components/dropdown.js +1 -1
  130. package/library/components/dynamic-select.js +1 -1
  131. package/library/components/element-clamp.js +1 -1
  132. package/library/components/file-on-demand.js +1 -1
  133. package/library/components/folder-select.js +1 -1
  134. package/library/components/input.js +1 -1
  135. package/library/components/line-clamp.js +1 -1
  136. package/library/components/markdown.js +1 -1
  137. package/library/components/molecules.js +15 -15
  138. package/library/components/option.js +1 -1
  139. package/library/components/organisms.js +3 -3
  140. package/library/components/padding-input-group.js +1 -1
  141. package/library/components/pagination.js +1 -1
  142. package/library/components/position-picker.js +1 -1
  143. package/library/components/radio-card.js +1 -1
  144. package/library/components/radio-group.js +1 -1
  145. package/library/components/range.js +1 -1
  146. package/library/components/select.js +1 -1
  147. package/library/components/shadow-input-group.js +1 -1
  148. package/library/components/share-option-list.js +1 -1
  149. package/library/components/sidebar.js +1 -1
  150. package/library/components/size-input-group.js +1 -1
  151. package/library/components/step.js +1 -1
  152. package/library/components/stepper-wizard.js +1 -1
  153. package/library/components/stepper.js +1 -1
  154. package/library/components/switch.js +1 -1
  155. package/library/components/tab-group.js +1 -1
  156. package/library/components/tab.js +1 -1
  157. package/library/components/tag.js +1 -1
  158. package/library/components/textarea.js +1 -1
  159. package/library/components/timecode.js +1 -1
  160. package/library/components/tree-item.js +1 -1
  161. package/library/components/tree.js +1 -1
  162. package/library/components/typeface.js +1 -1
  163. package/library/components/types.js +12630 -12630
  164. package/library/package.json +1 -1
  165. package/library/packages/atoms/src/components/markdown/markdown.d.ts +12 -3
  166. package/library/packages/atoms/src/components/markdown/parser.d.ts +7 -2
  167. package/library/packages/atoms/src/components/option/option.d.ts +15 -2
  168. package/library/packages/atoms/src/components/select/select.d.ts +23 -2
  169. package/library/packages/molecules/src/sidebar/sidebar.d.ts +16 -2
  170. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
  171. package/library/packages/types/src/markdown.d.ts +5 -0
  172. package/library/packages/types/src/sidebar.d.ts +2 -0
  173. package/library/packages/utils/src/string/string.d.ts +20 -0
  174. package/library/react-web-component.d.ts +26 -2
  175. package/library/utils.js +26 -26
  176. package/package.json +1 -1
  177. package/library/chunks/flowDiagram-UKHOOZJN.BoFivhJR.js +0 -16
  178. package/library/chunks/option.Da60zYvc.js +0 -100
  179. package/library/chunks/sidebar.CwAW3KaC.js +0 -100
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "4.52.0",
4
+ "version": "4.54.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  import { default as CxIconButton } from '../icon-button/icon-button.ts';
2
2
  import { default as CortexLightElement } from '../../../../base/src/cortex-light-element.ts';
3
- import { TemplateResult } from 'lit';
3
+ import { PropertyValues, TemplateResult } from 'lit';
4
4
  import { RendererObject, TokenizerAndRendererExtension } from 'marked';
5
5
  /**
6
6
  * @summary Renders markdown passed in as a string.
@@ -9,7 +9,8 @@ import { RendererObject, TokenizerAndRendererExtension } from 'marked';
9
9
  * cx-markdown is powered by [MarkedJs](https://marked.js.org/).
10
10
  *
11
11
  * Fenced `mermaid` code blocks render as diagrams; Mermaid is imported lazily only when one is
12
- * present. Output is sanitized with DOMPurify unless `live-script` is set.
12
+ * present; with `show-math-notation` set, `$…$` and `$$…$$` render through KaTeX the same way.
13
+ * Output is sanitized with DOMPurify unless `live-script` is set.
13
14
  *
14
15
  * Leading YAML frontmatter renders as a collapsed disclosure instead of an `<hr>` plus heading, and
15
16
  * is parsed onto the `frontmatter` property.
@@ -23,7 +24,7 @@ import { RendererObject, TokenizerAndRendererExtension } from 'marked';
23
24
  * buttons, Mermaid nodes — do not bubble past the component. Clicks on inert content still do.
24
25
  *
25
26
  * @event cx-ready - Emitted when the markdown has been rendered, deferred until any Mermaid
26
- * diagrams have been drawn.
27
+ * diagrams and formulas have been drawn.
27
28
  */
28
29
  export default class CxMarkdown extends CortexLightElement {
29
30
  #private;
@@ -32,6 +33,8 @@ export default class CxMarkdown extends CortexLightElement {
32
33
  'cx-icon-button': typeof CxIconButton;
33
34
  };
34
35
  private readonly localize;
36
+ /** KaTeX loader, held in a field like other I/O so a test can keep the import pending. */
37
+ private loadKatex;
35
38
  /**
36
39
  * YAML frontmatter parsed from `markdown`, empty when there is none. Derived output — assigning
37
40
  * to it has no effect. Read it after `cx-ready`. Deliberately non-reactive: the disclosure is
@@ -53,6 +56,11 @@ export default class CxMarkdown extends CortexLightElement {
53
56
  * adds `rel="noopener noreferrer"`. Empty (the default) leaves anchors untouched.
54
57
  */
55
58
  linkTarget: string;
59
+ /**
60
+ * Renders `$…$` and `$$…$$` with KaTeX, loaded lazily. Invalid TeX, or a browser without
61
+ * MathML, keeps its source.
62
+ */
63
+ showMathNotation: boolean;
56
64
  /**
57
65
  * The markdown to render.
58
66
  */
@@ -72,6 +80,7 @@ export default class CxMarkdown extends CortexLightElement {
72
80
  rendered: string;
73
81
  connectedCallback(): void;
74
82
  disconnectedCallback(): void;
83
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
75
84
  updateRendered(): void;
76
85
  /**
77
86
  * Light DOM means every click reaches ancestors, which commonly treat one as "start editing".
@@ -1,8 +1,11 @@
1
- import { Marked, Tokens } from 'marked';
1
+ import { CreateParserOptions } from '../../../../types/src/markdown';
2
+ import { Marked, MarkedExtension, Tokens } from 'marked';
2
3
  /** Class name cx-markdown looks for when deciding whether to load Mermaid. */
3
4
  export declare const MERMAID_CLASS_NAME = "mermaid";
4
5
  /** Class name on the disclosure wrapping YAML frontmatter. */
5
6
  export declare const FRONTMATTER_CLASS_NAME = "cx-frontmatter";
7
+ /** Class name cx-markdown looks for when deciding whether to load KaTeX. */
8
+ export declare const MATH_CLASS_NAME = "cx-math";
6
9
  export type ExtractedFrontmatter = {
7
10
  /** The markdown with the frontmatter block removed. */
8
11
  body: string;
@@ -17,6 +20,8 @@ export declare function renderFrontmatterDetails(raw: string, label: string): st
17
20
  export declare const baseRenderer: {
18
21
  code({ escaped, lang: infoString, text }: Tokens.Code): string;
19
22
  };
23
+ /** Opt-in `$…$` / `$$…$$` support; `createParser({ math })` registers it. */
24
+ export declare const mathExtension: MarkedExtension;
20
25
  /**
21
26
  * https://marked.js.org/using_advanced in Marked instance section.
22
27
  * https://marked.js.org/using_pro in Marked marked.use() section.
@@ -24,5 +29,5 @@ export declare const baseRenderer: {
24
29
  *
25
30
  * Change from Singleton to Factory pattern: returns a new isolated Marked parser.
26
31
  */
27
- export declare function createParser(): Marked<string, string>;
32
+ export declare function createParser({ math }?: CreateParserOptions): Marked<string, string>;
28
33
  export type Parser = ReturnType<typeof createParser>;
@@ -1,6 +1,7 @@
1
1
  import { default as CortexElement } from '../../../../base/src/cortex-element.ts';
2
2
  import { CheckPlacement } from '../../../../types/src/option';
3
- import { CSSResultGroup } from 'lit';
3
+ import { TextMatchRange } from '../../../../utils/src/string';
4
+ import { CSSResultGroup, PropertyValues, TemplateResult } from 'lit';
4
5
  import { default as CxIcon } from '../icon/icon';
5
6
  import { default as CxSpace } from '../space/space';
6
7
  /**
@@ -14,6 +15,8 @@ import { default as CxSpace } from '../space/space';
14
15
  * @csspart checked-icon - The checked icon, an `<cx-icon>` element.
15
16
  * @csspart base - The component's base wrapper.
16
17
  * @csspart label - The option's label.
18
+ * @csspart match - Each part of a plain-text label that matches the query of a `cx-select` with `highlight-matches`,
19
+ * a `<mark>` element. Restyle it with `cx-option::part(match)`.
17
20
  * @csspart prefix - The container that wraps the prefix.
18
21
  * @csspart suffix - The container that wraps the suffix.
19
22
  *
@@ -28,6 +31,7 @@ import { default as CxSpace } from '../space/space';
28
31
  * @cssproperty [--cx-menu-item-background-color-hover=var(--cx-color-primary-50)] - Background color of the hovered option and of the current option. Dark theme: `var(--cx-color-neutral-100)`.
29
32
  */
30
33
  export default class CxOption extends CortexElement {
34
+ #private;
31
35
  static styles: CSSResultGroup;
32
36
  static dependencies: {
33
37
  'cx-icon': typeof CxIcon;
@@ -51,6 +55,15 @@ export default class CxOption extends CortexElement {
51
55
  showCheck: boolean;
52
56
  /** Check icon placement */
53
57
  checkPlacement: CheckPlacement;
58
+ /**
59
+ * The `[start, end)` ranges of the text label (see `getTextLabel()`) that match the parent control's query, in order
60
+ * and without overlap. Set by `cx-select` when `highlight-matches` is enabled. Each range is rendered in a `match`
61
+ * part only when the label is plain text and every range fits inside it; otherwise the label is shown as is.
62
+ */
63
+ matchRanges: TextMatchRange[];
64
+ connectedCallback(): void;
65
+ disconnectedCallback(): void;
66
+ protected updated(changedProperties: PropertyValues<this>): void;
54
67
  runFirstUpdated(): void;
55
68
  private handleDefaultSlotChange;
56
69
  private handleMouseEnter;
@@ -60,7 +73,7 @@ export default class CxOption extends CortexElement {
60
73
  handleValueChange(): void;
61
74
  /** Returns a plain text label based on the option's content. */
62
75
  getTextLabel(): string;
63
- render(): import('lit-html').TemplateResult<1>;
76
+ render(): TemplateResult<1>;
64
77
  }
65
78
  declare global {
66
79
  interface HTMLElementTagNameMap {
@@ -219,9 +219,10 @@ export default class CxSelect extends CortexElement implements CortexFormControl
219
219
  label: string;
220
220
  /**
221
221
  * The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox
222
- * inside of the viewport.
222
+ * inside of the viewport. The `-start` variants align the listbox with the start edge of the select instead of
223
+ * centering it, which matters with `free-width`.
223
224
  */
224
- placement: 'top' | 'bottom';
225
+ placement: 'top' | 'top-start' | 'bottom' | 'bottom-start';
225
226
  /**
226
227
  * The select's help text. If you need to display HTML, use the `help-text` slot instead.
227
228
  */
@@ -253,6 +254,10 @@ export default class CxSelect extends CortexElement implements CortexFormControl
253
254
  * When set to true, the select will not show the dropdown.
254
255
  */
255
256
  noDropdown: boolean;
257
+ /**
258
+ * When set to true, the expand icon is not rendered, e.g. when the select is used as a search box.
259
+ */
260
+ noExpandIcon: boolean;
256
261
  /**
257
262
  * When set to true, the select will show a loading spinner.
258
263
  */
@@ -271,6 +276,22 @@ export default class CxSelect extends CortexElement implements CortexFormControl
271
276
  * 'none' : does not do anything, the user cannot type
272
277
  */
273
278
  inputBehavior: 'select' | 'filter' | 'none';
279
+ /**
280
+ * When set to true, the default `filterCallback` ignores accents and diacritics, so typing `cai dat` matches
281
+ * `Cài đặt`. Has no effect when `filterCallback` is overridden.
282
+ */
283
+ filterIgnoreAccents: boolean;
284
+ /**
285
+ * When set to true and `input-behavior` is `filter`, every match of the typed query inside each visible
286
+ * `<cx-option>`'s plain-text label is wrapped in the option's `match` part (bold by default).
287
+ * Options whose label contains elements are shown without a highlight.
288
+ */
289
+ highlightMatches: boolean;
290
+ /**
291
+ * The minimum number of typed characters before the listbox can open. Below it, clicking, typing and the
292
+ * keyboard do not open the listbox, and an open listbox closes. Set to 0 to open without typing.
293
+ */
294
+ minQueryLength: number;
274
295
  /**
275
296
  * A function that returns the value of an option. This is used to determine the value of the select when an option is selected.
276
297
  *
@@ -3,9 +3,9 @@ import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
3
3
  import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
4
4
  import { default as CxResizeObserver } from '../../../atoms/src/components/resize-observer/resize-observer.ts';
5
5
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
6
- import { SidebarLocation } from '../../../types/src/sidebar';
6
+ import { SidebarCloseTriggerPlacement, SidebarLocation } from '../../../types/src/sidebar';
7
7
  import { HasSlotController } from '../../../utils/src/custom-element/slot';
8
- import { CSSResultGroup } from 'lit';
8
+ import { CSSResultGroup, PropertyValues } from 'lit';
9
9
  export type CxAfterResizeEvent = CustomEvent<{
10
10
  /**
11
11
  * Side of the sidebar
@@ -29,12 +29,18 @@ declare global {
29
29
  * @slot open_trigger - The label of the open trigger.
30
30
  *
31
31
  * @event cx-after-resize {{ side: 'left' | 'right', size: number }} - Emitted after the sidebar is resized.
32
+ * @event cx-show - Emitted when the sidebar opens (after the first render).
33
+ * @event cx-hide - Emitted when the sidebar closes (after the first render).
34
+ *
35
+ * @cssproperty --open-trigger-padding - Padding of the open trigger shown while collapsed. Defaults to
36
+ * `var(--cx-spacing-medium)`; reduce it when `--closed-width` is too narrow for the trigger content.
32
37
  *
33
38
  * @csspart base - The component's base wrapper.
34
39
  * @csspart header - The container that wraps the header.
35
40
  * @csspart content - The container that wraps the main content.
36
41
  */
37
42
  export default class CxSidebar extends CortexElement {
43
+ #private;
38
44
  static styles: CSSResultGroup;
39
45
  static dependencies: {
40
46
  'cx-divider': typeof CxDivider;
@@ -43,10 +49,16 @@ export default class CxSidebar extends CortexElement {
43
49
  'cx-resize-observer': typeof CxResizeObserver;
44
50
  };
45
51
  header: HTMLElement;
52
+ openTrigger: HTMLElement | null;
46
53
  /**
47
54
  * Sets the side for the component.
48
55
  */
49
56
  side: SidebarLocation;
57
+ /**
58
+ * Where the close trigger sits along the sidebar's inner edge: `start` (top), `center` or `end` (bottom). Move it
59
+ * away from `start` when the top of the content holds a full-width control the trigger would overlap.
60
+ */
61
+ closeTriggerPlacement: SidebarCloseTriggerPlacement;
50
62
  /**
51
63
  * Is the sidebar open?
52
64
  */
@@ -72,6 +84,8 @@ export default class CxSidebar extends CortexElement {
72
84
  handleCollapsibleChange(): void;
73
85
  constructor();
74
86
  connectedCallback(): void;
87
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
88
+ protected updated(changedProperties: PropertyValues<this>): void;
75
89
  private handleDrag;
76
90
  private handleSizeChange;
77
91
  private handleResize;
@@ -9,4 +9,4 @@ import { Schema } from '@tiptap/pm/model';
9
9
  * Constructs the model cannot represent are not dropped: `html_block` and `html_inline` hold their
10
10
  * source verbatim and are replayed on the way out.
11
11
  */
12
- export declare const markdownSchema: Schema<"image" | "text" | "blockquote" | "table" | "heading" | "paragraph" | "frontmatter" | "doc" | "bullet_list" | "code_block" | "horizontal_rule" | "list_item" | "ordered_list" | "table_row" | "table_cell" | "table_header" | "hard_break" | "html_block" | "html_inline", "code" | "link" | "strike" | "em" | "strong">;
12
+ export declare const markdownSchema: Schema<"image" | "text" | "blockquote" | "table" | "heading" | "paragraph" | "list_item" | "frontmatter" | "doc" | "bullet_list" | "code_block" | "horizontal_rule" | "ordered_list" | "table_row" | "table_cell" | "table_header" | "hard_break" | "html_block" | "html_inline", "code" | "link" | "strike" | "em" | "strong">;
@@ -0,0 +1,5 @@
1
+ /** Options for the marked parser `cx-markdown` builds. */
2
+ export type CreateParserOptions = {
3
+ /** Registers `$…$` / `$$…$$` math support, rendered later with KaTeX. */
4
+ math?: boolean;
5
+ };
@@ -1 +1,3 @@
1
1
  export type SidebarLocation = 'left' | 'right';
2
+ /** Where the close trigger sits along the sidebar's inner edge, from top (`start`) to bottom (`end`). */
3
+ export type SidebarCloseTriggerPlacement = 'start' | 'center' | 'end';
@@ -164,3 +164,23 @@ export declare function unescapeXML(value: string): string;
164
164
  export declare function getAttributesString(attributes?: {
165
165
  [id: string]: string;
166
166
  }): string;
167
+ /** A `[start, end)` range of UTF-16 indices into a string. */
168
+ export interface TextMatchRange {
169
+ end: number;
170
+ start: number;
171
+ }
172
+ export interface SearchTextOptions {
173
+ /** Also strip diacritics so `cai dat` matches `Cài đặt`. */
174
+ ignoreAccents?: boolean;
175
+ }
176
+ /**
177
+ * Lowercases `text` for case-insensitive search. With `ignoreAccents`, it also decomposes the text (NFD), strips
178
+ * combining marks and maps `đ`/`Đ` to `d`.
179
+ */
180
+ export declare function foldSearchText(text: string, { ignoreAccents }?: SearchTextOptions): string;
181
+ /**
182
+ * Finds every occurrence of `query` in `text`, compared with {@link foldSearchText}, and returns their ranges in the
183
+ * original `text`, in order. Occurrences are searched without overlap, and ranges that touch or overlap in the
184
+ * original text are merged. Returns an empty array when `query` is empty or not found.
185
+ */
186
+ export declare function findSearchMatches(text: string, query: string, { ignoreAccents }?: SearchTextOptions): TextMatchRange[];
@@ -2059,9 +2059,9 @@
2059
2059
  */
2060
2060
  label?: string;
2061
2061
  /**
2062
- * The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox inside of the viewport.
2062
+ * The preferred placement of the select's menu. Note that the actual placement may vary as needed to keep the listbox inside of the viewport. The `-start` variants align the listbox with the start edge of the select instead of centering it, which matters with `free-width`.
2063
2063
  */
2064
- placement?: "top" | "bottom";
2064
+ placement?: "top" | "top-start" | "bottom" | "bottom-start";
2065
2065
  /**
2066
2066
  * The select's help text. If you need to display HTML, use the `help-text` slot instead.
2067
2067
  */
@@ -2090,6 +2090,10 @@
2090
2090
  * When set to true, the select will not show the dropdown.
2091
2091
  */
2092
2092
  noDropdown?: boolean;
2093
+ /**
2094
+ * When set to true, the expand icon is not rendered, e.g. when the select is used as a search box.
2095
+ */
2096
+ noExpandIcon?: boolean;
2093
2097
  /**
2094
2098
  * When set to true, the select will show a loading spinner.
2095
2099
  */
@@ -2098,6 +2102,18 @@
2098
2102
  * Behavior when typing into the display input <br/> <br/>@type {('select' | 'filter' | 'none')} 'select': default shoelace behavior, selects the first option that starts with the typed string 'filter': filters out options that do not include the typed string 'none' : does not do anything, the user cannot type
2099
2103
  */
2100
2104
  inputBehavior?: "none" | "select" | "filter";
2105
+ /**
2106
+ * When set to true, the default `filterCallback` ignores accents and diacritics, so typing `cai dat` matches `Cài đặt`. Has no effect when `filterCallback` is overridden.
2107
+ */
2108
+ filterIgnoreAccents?: boolean;
2109
+ /**
2110
+ * When set to true and `input-behavior` is `filter`, every match of the typed query inside each visible `cx-option`'s plain-text label is wrapped in the option's `match` part (bold by default). Options whose label contains elements are shown without a highlight.
2111
+ */
2112
+ highlightMatches?: boolean;
2113
+ /**
2114
+ * The minimum number of typed characters before the listbox can open. Below it, clicking, typing and the keyboard do not open the listbox, and an open listbox closes. Set to 0 to open without typing.
2115
+ */
2116
+ minQueryLength?: number;
2101
2117
  /**
2102
2118
  *
2103
2119
  */
@@ -3970,6 +3986,10 @@
3970
3986
  * Target applied to every rendered link. Set to `_blank` to open links in a new tab, which also adds `rel="noopener noreferrer"`. Empty (the default) leaves anchors untouched.
3971
3987
  */
3972
3988
  linkTarget?: string;
3989
+ /**
3990
+ * Renders `$…$` and `$$…$$` with KaTeX, loaded lazily. Invalid TeX, or a browser without MathML, keeps its source.
3991
+ */
3992
+ showMathNotation?: boolean;
3973
3993
  /**
3974
3994
  * The markdown to render.
3975
3995
  */
@@ -7492,6 +7512,10 @@
7492
7512
  * Sets the side for the component.
7493
7513
  */
7494
7514
  side?: "right" | "left";
7515
+ /**
7516
+ * Where the close trigger sits along the sidebar's inner edge: `start` (top), `center` or `end` (bottom). Move it away from `start` when the top of the content holds a full-width control the trigger would overlap.
7517
+ */
7518
+ closeTriggerPlacement?: "center" | "start" | "end";
7495
7519
  /**
7496
7520
  * Is the sidebar open?
7497
7521
  */
package/library/utils.js CHANGED
@@ -5,29 +5,29 @@ import { n as l, r as u, t as d } from "./chunks/slot.CZUlACxT.js";
5
5
  import { t as f } from "./chunks/watch.Ub5r8btz.js";
6
6
  import { a as p, c as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "./chunks/browser.Ct4pHP9I.js";
7
7
  import { t as C } from "./chunks/debounce.Ci-xdsHE.js";
8
- import { C as w, S as T, _ as E, a as D, b as O, c as k, d as A, f as j, g as M, h as N, i as P, l as F, m as I, n as L, o as R, p as z, r as B, s as V, t as H, u as U, v as W, w as G, x as K, y as q } from "./chunks/string.DAuTpyw8.js";
9
- import { a as J, c as Y, d as X, f as Z, h as Q, i as $, l as ee, m as te, n as ne, o as re, p as ie, r as ae, s as oe, t as se, u as ce } from "./chunks/dom.BsVeSE01.js";
10
- import { a as le, i as ue, n as de, o as fe, r as pe, t as me } from "./chunks/form.JYXtmwQ2.js";
11
- import { i as he, n as ge, r as _e, t as ve } from "./chunks/time.p1t0NCwj.js";
12
- import { a as ye, c as be, i as xe, l as Se, n as Ce, o as we, r as Te, s as Ee, t as De } from "./chunks/number.CNp5LKkv.js";
13
- import { a as Oe, c as ke, i as Ae, l as je, n as Me, o as Ne, r as Pe, s as Fe, t as Ie } from "./chunks/image.C0s1gL4z.js";
14
- import { n as Le, t as Re } from "./chunks/waveform.BFEuRt2_.js";
15
- import { t as ze } from "./chunks/default-value.opqQgoRT.js";
16
- import { a as Be, c as Ve, i as He, l as Ue, n as We, o as Ge, r as Ke, s as qe, t as Je } from "./chunks/gradient.rrDxmV60.js";
17
- import { t as Ye } from "./chunks/drag.s0AcVpKh.js";
18
- import { n as Xe, t as Ze } from "./chunks/math.od1DVmRk.js";
19
- import { n as Qe, t as $e } from "./chunks/active-elements.Tk45XSNQ.js";
20
- import { t as et } from "./chunks/focus-when-visible.DKscgyKo.js";
21
- import { n as tt, t as nt } from "./chunks/tabbable.Bflg1dha.js";
22
- import { i as rt, n as it, r as at, t as ot } from "./chunks/scroll.CEH_a4pm.js";
23
- import { t as st } from "./chunks/user-agent.D2bRhUeS.js";
24
- import { t as ct } from "./chunks/parse.CDrJ-NY7.js";
25
- import { S as lt, _ as ut, b as dt, d as ft, f as pt, g as mt, h as ht, m as gt, p as _t, t as vt, u as yt, v as bt, x as xt, y as St } from "./chunks/date.BL4L64Hx.js";
26
- import { $ as Ct, A as wt, B as Tt, F as Et, G as Dt, H as Ot, I as kt, J as At, K as jt, L as Mt, M as Nt, N as Pt, O as Ft, P as It, Q as Lt, R as Rt, U as zt, V as Bt, W as Vt, X as Ht, Y as Ut, Z as Wt, _ as Gt, a as Kt, at as qt, b as Jt, c as Yt, ct as Xt, d as Zt, dt as Qt, et as $t, f as en, ft as tn, g as nn, h as rn, i as an, it as on, j as sn, k as cn, l as ln, lt as un, m as dn, mt as fn, n as pn, nt as mn, o as hn, ot as gn, p as _n, pt as vn, q as yn, r as bn, rt as xn, s as Sn, st as Cn, t as wn, tt as Tn, u as En, ut as Dn, v as On, y as kn, z as An } from "./chunks/src.BJpSLSUr.js";
27
- import { n as jn } from "./chunks/modal.775mgCbW.js";
28
- import { a as Mn, c as Nn, d as Pn, f as Fn, i as In, l as Ln, m as Rn, n as zn, o as Bn, p as Vn, r as Hn, s as Un, t as Wn, u as Gn } from "./chunks/url.BCc06dE7.js";
29
- import { a as Kn, c as qn, d as Jn, f as Yn, h as Xn, i as Zn, l as Qn, m as $n, n as er, o as tr, p as nr, r as rr, s as ir, t as ar, u as or } from "./chunks/color.CIOzHtLK.js";
30
- import { t as sr } from "./chunks/converters.CFh-tT4P.js";
31
- import { n as cr, r as lr, t as ur } from "./chunks/responsive.L9Csz2w2.js";
32
- import { n as dr, t as fr } from "./chunks/template.Cyvih0XQ.js";
33
- export { hn as AUTO_FALLBACK_FORMAT, Sn as AUTO_FORMAT_EXTENSION, Yt as AUTO_ORIGINAL_FORMAT_MAX_BYTES, ar as CMYK_VALIDATION_REGEX, yt as CalendarGrid, er as ColorType, Lt as CortexPopupController, ur as DEFAULT_BREAKPOINTS, vt as DateRangePresets, Wt as DragScroll, me as FormControlController, rr as HEX_ALPHA_VALIDATION_REGEX, Zn as HEX_VALIDATION_REGEX, d as HasSlotController, kt as HistoryManager, Et as KeyboardKey, c as LocalizeController, Je as MIN_GRADIENT_STOPS, ln as ORIGINAL_FORMAT, wn as PRECISION, Wn as RELATIVE_URL_REGEX, Kn as RGB_VALIDATION_REGEX, En as SRCSET_WIDTH_LADDER, zn as URL_DOMAIN_VALIDATION_REGEX, Hn as URL_INTRANET_DOMAIN_VALIDATION_REGEX, In as URL_PROTOCOL_VALIDATION_REGEX, Mn as URL_VALIDATION_REGEX, $e as activeElements, ft as addMonths, Ct as adjustRelativeValues, n as animateTo, Bn as appendProtocol, Un as appendQueryParam, Zt as applyTransformationsToUrl, en as applyWidthToAssetUrl, _n as buildAssetSrcset, dn as buildSizesFromDisplayWidth, rn as buildTransformationString, Re as buildWaveformPath, Ie as calculateAspectRatioFit, Ze as clamp, Me as cleanImageFileName, ve as clearZeroDurationParts, tr as convertColor, De as convertDataUnits, Ce as convertDurationToMilliseconds, Te as convertPixelsToAspectRatio, Pe as convertSrcToBlob, We as createStopId, Ae as cropImage, se as cssValueToPx, o as customElement, de as customErrorValidityState, C as debounce, ze as defaultValue, un as downloadAsset, Ye as drag, H as emptyToSpace, L as escapeXML, ir as extractColor, B as extractExtension, pn as extractFrames, P as extractRootData, xe as extractValueAndUnit, Le as extractWaveformPeaks, Ut as fetchCortexApi, x as findAncestorWithBuggyStyle, _ as findContainingBlock, y as findCuttingAncestor, bn as findFrameByColAndRow, $t as findIndexByProp, et as focusWhenVisible, pe as formCollections, ye as formatAspectRatioString, qn as formatColorCodeSeparator, ge as formatDurationPartsManually, Qn as formatHexCode, pt as formatIsoToDisplay, _t as formatMonthYearLabel, we as formatNumberWithGrouping, D as formatSecondsToTime, R as formatTimeToSeconds, _e as formatWithIntlDurationFormat, Ee as gcd, ne as getActiveElement, jn as getActiveModals, ue as getAssociatedForm, ae as getAttributes, V as getAttributesString, cr as getBreakpointsFromCSS, Tt as getBrowserFontVariants, or as getColorType, Oe as getContainedImageSize, $ as getCortexPopupLayer, J as getCurrentZIndex, gt as getDateMask, Qe as getDeepestActiveElement, lr as getDeviceType, he as getDurationPartsByUnitsFormat, re as getElementFromHTMLString, oe as getElementFromTemplate, ht as getFirstDayOfWeek, Bt as getFontFamilyOptionValue, Ot as getFontFamilyVariants, Mt as getFormControls, fr as getHighlightedTitle, dr as getHighlightedTitleHtml, l as getInnerHTML, an as getInterval, Jn as getLightDarkCssString, Ne as getNaturalWidthHeight, Y as getNeededPaddingForBoxShadow, h as getNextAncestor, rt as getOffset, ee as getRelativeClickPercentage, k as getRootIDString, nt as getTabbableBoundary, tt as getTabbableElements, u as getTextContent, mt as getTodayIsoDate, zt as getTypefaceOptionValue, Tn as groupBy, nn as hasTransformSegment, F as htmlToPlainText, mn as insertAtIndex, Kt as insertFrameToCache, xn as insertMultipleAtIndex, Ke as interpolateStopColor, p as isChrome, st as isCortexAdobePlugin, ce as isDomElement, X as isElementInHorizontalView, Nn as isExpiredAssetUrl, v as isFirefox, Vt as isFontFamilyAvailable, Rt as isFormInteracted, U as isGalleryItemCardType, He as isGradientString, b as isIOS, Z as isInElement, Ht as isModKey, m as isSafari, Fe as isSaveSrcValid, Ln as isValidDomainOrIntranetUrl, ut as isValidIsoDate, Gn as isValidUrl, bt as isoToDate, fn as isoWeekNumber, ie as loadScript, ot as lockBodyScrolling, Yn as luminanceTextColor, on as moveMultipleToIndex, qt as moveToIndex, gn as multiSelectTo, Be as normalizeAngle, St as normalizeToIsoDate, sn as omit, Dn as openAssetOverview, Qt as openFolderOverview, tn as openLink, A as padPath, j as parseBooleanString, nr as parseBorder, dt as parseDisplayToIso, i as parseDuration, Gt as parseFileSizeToBytes, Ge as parseGradient, xt as parseIsoDate, Nt as parseJsonString, $n as parseLightDark, Pt as parseListString, Xn as parseShadow, On as parseTransformations, It as pick, g as popoverSupported, t as prefersReducedMotion, Xe as quantizeLargestRemainder, Dt as quoteFontFamily, Pn as readAssetTokenExpiry, cn as readLocalStorageValue, te as readSearchConsistency, z as reducePathToDirectChild, s as registerTranslation, Cn as removeAtIndex, Xt as removeMultipleAtIndex, ke as resizeImage, kn as resolveAutoFormat, Jt as resolveAutoMaxWidth, Fn as resolveSpaceUrl, be as rotateBox, je as rotateImage, I as safeExtension, N as safeString, M as sanitizeHTML, Se as sanitizeRotation, it as scrollIntoView, An as serialize, qe as serializeGradient, vn as shareAsset, e as shimKeyframesHeightAuto, Q as sortByTopPosition, Ve as sortStops, jt as sortTypefaceVariants, ct as splitBoxValues, E as splitCamelCaseFormatted, Ue as splitTopLevel, r as stopAnimations, S as supportHLS, yn as testFontAvailability, sr as timecodeConverter, W as toCamelCase, lt as toIsoDate, q as toKebabCase, O as toPascalCase, Vn as toRelativeUrl, K as toTitleCase, Rn as toUrlPathKey, Ft as toast, T as truncateTextMiddle, w as unescapeXML, at as unlockBodyScrolling, At as unquoteFontFamily, G as upperFirst, le as validValidityState, fe as valueMissingValidityState, a as waitForEvent, f as watch, wt as writeLocalStorageValue };
8
+ import { C as w, E as T, S as E, T as D, _ as O, a as k, b as A, c as j, d as M, f as N, g as P, h as F, i as I, l as L, m as R, n as z, o as B, p as V, r as H, s as U, t as W, u as G, v as K, w as q, x as J, y as Y } from "./chunks/string.9yahdkB8.js";
9
+ import { a as X, c as Z, d as Q, f as $, h as ee, i as te, l as ne, m as re, n as ie, o as ae, p as oe, r as se, s as ce, t as le, u as ue } from "./chunks/dom.BLHsooDR.js";
10
+ import { a as de, i as fe, n as pe, o as me, r as he, t as ge } from "./chunks/form.D_eBa3AQ.js";
11
+ import { i as _e, n as ve, r as ye, t as be } from "./chunks/time.p1t0NCwj.js";
12
+ import { a as xe, c as Se, i as Ce, l as we, n as Te, o as Ee, r as De, s as Oe, t as ke } from "./chunks/number.CNp5LKkv.js";
13
+ import { a as Ae, c as je, i as Me, l as Ne, n as Pe, o as Fe, r as Ie, s as Le, t as Re } from "./chunks/image.C0s1gL4z.js";
14
+ import { n as ze, t as Be } from "./chunks/waveform.BFEuRt2_.js";
15
+ import { t as Ve } from "./chunks/default-value.opqQgoRT.js";
16
+ import { a as He, c as Ue, i as We, l as Ge, n as Ke, o as qe, r as Je, s as Ye, t as Xe } from "./chunks/gradient.rrDxmV60.js";
17
+ import { t as Ze } from "./chunks/drag.s0AcVpKh.js";
18
+ import { n as Qe, t as $e } from "./chunks/math.od1DVmRk.js";
19
+ import { n as et, t as tt } from "./chunks/active-elements.Tk45XSNQ.js";
20
+ import { t as nt } from "./chunks/focus-when-visible.DKscgyKo.js";
21
+ import { n as rt, t as it } from "./chunks/tabbable.BSwpOHdm.js";
22
+ import { i as at, n as ot, r as st, t as ct } from "./chunks/scroll.CEH_a4pm.js";
23
+ import { t as lt } from "./chunks/user-agent.D2bRhUeS.js";
24
+ import { t as ut } from "./chunks/parse.CDrJ-NY7.js";
25
+ import { S as dt, _ as ft, b as pt, d as mt, f as ht, g as gt, h as _t, m as vt, p as yt, t as bt, u as xt, v as St, x as Ct, y as wt } from "./chunks/date.BL4L64Hx.js";
26
+ import { $ as Tt, A as Et, B as Dt, F as Ot, G as kt, H as At, I as jt, J as Mt, K as Nt, L as Pt, M as Ft, N as It, O as Lt, P as Rt, Q as zt, R as Bt, U as Vt, V as Ht, W as Ut, X as Wt, Y as Gt, Z as Kt, _ as qt, a as Jt, at as Yt, b as Xt, c as Zt, ct as Qt, d as $t, dt as en, et as tn, f as nn, ft as rn, g as an, h as on, i as sn, it as cn, j as ln, k as un, l as dn, lt as fn, m as pn, mt as mn, n as hn, nt as gn, o as _n, ot as vn, p as yn, pt as bn, q as xn, r as Sn, rt as Cn, s as wn, st as Tn, t as En, tt as Dn, u as On, ut as kn, v as An, y as jn, z as Mn } from "./chunks/src.DY4Vfem2.js";
27
+ import { n as Nn } from "./chunks/modal.eB-mqL-y.js";
28
+ import { a as Pn, c as Fn, d as In, f as Ln, i as Rn, l as zn, m as Bn, n as Vn, o as Hn, p as Un, r as Wn, s as Gn, t as Kn, u as qn } from "./chunks/url.BCc06dE7.js";
29
+ import { a as Jn, c as Yn, d as Xn, f as Zn, h as Qn, i as $n, l as er, m as tr, n as nr, o as rr, p as ir, r as ar, s as or, t as sr, u as cr } from "./chunks/color.CIOzHtLK.js";
30
+ import { t as lr } from "./chunks/converters.CFh-tT4P.js";
31
+ import { n as ur, r as dr, t as fr } from "./chunks/responsive.L9Csz2w2.js";
32
+ import { n as pr, t as mr } from "./chunks/template.Cyvih0XQ.js";
33
+ export { _n as AUTO_FALLBACK_FORMAT, wn as AUTO_FORMAT_EXTENSION, Zt as AUTO_ORIGINAL_FORMAT_MAX_BYTES, sr as CMYK_VALIDATION_REGEX, xt as CalendarGrid, nr as ColorType, zt as CortexPopupController, fr as DEFAULT_BREAKPOINTS, bt as DateRangePresets, Kt as DragScroll, ge as FormControlController, ar as HEX_ALPHA_VALIDATION_REGEX, $n as HEX_VALIDATION_REGEX, d as HasSlotController, jt as HistoryManager, Ot as KeyboardKey, c as LocalizeController, Xe as MIN_GRADIENT_STOPS, dn as ORIGINAL_FORMAT, En as PRECISION, Kn as RELATIVE_URL_REGEX, Jn as RGB_VALIDATION_REGEX, On as SRCSET_WIDTH_LADDER, Vn as URL_DOMAIN_VALIDATION_REGEX, Wn as URL_INTRANET_DOMAIN_VALIDATION_REGEX, Rn as URL_PROTOCOL_VALIDATION_REGEX, Pn as URL_VALIDATION_REGEX, tt as activeElements, mt as addMonths, Tt as adjustRelativeValues, n as animateTo, Hn as appendProtocol, Gn as appendQueryParam, $t as applyTransformationsToUrl, nn as applyWidthToAssetUrl, yn as buildAssetSrcset, pn as buildSizesFromDisplayWidth, on as buildTransformationString, Be as buildWaveformPath, Re as calculateAspectRatioFit, $e as clamp, Pe as cleanImageFileName, be as clearZeroDurationParts, rr as convertColor, ke as convertDataUnits, Te as convertDurationToMilliseconds, De as convertPixelsToAspectRatio, Ie as convertSrcToBlob, Ke as createStopId, Me as cropImage, le as cssValueToPx, o as customElement, pe as customErrorValidityState, C as debounce, Ve as defaultValue, fn as downloadAsset, Ze as drag, W as emptyToSpace, z as escapeXML, or as extractColor, H as extractExtension, hn as extractFrames, I as extractRootData, Ce as extractValueAndUnit, ze as extractWaveformPeaks, Gt as fetchCortexApi, x as findAncestorWithBuggyStyle, _ as findContainingBlock, y as findCuttingAncestor, Sn as findFrameByColAndRow, tn as findIndexByProp, k as findSearchMatches, nt as focusWhenVisible, B as foldSearchText, he as formCollections, xe as formatAspectRatioString, Yn as formatColorCodeSeparator, ve as formatDurationPartsManually, er as formatHexCode, ht as formatIsoToDisplay, yt as formatMonthYearLabel, Ee as formatNumberWithGrouping, U as formatSecondsToTime, j as formatTimeToSeconds, ye as formatWithIntlDurationFormat, Oe as gcd, ie as getActiveElement, Nn as getActiveModals, fe as getAssociatedForm, se as getAttributes, L as getAttributesString, ur as getBreakpointsFromCSS, Dt as getBrowserFontVariants, cr as getColorType, Ae as getContainedImageSize, te as getCortexPopupLayer, X as getCurrentZIndex, vt as getDateMask, et as getDeepestActiveElement, dr as getDeviceType, _e as getDurationPartsByUnitsFormat, ae as getElementFromHTMLString, ce as getElementFromTemplate, _t as getFirstDayOfWeek, Ht as getFontFamilyOptionValue, At as getFontFamilyVariants, Pt as getFormControls, mr as getHighlightedTitle, pr as getHighlightedTitleHtml, l as getInnerHTML, sn as getInterval, Xn as getLightDarkCssString, Fe as getNaturalWidthHeight, Z as getNeededPaddingForBoxShadow, h as getNextAncestor, at as getOffset, ne as getRelativeClickPercentage, G as getRootIDString, it as getTabbableBoundary, rt as getTabbableElements, u as getTextContent, gt as getTodayIsoDate, Vt as getTypefaceOptionValue, Dn as groupBy, an as hasTransformSegment, M as htmlToPlainText, gn as insertAtIndex, Jt as insertFrameToCache, Cn as insertMultipleAtIndex, Je as interpolateStopColor, p as isChrome, lt as isCortexAdobePlugin, ue as isDomElement, Q as isElementInHorizontalView, Fn as isExpiredAssetUrl, v as isFirefox, Ut as isFontFamilyAvailable, Bt as isFormInteracted, N as isGalleryItemCardType, We as isGradientString, b as isIOS, $ as isInElement, Wt as isModKey, m as isSafari, Le as isSaveSrcValid, zn as isValidDomainOrIntranetUrl, ft as isValidIsoDate, qn as isValidUrl, St as isoToDate, mn as isoWeekNumber, oe as loadScript, ct as lockBodyScrolling, Zn as luminanceTextColor, cn as moveMultipleToIndex, Yt as moveToIndex, vn as multiSelectTo, He as normalizeAngle, wt as normalizeToIsoDate, ln as omit, kn as openAssetOverview, en as openFolderOverview, rn as openLink, V as padPath, R as parseBooleanString, ir as parseBorder, pt as parseDisplayToIso, i as parseDuration, qt as parseFileSizeToBytes, qe as parseGradient, Ct as parseIsoDate, Ft as parseJsonString, tr as parseLightDark, It as parseListString, Qn as parseShadow, An as parseTransformations, Rt as pick, g as popoverSupported, t as prefersReducedMotion, Qe as quantizeLargestRemainder, kt as quoteFontFamily, In as readAssetTokenExpiry, un as readLocalStorageValue, re as readSearchConsistency, F as reducePathToDirectChild, s as registerTranslation, Tn as removeAtIndex, Qt as removeMultipleAtIndex, je as resizeImage, jn as resolveAutoFormat, Xt as resolveAutoMaxWidth, Ln as resolveSpaceUrl, Se as rotateBox, Ne as rotateImage, P as safeExtension, O as safeString, K as sanitizeHTML, we as sanitizeRotation, ot as scrollIntoView, Mn as serialize, Ye as serializeGradient, bn as shareAsset, e as shimKeyframesHeightAuto, ee as sortByTopPosition, Ue as sortStops, Nt as sortTypefaceVariants, ut as splitBoxValues, Y as splitCamelCaseFormatted, Ge as splitTopLevel, r as stopAnimations, S as supportHLS, xn as testFontAvailability, lr as timecodeConverter, A as toCamelCase, dt as toIsoDate, J as toKebabCase, E as toPascalCase, Un as toRelativeUrl, w as toTitleCase, Bn as toUrlPathKey, Lt as toast, q as truncateTextMiddle, D as unescapeXML, st as unlockBodyScrolling, Mt as unquoteFontFamily, T as upperFirst, de as validValidityState, me as valueMissingValidityState, a as waitForEvent, f as watch, Et as writeLocalStorageValue };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "4.52.0",
4
+ "version": "4.54.0",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -1,16 +0,0 @@
1
- import "./chunk-NSK5VX7P.CigvU-YZ.js";
2
- import "./chunk-X3CZISLH.D200o-iZ.js";
3
- import "./chunk-I66GZJ75.H0-SV6eJ.js";
4
- import "./chunk-4I5QYGJK.BfgT5lel.js";
5
- import "./chunk-WRU74C26.DI6bT2w6.js";
6
- import "./chunk-7BUUIJ7U.2HaDAqLO.js";
7
- import "./chunk-UBXNYLIW.Cwnmh6rE.js";
8
- import "./chunk-2GRJ4B5K.gGaxW0lA.js";
9
- import "./chunk-XXDRQBXY.BwfXrXWR.js";
10
- import "./chunk-KBJHAD2P.BFtv98WB.js";
11
- import "./chunk-W5SLKNZC.BGc7e7pD.js";
12
- import "./chunk-QR6OTTB3.DXgKvg29.js";
13
- import "./chunk-7Z6QIM7H.ChD5saA-.js";
14
- import { n as e } from "./chunk-JQJVKLGR.vSmZrVfn.js";
15
- import "./mermaid.core.CUTdrxBG.js";
16
- export { e as diagram };
@@ -1,100 +0,0 @@
1
- import { c as e, d as t } from "./lit.CyJqR2kf.js";
2
- import { a as n, i as r, n as i, r as a, t as o } from "./cortex-element.DTrNUtdr.js";
3
- import { t as s } from "./query.B1yi7t71.js";
4
- import { t as c } from "./component.styles.0xM1ZmBs.js";
5
- import { t as l } from "./custom-element.BEMYNDK1.js";
6
- import { t as u } from "./i18n.CQPiI18Q.js";
7
- import { t as d } from "./watch.Ub5r8btz.js";
8
- import { t as f } from "./class-map.D8nsNOVJ.js";
9
- import { t as p } from "./when.BUskJLtZ.js";
10
- import { t as m } from "./icon.CeQpEaQz.js";
11
- import { t as h } from "./space.Dd8jezXK.js";
12
- //#region ../../packages/types/src/option.ts
13
- var g = /* @__PURE__ */ function(e) {
14
- return e.Left = "left", e.Right = "right", e;
15
- }({}), _ = t`:host{-webkit-user-select:none;user-select:none;display:block}:host(:focus){outline:none}.option{font:var(--cx-font-label-small);font-family:var(--option-font-family), var(--cx-font-sans);font-weight:var(--option-font-weight,var(--cx-font-weight-medium));letter-spacing:var(--cx-letter-spacing-normal);color:var(--option-color,var(--cx-color-neutral-700));padding:var(--cx-spacing-x-small) var(--cx-spacing-medium) var(--cx-spacing-x-small) var(--cx-spacing-x-small);transition:var(--cx-transition-fast) fill;cursor:pointer;align-items:center;display:flex;position:relative}.option:not(.option--show-check){padding-inline:var(--cx-spacing-small)}.option--hover:not(.option--current):not(.option--disabled){background-color:var(--cx-menu-item-background-color-hover)}.option--current,.option--current.option--disabled{background-color:var(--cx-menu-item-background-color-hover);opacity:1}.option--selected{color:var(--option-selected-color,var(--cx-color-primary));font-weight:var(--option-selected-font-weight,var(--cx-font-weight-regular))}.option--disabled{opacity:.5;cursor:default;outline:none}.option__content{flex:1}.option__label{line-height:var(--cx-line-height-medium);flex:auto;display:inline-block}.option .option__check{visibility:hidden;flex:none;justify-content:center;align-items:center;padding-inline-end:var(--cx-spacing-2x-small);display:none}.option--show-check .option__check{display:block}.option--show-check.option--selected .option__check{visibility:visible}.option__help-text{color:var(--option-help-text-color,var(--cx-color-neutral-600));font-weight:var(--option-help-text-font-weight,var(--cx-font-weight-regular))}.option--selected .option__content .option__help-text{color:var(--option-selected-help-text-color,var(--cx-color-primary));font-weight:var(--option-selected-help-text-font-weight,var(--cx-font-weight-regular))}.option__prefix,.option__suffix{flex:none;align-items:center;display:flex}.option__prefix::slotted(*){margin-inline-end:var(--cx-spacing-x-small)}.option__suffix::slotted(*){margin-inline-start:var(--cx-spacing-x-small)}.option__prefix{align-self:var(--prefix-alignment,center)}.option__suffix{align-self:var(--suffix-alignment,center)}.option__check{align-self:var(--check-alignment,center)}@media (forced-colors:active){:host(:hover:not([aria-disabled=true])) .option{outline-offset:-1px;outline:1px dashed selecteditem}}`, v = class extends o {
16
- constructor(...e) {
17
- super(...e), this.localize = new u(this), this.current = !1, this.selected = !1, this.hasHover = !1, this.value = "", this.disabled = !1, this.showCheck = !1, this.checkPlacement = g.Left;
18
- }
19
- static #e = this.styles = [c, _];
20
- static #t = this.dependencies = {
21
- "cx-icon": m,
22
- "cx-space": h
23
- };
24
- runFirstUpdated() {
25
- this.setAttribute("role", "option"), this.setAttribute("aria-selected", "false");
26
- }
27
- handleDefaultSlotChange() {
28
- let e = this.getTextLabel();
29
- if (this.cachedTextLabel === void 0) {
30
- this.cachedTextLabel = e;
31
- return;
32
- }
33
- e !== this.cachedTextLabel && (this.cachedTextLabel = e, this.emit("slotchange", {
34
- bubbles: !0,
35
- cancelable: !1,
36
- composed: !1
37
- }));
38
- }
39
- handleMouseEnter() {
40
- this.hasHover = !0;
41
- }
42
- handleMouseLeave() {
43
- this.hasHover = !1;
44
- }
45
- handleDisabledChange() {
46
- this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
47
- }
48
- handleSelectedChange() {
49
- this.setAttribute("aria-selected", this.selected ? "true" : "false");
50
- }
51
- handleValueChange() {
52
- typeof this.value != "string" && (this.value = String(this.value)), this.value.includes(" ") && (console.error("Option values cannot include a space. All spaces have been replaced with underscores.", this), this.value = this.value.replace(/ /g, "_"));
53
- }
54
- getTextLabel() {
55
- let e = this.childNodes, t = "";
56
- return [...e].forEach((e) => {
57
- e.nodeType === Node.ELEMENT_NODE && (e.hasAttribute("slot") || (t += e.textContent)), e.nodeType === Node.TEXT_NODE && (t += e.textContent);
58
- }), t.trim();
59
- }
60
- render() {
61
- return e`<div part="base" class=${f({
62
- option: !0,
63
- "option--current": this.current,
64
- "option--disabled": this.disabled,
65
- "option--hover": this.hasHover,
66
- "option--selected": this.selected,
67
- "option--show-check": this.showCheck
68
- })} @mouseenter=${this.handleMouseEnter} @mouseleave=${this.handleMouseLeave}>${p(this.checkPlacement === g.Left, () => e`<cx-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></cx-icon>`)}<slot part="prefix" name="prefix" class="option__prefix"></slot><cx-space part="content" class="option__content" direction="vertical" spacing="3x-small"><slot part="label" class="option__label" @slotchange=${this.handleDefaultSlotChange}></slot><slot part="help-text" name="help-text" class="option__help-text"></slot></cx-space><slot part="suffix" name="suffix" class="option__suffix"></slot>${p(this.checkPlacement === g.Right, () => e`<cx-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></cx-icon>`)}</div>`;
69
- }
70
- };
71
- i([s(".option__label"), a("design:type", typeof HTMLSlotElement > "u" ? Object : HTMLSlotElement)], v.prototype, "defaultSlot", void 0), i([r(), a("design:type", Object)], v.prototype, "current", void 0), i([r(), a("design:type", Object)], v.prototype, "selected", void 0), i([r(), a("design:type", Object)], v.prototype, "hasHover", void 0), i([n({ reflect: !0 }), a("design:type", Object)], v.prototype, "value", void 0), i([n({
72
- reflect: !0,
73
- type: Boolean
74
- }), a("design:type", Object)], v.prototype, "disabled", void 0), i([n({
75
- attribute: "show-check",
76
- reflect: !0,
77
- type: Boolean
78
- }), a("design:type", Object)], v.prototype, "showCheck", void 0), i([n({
79
- attribute: "check-placement",
80
- reflect: !0,
81
- type: String
82
- }), a("design:type", g === void 0 ? Object : g)], v.prototype, "checkPlacement", void 0), i([
83
- d("disabled"),
84
- a("design:type", Function),
85
- a("design:paramtypes", []),
86
- a("design:returntype", void 0)
87
- ], v.prototype, "handleDisabledChange", null), i([
88
- d("selected"),
89
- a("design:type", Function),
90
- a("design:paramtypes", []),
91
- a("design:returntype", void 0)
92
- ], v.prototype, "handleSelectedChange", null), i([
93
- d("value"),
94
- a("design:type", Function),
95
- a("design:paramtypes", []),
96
- a("design:returntype", void 0)
97
- ], v.prototype, "handleValueChange", null), v = i([l("cx-option")], v);
98
- var y = v;
99
- //#endregion
100
- export { g as n, y as t };