@orangelogic/design-system 2.104.0 → 2.105.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 (108) hide show
  1. package/library/chunks/{asset.DmOI7fQJ.js → asset.CCjWpDnd.js} +2 -2
  2. package/library/chunks/{button.CAa1kvwe.js → button.B8q9TnbJ.js} +1 -1
  3. package/library/chunks/{color-swatch-group.pyN7NkEj.js → color-swatch-group.mptrPb-B.js} +5 -5
  4. package/library/chunks/{color-swatch.DfJDZHlk.js → color-swatch.Dhk54Nx0.js} +1 -1
  5. package/library/chunks/{confirm-popover.DffsrEEf.js → confirm-popover.DNmZ61WM.js} +3 -3
  6. package/library/chunks/{content-builder.CcgZciZN.js → content-builder.BAhOkdZ-.js} +1 -1
  7. package/library/chunks/{dialog.08JIK4Kd.js → dialog.BlHQ-Sh1.js} +2 -2
  8. package/library/chunks/{dot-pagination.-nDdQxJN.js → dot-pagination.BMlLpcfR.js} +1 -1
  9. package/library/chunks/{file-on-demand.D5xRAZKN.js → file-on-demand.Bi_7NCZZ.js} +8 -8
  10. package/library/chunks/{folder-select.D4haLI38.js → folder-select.CDqz69bO.js} +3 -3
  11. package/library/chunks/{header.BZxyeLPK.js → header.yC7IkgNn.js} +1 -1
  12. package/library/chunks/{i18n.BABe9hN4.js → i18n.DmmFsjwP.js} +7 -1
  13. package/library/chunks/{icon-button.C2s3pHG4.js → icon-button.CHh2iNJJ.js} +1 -1
  14. package/library/chunks/{iframe.DPccxsnE.js → iframe.Dd2ON7ug.js} +1 -1
  15. package/library/chunks/image.CR_LHEaY.js +821 -0
  16. package/library/chunks/{list-editor.CJQ6AEs1.js → list-editor.C-1YI7Bb.js} +10 -10
  17. package/library/chunks/{option.DGXQzdtb.js → option.CdZHtENS.js} +1 -1
  18. package/library/chunks/{pagination.DhtwOCF6.js → pagination.CDCYbCV4.js} +4 -4
  19. package/library/chunks/resizable-component.styles.sAhMVN1H.js +283 -0
  20. package/library/chunks/{responsive.Oz9HWjyQ.js → responsive._tydujAy.js} +1 -1
  21. package/library/chunks/{tab-group.BhCf9Smq.js → tab-group.DtGFedcf.js} +4 -4
  22. package/library/chunks/{table.CRDY_C9O.js → table.kjsxIRt-.js} +5 -5
  23. package/library/chunks/{tree.CJculPt6.js → tree.D__u64uY.js} +1 -1
  24. package/library/chunks/wavesurfer.esm.Cwi1pz64.js +1276 -0
  25. package/library/components/alert.js +2 -2
  26. package/library/components/asset-link-format.js +5 -5
  27. package/library/components/atoms.js +163 -161
  28. package/library/components/audio.d.ts +3 -0
  29. package/library/components/audio.js +237 -0
  30. package/library/components/border-input-group.js +1 -1
  31. package/library/components/breadcrumb.js +1 -1
  32. package/library/components/button.js +2 -2
  33. package/library/components/color-picker.js +2 -2
  34. package/library/components/color-swatch-group.js +6 -6
  35. package/library/components/color-swatch.js +2 -2
  36. package/library/components/confirm-popover.js +4 -4
  37. package/library/components/copy-button.js +1 -1
  38. package/library/components/corner-position-input-group.js +2 -2
  39. package/library/components/details.js +1 -1
  40. package/library/components/dialog.js +3 -3
  41. package/library/components/dot-pagination.js +2 -2
  42. package/library/components/drawer.js +2 -2
  43. package/library/components/dropdown.js +1 -1
  44. package/library/components/dynamic-select.js +4 -4
  45. package/library/components/e-chart.js +1 -1
  46. package/library/components/element-clamp.js +2 -2
  47. package/library/components/file-on-demand.js +9 -9
  48. package/library/components/folder-select.js +3 -3
  49. package/library/components/format-bytes.js +1 -1
  50. package/library/components/format-date.js +1 -1
  51. package/library/components/format-number.js +1 -1
  52. package/library/components/format-time.js +1 -1
  53. package/library/components/header.js +2 -2
  54. package/library/components/icon-button.js +2 -2
  55. package/library/components/iframe.js +2 -2
  56. package/library/components/image-comparer.js +1 -1
  57. package/library/components/image.js +4 -3
  58. package/library/components/input.js +3 -3
  59. package/library/components/line-clamp.js +1 -1
  60. package/library/components/list-editor.js +6 -6
  61. package/library/components/masonry.js +2 -2
  62. package/library/components/menu-item.js +1 -1
  63. package/library/components/menu.js +1 -1
  64. package/library/components/molecules.js +4 -4
  65. package/library/components/option.js +2 -2
  66. package/library/components/organisms.js +2 -2
  67. package/library/components/pagination.js +5 -5
  68. package/library/components/popup.js +1 -1
  69. package/library/components/position-picker.js +1 -1
  70. package/library/components/progress-bar.js +1 -1
  71. package/library/components/progress-ring.js +1 -1
  72. package/library/components/range.js +1 -1
  73. package/library/components/rating.js +1 -1
  74. package/library/components/relative-time.js +1 -1
  75. package/library/components/select.js +2 -2
  76. package/library/components/share-option-list.js +1 -1
  77. package/library/components/sidebar.js +1 -1
  78. package/library/components/size-input-group.js +2 -2
  79. package/library/components/spinner.js +1 -1
  80. package/library/components/split-panel.js +1 -1
  81. package/library/components/tab-group.js +4 -4
  82. package/library/components/tab.js +2 -2
  83. package/library/components/table.js +5 -5
  84. package/library/components/tag.js +2 -2
  85. package/library/components/tooltip.js +1 -1
  86. package/library/components/tree-item.js +2 -2
  87. package/library/components/tree.js +2 -2
  88. package/library/components/typeface.js +2 -2
  89. package/library/components/types.js +15966 -15701
  90. package/library/components/video.js +8 -7
  91. package/library/package.json +1 -1
  92. package/library/packages/atoms/src/components/audio/audio.d.ts +114 -0
  93. package/library/packages/atoms/src/components/audio/audio.styles.d.ts +2 -0
  94. package/library/packages/atoms/src/index.d.ts +1 -0
  95. package/library/packages/organisms/src/asset-transformation-dialog/asset-transformation-dialog.d.ts +4 -0
  96. package/library/packages/organisms/src/content-builder/configs/audio.d.ts +26 -0
  97. package/library/packages/organisms/src/content-builder/configs/index.d.ts +1 -0
  98. package/library/packages/organisms/src/content-builder/configs-controller.d.ts +28 -0
  99. package/library/packages/organisms/src/content-builder/content-builder-config.d.ts +3 -0
  100. package/library/packages/organisms/src/content-builder/plugins/audio.d.ts +5 -0
  101. package/library/packages/organisms/src/content-builder/plugins/index.d.ts +1 -0
  102. package/library/packages/organisms/src/content-builder/styleController.d.ts +1 -1
  103. package/library/packages/types/src/content-builder.d.ts +3 -2
  104. package/library/packages/utils/src/custom-element/i18n.d.ts +6 -0
  105. package/library/react-web-component.d.ts +199 -93
  106. package/library/utils.js +3 -3
  107. package/package.json +1 -1
  108. package/library/chunks/image.DB68R-yp.js +0 -1095
