@primer/react 38.4.0-rc.fc59a24d1 → 38.4.1-rc.004ef30b4

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.

Potentially problematic release.


This version of @primer/react might be problematic. Click here for more details.

Files changed (36) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/DataTable/Pagination.d.ts.map +1 -1
  3. package/dist/DataTable/Pagination.js +181 -187
  4. package/dist/InlineMessage/InlineMessage.d.ts +5 -1
  5. package/dist/InlineMessage/InlineMessage.d.ts.map +1 -1
  6. package/dist/InlineMessage/InlineMessage.js +49 -25
  7. package/dist/PageLayout/PageLayout-3f6ddb7d.css +2 -0
  8. package/dist/PageLayout/PageLayout-3f6ddb7d.css.map +1 -0
  9. package/dist/PageLayout/PageLayout.d.ts.map +1 -1
  10. package/dist/PageLayout/PageLayout.js +422 -590
  11. package/dist/PageLayout/PageLayout.module.css.js +2 -2
  12. package/dist/Radio/Radio-4319e717.css +2 -0
  13. package/dist/Radio/{Radio-df9a5c02.css.map → Radio-4319e717.css.map} +1 -1
  14. package/dist/Radio/Radio.module.css.js +1 -1
  15. package/dist/TreeView/TreeView.d.ts.map +1 -1
  16. package/dist/TreeView/TreeView.js +5 -7
  17. package/dist/experimental/IssueLabel/IssueLabel.d.ts.map +1 -1
  18. package/dist/experimental/IssueLabel/IssueLabel.js +3 -2
  19. package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
  20. package/dist/experimental/SelectPanel2/SelectPanel.js +4 -5
  21. package/dist/hooks/useFocusTrap.d.ts +6 -0
  22. package/dist/hooks/useFocusTrap.d.ts.map +1 -1
  23. package/dist/hooks/useFocusTrap.js +18 -1
  24. package/generated/components.json +6 -0
  25. package/package.json +8 -8
  26. package/dist/PageLayout/PageLayout-28a244f7.css +0 -2
  27. package/dist/PageLayout/PageLayout-28a244f7.css.map +0 -1
  28. package/dist/Radio/Radio-df9a5c02.css +0 -2
  29. package/dist/experimental/IssueLabel/getColorFromHex.d.ts +0 -8
  30. package/dist/experimental/IssueLabel/getColorFromHex.d.ts.map +0 -1
  31. package/dist/experimental/IssueLabel/getColorFromHex.js +0 -185
  32. package/dist/internal/components/LiveRegion.d.ts +0 -14
  33. package/dist/internal/components/LiveRegion.d.ts.map +0 -1
  34. package/dist/internal/components/LiveRegion.js +0 -130
  35. package/dist/polyfills/eventListenerSignal.d.ts +0 -7
  36. package/dist/polyfills/eventListenerSignal.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @primer/react
2
2
 
