Skip to content

Commit 6b92f23

Browse files
committed
Merge branch 'v1/contrib' into release/1.13.0
2 parents 5718632 + a7177be commit 6b92f23

File tree

10 files changed

+407
-371
lines changed

10 files changed

+407
-371
lines changed

.storybook/main.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ const config: StorybookConfig = {
3131
options: {},
3232
},
3333

34-
docs: {
35-
autodocs: true,
36-
},
34+
docs: {},
3735
};
3836
export default config;

package-lock.json

Lines changed: 332 additions & 330 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,26 +63,26 @@
6363
"@chromatic-com/storybook": "3.2.5",
6464
"@eslint/compat": "^1.1.1",
6565
"@eslint/js": "^9.7.0",
66-
"@lerna-lite/cli": "3.12.1",
67-
"@lerna-lite/exec": "3.12.1",
68-
"@lerna-lite/publish": "3.12.1",
69-
"@lerna-lite/run": "3.12.1",
70-
"@lerna-lite/version": "3.12.1",
66+
"@lerna-lite/cli": "3.12.3",
67+
"@lerna-lite/exec": "3.12.3",
68+
"@lerna-lite/publish": "3.12.3",
69+
"@lerna-lite/run": "3.12.3",
70+
"@lerna-lite/version": "3.12.3",
7171
"@open-wc/testing": "4.0.0",
7272
"@rollup/plugin-node-resolve": "15.2.3",
73-
"@storybook/addon-a11y": "8.6.3",
74-
"@storybook/addon-essentials": "8.6.3",
75-
"@storybook/addon-links": "8.6.3",
76-
"@storybook/blocks": "8.6.3",
77-
"@storybook/manager-api": "8.6.3",
78-
"@storybook/preview-api": "8.6.3",
79-
"@storybook/test": "8.6.3",
80-
"@storybook/theming": "8.6.3",
81-
"@storybook/web-components": "8.6.3",
82-
"@storybook/web-components-vite": "8.6.3",
73+
"@storybook/addon-a11y": "8.6.4",
74+
"@storybook/addon-essentials": "8.6.4",
75+
"@storybook/addon-links": "8.6.4",
76+
"@storybook/blocks": "8.6.4",
77+
"@storybook/manager-api": "8.6.4",
78+
"@storybook/preview-api": "8.6.4",
79+
"@storybook/test": "8.6.4",
80+
"@storybook/theming": "8.6.4",
81+
"@storybook/web-components": "8.6.4",
82+
"@storybook/web-components-vite": "8.6.4",
8383
"@types/chai": "4.3.12",
8484
"@types/eslint__js": "8.42.3",
85-
"@types/mocha": "^10.0.7",
85+
"@types/mocha": "10.0.7",
8686
"@web/dev-server-esbuild": "0.4.3",
8787
"@web/test-runner": "0.19.0",
8888
"@web/test-runner-commands": "0.9.0",
@@ -91,7 +91,7 @@
9191
"babel-loader": "9.1.3",
9292
"chromatic": "11.27.0",
9393
"element-internals-polyfill": "1.3.10",
94-
"esbuild": "0.25.0",
94+
"esbuild": "0.25.1",
9595
"eslint": "9.7.0",
9696
"eslint-config-prettier": "9.1.0",
9797
"eslint-plugin-lit": "1.14.0",
@@ -129,7 +129,7 @@
129129
"rollup-plugin-import-css": "3.5.5",
130130
"rollup-plugin-minify-html-literals": "1.2.6",
131131
"rollup-plugin-postcss": "4.0.2",
132-
"storybook": "8.6.3",
132+
"storybook": "8.6.4",
133133
"tsc-files": "1.1.4",
134134
"turbo": "2.4.4",
135135
"typescript": "5.8.2",

packages/uui-card-block-type/lib/uui-card-block-type.element.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ export class UUICardBlockTypeElement extends UUICardElement {
9696
#renderContent() {
9797
return html`
9898
<div id="content">
99-
<span id="name">${this.name}</span>
100-
<small>${this.description}<slot name="description"></slot></small>
99+
<span title="${this.name}" id="name">${this.name}</span>
100+
<small title="${this.description}">${this.description}<slot name="description"></slot></small>
101101
</div></div>
102102
`;
103103
}
@@ -176,6 +176,15 @@ export class UUICardBlockTypeElement extends UUICardElement {
176176
#open-part:hover #name {
177177
text-decoration: underline;
178178
}
179+
#open-part #name,
180+
#open-part small {
181+
display: -webkit-box;
182+
-webkit-line-clamp: 1;
183+
-webkit-box-orient: vertical;
184+
overflow: hidden;
185+
text-overflow: ellipsis;
186+
overflow-wrap: anywhere;
187+
}
179188
180189
:host([image]:not([image=''])) #open-part {
181190
transition: opacity 0.5s 0.5s;

packages/uui-card-content-node/lib/uui-card-content-node.element.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ export class UUICardContentNodeElement extends UUICardElement {
7676
? this._renderFallbackIcon()
7777
: ''}
7878
</span>
79-
<div id="name">${this.name}<slot name="name"></slot></div>
79+
<div title="${this.name}" id="name">
80+
${this.name}<slot name="name"></slot>
81+
</div>
8082
</span>
8183
${this.renderDetail()}
8284
</span>
@@ -173,6 +175,15 @@ export class UUICardContentNodeElement extends UUICardElement {
173175
padding: var(--uui-size-space-4) var(--uui-size-space-5);
174176
}
175177
178+
#open-part #name {
179+
display: -webkit-box;
180+
-webkit-line-clamp: 2;
181+
-webkit-box-orient: vertical;
182+
overflow: hidden;
183+
text-overflow: ellipsis;
184+
overflow-wrap: anywhere;
185+
}
186+
176187
#content {
177188
align-self: stretch;
178189
display: flex;

