@hanzogui/text 3.0.1 → 7.0.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/package.json +10 -10
- package/src/Headings.tsx +6 -6
- package/src/SizableText.tsx +1 -1
- package/types/Emphasis.d.ts +3 -3
- package/types/Headings.d.ts +22 -22
- package/types/Paragraph.d.ts +4 -4
- package/types/SizableText.d.ts +4 -4
- package/types/wrapChildrenInText.d.ts +1 -1
- package/dist/cjs/Emphasis.cjs +0 -39
- package/dist/cjs/Emphasis.native.js +0 -42
- package/dist/cjs/Emphasis.native.js.map +0 -1
- package/dist/cjs/Headings.cjs +0 -125
- package/dist/cjs/Headings.native.js +0 -128
- package/dist/cjs/Headings.native.js.map +0 -1
- package/dist/cjs/Paragraph.cjs +0 -35
- package/dist/cjs/Paragraph.native.js +0 -38
- package/dist/cjs/Paragraph.native.js.map +0 -1
- package/dist/cjs/SizableText.cjs +0 -54
- package/dist/cjs/SizableText.native.js +0 -57
- package/dist/cjs/SizableText.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -23
- package/dist/cjs/index.native.js +0 -26
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/types.cjs +0 -16
- package/dist/cjs/types.native.js +0 -19
- package/dist/cjs/types.native.js.map +0 -1
- package/dist/cjs/wrapChildrenInText.cjs +0 -65
- package/dist/cjs/wrapChildrenInText.native.js +0 -71
- package/dist/cjs/wrapChildrenInText.native.js.map +0 -1
- package/dist/esm/Emphasis.mjs +0 -14
- package/dist/esm/Emphasis.mjs.map +0 -1
- package/dist/esm/Emphasis.native.js +0 -14
- package/dist/esm/Emphasis.native.js.map +0 -1
- package/dist/esm/Headings.mjs +0 -96
- package/dist/esm/Headings.mjs.map +0 -1
- package/dist/esm/Headings.native.js +0 -96
- package/dist/esm/Headings.native.js.map +0 -1
- package/dist/esm/Paragraph.mjs +0 -12
- package/dist/esm/Paragraph.mjs.map +0 -1
- package/dist/esm/Paragraph.native.js +0 -12
- package/dist/esm/Paragraph.native.js.map +0 -1
- package/dist/esm/SizableText.mjs +0 -31
- package/dist/esm/SizableText.mjs.map +0 -1
- package/dist/esm/SizableText.native.js +0 -31
- package/dist/esm/SizableText.native.js.map +0 -1
- package/dist/esm/index.js +0 -7
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs +0 -7
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -7
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/types.mjs +0 -2
- package/dist/esm/types.mjs.map +0 -1
- package/dist/esm/types.native.js +0 -2
- package/dist/esm/types.native.js.map +0 -1
- package/dist/esm/wrapChildrenInText.mjs +0 -32
- package/dist/esm/wrapChildrenInText.mjs.map +0 -1
- package/dist/esm/wrapChildrenInText.native.js +0 -34
- package/dist/esm/wrapChildrenInText.native.js.map +0 -1
- package/dist/jsx/Emphasis.mjs +0 -14
- package/dist/jsx/Emphasis.mjs.map +0 -1
- package/dist/jsx/Emphasis.native.js +0 -42
- package/dist/jsx/Emphasis.native.js.map +0 -1
- package/dist/jsx/Headings.mjs +0 -96
- package/dist/jsx/Headings.mjs.map +0 -1
- package/dist/jsx/Headings.native.js +0 -128
- package/dist/jsx/Headings.native.js.map +0 -1
- package/dist/jsx/Paragraph.mjs +0 -12
- package/dist/jsx/Paragraph.mjs.map +0 -1
- package/dist/jsx/Paragraph.native.js +0 -38
- package/dist/jsx/Paragraph.native.js.map +0 -1
- package/dist/jsx/SizableText.mjs +0 -31
- package/dist/jsx/SizableText.mjs.map +0 -1
- package/dist/jsx/SizableText.native.js +0 -57
- package/dist/jsx/SizableText.native.js.map +0 -1
- package/dist/jsx/index.js +0 -7
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs +0 -7
- package/dist/jsx/index.mjs.map +0 -1
- package/dist/jsx/index.native.js +0 -26
- package/dist/jsx/index.native.js.map +0 -1
- package/dist/jsx/types.mjs +0 -2
- package/dist/jsx/types.mjs.map +0 -1
- package/dist/jsx/types.native.js +0 -19
- package/dist/jsx/types.native.js.map +0 -1
- package/dist/jsx/wrapChildrenInText.mjs +0 -32
- package/dist/jsx/wrapChildrenInText.mjs.map +0 -1
- package/dist/jsx/wrapChildrenInText.native.js +0 -71
- package/dist/jsx/wrapChildrenInText.native.js.map +0 -1
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
23
|
-
var SizableText_exports = {};
|
|
24
|
-
__export(SizableText_exports, {
|
|
25
|
-
SizableText: () => SizableText
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(SizableText_exports);
|
|
28
|
-
var import_gui_get_font_sized = require("@hanzogui/get-font-sized"),
|
|
29
|
-
import_gui_web = require("@hanzogui/web"),
|
|
30
|
-
SizableText = (0, import_gui_web.styled)(import_gui_web.Text, {
|
|
31
|
-
name: "SizableText",
|
|
32
|
-
fontFamily: "$body",
|
|
33
|
-
variants: {
|
|
34
|
-
unstyled: {
|
|
35
|
-
false: {
|
|
36
|
-
size: "$true",
|
|
37
|
-
color: "$color"
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
size: import_gui_get_font_sized.getFontSized
|
|
41
|
-
},
|
|
42
|
-
defaultVariants: {
|
|
43
|
-
unstyled: process.env.HANZO_GUI_HEADLESS === "1"
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
SizableText.staticConfig.variants.fontFamily = {
|
|
47
|
-
"...": function (val, extras) {
|
|
48
|
-
if (val === "inherit") return {
|
|
49
|
-
fontFamily: "inherit"
|
|
50
|
-
};
|
|
51
|
-
var sizeProp = extras.props.size,
|
|
52
|
-
fontSizeProp = extras.props.fontSize,
|
|
53
|
-
size = sizeProp === "$true" && fontSizeProp ? fontSizeProp : extras.props.size || "$true";
|
|
54
|
-
return (0, import_gui_get_font_sized.getFontSized)(size, extras);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
//# sourceMappingURL=SizableText.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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_gui_get_font_sized","require","import_gui_web","styled","Text","fontFamily","variants","unstyled","false"],"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;IAAA,KACR,IAAAC,IAAU,IAAAD,GAAA,EAAAZ,SACD,CAAAW,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAAA;EAAAC,WACC,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;IAAA,IAAAF,IACN,WAAOA,IAAA,uBAAAA,IAAA,qBACT,IAAAG,GAAA,IAAAhB,iBAAA,CAAAa,IAAA,GACF,CAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,IAAAnB,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;IAAA,OAEAE,EAAM;EAAA;AACR,IAEAM,YAAA,GAAiBC,GAAA,IAAAR,WAAA,CAAAhB,SAAA;EAAAyB,KAAA;AAAA,IAAAD,GAAA;AAAA,IACfE,mBAAkB,GAAI;AAAuBhB,QAC/C,CAAAgB,mBAAA;EACDC,WAAA,EAAAA,CAAA,KAAAA;AAID;AAAgDC,MAC9C,CAAAC,OAAQ,GAAKN,YAAW,CAAAG,mBAAA;AAEtB,IAAAI,yBAAY,GAAAC,OAAA;EAAAC,cAAA,GAAAD,OAAA;EAAAJ,WAAA,OAAAK,cAAA,CAAAC,MAAA,EAAAD,cAAA,CAAAE,IAAA;IACVrB,IAAA,eAAS;IAGXsB,UAAM,SAAW;IAMjBC,QAAA,EAAO;MACTC,QAAA;QACFC,KAAA","ignoreList":[]}
|
package/dist/jsx/index.js
DELETED
package/dist/jsx/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/jsx/index.mjs
DELETED
package/dist/jsx/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc","ignoreList":[]}
|
package/dist/jsx/index.native.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
-
get: () => from[key],
|
|
10
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
-
});
|
|
12
|
-
return to;
|
|
13
|
-
},
|
|
14
|
-
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value: !0
|
|
17
|
-
}), mod);
|
|
18
|
-
var index_exports = {};
|
|
19
|
-
module.exports = __toCommonJS(index_exports);
|
|
20
|
-
__reExport(index_exports, require("./Emphasis.native.js"), module.exports);
|
|
21
|
-
__reExport(index_exports, require("./SizableText.native.js"), module.exports);
|
|
22
|
-
__reExport(index_exports, require("./Paragraph.native.js"), module.exports);
|
|
23
|
-
__reExport(index_exports, require("./Headings.native.js"), module.exports);
|
|
24
|
-
__reExport(index_exports, require("./wrapChildrenInText.native.js"), module.exports);
|
|
25
|
-
__reExport(index_exports, require("./types.native.js"), module.exports);
|
|
26
|
-
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__copyProps","to","from","except","desc"],"sources":["../../src/index.tsx"],"sourcesContent":[null],"mappings":"AAAA;;AACA,IAAAA,SAAA,GAAcC,MAAA,CAAAC,cAAA;AACd,IAAAC,gBAAc,GAAAF,MAAA,CAAAG,wBAAA;AACd,IAAAC,iBAAc,GAAAJ,MAAA,CAAAK,mBAAA;AACd,IAAAC,YAAc,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AACd,IAAAC,WAAc,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA","ignoreList":[]}
|
package/dist/jsx/types.mjs
DELETED
package/dist/jsx/types.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|
package/dist/jsx/types.native.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
-
get: () => from[key],
|
|
10
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
-
});
|
|
12
|
-
return to;
|
|
13
|
-
};
|
|
14
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
-
value: !0
|
|
16
|
-
}), mod);
|
|
17
|
-
var types_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(types_exports);
|
|
19
|
-
//# sourceMappingURL=types.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
4
|
-
const {
|
|
5
|
-
children,
|
|
6
|
-
textProps,
|
|
7
|
-
size,
|
|
8
|
-
noTextWrap,
|
|
9
|
-
color,
|
|
10
|
-
fontFamily,
|
|
11
|
-
fontSize,
|
|
12
|
-
fontWeight,
|
|
13
|
-
letterSpacing,
|
|
14
|
-
textAlign,
|
|
15
|
-
fontStyle,
|
|
16
|
-
maxFontSizeMultiplier
|
|
17
|
-
} = propsIn;
|
|
18
|
-
if (noTextWrap || !children) return [children];
|
|
19
|
-
const props = {
|
|
20
|
-
...extraProps
|
|
21
|
-
};
|
|
22
|
-
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), React.Children.toArray(children).map((child, index) => typeof child == "string" ?
|
|
23
|
-
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
jsx(TextComponent, {
|
|
26
|
-
...props,
|
|
27
|
-
...textProps,
|
|
28
|
-
children: child
|
|
29
|
-
}, index) : child);
|
|
30
|
-
}
|
|
31
|
-
export { wrapChildrenInText };
|
|
32
|
-
//# sourceMappingURL=wrapChildrenInText.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EACjB,OAAO,CAACA,QAAQ;EAGlB,MAAMY,KAAA,GAAQ;IACZ,GAAGb;EACL;EAGA,OAAIK,KAAA,KAAOQ,KAAA,CAAMR,KAAA,GAAQA,KAAA,GACrBC,UAAA,KAAYO,KAAA,CAAMP,UAAA,GAAaA,UAAA,GAC/BC,QAAA,KAAUM,KAAA,CAAMN,QAAA,GAAWA,QAAA,GAC3BC,UAAA,KAAYK,KAAA,CAAML,UAAA,GAAaA,UAAA,GAC/BC,aAAA,KAAeI,KAAA,CAAMJ,aAAA,GAAgBA,aAAA,GACrCC,SAAA,KAAWG,KAAA,CAAMH,SAAA,GAAYA,SAAA,GAC7BP,IAAA,KAAMU,KAAA,CAAMV,IAAA,GAAOA,IAAA,GACnBQ,SAAA,KAAWE,KAAA,CAAMF,SAAA,GAAYA,SAAA,GAC7BC,qBAAA,KAAuBC,KAAA,CAAMD,qBAAA,GAAwBA,qBAAA,GAElDjB,KAAA,CAAMmB,QAAA,CAASC,OAAA,CAAQd,QAAQ,EAAEe,GAAA,CAAI,CAACC,KAAA,EAAOC,KAAA,KAC3C,OAAOD,KAAA,IAAU;EAAA;EAEtB;EAAArB,GAAA,CAACE,aAAA;IAA2B,GAAGe,KAAA;IAAQ,GAAGX,SAAA;IACvCD,QAAA,EAAAgB;EAAA,GADiBC,KAEpB,IAEAD,KAEH;AACH","ignoreList":[]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __defProp = Object.defineProperty;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
-
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __export = (target, all) => {
|
|
10
|
-
for (var name in all) __defProp(target, name, {
|
|
11
|
-
get: all[name],
|
|
12
|
-
enumerable: !0
|
|
13
|
-
});
|
|
14
|
-
},
|
|
15
|
-
__copyProps = (to, from, except, desc) => {
|
|
16
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
-
get: () => from[key],
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
return to;
|
|
21
|
-
};
|
|
22
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
-
value: mod,
|
|
29
|
-
enumerable: !0
|
|
30
|
-
}) : target, mod)),
|
|
31
|
-
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
-
value: !0
|
|
33
|
-
}), mod);
|
|
34
|
-
var wrapChildrenInText_exports = {};
|
|
35
|
-
__export(wrapChildrenInText_exports, {
|
|
36
|
-
wrapChildrenInText: () => wrapChildrenInText
|
|
37
|
-
});
|
|
38
|
-
module.exports = __toCommonJS(wrapChildrenInText_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
-
import_react = __toESM(require("react"), 1);
|
|
41
|
-
function wrapChildrenInText(TextComponent, propsIn, extraProps) {
|
|
42
|
-
var {
|
|
43
|
-
children,
|
|
44
|
-
textProps,
|
|
45
|
-
size,
|
|
46
|
-
noTextWrap,
|
|
47
|
-
color,
|
|
48
|
-
fontFamily,
|
|
49
|
-
fontSize,
|
|
50
|
-
fontWeight,
|
|
51
|
-
letterSpacing,
|
|
52
|
-
textAlign,
|
|
53
|
-
fontStyle,
|
|
54
|
-
maxFontSizeMultiplier
|
|
55
|
-
} = propsIn;
|
|
56
|
-
if (noTextWrap || !children) return [children];
|
|
57
|
-
var props = {
|
|
58
|
-
...extraProps
|
|
59
|
-
};
|
|
60
|
-
return color && (props.color = color), fontFamily && (props.fontFamily = fontFamily), fontSize && (props.fontSize = fontSize), fontWeight && (props.fontWeight = fontWeight), letterSpacing && (props.letterSpacing = letterSpacing), textAlign && (props.textAlign = textAlign), size && (props.size = size), fontStyle && (props.fontStyle = fontStyle), maxFontSizeMultiplier && (props.maxFontSizeMultiplier = maxFontSizeMultiplier), import_react.default.Children.toArray(children).map(function (child, index) {
|
|
61
|
-
return typeof child == "string" ?
|
|
62
|
-
// so "data-disable-theme" is a hack to fix themeInverse, don't ask me why
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
(0, import_jsx_runtime.jsx)(TextComponent, {
|
|
65
|
-
...props,
|
|
66
|
-
...textProps,
|
|
67
|
-
children: child
|
|
68
|
-
}, index) : child;
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=wrapChildrenInText.native.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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;EAAAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAAA,IACAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;IAAA,KACA,IAAAC,IAAA,IAAAD,GAAA,EACAb,SAAA,CAAAY,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAAA;EAAAC,WACA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;IAAA,IACAF,IAAA,WAAAA,IAAA,uBAAAA,IAAA,gBACA,SAAAG,GAAA,IAAAlB,iBAAA,CAAAe,IAAA,GACA,CAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,IAAApB,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;IAAA,OACAE,EAAA;EAAA;AACA,IACAM,OAAA,GAAAA,CAAAC,GAAA,EAAAC,UAAA,EAAAd,MAAA,MAAAA,MAAA,GAAAa,GAAA,WAAA5B,QAAA,CAAAS,YAAA,CAAAmB,GAAA,SAAAR,WAAA;EACF;EAEA;EACE;EAGF;EAAcS,UACT,KAAAD,GAAA,KAAAA,GAAA,CAAAE,UAAA,GAAA3B,SAAA,CAAAY,MAAA;IAAAgB,KAAA,EAAAH,GAAA;IAAAT,UAAA;EAAA,KAAAJ,MAAA,EACLa,GAGA;EAAAI,YAAI,GAAOJ,GAAA,IAAMR,WAAQ,CAAAjB,SACrB,iBAAkB;IAAA4B,KAAa;EAAA,IAAAH,GAAA,CAC/B;AASsB,IAAAK,0BAAA;AAAAnB,QAEtB,CAAAmB,0BAAC;EAEDC,kBAIH,EAAAA,CAAA,KAAAA;AACH","ignoreList":[]}
|