Skip to content

Commit 0967474

Browse files
committed
Merge branch 'v1/contrib' into feature/popover-container
2 parents abeabc5 + 8effa48 commit 0967474

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

packages/uui-base/lib/mixins/SelectableMixin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const SelectableMixin = <T extends Constructor<LitElement>>(
4545
// If not selectable target, then make it self selectable. (A selectable target should be made focusable by the component itself)
4646
this.setAttribute('tabindex', `${newVal ? '0' : '-1'}`);
4747
}
48-
this.requestUpdate('selected', oldVal);
48+
this.requestUpdate('selectable', oldVal);
4949
}
5050

5151
protected deselectable = true;

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

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ import {
33
SelectOnlyMixin,
44
} from '@umbraco-ui/uui-base/lib/mixins';
55
import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
6-
import { css, LitElement } from 'lit';
6+
import { css, html, LitElement } from 'lit';
77
import { property } from 'lit/decorators.js';
88

99
import { UUICardEvent } from './UUICardEvent';
1010

1111
/**
1212
* @element uui-card
13-
* @fires {UUICardEvent} open - fires when the card title is clicked
14-
* @description - Base card component to be extended by specific cards.
13+
* @fires {UUICardEvent} open - fires when the card title is clicked.
14+
* @description - Base card component to be extended by specific card elements.
15+
* @slot - Default content.
1516
*/
1617
@defineElement('uui-card')
1718
export class UUICardElement extends SelectOnlyMixin(
@@ -158,6 +159,10 @@ export class UUICardElement extends SelectOnlyMixin(
158159
e.stopPropagation();
159160
this.dispatchEvent(new UUICardEvent(UUICardEvent.OPEN));
160161
}
162+
163+
protected render() {
164+
return html`<slot></slot>`;
165+
}
161166
}
162167

163168
declare global {

packages/uui-card/lib/uui-card.story.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ const Template: Story = () => html`
1818
Card is a Component that provides the basics for a Card component. This can
1919
be extended in code to match a certain need.
2020
</p>
21+
22+
<uui-card selectable>
23+
<h5 class="uui-h5">Context of the card<h5>
24+
</uui-card>
2125
`;
2226

2327
export const AAAOverview = Template.bind({});

packages/uui-css/lib/guidelines.story.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,9 @@ export const Dialog = () => html`
188188
assume the message, for those users we want something that is easy to
189189
digest for their eyes.<br />
190190
Others are learning the system and need to be suited to all of the
191-
consequences to have confidence in what they do. They will read everything
192-
but not necessarily understand all words — Therefore we will use the
193-
description to write sentences and confirm the understanding.
191+
consequences to have confidence in what they do. They will read
192+
everything but not necessarily understand all words — Therefore we will
193+
use the description to write sentences and confirm the understanding.
194194
</p>
195195
196196
<p>
@@ -257,8 +257,8 @@ export const Dialog = () => html`
257257
258258
<br />
259259
<p>
260-
In the above example the description helps the user understand the effect
261-
and guides the user by mentioning where it goes.
260+
In the above example the description helps the user understand the effect
261+
and guides the user by mentioning where it goes.
262262
</p>
263263
<br />
264264
@@ -276,8 +276,8 @@ export const Dialog = () => html`
276276
<br />
277277
<p>
278278
This helps the user understand the effect of publishing and ´descendants´
279-
— which for someone who does not have experience can be hard to
280-
understand at first.
279+
— which for someone who does not have experience can be hard to understand
280+
at first.
281281
</p>
282282
283283
<br />

0 commit comments

Comments
 (0)