@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
package/calendar/index.js CHANGED
@@ -1,18 +1,74 @@
1
- import { V as $, U as q, a as h, h as s, c as z, d as H } from "../bundled/vivid-element.js";
2
- import { S as R } from "../bundled/enums.js";
3
- import { C as T } from "../bundled/calendar-event.js";
4
- import { _ as f, a as c, b as M } from "../bundled/_has.js";
1
+ import { V as q, U as z, a as m, h as c, c as H, d as R } from "../bundled/vivid-element.js";
2
+ import { S as T } from "../bundled/enums.js";
3
+ import { C as M } from "../bundled/calendar-event.js";
5
4
  import { r as g } from "../bundled/repeat.js";
6
5
  import { c as F } from "../bundled/class-names.js";
7
- const N = Array.isArray || function(e) {
6
+ const N = ':host{display:block;overflow:auto;block-size:inherit;max-block-size:inherit}ol{padding:0;margin:0;list-style:none}[role=grid i]{position:relative;z-index:0;display:grid;margin:auto;grid-template-areas:"filler column-headers" "row-headers calendar";grid-template-columns:min-content auto;inline-size:max(100%,500px);min-inline-size:880px}.row-headers{display:grid;grid-area:row-headers;grid-template-rows:repeat(24,1fr);margin-inline-end:2px}.row-headers>[role=rowheader i]{display:flex;align-items:flex-end;justify-content:flex-end}.row-headers>[role=rowheader i]>time{font:var(--vvd-typography-base-condensed);font-size:small;line-height:1;text-transform:uppercase;white-space:nowrap}.sticky-column .row-headers,.sticky-all .row-headers{position:sticky;z-index:1;background-color:var(--calendar-column-background-color, var(--vvd-color-canvas));inset-inline-start:0;margin-inline-end:3px}.calendar-row{display:contents}.calendar-grid-presentation{display:grid;overflow:hidden;border-radius:8px;background:var(--vvd-color-surface-2dp);counter-reset:listing;filter:var(--vvd-shadow-surface-2dp);gap:1px;grid-area:calendar;grid-auto-flow:column;grid-template:repeat(24,1fr)/repeat(7,1fr)}.hours{display:contents}.hours>[role=listitem i]{position:relative;grid-column:1/8;grid-row:var(--row);min-block-size:calc(1px*(48 + 4*clamp(-1,var(--vvd-size-density, 0),2)));pointer-events:none}.hours>[role=listitem i]:not(:first-child):after{position:absolute;border-block-end:var(--vvd-color-neutral-100) 1px solid;content:"";inline-size:100%;margin-block-start:-1px}.hours>[role=listitem i]:nth-child(24n+1){--row: 1}.hours>[role=listitem i]:nth-child(24n+2){--row: 2}.hours>[role=listitem i]:nth-child(24n+3){--row: 3}.hours>[role=listitem i]:nth-child(24n+4){--row: 4}.hours>[role=listitem i]:nth-child(24n+5){--row: 5}.hours>[role=listitem i]:nth-child(24n+6){--row: 6}.hours>[role=listitem i]:nth-child(24n+7){--row: 7}.hours>[role=listitem i]:nth-child(24n+8){--row: 8}.hours>[role=listitem i]:nth-child(24n+9){--row: 9}.hours>[role=listitem i]:nth-child(24n+10){--row: 10}.hours>[role=listitem i]:nth-child(24n+11){--row: 11}.hours>[role=listitem i]:nth-child(24n+12){--row: 12}.hours>[role=listitem i]:nth-child(24n+13){--row: 13}.hours>[role=listitem i]:nth-child(24n+14){--row: 14}.hours>[role=listitem i]:nth-child(24n+15){--row: 15}.hours>[role=listitem i]:nth-child(24n+16){--row: 16}.hours>[role=listitem i]:nth-child(24n+17){--row: 17}.hours>[role=listitem i]:nth-child(24n+18){--row: 18}.hours>[role=listitem i]:nth-child(24n+19){--row: 19}.hours>[role=listitem i]:nth-child(24n+20){--row: 20}.hours>[role=listitem i]:nth-child(24n+21){--row: 21}.hours>[role=listitem i]:nth-child(24n+22){--row: 22}.hours>[role=listitem i]:nth-child(24n+23){--row: 23}.hours>[role=listitem i]:nth-child(24n+24){--row: 24}[role=gridcell i]{display:grid;gap:1px;grid-auto-flow:column}[role=gridcell i],[role=columnheader i],[role=columnheader i] [role=button i]{position:relative}[role=gridcell i]:before,[role=columnheader i]:before,[role=columnheader i] [role=button i]:before{position:absolute;z-index:-1;background-color:var(--vvd-color-information-400);content:"";inset:0}[role=gridcell i]:focus,[role=columnheader i]:focus,[role=columnheader i] [role=button i]:focus{outline:none}[role=gridcell i]:not(:focus-visible):before,[role=columnheader i]:not(:focus-visible):before,[role=columnheader i] [role=button i]:not(:focus-visible):before{display:none}.columns{display:contents}.columns>[role=gridcell i]{position:relative;grid-column:var(--column);grid-row:1/25}.columns>[role=gridcell i]:nth-child(1){--column: 1}.columns>[role=gridcell i]:nth-child(2){--column: 2}.columns>[role=gridcell i]:nth-child(3){--column: 3}.columns>[role=gridcell i]:nth-child(4){--column: 4}.columns>[role=gridcell i]:nth-child(5){--column: 5}.columns>[role=gridcell i]:nth-child(6){--column: 6}.columns>[role=gridcell i]:nth-child(7){--column: 7}.columns>[role=gridcell i]:not(:first-child):after{position:absolute;block-size:100%;border-inline-end:var(--vvd-color-neutral-100) 1px solid;content:"";margin-inline-start:-1px}.column-headers{display:grid;grid-area:column-headers;grid-template-columns:repeat(7,1fr)}.column-headers [role=columnheader i] h2{display:grid;align-items:baseline;margin:0;font:var(--vvd-typography-heading-4);grid-template-columns:1fr auto 1fr}.column-headers [role=columnheader i] h2>em{font:inherit;inline-size:min-content;inset-inline-start:0}.column-headers [role=columnheader i] h2>small{font:var(--vvd-typography-base-condensed);text-transform:uppercase}.sticky-header .column-headers,.sticky-all .column-headers{position:sticky;z-index:1;background-color:var(--calendar-header-background-color, var(--vvd-color-canvas));inset-block-start:0;margin-block-end:3px}.filler{background-color:transparent;grid-area:filler}.sticky-header .filler,.sticky-all .filler,.sticky-column .filler{position:sticky;z-index:2;background-color:var(--calendar-header-background-color, var(--vvd-color-canvas));margin-block-end:3px}.sticky-column .filler{inset-inline-start:0}.sticky-header .filler{inset-block-start:0}.sticky-all .filler{inset-block-start:0;inset-inline-start:0}', j = "ArrowUp", x = "ArrowRight", w = "ArrowDown", I = "ArrowLeft";
7
+ function P(t) {
8
+ return t instanceof HTMLElement && (t.matches('[role="gridcell"i]') || t.matches('[role="columnheader"i]'));
9
+ }
10
+ const U = (t) => t.matches('[role="columnheader"i]') ? '[role="gridcell"i]' : '[role="columnheader"i]';
11
+ function L(t, e) {
12
+ if (e.parentNode instanceof HTMLElement)
13
+ switch (t) {
14
+ case x:
15
+ return e.nextElementSibling || e.parentNode.firstElementChild;
16
+ case I:
17
+ return e.previousElementSibling || e.parentNode.lastElementChild;
18
+ case j:
19
+ case w: {
20
+ const { children: r } = e.parentNode, n = Array.from(r).indexOf(e);
21
+ return this.shadowRoot.querySelector(
22
+ `${U(e)}:nth-child(${n + 1})`
23
+ );
24
+ }
25
+ }
26
+ }
27
+ function W(t, e) {
28
+ if (t !== w)
29
+ return;
30
+ const r = e.closest('[role="columnheader"i]'), n = this.shadowRoot.querySelectorAll(
31
+ '[role="columnheader"i]'
32
+ ), o = Array.from(n).indexOf(r);
33
+ return this.shadowRoot.querySelector(
34
+ `[role="gridcell"i]:nth-child(${o + 1})`
35
+ );
36
+ }
37
+ function u(t) {
38
+ return t != null && typeof t == "object" && t["@@functional/placeholder"] === !0;
39
+ }
40
+ function a(t) {
41
+ return function e(r) {
42
+ return arguments.length === 0 || u(r) ? e : t.apply(this, arguments);
43
+ };
44
+ }
45
+ function B(t) {
46
+ return function e(r, n) {
47
+ switch (arguments.length) {
48
+ case 0:
49
+ return e;
50
+ case 1:
51
+ return u(r) ? e : a(function(o) {
52
+ return t(r, o);
53
+ });
54
+ default:
55
+ return u(r) && u(n) ? e : u(r) ? a(function(o) {
56
+ return t(o, n);
57
+ }) : u(n) ? a(function(o) {
58
+ return t(r, o);
59
+ }) : t(r, n);
60
+ }
61
+ };
62
+ }
63
+ const K = Array.isArray || function(e) {
8
64
  return e != null && e.length >= 0 && Object.prototype.toString.call(e) === "[object Array]";
9
65
  };
10
- function b(t) {
66
+ function A(t) {
11
67
  for (var e = [], r; !(r = t.next()).done; )
12
68
  e.push(r.value);
13
69
  return e;
14
70
  }
15
- function A(t, e, r) {
71
+ function k(t, e, r) {
16
72
  for (var n = 0, o = r.length; n < o; ) {
17
73
  if (t(e, r[n]))
18
74
  return !0;
@@ -20,60 +76,63 @@ function A(t, e, r) {
20
76
  }
21
77
  return !1;
22
78
  }
23
- function U(t) {
79
+ function V(t) {
24
80
  var e = String(t).match(/^function (\w*)/);
25
81
  return e == null ? "" : e[1];
26
82
  }
27
- function P(t, e) {
83
+ function p(t, e) {
84
+ return Object.prototype.hasOwnProperty.call(e, t);
85
+ }
86
+ function Y(t, e) {
28
87
  return t === e ? t !== 0 || 1 / t === 1 / e : t !== t && e !== e;
29
88
  }
30
- const y = typeof Object.is == "function" ? Object.is : P;
31
- var k = Object.prototype.toString, C = /* @__PURE__ */ function() {
32
- return k.call(arguments) === "[object Arguments]" ? function(e) {
33
- return k.call(e) === "[object Arguments]";
89
+ const v = typeof Object.is == "function" ? Object.is : Y;
90
+ var O = Object.prototype.toString, $ = /* @__PURE__ */ function() {
91
+ return O.call(arguments) === "[object Arguments]" ? function(e) {
92
+ return O.call(e) === "[object Arguments]";
34
93
  } : function(e) {
35
- return f("callee", e);
94
+ return p("callee", e);
36
95
  };
37
- }(), L = !/* @__PURE__ */ {
96
+ }(), G = !/* @__PURE__ */ {
38
97
  toString: null
39
- }.propertyIsEnumerable("toString"), O = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], S = /* @__PURE__ */ function() {
98
+ }.propertyIsEnumerable("toString"), S = ["constructor", "valueOf", "isPrototypeOf", "toString", "propertyIsEnumerable", "hasOwnProperty", "toLocaleString"], D = /* @__PURE__ */ function() {
40
99
  return arguments.propertyIsEnumerable("length");
41
- }(), W = function(e, r) {
100
+ }(), X = function(e, r) {
42
101
  for (var n = 0; n < e.length; ) {
43
102
  if (e[n] === r)
44
103
  return !0;
45
104
  n += 1;
46
105
  }
47
106
  return !1;
48
- }, D = typeof Object.keys == "function" && !S ? /* @__PURE__ */ c(function(e) {
107
+ }, E = /* @__PURE__ */ a(typeof Object.keys == "function" && !D ? function(e) {
49
108
  return Object(e) !== e ? [] : Object.keys(e);
50
- }) : /* @__PURE__ */ c(function(e) {
109
+ } : function(e) {
51
110
  if (Object(e) !== e)
52
111
  return [];
53
- var r, n, o = [], i = S && C(e);
112
+ var r, n, o = [], i = D && $(e);
54
113
  for (r in e)
55
- f(r, e) && (!i || r !== "length") && (o[o.length] = r);
56
- if (L)
57
- for (n = O.length - 1; n >= 0; )
58
- r = O[n], f(r, e) && !W(o, r) && (o[o.length] = r), n -= 1;
114
+ p(r, e) && (!i || r !== "length") && (o[o.length] = r);
115
+ if (G)
116
+ for (n = S.length - 1; n >= 0; )
117
+ r = S[n], p(r, e) && !X(o, r) && (o[o.length] = r), n -= 1;
59
118
  return o;
60
- }), E = /* @__PURE__ */ c(function(e) {
119
+ }), _ = /* @__PURE__ */ a(function(e) {
61
120
  return e === null ? "Null" : e === void 0 ? "Undefined" : Object.prototype.toString.call(e).slice(8, -1);
62
121
  });
63
- function _(t, e, r, n) {
64
- var o = b(t), i = b(e);
65
- function l(a, d) {
66
- return v(a, d, r.slice(), n.slice());
122
+ function C(t, e, r, n) {
123
+ var o = A(t), i = A(e);
124
+ function l(s, h) {
125
+ return b(s, h, r.slice(), n.slice());
67
126
  }
68
- return !A(function(a, d) {
69
- return !A(l, d, a);
127
+ return !k(function(s, h) {
128
+ return !k(l, h, s);
70
129
  }, i, o);
71
130
  }
72
- function v(t, e, r, n) {
73
- if (y(t, e))
131
+ function b(t, e, r, n) {
132
+ if (v(t, e))
74
133
  return !0;
75
- var o = E(t);
76
- if (o !== E(e))
134
+ var o = _(t);
135
+ if (o !== _(e))
77
136
  return !1;
78
137
  if (typeof t["fantasy-land/equals"] == "function" || typeof e["fantasy-land/equals"] == "function")
79
138
  return typeof t["fantasy-land/equals"] == "function" && t["fantasy-land/equals"](e) && typeof e["fantasy-land/equals"] == "function" && e["fantasy-land/equals"](t);
@@ -83,17 +142,17 @@ function v(t, e, r, n) {
83
142
  case "Arguments":
84
143
  case "Array":
85
144
  case "Object":
86
- if (typeof t.constructor == "function" && U(t.constructor) === "Promise")
145
+ if (typeof t.constructor == "function" && V(t.constructor) === "Promise")
87
146
  return t === e;
88
147
  break;
89
148
  case "Boolean":
90
149
  case "Number":
91
150
  case "String":
92
- if (!(typeof t == typeof e && y(t.valueOf(), e.valueOf())))
151
+ if (!(typeof t == typeof e && v(t.valueOf(), e.valueOf())))
93
152
  return !1;
94
153
  break;
95
154
  case "Date":
96
- if (!y(t.valueOf(), e.valueOf()))
155
+ if (!v(t.valueOf(), e.valueOf()))
97
156
  return !1;
98
157
  break;
99
158
  case "Error":
@@ -110,9 +169,9 @@ function v(t, e, r, n) {
110
169
  }
111
170
  switch (o) {
112
171
  case "Map":
113
- return t.size !== e.size ? !1 : _(t.entries(), e.entries(), r.concat([t]), n.concat([e]));
172
+ return t.size !== e.size ? !1 : C(t.entries(), e.entries(), r.concat([t]), n.concat([e]));
114
173
  case "Set":
115
- return t.size !== e.size ? !1 : _(t.values(), e.values(), r.concat([t]), n.concat([e]));
174
+ return t.size !== e.size ? !1 : C(t.values(), e.values(), r.concat([t]), n.concat([e]));
116
175
  case "Arguments":
117
176
  case "Array":
118
177
  case "Object":
@@ -136,73 +195,42 @@ function v(t, e, r, n) {
136
195
  default:
137
196
  return !1;
138
197
  }
139
- var l = D(t);
140
- if (l.length !== D(e).length)
198
+ var l = E(t);
199
+ if (l.length !== E(e).length)
141
200
  return !1;
142
- var a = r.concat([t]), d = n.concat([e]);
201
+ var s = r.concat([t]), h = n.concat([e]);
143
202
  for (i = l.length - 1; i >= 0; ) {
144
- var p = l[i];
145
- if (!(f(p, e) && v(e[p], t[p], a, d)))
203
+ var y = l[i];
204
+ if (!(p(y, e) && b(e[y], t[y], s, h)))
146
205
  return !1;
147
206
  i -= 1;
148
207
  }
149
208
  return !0;
150
209
  }
151
- var B = /* @__PURE__ */ M(function(e, r) {
152
- return v(e, r, [], []);
210
+ var J = /* @__PURE__ */ B(function(e, r) {
211
+ return b(e, r, [], []);
153
212
  });
154
- function K(t) {
213
+ function Q(t) {
155
214
  return Object.prototype.toString.call(t) === "[object Object]";
156
215
  }
157
- function V(t) {
216
+ function Z(t) {
158
217
  return Object.prototype.toString.call(t) === "[object String]";
159
218
  }
160
- var Y = /* @__PURE__ */ c(function(e) {
219
+ var ee = /* @__PURE__ */ a(function(e) {
161
220
  return !e;
162
221
  });
163
- function G(t) {
222
+ function te(t) {
164
223
  var e = Object.prototype.toString.call(t);
165
224
  return e === "[object Uint8ClampedArray]" || e === "[object Int8Array]" || e === "[object Uint8Array]" || e === "[object Int16Array]" || e === "[object Uint16Array]" || e === "[object Int32Array]" || e === "[object Uint32Array]" || e === "[object Float32Array]" || e === "[object Float64Array]" || e === "[object BigInt64Array]" || e === "[object BigUint64Array]";
166
225
  }
167
- var X = /* @__PURE__ */ c(function(e) {
168
- return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : e == Set || e instanceof Set ? /* @__PURE__ */ new Set() : e == Map || e instanceof Map ? /* @__PURE__ */ new Map() : N(e) ? [] : V(e) ? "" : K(e) ? {} : C(e) ? /* @__PURE__ */ function() {
226
+ var re = /* @__PURE__ */ a(function(e) {
227
+ return e != null && typeof e["fantasy-land/empty"] == "function" ? e["fantasy-land/empty"]() : e != null && e.constructor != null && typeof e.constructor["fantasy-land/empty"] == "function" ? e.constructor["fantasy-land/empty"]() : e != null && typeof e.empty == "function" ? e.empty() : e != null && e.constructor != null && typeof e.constructor.empty == "function" ? e.constructor.empty() : e == Set || e instanceof Set ? /* @__PURE__ */ new Set() : e == Map || e instanceof Map ? /* @__PURE__ */ new Map() : K(e) ? [] : Z(e) ? "" : Q(e) ? {} : $(e) ? /* @__PURE__ */ function() {
169
228
  return arguments;
170
- }() : G(e) ? e.constructor.from("") : void 0;
171
- }), J = /* @__PURE__ */ c(function(e) {
172
- return e != null && B(e, X(e));
229
+ }() : te(e) ? e.constructor.from("") : void 0;
230
+ }), ne = /* @__PURE__ */ a(function(e) {
231
+ return e != null && J(e, re(e));
173
232
  });
174
- const Q = ':host{display:block;overflow:auto;block-size:inherit;max-block-size:inherit}ol{padding:0;margin:0;list-style:none}[role=grid i]{position:relative;z-index:0;display:grid;margin:auto;grid-template-areas:"filler column-headers" "row-headers calendar";grid-template-columns:min-content auto;inline-size:max(100%,500px);min-inline-size:880px}.row-headers{display:grid;grid-area:row-headers;grid-template-rows:repeat(24,1fr);margin-inline-end:2px}.row-headers>[role=rowheader i]{display:flex;align-items:flex-end;justify-content:flex-end}.row-headers>[role=rowheader i]>time{font:var(--vvd-typography-base-condensed);font-size:small;line-height:1;text-transform:uppercase;white-space:nowrap}.sticky-column .row-headers,.sticky-all .row-headers{position:sticky;z-index:1;background-color:var(--calendar-column-background-color, var(--vvd-color-canvas));inset-inline-start:0;margin-inline-end:3px}.calendar-row{display:contents}.calendar-grid-presentation{display:grid;overflow:hidden;border-radius:8px;background:var(--vvd-color-surface-2dp);counter-reset:listing;filter:var(--vvd-shadow-surface-2dp);gap:1px;grid-area:calendar;grid-auto-flow:column;grid-template:repeat(24,1fr)/repeat(7,1fr)}.hours{display:contents}.hours>[role=listitem i]{position:relative;grid-column:1/8;grid-row:var(--row);min-block-size:calc(1px*(48 + 4*clamp(-1,var(--vvd-size-density, 0),2)));pointer-events:none}.hours>[role=listitem i]:not(:first-child):after{position:absolute;border-block-end:var(--vvd-color-neutral-100) 1px solid;content:"";inline-size:100%;margin-block-start:-1px}.hours>[role=listitem i]:nth-child(24n+1){--row: 1}.hours>[role=listitem i]:nth-child(24n+2){--row: 2}.hours>[role=listitem i]:nth-child(24n+3){--row: 3}.hours>[role=listitem i]:nth-child(24n+4){--row: 4}.hours>[role=listitem i]:nth-child(24n+5){--row: 5}.hours>[role=listitem i]:nth-child(24n+6){--row: 6}.hours>[role=listitem i]:nth-child(24n+7){--row: 7}.hours>[role=listitem i]:nth-child(24n+8){--row: 8}.hours>[role=listitem i]:nth-child(24n+9){--row: 9}.hours>[role=listitem i]:nth-child(24n+10){--row: 10}.hours>[role=listitem i]:nth-child(24n+11){--row: 11}.hours>[role=listitem i]:nth-child(24n+12){--row: 12}.hours>[role=listitem i]:nth-child(24n+13){--row: 13}.hours>[role=listitem i]:nth-child(24n+14){--row: 14}.hours>[role=listitem i]:nth-child(24n+15){--row: 15}.hours>[role=listitem i]:nth-child(24n+16){--row: 16}.hours>[role=listitem i]:nth-child(24n+17){--row: 17}.hours>[role=listitem i]:nth-child(24n+18){--row: 18}.hours>[role=listitem i]:nth-child(24n+19){--row: 19}.hours>[role=listitem i]:nth-child(24n+20){--row: 20}.hours>[role=listitem i]:nth-child(24n+21){--row: 21}.hours>[role=listitem i]:nth-child(24n+22){--row: 22}.hours>[role=listitem i]:nth-child(24n+23){--row: 23}.hours>[role=listitem i]:nth-child(24n+24){--row: 24}[role=gridcell i]{display:grid;gap:1px;grid-auto-flow:column}[role=gridcell i],[role=columnheader i],[role=columnheader i] [role=button i]{position:relative}[role=gridcell i]:before,[role=columnheader i]:before,[role=columnheader i] [role=button i]:before{position:absolute;z-index:-1;background-color:var(--vvd-color-information-400);content:"";inset:0}[role=gridcell i]:focus,[role=columnheader i]:focus,[role=columnheader i] [role=button i]:focus{outline:none}[role=gridcell i]:not(:focus-visible):before,[role=columnheader i]:not(:focus-visible):before,[role=columnheader i] [role=button i]:not(:focus-visible):before{display:none}.columns{display:contents}.columns>[role=gridcell i]{position:relative;grid-column:var(--column);grid-row:1/25}.columns>[role=gridcell i]:nth-child(1){--column: 1}.columns>[role=gridcell i]:nth-child(2){--column: 2}.columns>[role=gridcell i]:nth-child(3){--column: 3}.columns>[role=gridcell i]:nth-child(4){--column: 4}.columns>[role=gridcell i]:nth-child(5){--column: 5}.columns>[role=gridcell i]:nth-child(6){--column: 6}.columns>[role=gridcell i]:nth-child(7){--column: 7}.columns>[role=gridcell i]:not(:first-child):after{position:absolute;block-size:100%;border-inline-end:var(--vvd-color-neutral-100) 1px solid;content:"";margin-inline-start:-1px}.column-headers{display:grid;grid-area:column-headers;grid-template-columns:repeat(7,1fr)}.column-headers [role=columnheader i] h2{display:grid;align-items:baseline;margin:0;font:var(--vvd-typography-heading-4);grid-template-columns:1fr auto 1fr}.column-headers [role=columnheader i] h2>em{font:inherit;inline-size:min-content;inset-inline-start:0}.column-headers [role=columnheader i] h2>small{font:var(--vvd-typography-base-condensed);text-transform:uppercase}.sticky-header .column-headers,.sticky-all .column-headers{position:sticky;z-index:1;background-color:var(--calendar-header-background-color, var(--vvd-color-canvas));inset-block-start:0;margin-block-end:3px}.filler{background-color:transparent;grid-area:filler}.sticky-header .filler,.sticky-all .filler,.sticky-column .filler{position:sticky;z-index:2;background-color:var(--calendar-header-background-color, var(--vvd-color-canvas));margin-block-end:3px}.sticky-column .filler{inset-inline-start:0}.sticky-header .filler{inset-block-start:0}.sticky-all .filler{inset-block-start:0;inset-inline-start:0}', j = "ArrowUp", x = "ArrowRight", w = "ArrowDown", I = "ArrowLeft";
175
- function Z(t) {
176
- return t instanceof HTMLElement && (t.matches('[role="gridcell"i]') || t.matches('[role="columnheader"i]'));
177
- }
178
- const ee = (t) => t.matches('[role="columnheader"i]') ? '[role="gridcell"i]' : '[role="columnheader"i]';
179
- function te(t, e) {
180
- if (e.parentNode instanceof HTMLElement)
181
- switch (t) {
182
- case x:
183
- return e.nextElementSibling || e.parentNode.firstElementChild;
184
- case I:
185
- return e.previousElementSibling || e.parentNode.lastElementChild;
186
- case j:
187
- case w: {
188
- const { children: r } = e.parentNode, n = Array.from(r).indexOf(e);
189
- return this.shadowRoot.querySelector(
190
- `${ee(e)}:nth-child(${n + 1})`
191
- );
192
- }
193
- }
194
- }
195
- function re(t, e) {
196
- if (t !== w)
197
- return;
198
- const r = e.closest('[role="columnheader"i]'), n = this.shadowRoot.querySelectorAll(
199
- '[role="columnheader"i]'
200
- ), o = Array.from(n).indexOf(r);
201
- return this.shadowRoot.querySelector(
202
- `[role="gridcell"i]:nth-child(${o + 1})`
203
- );
204
- }
205
- function ne(t) {
233
+ function oe(t) {
206
234
  const e = t.closest('[role="gridcell"i], [role="columnheader"i]');
207
235
  if (e) {
208
236
  const { parentElement: r } = e;
@@ -210,16 +238,16 @@ function ne(t) {
210
238
  return r.children && Array.from(r.children).indexOf(e);
211
239
  }
212
240
  }
213
- function oe(t, e, r) {
241
+ function ie(t, e, r) {
214
242
  const n = e.closest(
215
243
  '[role="rowheader"], [role="gridcell"i]'
216
244
  );
217
245
  if (n) {
218
- const o = n.getBoundingClientRect(), i = t.clientY - o.y, l = o.height / r, a = i / l;
219
- return Math.round((a + Number.EPSILON) * 100) / 100;
246
+ const o = n.getBoundingClientRect(), i = t.clientY - o.y, l = o.height / r, s = i / l;
247
+ return Math.round((s + Number.EPSILON) * 100) / 100;
220
248
  }
221
249
  }
222
- const ie = function(t) {
250
+ const le = function(t) {
223
251
  if (!(t instanceof KeyboardEvent || t instanceof MouseEvent))
224
252
  throw new Error(
225
253
  "Invalid event. Event must be instance of KeyboardEvent or MouseEvent"
@@ -229,39 +257,39 @@ const ie = function(t) {
229
257
  throw new Error(
230
258
  "Invalid event. Event must contain a target object which is a direct descendant of calendar"
231
259
  );
232
- const r = ne(e);
260
+ const r = oe(e);
233
261
  let n;
234
- t instanceof MouseEvent && (n = oe(t, e, this._hours));
262
+ t instanceof MouseEvent && (n = ie(t, e, this._hours));
235
263
  const o = {
236
264
  ...r != null && { day: r },
237
265
  ...n != null && { hour: n }
238
266
  };
239
- return Y(J(o)) ? o : null;
267
+ return ee(ne(o)) ? o : null;
240
268
  };
241
- var le = Object.defineProperty, m = (t, e, r, n) => {
269
+ var ae = Object.defineProperty, f = (t, e, r, n) => {
242
270
  for (var o = void 0, i = t.length - 1, l; i >= 0; i--)
243
271
  (l = t[i]) && (o = l(e, r, o) || o);
244
- return o && le(e, r, o), o;
272
+ return o && ae(e, r, o), o;
245
273
  };
246
- const ae = (t) => {
274
+ const se = (t) => {
247
275
  const e = window.getComputedStyle(t).overflowY, r = window.getComputedStyle(t).overflowX;
248
276
  return {
249
277
  vertical: (e === "auto" || e === "scroll") && t.scrollHeight > t.clientHeight,
250
278
  horizontal: (r === "auto" || r === "scroll") && t.scrollWidth > t.clientWidth
251
279
  };
252
280
  };
253
- class u extends $ {
281
+ class d extends q {
254
282
  constructor() {
255
- super(...arguments), this.hour12 = !1, this.stickyMode = R.All, this._hours = 24, this._days = 7, this.hoursAsDatetime = Array.from({ length: this._hours - 1 }).fill(new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0))).map((e, r) => new Date(e.setHours(++r))), this._generateDaysArr = (e) => {
283
+ super(...arguments), this.hour12 = !1, this.stickyMode = T.All, this._hours = 24, this._days = 7, this.hoursAsDatetime = Array.from({ length: this._hours - 1 }).fill(new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0))).map((e, r) => new Date(e.setHours(++r))), this._generateDaysArr = (e) => {
256
284
  if (e.length == this._days)
257
285
  return e;
258
286
  const r = new Date(e[e.length - 1]);
259
287
  return r.setDate(r.getDate() + 1), this._generateDaysArr([...e, r]);
260
- }, this.getEventContext = ie;
288
+ }, this.getEventContext = le;
261
289
  }
262
290
  get #e() {
263
291
  const { activeElement: e } = document;
264
- return e instanceof T ? e : null;
292
+ return e instanceof M ? e : null;
265
293
  }
266
294
  getCalendarEventContainingCell(e) {
267
295
  const r = e.getAttribute("slot");
@@ -272,9 +300,9 @@ class u extends $ {
272
300
  arrowKeysInteractions(e) {
273
301
  const { activeElement: r } = this.shadowRoot;
274
302
  let n;
275
- Z(r) ? n = te.call(this, e, r) : this.#e ? n = this.getCalendarEventContainingCell(
303
+ P(r) ? n = L.call(this, e, r) : this.#e ? n = this.getCalendarEventContainingCell(
276
304
  this.#e
277
- ) : r?.matches('em[role="button"i]') ? n = re.call(
305
+ ) : r?.matches('em[role="button"i]') ? n = W.call(
278
306
  this,
279
307
  e,
280
308
  r
@@ -296,52 +324,52 @@ class u extends $ {
296
324
  super.connectedCallback(), this.initializeScrollPosition();
297
325
  }
298
326
  initializeScrollPosition() {
299
- if (!ae(this).vertical)
327
+ if (!se(this).vertical)
300
328
  return;
301
329
  const n = this.scrollHeight / this._hours * (8 - 1);
302
- q.enqueue(() => {
330
+ z.enqueue(() => {
303
331
  this.scrollTo({
304
332
  top: n
305
333
  });
306
334
  });
307
335
  }
308
336
  }
309
- m([
310
- h
311
- ], u.prototype, "datetime");
312
- m([
313
- h({ attribute: "start-day" })
314
- ], u.prototype, "startDay");
315
- m([
316
- h
317
- ], u.prototype, "locales");
318
- m([
319
- h({ mode: "boolean" })
320
- ], u.prototype, "hour12");
321
- m([
322
- h({ attribute: "sticky-mode", mode: "fromView" })
323
- ], u.prototype, "stickyMode");
324
- function se(t) {
337
+ f([
338
+ m
339
+ ], d.prototype, "datetime");
340
+ f([
341
+ m({ attribute: "start-day" })
342
+ ], d.prototype, "startDay");
343
+ f([
344
+ m
345
+ ], d.prototype, "locales");
346
+ f([
347
+ m({ mode: "boolean" })
348
+ ], d.prototype, "hour12");
349
+ f([
350
+ m({ attribute: "sticky-mode", mode: "fromView" })
351
+ ], d.prototype, "stickyMode");
352
+ function ce(t) {
325
353
  const e = (r) => `0${r}`.slice(-2);
326
354
  return `${t.getFullYear()}-${e(t.getMonth() + 1)}-${e(
327
355
  t.getDate()
328
356
  )}`;
329
357
  }
330
- const ce = /* @__PURE__ */ new Map([
358
+ const ue = /* @__PURE__ */ new Map([
331
359
  ["sunday", 0],
332
360
  ["monday", 1]
333
361
  ]);
334
- function ue(t = /* @__PURE__ */ new Date(), e) {
362
+ function de(t = /* @__PURE__ */ new Date(), e) {
335
363
  t = new Date(t);
336
- let r = ce.get(e);
364
+ let r = ue.get(e);
337
365
  r ??= 1;
338
366
  const n = t.getDate() - (t.getDay() + 7 - r) % 7;
339
367
  return new Date(t.setDate(n));
340
368
  }
341
- const de = ({ stickyMode: t }) => F([`sticky-${t}`, !!t]), he = () => s` <div class="row-headers" role="row">
369
+ const he = ({ stickyMode: t }) => F([`sticky-${t}`, !!t]), me = () => c` <div class="row-headers" role="row">
342
370
  ${g(
343
371
  (t) => t.hoursAsDatetime,
344
- s`<span role="rowheader">
372
+ c`<span role="rowheader">
345
373
  <time
346
374
  datetime="${(t, e) => new Intl.DateTimeFormat(e.parent.locales, {
347
375
  hour: "numeric",
@@ -356,11 +384,11 @@ const de = ({ stickyMode: t }) => F([`sticky-${t}`, !!t]), he = () => s` <div cl
356
384
  </time>
357
385
  </span>`
358
386
  )}
359
- </div>`, me = () => s` <div class="column-headers" role="row">
387
+ </div>`, fe = () => c` <div class="column-headers" role="row">
360
388
  ${g(
361
- (t) => t._generateDaysArr([ue(t.datetime, t.startDay)]),
362
- s` <div role="columnheader" tabindex="-1">
363
- <time datetime=${(t) => se(t)}>
389
+ (t) => t._generateDaysArr([de(t.datetime, t.startDay)]),
390
+ c` <div role="columnheader" tabindex="-1">
391
+ <time datetime=${(t) => ce(t)}>
364
392
  <h2>
365
393
  <!-- TODO add to column aria-labelledby or describedby to count
366
394
  events and related day e.g. "3 events, Sunday, March 8" -->
@@ -386,29 +414,29 @@ const de = ({ stickyMode: t }) => F([`sticky-${t}`, !!t]), he = () => s` <div cl
386
414
  </time>
387
415
  </div>`
388
416
  )}
389
- </div>`, fe = s`
417
+ </div>`, ge = c`
390
418
  <div role="gridcell" tabindex="-1">
391
419
  <slot name="day-${(t, e) => e.index}"></slot>
392
420
  </div>
393
- `, ge = s`
421
+ `, pe = c`
394
422
  <div
395
423
  role="grid"
396
- class="${de}"
424
+ class="${he}"
397
425
  @keydown=${(t, e) => t.onKeydown(e.event)}
398
426
  >
399
427
  <div class="filler"></div>
400
- ${me}
428
+ ${fe}
401
429
  <div class="calendar-row" role="rowgroup">
402
- ${he}
430
+ ${me}
403
431
  <div class="calendar-grid-presentation" role="presentation">
404
432
  <div class="hours" role="list">
405
433
  ${g(
406
434
  (t) => Array.from({ length: t.hoursAsDatetime.length + 1 }),
407
- s` <div role="listitem"></div>`
435
+ c` <div role="listitem"></div>`
408
436
  )}
409
437
  </div>
410
438
  <div class="columns" role="row">
411
- ${g((t) => Array.from(Array(t._days)), fe, {
439
+ ${g((t) => Array.from(Array(t._days)), ge, {
412
440
  positioning: !0
413
441
  })}
414
442
  </div>
@@ -416,16 +444,16 @@ const de = ({ stickyMode: t }) => F([`sticky-${t}`, !!t]), he = () => s` <div cl
416
444
  </div>
417
445
  </div>
418
446
  </div>
419
- `, pe = H(
447
+ `, ye = R(
420
448
  "calendar",
421
- u,
422
- ge,
449
+ d,
450
+ pe,
423
451
  [],
424
452
  {
425
- styles: Q,
453
+ styles: N,
426
454
  shadowOptions: {
427
455
  delegatesFocus: !0
428
456
  }
429
457
  }
430
- ), ye = z(pe);
431
- ye();
458
+ ), ve = H(ye);
459
+ ve();