packages/uui-card-media/lib/uui-card-media.element.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export class UUICardMediaElement extends UUICardElement {
106106
<!--
107107
TODO: Implement info box when pop-out is ready
108108
-->
109-
<span id="name">${this.name}</span>
109+
<span id="name" title="${this.name}">${this.name}</span>
110110
<small id="detail">${this.detail}<slot name="detail"></slot></small>
111111
</div>
112112
`;
@@ -191,6 +191,15 @@ export class UUICardMediaElement extends UUICardElement {
191191
text-decoration: underline;
192192
}
193193
194+
#open-part #name {
195+
display: -webkit-box;
196+
-webkit-line-clamp: 1;
197+
-webkit-box-orient: vertical;
198+
overflow: hidden;
199+
text-overflow: ellipsis;
200+
overflow-wrap: anywhere;
201+
}
202+
194203
:host([image]:not([image=''])) #open-part {
195204
transition: opacity 0.5s 0.5s;
196205
opacity: 0;

packages/uui-card-user/lib/uui-card-user.element.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export class UUICardUserElement extends UUICardElement {
7676
name="avatar"
7777
class="avatar"
7878
@slotchange=${this._avatarSlotChanged}></slot>
79-
<span>${this.name}</span>
79+
<span title="${this.name}">${this.name}</span>
8080
<slot></slot>
8181
</div>`;
8282
}
@@ -159,12 +159,19 @@ export class UUICardUserElement extends UUICardElement {
159159
position: relative;
160160
align-items: center;
161161
margin: 0 0 3px 0;
162+
height: 100%;
162163
}
163164
164165
#content > span {
166+
display: -webkit-box;
167+
-webkit-line-clamp: 2;
168+
-webkit-box-orient: vertical;
169+
overflow: hidden;
170+
text-overflow: ellipsis;
165171
vertical-align: center;
166172
margin-top: 3px;
167173
font-weight: 700;
174+
overflow-wrap: anywhere;
168175
}
169176
170177
.avatar {

packages/uui-icon/lib/uui-icon.element.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class UUIIconElement extends LitElement {
139139
static styles = [
140140
css`
141141
:host {
142+
vertical-align: text-bottom;
142143
display: inline-flex;
143144
align-items: center;
144145
justify-content: center;

packages/uui-menu-item/lib/uui-menu-item.element.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,6 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
311311
312312
/** Disabled */
313313
:host([disabled]) #menu-item {
314-
color: var(
315-
--uui-menu-item-color-disabled,
316-
var(--uui-color-disabled-contrast)
317-
);
318314
background-color: var(
319315
--uui-menu-item-background-color-disabled,
320316
var(--uui-color-disabled)
@@ -467,6 +463,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
467463
468464
:host([disabled]) #label-button {
469465
cursor: default;
466+
opacity: 0.5;
470467
}
471468
472469
button {

storyhelpers/render-slots.ts

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import { Args } from '@storybook/web-components';
2-
import { html, nothing, TemplateResult } from 'lit';
2+
import { nothing, TemplateResult } from 'lit';
3+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
34

45
/**
56
* Render a list of slots, filtering out any null or undefined slots to prevent empty lines.
67
* Accepts an array of TemplateResults or an Args object. If an Args object is provided, it will render any properties that end with 'slot'.
78
*/
89
// TODO: add a way to control the new lines. Eg exclude newlines: before, after, between as an array
9-
function renderSlots(args: Args): TemplateResult | typeof nothing;
10-
function renderSlots(
11-
param: TemplateResult[] | Args,
12-
): TemplateResult | typeof nothing {
10+
function renderSlots(args: Args): TemplateResult[] | typeof nothing;
11+
function renderSlots(param: TemplateResult[] | Args) {
1312
let slots: TemplateResult[] = [];
1413

1514
// if param is array, set slots to param
@@ -34,13 +33,16 @@ function renderSlots(
3433

3534
// Join slots with consistent formatting; no extra line breaks between them
3635
const spacing = ' ';
37-
const formattedSlots = validSlots.map(
38-
(slot, index) =>
39-
// eslint-disable-next-line lit/no-useless-template-literals
40-
html`${'\n'}${spacing}${slot}${index === slots.length - 1 ? '\n' : ''}`,
36+
37+
const stringSlots = validSlots.map(slot =>
38+
typeof slot === 'string' ? slot : slot.strings?.[0] ?? '',
4139
);
40+
const stringSlotsJoined = stringSlots.join('\n');
41+
const stringSlotsJoinedWithSpacing = stringSlotsJoined
42+
.split('\n')
43+
.map(line => spacing + line)
44+
.join('\n');
4245

43-
// Return the combined template results
44-
return html`${formattedSlots}`;
46+
return unsafeHTML(stringSlotsJoinedWithSpacing);
4547
}
4648
export { renderSlots };

0 commit comments

Comments
 (0)