Skip to content

Commit 7907443

Browse files
desig9steinkdinevsimeonoff
authored
refactor(rating): update rating theme to consume schema colors (#13541)
* refactor(rating): update taring theme to consume schema colors * build(igniteui-theming): update the package to the latest version --------- Co-authored-by: Konstantin Dinev <[email protected]> Co-authored-by: Simeon Simeonoff <[email protected]>
1 parent 9008c21 commit 7907443

File tree

6 files changed

+20
-15
lines changed

6 files changed

+20
-15
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
"@types/source-map": "0.5.2",
6868
"fflate": "^0.7.3",
6969
"hammerjs": "^2.0.8",
70-
"igniteui-theming": "^3.1.1",
70+
"igniteui-theming": "^3.2.2",
7171
"igniteui-trial-watermark": "^3.0.2",
7272
"lodash-es": "^4.17.21",
7373
"rxjs": "^6.6.7",

projects/igniteui-angular/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"igniteui-trial-watermark": "^3.0.2",
7777
"lodash-es": "^4.17.21",
7878
"uuid": "^9.0.0",
79-
"igniteui-theming": "^3.1.1",
79+
"igniteui-theming": "^3.2.2",
8080
"@igniteui/material-icons-extended": "^3.0.0"
8181
},
8282
"peerDependencies": {

projects/igniteui-angular/src/lib/core/styles/components/rating/_rating-theme.scss

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
}
5353

5454
igc-rating::part(value-label) {
55-
color: color(null, 'gray', 900);
55+
color: var-get($theme, 'value-label');
5656
}
5757

5858
igc-rating[disabled]::part(label),
@@ -61,9 +61,9 @@
6161
}
6262

6363
igc-rating[disabled] {
64-
--symbol-empty-color: var(--disabled-empty-symbol-color);
65-
--symbol-full-color: var(--disabled-full-symbol-color);
66-
--symbol-empty-filter: grayscale(100%) opacity(50%);
67-
--symbol-full-filter: grayscale(50%);
64+
--symbol-empty-color: #{var-get($theme, 'disabled-empty-symbol-color')};
65+
--symbol-full-color: #{var-get($theme, 'disabled-full-symbol-color')};
66+
--disabled-symbol-empty-filter: #{var-get($theme, 'symbol-empty-filter')};
67+
--disabled-symbol-full-filter: #{var-get($theme, 'symbol-full-filter')};
6868
}
6969
}

src/app/rating/rating.sample.html

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22
<igx-card *ngFor="let model of models">
33
<igx-card-header>
44
<span igxCardHeaderTitle>{{model.Name}}</span>
5+
<span igxCardHeaderSubtitle>{{ model.Name }}'s rating is: {{ model.Rating }}</span>
56
</igx-card-header>
67
<igx-card-content>
78
<form #form1="ngForm">
8-
<igx-input-group>
9+
<igx-input-group type="border">
910
<input igxInput name="modelName" type="text" [(ngModel)]="model.Name" required />
1011
<label igxLabel for="modelName">Model Name</label>
1112
</igx-input-group>
1213

13-
<igx-input-group>
14+
<igx-input-group type="box">
1415
<input igxInput name="modelRating" type="text" [(ngModel)]="model.Rating" required />
1516
<label igxLabel for="modelRating">Model Rating</label>
1617
</igx-input-group>
1718

1819
<igc-rating name="modelRating" [(ngModel)]="model.Rating" max="10" label="Model Rating"></igc-rating>
19-
20-
<p>{{ model.Name }}'s rating is: {{ model.Rating }}</p>
2120
</form>
2221
</igx-card-content>
2322
</igx-card>

src/app/rating/rating.sample.scss

+6
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@
44
row-gap: 16px;
55
column-gap: 16px;
66
}
7+
8+
form {
9+
display: flex;
10+
flex-direction: column;
11+
gap: 16px;
12+
}
713
}

0 commit comments

Comments
 (0)