@@ -2,7 +2,7 @@ import { n as s, C as x } from "../chunks/lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as b } from "../chunks/component.styles.CRO4Odto.js";
3
3
  import { s as u, a as p, w as m } from "../chunks/event.BeKOsirN.js";
4
4
  import { c as y } from "../chunks/custom-element.L4WJXn1j.js";
5
- import { L as C } from "../chunks/i18n.BABe9hN4.js";
5
+ import { L as C } from "../chunks/i18n.DmmFsjwP.js";
6
6
  import { H as T } from "../chunks/slot.j5oheLJC.js";
7
7
  import { w } from "../chunks/watch.BCJD77bD.js";
8
8
  import { i as I, x as h } from "../chunks/lit-element.jLBm65_O.js";
@@ -10,7 +10,7 @@ import { r as A } from "../chunks/state.CSDxrqLd.js";
10
10
  import { e as g } from "../chunks/query.BBf1UFkC.js";
11
11
  import { e as v } from "../chunks/class-map.BiVq-cVR.js";
12
12
  import { s as _, g as f } from "../chunks/animation-registry.HmpwNuGH.js";
13
- import { C as H } from "../chunks/icon-button.C2s3pHG4.js";
13
+ import { C as H } from "../chunks/icon-button.CHh2iNJJ.js";
14
14
  const k = I`:host{margin:0;display:contents}.alert{background-color:var(--cx-panel-background-color);border:solid var(--cx-panel-border-width) var(--cx-panel-border-color);border-top-width:calc(var(--cx-panel-border-width) * 3);border-radius:var(--cx-border-radius-small);font-family:var(--cx-font-sans);font-size:var(--cx-font-size-small);font-weight:var(--cx-font-weight-regular);color:var(--cx-color-neutral-700);margin:inherit;align-items:stretch;line-height:1.6;display:flex;position:relative;overflow:hidden}.alert:not(.alert--has-icon) .alert__icon,.alert:not(.alert--closable) .alert__close-button{display:none}.alert__icon{font-size:var(--cx-font-size-large);flex:none;align-items:center;padding-inline-start:var(--cx-spacing-large);display:flex}.alert--has-countdown{border-bottom:none}.alert--primary{border-top-color:var(--cx-color-primary)}.alert--primary .alert__icon{color:var(--cx-color-primary)}.alert--success{border-top-color:var(--cx-color-success)}.alert--success .alert__icon{color:var(--cx-color-success)}.alert--neutral{border-top-color:var(--cx-color-neutral)}.alert--neutral .alert__icon{color:var(--cx-color-neutral)}.alert--warning{border-top-color:var(--cx-color-warning)}.alert--warning .alert__icon{color:var(--cx-color-warning)}.alert--danger{border-top-color:var(--cx-color-danger)}.alert--danger .alert__icon{color:var(--cx-color-danger)}.alert__message{padding:var(--cx-spacing-large);flex:auto;display:block;overflow:hidden}.alert__close-button{font-size:var(--cx-font-size-medium);flex:none;align-items:center;padding-inline-end:var(--cx-spacing-medium);display:flex}.alert__countdown{width:100%;height:calc(var(--cx-panel-border-width) * 3);background-color:var(--cx-panel-border-color);display:flex;position:absolute;bottom:0;left:0}.alert__countdown--ltr{justify-content:flex-end}.alert__countdown .alert__countdown-elapsed{width:0;height:100%}.alert--primary .alert__countdown-elapsed{background-color:var(--cx-color-primary)}.alert--success .alert__countdown-elapsed{background-color:var(--cx-color-success)}.alert--neutral .alert__countdown-elapsed{background-color:var(--cx-color-neutral-600)}.alert--warning .alert__countdown-elapsed{background-color:var(--cx-color-warning)}.alert--danger .alert__countdown-elapsed{background-color:var(--cx-color-danger)}.alert__timer{display:none}`;
