@orangelogic/design-system 2.133.0 → 2.135.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 (232) hide show
  1. package/library/chunks/asset-link-format.BBWyY5fn.js +2627 -0
  2. package/library/chunks/{button.DYoFn504.js → button.3giRMk79.js} +2 -2
  3. package/library/chunks/{checkbox.uH0uF0OV.js → checkbox.B-2O517F.js} +3 -3
  4. package/library/chunks/{table.DuP4v5FN.js → color-swatch-group.DC6vIYo4.js} +3133 -2887
  5. package/library/chunks/{color-swatch.0zyBEfL_.js → color-swatch.g3FPUnxM.js} +2 -2
  6. package/library/chunks/{confirm-popover.DpVYvK20.js → confirm-popover.DtndPsMa.js} +3 -3
  7. package/library/chunks/{dialog.BwBD_hJi.js → dialog.BQq3xBeH.js} +2 -2
  8. package/library/chunks/directive-helpers.DEDMV45_.js +42 -0
  9. package/library/chunks/{document-viewer.BM716ovi.js → document-viewer.BQPJD2lJ.js} +8 -8
  10. package/library/chunks/{dom.BXeuEG1b.js → dom.acWb8KCK.js} +1 -1
  11. package/library/chunks/{dot-pagination.B70lV5Av.js → dot-pagination.DBk9Rz1e.js} +1 -1
  12. package/library/chunks/{endpoints.6E17hFiK.js → endpoints.tU0_RZ_7.js} +4 -4
  13. package/library/chunks/{file-on-demand.D-Ectby2.js → file-on-demand.Bnloo9Ui.js} +12 -12
  14. package/library/chunks/folder-select.DuG4dSPm.js +942 -0
  15. package/library/chunks/{form.3af0bYrm.js → form.K1XOtu3S.js} +1 -1
  16. package/library/chunks/{header.BMGvKrdP.js → header.Bpjw08j7.js} +1 -1
  17. package/library/chunks/{i18n.DoMIwXr2.js → i18n.DJikbkDK.js} +48 -12
  18. package/library/chunks/{icon-button.B-Jf9W3v.js → icon-button.xobY-9OH.js} +1 -1
  19. package/library/chunks/{iframe.Cdv6esyS.js → iframe.BkvxcywO.js} +1 -1
  20. package/library/chunks/{image.SLqIVjqc.js → image.KZRXIthe.js} +241 -229
  21. package/library/chunks/{input.CQNhMu4z.js → input.GUw7x9tK.js} +3 -3
  22. package/library/chunks/{keyed.C0rkKrxH.js → keyed.DdOUTIg-.js} +1 -1
  23. package/library/chunks/{live.SCz6M8Gs.js → live.DCegntDo.js} +1 -1
  24. package/library/chunks/{option.SCVixE2L.js → option.uHye0aDT.js} +1 -1
  25. package/library/chunks/{pagination.BFE6Nk3_.js → pagination.D8Hzwlan.js} +6 -6
  26. package/library/chunks/{ref.bzeTdX0K.js → ref.DktKp7fP.js} +1 -1
  27. package/library/chunks/{repeat.DbF2p5ae.js → repeat.CFjcER6_.js} +1 -1
  28. package/library/chunks/{resizable-component.styles.BVhOesNE.js → resizable-component.styles.CAfXABBc.js} +5 -5
  29. package/library/chunks/{string.CbnVBzsd.js → string.CjJ09HK3.js} +14 -11
  30. package/library/chunks/{tab-group.C-p2Dljr.js → tab-group.0_aOE22R.js} +5 -5
  31. package/library/chunks/toast.Bz-j7zP2.js +109 -0
  32. package/library/chunks/{tree.9PK8ifJd.js → tree.C14rLLol.js} +3 -3
  33. package/library/chunks/url.-WDYqplj.js +42 -0
  34. package/library/components/alert.js +2 -2
  35. package/library/components/asset-link-format.js +16 -2163
  36. package/library/components/atoms.js +49 -51
  37. package/library/components/audio.js +3 -3
  38. package/library/components/border-input-group.js +2 -2
  39. package/library/components/breadcrumb.js +1 -1
  40. package/library/components/button.js +3 -3
  41. package/library/components/checkbox.js +3 -3
  42. package/library/components/color-picker.js +4 -4
  43. package/library/components/color-swatch-group.js +6 -7
  44. package/library/components/color-swatch.js +3 -3
  45. package/library/components/confirm-popover.js +4 -4
  46. package/library/components/copy-button.js +1 -1
  47. package/library/components/corner-position-input-group.js +3 -3
  48. package/library/components/date-calendar.js +2 -2
  49. package/library/components/details.js +1 -1
  50. package/library/components/dialog.js +3 -3
  51. package/library/components/diff.js +1 -1
  52. package/library/components/document-viewer.js +4 -4
  53. package/library/components/dot-pagination.js +2 -2
  54. package/library/components/drawer.js +2 -2
  55. package/library/components/dropdown.js +2 -2
  56. package/library/components/dynamic-select.js +88 -85
  57. package/library/components/e-chart.js +1 -1
  58. package/library/components/element-clamp.js +2 -2
  59. package/library/components/file-on-demand.js +13 -13
  60. package/library/components/folder-select.js +5 -5
  61. package/library/components/format-bytes.js +1 -1
  62. package/library/components/format-date.js +1 -1
  63. package/library/components/format-number.js +1 -1
  64. package/library/components/format-time.js +1 -1
  65. package/library/components/header.js +2 -2
  66. package/library/components/icon-button.js +2 -2
  67. package/library/components/iframe.js +2 -2
  68. package/library/components/image-comparer.js +1 -1
  69. package/library/components/image.js +6 -5
  70. package/library/components/input.js +4 -4
  71. package/library/components/line-clamp.js +1 -1
  72. package/library/components/masonry.js +3 -3
  73. package/library/components/menu-item.js +2 -2
  74. package/library/components/menu.js +1 -1
  75. package/library/components/molecules.js +27 -29
  76. package/library/components/option.js +2 -2
  77. package/library/components/organisms.js +6 -6
  78. package/library/components/padding-input-group.js +2 -2
  79. package/library/components/pagination.js +7 -7
  80. package/library/components/popup.js +1 -1
  81. package/library/components/position-picker.js +1 -1
  82. package/library/components/progress-bar.js +1 -1
  83. package/library/components/progress-ring.js +1 -1
  84. package/library/components/radio-group.js +1 -1
  85. package/library/components/range.js +5 -5
  86. package/library/components/rating.js +2 -2
  87. package/library/components/relative-time.js +1 -1
  88. package/library/components/select.js +10 -7
  89. package/library/components/shadow-input-group.js +2 -2
  90. package/library/components/share-option-list.js +3 -3
  91. package/library/components/sidebar.js +1 -1
  92. package/library/components/size-input-group.js +3 -3
  93. package/library/components/spinner.js +1 -1
  94. package/library/components/split-panel.js +1 -1
  95. package/library/components/stepper-wizard.js +1 -1
  96. package/library/components/switch.js +2 -2
  97. package/library/components/tab-group.js +5 -5
  98. package/library/components/tab.js +2 -2
  99. package/library/components/tag.js +2 -2
  100. package/library/components/textarea.js +2 -2
  101. package/library/components/timecode.js +1 -1
  102. package/library/components/tooltip.js +1 -1
  103. package/library/components/tree-item.js +4 -4
  104. package/library/components/tree.js +2 -2
  105. package/library/components/typeface.js +2 -2
  106. package/library/components/types.js +46083 -43779
  107. package/library/components/video.js +3 -3
  108. package/library/package.json +3 -1
  109. package/library/packages/atoms/src/components/image/image.d.ts +3 -0
  110. package/library/packages/atoms/src/components/select/select.d.ts +6 -0
  111. package/library/packages/atoms/src/components/tab-group/tab-group.d.ts +1 -0
  112. package/library/packages/atoms/src/index.d.ts +0 -1
  113. package/library/packages/events/src/cx-folder-select-selection-seeded.d.ts +6 -0
  114. package/library/packages/events/src/cx-image-src-resolved.d.ts +9 -0
  115. package/library/packages/events/src/cx-pdf-viewer-annotation-draw-mode-change.d.ts +10 -0
  116. package/library/packages/events/src/cx-pdf-viewer-annotation-draw-params-change.d.ts +11 -0
  117. package/library/packages/events/src/cx-pdf-viewer-more-options-select.d.ts +8 -0
  118. package/library/packages/events/src/cx-pdf-viewer-toolbar-annotation-mode-change.d.ts +10 -0
  119. package/library/packages/events/src/cx-pdf-viewer-toolbar-annotation-params-change.d.ts +11 -0
  120. package/library/packages/events/src/cx-pdf-viewer-toolbar-click.d.ts +8 -0
  121. package/library/packages/events/src/cx-pdf-viewer-toolbar-page-change.d.ts +8 -0
  122. package/library/packages/events/src/cx-pdf-viewer-toolbar-scale-change.d.ts +8 -0
  123. package/library/packages/events/src/cx-pdf-viewer-toolbar-view-toggle.d.ts +11 -0
  124. package/library/packages/events/src/cx-pdf-viewer-view-on-asset-toggle.d.ts +11 -0
  125. package/library/packages/events/src/cx-video-src-resolved.d.ts +8 -0
  126. package/library/packages/events/src/events.d.ts +13 -0
  127. package/library/packages/hybrid/table-core/src/index.d.ts +3 -0
  128. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions-dropdown.d.ts +8 -8
  129. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions.d.ts +6 -5
  130. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-dropdown-filter.d.ts +4 -4
  131. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-group-by-dropdown.d.ts +4 -4
  132. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-saved-search-dropdown.d.ts +6 -5
  133. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-toolbar.d.ts +12 -12
  134. package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.d.ts +11 -11
  135. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Clipboard/Clipboard.d.ts +1 -1
  136. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Clipboard/extensions/extensions.d.ts +1 -1
  137. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/History/History.d.ts +1 -1
  138. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/History/extensions/extensions.d.ts +1 -1
  139. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/HoverMenu/HoverMenu.d.ts +1 -1
  140. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/Import/defaults/importers.d.ts +1 -1
  141. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRange/SelectRange.d.ts +4 -4
  142. package/library/packages/hybrid/table-core/src/tabulator-tables/modules/SelectRange/extensions/extensions.d.ts +2 -2
  143. package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +1 -1
  144. package/library/packages/molecules/src/dynamic-select/dynamic-select.d.ts +5 -0
  145. package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +32 -0
  146. package/library/packages/molecules/src/folder-select/folder-select.d.ts +20 -3
  147. package/library/packages/molecules/src/gallery-item/gallery-item.d.ts +5 -0
  148. package/library/packages/molecules/src/index.d.ts +1 -1
  149. package/library/packages/molecules/src/library-index.d.ts +0 -1
  150. package/library/packages/molecules/src/pdf-viewer-toolbar/components/index.d.ts +3 -0
  151. package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-annotation-draw/pdf-viewer-annotation-draw.d.ts +92 -0
  152. package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-more-options/pdf-viewer-more-options.d.ts +43 -0
  153. package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-more-options/pdf-viewer-more-options.styles.d.ts +2 -0
  154. package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-view-on-asset/pdf-viewer-view-on-asset.d.ts +42 -0
  155. package/library/packages/molecules/src/pdf-viewer-toolbar/components/pdf-viewer-view-on-asset/pdf-viewer-view-on-asset.styles.d.ts +2 -0
  156. package/library/packages/molecules/src/pdf-viewer-toolbar/pdf-viewer-toolbar.d.ts +101 -0
  157. package/library/packages/molecules/src/pdf-viewer-toolbar/pdf-viewer-toolbar.styles.d.ts +2 -0
  158. package/library/packages/organisms/src/bento-grid/bento-grid.d.ts +66 -0
  159. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.constants.d.ts +1 -1
  160. package/library/packages/organisms/src/color-swatch-group/color-swatch-group.d.ts +1 -1
  161. package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.constants.d.ts +1 -1
  162. package/library/packages/organisms/src/content-builder/components/color-swatch-picker/color-swatch-picker.d.ts +1 -1
  163. package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +1 -0
  164. package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +2 -9
  165. package/library/packages/organisms/src/content-builder/configs/dam-view.d.ts +1 -7
  166. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +2 -14
  167. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
  168. package/library/packages/organisms/src/dam-custom-toolbar-buttons-editor/dam-custom-toolbar-buttons-editor.d.ts +9 -1
  169. package/library/packages/organisms/src/dashboard-table/dashboard-table.d.ts +1 -1
  170. package/library/packages/organisms/src/index.d.ts +1 -0
  171. package/library/packages/{molecules → organisms}/src/list-editor/list-editor.d.ts +9 -3
  172. package/library/packages/organisms/src/list-editor/list-editor.styles.d.ts +2 -0
  173. package/library/packages/organisms/src/video-chapters-manager/video-chapters-manager.d.ts +1 -1
  174. package/library/packages/services/src/api/folder/folder.types.d.ts +9 -2
  175. package/library/packages/tools/src/fetch-asset/fetch-asset.d.ts +16 -0
  176. package/library/packages/types/src/content-builder.d.ts +1 -1
  177. package/library/packages/types/src/dam-view.d.ts +1 -0
  178. package/library/packages/types/src/folder-select.d.ts +8 -1
  179. package/library/packages/types/src/pdf-viewer-toolbar.d.ts +82 -0
  180. package/library/packages/utils/src/custom-element/i18n.d.ts +43 -7
  181. package/library/packages/utils/src/string/string.d.ts +1 -1
  182. package/library/packages/utils/src/url/url.d.ts +12 -2
  183. package/library/react-web-component.d.ts +514 -913
  184. package/library/utils.js +200 -199
  185. package/package.json +3 -1
  186. package/library/chunks/asset.CcxcYY9d.js +0 -469
  187. package/library/chunks/color-swatch-group.DlTVQ3Ul.js +0 -362
  188. package/library/chunks/directive-helpers.Dm4rc594.js +0 -37
  189. package/library/chunks/folder-select.DHV6f6TA.js +0 -884
  190. package/library/chunks/list-editor.BXY4UIAI.js +0 -1394
  191. package/library/chunks/responsive.Cf65FCWd.js +0 -17
  192. package/library/chunks/toast.D3AW3RWv.js +0 -94
  193. package/library/chunks/url.Cj9cIQXJ.js +0 -27
  194. package/library/components/list-editor.d.ts +0 -3
  195. package/library/components/list-editor.js +0 -33
  196. package/library/components/table.d.ts +0 -3
  197. package/library/components/table.js +0 -84
  198. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/index.d.ts +0 -0
  199. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-footer/table-footer.d.ts +0 -0
  200. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-footer/table-footer.styles.d.ts +0 -0
  201. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-row-actions/table-row-actions.styles.d.ts +0 -0
  202. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/components/table-toolbar/table-toolbar.styles.d.ts +0 -0
  203. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/ajax-facets/ajax-facet-data-controller.d.ts +0 -0
  204. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/ajax-facets/ajax-facet-filter-controller.d.ts +0 -0
  205. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/filter-controller.d.ts +0 -0
  206. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/controllers/select-all-controller.d.ts +0 -0
  207. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-alert.styles.d.ts +0 -0
  208. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-base.styles.d.ts +0 -0
  209. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-calcs.styles.d.ts +0 -0
  210. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-clickable-cell.styles.d.ts +0 -0
  211. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-data-tree.styles.d.ts +0 -0
  212. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-edit.styles.d.ts +0 -0
  213. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-footer.styles.d.ts +0 -0
  214. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-format.styles.d.ts +0 -0
  215. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-group-rows.styles.d.ts +0 -0
  216. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-header.styles.d.ts +0 -0
  217. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-hover-menu.styles.d.ts +0 -0
  218. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-move-rows.styles.d.ts +0 -0
  219. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-page.styles.d.ts +0 -0
  220. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-placeholder.styles.d.ts +0 -0
  221. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-popup.styles.d.ts +0 -0
  222. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-print.styles.d.ts +0 -0
  223. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-resize.styles.d.ts +0 -0
  224. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-responsive-layout.styles.d.ts +0 -0
  225. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-rows.styles.d.ts +0 -0
  226. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-rtl.styles.d.ts +0 -0
  227. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-select-range.styles.d.ts +0 -0
  228. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/styles/table-spreadsheet.styles.d.ts +0 -0
  229. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table-data-loader.d.ts +0 -0
  230. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.styles.d.ts +0 -0
  231. /package/library/packages/{atoms/src/components → hybrid/table-core/src}/table/table.utils.d.ts +0 -0
  232. /package/library/packages/molecules/src/{list-editor/list-editor.styles.d.ts → pdf-viewer-toolbar/components/pdf-viewer-annotation-draw/pdf-viewer-annotation-draw.styles.d.ts} +0 -0
