@@ -153,6 +153,7 @@ if (__DEV__) {
153153 enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
154154 useModernStrictMode = dynamicFeatureFlags.useModernStrictMode,
155155 enableRefAsProp = dynamicFeatureFlags.enableRefAsProp,
156+ enableNewBooleanProps = dynamicFeatureFlags.enableNewBooleanProps,
156157 enableClientRenderFallbackOnTextMismatch =
157158 dynamicFeatureFlags.enableClientRenderFallbackOnTextMismatch; // On WWW, false is used for a new modern build.
158159 var enableProfilerTimer = true;
@@ -6714,6 +6715,10 @@ if (__DEV__) {
67146715 zoomandpan: "zoomAndPan"
67156716 };
67166717
6718+ if (enableNewBooleanProps) {
6719+ possibleStandardNames.inert = "inert";
6720+ }
6721+
67176722 var ariaProperties = {
67186723 "aria-current": 0,
67196724 // state
@@ -7155,7 +7160,12 @@ if (__DEV__) {
71557160 }
71567161 // fallthrough
71577162
7158- case "inert":
7163+ case "inert": {
7164+ if (enableNewBooleanProps) {
7165+ // Boolean properties can accept boolean values
7166+ return true;
7167+ }
7168+ }
71597169 // fallthrough for new boolean props without the flag on
71607170
71617171 default: {
@@ -7239,7 +7249,11 @@ if (__DEV__) {
72397249 break;
72407250 }
72417251
7242- case "inert":
7252+ case "inert": {
7253+ if (enableNewBooleanProps) {
7254+ break;
7255+ }
7256+ }
72437257 // fallthrough for new boolean props without the flag on
72447258
72457259 default: {
@@ -35771,7 +35785,7 @@ if (__DEV__) {
3577135785 return root;
3577235786 }
3577335787
35774- var ReactVersion = "18.3.0-www-classic-f22d5b27 ";
35788+ var ReactVersion = "18.3.0-www-classic-4a0167db ";
3577535789
3577635790 function createPortal$1(
3577735791 children,
@@ -40278,9 +40292,11 @@ if (__DEV__) {
4027840292 var didWarnFormActionName = false;
4027940293 var didWarnFormActionTarget = false;
4028040294 var didWarnFormActionMethod = false;
40295+ var didWarnForNewBooleanPropsWithEmptyValue;
4028140296 var canDiffStyleForHydrationWarning;
4028240297
4028340298 {
40299+ didWarnForNewBooleanPropsWithEmptyValue = {}; // IE 11 parses & normalizes the style attribute as opposed to other
4028440300 // browsers. It adds spaces and sorts the properties in some
4028540301 // non-alphabetical order. Handling that would require sorting CSS
4028640302 // properties in the client & server versions or applying
@@ -40951,10 +40967,28 @@ if (__DEV__) {
4095140967 }
4095240968 // Boolean
4095340969
40954- case "inert": {
40955- setValueForAttribute(domElement, key, value);
40956- break;
40957- }
40970+ case "inert":
40971+ if (!enableNewBooleanProps) {
40972+ setValueForAttribute(domElement, key, value);
40973+ break;
40974+ } else {
40975+ {
40976+ if (
40977+ value === "" &&
40978+ !didWarnForNewBooleanPropsWithEmptyValue[key]
40979+ ) {
40980+ didWarnForNewBooleanPropsWithEmptyValue[key] = true;
40981+
40982+ error(
40983+ "Received an empty string for a boolean attribute `%s`. " +
40984+ "This will treat the attribute as if it were false. " +
40985+ "Either pass `false` to silence this warning, or " +
40986+ "pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
40987+ key
40988+ );
40989+ }
40990+ }
40991+ }
4095840992
4095940993 // fallthrough for new boolean props without the flag on
4096040994
@@ -43201,6 +43235,33 @@ if (__DEV__) {
4320143235 continue;
4320243236
4320343237 case "inert":
43238+ if (enableNewBooleanProps) {
43239+ {
43240+ if (
43241+ value === "" &&
43242+ !didWarnForNewBooleanPropsWithEmptyValue[propKey]
43243+ ) {
43244+ didWarnForNewBooleanPropsWithEmptyValue[propKey] = true;
43245+
43246+ error(
43247+ "Received an empty string for a boolean attribute `%s`. " +
43248+ "This will treat the attribute as if it were false. " +
43249+ "Either pass `false` to silence this warning, or " +
43250+ "pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",
43251+ propKey
43252+ );
43253+ }
43254+ }
43255+
43256+ hydrateBooleanAttribute(
43257+ domElement,
43258+ propKey,
43259+ propKey,
43260+ value,
43261+ extraAttributes
43262+ );
43263+ continue;
43264+ }
4320443265
4320543266 // fallthrough for new boolean props without the flag on
4320643267
0 commit comments