@vonage/vivid 3.31.0 → 3.34.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 (237) hide show
  1. package/accordion/index.js +5 -5
  2. package/accordion-item/index.js +4 -4
  3. package/action-group/index.js +1 -1
  4. package/alert/index.js +8 -7
  5. package/avatar/index.js +2 -2
  6. package/badge/index.js +2 -2
  7. package/banner/index.js +5 -5
  8. package/breadcrumb/index.js +1 -1
  9. package/breadcrumb-item/index.js +3 -3
  10. package/button/index.js +4 -4
  11. package/calendar/index.js +1 -1
  12. package/calendar-event/index.js +1 -1
  13. package/card/index.js +3 -3
  14. package/checkbox/index.js +7 -4
  15. package/combobox/index.js +10 -9
  16. package/custom-elements.json +996 -29
  17. package/data-grid/index.js +2 -2
  18. package/date-picker/index.js +35 -0
  19. package/dialog/index.js +6 -6
  20. package/divider/index.js +1 -1
  21. package/elevation/index.js +1 -1
  22. package/empty-state/index.js +2 -2
  23. package/fab/index.js +4 -4
  24. package/file-picker/index.js +7 -6
  25. package/focus/index.js +1 -1
  26. package/header/index.js +2 -2
  27. package/icon/index.js +1 -1
  28. package/index.d.ts +1 -0
  29. package/index.js +68 -66
  30. package/layout/index.js +1 -1
  31. package/lib/button/button.d.ts +2 -0
  32. package/lib/calendar/calendar.d.ts +1 -1
  33. package/lib/components.d.ts +20 -19
  34. package/lib/date-picker/calendar/calendarGrid.d.ts +17 -0
  35. package/lib/date-picker/calendar/dateStr.d.ts +7 -0
  36. package/lib/date-picker/calendar/month.d.ts +12 -0
  37. package/lib/date-picker/calendar/monthPickerGrid.d.ts +10 -0
  38. package/lib/date-picker/calendar/presentationDate.d.ts +4 -0
  39. package/lib/date-picker/calendar/year.d.ts +2 -0
  40. package/lib/date-picker/date-picker.d.ts +18 -0
  41. package/lib/date-picker/date-picker.template.d.ts +4 -0
  42. package/lib/date-picker/definition.d.ts +3 -0
  43. package/lib/date-picker/locale.d.ts +21 -0
  44. package/lib/icon/icon.d.ts +0 -1
  45. package/lib/listbox/listbox.d.ts +9 -1
  46. package/lib/select/select.d.ts +4 -2
  47. package/lib/text-field/text-field.d.ts +1 -0
  48. package/listbox/index.js +22 -17
  49. package/locales/en-GB.d.ts +3 -0
  50. package/locales/en-GB.js +59 -0
  51. package/locales/en-US.d.ts +3 -0
  52. package/locales/en-US.js +59 -0
  53. package/locales/ja-JP.d.ts +3 -0
  54. package/locales/ja-JP.js +59 -0
  55. package/locales/zh-CN.d.ts +3 -0
  56. package/locales/zh-CN.js +59 -0
  57. package/menu/index.js +8 -8
  58. package/menu-item/index.js +4 -4
  59. package/nav/index.js +1 -1
  60. package/nav-disclosure/index.js +3 -3
  61. package/nav-item/index.js +3 -3
  62. package/note/index.js +4 -4
  63. package/number-field/index.js +8 -7
  64. package/option/index.js +5 -4
  65. package/package.json +2 -15
  66. package/pagination/index.js +5 -5
  67. package/popup/index.js +6 -6
  68. package/progress/index.js +1 -1
  69. package/progress-ring/index.js +1 -1
  70. package/radio/index.js +2 -2
  71. package/radio-group/index.js +1 -1
  72. package/select/index.js +10 -9
  73. package/shared/affix.js +25 -9
  74. package/shared/apply-mixins.js +1 -1
  75. package/shared/breadcrumb-item.js +5 -5
  76. package/shared/button.js +13 -13
  77. package/shared/calendar-event.js +36 -16
  78. package/shared/definition.js +133 -194
  79. package/shared/definition10.js +225 -40
  80. package/shared/definition11.js +36 -32
  81. package/shared/definition12.js +763 -98
  82. package/shared/definition13.js +125 -89
  83. package/shared/definition14.js +207 -27
  84. package/shared/definition15.js +710 -731
  85. package/shared/definition16.js +1289 -47
  86. package/shared/definition17.js +6113 -93
  87. package/shared/definition18.js +242 -164
  88. package/shared/definition19.js +47 -692
  89. package/shared/definition2.js +199 -117
  90. package/shared/definition20.js +59 -1671
  91. package/shared/definition21.js +95 -255
  92. package/shared/definition22.js +2218 -1167
  93. package/shared/definition23.js +57 -219
  94. package/shared/definition24.js +27 -68
  95. package/shared/definition25.js +54 -38
  96. package/shared/definition26.js +395 -70
  97. package/shared/definition27.js +381 -2223
  98. package/shared/definition28.js +85 -44
  99. package/shared/definition29.js +27 -40
  100. package/shared/definition3.js +61 -24
  101. package/shared/definition30.js +13 -427
  102. package/shared/definition31.js +49 -360
  103. package/shared/definition32.js +466 -13
  104. package/shared/definition33.js +273 -63
  105. package/shared/definition34.js +195 -25
  106. package/shared/definition35.js +86 -35
  107. package/shared/definition36.js +66 -427
  108. package/shared/definition37.js +430 -190
  109. package/shared/definition38.js +34 -52
  110. package/shared/definition39.js +683 -31
  111. package/shared/definition4.js +157 -12
  112. package/shared/definition40.js +97 -422
  113. package/shared/definition41.js +473 -543
  114. package/shared/definition42.js +122 -73
  115. package/shared/definition43.js +103 -502
  116. package/shared/definition44.js +23 -101
  117. package/shared/definition45.js +76 -126
  118. package/shared/definition46.js +494 -48
  119. package/shared/definition47.js +23 -23
  120. package/shared/definition48.js +126 -476
  121. package/shared/definition49.js +275 -98
  122. package/shared/definition5.js +71 -36
  123. package/shared/definition50.js +157 -16
  124. package/shared/definition51.js +133 -263
  125. package/shared/definition52.js +131 -115
  126. package/shared/definition53.js +85 -120
  127. package/shared/definition54.js +295 -111
  128. package/shared/definition55.js +12 -71
  129. package/shared/definition56.js +39 -295
  130. package/shared/definition57.js +181 -0
  131. package/shared/definition6.js +56 -111
  132. package/shared/definition7.js +119 -187
  133. package/shared/definition8.js +58 -23
  134. package/shared/definition9.js +92 -66
  135. package/shared/focus.js +2 -1
  136. package/shared/focus2.js +1 -1
  137. package/shared/form-associated.js +2 -2
  138. package/shared/icon.js +48 -27
  139. package/shared/index.js +7 -27
  140. package/shared/index2.js +202 -0
  141. package/shared/key-codes.js +1 -1
  142. package/shared/listbox.js +88 -11
  143. package/shared/localization/Locale.d.ts +4 -0
  144. package/shared/localization/index.d.ts +7 -0
  145. package/shared/patterns/form-elements/form-elements.d.ts +4 -4
  146. package/shared/patterns/index.d.ts +1 -0
  147. package/shared/patterns/localized.d.ts +4 -0
  148. package/shared/radio.js +23 -7
  149. package/shared/repeat.js +1 -1
  150. package/shared/text-anchor.js +21 -4
  151. package/shared/text-anchor.template.js +37 -40
  152. package/shared/text-field.js +2 -2
  153. package/shared/text-field2.js +15 -15
  154. package/shared/tree-item.js +12 -12
  155. package/side-drawer/index.js +1 -1
  156. package/slider/index.js +2 -2
  157. package/split-button/index.js +3 -3
  158. package/style.css +6097 -0
  159. package/styles/core/all.css +25 -3
  160. package/styles/core/theme.css +1 -1
  161. package/styles/core/typography.css +25 -3
  162. package/styles/tokens/theme-dark.css +4 -4
  163. package/styles/tokens/theme-light.css +4 -4
  164. package/styles/tokens/vivid-2-compat.css +2 -2
  165. package/switch/index.js +5 -4
  166. package/tab/index.js +3 -3
  167. package/tab-panel/index.js +1 -1
  168. package/tabs/index.js +5 -5
  169. package/tag/index.js +3 -3
  170. package/tag-group/index.js +1 -1
  171. package/text-anchor/index.js +1 -1
  172. package/text-area/index.js +5 -4
  173. package/text-field/index.js +5 -4
  174. package/toggletip/index.js +7 -7
  175. package/tooltip/index.js +7 -7
  176. package/tree-item/index.js +3 -3
  177. package/tree-view/index.js +1 -1
  178. package/vivid.api.json +137 -0
  179. package/lib/accordion/index.d.ts +0 -1
  180. package/lib/accordion-item/index.d.ts +0 -1
  181. package/lib/action-group/index.d.ts +0 -1
  182. package/lib/alert/index.d.ts +0 -1
  183. package/lib/avatar/index.d.ts +0 -1
  184. package/lib/badge/index.d.ts +0 -1
  185. package/lib/banner/index.d.ts +0 -1
  186. package/lib/breadcrumb/index.d.ts +0 -1
  187. package/lib/breadcrumb-item/index.d.ts +0 -1
  188. package/lib/button/index.d.ts +0 -1
  189. package/lib/calendar/index.d.ts +0 -1
  190. package/lib/calendar-event/index.d.ts +0 -1
  191. package/lib/card/index.d.ts +0 -1
  192. package/lib/checkbox/index.d.ts +0 -1
  193. package/lib/combobox/index.d.ts +0 -1
  194. package/lib/data-grid/index.d.ts +0 -1
  195. package/lib/dialog/index.d.ts +0 -1
  196. package/lib/divider/index.d.ts +0 -1
  197. package/lib/elevation/index.d.ts +0 -1
  198. package/lib/empty-state/index.d.ts +0 -1
  199. package/lib/fab/index.d.ts +0 -1
  200. package/lib/file-picker/index.d.ts +0 -1
  201. package/lib/focus/index.d.ts +0 -1
  202. package/lib/header/index.d.ts +0 -1
  203. package/lib/icon/index.d.ts +0 -1
  204. package/lib/layout/index.d.ts +0 -1
  205. package/lib/listbox/index.d.ts +0 -1
  206. package/lib/menu/index.d.ts +0 -1
  207. package/lib/menu-item/index.d.ts +0 -1
  208. package/lib/nav/index.d.ts +0 -1
  209. package/lib/nav-disclosure/index.d.ts +0 -1
  210. package/lib/nav-item/index.d.ts +0 -1
  211. package/lib/note/index.d.ts +0 -1
  212. package/lib/number-field/index.d.ts +0 -1
  213. package/lib/option/index.d.ts +0 -1
  214. package/lib/pagination/index.d.ts +0 -1
  215. package/lib/popup/index.d.ts +0 -1
  216. package/lib/progress/index.d.ts +0 -1
  217. package/lib/progress-ring/index.d.ts +0 -1
  218. package/lib/radio/index.d.ts +0 -1
  219. package/lib/radio-group/index.d.ts +0 -1
  220. package/lib/select/index.d.ts +0 -1
  221. package/lib/side-drawer/index.d.ts +0 -1
  222. package/lib/slider/index.d.ts +0 -1
  223. package/lib/split-button/index.d.ts +0 -1
  224. package/lib/switch/index.d.ts +0 -1
  225. package/lib/tab/index.d.ts +0 -1
  226. package/lib/tab-panel/index.d.ts +0 -1
  227. package/lib/tabs/index.d.ts +0 -1
  228. package/lib/tag/index.d.ts +0 -1
  229. package/lib/tag-group/index.d.ts +0 -1
  230. package/lib/text-anchor/index.d.ts +0 -1
  231. package/lib/text-area/index.d.ts +0 -1
  232. package/lib/text-field/index.d.ts +0 -1
  233. package/lib/toggletip/index.d.ts +0 -1
  234. package/lib/tooltip/index.d.ts +0 -1
  235. package/lib/tree-item/index.d.ts +0 -1
  236. package/lib/tree-view/index.d.ts +0 -1
  237. package/shared/form-elements.js +0 -162
