@orangelogic/design-system 3.20.0 → 3.22.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 (246) hide show
  1. package/library/chunks/{_baseXor.DixEm6JQ.js → _baseXor.BCxbgizO.js} +2 -2
  2. package/library/chunks/{asset-link-format.BnE0FbUH.js → asset-link-format.B5E00Je6.js} +656 -629
  3. package/library/chunks/{button.D1YIxtv-.js → button.cbDkxJHn.js} +3 -3
  4. package/library/chunks/button.styles.D3GdfF7I.js +5 -0
  5. package/library/chunks/{color-swatch-group.GEu5gVrg.js → color-swatch-group.BxmlqPZe.js} +3354 -2925
  6. package/library/chunks/color.CIHdfM_a.js +187 -0
  7. package/library/chunks/{confirm-popover.CJXyEa5A.js → confirm-popover.Dvgoz-oA.js} +4 -4
  8. package/library/chunks/content-builder.CBBdfVOl.js +55 -0
  9. package/library/chunks/{dialog.BbQ4Du0M.js → dialog.BvSMV36r.js} +2 -2
  10. package/library/chunks/{document-viewer.Bkf3JbWk.js → document-viewer.Dm9pcb0o.js} +11 -10
  11. package/library/chunks/{dom.DL-cNKsj.js → dom.D0lSUoEI.js} +1 -1
  12. package/library/chunks/{dot-pagination.CJRAtM51.js → dot-pagination.CukHxNBk.js} +1 -1
  13. package/library/chunks/{folder-select.D8_6pC8Y.js → folder-select.BQqwlVaD.js} +5 -5
  14. package/library/chunks/form-control.styles.CHC7Q08Q.js +5 -0
  15. package/library/chunks/{form.DN2v7-DH.js → form.LpappO1d.js} +1 -1
  16. package/library/chunks/{header.BioJzPlg.js → header.2RH_nPmz.js} +132 -90
  17. package/library/chunks/{i18n.rtxrs1c1.js → i18n.BSPmBQ73.js} +94 -12
  18. package/library/chunks/{icon-button.CbUddcgI.js → icon-button.DV5Fks8j.js} +1 -1
  19. package/library/chunks/{iframe.y7iCAVZP.js → iframe.ddX2kGu3.js} +1 -1
  20. package/library/chunks/{image.A2hE1WoV.js → image.BM7bPTub.js} +407 -276
  21. package/library/chunks/index.SMjV3S2z.js +1130 -0
  22. package/library/chunks/{input.D1FFprPl.js → input.7pumTpdu.js} +3 -3
  23. package/library/chunks/{markdown.Dd_GFJK8.js → markdown.LHSzm035.js} +3 -3
  24. package/library/chunks/{menu-item.0TbnDEDp.js → menu-item.DsJZ7i0J.js} +1 -1
  25. package/library/chunks/{option.CyorNG0S.js → option.C5f7yDqN.js} +1 -1
  26. package/library/chunks/{pagination.D0BeaEIi.js → pagination.CMwpX60h.js} +36 -32
  27. package/library/chunks/{position-picker.DjnhxIKF.js → position-picker.qkbJlboF.js} +12 -0
  28. package/library/chunks/{resizable-component.styles.CAfXABBc.js → resizable-component.styles.kMFDlGgv.js} +2 -2
  29. package/library/chunks/responsive.BmBJSzC4.js +17 -0
  30. package/library/chunks/{string.Demn8Xmk.js → string.CfI2ejyR.js} +3 -3
  31. package/library/chunks/{tab-group.C98CWzEH.js → tab-group.D_QAkP8s.js} +312 -310
  32. package/library/chunks/toast.D3AW3RWv.js +94 -0
  33. package/library/chunks/transformation.BwQ_H-4q.js +351 -0
  34. package/library/chunks/{tree.DB-QLic1.js → tree.BHrf5WIc.js} +1 -1
  35. package/library/chunks/{types.DrJgdbwu.js → types.BDM-NtAR.js} +58295 -35623
  36. package/library/chunks/typography.BLYdTF0n.js +102 -0
  37. package/library/components/alert.js +2 -2
  38. package/library/components/asset-link-format.js +6 -6
  39. package/library/components/atoms.js +161 -159
  40. package/library/components/audio.js +4 -4
  41. package/library/components/bicolor-picker.js +2 -2
  42. package/library/components/border-input-group.js +2 -2
  43. package/library/components/box.d.ts +3 -0
  44. package/library/components/box.js +22 -0
  45. package/library/components/breadcrumb.js +1 -1
  46. package/library/components/button.js +4 -4
  47. package/library/components/card.js +7 -7
  48. package/library/components/checkbox.js +2 -2
  49. package/library/components/color-picker.js +36 -32
  50. package/library/components/color-swatch-group.js +8 -7
  51. package/library/components/color-swatch.js +246 -22
  52. package/library/components/confirm-popover.js +5 -5
  53. package/library/components/copy-button.js +2 -2
  54. package/library/components/corner-position-input-group.js +3 -3
  55. package/library/components/date-calendar.js +1 -1
  56. package/library/components/details.js +19 -19
  57. package/library/components/dialog.js +3 -3
  58. package/library/components/diff.js +1 -1
  59. package/library/components/document-viewer.js +5 -5
  60. package/library/components/dot-pagination.js +2 -2
  61. package/library/components/drawer.js +2 -2
  62. package/library/components/dropdown.js +2 -2
  63. package/library/components/dynamic-select.js +95 -92
  64. package/library/components/e-chart.js +1 -1
  65. package/library/components/element-clamp.js +2 -2
  66. package/library/components/file-on-demand.js +12 -12
  67. package/library/components/folder-select.js +5 -5
  68. package/library/components/format-bytes.js +1 -1
  69. package/library/components/format-date.js +1 -1
  70. package/library/components/format-number.js +1 -1
  71. package/library/components/format-time.js +1 -1
  72. package/library/components/header.js +6 -3
  73. package/library/components/icon-button.js +2 -2
  74. package/library/components/iframe.js +2 -2
  75. package/library/components/image-comparer.js +1 -1
  76. package/library/components/image.js +5 -4
  77. package/library/components/input-group.js +1 -1
  78. package/library/components/input.js +4 -4
  79. package/library/components/line-clamp.js +1 -1
  80. package/library/components/markdown.js +4 -4
  81. package/library/components/masonry.js +70 -56
  82. package/library/components/menu-item.js +2 -2
  83. package/library/components/menu.js +2 -2
  84. package/library/components/molecules.js +4 -4
  85. package/library/components/mutation-observer.js +26 -24
  86. package/library/components/option.js +2 -2
  87. package/library/components/organisms.js +2 -2
  88. package/library/components/padding-input-group.js +1 -1
  89. package/library/components/pagination.js +7 -7
  90. package/library/components/popup.js +1 -1
  91. package/library/components/position-picker.js +2 -2
  92. package/library/components/progress-bar.js +1 -1
  93. package/library/components/progress-ring.js +1 -1
  94. package/library/components/radio-button.js +1 -1
  95. package/library/components/radio-card.js +1 -1
  96. package/library/components/radio-group.js +2 -2
  97. package/library/components/range.js +3 -3
  98. package/library/components/rating.js +1 -1
  99. package/library/components/relative-time.js +1 -1
  100. package/library/components/select.js +5 -5
  101. package/library/components/shadow-input-group.js +1 -1
  102. package/library/components/share-option-list.js +3 -3
  103. package/library/components/sidebar.js +1 -1
  104. package/library/components/size-input-group.js +3 -3
  105. package/library/components/spinner.js +1 -1
  106. package/library/components/split-panel.js +1 -1
  107. package/library/components/switch.js +2 -2
  108. package/library/components/tab-group.js +6 -6
  109. package/library/components/tab-panel.js +1 -1
  110. package/library/components/tab.js +16 -16
  111. package/library/components/tag.js +2 -2
  112. package/library/components/textarea.js +2 -2
  113. package/library/components/timecode.js +2 -2
  114. package/library/components/tooltip.js +1 -1
  115. package/library/components/tree-item.js +2 -2
  116. package/library/components/tree.js +2 -2
  117. package/library/components/typeface.js +3 -3
  118. package/library/components/types.js +496 -487
  119. package/library/components/typography.js +3 -2
  120. package/library/components/video.js +5277 -5209
  121. package/library/css/ol-base.css +1 -0
  122. package/library/package.json +1 -1
  123. package/library/packages/atoms/src/components/box/box.d.ts +26 -0
  124. package/library/packages/atoms/src/components/box/box.styles.d.ts +7 -0
  125. package/library/packages/atoms/src/components/button/button.d.ts +4 -0
  126. package/library/packages/atoms/src/components/card/card.d.ts +1 -0
  127. package/library/packages/atoms/src/components/color-picker/color-picker.d.ts +11 -0
  128. package/library/packages/atoms/src/components/copy-button/copy-button.d.ts +1 -0
  129. package/library/packages/atoms/src/components/details/details.d.ts +6 -1
  130. package/library/packages/atoms/src/components/header/header.d.ts +38 -2
  131. package/library/packages/atoms/src/components/image/image.d.ts +30 -0
  132. package/library/packages/atoms/src/components/mutation-observer/mutation-observer.d.ts +1 -1
  133. package/library/packages/atoms/src/components/radio-card/radio-card.d.ts +1 -0
  134. package/library/packages/atoms/src/components/tab/tab.d.ts +17 -0
  135. package/library/packages/atoms/src/components/typography/typography.d.ts +31 -0
  136. package/library/packages/atoms/src/components/video/video.d.ts +24 -0
  137. package/library/packages/atoms/src/index.d.ts +1 -0
  138. package/library/packages/events/src/cx-asset-transformation-dialog-confirm.d.ts +2 -0
  139. package/library/packages/events/src/cx-color-swatch-picker-columns-change.d.ts +15 -0
  140. package/library/packages/events/src/events.d.ts +1 -0
  141. package/library/packages/hybrid/table-core/src/table/components/table-toolbar/table-dropdown-filter.d.ts +2 -0
  142. package/library/packages/hybrid/table-core/src/table/table.d.ts +45 -5
  143. package/library/packages/molecules/src/color-swatch/color-swatch.d.ts +35 -1
  144. package/library/packages/molecules/src/data-tab-group/data-tab-group.d.ts +30 -1
  145. package/library/packages/molecules/src/details-group/details-group.d.ts +105 -3
  146. package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
  147. package/library/packages/molecules/src/font-picker/font-picker.d.ts +3 -0
  148. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +10 -0
  149. package/library/packages/molecules/src/icon-picker/icon-picker.d.ts +5 -6
  150. package/library/packages/molecules/src/index.d.ts +0 -1
  151. package/library/packages/molecules/src/masonry/masonry.d.ts +5 -0
  152. package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +6 -0
  153. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +5 -1
  154. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +32 -11
  155. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +37 -45
  156. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +210 -10
  157. package/library/packages/organisms/src/content-builder/blocks/font-kit-advanced/font-kit-advanced.utils.d.ts +85 -0
  158. package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +32 -9
  159. package/library/packages/organisms/src/content-builder/components/block-picker/block-picker.d.ts +24 -8
  160. package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +70 -1
  161. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -22
  162. package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +7 -0
  163. package/library/packages/organisms/src/content-builder/components/gallery-config/gallery-config.d.ts +6 -0
  164. package/library/packages/organisms/src/content-builder/components/gallery-picker/gallery-picker.d.ts +1 -0
  165. package/library/packages/organisms/src/content-builder/configs/accordion.d.ts +7 -0
  166. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +1 -0
  167. package/library/packages/organisms/src/content-builder/configs/button.d.ts +2 -1
  168. package/library/packages/organisms/src/content-builder/configs/carousel.d.ts +11 -1
  169. package/library/packages/organisms/src/content-builder/configs/color-swatches.d.ts +19 -1
  170. package/library/packages/organisms/src/content-builder/configs/column-group.d.ts +11 -2
  171. package/library/packages/organisms/src/content-builder/configs/column.d.ts +13 -3
  172. package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -0
  173. package/library/packages/organisms/src/content-builder/configs/divider.d.ts +1 -0
  174. package/library/packages/organisms/src/content-builder/configs/document-viewer.d.ts +1 -0
  175. package/library/packages/organisms/src/content-builder/configs/font-kit-advanced.d.ts +19 -0
  176. package/library/packages/organisms/src/content-builder/configs/font-kit.d.ts +2 -0
  177. package/library/packages/organisms/src/content-builder/configs/gallery.d.ts +15 -1
  178. package/library/packages/organisms/src/content-builder/configs/header.d.ts +3 -1
  179. package/library/packages/organisms/src/content-builder/configs/image.d.ts +4 -0
  180. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  181. package/library/packages/organisms/src/content-builder/configs/search-box.d.ts +5 -1
  182. package/library/packages/organisms/src/content-builder/configs/tab-group.d.ts +7 -4
  183. package/library/packages/organisms/src/content-builder/configs/timeline.d.ts +1 -0
  184. package/library/packages/organisms/src/content-builder/configs/video.d.ts +3 -0
  185. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +168 -13
  186. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +60 -0
  187. package/library/packages/organisms/src/content-builder/content-builder-constants.d.ts +27 -0
  188. package/library/packages/organisms/src/content-builder/content-builder.d.ts +122 -2
  189. package/library/packages/organisms/src/content-builder/content-builder.sections.utils.d.ts +78 -0
  190. package/library/packages/organisms/src/content-builder/content-builder.utils.d.ts +33 -2
  191. package/library/packages/organisms/src/content-builder/plugins/font-kit-advanced.d.ts +5 -0
  192. package/library/packages/organisms/src/content-builder/plugins/gallery.d.ts +6 -0
  193. package/library/packages/organisms/src/content-builder/plugins/header.d.ts +7 -1
  194. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +2 -1
  195. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/components/rte-bubble-menu/rte-bubble-menu.d.ts +21 -1
  196. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/extensions/index.d.ts +2 -0
  197. package/library/packages/organisms/src/content-builder/plugins/rich-text-editor/rte-configs.d.ts +14 -0
  198. package/library/packages/organisms/src/content-builder/plugins/sections/section-fragment-component.d.ts +22 -0
  199. package/library/packages/organisms/src/content-builder/plugins/sections/section-host-mounting.d.ts +15 -0
  200. package/library/packages/organisms/src/content-builder/plugins/sections/sections-canvas-patches.d.ts +20 -0
  201. package/library/packages/organisms/src/content-builder/plugins/sections/sections-plugin.d.ts +7 -0
  202. package/library/packages/organisms/src/content-builder/plugins/toolbar.d.ts +10 -1
  203. package/library/packages/organisms/src/content-builder/plugins/utils/block-width.d.ts +20 -0
  204. package/library/packages/organisms/src/content-builder/styleController.d.ts +11 -5
  205. package/library/packages/organisms/src/content-builder-viewer/content-builder-viewer.d.ts +1 -0
  206. package/library/packages/organisms/src/form/control-renderer/control-renderer.d.ts +176 -0
  207. package/library/packages/organisms/src/form/control-renderer/control-renderer.styles.d.ts +9 -0
  208. package/library/packages/organisms/src/list-editor/list-editor.d.ts +181 -6
  209. package/library/packages/tools/src/fetch-image/fetch-image.d.ts +12 -0
  210. package/library/packages/tools/src/tiptap/extensions/metafield/index.d.ts +12 -0
  211. package/library/packages/tools/src/tiptap/utils/md/schema.d.ts +1 -1
  212. package/library/packages/types/src/asset-link-format.d.ts +0 -1
  213. package/library/packages/types/src/button.d.ts +1 -1
  214. package/library/packages/types/src/color-swatch-group.d.ts +56 -0
  215. package/library/packages/types/src/color-swatch.d.ts +22 -0
  216. package/library/packages/types/src/column.d.ts +13 -0
  217. package/library/packages/types/src/content-builder.d.ts +73 -4
  218. package/library/packages/types/src/details-group.d.ts +80 -0
  219. package/library/packages/types/src/font-kit-advanced.d.ts +28 -0
  220. package/library/packages/types/src/font-kit.d.ts +19 -0
  221. package/library/packages/types/src/font-picker.d.ts +2 -0
  222. package/library/packages/types/src/gallery-item.d.ts +3 -1
  223. package/library/packages/types/src/gallery.d.ts +2 -1
  224. package/library/packages/types/src/index.d.ts +1 -0
  225. package/library/packages/types/src/masonry.d.ts +1 -0
  226. package/library/packages/types/src/position-picker.d.ts +6 -0
  227. package/library/packages/types/src/sb-button.d.ts +7 -0
  228. package/library/packages/types/src/search-box.d.ts +4 -0
  229. package/library/packages/utils/src/color/color.d.ts +27 -3
  230. package/library/packages/utils/src/custom-element/i18n.d.ts +88 -2
  231. package/library/packages/utils/src/font/font.d.ts +12 -0
  232. package/library/packages/utils/src/transformation/transformation.d.ts +11 -3
  233. package/library/react-web-component.d.ts +514 -156
  234. package/library/utils.js +417 -397
  235. package/package.json +1 -1
  236. package/library/chunks/button.styles.BWgHrfLD.js +0 -5
  237. package/library/chunks/color-swatch.DdsUysbF.js +0 -223
  238. package/library/chunks/color.LzSGBy7o.js +0 -164
  239. package/library/chunks/form-control.styles.CaGWmeAS.js +0 -5
  240. package/library/chunks/index.Ct-dh3Y5.js +0 -20122
  241. package/library/chunks/toast.CGIDPKV8.js +0 -109
  242. package/library/chunks/transformation.OaRYixzE.js +0 -385
  243. package/library/chunks/typography.T72DuoCa.js +0 -52
  244. package/library/packages/molecules/src/search-box/search-box.d.ts +0 -114
  245. package/library/packages/organisms/src/content-builder/plugins/wrapper-container.d.ts +0 -4
  246. /package/library/packages/{molecules/src/search-box/search-box.styles.d.ts → organisms/src/content-builder-viewer/content-builder-viewer.styles.d.ts} +0 -0
