Skip to content

Commit b038da1

Browse files
committed
fix(tile-manager): header & resize indicators improvements
1 parent 21b17cd commit b038da1

File tree

7 files changed

+32
-63
lines changed

7 files changed

+32
-63
lines changed

src/components/resize-container/themes/resize-container.base.scss

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,6 @@
88
visibility: var(--resize-visibility);
99
position: absolute;
1010
z-index: 1;
11-
12-
igc-icon {
13-
$icon-size: rem(9px);
14-
15-
--size: #{$icon-size} !important;
16-
--ig-icon-size: #{$icon-size};
17-
--igx-icon-size: #{$icon-size};
18-
}
19-
20-
// &::after {
21-
// content: '';
22-
// position: absolute;
23-
// inset: 0;
24-
// width: var(--_size);
25-
// height: var(--_size);
26-
// border-radius: 50%;
27-
// z-index: 1;
28-
// }
2911
}
3012

3113
:host {
@@ -45,19 +27,19 @@
4527

4628
[part='trigger-side'] {
4729
top: calc(50% - var(--_size));
48-
right: calc(var(--_size) / 2);
30+
right: calc(var(--_size) / 2 * -1);
4931
cursor: e-resize;
5032
}
5133

5234
[part='trigger'] {
53-
bottom: calc(var(--_size) / 2);
54-
right: calc(var(--_size) / 2);
35+
bottom: calc(var(--_size) / 2 * -1);
36+
right: calc(var(--_size) / 2 * -1);
5537
cursor: se-resize;
5638
}
5739

5840
[part='trigger-bottom'] {
5941
left: calc(50% - var(--_size));
60-
bottom: calc(var(--_size) / 2);
42+
bottom: calc(var(--_size) / 2 * -1);
6143
cursor: s-resize;
6244
}
6345

src/components/resize-container/themes/shared/resize-container.common.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
@use 'styles/utilities' as *;
2-
@use '../../../tile-manager/themes/light/themes' as tile;
32
@use '../light/themes' as *;
43

54
$theme: $material;
@@ -12,7 +11,7 @@ $theme: $material;
1211
inset: 0;
1312
width: 100%;
1413
height: 100%;
15-
border-radius: var-get(tile.$base, 'border-radius');
14+
border-radius: var(--_border-radius);
1615
border: rem(1px) solid var-get($theme, 'resize-indicator');
1716
}
1817
}

src/components/tile-manager/themes/shared/tile/tile.bootstrap.scss

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
@use 'styles/utilities' as *;
22

3-
:host(:not([disable-fullscreen][disable-maximize])) {
4-
[part='header'] {
5-
padding-block: sizable(rem(8px), rem(9px), rem(9px));
6-
}
3+
:host {
4+
--pad-block: #{sizable(rem(8px), rem(9px), rem(9px))};
75
}
86

97
::slotted([slot='title']) {

src/components/tile-manager/themes/shared/tile/tile.common.scss

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@ $theme: $material;
1515

1616
:host {
1717
--component-size: var(--ig-size, #{var-get($theme, 'default-size')});
18+
--_border-radius: #{var-get($theme, 'border-radius')};
1819
}
1920

2021
[part~='base'] {
2122
background: var-get($theme, 'tile-background');
22-
border-radius: var-get($theme, 'border-radius');
23+
border-radius: var(--_border-radius);
2324
box-shadow: var-get($theme, 'resting-elevation');
2425

2526
&::after {
@@ -64,8 +65,8 @@ $theme: $material;
6465

6566
[part='header'] {
6667
background: var-get($theme, 'header-background');
67-
border-top-left-radius: var-get($theme, 'border-radius');
68-
border-top-right-radius: var-get($theme, 'border-radius');
68+
border-top-left-radius: var(--_border-radius);
69+
border-top-right-radius: var(--_border-radius);
6970
}
7071

7172
[part='title'] {
@@ -82,12 +83,16 @@ igc-resize {
8283

8384
igc-resize[part~='side-adorner']::part(trigger-side) {
8485
background-color: transparent;
86+
right: 0;
8587
}
8688

8789
igc-resize[part~='corner-adorner']::part(trigger) {
8890
background-color: transparent;
91+
right: 0;
92+
bottom: 0;
8993
}
9094

9195
igc-resize[part~='bottom-adorner']::part(trigger-bottom) {
9296
background-color: transparent;
97+
bottom: 0;
9398
}
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
@use 'styles/utilities' as *;
22

3-
:host(:not([disable-fullscreen][disable-maximize])) {
4-
[part='header'] {
5-
padding-block: sizable(rem(8px), rem(12px), rem(12px));
6-
}
3+
:host {
4+
--pad-block: #{sizable(rem(8px), rem(12px), rem(12px))};
75
}
Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
@use 'styles/utilities' as *;
2-
@use '../../light/themes' as *;
32

4-
$theme: $indigo;
3+
:host {
4+
--pad-block: #{sizable(rem(8px), rem(14px), rem(14px))};
5+
}
56

67
[part='content-container'] {
78
::slotted(*) {
@@ -10,9 +11,3 @@ $theme: $indigo;
1011
margin: 0;
1112
}
1213
}
13-
14-
:host(:not([disable-fullscreen][disable-maximize])) {
15-
[part='header'] {
16-
padding-block: sizable(rem(8px), rem(14px), rem(14px));
17-
}
18-
}

src/components/tile-manager/themes/tile.base.scss

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,8 @@
8181
align-items: center;
8282
gap: sizable(rem(12px), rem(16px), rem(16px));
8383
width: 100%;
84-
}
85-
86-
:host(:not([disable-fullscreen][disable-maximize])) {
87-
[part='actions'] {
88-
padding-block: var(--pad-block);
89-
padding-inline: var(--pad-inline);
90-
}
84+
padding-block: var(--pad-block);
85+
padding-inline: var(--pad-inline);
9186
}
9287

9388
:host([disable-fullscreen][disable-maximize]) {
@@ -97,19 +92,22 @@
9792
}
9893

9994
[part='title'] {
100-
@include ellipsis();
101-
102-
width: 100%;
103-
min-width: 4ch;
95+
display: flex;
96+
flex-direction: column;
97+
justify-content: center;
98+
flex: 1 0 0%;
99+
overflow: hidden;
100+
min-width: 2ch;
104101
}
105102

106103
::slotted([slot='title']) {
107104
@include type-style('h6');
105+
@include ellipsis();
108106

107+
width: 100%;
108+
min-width: 2ch;
109109
margin-bottom: 0;
110-
padding-block: var(--pad-block);
111-
padding-inline: var(--pad-inline);
112-
display: inline;
110+
display: block;
113111
}
114112

115113
[part='actions'] {
@@ -118,9 +116,3 @@
118116
margin-inline-start: auto;
119117
flex-shrink: 0;
120118
}
121-
122-
// should be fixed
123-
// ::slotted([slot='actions']) {
124-
// padding-block: var(--pad-block);
125-
// padding-inline: var(--pad-inline);
126-
// }

0 commit comments

Comments
 (0)