@fluentui/web-components 3.0.0-alpha.1 → 3.0.0-alpha.2

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.
Files changed (93) hide show
  1. package/.eslintrc.json +62 -0
  2. package/CHANGELOG.json +68 -9
  3. package/CHANGELOG.md +14 -2
  4. package/build/{clean.js → clean.cjs} +0 -0
  5. package/dist/dts/badge/badge.d.ts +49 -0
  6. package/dist/dts/badge/badge.definition.d.ts +11 -0
  7. package/dist/dts/badge/badge.options.d.ts +73 -0
  8. package/dist/dts/badge/badge.stories.d.ts +12 -0
  9. package/dist/dts/badge/badge.styles.d.ts +4 -0
  10. package/dist/dts/badge/badge.template.d.ts +9 -0
  11. package/dist/dts/badge/define.d.ts +1 -0
  12. package/dist/dts/badge/index.d.ts +5 -0
  13. package/dist/dts/counter-badge/counter-badge.d.ts +90 -0
  14. package/dist/dts/counter-badge/counter-badge.definition.d.ts +11 -0
  15. package/dist/dts/counter-badge/counter-badge.options.d.ts +69 -0
  16. package/dist/dts/counter-badge/counter-badge.stories.d.ts +14 -0
  17. package/dist/dts/counter-badge/counter-badge.styles.d.ts +4 -0
  18. package/dist/dts/counter-badge/counter-badge.template.d.ts +7 -0
  19. package/dist/dts/counter-badge/define.d.ts +1 -0
  20. package/dist/dts/counter-badge/index.d.ts +5 -0
  21. package/dist/dts/fluent-design-system.d.ts +5 -0
  22. package/dist/dts/index-rollup.d.ts +1 -1
  23. package/dist/dts/index.d.ts +5 -1
  24. package/dist/dts/progress-bar/define.d.ts +1 -0
  25. package/dist/dts/progress-bar/index.d.ts +5 -0
  26. package/dist/dts/progress-bar/progress-bar.d.ts +30 -0
  27. package/dist/dts/progress-bar/progress-bar.definition.d.ts +10 -0
  28. package/dist/dts/progress-bar/progress-bar.options.d.ts +41 -0
  29. package/dist/dts/progress-bar/progress-bar.stories.d.ts +9 -0
  30. package/dist/dts/progress-bar/progress-bar.styles.d.ts +4 -0
  31. package/dist/dts/progress-bar/progress-bar.template.d.ts +3 -0
  32. package/dist/dts/styles/index.d.ts +1 -0
  33. package/dist/dts/styles/partials/badge.partials.d.ts +28 -0
  34. package/dist/dts/styles/partials/index.d.ts +1 -0
  35. package/dist/dts/text/define.d.ts +1 -0
  36. package/dist/dts/text/index.d.ts +5 -0
  37. package/dist/dts/text/text.d.ts +91 -0
  38. package/dist/dts/text/text.definition.d.ts +10 -0
  39. package/dist/dts/text/text.options.d.ts +67 -0
  40. package/dist/dts/text/text.stories.d.ts +8 -0
  41. package/dist/dts/text/text.styles.d.ts +4 -0
  42. package/dist/dts/text/text.template.d.ts +6 -0
  43. package/dist/dts/theme/index.d.ts +2 -2
  44. package/dist/esm/badge/badge.definition.js +18 -0
  45. package/dist/esm/badge/badge.js +42 -0
  46. package/dist/esm/badge/badge.options.js +45 -0
  47. package/dist/esm/badge/badge.stories.js +108 -0
  48. package/dist/esm/badge/badge.styles.js +29 -0
  49. package/dist/esm/badge/badge.template.js +14 -0
  50. package/dist/esm/badge/define.js +3 -0
  51. package/dist/esm/badge/index.js +5 -0
  52. package/dist/esm/counter-badge/counter-badge.definition.js +18 -0
  53. package/dist/esm/counter-badge/counter-badge.js +89 -0
  54. package/dist/esm/counter-badge/counter-badge.options.js +42 -0
  55. package/dist/esm/counter-badge/counter-badge.stories.js +102 -0
  56. package/dist/esm/counter-badge/counter-badge.styles.js +30 -0
  57. package/dist/esm/counter-badge/counter-badge.template.js +12 -0
  58. package/dist/esm/counter-badge/define.js +3 -0
  59. package/dist/esm/counter-badge/index.js +5 -0
  60. package/dist/esm/fluent-design-system.js +5 -0
  61. package/dist/esm/index-rollup.js +1 -1
  62. package/dist/esm/index.js +5 -1
  63. package/dist/esm/progress-bar/define.js +3 -0
  64. package/dist/esm/progress-bar/index.js +5 -0
  65. package/dist/esm/progress-bar/progress-bar.definition.js +17 -0
  66. package/dist/esm/progress-bar/progress-bar.js +18 -0
  67. package/dist/esm/progress-bar/progress-bar.options.js +25 -0
  68. package/dist/esm/progress-bar/progress-bar.stories.js +60 -0
  69. package/dist/esm/progress-bar/progress-bar.styles.js +155 -0
  70. package/dist/esm/progress-bar/progress-bar.template.js +5 -0
  71. package/dist/esm/styles/index.js +1 -0
  72. package/dist/esm/styles/partials/badge.partials.js +272 -0
  73. package/dist/esm/styles/partials/index.js +1 -0
  74. package/dist/esm/text/define.js +3 -0
  75. package/dist/esm/text/index.js +5 -0
  76. package/dist/esm/text/text.definition.js +17 -0
  77. package/dist/esm/text/text.js +91 -0
  78. package/dist/esm/text/text.options.js +45 -0
  79. package/dist/esm/text/text.stories.js +111 -0
  80. package/dist/esm/text/text.styles.js +104 -0
  81. package/dist/esm/text/text.template.js +5 -0
  82. package/dist/esm/theme/index.js +2 -2
  83. package/dist/esm/theme/set-theme.js +1 -1
  84. package/dist/esm/theme/theme.stories.js +1 -1
  85. package/dist/fluent-web-components.api.json +14015 -8
  86. package/dist/tsdoc-metadata.json +1 -1
  87. package/dist/web-components.d.ts +1385 -1
  88. package/dist/web-components.js +6694 -2
  89. package/dist/web-components.min.js +284 -1
  90. package/docs/api-report.md +1432 -1
  91. package/package.json +42 -14
  92. package/rollup.config.js +5 -0
  93. package/karma.conf.js +0 -147
