@primer/react 0.0.0-20260529232437 → 0.0.0-20260601083639

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 (138) hide show
  1. package/CHANGELOG.md +1 -75
  2. package/dist/ActionList/index.d.ts +6 -6
  3. package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
  4. package/dist/ActionMenu/ActionMenu.js +1 -0
  5. package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css +2 -0
  6. package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css.map +1 -0
  7. package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
  8. package/dist/AnchoredOverlay/AnchoredOverlay.js +5 -8
  9. package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +1 -1
  10. package/dist/Banner/Banner.d.ts.map +1 -1
  11. package/dist/Banner/Banner.js +20 -17
  12. package/dist/Button/{ButtonBase-311501b9.css → ButtonBase-713ecf3d.css} +2 -2
  13. package/dist/Button/{ButtonBase-311501b9.css.map → ButtonBase-713ecf3d.css.map} +1 -1
  14. package/dist/Button/ButtonBase.d.ts.map +1 -1
  15. package/dist/Button/ButtonBase.js +0 -1
  16. package/dist/Button/ButtonBase.module.css.js +1 -1
  17. package/dist/Card/{Card-d8a02dd9.css → Card-cec366f8.css} +2 -2
  18. package/dist/Card/{Card-d8a02dd9.css.map → Card-cec366f8.css.map} +1 -1
  19. package/dist/Card/Card.d.ts +39 -75
  20. package/dist/Card/Card.d.ts.map +1 -1
  21. package/dist/Card/Card.js +160 -260
  22. package/dist/Card/Card.module.css.js +2 -2
  23. package/dist/Card/index.d.ts +16 -16
  24. package/dist/Card/index.d.ts.map +1 -1
  25. package/dist/Card/index.js +2 -2
  26. package/dist/CheckboxGroup/CheckboxGroup.js +1 -0
  27. package/dist/DataTable/index.d.ts.map +1 -1
  28. package/dist/DataTable/index.js +1 -0
  29. package/dist/Dialog/Dialog.d.ts +1 -0
  30. package/dist/Dialog/Dialog.d.ts.map +1 -1
  31. package/dist/Dialog/Dialog.js +1 -0
  32. package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
  33. package/dist/FilteredActionList/FilteredActionList.js +0 -4
  34. package/dist/FormControl/FormControl.d.ts +3 -3
  35. package/dist/Heading/Heading.d.ts.map +1 -1
  36. package/dist/Heading/Heading.js +16 -8
  37. package/dist/KeybindingHint/KeybindingHint.d.ts +1 -6
  38. package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
  39. package/dist/KeybindingHint/KeybindingHint.js +2 -6
  40. package/dist/KeybindingHint/components/Chord.d.ts +1 -2
  41. package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
  42. package/dist/KeybindingHint/components/Chord.js +1 -1
  43. package/dist/KeybindingHint/components/Key.js +10 -10
  44. package/dist/KeybindingHint/components/Sequence.d.ts +1 -2
  45. package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
  46. package/dist/KeybindingHint/components/Sequence.js +2 -2
  47. package/dist/KeybindingHint/key-names.d.ts +3 -4
  48. package/dist/KeybindingHint/key-names.d.ts.map +1 -1
  49. package/dist/KeybindingHint/key-names.js +14 -15
  50. package/dist/Link/Link.d.ts.map +1 -1
  51. package/dist/Link/Link.js +16 -8
  52. package/dist/NavList/NavList.d.ts +4 -4
  53. package/dist/NavList/NavList.d.ts.map +1 -1
  54. package/dist/NavList/NavList.js +6 -7
  55. package/dist/Overlay/{Overlay-214d10dd.css → Overlay-95cfd3c7.css} +2 -2
  56. package/dist/Overlay/Overlay-95cfd3c7.css.map +1 -0
  57. package/dist/Overlay/Overlay.module.css.js +1 -1
  58. package/dist/PageLayout/PageLayout.d.ts +1 -0
  59. package/dist/PageLayout/PageLayout.d.ts.map +1 -1
  60. package/dist/PageLayout/PageLayout.js +1 -0
  61. package/dist/PageLayout/usePaneWidth.d.ts.map +1 -1
  62. package/dist/PageLayout/usePaneWidth.js +1 -3
  63. package/dist/RadioGroup/RadioGroup.d.ts +4 -3
  64. package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
  65. package/dist/RadioGroup/RadioGroup.js +1 -0
  66. package/dist/SegmentedControl/SegmentedControl.d.ts +3 -2
  67. package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
  68. package/dist/SegmentedControl/SegmentedControl.js +1 -0
  69. package/dist/ThemeProvider.d.ts +0 -6
  70. package/dist/ThemeProvider.d.ts.map +1 -1
  71. package/dist/ThemeProvider.js +21 -38
  72. package/dist/Timeline/Timeline-05decc91.css +2 -0
  73. package/dist/Timeline/Timeline-05decc91.css.map +1 -0
  74. package/dist/Timeline/Timeline.d.ts +0 -16
  75. package/dist/Timeline/Timeline.d.ts.map +1 -1
  76. package/dist/Timeline/Timeline.js +1 -85
  77. package/dist/Timeline/Timeline.module.css.js +2 -2
  78. package/dist/Timeline/index.d.ts +1 -1
  79. package/dist/Timeline/index.d.ts.map +1 -1
  80. package/dist/Tooltip/Tooltip.js +1 -1
  81. package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
  82. package/dist/TooltipV2/Tooltip.js +3 -3
  83. package/dist/TreeView/TreeView.js +4 -4
  84. package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
  85. package/dist/UnderlineNav/UnderlineNav.js +12 -9
  86. package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
  87. package/dist/experimental/UnderlinePanels/UnderlinePanels.js +58 -101
  88. package/dist/experimental/index.d.ts +1 -1
  89. package/dist/experimental/index.d.ts.map +1 -1
  90. package/dist/hooks/index.d.ts +0 -1
  91. package/dist/hooks/index.d.ts.map +1 -1
  92. package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
  93. package/dist/hooks/useAnchoredPosition.js +32 -8
  94. package/dist/hooks/useIsMacOS.js +32 -0
  95. package/dist/hooks/useMergedRefs.d.ts +1 -1
  96. package/dist/hooks/useMergedRefs.d.ts.map +1 -1
  97. package/dist/hooks/useMergedRefs.js +0 -13
  98. package/dist/hooks/useSlots.d.ts.map +1 -1
  99. package/dist/hooks/useSlots.js +0 -24
  100. package/dist/index.d.ts +2 -5
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/index.js +0 -3
  103. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +3 -3
  104. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
  105. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +4 -3
  106. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
  107. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -1
  108. package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
  109. package/dist/internal/components/TextInputWrapper-889df5d3.css +2 -0
  110. package/dist/internal/components/TextInputWrapper-889df5d3.css.map +1 -0
  111. package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
  112. package/dist/internal/components/TextInputWrapper.js +24 -33
  113. package/dist/internal/components/TextInputWrapper.module.css.js +1 -1
  114. package/dist/internal/hooks/useFocus.d.ts +1 -9
  115. package/dist/internal/hooks/useFocus.d.ts.map +1 -1
  116. package/dist/utils/environment.d.ts +1 -4
  117. package/dist/utils/environment.d.ts.map +1 -1
  118. package/dist/utils/environment.js +2 -17
  119. package/generated/components.json +8 -77
  120. package/package.json +4 -4
  121. package/dist/AnchoredOverlay/AnchoredOverlay-d483d670.css +0 -2
  122. package/dist/AnchoredOverlay/AnchoredOverlay-d483d670.css.map +0 -1
  123. package/dist/KeybindingHint/platform.d.ts +0 -22
  124. package/dist/KeybindingHint/platform.d.ts.map +0 -1
  125. package/dist/KeybindingHint/platform.js +0 -61
  126. package/dist/Overlay/Overlay-214d10dd.css.map +0 -1
  127. package/dist/Timeline/Timeline-0c88f21b.css +0 -2
  128. package/dist/Timeline/Timeline-0c88f21b.css.map +0 -1
  129. package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +0 -2
  130. package/dist/internal/components/TextInputWrapper-b2f7f9fa.css.map +0 -1
  131. package/dist/internal/hooks/useDevOnlyEffect.d.ts +0 -16
  132. package/dist/internal/hooks/useDevOnlyEffect.d.ts.map +0 -1
  133. package/dist/internal/hooks/useDevOnlyEffect.js +0 -25
  134. package/dist/utils/as-slot.d.ts +0 -20
  135. package/dist/utils/as-slot.d.ts.map +0 -1
  136. package/dist/utils/as-slot.js +0 -30
  137. package/dist/utils/testing/profiler.d.ts +0 -35
  138. package/dist/utils/testing/profiler.d.ts.map +0 -1