@@ -1,81 +1,291 @@
1
- import { F as FoundationElement, d as __classPrivateFieldGet, _ as __decorate, a as attr, b as __metadata, h as html, r as registerFactory } from './index.js';
2
- import { i as iconRegistries } from './definition3.js';
3
- import { f as focusRegistries } from './definition4.js';
4
- import { b as AffixIcon, a as affixIconTemplateFactory } from './affix.js';
1
+ import { F as FoundationElement, O as Observable, _ as __decorate, o as observable, a as attr, h as html, r as registerFactory } from './index.js';
2
+ import { a as iconRegistries } from './definition24.js';
3
+ import { f as focusRegistries } from './definition55.js';
4
+ import { b as AffixIconWithTrailing, a as affixIconTemplateFactory } from './affix.js';
5
+ import { A as ARIAGlobalStatesAndProperties } from './aria-global.js';
6
+ import { S as StartEnd } from './start-end.js';
5
7
  import { a as applyMixins } from './apply-mixins.js';
6
- import { I as Icon } from './icon.js';
8
+ import { i as isHTMLElement } from './dom.js';
7
9
  import { f as focusTemplateFactory } from './focus2.js';
8
- import { r as ref } from './ref.js';
10
+ import './index2.js';
9
11
  import { w as when } from './when.js';
