@fluentui/web-components 3.0.0-beta.54 → 3.0.0-beta.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/web-components
2
2
 
3
- This log was last generated on Tue, 06 Aug 2024 04:07:00 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 08 Aug 2024 04:07:05 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [3.0.0-beta.55](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.55)
8
+
9
+ Thu, 08 Aug 2024 04:07:05 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.54..@fluentui/web-components_v3.0.0-beta.55)
11
+
12
+ ### Changes
13
+
14
+ - [chore]: [rating-display] move size, color and generate icons out of base class ([PR #32239](https://github.com/microsoft/fluentui/pull/32239) by jes@microsoft.com)
15
+
7
16
  ## [3.0.0-beta.54](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.54)
8
17
 
9
- Tue, 06 Aug 2024 04:07:00 GMT
18
+ Tue, 06 Aug 2024 04:07:08 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.53..@fluentui/web-components_v3.0.0-beta.54)
11
20
 
12
21
  ### Changes
@@ -33,7 +33,7 @@ export { BaseProgressBar, ProgressBar, ProgressBarDefinition, ProgressBarShape,
33
33
  export { RadioGroup, RadioGroupDefinition, RadioGroupOrientation, RadioGroupStyles, RadioGroupTemplate, } from './radio-group/index.js';
34
34
  export { Radio, RadioDefinition, RadioStyles, RadioTemplate } from './radio/index.js';
35
35
  export type { RadioControl, RadioOptions } from './radio/index.js';
36
- export { RatingDisplay, RatingDisplayColor, RatingDisplayDefinition, RatingDisplaySize, RatingDisplayStyles, RatingDisplayTemplate, } from './rating-display/index.js';
36
+ export { BaseRatingDisplay, RatingDisplay, RatingDisplayColor, RatingDisplayDefinition, RatingDisplaySize, RatingDisplayStyles, RatingDisplayTemplate, } from './rating-display/index.js';
37
37
  export { Slider, SliderDefinition, SliderMode, SliderOrientation, SliderSize, SliderStyles, SliderTemplate, } from './slider/index.js';
38
38
  export type { SliderConfiguration, SliderOptions } from './slider/index.js';
39
39
  export { BaseSpinner, Spinner, SpinnerAppearance, SpinnerDefinition, SpinnerSize, SpinnerStyles, SpinnerTemplate, } from './spinner/index.js';
@@ -1,4 +1,4 @@
1
- export { RatingDisplay } from './rating-display.js';
1
+ export { BaseRatingDisplay, RatingDisplay } from './rating-display.js';
2
2
  export { RatingDisplayColor, RatingDisplaySize } from './rating-display.options.js';
3
3
  export { template as RatingDisplayTemplate } from './rating-display.template.js';
4
4
  export { styles as RatingDisplayStyles } from './rating-display.styles.js';
@@ -4,7 +4,7 @@ import { RatingDisplayColor, RatingDisplaySize } from './rating-display.options.
4
4
  * The base class used for constructing a fluent-rating-display custom element
5
5
  * @public
6
6
  */
7
- export declare class RatingDisplay extends FASTElement {
7
+ export declare class BaseRatingDisplay extends FASTElement {
8
8
  /**
9
9
  * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
10
10
  *
@@ -12,47 +12,81 @@ export declare class RatingDisplay extends FASTElement {
12
12
  */
13
13
  elementInternals: ElementInternals;
14
14
  /**
15
- * The color of the rating display icons.
15
+ * The number of ratings.
16
16
  *
17
17
  * @public
18
- * @default `marigold`
19
18
  * @remarks
20
- * HTML Attribute: `color`
19
+ * HTML Attribute: `count`
21
20
  */
22
- color?: RatingDisplayColor;
21
+ count?: number;
23
22
  /**
24
- * Handles changes to the color attribute.
23
+ * The maximum possible value of the rating.
24
+ * This attribute determines the number of icons displayed.
25
+ * Must be a whole number greater than 1.
25
26
  *
26
- * @param prev - The previous state
27
- * @param next - The next state
27
+ * @public
28
+ * @remarks
29
+ * HTML Attribute: `max`
28
30
  */
29
- colorChanged(prev: RatingDisplayColor | undefined, next: RatingDisplayColor | undefined): void;
31
+ max?: number;
30
32
  /**
31
- * Renders a single filled icon with a label next to it.
33
+ * The value of the rating.
32
34
  *
33
35
  * @public
34
36
  * @remarks
35
- * HTML Attribute: `compact`
37
+ * HTML Attribute: `value`
36
38
  */
37
- compact: boolean;
39
+ value?: number;
40
+ private intlNumberFormatter;
41
+ constructor();
38
42
  /**
39
- * The number of ratings.
43
+ * Returns "count" as string, formatted according to the locale.
40
44
  *
41
- * @public
42
- * @remarks
43
- * HTML Attribute: `count`
45
+ * @internal
44
46
  */
45
- count?: number;
47
+ get formattedCount(): string;
46
48
  /**
47
- * The maximum possible value of the rating.
48
- * This attribute determines the number of icons displayed.
49
- * Must be a whole number greater than 1.
49
+ * Gets the selected value
50
+ *
51
+ * @protected
52
+ */
53
+ protected getSelectedValue(): number;
54
+ /**
55
+ * Gets the maximum icons to render
56
+ *
57
+ * @protected
58
+ */
59
+ protected getMaxIcons(): number;
60
+ /**
61
+ * Generates the icon SVG elements based on the "max" attribute.
62
+ *
63
+ * @internal
64
+ */
65
+ generateIcons(): string;
66
+ }
67
+ /**
68
+ * A Rating Dislpay Custom HTML Element.
69
+ * Based on BaseRatingDisplay and includes style and layout specific attributes
70
+ *
71
+ * @public
72
+ */
73
+ export declare class RatingDisplay extends BaseRatingDisplay {
74
+ /**
75
+ * The color of the rating display icons.
50
76
  *
51
77
  * @public
78
+ * @default `marigold`
52
79
  * @remarks
53
- * HTML Attribute: `max`
80
+ * HTML Attribute: `color`
54
81
  */
55
- max?: number;
82
+ color?: RatingDisplayColor;
83
+ /**
84
+ * Handles changes to the color attribute.
85
+ *
86
+ * @param prev - The previous state
87
+ * @param next - The next state
88
+ */
89
+ colorChanged(prev: RatingDisplayColor | undefined, next: RatingDisplayColor | undefined): void;
56
90
  /**
57
91
  * The size of the component.
58
92
  *
@@ -70,25 +104,23 @@ export declare class RatingDisplay extends FASTElement {
70
104
  */
71
105
  sizeChanged(prev: RatingDisplaySize | undefined, next: RatingDisplaySize | undefined): void;
72
106
  /**
73
- * The value of the rating.
107
+ * Renders a single filled icon with a label next to it.
74
108
  *
75
109
  * @public
76
110
  * @remarks
77
- * HTML Attribute: `value`
111
+ * HTML Attribute: `compact`
78
112
  */
79
- value?: number;
80
- private intlNumberFormatter;
81
- constructor();
113
+ compact: boolean;
82
114
  /**
83
- * Returns "count" as string, formatted according to the locale.
115
+ * Overrides the selected value and returns 1 if compact is true.
84
116
  *
85
- * @internal
117
+ * @override
86
118
  */
87
- get formattedCount(): string;
119
+ protected getSelectedValue(): number;
88
120
  /**
89
- * Generates the icon SVG elements based on the "max" attribute.
121
+ * Overrides the maximum icons and returns a max of 1 if compact is true.
90
122
  *
91
- * @internal
123
+ * @override
92
124
  */
93
- generateIcons(): string;
125
+ protected getMaxIcons(): number;
94
126
  }
package/dist/esm/index.js CHANGED
@@ -25,7 +25,7 @@ export { StartEnd, endSlotTemplate, startSlotTemplate } from './patterns/start-e
25
25
  export { BaseProgressBar, ProgressBar, ProgressBarDefinition, ProgressBarShape, ProgressBarStyles, ProgressBarTemplate, ProgressBarThickness, ProgressBarValidationState, } from './progress-bar/index.js';
26
26
  export { RadioGroup, RadioGroupDefinition, RadioGroupOrientation, RadioGroupStyles, RadioGroupTemplate, } from './radio-group/index.js';
27
27
  export { Radio, RadioDefinition, RadioStyles, RadioTemplate } from './radio/index.js';
28
- export { RatingDisplay, RatingDisplayColor, RatingDisplayDefinition, RatingDisplaySize, RatingDisplayStyles, RatingDisplayTemplate, } from './rating-display/index.js';
28
+ export { BaseRatingDisplay, RatingDisplay, RatingDisplayColor, RatingDisplayDefinition, RatingDisplaySize, RatingDisplayStyles, RatingDisplayTemplate, } from './rating-display/index.js';
29
29
  export { Slider, SliderDefinition, SliderMode, SliderOrientation, SliderSize, SliderStyles, SliderTemplate, } from './slider/index.js';
30
30
  export { BaseSpinner, Spinner, SpinnerAppearance, SpinnerDefinition, SpinnerSize, SpinnerStyles, SpinnerTemplate, } from './spinner/index.js';
31
31
  export { typographyBody1StrongerStyles, typographyBody1StrongStyles, typographyBody1Styles, typographyBody2Styles, typographyCaption1StrongerStyles, typographyCaption1StrongStyles, typographyCaption1Styles, typographyCaption2StrongStyles, typographyCaption2Styles, typographyDisplayStyles, typographyLargeTitleStyles, typographySubtitle1Styles, typographySubtitle2StrongerStyles, typographySubtitle2Styles, typographyTitle1Styles, typographyTitle2Styles, typographyTitle3Styles, } from './styles/partials/typography.partials.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EACL,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,EACL,eAAe,EACf,UAAU,EACV,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,MAAM,EACN,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,aAAa,E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AAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjG,OAAO,EACL,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,UAAU,GACX,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,EACL,eAAe,EACf,UAAU,EACV,eAAe,EACf,UAAU,EACV,SAAS,EACT,WAAW,EACX,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,UAAU,EACV,MAAM,EACN,gBAAgB,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nB,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,aAAa,GACd,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,IAAI,EACJ,SAAS,EACT,cAAc,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,UAAU,GACX,MAAM,iBAAiB,CAAC;AACzB,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAc,MAAM,kBAAkB,CAAC;AACrE,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,kBAAkB,EAClB,4BAA4B,GAC7B,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,4 +1,4 @@
1
- export { RatingDisplay } from './rating-display.js';
1
+ export { BaseRatingDisplay, RatingDisplay } from './rating-display.js';
2
2
  export { RatingDisplayColor, RatingDisplaySize } from './rating-display.options.js';
3
3
  export { template as RatingDisplayTemplate } from './rating-display.template.js';
4
4
  export { styles as RatingDisplayStyles } from './rating-display.styles.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rating-display/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,UAAU,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rating-display/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AACpF,OAAO,EAAE,QAAQ,IAAI,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACjF,OAAO,EAAE,MAAM,IAAI,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,UAAU,IAAI,uBAAuB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -5,31 +5,7 @@ import { toggleState } from '../utils/element-internals.js';
5
5
  * The base class used for constructing a fluent-rating-display custom element
6
6
  * @public
7
7
  */
8
- export class RatingDisplay extends FASTElement {
9
- /**
10
- * Handles changes to the color attribute.
11
- *
12
- * @param prev - The previous state
13
- * @param next - The next state
14
- */
15
- colorChanged(prev, next) {
16
- if (prev)
17
- toggleState(this.elementInternals, prev, false);
18
- if (next)
19
- toggleState(this.elementInternals, next, true);
20
- }
21
- /**
22
- * Handles changes to the size attribute.
23
- *
24
- * @param prev - The previous state
25
- * @param next - The next state
26
- */
27
- sizeChanged(prev, next) {
28
- if (prev)
29
- toggleState(this.elementInternals, prev, false);
30
- if (next)
31
- toggleState(this.elementInternals, next, true);
32
- }
8
+ export class BaseRatingDisplay extends FASTElement {
33
9
  constructor() {
34
10
  super();
35
11
  /**
@@ -38,14 +14,6 @@ export class RatingDisplay extends FASTElement {
38
14
  * @internal
39
15
  */
40
16
  this.elementInternals = this.attachInternals();
41
- /**
42
- * Renders a single filled icon with a label next to it.
43
- *
44
- * @public
45
- * @remarks
46
- * HTML Attribute: `compact`
47
- */
48
- this.compact = false;
49
17
  this.intlNumberFormatter = new Intl.NumberFormat();
50
18
  this.elementInternals.role = 'img';
51
19
  }
@@ -57,19 +25,35 @@ export class RatingDisplay extends FASTElement {
57
25
  get formattedCount() {
58
26
  return this.count ? this.intlNumberFormatter.format(this.count) : '';
59
27
  }
28
+ /**
29
+ * Gets the selected value
30
+ *
31
+ * @protected
32
+ */
33
+ getSelectedValue() {
34
+ var _a;
35
+ return Math.round(((_a = this.value) !== null && _a !== void 0 ? _a : 0) * 2) / 2;
36
+ }
37
+ /**
38
+ * Gets the maximum icons to render
39
+ *
40
+ * @protected
41
+ */
42
+ getMaxIcons() {
43
+ var _a;
44
+ return ((_a = this.max) !== null && _a !== void 0 ? _a : 5) * 2;
45
+ }
60
46
  /**
61
47
  * Generates the icon SVG elements based on the "max" attribute.
62
48
  *
63
49
  * @internal
64
50
  */
65
51
  generateIcons() {
66
- var _a, _b;
67
52
  let htmlString = '';
68
53
  // The value of the selected icon. Based on the "value" attribute, rounded to the nearest half.
69
- const selectedValue = Math.round((this.compact ? 1 : (_a = this.value) !== null && _a !== void 0 ? _a : 0) * 2) / 2;
54
+ const selectedValue = this.getSelectedValue();
70
55
  // Render the icons based on the "max" attribute. If "max" is not set, render 5 icons.
71
- // If "compact" is true, only render one filled icon.
72
- for (let i = 0; i < (this.compact ? 1 : (_b = this.max) !== null && _b !== void 0 ? _b : 5) * 2; i++) {
56
+ for (let i = 0; i < this.getMaxIcons(); i++) {
73
57
  const iconValue = (i + 1) / 2;
74
58
  htmlString += `<svg aria-hidden="true" ${iconValue === selectedValue ? 'selected' : ''}><use href="#star"></use></svg>`;
75
59
  }
@@ -77,21 +61,82 @@ export class RatingDisplay extends FASTElement {
77
61
  }
78
62
  }
79
63
  __decorate([
80
- attr
81
- ], RatingDisplay.prototype, "color", void 0);
82
- __decorate([
83
- attr({ mode: 'boolean' })
84
- ], RatingDisplay.prototype, "compact", void 0);
64
+ attr({ converter: nullableNumberConverter })
65
+ ], BaseRatingDisplay.prototype, "count", void 0);
85
66
  __decorate([
86
67
  attr({ converter: nullableNumberConverter })
87
- ], RatingDisplay.prototype, "count", void 0);
68
+ ], BaseRatingDisplay.prototype, "max", void 0);
88
69
  __decorate([
89
70
  attr({ converter: nullableNumberConverter })
90
- ], RatingDisplay.prototype, "max", void 0);
71
+ ], BaseRatingDisplay.prototype, "value", void 0);
72
+ /**
73
+ * A Rating Dislpay Custom HTML Element.
74
+ * Based on BaseRatingDisplay and includes style and layout specific attributes
75
+ *
76
+ * @public
77
+ */
78
+ export class RatingDisplay extends BaseRatingDisplay {
79
+ constructor() {
80
+ super(...arguments);
81
+ /**
82
+ * Renders a single filled icon with a label next to it.
83
+ *
84
+ * @public
85
+ * @remarks
86
+ * HTML Attribute: `compact`
87
+ */
88
+ this.compact = false;
89
+ }
90
+ /**
91
+ * Handles changes to the color attribute.
92
+ *
93
+ * @param prev - The previous state
94
+ * @param next - The next state
95
+ */
96
+ colorChanged(prev, next) {
97
+ if (prev)
98
+ toggleState(this.elementInternals, prev, false);
99
+ if (next)
100
+ toggleState(this.elementInternals, next, true);
101
+ }
102
+ /**
103
+ * Handles changes to the size attribute.
104
+ *
105
+ * @param prev - The previous state
106
+ * @param next - The next state
107
+ */
108
+ sizeChanged(prev, next) {
109
+ if (prev)
110
+ toggleState(this.elementInternals, prev, false);
111
+ if (next)
112
+ toggleState(this.elementInternals, next, true);
113
+ }
114
+ /**
115
+ * Overrides the selected value and returns 1 if compact is true.
116
+ *
117
+ * @override
118
+ */
119
+ getSelectedValue() {
120
+ var _a;
121
+ return Math.round((this.compact ? 1 : (_a = this.value) !== null && _a !== void 0 ? _a : 0) * 2) / 2;
122
+ }
123
+ /**
124
+ * Overrides the maximum icons and returns a max of 1 if compact is true.
125
+ *
126
+ * @override
127
+ */
128
+ getMaxIcons() {
129
+ var _a;
130
+ return (this.compact ? 1 : (_a = this.max) !== null && _a !== void 0 ? _a : 5) * 2;
131
+ }
132
+ }
133
+ __decorate([
134
+ attr
135
+ ], RatingDisplay.prototype, "color", void 0);
91
136
  __decorate([
92
137
  attr
93
138
  ], RatingDisplay.prototype, "size", void 0);
94
139
  __decorate([
95
- attr({ converter: nullableNumberConverter })
96
- ], RatingDisplay.prototype, "value", void 0);
140
+ attr({ mode: 'boolean' })
141
+ ], RatingDisplay.prototype, "compact", void 0);
97
142
  //# sourceMappingURL=rating-display.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"rating-display.js","sourceRoot":"","sources":["../../../src/rating-display/rating-display.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAG5D;;;GAGG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAmB5C;;;;;OAKG;IACI,YAAY,CAAC,IAAoC,EAAE,IAAoC;QAC5F,IAAI,IAAI;YAAE,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1D,IAAI,IAAI;YAAE,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IA6CD;;;;;OAKG;IACI,WAAW,CAAC,IAAmC,EAAE,IAAmC;QACzF,IAAI,IAAI;YAAE,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;QAC1D,IAAI,IAAI;YAAE,WAAW,CAAC,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3D,CAAC;IAcD;QACE,KAAK,EAAE,CAAC;QAhGV;;;;WAIG;QACI,qBAAgB,GAAqB,IAAI,CAAC,eAAe,EAAE,CAAC;QAwBnE;;;;;;WAMG;QAEI,YAAO,GAAY,KAAK,CAAC;QAwDxB,wBAAmB,GAAG,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC;QAKpD,IAAI,CAAC,gBAAgB,CAAC,IAAI,GAAG,KAAK,CAAC;IACrC,CAAC;IAED;;;;OAIG;IACH,IAAW,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G,CAAC,CAAC;IAClE,CAAC;IAED;;;;OAIG;IACgB,WAAW;;QAC5B,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAA,IAAI,CAAC,GAAG,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAChD,CAAC;CACF;AA9DQ;IADN,IAAI;4CAC6B;AAsB3B;IADN,IAAI;2CAC2B;AAqBzB;IADN,IAAI,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;8CACM"}
