@kbach/react 0.6.47 → 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-5HY7Z2PS.mjs → chunk-KRRGLJLA.mjs} +36 -1
- package/dist/{chunk-WW3NH5W2.mjs → chunk-LIUJPOTS.mjs} +1 -1
- package/dist/core/index.js +10 -1
- package/dist/index.js +26 -0
- package/dist/index.mjs +1 -1
- package/dist/jsx-dev-runtime.js +26 -0
- package/dist/jsx-dev-runtime.mjs +2 -2
- package/dist/jsx-runtime.js +26 -0
- 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,6 +3846,16 @@ var _resizeModeMap = {
|
|
|
3837
3846
|
"center": "none",
|
|
3838
3847
|
"repeat": "none"
|
|
3839
3848
|
};
|
|
3849
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
3850
|
+
var _placeholderRuleInjected = false;
|
|
3851
|
+
function ensurePlaceholderColorRuleInjected() {
|
|
3852
|
+
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
3853
|
+
_placeholderRuleInjected = true;
|
|
3854
|
+
const style = document.createElement("style");
|
|
3855
|
+
style.setAttribute("data-kbach-placeholder", "");
|
|
3856
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
3857
|
+
document.head.appendChild(style);
|
|
3858
|
+
}
|
|
3840
3859
|
function transformToWebProps(originalName, tag, props) {
|
|
3841
3860
|
const out = {};
|
|
3842
3861
|
const isPressable = _pressableNames.has(originalName);
|
|
@@ -3867,6 +3886,22 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
3867
3886
|
if (!("onChange" in props)) out.onChange = (e) => v(e.target.value);
|
|
3868
3887
|
continue;
|
|
3869
3888
|
}
|
|
3889
|
+
if (k === "onSubmitEditing") {
|
|
3890
|
+
if (!("onKeyDown" in props)) {
|
|
3891
|
+
out.onKeyDown = (e) => {
|
|
3892
|
+
if (e.key === "Enter") v();
|
|
3893
|
+
};
|
|
3894
|
+
}
|
|
3895
|
+
continue;
|
|
3896
|
+
}
|
|
3897
|
+
if (k === "placeholderTextColor") {
|
|
3898
|
+
if (v) {
|
|
3899
|
+
ensurePlaceholderColorRuleInjected();
|
|
3900
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
3901
|
+
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
3902
|
+
}
|
|
3903
|
+
continue;
|
|
3904
|
+
}
|
|
3870
3905
|
if (k === "secureTextEntry") {
|
|
3871
3906
|
if (v && !("type" in props)) out.type = "password";
|
|
3872
3907
|
continue;
|
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,6 +716,16 @@ var _resizeModeMap = {
|
|
|
716
716
|
"center": "none",
|
|
717
717
|
"repeat": "none"
|
|
718
718
|
};
|
|
719
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
720
|
+
var _placeholderRuleInjected = false;
|
|
721
|
+
function ensurePlaceholderColorRuleInjected() {
|
|
722
|
+
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
723
|
+
_placeholderRuleInjected = true;
|
|
724
|
+
const style = document.createElement("style");
|
|
725
|
+
style.setAttribute("data-kbach-placeholder", "");
|
|
726
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
727
|
+
document.head.appendChild(style);
|
|
728
|
+
}
|
|
719
729
|
function transformToWebProps(originalName, tag, props) {
|
|
720
730
|
const out = {};
|
|
721
731
|
const isPressable = _pressableNames.has(originalName);
|
|
@@ -746,6 +756,22 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
746
756
|
if (!("onChange" in props)) out.onChange = (e) => v(e.target.value);
|
|
747
757
|
continue;
|
|
748
758
|
}
|
|
759
|
+
if (k === "onSubmitEditing") {
|
|
760
|
+
if (!("onKeyDown" in props)) {
|
|
761
|
+
out.onKeyDown = (e) => {
|
|
762
|
+
if (e.key === "Enter") v();
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
continue;
|
|
766
|
+
}
|
|
767
|
+
if (k === "placeholderTextColor") {
|
|
768
|
+
if (v) {
|
|
769
|
+
ensurePlaceholderColorRuleInjected();
|
|
770
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
771
|
+
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
772
|
+
}
|
|
773
|
+
continue;
|
|
774
|
+
}
|
|
749
775
|
if (k === "secureTextEntry") {
|
|
750
776
|
if (v && !("type" in props)) out.type = "password";
|
|
751
777
|
continue;
|
package/dist/index.mjs
CHANGED
package/dist/jsx-dev-runtime.js
CHANGED
|
@@ -500,6 +500,16 @@ var _resizeModeMap = {
|
|
|
500
500
|
"center": "none",
|
|
501
501
|
"repeat": "none"
|
|
502
502
|
};
|
|
503
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
504
|
+
var _placeholderRuleInjected = false;
|
|
505
|
+
function ensurePlaceholderColorRuleInjected() {
|
|
506
|
+
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
507
|
+
_placeholderRuleInjected = true;
|
|
508
|
+
const style = document.createElement("style");
|
|
509
|
+
style.setAttribute("data-kbach-placeholder", "");
|
|
510
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
511
|
+
document.head.appendChild(style);
|
|
512
|
+
}
|
|
503
513
|
function transformToWebProps(originalName, tag, props) {
|
|
504
514
|
const out = {};
|
|
505
515
|
const isPressable = _pressableNames.has(originalName);
|
|
@@ -530,6 +540,22 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
530
540
|
if (!("onChange" in props)) out.onChange = (e) => v(e.target.value);
|
|
531
541
|
continue;
|
|
532
542
|
}
|
|
543
|
+
if (k === "onSubmitEditing") {
|
|
544
|
+
if (!("onKeyDown" in props)) {
|
|
545
|
+
out.onKeyDown = (e) => {
|
|
546
|
+
if (e.key === "Enter") v();
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
551
|
+
if (k === "placeholderTextColor") {
|
|
552
|
+
if (v) {
|
|
553
|
+
ensurePlaceholderColorRuleInjected();
|
|
554
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
555
|
+
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
556
|
+
}
|
|
557
|
+
continue;
|
|
558
|
+
}
|
|
533
559
|
if (k === "secureTextEntry") {
|
|
534
560
|
if (v && !("type" in props)) out.type = "password";
|
|
535
561
|
continue;
|
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,6 +506,16 @@ var _resizeModeMap = {
|
|
|
506
506
|
"center": "none",
|
|
507
507
|
"repeat": "none"
|
|
508
508
|
};
|
|
509
|
+
var PLACEHOLDER_RULE_ATTR = "data-kbach-ph";
|
|
510
|
+
var _placeholderRuleInjected = false;
|
|
511
|
+
function ensurePlaceholderColorRuleInjected() {
|
|
512
|
+
if (_placeholderRuleInjected || typeof document === "undefined") return;
|
|
513
|
+
_placeholderRuleInjected = true;
|
|
514
|
+
const style = document.createElement("style");
|
|
515
|
+
style.setAttribute("data-kbach-placeholder", "");
|
|
516
|
+
style.textContent = `[${PLACEHOLDER_RULE_ATTR}]::placeholder{color:var(--kbach-ph-color)}`;
|
|
517
|
+
document.head.appendChild(style);
|
|
518
|
+
}
|
|
509
519
|
function transformToWebProps(originalName, tag, props) {
|
|
510
520
|
const out = {};
|
|
511
521
|
const isPressable = _pressableNames.has(originalName);
|
|
@@ -536,6 +546,22 @@ function transformToWebProps(originalName, tag, props) {
|
|
|
536
546
|
if (!("onChange" in props)) out.onChange = (e) => v(e.target.value);
|
|
537
547
|
continue;
|
|
538
548
|
}
|
|
549
|
+
if (k === "onSubmitEditing") {
|
|
550
|
+
if (!("onKeyDown" in props)) {
|
|
551
|
+
out.onKeyDown = (e) => {
|
|
552
|
+
if (e.key === "Enter") v();
|
|
553
|
+
};
|
|
554
|
+
}
|
|
555
|
+
continue;
|
|
556
|
+
}
|
|
557
|
+
if (k === "placeholderTextColor") {
|
|
558
|
+
if (v) {
|
|
559
|
+
ensurePlaceholderColorRuleInjected();
|
|
560
|
+
out[PLACEHOLDER_RULE_ATTR] = "";
|
|
561
|
+
pendingStyle = { ...pendingStyle ?? {}, "--kbach-ph-color": v };
|
|
562
|
+
}
|
|
563
|
+
continue;
|
|
564
|
+
}
|
|
539
565
|
if (k === "secureTextEntry") {
|
|
540
566
|
if (v && !("type" in props)) out.type = "password";
|
|
541
567
|
continue;
|
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
|