@kbach/react 0.6.48 → 0.6.49
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-CFUH3CUD.mjs → chunk-KRRGLJLA.mjs} +13 -8
- package/dist/{chunk-YI75WFHE.mjs → chunk-LIUJPOTS.mjs} +1 -1
- package/dist/core/index.js +10 -1
- package/dist/index.js +3 -7
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.js +3 -7
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +3 -7
- package/dist/jsx-runtime.mjs +2 -2
- package/dist/vite-plugin.js +10 -1
- package/dist/vite-plugin.mjs +10 -1
- package/package.json +1 -1
|
@@ -2868,7 +2868,16 @@ var BASE_RESET = [
|
|
|
2868
2868
|
// plain text. Text-like inputs, textarea, and button don't have that problem
|
|
2869
2869
|
// (their native chrome is just a skin around content utilities can fully
|
|
2870
2870
|
// restyle), so they keep the blank-canvas treatment.
|
|
2871
|
-
|
|
2871
|
+
// :where() wraps the :not() exclusions so they contribute ZERO specificity
|
|
2872
|
+
// (unlike a bare `input:not([type='checkbox']):not([type='radio'])`, whose
|
|
2873
|
+
// two :not([attr]) clauses each add a class-level specificity point — (0,2,1)
|
|
2874
|
+
// total, MORE than any single utility class (0,1,0)). Without :where(), this
|
|
2875
|
+
// reset's `color: inherit` always won the cascade over a text-* color
|
|
2876
|
+
// utility applied directly to a <input>/<textarea> regardless of source
|
|
2877
|
+
// order, since author rules only override on a tie or higher specificity —
|
|
2878
|
+
// confirmed on a real app: a TextInput's own text color utility resolved
|
|
2879
|
+
// and injected correctly, class and all, but silently never painted.
|
|
2880
|
+
"input:where(:not([type='checkbox']):not([type='radio'])), textarea { appearance: none; -webkit-appearance: none; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; line-height: inherit; }",
|
|
2872
2881
|
// Native checkbox/radio/range still get typography + spacing normalized, and
|
|
2873
2882
|
// accent-color re-themes their native indicator to the current text color
|
|
2874
2883
|
// instead of the browser/OS default blue, so they stay on-brand without
|
|
@@ -3837,14 +3846,14 @@ var _resizeModeMap = {
|
|
|
3837
3846
|
"center": "none",
|
|
3838
3847
|
"repeat": "none"
|
|
3839
3848
|
};
|
|
3840
|
-
var
|
|
3849
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
3841
3850
|
var _placeholderRuleInjected = false;
|
|
3842
3851
|
function ensurePlaceholderColorRuleInjected() {
|
|
3843
3852
|
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
3844
3853
|
_placeholderRuleInjected = true;
|
|
3845
3854
|
const style = document.createElement("style");
|
|
3846
3855
|
style.setAttribute("data-kbach-placeholder", "");
|
|
3847
|
-
style.textContent =
|
|
3856
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
3848
3857
|
document.head.appendChild(style);
|
|
3849
3858
|
}
|
|
3850
3859
|
function transformToWebProps(originalName, tag, props) {
|
|
@@ -3854,7 +3863,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
3854
3863
|
const isImage = originalName === "Image" || originalName === "ImageBackground";
|
|
3855
3864
|
const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
|
|
3856
3865
|
let pendingStyle = null;
|
|
3857
|
-
let pendingClassName = null;
|
|
3858
3866
|
for (const [k, v] of Object.entries(props)) {
|
|
3859
3867
|
if (_rnOnlyProps.has(k)) continue;
|
|
3860
3868
|
if (k === "onPress") {
|
|
@@ -3889,7 +3897,7 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
3889
3897
|
if (k === "placeholderTextColor") {
|
|
3890
3898
|
if (v) {
|
|
3891
3899
|
ensurePlaceholderColorRuleInjected();
|
|
3892
|
-
|
|
3900
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
3893
3901
|
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
3894
3902
|
}
|
|
3895
3903
|
continue;
|
|
@@ -3955,9 +3963,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
3955
3963
|
if (pendingStyle) {
|
|
3956
3964
|
out.style = out.style ? { ...pendingStyle, ...out.style } : pendingStyle;
|
|
3957
3965
|
}
|
|
3958
|
-
if (pendingClassName) {
|
|
3959
|
-
out.className = out.className ? `${out.className} ${pendingClassName}` : pendingClassName;
|
|
3960
|
-
}
|
|
3961
3966
|
if (isPressable && !out.role) out.role = "button";
|
|
3962
3967
|
if (isImage && tag === "img" && out.alt == null) out.alt = "";
|
|
3963
3968
|
return out;
|
package/dist/core/index.js
CHANGED
|
@@ -2956,7 +2956,16 @@ var BASE_RESET = [
|
|
|
2956
2956
|
// plain text. Text-like inputs, textarea, and button don't have that problem
|
|
2957
2957
|
// (their native chrome is just a skin around content utilities can fully
|
|
2958
2958
|
// restyle), so they keep the blank-canvas treatment.
|
|
2959
|
-
|
|
2959
|
+
// :where() wraps the :not() exclusions so they contribute ZERO specificity
|
|
2960
|
+
// (unlike a bare `input:not([type='checkbox']):not([type='radio'])`, whose
|
|
2961
|
+
// two :not([attr]) clauses each add a class-level specificity point — (0,2,1)
|
|
2962
|
+
// total, MORE than any single utility class (0,1,0)). Without :where(), this
|
|
2963
|
+
// reset's `color: inherit` always won the cascade over a text-* color
|
|
2964
|
+
// utility applied directly to a <input>/<textarea> regardless of source
|
|
2965
|
+
// order, since author rules only override on a tie or higher specificity —
|
|
2966
|
+
// confirmed on a real app: a TextInput's own text color utility resolved
|
|
2967
|
+
// and injected correctly, class and all, but silently never painted.
|
|
2968
|
+
"input:where(:not([type='checkbox']):not([type='radio'])), textarea { appearance: none; -webkit-appearance: none; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; line-height: inherit; }",
|
|
2960
2969
|
// Native checkbox/radio/range still get typography + spacing normalized, and
|
|
2961
2970
|
// accent-color re-themes their native indicator to the current text color
|
|
2962
2971
|
// instead of the browser/OS default blue, so they stay on-brand without
|
package/dist/index.js
CHANGED
|
@@ -716,14 +716,14 @@ var _resizeModeMap = {
|
|
|
716
716
|
"center": "none",
|
|
717
717
|
"repeat": "none"
|
|
718
718
|
};
|
|
719
|
-
var
|
|
719
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
720
720
|
var _placeholderRuleInjected = false;
|
|
721
721
|
function ensurePlaceholderColorRuleInjected() {
|
|
722
722
|
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
723
723
|
_placeholderRuleInjected = true;
|
|
724
724
|
const style = document.createElement("style");
|
|
725
725
|
style.setAttribute("data-kbach-placeholder", "");
|
|
726
|
-
style.textContent =
|
|
726
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
727
727
|
document.head.appendChild(style);
|
|
728
728
|
}
|
|
729
729
|
function transformToWebProps(originalName, tag, props) {
|
|
@@ -733,7 +733,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
733
733
|
const isImage = originalName === "Image" || originalName === "ImageBackground";
|
|
734
734
|
const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
|
|
735
735
|
let pendingStyle = null;
|
|
736
|
-
let pendingClassName = null;
|
|
737
736
|
for (const [k, v] of Object.entries(props)) {
|
|
738
737
|
if (_rnOnlyProps.has(k)) continue;
|
|
739
738
|
if (k === "onPress") {
|
|
@@ -768,7 +767,7 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
768
767
|
if (k === "placeholderTextColor") {
|
|
769
768
|
if (v) {
|
|
770
769
|
ensurePlaceholderColorRuleInjected();
|
|
771
|
-
|
|
770
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
772
771
|
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
773
772
|
}
|
|
774
773
|
continue;
|
|
@@ -834,9 +833,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
834
833
|
if (pendingStyle) {
|
|
835
834
|
out.style = out.style ? { ...pendingStyle, ...out.style } : pendingStyle;
|
|
836
835
|
}
|
|
837
|
-
if (pendingClassName) {
|
|
838
|
-
out.className = out.className ? `${out.className} ${pendingClassName}` : pendingClassName;
|
|
839
|
-
}
|
|
840
836
|
if (isPressable && !out.role) out.role = "button";
|
|
841
837
|
if (isImage && tag === "img" && out.alt == null) out.alt = "";
|
|
842
838
|
return out;
|
package/dist/index.mjs
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -500,14 +500,14 @@ var _resizeModeMap = {
|
|
|
500
500
|
"center": "none",
|
|
501
501
|
"repeat": "none"
|
|
502
502
|
};
|
|
503
|
-
var
|
|
503
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
504
504
|
var _placeholderRuleInjected = false;
|
|
505
505
|
function ensurePlaceholderColorRuleInjected() {
|
|
506
506
|
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
507
507
|
_placeholderRuleInjected = true;
|
|
508
508
|
const style = document.createElement("style");
|
|
509
509
|
style.setAttribute("data-kbach-placeholder", "");
|
|
510
|
-
style.textContent =
|
|
510
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
511
511
|
document.head.appendChild(style);
|
|
512
512
|
}
|
|
513
513
|
function transformToWebProps(originalName, tag, props) {
|
|
@@ -517,7 +517,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
517
517
|
const isImage = originalName === "Image" || originalName === "ImageBackground";
|
|
518
518
|
const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
|
|
519
519
|
let pendingStyle = null;
|
|
520
|
-
let pendingClassName = null;
|
|
521
520
|
for (const [k, v] of Object.entries(props)) {
|
|
522
521
|
if (_rnOnlyProps.has(k)) continue;
|
|
523
522
|
if (k === "onPress") {
|
|
@@ -552,7 +551,7 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
552
551
|
if (k === "placeholderTextColor") {
|
|
553
552
|
if (v) {
|
|
554
553
|
ensurePlaceholderColorRuleInjected();
|
|
555
|
-
|
|
554
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
556
555
|
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
557
556
|
}
|
|
558
557
|
continue;
|
|
@@ -618,9 +617,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
618
617
|
if (pendingStyle) {
|
|
619
618
|
out.style = out.style ? { ...pendingStyle, ...out.style } : pendingStyle;
|
|
620
619
|
}
|
|
621
|
-
if (pendingClassName) {
|
|
622
|
-
out.className = out.className ? `${out.className} ${pendingClassName}` : pendingClassName;
|
|
623
|
-
}
|
|
624
620
|
if (isPressable && !out.role) out.role = "button";
|
|
625
621
|
if (isImage && tag === "img" && out.alt == null) out.alt = "";
|
|
626
622
|
return out;
|
package/dist/jsx-dev-runtime.mjs
CHANGED
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
Fragment,
|
|
4
4
|
jsx,
|
|
5
5
|
jsxs
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-LIUJPOTS.mjs";
|
|
7
|
+
import "./chunk-KRRGLJLA.mjs";
|
|
8
8
|
|
|
9
9
|
// src/jsx-dev-runtime.tsx
|
|
10
10
|
function jsxDEV(type, props, key, isStaticChildren, source, self) {
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -506,14 +506,14 @@ var _resizeModeMap = {
|
|
|
506
506
|
"center": "none",
|
|
507
507
|
"repeat": "none"
|
|
508
508
|
};
|
|
509
|
-
var
|
|
509
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
510
510
|
var _placeholderRuleInjected = false;
|
|
511
511
|
function ensurePlaceholderColorRuleInjected() {
|
|
512
512
|
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
513
513
|
_placeholderRuleInjected = true;
|
|
514
514
|
const style = document.createElement("style");
|
|
515
515
|
style.setAttribute("data-kbach-placeholder", "");
|
|
516
|
-
style.textContent =
|
|
516
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
517
517
|
document.head.appendChild(style);
|
|
518
518
|
}
|
|
519
519
|
function transformToWebProps(originalName, tag, props) {
|
|
@@ -523,7 +523,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
523
523
|
const isImage = originalName === "Image" || originalName === "ImageBackground";
|
|
524
524
|
const isScrollable = originalName === "ScrollView" || originalName === "FlatList" || originalName === "SectionList";
|
|
525
525
|
let pendingStyle = null;
|
|
526
|
-
let pendingClassName = null;
|
|
527
526
|
for (const [k, v] of Object.entries(props)) {
|
|
528
527
|
if (_rnOnlyProps.has(k)) continue;
|
|
529
528
|
if (k === "onPress") {
|
|
@@ -558,7 +557,7 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
558
557
|
if (k === "placeholderTextColor") {
|
|
559
558
|
if (v) {
|
|
560
559
|
ensurePlaceholderColorRuleInjected();
|
|
561
|
-
|
|
560
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
562
561
|
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
563
562
|
}
|
|
564
563
|
continue;
|
|
@@ -624,9 +623,6 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
624
623
|
if (pendingStyle) {
|
|
625
624
|
out.style = out.style ? { ...pendingStyle, ...out.style } : pendingStyle;
|
|
626
625
|
}
|
|
627
|
-
if (pendingClassName) {
|
|
628
|
-
out.className = out.className ? `${out.className} ${pendingClassName}` : pendingClassName;
|
|
629
|
-
}
|
|
630
626
|
if (isPressable && !out.role) out.role = "button";
|
|
631
627
|
if (isImage && tag === "img" && out.alt == null) out.alt = "";
|
|
632
628
|
return out;
|
package/dist/jsx-runtime.mjs
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
_invalidateDefaultFontCache,
|
|
5
5
|
jsx,
|
|
6
6
|
jsxs
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-LIUJPOTS.mjs";
|
|
8
8
|
import {
|
|
9
9
|
registerWebElement
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-KRRGLJLA.mjs";
|
|
11
11
|
export {
|
|
12
12
|
Fragment,
|
|
13
13
|
_invalidateDefaultFontCache,
|
package/dist/vite-plugin.js
CHANGED
|
@@ -78,7 +78,16 @@ var BASE_RESET = [
|
|
|
78
78
|
// plain text. Text-like inputs, textarea, and button don't have that problem
|
|
79
79
|
// (their native chrome is just a skin around content utilities can fully
|
|
80
80
|
// restyle), so they keep the blank-canvas treatment.
|
|
81
|
-
|
|
81
|
+
// :where() wraps the :not() exclusions so they contribute ZERO specificity
|
|
82
|
+
// (unlike a bare `input:not([type='checkbox']):not([type='radio'])`, whose
|
|
83
|
+
// two :not([attr]) clauses each add a class-level specificity point — (0,2,1)
|
|
84
|
+
// total, MORE than any single utility class (0,1,0)). Without :where(), this
|
|
85
|
+
// reset's `color: inherit` always won the cascade over a text-* color
|
|
86
|
+
// utility applied directly to a <input>/<textarea> regardless of source
|
|
87
|
+
// order, since author rules only override on a tie or higher specificity —
|
|
88
|
+
// confirmed on a real app: a TextInput's own text color utility resolved
|
|
89
|
+
// and injected correctly, class and all, but silently never painted.
|
|
90
|
+
"input:where(:not([type='checkbox']):not([type='radio'])), textarea { appearance: none; -webkit-appearance: none; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; line-height: inherit; }",
|
|
82
91
|
// Native checkbox/radio/range still get typography + spacing normalized, and
|
|
83
92
|
// accent-color re-themes their native indicator to the current text color
|
|
84
93
|
// instead of the browser/OS default blue, so they stay on-brand without
|
package/dist/vite-plugin.mjs
CHANGED
|
@@ -43,7 +43,16 @@ var BASE_RESET = [
|
|
|
43
43
|
// plain text. Text-like inputs, textarea, and button don't have that problem
|
|
44
44
|
// (their native chrome is just a skin around content utilities can fully
|
|
45
45
|
// restyle), so they keep the blank-canvas treatment.
|
|
46
|
-
|
|
46
|
+
// :where() wraps the :not() exclusions so they contribute ZERO specificity
|
|
47
|
+
// (unlike a bare `input:not([type='checkbox']):not([type='radio'])`, whose
|
|
48
|
+
// two :not([attr]) clauses each add a class-level specificity point — (0,2,1)
|
|
49
|
+
// total, MORE than any single utility class (0,1,0)). Without :where(), this
|
|
50
|
+
// reset's `color: inherit` always won the cascade over a text-* color
|
|
51
|
+
// utility applied directly to a <input>/<textarea> regardless of source
|
|
52
|
+
// order, since author rules only override on a tie or higher specificity —
|
|
53
|
+
// confirmed on a real app: a TextInput's own text color utility resolved
|
|
54
|
+
// and injected correctly, class and all, but silently never painted.
|
|
55
|
+
"input:where(:not([type='checkbox']):not([type='radio'])), textarea { appearance: none; -webkit-appearance: none; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; line-height: inherit; }",
|
|
47
56
|
// Native checkbox/radio/range still get typography + spacing normalized, and
|
|
48
57
|
// accent-color re-themes their native indicator to the current text color
|
|
49
58
|
// instead of the browser/OS default blue, so they stay on-brand without
|