package/dist/Card/Card.js CHANGED
@@ -1,39 +1,43 @@
1
1
  import { c } from 'react-compiler-runtime';
2
2
  import { clsx } from 'clsx';
3
- import React, { forwardRef, useContext, createContext } from 'react';
3
+ import React, { forwardRef } from 'react';
4
4
  import classes from './Card.module.css.js';
5
- import { fixedForwardRef } from '../utils/modern-polymorphic.js';
6
- import { useId } from '../hooks/useId.js';
7
- import { jsx, jsxs } from 'react/jsx-runtime';
5
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
6
 
9
- const CardContext = /*#__PURE__*/createContext({});
10
- function CardComponent(props, ref) {
11
- const $ = c(67);
12
- const {
13
- children,
14
- className,
15
- padding: t0,
16
- borderRadius: t1,
17
- as: t2,
18
- ...rest
19
- } = props;
20
- const padding = t0 === undefined ? "normal" : t0;
21
- const borderRadius = t1 === undefined ? "large" : t1;
22
- const as = t2 === undefined ? "div" : t2;
23
- const Component = as;
24
- const generatedId = useId();
25
- const titleId = as === "section" ? generatedId : undefined;
26
- if (as === "section" && !("aria-label" in props) && !("aria-labelledby" in props)) {
27
- rest["aria-labelledby"] = titleId;
7
+ const CardImpl = /*#__PURE__*/forwardRef(function Card(t0, ref) {
8
+ const $ = c(53);
9
+ let children;
10
+ let className;
11
+ let rest;
12
+ let t1;
13
+ let t2;
14
+ if ($[0] !== t0) {
15
+ ({
16
+ children,
17
+ className,
18
+ padding: t1,
19
+ borderRadius: t2,
20
+ ...rest
21
+ } = t0);
22
+ $[0] = t0;
23
+ $[1] = children;
24
+ $[2] = className;
25
+ $[3] = rest;
26
+ $[4] = t1;
27
+ $[5] = t2;
28
+ } else {
29
+ children = $[1];
30
+ className = $[2];
31
+ rest = $[3];
32
+ t1 = $[4];
33
+ t2 = $[5];
28
34
  }
29
- let T0;
30
- let T1;
35
+ const padding = t1 === undefined ? "normal" : t1;
36
+ const borderRadius = t2 === undefined ? "large" : t2;
31
37
  let description;
32
38
  let heading;
33
39
  let menu;
34
40
  let metadata;
35
- let t10;
36
- let t11;
37
41
  let t3;
38
42
  let t4;
39
43
  let t5;
@@ -41,8 +45,8 @@ function CardComponent(props, ref) {
41
45
  let t7;
42
46
  let t8;
43
47
  let t9;
44
- if ($[0] !== Component || $[1] !== borderRadius || $[2] !== children || $[3] !== className || $[4] !== padding || $[5] !== ref || $[6] !== rest || $[7] !== titleId) {
45
- t11 = Symbol.for("react.early_return_sentinel");
48
+ if ($[6] !== borderRadius || $[7] !== children || $[8] !== className || $[9] !== padding || $[10] !== ref || $[11] !== rest) {
49
+ t9 = Symbol.for("react.early_return_sentinel");
46
50
  bb0: {
47
51
  let icon = null;
48
52
  let image = null;
@@ -70,7 +74,7 @@ function CardComponent(props, ref) {
70
74
  if (child.type === CardMetadata) {
71
75
  metadata = child;
72
76
  } else {
73
- if (child.type === CardAction) {
77
+ if (child.type === CardMenu) {
74
78
  menu = child;
75
79
  }
76
80
  }
@@ -80,111 +84,64 @@ function CardComponent(props, ref) {
80
84
  }
81
85
  }
82
86
  const hasSlotChildren = icon || image || heading || description || metadata || menu;
83
- const isEmpty = !hasSlotChildren && childArray.length === 0;
84
- if (isEmpty) {
85
- t11 = null;
86
- break bb0;
87
- }
88
87
  if (!hasSlotChildren) {
89
- let t12;
90
- if ($[23] !== titleId) {
91
- t12 = {
92
- titleId
93
- };
94
- $[23] = titleId;
95
- $[24] = t12;
88
+ let t10;
89
+ if ($[23] !== className) {
90
+ t10 = clsx(classes.Card, className);
91
+ $[23] = className;
92
+ $[24] = t10;
96
93
  } else {
97
- t12 = $[24];
94
+ t10 = $[24];
98
95
  }
99
- let t13;
100
- if ($[25] !== className) {
101
- t13 = clsx(classes.Card, className);
102
- $[25] = className;
103
- $[26] = t13;
104
- } else {
105
- t13 = $[26];
106
- }
107
- let t14;
108
- if ($[27] !== Component || $[28] !== borderRadius || $[29] !== children || $[30] !== padding || $[31] !== ref || $[32] !== rest || $[33] !== t13) {
109
- t14 = /*#__PURE__*/jsx(Component, {
96
+ let t11;
97
+ if ($[25] !== borderRadius || $[26] !== children || $[27] !== padding || $[28] !== ref || $[29] !== rest || $[30] !== t10) {
98
+ t11 = /*#__PURE__*/jsx("div", {
110
99
  ref: ref,
111
- className: t13,
112
- "data-component": "Card",
100
+ className: t10,
113
101
  "data-padding": padding,
114
102
  "data-border-radius": borderRadius,
115
103
  ...rest,
116
104
  children: children
117
105
  });
118
- $[27] = Component;
119
- $[28] = borderRadius;
120
- $[29] = children;
121
- $[30] = padding;
122
- $[31] = ref;
123
- $[32] = rest;
124
- $[33] = t13;
125
- $[34] = t14;
106
+ $[25] = borderRadius;
107
+ $[26] = children;
108
+ $[27] = padding;
109
+ $[28] = ref;
110
+ $[29] = rest;
111
+ $[30] = t10;
112
+ $[31] = t11;
126
113
  } else {
127
- t14 = $[34];
114
+ t11 = $[31];
128
115
  }
129
- let t15;
130
- if ($[35] !== t12 || $[36] !== t14) {
131
- t15 = /*#__PURE__*/jsx(CardContext.Provider, {
132
- value: t12,
133
- children: t14
134
- });
135
- $[35] = t12;
136
- $[36] = t14;
137
- $[37] = t15;
138
- } else {
139
- t15 = $[37];
140
- }
141
- t11 = t15;
116
+ t9 = t11;
142
117
  break bb0;
143
118
  }
144
- T1 = CardContext.Provider;
145
- if ($[38] !== titleId) {
146
- t10 = {
147
- titleId
148
- };
149
- $[38] = titleId;
150
- $[39] = t10;
151
- } else {
152
- t10 = $[39];
153
- }
154
- T0 = Component;
155
119
  t3 = ref;
156
- if ($[40] !== className) {
120
+ if ($[32] !== className) {
157
121
  t4 = clsx(classes.Card, className);
158
- $[40] = className;
159
- $[41] = t4;
122
+ $[32] = className;
123
+ $[33] = t4;
160
124
  } else {
161
- t4 = $[41];
125
+ t4 = $[33];
162
126
  }
163
- t5 = "Card";
164
- t6 = padding;
165
- t7 = borderRadius;
166
- t8 = rest;
167
- t9 = (image || icon) && /*#__PURE__*/jsx("div", {
127
+ t5 = padding;
128
+ t6 = borderRadius;
129
+ t7 = rest;
130
+ t8 = (image || icon) && /*#__PURE__*/jsx("div", {
168
131
  className: clsx(classes.CardHeader, image && classes.CardHeaderEdgeToEdge),
169
132
  children: image || icon
170
133
  });
171
134
  }
172
- $[0] = Component;
173
- $[1] = borderRadius;
174
- $[2] = children;
175
- $[3] = className;
176
- $[4] = padding;
177
- $[5] = ref;
178
- $[6] = rest;
179
- $[7] = titleId;
180
- $[8] = T0;
181
- $[9] = T1;
182
- $[10] = description;
183
- $[11] = heading;
184
- $[12] = menu;
185
- $[13] = metadata;
186
- $[14] = t10;
187
- $[15] = t11;
135
+ $[6] = borderRadius;
136
+ $[7] = children;
137
+ $[8] = className;
138
+ $[9] = padding;
139
+ $[10] = ref;
140
+ $[11] = rest;
141
+ $[12] = description;
142
+ $[13] = heading;
143
+ $[14] = menu;
144
+ $[15] = metadata;
188
145
  $[16] = t3;
189
146
  $[17] = t4;
190
147
  $[18] = t5;
@@ -193,14 +150,10 @@ function CardComponent(props, ref) {
193
150
  $[21] = t8;
194
151
  $[22] = t9;
195
152
  } else {
196
- T0 = $[8];
197
- T1 = $[9];
198
- description = $[10];
199
- heading = $[11];
200
- menu = $[12];
201
- metadata = $[13];
202
- t10 = $[14];
203
- t11 = $[15];
153
+ description = $[12];
154
+ heading = $[13];
155
+ menu = $[14];
156
+ metadata = $[15];
204
157
  t3 = $[16];
205
158
  t4 = $[17];
206
159
  t5 = $[18];
@@ -209,98 +162,80 @@ function CardComponent(props, ref) {
209
162
  t8 = $[21];
210
163
  t9 = $[22];
211
164
  }
212
- if (t11 !== Symbol.for("react.early_return_sentinel")) {
213
- return t11;
165
+ if (t9 !== Symbol.for("react.early_return_sentinel")) {
166
+ return t9;
214
167
  }
215
- let t12;
216
- if ($[42] !== description || $[43] !== heading) {
217
- t12 = /*#__PURE__*/jsxs("div", {
168
+ let t10;
169
+ if ($[34] !== description || $[35] !== heading) {
170
+ t10 = /*#__PURE__*/jsxs("div", {
218
171
  className: classes.CardContent,
219
172
  children: [heading, description]
220
173
  });
221
- $[42] = description;
222
- $[43] = heading;
223
- $[44] = t12;
174
+ $[34] = description;
175
+ $[35] = heading;
176
+ $[36] = t10;
224
177
  } else {
225
- t12 = $[44];
178
+ t10 = $[36];
226
179
  }
227
- let t13;
228
- if ($[45] !== metadata) {
229
- t13 = metadata ? /*#__PURE__*/jsx("div", {
180
+ let t11;
181
+ if ($[37] !== metadata) {
182
+ t11 = metadata ? /*#__PURE__*/jsx("div", {
230
183
  className: classes.CardMetadataContainer,
231
184
  children: metadata
232
185
  }) : null;
233
- $[45] = metadata;
234
- $[46] = t13;
186
+ $[37] = metadata;
187
+ $[38] = t11;
235
188
  } else {
236
- t13 = $[46];
189
+ t11 = $[38];
237
190
  }
238
- let t14;
239
- if ($[47] !== t12 || $[48] !== t13) {
240
- t14 = /*#__PURE__*/jsxs("div", {
191
+ let t12;
192
+ if ($[39] !== t10 || $[40] !== t11) {
193
+ t12 = /*#__PURE__*/jsxs("div", {
241
194
  className: classes.CardBody,
242
- children: [t12, t13]
195
+ children: [t10, t11]
243
196
  });
244
- $[47] = t12;
245
- $[48] = t13;
246
- $[49] = t14;
197
+ $[39] = t10;
198
+ $[40] = t11;
199
+ $[41] = t12;
247
200
  } else {
248
- t14 = $[49];
201
+ t12 = $[41];
249
202
  }
250
- let t15;
251
- if ($[50] !== menu) {
252
- t15 = menu ? /*#__PURE__*/jsx("div", {
253
- className: classes.CardAction,
203
+ let t13;
204
+ if ($[42] !== menu) {
205
+ t13 = menu ? /*#__PURE__*/jsx("div", {
206
+ className: classes.CardMenu,
254
207
  children: menu
255
208
  }) : null;
256
- $[50] = menu;
257
- $[51] = t15;
209
+ $[42] = menu;
210
+ $[43] = t13;
258
211
  } else {
259
- t15 = $[51];
212
+ t13 = $[43];
260
213
  }
261
- let t16;
262
- if ($[52] !== T0 || $[53] !== t14 || $[54] !== t15 || $[55] !== t3 || $[56] !== t4 || $[57] !== t5 || $[58] !== t6 || $[59] !== t7 || $[60] !== t8 || $[61] !== t9) {
263
- t16 = /*#__PURE__*/jsxs(T0, {
214
+ let t14;
215
+ if ($[44] !== t12 || $[45] !== t13 || $[46] !== t3 || $[47] !== t4 || $[48] !== t5 || $[49] !== t6 || $[50] !== t7 || $[51] !== t8) {
216
+ t14 = /*#__PURE__*/jsxs("div", {
264
217
  ref: t3,
265
218
  className: t4,
266
- "data-component": t5,
267
- "data-padding": t6,
268
- "data-border-radius": t7,
269
- ...t8,
270
- children: [t9, t14, t15]
219
+ "data-padding": t5,
220
+ "data-border-radius": t6,
221
+ ...t7,
222
+ children: [t8, t12, t13]
271
223
  });
272
- $[52] = T0;
273
- $[53] = t14;
274
- $[54] = t15;
275
- $[55] = t3;
276
- $[56] = t4;
277
- $[57] = t5;
278
- $[58] = t6;
279
- $[59] = t7;
280
- $[60] = t8;
281
- $[61] = t9;
282
- $[62] = t16;
283
- } else {
284
- t16 = $[62];
285
- }
286
- let t17;
287
- if ($[63] !== T1 || $[64] !== t10 || $[65] !== t16) {
288
- t17 = /*#__PURE__*/jsx(T1, {
289
- value: t10,
290
- children: t16
291
- });
292
- $[63] = T1;
293
- $[64] = t10;
294
- $[65] = t16;
295
- $[66] = t17;
224
+ $[44] = t12;
225
+ $[45] = t13;
226
+ $[46] = t3;
227
+ $[47] = t4;
228
+ $[48] = t5;
229
+ $[49] = t6;
230
+ $[50] = t7;
231
+ $[51] = t8;
232
+ $[52] = t14;
296
233
  } else {
297
- t17 = $[66];
234
+ t14 = $[52];
298
235
  }
299
- return t17;
300
- }
301
- CardComponent.displayName = 'Card';
302
- const CardImpl = fixedForwardRef(CardComponent);
303
- function CardIcon(t0) {
236
+ return t14;
237
+ });
238
+ const CardIcon = t0 => {
304
239
  const $ = c(10);
305
240
  const {
306
241
  icon: IconComponent,
@@ -329,7 +264,6 @@ function CardIcon(t0) {
329
264
  if ($[4] !== ariaLabel || $[5] !== t1 || $[6] !== t2 || $[7] !== t3 || $[8] !== t4) {
330
265
  t5 = /*#__PURE__*/jsx("span", {
331
266
  className: t1,
332
- "data-component": "Card.Icon",
333
267
  role: t2,
334
268
  "aria-label": ariaLabel,
335
269
  "aria-hidden": t3,
@@ -345,9 +279,9 @@ function CardIcon(t0) {
345
279
  t5 = $[9];
346
280
  }
347
281
  return t5;
348
- }
282
+ };
349
283
  CardIcon.displayName = 'Card.Icon';
350
- function CardImage(t0) {
284
+ const CardImage = t0 => {
351
285
  const $ = c(12);
352
286
  let className;
353
287
  let rest;
@@ -383,11 +317,10 @@ function CardImage(t0) {
383
317
  let t3;
384
318
  if ($[7] !== alt || $[8] !== rest || $[9] !== src || $[10] !== t2) {
385
319
  t3 = /*#__PURE__*/jsx("img", {
386
- ...rest,
387
320
  src: src,
388
321
  alt: alt,
389
322
  className: t2,
390
- "data-component": "Card.Image"
323
+ ...rest
391
324
  });
392
325
  $[7] = alt;
393
326
  $[8] = rest;
@@ -398,21 +331,12 @@ function CardImage(t0) {
398
331
  t3 = $[11];
399
332
  }
400
333
  return t3;
401
- }
334
+ };
402
335
  CardImage.displayName = 'Card.Image';
403
-
404
- /**
405
- * Heading shown at the top of a Card.
406
- *
407
- * When the parent Card uses `as="section"`, the heading's `id` is
408
- * automatically wired to the section's `aria-labelledby`.
409
- */
410
336
  const CardHeading = /*#__PURE__*/forwardRef(function CardHeading(t0, ref) {
411
- var _id;
412
- const $ = c(15);
337
+ const $ = c(13);
413
338
  let children;
414
339
  let className;
415
- let id;
416
340
  let rest;
417
341
  let t1;
418
342
  if ($[0] !== t0) {
@@ -420,58 +344,47 @@ const CardHeading = /*#__PURE__*/forwardRef(function CardHeading(t0, ref) {
420
344
  as: t1,
421
345
  children,
422
346
  className,
423
- id,
424
347
  ...rest
425
348
  } = t0);
426
349
  $[0] = t0;
427
350
  $[1] = children;
428
351
  $[2] = className;
429
- $[3] = id;
430
- $[4] = rest;
431
- $[5] = t1;
352
+ $[3] = rest;
353
+ $[4] = t1;
432
354
  } else {
433
355
  children = $[1];
434
356
  className = $[2];
435
- id = $[3];
436
- rest = $[4];
437
- t1 = $[5];
357
+ rest = $[3];
358
+ t1 = $[4];
438
359
  }
439
360
  const Component = t1 === undefined ? "h3" : t1;
440
- const {
441
- titleId
442
- } = useContext(CardContext);
443
- const t2 = (_id = id) !== null && _id !== void 0 ? _id : titleId;
444
- let t3;
445
- if ($[6] !== className) {
446
- t3 = clsx(classes.CardHeading, className);
447
- $[6] = className;
448
- $[7] = t3;
361
+ let t2;
362
+ if ($[5] !== className) {
363
+ t2 = clsx(classes.CardHeading, className);
364
+ $[5] = className;
365
+ $[6] = t2;
449
366
  } else {
450
- t3 = $[7];
367
+ t2 = $[6];
451
368
  }
452
- let t4;
453
- if ($[8] !== Component || $[9] !== children || $[10] !== ref || $[11] !== rest || $[12] !== t2 || $[13] !== t3) {
454
- t4 = /*#__PURE__*/jsx(Component, {
455
- ...rest,
369
+ let t3;
370
+ if ($[7] !== Component || $[8] !== children || $[9] !== ref || $[10] !== rest || $[11] !== t2) {
371
+ t3 = /*#__PURE__*/jsx(Component, {
456
372
  ref: ref,
457
- id: t2,
458
- className: t3,
459
- "data-component": "Card.Heading",
373
+ className: t2,
374
+ ...rest,
460
375
  children: children
461
376
  });
462
- $[8] = Component;
463
- $[9] = children;
464
- $[10] = ref;
465
- $[11] = rest;
466
- $[12] = t2;
467
- $[13] = t3;
468
- $[14] = t4;
377
+ $[7] = Component;
378
+ $[8] = children;
379
+ $[9] = ref;
380
+ $[10] = rest;
381
+ $[11] = t2;
382
+ $[12] = t3;
469
383
  } else {
470
- t4 = $[14];
384
+ t3 = $[12];
471
385
  }
472
- return t4;
386
+ return t3;
473
387
  });
474
- CardHeading.displayName = 'Card.Heading';
475
388
  const CardDescription = /*#__PURE__*/forwardRef(function CardDescription(t0, ref) {
476
389
  const $ = c(11);
477
390
  let children;
@@ -503,10 +416,9 @@ const CardDescription = /*#__PURE__*/forwardRef(function CardDescription(t0, ref
503
416
  let t2;
504
417
  if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== t1) {
505
418
  t2 = /*#__PURE__*/jsx("p", {
506
- ...rest,
507
419
  ref: ref,
508
420
  className: t1,
509
- "data-component": "Card.Description",
421
+ ...rest,
510
422
  children: children
511
423
  });
512
424
  $[6] = children;
@@ -519,24 +431,14 @@ const CardDescription = /*#__PURE__*/forwardRef(function CardDescription(t0, ref
519
431
  }
520
432
  return t2;
521
433
  });
522
- CardDescription.displayName = 'Card.Description';
523
-
524
- /**
525
- * Top-right slot for a single interactive control.
526
- *
527
- * Give the control a label that names the card (e.g. `"More options for
528
- * Project Alpha"`, not just `"More options"`) so users can tell which card
529
- * the action applies to when several cards are visible.
530
- */
531
- function CardAction(t0) {
434
+ const CardMenu = t0 => {
532
435
  const $ = c(2);
533
436
  const {
534
437
  children
535
438
  } = t0;
536
439
  let t1;
537
440
  if ($[0] !== children) {
538
- t1 = /*#__PURE__*/jsx("div", {
539
- "data-component": "Card.Action",
441
+ t1 = /*#__PURE__*/jsx(Fragment, {
540
442
  children: children
541
443
  });
542
444
  $[0] = children;
@@ -545,8 +447,8 @@ function CardAction(t0) {
545
447
  t1 = $[1];
546
448
  }
547
449
  return t1;
548
- }
549
- CardAction.displayName = 'Card.Action';
450
+ };
451
+ CardMenu.displayName = 'Card.Menu';
550
452
  const CardMetadata = /*#__PURE__*/forwardRef(function CardMetadata(t0, ref) {
551
453
  const $ = c(11);
552
454
  let children;
@@ -578,10 +480,9 @@ const CardMetadata = /*#__PURE__*/forwardRef(function CardMetadata(t0, ref) {
578
480
  let t2;
579
481
  if ($[6] !== children || $[7] !== ref || $[8] !== rest || $[9] !== t1) {
580
482
  t2 = /*#__PURE__*/jsx("div", {
581
- ...rest,
582
483
  ref: ref,
583
484
  className: t1,
584
- "data-component": "Card.Metadata",
485
+ ...rest,
585
486
  children: children
586
487
  });
587
488
  $[6] = children;
@@ -594,6 +495,5 @@ const CardMetadata = /*#__PURE__*/forwardRef(function CardMetadata(t0, ref) {
594
495
  }
595
496
  return t2;
596
497
  });
597
- CardMetadata.displayName = 'Card.Metadata';
598
498
 
599
- export { CardAction, CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMetadata };
499
+ export { CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMenu, CardMetadata };
@@ -1,5 +1,5 @@
1
- import './Card-d8a02dd9.css';
1
+ import './Card-cec366f8.css';
2
2
 
3
- var classes = {"Card":"prc-Card-Card-pYjuL","CardHeader":"prc-Card-CardHeader-P5Qbb","CardHeaderEdgeToEdge":"prc-Card-CardHeaderEdgeToEdge-3yCqT","CardImage":"prc-Card-CardImage-2M8DM","CardIcon":"prc-Card-CardIcon-mIMfj","CardBody":"prc-Card-CardBody-W1o-l","CardContent":"prc-Card-CardContent-omZDS","CardHeading":"prc-Card-CardHeading-3HXyS","CardDescription":"prc-Card-CardDescription-MnJ3F","CardMetadataContainer":"prc-Card-CardMetadataContainer-K-UlH","CardMetadataItem":"prc-Card-CardMetadataItem-ellY9","CardAction":"prc-Card-CardAction-VtI49"};
3
+ var classes = {"Card":"prc-Card-Card-pYjuL","CardHeader":"prc-Card-CardHeader-P5Qbb","CardHeaderEdgeToEdge":"prc-Card-CardHeaderEdgeToEdge-3yCqT","CardImage":"prc-Card-CardImage-2M8DM","CardIcon":"prc-Card-CardIcon-mIMfj","CardBody":"prc-Card-CardBody-W1o-l","CardContent":"prc-Card-CardContent-omZDS","CardHeading":"prc-Card-CardHeading-3HXyS","CardDescription":"prc-Card-CardDescription-MnJ3F","CardMetadataContainer":"prc-Card-CardMetadataContainer-K-UlH","CardMetadataItem":"prc-Card-CardMetadataItem-ellY9","CardMenu":"prc-Card-CardMenu-1b3uS"};
4
4
 
5
5
  export { classes as default };
@@ -1,20 +1,17 @@
1
- import { CardIcon, CardImage, CardAction } from './Card';
2
- import type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardActionProps, CardMetadataProps } from './Card';
3
- declare const Card: (<As extends "div" | "section">(props: (import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
1
+ import type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardMenuProps, CardMetadataProps } from './Card';
2
+ declare const Card: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
4
3
  className?: string;
5
4
  padding?: "none" | "condensed" | "normal";
6
5
  borderRadius?: "medium" | "large";
7
- children: React.ReactNode;
8
- } extends infer T ? T extends import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "div" : As> & {
9
- className?: string;
10
- padding?: "none" | "condensed" | "normal";
11
- borderRadius?: "medium" | "large";
12
- children: React.ReactNode;
13
- } ? T extends unknown ? Omit<T, "as"> : never : never : never) & {
14
- as?: As | undefined;
15
- } & import("react").RefAttributes<any>) => React.ReactNode) & {
16
- Icon: typeof CardIcon;
17
- Image: typeof CardImage;
6
+ } & import("react").RefAttributes<HTMLDivElement>> & {
7
+ Icon: {
8
+ ({ icon: IconComponent, "aria-label": ariaLabel, className }: CardIconProps): import("react").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ Image: {
12
+ ({ src, alt, className, ...rest }: CardImageProps): import("react").JSX.Element;
13
+ displayName: string;
14
+ };
18
15
  Heading: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & {
19
16
  as?: "h2" | "h3" | "h4" | "h5" | "h6";
20
17
  children: React.ReactNode;
@@ -22,11 +19,14 @@ declare const Card: (<As extends "div" | "section">(props: (import("react").Comp
22
19
  Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
23
20
  children: React.ReactNode;
24
21
  } & import("react").RefAttributes<HTMLParagraphElement>>;
25
- Action: typeof CardAction;
22
+ Menu: {
23
+ ({ children }: CardMenuProps): import("react").JSX.Element;
24
+ displayName: string;
25
+ };
26
26
  Metadata: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
27
27
  children: React.ReactNode;
28
28
  } & import("react").RefAttributes<HTMLDivElement>>;
29
29
  };
30
30
  export { Card };
31
- export type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardActionProps, CardMetadataProps, };
31
+ export type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardMenuProps, CardMetadataProps, };
32
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,QAAQ,EAAE,SAAS,EAAgC,UAAU,EAAe,MAAM,QAAQ,CAAA;AAC5G,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAClB,MAAM,QAAQ,CAAA;AAEf,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA;AACb,YAAY,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EACf,iBAAiB,GAClB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Card/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EAClB,MAAM,QAAQ,CAAA;AAEf,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOR,CAAA;AAEF,OAAO,EAAC,IAAI,EAAC,CAAA;AACb,YAAY,EACV,SAAS,EACT,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,GAClB,CAAA"}