12
+ import { c as classNames } from './class-names.js';
10
13
 
11
- var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 17 Aug 2023 11:13:18 GMT\n */\n.control {\n position: relative;\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n cursor: pointer;\n font: var(--vvd-typography-base);\n gap: 12px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n padding-inline: 16px;\n text-decoration: none;\n vertical-align: middle;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.control:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.control:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transparent;\n}\n.control {\n /* @cssprop [--vvd-nav-disclosure-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-nav-disclosure-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-nav-disclosure-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-nav-disclosure-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-nav-disclosure-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-nav-disclosure-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-nav-disclosure-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-nav-disclosure-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-nav-disclosure-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-nav-disclosure-accent-soft, var(--vvd-color-neutral-100));\n}\n@supports selector(:focus-visible) {\n .control:focus-visible {\n outline: none;\n }\n}\n@supports (user-select: none) {\n .control {\n user-select: none;\n }\n}\n.control .toggleIcon {\n margin-inline-start: auto;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n}\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n line-height: 1;\n}\n\n.content {\n display: flex;\n flex-direction: column;\n border-inline-start: 1px solid var(--vvd-color-neutral-200);\n gap: 4px;\n margin-block: 4px;\n margin-inline-start: 20px;\n padding-inline-start: 12px;\n}\n\ndetails > summary {\n list-style: none;\n}\n\ndetails > summary::-webkit-details-marker {\n display: none;\n}";
14
+ /**
15
+ * Determines if the element is a {@link (ListboxOption:class)}
16
+ *
17
+ * @param element - the element to test.
18
+ * @public
19
+ */
20
+ function isListboxOption(el) {
21
+ return (isHTMLElement(el) &&
22
+ (el.getAttribute("role") === "option" ||
23
+ el instanceof HTMLOptionElement));
24
+ }
25
+ /**
26
+ * An Option Custom HTML Element.
27
+ * Implements {@link https://www.w3.org/TR/wai-aria-1.1/#option | ARIA option }.
28
+ *
29
+ * @slot start - Content which can be provided before the listbox option content
30
+ * @slot end - Content which can be provided after the listbox option content
31
+ * @slot - The default slot for listbox option content
32
+ * @csspart content - Wraps the listbox option content
33
+ *
34
+ * @public
35
+ */
36
+ let ListboxOption$1 = class ListboxOption extends FoundationElement {
37
+ constructor(text, value, defaultSelected, selected) {
38
+ super();
39
+ /**
40
+ * The defaultSelected state of the option.
41
+ * @public
42
+ */
43
+ this.defaultSelected = false;
44
+ /**
45
+ * Tracks whether the "selected" property has been changed.
46
+ * @internal
47
+ */
48
+ this.dirtySelected = false;
49
+ /**
50
+ * The checked state of the control.
51
+ *
52
+ * @public
53
+ */
54
+ this.selected = this.defaultSelected;
55
+ /**
56
+ * Track whether the value has been changed from the initial value
57
+ */
58
+ this.dirtyValue = false;
59
+ if (text) {
60
+ this.textContent = text;
61
+ }
62
+ if (value) {
63
+ this.initialValue = value;
64
+ }
65
+ if (defaultSelected) {
66
+ this.defaultSelected = defaultSelected;
67
+ }
68
+ if (selected) {
69
+ this.selected = selected;
70
+ }
71
+ this.proxy = new Option(`${this.textContent}`, this.initialValue, this.defaultSelected, this.selected);
72
+ this.proxy.disabled = this.disabled;
73
+ }
74
+ /**
75
+ * Updates the ariaChecked property when the checked property changes.
76
+ *
77
+ * @param prev - the previous checked value
78
+ * @param next - the current checked value
79
+ *
80
+ * @public
81
+ */
82
+ checkedChanged(prev, next) {
83
+ if (typeof next === "boolean") {
84
+ this.ariaChecked = next ? "true" : "false";
85
+ return;
86
+ }
87
+ this.ariaChecked = null;
88
+ }
89
+ /**
90
+ * Updates the proxy's text content when the default slot changes.
91
+ * @param prev - the previous content value
92
+ * @param next - the current content value
93
+ *
94
+ * @internal
95
+ */
96
+ contentChanged(prev, next) {
97
+ if (this.proxy instanceof HTMLOptionElement) {
98
+ this.proxy.textContent = this.textContent;
99
+ }
100
+ this.$emit("contentchange", null, { bubbles: true });
101
+ }
102
+ defaultSelectedChanged() {
103
+ if (!this.dirtySelected) {
104
+ this.selected = this.defaultSelected;
105
+ if (this.proxy instanceof HTMLOptionElement) {
106
+ this.proxy.selected = this.defaultSelected;
107
+ }
108
+ }
109
+ }
110
+ disabledChanged(prev, next) {
111
+ this.ariaDisabled = this.disabled ? "true" : "false";
112
+ if (this.proxy instanceof HTMLOptionElement) {
113
+ this.proxy.disabled = this.disabled;
114
+ }
115
+ }
116
+ selectedAttributeChanged() {
117
+ this.defaultSelected = this.selectedAttribute;
118
+ if (this.proxy instanceof HTMLOptionElement) {
119
+ this.proxy.defaultSelected = this.defaultSelected;
120
+ }
121
+ }
122
+ selectedChanged() {
123
+ this.ariaSelected = this.selected ? "true" : "false";
124
+ if (!this.dirtySelected) {
125
+ this.dirtySelected = true;
126
+ }
127
+ if (this.proxy instanceof HTMLOptionElement) {
128
+ this.proxy.selected = this.selected;
129
+ }
130
+ }
131
+ initialValueChanged(previous, next) {
132
+ // If the value is clean and the component is connected to the DOM
133
+ // then set value equal to the attribute value.
134
+ if (!this.dirtyValue) {
135
+ this.value = this.initialValue;
136
+ this.dirtyValue = false;
137
+ }
138
+ }
139
+ get label() {
140
+ var _a;
141
+ return (_a = this.value) !== null && _a !== void 0 ? _a : this.text;
142
+ }
143
+ get text() {
144
+ var _a, _b;
145
+ return (_b = (_a = this.textContent) === null || _a === void 0 ? void 0 : _a.replace(/\s+/g, " ").trim()) !== null && _b !== void 0 ? _b : "";
146
+ }
147
+ set value(next) {
148
+ const newValue = `${next !== null && next !== void 0 ? next : ""}`;
149
+ this._value = newValue;
150
+ this.dirtyValue = true;
151
+ if (this.proxy instanceof HTMLOptionElement) {
152
+ this.proxy.value = newValue;
153
+ }
154
+ Observable.notify(this, "value");
155
+ }
156
+ get value() {
157
+ var _a;
158
+ Observable.track(this, "value");
159
+ return (_a = this._value) !== null && _a !== void 0 ? _a : this.text;
160
+ }
161
+ get form() {
162
+ return this.proxy ? this.proxy.form : null;
163
+ }
164
+ };
165
+ __decorate([
166
+ observable
167
+ ], ListboxOption$1.prototype, "checked", void 0);
168
+ __decorate([
169
+ observable
170
+ ], ListboxOption$1.prototype, "content", void 0);
171
+ __decorate([
172
+ observable
173
+ ], ListboxOption$1.prototype, "defaultSelected", void 0);
174
+ __decorate([
175
+ attr({ mode: "boolean" })
176
+ ], ListboxOption$1.prototype, "disabled", void 0);
177
+ __decorate([
178
+ attr({ attribute: "selected", mode: "boolean" })
179
+ ], ListboxOption$1.prototype, "selectedAttribute", void 0);
180
+ __decorate([
181
+ observable
182
+ ], ListboxOption$1.prototype, "selected", void 0);
183
+ __decorate([
184
+ attr({ attribute: "value", mode: "fromView" })
185
+ ], ListboxOption$1.prototype, "initialValue", void 0);
186
+ /**
187
+ * States and properties relating to the ARIA `option` role.
188
+ *
189
+ * @public
190
+ */
191
+ class DelegatesARIAListboxOption {
192
+ }
193
+ __decorate([
194
+ observable
195
+ ], DelegatesARIAListboxOption.prototype, "ariaChecked", void 0);
196
+ __decorate([
197
+ observable
198
+ ], DelegatesARIAListboxOption.prototype, "ariaPosInSet", void 0);
199
+ __decorate([
200
+ observable
201
+ ], DelegatesARIAListboxOption.prototype, "ariaSelected", void 0);
202
+ __decorate([
203
+ observable
204
+ ], DelegatesARIAListboxOption.prototype, "ariaSetSize", void 0);
205
+ applyMixins(DelegatesARIAListboxOption, ARIAGlobalStatesAndProperties);
206
+ applyMixins(ListboxOption$1, StartEnd, DelegatesARIAListboxOption);
12
207
 
13
- var _NavDisclosure_onToggle;
14
- class NavDisclosure extends FoundationElement {
15
- constructor() {
16
- super(...arguments);
17
- this.open = false;
18
- this.ariaCurrent = null;
19
- _NavDisclosure_onToggle.set(this, () => {
20
- this.open = this.details.open;
21
- this.$emit('toggle', undefined, {
22
- bubbles: false
23
- });
24
- });
208
+ var __defProp = Object.defineProperty;
209
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
210
+ var __decorateClass = (decorators, target, key, kind) => {
211
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
212
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
213
+ if (decorator = decorators[i])
214
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
215
+ if (kind && result)
216
+ __defProp(target, key, result);
217
+ return result;
218
+ };
219
+ class ListboxOption extends ListboxOption$1 {
220
+ // #region overrides base class accessor
221
+ set text(value) {
222
+ this._text = value;
25
223
  }
26
- connectedCallback() {
27
- super.connectedCallback();
28
- this.details.addEventListener('toggle', __classPrivateFieldGet(this, _NavDisclosure_onToggle, "f"));
29
- this.details.open = this.open;
224
+ get text() {
225
+ return this._text ?? "";
30
226
  }
31
- disconnectedCallback() {
32
- super.disconnectedCallback();
33
- this.details.removeEventListener('toggle', __classPrivateFieldGet(this, _NavDisclosure_onToggle, "f"));
227
+ get label() {
228
+ return this._label ?? this.text;
34
229
  }
230
+ set label(value) {
231
+ this._label = value;
232
+ }
233
+ // #endregion overrides
35
234
  }
36
- _NavDisclosure_onToggle = new WeakMap();
37
- __decorate([attr, __metadata("design:type", String)], NavDisclosure.prototype, "label", void 0);
38
- __decorate([attr({
39
- mode: 'boolean'
40
- }), __metadata("design:type", Object)], NavDisclosure.prototype, "open", void 0);
41
- __decorate([attr({
42
- attribute: 'aria-current'
43
- }), __metadata("design:type", Object)], NavDisclosure.prototype, "ariaCurrent", void 0);
44
- applyMixins(NavDisclosure, AffixIcon);
235
+ __decorateClass([
236
+ attr({
237
+ attribute: "text"
238
+ })
239
+ ], ListboxOption.prototype, "_text", 2);
240
+ __decorateClass([
241
+ attr({
242
+ attribute: "label"
243
+ })
244
+ ], ListboxOption.prototype, "_label", 2);
245
+ applyMixins(ListboxOption, AffixIconWithTrailing);
45
246
 
46
- function getAriaCurrent(ariaCurrent, open) {
47
- return ariaCurrent && !open;
48
- }
49
- const NavDisclosureTemplate = context => {
50
- const affixIconTemplate = affixIconTemplateFactory(context);
247
+ const getClasses = ({
248
+ icon,
249
+ disabled,
250
+ selected,
251
+ checked
252
+ }) => classNames(
253
+ "base",
254
+ ["disabled", disabled],
255
+ ["selected", Boolean(selected)],
256
+ ["active", Boolean(checked)],
257
+ ["icon", Boolean(icon)]
258
+ );
259
+ const ListboxOptionTemplate = (context) => {
260
+ const affixIconTemplate = affixIconTemplateFactory(context, false);
51
261
  const focusTemplate = focusTemplateFactory(context);
52
- const iconTag = context.tagFor(Icon);
53
- return html`<details class="base" ${ref('details')} ?open=${x => x.open}>
54
- <summary class="control"
55
- role="button"
56
- aria-controls="disclosure-content"
57
- aria-expanded="${x => x.open}"
58
- ?aria-current=${x => getAriaCurrent(x.ariaCurrent, x.open)}>
59
- ${x => affixIconTemplate(x.icon)}
60
- ${x => x.label}
61
- <slot name="meta"></slot>
62
- ${when(x => x.open, html`<${iconTag} class="toggleIcon" name='chevron-up-solid'></${iconTag}>`)}
63
- ${when(x => !x.open, html`<${iconTag} class="toggleIcon" name='chevron-down-solid'></${iconTag}>`)}
262
+ return html`
263
+ <template
264
+ aria-checked="${(x) => x.ariaChecked}"
265
+ aria-disabled="${(x) => x.ariaDisabled}"
266
+ aria-posinset="${(x) => x.ariaPosInSet}"
267
+ aria-selected="${(x) => x.ariaSelected}"
268
+ aria-setsize="${(x) => x.ariaSetSize}"
269
+ role="option">
270
+ <div class="${getClasses}">
64
271
  ${() => focusTemplate}
65
- </summary>
66
- <div class="content" id="disclosure-content">
67
- <slot></slot>
272
+ <slot name="icon">
273
+ ${when((x) => x.icon, html`${(x) => affixIconTemplate(x.icon)}`)}
274
+ </slot>
275
+ ${when((x) => x.text, html`<div class="text">${(x) => x.text}</div>`)}
68
276
  </div>
69
- </details>
277
+ </template>
70
278
  `;
71
279
  };
72
280
 
73
- const navDisclosureDefinition = NavDisclosure.compose({
74
- baseName: 'nav-disclosure',
75
- template: NavDisclosureTemplate,
76
- styles: css_248z
281
+ const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n.base {\n position: relative; /* this is needed for the focus */\n display: flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_option-appearance-color-text, var(--_appearance-color-text));\n font: var(--vvd-typography-base);\n gap: 12px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n padding-inline: 16px;\n vertical-align: middle;\n word-break: break-word;\n}\n.base {\n /* @cssprop [--vvd-option-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-option-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-option-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-option-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-option-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-option-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-option-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-option-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-option-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-option-accent-soft, var(--vvd-color-neutral-100));\n /* @cssprop [--vvd-option-accent-pale=var(--vvd-color-neutral-300)] */\n --_connotation-color-pale: var(--vvd-option-accent-pale, var(--vvd-color-neutral-300));\n /* @cssprop [--vvd-option-accent-dim=var(--vvd-color-neutral-200)] */\n --_connotation-color-dim: var(--vvd-option-accent-dim, var(--vvd-color-neutral-200));\n}\n.base {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.base:where(:disabled, .disabled) {\n --_appearance-color-text: var(--vvd-color-neutral-300);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.base:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-dim);\n --_appearance-color-outline: transparent;\n}\n.base:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-pale);\n --_appearance-color-outline: transparent;\n}\n@supports (user-select: none) {\n .base {\n user-select: none;\n }\n}\n.base:not(.disabled) {\n cursor: pointer;\n}\n.base.disabled {\n cursor: not-allowed;\n pointer-events: none;\n}\n.base .text {\n font: var(--vvd-typography-base);\n}\n\nslot[name=icon] {\n font-size: 20px;\n line-height: 1;\n}\n.base:not(.disabled, .selected) slot[name=icon] {\n color: var(--vvd-color-neutral-600);\n}\n\n.focus-indicator {\n --focus-stroke-color: var(--vvd-color-neutral-500);\n --focus-stroke-gap-color: transparent;\n}\n:host(:not([aria-checked=true])) .focus-indicator {\n display: none;\n}";
282
+
283
+ const listboxOptionDefinition = ListboxOption.compose({
284
+ baseName: "option",
285
+ template: ListboxOptionTemplate,
286
+ styles
77
287
  });
78
- const navDisclosureRegistries = [navDisclosureDefinition(), ...iconRegistries, ...focusRegistries];
79
- const registerNavDisclosure = registerFactory(navDisclosureRegistries);
288
+ const listboxOptionRegistries = [listboxOptionDefinition(), ...iconRegistries, ...focusRegistries];
289
+ const registerOption = registerFactory(listboxOptionRegistries);
80
290
 
81
- export { navDisclosureRegistries as a, navDisclosureDefinition as n, registerNavDisclosure as r };
291
+ export { ListboxOption as L, listboxOptionRegistries as a, isListboxOption as i, listboxOptionDefinition as l, registerOption as r };
@@ -1,33 +1,203 @@
1
- import { h as html, r as registerFactory } from './index.js';
2
- import { i as iconRegistries } from './definition3.js';
3
- import { f as focusRegistries } from './definition4.js';
4
- import { b as AffixIcon } from './affix.js';
5
- import { T as TextAnchor } from './text-anchor.js';
6
- import { a as applyMixins } from './apply-mixins.js';
7
- import { t as textAnchorTemplate } from './text-anchor.template.js';
1
+ import { d as Size, S as Shape, B as Button, a as buttonRegistries } from './definition10.js';
2
+ import { a as attr, F as FoundationElement, o as observable, v as volatile, h as html, r as registerFactory } from './index.js';
3
+ import { e as elements } from './node-observation.js';
4
+ import { r as ref } from './ref.js';
5
+ import { c as children } from './children.js';
6
+ import { r as repeat } from './repeat.js';
7
+ import { c as classNames } from './class-names.js';
8
+ import { w as when } from './when.js';
8
9
 
9
- var css_248z = "/**\n * Do not edit directly\n * Generated on Thu, 17 Aug 2023 11:13:18 GMT\n */\n.control {\n position: relative;\n display: inline-flex;\n box-sizing: border-box;\n align-items: center;\n background-color: var(--_appearance-color-fill);\n border-radius: 6px;\n box-shadow: inset 0 0 0 1px var(--_appearance-color-outline);\n color: var(--_appearance-color-text);\n font: var(--vvd-typography-base);\n gap: 12px;\n hyphens: auto;\n inline-size: 100%;\n min-block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n text-decoration: none;\n vertical-align: middle;\n}\n.control {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: transparent;\n --_appearance-color-outline: transparent;\n}\n.control:where(:hover, .hover):where(:not(:disabled, .disabled, .readonly)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-faint);\n --_appearance-color-outline: transparent;\n}\n.control:where(:active, .active):where(:not(:disabled, .disabled)) {\n --_appearance-color-text: var(--_connotation-color-primary);\n --_appearance-color-fill: var(--_connotation-color-soft);\n --_appearance-color-outline: transparent;\n}\n.control:where(.selected, [aria-current]):where(:not(:disabled, .disabled, :hover, .hover)) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary);\n --_appearance-color-outline: transparent;\n}\n.control:where(.selected, [aria-current]):where(:hover, .hover) {\n --_appearance-color-text: var(--_connotation-color-primary-text);\n --_appearance-color-fill: var(--_connotation-color-primary-increment);\n --_appearance-color-outline: transparent;\n}\n.control {\n /* @cssprop [--vvd-nav-item-accent-primary=var(--vvd-color-canvas-text)] */\n --_connotation-color-primary: var(--vvd-nav-item-accent-primary, var(--vvd-color-canvas-text));\n /* @cssprop [--vvd-nav-item-accent-primary-text=var(--vvd-color-canvas)] */\n --_connotation-color-primary-text: var(--vvd-nav-item-accent-primary-text, var(--vvd-color-canvas));\n /* @cssprop [--vvd-nav-item-accent-primary-increment=var(--vvd-color-neutral-800)] */\n --_connotation-color-primary-increment: var(--vvd-nav-item-accent-primary-increment, var(--vvd-color-neutral-800));\n /* @cssprop [--vvd-nav-item-accent-faint=var(--vvd-color-neutral-50)] */\n --_connotation-color-faint: var(--vvd-nav-item-accent-faint, var(--vvd-color-neutral-50));\n /* @cssprop [--vvd-nav-item-accent-soft=var(--vvd-color-neutral-100)] */\n --_connotation-color-soft: var(--vvd-nav-item-accent-soft, var(--vvd-color-neutral-100));\n}\n@supports selector(:focus-visible) {\n .control:focus-visible {\n outline: none;\n }\n}\n.control.icon-only {\n display: flex;\n block-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n place-content: center;\n}\n.control:not(.icon-only) {\n padding-inline: 16px;\n}\n\n.focus-indicator {\n --focus-stroke-gap-color: transparent;\n}\n.control:not(:focus-visible) .focus-indicator {\n display: none;\n}\n\n.icon {\n font-size: 20px;\n line-height: 1;\n}";
10
+ const styles = "/**\n * Do not edit directly\n * Generated on Mon, 04 Sep 2023 12:44:18 GMT\n */\n.control {\n display: inline-flex;\n justify-content: space-between;\n}\n.control:not(.shape-pill) {\n border-radius: 4px;\n}\n.control.shape-pill {\n border-radius: 14px;\n}\n\n.buttons-wrapper {\n display: flex;\n column-gap: 4px;\n}\n\n.dots {\n align-self: center;\n text-align: center;\n}\n.dots:not(.size-super-condensed) {\n font: var(--vvd-typography-base-bold);\n}\n.dots.size-super-condensed {\n font: var(--vvd-typography-base-condensed-bold);\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 16));\n}\n.dots.size-condensed {\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2) - 8));\n}\n.dots.size-normal {\n inline-size: calc(1px * (40 + 4 * clamp(-1, var(--vvd-size-density, 0), 2)));\n}";
10
11
 
11
- class NavItem extends TextAnchor {
12
- getBodyTemplate() {
13
- return html`<slot name="meta"></slot>`;
12
+ var __defProp = Object.defineProperty;
13
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
+ var __decorateClass = (decorators, target, key, kind) => {
15
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
16
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
17
+ if (decorator = decorators[i])
18
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
19
+ if (kind && result)
20
+ __defProp(target, key, result);
21
+ return result;
22
+ };
23
+ const MAX_DIGITS_AND_PLACEHOLDERS = 7;
24
+ const totalConverter = {
25
+ fromView: (value) => parseInt(value, 10),
26
+ toView: (value) => value.toString()
27
+ };
28
+ class Pagination extends FoundationElement {
29
+ constructor() {
30
+ super();
31
+ this.navIcons = false;
32
+ this.total = 0;
33
+ this.selectedIndex = 0;
34
+ this.addEventListener("tabpressed", (e) => {
35
+ const { value: currentLabel, shiftKey } = e.detail;
36
+ const index = this.paginationButtons.findIndex((button) => Number(button.label) === currentLabel);
37
+ const focusDirection = shiftKey ? -1 : 1;
38
+ const newIndex = index + focusDirection;
39
+ if (newIndex < 0) {
40
+ return this.prevButton.focus();
41
+ }
42
+ if (newIndex > this.paginationButtons.length - 1) {
43
+ return this.nextButton.focus();
44
+ }
45
+ this.paginationButtons && this.paginationButtons[index + focusDirection].focus();
46
+ });
47
+ }
48
+ get pagesList() {
49
+ return new Array(this.total < MAX_DIGITS_AND_PLACEHOLDERS ? this.total : MAX_DIGITS_AND_PLACEHOLDERS).fill(0).map((_, i, arr) => {
50
+ if (i === 0)
51
+ return 1;
52
+ if (i === arr.length - 1)
53
+ return this.total;
54
+ if (this.selectedIndex !== void 0 && this.total > MAX_DIGITS_AND_PLACEHOLDERS) {
55
+ if (this.selectedIndex < 4) {
56
+ if (i === MAX_DIGITS_AND_PLACEHOLDERS - 2)
57
+ return "...";
58
+ }
59
+ if (this.selectedIndex >= 4 && this.selectedIndex <= this.total - 5) {
60
+ if (i > 1 && i < MAX_DIGITS_AND_PLACEHOLDERS - 2)
61
+ return this.selectedIndex + (i - 2);
62
+ if (i === 1 || i === MAX_DIGITS_AND_PLACEHOLDERS - 2)
63
+ return "...";
64
+ }
65
+ if (this.selectedIndex > this.total - 5) {
66
+ if (i > 1)
67
+ return this.total - (6 - i);
68
+ if (i === 1)
69
+ return "...";
70
+ }
71
+ }
72
+ return i + 1;
73
+ });
74
+ }
75
+ totalChanged(_, newValue) {
76
+ if (newValue < 0) {
77
+ this.total = 0;
78
+ }
79
+ this.selectedIndex = 0;
80
+ }
81
+ selectedIndexChanged(oldValue, newValue) {
82
+ if (oldValue === void 0)
83
+ return;
84
+ this.$emit("pagination-change", { selectedIndex: newValue, total: this.total, oldIndex: oldValue });
85
+ }
86
+ paginationButtonsChanged(_, newValue) {
87
+ newValue.forEach((button) => {
88
+ button.shadowRoot.querySelector("button").classList.add("icon-only");
89
+ });
14
90
  }
15
91
  }
16
- applyMixins(NavItem, AffixIcon);
17
-
18
- const NavItemTemplate = (context, definition) => html`
19
- ${textAnchorTemplate(context)}
20
- `;
92
+ __decorateClass([
93
+ attr
94
+ ], Pagination.prototype, "size", 2);
95
+ __decorateClass([
96
+ attr
97
+ ], Pagination.prototype, "shape", 2);
98
+ __decorateClass([
99
+ observable
100
+ ], Pagination.prototype, "paginationButtons", 2);
101
+ __decorateClass([
102
+ observable
103
+ ], Pagination.prototype, "prevButton", 2);
104
+ __decorateClass([
105
+ observable
106
+ ], Pagination.prototype, "nextButton", 2);
107
+ __decorateClass([
108
+ attr({ attribute: "nav-icons", mode: "boolean" })
109
+ ], Pagination.prototype, "navIcons", 2);
110
+ __decorateClass([
111
+ volatile
112
+ ], Pagination.prototype, "pagesList", 1);
113
+ __decorateClass([
114
+ attr({ mode: "reflect", converter: totalConverter })
115
+ ], Pagination.prototype, "total", 2);
116
+ __decorateClass([
117
+ attr({ mode: "reflect", converter: totalConverter, attribute: "selected-index" })
118
+ ], Pagination.prototype, "selectedIndex", 2);
21
119
 
22
- const navItemDefinition = NavItem.compose({
23
- baseName: 'nav-item',
24
- template: NavItemTemplate,
25
- styles: css_248z,
26
- shadowOptions: {
27
- delegatesFocus: true
120
+ const ALLOWED_SIZES = [Size.SuperCondensed, Size.Condensed, Size.Normal];
121
+ const ALLOWED_SHAPES = [Shape.Rounded, Shape.Pill];
122
+ const handleSelection = (value, { parent: x }) => {
123
+ return x.selectedIndex = Number(value) - 1;
124
+ };
125
+ const handleKeyDown = (value, { event, parent }) => {
126
+ if (event.key === " " || event.key === "Enter") {
127
+ handleSelection(value, { parent });
28
128
  }
129
+ if (event.key === "Tab") {
130
+ event.target.dispatchEvent(
131
+ new CustomEvent("tabpressed", { detail: { value, shiftKey: event.shiftKey }, bubbles: true, composed: true })
132
+ );
133
+ }
134
+ };
135
+ const getClasses = (_) => classNames("control");
136
+ function getButtonAppearance(value, { parent }) {
137
+ return parent.selectedIndex === Number(value) - 1 ? "filled" : "ghost";
138
+ }
139
+ const paginationButtonRenderer = (buttonTag) => html`
140
+ ${when(
141
+ (value) => value !== "...",
142
+ html`
143
+ <${buttonTag} class="vwc-pagination-button"
144
+ label="${(value) => value}"
145
+ appearance="${getButtonAppearance}"
146
+ size="${(_, { parent: x }) => getPaginationSize(x)}"
147
+ shape="${(_, { parent: x }) => getPaginationShape(x)}"
148
+ tabindex="0"
149
+ aria-pressed="${(value, { parent }) => parent.selectedIndex === Number(value) - 1}"
150
+ @click="${handleSelection}"
151
+ @keydown="${handleKeyDown}"
152
+ </${buttonTag}>
153
+ `
154
+ )}
155
+ ${when((value) => value === "...", html`<div class="dots size-${getPaginationSize} shape-${getPaginationShape}">...</div>`)}`;
156
+ const getPaginationSize = (x) => {
157
+ if (!x.size || !ALLOWED_SIZES.includes(x.size)) {
158
+ return Size.SuperCondensed;
159
+ }
160
+ return x.size;
161
+ };
162
+ const getPaginationShape = (x) => {
163
+ if (!x.shape || !ALLOWED_SHAPES.includes(x.shape)) {
164
+ return Shape.Rounded;
165
+ }
166
+ return x.shape;
167
+ };
168
+ const PaginationTemplate = (context) => {
169
+ const buttonTag = context.tagFor(Button);
170
+ const paginationButtonTemplate = paginationButtonRenderer(buttonTag);
171
+ return html`
172
+ <div class="${getClasses}">
173
+ <${buttonTag} class="prev-button" ${ref("prevButton")}
174
+ label="${(x) => !x.navIcons ? "Previous" : null}"
175
+ icon="${(x) => x.navIcons ? "chevron-left-line" : null}"
176
+ size="${getPaginationSize}"
177
+ shape="${getPaginationShape}"
178
+ ?disabled="${(x) => x.total === 0 || x.selectedIndex === 0}"
179
+ @click="${(x) => x.selectedIndex !== void 0 && x.selectedIndex--}"
180
+ ></${buttonTag}>
181
+ <div id="buttons-wrapper" class="buttons-wrapper" ${children({ property: "paginationButtons", filter: elements(buttonTag) })}>
182
+ ${repeat((x) => x.pagesList, paginationButtonTemplate, { positioning: true })}
183
+ </div>
184
+ <${buttonTag} class="next-button" ${ref("nextButton")}
185
+ label="${(x) => !x.navIcons ? "Next" : null}"
186
+ icon="${(x) => x.navIcons ? "chevron-right-line" : null}"
187
+ size="${getPaginationSize}"
188
+ shape="${getPaginationShape}"
189
+ ?disabled="${(x) => x.total === 0 || x.selectedIndex === x.total - 1}"
190
+ @click="${(x) => x.selectedIndex !== void 0 && x.selectedIndex++}"
191
+ ></${buttonTag}>
192
+ </div>`;
193
+ };
194
+
195
+ const paginationDefinition = Pagination.compose({
196
+ baseName: "pagination",
197
+ template: PaginationTemplate,
198
+ styles
29
199
  });
30
- const navItemRegistries = [navItemDefinition(), ...iconRegistries, ...focusRegistries];
31
- const registerNavItem = registerFactory(navItemRegistries);
200
+ const paginationRegistries = [paginationDefinition(), buttonRegistries];
201
+ const registerPagination = registerFactory(paginationRegistries);
32
202
 
33
- export { navItemRegistries as a, navItemDefinition as n, registerNavItem as r };
203
+ export { paginationRegistries as a, paginationDefinition as p, registerPagination as r };