@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.
- package/CHANGELOG.md +1 -75
- package/dist/ActionList/index.d.ts +6 -6
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +1 -0
- package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css +2 -0
- package/dist/AnchoredOverlay/AnchoredOverlay-ec9e15fc.css.map +1 -0
- package/dist/AnchoredOverlay/AnchoredOverlay.d.ts.map +1 -1
- package/dist/AnchoredOverlay/AnchoredOverlay.js +5 -8
- package/dist/AnchoredOverlay/AnchoredOverlay.module.css.js +1 -1
- package/dist/Banner/Banner.d.ts.map +1 -1
- package/dist/Banner/Banner.js +20 -17
- package/dist/Button/{ButtonBase-311501b9.css → ButtonBase-713ecf3d.css} +2 -2
- package/dist/Button/{ButtonBase-311501b9.css.map → ButtonBase-713ecf3d.css.map} +1 -1
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +0 -1
- package/dist/Button/ButtonBase.module.css.js +1 -1
- package/dist/Card/{Card-d8a02dd9.css → Card-cec366f8.css} +2 -2
- package/dist/Card/{Card-d8a02dd9.css.map → Card-cec366f8.css.map} +1 -1
- package/dist/Card/Card.d.ts +39 -75
- package/dist/Card/Card.d.ts.map +1 -1
- package/dist/Card/Card.js +160 -260
- package/dist/Card/Card.module.css.js +2 -2
- package/dist/Card/index.d.ts +16 -16
- package/dist/Card/index.d.ts.map +1 -1
- package/dist/Card/index.js +2 -2
- package/dist/CheckboxGroup/CheckboxGroup.js +1 -0
- package/dist/DataTable/index.d.ts.map +1 -1
- package/dist/DataTable/index.js +1 -0
- package/dist/Dialog/Dialog.d.ts +1 -0
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +1 -0
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +0 -4
- package/dist/FormControl/FormControl.d.ts +3 -3
- package/dist/Heading/Heading.d.ts.map +1 -1
- package/dist/Heading/Heading.js +16 -8
- package/dist/KeybindingHint/KeybindingHint.d.ts +1 -6
- package/dist/KeybindingHint/KeybindingHint.d.ts.map +1 -1
- package/dist/KeybindingHint/KeybindingHint.js +2 -6
- package/dist/KeybindingHint/components/Chord.d.ts +1 -2
- package/dist/KeybindingHint/components/Chord.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord.js +1 -1
- package/dist/KeybindingHint/components/Key.js +10 -10
- package/dist/KeybindingHint/components/Sequence.d.ts +1 -2
- package/dist/KeybindingHint/components/Sequence.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Sequence.js +2 -2
- package/dist/KeybindingHint/key-names.d.ts +3 -4
- package/dist/KeybindingHint/key-names.d.ts.map +1 -1
- package/dist/KeybindingHint/key-names.js +14 -15
- package/dist/Link/Link.d.ts.map +1 -1
- package/dist/Link/Link.js +16 -8
- package/dist/NavList/NavList.d.ts +4 -4
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +6 -7
- package/dist/Overlay/{Overlay-214d10dd.css → Overlay-95cfd3c7.css} +2 -2
- package/dist/Overlay/Overlay-95cfd3c7.css.map +1 -0
- package/dist/Overlay/Overlay.module.css.js +1 -1
- package/dist/PageLayout/PageLayout.d.ts +1 -0
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +1 -0
- package/dist/PageLayout/usePaneWidth.d.ts.map +1 -1
- package/dist/PageLayout/usePaneWidth.js +1 -3
- package/dist/RadioGroup/RadioGroup.d.ts +4 -3
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +3 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +1 -0
- package/dist/ThemeProvider.d.ts +0 -6
- package/dist/ThemeProvider.d.ts.map +1 -1
- package/dist/ThemeProvider.js +21 -38
- package/dist/Timeline/Timeline-05decc91.css +2 -0
- package/dist/Timeline/Timeline-05decc91.css.map +1 -0
- package/dist/Timeline/Timeline.d.ts +0 -16
- package/dist/Timeline/Timeline.d.ts.map +1 -1
- package/dist/Timeline/Timeline.js +1 -85
- package/dist/Timeline/Timeline.module.css.js +2 -2
- package/dist/Timeline/index.d.ts +1 -1
- package/dist/Timeline/index.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +1 -1
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +3 -3
- package/dist/TreeView/TreeView.js +4 -4
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +12 -9
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +58 -101
- package/dist/experimental/index.d.ts +1 -1
- package/dist/experimental/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +0 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useAnchoredPosition.d.ts.map +1 -1
- package/dist/hooks/useAnchoredPosition.js +32 -8
- package/dist/hooks/useIsMacOS.js +32 -0
- package/dist/hooks/useMergedRefs.d.ts +1 -1
- package/dist/hooks/useMergedRefs.d.ts.map +1 -1
- package/dist/hooks/useMergedRefs.js +0 -13
- package/dist/hooks/useSlots.d.ts.map +1 -1
- package/dist/hooks/useSlots.js +0 -24
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +4 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +1 -1
- package/dist/internal/components/TextInputWrapper-889df5d3.css +2 -0
- package/dist/internal/components/TextInputWrapper-889df5d3.css.map +1 -0
- package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper.js +24 -33
- package/dist/internal/components/TextInputWrapper.module.css.js +1 -1
- package/dist/internal/hooks/useFocus.d.ts +1 -9
- package/dist/internal/hooks/useFocus.d.ts.map +1 -1
- package/dist/utils/environment.d.ts +1 -4
- package/dist/utils/environment.d.ts.map +1 -1
- package/dist/utils/environment.js +2 -17
- package/generated/components.json +8 -77
- package/package.json +4 -4
- package/dist/AnchoredOverlay/AnchoredOverlay-d483d670.css +0 -2
- package/dist/AnchoredOverlay/AnchoredOverlay-d483d670.css.map +0 -1
- package/dist/KeybindingHint/platform.d.ts +0 -22
- package/dist/KeybindingHint/platform.d.ts.map +0 -1
- package/dist/KeybindingHint/platform.js +0 -61
- package/dist/Overlay/Overlay-214d10dd.css.map +0 -1
- package/dist/Timeline/Timeline-0c88f21b.css +0 -2
- package/dist/Timeline/Timeline-0c88f21b.css.map +0 -1
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css +0 -2
- package/dist/internal/components/TextInputWrapper-b2f7f9fa.css.map +0 -1
- package/dist/internal/hooks/useDevOnlyEffect.d.ts +0 -16
- package/dist/internal/hooks/useDevOnlyEffect.d.ts.map +0 -1
- package/dist/internal/hooks/useDevOnlyEffect.js +0 -25
- package/dist/utils/as-slot.d.ts +0 -20
- package/dist/utils/as-slot.d.ts.map +0 -1
- package/dist/utils/as-slot.js +0 -30
- package/dist/utils/testing/profiler.d.ts +0 -35
- 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
|
|
3
|
+
import React, { forwardRef } from 'react';
|
|
4
4
|
import classes from './Card.module.css.js';
|
|
5
|
-
import {
|
|
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
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
30
|
-
|
|
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 ($[
|
|
45
|
-
|
|
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 ===
|
|
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
|
|
90
|
-
if ($[23] !==
|
|
91
|
-
|
|
92
|
-
|
|
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
|
-
|
|
94
|
+
t10 = $[24];
|
|
98
95
|
}
|
|
99
|
-
let
|
|
100
|
-
if ($[25] !==
|
|
101
|
-
|
|
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:
|
|
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
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
$[
|
|
122
|
-
$[
|
|
123
|
-
$[
|
|
124
|
-
$[
|
|
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
|
-
|
|
114
|
+
t11 = $[31];
|
|
128
115
|
}
|
|
129
|
-
|
|
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 ($[
|
|
120
|
+
if ($[32] !== className) {
|
|
157
121
|
t4 = clsx(classes.Card, className);
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
122
|
+
$[32] = className;
|
|
123
|
+
$[33] = t4;
|
|
160
124
|
} else {
|
|
161
|
-
t4 = $[
|
|
125
|
+
t4 = $[33];
|
|
162
126
|
}
|
|
163
|
-
t5 =
|
|
164
|
-
t6 =
|
|
165
|
-
t7 =
|
|
166
|
-
t8 =
|
|
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
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
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
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
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 (
|
|
213
|
-
return
|
|
165
|
+
if (t9 !== Symbol.for("react.early_return_sentinel")) {
|
|
166
|
+
return t9;
|
|
214
167
|
}
|
|
215
|
-
let
|
|
216
|
-
if ($[
|
|
217
|
-
|
|
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
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
174
|
+
$[34] = description;
|
|
175
|
+
$[35] = heading;
|
|
176
|
+
$[36] = t10;
|
|
224
177
|
} else {
|
|
225
|
-
|
|
178
|
+
t10 = $[36];
|
|
226
179
|
}
|
|
227
|
-
let
|
|
228
|
-
if ($[
|
|
229
|
-
|
|
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
|
-
$[
|
|
234
|
-
$[
|
|
186
|
+
$[37] = metadata;
|
|
187
|
+
$[38] = t11;
|
|
235
188
|
} else {
|
|
236
|
-
|
|
189
|
+
t11 = $[38];
|
|
237
190
|
}
|
|
238
|
-
let
|
|
239
|
-
if ($[
|
|
240
|
-
|
|
191
|
+
let t12;
|
|
192
|
+
if ($[39] !== t10 || $[40] !== t11) {
|
|
193
|
+
t12 = /*#__PURE__*/jsxs("div", {
|
|
241
194
|
className: classes.CardBody,
|
|
242
|
-
children: [
|
|
195
|
+
children: [t10, t11]
|
|
243
196
|
});
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
$[
|
|
197
|
+
$[39] = t10;
|
|
198
|
+
$[40] = t11;
|
|
199
|
+
$[41] = t12;
|
|
247
200
|
} else {
|
|
248
|
-
|
|
201
|
+
t12 = $[41];
|
|
249
202
|
}
|
|
250
|
-
let
|
|
251
|
-
if ($[
|
|
252
|
-
|
|
253
|
-
className: classes.
|
|
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
|
-
$[
|
|
257
|
-
$[
|
|
209
|
+
$[42] = menu;
|
|
210
|
+
$[43] = t13;
|
|
258
211
|
} else {
|
|
259
|
-
|
|
212
|
+
t13 = $[43];
|
|
260
213
|
}
|
|
261
|
-
let
|
|
262
|
-
if ($[
|
|
263
|
-
|
|
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-
|
|
267
|
-
"data-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
children: [t9, t14, t15]
|
|
219
|
+
"data-padding": t5,
|
|
220
|
+
"data-border-radius": t6,
|
|
221
|
+
...t7,
|
|
222
|
+
children: [t8, t12, t13]
|
|
271
223
|
});
|
|
272
|
-
$[
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
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
|
-
|
|
234
|
+
t14 = $[52];
|
|
298
235
|
}
|
|
299
|
-
return
|
|
300
|
-
}
|
|
301
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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] =
|
|
430
|
-
$[4] =
|
|
431
|
-
$[5] = t1;
|
|
352
|
+
$[3] = rest;
|
|
353
|
+
$[4] = t1;
|
|
432
354
|
} else {
|
|
433
355
|
children = $[1];
|
|
434
356
|
className = $[2];
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
t1 = $[5];
|
|
357
|
+
rest = $[3];
|
|
358
|
+
t1 = $[4];
|
|
438
359
|
}
|
|
439
360
|
const Component = t1 === undefined ? "h3" : t1;
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
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
|
-
|
|
367
|
+
t2 = $[6];
|
|
451
368
|
}
|
|
452
|
-
let
|
|
453
|
-
if ($[
|
|
454
|
-
|
|
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
|
-
|
|
458
|
-
|
|
459
|
-
"data-component": "Card.Heading",
|
|
373
|
+
className: t2,
|
|
374
|
+
...rest,
|
|
460
375
|
children: children
|
|
461
376
|
});
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
$[
|
|
465
|
-
$[
|
|
466
|
-
$[
|
|
467
|
-
$[
|
|
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
|
-
|
|
384
|
+
t3 = $[12];
|
|
471
385
|
}
|
|
472
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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 {
|
|
499
|
+
export { CardDescription, CardHeading, CardIcon, CardImage, CardImpl, CardMenu, CardMetadata };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './Card-
|
|
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","
|
|
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 };
|
package/dist/Card/index.d.ts
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
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
|
-
|
|
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,
|
|
31
|
+
export type { CardProps, CardIconProps, CardImageProps, CardHeadingProps, CardDescriptionProps, CardMenuProps, CardMetadataProps, };
|
|
32
32
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/Card/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Card/index.ts"],"names":[],"mappings":"
|
|
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"}
|