@vonage/vivid 4.25.0 → 4.27.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.
- package/custom-elements.json +3371 -1999
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/action-group/action-group.d.ts +1 -1
- package/lib/alert/alert.d.ts +5 -5
- package/lib/audio-player/audio-player.d.ts +3 -3
- package/lib/avatar/avatar.d.ts +393 -1
- package/lib/avatar/avatar.template.d.ts +2 -2
- package/lib/badge/badge.d.ts +2 -2
- package/lib/banner/banner.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/lib/button/button.d.ts +6 -6
- package/lib/calendar/calendar.d.ts +2 -0
- package/lib/calendar-event/calendar-event.d.ts +1 -1
- package/lib/card/card.d.ts +1 -1
- package/lib/checkbox/checkbox.d.ts +10 -10
- package/lib/combobox/combobox.d.ts +11 -11
- package/lib/data-grid/data-grid-cell.d.ts +6 -4
- package/lib/data-grid/data-grid-row.d.ts +1 -0
- package/lib/data-grid/data-grid.d.ts +1 -1
- package/lib/date-picker/date-picker.d.ts +75 -75
- package/lib/date-picker/date-picker.template.d.ts +1 -1
- package/lib/date-range-picker/date-range-picker.d.ts +44 -44
- package/lib/date-range-picker/date-range-picker.template.d.ts +1 -1
- package/lib/date-time-picker/date-time-picker.d.ts +64 -64
- package/lib/date-time-picker/date-time-picker.template.d.ts +1 -1
- package/lib/dial-pad/dial-pad.d.ts +3 -3
- package/lib/dialog/dialog.d.ts +5 -4
- package/lib/divider/divider.d.ts +1 -1
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +10 -10
- package/lib/header/header.d.ts +1 -1
- package/lib/menu/menu.d.ts +2 -2
- package/lib/menu-item/menu-item.d.ts +3 -3
- package/lib/nav/nav.d.ts +1 -1
- package/lib/nav-disclosure/nav-disclosure.d.ts +3 -3
- package/lib/nav-item/nav-item.d.ts +3 -3
- package/lib/note/note.d.ts +2 -2
- package/lib/number-field/locale.d.ts +3 -2
- package/lib/number-field/number-field.d.ts +15 -15
- package/lib/option/option.d.ts +3 -3
- package/lib/pagination/locale.d.ts +5 -0
- package/lib/pagination/pagination.d.ts +341 -2
- package/lib/popup/popup.d.ts +1 -0
- package/lib/progress/progress.d.ts +1 -1
- package/lib/progress-ring/progress-ring.d.ts +1 -1
- package/lib/radio/radio.d.ts +3 -3
- package/lib/radio-group/radio-group.d.ts +4 -4
- package/lib/range-slider/range-slider.d.ts +5 -5
- package/lib/rich-text-editor/menubar/menubar.d.ts +3 -3
- package/lib/rich-text-editor/rich-text-editor.d.ts +3 -3
- package/lib/searchable-select/locale.d.ts +1 -1
- package/lib/searchable-select/option-tag.d.ts +3 -3
- package/lib/searchable-select/searchable-select.d.ts +15 -15
- package/lib/select/select.d.ts +12 -12
- package/lib/selectable-box/selectable-box.d.ts +1 -1
- package/lib/slider/slider.d.ts +5 -5
- package/lib/split-button/split-button.d.ts +6 -6
- package/lib/switch/switch.d.ts +2 -2
- package/lib/tab/tab.d.ts +6 -6
- package/lib/tab-panel/tab-panel.d.ts +1 -1
- package/lib/tag/locale.d.ts +3 -0
- package/lib/tag/tag.d.ts +343 -6
- package/lib/tag-group/tag-group.d.ts +1 -1
- package/lib/text-area/text-area.d.ts +14 -14
- package/lib/text-field/text-field.d.ts +16 -16
- package/lib/time-picker/time-picker.d.ts +21 -21
- package/lib/toggletip/toggletip.d.ts +1 -1
- package/lib/tooltip/tooltip.d.ts +1 -1
- package/lib/tree-item/tree-item.d.ts +3 -3
- package/lib/tree-view/tree-view.d.ts +1 -1
- package/lib/video-player/video-player.d.ts +3 -3
- package/locales/de-DE.cjs +40 -5
- package/locales/de-DE.js +40 -5
- package/locales/en-GB.cjs +40 -5
- package/locales/en-GB.js +40 -5
- package/locales/en-US.cjs +40 -5
- package/locales/en-US.js +40 -5
- package/locales/ja-JP.cjs +40 -5
- package/locales/ja-JP.js +40 -5
- package/locales/zh-CN.cjs +40 -5
- package/locales/zh-CN.js +40 -5
- package/package.json +73 -45
- package/shared/aria/delegates-aria.d.ts +1 -1
- package/shared/aria/host-semantics.d.ts +1 -1
- package/shared/calendar-picker.template.cjs +40 -13
- package/shared/calendar-picker.template.js +40 -13
- package/shared/definition.cjs +19 -3
- package/shared/definition.js +20 -4
- package/shared/definition11.cjs +1 -1
- package/shared/definition11.js +1 -1
- package/shared/definition13.cjs +25 -0
- package/shared/definition13.js +26 -1
- package/shared/definition15.cjs +1 -1
- package/shared/definition15.js +1 -1
- package/shared/definition16.cjs +1 -1
- package/shared/definition16.js +1 -1
- package/shared/definition17.cjs +602 -522
- package/shared/definition17.js +600 -520
- package/shared/definition18.cjs +8 -1
- package/shared/definition18.js +8 -1
- package/shared/definition19.cjs +9 -2
- package/shared/definition19.js +9 -2
- package/shared/definition2.cjs +1 -1
- package/shared/definition2.js +1 -1
- package/shared/definition20.cjs +3 -1
- package/shared/definition20.js +3 -1
- package/shared/definition21.cjs +2 -2
- package/shared/definition21.js +2 -2
- package/shared/definition22.cjs +9 -3
- package/shared/definition22.js +9 -3
- package/shared/definition28.cjs +2 -2
- package/shared/definition28.js +2 -2
- package/shared/definition3.cjs +1 -1
- package/shared/definition3.js +1 -1
- package/shared/definition30.cjs +1 -1
- package/shared/definition30.js +1 -1
- package/shared/definition31.cjs +1 -1
- package/shared/definition31.js +1 -1
- package/shared/definition32.cjs +1 -1
- package/shared/definition32.js +1 -1
- package/shared/definition36.cjs +41 -30
- package/shared/definition36.js +34 -23
- package/shared/definition38.cjs +30 -23
- package/shared/definition38.js +30 -23
- package/shared/definition4.cjs +1 -1
- package/shared/definition4.js +1 -1
- package/shared/definition41.cjs +1 -1
- package/shared/definition41.js +1 -1
- package/shared/definition42.cjs +2 -2
- package/shared/definition42.js +2 -2
- package/shared/definition44.cjs +129 -117
- package/shared/definition44.js +130 -118
- package/shared/definition45.cjs +17 -7
- package/shared/definition45.js +17 -7
- package/shared/definition46.cjs +1 -1
- package/shared/definition46.js +1 -1
- package/shared/definition49.cjs +6 -6
- package/shared/definition49.js +6 -6
- package/shared/definition54.cjs +2 -2
- package/shared/definition54.js +2 -2
- package/shared/definition56.cjs +5 -4
- package/shared/definition56.js +5 -4
- package/shared/definition57.cjs +1 -1
- package/shared/definition57.js +1 -1
- package/shared/definition58.cjs +1 -1
- package/shared/definition58.js +1 -1
- package/shared/definition59.cjs +3 -1
- package/shared/definition59.js +3 -1
- package/shared/definition6.cjs +45 -12
- package/shared/definition6.js +45 -12
- package/shared/definition63.cjs +2 -2
- package/shared/definition63.js +2 -2
- package/shared/definition64.cjs +136 -38
- package/shared/definition64.js +136 -38
- package/shared/definition67.cjs +36 -15
- package/shared/definition67.js +37 -16
- package/shared/feedback/feedback-message.d.ts +1 -1
- package/shared/feedback/mixins.d.ts +2 -2
- package/shared/form-associated.cjs +4 -0
- package/shared/form-associated.js +4 -0
- package/shared/foundation/button/button.d.ts +1 -1
- package/shared/foundation/vivid-element/vivid-element.d.ts +2 -0
- package/shared/key-codes.js +1 -1
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/mixins.cjs +4 -1
- package/shared/mixins.js +4 -1
- package/shared/patterns/affix.d.ts +2 -2
- package/shared/patterns/char-count/char-count.d.ts +1 -1
- package/shared/patterns/form-elements/with-success-text.d.ts +1 -1
- package/shared/patterns/linkable.d.ts +1 -1
- package/shared/patterns/localized.d.ts +1 -1
- package/shared/patterns/trapped-focus.d.ts +1 -1
- package/shared/picker-field/mixins/calendar-picker.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.locale.d.ts +5 -0
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-segments/segment.d.ts +1 -0
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +1 -1
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +4 -4
- package/shared/picker-field/mixins/single-date-picker.d.ts +4 -4
- package/shared/picker-field/mixins/single-value-picker.d.ts +1 -1
- package/shared/picker-field/mixins/time-selection-picker.d.ts +2 -2
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +2 -2
- package/shared/picker-field/picker-field.d.ts +3 -3
- package/shared/picker-field.template.cjs +13 -13
- package/shared/picker-field.template.js +13 -13
- package/shared/vivid-element.cjs +11 -1
- package/shared/vivid-element.js +11 -1
- package/styles/core/all.css +5 -5
- package/styles/core/theme.css +2 -2
- package/styles/core/typography.css +4 -4
- package/styles/fonts/spezia-variable.css +15 -15
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/vivid.api.json +395 -277
package/shared/definition36.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { d as dividerDefinition } from './definition23.js';
|
|
3
|
-
import {
|
|
3
|
+
import { V as VisuallyHidden, v as visuallyHiddenDefinition } from './definition66.js';
|
|
4
4
|
import { i as iconDefinition } from './definition28.js';
|
|
5
5
|
import { a as WithFeedback, f as feedbackMessageDefinition } from './mixins.js';
|
|
6
|
+
import { D as DOM, V as VividElement, a as attr, n as nullableNumberConverter, o as observable, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
6
7
|
import { D as DelegatesAria, d as delegateAria } from './delegates-aria.js';
|
|
7
8
|
import { F as FormAssociated } from './form-associated.js';
|
|
8
9
|
import { W as WithErrorText } from './with-error-text.js';
|
|
@@ -36,6 +37,9 @@ function makeStep(element, direction) {
|
|
|
36
37
|
const value = parseFloat(element.value);
|
|
37
38
|
const stepUpValue = !isNaN(value) ? value + direction * element.step : element.min > 0 ? element.min : element.max < 0 ? element.max : !element.min ? direction * element.step : 0;
|
|
38
39
|
element.value = Number(stepUpValue.toFixed(12)).toString();
|
|
40
|
+
element._updatedValueAnnouncement = element.locale.numberField.updatedValueAnnouncement(
|
|
41
|
+
element._presentationValue
|
|
42
|
+
);
|
|
39
43
|
}
|
|
40
44
|
const buildNumberPatterns = (decimalSeparator) => {
|
|
41
45
|
const ds = decimalSeparator.source;
|
|
@@ -66,7 +70,7 @@ class NumberField extends WithFeedback(
|
|
|
66
70
|
this.proxy = document.createElement("input");
|
|
67
71
|
this.readOnly = false;
|
|
68
72
|
this.autofocus = false;
|
|
69
|
-
// eslint-disable-next-line @
|
|
73
|
+
// eslint-disable-next-line @repo/repo/no-attribute-default-value
|
|
70
74
|
this.step = 1;
|
|
71
75
|
/**
|
|
72
76
|
* Flag to indicate that the value change is from the user input
|
|
@@ -74,6 +78,7 @@ class NumberField extends WithFeedback(
|
|
|
74
78
|
*/
|
|
75
79
|
this.isUserInput = false;
|
|
76
80
|
this._presentationValue = "";
|
|
81
|
+
this._updatedValueAnnouncement = "";
|
|
77
82
|
this.incrementButtonAriaLabel = null;
|
|
78
83
|
this.decrementButtonAriaLabel = null;
|
|
79
84
|
}
|
|
@@ -279,6 +284,9 @@ __decorateClass([
|
|
|
279
284
|
__decorateClass([
|
|
280
285
|
observable
|
|
281
286
|
], NumberField.prototype, "_presentationValue");
|
|
287
|
+
__decorateClass([
|
|
288
|
+
observable
|
|
289
|
+
], NumberField.prototype, "_updatedValueAnnouncement");
|
|
282
290
|
__decorateClass([
|
|
283
291
|
attr({ attribute: "increment-button-aria-label" })
|
|
284
292
|
], NumberField.prototype, "incrementButtonAriaLabel");
|
|
@@ -333,29 +341,29 @@ function numberControlButtons(context) {
|
|
|
333
341
|
const buttonTag = context.tagFor(Button);
|
|
334
342
|
const dividerTag = context.tagFor(Divider);
|
|
335
343
|
return html`
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
</div>
|
|
344
|
+
<div class="control-buttons" ?inert="${(x) => x.disabled || x.readOnly}">
|
|
345
|
+
<${buttonTag} id="subtract" icon="minus-line"
|
|
346
|
+
?disabled="${(x) => x.disabled || x.readOnly}"
|
|
347
|
+
aria-label=${(x) => x.decrementButtonAriaLabel || x.locale.numberField.decrementButtonLabel(x.step)}
|
|
348
|
+
shape="${setControlButtonShape}"
|
|
349
|
+
type="button"
|
|
350
|
+
size="${(x) => x.scale === "condensed" ? "super-condensed" : "condensed"}"
|
|
351
|
+
tabindex="${getTabIndex}"
|
|
352
|
+
@click="${(x) => x.stepDown()}"></${buttonTag}>
|
|
353
|
+
<${dividerTag} class="divider" orientation="vertical"></${dividerTag}>
|
|
354
|
+
<${buttonTag} id="add" icon="plus-line"
|
|
355
|
+
?disabled="${(x) => x.disabled || x.readOnly}"
|
|
356
|
+
aria-label=${(x) => x.incrementButtonAriaLabel || x.locale.numberField.incrementButtonLabel(x.step)}
|
|
357
|
+
shape="${setControlButtonShape}"
|
|
358
|
+
type="button"
|
|
359
|
+
size="${(x) => x.scale === "condensed" ? "super-condensed" : "condensed"}"
|
|
360
|
+
tabindex="${getTabIndex}"
|
|
361
|
+
@click="${(x) => x.stepUp()}"></${buttonTag}>
|
|
362
|
+
</div>
|
|
356
363
|
`;
|
|
357
364
|
}
|
|
358
365
|
const NumberFieldTemplate = (context) => {
|
|
366
|
+
const visuallyHiddenTag = context.tagFor(VisuallyHidden);
|
|
359
367
|
return html`
|
|
360
368
|
<div class="base ${getStateClasses}">
|
|
361
369
|
${when((x) => x.label, renderLabel())}
|
|
@@ -389,6 +397,8 @@ const NumberFieldTemplate = (context) => {
|
|
|
389
397
|
${() => numberControlButtons(context)}
|
|
390
398
|
</div>
|
|
391
399
|
${(x) => x._getFeedbackTemplate(context)}
|
|
400
|
+
<${visuallyHiddenTag} id="value-announcement" role="status" aria-atomic="true">
|
|
401
|
+
${(x) => x._updatedValueAnnouncement}</${visuallyHiddenTag}>
|
|
392
402
|
</div>
|
|
393
403
|
`;
|
|
394
404
|
};
|
|
@@ -401,7 +411,8 @@ const numberFieldDefinition = defineVividComponent(
|
|
|
401
411
|
buttonDefinition,
|
|
402
412
|
dividerDefinition,
|
|
403
413
|
iconDefinition,
|
|
404
|
-
feedbackMessageDefinition
|
|
414
|
+
feedbackMessageDefinition,
|
|
415
|
+
visuallyHiddenDefinition
|
|
405
416
|
],
|
|
406
417
|
{
|
|
407
418
|
styles,
|
package/shared/definition38.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const definition = require('./definition11.cjs');
|
|
4
4
|
const vividElement = require('./vivid-element.cjs');
|
|
5
|
+
const localized = require('./localized.cjs');
|
|
5
6
|
const enums = require('./enums.cjs');
|
|
6
7
|
const slotted = require('./slotted.cjs');
|
|
7
8
|
const classNames = require('./class-names.cjs');
|
|
@@ -27,7 +28,7 @@ const totalConverter = {
|
|
|
27
28
|
fromView: (value) => parseInt(value, 10),
|
|
28
29
|
toView: (value) => value.toString()
|
|
29
30
|
};
|
|
30
|
-
class Pagination extends vividElement.VividElement {
|
|
31
|
+
class Pagination extends localized.Localized(vividElement.VividElement) {
|
|
31
32
|
constructor() {
|
|
32
33
|
super();
|
|
33
34
|
this.navIcons = false;
|
|
@@ -169,21 +170,25 @@ const paginationButtonRenderer = (buttonTag) => vividElement.html` ${when.when(
|
|
|
169
170
|
(value) => value !== "...",
|
|
170
171
|
vividElement.html`
|
|
171
172
|
<${buttonTag} class="vwc-pagination-button"
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
label="${(value) => value}"
|
|
174
|
+
appearance="${getButtonAppearance}"
|
|
175
|
+
size="${(_, { parent: x }) => getPaginationSize(x)}"
|
|
176
|
+
shape="${(_, { parent: x }) => getPaginationShape(x)}"
|
|
177
|
+
style="inline-size: ${(value) => getPaginationButtonWidth(value)};"
|
|
178
|
+
tabindex="0"
|
|
179
|
+
aria-label="${(value, { parent: x }) => x.locale.pagination.goToPageLabel(value)}"
|
|
180
|
+
aria-current="${(value, { parent }) => parent.selectedIndex === Number(value) - 1}"
|
|
181
|
+
@click="${handleSelection}"
|
|
182
|
+
@keydown="${handleKeyDown}">
|
|
181
183
|
</${buttonTag}>
|
|
182
184
|
`
|
|
183
185
|
)}
|
|
184
186
|
${when.when(
|
|
185
187
|
(value) => value === "...",
|
|
186
|
-
vividElement.html` <div
|
|
188
|
+
vividElement.html` <div
|
|
189
|
+
class="dots size-${(_, { parent: x }) => getPaginationSize(x)}"
|
|
190
|
+
aria-hidden="true"
|
|
191
|
+
>
|
|
187
192
|
...
|
|
188
193
|
</div>`
|
|
189
194
|
)}`;
|
|
@@ -208,12 +213,13 @@ const PaginationTemplate = (context) => {
|
|
|
208
213
|
return vividElement.html`
|
|
209
214
|
<div class="${getClasses}">
|
|
210
215
|
<${buttonTag} class="prev-button" ${ref.ref("prevButton")}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
label="${(x) => !x.navIcons ? "Previous" : null}"
|
|
217
|
+
icon="${(x) => x.navIcons ? "chevron-left-line" : null}"
|
|
218
|
+
size="${getPaginationSize}"
|
|
219
|
+
shape="${getPaginationShape}"
|
|
220
|
+
?disabled="${(x) => x.total === 0 || x.selectedIndex === 0}"
|
|
221
|
+
@click="${(x) => x.selectedIndex !== void 0 && x.selectedIndex--}"
|
|
222
|
+
aria-label="${(x) => x.locale.pagination.previousPageLabel}"
|
|
217
223
|
></${buttonTag}>
|
|
218
224
|
<div id="buttons-wrapper" class="buttons-wrapper" ${children.children({
|
|
219
225
|
property: "paginationButtons",
|
|
@@ -222,12 +228,13 @@ const PaginationTemplate = (context) => {
|
|
|
222
228
|
${repeat.repeat((x) => x.pagesList, paginationButtonTemplate, { positioning: true })}
|
|
223
229
|
</div>
|
|
224
230
|
<${buttonTag} class="next-button" ${ref.ref("nextButton")}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
+
label="${(x) => !x.navIcons ? "Next" : null}"
|
|
232
|
+
icon="${(x) => x.navIcons ? "chevron-right-line" : null}"
|
|
233
|
+
size="${getPaginationSize}"
|
|
234
|
+
shape="${getPaginationShape}"
|
|
235
|
+
?disabled="${(x) => x.total === 0 || x.selectedIndex === x.total - 1}"
|
|
236
|
+
@click="${(x) => x.selectedIndex !== void 0 && x.selectedIndex++}"
|
|
237
|
+
aria-label="${(x) => x.locale.pagination.nextPageLabel}"
|
|
231
238
|
></${buttonTag}>
|
|
232
239
|
</div>`;
|
|
233
240
|
};
|
package/shared/definition38.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { B as Button, b as buttonDefinition } from './definition11.js';
|
|
2
2
|
import { V as VividElement, a as attr, o as observable, v as volatile, h as html, d as createRegisterFunction, f as defineVividComponent } from './vivid-element.js';
|
|
3
|
+
import { L as Localized } from './localized.js';
|
|
3
4
|
import { b as Size, S as Shape } from './enums.js';
|
|
4
5
|
import { e as elements } from './slotted.js';
|
|
5
6
|
import { c as classNames } from './class-names.js';
|
|
@@ -25,7 +26,7 @@ const totalConverter = {
|
|
|
25
26
|
fromView: (value) => parseInt(value, 10),
|
|
26
27
|
toView: (value) => value.toString()
|
|
27
28
|
};
|
|
28
|
-
class Pagination extends VividElement {
|
|
29
|
+
class Pagination extends Localized(VividElement) {
|
|
29
30
|
constructor() {
|
|
30
31
|
super();
|
|
31
32
|
this.navIcons = false;
|
|
@@ -167,21 +168,25 @@ const paginationButtonRenderer = (buttonTag) => html` ${when(
|
|
|
167
168
|
(value) => value !== "...",
|
|
168
169
|
html`
|
|
169
170
|
<${buttonTag} class="vwc-pagination-button"
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
171
|
+
label="${(value) => value}"
|
|
172
|
+
appearance="${getButtonAppearance}"
|
|
173
|
+
size="${(_, { parent: x }) => getPaginationSize(x)}"
|
|
174
|
+
shape="${(_, { parent: x }) => getPaginationShape(x)}"
|
|
175
|
+
style="inline-size: ${(value) => getPaginationButtonWidth(value)};"
|
|
176
|
+
tabindex="0"
|
|
177
|
+
aria-label="${(value, { parent: x }) => x.locale.pagination.goToPageLabel(value)}"
|
|
178
|
+
aria-current="${(value, { parent }) => parent.selectedIndex === Number(value) - 1}"
|
|
179
|
+
@click="${handleSelection}"
|
|
180
|
+
@keydown="${handleKeyDown}">
|
|
179
181
|
</${buttonTag}>
|
|
180
182
|
`
|
|
181
183
|
)}
|
|
182
184
|
${when(
|
|
183
185
|
(value) => value === "...",
|
|
184
|
-
html` <div
|
|
186
|
+
html` <div
|
|
187
|
+
class="dots size-${(_, { parent: x }) => getPaginationSize(x)}"
|
|
188
|
+
aria-hidden="true"
|
|
189
|
+
>
|
|
185
190
|
...
|
|
186
191
|
</div>`
|
|
187
192
|
)}`;
|
|
@@ -206,12 +211,13 @@ const PaginationTemplate = (context) => {
|
|
|
206
211
|
return html`
|
|
207
212
|
<div class="${getClasses}">
|
|
208
213
|
<${buttonTag} class="prev-button" ${ref("prevButton")}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
214
|
+
label="${(x) => !x.navIcons ? "Previous" : null}"
|
|
215
|
+
icon="${(x) => x.navIcons ? "chevron-left-line" : null}"
|
|
216
|
+
size="${getPaginationSize}"
|
|
217
|
+
shape="${getPaginationShape}"
|
|
218
|
+
?disabled="${(x) => x.total === 0 || x.selectedIndex === 0}"
|
|
219
|
+
@click="${(x) => x.selectedIndex !== void 0 && x.selectedIndex--}"
|
|
220
|
+
aria-label="${(x) => x.locale.pagination.previousPageLabel}"
|
|
215
221
|
></${buttonTag}>
|
|
216
222
|
<div id="buttons-wrapper" class="buttons-wrapper" ${children({
|
|
217
223
|
property: "paginationButtons",
|
|
@@ -220,12 +226,13 @@ const PaginationTemplate = (context) => {
|
|
|
220
226
|
${repeat((x) => x.pagesList, paginationButtonTemplate, { positioning: true })}
|
|
221
227
|
</div>
|
|
222
228
|
<${buttonTag} class="next-button" ${ref("nextButton")}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
+
label="${(x) => !x.navIcons ? "Next" : null}"
|
|
230
|
+
icon="${(x) => x.navIcons ? "chevron-right-line" : null}"
|
|
231
|
+
size="${getPaginationSize}"
|
|
232
|
+
shape="${getPaginationShape}"
|
|
233
|
+
?disabled="${(x) => x.total === 0 || x.selectedIndex === x.total - 1}"
|
|
234
|
+
@click="${(x) => x.selectedIndex !== void 0 && x.selectedIndex++}"
|
|
235
|
+
aria-label="${(x) => x.locale.pagination.nextPageLabel}"
|
|
229
236
|
></${buttonTag}>
|
|
230
237
|
</div>`;
|
|
231
238
|
};
|
package/shared/definition4.cjs
CHANGED
|
@@ -11,7 +11,7 @@ const localized = require('./localized.cjs');
|
|
|
11
11
|
const classNames = require('./class-names.cjs');
|
|
12
12
|
const when = require('./when.cjs');
|
|
13
13
|
|
|
14
|
-
const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0
|
|
14
|
+
const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0;margin-block:16px;margin-inline:auto;max-inline-size:var(--alert-max-inline-size, fit-content);min-inline-size:var(--alert-min-inline-size, 420px);transition:opacity .15s cubic-bezier(0,0,.2,1) 0ms,transform .15s cubic-bezier(0,0,.2,1) 0ms}.control.placement-top,.control.placement-top-start,.control.placement-top-end{inset-block:0 auto}.control.placement-top-start,.control.placement-bottom-start{right:auto;inset-inline-end:auto;margin-inline:16px}.control.placement-top-end,.control.placement-bottom-end{inset-inline-start:auto;margin-inline:16px}.control:where(.strategy-static){position:static;margin:0;inline-size:auto}.control:not(.open){opacity:0;transform:scale(.8)}.control.open{opacity:1;transform:scale(1)}@media (width <= 768px){.control{min-inline-size:var(--alert-min-inline-size, auto)}}.base.connotation-success{--_connotation-color-primary: var(--vvd-alert-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-alert-success-primary-text, var(--vvd-color-canvas))}.base.connotation-information{--_connotation-color-primary: var(--vvd-alert-information-primary, var(--vvd-color-information-500));--_connotation-color-primary-text: var(--vvd-alert-information-primary-text, var(--vvd-color-canvas))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-alert-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-alert-alert-primary-text, var(--vvd-color-canvas))}.base.connotation-warning{--_connotation-color-primary: var(--vvd-alert-warning-primary, var(--vvd-color-warning-300));--_connotation-color-primary-text: var(--vvd-alert-warning-primary-text, var(--vvd-color-canvas-text))}.base.connotation-announcement{--_connotation-color-primary: var(--vvd-alert-announcement-primary, var(--vvd-color-announcement-500));--_connotation-color-primary-text: var(--vvd-alert-announcement-primary-text, var(--vvd-color-canvas))}.base:not(.connotation-success,.connotation-information,.connotation-alert,.connotation-warning,.connotation-announcement){--_connotation-color-primary: var(--vvd-alert-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-alert-accent-primary-text, var(--vvd-color-canvas))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base{display:flex;align-items:center;padding:16px;border-radius:8px;background-color:var(--vvd-color-neutral-50);color:var(--vvd-color-canvas-text);column-gap:16px}.base .alert-text{margin-inline-end:auto}.base .alert-text .headline{font:var(--vvd-typography-base-bold);margin-block:0 4px}.base .alert-text .main-text{font:var(--vvd-typography-base)}.base .alert-text .headline+::slotted([slot=main i]:first-child):before,.base .alert-text .main-text+::slotted([slot=main i]:first-child):before{display:block;margin-top:8px;content:\"\"}.base slot[name=icon]{flex-shrink:0;color:var(--_appearance-color-fill);font-size:24px;line-height:1}.base .dismiss-button{border-left:1px solid var(--vvd-color-neutral-200);padding-inline-start:16px}";
|
|
15
15
|
|
|
16
16
|
var __defProp = Object.defineProperty;
|
|
17
17
|
var __decorateClass = (decorators, target, key, kind) => {
|
package/shared/definition4.js
CHANGED
|
@@ -9,7 +9,7 @@ import { L as Localized } from './localized.js';
|
|
|
9
9
|
import { c as classNames } from './class-names.js';
|
|
10
10
|
import { w as when } from './when.js';
|
|
11
11
|
|
|
12
|
-
const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0
|
|
12
|
+
const styles = ".control{position:fixed;z-index:10;border-radius:8px;inline-size:max-content;inset-block-end:0;inset-inline:0;margin-block:16px;margin-inline:auto;max-inline-size:var(--alert-max-inline-size, fit-content);min-inline-size:var(--alert-min-inline-size, 420px);transition:opacity .15s cubic-bezier(0,0,.2,1) 0ms,transform .15s cubic-bezier(0,0,.2,1) 0ms}.control.placement-top,.control.placement-top-start,.control.placement-top-end{inset-block:0 auto}.control.placement-top-start,.control.placement-bottom-start{right:auto;inset-inline-end:auto;margin-inline:16px}.control.placement-top-end,.control.placement-bottom-end{inset-inline-start:auto;margin-inline:16px}.control:where(.strategy-static){position:static;margin:0;inline-size:auto}.control:not(.open){opacity:0;transform:scale(.8)}.control.open{opacity:1;transform:scale(1)}@media (width <= 768px){.control{min-inline-size:var(--alert-min-inline-size, auto)}}.base.connotation-success{--_connotation-color-primary: var(--vvd-alert-success-primary, var(--vvd-color-success-500));--_connotation-color-primary-text: var(--vvd-alert-success-primary-text, var(--vvd-color-canvas))}.base.connotation-information{--_connotation-color-primary: var(--vvd-alert-information-primary, var(--vvd-color-information-500));--_connotation-color-primary-text: var(--vvd-alert-information-primary-text, var(--vvd-color-canvas))}.base.connotation-alert{--_connotation-color-primary: var(--vvd-alert-alert-primary, var(--vvd-color-alert-500));--_connotation-color-primary-text: var(--vvd-alert-alert-primary-text, var(--vvd-color-canvas))}.base.connotation-warning{--_connotation-color-primary: var(--vvd-alert-warning-primary, var(--vvd-color-warning-300));--_connotation-color-primary-text: var(--vvd-alert-warning-primary-text, var(--vvd-color-canvas-text))}.base.connotation-announcement{--_connotation-color-primary: var(--vvd-alert-announcement-primary, var(--vvd-color-announcement-500));--_connotation-color-primary-text: var(--vvd-alert-announcement-primary-text, var(--vvd-color-canvas))}.base:not(.connotation-success,.connotation-information,.connotation-alert,.connotation-warning,.connotation-announcement){--_connotation-color-primary: var(--vvd-alert-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-alert-accent-primary-text, var(--vvd-color-canvas))}.base{--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: transparent}.base{display:flex;align-items:center;padding:16px;border-radius:8px;background-color:var(--vvd-color-neutral-50);color:var(--vvd-color-canvas-text);column-gap:16px}.base .alert-text{margin-inline-end:auto}.base .alert-text .headline{font:var(--vvd-typography-base-bold);margin-block:0 4px}.base .alert-text .main-text{font:var(--vvd-typography-base)}.base .alert-text .headline+::slotted([slot=main i]:first-child):before,.base .alert-text .main-text+::slotted([slot=main i]:first-child):before{display:block;margin-top:8px;content:\"\"}.base slot[name=icon]{flex-shrink:0;color:var(--_appearance-color-fill);font-size:24px;line-height:1}.base .dismiss-button{border-left:1px solid var(--vvd-color-neutral-200);padding-inline-start:16px}";
|
|
13
13
|
|
|
14
14
|
var __defProp = Object.defineProperty;
|
|
15
15
|
var __decorateClass = (decorators, target, key, kind) => {
|
package/shared/definition41.cjs
CHANGED
|
@@ -24,7 +24,7 @@ class RadioGroup extends mixins.WithFeedback(vividElement.VividElement) {
|
|
|
24
24
|
constructor() {
|
|
25
25
|
super(...arguments);
|
|
26
26
|
this.errorValidationMessage = "";
|
|
27
|
-
this.orientation = // eslint-disable-next-line @
|
|
27
|
+
this.orientation = // eslint-disable-next-line @repo/repo/no-attribute-default-value
|
|
28
28
|
aria.Orientation.horizontal;
|
|
29
29
|
this.slottedRadioButtons = [];
|
|
30
30
|
this.radioErrorHandler = (e) => {
|
package/shared/definition41.js
CHANGED
|
@@ -22,7 +22,7 @@ class RadioGroup extends WithFeedback(VividElement) {
|
|
|
22
22
|
constructor() {
|
|
23
23
|
super(...arguments);
|
|
24
24
|
this.errorValidationMessage = "";
|
|
25
|
-
this.orientation = // eslint-disable-next-line @
|
|
25
|
+
this.orientation = // eslint-disable-next-line @repo/repo/no-attribute-default-value
|
|
26
26
|
Orientation.horizontal;
|
|
27
27
|
this.slottedRadioButtons = [];
|
|
28
28
|
this.radioErrorHandler = (e) => {
|
package/shared/definition42.cjs
CHANGED
|
@@ -114,7 +114,7 @@ class Radio extends withErrorText.WithErrorText(
|
|
|
114
114
|
connectedCallback() {
|
|
115
115
|
super.connectedCallback();
|
|
116
116
|
vividElement.DOM.queueUpdate(this.validate);
|
|
117
|
-
if (this.parentElement.getAttribute("
|
|
117
|
+
if (this.parentElement.getAttribute("data-vvd-component") !== "radio-group" && this.getAttribute("tabindex") === null) {
|
|
118
118
|
if (!this.disabled) {
|
|
119
119
|
this.setAttribute("tabindex", "0");
|
|
120
120
|
}
|
|
@@ -130,7 +130,7 @@ class Radio extends withErrorText.WithErrorText(
|
|
|
130
130
|
}
|
|
131
131
|
isInsideRadioGroup() {
|
|
132
132
|
const parent = this.closest(
|
|
133
|
-
|
|
133
|
+
'[data-vvd-component="radio-group"]'
|
|
134
134
|
);
|
|
135
135
|
return parent !== null;
|
|
136
136
|
}
|
package/shared/definition42.js
CHANGED
|
@@ -112,7 +112,7 @@ class Radio extends WithErrorText(
|
|
|
112
112
|
connectedCallback() {
|
|
113
113
|
super.connectedCallback();
|
|
114
114
|
DOM.queueUpdate(this.validate);
|
|
115
|
-
if (this.parentElement.getAttribute("
|
|
115
|
+
if (this.parentElement.getAttribute("data-vvd-component") !== "radio-group" && this.getAttribute("tabindex") === null) {
|
|
116
116
|
if (!this.disabled) {
|
|
117
117
|
this.setAttribute("tabindex", "0");
|
|
118
118
|
}
|
|
@@ -128,7 +128,7 @@ class Radio extends WithErrorText(
|
|
|
128
128
|
}
|
|
129
129
|
isInsideRadioGroup() {
|
|
130
130
|
const parent = this.closest(
|
|
131
|
-
|
|
131
|
+
'[data-vvd-component="radio-group"]'
|
|
132
132
|
);
|
|
133
133
|
return parent !== null;
|
|
134
134
|
}
|