@@ -1825,6 +1825,71 @@ export declare class BaseProgressBar extends FASTElement {
1825
1825
  constructor();
1826
1826
  }
1827
1827
 
1828
+ /**
1829
+ * The base class used for constructing a fluent-rating-display custom element
1830
+ * @public
1831
+ */
1832
+ export declare class BaseRatingDisplay extends FASTElement {
1833
+ /**
1834
+ * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
1835
+ *
1836
+ * @internal
1837
+ */
1838
+ elementInternals: ElementInternals;
1839
+ /**
1840
+ * The number of ratings.
1841
+ *
1842
+ * @public
1843
+ * @remarks
1844
+ * HTML Attribute: `count`
1845
+ */
1846
+ count?: number;
1847
+ /**
1848
+ * The maximum possible value of the rating.
1849
+ * This attribute determines the number of icons displayed.
1850
+ * Must be a whole number greater than 1.
1851
+ *
1852
+ * @public
1853
+ * @remarks
1854
+ * HTML Attribute: `max`
1855
+ */
1856
+ max?: number;
1857
+ /**
1858
+ * The value of the rating.
1859
+ *
1860
+ * @public
1861
+ * @remarks
1862
+ * HTML Attribute: `value`
1863
+ */
1864
+ value?: number;
1865
+ private intlNumberFormatter;
1866
+ constructor();
1867
+ /**
1868
+ * Returns "count" as string, formatted according to the locale.
1869
+ *
1870
+ * @internal
1871
+ */
1872
+ get formattedCount(): string;
1873
+ /**
1874
+ * Gets the selected value
1875
+ *
1876
+ * @protected
1877
+ */
1878
+ protected getSelectedValue(): number;
1879
+ /**
1880
+ * Gets the maximum icons to render
1881
+ *
1882
+ * @protected
1883
+ */
1884
+ protected getMaxIcons(): number;
1885
+ /**
1886
+ * Generates the icon SVG elements based on the "max" attribute.
1887
+ *
1888
+ * @internal
1889
+ */
1890
+ generateIcons(): string;
1891
+ }
1892
+
1828
1893
  /**
1829
1894
  * The base class used for constructing a fluent-spinner custom element
1830
1895
  * @public
@@ -7457,16 +7522,12 @@ export declare const RadioStyles: ElementStyles;
7457
7522
  export declare const RadioTemplate: ElementViewTemplate<Radio>;
7458
7523
 
7459
7524
  /**
7460
- * The base class used for constructing a fluent-rating-display custom element
7525
+ * A Rating Dislpay Custom HTML Element.
7526
+ * Based on BaseRatingDisplay and includes style and layout specific attributes
7527
+ *
7461
7528
  * @public
7462
7529
  */
