@momentum-design/components 0.141.4 → 0.142.0

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.
@@ -1,5 +1,6 @@
1
1
  import StepperItem from './stepperitem.component';
2
2
  import '../icon';
3
+ import '../spinner';
3
4
  import '../text';
4
5
  declare global {
5
6
  interface HTMLElementTagNameMap {
@@ -1,6 +1,7 @@
1
1
  import StepperItem from './stepperitem.component';
2
2
  import { TAG_NAME } from './stepperitem.constants';
3
3
  import '../icon';
4
+ import '../spinner';
4
5
  import '../text';
5
6
  StepperItem.register(TAG_NAME);
6
7
  export default StepperItem;
@@ -10,6 +10,7 @@ declare const StepperItem_base: import("../../utils/mixins/index.types").Constru
10
10
  *
11
11
  * - Use `mdc-stepperitem` for each stage of an `mdc-stepper` sequence, one item per step.
12
12
  * - Use `mdc-stepperitem` `completed`, `current`, and `not-started` to reflect where the user is in the flow so status reads at a glance.
13
+ * - Use `mdc-stepperitem` `loading` when a step is processing and its completion percentage is unknown, such as generating a staffing plan.
13
14
  * - Use `mdc-stepperitem` `error-current` or `error-incomplete` to flag a step with unresolved problems the user must fix before finishing.
14
15
  *
15
16
  * **When not to use**
@@ -21,16 +22,18 @@ declare const StepperItem_base: import("../../utils/mixins/index.types").Constru
21
22
  * @tagname mdc-stepperitem
22
23
  *
23
24
  * @dependency mdc-icon
25
+ * @dependency mdc-spinner
24
26
  * @dependency mdc-text
25
27
  *
26
28
  * @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.
27
29
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.
28
30
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.
29
31
  *
30
- * @csspart status-container - The container for the status icon or step number.
32
+ * @csspart status-container - The container for the status icon, step number, or loading spinner.
31
33
  * @csspart label-container - The container for the label and help text.
32
34
  * @csspart help-text-container - The container for the help text and error icon when applicable.
33
35
  * @csspart status-icon - The icon representing the status of the stepper item.
36
+ * @csspart status-spinner - The inset spinner displayed in place of the status indicator while loading.
34
37
  * @csspart step-number - The text representing the step number.
35
38
  * @csspart label - The text representing the label of the stepper item.
36
39
  * @csspart help-text - The text providing additional information about the stepper item.
@@ -49,7 +52,10 @@ declare class StepperItem extends StepperItem_base {
49
52
  */
50
53
  variant: VariantType;
51
54
  /**
52
- * The status of the stepper item, which can be `completed`, `current`, `not-started`, `error-current`, or `error-incomplete`.
55
+ * The status of the stepper item: `completed`, `current`, `loading`, `not-started`, `error-current`, or `error-incomplete`.
56
+ * Loading replaces the indicator with an inset spinner and sets aria-busy without changing disabled.
57
+ * Consumers must include the loading state in the accessible label and provide application live regions
58
+ * when progress announcements are needed.
53
59
  * @default 'not-started'
54
60
  */
55
61
  status: StatusType;
@@ -107,6 +113,7 @@ declare class StepperItem extends StepperItem_base {
107
113
  private handleKeyUp;
108
114
  /**
109
115
  * Renders the status icon based on the current status of the stepper item.
116
+ * - If the status is `loading`, it renders an inset spinner.
110
117
  * - If the status is `completed`, it renders a check icon.
111
118
  * - If the status is `current` or `error-current`, it renders a pencil icon.
112
119
  * - If the status is `not-started` or `error-incomplete`, it renders the step number.
@@ -24,16 +24,18 @@ import { DEFAULT, STATUS, STATUS_ICON } from './stepperitem.constants';
24
24
  * @tagname mdc-stepperitem
25
25
  *
26
26
  * @dependency mdc-icon
27
+ * @dependency mdc-spinner
27
28
  * @dependency mdc-text
28
29
  *
29
30
  * @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.
30
31
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.
31
32
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.
32
33
  *
33
- * @csspart status-container - The container for the status icon or step number.
34
+ * @csspart status-container - The container for the status icon, step number, or loading spinner.
34
35
  * @csspart label-container - The container for the label and help text.
35
36
  * @csspart help-text-container - The container for the help text and error icon when applicable.
36
37
  * @csspart status-icon - The icon representing the status of the stepper item.
38
+ * @csspart status-spinner - The inset spinner displayed in place of the status indicator while loading.
37
39
  * @csspart step-number - The text representing the step number.
38
40
  * @csspart label - The text representing the label of the stepper item.
39
41
  * @csspart help-text - The text providing additional information about the stepper item.
@@ -66,7 +68,10 @@ class StepperItem extends KeyDownHandledMixin(KeyToActionMixin(TabIndexMixin(Dis
66
68
  */
67
69
  this.variant = DEFAULT.VARIANT;
68
70
  /**
69
- * The status of the stepper item, which can be `completed`, `current`, `not-started`, `error-current`, or `error-incomplete`.
71
+ * The status of the stepper item: `completed`, `current`, `loading`, `not-started`, `error-current`, or `error-incomplete`.
72
+ * Loading replaces the indicator with an inset spinner and sets aria-busy without changing disabled.
73
+ * Consumers must include the loading state in the accessible label and provide application live regions
74
+ * when progress announcements are needed.
70
75
  * @default 'not-started'
71
76
  */
72
77
  this.status = DEFAULT.STATUS;
@@ -148,6 +153,7 @@ class StepperItem extends KeyDownHandledMixin(KeyToActionMixin(TabIndexMixin(Dis
148
153
  }
149
154
  /**
150
155
  * Renders the status icon based on the current status of the stepper item.
156
+ * - If the status is `loading`, it renders an inset spinner.
151
157
  * - If the status is `completed`, it renders a check icon.
152
158
  * - If the status is `current` or `error-current`, it renders a pencil icon.
153
159
  * - If the status is `not-started` or `error-incomplete`, it renders the step number.
@@ -155,6 +161,9 @@ class StepperItem extends KeyDownHandledMixin(KeyToActionMixin(TabIndexMixin(Dis
155
161
  * @returns A template literal that renders the status icon based on the current status of the stepper item.
156
162
  */
157
163
  renderStatusIcon() {
164
+ if (this.status === STATUS.LOADING) {
165
+ return html `<mdc-spinner part="status-spinner"></mdc-spinner>`;
166
+ }
158
167
  if (this.status === STATUS.COMPLETED) {
159
168
  return html `<mdc-icon part="status-icon" name=${STATUS_ICON.COMPLETED} length-unit="rem" size="1"></mdc-icon>`;
160
169
  }
@@ -193,6 +202,9 @@ class StepperItem extends KeyDownHandledMixin(KeyToActionMixin(TabIndexMixin(Dis
193
202
  }
194
203
  update(changedProperties) {
195
204
  super.update(changedProperties);
205
+ if (changedProperties.has('status')) {
206
+ this.ariaBusy = this.status === STATUS.LOADING ? 'true' : null;
207
+ }
196
208
  if (changedProperties.has('disabled')) {
197
209
  this.tabIndex = this.disabled ? -1 : 0;
198
210
  this.classList.remove('pressed');
@@ -7,6 +7,7 @@ declare const VARIANT: {
7
7
  declare const STATUS: {
8
8
  readonly COMPLETED: "completed";
9
9
  readonly CURRENT: "current";
10
+ readonly LOADING: "loading";
10
11
  readonly ERROR_CURRENT: "error-current";
11
12
  readonly ERROR_INCOMPLETE: "error-incomplete";
12
13
  readonly NOT_STARTED: "not-started";
@@ -7,6 +7,7 @@ const VARIANT = {
7
7
  const STATUS = {
8
8
  COMPLETED: 'completed',
9
9
  CURRENT: 'current',
10
+ LOADING: 'loading',
10
11
  ERROR_CURRENT: 'error-current',
11
12
  ERROR_INCOMPLETE: 'error-incomplete',
12
13
  NOT_STARTED: 'not-started',
@@ -41,6 +41,10 @@ const styles = css `
41
41
  color: var(--mdc-stepperitem-label-color);
42
42
  }
43
43
 
44
+ :host::part(status-spinner) {
45
+ --mdc-spinner-size: 1rem;
46
+ }
47
+
44
48
  :host::part(label-container) {
45
49
  background-color: var(--mdc-stepperitem-label-container-background);
46
50
  border-radius: 0.5rem;
@@ -67,7 +71,8 @@ const styles = css `
67
71
  :host([status='completed'])::part(status-icon) {
68
72
  --mdc-icon-fill-color: var(--mds-color-theme-inverted-text-primary-normal);
69
73
  }
70
- :host([status='current'])::part(status-container) {
74
+ :host([status='current'])::part(status-container),
75
+ :host([status='loading'])::part(status-container) {
71
76
  --mdc-stepperitem-status-container-border-color: var(--mds-color-theme-control-active-normal);
72
77
  }
73
78
  :host([status='error-current'])::part(status-container) {
@@ -100,11 +105,13 @@ const styles = css `
100
105
  --mdc-stepperitem-status-container-background: var(--mds-color-theme-control-active-active);
101
106
  }
102
107
 
103
- :host([status='current']:hover)::part(status-container) {
108
+ :host([status='current']:hover)::part(status-container),
109
+ :host([status='loading']:hover)::part(status-container) {
104
110
  --mdc-stepperitem-status-container-background: var(--mds-color-theme-outline-secondary-normal);
105
111
  --mdc-stepperitem-status-container-border-color: var(--mds-color-theme-control-active-hover);
106
112
  }
107
- :host([status='current']:active)::part(status-container) {
113
+ :host([status='current']:active)::part(status-container),
114
+ :host([status='loading']:active)::part(status-container) {
108
115
  --mdc-stepperitem-status-container-background: var(--mds-color-theme-background-secondary-active);
109
116
  --mdc-stepperitem-status-container-border-color: var(--mds-color-theme-control-active-hover);
110
117
  }
@@ -202,5 +209,9 @@ const styles = css `
202
209
  :host([disabled][status='completed'])::part(status-icon) {
203
210
  --mdc-icon-fill-color: var(--mds-color-theme-inverted-text-primary-disabled);
204
211
  }
212
+
213
+ :host([disabled])::part(status-spinner) {
214
+ --mdc-spinner-default-color: var(--mds-color-theme-text-primary-disabled);
215
+ }
205
216
  `;
206
217
  export default [hostFitContentStyles, styles, ...hostFocusRingStyles()];
@@ -49614,7 +49614,7 @@
49614
49614
  ],
49615
49615
  "cssParts": [
49616
49616
  {
49617
- "description": "The container for the status icon or step number.",
49617
+ "description": "The container for the status icon, step number, or loading spinner.",
49618
49618
  "name": "status-container"
49619
49619
  },
49620
49620
  {
@@ -49629,6 +49629,10 @@
49629
49629
  "description": "The icon representing the status of the stepper item.",
49630
49630
  "name": "status-icon"
49631
49631
  },
49632
+ {
49633
+ "description": "The inset spinner displayed in place of the status indicator while loading.",
49634
+ "name": "status-spinner"
49635
+ },
49632
49636
  {
49633
49637
  "description": "The text representing the step number.",
49634
49638
  "name": "step-number"
@@ -49749,7 +49753,7 @@
49749
49753
  "kind": "method",
49750
49754
  "name": "renderStatusIcon",
49751
49755
  "privacy": "private",
49752
- "description": "Renders the status icon based on the current status of the stepper item.\n- If the status is `completed`, it renders a check icon.\n- If the status is `current` or `error-current`, it renders a pencil icon.\n- If the status is `not-started` or `error-incomplete`, it renders the step number.\n- If the status is anything else, it renders nothing.",
49756
+ "description": "Renders the status icon based on the current status of the stepper item.\n- If the status is `loading`, it renders an inset spinner.\n- If the status is `completed`, it renders a check icon.\n- If the status is `current` or `error-current`, it renders a pencil icon.\n- If the status is `not-started` or `error-incomplete`, it renders the step number.\n- If the status is anything else, it renders nothing.",
49753
49757
  "return": {
49754
49758
  "type": {
49755
49759
  "text": ""
@@ -49762,7 +49766,7 @@
49762
49766
  "type": {
49763
49767
  "text": "StatusType"
49764
49768
  },
49765
- "description": "The status of the stepper item, which can be `completed`, `current`, `not-started`, `error-current`, or `error-incomplete`.",
49769
+ "description": "The status of the stepper item: `completed`, `current`, `loading`, `not-started`, `error-current`, or `error-incomplete`.\nLoading replaces the indicator with an inset spinner and sets aria-busy without changing disabled.\nConsumers must include the loading state in the accessible label and provide application live regions\nwhen progress announcements are needed.",
49766
49770
  "default": "'not-started'",
49767
49771
  "attribute": "status",
49768
49772
  "reflects": true
@@ -49843,7 +49847,7 @@
49843
49847
  "type": {
49844
49848
  "text": "StatusType"
49845
49849
  },
49846
- "description": "The status of the stepper item, which can be `completed`, `current`, `not-started`, `error-current`, or `error-incomplete`.",
49850
+ "description": "The status of the stepper item: `completed`, `current`, `loading`, `not-started`, `error-current`, or `error-incomplete`.\nLoading replaces the indicator with an inset spinner and sets aria-busy without changing disabled.\nConsumers must include the loading state in the accessible label and provide application live regions\nwhen progress announcements are needed.",
49847
49851
  "default": "'not-started'",
49848
49852
  "fieldName": "status"
49849
49853
  },
@@ -49924,7 +49928,7 @@
49924
49928
  "module": "/src/models"
49925
49929
  },
49926
49930
  "tagName": "mdc-stepperitem",
49927
- "jsDoc": "/**\n * @tagname mdc-stepperitem\n *\n * @dependency mdc-icon\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.\n *\n * @csspart status-container - The container for the status icon or step number.\n * @csspart label-container - The container for the label and help text.\n * @csspart help-text-container - The container for the help text and error icon when applicable.\n * @csspart status-icon - The icon representing the status of the stepper item.\n * @csspart step-number - The text representing the step number.\n * @csspart label - The text representing the label of the stepper item.\n * @csspart help-text - The text providing additional information about the stepper item.\n * @csspart help-icon - The icon representing an error in the stepper item.\n *\n * @cssproperty --mdc-stepperitem-status-container-background - The background color of the status container.\n * @cssproperty --mdc-stepperitem-status-container-border-color - The border color of the status container.\n * @cssproperty --mdc-stepperitem-label-color - The color of the label text.\n * @cssproperty --mdc-stepperitem-help-text-color - The color of the optional label text.\n * @cssproperty --mdc-stepperitem-label-container-background - The background color of the label container.\n */",
49931
+ "jsDoc": "/**\n * @tagname mdc-stepperitem\n *\n * @dependency mdc-icon\n * @dependency mdc-spinner\n * @dependency mdc-text\n *\n * @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.\n * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.\n * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.\n *\n * @csspart status-container - The container for the status icon, step number, or loading spinner.\n * @csspart label-container - The container for the label and help text.\n * @csspart help-text-container - The container for the help text and error icon when applicable.\n * @csspart status-icon - The icon representing the status of the stepper item.\n * @csspart status-spinner - The inset spinner displayed in place of the status indicator while loading.\n * @csspart step-number - The text representing the step number.\n * @csspart label - The text representing the label of the stepper item.\n * @csspart help-text - The text providing additional information about the stepper item.\n * @csspart help-icon - The icon representing an error in the stepper item.\n *\n * @cssproperty --mdc-stepperitem-status-container-background - The background color of the status container.\n * @cssproperty --mdc-stepperitem-status-container-border-color - The border color of the status container.\n * @cssproperty --mdc-stepperitem-label-color - The color of the label text.\n * @cssproperty --mdc-stepperitem-help-text-color - The color of the optional label text.\n * @cssproperty --mdc-stepperitem-label-container-background - The background color of the label container.\n */",
49928
49932
  "customElement": true
49929
49933
  }
49930
49934
  ],
@@ -8,6 +8,7 @@ import type { Events } from '../../components/stepperitem/stepperitem.types';
8
8
  *
9
9
  * - Use `mdc-stepperitem` for each stage of an `mdc-stepper` sequence, one item per step.
10
10
  * - Use `mdc-stepperitem` `completed`, `current`, and `not-started` to reflect where the user is in the flow so status reads at a glance.
11
+ * - Use `mdc-stepperitem` `loading` when a step is processing and its completion percentage is unknown, such as generating a staffing plan.
11
12
  * - Use `mdc-stepperitem` `error-current` or `error-incomplete` to flag a step with unresolved problems the user must fix before finishing.
12
13
  *
13
14
  * **When not to use**
@@ -19,16 +20,18 @@ import type { Events } from '../../components/stepperitem/stepperitem.types';
19
20
  * @tagname mdc-stepperitem
20
21
  *
21
22
  * @dependency mdc-icon
23
+ * @dependency mdc-spinner
22
24
  * @dependency mdc-text
23
25
  *
24
26
  * @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.
25
27
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.
26
28
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.
27
29
  *
28
- * @csspart status-container - The container for the status icon or step number.
30
+ * @csspart status-container - The container for the status icon, step number, or loading spinner.
29
31
  * @csspart label-container - The container for the label and help text.
30
32
  * @csspart help-text-container - The container for the help text and error icon when applicable.
31
33
  * @csspart status-icon - The icon representing the status of the stepper item.
34
+ * @csspart status-spinner - The inset spinner displayed in place of the status indicator while loading.
32
35
  * @csspart step-number - The text representing the step number.
33
36
  * @csspart label - The text representing the label of the stepper item.
34
37
  * @csspart help-text - The text providing additional information about the stepper item.
@@ -6,16 +6,18 @@ import { TAG_NAME } from '../../components/stepperitem/stepperitem.constants';
6
6
  * @tagname mdc-stepperitem
7
7
  *
8
8
  * @dependency mdc-icon
9
+ * @dependency mdc-spinner
9
10
  * @dependency mdc-text
10
11
  *
11
12
  * @event click - (React: onClick) This event is dispatched when the stepperitem is clicked.
12
13
  * @event keydown - (React: onKeyDown) This event is dispatched when a key is pressed down on the stepperitem.
13
14
  * @event keyup - (React: onKeyUp) This event is dispatched when a key is released on the stepperitem.
14
15
  *
15
- * @csspart status-container - The container for the status icon or step number.
16
+ * @csspart status-container - The container for the status icon, step number, or loading spinner.
16
17
  * @csspart label-container - The container for the label and help text.
17
18
  * @csspart help-text-container - The container for the help text and error icon when applicable.
18
19
  * @csspart status-icon - The icon representing the status of the stepper item.
20
+ * @csspart status-spinner - The inset spinner displayed in place of the status indicator while loading.
19
21
  * @csspart step-number - The text representing the step number.
20
22
  * @csspart label - The text representing the label of the stepper item.
21
23
  * @csspart help-text - The text providing additional information about the stepper item.
@@ -0,0 +1,54 @@
1
+ /* 1px outline drawn as a pseudo-element, because the glass outline token is a gradient. */
2
+ .mdc-glass-border {
3
+ --mdc-glass-border-color: var(--mds-color-theme-outline-glass-normal, rgba(255, 255, 255, 0.1));
4
+ --mdc-glass-border-radius: var(--mds-radius-theme-lg);
5
+
6
+ position: relative;
7
+ border-radius: var(--mdc-glass-border-radius);
8
+ }
9
+
10
+ .mdc-glass-border::before {
11
+ content: '';
12
+ position: absolute;
13
+ inset: 0;
14
+ padding: 1px;
15
+ border-radius: inherit;
16
+ background: var(--mdc-glass-border-color);
17
+ z-index: 0;
18
+ mask:
19
+ linear-gradient(#000 0 0) content-box,
20
+ linear-gradient(#000 0 0);
21
+ -webkit-mask:
22
+ linear-gradient(#000 0 0) content-box,
23
+ linear-gradient(#000 0 0);
24
+ -webkit-mask-composite: xor;
25
+ mask-composite: exclude;
26
+ box-sizing: border-box;
27
+ pointer-events: none;
28
+ }
29
+
30
+ .mdc-glass-overlay-background {
31
+ --mdc-glass-background: var(--mds-color-theme-background-glass-heavy);
32
+ --mdc-glass-backdrop-filter: var(--mds-effect-backdrop-filter-blur20);
33
+ --mdc-glass-border-radius: var(--mds-radius-theme-lg);
34
+
35
+ position: relative;
36
+ border-radius: var(--mdc-glass-border-radius);
37
+ background: var(--mdc-glass-background);
38
+ backdrop-filter: var(--mdc-glass-backdrop-filter);
39
+ -webkit-backdrop-filter: var(--mdc-glass-backdrop-filter);
40
+ }
41
+
42
+ /* Figma applies the radial highlight as a separate 11% layer; ::after keeps that
43
+ opacity applied to the resolved token values at runtime. */
44
+ .mdc-glass-overlay-background::after {
45
+ content: '';
46
+ position: absolute;
47
+ inset: 0;
48
+ border-radius: inherit;
49
+ opacity: 0.11;
50
+ background: radial-gradient(85.92% 85.92% at 50.12% -1.41%,
51
+ var(--mds-color-theme-background-glass-radial-0) 0%,
52
+ var(--mds-color-theme-background-glass-radial-1) 100%);
53
+ pointer-events: none;
54
+ }
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Gradient Border
3
+ *
4
+ * A shared style, not a component. Import this stylesheet once, then add
5
+ * `mdc-gradient-border-primary` or `mdc-gradient-border-secondary` to any
6
+ * element that should carry an AI hint border, and
7
+ * `mdc-gradient-border-animated` to make that gradient travel around it.
8
+ *
9
+ * import '@momentum-design/components/dist/styles/gradient-border.css';
10
+ *
11
+ * <div class="mdc-gradient-border-primary mdc-gradient-border-animated">…</div>
12
+ *
13
+ * Requires a Momentum theme stylesheet to be loaded for the AI hint colour
14
+ * tokens to resolve.
15
+ *
16
+ * The ring is a masked pseudo-element rather than a box-shadow, so it leaves
17
+ * box-shadow free for the focus ring and never tints translucent or glass
18
+ * surfaces underneath it.
19
+ */
20
+
21
+ /* Registered so the angle is a typed <angle> and can therefore be animated.
22
+ A rule in a shadow root is ignored, which is why this ships as a document
23
+ level stylesheet; registration from here applies to shadow roots too. */
24
+ @property --mds-gradient-border-angle {
25
+ syntax: '<angle>';
26
+ inherits: false;
27
+ initial-value: 0deg;
28
+ }
29
+
30
+ /* A full turn, so engines without the Properties and Values API (Firefox below
31
+ 128) land on a value identical to the first frame instead of jumping. */
32
+ @keyframes mdc-gradient-border-rotate {
33
+ from {
34
+ --mds-gradient-border-angle: 0deg;
35
+ }
36
+
37
+ to {
38
+ --mds-gradient-border-angle: 360deg;
39
+ }
40
+ }
41
+
42
+ .mdc-gradient-border-primary,
43
+ .mdc-gradient-border-secondary {
44
+ --mdc-gradient-border-width: 0.125rem;
45
+ --mdc-gradient-border-duration: 6s;
46
+ --mdc-gradient-border-iteration-count: infinite;
47
+ }
48
+
49
+ /* Opaque end to end, so the ring reads as a steady hint. */
50
+ .mdc-gradient-border-primary {
51
+ --mdc-gradient-border-start-angle: 90deg;
52
+ --mdc-gradient-border-stops: var(--mds-color-theme-ai-hint-primary-gradient-0) 0%,
53
+ var(--mds-color-theme-ai-hint-primary-gradient-1) 53%, var(--mds-color-theme-ai-hint-primary-gradient-2) 100%;
54
+ }
55
+
56
+ /* First and last stops are transparent, so the ring tapers into a comet tail. */
57
+ .mdc-gradient-border-secondary {
58
+ --mdc-gradient-border-start-angle: 180deg;
59
+ --mdc-gradient-border-stops: var(--mds-color-theme-ai-hint-secondary-gradient-0) 0%,
60
+ var(--mds-color-theme-ai-hint-secondary-gradient-1) 24%, var(--mds-color-theme-ai-hint-secondary-gradient-2) 41%,
61
+ var(--mds-color-theme-ai-hint-secondary-gradient-3) 62%, var(--mds-color-theme-ai-hint-secondary-gradient-4) 82%;
62
+ }
63
+
64
+ /* Everything below is gated: engines without the unprefixed mask (Chrome and
65
+ Edge below 120) parse none of it and render the element unchanged. */
66
+ @supports (mask-composite: exclude) {
67
+
68
+ .mdc-gradient-border-primary,
69
+ .mdc-gradient-border-secondary {
70
+ position: relative;
71
+ }
72
+
73
+ .mdc-gradient-border-primary::after,
74
+ .mdc-gradient-border-secondary::after {
75
+ content: '';
76
+ position: absolute;
77
+ inset: 0;
78
+ border-radius: inherit;
79
+ padding: var(--mdc-gradient-border-width);
80
+ pointer-events: none;
81
+ mask:
82
+ linear-gradient(#000 0 0) content-box,
83
+ linear-gradient(#000 0 0);
84
+ mask-composite: exclude;
85
+ }
86
+
87
+ /* Composed in the rule that paints the ring rather than in a token or in a
88
+ custom property on the host: a custom property's var() is substituted
89
+ where it is declared, so an angle baked in further up would resolve there
90
+ once and never see the animation, which runs on this pseudo-element. The
91
+ start angle is added here too, so it also applies when static. */
92
+ .mdc-gradient-border-primary::after {
93
+ background: linear-gradient(calc(var(--mdc-gradient-border-start-angle) + var(--mds-gradient-border-angle, 0deg)),
94
+ var(--mdc-gradient-border-stops));
95
+ }
96
+
97
+ .mdc-gradient-border-secondary::after {
98
+ background: conic-gradient(from calc(var(--mdc-gradient-border-start-angle) + var(--mds-gradient-border-angle, 0deg)),
99
+ var(--mdc-gradient-border-stops));
100
+ }
101
+
102
+ .mdc-gradient-border-animated::after {
103
+ animation: var(--mdc-gradient-border-duration) linear 0ms var(--mdc-gradient-border-iteration-count) mdc-gradient-border-rotate;
104
+ }
105
+ }
106
+
107
+ @media (prefers-reduced-motion: reduce) {
108
+ .mdc-gradient-border-animated::after {
109
+ animation: none;
110
+ }
111
+ }
112
+
113
+ /* Gradients are not rendered in forced-colors mode. */
114
+ @media (forced-colors: active) {
115
+
116
+ .mdc-gradient-border-primary::after,
117
+ .mdc-gradient-border-secondary::after {
118
+ background: CanvasText;
119
+ animation: none;
120
+ }
121
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@momentum-design/components",
3
3
  "packageManager": "yarn@3.2.4",
4
- "version": "0.141.4",
4
+ "version": "0.142.0",
5
5
  "engines": {
6
6
  "node": ">=24.0.0",
7
7
  "npm": ">=8.0.0"
@@ -22,7 +22,9 @@
22
22
  "./components": "./dist/components/index.js",
23
23
  "./components/*": "./dist/components/*",
24
24
  "./dist/components": "./dist/components/index.js",
25
- "./dist/components/*": "./dist/components/*"
25
+ "./dist/components/*": "./dist/components/*",
26
+ "./styles/*": "./dist/styles/*",
27
+ "./dist/styles/*": "./dist/styles/*"
26
28
  },
27
29
  "files": [
28
30
  "/dist/",