@vonage/vivid 5.4.0 → 5.5.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 (161) hide show
  1. package/bundled/base-color-picker.cjs +18 -13
  2. package/bundled/base-color-picker.js +98 -81
  3. package/bundled/calendar-picker.template.cjs +1 -1
  4. package/bundled/calendar-picker.template.js +2 -2
  5. package/bundled/char-count.cjs +1 -1
  6. package/bundled/char-count.js +1 -1
  7. package/bundled/definition10.cjs +1 -1
  8. package/bundled/definition10.js +2 -2
  9. package/bundled/definition11.cjs +12 -19
  10. package/bundled/definition11.js +73 -204
  11. package/bundled/definition12.cjs +19 -10
  12. package/bundled/definition12.js +217 -36
  13. package/bundled/definition13.cjs +10 -1
  14. package/bundled/definition13.js +38 -14
  15. package/bundled/definition14.cjs +1 -5
  16. package/bundled/definition14.js +15 -24
  17. package/bundled/definition15.cjs +5 -30
  18. package/bundled/definition15.js +22 -73
  19. package/bundled/definition16.cjs +30 -19
  20. package/bundled/definition16.js +74 -97
  21. package/bundled/definition17.cjs +19 -13
  22. package/bundled/definition17.js +83 -117
  23. package/bundled/definition18.cjs +13 -12
  24. package/bundled/definition18.js +114 -71
  25. package/bundled/definition19.cjs +16 -16
  26. package/bundled/definition19.js +87 -84
  27. package/bundled/definition2.cjs +9 -9
  28. package/bundled/definition2.js +84 -129
  29. package/bundled/definition3.cjs +1 -1
  30. package/bundled/definition3.js +1 -1
  31. package/bundled/listbox.cjs +1 -1
  32. package/bundled/listbox.js +1 -1
  33. package/bundled/localized.cjs +1 -1
  34. package/bundled/localized.js +48 -35
  35. package/bundled/mixins.cjs +1 -1
  36. package/bundled/mixins.js +1 -1
  37. package/bundled/picker-field.template.cjs +14 -14
  38. package/bundled/picker-field.template.js +35 -56
  39. package/bundled/time-selection-picker.template.cjs +12 -12
  40. package/bundled/time-selection-picker.template.js +13 -12
  41. package/bundled/trapped-focus.cjs +1 -0
  42. package/bundled/trapped-focus.js +26 -0
  43. package/bundled/vivid-element.cjs +1 -1
  44. package/bundled/vivid-element.js +1 -1
  45. package/calendar/index.cjs +13 -13
  46. package/calendar/index.js +172 -144
  47. package/color-picker/definition.cjs +208 -112
  48. package/color-picker/definition.js +208 -112
  49. package/color-picker/index.cjs +104 -75
  50. package/color-picker/index.js +412 -326
  51. package/combobox/index.cjs +1 -1
  52. package/combobox/index.js +1 -1
  53. package/contextual-help/index.cjs +1 -1
  54. package/contextual-help/index.js +1 -1
  55. package/custom-elements.json +49 -0
  56. package/data-grid/index.cjs +1 -1
  57. package/data-grid/index.js +1 -1
  58. package/date-picker/index.cjs +1 -1
  59. package/date-picker/index.js +2 -2
  60. package/date-range-picker/index.cjs +1 -1
  61. package/date-range-picker/index.js +2 -2
  62. package/date-time-picker/index.cjs +1 -1
  63. package/date-time-picker/index.js +2 -2
  64. package/dial-pad/definition.cjs +139 -0
  65. package/dial-pad/definition.js +139 -0
  66. package/dial-pad/index.cjs +27 -20
  67. package/dial-pad/index.js +177 -100
  68. package/divider/index.cjs +1 -1
  69. package/divider/index.js +1 -1
  70. package/icon/definition.cjs +56 -22
  71. package/icon/definition.js +56 -22
  72. package/lib/color-picker/color-picker.d.ts +390 -12
  73. package/lib/color-picker/locale.d.ts +4 -0
  74. package/lib/date-picker/date-picker.d.ts +38 -38
  75. package/lib/date-range-picker/date-range-picker.d.ts +20 -20
  76. package/lib/date-time-picker/date-time-picker.d.ts +40 -40
  77. package/lib/dial-pad/dial-pad.d.ts +1 -0
  78. package/lib/icon/icon.d.ts +1 -0
  79. package/lib/simple-color-picker/simple-color-picker.d.ts +2 -1
  80. package/lib/time-picker/time-picker.d.ts +20 -20
  81. package/locales/de-DE.cjs +16 -3
  82. package/locales/de-DE.js +16 -3
  83. package/locales/en-GB.cjs +17 -4
  84. package/locales/en-GB.js +17 -4
  85. package/locales/en-US.cjs +17 -4
  86. package/locales/en-US.js +17 -4
  87. package/locales/ja-JP.cjs +16 -3
  88. package/locales/ja-JP.js +16 -3
  89. package/locales/zh-CN.cjs +15 -2
  90. package/locales/zh-CN.js +15 -2
  91. package/number-field/index.cjs +1 -1
  92. package/number-field/index.js +3 -3
  93. package/option/index.cjs +1 -1
  94. package/option/index.js +1 -1
  95. package/package.json +1 -1
  96. package/progress-ring/index.cjs +1 -1
  97. package/progress-ring/index.js +1 -1
  98. package/radio/index.cjs +1 -1
  99. package/radio/index.js +1 -1
  100. package/radio-group/index.cjs +1 -1
  101. package/radio-group/index.js +1 -1
  102. package/rich-text-editor/index.cjs +1 -1
  103. package/rich-text-editor/index.js +3 -3
  104. package/searchable-select/index.cjs +1 -1
  105. package/searchable-select/index.js +3 -3
  106. package/select/definition.cjs +6 -3
  107. package/select/definition.js +6 -3
  108. package/selectable-box/index.cjs +1 -1
  109. package/selectable-box/index.js +1 -1
  110. package/shared/color-picker/base-color-picker.d.ts +2 -1
  111. package/shared/picker-field/mixins/calendar-picker.d.ts +10 -10
  112. package/shared/picker-field/mixins/calendar-picker.template.d.ts +10 -10
  113. package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +20 -20
  114. package/shared/picker-field/mixins/single-date-picker.d.ts +28 -28
  115. package/shared/picker-field/mixins/single-value-picker.d.ts +8 -8
  116. package/shared/picker-field/mixins/time-selection-picker.d.ts +20 -20
  117. package/shared/picker-field/mixins/time-selection-picker.template.d.ts +20 -20
  118. package/simple-color-picker/definition.cjs +8 -6
  119. package/simple-color-picker/definition.js +8 -6
  120. package/simple-color-picker/index.cjs +6 -6
  121. package/simple-color-picker/index.js +41 -39
  122. package/styles/core/all.css +1 -1
  123. package/styles/core/theme.css +1 -1
  124. package/styles/core/typography.css +1 -1
  125. package/styles/tokens/theme-dark.css +4 -4
  126. package/styles/tokens/theme-light.css +4 -4
  127. package/styles/tokens/vivid-2-compat.css +1 -1
  128. package/tag/definition.cjs +34 -14
  129. package/tag/definition.js +34 -14
  130. package/tag/index.cjs +25 -12
  131. package/tag/index.js +64 -47
  132. package/tag-group/definition.cjs +1 -2
  133. package/tag-group/definition.js +1 -2
  134. package/tag-group/index.cjs +1 -1
  135. package/tag-group/index.js +11 -12
  136. package/text-area/index.cjs +1 -1
  137. package/text-area/index.js +2 -2
  138. package/time-picker/index.cjs +1 -1
  139. package/time-picker/index.js +1 -1
  140. package/toggletip/index.cjs +1 -1
  141. package/toggletip/index.js +1 -1
  142. package/tooltip/definition.cjs +2 -2
  143. package/tooltip/definition.js +2 -2
  144. package/tooltip/index.cjs +1 -1
  145. package/tooltip/index.js +1 -1
  146. package/unbundled/base-color-picker.cjs +36 -18
  147. package/unbundled/base-color-picker.js +36 -18
  148. package/unbundled/calendar-picker.template.cjs +1 -1
  149. package/unbundled/calendar-picker.template.js +1 -1
  150. package/unbundled/picker-field.template.cjs +2 -35
  151. package/unbundled/picker-field.template.js +2 -34
  152. package/unbundled/time-selection-picker.template.cjs +2 -1
  153. package/unbundled/time-selection-picker.template.js +2 -1
  154. package/unbundled/trapped-focus.cjs +37 -0
  155. package/unbundled/trapped-focus.js +34 -0
  156. package/unbundled/vivid-element.cjs +1 -1
  157. package/unbundled/vivid-element.js +1 -1
  158. package/visually-hidden/index.cjs +1 -1
  159. package/visually-hidden/index.js +1 -1
  160. package/bundled/_has.cjs +0 -1
  161. package/bundled/_has.js +0 -34
