xv-webcomponents 1.19.2 → 1.20.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/dist/cjs/{_vars-A07oKwJ_.js → _vars-DMytunQw.js} +9 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{xv-accordion-v2_47.cjs.entry.js → xv-accordion-v2_48.cjs.entry.js} +448 -90
- package/dist/cjs/xv-header-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-mega-menu-next.cjs.entry.js +2 -2
- package/dist/cjs/xv-webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/xv-button/xv-button-v2.css +8 -8
- package/dist/collection/components/xv-button/xv-button.js +25 -2
- package/dist/collection/components/xv-button-group/xv-button-group.css +173 -0
- package/dist/collection/components/xv-button-group/xv-button-group.js +206 -0
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +2 -2
- package/dist/collection/components/xv-content-switcher/xv-content-switcher-item/xv-content-switcher-item.js +1 -1
- package/dist/collection/components/xv-content-switcher/xv-content-switcher.js +2 -2
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-collapse/xv-data-table-collapse.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +2 -2
- package/dist/collection/components/xv-data-table/xv-data-table.js +1 -1
- package/dist/collection/components/xv-datepicker/xv-datepicker.js +2 -2
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +1 -1
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +1 -1
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.css +4 -71
- package/dist/collection/components/xv-header/xv-header.js +10 -4
- package/dist/collection/components/xv-header-next/xv-header-next.js +1 -1
- package/dist/collection/components/xv-image-viewer/xv-image-viewer.js +1 -1
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-mega-menu/xv-mega-menu.js +2 -2
- package/dist/collection/components/xv-mega-menu-next/xv-mega-menu-next.js +2 -2
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.js +2 -2
- package/dist/collection/components/xv-overflow-menu/_vars.js +7 -6
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css +48 -8
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +84 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.css +28 -2
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +373 -22
- package/dist/collection/components/xv-pagination/xv-pagination.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-radio/xv-radio.js +2 -2
- package/dist/collection/components/xv-slider/xv-slider.js +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.css +7 -0
- package/dist/collection/components/xv-tag-combobox/xv-tag-combobox.js +37 -9
- package/dist/collection/components/xv-text-input/xv-text-input.js +2 -2
- package/dist/collection/components/xv-textarea/xv-textarea.js +2 -2
- package/dist/collection/components/xv-tile/xv-tile.js +2 -2
- package/dist/collection/components/xv-toggle/xv-toggle.js +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +1 -1
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +2 -2
- package/dist/esm/{_vars-C6jsOjam.js → _vars-CDEU4jkD.js} +7 -7
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{xv-accordion-v2_47.entry.js → xv-accordion-v2_48.entry.js} +448 -91
- package/dist/esm/xv-header-next.entry.js +2 -2
- package/dist/esm/xv-mega-menu-next.entry.js +2 -2
- package/dist/esm/xv-webcomponents.js +1 -1
- package/dist/types/components/xv-button/xv-button.d.ts +2 -0
- package/dist/types/components/xv-button-group/xv-button-group.d.ts +54 -0
- package/dist/types/components/xv-overflow-menu/_vars.d.ts +14 -5
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.d.ts +10 -0
- package/dist/types/components/xv-overflow-menu/xv-overflow-menu.d.ts +43 -3
- package/dist/types/components/xv-tag-combobox/xv-tag-combobox.d.ts +1 -0
- package/dist/types/components.d.ts +177 -0
- package/dist/xv-webcomponents/{p-9284f4be.entry.js → p-0b0ce8e2.entry.js} +1 -1
- package/dist/xv-webcomponents/p-9edaba20.entry.js +8 -0
- package/dist/xv-webcomponents/p-CDEU4jkD.js +1 -0
- package/dist/xv-webcomponents/{p-3a20074c.entry.js → p-fa1779f0.entry.js} +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/xv-webcomponents/p-6bb184f5.entry.js +0 -8
- package/dist/xv-webcomponents/p-C6jsOjam.js +0 -1
package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.css
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
1
2
|
.xv-container {
|
|
2
3
|
width: 100%;
|
|
3
4
|
max-width: 1170px;
|
|
@@ -126,8 +127,7 @@
|
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
:host {
|
|
129
|
-
|
|
130
|
-
display: inline-block;
|
|
130
|
+
display: block;
|
|
131
131
|
background-color: transparent;
|
|
132
132
|
transition: 200ms ease background-color;
|
|
133
133
|
user-select: none;
|
|
@@ -139,32 +139,65 @@
|
|
|
139
139
|
letter-spacing: 0.16px;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
.item_inner {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: 8px;
|
|
146
|
+
width: 100%;
|
|
147
|
+
color: inherit;
|
|
148
|
+
font: inherit;
|
|
149
|
+
text-decoration: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.item_icon {
|
|
153
|
+
display: inline-flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
flex-shrink: 0;
|
|
157
|
+
font-size: 16px;
|
|
158
|
+
line-height: 0;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.item_label {
|
|
162
|
+
flex: 1;
|
|
163
|
+
min-width: 0;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* Enabled + hover */
|
|
167
|
+
:host(:not([disabled]):hover) {
|
|
143
168
|
cursor: pointer;
|
|
144
169
|
background-color: var(--layer-hover-01, #E9E9E9);
|
|
145
170
|
}
|
|
146
171
|
|
|
147
|
-
:host(:active) {
|
|
172
|
+
:host(:not([disabled]):active) {
|
|
148
173
|
background-color: var(--layer-active-01, #D1D1D1);
|
|
149
174
|
}
|
|
150
175
|
|
|
151
|
-
|
|
152
|
-
|
|
176
|
+
/* Focus (keyboard roving highlight is driven by the [active] attribute set by the parent).
|
|
177
|
+
Per design the focus state is only a 2px border — the background stays at the default. */
|
|
178
|
+
:host(:not([disabled]):focus),
|
|
179
|
+
:host(:not([disabled])[active]) {
|
|
180
|
+
outline: none;
|
|
181
|
+
box-shadow: inset 0 0 0 2px var(--focus, #273435);
|
|
153
182
|
}
|
|
154
183
|
|
|
184
|
+
/* Danger */
|
|
155
185
|
:host([variant=danger]) {
|
|
156
186
|
background-color: var(--text-error, #D62512);
|
|
157
187
|
color: var(--text-on-color, #FFF);
|
|
158
188
|
}
|
|
159
189
|
|
|
160
|
-
:host([variant=danger]:hover)
|
|
190
|
+
:host([variant=danger]:not([disabled]):hover),
|
|
191
|
+
:host([variant=danger]:not([disabled])[active]),
|
|
192
|
+
:host([variant=danger]:not([disabled]):focus) {
|
|
161
193
|
background-color: var(--support-error, #F1290E);
|
|
162
194
|
}
|
|
163
195
|
|
|
164
|
-
:host([variant=danger]:active) {
|
|
196
|
+
:host([variant=danger]:not([disabled]):active) {
|
|
165
197
|
background-color: var(--text-error, #D62512);
|
|
166
198
|
}
|
|
167
199
|
|
|
200
|
+
/* Ghost (non-interactive content, e.g. notifications) */
|
|
168
201
|
:host([variant=ghost]),
|
|
169
202
|
:host([variant=ghost]:hover),
|
|
170
203
|
:host([variant=ghost]:active) {
|
|
@@ -173,8 +206,15 @@
|
|
|
173
206
|
color: var(--text-primary);
|
|
174
207
|
}
|
|
175
208
|
|
|
209
|
+
/* Disabled */
|
|
176
210
|
:host([disabled]) {
|
|
177
211
|
background-color: var(--layer-01, #F7F7F7) !important;
|
|
178
212
|
color: var(--text-disabled) !important;
|
|
213
|
+
box-shadow: none !important;
|
|
179
214
|
cursor: not-allowed;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/* Optional separator line above the item. */
|
|
218
|
+
:host([divider]) {
|
|
219
|
+
border-top: 1px solid var(--border-subtle-01, #E0E0E0);
|
|
180
220
|
}
|
package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js
CHANGED
|
@@ -5,14 +5,31 @@ export class XvOverflowMenuItem {
|
|
|
5
5
|
this.disabled = false;
|
|
6
6
|
this.variant = OverflowMenuVariant.DEFAULT;
|
|
7
7
|
this.clickable = true;
|
|
8
|
+
/** Draws a separator line above the item (e.g. before a "Logout" action). */
|
|
9
|
+
this.divider = false;
|
|
10
|
+
this.hasIcon = false;
|
|
11
|
+
this.hasIconEnd = false;
|
|
12
|
+
}
|
|
13
|
+
componentWillLoad() {
|
|
14
|
+
this.hasIcon = !!this.el.querySelector('[slot="icon-left"]');
|
|
15
|
+
this.hasIconEnd = !!this.el.querySelector('[slot="icon-right"]');
|
|
8
16
|
}
|
|
9
17
|
handleClick(event) {
|
|
10
18
|
if (this.disabled || !this.clickable)
|
|
11
19
|
return;
|
|
20
|
+
// Intentionally no preventDefault/stopPropagation: the native click must keep bubbling so a
|
|
21
|
+
// consumer's routerLink / (click) / href placed directly on this element still fires.
|
|
12
22
|
this.itemClick.emit({ event, value: this.value });
|
|
13
23
|
}
|
|
14
24
|
render() {
|
|
15
|
-
|
|
25
|
+
// Ghost items carry arbitrary block content (e.g. header notification rows). Keep them as a plain
|
|
26
|
+
// slot so that layout is untouched.
|
|
27
|
+
if (this.variant === OverflowMenuVariant.GHOST) {
|
|
28
|
+
return (h(Host, { class: "xv-overflow-menu-item", role: "menuitem", "aria-disabled": this.disabled ? 'true' : null }, h("slot", null)));
|
|
29
|
+
}
|
|
30
|
+
const useAnchor = !!this.href && !this.disabled;
|
|
31
|
+
const InnerTag = useAnchor ? 'a' : 'div';
|
|
32
|
+
return (h(Host, { class: "xv-overflow-menu-item", role: "menuitem", "aria-disabled": this.disabled ? 'true' : null }, h(InnerTag, { class: "item_inner", href: useAnchor ? this.href : null, target: useAnchor ? this.target : null, tabindex: -1 }, this.hasIcon && (h("span", { class: "item_icon item_icon--left" }, h("slot", { name: "icon-left" }))), h("span", { class: "item_label" }, h("slot", null)), this.hasIconEnd && (h("span", { class: "item_icon item_icon--right" }, h("slot", { name: "icon-right" }))))));
|
|
16
33
|
}
|
|
17
34
|
static get is() { return "xv-overflow-menu-v2-item"; }
|
|
18
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -78,7 +95,7 @@ export class XvOverflowMenuItem {
|
|
|
78
95
|
"mutable": false,
|
|
79
96
|
"complexType": {
|
|
80
97
|
"original": "OverflowMenuVariant",
|
|
81
|
-
"resolved": "
|
|
98
|
+
"resolved": "\"\" | \"danger\" | \"ghost\"",
|
|
82
99
|
"references": {
|
|
83
100
|
"OverflowMenuVariant": {
|
|
84
101
|
"location": "import",
|
|
@@ -118,9 +135,73 @@ export class XvOverflowMenuItem {
|
|
|
118
135
|
"reflect": false,
|
|
119
136
|
"attribute": "clickable",
|
|
120
137
|
"defaultValue": "true"
|
|
138
|
+
},
|
|
139
|
+
"href": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"mutable": false,
|
|
142
|
+
"complexType": {
|
|
143
|
+
"original": "string",
|
|
144
|
+
"resolved": "string",
|
|
145
|
+
"references": {}
|
|
146
|
+
},
|
|
147
|
+
"required": false,
|
|
148
|
+
"optional": true,
|
|
149
|
+
"docs": {
|
|
150
|
+
"tags": [],
|
|
151
|
+
"text": "Optional link: renders the item as an anchor so native navigation (middle-click, new tab) works."
|
|
152
|
+
},
|
|
153
|
+
"getter": false,
|
|
154
|
+
"setter": false,
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"attribute": "href"
|
|
157
|
+
},
|
|
158
|
+
"target": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"mutable": false,
|
|
161
|
+
"complexType": {
|
|
162
|
+
"original": "string",
|
|
163
|
+
"resolved": "string",
|
|
164
|
+
"references": {}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": true,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": "Anchor target, only used together with `href`."
|
|
171
|
+
},
|
|
172
|
+
"getter": false,
|
|
173
|
+
"setter": false,
|
|
174
|
+
"reflect": false,
|
|
175
|
+
"attribute": "target"
|
|
176
|
+
},
|
|
177
|
+
"divider": {
|
|
178
|
+
"type": "boolean",
|
|
179
|
+
"mutable": false,
|
|
180
|
+
"complexType": {
|
|
181
|
+
"original": "boolean",
|
|
182
|
+
"resolved": "boolean",
|
|
183
|
+
"references": {}
|
|
184
|
+
},
|
|
185
|
+
"required": false,
|
|
186
|
+
"optional": false,
|
|
187
|
+
"docs": {
|
|
188
|
+
"tags": [],
|
|
189
|
+
"text": "Draws a separator line above the item (e.g. before a \"Logout\" action)."
|
|
190
|
+
},
|
|
191
|
+
"getter": false,
|
|
192
|
+
"setter": false,
|
|
193
|
+
"reflect": true,
|
|
194
|
+
"attribute": "divider",
|
|
195
|
+
"defaultValue": "false"
|
|
121
196
|
}
|
|
122
197
|
};
|
|
123
198
|
}
|
|
199
|
+
static get states() {
|
|
200
|
+
return {
|
|
201
|
+
"hasIcon": {},
|
|
202
|
+
"hasIconEnd": {}
|
|
203
|
+
};
|
|
204
|
+
}
|
|
124
205
|
static get events() {
|
|
125
206
|
return [{
|
|
126
207
|
"method": "itemClick",
|
|
@@ -145,6 +226,7 @@ export class XvOverflowMenuItem {
|
|
|
145
226
|
}
|
|
146
227
|
}];
|
|
147
228
|
}
|
|
229
|
+
static get elementRef() { return "el"; }
|
|
148
230
|
static get listeners() {
|
|
149
231
|
return [{
|
|
150
232
|
"name": "click",
|
|
@@ -156,6 +156,10 @@
|
|
|
156
156
|
background-color: var(--background-active);
|
|
157
157
|
color: var(--icon-disabled);
|
|
158
158
|
}
|
|
159
|
+
:host .btn:focus-visible {
|
|
160
|
+
outline: 2px solid var(--focus, #273435);
|
|
161
|
+
outline-offset: -2px;
|
|
162
|
+
}
|
|
159
163
|
:host .btn:disabled {
|
|
160
164
|
background-color: transparent;
|
|
161
165
|
opacity: 0.5;
|
|
@@ -173,9 +177,10 @@
|
|
|
173
177
|
left: 0;
|
|
174
178
|
max-height: 0;
|
|
175
179
|
overflow: hidden;
|
|
180
|
+
outline: none;
|
|
176
181
|
border-radius: 3px;
|
|
177
182
|
transition: 200ms ease-in-out max-height, 100ms ease box-shadow;
|
|
178
|
-
min-width:
|
|
183
|
+
min-width: 160px;
|
|
179
184
|
max-width: 50vw;
|
|
180
185
|
width: max-content;
|
|
181
186
|
}
|
|
@@ -214,7 +219,7 @@
|
|
|
214
219
|
|
|
215
220
|
:host([size=lg]) {
|
|
216
221
|
--overflow-menu-size: 48px;
|
|
217
|
-
--overflow-menu-item-padding: 16px;
|
|
222
|
+
--overflow-menu-item-padding: 15px 16px;
|
|
218
223
|
}
|
|
219
224
|
|
|
220
225
|
:host([size=xl]) {
|
|
@@ -232,4 +237,25 @@
|
|
|
232
237
|
:host([open]) .list {
|
|
233
238
|
max-height: 500px;
|
|
234
239
|
box-shadow: -2px 2px 2px 0 rgba(0, 0, 0, 0.1);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/* Anchor mode: no built-in trigger; the panel floats and is placed by popper (strategy: fixed). */
|
|
243
|
+
:host(.anchored) {
|
|
244
|
+
display: contents;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
:host(.anchored) .list {
|
|
248
|
+
position: fixed;
|
|
249
|
+
top: 0;
|
|
250
|
+
left: 0;
|
|
251
|
+
max-height: none;
|
|
252
|
+
overflow: visible;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
:host(.anchored) .list:not(.open) {
|
|
256
|
+
display: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:host(.anchored) .list.open {
|
|
260
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
|
|
235
261
|
}
|