3
+ ## 38.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#7275](https://github.com/primer/react/pull/7275) [`822c3e7`](https://github.com/primer/react/commit/822c3e791a9fd18df6b9a834f9bbb87151ec8076) Thanks [@mattcosta7](https://github.com/mattcosta7)! - Improve drag performance for PageLayout
8
+
9
+ - [#7242](https://github.com/primer/react/pull/7242) [`32faa80`](https://github.com/primer/react/commit/32faa80d754db46fa5c6583fb9c72dc9a7d22581) Thanks [@pksjce](https://github.com/pksjce)! - useFocusTrap - Fix [bug related to restoring focus on scrolling](https://github.com/github/primer/issues/5200)
10
+
3
11
  ## 38.4.0
4
12
 
5
13
  ### Minor Changes
@@ -8,11 +16,19 @@
8
16
 
9
17
  - [#7250](https://github.com/primer/react/pull/7250) [`a193d30`](https://github.com/primer/react/commit/a193d30cad6e308e2f0cc29ebdcc926ee057f0fb) Thanks [@siddharthkp](https://github.com/siddharthkp)! - Banner: Add `flush` prop for use within confined spaces, such as dialogs, tables, cards, or boxes where available space is limited.
10
18
 
19
+ - [#7247](https://github.com/primer/react/pull/7247) [`e1021e7`](https://github.com/primer/react/commit/e1021e7a5b65c605d98f025a30ef4fb5cce91024) Thanks [@liuliu-dev](https://github.com/liuliu-dev)! - Add leadingVisual to InlineMessage component.
20
+
11
21
  - [#7047](https://github.com/primer/react/pull/7047) [`c07dd71`](https://github.com/primer/react/commit/c07dd71e990323a1c73ec99c44752df43d153090) Thanks [@TylerJDev](https://github.com/TylerJDev)! - Remove the feature flag for `primer_react_segmented_control_tooltip` and GA tooltip by default behavior.
12
22
  - Ensure that when `disabled` is applied, the tooltip is still triggered.
13
23
 
14
24
  ### Patch Changes
15
25
 
26
+ - [#7244](https://github.com/primer/react/pull/7244) [`d973c5a`](https://github.com/primer/react/commit/d973c5ad5aa59c66e1f609558b33a6b63880234a) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - "Update logic for how hex codes are applied"
27
+
28
+ - [#7230](https://github.com/primer/react/pull/7230) [`534ca11`](https://github.com/primer/react/commit/534ca119a2552bb71684c64d2e7481cf426023b6) Thanks [@mperrotti](https://github.com/mperrotti)! - Replaces 'aria-live' usage and removes internal LiveRegion component
29
+
30
+ - [#7267](https://github.com/primer/react/pull/7267) [`1d8759a`](https://github.com/primer/react/commit/1d8759aae8a3bdd1dc2b8bc8785867ca467b72b5) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Used correct tokens for disabled radio control
31
+
16
32
  - [#7241](https://github.com/primer/react/pull/7241) [`181f12e`](https://github.com/primer/react/commit/181f12e1244ea1f33559976ff16e32a1777e877d) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(LabelGroup): add role and aria-label to hidden items overlay
17
33
 
18
34
  ## 38.3.0
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/DataTable/Pagination.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAMhE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACtF;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IAE3C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAE9C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAMD,wBAAgB,UAAU,CAAC,EACzB,YAAY,EAAE,KAAK,EACnB,gBAAgB,EAChB,EAAE,EACF,QAAQ,EACR,QAAa,EACb,SAA4B,EAC5B,UAAU,GACX,EAAE,eAAe,qBAwGjB;AAwDD,KAAK,eAAe,GAAG;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../../src/DataTable/Pagination.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,KAAK,EAAC,eAAe,EAAC,MAAM,6BAA6B,CAAA;AAMhE,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IACtF;;OAEG;IACH,YAAY,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAA;IAEzB;;;OAGG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IAE3C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IAE9C;;OAEG;IACH,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAMD,wBAAgB,UAAU,CAAC,EACzB,YAAY,EAAE,KAAK,EACnB,gBAAgB,EAChB,EAAE,EACF,QAAQ,EACR,QAAa,EACb,SAA4B,EAC5B,UAAU,GACX,EAAE,eAAe,qBAqGjB;AA4DD,KAAK,eAAe,GAAG;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA"}
@@ -2,7 +2,6 @@ import { c } from 'react-compiler-runtime';
2
2
  import { ChevronLeftIcon, ChevronRightIcon } from '@primer/octicons-react';
3
3
  import { useState } from 'react';
4
4
  import { Button } from '../internal/components/ButtonReset.js';
5
- import { LiveRegionOutlet, LiveRegion, Message } from '../internal/components/LiveRegion.js';
6
5
  import { warning } from '../utils/warning.js';
7
6
  import { viewportRanges } from '../hooks/useResponsiveValue.js';
8
7
  import { buildPaginationModel } from '../Pagination/model.js';
@@ -10,12 +9,13 @@ import classes from './Pagination.module.css.js';
10
9
  import { clsx } from 'clsx';
11
10
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
12
11
  import { VisuallyHidden } from '../VisuallyHidden/VisuallyHidden.js';
12
+ import { AriaStatus } from '../live-region/AriaStatus.js';
13
13
 
14
14
  const defaultShowPages = {
15
15
  narrow: false
16
16
  };
17
17
  function Pagination(t0) {
18
- const $ = c(61);
18
+ const $ = c(60);
19
19
  const {
20
20
  "aria-label": label,
21
21
  defaultPageIndex,
@@ -87,119 +87,112 @@ function Pagination(t0) {
87
87
  const model = t7;
88
88
  let t8;
89
89
  if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
90
- t8 = /*#__PURE__*/jsx(LiveRegionOutlet, {});
90
+ t8 = clsx("TablePagination", classes.TablePagination);
91
91
  $[11] = t8;
92
92
  } else {
93
93
  t8 = $[11];
94
94
  }
95
95
  let t9;
96
- if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
97
- t9 = clsx("TablePagination", classes.TablePagination);
98
- $[12] = t9;
99
- } else {
100
- t9 = $[12];
101
- }
102
- let t10;
103
- if ($[13] !== pageEnd || $[14] !== pageStart || $[15] !== totalCount) {
104
- t10 = /*#__PURE__*/jsx(Range, {
96
+ if ($[12] !== pageEnd || $[13] !== pageStart || $[14] !== totalCount) {
97
+ t9 = /*#__PURE__*/jsx(Range, {
105
98
  pageStart: pageStart,
106
99
  pageEnd: pageEnd,
107
100
  totalCount: totalCount
108
101
  });
109
- $[13] = pageEnd;
110
- $[14] = pageStart;
111
- $[15] = totalCount;
102
+ $[12] = pageEnd;
103
+ $[13] = pageStart;
104
+ $[14] = totalCount;
105
+ $[15] = t9;
106
+ } else {
107
+ t9 = $[15];
108
+ }
109
+ let t10;
110
+ if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
111
+ t10 = clsx("TablePaginationSteps", classes.TablePaginationSteps);
112
112
  $[16] = t10;
113
113
  } else {
114
114
  t10 = $[16];
115
115
  }
116
116
  let t11;
117
- if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
118
- t11 = clsx("TablePaginationSteps", classes.TablePaginationSteps);
119
- $[17] = t11;
120
- } else {
121
- t11 = $[17];
122
- }
123
- let t12;
124
- if ($[18] !== getViewportRangesToHidePages) {
125
- t12 = getViewportRangesToHidePages();
126
- $[18] = getViewportRangesToHidePages;
127
- $[19] = t12;
128
- } else {
129
- t12 = $[19];
130
- }
131
- const t13 = t12.join(" ");
132
- let t14;
133
- if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
134
- t14 = clsx("TablePaginationAction", classes.TablePaginationAction);
135
- $[20] = t14;
136
- } else {
137
- t14 = $[20];
138
- }
139
- const t15 = hasPreviousPage ? true : undefined;
140
- const t16 = !hasPreviousPage ? true : undefined;
141
- let t17;
142
- if ($[21] !== hasPreviousPage || $[22] !== selectPreviousPage) {
143
- t17 = () => {
117
+ if ($[17] !== getViewportRangesToHidePages) {
118
+ t11 = getViewportRangesToHidePages();
119
+ $[17] = getViewportRangesToHidePages;
120
+ $[18] = t11;
121
+ } else {
122
+ t11 = $[18];
123
+ }
124
+ const t12 = t11.join(" ");
125
+ let t13;
126
+ if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
127
+ t13 = clsx("TablePaginationAction", classes.TablePaginationAction);
128
+ $[19] = t13;
129
+ } else {
130
+ t13 = $[19];
131
+ }
132
+ const t14 = hasPreviousPage ? true : undefined;
133
+ const t15 = !hasPreviousPage ? true : undefined;
134
+ let t16;
135
+ if ($[20] !== hasPreviousPage || $[21] !== selectPreviousPage) {
136
+ t16 = () => {
144
137
  if (!hasPreviousPage) {
145
138
  return;
146
139
  }
147
140
  selectPreviousPage();
148
141
  };
149
- $[21] = hasPreviousPage;
150
- $[22] = selectPreviousPage;
151
- $[23] = t17;
142
+ $[20] = hasPreviousPage;
143
+ $[21] = selectPreviousPage;
144
+ $[22] = t16;
152
145
  } else {
153
- t17 = $[23];
146
+ t16 = $[22];
154
147
  }
155
- let t18;
156
- if ($[24] !== hasPreviousPage) {
157
- t18 = hasPreviousPage ? /*#__PURE__*/jsx(ChevronLeftIcon, {}) : null;
158
- $[24] = hasPreviousPage;
159
- $[25] = t18;
148
+ let t17;
149
+ if ($[23] !== hasPreviousPage) {
150
+ t17 = hasPreviousPage ? /*#__PURE__*/jsx(ChevronLeftIcon, {}) : null;
151
+ $[23] = hasPreviousPage;
152
+ $[24] = t17;
160
153
  } else {
161
- t18 = $[25];
154
+ t17 = $[24];
162
155
  }
156
+ let t18;
163
157
  let t19;
164
- let t20;
165
- if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
166
- t19 = /*#__PURE__*/jsx("span", {
158
+ if ($[25] === Symbol.for("react.memo_cache_sentinel")) {
159
+ t18 = /*#__PURE__*/jsx("span", {
167
160
  children: "Previous"
168
161
  });
169
- t20 = /*#__PURE__*/jsx(VisuallyHidden, {
162
+ t19 = /*#__PURE__*/jsx(VisuallyHidden, {
170
163
  children: "\xA0page"
171
164
  });
165
+ $[25] = t18;
172
166
  $[26] = t19;
173
- $[27] = t20;
174
167
  } else {
168
+ t18 = $[25];
175
169
  t19 = $[26];
176
- t20 = $[27];
177
170
  }
178
- let t21;
179
- if ($[28] !== t15 || $[29] !== t16 || $[30] !== t17 || $[31] !== t18) {
180
- t21 = /*#__PURE__*/jsx(Step, {
171
+ let t20;
172
+ if ($[27] !== t14 || $[28] !== t15 || $[29] !== t16 || $[30] !== t17) {
173
+ t20 = /*#__PURE__*/jsx(Step, {
181
174
  children: /*#__PURE__*/jsxs(Button, {
182
- className: t14,
175
+ className: t13,
183
176
  type: "button",
184
- "data-has-page": t15,
185
- "aria-disabled": t16,
186
- onClick: t17,
187
- children: [t18, t19, t20]
177
+ "data-has-page": t14,
178
+ "aria-disabled": t15,
179
+ onClick: t16,
180
+ children: [t17, t18, t19]
188
181
  })
189
182
  });
183
+ $[27] = t14;
190
184
  $[28] = t15;
191
185
  $[29] = t16;
192
186
  $[30] = t17;
193
- $[31] = t18;
194
- $[32] = t21;
187
+ $[31] = t20;
195
188
  } else {
196
- t21 = $[32];
189
+ t20 = $[31];
197
190
  }
198
- let t22;
199
- if ($[33] !== model || $[34] !== selectPage) {
200
- let t23;
201
- if ($[36] !== selectPage) {
202
- t23 = (page, i) => {
191
+ let t21;
192
+ if ($[32] !== model || $[33] !== selectPage) {
193
+ let t22;
194
+ if ($[35] !== selectPage) {
195
+ t22 = (page, i) => {
203
196
  if (page.type === "BREAK") {
204
197
  return /*#__PURE__*/jsx(TruncationStep, {}, `truncation-${i}`);
205
198
  } else {
@@ -218,121 +211,119 @@ function Pagination(t0) {
218
211
  }
219
212
  }
220
213
  };
221
- $[36] = selectPage;
222
- $[37] = t23;
214
+ $[35] = selectPage;
215
+ $[36] = t22;
223
216
  } else {
224
- t23 = $[37];
217
+ t22 = $[36];
225
218
  }
226
- t22 = model.map(t23);
227
- $[33] = model;
228
- $[34] = selectPage;
229
- $[35] = t22;
219
+ t21 = model.map(t22);
220
+ $[32] = model;
221
+ $[33] = selectPage;
222
+ $[34] = t21;
230
223
  } else {
231
- t22 = $[35];
224
+ t21 = $[34];
232
225
  }
233
- let t23;
234
- if ($[38] === Symbol.for("react.memo_cache_sentinel")) {
235
- t23 = clsx("TablePaginationAction", classes.TablePaginationAction);
236
- $[38] = t23;
226
+ let t22;
227
+ if ($[37] === Symbol.for("react.memo_cache_sentinel")) {
228
+ t22 = clsx("TablePaginationAction", classes.TablePaginationAction);
229
+ $[37] = t22;
237
230
  } else {
238
- t23 = $[38];
231
+ t22 = $[37];
239
232
  }
240
- const t24 = hasNextPage ? true : undefined;
241
- const t25 = !hasNextPage ? true : undefined;
242
- let t26;
243
- if ($[39] !== hasNextPage || $[40] !== selectNextPage) {
244
- t26 = () => {
233
+ const t23 = hasNextPage ? true : undefined;
234
+ const t24 = !hasNextPage ? true : undefined;
235
+ let t25;
236
+ if ($[38] !== hasNextPage || $[39] !== selectNextPage) {
237
+ t25 = () => {
245
238
  if (!hasNextPage) {
246
239
  return;
247
240
  }
248
241
  selectNextPage();
249
242
  };
250
- $[39] = hasNextPage;
251
- $[40] = selectNextPage;
252
- $[41] = t26;
243
+ $[38] = hasNextPage;
244
+ $[39] = selectNextPage;
245
+ $[40] = t25;
253
246
  } else {
254
- t26 = $[41];
247
+ t25 = $[40];
255
248
  }
249
+ let t26;
256
250
  let t27;
257
- let t28;
258
- if ($[42] === Symbol.for("react.memo_cache_sentinel")) {
259
- t27 = /*#__PURE__*/jsx("span", {
251
+ if ($[41] === Symbol.for("react.memo_cache_sentinel")) {
252
+ t26 = /*#__PURE__*/jsx("span", {
260
253
  children: "Next"
261
254
  });
262
- t28 = /*#__PURE__*/jsx(VisuallyHidden, {
255
+ t27 = /*#__PURE__*/jsx(VisuallyHidden, {
263
256
  children: "\xA0page"
264
257
  });
258
+ $[41] = t26;
265
259
  $[42] = t27;
266
- $[43] = t28;
267
260
  } else {
261
+ t26 = $[41];
268
262
  t27 = $[42];
269
- t28 = $[43];
270
263
  }
271
- let t29;
272
- if ($[44] !== hasNextPage) {
273
- t29 = hasNextPage ? /*#__PURE__*/jsx(ChevronRightIcon, {}) : null;
274
- $[44] = hasNextPage;
275
- $[45] = t29;
264
+ let t28;
265
+ if ($[43] !== hasNextPage) {
266
+ t28 = hasNextPage ? /*#__PURE__*/jsx(ChevronRightIcon, {}) : null;
267
+ $[43] = hasNextPage;
268
+ $[44] = t28;
276
269
  } else {
277
- t29 = $[45];
270
+ t28 = $[44];
278
271
  }
279
- let t30;
280
- if ($[46] !== t24 || $[47] !== t25 || $[48] !== t26 || $[49] !== t29) {
281
- t30 = /*#__PURE__*/jsx(Step, {
272
+ let t29;
273
+ if ($[45] !== t23 || $[46] !== t24 || $[47] !== t25 || $[48] !== t28) {
274
+ t29 = /*#__PURE__*/jsx(Step, {
282
275
  children: /*#__PURE__*/jsxs(Button, {
283
- className: t23,
276
+ className: t22,
284
277
  type: "button",
285
- "data-has-page": t24,
286
- "aria-disabled": t25,
287
- onClick: t26,
288
- children: [t27, t28, t29]
278
+ "data-has-page": t23,
279
+ "aria-disabled": t24,
280
+ onClick: t25,
281
+ children: [t26, t27, t28]
289
282
  })
290
283
  });
284
+ $[45] = t23;
291
285
  $[46] = t24;
292
286
  $[47] = t25;
293
- $[48] = t26;
287
+ $[48] = t28;
294
288
  $[49] = t29;
295
- $[50] = t30;
296
289
  } else {
297
- t30 = $[50];
290
+ t29 = $[49];
298
291
  }
299
- let t31;
300
- if ($[51] !== t13 || $[52] !== t21 || $[53] !== t22 || $[54] !== t30) {
301
- t31 = /*#__PURE__*/jsxs("ol", {
302
- className: t11,
303
- "data-hidden-viewport-ranges": t13,
304
- children: [t21, t22, t30]
292
+ let t30;
293
+ if ($[50] !== t12 || $[51] !== t20 || $[52] !== t21 || $[53] !== t29) {
294
+ t30 = /*#__PURE__*/jsxs("ol", {
295
+ className: t10,
296
+ "data-hidden-viewport-ranges": t12,
297
+ children: [t20, t21, t29]
305
298
  });
306
- $[51] = t13;
299
+ $[50] = t12;
300
+ $[51] = t20;
307
301
  $[52] = t21;
308
- $[53] = t22;
302
+ $[53] = t29;
309
303
  $[54] = t30;
310
- $[55] = t31;
311
- } else {
312
- t31 = $[55];
313
- }
314
- let t32;
315
- if ($[56] !== id || $[57] !== label || $[58] !== t10 || $[59] !== t31) {
316
- t32 = /*#__PURE__*/jsxs(LiveRegion, {
317
- children: [t8, /*#__PURE__*/jsxs("nav", {
318
- "aria-label": label,
319
- className: t9,
320
- id: id,
321
- children: [t10, t31]
322
- })]
304
+ } else {
305
+ t30 = $[54];
306
+ }
307
+ let t31;
308
+ if ($[55] !== id || $[56] !== label || $[57] !== t30 || $[58] !== t9) {
309
+ t31 = /*#__PURE__*/jsxs("nav", {
310
+ "aria-label": label,
311
+ className: t8,
312
+ id: id,
313
+ children: [t9, t30]
323
314
  });
324
- $[56] = id;
325
- $[57] = label;
326
- $[58] = t10;
315
+ $[55] = id;
316
+ $[56] = label;
317
+ $[57] = t30;
318
+ $[58] = t9;
327
319
  $[59] = t31;
328
- $[60] = t32;
329
320
  } else {
330
- t32 = $[60];
321
+ t31 = $[59];
331
322
  }
332
- return t32;
323
+ return t31;
333
324
  }
334
325
  function Range(t0) {
335
- const $ = c(12);
326
+ const $ = c(14);
336
327
  const {
337
328
  pageStart,
338
329
  pageEnd,
@@ -340,65 +331,68 @@ function Range(t0) {
340
331
  } = t0;
341
332
  const start = pageStart + 1;
342
333
  const end = pageEnd;
343
- const t1 = `Showing ${start} through ${end} of ${totalCount}`;
344
- let t2;
345
- if ($[0] !== t1) {
346
- t2 = /*#__PURE__*/jsx(Message, {
347
- value: t1
334
+ let t1;
335
+ if ($[0] !== end || $[1] !== start || $[2] !== totalCount) {
336
+ t1 = /*#__PURE__*/jsx(VisuallyHidden, {
337
+ children: /*#__PURE__*/jsxs(AriaStatus, {
338
+ children: ["Showing ", start, " through ", end, " of ", totalCount]
339
+ })
348
340
  });
349
- $[0] = t1;
350
- $[1] = t2;
341
+ $[0] = end;
342
+ $[1] = start;
343
+ $[2] = totalCount;
344
+ $[3] = t1;
351
345
  } else {
352
- t2 = $[1];
346
+ t1 = $[3];
353
347
  }
354
- let t3;
355
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
356
- t3 = clsx("TablePaginationRange", classes.TablePaginationRange);
357
- $[2] = t3;
348
+ let t2;
349
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
350
+ t2 = clsx("TablePaginationRange", classes.TablePaginationRange);
351
+ $[4] = t2;
358
352
  } else {
359
- t3 = $[2];
353
+ t2 = $[4];
360
354
  }
355
+ let t3;
361
356
  let t4;
362
- let t5;
363
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
364
- t4 = /*#__PURE__*/jsx(VisuallyHidden, {
357
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
358
+ t3 = /*#__PURE__*/jsx(VisuallyHidden, {
365
359
  children: "\xA0through\xA0"
366
360
  });
367
- t5 = /*#__PURE__*/jsx("span", {
361
+ t4 = /*#__PURE__*/jsx("span", {
368
362
  "aria-hidden": "true",
369
363
  children: "\u2012"
370
364
  });
371
- $[3] = t4;
372
- $[4] = t5;
365
+ $[5] = t3;
366
+ $[6] = t4;
373
367
  } else {
374
- t4 = $[3];
375
- t5 = $[4];
368
+ t3 = $[5];
369
+ t4 = $[6];
376
370
  }
377
- let t6;
378
- if ($[5] !== end || $[6] !== start || $[7] !== totalCount) {
379
- t6 = /*#__PURE__*/jsxs("p", {
380
- className: t3,
381
- children: [start, t4, t5, end, " of ", totalCount]
371
+ let t5;
372
+ if ($[7] !== end || $[8] !== start || $[9] !== totalCount) {
373
+ t5 = /*#__PURE__*/jsxs("p", {
374
+ className: t2,
375
+ children: [start, t3, t4, end, " of ", totalCount]
382
376
  });
383
- $[5] = end;
384
- $[6] = start;
385
- $[7] = totalCount;
386
- $[8] = t6;
377
+ $[7] = end;
378
+ $[8] = start;
379
+ $[9] = totalCount;
380
+ $[10] = t5;
387
381
  } else {
388
- t6 = $[8];
382
+ t5 = $[10];
389
383
  }
390
- let t7;
391
- if ($[9] !== t2 || $[10] !== t6) {
392
- t7 = /*#__PURE__*/jsxs(Fragment, {
393
- children: [t2, t6]
384
+ let t6;
385
+ if ($[11] !== t1 || $[12] !== t5) {
386
+ t6 = /*#__PURE__*/jsxs(Fragment, {
387
+ children: [t1, t5]
394
388
  });
395
- $[9] = t2;
396
- $[10] = t6;
397
- $[11] = t7;
389
+ $[11] = t1;
390
+ $[12] = t5;
391
+ $[13] = t6;
398
392
  } else {
399
- t7 = $[11];
393
+ t6 = $[13];
400
394
  }
401
- return t7;
395
+ return t6;
402
396
  }
403
397
  function TruncationStep() {
404
398
  const $ = c(1);
@@ -9,7 +9,11 @@ export type InlineMessageProps = React.ComponentPropsWithoutRef<'div'> & {
9
9
  * Specify the type of the InlineMessage
10
10
  */
11
11
  variant: MessageVariant;
12
+ /**
13
+ * A custom leading visual (icon or other element) to display instead of the default variant icon.
14
+ */
15
+ leadingVisual?: React.ElementType | React.ReactNode;
12
16
  };
13
- export declare function InlineMessage({ children, className, size, variant, ...rest }: InlineMessageProps): React.JSX.Element;
17
+ export declare function InlineMessage({ children, className, size, variant, leadingVisual: LeadingVisual, ...rest }: InlineMessageProps): React.JSX.Element;
14
18
  export {};
15
19
  //# sourceMappingURL=InlineMessage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InlineMessage.d.ts","sourceRoot":"","sources":["../../src/InlineMessage/InlineMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,KAAK,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;AAExE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACvE;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAEzB;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;CACxB,CAAA;AAgBD,wBAAgB,aAAa,CAAC,EAAC,QAAQ,EAAE,SAAS,EAAE,IAAe,EAAE,OAAO,EAAE,GAAG,IAAI,EAAC,EAAE,kBAAkB,qBASzG"}
1
+ {"version":3,"file":"InlineMessage.d.ts","sourceRoot":"","sources":["../../src/InlineMessage/InlineMessage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,KAAK,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,aAAa,GAAG,SAAS,CAAA;AAExE,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACvE;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAA;IAEzB;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IAEvB;;OAEG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,SAAS,CAAA;CACpD,CAAA;AAgBD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAS,EACT,IAAe,EACf,OAAO,EACP,aAAa,EAAE,aAAa,EAC5B,GAAG,IAAI,EACR,EAAE,kBAAkB,qBAoBpB"}