@@ -1,362 +0,0 @@
1
- import z from "../components/space.js";
2
- import { C as $ } from "./table.DuP4v5FN.js";
3
- import { C as k } from "./typography.DJC_UXgs.js";
4
- import { n as h, C as F } from "./lib-cortex-element.CVMmyPMC.js";
5
- import { C, a as g } from "./color-swatch.0zyBEfL_.js";
6
- import { c as A } from "./component.styles.CRO4Odto.js";
7
- import { D as p } from "./content-builder.BGzxZUgi.js";
8
- import { c as S } from "./custom-element.L4WJXn1j.js";
9
- import { d as T } from "./debounce.DaHuiSGU.js";
10
- import { L as E } from "./i18n.DoMIwXr2.js";
11
- import { w as x } from "./watch.CThbualB.js";
12
- import { g as D, a as R } from "./responsive.Cf65FCWd.js";
13
- import { x as l, B as H, i as O } from "./lit-element.jLBm65_O.js";
14
- import { r as d } from "./state.CSDxrqLd.js";
15
- import { e as P } from "./query.BBf1UFkC.js";
16
- import { r as W } from "./query-all.i3PyvTUQ.js";
17
- import { e as w } from "./class-map.BiVq-cVR.js";
18
- import { i as b } from "./guard.D4axKaMo.js";
19
- import { o as M } from "./if-defined.BRoBj_Rp.js";
20
- import { c as G } from "./repeat.DbF2p5ae.js";
21
- import { o as f } from "./style-map.llVFPd__.js";
22
- import { n as L } from "./when.Dr1es41R.js";
23
- var c = /* @__PURE__ */ ((e) => (e.Circles = "circles", e.Grid = "grid", e.Table = "table", e))(c || {});
24
- const y = 165, B = ["HEX", "RGB", "CMYK", "PMS"], I = {
25
- resizable: !1
26
- }, _ = [
27
- {
28
- field: "hex",
29
- formatter: (e) => {
30
- const r = document.createElement("div");
31
- r.style.display = "flex", r.style.alignItems = "center", r.style.justifyContent = "center", r.style.width = "100%", r.style.height = "100%", r.style.userSelect = "none";
32
- const t = document.createElement("div");
33
- return t.style.backgroundColor = e.getValue(), t.style.width = "64px", t.style.height = "32px", t.style.borderRadius = "var(--cx-border-radius-large)", t.style.padding = "0 var(--cx-spacing-medium)", r.appendChild(t), r;
34
- },
35
- headerHozAlign: "center",
36
- headerSort: !1,
37
- hozAlign: "center",
38
- title: "Name",
39
- width: 80
40
- },
41
- {
42
- field: "name",
43
- headerHozAlign: "center",
44
- headerSort: !1,
45
- hozAlign: "left",
46
- widthGrow: 3
47
- },
48
- {
49
- field: "hex",
50
- headerHozAlign: "center",
51
- headerSort: !1,
52
- hozAlign: "center",
53
- minWidth: 130,
54
- title: "Hex"
55
- },
56
- {
57
- field: "rgb",
58
- headerHozAlign: "center",
59
- headerSort: !1,
60
- hozAlign: "center",
61
- minWidth: 130,
62
- title: "RGB"
63
- },
64
- {
65
- field: "cmyk",
66
- headerHozAlign: "center",
67
- headerSort: !1,
68
- hozAlign: "center",
69
- minWidth: 150,
70
- title: "CMYK"
71
- },
72
- {
73
- field: "pms",
74
- headerHozAlign: "center",
75
- headerSort: !1,
76
- hozAlign: "center",
77
- responsive: 0,
78
- title: "PMS",
79
- widthGrow: 2
80
- }
81
- ];
82
- function u(e, r, t) {
83
- const i = r.getValue() ?? "";
84
- if (!i)
85
- return null;
86
- const s = l`<cx-copy-button copy-label=${e.term("clickToCopy")} focus-copy-label=${e.term("pressEnterOrCtrlCToCopy")} hoist label=${`${t}, ${r.getField()} ${e.term("code")} ${i}. ${e.term("clickOrPressCtrlCToCopy")}`} no-icon tooltip-distance="0" value=${i} style=${f({
87
- "--button-background-color": "transparent",
88
- "--button-font-size": "var(--cx-font-size-large)",
89
- "--button-padding": "0",
90
- "max-width": "100%"
91
- })}><span style=${f({
92
- display: "inline-block",
93
- maxWidth: "100%",
94
- overflow: "hidden",
95
- textOverflow: "ellipsis",
96
- verticalAlign: "middle",
97
- whiteSpace: "nowrap"
98
- })}>${i}</span></cx-copy-button>`, n = document.createDocumentFragment();
99
- return H(s, n), n.firstElementChild;
100
- }
101
- const K = (e, r) => [
102
- ..._.slice(0, 2),
103
- {
104
- field: "hex",
105
- formatter: (t) => u(e, t, r),
106
- headerHozAlign: "center",
107
- headerSort: !1,
108
- hozAlign: "center",
109
- minWidth: 130,
110
- title: "Hex"
111
- },
112
- {
113
- field: "rgb",
114
- formatter: (t) => u(e, t, r),
115
- headerHozAlign: "center",
116
- headerSort: !1,
117
- hozAlign: "center",
118
- minWidth: 130,
119
- title: "RGB"
120
- },
121
- {
122
- field: "cmyk",
123
- formatter: (t) => u(e, t, r),
124
- headerHozAlign: "center",
125
- headerSort: !1,
126
- hozAlign: "center",
127
- minWidth: 150,
128
- title: "CMYK"
129
- },
130
- {
131
- field: "pms",
132
- formatter: (t) => u(e, t, r),
133
- headerHozAlign: "center",
134
- headerSort: !1,
135
- hozAlign: "center",
136
- title: "PMS",
137
- widthGrow: 2
138
- }
139
- ], N = O`:host{--grid-gap:var(--cx-spacing-medium);--padding:0;padding:var(--cx-focus-ring-width);width:100%;min-width:0;display:block;overflow:auto}.color-swatch-group__swatches{padding:var(--padding,0);width:100%;max-width:100%;height:100%}.color-swatch-group__table-container{max-width:100%}.color-swatch-group__table-container:focus-visible{outline:var(--cx-focus-ring);outline-offset:var(--cx-focus-ring-offset)}.color-swatch-group__swatches--circles--horizontal>cx-color-swatch:not(:first-child){margin-left:var(--swatch-group-horizontal-gap,-100px)}.color-swatch-group__swatches--circles--vertical>cx-color-swatch:not(:first-child){margin-top:var(--swatch-group-vertical-gap,-50px)}.color-swatch-group__swatches--circles--horizontal__item{--swatch-content-padding:0 min(calc(var(--swatch-group-horizontal-gap,-100px) * -.5), 0) 0 0}.color-swatch-group__swatches--circles--vertical__item{--swatch-content-padding:0 0 min(calc(var(--swatch-group-vertical-gap,-50px) * -.5), 0) 0}.color-swatch-group__swatches--circles--vertical__item--mobile{--swatch-size:100%}.color-swatch-group__swatches--grid{gap:var(--grid-gap,var(--cx-spacing-medium));display:grid}.color-swatch-group__table{--body-background-color:transparent;--row-background-color:transparent;--row-even-background-color:transparent;--row-hover-background-color:var(--cx-color-neutral-50);--row-even-hover-background-color:var(--cx-color-neutral-50);--header-background-color:transparent;--group-row-background-color:transparent;--cell-border-color:transparent;--cell-bottom-border-color:transparent;--header-font-size:var(--cx-font-size-large);--header-font-weight:var(--cx-font-weight-semibold);--header-border-right:none;--cell-font-size:var(--cx-font-size-large);--cell-font-weight:var(--cx-font-weight-regular);--cell-line-height:40px;--cell-hover-background-color:transparent;--placeholder-font-size:var(--cx-font-size-medium-large);--cell-horizontal-padding:var(--cx-spacing-2x-small);--header-horizontal-padding:var(--cx-spacing-2x-small);--header-border-bottom:1px solid var(--cx-color-neutral-200);--hover-menu-background-color:var(--row-hover-background-color);--outer-border-color:transparent}.color-swatch-group__table::part(table){background-color:#0000}`;
140
- var U = Object.defineProperty, j = Object.getOwnPropertyDescriptor, a = (e, r, t, i) => {
141
- for (var s = i > 1 ? void 0 : i ? j(r, t) : r, n = e.length - 1, m; n >= 0; n--)
142
- (m = e[n]) && (s = (i ? m(r, t, s) : m(s)) || s);
143
- return i && s && U(r, t, s), s;
144
- };
145
- const v = "unnamed";
146
- let o = class extends F {
147
- constructor() {
148
- super(), this.localize = new E(this), this.variant = c.Table, this.data = [], this.maxCol = 4, this.canCopy = !1, this.showCodes = ["HEX", "RGB", "CMYK", "PMS"], this.multiLanguage = !1, this.breakpoints = [350, 696, 1024], this.deviceType = p.Desktop, this.currentCol = 0, this.isFocused = !1, this.canFocusContainer = !0, this.isContainerFocused = !1, this.handleWindowResize = this.handleWindowResize.bind(this);
149
- }
150
- runFirstUpdated() {
151
- this.setAttribute("role", "region"), this.setAttribute("aria-label", this.localize.term("colorSwatches")), this.setAttribute(
152
- "aria-roledescription",
153
- this.localize.term("colorSwatches")
154
- ), this.breakpoints = D(this, this.breakpoints), this.handleResize();
155
- }
156
- runConnectedCallback() {
157
- window.addEventListener("resize", this.handleWindowResize);
158
- }
159
- disconnectedCallback() {
160
- super.disconnectedCallback(), window.removeEventListener("resize", this.handleWindowResize);
161
- }
162
- handleWindowResize() {
163
- this.handleResize();
164
- }
165
- handleResize() {
166
- const e = window.innerWidth;
167
- switch (this.variant) {
168
- case c.Grid: {
169
- const r = Number.parseFloat(
170
- getComputedStyle(this.containerEl).getPropertyValue("--grid-gap")
171
- );
172
- this.currentCol = Math.floor(
173
- (e + r) / (y + r)
174
- );
175
- break;
176
- }
177
- case c.Circles: {
178
- this.deviceType = R(this.breakpoints);
179
- break;
180
- }
181
- }
182
- }
183
- handleKeyDown(e) {
184
- !(e.target instanceof C) && !e.target?.closest(
185
- "[data-table-container]"
186
- ) || (e.key === "Enter" || e.key === " ") && (this.isFocused = !0);
187
- }
188
- handleFocusIn() {
189
- this.isContainerFocused = !0;
190
- }
191
- handleFocusOut(e) {
192
- this.isContainerFocused = !1, requestAnimationFrame(() => {
193
- (e.target === this || !this.shadowRoot?.activeElement) && (this.isFocused = !1);
194
- });
195
- }
196
- /**
197
- * Filter out the columns that are not in the showCodes
198
- */
199
- getTableColumns(e) {
200
- const r = this.canCopy ? K(this.localize, e) : _;
201
- return [
202
- ...r.slice(0, 2),
203
- ...r.slice(2).filter(
204
- (t) => this.showCodes.includes(t.field.toUpperCase())
205
- )
206
- ];
207
- }
208
- /**
209
- * Categorize the color swatches by palette
210
- */
211
- categorizeByPalette() {
212
- return Object.values(
213
- this.data.reduce((e, r) => {
214
- const t = r.palette?.trim() ? r.palette : v;
215
- return e[t] || (e[t] = { colors: [], palette: t }), e[t].colors.push(r), e;
216
- }, {})
217
- );
218
- }
219
- handleIsFocusedChange() {
220
- if (this.isFocused)
221
- for (const e of this.tableEls)
222
- e.removeAttribute("tabindex");
223
- else
224
- for (const e of this.tableEls)
225
- e.setAttribute("tabindex", "-1");
226
- this.isContainerFocused || (this.canFocusContainer = !this.isFocused);
227
- }
228
- /**
229
- * Get current direction of the color swatch group
230
- */
231
- get currentDirection() {
232
- return this.variant === c.Circles && this.deviceType !== p.Desktop ? "vertical" : "horizontal";
233
- }
234
- /**
235
- * Get the variant of the color swatch
236
- */
237
- get swatchVariant() {
238
- switch (this.variant) {
239
- case c.Circles:
240
- return this.deviceType === p.Tablet ? g.Oval : g.Circle;
241
- case c.Grid:
242
- return g.GridItem;
243
- default:
244
- return;
245
- }
246
- }
247
- render() {
248
- const e = this.currentDirection, r = this.localize.lang();
249
- return l`
250
- ${L(
251
- this.variant === c.Table,
252
- () => l`<cx-space class="color-swatch-group__swatches" direction="vertical" spacing="2x-small">${b(
253
- [this.data, this.canCopy],
254
- () => this.categorizeByPalette().map(
255
- (t) => {
256
- const i = this.multiLanguage && r ? t.colors.map((s) => ({
257
- ...s,
258
- name: s[`name-${r.toLowerCase()}`] ?? s.name
259
- })) : t.colors;
260
- return l`<div tabindex=${M(
261
- this.canFocusContainer ? "0" : void 0
262
- )} data-table-container class="color-swatch-group__table-container" @focusin=${this.handleFocusIn} @focusout=${this.handleFocusOut} @keydown=${this.handleKeyDown}><cx-typography variant="h3">${t.palette === v ? this.localize.term("noPalette") : this.localize.term("shadesPalette", t.palette)}</cx-typography><cx-table part="table" tabindex=${this.isFocused ? void 0 : "-1"} no-selectable layout="fitColumns" .columns=${b(
263
- [this.showCodes, this.canCopy, this.localize],
264
- () => this.getTableColumns(t.palette)
265
- )} .columnDefaults=${I} .rowHeight=${48} .data=${i} class="color-swatch-group__table"></cx-table></div>`;
266
- }
267
- )
268
- )}</cx-space>`,
269
- () => l`<cx-space part="color-swatch" role="list" aria-label=${this.localize.term("listOfColors")} aria-roledescription=${this.localize.term("listOfColors")} direction=${e} justify-content="flex-start" wrap=${this.variant === "circles" ? "nowrap" : "wrap"} class=${w({
270
- "color-swatch-group__swatches": !0,
271
- "color-swatch-group__swatches--grid": this.variant === c.Grid,
272
- [`color-swatch-group__swatches--circles--${e}`]: this.variant === c.Circles
273
- })} style=${f({
274
- gridTemplateColumns: this.currentCol >= this.maxCol ? `repeat(${this.maxCol}, 1fr)` : `repeat(auto-fit, minmax(${y}px, 1fr))`
275
- })}>${G(
276
- this.data,
277
- (t) => t.name,
278
- (t, i) => l`<cx-color-swatch part="color-swatch-item" role="listitem" aria-label=${this.localize.term(
279
- "colorOfTotal",
280
- i + 1,
281
- this.data.length
282
- )} hex=${t.hex} rgb=${t.rgb} cmyk=${t.cmyk} pms=${t.pms} name=${this.multiLanguage && r ? t[`name-${r.toLowerCase()}`] ?? t.name : t.name} variant=${this.swatchVariant} ?can-copy=${this.canCopy} ?can-focus-code-only=${this.isFocused} .showCodes=${this.showCodes} no-auto-convert class=${w({
283
- [`color-swatch-group__swatches--circles--${e}__item`]: this.variant === c.Circles,
284
- "color-swatch-group__swatches--circles--vertical__item--mobile": this.variant === c.Circles && this.deviceType === p.Mobile
285
- })} @keydown=${this.handleKeyDown} @focusout=${this.handleFocusOut}></cx-color-swatch>`
286
- )}</cx-space>`
287
- )}
288
- `;
289
- }
290
- };
291
- o.styles = [A, N];
292
- o.dependencies = {
293
- "cx-color-swatch": C,
294
- "cx-space": z,
295
- "cx-table": $,
296
- "cx-typography": k
297
- };
298
- a([
299
- P(".color-swatch-group__swatches")
300
- ], o.prototype, "containerEl", 2);
301
- a([
302
- W("cx-table")
303
- ], o.prototype, "tableEls", 2);
304
- a([
305
- h({ reflect: !0, type: String })
306
- ], o.prototype, "variant", 2);
307
- a([
308
- h({ reflect: !0, type: Array })
309
- ], o.prototype, "data", 2);
310
- a([
311
- h({ attribute: "max-col", reflect: !0, type: Number })
312
- ], o.prototype, "maxCol", 2);
313
- a([
314
- h({ attribute: "can-copy", reflect: !0, type: Boolean })
315
- ], o.prototype, "canCopy", 2);
316
- a([
317
- h({
318
- attribute: "show-codes",
319
- converter: {
320
- fromAttribute: (e) => (e?.split(" ") ?? []).filter((t) => B.includes(t)),
321
- toAttribute: (e) => e.join(" ")
322
- },
323
- reflect: !0
324
- })
325
- ], o.prototype, "showCodes", 2);
326
- a([
327
- h({ attribute: "multi-language", reflect: !0, type: Boolean })
328
- ], o.prototype, "multiLanguage", 2);
329
- a([
330
- d()
331
- ], o.prototype, "breakpoints", 2);
332
- a([
333
- d()
334
- ], o.prototype, "deviceType", 2);
335
- a([
336
- d()
337
- ], o.prototype, "currentCol", 2);
338
- a([
339
- d()
340
- ], o.prototype, "isFocused", 2);
341
- a([
342
- d()
343
- ], o.prototype, "canFocusContainer", 2);
344
- a([
345
- d()
346
- ], o.prototype, "isContainerFocused", 2);
347
- a([
348
- T(100)
349
- ], o.prototype, "handleWindowResize", 1);
350
- a([
351
- x("variant", { waitUntilFirstUpdate: !0 })
352
- ], o.prototype, "handleResize", 1);
353
- a([
354
- x("isFocused", { waitUntilFirstUpdate: !0 })
355
- ], o.prototype, "handleIsFocusedChange", 1);
356
- o = a([
357
- S("cx-color-swatch-group")
358
- ], o);
359
- export {
360
- o as C,
361
- c as a
362
- };
@@ -1,37 +0,0 @@
1
- import { Z as d } from "./lit-element.jLBm65_O.js";
2
- /**
3
- * @license
4
- * Copyright 2020 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- const { I: c } = d, v = (e) => e.strings === void 0, f = () => document.createComment(""), p = (e, i, t) => {
8
- const s = e._$AA.parentNode, $ = i === void 0 ? e._$AB : i._$AA;
9
- if (t === void 0) {
10
- const r = s.insertBefore(f(), $), _ = s.insertBefore(f(), $);
11
- t = new c(r, _, e, e.options);
12
- } else {
13
- const r = t._$AB.nextSibling, _ = t._$AM, o = _ !== e;
14
- if (o) {
15
- let A;
16
- t._$AQ?.(e), t._$AM = e, t._$AP !== void 0 && (A = e._$AU) !== _._$AU && t._$AP(A);
17
- }
18
- if (r !== $ || o) {
19
- let A = t._$AA;
20
- for (; A !== r; ) {
21
- const n = A.nextSibling;
22
- s.insertBefore(A, $), A = n;
23
- }
24
- }
25
- }
26
- return t;
27
- }, B = (e, i, t = e) => (e._$AI(i, t), e), m = {}, a = (e, i = m) => e._$AH = i, g = (e) => e._$AH, u = (e) => {
28
- e._$AR(), e._$AA.remove();
29
- };
30
- export {
31
- u as M,
32
- v as f,
33
- a as m,
34
- g as p,
35
- p as s,
36
- B as v
37
- };