@hanzogui/text 3.0.2 → 7.3.0
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/LICENSE +40 -19
- package/dist/cjs/Emphasis.cjs +24 -22
- package/dist/cjs/Emphasis.native.js +24 -22
- package/dist/cjs/Emphasis.native.js.map +1 -1
- package/dist/cjs/Headings.cjs +94 -92
- package/dist/cjs/Headings.native.js +94 -92
- package/dist/cjs/Headings.native.js.map +1 -1
- package/dist/cjs/Paragraph.cjs +15 -13
- package/dist/cjs/Paragraph.native.js +22 -20
- package/dist/cjs/Paragraph.native.js.map +1 -1
- package/dist/cjs/SizableText.cjs +26 -22
- package/dist/cjs/SizableText.native.js +38 -34
- package/dist/cjs/SizableText.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/wrapChildrenInText.cjs +47 -32
- package/dist/cjs/wrapChildrenInText.native.js +40 -27
- package/dist/cjs/wrapChildrenInText.native.js.map +1 -1
- package/dist/esm/Emphasis.mjs +10 -10
- package/dist/esm/Emphasis.mjs.map +1 -1
- package/dist/esm/Emphasis.native.js +10 -10
- package/dist/esm/Emphasis.native.js.map +1 -1
- package/dist/esm/Headings.mjs +79 -79
- package/dist/esm/Headings.mjs.map +1 -1
- package/dist/esm/Headings.native.js +79 -79
- package/dist/esm/Headings.native.js.map +1 -1
- package/dist/esm/SizableText.mjs +9 -7
- package/dist/esm/SizableText.mjs.map +1 -1
- package/dist/esm/SizableText.native.js +9 -7
- package/dist/esm/SizableText.native.js.map +1 -1
- package/dist/esm/wrapChildrenInText.mjs +22 -9
- package/dist/esm/wrapChildrenInText.mjs.map +1 -1
- package/dist/esm/wrapChildrenInText.native.js +14 -3
- package/dist/esm/wrapChildrenInText.native.js.map +1 -1
- package/dist/jsx/Emphasis.mjs +10 -10
- package/dist/jsx/Emphasis.mjs.map +1 -1
- package/dist/jsx/Emphasis.native.js +24 -22
- package/dist/jsx/Emphasis.native.js.map +1 -1
- package/dist/jsx/Headings.mjs +79 -79
- package/dist/jsx/Headings.mjs.map +1 -1
- package/dist/jsx/Headings.native.js +94 -92
- package/dist/jsx/Headings.native.js.map +1 -1
- package/dist/jsx/Paragraph.native.js +22 -20
- package/dist/jsx/Paragraph.native.js.map +1 -1
- package/dist/jsx/SizableText.mjs +9 -7
- package/dist/jsx/SizableText.mjs.map +1 -1
- package/dist/jsx/SizableText.native.js +38 -34
- package/dist/jsx/SizableText.native.js.map +1 -1
- package/dist/jsx/index.native.js +7 -5
- package/dist/jsx/types.native.js +7 -5
- package/dist/jsx/wrapChildrenInText.mjs +22 -9
- package/dist/jsx/wrapChildrenInText.mjs.map +1 -1
- package/dist/jsx/wrapChildrenInText.native.js +40 -27
- package/dist/jsx/wrapChildrenInText.native.js.map +1 -1
- package/package.json +12 -10
- package/src/Headings.tsx +6 -6
- package/src/SizableText.tsx +1 -1
- package/types/Emphasis.d.ts +3 -3
- package/types/Emphasis.d.ts.map +1 -0
- package/types/Headings.d.ts +22 -22
- package/types/Headings.d.ts.map +1 -0
- package/types/Paragraph.d.ts +4 -4
- package/types/Paragraph.d.ts.map +1 -0
- package/types/SizableText.d.ts +4 -4
- package/types/SizableText.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/types.d.ts.map +1 -0
- package/types/wrapChildrenInText.d.ts +2 -2
- package/types/wrapChildrenInText.d.ts.map +1 -0
|
@@ -5,53 +5,57 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value:
|
|
23
|
+
value: true
|
|
22
24
|
}), mod);
|
|
23
25
|
var SizableText_exports = {};
|
|
24
26
|
__export(SizableText_exports, {
|
|
25
27
|
SizableText: () => SizableText
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(SizableText_exports);
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
size: import_gui_get_font_sized.getFontSized
|
|
30
|
+
var import_get_font_sized = require("@hanzogui/get-font-sized");
|
|
31
|
+
var import_web = require("@hanzogui/web");
|
|
32
|
+
var SizableText = (0, import_web.styled)(import_web.Text, {
|
|
33
|
+
name: "SizableText",
|
|
34
|
+
fontFamily: "$body",
|
|
35
|
+
variants: {
|
|
36
|
+
unstyled: {
|
|
37
|
+
false: {
|
|
38
|
+
size: "$true",
|
|
39
|
+
color: "$color"
|
|
40
|
+
}
|
|
41
41
|
},
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
size: import_get_font_sized.getFontSized
|
|
43
|
+
},
|
|
44
|
+
defaultVariants: {
|
|
45
|
+
unstyled: process.env.GUI_HEADLESS === "1"
|
|
46
|
+
}
|
|
47
|
+
});
|
|
46
48
|
SizableText.staticConfig.variants.fontFamily = {
|
|
47
49
|
"...": function (val, extras) {
|
|
48
|
-
if (val === "inherit")
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
if (val === "inherit") {
|
|
51
|
+
return {
|
|
52
|
+
fontFamily: "inherit"
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var sizeProp = extras.props["size"];
|
|
56
|
+
var fontSizeProp = extras.props["fontSize"];
|
|
57
|
+
var size = sizeProp === "$true" && fontSizeProp ? fontSizeProp : extras.props["size"] || "$true";
|
|
58
|
+
return (0, import_get_font_sized.getFontSized)(size, extras);
|
|
55
59
|
}
|
|
56
60
|
};
|
|
57
61
|
//# sourceMappingURL=SizableText.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","SizableText_exports","SizableText","module","exports","
|
|
1
|
+
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toCommonJS","mod","value","SizableText_exports","SizableText","module","exports","import_get_font_sized","require","import_web","styled","Text","fontFamily","variants"],"sources":["../../src/SizableText.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AAET,IAAAA,SAAS,GAAMC,MAAA,CAAAC,cAAc;AAEtB,IAAAC,gBAAoB,GAAAF,MAAO,CAAAG,wBAAM;AAAA,IACtCC,iBAAM,GAAAJ,MAAA,CAAAK,mBAAA;AAAA,IACNC,YAAY,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAAA,IAEZC,QAAU,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,KACR,IAAAC,IAAU,IAAAD,GAAA,EAAAZ,SACD,CAAAW,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACC,IAAAC,WACC,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACTF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IACF,SAAAG,GAAA,IAAAhB,iBAAA,CAAAa,IAAA,GAEA,IAAM,CAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EACRnB,SAAA,CAAAiB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAjB,gBAAA,CAAAe,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EAEA;EAAiB,OACfE,EAAA;AAAuC;AAE3C,IAACM,YAAA,GAAAC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAID,IAAAE,mBAAY,GAAa;AAAuBhB,QAC9C,CAAOgB,mBAAiB;EAEtBC,WAAI,EAAAA,CAAA,KAAQA;AACV;AAA+BC,MACjC,CAAAC,OAAA,GAAAN,YAAA,CAAAG,mBAAA;AAEA,IAAAI,qBAAiB,GAAOC,OAAM,2BAAM;AACpC,IAAAC,UAAM,GAAAD,OAAA,CAAe,eAAa;AAClC,IAAAJ,WAAM,GACJ,IAAAK,UAAa,CAAAC,MAAA,EAAWD,UAAA,CAAAE,IACpB;EAENrB,IAAA,eAAO;EACTsB,UAAA;EACFC,QAAA","ignoreList":[]}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
package/dist/jsx/types.native.js
CHANGED
|
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
12
14
|
return to;
|
|
13
15
|
};
|
|
14
16
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
-
value:
|
|
17
|
+
value: true
|
|
16
18
|
}), mod);
|
|
17
19
|
var types_exports = {};
|
|
18
20
|
module.exports = __toCommonJS(types_exports);
|
|
@@ -15,18 +15,31 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
15
15
|
fontStyle,
|
|
16
16
|
maxFontSizeMultiplier
|
|
17
17
|
} = propsIn;
|
|
18
|
-
if (noTextWrap || !children)
|
|
18
|
+
if (noTextWrap || !children) {
|
|
19
|
+
return [children];
|
|
20
|
+
}
|
|
19
21
|
const props = {
|
|
20
22
|
...extraProps
|
|
21
23
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
if (color) props.color = color;
|
|
25
|
+
if (fontFamily) props.fontFamily = fontFamily;
|
|
26
|
+
if (fontSize) props.fontSize = fontSize;
|
|
27
|
+
if (fontWeight) props.fontWeight = fontWeight;
|
|
28
|
+
if (letterSpacing) props.letterSpacing = letterSpacing;
|
|
29
|
+
if (textAlign) props.textAlign = textAlign;
|
|
30
|
+
if (size) props.size = size;
|
|
31
|
+
if (fontStyle) props.fontStyle = fontStyle;
|
|
32
|
+
if (maxFontSizeMultiplier) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
33
|
+
return React.Children.toArray(children).map((child, index) => {
|
|
34
|
+
return typeof child === "string" ?
|
|
35
|
+
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
36
|
+
/* @__PURE__ */
|
|
37
|
+
jsx(TextComponent, {
|
|
38
|
+
...props,
|
|
39
|
+
...textProps,
|
|
40
|
+
children: child
|
|
41
|
+
}, index) : child;
|
|
42
|
+
});
|
|
30
43
|
}
|
|
31
44
|
export { wrapChildrenInText };
|
|
32
45
|
//# sourceMappingURL=wrapChildrenInText.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","jsx","wrapChildrenInText","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","maxFontSizeMultiplier","props","Children","toArray","map","child","index"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"AACA,OAAOA,KAAA,MAAW;AAqDZ,SAAAC,GAAA;AA5CC,SAASC,mBACdC,aAAA,EACAC,OAAA,EAGAC,UAAA,EACA;EACA,MAAM;IACJC,QAAA;IACAC,SAAA;IACAC,IAAA;IACAC,UAAA;IACAC,KAAA;IACAC,UAAA;IACAC,QAAA;IACAC,UAAA;IACAC,aAAA;IACAC,SAAA;IACAC,SAAA;IACAC;EACF,IAAIb,OAAA;EAEJ,IAAIK,UAAA,IAAc,CAACH,QAAA,
|
|
1
|
+
{"version":3,"names":["React","jsx","wrapChildrenInText","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","maxFontSizeMultiplier","props","Children","toArray","map","child","index"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"AACA,OAAOA,KAAA,MAAW;AAqDZ,SAAAC,GAAA;AA5CC,SAASC,mBACdC,aAAA,EACAC,OAAA,EAGAC,UAAA,EACA;EACA,MAAM;IACJC,QAAA;IACAC,SAAA;IACAC,IAAA;IACAC,UAAA;IACAC,KAAA;IACAC,UAAA;IACAC,QAAA;IACAC,UAAA;IACAC,aAAA;IACAC,SAAA;IACAC,SAAA;IACAC;EACF,IAAIb,OAAA;EAEJ,IAAIK,UAAA,IAAc,CAACH,QAAA,EAAU;IAC3B,OAAO,CAACA,QAAQ;EAClB;EAEA,MAAMY,KAAA,GAAQ;IACZ,GAAGb;EACL;EAGA,IAAIK,KAAA,EAAOQ,KAAA,CAAMR,KAAA,GAAQA,KAAA;EACzB,IAAIC,UAAA,EAAYO,KAAA,CAAMP,UAAA,GAAaA,UAAA;EACnC,IAAIC,QAAA,EAAUM,KAAA,CAAMN,QAAA,GAAWA,QAAA;EAC/B,IAAIC,UAAA,EAAYK,KAAA,CAAML,UAAA,GAAaA,UAAA;EACnC,IAAIC,aAAA,EAAeI,KAAA,CAAMJ,aAAA,GAAgBA,aAAA;EACzC,IAAIC,SAAA,EAAWG,KAAA,CAAMH,SAAA,GAAYA,SAAA;EACjC,IAAIP,IAAA,EAAMU,KAAA,CAAMV,IAAA,GAAOA,IAAA;EACvB,IAAIQ,SAAA,EAAWE,KAAA,CAAMF,SAAA,GAAYA,SAAA;EACjC,IAAIC,qBAAA,EAAuBC,KAAA,CAAMD,qBAAA,GAAwBA,qBAAA;EAEzD,OAAOjB,KAAA,CAAMmB,QAAA,CAASC,OAAA,CAAQd,QAAQ,EAAEe,GAAA,CAAI,CAACC,KAAA,EAAOC,KAAA,KAAU;IAC5D,OAAO,OAAOD,KAAA,KAAU;IAAA;IAEtB;IAAArB,GAAA,CAACE,aAAA;MAA2B,GAAGe,KAAA;MAAQ,GAAGX,SAAA;MACvCD,QAAA,EAAAgB;IAAA,GADiBC,KAEpB,IAEAD,KAAA;EAEJ,CAAC;AACH","ignoreList":[]}
|
|
@@ -4,40 +4,42 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var wrapChildrenInText_exports = {};
|
|
35
37
|
__export(wrapChildrenInText_exports, {
|
|
36
38
|
wrapChildrenInText: () => wrapChildrenInText
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(wrapChildrenInText_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
40
|
-
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var import_react = __toESM(require("react"), 1);
|
|
41
43
|
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
42
44
|
var {
|
|
43
45
|
children,
|
|
@@ -53,12 +55,23 @@ function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
|
53
55
|
fontStyle,
|
|
54
56
|
maxFontSizeMultiplier
|
|
55
57
|
} = propsIn;
|
|
56
|
-
if (noTextWrap || !children)
|
|
58
|
+
if (noTextWrap || !children) {
|
|
59
|
+
return [children];
|
|
60
|
+
}
|
|
57
61
|
var props = {
|
|
58
62
|
...extraProps
|
|
59
63
|
};
|
|
60
|
-
|
|
61
|
-
|
|
64
|
+
if (color) props.color = color;
|
|
65
|
+
if (fontFamily) props.fontFamily = fontFamily;
|
|
66
|
+
if (fontSize) props.fontSize = fontSize;
|
|
67
|
+
if (fontWeight) props.fontWeight = fontWeight;
|
|
68
|
+
if (letterSpacing) props.letterSpacing = letterSpacing;
|
|
69
|
+
if (textAlign) props.textAlign = textAlign;
|
|
70
|
+
if (size) props.size = size;
|
|
71
|
+
if (fontStyle) props.fontStyle = fontStyle;
|
|
72
|
+
if (maxFontSizeMultiplier) props.maxFontSizeMultiplier = maxFontSizeMultiplier;
|
|
73
|
+
return import_react.default.Children.toArray(children).map(function (child, index) {
|
|
74
|
+
return typeof child === "string" ?
|
|
62
75
|
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
63
76
|
/* @__PURE__ */
|
|
64
77
|
(0, import_jsx_runtime.jsx)(TextComponent, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","wrapChildrenInText_exports","wrapChildrenInText"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAO;;AAqDD,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA;AA5CC,IAAAC,SAAS,GAAAF,MAAA,CAAAG,cACd;AAMA,IAAAC,gBAAM,GAAAJ,MAAA,CAAAK,wBAAA;AAAA,IACJC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAAA,IACAC,YAAA,GAAAR,MAAA,CAAAS,cAAA;
|
|
1
|
+
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","wrapChildrenInText_exports","wrapChildrenInText","module","exports","import_jsx_runtime","require","import_react","TextComponent","propsIn","extraProps","children","textProps","size","noTextWrap","color","fontFamily","fontSize","fontWeight","letterSpacing","textAlign","fontStyle","maxFontSizeMultiplier"],"sources":["../../src/wrapChildrenInText.tsx"],"sourcesContent":[null],"mappings":"AACA,YAAO;;AAqDD,IAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA;AA5CC,IAAAC,SAAS,GAAAF,MAAA,CAAAG,cACd;AAMA,IAAAC,gBAAM,GAAAJ,MAAA,CAAAK,wBAAA;AAAA,IACJC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAAA,IACAC,YAAA,GAAAR,MAAA,CAAAS,cAAA;AAAA,IACAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAAA,IACAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAAA,KACA,IAAAC,IAAA,IAAAD,GAAA,EACAb,SAAA,CAAAY,MAAA,EAAAE,IAAA;IAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;IAAAE,UAAA;EAAA;AAAA;AACA,IACAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;EAAA,IACAF,IAAA,WAAAA,IAAA,wBAAAA,IAAA;IACA,SAAAG,GAAA,IAAAlB,iBAAA,CAAAe,IAAA,GACA,KAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EACApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAnB,gBAAA,CAAAiB,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;EACF;EAEA,OAAIE,EAAA;AACF;AAAgB,IAClBM,OAAA,GAAAA,CAAAC,GAAA,EAAAC,UAAA,EAAAd,MAAA,MAAAA,MAAA,GAAAa,GAAA,WAAA5B,QAAA,CAAAS,YAAA,CAAAmB,GAAA,SAAAR,WAAA;AAEA;AAAc;AAEd;AAGA;AACAS,UAAI,KAAYD,GAAA,IAAM,CAAAA,GAAA,CAAAE,UAAa,GAAA3B,SAAA,CAAAY,MAAA;EAAAgB,KAAA,EAAAH,GAAA;EAAAT,UAAA;AAAA,KAAAJ,MAAA,EACnCa,GACA;AACA,IAAAI,YAAI,GAAeJ,GAAA,IAAMR,WAAA,CAAAjB,SAAgB;EAAA4B,KAAA;AAAA,IAAAH,GAAA;AACzC,IAAAK,0BAAqB,KAAY;AACjCnB,QAAI,CAAAmB,0BAAmB;EACvBC,kBAAe,EAAAA,CAAA,KAAMA;AACrB;AAEAC,MAAA,CAAAC,OAAO,GAAMJ,YAAS,CAAAC,0BAA8B;AAClD,IAAAI,kBAAc,GAAAC,OAAU;AAAA,IAAAC,YAAA,GAAAZ,OAAA,CAAAW,OAAA;AAAA,SAEtBJ,kBAACA,CAAAM,aAAA,EAA2BC,OAAG,EAAAC,UAAW;EAE1C;IAEAC,QAAA;IAAAC,SAAA;IAAAC,IAAA;IAAAC,UAAA;IAAAC,KAAA;IAAAC,UAAA;IAAAC,QAAA;IAAAC,UAAA;IAAAC,aAAA;IAAAC,SAAA;IAAAC,SAAA;IAAAC;EAAA,IAAAb,OAAA;EAEJ,IAACK,UAAA,KAAAH,QAAA;IACH,Q","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/text",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"files": [
|
|
@@ -31,22 +31,24 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
|
-
"build": "
|
|
35
|
-
"watch": "
|
|
36
|
-
"clean": "
|
|
37
|
-
"clean:build": "
|
|
34
|
+
"build": "gui-build",
|
|
35
|
+
"watch": "gui-build --watch",
|
|
36
|
+
"clean": "gui-build clean",
|
|
37
|
+
"clean:build": "gui-build clean:build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@hanzogui/get-font-sized": "3.0
|
|
41
|
-
"@hanzogui/helpers": "3.0
|
|
42
|
-
"@hanzogui/web": "3.0
|
|
40
|
+
"@hanzogui/get-font-sized": "7.3.0",
|
|
41
|
+
"@hanzogui/component-helpers": "7.3.0",
|
|
42
|
+
"@hanzogui/web": "7.3.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@hanzogui/build": "3.0
|
|
45
|
+
"@hanzogui/build": "7.3.0",
|
|
46
46
|
"react": ">=19"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"react": ">=19"
|
|
50
50
|
},
|
|
51
|
-
"module:jsx": "dist/jsx"
|
|
51
|
+
"module:jsx": "dist/jsx",
|
|
52
|
+
"license": "BSD-3-Clause",
|
|
53
|
+
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
52
54
|
}
|
package/src/Headings.tsx
CHANGED
|
@@ -27,7 +27,7 @@ export const H1 = styled(Heading, {
|
|
|
27
27
|
} as const,
|
|
28
28
|
|
|
29
29
|
defaultVariants: {
|
|
30
|
-
unstyled: process.env.
|
|
30
|
+
unstyled: process.env.GUI_HEADLESS === '1' ? true : false,
|
|
31
31
|
},
|
|
32
32
|
})
|
|
33
33
|
|
|
@@ -44,7 +44,7 @@ export const H2 = styled(Heading, {
|
|
|
44
44
|
} as const,
|
|
45
45
|
|
|
46
46
|
defaultVariants: {
|
|
47
|
-
unstyled: process.env.
|
|
47
|
+
unstyled: process.env.GUI_HEADLESS === '1' ? true : false,
|
|
48
48
|
},
|
|
49
49
|
})
|
|
50
50
|
|
|
@@ -61,7 +61,7 @@ export const H3 = styled(Heading, {
|
|
|
61
61
|
} as const,
|
|
62
62
|
|
|
63
63
|
defaultVariants: {
|
|
64
|
-
unstyled: process.env.
|
|
64
|
+
unstyled: process.env.GUI_HEADLESS === '1' ? true : false,
|
|
65
65
|
},
|
|
66
66
|
})
|
|
67
67
|
|
|
@@ -78,7 +78,7 @@ export const H4 = styled(Heading, {
|
|
|
78
78
|
} as const,
|
|
79
79
|
|
|
80
80
|
defaultVariants: {
|
|
81
|
-
unstyled: process.env.
|
|
81
|
+
unstyled: process.env.GUI_HEADLESS === '1' ? true : false,
|
|
82
82
|
},
|
|
83
83
|
})
|
|
84
84
|
|
|
@@ -95,7 +95,7 @@ export const H5 = styled(Heading, {
|
|
|
95
95
|
} as const,
|
|
96
96
|
|
|
97
97
|
defaultVariants: {
|
|
98
|
-
unstyled: process.env.
|
|
98
|
+
unstyled: process.env.GUI_HEADLESS === '1' ? true : false,
|
|
99
99
|
},
|
|
100
100
|
})
|
|
101
101
|
|
|
@@ -112,6 +112,6 @@ export const H6 = styled(Heading, {
|
|
|
112
112
|
} as const,
|
|
113
113
|
|
|
114
114
|
defaultVariants: {
|
|
115
|
-
unstyled: process.env.
|
|
115
|
+
unstyled: process.env.GUI_HEADLESS === '1' ? true : false,
|
|
116
116
|
},
|
|
117
117
|
})
|
package/src/SizableText.tsx
CHANGED
package/types/Emphasis.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const Strong: import("@
|
|
2
|
-
export declare const Span: import("@
|
|
3
|
-
export declare const Em: import("@
|
|
1
|
+
export declare const Strong: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {}, import("@hanzogui/web").StaticConfigPublic>;
|
|
2
|
+
export declare const Span: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {}, import("@hanzogui/web").StaticConfigPublic>;
|
|
3
|
+
export declare const Em: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {}, import("@hanzogui/web").StaticConfigPublic>;
|
|
4
4
|
//# sourceMappingURL=Emphasis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Emphasis.d.ts","sourceRoot":"","sources":["../src/Emphasis.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,wPAGjB,CAAA;AAEF,eAAO,MAAM,IAAI,wPAEf,CAAA;AAEF,eAAO,MAAM,EAAE,wPAGb,CAAA"}
|
package/types/Headings.d.ts
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type { GetProps } from '@
|
|
2
|
-
export declare const Heading: import("@
|
|
1
|
+
import type { GetProps } from '@hanzogui/web';
|
|
2
|
+
export declare const Heading: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
3
3
|
unstyled?: boolean | undefined;
|
|
4
|
-
size?: import("@
|
|
5
|
-
}, import("@
|
|
4
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
5
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
6
6
|
export type HeadingProps = GetProps<typeof Heading>;
|
|
7
|
-
export declare const H1: import("@
|
|
7
|
+
export declare const H1: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
8
8
|
unstyled?: boolean | undefined;
|
|
9
|
-
size?: import("@
|
|
10
|
-
}, import("@
|
|
11
|
-
export declare const H2: import("@
|
|
9
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
10
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
11
|
+
export declare const H2: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
12
12
|
unstyled?: boolean | undefined;
|
|
13
|
-
size?: import("@
|
|
14
|
-
}, import("@
|
|
15
|
-
export declare const H3: import("@
|
|
13
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
14
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
15
|
+
export declare const H3: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
16
16
|
unstyled?: boolean | undefined;
|
|
17
|
-
size?: import("@
|
|
18
|
-
}, import("@
|
|
19
|
-
export declare const H4: import("@
|
|
17
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
18
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
19
|
+
export declare const H4: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
20
20
|
unstyled?: boolean | undefined;
|
|
21
|
-
size?: import("@
|
|
22
|
-
}, import("@
|
|
23
|
-
export declare const H5: import("@
|
|
21
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
22
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
23
|
+
export declare const H5: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
24
24
|
unstyled?: boolean | undefined;
|
|
25
|
-
size?: import("@
|
|
26
|
-
}, import("@
|
|
27
|
-
export declare const H6: import("@
|
|
25
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
26
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
27
|
+
export declare const H6: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
28
28
|
unstyled?: boolean | undefined;
|
|
29
|
-
size?: import("@
|
|
30
|
-
}, import("@
|
|
29
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
30
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
31
31
|
//# sourceMappingURL=Headings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Headings.d.ts","sourceRoot":"","sources":["../src/Headings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAK7C,eAAO,MAAM,OAAO;;;8CAOlB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAA;AAEnD,eAAO,MAAM,EAAE;;;8CAeb,CAAA;AAEF,eAAO,MAAM,EAAE;;;8CAeb,CAAA;AAEF,eAAO,MAAM,EAAE;;;8CAeb,CAAA;AAEF,eAAO,MAAM,EAAE;;;8CAeb,CAAA;AAEF,eAAO,MAAM,EAAE;;;8CAeb,CAAA;AAEF,eAAO,MAAM,EAAE;;;8CAeb,CAAA"}
|
package/types/Paragraph.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { GetProps } from '@
|
|
2
|
-
export declare const Paragraph: import("@
|
|
1
|
+
import type { GetProps } from '@hanzogui/web';
|
|
2
|
+
export declare const Paragraph: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
3
3
|
unstyled?: boolean | undefined;
|
|
4
|
-
size?: import("@
|
|
5
|
-
}, import("@
|
|
4
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
5
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
6
6
|
export type ParagraphProps = GetProps<typeof Paragraph>;
|
|
7
7
|
//# sourceMappingURL=Paragraph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paragraph.d.ts","sourceRoot":"","sources":["../src/Paragraph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAK7C,eAAO,MAAM,SAAS;;;8CAOpB,CAAA;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
package/types/SizableText.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { GetProps } from '@
|
|
2
|
-
export declare const SizableText: import("@
|
|
1
|
+
import type { GetProps } from '@hanzogui/web';
|
|
2
|
+
export declare const SizableText: import("@hanzogui/web").GuiComponent<import("@hanzogui/web").TamaDefer, import("@hanzogui/web").GuiTextElement, import("@hanzogui/web").TextNonStyleProps, import("@hanzogui/web").TextStylePropsBase, {
|
|
3
3
|
unstyled?: boolean | undefined;
|
|
4
|
-
size?: import("@
|
|
5
|
-
}, import("@
|
|
4
|
+
size?: import("@hanzogui/web").FontSizeTokens | undefined;
|
|
5
|
+
}, import("@hanzogui/web").StaticConfigPublic>;
|
|
6
6
|
export type SizableTextProps = GetProps<typeof SizableText>;
|
|
7
7
|
//# sourceMappingURL=SizableText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SizableText.d.ts","sourceRoot":"","sources":["../src/SizableText.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAG7C,eAAO,MAAM,WAAW;;;8CAkBtB,CAAA;AAqBF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,SAAS,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAErD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;IACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC3C,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAA;IACvC,UAAU,CAAC,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACzC,aAAa,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;IACjD,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACzC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAA;IACvC,qBAAqB,CAAC,EAAE,MAAM,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,GAAG;IAEjD,SAAS,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAA;IACrC,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SizeTokens } from '@
|
|
1
|
+
import type { SizeTokens } from '@hanzogui/web';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { TextParentStyles } from './types';
|
|
4
4
|
type Props = TextParentStyles & {
|
|
@@ -7,6 +7,6 @@ type Props = TextParentStyles & {
|
|
|
7
7
|
};
|
|
8
8
|
export declare function wrapChildrenInText(TextComponent: any, propsIn: Props & {
|
|
9
9
|
unstyled?: boolean;
|
|
10
|
-
}, extraProps?: Record<string, any>): React.ReactNode[] | (number | bigint | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> |
|
|
10
|
+
}, extraProps?: Record<string, any>): React.ReactNode[] | (number | bigint | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element)[];
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=wrapChildrenInText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapChildrenInText.d.ts","sourceRoot":"","sources":["../src/wrapChildrenInText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAE/C,KAAK,KAAK,GAAG,gBAAgB,GAAG;IAC9B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB,CAAA;AAED,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,GAAG,EAClB,OAAO,EAAE,KAAK,GAAG;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,EACD,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,qRA8CjC"}
|