@riverty/web-components 6.2.1 → 6.3.1
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/CHANGELOG.md +30 -0
- package/README.md +78 -0
- package/custom-elements.json +4 -0
- package/dist/cjs/index-BnETQtSf.js +16 -16
- package/dist/cjs/index.cjs.js +35 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/r-alert.cjs.entry.js +1 -1
- package/dist/cjs/r-badge.cjs.entry.js +3 -2
- package/dist/cjs/r-button.cjs.entry.js +1 -1
- package/dist/cjs/r-checkbox-group.cjs.entry.js +5 -0
- package/dist/cjs/r-checkbox.cjs.entry.js +9 -4
- package/dist/cjs/r-dialog.cjs.entry.js +2 -2
- package/dist/cjs/r-hint_2.cjs.entry.js +4 -4
- package/dist/cjs/r-icon-button_2.cjs.entry.js +43 -18
- package/dist/cjs/r-input-code.cjs.entry.js +11 -6
- package/dist/cjs/r-input-date.cjs.entry.js +11 -6
- package/dist/cjs/r-input-password.cjs.entry.js +8 -3
- package/dist/cjs/r-input-phone-number.cjs.entry.js +6 -6
- package/dist/cjs/r-input.cjs.entry.js +249 -33
- package/dist/cjs/r-pagination.cjs.entry.js +9 -3
- package/dist/cjs/r-panel.cjs.entry.js +2 -2
- package/dist/cjs/r-popover-action.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-content.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-headline.cjs.entry.js +1 -1
- package/dist/cjs/r-popover-trigger.cjs.entry.js +1 -1
- package/dist/cjs/r-popover.cjs.entry.js +2 -2
- package/dist/cjs/r-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-description.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-leading.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-title.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button-trailing.cjs.entry.js +1 -1
- package/dist/cjs/r-radio-button.cjs.entry.js +5 -5
- package/dist/cjs/r-radio-group.cjs.entry.js +8 -5
- package/dist/cjs/r-select-option.cjs.entry.js +1 -1
- package/dist/cjs/r-select.cjs.entry.js +10 -4
- package/dist/cjs/r-skip-link.cjs.entry.js +1 -1
- package/dist/cjs/r-stepper-item.cjs.entry.js +2 -2
- package/dist/cjs/r-stepper.cjs.entry.js +1 -1
- package/dist/cjs/r-tab-panel.cjs.entry.js +1 -1
- package/dist/cjs/r-tab.cjs.entry.js +2 -2
- package/dist/cjs/r-tabs-list.cjs.entry.js +3 -3
- package/dist/cjs/r-tabs.cjs.entry.js +1 -1
- package/dist/cjs/r-toast-group.cjs.entry.js +1 -1
- package/dist/cjs/r-toast.cjs.entry.js +17 -9
- package/dist/cjs/web-components.cjs.js +1 -1
- package/dist/collection/components/alert/alert.css +1 -0
- package/dist/collection/components/badge/badge.css +10 -0
- package/dist/collection/components/badge/badge.js +5 -1
- package/dist/collection/components/button/button.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +30 -4
- package/dist/collection/components/checkbox-group/checkbox-group.js +26 -0
- package/dist/collection/components/dialog/dialog.js +2 -2
- package/dist/collection/components/hint/hint.js +2 -2
- package/dist/collection/components/icon-button/icon-button.js +3 -3
- package/dist/collection/components/input/exports.js +46 -0
- package/dist/collection/components/input/input.css +6 -0
- package/dist/collection/components/input/input.js +321 -32
- package/dist/collection/components/input-code/input-code.js +32 -6
- package/dist/collection/components/input-date/input-date.js +32 -6
- package/dist/collection/components/input-password/input-password.js +29 -3
- package/dist/collection/components/input-phone-number/input-phone-number.js +25 -6
- package/dist/collection/components/label/label.js +2 -2
- package/dist/collection/components/pagination/pagination.js +18 -3
- package/dist/collection/components/panel/panel.js +2 -2
- package/dist/collection/components/popover/popover.js +2 -2
- package/dist/collection/components/popover-action/popover-action.js +1 -1
- package/dist/collection/components/popover-content/popover-content.js +1 -1
- package/dist/collection/components/popover-headline/popover-headline.js +1 -1
- package/dist/collection/components/popover-trigger/popover-trigger.js +1 -1
- package/dist/collection/components/progress-bar/progress-bar.js +1 -1
- package/dist/collection/components/radio-button/radio-button.js +5 -5
- package/dist/collection/components/radio-button-description/radio-button-description.js +1 -1
- package/dist/collection/components/radio-button-leading/radio-button-leading.js +1 -1
- package/dist/collection/components/radio-button-title/radio-button-title.js +1 -1
- package/dist/collection/components/radio-button-trailing/radio-button-trailing.js +1 -1
- package/dist/collection/components/radio-group/radio-group.js +8 -5
- package/dist/collection/components/select/select.js +31 -4
- package/dist/collection/components/select-option/select-option.js +1 -1
- package/dist/collection/components/skip-link/skip-link.js +1 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/stepper-item/stepper-item.js +2 -2
- package/dist/collection/components/tab/tab.js +2 -2
- package/dist/collection/components/tab-panel/tab-panel.js +1 -1
- package/dist/collection/components/tabs/tabs.js +1 -1
- package/dist/collection/components/tabs-list/tabs-list.js +3 -3
- package/dist/collection/components/toast/toast.js +17 -9
- package/dist/collection/components/toast-group/toast-group.js +1 -1
- package/dist/collection/components/tooltip/tooltip.css +34 -63
- package/dist/collection/components/tooltip/tooltip.js +39 -14
- package/dist/collection/index.js +2 -1
- package/dist/collection/utils/version-checker.js +33 -0
- package/dist/esm/index-CTxpqopm.js +16 -16
- package/dist/esm/index.js +34 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/r-alert.entry.js +1 -1
- package/dist/esm/r-badge.entry.js +3 -2
- package/dist/esm/r-button.entry.js +1 -1
- package/dist/esm/r-checkbox-group.entry.js +5 -0
- package/dist/esm/r-checkbox.entry.js +9 -4
- package/dist/esm/r-dialog.entry.js +2 -2
- package/dist/esm/r-hint_2.entry.js +4 -4
- package/dist/esm/r-icon-button_2.entry.js +43 -18
- package/dist/esm/r-input-code.entry.js +11 -6
- package/dist/esm/r-input-date.entry.js +11 -6
- package/dist/esm/r-input-password.entry.js +8 -3
- package/dist/esm/r-input-phone-number.entry.js +6 -6
- package/dist/esm/r-input.entry.js +249 -33
- package/dist/esm/r-pagination.entry.js +9 -3
- package/dist/esm/r-panel.entry.js +2 -2
- package/dist/esm/r-popover-action.entry.js +1 -1
- package/dist/esm/r-popover-content.entry.js +1 -1
- package/dist/esm/r-popover-headline.entry.js +1 -1
- package/dist/esm/r-popover-trigger.entry.js +1 -1
- package/dist/esm/r-popover.entry.js +2 -2
- package/dist/esm/r-progress-bar.entry.js +1 -1
- package/dist/esm/r-radio-button-description.entry.js +1 -1
- package/dist/esm/r-radio-button-leading.entry.js +1 -1
- package/dist/esm/r-radio-button-title.entry.js +1 -1
- package/dist/esm/r-radio-button-trailing.entry.js +1 -1
- package/dist/esm/r-radio-button.entry.js +5 -5
- package/dist/esm/r-radio-group.entry.js +8 -5
- package/dist/esm/r-select-option.entry.js +1 -1
- package/dist/esm/r-select.entry.js +10 -4
- package/dist/esm/r-skip-link.entry.js +1 -1
- package/dist/esm/r-stepper-item.entry.js +2 -2
- package/dist/esm/r-stepper.entry.js +1 -1
- package/dist/esm/r-tab-panel.entry.js +1 -1
- package/dist/esm/r-tab.entry.js +2 -2
- package/dist/esm/r-tabs-list.entry.js +3 -3
- package/dist/esm/r-tabs.entry.js +1 -1
- package/dist/esm/r-toast-group.entry.js +1 -1
- package/dist/esm/r-toast.entry.js +17 -9
- package/dist/esm/web-components.js +1 -1
- package/dist/types/components/badge/badge.d.ts +3 -0
- package/dist/types/components/checkbox/checkbox.d.ts +2 -0
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +2 -0
- package/dist/types/components/input/exports.d.ts +45 -0
- package/dist/types/components/input/input.d.ts +66 -1
- package/dist/types/components/input-code/input-code.d.ts +2 -0
- package/dist/types/components/input-date/input-date.d.ts +2 -0
- package/dist/types/components/input-password/input-password.d.ts +2 -0
- package/dist/types/components/input-phone-number/input-phone-number.d.ts +2 -0
- package/dist/types/components/pagination/pagination.d.ts +1 -1
- package/dist/types/components/radio-group/radio-group.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +2 -0
- package/dist/types/components/tooltip/tooltip.d.ts +1 -0
- package/dist/types/components.d.ts +63 -2
- package/dist/types/utils/version-checker.d.ts +1 -0
- package/dist/web-components/index.esm.js +1 -0
- package/dist/web-components/{p-253068b9.entry.js → p-01aefcf0.entry.js} +1 -1
- package/dist/web-components/p-05cb55db.entry.js +1 -0
- package/dist/web-components/{p-477614c5.entry.js → p-11b22309.entry.js} +1 -1
- package/dist/web-components/{p-562051aa.entry.js → p-2d878934.entry.js} +1 -1
- package/dist/web-components/p-325dbedf.entry.js +1 -0
- package/dist/web-components/{p-10cc9983.entry.js → p-34b9457b.entry.js} +1 -1
- package/dist/web-components/{p-e5b943a2.entry.js → p-36abd05a.entry.js} +1 -1
- package/dist/web-components/{p-d2447e30.entry.js → p-386d1ef9.entry.js} +1 -1
- package/dist/web-components/{p-4de76291.entry.js → p-3d67b77b.entry.js} +1 -1
- package/dist/web-components/{p-93435fcd.entry.js → p-4b12fbc0.entry.js} +1 -1
- package/dist/web-components/p-52f7b505.entry.js +1 -0
- package/dist/web-components/{p-bfc7e6c0.entry.js → p-57ebc474.entry.js} +1 -1
- package/dist/web-components/{p-a1086abe.entry.js → p-57edf7f4.entry.js} +1 -1
- package/dist/web-components/{p-cc363c3d.entry.js → p-69a24fe2.entry.js} +1 -1
- package/dist/web-components/{p-e67b13df.entry.js → p-6d92648c.entry.js} +1 -1
- package/dist/web-components/p-75052597.entry.js +1 -0
- package/dist/web-components/{p-9de3a1a5.entry.js → p-7b2c5b63.entry.js} +1 -1
- package/dist/web-components/p-7bf463ff.entry.js +1 -0
- package/dist/web-components/{p-8e125826.entry.js → p-838e43d4.entry.js} +1 -1
- package/dist/web-components/p-8c16d038.entry.js +1 -0
- package/dist/web-components/{p-075a8dc8.entry.js → p-8f8313de.entry.js} +1 -1
- package/dist/web-components/{p-3beacdab.entry.js → p-9026d5a2.entry.js} +1 -1
- package/dist/web-components/p-9c31c7c4.entry.js +1 -0
- package/dist/web-components/p-9c415b9c.entry.js +1 -0
- package/dist/web-components/p-b303b2cc.entry.js +1 -0
- package/dist/web-components/p-b8df041d.entry.js +1 -0
- package/dist/web-components/p-bc30844f.entry.js +1 -0
- package/dist/web-components/{p-bde44ec4.entry.js → p-c4a77a65.entry.js} +1 -1
- package/dist/web-components/{p-d0310ed4.entry.js → p-c549addf.entry.js} +1 -1
- package/dist/web-components/p-c65df19f.entry.js +1 -0
- package/dist/web-components/p-cf3f044d.entry.js +1 -0
- package/dist/web-components/p-d9778cfa.entry.js +1 -0
- package/dist/web-components/{p-44f87e16.entry.js → p-dbe4ccb8.entry.js} +1 -1
- package/dist/web-components/p-ded50850.entry.js +1 -0
- package/dist/web-components/{p-02b22f8e.entry.js → p-e5be895b.entry.js} +1 -1
- package/dist/web-components/{p-495ba3d2.entry.js → p-e6b34c1e.entry.js} +1 -1
- package/dist/web-components/p-ec3c4800.entry.js +1 -0
- package/dist/web-components/p-f670fd87.entry.js +1 -0
- package/dist/web-components/web-components.esm.js +1 -1
- package/package.json +3 -2
- package/dist/web-components/p-3b8c8951.entry.js +0 -1
- package/dist/web-components/p-4214867d.entry.js +0 -1
- package/dist/web-components/p-42c857e9.entry.js +0 -1
- package/dist/web-components/p-5b850e0f.entry.js +0 -1
- package/dist/web-components/p-6013dfc8.entry.js +0 -1
- package/dist/web-components/p-62e7ae04.entry.js +0 -1
- package/dist/web-components/p-71519d37.entry.js +0 -1
- package/dist/web-components/p-88f7b47f.entry.js +0 -1
- package/dist/web-components/p-8975a6a3.entry.js +0 -1
- package/dist/web-components/p-91cc0bde.entry.js +0 -1
- package/dist/web-components/p-947969d7.entry.js +0 -1
- package/dist/web-components/p-bbba6d79.entry.js +0 -1
- package/dist/web-components/p-c1030394.entry.js +0 -1
- package/dist/web-components/p-caf8f067.entry.js +0 -1
- package/dist/web-components/p-cf4ff357.entry.js +0 -1
- package/dist/web-components/p-dc9cca06.entry.js +0 -1
- package/dist/web-components/p-efec231a.entry.js +0 -1
|
@@ -65,11 +65,11 @@ const IconButton = class {
|
|
|
65
65
|
name,
|
|
66
66
|
size
|
|
67
67
|
};
|
|
68
|
-
const buttonTemplate = () => (index.h("button", Object.assign({ key: '
|
|
68
|
+
const buttonTemplate = () => (index.h("button", Object.assign({ key: 'df699957ba93858e755bfdf29de83a3ab9718fe3', type: "button", tabindex: !this.disabled && this.rTabindex || null, class: "r-icon-button", "aria-label": this.host.getAttribute('aria-label') || null }, buttonAttrs, { onClick: this._handleClick, onFocus: this.onFocus, onBlur: this.onBlur, ref: (el) => (this.nativeElement = el) }), name ?
|
|
69
69
|
index.h("r-icon", Object.assign({}, iconAttrs))
|
|
70
70
|
:
|
|
71
|
-
index.h("r-icon", { size: size, class: "r-icon-button--icon" }, index.h("slot", null)), index.h("span", { key: '
|
|
72
|
-
return (index.h(index.Host, { key: '
|
|
71
|
+
index.h("r-icon", { size: size, class: "r-icon-button--icon" }, index.h("slot", null)), index.h("span", { key: '86e9640751a2e75f24ba6eb1d75850251f629579', class: "r-icon-button--label visually-hidden" }, this.label), index.h("span", { key: '509e3f6870a4da1e788082a8af5a50c93e8360b5', class: "r-icon-button--target-area" })));
|
|
72
|
+
return (index.h(index.Host, { key: 'e829d0c5038ebe4893b998b832bbff3c62335327' }, !disabled && tooltipText ?
|
|
73
73
|
index.h("r-tooltip", { text: tooltipText, position: tooltipPosition }, buttonTemplate())
|
|
74
74
|
:
|
|
75
75
|
buttonTemplate()));
|
|
@@ -78,7 +78,7 @@ const IconButton = class {
|
|
|
78
78
|
};
|
|
79
79
|
IconButton.style = iconButtonCss;
|
|
80
80
|
|
|
81
|
-
const tooltipCss = ":host{display:inline-block
|
|
81
|
+
const tooltipCss = ":host{display:inline-block}:host slot{display:contents}:host([data-position=bottom]){--r-tooltip--arrow--transform:rotate(0)}:host([data-position=right]){--r-tooltip--arrow--transform:rotate(270deg)}:host([data-position=left]){--r-tooltip--arrow--transform:rotate(90deg)}.r-tooltip{position:var(--r-tooltip--position, relative)}.r-tooltip:has(.r-tooltip--content--visible){--r-tooltip--content--display:flex;--r-tooltip--content--z-index:1060;--r-tooltip--arrow--display:flex}.r-tooltip--trigger{color:var(--r-tooltip--trigger--color, inherit);box-shadow:var(--r-tooltip--trigger--box-shadow, none);outline:var(--r-tooltip--trigger--outline, none);outline-offset:var(--r-tooltip--trigger--outline-offset, 0)}.r-tooltip--trigger:focus{--r-tooltip--trigger--box-shadow:0 0 0 6px var(--r-border-focused-outlined);--r-tooltip--trigger--outline:2px solid var(--r-border-focused);--r-tooltip--trigger--outline-offset:2px}.r-tooltip--content{position:var(--r-tooltip--content--position, fixed);display:var(--r-tooltip--content--display, none);justify-content:var(--r-tooltip--content--justify-content, center);align-items:var(--r-tooltip--content--align-items, center);color:var(--r-tooltip--content--color, var(--r-text-inverse));background-color:var(--r-tooltip--content--background-color, var(--r-background-inverse));font-family:var(--r-tooltip--content--font-family, var(--r-font-family-text));font-weight:var(--r-tooltip--content--font-weight, var(--r-font-weight-regular));font-size:var(--r-tooltip--content--font-size, var(--r-font-size-200));line-height:var(--r-tooltip--content--line-height, var(--r-line-height-s));min-width:var(--r-tooltip--content--min-width, 32px);max-width:var(--r-tooltip--content--max-width, 300px);min-height:var(--r-tooltip--content--min-height, 32px);padding:var(--r-tooltip--content--padding, var(--r-spacing-050) var(--r-spacing-100));width:var(--r-tooltip--content--width, max-content);word-break:var(--r-tooltip--content--word-break, break-word);box-sizing:var(--r-tooltip--content--box-sizing, border-box);z-index:var(--r-tooltip--content--z-index, 0);white-space:var(--r-tooltip--content--white-space, normal)}.r-tooltip--arrow{display:var(--r-tooltip--arrow--display, none);position:var(--r-tooltip--arrow--position, fixed);width:var(--r-tooltip--arrow--width, 12px);height:var(--r-tooltip--arrow--height, 12px);transform:var(--r-tooltip--arrow--transform, rotate(180deg));z-index:var(--r-tooltip--content--z-index)}.r-tooltip--arrow:after{content:var(--r-tooltip--arrow--inner-content, \"\");display:var(--r-tooltip--arrow--inner--display, block);width:var(--r-tooltip--arrow--inner--width, 12px);height:var(--r-tooltip--arrow--inner--height, 6px);background-color:var(--r-tooltip--arrow--inner--background-color, var(--r-background-inverse));clip-path:var(--r-tooltip--arrow--inner--clip-path, polygon(50% 0%, 0% 100%, 100% 100%));border-radius:var(--r-tooltip--arrow--inner--border-radius, 0);align-self:var(--r-tooltip--arrow--inner--align-self, flex-end)}";
|
|
82
82
|
|
|
83
83
|
const OFFSET = 20;
|
|
84
84
|
const Tooltip = class {
|
|
@@ -105,11 +105,11 @@ const Tooltip = class {
|
|
|
105
105
|
}
|
|
106
106
|
};
|
|
107
107
|
this.alignTooltipPosition = () => {
|
|
108
|
-
var _a, _b
|
|
109
|
-
const
|
|
108
|
+
var _a, _b;
|
|
109
|
+
const elementRect = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
110
|
+
const tooltipRect = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
110
111
|
const offsetLeft = this.getOffsetLeft(this.arrowPositionState);
|
|
111
|
-
const hostHeight = (
|
|
112
|
-
const hostWidth = ((_g = (_f = this.element) === null || _f === void 0 ? void 0 : _f.getBoundingClientRect()) === null || _g === void 0 ? void 0 : _g.width) + this.arrowWidth || 0;
|
|
112
|
+
const hostHeight = (elementRect === null || elementRect === void 0 ? void 0 : elementRect.height) + this.arrowHeight || 0;
|
|
113
113
|
switch (this.positionState) {
|
|
114
114
|
case 'top':
|
|
115
115
|
this.alignPosition(this.tooltip, -offsetLeft, -this.tooltipContainerHeight);
|
|
@@ -118,19 +118,22 @@ const Tooltip = class {
|
|
|
118
118
|
this.alignPosition(this.tooltip, -offsetLeft, hostHeight);
|
|
119
119
|
break;
|
|
120
120
|
case 'left':
|
|
121
|
-
this.
|
|
121
|
+
this.tooltip.style.left = `${elementRect.left - tooltipRect.width - this.arrowWidth}px`;
|
|
122
|
+
this.tooltip.style.top = `${elementRect.top + elementRect.height / 2 - tooltipRect.height / 2}px`;
|
|
122
123
|
break;
|
|
123
124
|
case 'right':
|
|
124
|
-
this.
|
|
125
|
+
this.tooltip.style.left = `${elementRect.left + elementRect.width + this.arrowWidth}px`;
|
|
126
|
+
this.tooltip.style.top = `${elementRect.top + elementRect.height / 2 - tooltipRect.height / 2}px`;
|
|
125
127
|
break;
|
|
126
128
|
}
|
|
127
129
|
};
|
|
128
130
|
this.alignArrowPosition = () => {
|
|
129
|
-
var _a, _b, _c, _d
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const hostHeight = (
|
|
133
|
-
const
|
|
131
|
+
var _a, _b, _c, _d;
|
|
132
|
+
const elementRect = (_a = this.element) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
133
|
+
const tooltipRect = (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect();
|
|
134
|
+
const hostHeight = (elementRect === null || elementRect === void 0 ? void 0 : elementRect.height) || 0;
|
|
135
|
+
const offsetLeft = Math.abs((elementRect === null || elementRect === void 0 ? void 0 : elementRect.width) - ((_d = (_c = this.arrow) === null || _c === void 0 ? void 0 : _c.getBoundingClientRect()) === null || _d === void 0 ? void 0 : _d.width)) / 2;
|
|
136
|
+
const arrowCenterY = (elementRect === null || elementRect === void 0 ? void 0 : elementRect.top) + elementRect.height / 2 - this.arrowHeight / 2;
|
|
134
137
|
switch (this.positionState) {
|
|
135
138
|
case 'top':
|
|
136
139
|
this.alignPosition(this.arrow, offsetLeft, -this.arrowHeight);
|
|
@@ -139,10 +142,12 @@ const Tooltip = class {
|
|
|
139
142
|
this.alignPosition(this.arrow, offsetLeft, hostHeight);
|
|
140
143
|
break;
|
|
141
144
|
case 'left':
|
|
142
|
-
this.
|
|
145
|
+
this.arrow.style.left = `${tooltipRect.left + tooltipRect.width}px`;
|
|
146
|
+
this.arrow.style.top = `${arrowCenterY}px`;
|
|
143
147
|
break;
|
|
144
148
|
case 'right':
|
|
145
|
-
this.
|
|
149
|
+
this.arrow.style.left = `${tooltipRect.left - this.arrowWidth}px`;
|
|
150
|
+
this.arrow.style.top = `${arrowCenterY}px`;
|
|
146
151
|
break;
|
|
147
152
|
}
|
|
148
153
|
};
|
|
@@ -176,12 +181,15 @@ const Tooltip = class {
|
|
|
176
181
|
var _a;
|
|
177
182
|
this.isShown = true;
|
|
178
183
|
this.tooltip.classList.add('r-tooltip--content--visible');
|
|
184
|
+
this.updateZIndex();
|
|
179
185
|
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
180
186
|
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.setAttribute('aria-description', (_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.innerText);
|
|
181
187
|
};
|
|
182
188
|
this.removeTooltip = () => {
|
|
183
189
|
this.isShown = false;
|
|
184
190
|
this.tooltip.style.width = 'max-content';
|
|
191
|
+
this.tooltip.style.zIndex = '';
|
|
192
|
+
this.arrow.style.zIndex = '';
|
|
185
193
|
this.tooltip.classList.remove('r-tooltip--content--visible');
|
|
186
194
|
const interactiveElement = this.getInteractiveElement(this.activeElement);
|
|
187
195
|
interactiveElement === null || interactiveElement === void 0 ? void 0 : interactiveElement.removeAttribute('aria-description');
|
|
@@ -438,6 +446,23 @@ const Tooltip = class {
|
|
|
438
446
|
this.arrowPositionState = 'right';
|
|
439
447
|
}
|
|
440
448
|
}
|
|
449
|
+
updateZIndex() {
|
|
450
|
+
const dialogs = document.querySelectorAll('dialog[open]');
|
|
451
|
+
let highestZIndex = 0;
|
|
452
|
+
dialogs.forEach((dialog) => {
|
|
453
|
+
const htmlDialog = dialog;
|
|
454
|
+
if (htmlDialog.open) {
|
|
455
|
+
const style = getComputedStyle(htmlDialog);
|
|
456
|
+
const zIndex = parseInt(style.zIndex, 10);
|
|
457
|
+
if (!isNaN(zIndex) && zIndex > highestZIndex) {
|
|
458
|
+
highestZIndex = zIndex;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
const tooltipZIndex = highestZIndex > 0 ? highestZIndex + 10 : 1060;
|
|
463
|
+
this.tooltip.style.zIndex = `${tooltipZIndex}`;
|
|
464
|
+
this.arrow.style.zIndex = `${tooltipZIndex}`;
|
|
465
|
+
}
|
|
441
466
|
render() {
|
|
442
467
|
const { text, arrowPositionState, positionState, isShown, uniqueId } = this;
|
|
443
468
|
const hostAttrs = {
|
|
@@ -454,7 +479,7 @@ const Tooltip = class {
|
|
|
454
479
|
role: 'tooltip',
|
|
455
480
|
'aria-hidden': `${!isShown}`
|
|
456
481
|
};
|
|
457
|
-
return (index.h(index.Host, Object.assign({ key: '
|
|
482
|
+
return (index.h(index.Host, Object.assign({ key: '19155344b057a413834706bf19dd5a1bc082549d' }, hostAttrs, { onMouseenter: this.handleHover, onMouseleave: this.removeTooltip }), index.h("div", { key: '298c77b5c9611aba36d3df450f2c4ebda728113a', class: "r-tooltip" }, index.h("div", Object.assign({ key: 'e97a5fb30b6b67cde30734b02acdd1f354d58219', class: "r-tooltip--trigger", onFocus: this.handleFocus, onBlur: this.removeTooltip }, triggerAttrs), index.h("slot", { key: '3ad175db2674badbe9e022f52794a6f16afee7f5' })), index.h("div", Object.assign({ key: '6ed4995a7765422ff604e8da0797f651c12b1e8a', class: "r-tooltip--content", ref: (el) => this.tooltip = el }, contentAttrs), text), index.h("div", { key: '98e5991e801b1e54138c2a5156061237cafa2459', ref: (el) => this.arrow = el, class: "r-tooltip--arrow" }))));
|
|
458
483
|
}
|
|
459
484
|
get element() { return index.getElement(this); }
|
|
460
485
|
static get watchers() { return {
|
|
@@ -254,6 +254,11 @@ const InputCode = class {
|
|
|
254
254
|
this.values = valueArray;
|
|
255
255
|
this.rChange.emit({ value: this.values.join('') });
|
|
256
256
|
}
|
|
257
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
258
|
+
async setCustomValidity(message) {
|
|
259
|
+
this.customErrorMessage = message;
|
|
260
|
+
this.validateFormElement(this.nativeElement);
|
|
261
|
+
}
|
|
257
262
|
/**
|
|
258
263
|
* Validates the input code without triggering UI and returns a boolean indicating its validity.
|
|
259
264
|
* @returns A boolean indicating whether the input code is valid.
|
|
@@ -412,14 +417,14 @@ const InputCode = class {
|
|
|
412
417
|
id: `${uniqueId}-label`,
|
|
413
418
|
fieldIndicator
|
|
414
419
|
} : {};
|
|
415
|
-
return (index.h(index.Host, { key: '
|
|
420
|
+
return (index.h(index.Host, { key: '800791debf1f1c64b666d8933dddfc9d308ef70e', value: this.value, onClick: this.onHostClick }, index.h("div", { key: 'b081be06e5e46fbce4764d59ee3de65091c39464', class: "r-input-code--label-container" }, index.h("label", { key: '4b98d9f9ea5e318943da440c1851887a9c540d50', htmlFor: uniqueId }, label ?
|
|
416
421
|
index.h("r-label", Object.assign({}, labelAttr), label)
|
|
417
422
|
:
|
|
418
|
-
index.h("slot", { name: "label" })), index.h("slot", { key: '
|
|
419
|
-
index.h("r-hint", { key: '
|
|
420
|
-
index.h("r-icon", { key: '
|
|
421
|
-
index.h("r-icon", { key: '
|
|
422
|
-
index.h("r-hint", { key: '
|
|
423
|
+
index.h("slot", { name: "label" })), index.h("slot", { key: 'd7949be3b99b6774529948b22a4dc9544da2057d', name: "popover" })), hint &&
|
|
424
|
+
index.h("r-hint", { key: 'cd46c69b0f7ca4468219bc5d5698f95a8639864b', id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { key: '3249a7836c7354a8ec8b9457d6dc0e81140710c9', class: "r-form-field" }, index.h("slot", { key: '9e1e2574802b9b650ba99bb971a5c0a165b0b197', name: "prefix" }), index.h("div", { key: '6ccba704319cc140d68a37b9bea922f62e4513b6', class: "r-input-code--container", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.groupDescribedby }, index.h("slot", { key: '06d57c63d11f5818f4cf2ccacca60aa64bd16a49', name: "leading" }), Array.from({ length: this.length }).map((_, i) => (index.h("input", { class: "r-input-code--input", key: i, id: `${uniqueId}-input-section-${i}`, "aria-label": `${this.ariaCharacterLabel || 'Character'}: ${i + 1}`, "aria-invalid": `${this.invalid || false}`, value: this.values[i], ref: el => this.inputs[i] = el, maxlength: 1, disabled: this.disabled, required: this.required, readonly: readonly, inputmode: this.inputmode, enterkeyhint: this.enterkeyhint, autocomplete: this.autocomplete, onInput: this.createInputHandler(i), onKeyDown: this.createKeyDownHandler(i), onPaste: this.handlePaste }))), index.h("input", Object.assign({ key: '56e629b9f9c4a7cbf83e0ba10d3338cccb27579f', type: "hidden" }, inputAttrs, { value: this.values.join(''), ref: el => this.nativeElement = el })), index.h("div", { key: '1388dab339130521becb1a0c2d0005ba8e1b8fde', class: "r-input-code--trailing" }, this.readonly &&
|
|
425
|
+
index.h("r-icon", { key: 'ea1cbf74635a3480ec03ea16f41d8133a156219d', class: "r-input-code--readonly-icon", name: "pen-disabled", size: "s" }), index.h("slot", { key: '90801524b96b72fdb21b49f6c15d00d4809faba6', name: "trailing" }, valid &&
|
|
426
|
+
index.h("r-icon", { key: '709294d96d12dfff3c902bbac8656d59d0e6064b', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" })))), index.h("slot", { key: '67195193bd3d6a8c3e7aaa3ae0b5f35274971add', name: "suffix" })), index.h("slot", { key: '735676c16afee87dc1b121ec4eed689645e40f84', name: "message" }, this.hasMessage &&
|
|
427
|
+
index.h("r-hint", { key: 'f7733e7bdaa5037fa6244fb351551c9a6d7faf95', "aria-live": "polite", id: `${uniqueId}-message`, variant: "error" }, this.message))));
|
|
423
428
|
}
|
|
424
429
|
get host() { return index.getElement(this); }
|
|
425
430
|
static get watchers() { return {
|
|
@@ -404,6 +404,11 @@ const InputDate = class {
|
|
|
404
404
|
this.format = this.initial['format'];
|
|
405
405
|
this.valid = !this.invalid;
|
|
406
406
|
}
|
|
407
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
408
|
+
async setCustomValidity(message) {
|
|
409
|
+
this.customErrorMessage = message;
|
|
410
|
+
this.validateFormElement(this.nativeElement);
|
|
411
|
+
}
|
|
407
412
|
/**
|
|
408
413
|
* Validates the input date without triggering UI and returns a boolean indicating its validity.
|
|
409
414
|
* @returns A boolean indicating whether the input date is valid.
|
|
@@ -499,14 +504,14 @@ const InputDate = class {
|
|
|
499
504
|
id: `${uniqueId}-label`,
|
|
500
505
|
fieldIndicator
|
|
501
506
|
} : {};
|
|
502
|
-
return (index.h(index.Host, { key: '
|
|
507
|
+
return (index.h(index.Host, { key: 'e8d5144a4cefeca243ea6e80840e4ff12b9344f0', onClick: this.onHostClick, "data-touched": `${this.touched}`, "data-dirty": `${this.dirty}` }, index.h("fieldset", Object.assign({ key: '417cac30b7b535e7367eef280732869cdd984ed1', class: "r-input-date" }, groupAttrs), index.h("div", { key: 'd7ef5eb79c96c0d8845399e536c356272ab7c03c', class: "r-input-date--legend-container" }, index.h("legend", { key: '14c195899fb789333bbd07a40ec1db746d004839', class: "r-input-date--legend" }, index.h("label", { key: 'f6ac0e10142bceefe404a385ac44534d81ae3f98', htmlFor: uniqueId }, label ?
|
|
503
508
|
index.h("r-label", Object.assign({}, labelAttr), label)
|
|
504
509
|
:
|
|
505
|
-
index.h("slot", { name: "label" }))), index.h("slot", { key: '
|
|
506
|
-
index.h("r-hint", { key: '
|
|
507
|
-
index.h("span", { "aria-hidden": "true", class: "r-input-date--delimiter" }, this.delimiter)))), index.h("input", Object.assign({ key: '
|
|
508
|
-
index.h("r-icon", { key: '
|
|
509
|
-
index.h("r-icon", { key: '
|
|
510
|
+
index.h("slot", { name: "label" }))), index.h("slot", { key: 'b3bb261cb82002f7c41470bb9ca09110c6f7a345', name: "popover" })), hint &&
|
|
511
|
+
index.h("r-hint", { key: '606d8d0f83416914627b23f901838c55f65b6adc', id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { key: '46ca5170c4eafd18464dd7575ab41263907e2116', class: "r-input-date--container" }, index.h("r-icon", { key: '488dc02a12c354dc9fdd5d814b2c63dbd080175f', name: "calendar", size: "s", class: "r-input-date--calendar-icon" }), index.h("div", { key: '69ef56323ea2c1d90121dc280cb2072701558064', class: "r-input-date--inputs" }, this.inputOrder.map((input, i) => (index.h(index.Fragment, null, index.h("input", Object.assign({ class: "r-input-date--input" }, this.getInputAttrs(input), { key: input, value: this.getDateComponent(input), onInput: this.createInputHandler(input, i), onChange: this.createChangeHandler(input), onClick: this.onInputClick, onBlur: this.handleBlur, onKeyDown: this.createKeyDownHandler(i), onPaste: this.handlePaste })), i < this.inputOrder.length - 1 &&
|
|
512
|
+
index.h("span", { "aria-hidden": "true", class: "r-input-date--delimiter" }, this.delimiter)))), index.h("input", Object.assign({ key: '918cf85992a45287c77df5f937f82d0f6f316bf1', type: "hidden" }, dateInputAttrs, { value: this.value, ref: (el) => this.nativeElement = el }))), index.h("div", { key: '57dbce64441410f59571417fce01213af7ee146f', class: "r-input-date--trailing" }, this.readonly &&
|
|
513
|
+
index.h("r-icon", { key: 'e60109ba459f42e391a972cd7fdbd9fba134244f', class: "r-input-date--readonly-icon", name: "pen-disabled", size: "s" }), valid &&
|
|
514
|
+
index.h("r-icon", { key: '0c5af571965830bffdb226d94e4d2a2f4a158553', name: "circled-check", size: "s", color: "var(--r-status-success-regular)" }), this.hasTrailingSlot && index.h("slot", { key: '2b3836138862a6b6538aa75ddc2929b63f85667e', name: "trailing" }))), index.h("div", { key: 'd07f45f25bd1c6ad19f7feacf24cab515c40aa01', id: `${uniqueId}-message`, "aria-live": "polite", class: "r-input-date--message" }, this.hasMessage && index.h("r-hint", { key: '7974223f426574a5b6a54bbf773007475dfb6450', variant: "error" }, this.message)))));
|
|
510
515
|
}
|
|
511
516
|
get host() { return index.getElement(this); }
|
|
512
517
|
static get watchers() { return {
|
|
@@ -174,6 +174,11 @@ const InputPassword = class {
|
|
|
174
174
|
this.value = value;
|
|
175
175
|
this.validateFormElement(this.nativeElement);
|
|
176
176
|
}
|
|
177
|
+
/** Validates an element, displays provided message in case value is invalid. */
|
|
178
|
+
async setCustomValidity(message) {
|
|
179
|
+
this.customErrorMessage = message;
|
|
180
|
+
this.validateFormElement(this.nativeElement);
|
|
181
|
+
}
|
|
177
182
|
/**
|
|
178
183
|
* Validates the input password without triggering UI and returns a boolean indicating its validity.
|
|
179
184
|
* @returns A boolean indicating whether the input password is valid.
|
|
@@ -202,7 +207,7 @@ const InputPassword = class {
|
|
|
202
207
|
}
|
|
203
208
|
get hasValidationError() {
|
|
204
209
|
var _a, _b;
|
|
205
|
-
return this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
|
|
210
|
+
return this.validityState && this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
|
|
206
211
|
}
|
|
207
212
|
get hasMessage() {
|
|
208
213
|
return this.hasError || this.hasValidationError;
|
|
@@ -255,8 +260,8 @@ const InputPassword = class {
|
|
|
255
260
|
tooShortMessage,
|
|
256
261
|
patternMismatchMessage
|
|
257
262
|
};
|
|
258
|
-
return (index.h(index.Host, { key: '
|
|
259
|
-
index.h("r-hint", { key: '
|
|
263
|
+
return (index.h(index.Host, { key: '197cfacad4b600eb5c348d496b7a406daf664202' }, index.h("r-input", Object.assign({ key: 'f9f1fae507ed66bfb309e1765ae266d7c4e91962' }, inputAttrs, { ref: (el) => this.nativeElement = el, type: showed ? 'text' : 'password', onRInput: this.onInput, onRChange: this.onChange, onKeyUp: this.handleKeyup, onRBlur: this.handleBlur }), index.h("r-icon", { key: 'e8ddd11585c68f22b951cf2a7fce1c7e8b5da0d2', name: "padlock-closed", size: "s", slot: "leading" }), index.h("slot", { key: '39ecae0c2028d64e1afcf1e84b1dd27931e17227', name: "popover", slot: "popover" }), index.h("r-icon-button", { key: 'de56d2a8366b2687ea3d2be99f1c1ab49275e0e3', slot: "trailing", name: showed ? 'eye-crossed-out' : 'eye', size: "s", disabled: disabled, label: showed ? hidePasswordAriaLabel : showPasswordAriaLabel, onClick: this.onShowClick }), this.hasMessage &&
|
|
264
|
+
index.h("r-hint", { key: '91c2c93dd827ac3c0b233217dc0aa26fc3a55f18', slot: "message", variant: "error" }, this.hasError && this.error, this.hasValidationError && (this.customErrorMessage || this.validityMessage))), index.h("div", { key: 'faa2b8b1ff5af58e6524a9ea3c5fe08a446e6ff4', class: "visually-hidden", ref: el => this.passwordVisibilityChangeAlertContainer = el, "aria-live": "polite" })));
|
|
260
265
|
}
|
|
261
266
|
get host() { return index.getElement(this); }
|
|
262
267
|
};
|
|
@@ -2300,7 +2300,7 @@ const InputPhoneNumber = class {
|
|
|
2300
2300
|
const isPhoneNumberValid = this.countryCode ? this.getPhoneValidationResult(this.phoneNumber, this.countryCode).isValid : false;
|
|
2301
2301
|
if (!isPhoneNumberValid) {
|
|
2302
2302
|
validityState = 'invalid';
|
|
2303
|
-
validityMessage = this.
|
|
2303
|
+
validityMessage = this.invalidPhoneNumberMessage;
|
|
2304
2304
|
return { validityState, validityMessage };
|
|
2305
2305
|
}
|
|
2306
2306
|
validityState = 'valid';
|
|
@@ -2406,8 +2406,8 @@ const InputPhoneNumber = class {
|
|
|
2406
2406
|
return this.invalid && !!((_a = this.error) === null || _a === void 0 ? void 0 : _a.length);
|
|
2407
2407
|
}
|
|
2408
2408
|
get hasValidationError() {
|
|
2409
|
-
var _a;
|
|
2410
|
-
return this.validityState !== 'valid' && !!((_a = this.
|
|
2409
|
+
var _a, _b;
|
|
2410
|
+
return this.validityState && this.validityState !== 'valid' && (!!((_a = this.customErrorMessage) === null || _a === void 0 ? void 0 : _a.length) || !!((_b = this.validityMessage) === null || _b === void 0 ? void 0 : _b.length));
|
|
2411
2411
|
}
|
|
2412
2412
|
get hasMessage() {
|
|
2413
2413
|
return this.hasError || this.hasValidationError;
|
|
@@ -2507,9 +2507,9 @@ const InputPhoneNumber = class {
|
|
|
2507
2507
|
disabled,
|
|
2508
2508
|
'aria-describedby': this.ariaDescribedBy
|
|
2509
2509
|
};
|
|
2510
|
-
return (index.h(index.Host, { key: '
|
|
2511
|
-
index.h("r-label", Object.assign({ key: '
|
|
2512
|
-
index.h("r-hint", { key: '
|
|
2510
|
+
return (index.h(index.Host, { key: 'e5170613c08f3927d2a65cb7649cd29d27954b99' }, index.h("div", { key: '42e8954e2140be50ea42290779af01522e0e39e7', class: "r-input-phone-number--label-container" }, index.h("label", { key: '0dbd4ad0d762f97d4a2242f1dc95ba8cd9039ce0', id: `${uniqueId}-label` }, label &&
|
|
2511
|
+
index.h("r-label", Object.assign({ key: 'ec76421b8dad5b1ed58cb0302d7c8d32fed66735' }, labelAttr), label)), index.h("slot", { key: 'c9e8a6fb83822826f5a1f62cedb06169715dac52', name: "popover" })), hint &&
|
|
2512
|
+
index.h("r-hint", { key: 'c0755d106d3d01f6f6c0ab1d939337d98e014652', id: `${uniqueId}-hint`, role: "note" }, hint), index.h("div", { key: 'e32fe35fed92c7a729231164705ef6437060775e', class: "r-input-phone-number", role: "group", "aria-labelledby": `${uniqueId}-label`, "aria-describedby": this.ariaDescribedBy }, index.h("slot", { key: 'cc2d797e9f9c5b5a21d6e8a7a7d6c7edb2d2b88a' }), index.h("r-input", { key: 'c3402afa0f6f30afb61b81c947272368dfabbbcf', label: inputLabel, value: phoneNumber, internal: true, valid: valid, invalid: invalid, required: required, readonly: this.readonly, novalidate: true, fullWidth: fullWidth, type: "tel", error: this.errorMessage || '', onRInput: this.handleOnInput, onRChange: this.handleInputOnChange, disabled: disabled })), index.h("input", Object.assign({ key: 'cd814c1b35708f56a911b4d93e907f9a2fac0f1c', type: "hidden" }, inputAttrs, { readonly: this.readonly, value: fullPhoneNumber, ref: el => this.nativeElement = el })), index.h("r-hint", { key: '211661682d51d22ffe93a6e993e03a3c89cc76e2', "aria-live": "polite", "aria-atomic": "true", id: `${uniqueId}-message`, class: !this.hasMessage && 'visually-hidden', variant: "error" }, this.hasMessage ? (this.hasError ? this.error : (this.customErrorMessage || this.validityMessage)) : '')));
|
|
2513
2513
|
}
|
|
2514
2514
|
get host() { return index.getElement(this); }
|
|
2515
2515
|
static get watchers() { return {
|