@kbach/react 0.3.14 → 0.3.15
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-R22W555P.mjs → chunk-6FOS3PUK.mjs} +6 -4
- package/dist/{chunk-WPJY7X5I.mjs → chunk-OJE5MVCI.mjs} +2 -0
- package/dist/index.js +2 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.js +7 -3
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +7 -3
- package/dist/jsx-runtime.mjs +2 -2
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resolve,
|
|
9
9
|
useConditionalWidth,
|
|
10
10
|
useGlobalDarkMode
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-OJE5MVCI.mjs";
|
|
12
12
|
|
|
13
13
|
// src/jsx-runtime.tsx
|
|
14
14
|
import { jsx as _jsx, jsxs as _jsxs, Fragment } from "react/jsx-runtime";
|
|
@@ -127,12 +127,14 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
127
127
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
128
128
|
}
|
|
129
129
|
const config = getConfig();
|
|
130
|
+
const isGrdOnWeb = isWeb && classStr != null && /(?:^|\s)grd(?:\s|$)/.test(classStr);
|
|
131
|
+
const actualType = isGrdOnWeb ? "div" : type;
|
|
130
132
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
131
133
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
132
134
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
|
133
135
|
if (interactive) {
|
|
134
136
|
return _jsx(InteractiveWrapper, {
|
|
135
|
-
Component:
|
|
137
|
+
Component: actualType,
|
|
136
138
|
resolvedStyle: resolved,
|
|
137
139
|
...isWeb && classStr ? { className: classStr } : {},
|
|
138
140
|
style: userStyle,
|
|
@@ -141,7 +143,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
141
143
|
}
|
|
142
144
|
if (modeOrResponsive) {
|
|
143
145
|
return _jsx(DarkWrapper, {
|
|
144
|
-
Component:
|
|
146
|
+
Component: actualType,
|
|
145
147
|
resolvedStyle: resolved,
|
|
146
148
|
...isWeb && classStr ? { className: classStr } : {},
|
|
147
149
|
style: userStyle,
|
|
@@ -161,7 +163,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
161
163
|
delete computedStyle.gridAutoRows;
|
|
162
164
|
}
|
|
163
165
|
const finalStyle = mergeStyle(computedStyle, userStyle);
|
|
164
|
-
return makeElement(isStaticChildren,
|
|
166
|
+
return makeElement(isStaticChildren, actualType, {
|
|
165
167
|
...passProps,
|
|
166
168
|
style: finalStyle,
|
|
167
169
|
...isWeb && classStr ? { className: classStr } : {}
|
|
@@ -829,6 +829,7 @@ var STANDALONE_UTILITIES = /* @__PURE__ */ new Set([
|
|
|
829
829
|
"grid",
|
|
830
830
|
"inline-flex",
|
|
831
831
|
"inline-grid",
|
|
832
|
+
"grd",
|
|
832
833
|
"hidden",
|
|
833
834
|
"contents",
|
|
834
835
|
"flow-root",
|
|
@@ -1142,6 +1143,7 @@ var STANDALONE = {
|
|
|
1142
1143
|
"inline-block": isWeb ? { display: "inline-block" } : null,
|
|
1143
1144
|
inline: isWeb ? { display: "inline" } : null,
|
|
1144
1145
|
grid: isWeb ? { display: "grid" } : null,
|
|
1146
|
+
grd: isWeb ? { display: "grid" } : null,
|
|
1145
1147
|
"inline-flex": { display: isWeb ? "inline-flex" : "flex" },
|
|
1146
1148
|
"inline-grid": isWeb ? { display: "inline-grid" } : null,
|
|
1147
1149
|
hidden: { display: "none" },
|
package/dist/index.js
CHANGED
|
@@ -995,6 +995,7 @@ var STANDALONE_UTILITIES = /* @__PURE__ */ new Set([
|
|
|
995
995
|
"grid",
|
|
996
996
|
"inline-flex",
|
|
997
997
|
"inline-grid",
|
|
998
|
+
"grd",
|
|
998
999
|
"hidden",
|
|
999
1000
|
"contents",
|
|
1000
1001
|
"flow-root",
|
|
@@ -1308,6 +1309,7 @@ var STANDALONE = {
|
|
|
1308
1309
|
"inline-block": isWeb ? { display: "inline-block" } : null,
|
|
1309
1310
|
inline: isWeb ? { display: "inline" } : null,
|
|
1310
1311
|
grid: isWeb ? { display: "grid" } : null,
|
|
1312
|
+
grd: isWeb ? { display: "grid" } : null,
|
|
1311
1313
|
"inline-flex": { display: isWeb ? "inline-flex" : "flex" },
|
|
1312
1314
|
"inline-grid": isWeb ? { display: "inline-grid" } : null,
|
|
1313
1315
|
hidden: { display: "none" },
|
package/dist/index.mjs
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -898,6 +898,7 @@ var STANDALONE_UTILITIES = /* @__PURE__ */ new Set([
|
|
|
898
898
|
"grid",
|
|
899
899
|
"inline-flex",
|
|
900
900
|
"inline-grid",
|
|
901
|
+
"grd",
|
|
901
902
|
"hidden",
|
|
902
903
|
"contents",
|
|
903
904
|
"flow-root",
|
|
@@ -1211,6 +1212,7 @@ var STANDALONE = {
|
|
|
1211
1212
|
"inline-block": isWeb ? { display: "inline-block" } : null,
|
|
1212
1213
|
inline: isWeb ? { display: "inline" } : null,
|
|
1213
1214
|
grid: isWeb ? { display: "grid" } : null,
|
|
1215
|
+
grd: isWeb ? { display: "grid" } : null,
|
|
1214
1216
|
"inline-flex": { display: isWeb ? "inline-flex" : "flex" },
|
|
1215
1217
|
"inline-grid": isWeb ? { display: "inline-grid" } : null,
|
|
1216
1218
|
hidden: { display: "none" },
|
|
@@ -2548,12 +2550,14 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2548
2550
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
2549
2551
|
}
|
|
2550
2552
|
const config = getConfig();
|
|
2553
|
+
const isGrdOnWeb = isWeb && classStr != null && /(?:^|\s)grd(?:\s|$)/.test(classStr);
|
|
2554
|
+
const actualType = isGrdOnWeb ? "div" : type;
|
|
2551
2555
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
2552
2556
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
2553
2557
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
|
2554
2558
|
if (interactive) {
|
|
2555
2559
|
return (0, import_jsx_runtime.jsx)(InteractiveWrapper, {
|
|
2556
|
-
Component:
|
|
2560
|
+
Component: actualType,
|
|
2557
2561
|
resolvedStyle: resolved,
|
|
2558
2562
|
...isWeb && classStr ? { className: classStr } : {},
|
|
2559
2563
|
style: userStyle,
|
|
@@ -2562,7 +2566,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2562
2566
|
}
|
|
2563
2567
|
if (modeOrResponsive) {
|
|
2564
2568
|
return (0, import_jsx_runtime.jsx)(DarkWrapper, {
|
|
2565
|
-
Component:
|
|
2569
|
+
Component: actualType,
|
|
2566
2570
|
resolvedStyle: resolved,
|
|
2567
2571
|
...isWeb && classStr ? { className: classStr } : {},
|
|
2568
2572
|
style: userStyle,
|
|
@@ -2582,7 +2586,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2582
2586
|
delete computedStyle.gridAutoRows;
|
|
2583
2587
|
}
|
|
2584
2588
|
const finalStyle = mergeStyle(computedStyle, userStyle);
|
|
2585
|
-
return makeElement(isStaticChildren,
|
|
2589
|
+
return makeElement(isStaticChildren, actualType, {
|
|
2586
2590
|
...passProps,
|
|
2587
2591
|
style: finalStyle,
|
|
2588
2592
|
...isWeb && classStr ? { className: classStr } : {}
|
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-6FOS3PUK.mjs";
|
|
6
|
+
import "./chunk-OJE5MVCI.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
|
@@ -897,6 +897,7 @@ var STANDALONE_UTILITIES = /* @__PURE__ */ new Set([
|
|
|
897
897
|
"grid",
|
|
898
898
|
"inline-flex",
|
|
899
899
|
"inline-grid",
|
|
900
|
+
"grd",
|
|
900
901
|
"hidden",
|
|
901
902
|
"contents",
|
|
902
903
|
"flow-root",
|
|
@@ -1210,6 +1211,7 @@ var STANDALONE = {
|
|
|
1210
1211
|
"inline-block": isWeb ? { display: "inline-block" } : null,
|
|
1211
1212
|
inline: isWeb ? { display: "inline" } : null,
|
|
1212
1213
|
grid: isWeb ? { display: "grid" } : null,
|
|
1214
|
+
grd: isWeb ? { display: "grid" } : null,
|
|
1213
1215
|
"inline-flex": { display: isWeb ? "inline-flex" : "flex" },
|
|
1214
1216
|
"inline-grid": isWeb ? { display: "inline-grid" } : null,
|
|
1215
1217
|
hidden: { display: "none" },
|
|
@@ -2547,12 +2549,14 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2547
2549
|
return makeElement(isStaticChildren, type, rawProps, key);
|
|
2548
2550
|
}
|
|
2549
2551
|
const config = getConfig();
|
|
2552
|
+
const isGrdOnWeb = isWeb && classStr != null && /(?:^|\s)grd(?:\s|$)/.test(classStr);
|
|
2553
|
+
const actualType = isGrdOnWeb ? "div" : type;
|
|
2550
2554
|
const resolved = __kbachStyles ?? (classStr ? resolve(classStr, config.theme, config.darkMode) : {});
|
|
2551
2555
|
const { style: userStyle, ...passProps } = omitConsumed(rawProps);
|
|
2552
2556
|
const { interactive, modeOrResponsive } = bucketMods(resolved);
|
|
2553
2557
|
if (interactive) {
|
|
2554
2558
|
return (0, import_jsx_runtime.jsx)(InteractiveWrapper, {
|
|
2555
|
-
Component:
|
|
2559
|
+
Component: actualType,
|
|
2556
2560
|
resolvedStyle: resolved,
|
|
2557
2561
|
...isWeb && classStr ? { className: classStr } : {},
|
|
2558
2562
|
style: userStyle,
|
|
@@ -2561,7 +2565,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2561
2565
|
}
|
|
2562
2566
|
if (modeOrResponsive) {
|
|
2563
2567
|
return (0, import_jsx_runtime.jsx)(DarkWrapper, {
|
|
2564
|
-
Component:
|
|
2568
|
+
Component: actualType,
|
|
2565
2569
|
resolvedStyle: resolved,
|
|
2566
2570
|
...isWeb && classStr ? { className: classStr } : {},
|
|
2567
2571
|
style: userStyle,
|
|
@@ -2581,7 +2585,7 @@ function processElement(type, rawProps, key, isStaticChildren) {
|
|
|
2581
2585
|
delete computedStyle.gridAutoRows;
|
|
2582
2586
|
}
|
|
2583
2587
|
const finalStyle = mergeStyle(computedStyle, userStyle);
|
|
2584
|
-
return makeElement(isStaticChildren,
|
|
2588
|
+
return makeElement(isStaticChildren, actualType, {
|
|
2585
2589
|
...passProps,
|
|
2586
2590
|
style: finalStyle,
|
|
2587
2591
|
...isWeb && classStr ? { className: classStr } : {}
|
package/dist/jsx-runtime.mjs
CHANGED