@@ -3,21 +3,56 @@ import { default as CxTypography } from '../../../atoms/src/components/typograph
3
3
  import { default as CortexElement } from '../../../base/src/cortex-element.ts';
4
4
  import { default as CxColorSwatch } from '../../../molecules/src/color-swatch/color-swatch.ts';
5
5
  import { default as CxTable } from '../../../hybrid/table-core/src/index.ts';
6
- import { ColorSwatchData } from '../../../types/src/color-swatch';
7
- import { CxColorSwatchGroupVariant } from '../../../types/src/color-swatch-group';
8
- import { CSSResultGroup } from 'lit';
6
+ import { ColorSwatchData, CxColorSwatchCodeAlignment, CxColorSwatchCodeSeparator, CxColorSwatchHexFormat } from '../../../types/src/color-swatch';
7
+ import { ColorSwatchCustomColumn, CxColorSwatchGroupColumnAlignment, CxColorSwatchGroupColumnWidthMode, CxColorSwatchGroupElement, CxColorSwatchGroupVariant } from '../../../types/src/color-swatch-group';
8
+ import { CSSResultGroup, PropertyValues } from 'lit';
9
9
 
10
10
  /**
11
11
  * @summary Color Swatch Group is used to display a group of color swatches.
12
12
  *
13
13
  * @cssproperty [--padding=0] - Padding of the container
14
- * @cssproperty [--grid-gap=var(--cx-spacing-medium)] - Gap size for Grid variant (horizontal & vertical)
15
- * @cssproperty [--swatch-group-horizontal-gap=-50px] - Gap size for Circle variant (horizontal) (use negative value for overlapping)
14
+ * @cssproperty [--grid-gap=var(--cx-spacing-medium)] - Gap size for Grid variant, used as the fallback for both axes below
15
+ * @cssproperty [--grid-column-gap=var(--grid-gap)] - Horizontal gap between cards in the Grid variant
16
+ * @cssproperty [--grid-row-gap=var(--grid-gap)] - Vertical gap between cards in the Grid variant
17
+ * @cssproperty [--swatch-min-height=50px] - Minimum height of a Grid variant card
18
+ * @cssproperty [--swatch-border=light-dark(transparent, transparent) 0px] - Border of a Grid variant card
19
+ * @cssproperty [--swatch-border-radius=var(--cx-border-radius-x-large)] - Corner radius of a Grid variant card
20
+ * @cssproperty [--swatch-box-shadow=0px 0px 0px 0px light-dark(transparent, transparent)] - Shadow of a Grid variant card
21
+ * @cssproperty [--swatch-content-justify=space-between] - Vertical alignment of the content inside a Grid variant card
22
+ * @cssproperty [--swatch-content-margin=var(--cx-spacing-medium)] - Padding around the content inside a Grid variant card
23
+ * @cssproperty [--swatch-group-horizontal-gap=-100px] - Gap size for Circle variant (horizontal) (use negative value for overlapping)
24
+ * @cssproperty [--swatch-circle-size=350px] - Size of a Circle variant swatch
25
+ * @cssproperty [--swatch-circle-border-radius=1000px] - Corner radius of a Circle variant swatch
26
+ * @cssproperty [--swatch-circle-content-align=center] - Horizontal alignment of the content inside a Circle variant swatch
27
+ * @cssproperty [--swatch-circle-content-justify=center] - Vertical alignment of the content inside a Circle variant swatch
28
+ * @cssproperty [--swatch-circle-content-margin=0px] - Margin around the content inside a Circle variant swatch
16
29
  * @cssproperty [--swatch-group-vertical-gap=-50px] - Gap size for Circle variant (vertical) (use negative value for overlapping)
17
- * @cssproperty --swatch-font-family - Font family for swatch names/keys/values and, in table mode, the palette title
18
- * @cssproperty [--swatch-font-style=normal] - Font style for swatch names/keys/values and, in table mode, the palette title
19
- * @cssproperty --swatch-font-weight - Font weight for swatch names/keys/values and, in table mode, the palette title
20
- * @cssproperty [--swatch-font-size=var(--cx-font-size-medium)] - Font size for swatch names/keys/values and, in table mode, the palette title
30
+ * @cssproperty --swatch-font-family - Font family for swatch names/keys/values and, in table mode, the cell content
31
+ * @cssproperty [--swatch-font-style=normal] - Font style for swatch names/keys/values and, in table mode, the cell content
32
+ * @cssproperty --swatch-font-weight - Font weight for swatch names/keys/values and, in table mode, the cell content
33
+ * @cssproperty [--swatch-font-size=var(--cx-font-size-large)] - Font size for swatch names/keys/values and, in table mode, the cell content
34
+ * @cssproperty [--swatch-text-color=light-dark(#000000, #ffffff)] - Text color of the table cell content (Table variant only; grid/circle swatches derive their text color from the swatch color)
35
+ * @cssproperty [--table-width=100%] - Width of the tables in the Table variant
36
+ * @cssproperty --row-padding - Padding shorthand for table rows. Split into the four longhands below by the block settings
37
+ * @cssproperty [--row-padding-top=var(--cx-spacing-2x-small)] - Top padding of table rows
38
+ * @cssproperty [--row-padding-right=var(--cx-spacing-2x-small)] - Right padding of table rows
39
+ * @cssproperty [--row-padding-bottom=var(--cx-spacing-2x-small)] - Bottom padding of table rows
40
+ * @cssproperty [--row-padding-left=var(--cx-spacing-2x-small)] - Left padding of table rows, also used as the column-title padding so titles line up with their cells
41
+ * @cssproperty [--name-swatch-width=64px] - Width of the color chip inside the Name cell (Table variant)
42
+ * @cssproperty [--name-swatch-height=32px] - Height of the color chip inside the Name cell (Table variant)
43
+ * @cssproperty [--name-swatch-border-radius=0] - Corner radius of the color chip inside the Name cell (Table variant)
44
+ * @cssproperty [--table-row-gap=0] - Vertical space between table rows
45
+ * @cssproperty [--table-column-gap=0px] - Horizontal space between table columns
46
+ * @cssproperty --palette-title-font-family - Font family of the palette titles (Table variant)
47
+ * @cssproperty --palette-title-font-style - Font style of the palette titles (Table variant)
48
+ * @cssproperty --palette-title-font-weight - Font weight of the palette titles (Table variant)
49
+ * @cssproperty [--palette-title-font-size=var(--cx-font-size-x-large)] - Font size of the palette titles (Table variant)
50
+ * @cssproperty [--palette-title-color=light-dark(#000000, #ffffff)] - Text color of the palette titles (Table variant)
51
+ * @cssproperty --column-title-font-family - Font family of the column titles (Table variant)
52
+ * @cssproperty --column-title-font-style - Font style of the column titles (Table variant)
53
+ * @cssproperty --column-title-font-weight - Font weight of the column titles (Table variant)
54
+ * @cssproperty [--column-title-font-size=var(--cx-font-size-large)] - Font size of the column titles (Table variant)
55
+ * @cssproperty [--column-title-color=light-dark(#000000, #ffffff)] - Text color of the column titles (Table variant)
21
56
  *
22
57
  * @csspart base - The component's base wrapper.
23
58
  *
@@ -45,6 +80,10 @@ export default class CxColorSwatchGroup extends CortexElement {
45
80
  */
