Skip to content

Commit a9b6853

Browse files
authored
Merge branch 'master' into mtsvyatkova/feat-1379-tile-manager
2 parents 596b425 + b9cdb2a commit a9b6853

File tree

13 files changed

+68
-62
lines changed

13 files changed

+68
-62
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## Unreleased
8+
### Added
9+
- #### Dialog
10+
- A new `message` slot that renders text content inside the dialog component has been added. The enhancement was introduced to align the design behavior between Ignite UI for WC and Ignite UI for Angular, ensuring a consistent user experience across products. The newly added `message' slot comes with additional styling with a max-width of 40 characters. The default slot is also still available for rendering content inside the dialog without limiting the component's width.
11+
712
## [5.2.0] - 2025-01-09
813
### Added
914
- Form-associated elements now have a `defaultValue` property (`defaultChecked` for radio buttons, checkboxes, and switches). When a form is reset, components will use this property’s value as their new value or checked state.

src/components/dialog/dialog.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import type { Constructor } from '../common/mixins/constructor.js';
1414
import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
1515
import {
1616
createCounter,
17+
isEmpty,
1718
numberInRangeInclusive,
1819
partNameMap,
1920
} from '../common/util.js';
@@ -36,6 +37,7 @@ export interface IgcDialogComponentEventMap {
3637
*
3738
* @slot - Renders content inside the default slot.
3839
* @slot title - Renders the title of the dialog header.
40+
* @slot message - Renders the message content of the dialog.
3941
* @slot footer - Renders the dialog footer.
4042
*
4143
* @csspart base - The base wrapper of the dialog.
@@ -76,6 +78,9 @@ export default class IgcDialogComponent extends EventEmitterMixin<
7678
@queryAssignedElements({ slot: 'title' })
7779
private titleElements!: Array<HTMLElement>;
7880

81+
@queryAssignedElements({ slot: 'message' })
82+
private messageElements!: Array<HTMLElement>;
83+
7984
@queryAssignedElements({ slot: 'footer' })
8085
private footerElements!: Array<HTMLElement>;
8186

@@ -262,6 +267,7 @@ export default class IgcDialogComponent extends EventEmitterMixin<
262267
<slot name="title"><span>${this.title}</span></slot>
263268
</header>
264269
<section part="content">
270+
<slot name="message" .hidden=${isEmpty(this.messageElements)}></slot>
265271
<slot @slotchange=${this.handleContentChange}></slot>
266272
</section>
267273
<footer part="footer">

src/components/dialog/themes/dialog.base.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ slot[name='footer'] {
6565
}
6666
}
6767

68+
[name='message']::slotted(*) {
69+
max-width: 40ch;
70+
display: inline-block;
71+
}
72+
6873
dialog::backdrop {
6974
opacity: 0;
7075
}

src/components/list/list.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import IgcListHeaderComponent from './list-header.js';
66
import IgcListItemComponent from './list-item.js';
77
import { styles } from './themes/container.base.css.js';
88
import { all } from './themes/container.js';
9+
import { styles as shared } from './themes/shared/container/list.common.css.js';
910

1011
/**
1112
* Displays a collection of data items in a templatable list format.
@@ -17,7 +18,7 @@ import { all } from './themes/container.js';
1718
@themes(all)
1819
export default class IgcListComponent extends LitElement {
1920
public static readonly tagName = 'igc-list';
20-
public static override styles = styles;
21+
public static override styles = [styles, shared];
2122

2223
/* blazorSuppress */
2324
public static register() {
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
@use 'styles/common/component';
22
@use 'styles/utilities' as *;
3-
@use './light/themes' as *;
4-
5-
$theme: $material;
63

74
:host {
85
display: flex;
96
flex-flow: column nowrap;
107
font-family: var(--ig-font-family);
118
overflow: hidden auto;
129
height: auto;
13-
background: var-get($theme, 'background');
14-
border-radius: var-get($theme, 'border-radius');
1510
}

src/components/list/themes/container.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import { styles as sharedLight } from './light/container/list.shared.css.js';
1717
import { styles as bootstrap } from './shared/container/list.bootstrap.css.js';
1818
import { styles as fluent } from './shared/container/list.fluent.css.js';
1919
import { styles as indigo } from './shared/container/list.indigo.css.js';
20-
import { styles as material } from './shared/container/list.material.css.js';
2120

2221
const light = {
2322
shared: css`
@@ -27,7 +26,7 @@ const light = {
2726
${bootstrap} ${bootstrapLight}
2827
`,
2928
material: css`
30-
${material} ${materialLight}
29+
${materialLight}
3130
`,
3231
fluent: css`
3332
${fluent} ${fluentLight}
@@ -45,7 +44,7 @@ const dark = {
4544
${bootstrap} ${bootstrapDark}
4645
`,
4746
material: css`
48-
${material} ${materialDark}
47+
${materialDark}
4948
`,
5049
fluent: css`
5150
${fluent} ${fluentDark}

src/components/list/themes/shared/container/list.bootstrap.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,5 @@ $theme: $bootstrap;
66
:host {
77
--component-size: var(--ig-size, #{var-get($theme, 'default-size')}) !important;
88

9-
background: var-get($theme, 'background');
10-
border: rem(1px) solid var-get($theme, 'border-color');
11-
border-radius: var-get($theme, 'border-radius');
9+
border: var-get($theme, 'border-width') solid var-get($theme, 'border-color');
1210
}

src/components/list/themes/shared/container/list.material.scss renamed to src/components/list/themes/shared/container/list.common.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
@use 'styles/utilities' as *;
22
@use '../../light/themes' as *;
33

4-
$theme: $material;
4+
$theme: $base;
55

66
:host {
77
--component-size: var(--ig-size, #{var-get($theme, 'default-size')}) !important;
8-
}
8+
9+
background: var-get($theme, 'background');
10+
border-radius: var-get($theme, 'border-radius');
11+
}
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
11
@use 'styles/utilities' as *;
2-
@use '../../light/themes' as *;
3-
4-
$theme: $bootstrap;
5-
6-
:host {
7-
border-bottom: rem(1px) solid var-get($theme, 'border-color');
8-
}
9-
10-
:host(:last-of-type) {
11-
border-bottom: none;
12-
}
132

143
[part='title'] {
154
@include type-style('body-1');
165
}
17-
18-
[part='subtitle'] {
19-
@include type-style('body-2');
20-
}

src/components/list/themes/shared/item/list-item.common.scss

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,33 @@ $theme: $material;
77
border-radius: var-get($theme, 'item-border-radius');
88
color: var-get($theme, 'item-text-color');
99
background: var-get($theme, 'item-background');
10+
border-bottom: var-get($theme, 'border-width') solid var-get($theme, 'border-color');
1011
}
1112

12-
::slotted(igc-icon) {
13+
:host(:last-of-type) {
14+
border-bottom: none;
15+
}
16+
17+
[part='title'] {
18+
color: var-get($theme, 'item-title-color');
19+
}
20+
21+
[part='subtitle'] {
22+
color: var-get($theme, 'item-subtitle-color');
23+
}
24+
25+
[part='start'] {
26+
color: var-get($theme, 'item-thumbnail-color');
27+
}
28+
29+
[part='end'] {
1330
color: var-get($theme, 'item-action-color');
1431
}
1532

1633
:host(:hover),
1734
:host(:focus-within) {
1835
background: var-get($theme, 'item-background-hover');
19-
20-
::slotted(igc-icon) {
21-
color: var-get($theme, 'item-action-color-hover');
22-
}
36+
color: var-get($theme, 'item-text-color-hover');
2337

2438
[part='title'] {
2539
color: var-get($theme, 'item-title-color-hover');
@@ -38,18 +52,23 @@ $theme: $material;
3852
}
3953
}
4054

41-
[part='title'] {
42-
color: var-get($theme, 'item-title-color');
43-
}
55+
:host(:active) {
56+
color: var-get($theme, 'item-text-color-active');
57+
background: var-get($theme, 'item-background-active');
4458

45-
[part='subtitle'] {
46-
color: var-get($theme, 'item-subtitle-color');
47-
}
59+
[part='title'] {
60+
color: var-get($theme, 'item-title-color-active');
61+
}
4862

49-
[part='start'] {
50-
color: var-get($theme, 'item-thumbnail-color');
51-
}
63+
[part='subtitle'] {
64+
color: var-get($theme, 'item-subtitle-color-active');
65+
}
5266

53-
[part='end'] {
54-
color: var-get($theme, 'item-action-color');
67+
[part='start'] {
68+
color: var-get($theme, 'item-thumbnail-color-active');
69+
}
70+
71+
[part='end'] {
72+
color: var-get($theme, 'item-action-color-active');
73+
}
5574
}

0 commit comments

Comments
 (0)