tamagui 3.0.13 → 3.0.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/cjs/components/Input.cjs +13 -20
- package/dist/cjs/components/Input.native.cjs +11 -24
- package/dist/cjs/components/Input.native.js +11 -24
- package/dist/cjs/components/Input.native.js.map +1 -1
- package/dist/esm/components/Input.mjs +13 -20
- package/dist/esm/components/Input.mjs.map +1 -1
- package/dist/esm/components/Input.native.js +11 -24
- package/dist/esm/components/Input.native.js.map +1 -1
- package/dist/jsx/components/Input.mjs +13 -20
- package/dist/jsx/components/Input.mjs.map +1 -1
- package/dist/jsx/components/Input.native.cjs +11 -24
- package/dist/jsx/components/Input.native.js +11 -24
- package/dist/jsx/components/Input.native.js.map +1 -1
- package/dist/native.cjs +30 -19
- package/dist/test.cjs +30 -19
- package/package.json +67 -67
- package/src/components/Input.tsx +38 -26
- package/types/components/Input.d.ts.map +1 -1
|
@@ -34,50 +34,41 @@ var inputSize = {
|
|
|
34
34
|
paddingInline: "2",
|
|
35
35
|
paddingBlock: "1",
|
|
36
36
|
borderRadius: "sm",
|
|
37
|
-
fontSize: "xs"
|
|
37
|
+
fontSize: "xs",
|
|
38
|
+
lineHeight: import_core.isWeb ? "xs" : void 0
|
|
38
39
|
},
|
|
39
40
|
sm: {
|
|
40
41
|
paddingInline: "3",
|
|
41
42
|
paddingBlock: "1.5",
|
|
42
43
|
borderRadius: "md",
|
|
43
|
-
fontSize: "sm"
|
|
44
|
+
fontSize: "sm",
|
|
45
|
+
lineHeight: import_core.isWeb ? "sm" : void 0
|
|
44
46
|
},
|
|
45
47
|
md: {
|
|
46
48
|
paddingInline: "4",
|
|
47
49
|
paddingBlock: "2",
|
|
48
50
|
borderRadius: "md",
|
|
49
|
-
fontSize: "sm"
|
|
51
|
+
fontSize: "sm",
|
|
52
|
+
lineHeight: import_core.isWeb ? "sm" : void 0
|
|
50
53
|
},
|
|
51
54
|
lg: {
|
|
52
55
|
paddingInline: "6",
|
|
53
56
|
paddingBlock: "2",
|
|
54
57
|
borderRadius: "md",
|
|
55
|
-
fontSize: "base"
|
|
58
|
+
fontSize: "base",
|
|
59
|
+
lineHeight: import_core.isWeb ? "base" : void 0
|
|
56
60
|
},
|
|
57
61
|
xl: {
|
|
58
62
|
paddingInline: "8",
|
|
59
63
|
paddingBlock: "2.5",
|
|
60
64
|
borderRadius: "lg",
|
|
61
|
-
fontSize: "lg"
|
|
65
|
+
fontSize: "lg",
|
|
66
|
+
lineHeight: import_core.isWeb ? "lg" : void 0
|
|
62
67
|
}
|
|
63
68
|
};
|
|
64
|
-
var inputLineHeight = {
|
|
65
|
-
xs: "xs",
|
|
66
|
-
sm: "sm",
|
|
67
|
-
md: "sm",
|
|
68
|
-
lg: "base",
|
|
69
|
-
xl: "lg"
|
|
70
|
-
};
|
|
71
|
-
var resolveInputSize = function resolveInputSize2(size) {
|
|
72
|
-
return typeof size === "string" && size in inputSize ? size : "md";
|
|
73
|
-
};
|
|
74
|
-
var resolveInputLineHeight = function resolveInputLineHeight2(props) {
|
|
75
|
-
if (!import_core.isWeb || props.lineHeight != null) return;
|
|
76
|
-
var lineHeight = inputLineHeight[resolveInputSize(props.size)];
|
|
77
|
-
if (lineHeight) return { lineHeight };
|
|
78
|
-
};
|
|
79
69
|
var inputSkin = {
|
|
80
70
|
fontFamily: "body",
|
|
71
|
+
lineHeight: import_core.isWeb ? "sm" : void 0,
|
|
81
72
|
color: "color",
|
|
82
73
|
backgroundColor: "background",
|
|
83
74
|
borderColor: "border-color hover:border-color-hover focus:border-color-focus",
|
|
@@ -95,8 +86,6 @@ var InputFrame = (0, import_core.styled)(import_input.Input, {
|
|
|
95
86
|
true: inputSize.md
|
|
96
87
|
} },
|
|
97
88
|
defaultVariants: { size: "md" }
|
|
98
|
-
}).resolve(function(props) {
|
|
99
|
-
return resolveInputLineHeight(props);
|
|
100
89
|
});
|
|
101
90
|
var TextAreaFrame = (0, import_core.styled)(import_input.TextArea, {
|
|
102
91
|
displayName: "TextArea",
|
|
@@ -107,8 +96,6 @@ var TextAreaFrame = (0, import_core.styled)(import_input.TextArea, {
|
|
|
107
96
|
true: inputSize.md
|
|
108
97
|
} },
|
|
109
98
|
defaultVariants: { size: "md" }
|
|
110
|
-
}).resolve(function(props) {
|
|
111
|
-
return resolveInputLineHeight(props);
|
|
112
99
|
});
|
|
113
100
|
var Input = (0, import_core.createStyledHOC)(InputFrame, function Input2(param, ref) {
|
|
114
101
|
var { theme, ...props } = param;
|
|
@@ -34,50 +34,41 @@ var inputSize = {
|
|
|
34
34
|
paddingInline: "2",
|
|
35
35
|
paddingBlock: "1",
|
|
36
36
|
borderRadius: "sm",
|
|
37
|
-
fontSize: "xs"
|
|
37
|
+
fontSize: "xs",
|
|
38
|
+
lineHeight: import_core.isWeb ? "xs" : void 0
|
|
38
39
|
},
|
|
39
40
|
sm: {
|
|
40
41
|
paddingInline: "3",
|
|
41
42
|
paddingBlock: "1.5",
|
|
42
43
|
borderRadius: "md",
|
|
43
|
-
fontSize: "sm"
|
|
44
|
+
fontSize: "sm",
|
|
45
|
+
lineHeight: import_core.isWeb ? "sm" : void 0
|
|
44
46
|
},
|
|
45
47
|
md: {
|
|
46
48
|
paddingInline: "4",
|
|
47
49
|
paddingBlock: "2",
|
|
48
50
|
borderRadius: "md",
|
|
49
|
-
fontSize: "sm"
|
|
51
|
+
fontSize: "sm",
|
|
52
|
+
lineHeight: import_core.isWeb ? "sm" : void 0
|
|
50
53
|
},
|
|
51
54
|
lg: {
|
|
52
55
|
paddingInline: "6",
|
|
53
56
|
paddingBlock: "2",
|
|
54
57
|
borderRadius: "md",
|
|
55
|
-
fontSize: "base"
|
|
58
|
+
fontSize: "base",
|
|
59
|
+
lineHeight: import_core.isWeb ? "base" : void 0
|
|
56
60
|
},
|
|
57
61
|
xl: {
|
|
58
62
|
paddingInline: "8",
|
|
59
63
|
paddingBlock: "2.5",
|
|
60
64
|
borderRadius: "lg",
|
|
61
|
-
fontSize: "lg"
|
|
65
|
+
fontSize: "lg",
|
|
66
|
+
lineHeight: import_core.isWeb ? "lg" : void 0
|
|
62
67
|
}
|
|
63
68
|
};
|
|
64
|
-
var inputLineHeight = {
|
|
65
|
-
xs: "xs",
|
|
66
|
-
sm: "sm",
|
|
67
|
-
md: "sm",
|
|
68
|
-
lg: "base",
|
|
69
|
-
xl: "lg"
|
|
70
|
-
};
|
|
71
|
-
var resolveInputSize = function resolveInputSize2(size) {
|
|
72
|
-
return typeof size === "string" && size in inputSize ? size : "md";
|
|
73
|
-
};
|
|
74
|
-
var resolveInputLineHeight = function resolveInputLineHeight2(props) {
|
|
75
|
-
if (!import_core.isWeb || props.lineHeight != null) return;
|
|
76
|
-
var lineHeight = inputLineHeight[resolveInputSize(props.size)];
|
|
77
|
-
if (lineHeight) return { lineHeight };
|
|
78
|
-
};
|
|
79
69
|
var inputSkin = {
|
|
80
70
|
fontFamily: "body",
|
|
71
|
+
lineHeight: import_core.isWeb ? "sm" : void 0,
|
|
81
72
|
color: "color",
|
|
82
73
|
backgroundColor: "background",
|
|
83
74
|
borderColor: "border-color hover:border-color-hover focus:border-color-focus",
|
|
@@ -95,8 +86,6 @@ var InputFrame = (0, import_core.styled)(import_input.Input, {
|
|
|
95
86
|
true: inputSize.md
|
|
96
87
|
} },
|
|
97
88
|
defaultVariants: { size: "md" }
|
|
98
|
-
}).resolve(function(props) {
|
|
99
|
-
return resolveInputLineHeight(props);
|
|
100
89
|
});
|
|
101
90
|
var TextAreaFrame = (0, import_core.styled)(import_input.TextArea, {
|
|
102
91
|
displayName: "TextArea",
|
|
@@ -107,8 +96,6 @@ var TextAreaFrame = (0, import_core.styled)(import_input.TextArea, {
|
|
|
107
96
|
true: inputSize.md
|
|
108
97
|
} },
|
|
109
98
|
defaultVariants: { size: "md" }
|
|
110
|
-
}).resolve(function(props) {
|
|
111
|
-
return resolveInputLineHeight(props);
|
|
112
99
|
});
|
|
113
100
|
var Input = (0, import_core.createStyledHOC)(InputFrame, function Input2(param, ref) {
|
|
114
101
|
var { theme, ...props } = param;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.native.js","names":[],"sources":["jsx/components/Input.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Input_exports = {};\n__export(Input_exports, {\n Input: () => Input,\n TextArea: () => TextArea\n});\nmodule.exports = __toCommonJS(Input_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_input = require(\"@tamagui/input\");\nvar inputSize = {\n xs: {\n paddingInline: \"2\",\n paddingBlock: \"1\",\n borderRadius: \"sm\",\n fontSize: \"xs\"\n },\n sm: {\n paddingInline: \"3\",\n paddingBlock: \"1.5\",\n borderRadius: \"md\",\n fontSize: \"sm\"\n },\n md: {\n paddingInline: \"4\",\n paddingBlock: \"2\",\n borderRadius: \"md\",\n fontSize: \"sm\"\n },\n lg: {\n paddingInline: \"6\",\n paddingBlock: \"2\",\n borderRadius: \"md\",\n fontSize: \"base\"\n },\n xl: {\n paddingInline: \"8\",\n paddingBlock: \"2.5\",\n borderRadius: \"lg\",\n fontSize: \"lg\"
|
|
1
|
+
{"version":3,"file":"Input.native.js","names":[],"sources":["jsx/components/Input.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar Input_exports = {};\n__export(Input_exports, {\n Input: () => Input,\n TextArea: () => TextArea\n});\nmodule.exports = __toCommonJS(Input_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_input = require(\"@tamagui/input\");\nvar inputSize = {\n xs: {\n paddingInline: \"2\",\n paddingBlock: \"1\",\n borderRadius: \"sm\",\n fontSize: \"xs\",\n lineHeight: import_core.isWeb ? \"xs\" : void 0\n },\n sm: {\n paddingInline: \"3\",\n paddingBlock: \"1.5\",\n borderRadius: \"md\",\n fontSize: \"sm\",\n lineHeight: import_core.isWeb ? \"sm\" : void 0\n },\n md: {\n paddingInline: \"4\",\n paddingBlock: \"2\",\n borderRadius: \"md\",\n fontSize: \"sm\",\n lineHeight: import_core.isWeb ? \"sm\" : void 0\n },\n lg: {\n paddingInline: \"6\",\n paddingBlock: \"2\",\n borderRadius: \"md\",\n fontSize: \"base\",\n lineHeight: import_core.isWeb ? \"base\" : void 0\n },\n xl: {\n paddingInline: \"8\",\n paddingBlock: \"2.5\",\n borderRadius: \"lg\",\n fontSize: \"lg\",\n lineHeight: import_core.isWeb ? \"lg\" : void 0\n }\n};\nvar inputSkin = {\n fontFamily: \"body\",\n lineHeight: import_core.isWeb ? \"sm\" : void 0,\n color: \"color\",\n backgroundColor: \"background\",\n borderColor: \"border-color hover:border-color-hover focus:border-color-focus\",\n borderWidth: 1,\n outlineColor: \"focus-visible:outline-color\",\n outlineWidth: \"focus-visible:2px\",\n outlineStyle: \"focus-visible:solid\"\n};\nvar InputFrame = (0, import_core.styled)(import_input.Input, {\n displayName: \"Input\",\n className: \"is_Input\",\n ...inputSkin,\n variants: {\n size: {\n ...inputSize,\n true: inputSize.md\n }\n },\n defaultVariants: {\n size: \"md\"\n }\n});\nvar TextAreaFrame = (0, import_core.styled)(import_input.TextArea, {\n displayName: \"TextArea\",\n className: \"is_TextArea\",\n ...inputSkin,\n variants: {\n size: {\n ...inputSize,\n true: inputSize.md\n }\n },\n defaultVariants: {\n size: \"md\"\n }\n});\nvar Input = (0, import_core.createStyledHOC)(InputFrame, function Input2(param, ref) {\n var { theme, ...props } = param;\n var input = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: \"Input\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InputFrame, {\n ref,\n ...props\n })\n });\n return theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: theme,\n children: input\n }) : input;\n}, {\n disableTheme: true\n});\nvar TextArea = (0, import_core.createStyledHOC)(TextAreaFrame, function TextArea2(param, ref) {\n var { theme, ...props } = param;\n var textArea = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: \"TextArea\",\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TextAreaFrame, {\n ref,\n ...props\n })\n });\n return theme ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Theme, {\n name: theme,\n children: textArea\n }) : textArea;\n}, {\n disableTheme: true\n});\n//# sourceMappingURL=Input.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAA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L,CAAC;CACH,CAAC;CACD,OAAO,QAAwB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,YAAY,OAAO;EAC5E,MAAM;EACN,UAAU;CACZ,CAAC,IAAI;AACP,GAAG,EACD,cAAc,KAChB,CAAC"}
|
package/dist/native.cjs
CHANGED
|
@@ -15019,8 +15019,13 @@ var init_useThemeState_native = __esmMin((() => {
|
|
|
15019
15019
|
};
|
|
15020
15020
|
themeUpdateLayers = /* @__PURE__ */ new Map();
|
|
15021
15021
|
themeProviderParents = /* @__PURE__ */ new Map();
|
|
15022
|
-
registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props) {
|
|
15023
|
-
themeProviderParents.
|
|
15022
|
+
registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props, keys) {
|
|
15023
|
+
var scope = themeProviderParents.get(id);
|
|
15024
|
+
if (scope) scope.parentId = parentId;
|
|
15025
|
+
else themeProviderParents.set(id, {
|
|
15026
|
+
parentId,
|
|
15027
|
+
keys
|
|
15028
|
+
});
|
|
15024
15029
|
if (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);
|
|
15025
15030
|
else themeUpdateLayers.delete(id);
|
|
15026
15031
|
};
|
|
@@ -15053,7 +15058,7 @@ var init_useThemeState_native = __esmMin((() => {
|
|
|
15053
15058
|
};
|
|
15054
15059
|
var id = (0, react$1.useId)();
|
|
15055
15060
|
var propsKey = `${props.name || ""}${props.forceClassName || ""}${((_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.key) || ""}`;
|
|
15056
|
-
if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
|
|
15061
|
+
if (cascadeOnChange) registerThemeProviderChain(id, parentId, props, keys);
|
|
15057
15062
|
var r = (_ref = (0, react$1.useRef)(null)).current || (_ref.current = {
|
|
15058
15063
|
id,
|
|
15059
15064
|
optimizeForFirstRender,
|
|
@@ -15075,7 +15080,7 @@ var init_useThemeState_native = __esmMin((() => {
|
|
|
15075
15080
|
states.set(r.id, r.lastSnap);
|
|
15076
15081
|
r.state = r.lastSnap;
|
|
15077
15082
|
}
|
|
15078
|
-
if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
|
|
15083
|
+
if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props, r.keys);
|
|
15079
15084
|
if (r.unsubscribe && r.subscribedTo !== r.parentId) {
|
|
15080
15085
|
var _r_unsubscribe;
|
|
15081
15086
|
(_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
|
|
@@ -16519,13 +16524,12 @@ var init_resolveSizing_native = __esmMin((() => {
|
|
|
16519
16524
|
//#endregion
|
|
16520
16525
|
//#region ../../core/web/dist/esm/helpers/styledDynamic.native.js
|
|
16521
16526
|
function getFontsForLanguage(fonts, language) {
|
|
16522
|
-
if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
|
|
16523
16527
|
var next = _objectSpread2({}, fonts);
|
|
16524
16528
|
for (var name in language) {
|
|
16529
|
+
var _fonts_;
|
|
16525
16530
|
var lang = language[name];
|
|
16526
|
-
if (lang !== "default") next[name] = fonts[`${name}_${lang}`];
|
|
16531
|
+
if (lang !== "default") next[name] = (_fonts_ = fonts[`${name}_${lang}`]) !== null && _fonts_ !== void 0 ? _fonts_ : fonts[name];
|
|
16527
16532
|
}
|
|
16528
|
-
fontLanguageCache.set(language, next);
|
|
16529
16533
|
return next;
|
|
16530
16534
|
}
|
|
16531
16535
|
function isStyledDynamic(value) {
|
|
@@ -16563,14 +16567,13 @@ function getDynamicEnv(styleState) {
|
|
|
16563
16567
|
}
|
|
16564
16568
|
};
|
|
16565
16569
|
}
|
|
16566
|
-
var
|
|
16570
|
+
var bareStyledDynamic;
|
|
16567
16571
|
var init_styledDynamic_native = __esmMin((() => {
|
|
16568
16572
|
init_config_native();
|
|
16569
16573
|
init_createVariable_native();
|
|
16570
16574
|
init_resolveSizing_native();
|
|
16571
16575
|
init_types_native();
|
|
16572
16576
|
init_objectSpread2();
|
|
16573
|
-
fontLanguageCache = /* @__PURE__ */ new WeakMap();
|
|
16574
16577
|
bareStyledDynamic = { [styledDynamicSymbol]: true };
|
|
16575
16578
|
}));
|
|
16576
16579
|
//#endregion
|
|
@@ -17992,6 +17995,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
17992
17995
|
}
|
|
17993
17996
|
function configuredValue(state, property, raw) {
|
|
17994
17997
|
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
|
|
17998
|
+
var _state_context;
|
|
17995
17999
|
var grammar = getConfigRevisionState(state.conf);
|
|
17996
18000
|
var name = raw;
|
|
17997
18001
|
var opacity;
|
|
@@ -18041,14 +18045,15 @@ function configuredValue(state, property, raw) {
|
|
|
18041
18045
|
var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
|
|
18042
18046
|
var value;
|
|
18043
18047
|
var fromTheme = false;
|
|
18048
|
+
var fonts = fontProperty && ((_state_context = state.context) === null || _state_context === void 0 ? void 0 : _state_context.language) ? getDynamicEnv(state).fonts : state.conf.fontsParsed;
|
|
18044
18049
|
if (property === "fontFamily") {
|
|
18045
|
-
var
|
|
18046
|
-
value = (
|
|
18050
|
+
var _fonts_lookupName;
|
|
18051
|
+
value = (_fonts_lookupName = fonts[lookupName]) === null || _fonts_lookupName === void 0 ? void 0 : _fonts_lookupName.family;
|
|
18047
18052
|
} else {
|
|
18048
18053
|
var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
|
|
18049
18054
|
if (fontKey) {
|
|
18050
18055
|
var _font_fontKey;
|
|
18051
|
-
var font =
|
|
18056
|
+
var font = fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken];
|
|
18052
18057
|
value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
|
|
18053
18058
|
} else {
|
|
18054
18059
|
var _state_conf_tokensParsed_category;
|
|
@@ -40352,35 +40357,41 @@ var inputSize = {
|
|
|
40352
40357
|
paddingInline: "2",
|
|
40353
40358
|
paddingBlock: "1",
|
|
40354
40359
|
borderRadius: "sm",
|
|
40355
|
-
fontSize: "xs"
|
|
40360
|
+
fontSize: "xs",
|
|
40361
|
+
lineHeight: void 0
|
|
40356
40362
|
},
|
|
40357
40363
|
sm: {
|
|
40358
40364
|
paddingInline: "3",
|
|
40359
40365
|
paddingBlock: "1.5",
|
|
40360
40366
|
borderRadius: "md",
|
|
40361
|
-
fontSize: "sm"
|
|
40367
|
+
fontSize: "sm",
|
|
40368
|
+
lineHeight: void 0
|
|
40362
40369
|
},
|
|
40363
40370
|
md: {
|
|
40364
40371
|
paddingInline: "4",
|
|
40365
40372
|
paddingBlock: "2",
|
|
40366
40373
|
borderRadius: "md",
|
|
40367
|
-
fontSize: "sm"
|
|
40374
|
+
fontSize: "sm",
|
|
40375
|
+
lineHeight: void 0
|
|
40368
40376
|
},
|
|
40369
40377
|
lg: {
|
|
40370
40378
|
paddingInline: "6",
|
|
40371
40379
|
paddingBlock: "2",
|
|
40372
40380
|
borderRadius: "md",
|
|
40373
|
-
fontSize: "base"
|
|
40381
|
+
fontSize: "base",
|
|
40382
|
+
lineHeight: void 0
|
|
40374
40383
|
},
|
|
40375
40384
|
xl: {
|
|
40376
40385
|
paddingInline: "8",
|
|
40377
40386
|
paddingBlock: "2.5",
|
|
40378
40387
|
borderRadius: "lg",
|
|
40379
|
-
fontSize: "lg"
|
|
40388
|
+
fontSize: "lg",
|
|
40389
|
+
lineHeight: void 0
|
|
40380
40390
|
}
|
|
40381
40391
|
};
|
|
40382
40392
|
var inputSkin = {
|
|
40383
40393
|
fontFamily: "body",
|
|
40394
|
+
lineHeight: void 0,
|
|
40384
40395
|
color: "color",
|
|
40385
40396
|
backgroundColor: "background",
|
|
40386
40397
|
borderColor: "border-color hover:border-color-hover focus:border-color-focus",
|
|
@@ -40395,14 +40406,14 @@ var InputFrame = styled(Input$1, _objectSpread2(_objectSpread2({
|
|
|
40395
40406
|
}, inputSkin), {}, {
|
|
40396
40407
|
variants: { size: _objectSpread2(_objectSpread2({}, inputSize), {}, { true: inputSize.md }) },
|
|
40397
40408
|
defaultVariants: { size: "md" }
|
|
40398
|
-
}))
|
|
40409
|
+
}));
|
|
40399
40410
|
var TextAreaFrame = styled(TextArea$1, _objectSpread2(_objectSpread2({
|
|
40400
40411
|
displayName: "TextArea",
|
|
40401
40412
|
className: "is_TextArea"
|
|
40402
40413
|
}, inputSkin), {}, {
|
|
40403
40414
|
variants: { size: _objectSpread2(_objectSpread2({}, inputSize), {}, { true: inputSize.md }) },
|
|
40404
40415
|
defaultVariants: { size: "md" }
|
|
40405
|
-
}))
|
|
40416
|
+
}));
|
|
40406
40417
|
var Input = createStyledHOC(InputFrame, function Input(_ref, ref) {
|
|
40407
40418
|
let { theme } = _ref, props = _objectWithoutProperties(_ref, _excluded$5);
|
|
40408
40419
|
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Theme, {
|
package/dist/test.cjs
CHANGED
|
@@ -15222,8 +15222,13 @@ var init_useThemeState_native = __esmMin((() => {
|
|
|
15222
15222
|
};
|
|
15223
15223
|
themeUpdateLayers = /* @__PURE__ */ new Map();
|
|
15224
15224
|
themeProviderParents = /* @__PURE__ */ new Map();
|
|
15225
|
-
registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props) {
|
|
15226
|
-
themeProviderParents.
|
|
15225
|
+
registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props, keys) {
|
|
15226
|
+
var scope = themeProviderParents.get(id);
|
|
15227
|
+
if (scope) scope.parentId = parentId;
|
|
15228
|
+
else themeProviderParents.set(id, {
|
|
15229
|
+
parentId,
|
|
15230
|
+
keys
|
|
15231
|
+
});
|
|
15227
15232
|
if (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);
|
|
15228
15233
|
else themeUpdateLayers.delete(id);
|
|
15229
15234
|
};
|
|
@@ -15256,7 +15261,7 @@ var init_useThemeState_native = __esmMin((() => {
|
|
|
15256
15261
|
};
|
|
15257
15262
|
var id = (0, react$1.useId)();
|
|
15258
15263
|
var propsKey = `${props.name || ""}${props.forceClassName || ""}${((_props__themeUpdate = props._themeUpdate) === null || _props__themeUpdate === void 0 ? void 0 : _props__themeUpdate.key) || ""}`;
|
|
15259
|
-
if (cascadeOnChange) registerThemeProviderChain(id, parentId, props);
|
|
15264
|
+
if (cascadeOnChange) registerThemeProviderChain(id, parentId, props, keys);
|
|
15260
15265
|
var r = (_ref = (0, react$1.useRef)(null)).current || (_ref.current = {
|
|
15261
15266
|
id,
|
|
15262
15267
|
optimizeForFirstRender,
|
|
@@ -15278,7 +15283,7 @@ var init_useThemeState_native = __esmMin((() => {
|
|
|
15278
15283
|
states.set(r.id, r.lastSnap);
|
|
15279
15284
|
r.state = r.lastSnap;
|
|
15280
15285
|
}
|
|
15281
|
-
if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props);
|
|
15286
|
+
if (cascadeOnChange && !themeProviderParents.has(r.id)) registerThemeProviderChain(r.id, r.parentId, r.props, r.keys);
|
|
15282
15287
|
if (r.unsubscribe && r.subscribedTo !== r.parentId) {
|
|
15283
15288
|
var _r_unsubscribe;
|
|
15284
15289
|
(_r_unsubscribe = r.unsubscribe) === null || _r_unsubscribe === void 0 || _r_unsubscribe.call(r);
|
|
@@ -16722,13 +16727,12 @@ var init_resolveSizing_native = __esmMin((() => {
|
|
|
16722
16727
|
//#endregion
|
|
16723
16728
|
//#region ../../core/web/dist/esm/helpers/styledDynamic.native.js
|
|
16724
16729
|
function getFontsForLanguage(fonts, language) {
|
|
16725
|
-
if (fontLanguageCache.has(language)) return fontLanguageCache.get(language);
|
|
16726
16730
|
var next = _objectSpread2({}, fonts);
|
|
16727
16731
|
for (var name in language) {
|
|
16732
|
+
var _fonts_;
|
|
16728
16733
|
var lang = language[name];
|
|
16729
|
-
if (lang !== "default") next[name] = fonts[`${name}_${lang}`];
|
|
16734
|
+
if (lang !== "default") next[name] = (_fonts_ = fonts[`${name}_${lang}`]) !== null && _fonts_ !== void 0 ? _fonts_ : fonts[name];
|
|
16730
16735
|
}
|
|
16731
|
-
fontLanguageCache.set(language, next);
|
|
16732
16736
|
return next;
|
|
16733
16737
|
}
|
|
16734
16738
|
function isStyledDynamic(value) {
|
|
@@ -16766,14 +16770,13 @@ function getDynamicEnv(styleState) {
|
|
|
16766
16770
|
}
|
|
16767
16771
|
};
|
|
16768
16772
|
}
|
|
16769
|
-
var
|
|
16773
|
+
var bareStyledDynamic;
|
|
16770
16774
|
var init_styledDynamic_native = __esmMin((() => {
|
|
16771
16775
|
init_config_native();
|
|
16772
16776
|
init_createVariable_native();
|
|
16773
16777
|
init_resolveSizing_native();
|
|
16774
16778
|
init_types_native();
|
|
16775
16779
|
init_objectSpread2();
|
|
16776
|
-
fontLanguageCache = /* @__PURE__ */ new WeakMap();
|
|
16777
16780
|
bareStyledDynamic = { [styledDynamicSymbol]: true };
|
|
16778
16781
|
}));
|
|
16779
16782
|
//#endregion
|
|
@@ -18202,6 +18205,7 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
18202
18205
|
}
|
|
18203
18206
|
function configuredValue(state, property, raw) {
|
|
18204
18207
|
var embedded = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, nativeColors = arguments.length > 4 ? arguments[4] : void 0;
|
|
18208
|
+
var _state_context;
|
|
18205
18209
|
var grammar = getConfigRevisionState(state.conf);
|
|
18206
18210
|
var name = raw;
|
|
18207
18211
|
var opacity;
|
|
@@ -18251,14 +18255,15 @@ function configuredValue(state, property, raw) {
|
|
|
18251
18255
|
var lookupName = name.charCodeAt(0) === 36 ? name.slice(1) : name;
|
|
18252
18256
|
var value;
|
|
18253
18257
|
var fromTheme = false;
|
|
18258
|
+
var fonts = fontProperty && ((_state_context = state.context) === null || _state_context === void 0 ? void 0 : _state_context.language) ? getDynamicEnv(state).fonts : state.conf.fontsParsed;
|
|
18254
18259
|
if (property === "fontFamily") {
|
|
18255
|
-
var
|
|
18256
|
-
value = (
|
|
18260
|
+
var _fonts_lookupName;
|
|
18261
|
+
value = (_fonts_lookupName = fonts[lookupName]) === null || _fonts_lookupName === void 0 ? void 0 : _fonts_lookupName.family;
|
|
18257
18262
|
} else {
|
|
18258
18263
|
var fontKey = property === "fontSize" ? "size" : property === "fontWeight" ? "weight" : property === "lineHeight" || property === "letterSpacing" ? property : "";
|
|
18259
18264
|
if (fontKey) {
|
|
18260
18265
|
var _font_fontKey;
|
|
18261
|
-
var font =
|
|
18266
|
+
var font = fonts[state.fontFamily || state.conf.defaultFontToken] || fonts[state.conf.defaultFontToken];
|
|
18262
18267
|
value = font === null || font === void 0 ? void 0 : (_font_fontKey = font[fontKey]) === null || _font_fontKey === void 0 ? void 0 : _font_fontKey[lookupName];
|
|
18263
18268
|
} else {
|
|
18264
18269
|
var _state_conf_tokensParsed_category;
|
|
@@ -40468,35 +40473,41 @@ var inputSize = {
|
|
|
40468
40473
|
paddingInline: "2",
|
|
40469
40474
|
paddingBlock: "1",
|
|
40470
40475
|
borderRadius: "sm",
|
|
40471
|
-
fontSize: "xs"
|
|
40476
|
+
fontSize: "xs",
|
|
40477
|
+
lineHeight: void 0
|
|
40472
40478
|
},
|
|
40473
40479
|
sm: {
|
|
40474
40480
|
paddingInline: "3",
|
|
40475
40481
|
paddingBlock: "1.5",
|
|
40476
40482
|
borderRadius: "md",
|
|
40477
|
-
fontSize: "sm"
|
|
40483
|
+
fontSize: "sm",
|
|
40484
|
+
lineHeight: void 0
|
|
40478
40485
|
},
|
|
40479
40486
|
md: {
|
|
40480
40487
|
paddingInline: "4",
|
|
40481
40488
|
paddingBlock: "2",
|
|
40482
40489
|
borderRadius: "md",
|
|
40483
|
-
fontSize: "sm"
|
|
40490
|
+
fontSize: "sm",
|
|
40491
|
+
lineHeight: void 0
|
|
40484
40492
|
},
|
|
40485
40493
|
lg: {
|
|
40486
40494
|
paddingInline: "6",
|
|
40487
40495
|
paddingBlock: "2",
|
|
40488
40496
|
borderRadius: "md",
|
|
40489
|
-
fontSize: "base"
|
|
40497
|
+
fontSize: "base",
|
|
40498
|
+
lineHeight: void 0
|
|
40490
40499
|
},
|
|
40491
40500
|
xl: {
|
|
40492
40501
|
paddingInline: "8",
|
|
40493
40502
|
paddingBlock: "2.5",
|
|
40494
40503
|
borderRadius: "lg",
|
|
40495
|
-
fontSize: "lg"
|
|
40504
|
+
fontSize: "lg",
|
|
40505
|
+
lineHeight: void 0
|
|
40496
40506
|
}
|
|
40497
40507
|
};
|
|
40498
40508
|
var inputSkin = {
|
|
40499
40509
|
fontFamily: "body",
|
|
40510
|
+
lineHeight: void 0,
|
|
40500
40511
|
color: "color",
|
|
40501
40512
|
backgroundColor: "background",
|
|
40502
40513
|
borderColor: "border-color hover:border-color-hover focus:border-color-focus",
|
|
@@ -40511,14 +40522,14 @@ var InputFrame = styled(Input$1, _objectSpread2(_objectSpread2({
|
|
|
40511
40522
|
}, inputSkin), {}, {
|
|
40512
40523
|
variants: { size: _objectSpread2(_objectSpread2({}, inputSize), {}, { true: inputSize.md }) },
|
|
40513
40524
|
defaultVariants: { size: "md" }
|
|
40514
|
-
}))
|
|
40525
|
+
}));
|
|
40515
40526
|
var TextAreaFrame = styled(TextArea$1, _objectSpread2(_objectSpread2({
|
|
40516
40527
|
displayName: "TextArea",
|
|
40517
40528
|
className: "is_TextArea"
|
|
40518
40529
|
}, inputSkin), {}, {
|
|
40519
40530
|
variants: { size: _objectSpread2(_objectSpread2({}, inputSize), {}, { true: inputSize.md }) },
|
|
40520
40531
|
defaultVariants: { size: "md" }
|
|
40521
|
-
}))
|
|
40532
|
+
}));
|
|
40522
40533
|
var Input = createStyledHOC(InputFrame, function Input(_ref, ref) {
|
|
40523
40534
|
let { theme } = _ref, props = _objectWithoutProperties(_ref, _excluded$5);
|
|
40524
40535
|
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Theme, {
|