@@ -0,0 +1,89 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr, FASTElement, nullableNumberConverter } from '@microsoft/fast-element';
3
+ import { applyMixins, StartEnd } from '@microsoft/fast-foundation';
4
+ /**
5
+ * The base class used for constructing a fluent-badge custom element
6
+ * @public
7
+ */
8
+ export class CounterBadge extends FASTElement {
9
+ constructor() {
10
+ super(...arguments);
11
+ /**
12
+ * The count the badge should have.
13
+ *
14
+ * @public
15
+ * @remarks
16
+ * HTML Attribute: count
17
+ */
18
+ this.count = 0;
19
+ /**
20
+ * Max number to be displayed
21
+ *
22
+ * @public
23
+ * @remarks
24
+ * HTML Attribute: overflow-count
25
+ */
26
+ this.overflowCount = 99;
27
+ /**
28
+ * If the badge should be shown when count is 0
29
+ *
30
+ * @public
31
+ * @remarks
32
+ * HTML Attribute: show-zero
33
+ */
34
+ this.showZero = false;
35
+ /**
36
+ * If a dot should be displayed without the count
37
+ *
38
+ * @public
39
+ * @remarks
40
+ * HTML Attribute: dot
41
+ */
42
+ this.dot = false;
43
+ }
44
+ countChanged() {
45
+ this.setCount();
46
+ }
47
+ overflowCountChanged() {
48
+ this.setCount();
49
+ }
50
+ /**
51
+ * @internal
52
+ * Function to set the count
53
+ * This is the default slotted content for the counter badge
54
+ * If children are slotted, that will override the value returned
55
+ */
56
+ setCount() {
57
+ var _a;
58
+ const count = (_a = this.count) !== null && _a !== void 0 ? _a : 0;
59
+ if ((count !== 0 || this.showZero) && !this.dot) {
60
+ return count > this.overflowCount ? `${this.overflowCount}+` : `${count}`;
61
+ }
62
+ return;
63
+ }
64
+ }
65
+ __decorate([
66
+ attr
67
+ ], CounterBadge.prototype, "appearance", void 0);
68
+ __decorate([
69
+ attr
70
+ ], CounterBadge.prototype, "color", void 0);
71
+ __decorate([
72
+ attr
73
+ ], CounterBadge.prototype, "shape", void 0);
74
+ __decorate([
75
+ attr
76
+ ], CounterBadge.prototype, "size", void 0);
77
+ __decorate([
78
+ attr({ converter: nullableNumberConverter })
79
+ ], CounterBadge.prototype, "count", void 0);
80
+ __decorate([
81
+ attr({ attribute: 'overflow-count', converter: nullableNumberConverter })
82
+ ], CounterBadge.prototype, "overflowCount", void 0);
83
+ __decorate([
84
+ attr({ attribute: 'show-zero', mode: 'boolean' })
85
+ ], CounterBadge.prototype, "showZero", void 0);
86
+ __decorate([
87
+ attr({ mode: 'boolean' })
88
+ ], CounterBadge.prototype, "dot", void 0);
89
+ applyMixins(CounterBadge, StartEnd);
@@ -0,0 +1,42 @@
1
+ /**
2
+ * CounterBadgeAppearance constants
3
+ * @public
4
+ */
5
+ export const CounterBadgeAppearance = {
6
+ filled: 'filled',
7
+ ghost: 'ghost',
8
+ };
9
+ /**
10
+ * CounterBadgeColor constants
11
+ * @public
12
+ */
13
+ export const CounterBadgeColor = {
14
+ brand: 'brand',
15
+ danger: 'danger',
16
+ important: 'important',
17
+ informative: 'informative',
18
+ severe: 'severe',
19
+ subtle: 'subtle',
20
+ success: 'success',
21
+ warning: 'warning',
22
+ };
23
+ /**
24
+ * A CounterBadge shape can be circular or rounded.
25
+ * @public
26
+ */
27
+ export const CounterBadgeShape = {
28
+ circular: 'circular',
29
+ rounded: 'rounded',
30
+ };
31
+ /**
32
+ * A CounterBadge can be square, circular or rounded.
33
+ * @public
34
+ */
35
+ export const CounterBadgeSize = {
36
+ tiny: 'tiny',
37
+ extraSmall: 'extra-small',
38
+ small: 'small',
39
+ medium: 'medium',
40
+ large: 'large',
41
+ extraLarge: 'extra-large',
42
+ };
@@ -0,0 +1,102 @@
1
+ import { html } from '@microsoft/fast-element';
2
+ import { renderComponent } from '../__test__/helpers.js';
3
+ import { CounterBadgeAppearance, CounterBadgeColor, CounterBadgeShape, CounterBadgeSize, } from './counter-badge.options.js';
4
+ import './define.js';
5
+ // TODO: Currently cannot show icon or content
6
+ // in the counter badge stories because it projects as slotted content
7
+ const storyTemplate = html `
8
+ <fluent-counter-badge
9
+ appearance="${x => x.appearance}"
10
+ color="${x => x.color}"
11
+ shape="${x => x.shape}"
12
+ size="${x => x.size}"
13
+ count="${x => x.count}"
14
+ overflow-count="${x => x.overflowCount}"
15
+ ?show-zero="${x => x.showZero}"
16
+ ?dot="${x => x.dot}"
17
+ ></fluent-counter-badge>
18
+ `;
19
+ export default {
20
+ title: 'Components/Badge/Counter Badge',
21
+ args: {
22
+ dot: false,
23
+ showZero: false,
24
+ appearance: CounterBadgeAppearance.filled,
25
+ color: CounterBadgeColor.brand,
26
+ shape: CounterBadgeShape.circular,
27
+ count: 5,
28
+ },
29
+ argTypes: {
30
+ appearance: {
31
+ options: Object.values(CounterBadgeAppearance),
32
+ control: {
33
+ type: 'select',
34
+ },
35
+ },
36
+ color: {
37
+ options: Object.values(CounterBadgeColor),
38
+ control: {
39
+ type: 'select',
40
+ },
41
+ },
42
+ shape: {
43
+ options: Object.values(CounterBadgeShape),
44
+ control: {
45
+ type: 'select',
46
+ },
47
+ },
48
+ size: {
49
+ options: Object.values(CounterBadgeSize),
50
+ control: {
51
+ type: 'select',
52
+ },
53
+ },
54
+ iconPosition: {
55
+ options: ['none', 'start', 'end'],
56
+ control: {
57
+ type: 'select',
58
+ },
59
+ },
60
+ dot: {
61
+ control: 'boolean',
62
+ },
63
+ showZero: {
64
+ control: 'boolean',
65
+ },
66
+ count: {
67
+ control: 'number',
68
+ },
69
+ overflowCount: {
70
+ control: 'text',
71
+ },
72
+ },
73
+ };
74
+ export const CounterBadge = renderComponent(storyTemplate).bind({});
75
+ export const Appearance = renderComponent(html `
76
+ <fluent-counter-badge count="5" appearance="filled"></fluent-counter-badge>
77
+ <fluent-counter-badge count="5" appearance="ghost"></fluent-counter-badge>
78
+ `);
79
+ export const Color = renderComponent(html `
80
+ <fluent-counter-badge count="5" color="brand"></fluent-counter-badge>
81
+ <fluent-counter-badge count="5" color="danger"></fluent-counter-badge>
82
+ <fluent-counter-badge count="5" color="important"></fluent-counter-badge>
83
+ <fluent-counter-badge count="5" color="informative"></fluent-counter-badge>
84
+ <fluent-counter-badge count="5" color="severe"></fluent-counter-badge>
85
+ <fluent-counter-badge count="5" color="subtle"></fluent-counter-badge>
86
+ <fluent-counter-badge count="5" color="success"></fluent-counter-badge>
87
+ <fluent-counter-badge count="5" color="warning"></fluent-counter-badge>
88
+ `);
89
+ export const Shape = renderComponent(html `
90
+ <fluent-counter-badge count="5" shape="circular"></fluent-counter-badge>
91
+ <fluent-counter-badge count="5" shape="rounded"></fluent-counter-badge>
92
+ `);
93
+ export const Size = renderComponent(html `
94
+ <fluent-counter-badge size="tiny"></fluent-counter-badge>
95
+ <fluent-counter-badge size="extra-small"></fluent-counter-badge>
96
+ <fluent-counter-badge size="small"></fluent-counter-badge>
97
+ <fluent-counter-badge size="medium"></fluent-counter-badge>
98
+ <fluent-counter-badge size="large"></fluent-counter-badge>
99
+ <fluent-counter-badge size="extra-large"></fluent-counter-badge>
100
+ `);
101
+ export const Dot = renderComponent(html `<fluent-counter-badge dot></fluent-counter-badge>`);
102
+ export const ShowZero = renderComponent(html `<fluent-counter-badge show-zero></fluent-counter-badge>`);
@@ -0,0 +1,30 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { badgeBaseStyles, badgeFilledStyles, badgeGhostStyles, badgeSizeStyles } from '../styles/index.js';
3
+ import { borderRadiusMedium, borderRadiusSmall } from '../theme/design-tokens.js';
4
+ /** Badge styles
5
+ * @public
6
+ */
7
+ export const styles = css `
8
+ :host([shape='rounded']) {
9
+ border-radius: ${borderRadiusMedium};
10
+ }
11
+
12
+ :host([shape='rounded'][size='tiny']),
13
+ :host([shape='rounded'][size='extra-small']),
14
+ :host([shape='rounded'][size='small']) {
15
+ border-radius: ${borderRadiusSmall};
16
+ }
17
+
18
+ ${badgeSizeStyles}
19
+ ${badgeFilledStyles}
20
+ ${badgeGhostStyles}
21
+ ${badgeBaseStyles}
22
+
23
+ :host([dot]),
24
+ :host([dot][appearance][size]) {
25
+ min-width: auto;
26
+ width: 6px;
27
+ height: 6px;
28
+ padding: 0;
29
+ }
30
+ `;
@@ -0,0 +1,12 @@
1
+ import { html } from '@microsoft/fast-element';
2
+ import { badgeTemplate } from '../badge/badge.template.js';
3
+ function composeTemplate(options = {}) {
4
+ return badgeTemplate({
5
+ defaultContent: html `${x => x.setCount()}`,
6
+ });
7
+ }
8
+ /**
9
+ * The template for the Counter Badge component.
10
+ * @public
11
+ */
12
+ export const template = composeTemplate();
@@ -0,0 +1,3 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { definition } from './counter-badge.definition.js';
3
+ definition.define(FluentDesignSystem.registry);
@@ -0,0 +1,5 @@
1
+ export * from './counter-badge.js';
2
+ export * from './counter-badge.options.js';
3
+ export { template as CounterBadgeTemplate } from './counter-badge.template.js';
4
+ export { styles as CounterBadgeStyles } from './counter-badge.styles.js';
5
+ export { definition as CounterBadgeDefinition } from './counter-badge.definition.js';
@@ -0,0 +1,5 @@
1
+ export const FluentDesignSystem = Object.freeze({
2
+ prefix: 'fluent',
3
+ shadowRootMode: 'open',
4
+ registry: customElements,
5
+ });
@@ -1 +1 @@
1
- export * from './index';
1
+ export * from './index.js';
package/dist/esm/index.js CHANGED
@@ -1 +1,5 @@
1
- export const empty = '';
1
+ export * from './badge/index.js';
2
+ export * from './counter-badge/index.js';
3
+ export * from './progress-bar/index.js';
4
+ export * from './text/index.js';
5
+ export * from './theme/index.js';
@@ -0,0 +1,3 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { definition } from './progress-bar.definition.js';
3
+ definition.define(FluentDesignSystem.registry);
@@ -0,0 +1,5 @@
1
+ export * from './progress-bar.js';
2
+ export * from './progress-bar.options.js';
3
+ export { definition as ProgressBarDefinition } from './progress-bar.definition.js';
4
+ export { styles as ProgressBarStyles } from './progress-bar.styles.js';
5
+ export { template as ProgressBarTemplate } from './progress-bar.template.js';
@@ -0,0 +1,17 @@
1
+ import { FluentDesignSystem } from '../fluent-design-system.js';
2
+ import { ProgressBar } from './progress-bar.js';
3
+ import { styles } from './progress-bar.styles.js';
4
+ import { template } from './progress-bar.template.js';
5
+ /**
6
+ * The Fluent ProgressBar Element.
7
+ *
8
+ *
9
+ * @public
10
+ * @remarks
11
+ * HTML Element: \<fluent-progress-bar\>
12
+ */
13
+ export const definition = ProgressBar.compose({
14
+ name: `${FluentDesignSystem.prefix}-progress-bar`,
15
+ template,
16
+ styles,
17
+ });
@@ -0,0 +1,18 @@
1
+ import { __decorate } from "tslib";
2
+ import { attr } from '@microsoft/fast-element';
3
+ import { FASTProgress } from '@microsoft/fast-foundation';
4
+ /**
5
+ * The base class used for constructing a fluent-progress-bar custom element
6
+ * @public
7
+ */
8
+ export class ProgressBar extends FASTProgress {
9
+ }
10
+ __decorate([
11
+ attr
12
+ ], ProgressBar.prototype, "thickness", void 0);
13
+ __decorate([
14
+ attr
15
+ ], ProgressBar.prototype, "shape", void 0);
16
+ __decorate([
17
+ attr({ attribute: 'validation-state' })
18
+ ], ProgressBar.prototype, "validationState", void 0);
@@ -0,0 +1,25 @@
1
+ /**
2
+ * ProgressBarThickness Constants
3
+ * @public
4
+ */
5
+ export const ProgressBarThickness = {
6
+ medium: 'medium',
7
+ large: 'large',
8
+ };
9
+ /**
10
+ * ProgressBarShape Constants
11
+ * @public
12
+ */
13
+ export const ProgressBarShape = {
14
+ rounded: 'rounded',
15
+ square: 'square',
16
+ };
17
+ /**
18
+ * ProgressBarValidationState Constants
19
+ * @public
20
+ */
21
+ export const ProgressBarValidationState = {
22
+ success: 'success',
23
+ warning: 'warning',
24
+ error: 'error',
25
+ };
@@ -0,0 +1,60 @@
1
+ import { html } from '@microsoft/fast-element';
2
+ import { renderComponent } from '../__test__/helpers.js';
3
+ import { ProgressBarShape, ProgressBarThickness, ProgressBarValidationState } from './progress-bar.options.js';
4
+ import './define.js';
5
+ const storyTemplate = html `
6
+ <fluent-progress-bar
7
+ thickness=${x => x.thickness}
8
+ shape=${x => x.shape}
9
+ max=${x => x.max}
10
+ aria-valuemax=${x => x.max}
11
+ aria-valuenow=${x => x.value}
12
+ value=${x => x.value}
13
+ validation-state=${x => x.validationState}
14
+ ></fluent-progress-bar>
15
+ `;
16
+ export default {
17
+ title: 'Components/ProgressBar',
18
+ args: {
19
+ max: 100,
20
+ value: 15,
21
+ thickness: 'medium',
22
+ shape: 'rounded',
23
+ validationState: null,
24
+ },
25
+ argTypes: {
26
+ max: {
27
+ control: 'number',
28
+ defaultValue: 100,
29
+ },
30
+ value: {
31
+ control: 'number',
32
+ defaultValue: 15,
33
+ },
34
+ thickness: {
35
+ control: {
36
+ type: 'select',
37
+ },
38
+ options: Object.values(ProgressBarThickness),
39
+ defaultValue: 'medium',
40
+ },
41
+ shape: {
42
+ options: Object.values(ProgressBarShape),
43
+ control: {
44
+ type: 'select',
45
+ },
46
+ defaultValue: 'rounded',
47
+ },
48
+ validationState: {
49
+ options: Object.values(ProgressBarValidationState),
50
+ control: {
51
+ type: 'select',
52
+ },
53
+ defaultValue: null,
54
+ },
55
+ },
56
+ };
57
+ export const Progress = renderComponent(storyTemplate).bind({});
58
+ export const ProgressIndeterminate = renderComponent(html `
59
+ <fluent-progress-bar title="Indeterminate Bar" aria-label="Indeterminate progress bar"></fluent-progress-bar>
60
+ `);
@@ -0,0 +1,155 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { display } from '@microsoft/fast-foundation';
3
+ import { borderRadiusMedium, colorBrandBackground2, colorCompoundBrandBackground, colorNeutralBackground6, colorPaletteDarkOrangeBackground2, colorPaletteDarkOrangeBackground3, colorPaletteGreenBackground2, colorPaletteGreenBackground3, colorPaletteRedBackground2, colorPaletteRedBackground3, } from '../theme/design-tokens.js';
4
+ /** Text styles
5
+ * @public
6
+ */
7
+ export const styles = css `
8
+ ${display('flex')}
9
+
10
+ :host {
11
+ align-items: center;
12
+ height: 2px;
13
+ overflow-x: hidden;
14
+ border-radius: ${borderRadiusMedium};
15
+ }
16
+
17
+ :host([thickness='large']),
18
+ :host([thickness='large']) .progress,
19
+ :host([thickness='large']) .determinate {
20
+ height: 4px;
21
+ }
22
+
23
+ :host([shape='square']),
24
+ :host([shape='square']) .progress,
25
+ :host([shape='square']) .determinate {
26
+ border-radius: 0;
27
+ }
28
+
29
+ :host([validation-state='error']) .determinate {
30
+ background-color: ${colorPaletteRedBackground3};
31
+ }
32
+
33
+ :host([validation-state='error']) .indeterminate-indicator-1,
34
+ :host([validation-state='error']) .indeterminate-indicator-2 {
35
+ background: linear-gradient(
36
+ to right,
37
+ ${colorPaletteRedBackground2} 0%,
38
+ ${colorPaletteRedBackground3} 50%,
39
+ ${colorPaletteRedBackground2}
40
+ );
41
+ }
42
+
43
+ :host([validation-state='warning']) .determinate {
44
+ background-color: ${colorPaletteDarkOrangeBackground3};
45
+ }
46
+
47
+ :host([validation-state='warning']) .indeterminate-indicator-1,
48
+ :host([validation-state='warning']) .indeterminate-indicator-2 {
49
+ background: linear-gradient(
50
+ to right,
51
+ ${colorPaletteDarkOrangeBackground2} 0%,
52
+ ${colorPaletteDarkOrangeBackground3} 50%,
53
+ ${colorPaletteDarkOrangeBackground2}
54
+ );
55
+ }
56
+
57
+ :host([validation-state='success']) .determinate {
58
+ background-color: ${colorPaletteGreenBackground3};
59
+ }
60
+
61
+ :host([validation-state='success']) .indeterminate-indicator-1,
62
+ :host([validation-state='success']) .indeterminate-indicator-2 {
63
+ background: linear-gradient(
64
+ to right,
65
+ ${colorPaletteGreenBackground2} 0%,
66
+ ${colorPaletteGreenBackground3} 50%,
67
+ ${colorPaletteGreenBackground2}
68
+ );
69
+ }
70
+
71
+ .progress {
72
+ background-color: ${colorNeutralBackground6};
73
+ border-radius: ${borderRadiusMedium};
74
+ width: 100%;
75
+ height: 2px;
76
+ display: flex;
77
+ align-items: center;
78
+ position: relative;
79
+ }
80
+
81
+ .determinate {
82
+ background-color: ${colorCompoundBrandBackground};
83
+ border-radius: ${borderRadiusMedium};
84
+ height: 2px;
85
+ transition: all 0.2s ease-in-out;
86
+ display: flex;
87
+ }
88
+
89
+ .indeterminate-indicator-1 {
90
+ position: absolute;
91
+ opacity: 0;
92
+ height: 100%;
93
+ background: linear-gradient(
94
+ to right,
95
+ ${colorBrandBackground2} 0%,
96
+ ${colorCompoundBrandBackground} 50%,
97
+ ${colorBrandBackground2}
98
+ );
99
+ border-radius: ${borderRadiusMedium};
100
+ animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
101
+ width: 40%;
102
+ animation: indeterminate-1 3s infinite;
103
+ }
104
+
105
+ .indeterminate-indicator-2 {
106
+ position: absolute;
107
+ opacity: 0;
108
+ height: 100%;
109
+ background: linear-gradient(
110
+ to right,
111
+ ${colorBrandBackground2} 0%,
112
+ ${colorCompoundBrandBackground} 50%,
113
+ ${colorBrandBackground2}
114
+ );
115
+ border-radius: ${borderRadiusMedium};
116
+ animation-timing-function: cubic-bezier(0.4, 0, 0.6, 1);
117
+ width: 60%;
118
+ animation: indeterminate-2 3s infinite;
119
+ }
120
+
121
+ @keyframes indeterminate-1 {
122
+ 0% {
123
+ opacity: 1;
124
+ transform: translateX(-100%);
125
+ }
126
+ 70% {
127
+ opacity: 1;
128
+ transform: translateX(300%);
129
+ }
130
+ 70.01% {
131
+ opacity: 0;
132
+ }
133
+ 100% {
134
+ opacity: 0;
135
+ transform: translateX(300%);
136
+ }
137
+ }
138
+ @keyframes indeterminate-2 {
139
+ 0% {
140
+ opacity: 0;
141
+ transform: translateX(-150%);
142
+ }
143
+ 29.99% {
144
+ opacity: 0;
145
+ }
146
+ 30% {
147
+ opacity: 1;
148
+ transform: translateX(-150%);
149
+ }
150
+ 100% {
151
+ transform: translateX(166.66%);
152
+ opacity: 1;
153
+ }
154
+ }
155
+ `;
@@ -0,0 +1,5 @@
1
+ import { progressTemplate } from '@microsoft/fast-foundation';
2
+ export const template = progressTemplate({
3
+ indeterminateIndicator1: `<span class="indeterminate-indicator-1" part="indeterminate-indicator-1></span>`,
4
+ indeterminateIndicator2: `<span class="indeterminate-indicator-2" part="indeterminate-indicator-2"></span>`,
5
+ });
@@ -0,0 +1 @@
1
+ export * from './partials/index.js';