@@ -1 +1,10 @@
1
- "use strict";const i=require("./vivid-element.cjs"),n=":host{display:contents}slot:not(:focus-within){position:absolute;display:inline;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}";class e extends i.VividElement{}const s=()=>i.html`<slot></slot>`,t=i.defineVividComponent("visually-hidden",e,s,[],{styles:n}),l=i.createRegisterFunction(t);exports.VisuallyHidden=e;exports.registerVisuallyHidden=l;exports.visuallyHiddenDefinition=t;
1
+ "use strict";const l=require("./definition2.cjs"),i=require("./definition17.cjs"),n=require("./vivid-element.cjs"),v=require("./class-names.cjs");var d=Object.defineProperty,u=(o,r,a,x)=>{for(var t=void 0,e=o.length-1,c;e>=0;e--)(c=o[e])&&(t=c(r,a,t)||t);return t&&d(r,a,t),t};class s extends n.VividElement{constructor(){super(...arguments),this.placement="right"}}u([n.attr({mode:"fromView"})],s.prototype,"placement");const f=o=>v.classNames("control"),_=o=>{const r=o.tagFor(i.Toggletip),a=o.tagFor(l.Icon);return n.html`
2
+ <${r} class="base" exportparts="vvd-theme-alternate">
3
+ <button class="${f}" slot="anchor">
4
+ <slot name="icon" slot="icon">
5
+ <${a} name="help-solid"></${a}>
6
+ </slot>
7
+ </button>
8
+ <slot></slot>
9
+ </${r}>
10
+ `},b=".control{--_connotation-color-primary: var(--vvd-button-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-button-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-button-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-contrast: var(--vvd-button-accent-contrast, var(--vvd-color-neutral-800));--_connotation-color-fierce: var(--vvd-button-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-firm: var(--vvd-button-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-soft: var(--vvd-button-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-faint: var(--vvd-button-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-fierce-primary: var(--vvd-button-accent-fierce-primary, var(--vvd-color-canvas-text))}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control{--focus-stroke-gap-color: transparent;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;border:0 none;border-radius:50%;margin:0;background-color:var(--_appearance-color-fill);block-size:var(--_button-block-size, 24px);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);cursor:pointer;padding-inline:calc(var(--_button-block-size, 24px) / 6);vertical-align:middle}@supports (aspect-ratio: auto){.control{padding:0;aspect-ratio:1/1}}.control:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}slot[name=icon]{font-size:var(--_button-icon-size, 16px);line-height:1}",p=n.defineVividComponent("contextual-help",s,_,[l.iconDefinition,i.toggletipDefinition],{styles:b}),m=n.createRegisterFunction(p);exports.contextualHelpDefinition=p;exports.registerContextualHelp=m;
@@ -1,20 +1,44 @@
1
- import { V as i, h as s, c as e, d as t } from "./vivid-element.js";
2
- const n = ":host{display:contents}slot:not(:focus-within){position:absolute;display:inline;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}";
3
- class l extends i {
1
+ import { I as l, i } from "./definition2.js";
2
+ import { T as s, t as p } from "./definition17.js";
3
+ import { V as v, a as d, h as u, c as f, d as _ } from "./vivid-element.js";
4
+ import { c as m } from "./class-names.js";
5
+ var b = Object.defineProperty, x = (o, r, t, w) => {
6
+ for (var a = void 0, n = o.length - 1, e; n >= 0; n--)
7
+ (e = o[n]) && (a = e(r, t, a) || a);
8
+ return a && b(r, t, a), a;
9
+ };
10
+ class c extends v {
11
+ constructor() {
12
+ super(...arguments), this.placement = "right";
13
+ }
4
14
  }
5
- const o = () => s`<slot></slot>`, a = t(
6
- "visually-hidden",
7
- l,
8
- o,
9
- [],
15
+ x([
16
+ d({ mode: "fromView" })
17
+ ], c.prototype, "placement");
18
+ const g = (o) => m("control"), h = (o) => {
19
+ const r = o.tagFor(s), t = o.tagFor(l);
20
+ return u`
21
+ <${r} class="base" exportparts="vvd-theme-alternate">
22
+ <button class="${g}" slot="anchor">
23
+ <slot name="icon" slot="icon">
24
+ <${t} name="help-solid"></${t}>
25
+ </slot>
26
+ </button>
27
+ <slot></slot>
28
+ </${r}>
29
+ `;
30
+ }, y = ".control{--_connotation-color-primary: var(--vvd-button-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-button-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-button-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-contrast: var(--vvd-button-accent-contrast, var(--vvd-color-neutral-800));--_connotation-color-fierce: var(--vvd-button-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-firm: var(--vvd-button-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-soft: var(--vvd-button-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-faint: var(--vvd-button-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-fierce-primary: var(--vvd-button-accent-fierce-primary, var(--vvd-color-canvas-text))}.control{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.control:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.control.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.control:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.control:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.control{--focus-stroke-gap-color: transparent;display:inline-flex;box-sizing:border-box;align-items:center;justify-content:center;border:0 none;border-radius:50%;margin:0;background-color:var(--_appearance-color-fill);block-size:var(--_button-block-size, 24px);box-shadow:inset 0 0 0 1px var(--_appearance-color-outline);color:var(--_appearance-color-text);cursor:pointer;padding-inline:calc(var(--_button-block-size, 24px) / 6);vertical-align:middle}@supports (aspect-ratio: auto){.control{padding:0;aspect-ratio:1/1}}.control:focus-visible{box-shadow:0 0 0 4px color-mix(in srgb,var(--vvd-color-cta-500),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px))}slot[name=icon]{font-size:var(--_button-icon-size, 16px);line-height:1}", k = _(
31
+ "contextual-help",
32
+ c,
33
+ h,
34
+ [i, p],
10
35
  {
11
- styles: n
36
+ styles: y
12
37
  }
13
- ), p = e(
14
- a
38
+ ), H = f(
39
+ k
15
40
  );
16
41
  export {
17
- l as V,
18
- p as r,
19
- a as v
42
+ k as c,
43
+ H as r
20
44
  };
@@ -1,5 +1 @@
1
- "use strict";const o=require("./vivid-element.cjs"),t=require("./divider.cjs"),r=require("./host-semantics.cjs"),n=require("./class-names.cjs"),s=":host{display:block}.base{--_connotation-color-soft: var(--vvd-divider-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-divider-accent-dim, var(--vvd-color-neutral-200))}.base{display:block}.base:not(.vertical){block-size:1px;inline-size:100%}.base.vertical{block-size:100%;inline-size:1px}.base.appearance-ghost{background-color:var(--_connotation-color-dim)}.base.appearance-subtle{background-color:var(--_connotation-color-soft)}",c=({orientation:e,appearance:i})=>n.classNames("base",[`${e}`,!!e],[`appearance-${i}`,!!i]),l=({role:e,orientation:i})=>e===t.DividerRole.presentation?null:i,d=o.html`<template
2
- ${r.applyHostSemantics({role:e=>e.role||t.DividerRole.separator,ariaHidden:!0,ariaOrientation:l})}
3
- >
4
- <span class="${c}"></span
5
- ></template>`,a=o.defineVividComponent("divider",t.Divider,d,[],{styles:s}),v=o.createRegisterFunction(a);exports.dividerDefinition=a;exports.registerDivider=v;
1
+ "use strict";const i=require("./vivid-element.cjs"),n=":host{display:contents}slot:not(:focus-within){position:absolute;display:inline;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}";class e extends i.VividElement{}const s=()=>i.html`<slot></slot>`,t=i.defineVividComponent("visually-hidden",e,s,[],{styles:n}),l=i.createRegisterFunction(t);exports.VisuallyHidden=e;exports.registerVisuallyHidden=l;exports.visuallyHiddenDefinition=t;
@@ -1,29 +1,20 @@
1
- import { h as i, c as t, d as r } from "./vivid-element.js";
2
- import { a as e, D as s } from "./divider.js";
3
- import { a as n } from "./host-semantics.js";
4
- import { c } from "./class-names.js";
5
- const l = ":host{display:block}.base{--_connotation-color-soft: var(--vvd-divider-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-divider-accent-dim, var(--vvd-color-neutral-200))}.base{display:block}.base:not(.vertical){block-size:1px;inline-size:100%}.base.vertical{block-size:100%;inline-size:1px}.base.appearance-ghost{background-color:var(--_connotation-color-dim)}.base.appearance-subtle{background-color:var(--_connotation-color-soft)}", d = ({ orientation: o, appearance: a }) => c(
6
- "base",
7
- [`${o}`, !!o],
8
- [`appearance-${a}`, !!a]
9
- ), v = ({ role: o, orientation: a }) => o === e.presentation ? null : a, p = i`<template
10
- ${n({
11
- role: (o) => o.role || e.separator,
12
- ariaHidden: !0,
13
- ariaOrientation: v
14
- })}
15
- >
16
- <span class="${d}"></span
17
- ></template>`, m = r(
18
- "divider",
19
- s,
20
- p,
1
+ import { V as i, h as s, c as e, d as t } from "./vivid-element.js";
2
+ const n = ":host{display:contents}slot:not(:focus-within){position:absolute;display:inline;overflow:hidden;width:1px;height:1px;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}";
3
+ class l extends i {
4
+ }
5
+ const o = () => s`<slot></slot>`, a = t(
6
+ "visually-hidden",
7
+ l,
8
+ o,
21
9
  [],
22
10
  {
23
- styles: l
11
+ styles: n
24
12
  }
25
- ), k = t(m);
13
+ ), p = e(
14
+ a
15
+ );
26
16
  export {
27
- m as d,
28
- k as r
17
+ l as V,
18
+ p as r,
19
+ a as v
29
20
  };
@@ -1,30 +1,5 @@
1
- "use strict";const e=require("./vivid-element.cjs"),g=require("./base-progress.cjs"),v=require("./delegates-aria.cjs"),c=require("./when.cjs"),m=require("./class-names.cjs"),f=":host{--_vvd-progress-ring-accent-firm-wrapper: var( --vvd-progress-ring-accent-firm );--_vvd-progress-ring-cta-firm-wrapper: var( --vvd-progress-ring-cta-firm );--_vvd-progress-ring-alert-firm-wrapper: var( --vvd-progress-ring-alert-firm );--_vvd-progress-ring-success-firm-wrapper: var( --vvd-progress-ring-success-firm )}.base{--vvd-progress-ring-accent-firm: var( --_vvd-progress-ring-accent-firm-wrapper, var(--vvd-progress-ring-accent-primary) );--vvd-progress-ring-cta-firm: var( --_vvd-progress-ring-cta-firm-wrapper, var(--vvd-progress-ring-cta-primary) );--vvd-progress-ring-alert-firm: var( --_vvd-progress-ring-alert-firm-wrapper, var(--vvd-progress-ring-alert-primary) );--vvd-progress-ring-success-firm: var( --_vvd-progress-ring-success-firm-wrapper, var(--vvd-progress-ring-success-primary) )}.base.connotation-cta{--_connotation-color-firm: var(--vvd-progress-ring-cta-firm, var(--vvd-color-cta-600))}.base.connotation-alert{--_connotation-color-firm: var(--vvd-progress-ring-alert-firm, var(--vvd-color-alert-600))}.base.connotation-success{--_connotation-color-firm: var(--vvd-progress-ring-success-firm, var(--vvd-color-success-600))}.base:not(.connotation-cta,.connotation-alert,.connotation-success){--_connotation-color-firm: var(--vvd-progress-ring-accent-firm, var(--vvd-color-canvas-text))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.size--6{--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)) - (1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))) }.base.size--5{--_size: calc(1px*(20 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--4{--_size: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--3{--_size: calc(1px*(28 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--2{--_size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--1{--_size: calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-1{--_size: calc(1px*(44 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-2{--_size: calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-3{--_size: calc(1px*(52 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-4{--_size: calc(1px*(56 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-5{--_size: calc(1px*(60 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base{align-items:center;block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none}.progress{width:100%;height:100%}.background{fill:none;stroke:transparent;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.indeterminate-indicator-1{animation:spin-infinite 2s linear infinite;fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.base.paused .indeterminate-indicator-1{animation-play-state:paused}@keyframes spin-infinite{0%{stroke-dasharray:.01px 43.97px;transform:rotate(0)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}to{stroke-dasharray:.01px 43.97px;transform:rotate(1080deg)}}";var z=Object.defineProperty,l=(r,a,i,b)=>{for(var s=void 0,t=r.length-1,o;t>=0;t--)(o=r[t])&&(s=o(a,i,s)||s);return s&&z(a,i,s),s};class n extends v.DelegatesAria(g.BaseProgress){}l([e.attr],n.prototype,"connotation");l([e.attr],n.prototype,"size");const x=({connotation:r,size:a,paused:i})=>m.classNames("base",["disabled",!!i],[`connotation-${r}`,!!r],[`size-${a}`,!!a]),p=44,u=e.html`<template>
2
- <div
3
- class="${r=>r.paused?"paused":""} ${x}"
4
- ${v.delegateAria({role:"progressbar",ariaValueNow:r=>r.value,ariaValueMin:r=>r.min,ariaValueMax:r=>r.max})}
5
- >
6
- ${c.when(r=>typeof r.value=="number",e.html`
7
- <svg class="progress" viewBox="0 0 16 16">
8
- <circle class="background" cx="8px" cy="8px" r="7px"></circle>
9
- <circle
10
- class="determinate"
11
- style="stroke-dasharray: ${r=>p*r.percentComplete/100}px ${p}px"
12
- cx="8px"
13
- cy="8px"
14
- r="7px"
15
- ></circle>
16
- </svg>
17
- `)}
18
- ${c.when(r=>typeof r.value!="number",e.html`
19
- <svg class="progress" viewBox="0 0 16 16">
20
- <circle class="background" cx="8px" cy="8px" r="7px"></circle>
21
- <circle
22
- class="indeterminate-indicator-1"
23
- cx="8px"
24
- cy="8px"
25
- r="7px"
26
- ></circle>
27
- </svg>
28
- `)}
29
- </div>
30
- </template>`,d=e.defineVividComponent("progress-ring",n,u,[],{styles:f}),_=e.createRegisterFunction(d);exports.ProgressRing=n;exports.progressRingDefinition=d;exports.registerProgressRing=_;
1
+ "use strict";const o=require("./vivid-element.cjs"),t=require("./divider.cjs"),r=require("./host-semantics.cjs"),n=require("./class-names.cjs"),s=":host{display:block}.base{--_connotation-color-soft: var(--vvd-divider-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-divider-accent-dim, var(--vvd-color-neutral-200))}.base{display:block}.base:not(.vertical){block-size:1px;inline-size:100%}.base.vertical{block-size:100%;inline-size:1px}.base.appearance-ghost{background-color:var(--_connotation-color-dim)}.base.appearance-subtle{background-color:var(--_connotation-color-soft)}",c=({orientation:e,appearance:i})=>n.classNames("base",[`${e}`,!!e],[`appearance-${i}`,!!i]),l=({role:e,orientation:i})=>e===t.DividerRole.presentation?null:i,d=o.html`<template
2
+ ${r.applyHostSemantics({role:e=>e.role||t.DividerRole.separator,ariaHidden:!0,ariaOrientation:l})}
3
+ >
4
+ <span class="${c}"></span
5
+ ></template>`,a=o.defineVividComponent("divider",t.Divider,d,[],{styles:s}),v=o.createRegisterFunction(a);exports.dividerDefinition=a;exports.registerDivider=v;
@@ -1,80 +1,29 @@
1
- import { a as v, h as o, c as d, d as g } from "./vivid-element.js";
2
- import { B as m } from "./base-progress.js";
3
- import { D as f, d as z } from "./delegates-aria.js";
4
- import { w as c } from "./when.js";
5
- import { c as x } from "./class-names.js";
6
- const _ = ":host{--_vvd-progress-ring-accent-firm-wrapper: var( --vvd-progress-ring-accent-firm );--_vvd-progress-ring-cta-firm-wrapper: var( --vvd-progress-ring-cta-firm );--_vvd-progress-ring-alert-firm-wrapper: var( --vvd-progress-ring-alert-firm );--_vvd-progress-ring-success-firm-wrapper: var( --vvd-progress-ring-success-firm )}.base{--vvd-progress-ring-accent-firm: var( --_vvd-progress-ring-accent-firm-wrapper, var(--vvd-progress-ring-accent-primary) );--vvd-progress-ring-cta-firm: var( --_vvd-progress-ring-cta-firm-wrapper, var(--vvd-progress-ring-cta-primary) );--vvd-progress-ring-alert-firm: var( --_vvd-progress-ring-alert-firm-wrapper, var(--vvd-progress-ring-alert-primary) );--vvd-progress-ring-success-firm: var( --_vvd-progress-ring-success-firm-wrapper, var(--vvd-progress-ring-success-primary) )}.base.connotation-cta{--_connotation-color-firm: var(--vvd-progress-ring-cta-firm, var(--vvd-color-cta-600))}.base.connotation-alert{--_connotation-color-firm: var(--vvd-progress-ring-alert-firm, var(--vvd-color-alert-600))}.base.connotation-success{--_connotation-color-firm: var(--vvd-progress-ring-success-firm, var(--vvd-color-success-600))}.base:not(.connotation-cta,.connotation-alert,.connotation-success){--_connotation-color-firm: var(--vvd-progress-ring-accent-firm, var(--vvd-color-canvas-text))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.size--6{--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)) - (1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))) }.base.size--5{--_size: calc(1px*(20 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--4{--_size: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--3{--_size: calc(1px*(28 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--2{--_size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--1{--_size: calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-1{--_size: calc(1px*(44 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-2{--_size: calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-3{--_size: calc(1px*(52 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-4{--_size: calc(1px*(56 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-5{--_size: calc(1px*(60 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base{align-items:center;block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none}.progress{width:100%;height:100%}.background{fill:none;stroke:transparent;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.indeterminate-indicator-1{animation:spin-infinite 2s linear infinite;fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.base.paused .indeterminate-indicator-1{animation-play-state:paused}@keyframes spin-infinite{0%{stroke-dasharray:.01px 43.97px;transform:rotate(0)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}to{stroke-dasharray:.01px 43.97px;transform:rotate(1080deg)}}";
7
- var u = Object.defineProperty, l = (r, a, s, w) => {
8
- for (var e = void 0, i = r.length - 1, t; i >= 0; i--)
9
- (t = r[i]) && (e = t(a, s, e) || e);
10
- return e && u(a, s, e), e;
11
- };
12
- class n extends f(m) {
13
- }
14
- l([
15
- v
16
- ], n.prototype, "connotation");
17
- l([
18
- v
19
- ], n.prototype, "size");
20
- const b = ({ connotation: r, size: a, paused: s }) => x(
1
+ import { h as i, c as t, d as r } from "./vivid-element.js";
2
+ import { a as e, D as s } from "./divider.js";
3
+ import { a as n } from "./host-semantics.js";
4
+ import { c } from "./class-names.js";
5
+ const l = ":host{display:block}.base{--_connotation-color-soft: var(--vvd-divider-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-divider-accent-dim, var(--vvd-color-neutral-200))}.base{display:block}.base:not(.vertical){block-size:1px;inline-size:100%}.base.vertical{block-size:100%;inline-size:1px}.base.appearance-ghost{background-color:var(--_connotation-color-dim)}.base.appearance-subtle{background-color:var(--_connotation-color-soft)}", d = ({ orientation: o, appearance: a }) => c(
21
6
  "base",
22
- ["disabled", !!s],
23
- [`connotation-${r}`, !!r],
24
- [`size-${a}`, !!a]
25
- ), p = 44, y = o`<template>
26
- <div
27
- class="${(r) => r.paused ? "paused" : ""} ${b}"
28
- ${z({
29
- role: "progressbar",
30
- ariaValueNow: (r) => r.value,
31
- ariaValueMin: (r) => r.min,
32
- ariaValueMax: (r) => r.max
7
+ [`${o}`, !!o],
8
+ [`appearance-${a}`, !!a]
9
+ ), v = ({ role: o, orientation: a }) => o === e.presentation ? null : a, p = i`<template
10
+ ${n({
11
+ role: (o) => o.role || e.separator,
12
+ ariaHidden: !0,
13
+ ariaOrientation: v
33
14
  })}
34
- >
35
- ${c(
36
- (r) => typeof r.value == "number",
37
- o`
38
- <svg class="progress" viewBox="0 0 16 16">
39
- <circle class="background" cx="8px" cy="8px" r="7px"></circle>
40
- <circle
41
- class="determinate"
42
- style="stroke-dasharray: ${(r) => p * r.percentComplete / 100}px ${p}px"
43
- cx="8px"
44
- cy="8px"
45
- r="7px"
46
- ></circle>
47
- </svg>
48
- `
49
- )}
50
- ${c(
51
- (r) => typeof r.value != "number",
52
- o`
53
- <svg class="progress" viewBox="0 0 16 16">
54
- <circle class="background" cx="8px" cy="8px" r="7px"></circle>
55
- <circle
56
- class="indeterminate-indicator-1"
57
- cx="8px"
58
- cy="8px"
59
- r="7px"
60
- ></circle>
61
- </svg>
62
- `
63
- )}
64
- </div>
65
- </template>`, k = g(
66
- "progress-ring",
67
- n,
68
- y,
15
+ >
16
+ <span class="${d}"></span
17
+ ></template>`, m = r(
18
+ "divider",
19
+ s,
20
+ p,
69
21
  [],
70
22
  {
71
- styles: _
23
+ styles: l
72
24
  }
73
- ), B = d(
74
- k
75
- );
25
+ ), k = t(m);
76
26
  export {
77
- n as P,
78
- k as p,
79
- B as r
27
+ m as d,
28
+ k as r
80
29
  };
@@ -1,19 +1,30 @@
1
- "use strict";const p=require("./definition9.cjs"),n=require("./vivid-element.cjs"),d=require("./anchored.cjs"),u=require("./localized.cjs"),g=require("./index.cjs"),m=require("./when.cjs"),v=require("./class-names.cjs"),f=":host :host{display:var(--_popup-display, inline)}:host :host([slotted-anchor]){--_popup-display: contents}.content-wrapper{width:var(--toggletip-inline-size, auto);padding:16px;max-inline-size:var(--toggletip-max-inline-size, 30ch)}.headline{margin:0;font:var(--vvd-typography-base-bold)}.action-items{display:flex;justify-content:flex-end;gap:10px}::slotted([slot=action-items]){margin-block-start:16px}";var b=Object.defineProperty,r=(s,e,i,t)=>{for(var o=void 0,l=s.length-1,c;l>=0;l--)(c=s[l])&&(o=c(e,i,o)||o);return o&&b(e,i,o),o};class a extends u.Localized(d.Anchored(n.VividElement)){constructor(){super(...arguments),this.#e=null,this.alternate=!1,this.placement="right",this.open=!1,this.#t=()=>{this.open||n.Updates.enqueue(()=>this.open=!0)},this.#n=e=>{const i=!this.contains(e.target),t=this._anchorEl?.contains(e.target);(i||t)&&(this.open=!1)},this.#o=e=>{e.key==="Escape"&&(this.open=!1)}}#e;openChanged(e,i){e!==void 0&&(i?this.setAttribute("role","status"):this.removeAttribute("role"),this.#i(),this._anchorEl&&this.#s(this._anchorEl))}connectedCallback(){super.connectedCallback(),this.#i()}disconnectedCallback(){super.disconnectedCallback(),this.#i()}_anchorElChanged(e,i){e&&this.#r(e),i&&this.#a(i)}#a(e){e.addEventListener("click",this.#t,!0),this.#e=e.ariaLabel,e.ariaLabel=`${this.locale.toggletip.anchorLabel(e.ariaLabel||"")}`,this.#s(e)}#s(e){e.setAttribute("aria-expanded",this.open.toString()),e.setAttribute("data-expanded",this.open.toString())}#r(e){e.removeEventListener("click",this.#t,!0),e.ariaLabel&&(e.ariaLabel=this.#e),e.removeAttribute("aria-expanded"),e.removeAttribute("data-expanded")}#t;#i(){document.removeEventListener("click",this.#n),document.removeEventListener("keydown",this.#o),this.open&&this.isConnected&&(document.addEventListener("click",this.#n),document.addEventListener("keydown",this.#o))}#n;#o}r([n.attr],a.prototype,"headline");r([n.attr({mode:"boolean"})],a.prototype,"alternate");r([n.attr({mode:"fromView"})],a.prototype,"placement");r([n.attr({mode:"boolean"})],a.prototype,"open");const y=s=>v.classNames("control"),k=s=>{const e=s.tagFor(p.Popup),i=d.anchorSlotTemplateFactory();return n.html`
2
- ${i}
3
- <${e}
4
- @keydown="${(t,{event:o})=>!(t.open&&g.handleEscapeKeyAndStopPropogation(o))}"
5
- class="${y}"
6
- arrow
7
- :anchor="${t=>t._anchorEl}"
8
- :open="${t=>t.open}"
9
- ?alternate="${t=>!t.alternate}"
10
- placement="${t=>t.placement}"
11
- exportparts="vvd-theme-alternate"
12
- >
13
- <div class="content-wrapper">
14
- ${m.when(t=>t.headline,n.html`<h2 class="headline">${t=>t.headline}</h2>`)}
15
- <slot></slot>
16
- <div class="action-items"><slot name="action-items"></slot></div>
17
- </div>
18
- </${e}>
19
- `},h=n.defineVividComponent("toggletip",a,k,[p.popupDefinition],{styles:f}),E=n.createRegisterFunction(h);exports.Toggletip=a;exports.registerToggletip=E;exports.toggletipDefinition=h;
1
+ "use strict";const e=require("./vivid-element.cjs"),g=require("./base-progress.cjs"),v=require("./delegates-aria.cjs"),c=require("./when.cjs"),m=require("./class-names.cjs"),f=":host{--_vvd-progress-ring-accent-firm-wrapper: var( --vvd-progress-ring-accent-firm );--_vvd-progress-ring-cta-firm-wrapper: var( --vvd-progress-ring-cta-firm );--_vvd-progress-ring-alert-firm-wrapper: var( --vvd-progress-ring-alert-firm );--_vvd-progress-ring-success-firm-wrapper: var( --vvd-progress-ring-success-firm )}.base{--vvd-progress-ring-accent-firm: var( --_vvd-progress-ring-accent-firm-wrapper, var(--vvd-progress-ring-accent-primary) );--vvd-progress-ring-cta-firm: var( --_vvd-progress-ring-cta-firm-wrapper, var(--vvd-progress-ring-cta-primary) );--vvd-progress-ring-alert-firm: var( --_vvd-progress-ring-alert-firm-wrapper, var(--vvd-progress-ring-alert-primary) );--vvd-progress-ring-success-firm: var( --_vvd-progress-ring-success-firm-wrapper, var(--vvd-progress-ring-success-primary) )}.base.connotation-cta{--_connotation-color-firm: var(--vvd-progress-ring-cta-firm, var(--vvd-color-cta-600))}.base.connotation-alert{--_connotation-color-firm: var(--vvd-progress-ring-alert-firm, var(--vvd-color-alert-600))}.base.connotation-success{--_connotation-color-firm: var(--vvd-progress-ring-success-firm, var(--vvd-color-success-600))}.base:not(.connotation-cta,.connotation-alert,.connotation-success){--_connotation-color-firm: var(--vvd-progress-ring-accent-firm, var(--vvd-color-canvas-text))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.size--6{--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)) - (1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))) }.base.size--5{--_size: calc(1px*(20 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--4{--_size: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--3{--_size: calc(1px*(28 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--2{--_size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--1{--_size: calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-1{--_size: calc(1px*(44 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-2{--_size: calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-3{--_size: calc(1px*(52 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-4{--_size: calc(1px*(56 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-5{--_size: calc(1px*(60 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base{align-items:center;block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none}.progress{width:100%;height:100%}.background{fill:none;stroke:transparent;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.indeterminate-indicator-1{animation:spin-infinite 2s linear infinite;fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.base.paused .indeterminate-indicator-1{animation-play-state:paused}@keyframes spin-infinite{0%{stroke-dasharray:.01px 43.97px;transform:rotate(0)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}to{stroke-dasharray:.01px 43.97px;transform:rotate(1080deg)}}";var z=Object.defineProperty,l=(r,a,i,b)=>{for(var s=void 0,t=r.length-1,o;t>=0;t--)(o=r[t])&&(s=o(a,i,s)||s);return s&&z(a,i,s),s};class n extends v.DelegatesAria(g.BaseProgress){}l([e.attr],n.prototype,"connotation");l([e.attr],n.prototype,"size");const x=({connotation:r,size:a,paused:i})=>m.classNames("base",["disabled",!!i],[`connotation-${r}`,!!r],[`size-${a}`,!!a]),p=44,u=e.html`<template>
2
+ <div
3
+ class="${r=>r.paused?"paused":""} ${x}"
4
+ ${v.delegateAria({role:"progressbar",ariaValueNow:r=>r.value,ariaValueMin:r=>r.min,ariaValueMax:r=>r.max})}
5
+ >
6
+ ${c.when(r=>typeof r.value=="number",e.html`
7
+ <svg class="progress" viewBox="0 0 16 16">
8
+ <circle class="background" cx="8px" cy="8px" r="7px"></circle>
9
+ <circle
10
+ class="determinate"
11
+ style="stroke-dasharray: ${r=>p*r.percentComplete/100}px ${p}px"
12
+ cx="8px"
13
+ cy="8px"
14
+ r="7px"
15
+ ></circle>
16
+ </svg>
17
+ `)}
18
+ ${c.when(r=>typeof r.value!="number",e.html`
19
+ <svg class="progress" viewBox="0 0 16 16">
20
+ <circle class="background" cx="8px" cy="8px" r="7px"></circle>
21
+ <circle
22
+ class="indeterminate-indicator-1"
23
+ cx="8px"
24
+ cy="8px"
25
+ r="7px"
26
+ ></circle>
27
+ </svg>
28
+ `)}
29
+ </div>
30
+ </template>`,d=e.defineVividComponent("progress-ring",n,u,[],{styles:f}),_=e.createRegisterFunction(d);exports.ProgressRing=n;exports.progressRingDefinition=d;exports.registerProgressRing=_;
@@ -1,103 +1,80 @@
1
- import { P as d, p as h } from "./definition9.js";
2
- import { V as m, U as u, a, h as c, c as f, d as g } from "./vivid-element.js";
3
- import { A as v, a as b } from "./anchored.js";
4
- import { L as y } from "./localized.js";
5
- import { h as k } from "./index.js";
6
- import { w as L } from "./when.js";
7
- import { c as E } from "./class-names.js";
8
- const x = ":host :host{display:var(--_popup-display, inline)}:host :host([slotted-anchor]){--_popup-display: contents}.content-wrapper{width:var(--toggletip-inline-size, auto);padding:16px;max-inline-size:var(--toggletip-max-inline-size, 30ch)}.headline{margin:0;font:var(--vvd-typography-base-bold)}.action-items{display:flex;justify-content:flex-end;gap:10px}::slotted([slot=action-items]){margin-block-start:16px}";
9
- var A = Object.defineProperty, r = (n, e, i, t) => {
10
- for (var o = void 0, l = n.length - 1, p; l >= 0; l--)
11
- (p = n[l]) && (o = p(e, i, o) || o);
12
- return o && A(e, i, o), o;
1
+ import { a as v, h as o, c as d, d as g } from "./vivid-element.js";
2
+ import { B as m } from "./base-progress.js";
3
+ import { D as f, d as z } from "./delegates-aria.js";
4
+ import { w as c } from "./when.js";
5
+ import { c as x } from "./class-names.js";
6
+ const _ = ":host{--_vvd-progress-ring-accent-firm-wrapper: var( --vvd-progress-ring-accent-firm );--_vvd-progress-ring-cta-firm-wrapper: var( --vvd-progress-ring-cta-firm );--_vvd-progress-ring-alert-firm-wrapper: var( --vvd-progress-ring-alert-firm );--_vvd-progress-ring-success-firm-wrapper: var( --vvd-progress-ring-success-firm )}.base{--vvd-progress-ring-accent-firm: var( --_vvd-progress-ring-accent-firm-wrapper, var(--vvd-progress-ring-accent-primary) );--vvd-progress-ring-cta-firm: var( --_vvd-progress-ring-cta-firm-wrapper, var(--vvd-progress-ring-cta-primary) );--vvd-progress-ring-alert-firm: var( --_vvd-progress-ring-alert-firm-wrapper, var(--vvd-progress-ring-alert-primary) );--vvd-progress-ring-success-firm: var( --_vvd-progress-ring-success-firm-wrapper, var(--vvd-progress-ring-success-primary) )}.base.connotation-cta{--_connotation-color-firm: var(--vvd-progress-ring-cta-firm, var(--vvd-color-cta-600))}.base.connotation-alert{--_connotation-color-firm: var(--vvd-progress-ring-alert-firm, var(--vvd-color-alert-600))}.base.connotation-success{--_connotation-color-firm: var(--vvd-progress-ring-success-firm, var(--vvd-color-success-600))}.base:not(.connotation-cta,.connotation-alert,.connotation-success){--_connotation-color-firm: var(--vvd-progress-ring-accent-firm, var(--vvd-color-canvas-text))}.base{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}.base.size--6{--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2)) - (1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2)))) }.base.size--5{--_size: calc(1px*(20 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--4{--_size: calc(1px*(24 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--3{--_size: calc(1px*(28 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--2{--_size: calc(1px*(32 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size--1{--_size: calc(1px*(36 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-1{--_size: calc(1px*(44 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-2{--_size: calc(1px*(48 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-3{--_size: calc(1px*(52 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-4{--_size: calc(1px*(56 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base.size-5{--_size: calc(1px*(60 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base:not(.size--6,.size--5,.size--4,.size--3,.size--2,.size--1,.size-1,.size-2,.size-3,.size-4,.size-5){--_size: calc(1px*(40 + 4*clamp(-1, var(--vvd-size-density, 0), 2))) }.base{align-items:center;block-size:var(--_size);color:var(--_appearance-color-text);inline-size:var(--_size);outline:none}.progress{width:100%;height:100%}.background{fill:none;stroke:transparent;stroke-width:1px}.determinate{fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.indeterminate-indicator-1{animation:spin-infinite 2s linear infinite;fill:none;stroke:currentColor;stroke-linecap:round;stroke-width:1px;transform:rotate(-90deg);transform-origin:50% 50%;transition:all .2s ease-in-out}.base.paused .indeterminate-indicator-1{animation-play-state:paused}@keyframes spin-infinite{0%{stroke-dasharray:.01px 43.97px;transform:rotate(0)}50%{stroke-dasharray:21.99px 21.99px;transform:rotate(450deg)}to{stroke-dasharray:.01px 43.97px;transform:rotate(1080deg)}}";
7
+ var u = Object.defineProperty, l = (r, a, s, w) => {
8
+ for (var e = void 0, i = r.length - 1, t; i >= 0; i--)
9
+ (t = r[i]) && (e = t(a, s, e) || e);
10
+ return e && u(a, s, e), e;
13
11
  };
14
- class s extends y(v(m)) {
15
- constructor() {
16
- super(...arguments), this.#e = null, this.alternate = !1, this.placement = "right", this.open = !1, this.#t = () => {
17
- this.open || u.enqueue(() => this.open = !0);
18
- }, this.#o = (e) => {
19
- const i = !this.contains(e.target), t = this._anchorEl?.contains(e.target);
20
- (i || t) && (this.open = !1);
21
- }, this.#n = (e) => {
22
- e.key === "Escape" && (this.open = !1);
23
- };
24
- }
25
- #e;
26
- openChanged(e, i) {
27
- e !== void 0 && (i ? this.setAttribute("role", "status") : this.removeAttribute("role"), this.#i(), this._anchorEl && this.#s(this._anchorEl));
28
- }
29
- connectedCallback() {
30
- super.connectedCallback(), this.#i();
31
- }
32
- disconnectedCallback() {
33
- super.disconnectedCallback(), this.#i();
34
- }
35
- /**
36
- * @internal
37
- */
38
- _anchorElChanged(e, i) {
39
- e && this.#r(e), i && this.#a(i);
40
- }
41
- #a(e) {
42
- e.addEventListener("click", this.#t, !0), this.#e = e.ariaLabel, e.ariaLabel = `${this.locale.toggletip.anchorLabel(e.ariaLabel || "")}`, this.#s(e);
43
- }
44
- #s(e) {
45
- e.setAttribute("aria-expanded", this.open.toString()), e.setAttribute("data-expanded", this.open.toString());
46
- }
47
- #r(e) {
48
- e.removeEventListener("click", this.#t, !0), e.ariaLabel && (e.ariaLabel = this.#e), e.removeAttribute("aria-expanded"), e.removeAttribute("data-expanded");
49
- }
50
- #t;
51
- #i() {
52
- document.removeEventListener("click", this.#o), document.removeEventListener("keydown", this.#n), this.open && this.isConnected && (document.addEventListener("click", this.#o), document.addEventListener("keydown", this.#n));
53
- }
54
- #o;
55
- #n;
12
+ class n extends f(m) {
56
13
  }
57
- r([
58
- a
59
- ], s.prototype, "headline");
60
- r([
61
- a({ mode: "boolean" })
62
- ], s.prototype, "alternate");
63
- r([
64
- a({ mode: "fromView" })
65
- ], s.prototype, "placement");
66
- r([
67
- a({ mode: "boolean" })
68
- ], s.prototype, "open");
69
- const C = (n) => E("control"), _ = (n) => {
70
- const e = n.tagFor(d), i = b();
71
- return c`
72
- ${i}
73
- <${e}
74
- @keydown="${(t, { event: o }) => !(t.open && k(o))}"
75
- class="${C}"
76
- arrow
77
- :anchor="${(t) => t._anchorEl}"
78
- :open="${(t) => t.open}"
79
- ?alternate="${(t) => !t.alternate}"
80
- placement="${(t) => t.placement}"
81
- exportparts="vvd-theme-alternate"
82
- >
83
- <div class="content-wrapper">
84
- ${L((t) => t.headline, c`<h2 class="headline">${(t) => t.headline}</h2>`)}
85
- <slot></slot>
86
- <div class="action-items"><slot name="action-items"></slot></div>
87
- </div>
88
- </${e}>
89
- `;
90
- }, $ = g(
91
- "toggletip",
92
- s,
93
- _,
94
- [h],
14
+ l([
15
+ v
16
+ ], n.prototype, "connotation");
17
+ l([
18
+ v
19
+ ], n.prototype, "size");
20
+ const b = ({ connotation: r, size: a, paused: s }) => x(
21
+ "base",
22
+ ["disabled", !!s],
23
+ [`connotation-${r}`, !!r],
24
+ [`size-${a}`, !!a]
25
+ ), p = 44, y = o`<template>
26
+ <div
27
+ class="${(r) => r.paused ? "paused" : ""} ${b}"
28
+ ${z({
29
+ role: "progressbar",
30
+ ariaValueNow: (r) => r.value,
31
+ ariaValueMin: (r) => r.min,
32
+ ariaValueMax: (r) => r.max
33
+ })}
34
+ >
35
+ ${c(
36
+ (r) => typeof r.value == "number",
37
+ o`
38
+ <svg class="progress" viewBox="0 0 16 16">
39
+ <circle class="background" cx="8px" cy="8px" r="7px"></circle>
40
+ <circle
41
+ class="determinate"
42
+ style="stroke-dasharray: ${(r) => p * r.percentComplete / 100}px ${p}px"
43
+ cx="8px"
44
+ cy="8px"
45
+ r="7px"
46
+ ></circle>
47
+ </svg>
48
+ `
49
+ )}
50
+ ${c(
51
+ (r) => typeof r.value != "number",
52
+ o`
53
+ <svg class="progress" viewBox="0 0 16 16">
54
+ <circle class="background" cx="8px" cy="8px" r="7px"></circle>
55
+ <circle
56
+ class="indeterminate-indicator-1"
57
+ cx="8px"
58
+ cy="8px"
59
+ r="7px"
60
+ ></circle>
61
+ </svg>
62
+ `
63
+ )}
64
+ </div>
65
+ </template>`, k = g(
66
+ "progress-ring",
67
+ n,
68
+ y,
69
+ [],
95
70
  {
96
- styles: x
71
+ styles: _
97
72
  }
98
- ), j = f($);
73
+ ), B = d(
74
+ k
75
+ );
99
76
  export {
100
- s as T,
101
- j as r,
102
- $ as t
77
+ n as P,
78
+ k as p,
79
+ B as r
103
80
  };