@mekari/pixel3-text 0.0.15 → 0.0.16-dev.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/dist/{chunk-F77YUOGV.mjs → chunk-2LM6U2FA.mjs} +10 -4
- package/dist/{chunk-MZIUREHG.mjs → chunk-44P6O5OW.mjs} +1 -1
- package/dist/index.js +10 -4
- package/dist/index.mjs +2 -2
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/modules/text.props.d.mts +1 -1
- package/dist/modules/text.props.d.ts +1 -1
- package/dist/modules/text.props.js +1 -1
- package/dist/modules/text.props.mjs +1 -1
- package/dist/text.d.mts +3 -3
- package/dist/text.d.ts +3 -3
- package/dist/text.js +10 -4
- package/dist/text.mjs +2 -2
- package/package.json +3 -3
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__name,
|
|
3
3
|
textProps
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-44P6O5OW.mjs";
|
|
5
5
|
|
|
6
6
|
// src/text.tsx
|
|
7
7
|
import { createVNode as _createVNode, isVNode as _isVNode } from "vue";
|
|
8
8
|
import { defineComponent, computed } from "vue";
|
|
9
9
|
import { token } from "@mekari/pixel3-styled-system/tokens";
|
|
10
10
|
import { textRecipe } from "@mekari/pixel3-styled-system/recipes";
|
|
11
|
+
import { usePixelTheme } from "@mekari/pixel3-utils";
|
|
11
12
|
function _isSlot(s) {
|
|
12
13
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !_isVNode(s);
|
|
13
14
|
}
|
|
@@ -18,6 +19,9 @@ var MpText = defineComponent({
|
|
|
18
19
|
setup(props, {
|
|
19
20
|
slots
|
|
20
21
|
}) {
|
|
22
|
+
const {
|
|
23
|
+
isNextTheme
|
|
24
|
+
} = usePixelTheme();
|
|
21
25
|
const classes = computed(() => {
|
|
22
26
|
return textRecipe({
|
|
23
27
|
size: props.size,
|
|
@@ -40,13 +44,15 @@ var MpText = defineComponent({
|
|
|
40
44
|
isStrike,
|
|
41
45
|
isTextLink
|
|
42
46
|
} = props;
|
|
47
|
+
const propColor = token(`colors.${color}`) || color;
|
|
48
|
+
const defaultColor = token(`colors.${isNextTheme.value ? "text.default" : "dark"}`);
|
|
43
49
|
return _createVNode(Component, {
|
|
44
50
|
"class": classes.value,
|
|
45
51
|
"data-pixel-component": "MpText",
|
|
46
|
-
"data-text-strike": isStrike
|
|
47
|
-
"data-text-link": isTextLink
|
|
52
|
+
"data-text-strike": isStrike || void 0,
|
|
53
|
+
"data-text-link": isTextLink || void 0,
|
|
48
54
|
"style": {
|
|
49
|
-
"--mp-text-color":
|
|
55
|
+
"--mp-text-color": propColor || defaultColor,
|
|
50
56
|
...handleStyleTruncate()
|
|
51
57
|
}
|
|
52
58
|
}, _isSlot(children) ? children : {
|
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var textProps = {
|
|
|
47
47
|
},
|
|
48
48
|
color: {
|
|
49
49
|
type: String,
|
|
50
|
-
default: "
|
|
50
|
+
default: ""
|
|
51
51
|
},
|
|
52
52
|
lineClamp: {
|
|
53
53
|
type: String,
|
|
@@ -65,6 +65,7 @@ var textProps = {
|
|
|
65
65
|
};
|
|
66
66
|
|
|
67
67
|
// src/text.tsx
|
|
68
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
68
69
|
function _isSlot(s) {
|
|
69
70
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue.isVNode)(s);
|
|
70
71
|
}
|
|
@@ -75,6 +76,9 @@ var MpText = (0, import_vue2.defineComponent)({
|
|
|
75
76
|
setup(props, {
|
|
76
77
|
slots
|
|
77
78
|
}) {
|
|
79
|
+
const {
|
|
80
|
+
isNextTheme
|
|
81
|
+
} = (0, import_pixel3_utils.usePixelTheme)();
|
|
78
82
|
const classes = (0, import_vue2.computed)(() => {
|
|
79
83
|
return (0, import_recipes.textRecipe)({
|
|
80
84
|
size: props.size,
|
|
@@ -97,13 +101,15 @@ var MpText = (0, import_vue2.defineComponent)({
|
|
|
97
101
|
isStrike,
|
|
98
102
|
isTextLink
|
|
99
103
|
} = props;
|
|
104
|
+
const propColor = (0, import_tokens.token)(`colors.${color}`) || color;
|
|
105
|
+
const defaultColor = (0, import_tokens.token)(`colors.${isNextTheme.value ? "text.default" : "dark"}`);
|
|
100
106
|
return (0, import_vue.createVNode)(Component, {
|
|
101
107
|
"class": classes.value,
|
|
102
108
|
"data-pixel-component": "MpText",
|
|
103
|
-
"data-text-strike": isStrike
|
|
104
|
-
"data-text-link": isTextLink
|
|
109
|
+
"data-text-strike": isStrike || void 0,
|
|
110
|
+
"data-text-link": isTextLink || void 0,
|
|
105
111
|
"style": {
|
|
106
|
-
"--mp-text-color":
|
|
112
|
+
"--mp-text-color": propColor || defaultColor,
|
|
107
113
|
...handleStyleTruncate()
|
|
108
114
|
}
|
|
109
115
|
}, _isSlot(children) ? children : {
|
package/dist/index.mjs
CHANGED
package/dist/metafile-cjs.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/text.props.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/text.props.ts":{"bytes":859,"imports":[{"path":"../modules/text.type","kind":"import-statement","external":true}],"format":"esm"},"src/text.tsx":{"bytes":1984,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/text.props.ts","kind":"import-statement","original":"./modules/text.props"},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":117,"imports":[{"path":"src/text.tsx","kind":"import-statement","original":"./text"}],"format":"esm"},"src/modules/text.type.ts":{"bytes":239,"imports":[],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":117},"src/text.tsx":{"bytesInOutput":1915},"src/modules/text.props.ts":{"bytesInOutput":401}},"bytes":3503},"dist/text.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/text.tsx","inputs":{"src/text.tsx":{"bytesInOutput":2035},"src/modules/text.props.ts":{"bytesInOutput":401}},"bytes":3489},"dist/modules/text.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/text.props.ts","inputs":{"src/modules/text.props.ts":{"bytesInOutput":545}},"bytes":1477},"dist/modules/text.type.js":{"imports":[],"exports":[],"entryPoint":"src/modules/text.type.ts","inputs":{"src/modules/text.type.ts":{"bytesInOutput":78}},"bytes":778}}}
|
package/dist/metafile-esm.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/modules/text.props.ts":{"bytes":
|
|
1
|
+
{"inputs":{"src/modules/text.props.ts":{"bytes":859,"imports":[{"path":"../modules/text.type","kind":"import-statement","external":true}],"format":"esm"},"src/text.tsx":{"bytes":1984,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/text.props.ts","kind":"import-statement","original":"./modules/text.props"},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":117,"imports":[{"path":"src/text.tsx","kind":"import-statement","original":"./text"}],"format":"esm"},"src/modules/text.type.ts":{"bytes":239,"imports":[],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-2LM6U2FA.mjs","kind":"import-statement"},{"path":"dist/chunk-44P6O5OW.mjs","kind":"import-statement"}],"exports":["MpText"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":101},"dist/text.mjs":{"imports":[{"path":"dist/chunk-2LM6U2FA.mjs","kind":"import-statement"},{"path":"dist/chunk-44P6O5OW.mjs","kind":"import-statement"}],"exports":["MpText"],"entryPoint":"src/text.tsx","inputs":{},"bytes":101},"dist/chunk-2LM6U2FA.mjs":{"imports":[{"path":"dist/chunk-44P6O5OW.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"exports":["MpText"],"inputs":{"src/text.tsx":{"bytesInOutput":1807}},"bytes":1908},"dist/modules/text.props.mjs":{"imports":[{"path":"dist/chunk-44P6O5OW.mjs","kind":"import-statement"}],"exports":["textProps"],"entryPoint":"src/modules/text.props.ts","inputs":{},"bytes":77},"dist/chunk-44P6O5OW.mjs":{"imports":[],"exports":["__name","textProps"],"inputs":{"src/modules/text.props.ts":{"bytesInOutput":401}},"bytes":595},"dist/modules/text.type.mjs":{"imports":[],"exports":[],"entryPoint":"src/modules/text.type.ts","inputs":{"src/modules/text.type.ts":{"bytesInOutput":0}},"bytes":0}}}
|
package/dist/text.d.mts
CHANGED
|
@@ -18,7 +18,7 @@ declare const MpText: vue.DefineComponent<{
|
|
|
18
18
|
default: string;
|
|
19
19
|
};
|
|
20
20
|
color: {
|
|
21
|
-
type: vue.PropType<
|
|
21
|
+
type: vue.PropType<_mekari_pixel3_utils.CombinedString | ColorToken>;
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
24
|
lineClamp: {
|
|
@@ -48,7 +48,7 @@ declare const MpText: vue.DefineComponent<{
|
|
|
48
48
|
default: string;
|
|
49
49
|
};
|
|
50
50
|
color: {
|
|
51
|
-
type: vue.PropType<
|
|
51
|
+
type: vue.PropType<_mekari_pixel3_utils.CombinedString | ColorToken>;
|
|
52
52
|
default: string;
|
|
53
53
|
};
|
|
54
54
|
lineClamp: {
|
|
@@ -68,7 +68,7 @@ declare const MpText: vue.DefineComponent<{
|
|
|
68
68
|
as: keyof HTMLElementTagNameMap;
|
|
69
69
|
size: FontSize;
|
|
70
70
|
weight: FontWeight;
|
|
71
|
-
color:
|
|
71
|
+
color: _mekari_pixel3_utils.CombinedString | ColorToken;
|
|
72
72
|
lineClamp: string;
|
|
73
73
|
isTruncated: boolean;
|
|
74
74
|
isStrike: boolean;
|
package/dist/text.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ declare const MpText: vue.DefineComponent<{
|
|
|
18
18
|
default: string;
|
|
19
19
|
};
|
|
20
20
|
color: {
|
|
21
|
-
type: vue.PropType<
|
|
21
|
+
type: vue.PropType<_mekari_pixel3_utils.CombinedString | ColorToken>;
|
|
22
22
|
default: string;
|
|
23
23
|
};
|
|
24
24
|
lineClamp: {
|
|
@@ -48,7 +48,7 @@ declare const MpText: vue.DefineComponent<{
|
|
|
48
48
|
default: string;
|
|
49
49
|
};
|
|
50
50
|
color: {
|
|
51
|
-
type: vue.PropType<
|
|
51
|
+
type: vue.PropType<_mekari_pixel3_utils.CombinedString | ColorToken>;
|
|
52
52
|
default: string;
|
|
53
53
|
};
|
|
54
54
|
lineClamp: {
|
|
@@ -68,7 +68,7 @@ declare const MpText: vue.DefineComponent<{
|
|
|
68
68
|
as: keyof HTMLElementTagNameMap;
|
|
69
69
|
size: FontSize;
|
|
70
70
|
weight: FontWeight;
|
|
71
|
-
color:
|
|
71
|
+
color: _mekari_pixel3_utils.CombinedString | ColorToken;
|
|
72
72
|
lineClamp: string;
|
|
73
73
|
isTruncated: boolean;
|
|
74
74
|
isStrike: boolean;
|
package/dist/text.js
CHANGED
|
@@ -45,7 +45,7 @@ var textProps = {
|
|
|
45
45
|
},
|
|
46
46
|
color: {
|
|
47
47
|
type: String,
|
|
48
|
-
default: "
|
|
48
|
+
default: ""
|
|
49
49
|
},
|
|
50
50
|
lineClamp: {
|
|
51
51
|
type: String,
|
|
@@ -63,6 +63,7 @@ var textProps = {
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
// src/text.tsx
|
|
66
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
66
67
|
function _isSlot(s) {
|
|
67
68
|
return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !(0, import_vue.isVNode)(s);
|
|
68
69
|
}
|
|
@@ -73,6 +74,9 @@ var MpText = (0, import_vue2.defineComponent)({
|
|
|
73
74
|
setup(props, {
|
|
74
75
|
slots
|
|
75
76
|
}) {
|
|
77
|
+
const {
|
|
78
|
+
isNextTheme
|
|
79
|
+
} = (0, import_pixel3_utils.usePixelTheme)();
|
|
76
80
|
const classes = (0, import_vue2.computed)(() => {
|
|
77
81
|
return (0, import_recipes.textRecipe)({
|
|
78
82
|
size: props.size,
|
|
@@ -95,13 +99,15 @@ var MpText = (0, import_vue2.defineComponent)({
|
|
|
95
99
|
isStrike,
|
|
96
100
|
isTextLink
|
|
97
101
|
} = props;
|
|
102
|
+
const propColor = (0, import_tokens.token)(`colors.${color}`) || color;
|
|
103
|
+
const defaultColor = (0, import_tokens.token)(`colors.${isNextTheme.value ? "text.default" : "dark"}`);
|
|
98
104
|
return (0, import_vue.createVNode)(Component, {
|
|
99
105
|
"class": classes.value,
|
|
100
106
|
"data-pixel-component": "MpText",
|
|
101
|
-
"data-text-strike": isStrike
|
|
102
|
-
"data-text-link": isTextLink
|
|
107
|
+
"data-text-strike": isStrike || void 0,
|
|
108
|
+
"data-text-link": isTextLink || void 0,
|
|
103
109
|
"style": {
|
|
104
|
-
"--mp-text-color":
|
|
110
|
+
"--mp-text-color": propColor || defaultColor,
|
|
105
111
|
...handleStyleTruncate()
|
|
106
112
|
}
|
|
107
113
|
}, _isSlot(children) ? children : {
|
package/dist/text.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mekari/pixel3-text",
|
|
3
3
|
"description": "Text component for mekari pixel 3",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.16-dev.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
8
8
|
"dist"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@mekari/pixel3-
|
|
12
|
-
"@mekari/pixel3-
|
|
11
|
+
"@mekari/pixel3-utils": "0.0.7-dev.0",
|
|
12
|
+
"@mekari/pixel3-styled-system": "0.1.2-dev.0"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
15
|
"vue": "^3.4.9"
|