@primer/react 38.37.1-rc.c2576f920 → 38.37.1-rc.f8f4193e4
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/dist/ActionList/Group.js
CHANGED
|
@@ -247,7 +247,7 @@ const GroupHeadingImpl = (t0) => {
|
|
|
247
247
|
const [slots, childrenWithoutSlots] = useSlots(children, t3);
|
|
248
248
|
const trailingAction = trailingActionEnabled ? slots.trailingAction : null;
|
|
249
249
|
const headingChildren = trailingActionEnabled ? childrenWithoutSlots : children;
|
|
250
|
-
if (trailingAction) listRole
|
|
250
|
+
if (trailingAction) !(listRole === void 0 || listRole === "list") && invariant(false, `ActionList.GroupHeading.TrailingAction can not be used inside an ActionList with an ARIA role of "${listRole}". Trailing actions on group headings are only supported in lists with the default "list" role.`);
|
|
251
251
|
const missingAsForList = (listRole === void 0 || listRole === "list") && children !== void 0 && as === void 0;
|
|
252
252
|
const unnecessaryAsForListboxOrMenu = listRole !== void 0 && listRole !== "list" && children !== void 0 && as !== void 0;
|
|
253
253
|
missingAsForList && invariant(false, "You are setting a heading for a list, that requires a heading level. Please use 'as' prop to set a proper heading level.");
|
|
@@ -41,7 +41,7 @@ const Heading = /*#__PURE__*/ forwardRef((t0, forwardedRef) => {
|
|
|
41
41
|
const mergedRef = useMergedRefs(forwardedRef, innerRef);
|
|
42
42
|
const { headingId, variant: listVariant } = React.useContext(ListContext);
|
|
43
43
|
const { container } = React.useContext(ActionListContainerContext);
|
|
44
|
-
container
|
|
44
|
+
!(container !== "ActionMenu") && invariant(false, "ActionList.Heading shouldn't be used within an ActionMenu container. Menus are labelled by the menu button's name.");
|
|
45
45
|
const t2 = (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : headingId;
|
|
46
46
|
let t3;
|
|
47
47
|
if ($[7] !== className || $[8] !== visuallyHidden) {
|
|
@@ -374,7 +374,7 @@ SecondaryLink.displayName = "SecondaryLink";
|
|
|
374
374
|
const SecondaryCheckbox = ({ id, children, className, ...props }) => {
|
|
375
375
|
const checkboxId = useId$1(id);
|
|
376
376
|
const { selectionVariant } = React.useContext(SelectPanelContext);
|
|
377
|
-
selectionVariant
|
|
377
|
+
!(selectionVariant !== "instant") && invariant(false, "Sorry! SelectPanel.SecondaryAction with variant=\"checkbox\" is not allowed inside selectionVariant=\"instant\"");
|
|
378
378
|
return /*#__PURE__*/ jsxs("div", {
|
|
379
379
|
className: SelectPanel_module_css_default.SecondaryCheckbox,
|
|
380
380
|
children: [/*#__PURE__*/ jsx(Checkbox, {
|
|
@@ -121,13 +121,13 @@ const UnderlinePanels = ({ "aria-label": ariaLabel, "aria-labelledby": ariaLabel
|
|
|
121
121
|
return ariaSelected === true || ariaSelected === "true";
|
|
122
122
|
});
|
|
123
123
|
!(selectedTabs.length <= 1) && invariant(false, "Only one tab can be selected at a time.");
|
|
124
|
-
tabs.length
|
|
124
|
+
!(tabs.length === tabPanels.length) && invariant(false, `The number of tabs and panels must be equal. Counted ${tabs.length} tabs and ${tabPanels.length} panels.`);
|
|
125
125
|
const duplicateTabValue = tabValues.find((value, index) => tabValues.indexOf(value) !== index);
|
|
126
|
-
duplicateTabValue
|
|
126
|
+
!(duplicateTabValue === void 0) && invariant(false, `Every tab must have a unique \`value\`. Found duplicate "${duplicateTabValue}".`);
|
|
127
127
|
const duplicatePanelValue = panelValues.find((value, index) => panelValues.indexOf(value) !== index);
|
|
128
|
-
duplicatePanelValue
|
|
128
|
+
!(duplicatePanelValue === void 0) && invariant(false, `Every panel must have a unique \`value\`. Found duplicate "${duplicatePanelValue}".`);
|
|
129
129
|
const unmatchedTabValue = tabValues.find((value) => !panelValues.includes(value));
|
|
130
|
-
unmatchedTabValue
|
|
130
|
+
!(unmatchedTabValue === void 0) && invariant(false, `Tab with \`value\` "${unmatchedTabValue}" has no matching panel. Give a \`UnderlinePanels.Panel\` the same \`value\`.`);
|
|
131
131
|
warning(isControlled && selectedTabs.length > 0, "UnderlinePanels: do not combine the controlled `value` prop with `aria-selected` on a tab. `value` takes precedence; use `value`/`onChange` (or `defaultValue`) to drive selection.");
|
|
132
132
|
warning(controlledValue !== void 0 && defaultValue !== void 0, "UnderlinePanels: do not combine the controlled `value` prop with `defaultValue`. `value` takes precedence; use one or the other.");
|
|
133
133
|
const providedValue = controlledValue !== null && controlledValue !== void 0 ? controlledValue : defaultValue;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@primer/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "38.37.1-rc.
|
|
4
|
+
"version": "38.37.1-rc.f8f4193e4",
|
|
5
5
|
"description": "An implementation of GitHub's Primer Design System using React",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"react-is": "18.3.1",
|
|
167
167
|
"recast": "0.23.7",
|
|
168
168
|
"rimraf": "5.0.5",
|
|
169
|
-
"rolldown": "^1.2.
|
|
169
|
+
"rolldown": "^1.2.3",
|
|
170
170
|
"rolldown-plugin-dts": "^0.26.0",
|
|
171
171
|
"rolldown-plugin-import-css": "^0.0.0",
|
|
172
172
|
"rolldown-plugin-preserve-directives": "^0.0.0",
|