15
15
  var z = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, t = (r, o, n, l) => {
16
16
  for (var a = l > 1 ? void 0 : l ? $(o, n) : o, c = r.length - 1, d; c >= 0; c--)
@@ -1,13 +1,13 @@
1
1
  import "../chunks/cropper.Bib8Abm3.js";
2
- import { C as B } from "../chunks/button.CAa1kvwe.js";
2
+ import { C as B } from "../chunks/button.B8q9TnbJ.js";
3
3
  import _ from "./space.js";
4
4
  import { C as F } from "../chunks/typography.DJC_UXgs.js";
5
5
  import { n, C as W } from "../chunks/lib-cortex-element.CVMmyPMC.js";
6
- import { b as rt, c as ht } from "../chunks/asset.DmOI7fQJ.js";
6
+ import { b as rt, c as ht } from "../chunks/asset.CCjWpDnd.js";
7
7
  import { c as E } from "../chunks/component.styles.CRO4Odto.js";
8
8
  import { U as a, T as l } from "../chunks/asset-link-format.BSRDqHg7.js";
9
9
  import { c as N } from "../chunks/custom-element.L4WJXn1j.js";
10
- import { L as U } from "../chunks/i18n.BABe9hN4.js";
10
+ import { L as U } from "../chunks/i18n.DmmFsjwP.js";
11
11
  import { w } from "../chunks/watch.BCJD77bD.js";
12
12
  import { s as et, c as it } from "../chunks/number.B4PQLJIg.js";
13
13
  import { b as G } from "../chunks/transformation.Dir8s_wm.js";
@@ -17,9 +17,9 @@ import { n as k } from "../chunks/when.Dr1es41R.js";
17
17
  import I from "./details.js";
18
18
  import lt from "./divider.js";
19
19
  import L from "./icon.js";
20
- import { C as K } from "../chunks/icon-button.C2s3pHG4.js";
20
+ import { C as K } from "../chunks/icon-button.CHh2iNJJ.js";
21
21
  import J from "./input.js";
22
- import { C as X } from "../chunks/option.DGXQzdtb.js";
22
+ import { C as X } from "../chunks/option.CdZHtENS.js";
23
23
  import Y from "./select.js";
24
24
  import { c as ct } from "../chunks/image.9qwbjGNb.js";
25
25
  import { e as V } from "../chunks/query.BBf1UFkC.js";
@@ -1,87 +1,88 @@
1
1
  import { default as s } from "./alert.js";
2
2
  import { bw as C } from "../chunks/am-chart.H2jnOzFc.js";
3
- import { default as l } from "./animated-image.js";
3
+ import { default as d } from "./animated-image.js";
4
4
  import { a, e as o } from "../chunks/animation.7ifl4x2S.js";
5
5
  import { C as n } from "../chunks/animation.7ifl4x2S.js";
6
6
  import { default as g } from "./array-line-clamp.js";
7
- import { default as b } from "./avatar.js";
8
- import { default as T } from "./badge.js";
9
- import { default as A } from "./breadcrumb.js";
10
- import { default as D } from "./breadcrumb-item.js";
11
- import { C as P } from "../chunks/button.CAa1kvwe.js";
12
- import { default as G } from "./button-group.js";
13
- import { default as h } from "./card.js";
14
- import { default as w } from "./checkbox.js";
15
- import { default as k } from "./color-picker.js";
16
- import { default as E } from "./copy-button.js";
17
- import { default as L } from "./details.js";
18
- import { C as j } from "../chunks/dialog.08JIK4Kd.js";
19
- import { default as z } from "./divider.js";
20
- import { C as q } from "../chunks/dot-pagination.-nDdQxJN.js";
21
- import { default as K } from "./dot-status.js";
22
- import { default as W } from "./drawer.js";
23
- import { default as Y } from "./dropdown.js";
24
- import { default as _ } from "./e-chart.js";
25
- import { default as ee } from "./element-clamp.js";
26
- import { default as oe } from "./format-bytes.js";
27
- import { default as te } from "./format-date.js";
28
- import { default as fe } from "./format-number.js";
29
- import { default as se } from "./format-time.js";
30
- import { default as Ce } from "./grid.js";
31
- import { default as le } from "./grid-item.js";
32
- import { C as ne } from "../chunks/header.BZxyeLPK.js";
33
- import { C as ge } from "../chunks/hub-connection.Ot2odiCz.js";
34
- import { default as be } from "./icon.js";
35
- import { C as Te } from "../chunks/icon-button.C2s3pHG4.js";
36
- import { C as Ae } from "../chunks/iframe.DPccxsnE.js";
37
- import { C as De } from "../chunks/image.DB68R-yp.js";
38
- import { default as Pe } from "./image-comparer.js";
39
- import { default as Ge } from "./include.js";
40
- import { default as he } from "./input.js";
41
- import { default as we } from "./input-group.js";
42
- import { default as ke } from "./line-clamp.js";
43
- import { default as Ee } from "./markdown.js";
44
- import { default as Le } from "./menu.js";
45
- import { default as je } from "./menu-item.js";
46
- import { default as ze } from "./menu-label.js";
47
- import { default as qe } from "./menu-section.js";
48
- import { default as Ke } from "./mutation-observer.js";
49
- import { C as We } from "../chunks/option.DGXQzdtb.js";
50
- import { C as Ye } from "../chunks/pagination.DhtwOCF6.js";
51
- import { default as _e } from "./popup.js";
52
- import { default as ea } from "./progress-bar.js";
53
- import { default as oa } from "./progress-ring.js";
54
- import { default as ta } from "./qr-code.js";
55
- import { default as fa } from "./radio.js";
56
- import { default as sa } from "./radio-button.js";
57
- import { default as Ca } from "./radio-card.js";
58
- import { default as la } from "./radio-group.js";
59
- import { default as na } from "./range.js";
60
- import { default as ga } from "./rating.js";
61
- import { default as ba } from "./relative-time.js";
62
- import { default as Ta } from "./resize-observer.js";
63
- import { default as Aa } from "./select.js";
64
- import { default as Da } from "./skeleton.js";
65
- import { default as Pa } from "./space.js";
66
- import { default as Ga } from "./spinner.js";
67
- import { default as ha } from "./split-panel.js";
68
- import { default as wa } from "./step.js";
69
- import { default as ka } from "./stepper.js";
70
- import { default as Ea } from "./switch.js";
71
- import { default as La } from "./tab.js";
72
- import { C as ja } from "../chunks/tab-group.BhCf9Smq.js";
73
- import { C as za } from "../chunks/table.CRDY_C9O.js";
74
- import { default as qa } from "./tab-panel.js";
75
- import { default as Ka } from "./tag.js";
76
- import { default as Wa } from "./textarea.js";
77
- import { default as Ya } from "./timecode.js";
78
- import { default as _a } from "./tooltip.js";
79
- import { a as eo, C as ao } from "../chunks/tree.CJculPt6.js";
80
- import { C as ro } from "../chunks/typography.DJC_UXgs.js";
81
- import { default as xo } from "./video.js";
82
- import { default as mo } from "./visually-hidden.js";
83
- import { c as po } from "../chunks/component.styles.CRO4Odto.js";
84
- import { g as uo, a as lo, s as no } from "../chunks/animation-registry.HmpwNuGH.js";
7
+ import { default as b } from "./audio.js";
8
+ import { default as T } from "./avatar.js";
9
+ import { default as S } from "./badge.js";
10
+ import { default as D } from "./breadcrumb.js";
11
+ import { default as P } from "./breadcrumb-item.js";
12
+ import { C as G } from "../chunks/button.B8q9TnbJ.js";
13
+ import { default as h } from "./button-group.js";
14
+ import { default as w } from "./card.js";
15
+ import { default as k } from "./checkbox.js";
16
+ import { default as E } from "./color-picker.js";
17
+ import { default as L } from "./copy-button.js";
18
+ import { default as j } from "./details.js";
19
+ import { C as z } from "../chunks/dialog.BlHQ-Sh1.js";
20
+ import { default as q } from "./divider.js";
21
+ import { C as K } from "../chunks/dot-pagination.BMlLpcfR.js";
22
+ import { default as W } from "./dot-status.js";
23
+ import { default as Y } from "./drawer.js";
24
+ import { default as _ } from "./dropdown.js";
25
+ import { default as ee } from "./e-chart.js";
26
+ import { default as oe } from "./element-clamp.js";
27
+ import { default as te } from "./format-bytes.js";
28
+ import { default as fe } from "./format-date.js";
29
+ import { default as se } from "./format-number.js";
30
+ import { default as Ce } from "./format-time.js";
31
+ import { default as de } from "./grid.js";
32
+ import { default as ne } from "./grid-item.js";
33
+ import { C as ge } from "../chunks/header.yC7IkgNn.js";
34
+ import { C as be } from "../chunks/hub-connection.Ot2odiCz.js";
35
+ import { default as Te } from "./icon.js";
36
+ import { C as Se } from "../chunks/icon-button.CHh2iNJJ.js";
37
+ import { C as De } from "../chunks/iframe.Dd2ON7ug.js";
38
+ import { C as Pe } from "../chunks/image.CR_LHEaY.js";
39
+ import { default as Ge } from "./image-comparer.js";
40
+ import { default as he } from "./include.js";
41
+ import { default as we } from "./input.js";
42
+ import { default as ke } from "./input-group.js";
43
+ import { default as Ee } from "./line-clamp.js";
44
+ import { default as Le } from "./markdown.js";
45
+ import { default as je } from "./menu.js";
46
+ import { default as ze } from "./menu-item.js";
47
+ import { default as qe } from "./menu-label.js";
48
+ import { default as Ke } from "./menu-section.js";
49
+ import { default as We } from "./mutation-observer.js";
50
+ import { C as Ye } from "../chunks/option.CdZHtENS.js";
51
+ import { C as _e } from "../chunks/pagination.CDCYbCV4.js";
52
+ import { default as ea } from "./popup.js";
53
+ import { default as oa } from "./progress-bar.js";
54
+ import { default as ta } from "./progress-ring.js";
55
+ import { default as fa } from "./qr-code.js";
56
+ import { default as sa } from "./radio.js";
57
+ import { default as Ca } from "./radio-button.js";
58
+ import { default as da } from "./radio-card.js";
59
+ import { default as na } from "./radio-group.js";
60
+ import { default as ga } from "./range.js";
61
+ import { default as ba } from "./rating.js";
62
+ import { default as Ta } from "./relative-time.js";
63
+ import { default as Sa } from "./resize-observer.js";
64
+ import { default as Da } from "./select.js";
65
+ import { default as Pa } from "./skeleton.js";
66
+ import { default as Ga } from "./space.js";
67
+ import { default as ha } from "./spinner.js";
68
+ import { default as wa } from "./split-panel.js";
69
+ import { default as ka } from "./step.js";
70
+ import { default as Ea } from "./stepper.js";
71
+ import { default as La } from "./switch.js";
72
+ import { default as ja } from "./tab.js";
73
+ import { C as za } from "../chunks/tab-group.DtGFedcf.js";
74
+ import { C as qa } from "../chunks/table.kjsxIRt-.js";
75
+ import { default as Ka } from "./tab-panel.js";
76
+ import { default as Wa } from "./tag.js";
77
+ import { default as Ya } from "./textarea.js";
78
+ import { default as _a } from "./timecode.js";
79
+ import { default as eo } from "./tooltip.js";
80
+ import { a as oo, C as ro } from "../chunks/tree.D__u64uY.js";
81
+ import { C as xo } from "../chunks/typography.DJC_UXgs.js";
82
+ import { default as mo } from "./video.js";
83
+ import { default as po } from "./visually-hidden.js";
84
+ import { c as uo } from "../chunks/component.styles.CRO4Odto.js";
85
+ import { g as no, a as io, s as go } from "../chunks/animation-registry.HmpwNuGH.js";
85
86
  function t() {
86
87
  return Object.entries(a).filter(([e]) => e !== "easings").map(([e]) => e);
87
88
  }
@@ -91,90 +92,91 @@ function x() {
91
92
  export {
92
93
  s as CxAlert,
93
94
  C as CxAmChart,
94
- l as CxAnimatedImage,
95
+ d as CxAnimatedImage,
95
96
  n as CxAnimation,
96
97
  g as CxArrayLineClamp,
97
- b as CxAvatar,
98
- T as CxBadge,
99
- A as CxBreadcrumb,
100
- D as CxBreadcrumbItem,
101
- P as CxButton,
102
- G as CxButtonGroup,
103
- h as CxCard,
104
- w as CxCheckbox,
105
- k as CxColorPicker,
106
- E as CxCopyButton,
107
- L as CxDetails,
108
- j as CxDialog,
109
- z as CxDivider,
110
- q as CxDotPagination,
111
- K as CxDotStatus,
112
- W as CxDrawer,
113
- Y as CxDropdown,
114
- _ as CxEChart,
115
- ee as CxElementClamp,
116
- oe as CxFormatBytes,
117
- te as CxFormatDate,
118
- fe as CxFormatNumber,
119
- se as CxFormatTime,
120
- Ce as CxGrid,
121
- le as CxGridItem,
122
- ne as CxHeader,
123
- ge as CxHubConnection,
124
- be as CxIcon,
125
- Te as CxIconButton,
126
- Ae as CxIframe,
127
- De as CxImage,
128
- Pe as CxImageComparer,
129
- Ge as CxInclude,
130
- he as CxInput,
131
- we as CxInputGroup,
132
- ke as CxLineClamp,
133
- Ee as CxMarkdown,
134
- Le as CxMenu,
135
- je as CxMenuItem,
136
- ze as CxMenuLabel,
137
- qe as CxMenuSection,
138
- Ke as CxMutationObserver,
139
- We as CxOption,
140
- Ye as CxPagination,
141
- _e as CxPopup,
142
- ea as CxProgressBar,
143
- oa as CxProgressRing,
144
- ta as CxQrCode,
145
- fa as CxRadio,
146
- sa as CxRadioButton,
147
- Ca as CxRadioCard,
148
- la as CxRadioGroup,
149
- na as CxRange,
150
- ga as CxRating,
151
- ba as CxRelativeTime,
152
- Ta as CxResizeObserver,
153
- Aa as CxSelect,
154
- Da as CxSkeleton,
155
- Pa as CxSpace,
156
- Ga as CxSpinner,
157
- ha as CxSplitPanel,
158
- wa as CxStep,
159
- ka as CxStepper,
160
- Ea as CxSwitch,
161
- La as CxTab,
162
- ja as CxTabGroup,
163
- qa as CxTabPanel,
164
- za as CxTable,
165
- Ka as CxTag,
166
- Wa as CxTextarea,
167
- Ya as CxTimecode,
168
- _a as CxTooltip,
169
- eo as CxTree,
170
- ao as CxTreeItem,
171
- ro as CxTypography,
172
- xo as CxVideo,
173
- mo as CxVisuallyHidden,
174
- po as componentStyles,
175
- uo as getAnimation,
98
+ b as CxAudio,
99
+ T as CxAvatar,
100
+ S as CxBadge,
101
+ D as CxBreadcrumb,
102
+ P as CxBreadcrumbItem,
103
+ G as CxButton,
104
+ h as CxButtonGroup,
105
+ w as CxCard,
106
+ k as CxCheckbox,
107
+ E as CxColorPicker,
108
+ L as CxCopyButton,
109
+ j as CxDetails,
110
+ z as CxDialog,
111
+ q as CxDivider,
112
+ K as CxDotPagination,
113
+ W as CxDotStatus,
114
+ Y as CxDrawer,
115
+ _ as CxDropdown,
116
+ ee as CxEChart,
117
+ oe as CxElementClamp,
118
+ te as CxFormatBytes,
119
+ fe as CxFormatDate,
120
+ se as CxFormatNumber,
121
+ Ce as CxFormatTime,
122
+ de as CxGrid,
123
+ ne as CxGridItem,
124
+ ge as CxHeader,
125
+ be as CxHubConnection,
126
+ Te as CxIcon,
127
+ Se as CxIconButton,
128
+ De as CxIframe,
129
+ Pe as CxImage,
130
+ Ge as CxImageComparer,
131
+ he as CxInclude,
132
+ we as CxInput,
133
+ ke as CxInputGroup,
134
+ Ee as CxLineClamp,
135
+ Le as CxMarkdown,
136
+ je as CxMenu,
137
+ ze as CxMenuItem,
138
+ qe as CxMenuLabel,
139
+ Ke as CxMenuSection,
140
+ We as CxMutationObserver,
141
+ Ye as CxOption,
142
+ _e as CxPagination,
143
+ ea as CxPopup,
144
+ oa as CxProgressBar,
145
+ ta as CxProgressRing,
146
+ fa as CxQrCode,
147
+ sa as CxRadio,
148
+ Ca as CxRadioButton,
149
+ da as CxRadioCard,
150
+ na as CxRadioGroup,
151
+ ga as CxRange,
152
+ ba as CxRating,
153
+ Ta as CxRelativeTime,
154
+ Sa as CxResizeObserver,
155
+ Da as CxSelect,
156
+ Pa as CxSkeleton,
157
+ Ga as CxSpace,
158
+ ha as CxSpinner,
159
+ wa as CxSplitPanel,
160
+ ka as CxStep,
161
+ Ea as CxStepper,
162
+ La as CxSwitch,
163
+ ja as CxTab,
164
+ za as CxTabGroup,
165
+ Ka as CxTabPanel,
166
+ qa as CxTable,
167
+ Wa as CxTag,
168
+ Ya as CxTextarea,
169
+ _a as CxTimecode,
170
+ eo as CxTooltip,
171
+ oo as CxTree,
172
+ ro as CxTreeItem,
173
+ xo as CxTypography,
174
+ mo as CxVideo,
175
+ po as CxVisuallyHidden,
176
+ uo as componentStyles,
177
+ no as getAnimation,
176
178
  t as getAnimationNames,
177
179
  x as getEasingNames,
178
- lo as setAnimation,
179
- no as setDefaultAnimation
180
+ io as setAnimation,
181
+ go as setDefaultAnimation
180
182
  };
@@ -0,0 +1,3 @@
1
+ export * from '../packages/atoms/src/components/audio/audio'
2
+ import _default from '../packages/atoms/src/components/audio/audio'
3
+ export default _default
@@ -0,0 +1,237 @@
1
+ import { r as m, R as y } from "../chunks/resizable-component.styles.sAhMVN1H.js";
2
+ import { c as v } from "../chunks/component.styles.CRO4Odto.js";
3
+ import { c as g } from "../chunks/custom-element.L4WJXn1j.js";
4
+ import { L as S } from "../chunks/i18n.DmmFsjwP.js";
5
+ import { w as f } from "../chunks/watch.BCJD77bD.js";
6
+ import { i as w, x as p } from "../chunks/lit-element.jLBm65_O.js";
7
+ import { n as c } from "../chunks/lib-cortex-element.CVMmyPMC.js";
8
+ import { r as u } from "../chunks/state.CSDxrqLd.js";
9
+ import { r as x } from "../chunks/query-async.CTgXGyQ5.js";
10
+ import { e as C } from "../chunks/class-map.BiVq-cVR.js";
11
+ import { n as d } from "../chunks/when.Dr1es41R.js";
12
+ import { C as b } from "../chunks/icon-button.CHh2iNJJ.js";
13
+ import { C as W } from "../chunks/typography.DJC_UXgs.js";
14
+ const _ = w`:host{background-color:var(--background-color,var(--cx-color-neutral-0));border-radius:var(--border-radius,0px);border:var(--border,0px);box-sizing:border-box;color:var(--text-color,var(--cx-color-neutral));height:var(--height,auto);width:var(--width,100%);border-style:solid;display:block;position:relative}.audio{border-radius:inherit;gap:var(--cx-spacing-x-small,4px);height:100%;padding:var(--cx-spacing-small,8px);flex-direction:column;justify-content:center;display:flex;overflow:hidden}.audio--empty{height:var(--height,200px);min-height:var(--min-height,100%);padding:0}.audio--empty:before{background-color:var(--cx-color-neutral-1000);color:var(--cx-color-neutral-0);content:attr(data-empty-label);font-family:var(--cx-font-sans);font-size:clamp(var(--cx-font-size-x-small), 4cqw, var(--cx-font-size-large));font-weight:var(--cx-font-weight-semibold);text-align:center;height:100%;text-shadow:.05em .05em .1em var(--cx-color-neutral-1000);justify-content:center;align-items:center;width:100%;line-height:1;display:flex}.audio__play-button{--cx-input-border-width:2px;--cx-input-border-color:var(--text-color,var(--cx-color-neutral))}.audio__play-button::part(base){width:50px;height:50px;color:var(--text-color,var(--cx-color-neutral))!important}.audio__player{align-items:center;gap:var(--cx-spacing-small,8px);display:flex}.audio__waveform{flex:1;min-width:0;overflow:hidden}.audio__footer{font-size:var(--cx-font-size-x-small,11px);color:var(--text-color,var(--cx-color-neutral));flex-direction:column;gap:0;padding-left:2px;display:flex}.audio__time{color:var(--text-color,var(--cx-color-neutral));font-variant-numeric:tabular-nums}.audio__filename{opacity:.75;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}`;
15
+ var P = Object.defineProperty, z = Object.getOwnPropertyDescriptor, n = (e, t, r, o) => {
16
+ for (var i = o > 1 ? void 0 : o ? z(t, r) : t, s = e.length - 1, l; s >= 0; s--)
17
+ (l = e[s]) && (i = (o ? l(t, r, i) : l(i)) || i);
18
+ return o && i && P(t, r, i), i;
19
+ };
20
+ function $(e) {
21
+ const t = "light-dark(";
22
+ if (!e.startsWith(t) || !e.endsWith(")"))
23
+ return null;
24
+ const r = e.slice(t.length, -1);
25
+ let o = 0, i = -1;
26
+ for (let h = 0; h < r.length; h++)
27
+ if (r[h] === "(")
28
+ o++;
29
+ else if (r[h] === ")")
30
+ o--;
31
+ else if (r[h] === "," && o === 0) {
32
+ i = h;
33
+ break;
34
+ }
35
+ if (i === -1)
36
+ return null;
37
+ const s = r.slice(0, i).trim(), l = r.slice(i + 1).trim();
38
+ return !CSS.supports("color", s) || !CSS.supports("color", l) ? null : [s, l];
39
+ }
40
+ let a = class extends y {
41
+ constructor() {
42
+ super(), this.localize = new S(this), this.waveSurfer = null, this.srcLoadVersion = 0, this.src = "", this.name = "", this.autoplay = !1, this.loop = !1, this.waveColor = ["", ""], this.isPlaying = !1, this.isLoaded = !1, this.isError = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0, this.onWaveSurferReady = this.onWaveSurferReady.bind(this), this.onWaveSurferPlay = this.onWaveSurferPlay.bind(this), this.onWaveSurferPause = this.onWaveSurferPause.bind(this), this.onWaveSurferTimeUpdate = this.onWaveSurferTimeUpdate.bind(this), this.onWaveSurferFinish = this.onWaveSurferFinish.bind(this), this.onWaveSurferError = this.onWaveSurferError.bind(this);
43
+ }
44
+ runConnectedCallback() {
45
+ this.hasUpdated && this.requestUpdate("src");
46
+ }
47
+ disconnectedCallback() {
48
+ super.disconnectedCallback(), this.srcLoadVersion++, this.cleanUp();
49
+ }
50
+ async handleSrcChange() {
51
+ await this.applySrc(this.src);
52
+ }
53
+ async applySrc(e) {
54
+ const t = ++this.srcLoadVersion;
55
+ if (this.isLoaded = !1, this.isPlaying = !1, !e) {
56
+ this.cleanUp();
57
+ return;
58
+ }
59
+ await this.waveformContainerAsync, !(t !== this.srcLoadVersion || !this.isConnected) && await this.setupWaveSurfer(e, t);
60
+ }
61
+ async handleWaveColorThemeChange() {
62
+ this.src && this.waveSurfer && (await this.updateComplete, this.waveSurfer.setOptions(this.setupColors()));
63
+ }
64
+ updated(e) {
65
+ super.updated(e), (e.has("width") || e.has("height") || e.has("resizeSize")) && this.handleSizeChange();
66
+ }
67
+ onWaveSurferReady() {
68
+ this.isLoaded = !0, this.durationSeconds = this.waveSurfer.getDuration();
69
+ }
70
+ onWaveSurferPlay() {
71
+ this.isPlaying = !0, this.emit("cx-play");
72
+ }
73
+ onWaveSurferPause() {
74
+ this.isPlaying = !1, this.emit("cx-pause");
75
+ }
76
+ onWaveSurferTimeUpdate(e) {
77
+ this.currentTimeSeconds = e, this.emit("cx-time-update", {
78
+ detail: {
79
+ time: e
80
+ }
81
+ });
82
+ }
83
+ onWaveSurferFinish() {
84
+ this.isPlaying = !1, this.emit("cx-ended");
85
+ }
86
+ onWaveSurferError() {
87
+ this.isError = !0, this.emit("cx-error");
88
+ }
89
+ resolveColorValue(e) {
90
+ if (!e.startsWith("var("))
91
+ return e;
92
+ const t = e.match(/var\(\s*(--[\w-]+)/)?.[1];
93
+ return t && getComputedStyle(this).getPropertyValue(t).trim() || e;
94
+ }
95
+ computeCursorColor(e) {
96
+ const t = document.createElement("canvas");
97
+ t.width = 1, t.height = 1;
98
+ const r = t.getContext("2d");
99
+ if (!r)
100
+ return e;
101
+ r.fillStyle = e, r.fillRect(0, 0, 1, 1);
102
+ const [o, i, s] = r.getImageData(0, 0, 1, 1).data;
103
+ return (0.299 * o + 0.587 * i + 0.114 * s) / 255 > 0.5 ? `rgb(${Math.round(o * 0.5)}, ${Math.round(i * 0.5)}, ${Math.round(s * 0.5)})` : `rgb(${Math.round(o + (255 - o) * 0.5)}, ${Math.round(i + (255 - i) * 0.5)}, ${Math.round(s + (255 - s) * 0.5)})`;
104
+ }
105
+ setupColors() {
106
+ const t = getComputedStyle(this).getPropertyValue("--cx-color-primary").trim(), r = (this.theme === "dark" ? this.waveColor[1] : this.waveColor[0]) || t, o = this.resolveColorValue(r), i = this.resolveColorValue(
107
+ this.theme === "dark" ? this.waveColor[1] : this.waveColor[0]
108
+ ), s = this.computeCursorColor(o);
109
+ return {
110
+ cursorColor: s,
111
+ progressColor: s,
112
+ waveColor: i
113
+ };
114
+ }
115
+ async setupWaveSurfer(e, t = this.srcLoadVersion) {
116
+ this.cleanUp();
117
+ const r = await this.waveformContainerAsync;
118
+ if (t !== this.srcLoadVersion || !r || !e || !this.isConnected)
119
+ return;
120
+ const { default: o } = await import("../chunks/wavesurfer.esm.Cwi1pz64.js");
121
+ t !== this.srcLoadVersion || !this.isConnected || (this.waveSurfer = o.create({
122
+ barGap: 1,
123
+ barRadius: 2,
124
+ barWidth: 2,
125
+ container: r,
126
+ height: "auto",
127
+ normalize: !0,
128
+ url: e,
129
+ ...this.setupColors()
130
+ }), this.attachWaveSurferEvents(), this.autoplay && this.waveSurfer.play());
131
+ }
132
+ attachWaveSurferEvents() {
133
+ this.waveSurfer && (this.waveSurfer.on("ready", this.onWaveSurferReady), this.waveSurfer.on("play", this.onWaveSurferPlay), this.waveSurfer.on("pause", this.onWaveSurferPause), this.waveSurfer.on("timeupdate", this.onWaveSurferTimeUpdate), this.waveSurfer.on("finish", this.onWaveSurferFinish), this.waveSurfer.on("error", this.onWaveSurferError));
134
+ }
135
+ cleanUp() {
136
+ this.waveSurfer && (this.waveSurfer.destroy(), this.waveSurfer = null), this.isLoaded = !1, this.isPlaying = !1, this.currentTimeSeconds = 0, this.durationSeconds = 0;
137
+ }
138
+ handleSizeChange() {
139
+ const e = this.isResizing ? `${this.resizeSize.width}px` : this.width, t = this.isResizing ? `${this.resizeSize.height}px` : this.height;
140
+ this.width || this.isResizing ? this.style.setProperty("--width", e) : this.style.removeProperty("--width"), this.height || this.isResizing ? this.style.setProperty("--height", t) : this.style.removeProperty("--height");
141
+ }
142
+ /** Starts audio playback. */
143
+ play() {
144
+ this.waveSurfer?.play();
145
+ }
146
+ /** Pauses audio playback. */
147
+ pause() {
148
+ this.waveSurfer?.pause();
149
+ }
150
+ /** Toggles between play and pause. */
151
+ togglePlay() {
152
+ this.isPlaying ? this.pause() : this.play();
153
+ }
154
+ formatTime(e) {
155
+ const t = Math.floor(e / 60), r = Math.floor(e % 60);
156
+ return `${t}:${r.toString().padStart(2, "0")}`;
157
+ }
158
+ handlePlayButtonKeyDown(e) {
159
+ (e.key === "Enter" || e.key === " ") && (e.preventDefault(), this.togglePlay());
160
+ }
161
+ render() {
162
+ const e = !this.src, t = this.formatTime(this.currentTimeSeconds), r = this.formatTime(this.durationSeconds);
163
+ return p`<div part="base" class=${C({ audio: !0, "audio--empty": e })} data-empty-label=${this.localize.term("emptyAudio")} @click=${this.startResizing}>${d(
164
+ !e,
165
+ () => p`<div part="player" class="audio__player"><cx-icon-button part="play-button" class="audio__play-button" aria-pressed=${String(this.isPlaying)} circle label=${this.localize.term(this.isPlaying ? "pause" : "play")} name=${this.isPlaying ? "pause" : "play_arrow"} variant="filled" outline @click=${this.togglePlay} @keydown=${this.handlePlayButtonKeyDown}></cx-icon-button><div part="waveform" class="audio__waveform"></div></div><div part="footer" class="audio__footer"><cx-typography part="time" variant="small" class="audio__time">${t} / ${r}</cx-typography>${d(
166
+ this.name,
167
+ () => p`<cx-typography part="filename" class="audio__filename">${this.name}</cx-typography>`
168
+ )}</div>`
169
+ )}</div>${d(this.resizable && this.isResizeActive, () => this.renderResizer())}
170
+ `;
171
+ }
172
+ };
173
+ a.styles = [v, m, _];
174
+ a.dependencies = {
175
+ "cx-icon-button": b,
176
+ "cx-typography": W
177
+ };
178
+ n([
179
+ x(".audio__waveform")
180
+ ], a.prototype, "waveformContainerAsync", 2);
181
+ n([
182
+ c({ reflect: !0, type: String })
183
+ ], a.prototype, "src", 2);
184
+ n([
185
+ c({ reflect: !0, type: String })
186
+ ], a.prototype, "name", 2);
187
+ n([
188
+ c({ reflect: !0, type: Boolean })
189
+ ], a.prototype, "autoplay", 2);
190
+ n([
191
+ c({ reflect: !0, type: Boolean })
192
+ ], a.prototype, "loop", 2);
193
+ n([
194
+ c({
195
+ attribute: "wave-color",
196
+ converter: {
197
+ fromAttribute(e) {
198
+ if (!e)
199
+ return ["", ""];
200
+ const t = $(e);
201
+ return t || (CSS.supports("color", e) ? [e, e] : ["", ""]);
202
+ },
203
+ toAttribute([e, t]) {
204
+ return e === t ? e : `light-dark(${e}, ${t})`;
205
+ }
206
+ },
207
+ reflect: !0
208
+ })
209
+ ], a.prototype, "waveColor", 2);
210
+ n([
211
+ u()
212
+ ], a.prototype, "isPlaying", 2);
213
+ n([
214
+ u()
215
+ ], a.prototype, "isLoaded", 2);
216
+ n([
217
+ u()
218
+ ], a.prototype, "isError", 2);
219
+ n([
220
+ u()
221
+ ], a.prototype, "currentTimeSeconds", 2);
222
+ n([
223
+ u()
224
+ ], a.prototype, "durationSeconds", 2);
225
+ n([
226
+ f("src")
227
+ ], a.prototype, "handleSrcChange", 1);
228
+ n([
229
+ f("theme", { waitUntilFirstUpdate: !0 }),
230
+ f("waveColor", { waitUntilFirstUpdate: !0 })
231
+ ], a.prototype, "handleWaveColorThemeChange", 1);
232
+ a = n([
233
+ g("cx-audio")
234
+ ], a);
235
+ export {
236
+ a as default
237
+ };
@@ -3,7 +3,7 @@ import p from "./space.js";
3
3
  import { n as u, C as m } from "../chunks/lib-cortex-element.CVMmyPMC.js";
4
4
  import { c as h } from "../chunks/component.styles.CRO4Odto.js";
5
5
  import { c as d } from "../chunks/custom-element.L4WJXn1j.js";
6
- import { L as x } from "../chunks/i18n.BABe9hN4.js";
6
+ import { L as x } from "../chunks/i18n.DmmFsjwP.js";
7
7
  import { i as v, x as b } from "../chunks/lit-element.jLBm65_O.js";
8
8
  import f from "./bicolor-picker.js";
9
9
  const g = v`.border-width{width:72px}`;