@eui/eds-wc 22.0.0-alpha.16 → 22.0.0-alpha.18
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/eds-accordion/eds-wc-accordion.js +3 -3
- package/eds-alert/eds-wc-alert.d.ts +1 -1
- package/eds-alert/eds-wc-alert.js +2 -2
- package/eds-blockquote/eds-wc-blockquote.js +1 -1
- package/eds-calendar/eds-wc-calendar.d.ts +274 -0
- package/eds-calendar/eds-wc-calendar.d.ts.map +1 -0
- package/eds-calendar/eds-wc-calendar.js +1236 -0
- package/eds-calendar/eds-wc-calendar.js.map +1 -0
- package/eds-calendar/index.d.ts +3 -0
- package/eds-calendar/index.d.ts.map +1 -0
- package/eds-calendar/index.js +2 -0
- package/eds-calendar/index.js.map +1 -0
- package/eds-card/eds-wc-card.js +1 -1
- package/eds-date-block/eds-wc-date-block.js +2 -2
- package/eds-datepicker/eds-wc-datepicker.js +1 -1
- package/eds-dialog/eds-wc-dialog.js +1 -1
- package/eds-discussion-thread/eds-wc-discussion-thread.js +2 -2
- package/eds-empty-state/eds-wc-empty-state.js +1 -1
- package/eds-fieldset/eds-wc-fieldset.js +1 -1
- package/eds-file-upload/eds-wc-file-upload.js +1 -1
- package/eds-growl/eds-wc-growl.js +1 -1
- package/eds-input-checkbox/eds-wc-input-checkbox.js +3 -3
- package/eds-input-number/eds-wc-input-number.js +1 -1
- package/eds-input-radio/eds-wc-input-radio.js +3 -3
- package/eds-input-text/eds-wc-input-text.js +1 -1
- package/eds-label/eds-wc-label.js +1 -1
- package/eds-language-selector/eds-wc-language-selector.d.ts +108 -0
- package/eds-language-selector/eds-wc-language-selector.d.ts.map +1 -0
- package/eds-language-selector/eds-wc-language-selector.js +650 -0
- package/eds-language-selector/eds-wc-language-selector.js.map +1 -0
- package/eds-language-selector/index.d.ts +3 -0
- package/eds-language-selector/index.d.ts.map +1 -0
- package/eds-language-selector/index.js +2 -0
- package/eds-language-selector/index.js.map +1 -0
- package/eds-menu/eds-wc-menu.d.ts +178 -0
- package/eds-menu/eds-wc-menu.d.ts.map +1 -0
- package/eds-menu/eds-wc-menu.js +933 -0
- package/eds-menu/eds-wc-menu.js.map +1 -0
- package/eds-menu/index.d.ts +3 -0
- package/eds-menu/index.d.ts.map +1 -0
- package/eds-menu/index.js +2 -0
- package/eds-menu/index.js.map +1 -0
- package/eds-message-box/eds-wc-message-box.js +1 -1
- package/eds-multiselect/eds-wc-multiselect.d.ts +118 -0
- package/eds-multiselect/eds-wc-multiselect.d.ts.map +1 -0
- package/eds-multiselect/eds-wc-multiselect.js +617 -0
- package/eds-multiselect/eds-wc-multiselect.js.map +1 -0
- package/eds-multiselect/index.d.ts +3 -0
- package/eds-multiselect/index.d.ts.map +1 -0
- package/eds-multiselect/index.js +2 -0
- package/eds-multiselect/index.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-content.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-content.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-content.js +34 -0
- package/eds-overlay/eds-wc-overlay-content.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-footer.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-footer.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-footer.js +35 -0
- package/eds-overlay/eds-wc-overlay-footer.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.d.ts +18 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.js +34 -0
- package/eds-overlay/eds-wc-overlay-header-action-items.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-label.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-header-label.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-label.js +32 -0
- package/eds-overlay/eds-wc-overlay-header-label.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.d.ts +17 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.js +32 -0
- package/eds-overlay/eds-wc-overlay-header-sublabel.js.map +1 -0
- package/eds-overlay/eds-wc-overlay-header.d.ts +25 -0
- package/eds-overlay/eds-wc-overlay-header.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay-header.js +105 -0
- package/eds-overlay/eds-wc-overlay-header.js.map +1 -0
- package/eds-overlay/eds-wc-overlay.d.ts +92 -0
- package/eds-overlay/eds-wc-overlay.d.ts.map +1 -0
- package/eds-overlay/eds-wc-overlay.js +336 -0
- package/eds-overlay/eds-wc-overlay.js.map +1 -0
- package/eds-overlay/index.d.ts +9 -0
- package/eds-overlay/index.d.ts.map +1 -0
- package/eds-overlay/index.js +8 -0
- package/eds-overlay/index.js.map +1 -0
- package/eds-popover/eds-wc-popover.js +1 -1
- package/eds-progress-bar/eds-wc-progress-bar.js +1 -1
- package/eds-progress-circle/eds-wc-progress-circle.js +3 -3
- package/eds-select/eds-wc-select.js +1 -1
- package/eds-skeleton/eds-wc-skeleton.js +1 -1
- package/eds-swiper/eds-wc-swiper.d.ts +100 -0
- package/eds-swiper/eds-wc-swiper.d.ts.map +1 -0
- package/eds-swiper/eds-wc-swiper.js +384 -0
- package/eds-swiper/eds-wc-swiper.js.map +1 -0
- package/eds-swiper/index.d.ts +2 -0
- package/eds-swiper/index.d.ts.map +1 -0
- package/eds-swiper/index.js +2 -0
- package/eds-swiper/index.js.map +1 -0
- package/eds-table/eds-wc-table.js +1 -1
- package/eds-tabs/eds-wc-tabs.js +1 -1
- package/eds-textarea/eds-wc-textarea.js +1 -1
- package/eds-timeline/eds-wc-timeline.js +2 -2
- package/eds-timepicker/eds-wc-timepicker.js +1 -1
- package/eds-user-profile/eds-wc-user-profile.d.ts +146 -0
- package/eds-user-profile/eds-wc-user-profile.d.ts.map +1 -0
- package/eds-user-profile/eds-wc-user-profile.js +562 -0
- package/eds-user-profile/eds-wc-user-profile.js.map +1 -0
- package/eds-user-profile/index.d.ts +2 -0
- package/eds-user-profile/index.d.ts.map +1 -0
- package/eds-user-profile/index.js +2 -0
- package/eds-user-profile/index.js.map +1 -0
- package/eds-wizard/eds-wc-wizard.js +1 -1
- package/index.d.ts +12 -0
- package/index.d.ts.map +1 -1
- package/index.js +12 -0
- package/index.js.map +1 -1
- package/package.json +29 -1
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, css, nothing } from 'lit';
|
|
8
|
+
import { customElement, property, state, query } from 'lit/decorators.js';
|
|
9
|
+
import { EdsBaseElement } from '../shared/eds-base.js';
|
|
10
|
+
/**
|
|
11
|
+
* `<eds-wc-swiper-item>` — a single item within `<eds-wc-swiper>`.
|
|
12
|
+
*
|
|
13
|
+
* Pure content-projection card with scroll-snap alignment and card-like styling. 1:1 projection
|
|
14
|
+
* of the Angular `eds-swiper-item` component (host `role="listitem"`, `.eds-swiper-item` class).
|
|
15
|
+
*
|
|
16
|
+
* @slot - Default slot for the item content.
|
|
17
|
+
*/
|
|
18
|
+
let EdsWcSwiperItem = class EdsWcSwiperItem extends EdsBaseElement {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/**
|
|
22
|
+
* Data attribute value for end-to-end testing identification.
|
|
23
|
+
* @default 'eds-swiper-item'
|
|
24
|
+
*/
|
|
25
|
+
this.e2eAttr = 'eds-swiper-item';
|
|
26
|
+
}
|
|
27
|
+
static { this.styles = css `
|
|
28
|
+
:host, *, *::before, *::after {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host {
|
|
33
|
+
display: block;
|
|
34
|
+
flex-shrink: 0;
|
|
35
|
+
scroll-snap-align: start;
|
|
36
|
+
border-radius: var(--eds-br-l);
|
|
37
|
+
background-color: var(--eds-c-surface-elevation);
|
|
38
|
+
padding: var(--eds-sp-m);
|
|
39
|
+
box-shadow: var(--eds-sh-1);
|
|
40
|
+
transition: box-shadow 200ms ease;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:host(:hover) {
|
|
44
|
+
box-shadow: var(--eds-sh-2);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@media (max-width: 767px) {
|
|
48
|
+
:host {
|
|
49
|
+
min-width: 280px;
|
|
50
|
+
padding: var(--eds-sp-s);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
`; }
|
|
54
|
+
connectedCallback() {
|
|
55
|
+
super.connectedCallback();
|
|
56
|
+
if (!this.hasAttribute('role')) {
|
|
57
|
+
this.setAttribute('role', 'listitem');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
render() {
|
|
61
|
+
return html `<slot></slot>`;
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
__decorate([
|
|
65
|
+
property({ type: String, attribute: 'data-e2e', reflect: true })
|
|
66
|
+
], EdsWcSwiperItem.prototype, "e2eAttr", void 0);
|
|
67
|
+
EdsWcSwiperItem = __decorate([
|
|
68
|
+
customElement('eds-wc-swiper-item')
|
|
69
|
+
], EdsWcSwiperItem);
|
|
70
|
+
export { EdsWcSwiperItem };
|
|
71
|
+
/**
|
|
72
|
+
* `<eds-wc-swiper>` — EDS Swiper Web Component.
|
|
73
|
+
*
|
|
74
|
+
* A horizontal scrolling container that displays items in a row with optional navigation arrows
|
|
75
|
+
* and smooth scroll-snap behavior. Unlike the carousel (one slide at a time with transform-based
|
|
76
|
+
* animation), the swiper displays multiple items simultaneously and uses native scroll behavior.
|
|
77
|
+
* 1:1 projection of the Angular `eds-swiper` component (host `role="region"`, `.eds-swiper` class).
|
|
78
|
+
*
|
|
79
|
+
* Items are projected via the default slot — each direct child (typically an
|
|
80
|
+
* `<eds-wc-swiper-item>`) is one item in the scrollable track.
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```html
|
|
84
|
+
* <eds-wc-swiper gap="20" item-min-width="320">
|
|
85
|
+
* <eds-wc-swiper-item>Card 1</eds-wc-swiper-item>
|
|
86
|
+
* <eds-wc-swiper-item>Card 2</eds-wc-swiper-item>
|
|
87
|
+
* <eds-wc-swiper-item>Card 3</eds-wc-swiper-item>
|
|
88
|
+
* </eds-wc-swiper>
|
|
89
|
+
* ```
|
|
90
|
+
*
|
|
91
|
+
* @slot - Default slot for the swiper items (each direct child = one item).
|
|
92
|
+
*
|
|
93
|
+
* @fires swiper-scroll - Dispatched when the track is scrolled via a navigation arrow. `detail: { direction: 'left' | 'right' }`
|
|
94
|
+
*/
|
|
95
|
+
let EdsWcSwiper = class EdsWcSwiper extends EdsBaseElement {
|
|
96
|
+
constructor() {
|
|
97
|
+
super(...arguments);
|
|
98
|
+
/**
|
|
99
|
+
* Data attribute value for end-to-end testing identification.
|
|
100
|
+
* @default 'eds-swiper'
|
|
101
|
+
*/
|
|
102
|
+
this.e2eAttr = 'eds-swiper';
|
|
103
|
+
/**
|
|
104
|
+
* Accessible label describing the swiper region.
|
|
105
|
+
* @default 'Scrollable content'
|
|
106
|
+
*/
|
|
107
|
+
this.ariaLabel = 'Scrollable content';
|
|
108
|
+
/**
|
|
109
|
+
* Gap between items in pixels.
|
|
110
|
+
* @default 20
|
|
111
|
+
*/
|
|
112
|
+
this.gap = 20;
|
|
113
|
+
/**
|
|
114
|
+
* Minimum width of each item in pixels. Applied to slotted items via a CSS custom property.
|
|
115
|
+
* @default 320
|
|
116
|
+
*/
|
|
117
|
+
this.itemMinWidth = 320;
|
|
118
|
+
/**
|
|
119
|
+
* Whether to hide navigation arrows.
|
|
120
|
+
* @default false
|
|
121
|
+
*/
|
|
122
|
+
this.hideNavigation = false;
|
|
123
|
+
this._canScrollLeft = false;
|
|
124
|
+
this._canScrollRight = false;
|
|
125
|
+
this._slideDirection = null;
|
|
126
|
+
this._slideAnimationTimer = null;
|
|
127
|
+
this._scrollLeft = () => this.scrollLeftBy();
|
|
128
|
+
this._scrollRight = () => this.scrollRightBy();
|
|
129
|
+
this._onScroll = () => this._updateScrollState();
|
|
130
|
+
this._onSlotChange = () => this._updateScrollState();
|
|
131
|
+
}
|
|
132
|
+
/** Whether navigation arrows should be visible. */
|
|
133
|
+
get _showNavigation() {
|
|
134
|
+
return !this.hideNavigation && (this._canScrollLeft || this._canScrollRight);
|
|
135
|
+
}
|
|
136
|
+
static { this.styles = css `
|
|
137
|
+
:host, *, *::before, *::after {
|
|
138
|
+
box-sizing: border-box;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:host {
|
|
142
|
+
display: block;
|
|
143
|
+
position: relative;
|
|
144
|
+
width: 100%;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.eds-swiper__track {
|
|
148
|
+
display: flex;
|
|
149
|
+
overflow-x: auto;
|
|
150
|
+
scroll-snap-type: x mandatory;
|
|
151
|
+
scroll-behavior: smooth;
|
|
152
|
+
-webkit-overflow-scrolling: touch;
|
|
153
|
+
scrollbar-width: none;
|
|
154
|
+
padding: var(--eds-sp-2xs) 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.eds-swiper__track::-webkit-scrollbar {
|
|
158
|
+
display: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.eds-swiper__track--slide-right ::slotted(*) {
|
|
162
|
+
animation: eds-swiper-slide-in-right 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.eds-swiper__track--slide-left ::slotted(*) {
|
|
166
|
+
animation: eds-swiper-slide-in-left 400ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
::slotted(*) {
|
|
170
|
+
min-width: var(--_eds-swiper-item-min-width, 320px);
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.eds-swiper__nav {
|
|
174
|
+
position: absolute;
|
|
175
|
+
top: 50%;
|
|
176
|
+
transform: translateY(-50%);
|
|
177
|
+
z-index: 2;
|
|
178
|
+
display: inline-flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
width: 40px;
|
|
182
|
+
height: 40px;
|
|
183
|
+
padding: 0;
|
|
184
|
+
border: none;
|
|
185
|
+
border-radius: var(--eds-br-full);
|
|
186
|
+
cursor: pointer;
|
|
187
|
+
color: var(--eds-c-foreground-subtle);
|
|
188
|
+
font-family: inherit;
|
|
189
|
+
background-color: var(--eds-c-surface-elevation);
|
|
190
|
+
box-shadow: var(--eds-sh-1);
|
|
191
|
+
transition: opacity 200ms ease, box-shadow 200ms ease;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.eds-swiper__nav:hover {
|
|
195
|
+
box-shadow: var(--eds-sh-2);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.eds-swiper__nav:focus-visible {
|
|
199
|
+
outline: 2px solid var(--eds-c-border-focus);
|
|
200
|
+
outline-offset: 2px;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.eds-swiper__nav svg {
|
|
204
|
+
width: var(--eds-is-m);
|
|
205
|
+
height: var(--eds-is-m);
|
|
206
|
+
fill: currentColor;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.eds-swiper__nav--prev {
|
|
210
|
+
left: var(--eds-sp-2xs);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.eds-swiper__nav--next {
|
|
214
|
+
right: var(--eds-sp-2xs);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@media (max-width: 767px) {
|
|
218
|
+
.eds-swiper__nav {
|
|
219
|
+
display: none;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
@keyframes eds-swiper-slide-in-right {
|
|
224
|
+
from {
|
|
225
|
+
opacity: 0.4;
|
|
226
|
+
transform: translateX(30px);
|
|
227
|
+
}
|
|
228
|
+
to {
|
|
229
|
+
opacity: 1;
|
|
230
|
+
transform: translateX(0);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@keyframes eds-swiper-slide-in-left {
|
|
235
|
+
from {
|
|
236
|
+
opacity: 0.4;
|
|
237
|
+
transform: translateX(-30px);
|
|
238
|
+
}
|
|
239
|
+
to {
|
|
240
|
+
opacity: 1;
|
|
241
|
+
transform: translateX(0);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
`; }
|
|
245
|
+
connectedCallback() {
|
|
246
|
+
super.connectedCallback();
|
|
247
|
+
if (!this.hasAttribute('role')) {
|
|
248
|
+
this.setAttribute('role', 'region');
|
|
249
|
+
}
|
|
250
|
+
this._resizeObserver = new ResizeObserver(() => this._updateScrollState());
|
|
251
|
+
this._resizeObserver.observe(this);
|
|
252
|
+
}
|
|
253
|
+
disconnectedCallback() {
|
|
254
|
+
super.disconnectedCallback();
|
|
255
|
+
this._resizeObserver?.disconnect();
|
|
256
|
+
this._resizeObserver = undefined;
|
|
257
|
+
if (this._slideAnimationTimer) {
|
|
258
|
+
clearTimeout(this._slideAnimationTimer);
|
|
259
|
+
this._slideAnimationTimer = null;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
firstUpdated() {
|
|
263
|
+
this._updateScrollState();
|
|
264
|
+
}
|
|
265
|
+
render() {
|
|
266
|
+
const baseUrl = EdsBaseElement.assetsBaseUrl;
|
|
267
|
+
const prevHref = `${baseUrl}/eds/icons/sprites/core.svg#caret-left`;
|
|
268
|
+
const nextHref = `${baseUrl}/eds/icons/sprites/core.svg#caret-right`;
|
|
269
|
+
const trackClasses = [
|
|
270
|
+
'eds-swiper__track',
|
|
271
|
+
this._slideDirection === 'left' ? 'eds-swiper__track--slide-left' : '',
|
|
272
|
+
this._slideDirection === 'right' ? 'eds-swiper__track--slide-right' : '',
|
|
273
|
+
].filter(Boolean).join(' ');
|
|
274
|
+
return html `
|
|
275
|
+
<div
|
|
276
|
+
class="${trackClasses}"
|
|
277
|
+
role="list"
|
|
278
|
+
style="gap: ${this.gap}px; --_eds-swiper-item-min-width: ${this.itemMinWidth}px;"
|
|
279
|
+
@scroll="${this._onScroll}">
|
|
280
|
+
<slot @slotchange="${this._onSlotChange}"></slot>
|
|
281
|
+
</div>
|
|
282
|
+
|
|
283
|
+
${this._showNavigation && this._canScrollLeft ? html `
|
|
284
|
+
<button
|
|
285
|
+
type="button"
|
|
286
|
+
class="eds-swiper__nav eds-swiper__nav--prev"
|
|
287
|
+
aria-label="Scroll left"
|
|
288
|
+
@click="${this._scrollLeft}">
|
|
289
|
+
<svg aria-hidden="true"><use href="${prevHref}"></use></svg>
|
|
290
|
+
</button>
|
|
291
|
+
` : nothing}
|
|
292
|
+
|
|
293
|
+
${this._showNavigation && this._canScrollRight ? html `
|
|
294
|
+
<button
|
|
295
|
+
type="button"
|
|
296
|
+
class="eds-swiper__nav eds-swiper__nav--next"
|
|
297
|
+
aria-label="Scroll right"
|
|
298
|
+
@click="${this._scrollRight}">
|
|
299
|
+
<svg aria-hidden="true"><use href="${nextHref}"></use></svg>
|
|
300
|
+
</button>
|
|
301
|
+
` : nothing}
|
|
302
|
+
`;
|
|
303
|
+
}
|
|
304
|
+
/** Scroll the track to the left by ~one viewport width. */
|
|
305
|
+
scrollLeftBy() {
|
|
306
|
+
const track = this._track;
|
|
307
|
+
if (!track)
|
|
308
|
+
return;
|
|
309
|
+
this._triggerSlideAnimation('left');
|
|
310
|
+
track.scrollBy({ left: -track.clientWidth * 0.8, behavior: 'smooth' });
|
|
311
|
+
this.dispatchEvent(new CustomEvent('swiper-scroll', {
|
|
312
|
+
bubbles: true,
|
|
313
|
+
composed: true,
|
|
314
|
+
detail: { direction: 'left' },
|
|
315
|
+
}));
|
|
316
|
+
}
|
|
317
|
+
/** Scroll the track to the right by ~one viewport width. */
|
|
318
|
+
scrollRightBy() {
|
|
319
|
+
const track = this._track;
|
|
320
|
+
if (!track)
|
|
321
|
+
return;
|
|
322
|
+
this._triggerSlideAnimation('right');
|
|
323
|
+
track.scrollBy({ left: track.clientWidth * 0.8, behavior: 'smooth' });
|
|
324
|
+
this.dispatchEvent(new CustomEvent('swiper-scroll', {
|
|
325
|
+
bubbles: true,
|
|
326
|
+
composed: true,
|
|
327
|
+
detail: { direction: 'right' },
|
|
328
|
+
}));
|
|
329
|
+
}
|
|
330
|
+
_triggerSlideAnimation(direction) {
|
|
331
|
+
if (this._slideAnimationTimer) {
|
|
332
|
+
clearTimeout(this._slideAnimationTimer);
|
|
333
|
+
}
|
|
334
|
+
this._slideDirection = direction;
|
|
335
|
+
this._slideAnimationTimer = setTimeout(() => {
|
|
336
|
+
this._slideDirection = null;
|
|
337
|
+
this._slideAnimationTimer = null;
|
|
338
|
+
}, 400);
|
|
339
|
+
}
|
|
340
|
+
_updateScrollState() {
|
|
341
|
+
const track = this._track;
|
|
342
|
+
if (!track)
|
|
343
|
+
return;
|
|
344
|
+
const { scrollLeft, scrollWidth, clientWidth } = track;
|
|
345
|
+
const canLeft = scrollLeft > 1;
|
|
346
|
+
const canRight = scrollLeft + clientWidth < scrollWidth - 1;
|
|
347
|
+
if (this._canScrollLeft !== canLeft)
|
|
348
|
+
this._canScrollLeft = canLeft;
|
|
349
|
+
if (this._canScrollRight !== canRight)
|
|
350
|
+
this._canScrollRight = canRight;
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
__decorate([
|
|
354
|
+
property({ type: String, attribute: 'data-e2e', reflect: true })
|
|
355
|
+
], EdsWcSwiper.prototype, "e2eAttr", void 0);
|
|
356
|
+
__decorate([
|
|
357
|
+
property({ type: String, attribute: 'aria-label', reflect: true })
|
|
358
|
+
], EdsWcSwiper.prototype, "ariaLabel", void 0);
|
|
359
|
+
__decorate([
|
|
360
|
+
property({ type: Number })
|
|
361
|
+
], EdsWcSwiper.prototype, "gap", void 0);
|
|
362
|
+
__decorate([
|
|
363
|
+
property({ type: Number, attribute: 'item-min-width' })
|
|
364
|
+
], EdsWcSwiper.prototype, "itemMinWidth", void 0);
|
|
365
|
+
__decorate([
|
|
366
|
+
property({ type: Boolean, attribute: 'hide-navigation', reflect: true })
|
|
367
|
+
], EdsWcSwiper.prototype, "hideNavigation", void 0);
|
|
368
|
+
__decorate([
|
|
369
|
+
state()
|
|
370
|
+
], EdsWcSwiper.prototype, "_canScrollLeft", void 0);
|
|
371
|
+
__decorate([
|
|
372
|
+
state()
|
|
373
|
+
], EdsWcSwiper.prototype, "_canScrollRight", void 0);
|
|
374
|
+
__decorate([
|
|
375
|
+
state()
|
|
376
|
+
], EdsWcSwiper.prototype, "_slideDirection", void 0);
|
|
377
|
+
__decorate([
|
|
378
|
+
query('.eds-swiper__track')
|
|
379
|
+
], EdsWcSwiper.prototype, "_track", void 0);
|
|
380
|
+
EdsWcSwiper = __decorate([
|
|
381
|
+
customElement('eds-wc-swiper')
|
|
382
|
+
], EdsWcSwiper);
|
|
383
|
+
export { EdsWcSwiper };
|
|
384
|
+
//# sourceMappingURL=eds-wc-swiper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eds-wc-swiper.js","sourceRoot":"","sources":["../../src/eds-swiper/eds-wc-swiper.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;GAOG;AAEI,IAA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
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/eds-swiper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC"}
|
|
@@ -123,7 +123,7 @@ let EdsWcTable = class EdsWcTable extends EdsBaseElement {
|
|
|
123
123
|
|
|
124
124
|
thead th {
|
|
125
125
|
background: var(--eds-c-surface-neutral-subtler); color: var(--eds-c-foreground-default);
|
|
126
|
-
font: var(--eds-f-label-m-
|
|
126
|
+
font: var(--eds-f-label-m-semibold); padding: var(--eds-sp-s); text-align: left;
|
|
127
127
|
border-bottom: var(--eds-bw-s) solid var(--eds-c-border-divider); white-space: nowrap;
|
|
128
128
|
}
|
|
129
129
|
:host([sticky-header]) thead { position: sticky; top: 0; z-index: 8; }
|
package/eds-tabs/eds-wc-tabs.js
CHANGED
|
@@ -58,7 +58,7 @@ let EdsWcTabs = class EdsWcTabs extends LitElement {
|
|
|
58
58
|
background: none;
|
|
59
59
|
cursor: pointer;
|
|
60
60
|
color: var(--eds-c-foreground-subtler);
|
|
61
|
-
font: var(--eds-f-label-m-
|
|
61
|
+
font: var(--eds-f-label-m-semibold);
|
|
62
62
|
outline: none;
|
|
63
63
|
white-space: nowrap;
|
|
64
64
|
gap: var(--eds-sp-2xs);
|
|
@@ -77,7 +77,7 @@ let EdsWcTextarea = class EdsWcTextarea extends EdsBaseElement {
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
textarea:disabled {
|
|
80
|
-
background-color: var(--eds-c-
|
|
80
|
+
background-color: var(--eds-c-surface-disabled);
|
|
81
81
|
border-color: var(--eds-c-border-disabled);
|
|
82
82
|
color: var(--eds-c-foreground-subtler);
|
|
83
83
|
pointer-events: none;
|
|
@@ -169,9 +169,9 @@ let EdsWcTimelineItem = class EdsWcTimelineItem extends ColorMixin(EdsBaseElemen
|
|
|
169
169
|
min-width: 0;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
-
.title { font: var(--eds-f-label-m-
|
|
172
|
+
.title { font: var(--eds-f-label-m-semibold); color: var(--_title-color); line-height: var(--_first-line-height); }
|
|
173
173
|
.subtitle { font: var(--eds-f-paragraph-s); color: var(--eds-c-foreground-subtler); margin-top: var(--eds-sp-4xs); }
|
|
174
|
-
.date { font: var(--eds-f-label-s-
|
|
174
|
+
.date { font: var(--eds-f-label-s-semibold); color: var(--eds-c-foreground-default); line-height: var(--_first-line-height); }
|
|
175
175
|
.time { font: var(--eds-f-paragraph-xs); color: var(--eds-c-foreground-subtler); margin-top: var(--eds-sp-4xs); }
|
|
176
176
|
.content .date { margin-top: var(--eds-sp-2xs); }
|
|
177
177
|
`; }
|
|
@@ -58,7 +58,7 @@ let EdsWcTimepicker = class EdsWcTimepicker extends EdsBaseElement {
|
|
|
58
58
|
input:focus-visible { outline: 2px solid var(--eds-c-border-primary); outline-offset: -2px; }
|
|
59
59
|
input[readonly] { background: transparent; border-color: transparent; pointer-events: none; }
|
|
60
60
|
|
|
61
|
-
.separator { font: var(--eds-f-label-m-
|
|
61
|
+
.separator { font: var(--eds-f-label-m-semibold); color: var(--eds-c-foreground-subtler); }
|
|
62
62
|
`; }
|
|
63
63
|
render() {
|
|
64
64
|
const ro = this.readonly;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { EdsBaseElement } from '../shared/eds-base.js';
|
|
2
|
+
import '../eds-avatar/eds-wc-avatar.js';
|
|
3
|
+
import '../eds-icon/eds-wc-icon.js';
|
|
4
|
+
/**
|
|
5
|
+
* `<eds-wc-user-profile>` — EDS User Profile Web Component.
|
|
6
|
+
*
|
|
7
|
+
* 1:1 projection of the Angular `eds-user-profile`. Displays a user's avatar, name and
|
|
8
|
+
* sub-info with an optional dropdown menu, or an icon-only login/logged-in trigger. Supports
|
|
9
|
+
* keyboard navigation of the menu (ArrowUp/Down, Enter/Space, Escape), click-outside-to-close,
|
|
10
|
+
* and left/right menu alignment.
|
|
11
|
+
*
|
|
12
|
+
* Menu items are projected via the default slot as `<eds-wc-user-profile-menu>` containing
|
|
13
|
+
* `<eds-wc-user-profile-menu-item>` children. When a menu is present the profile becomes an
|
|
14
|
+
* interactive `role="button"` trigger.
|
|
15
|
+
*
|
|
16
|
+
* The Angular component auto-detects `eds-shell-toolbar` / `eds-shell-header` ancestors to force
|
|
17
|
+
* toolbar / reverse layout. Web Components have no DI/ancestor injection, so those two contextual
|
|
18
|
+
* behaviors are exposed as explicit reflected boolean attributes `in-toolbar` and `reverse-context`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <eds-wc-user-profile full-name="John Doe" sub-infos="Administrator">
|
|
23
|
+
* <eds-wc-user-profile-menu>
|
|
24
|
+
* <eds-wc-user-profile-menu-item>Profile</eds-wc-user-profile-menu-item>
|
|
25
|
+
* <eds-wc-user-profile-menu-item>Settings</eds-wc-user-profile-menu-item>
|
|
26
|
+
* <eds-wc-user-profile-menu-item>Log out</eds-wc-user-profile-menu-item>
|
|
27
|
+
* </eds-wc-user-profile-menu>
|
|
28
|
+
* </eds-wc-user-profile>
|
|
29
|
+
*
|
|
30
|
+
* <!-- Icon-only login trigger -->
|
|
31
|
+
* <eds-wc-user-profile has-icon-only login-label="Log in"></eds-wc-user-profile>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @slot - Dropdown menu content (an `<eds-wc-user-profile-menu>` with menu items)
|
|
35
|
+
*
|
|
36
|
+
* @fires login-click - Dispatched when the icon-only profile is clicked while not logged in. `detail: void`
|
|
37
|
+
*/
|
|
38
|
+
export declare class EdsWcUserProfile extends EdsBaseElement {
|
|
39
|
+
/** Full name of the user. */
|
|
40
|
+
fullName: string;
|
|
41
|
+
/** First name. */
|
|
42
|
+
firstName: string;
|
|
43
|
+
/** Last name. */
|
|
44
|
+
lastName: string;
|
|
45
|
+
/** URL of the avatar image. */
|
|
46
|
+
avatarUrl: string;
|
|
47
|
+
/** Additional info displayed below the name (e.g. email, role). */
|
|
48
|
+
subInfos: string;
|
|
49
|
+
/** Welcome label displayed before the user name. */
|
|
50
|
+
welcomeLabel: string;
|
|
51
|
+
/** Whether to show the welcome label. */
|
|
52
|
+
hasWelcomeLabel: boolean;
|
|
53
|
+
/** Whether to show user name and info text. */
|
|
54
|
+
isShowUserInfos: boolean;
|
|
55
|
+
/** Whether to show initials in the avatar when no image. */
|
|
56
|
+
isShowAvatarInitials: boolean;
|
|
57
|
+
/** Reverse the layout (name on left, avatar on right). */
|
|
58
|
+
isReverse: boolean;
|
|
59
|
+
/** Whether to reverse name order (firstName first). */
|
|
60
|
+
reverseNameOrder: boolean;
|
|
61
|
+
/** Whether to show only an icon with a login/logged-in label (no avatar, no name). */
|
|
62
|
+
hasIconOnly: boolean;
|
|
63
|
+
/** Whether the user is currently logged in (used with hasIconOnly). */
|
|
64
|
+
isLoggedIn: boolean;
|
|
65
|
+
/** Label shown when not logged in (hasIconOnly mode). */
|
|
66
|
+
loginLabel: string;
|
|
67
|
+
/** Label shown when logged in (hasIconOnly mode). */
|
|
68
|
+
loggedInLabel: string;
|
|
69
|
+
/**
|
|
70
|
+
* Force toolbar styling. In Angular this is derived from an `eds-shell-toolbar` ancestor;
|
|
71
|
+
* WC has no ancestor injection, so it is an explicit reflected attribute.
|
|
72
|
+
*/
|
|
73
|
+
inToolbar: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Force reverse layout by context. In Angular this is derived from an `eds-shell-header`
|
|
76
|
+
* ancestor; WC has no ancestor injection, so it is an explicit reflected attribute.
|
|
77
|
+
*/
|
|
78
|
+
reverseContext: boolean;
|
|
79
|
+
private _menuOpen;
|
|
80
|
+
private _alignLeft;
|
|
81
|
+
private _hasMenu;
|
|
82
|
+
private _focusedIndex;
|
|
83
|
+
private _triggerEl;
|
|
84
|
+
/** Effective reverse state: input or context. */
|
|
85
|
+
private get _effectiveReverse();
|
|
86
|
+
/** Icon to display in icon-only mode based on login state. */
|
|
87
|
+
private get _iconOnlyIcon();
|
|
88
|
+
/** Label to display in icon-only mode based on login state. */
|
|
89
|
+
private get _iconOnlyLabel();
|
|
90
|
+
/** Whether the component has a dropdown menu. */
|
|
91
|
+
private get _menuAvailable();
|
|
92
|
+
/** Whether the component is interactive (clickable/tabbable). */
|
|
93
|
+
private get _isInteractive();
|
|
94
|
+
/** Computed display name. */
|
|
95
|
+
private get _displayName();
|
|
96
|
+
/** Computed initials from name. */
|
|
97
|
+
private get _initials();
|
|
98
|
+
private get _menuItems();
|
|
99
|
+
static styles: import("lit").CSSResult;
|
|
100
|
+
disconnectedCallback(): void;
|
|
101
|
+
connectedCallback(): void;
|
|
102
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
103
|
+
private _onSlotChange;
|
|
104
|
+
private _onProfileClick;
|
|
105
|
+
private _onTriggerKeydown;
|
|
106
|
+
private _toggleMenu;
|
|
107
|
+
private _closeMenu;
|
|
108
|
+
private _onDocumentClick;
|
|
109
|
+
private _onMenuKeydown;
|
|
110
|
+
private _focusFirstItem;
|
|
111
|
+
private _moveFocus;
|
|
112
|
+
private _updateAlignment;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* `<eds-wc-user-profile-menu>` — Container for user-profile dropdown menu items.
|
|
116
|
+
*
|
|
117
|
+
* Pure content-projection wrapper. Groups `<eds-wc-user-profile-menu-item>` children inside the
|
|
118
|
+
* profile dropdown panel.
|
|
119
|
+
*
|
|
120
|
+
* @slot - Menu items (`<eds-wc-user-profile-menu-item>`)
|
|
121
|
+
*/
|
|
122
|
+
export declare class EdsWcUserProfileMenu extends EdsBaseElement {
|
|
123
|
+
static styles: import("lit").CSSResult;
|
|
124
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* `<eds-wc-user-profile-menu-item>` — A single item in the user-profile dropdown menu.
|
|
128
|
+
*
|
|
129
|
+
* Rendered as `role="menuitem"` with roving `tabindex="-1"`; the parent
|
|
130
|
+
* `<eds-wc-user-profile>` manages focus via ArrowUp/Down.
|
|
131
|
+
*
|
|
132
|
+
* @slot - Item label content
|
|
133
|
+
*/
|
|
134
|
+
export declare class EdsWcUserProfileMenuItem extends EdsBaseElement {
|
|
135
|
+
static styles: import("lit").CSSResult;
|
|
136
|
+
connectedCallback(): void;
|
|
137
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
138
|
+
}
|
|
139
|
+
declare global {
|
|
140
|
+
interface HTMLElementTagNameMap {
|
|
141
|
+
'eds-wc-user-profile': EdsWcUserProfile;
|
|
142
|
+
'eds-wc-user-profile-menu': EdsWcUserProfileMenu;
|
|
143
|
+
'eds-wc-user-profile-menu-item': EdsWcUserProfileMenuItem;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=eds-wc-user-profile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eds-wc-user-profile.d.ts","sourceRoot":"","sources":["../../src/eds-user-profile/eds-wc-user-profile.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,gCAAgC,CAAC;AACxC,OAAO,4BAA4B,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBACa,gBAAiB,SAAQ,cAAc;IAChD,6BAA6B;IACuB,QAAQ,SAAM;IAElE,kBAAkB;IACmC,SAAS,SAAM;IAEpE,iBAAiB;IACmC,QAAQ,SAAM;IAElE,+BAA+B;IACsB,SAAS,SAAM;IAEpE,mEAAmE;IACf,QAAQ,SAAM;IAElE,oDAAoD;IACI,YAAY,SAAa;IAEjF,yCAAyC;IACoB,eAAe,UAAQ;IAEpF,+CAA+C;IACe,eAAe,UAAQ;IAErF,4DAA4D;IACO,oBAAoB,UAAQ;IAE/F,0DAA0D;IACW,SAAS,UAAS;IAEvF,uDAAuD;IACO,gBAAgB,UAAS;IAEvF,sFAAsF;IACd,WAAW,UAAS;IAE5F,uEAAuE;IACf,UAAU,U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