@kbach/react 0.3.17 → 0.3.18
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/{chunk-5GHUWO2A.mjs → chunk-437T7FQC.mjs} +1 -1
- package/dist/{chunk-L3IEKX5I.mjs → chunk-CIK3ADJB.mjs} +4 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.js +4 -4
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +4 -4
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
|
@@ -2424,7 +2424,7 @@ var InteractiveWrapper = forwardRef(
|
|
|
2424
2424
|
const computedStyle = useMemo(
|
|
2425
2425
|
() => {
|
|
2426
2426
|
const s = flatten(resolvedStyle, isDark, { pressed, hover: hovered, focus: focused }, breakpoints);
|
|
2427
|
-
if (
|
|
2427
|
+
if (typeof Component !== "string") {
|
|
2428
2428
|
if (s.display === "grid" || s.display === "inline-grid") delete s.display;
|
|
2429
2429
|
delete s.gridTemplateColumns;
|
|
2430
2430
|
delete s.gridTemplateRows;
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resolve,
|
|
9
9
|
useConditionalWidth,
|
|
10
10
|
useGlobalDarkMode
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-437T7FQC.mjs";
|
|
12
12
|
|
|
13
13
|
// src/jsx-runtime.tsx
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
|
|
@@ -32,7 +32,7 @@ var DarkWrapper = React.forwardRef(
|
|
|
32
32
|
const width = useConditionalWidth(needsWidth);
|
|
33
33
|
const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
|
|
34
34
|
const computedStyle = flatten(resolvedStyle, isDark, {}, breakpoints);
|
|
35
|
-
if (
|
|
35
|
+
if (typeof Component !== "string") stripWebGridProps(computedStyle);
|
|
36
36
|
const finalStyle = styleProp ? Array.isArray(styleProp) ? Object.assign({}, computedStyle, ...styleProp) : { ...computedStyle, ...styleProp } : computedStyle;
|
|
37
37
|
const props = { ref, ...rest, style: finalStyle };
|
|
38
38
|
return Array.isArray(children) ? React.createElement(Component, props, ...children) : React.createElement(Component, props, children);
|
|
@@ -127,7 +127,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
127
127
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
128
128
|
}
|
|
129
129
|
const config = getConfig();
|
|
130
|
-
const isGrdOnWeb =
|
|
130
|
+
const isGrdOnWeb = typeof document !== "undefined" && classStr != null && /(?:^|\s)grd(?:\s|$)/.test(classStr);
|
|
131
131
|
const actualType = isGrdOnWeb ? "div" : type;
|
|
132
132
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
133
133
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
@@ -151,7 +151,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
151
151
|
}, key);
|
|
152
152
|
}
|
|
153
153
|
const computedStyle = flatten(resolved, false);
|
|
154
|
-
if (
|
|
154
|
+
if (typeof actualType !== "string") {
|
|
155
155
|
if (computedStyle.display === "grid" || computedStyle.display === "inline-grid") delete computedStyle.display;
|
|
156
156
|
delete computedStyle.gridTemplateColumns;
|
|
157
157
|
delete computedStyle.gridTemplateRows;
|
package/dist/index.js
CHANGED
|
@@ -2928,7 +2928,7 @@ var InteractiveWrapper = (0, import_react9.forwardRef)(
|
|
|
2928
2928
|
const computedStyle = (0, import_react9.useMemo)(
|
|
2929
2929
|
() => {
|
|
2930
2930
|
const s = flatten(resolvedStyle, isDark, { pressed, hover: hovered, focus: focused }, breakpoints);
|
|
2931
|
-
if (
|
|
2931
|
+
if (typeof Component !== "string") {
|
|
2932
2932
|
if (s.display === "grid" || s.display === "inline-grid") delete s.display;
|
|
2933
2933
|
delete s.gridTemplateColumns;
|
|
2934
2934
|
delete s.gridTemplateRows;
|
package/dist/index.mjs
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -2407,7 +2407,7 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
|
|
|
2407
2407
|
const computedStyle = (0, import_react3.useMemo)(
|
|
2408
2408
|
() => {
|
|
2409
2409
|
const s = flatten(resolvedStyle, isDark, { pressed, hover: hovered, focus: focused }, breakpoints);
|
|
2410
|
-
if (
|
|
2410
|
+
if (typeof Component !== "string") {
|
|
2411
2411
|
if (s.display === "grid" || s.display === "inline-grid") delete s.display;
|
|
2412
2412
|
delete s.gridTemplateColumns;
|
|
2413
2413
|
delete s.gridTemplateRows;
|
|
@@ -2461,7 +2461,7 @@ var DarkWrapper = import_react4.default.forwardRef(
|
|
|
2461
2461
|
const width = useConditionalWidth(needsWidth);
|
|
2462
2462
|
const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
|
|
2463
2463
|
const computedStyle = flatten(resolvedStyle, isDark, {}, breakpoints);
|
|
2464
|
-
if (
|
|
2464
|
+
if (typeof Component !== "string") stripWebGridProps(computedStyle);
|
|
2465
2465
|
const finalStyle = styleProp ? Array.isArray(styleProp) ? Object.assign({}, computedStyle, ...styleProp) : { ...computedStyle, ...styleProp } : computedStyle;
|
|
2466
2466
|
const props = { ref, ...rest, style: finalStyle };
|
|
2467
2467
|
return Array.isArray(children) ? import_react4.default.createElement(Component, props, ...children) : import_react4.default.createElement(Component, props, children);
|
|
@@ -2556,7 +2556,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2556
2556
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
2557
2557
|
}
|
|
2558
2558
|
const config = getConfig();
|
|
2559
|
-
const isGrdOnWeb =
|
|
2559
|
+
const isGrdOnWeb = typeof document !== "undefined" && classStr != null && /(?:^|\s)grd(?:\s|$)/.test(classStr);
|
|
2560
2560
|
const actualType = isGrdOnWeb ? "div" : type;
|
|
2561
2561
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
2562
2562
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
@@ -2580,7 +2580,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2580
2580
|
}, key);
|
|
2581
2581
|
}
|
|
2582
2582
|
const computedStyle = flatten(resolved, false);
|
|
2583
|
-
if (
|
|
2583
|
+
if (typeof actualType !== "string") {
|
|
2584
2584
|
if (computedStyle.display === "grid" || computedStyle.display === "inline-grid") delete computedStyle.display;
|
|
2585
2585
|
delete computedStyle.gridTemplateColumns;
|
|
2586
2586
|
delete computedStyle.gridTemplateRows;
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
Fragment,
|
|
3
3
|
jsx,
|
|
4
4
|
jsxs
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-CIK3ADJB.mjs";
|
|
6
|
+
import "./chunk-437T7FQC.mjs";
|
|
7
7
|
|
|
8
8
|
// src/jsx-dev-runtime.tsx
|
|
9
9
|
function jsxDEV(type, props, key, isStaticChildren, _source, _self) {
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -2406,7 +2406,7 @@ var InteractiveWrapper = (0, import_react3.forwardRef)(
|
|
|
2406
2406
|
const computedStyle = (0, import_react3.useMemo)(
|
|
2407
2407
|
() => {
|
|
2408
2408
|
const s = flatten(resolvedStyle, isDark, { pressed, hover: hovered, focus: focused }, breakpoints);
|
|
2409
|
-
if (
|
|
2409
|
+
if (typeof Component !== "string") {
|
|
2410
2410
|
if (s.display === "grid" || s.display === "inline-grid") delete s.display;
|
|
2411
2411
|
delete s.gridTemplateColumns;
|
|
2412
2412
|
delete s.gridTemplateRows;
|
|
@@ -2460,7 +2460,7 @@ var DarkWrapper = import_react4.default.forwardRef(
|
|
|
2460
2460
|
const width = useConditionalWidth(needsWidth);
|
|
2461
2461
|
const breakpoints = needsWidth ? getActiveBreakpoints(width) : EMPTY_BREAKPOINTS;
|
|
2462
2462
|
const computedStyle = flatten(resolvedStyle, isDark, {}, breakpoints);
|
|
2463
|
-
if (
|
|
2463
|
+
if (typeof Component !== "string") stripWebGridProps(computedStyle);
|
|
2464
2464
|
const finalStyle = styleProp ? Array.isArray(styleProp) ? Object.assign({}, computedStyle, ...styleProp) : { ...computedStyle, ...styleProp } : computedStyle;
|
|
2465
2465
|
const props = { ref, ...rest, style: finalStyle };
|
|
2466
2466
|
return Array.isArray(children) ? import_react4.default.createElement(Component, props, ...children) : import_react4.default.createElement(Component, props, children);
|
|
@@ -2555,7 +2555,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2555
2555
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
2556
2556
|
}
|
|
2557
2557
|
const config = getConfig();
|
|
2558
|
-
const isGrdOnWeb =
|
|
2558
|
+
const isGrdOnWeb = typeof document !== "undefined" && classStr != null && /(?:^|\s)grd(?:\s|$)/.test(classStr);
|
|
2559
2559
|
const actualType = isGrdOnWeb ? "div" : type;
|
|
2560
2560
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
2561
2561
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
@@ -2579,7 +2579,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2579
2579
|
}, key);
|
|
2580
2580
|
}
|
|
2581
2581
|
const computedStyle = flatten(resolved, false);
|
|
2582
|
-
if (
|
|
2582
|
+
if (typeof actualType !== "string") {
|
|
2583
2583
|
if (computedStyle.display === "grid" || computedStyle.display === "inline-grid") delete computedStyle.display;
|
|
2584
2584
|
delete computedStyle.gridTemplateColumns;
|
|
2585
2585
|
delete computedStyle.gridTemplateRows;
|
package/dist/jsx-runtime.mjs
CHANGED