46
81
  containerEl: HTMLDivElement;
47
82
  tableEls: NodeListOf<CxTable>;
83
+ /**
84
+ * Off-screen element used to size "Hug contents" columns from the data.
85
+ */
86
+ private readonly measureEl?;
48
87
  /**
49
88
  * Color swatch group variant
50
89
  */
@@ -67,6 +106,70 @@ export default class CxColorSwatchGroup extends CortexElement {
67
106
  */
68
107
  showCodes: string[];
69
108
  multiLanguage: boolean;
109
+ /**
110
+ * Whether a code's label and value share a line or stack on separate lines
111
+ */
112
+ codeAlignment: CxColorSwatchCodeAlignment;
113
+ /**
114
+ * Separator between the numeric parts of the RGB and CMYK codes
115
+ */
116
+ codeSeparator: CxColorSwatchCodeSeparator;
117
+ /**
118
+ * Which prefix the HEX code carries: `#`, `0x`, or none
119
+ */
120
+ hexFormat: CxColorSwatchHexFormat;
121
+ /**
122
+ * Optional table chrome to render (palette name, column titles, separator
123
+ * line). Table variant only; anything omitted from the list is hidden.
124
+ */
125
+ showElements: CxColorSwatchGroupElement[];
126
+ /**
127
+ * Whether the name column shares the table's free space or hugs its content
128
+ */
129
+ nameColumnWidthMode: CxColorSwatchGroupColumnWidthMode;
130
+ /**
131
+ * Applies the name column's min/max width constraints
132
+ */
133
+ nameColumnConstraints: boolean;
134
+ /**
135
+ * Minimum width (px) of the name column, applied while `name-column-constraints` is set
136
+ */
137
+ nameColumnMinWidth?: number;
138
+ /**
139
+ * Maximum width (px) of the name column, applied while `name-column-constraints` is set
140
+ */
141
+ nameColumnMaxWidth?: number;
142
+ /**
143
+ * Horizontal alignment of the name column. Unset keeps the built-in default.
144
+ */
145
+ nameColumnAlignment?: CxColorSwatchGroupColumnAlignment;
146
+ /**
147
+ * Whether the code columns share the table's free space or hug their content
148
+ */
149
+ codeColumnWidthMode: CxColorSwatchGroupColumnWidthMode;
150
+ /**
151
+ * Applies the code columns' min/max width constraints
152
+ */
153
+ codeColumnConstraints: boolean;
154
+ /**
155
+ * Minimum width (px) of each code column, applied while `code-column-constraints` is set
156
+ */
157
+ codeColumnMinWidth?: number;
158
+ /**
159
+ * Maximum width (px) of each code column, applied while `code-column-constraints` is set
160
+ */
161
+ codeColumnMaxWidth?: number;
162
+ /**
163
+ * Horizontal alignment of the code columns. Unset keeps the built-in default.
164
+ */
165
+ codeColumnAlignment?: CxColorSwatchGroupColumnAlignment;
166
+ /**
167
+ * Extra table columns, after the code columns. Each color holds its value in
168
+ * `metadata[column.id]`. Table variant only.
169
+ */
170
+ customColumns: ColorSwatchCustomColumn[];
171
+ /** Paints the Grid variant's cards as one color ramp across the row. */
172
+ gradientEffect: boolean;
70
173
  /**
71
174
  * Breakpoints for responsive design
72
175
  */
@@ -79,12 +182,30 @@ export default class CxColorSwatchGroup extends CortexElement {
79
182
  * Current total grid column
80
183
  */
81
184
  private currentCol;
185
+ /**
186
+ * `showElements` indexed for lookup: the template asks about each element
187
+ * once per render, so it is scanned once here instead.
188
+ */
189
+ private visibleElements;
190
+ /**
191
+ * Measured content width per field, used by columns set to "Hug contents".
192
+ *
193
+ * Only hugging fields are carried: a column set to fill never reads this, so
194
+ * measuring it would cost a layout pass for a width nothing applies.
195
+ *
196
+ * cx-table cannot supply this: its fit-content layouts (`fitData*`) size a
197
+ * column to its *header title* only — `Column.fitToData()` measures cells that
198
+ * have already collapsed inside the flex row — and they are table-wide, so
199
+ * they cannot be mixed with a column that fills. Measuring from the data here
200
+ * keeps hug honest, per column, and free of any feedback loop.
201
+ */
202
+ private hugWidths;
82
203
  private isFocused;
83
204
  canFocusContainer: boolean;
84
205
  isContainerFocused: boolean;
85
206
  constructor();
86
207
  runFirstUpdated(): void;
87
- runConnectedCallback(): void;
208
+ connectedCallback(): void;
88
209
  disconnectedCallback(): void;
89
210
  private handleWindowResize;
90
211
  /**
@@ -94,14 +215,93 @@ export default class CxColorSwatchGroup extends CortexElement {
94
215
  private handleKeyDown;
95
216
  private handleFocusIn;
96
217
  private handleFocusOut;
218
+ updated(changedProperties: PropertyValues<this>): void;
219
+ /**
220
+ * Re-measure after every render rather than from a `@watch`: the fonts and row
221
+ * paddings that decide a hug width arrive as CSS custom properties, which
222
+ * never appear in Lit's changed properties. Assigning only on a real change
223
+ * keeps the extra render from looping.
224
+ */
225
+ private syncHugWidths;
226
+ /** Whether a built-in column's shared width mode is "Hug contents". */
227
+ private hugsBuiltInColumn;
228
+ /**
229
+ * Widest rendered width per field, measured off-screen from the data: the
230
+ * column title in the header font, and every cell value in the content font,
231
+ * each inside a box that mirrors the real cell's padding and column gap.
232
+ *
233
+ * Skips columns set to fill: one hugging column used to drag every other
234
+ * column through a full measurement pass whose width nothing then read.
235
+ */
236
+ private measureHugWidths;
237
+ /**
238
+ * Lays one string out in the probe and returns its width. `inlineStyles`
239
+ * carries a custom column's own font, which no class can express.
240
+ */
241
+ private measureProbe;
242
+ /** Widest of the title and every stored value for a built-in column. */
243
+ private measureBuiltInColumn;
244
+ /**
245
+ * Widest of the title and every stored metadata value for a custom column.
246
+ * The title uses the shared column-title font: a column's own font styles its
247
+ * cells, not its header.
248
+ */
249
+ private measureCustomColumn;
250
+ /**
251
+ * A zero measurement means nothing was laid out (the block is hidden, or this
252
+ * is the render that created the probe). Leaving the field out keeps the
253
+ * column flexible for now instead of pinning it to a bogus width; the next
254
+ * render measures again.
255
+ */
256
+ private recordHugWidth;
257
+ /**
258
+ * The card at `index`'s slice of one ramp spanning the whole row.
259
+ *
260
+ * The ramp belongs to the row, not to each card: first color on the row's
261
+ * left edge, last on its right, the rest spread evenly between. A card
262
+ * reports the ramp at its own two edges plus any color falling inside it, so
263
+ * two cards at a seam sample the same position and agree on the color there.
264
+ *
265
+ * Anchoring colors to card centers instead leaves the halves before the first
266
+ * and after the last color flat, so the band stops short of the block's edges.
267
+ */
268
+ private gradientStopsFor;
269
+ /**
270
+ * The ramp's color at `position`, a fraction of the row. Both cards at a seam
271
+ * pass the same fraction, so they get the same string and the seam cannot show.
272
+ */
273
+ private sampleGradient;
274
+ /**
275
+ * Copies a color's metadata onto flat row keys so the table reads plain
276
+ * fields instead of a nested path. Columns with no value still get a key,
277
+ * which keeps the cell empty instead of showing the previous row's data.
278
+ */
279
+ private flattenMetadata;
280
+ /**
281
+ * Renders one stored code the way it is displayed. Used for the table cells,
282
+ * the text their copy buttons put on the clipboard, and the hug measurement,
283
+ * so all three stay in step.
284
+ */
285
+ private formatCode;
286
+ /**
287
+ * Overlay the block's width/constraint/alignment settings onto one of the
288
+ * built-in column definitions.
289
+ */
290
+ private applyColumnSettings;
97
291
  /**
98
292
  * Filter out the columns that are not in the showCodes
99
293
  */
100
294
  private getTableColumns;
295
+ /**
296
+ * Every input that feeds `getTableColumns`. Used as the `guard` dependency
297
+ * list so the cached table template is rebuilt whenever one of them changes.
298
+ */
299
+ private get columnGuardDependencies();
101
300
  /**
102
301
  * Categorize the color swatches by palette
103
302
  */
104
303
  private categorizeByPalette;
304
+ handleShowElementsChange(): void;
105
305
  handleIsFocusedChange(): void;
106
306
  /**
107
307
  * Get current direction of the color swatch group
@@ -0,0 +1,85 @@
1
+ import { FontOutlinesFormat, Typeface } from '../../../../../types/src/font-kit';
2
+ import { FontFamily } from '../../../../../types/src/font-picker';
3
+
4
+ /** The parsed tables `toFontStyleAxis` reads, shaped as opentype.js exposes them. */
5
+ type FontStyleTables = {
6
+ head?: {
7
+ macStyle?: number;
8
+ };
9
+ os2?: {
10
+ fsSelection?: number;
11
+ };
12
+ post?: {
13
+ italicAngle?: number;
14
+ };
15
+ };
16
+ /**
17
+ * Maps a typeface's style name onto the CSS font-style axis. `fontStyle` may
18
+ * hold a subfamily name such as `Bold Italic`, which is not a valid CSS
19
+ * font-style; the numeric weight carries the rest.
20
+ */
21
+ export declare function toCssFontStyle(fontStyle: string): 'italic' | 'normal';
22
+ /**
23
+ * opentype.js types `outlinesFormat` as a bare `string`; anything unrecognized
24
+ * resolves to `undefined` so the token stays empty rather than guessing.
25
+ */
26
+ export declare function toFontOutlinesFormat(outlinesFormat: string | undefined): FontOutlinesFormat | undefined;
27
+ /**
28
+ * A font with no OS/2 table, or a malformed value, resolves to `undefined` so
29
+ * the token stays empty instead of naming a width the file never declared.
30
+ */
31
+ export declare function toFontWidthClass(usWidthClass: unknown): number | undefined;
32
+ /**
33
+ * Reads the italic axis from the flags the font declares rather than from its
34
+ * subfamily name, which misses `Oblique` and anything not named in English.
35
+ * `fsSelection` is the authoritative one, `macStyle` its older duplicate, and
36
+ * a non-zero `italicAngle` catches a slanted face whose flags were never set.
37
+ * The name is used only when the font carries neither table.
38
+ */
39
+ export declare function toFontStyleAxis(tables: FontStyleTables | undefined, fontSubfamily: string): 'italic' | 'normal';
40
+ /** `italic` → `Italic`; anything off the axis passes through. */
41
+ export declare function getFontStyleName(fontStyle: string): string;
42
+ /**
43
+ * Returns the readable name for a numeric font weight (e.g. `700` → `Bold`),
44
+ * falling back to the raw value for non-standard weights.
45
+ */
46
+ export declare function getFontWeightName(fontWeight: string): string;
47
+ /**
48
+ * The kit's variants as font-picker options, for the "font kit default" entry.
49
+ * Deduped by weight and style: a kit built from several families holds the
50
+ * same face more than once, and the family is irrelevant here because the
51
+ * entry deliberately stores none.
52
+ */
53
+ export declare function toContainerFontVariants(variants: Typeface[]): FontFamily[];
54
+ /** Variants resolved without a font file carry no width class. */
55
+ export declare function getFontWidthName(fontWidthClass: number | undefined): string;
56
+ /** Variants resolved without a font file carry no outline format. */
57
+ export declare function getFileFormatName(fontOutlinesFormat: FontOutlinesFormat | undefined): string;
58
+ /**
59
+ * Replaces the supported `${token}` placeholders in a text with the given
60
+ * variant's values. Unknown tokens are left literal.
61
+ */
62
+ export declare function resolveTokens(text: string, variant: Typeface): string;
63
+ /**
64
+ * Resolves the supported `${token}` placeholders in every text node of a
65
+ * cloned row against the given variant.
66
+ */
67
+ export declare function resolveTokensInTree(root: HTMLElement, variant: Typeface): void;
68
+ /**
69
+ * Collects the CSS rules of the document that target elements inside the given
70
+ * blocks (the template row and the divider). GrapesJS writes per-block config
71
+ * styles as `#<component-id>` rules (and block-template styles as
72
+ * `.cls-<template-id>` rules) into the page stylesheet; those rules cannot
73
+ * reach the clones inside the component's shadow root, so the matching ones
74
+ * are re-injected next to the clones.
75
+ */
76
+ export declare function collectBlockCssRules(roots: HTMLElement[]): string;
77
+ /**
78
+ * Strips editor-only attributes (GrapesJS type markers, contenteditable) from
79
+ * a cloned row element and all of its descendants so the clone is inert,
80
+ * presentation-only DOM. The slot assignment is removed from the clone's root
81
+ * only, since the clone lives in the shadow DOM instead of a named slot;
82
+ * nested slot assignments (children of inner blocks) stay intact.
83
+ */
84
+ export declare function sanitizeClone(clone: HTMLElement): void;
85
+ export {};
@@ -5,7 +5,7 @@ import { Transformation } from '../../../../../types/src/asset-link-format';
5
5
  import { TeamSpace } from '../../../../../types/src/content-builder';
6
6
  import { ContentType } from '../../../../../types/src/gallery';
7
7
  import { HighlightableElementContentPosition } from '../../../../../types/src/highlightable-element';
8
- import { TemplateResult } from 'lit';
8
+ import { PropertyValues, TemplateResult } from 'lit';
9
9
 
10
10
  /**
11
11
  * @summary Images are wrappers for img elements with built-in lazy loading, skeleton, and fallback support.
@@ -25,7 +25,7 @@ import { TemplateResult } from 'lit';
25
25
  * @cssproperty --border-radius - The border-radius of the image.
26
26
  * @cssproperty --border - The border of the image.
27
27
  *
28
- * @event cx-load - Emitted when the image has loaded.
28
+ * @event cx-load - Emitted on each successful image load, including subsequent srcset candidate loads. May fire multiple times for the same block.
29
29
  * @event cx-error - Emitted when the image has failed to load.
30
30
  * @event cx-image-zoom-open - Emitted when the image zoom is opened.
31
31
  * @event cx-image-zoom-close - Emitted when the image zoom is closed.
@@ -96,6 +96,8 @@ export default class CxSbImage extends CxImage {
96
96
  manualFormat: boolean;
97
97
  /** Whether `formatDarkMode` was picked by hand. See `manualFormat`. */
98
98
  manualFormatDarkMode: boolean;
99
+ /** Saved intrinsic width / height for the dark image. */
100
+ aspectRatioDarkMode: number;
99
101
  /**
100
102
  * Asset transformations applied to the image.
101
103
  */
@@ -154,6 +156,7 @@ export default class CxSbImage extends CxImage {
154
156
  * alt text and overlay content instead.
155
157
  */
156
158
  fetchedAssetData: Record<string, unknown>;
159
+ private renderedImageSrc;
157
160
  /**
158
161
  * Indicates whether the image is currently zoomed.
159
162
  */
@@ -185,14 +188,14 @@ export default class CxSbImage extends CxImage {
185
188
  */
186
189
  private assetFileSize;
187
190
  /**
188
- * Whether an asset fetch has reported back for the current record.
191
+ * The record id the cached extension, file size and proxy width describe.
189
192
  *
190
- * Tracked separately from `assetExtension` because "no extension" is a legitimate
191
- * answer — a missing asset or a record without the field both yield an empty string.
192
- * Gating on the empty string alone would hold `srcset` back forever in those cases;
193
- * gating on this flag releases it as soon as the answer is in, whatever it says.
193
+ * An identity rather than a flag because `currentRecordId` also changes on a theme
194
+ * switch, which alters no watched property: the light record's answer would otherwise
195
+ * stay marked resolved and release `.auto` for the dark record before its own
196
+ * extension lands, flattening a dark animated GIF. Empty until the first answer.
194
197
  */
195
- private hasResolvedAssetExtension;
198
+ private resolvedExtensionRecordId;
196
199
  /**
197
200
  * Space list supplied by `cx-content-builder-viewer`, which fetches it once per
198
201
  * surface. The only source — this block never fetches the list itself.
@@ -218,7 +221,7 @@ export default class CxSbImage extends CxImage {
218
221
  * getters key off this single predicate so alt, recordId, transformations and
219
222
  * click handlers stay aligned with whichever image is actually being displayed.
220
223
  */
221
- private get useDarkVariant();
224
+ get useDarkVariant(): boolean;
222
225
  get currentAltValue(): string;
223
226
  get currentRecordId(): string;
224
227
  get currentSrc(): string;
@@ -232,6 +235,22 @@ export default class CxSbImage extends CxImage {
232
235
  * consumer — the transformation URL and `srcset` alike — reads the same resolved value.
233
236
  */
234
237
  get currentFormat(): string;
238
+ /**
239
+ * Whether the delivery URL may carry the `.auto` marker yet.
240
+ *
241
+ * The marker asks the backend to pick a rendition, and the only thing that can
242
+ * veto that choice is the asset's own extension: an animated GIF served as the
243
+ * original file must keep its stored name or lose the animation. Applying the
244
+ * marker before the extension is known makes that veto unreachable, so an
245
+ * original GIF can be served as a single frame. Waiting costs the stored URL
246
+ * for one render; guessing costs the animation.
247
+ *
248
+ * Gated on the resolved flag rather than a non-empty extension, because "no
249
+ * extension" is a legitimate answer that must still release the marker.
250
+ */
251
+ private get canApplyAutoFormat();
252
+ /** Whether the cached extension describes the record actually being displayed. */
253
+ private get hasResolvedAssetExtension();
235
254
  /**
236
255
  * Fields the child `cx-asset-data-display` must fetch for this block.
237
256
  *
@@ -255,6 +274,7 @@ export default class CxSbImage extends CxImage {
255
274
  image: boolean;
256
275
  'image--hidden': boolean;
257
276
  };
277
+ protected get currentAspectRatio(): number;
258
278
  /**
259
279
  * Whether the image have zoom action.
260
280
  */
@@ -283,6 +303,8 @@ export default class CxSbImage extends CxImage {
283
303
  */
284
304
  handleRecordIdChangeForExtension(): void;
285
305
  handleFetchedAssetDataChange(): void;
306
+ protected update(changedProps: PropertyValues): void;
307
+ protected handleLoad(event: Event): void;
286
308
  /**
287
309
  * Support CMS5 click action for the image.
288
310
  */
@@ -317,6 +339,7 @@ export default class CxSbImage extends CxImage {
317
339
  */
318
340
  private recoverExpiredSources;
319
341
  private recoverExpiredSource;
342
+ private get renderedSrc();
320
343
  protected renderContent(): TemplateResult;
321
344
  render(): TemplateResult;
322
345
  }
@@ -1,8 +1,12 @@
1
1
  import { default as CxCard } from '../../../../../atoms/src/components/card/card.ts';
2
2
  import { default as CxDialog } from '../../../../../atoms/src/components/dialog/dialog.ts';
3
+ import { default as CxDropdown } from '../../../../../atoms/src/components/dropdown/dropdown.ts';
3
4
  import { default as CxGrid } from '../../../../../atoms/src/components/grid/grid.ts';
4
5
  import { default as CxGridItem } from '../../../../../atoms/src/components/grid-item/grid-item.ts';
6
+ import { default as CxIcon } from '../../../../../atoms/src/components/icon/icon.ts';
5
7
  import { default as CxLineClamp } from '../../../../../atoms/src/components/line-clamp/line-clamp.ts';
8
+ import { default as CxMenu } from '../../../../../atoms/src/components/menu/menu.ts';
9
+ import { default as CxMenuItem } from '../../../../../atoms/src/components/menu-item/menu-item.ts';
6
10
  import { default as CxResizeObserver } from '../../../../../atoms/src/components/resize-observer/resize-observer.ts';
7
11
  import { default as CxSpace } from '../../../../../atoms/src/components/space/space.ts';
8
12
  import { default as CxSpinner } from '../../../../../atoms/src/components/spinner/spinner.ts';
@@ -11,6 +15,14 @@ import { default as CortexElement } from '../../../../../base/src/cortex-element
11
15
  import { BlockType } from '../../../../../types/src/content-builder';
12
16
  import { Component } from 'grapesjs';
13
17
 
18
+ type BlockItem = {
19
+ description: string;
20
+ disabled: boolean;
21
+ displayName: string;
22
+ id: string;
23
+ name: string;
24
+ representative: string;
25
+ };
14
26
  export type CxContentBuilderBlockSelectEvent = CustomEvent<{
15
27
  amount?: number;
16
28
  index?: number;
@@ -34,9 +46,13 @@ export default class CxBlockPicker extends CortexElement {
34
46
  static readonly dependencies: {
35
47
  'cx-card': typeof CxCard;
36
48
  'cx-dialog': typeof CxDialog;
49
+ 'cx-dropdown': typeof CxDropdown;
37
50
  'cx-grid': typeof CxGrid;
38
51
  'cx-grid-item': typeof CxGridItem;
52
+ 'cx-icon': typeof CxIcon;
39
53
  'cx-line-clamp': typeof CxLineClamp;
54
+ 'cx-menu': typeof CxMenu;
55
+ 'cx-menu-item': typeof CxMenuItem;
40
56
  'cx-resize-observer': typeof CxResizeObserver;
41
57
  'cx-space': typeof CxSpace;
42
58
  'cx-spinner': typeof CxSpinner;
@@ -52,14 +68,7 @@ export default class CxBlockPicker extends CortexElement {
52
68
  * The `representative` image is displayed in the card.
53
69
  * The `disabled` state indicates whether the block is selectable or not.
54
70
  */
55
- blocks: Array<{
56
- description: string;
57
- disabled: boolean;
58
- displayName: string;
59
- id: string;
60
- name: string;
61
- representative: string;
62
- }>;
71
+ blocks: BlockItem[];
63
72
  /**
64
73
  * The templates available for selection.
65
74
  * Each template should have a unique `id`, a `name`, a `description`, a `representative` image URL, and a `type`.
@@ -120,9 +129,15 @@ export default class CxBlockPicker extends CortexElement {
120
129
  get blockName(): string;
121
130
  private resetState;
122
131
  private handleBlockSelect;
132
+ private handleVariantSelect;
133
+ private handleVariantsMouseEnter;
134
+ private handleVariantsMouseLeave;
135
+ private emitBlockSelect;
123
136
  private handleTemplateSelect;
124
137
  private handleCustomBlockSelect;
125
138
  private handleClose;
139
+ private renderBlockCard;
140
+ private renderBlockCardWithVariants;
126
141
  render(): import('lit').TemplateResult<1>;
127
142
  }
128
143
  declare global {
@@ -134,3 +149,4 @@ declare global {
134
149
  'cx-content-builder-template-select': CxContentBuilderTemplateSelectEvent;
135
150
  }
136
151
  }
152
+ export {};