@eui/eds-wc 22.0.0-alpha.29 → 22.0.0-alpha.31
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-breadcrumb/eds-wc-breadcrumb.d.ts +7 -1
- package/eds-breadcrumb/eds-wc-breadcrumb.d.ts.map +1 -1
- package/eds-breadcrumb/eds-wc-breadcrumb.js +21 -7
- package/eds-breadcrumb/eds-wc-breadcrumb.js.map +1 -1
- package/eds-button/eds-wc-button.d.ts +41 -17
- package/eds-button/eds-wc-button.d.ts.map +1 -1
- package/eds-button/eds-wc-button.js +172 -150
- package/eds-button/eds-wc-button.js.map +1 -1
- package/eds-button/index.d.ts +2 -2
- package/eds-button/index.d.ts.map +1 -1
- package/eds-button/index.js +1 -1
- package/eds-button/index.js.map +1 -1
- package/eds-chat-bubble/eds-wc-chat-bubble.d.ts +83 -0
- package/eds-chat-bubble/eds-wc-chat-bubble.d.ts.map +1 -0
- package/eds-chat-bubble/eds-wc-chat-bubble.js +238 -0
- package/eds-chat-bubble/eds-wc-chat-bubble.js.map +1 -0
- package/eds-chat-bubble/index.d.ts +3 -0
- package/eds-chat-bubble/index.d.ts.map +1 -0
- package/eds-chat-bubble/index.js +2 -0
- package/eds-chat-bubble/index.js.map +1 -0
- package/eds-input-addon/eds-wc-input-addon.d.ts +55 -0
- package/eds-input-addon/eds-wc-input-addon.d.ts.map +1 -0
- package/eds-input-addon/eds-wc-input-addon.js +177 -0
- package/eds-input-addon/eds-wc-input-addon.js.map +1 -0
- package/eds-input-addon/index.d.ts +3 -0
- package/eds-input-addon/index.d.ts.map +1 -0
- package/eds-input-addon/index.js +2 -0
- package/eds-input-addon/index.js.map +1 -0
- package/eds-input-prompt/eds-wc-input-prompt.d.ts +97 -0
- package/eds-input-prompt/eds-wc-input-prompt.d.ts.map +1 -0
- package/eds-input-prompt/eds-wc-input-prompt.js +363 -0
- package/eds-input-prompt/eds-wc-input-prompt.js.map +1 -0
- package/eds-input-prompt/index.d.ts +3 -0
- package/eds-input-prompt/index.d.ts.map +1 -0
- package/eds-input-prompt/index.js +2 -0
- package/eds-input-prompt/index.js.map +1 -0
- package/eds-segmented-control/eds-wc-segmented-control.d.ts +67 -0
- package/eds-segmented-control/eds-wc-segmented-control.d.ts.map +1 -0
- package/{eds-button-group/eds-wc-button-group.js → eds-segmented-control/eds-wc-segmented-control.js} +40 -35
- package/eds-segmented-control/eds-wc-segmented-control.js.map +1 -0
- package/eds-segmented-control/index.d.ts +3 -0
- package/eds-segmented-control/index.d.ts.map +1 -0
- package/eds-segmented-control/index.js +2 -0
- package/eds-segmented-control/index.js.map +1 -0
- package/index.d.ts +9 -2
- package/index.d.ts.map +1 -1
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/package.json +16 -4
- package/eds-button-group/eds-wc-button-group.d.ts +0 -62
- package/eds-button-group/eds-wc-button-group.d.ts.map +0 -1
- package/eds-button-group/eds-wc-button-group.js.map +0 -1
- package/eds-button-group/index.d.ts +0 -2
- package/eds-button-group/index.d.ts.map +0 -1
- package/eds-button-group/index.js +0 -2
- package/eds-button-group/index.js.map +0 -1
|
@@ -29,7 +29,8 @@ export declare class EdsWcBreadcrumb extends LitElement {
|
|
|
29
29
|
* <eds-wc-breadcrumb-item icon="house" href="/" aria-label="Home"></eds-wc-breadcrumb-item>
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
-
* @slot - Optional custom content (overrides label/icon rendering)
|
|
32
|
+
* @slot - Optional custom content (overrides label/icon rendering). With `has-menu`, project a
|
|
33
|
+
* collapsed `<eds-wc-dropdown>` here to render a grouped path segment.
|
|
33
34
|
*/
|
|
34
35
|
export declare class EdsWcBreadcrumbItem extends LitElement {
|
|
35
36
|
/** Text label. */
|
|
@@ -38,6 +39,11 @@ export declare class EdsWcBreadcrumbItem extends LitElement {
|
|
|
38
39
|
icon: string;
|
|
39
40
|
/** Navigation URL. When empty, the item is not clickable (current page). */
|
|
40
41
|
href: string;
|
|
42
|
+
/**
|
|
43
|
+
* Turns the item into a slot that projects a collapsed `<eds-wc-dropdown>` (trigger + items)
|
|
44
|
+
* instead of a label/icon. Suppresses the link / current-page behavior.
|
|
45
|
+
*/
|
|
46
|
+
hasMenu: boolean;
|
|
41
47
|
/** @internal Set by parent. */
|
|
42
48
|
_isFirst: boolean;
|
|
43
49
|
/** @internal Set by parent. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-breadcrumb.d.ts","sourceRoot":"","sources":["../../src/eds-breadcrumb/eds-wc-breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAW,MAAM,KAAK,CAAC;AAIrD;;;;;;;;;;;;;GAaG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAElC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAgB;IAEjD,OAAgB,MAAM,0BASpB;IAEO,iBAAiB,IAAI,IAAI;cAKf,MAAM;IAIzB,OAAO,CAAC,aAAa;CAWxB;AAED
|
|
1
|
+
{"version":3,"file":"eds-wc-breadcrumb.d.ts","sourceRoot":"","sources":["../../src/eds-breadcrumb/eds-wc-breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,UAAU,EAAW,MAAM,KAAK,CAAC;AAIrD;;;;;;;;;;;;;GAaG;AACH,qBACa,eAAgB,SAAQ,UAAU;IAElC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAgB;IAEjD,OAAgB,MAAM,0BASpB;IAEO,iBAAiB,IAAI,IAAI;cAKf,MAAM;IAIzB,OAAO,CAAC,aAAa;CAWxB;AAED;;;;;;;;;;;GAWG;AACH,qBACa,mBAAoB,SAAQ,UAAU;IAC/C,kBAAkB;IAElB,KAAK,SAAM;IAEX,qCAAqC;IAErC,IAAI,SAAM;IAEV,4EAA4E;IAE5E,IAAI,SAAM;IAEV;;;OAGG;IAEH,OAAO,UAAS;IAEhB,+BAA+B;IAC/B,QAAQ,UAAS;IAEjB,+BAA+B;IAC/B,OAAO,UAAS;IAEhB,OAAgB,MAAM,0BAkDpB;cAEiB,MAAM;cAqBN,OAAO,IAAI,IAAI;IAqBzB,iBAAiB,IAAI,IAAI;IAMzB,oBAAoB,IAAI,IAAI;IAMrC,OAAO,CAAC,QAAQ,CAQd;IAEF,OAAO,CAAC,UAAU,CAEhB;CACL;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,mBAAmB,EAAE,eAAe,CAAC;QACrC,wBAAwB,EAAE,mBAAmB,CAAC;KACjD;CACJ"}
|
|
@@ -69,7 +69,8 @@ export { EdsWcBreadcrumb };
|
|
|
69
69
|
* <eds-wc-breadcrumb-item icon="house" href="/" aria-label="Home"></eds-wc-breadcrumb-item>
|
|
70
70
|
* ```
|
|
71
71
|
*
|
|
72
|
-
* @slot - Optional custom content (overrides label/icon rendering)
|
|
72
|
+
* @slot - Optional custom content (overrides label/icon rendering). With `has-menu`, project a
|
|
73
|
+
* collapsed `<eds-wc-dropdown>` here to render a grouped path segment.
|
|
73
74
|
*/
|
|
74
75
|
let EdsWcBreadcrumbItem = class EdsWcBreadcrumbItem extends LitElement {
|
|
75
76
|
constructor() {
|
|
@@ -80,12 +81,17 @@ let EdsWcBreadcrumbItem = class EdsWcBreadcrumbItem extends LitElement {
|
|
|
80
81
|
this.icon = '';
|
|
81
82
|
/** Navigation URL. When empty, the item is not clickable (current page). */
|
|
82
83
|
this.href = '';
|
|
84
|
+
/**
|
|
85
|
+
* Turns the item into a slot that projects a collapsed `<eds-wc-dropdown>` (trigger + items)
|
|
86
|
+
* instead of a label/icon. Suppresses the link / current-page behavior.
|
|
87
|
+
*/
|
|
88
|
+
this.hasMenu = false;
|
|
83
89
|
/** @internal Set by parent. */
|
|
84
90
|
this._isFirst = false;
|
|
85
91
|
/** @internal Set by parent. */
|
|
86
92
|
this._isLast = false;
|
|
87
93
|
this._onClick = () => {
|
|
88
|
-
if (this.href && !this._isLast) {
|
|
94
|
+
if (this.href && !this._isLast && !this.hasMenu) {
|
|
89
95
|
if (this.href.startsWith('http')) {
|
|
90
96
|
window.location.href = this.href;
|
|
91
97
|
}
|
|
@@ -128,6 +134,10 @@ let EdsWcBreadcrumbItem = class EdsWcBreadcrumbItem extends LitElement {
|
|
|
128
134
|
outline-offset: 2px;
|
|
129
135
|
}
|
|
130
136
|
|
|
137
|
+
:host([has-menu]) {
|
|
138
|
+
cursor: default;
|
|
139
|
+
}
|
|
140
|
+
|
|
131
141
|
.separator svg,
|
|
132
142
|
.icon svg {
|
|
133
143
|
width: var(--eds-is-xs);
|
|
@@ -153,20 +163,21 @@ let EdsWcBreadcrumbItem = class EdsWcBreadcrumbItem extends LitElement {
|
|
|
153
163
|
${!this._isFirst
|
|
154
164
|
? html `<span class="separator" aria-hidden="true"><svg><use href="${separatorHref}"></use></svg></span>`
|
|
155
165
|
: nothing}
|
|
156
|
-
${this.icon
|
|
166
|
+
${!this.hasMenu && this.icon
|
|
157
167
|
? html `<span class="icon"><svg aria-hidden="true"><use href="${baseUrl}/eds/icons/sprites/regular.svg#${this.icon}"></use></svg></span>`
|
|
158
168
|
: nothing}
|
|
159
|
-
${this.label
|
|
169
|
+
${!this.hasMenu && this.label
|
|
160
170
|
? html `<span class="label">${this.label}</span>`
|
|
161
171
|
: nothing}
|
|
162
172
|
<slot></slot>
|
|
163
173
|
`;
|
|
164
174
|
}
|
|
165
175
|
updated() {
|
|
166
|
-
const isClickable = !!this.href && !this._isLast;
|
|
176
|
+
const isClickable = !!this.href && !this._isLast && !this.hasMenu;
|
|
177
|
+
const isCurrent = this._isLast && !this.hasMenu;
|
|
167
178
|
this.classList.toggle('clickable', isClickable);
|
|
168
|
-
this.classList.toggle('current',
|
|
169
|
-
if (
|
|
179
|
+
this.classList.toggle('current', isCurrent);
|
|
180
|
+
if (isCurrent) {
|
|
170
181
|
this.setAttribute('aria-current', 'page');
|
|
171
182
|
}
|
|
172
183
|
else {
|
|
@@ -201,6 +212,9 @@ __decorate([
|
|
|
201
212
|
__decorate([
|
|
202
213
|
property({ type: String })
|
|
203
214
|
], EdsWcBreadcrumbItem.prototype, "href", void 0);
|
|
215
|
+
__decorate([
|
|
216
|
+
property({ type: Boolean, attribute: 'has-menu', reflect: true })
|
|
217
|
+
], EdsWcBreadcrumbItem.prototype, "hasMenu", void 0);
|
|
204
218
|
EdsWcBreadcrumbItem = __decorate([
|
|
205
219
|
customElement('eds-wc-breadcrumb-item')
|
|
206
220
|
], EdsWcBreadcrumbItem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-breadcrumb.js","sourceRoot":"","sources":["../../src/eds-breadcrumb/eds-wc-breadcrumb.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;;;;;GAaG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAgB,SAAQ,UAAU;IAAxC;;QAEM,cAAS,GAAkB,YAAY,CAAC;IAiCrD,CAAC;aA/BmB,WAAM,GAAG,GAAG,CAAA;;;;;;;;;KAS3B,AATqB,CASpB;IAEO,iBAAiB;QACtB,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC5C,CAAC;IAEkB,MAAM;QACrB,OAAO,IAAI,CAAA,sBAAsB,IAAI,CAAC,aAAa,WAAW,CAAC;IACnE,CAAC;IAEO,aAAa,CAAC,CAAQ;QAC1B,MAAM,IAAI,GAAG,CAAC,CAAC,MAAyB,CAAC;QACzC,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC,MAAM,CACxC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,OAAO,KAAK,wBAAwB,CACvB,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EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;oDAClD;AAlBP,mBAAmB;IAD/B,aAAa,CAAC,wBAAwB,CAAC;GAC3B,mBAAmB,CAiJ/B"}
|
|
@@ -1,26 +1,37 @@
|
|
|
1
1
|
import { EdsBaseElement } from '../shared/eds-base.js';
|
|
2
2
|
/**
|
|
3
|
-
* Button type variants.
|
|
3
|
+
* Button visual type variants (ported 1:1 from the Angular `EdsButtonType`).
|
|
4
4
|
* - `primary`: Filled solid background
|
|
5
5
|
* - `secondary`: Outlined with border
|
|
6
6
|
* - `tertiary`: Ghost / text-only
|
|
7
7
|
*/
|
|
8
|
-
export type
|
|
9
|
-
|
|
8
|
+
export type EdsWcButtonType = 'primary' | 'secondary' | 'tertiary';
|
|
9
|
+
/**
|
|
10
|
+
* Colors the button accepts (ported 1:1 from the Angular `EdsButtonColor`).
|
|
11
|
+
* `primary` / `neutral` / `highlight` / `critical` have dedicated CSS branches;
|
|
12
|
+
* `warning` is accepted for parity but has no styled branch.
|
|
13
|
+
*/
|
|
14
|
+
export type EdsWcButtonColor = 'primary' | 'neutral' | 'highlight' | 'critical' | 'warning';
|
|
15
|
+
/** Sizes the button styles (ported 1:1 from the Angular `EdsButtonSize`). */
|
|
16
|
+
export type EdsWcButtonSize = 's' | 'm' | 'l';
|
|
10
17
|
/**
|
|
11
18
|
* `<eds-wc-button>` — EDS Button Web Component.
|
|
12
19
|
*
|
|
13
20
|
* A fully styled button supporting multiple visual types (primary, secondary, tertiary),
|
|
14
|
-
* color variants, sizes, and modifiers (rounded, block,
|
|
21
|
+
* color variants, sizes, and modifiers (rounded, block, line-wrap). Mirrors the Angular
|
|
22
|
+
* `button[edsButton]` component's String-Props API 1:1: `variant` (reflected as the
|
|
23
|
+
* `type-variant` attribute, matching the Angular `[attr.type-variant]` host binding),
|
|
24
|
+
* `color`, `size`, and the reflected boolean state attributes `rounded` / `block` /
|
|
25
|
+
* `line-wrap` / `disabled`.
|
|
15
26
|
*
|
|
16
27
|
* Unlike the Angular `button[edsButton]` directive which decorates a native `<button>`,
|
|
17
|
-
* this web component renders its own internal `<button>` element
|
|
28
|
+
* this web component renders its own internal `<button>` element.
|
|
18
29
|
*
|
|
19
30
|
* @example
|
|
20
31
|
* ```html
|
|
21
|
-
* <eds-wc-button
|
|
22
|
-
* <eds-wc-button type="secondary" color="neutral" size="s">Cancel</eds-wc-button>
|
|
23
|
-
* <eds-wc-button type="tertiary" color="critical" disabled>Delete</eds-wc-button>
|
|
32
|
+
* <eds-wc-button color="primary" size="m">Submit</eds-wc-button>
|
|
33
|
+
* <eds-wc-button type-variant="secondary" color="neutral" size="s">Cancel</eds-wc-button>
|
|
34
|
+
* <eds-wc-button type-variant="tertiary" color="critical" disabled>Delete</eds-wc-button>
|
|
24
35
|
* ```
|
|
25
36
|
*
|
|
26
37
|
* @slot - Button content (label text, icons, etc.)
|
|
@@ -28,25 +39,39 @@ declare const EdsWcButton_base: (new (...args: any[]) => import("../shared/size-
|
|
|
28
39
|
* @csspart button - The internal `<button>` element
|
|
29
40
|
* @csspart container - The inner flex container wrapping slotted content
|
|
30
41
|
*/
|
|
31
|
-
export declare class EdsWcButton extends
|
|
42
|
+
export declare class EdsWcButton extends EdsBaseElement {
|
|
43
|
+
/**
|
|
44
|
+
* Visual type of the button. Reflected as the `type-variant` attribute (matching the
|
|
45
|
+
* Angular `variant` input / `[attr.type-variant]` host binding).
|
|
46
|
+
* @default 'primary'
|
|
47
|
+
*/
|
|
48
|
+
variant: EdsWcButtonType;
|
|
32
49
|
/**
|
|
33
|
-
*
|
|
50
|
+
* Semantic color of the button.
|
|
34
51
|
* @default 'primary'
|
|
35
52
|
*/
|
|
36
|
-
|
|
53
|
+
color: EdsWcButtonColor;
|
|
54
|
+
/**
|
|
55
|
+
* Size of the button.
|
|
56
|
+
* @default 'm'
|
|
57
|
+
*/
|
|
58
|
+
size: EdsWcButtonSize;
|
|
37
59
|
/**
|
|
38
60
|
* Whether the button is disabled.
|
|
39
61
|
* Reflects to the internal `<button>` element's `disabled` attribute.
|
|
40
62
|
*/
|
|
41
63
|
disabled: boolean;
|
|
42
|
-
/** Makes the button full-width (block-level). */
|
|
64
|
+
/** Makes the button full-width (block-level). Mirrors the Angular `isBlock` input. */
|
|
43
65
|
block: boolean;
|
|
44
|
-
/**
|
|
45
|
-
iconOnly: boolean;
|
|
46
|
-
/** Applies fully rounded border-radius. */
|
|
66
|
+
/** Applies a fully rounded border-radius. Mirrors the Angular `isRounded` input. */
|
|
47
67
|
rounded: boolean;
|
|
48
|
-
/** Allows text content to wrap. */
|
|
68
|
+
/** Allows text content to wrap. Mirrors the Angular `hasLineWrap` input. */
|
|
49
69
|
lineWrap: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Marks the button as initially checked/selected within an `eds-wc-button-group`.
|
|
72
|
+
* Mirrors the Angular `isChecked` input; read by a parent group.
|
|
73
|
+
*/
|
|
74
|
+
checked: boolean;
|
|
50
75
|
static styles: import("lit").CSSResult;
|
|
51
76
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
52
77
|
}
|
|
@@ -55,5 +80,4 @@ declare global {
|
|
|
55
80
|
'eds-wc-button': EdsWcButton;
|
|
56
81
|
}
|
|
57
82
|
}
|
|
58
|
-
export {};
|
|
59
83
|
//# sourceMappingURL=eds-wc-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eds-wc-button.d.ts","sourceRoot":"","sources":["../../src/eds-button/eds-wc-button.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"eds-wc-button.d.ts","sourceRoot":"","sources":["../../src/eds-button/eds-wc-button.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;AAE5F,6EAA6E;AAC7E,MAAM,MAAM,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBACa,WAAY,SAAQ,cAAc;IAC3C;;;;OAIG;IAEH,OAAO,EAAE,eAAe,CAAa;IAErC;;;OAGG;IAEH,KAAK,EAAE,gBAAgB,CAAa;IAEpC;;;OAGG;IAEH,IAAI,EAAE,eAAe,CAAO;IAE5B;;;OAGG;IAEH,QAAQ,UAAS;IAEjB,sFAAsF;IAEtF,KAAK,UAAS;IAEd,oFAAoF;IAEpF,OAAO,UAAS;IAEhB,4EAA4E;IAE5E,QAAQ,UAAS;IAEjB;;;OAGG;IAEH,OAAO,UAAS;IAEhB,OAAgB,MAAM,0BAuOpB;cAEiB,MAAM;CAY5B;AAED,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,eAAe,EAAE,WAAW,CAAC;KAChC;CACJ"}
|