7463
- export declare class RatingDisplay extends FASTElement {
7464
- /**
7465
- * The internal {@link https://developer.mozilla.org/docs/Web/API/ElementInternals | `ElementInternals`} instance for the component.
7466
- *
7467
- * @internal
7468
- */
7469
- elementInternals: ElementInternals;
7530
+ export declare class RatingDisplay extends BaseRatingDisplay {
7470
7531
  /**
7471
7532
  * The color of the rating display icons.
7472
7533
  *
@@ -7483,32 +7544,6 @@ export declare class RatingDisplay extends FASTElement {
7483
7544
  * @param next - The next state
7484
7545
  */
7485
7546
  colorChanged(prev: RatingDisplayColor | undefined, next: RatingDisplayColor | undefined): void;
7486
- /**
7487
- * Renders a single filled icon with a label next to it.
7488
- *
7489
- * @public
7490
- * @remarks
7491
- * HTML Attribute: `compact`
7492
- */
7493
- compact: boolean;
7494
- /**
7495
- * The number of ratings.
7496
- *
7497
- * @public
7498
- * @remarks
7499
- * HTML Attribute: `count`
7500
- */
7501
- count?: number;
7502
- /**
7503
- * The maximum possible value of the rating.
7504
- * This attribute determines the number of icons displayed.
7505
- * Must be a whole number greater than 1.
7506
- *
7507
- * @public
7508
- * @remarks
7509
- * HTML Attribute: `max`
7510
- */
7511
- max?: number;
7512
7547
  /**
7513
7548
  * The size of the component.
7514
7549
  *
@@ -7526,27 +7561,25 @@ export declare class RatingDisplay extends FASTElement {
7526
7561
  */
7527
7562
  sizeChanged(prev: RatingDisplaySize | undefined, next: RatingDisplaySize | undefined): void;
7528
7563
  /**
7529
- * The value of the rating.
7564
+ * Renders a single filled icon with a label next to it.
7530
7565
  *
7531
7566
  * @public
7532
7567
  * @remarks
7533
- * HTML Attribute: `value`
7568
+ * HTML Attribute: `compact`
7534
7569
  */
7535
- value?: number;
7536
- private intlNumberFormatter;
7537
- constructor();
7570
+ compact: boolean;
7538
7571
  /**
7539
- * Returns "count" as string, formatted according to the locale.
7572
+ * Overrides the selected value and returns 1 if compact is true.
7540
7573
  *
7541
- * @internal
7574
+ * @override
7542
7575
  */
7543
- get formattedCount(): string;
7576
+ protected getSelectedValue(): number;
7544
7577
  /**
7545
- * Generates the icon SVG elements based on the "max" attribute.
7578
+ * Overrides the maximum icons and returns a max of 1 if compact is true.
7546
7579
  *
7547
- * @internal
7580
+ * @override
7548
7581
  */
7549
- generateIcons(): string;
7582
+ protected getMaxIcons(): number;
7550
7583
  }
7551
7584
 
7552
7585
  /**