@mekari/pixel3-rating 0.0.1-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-5G32PRK5.mjs +138 -0
- package/dist/chunk-BCGH7ZIH.mjs +0 -0
- package/dist/chunk-KTMGMPBN.mjs +37 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-TMJBERQJ.mjs +69 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +253 -0
- package/dist/index.mjs +10 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/rating.hooks.d.mts +29 -0
- package/dist/modules/rating.hooks.d.ts +29 -0
- package/dist/modules/rating.hooks.js +159 -0
- package/dist/modules/rating.hooks.mjs +7 -0
- package/dist/modules/rating.props.d.mts +40 -0
- package/dist/modules/rating.props.d.ts +40 -0
- package/dist/modules/rating.props.js +62 -0
- package/dist/modules/rating.props.mjs +9 -0
- package/dist/modules/rating.types.d.mts +3 -0
- package/dist/modules/rating.types.d.ts +3 -0
- package/dist/modules/rating.types.js +18 -0
- package/dist/modules/rating.types.mjs +1 -0
- package/dist/rating.d.mts +75 -0
- package/dist/rating.d.ts +75 -0
- package/dist/rating.js +251 -0
- package/dist/rating.mjs +9 -0
- package/package.json +42 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modules/rating.hooks.ts
|
|
22
|
+
var rating_hooks_exports = {};
|
|
23
|
+
__export(rating_hooks_exports, {
|
|
24
|
+
useRating: () => useRating
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(rating_hooks_exports);
|
|
27
|
+
var import_vue = require("vue");
|
|
28
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
29
|
+
var import_recipes = require("@mekari/pixel3-styled-system/recipes");
|
|
30
|
+
var import_tokens = require("@mekari/pixel3-styled-system/tokens");
|
|
31
|
+
var ICON_STAR_PATH = "M11.9977 1.25C13.0469 1.25 13.8734 2.04226 14.4011 3.11146L16.1635 6.66513C16.217 6.77509 16.3436 6.92995 16.5341 7.07161C16.7243 7.21313 16.9106 7.2912 17.0332 7.3118L20.2232 7.84612C21.3754 8.03972 22.3412 8.60445 22.6548 9.58788C22.968 10.5705 22.5091 11.5915 21.6805 12.4216L21.6796 12.4225L19.2014 14.9209C19.1032 15.0199 18.9932 15.2065 18.9242 15.4495C18.8556 15.6908 18.8496 15.9106 18.8806 16.0527L19.5901 19.1454C19.8841 20.4318 19.7867 21.7073 18.8794 22.3742C17.969 23.0433 16.7249 22.7467 15.5946 22.0736L12.6043 20.289C12.4787 20.214 12.263 20.1532 12.0027 20.1532C11.7444 20.1532 11.5242 20.2132 11.3904 20.2909L8.40401 22.0732C7.27505 22.7487 6.03249 23.04 5.12202 22.3702C4.21532 21.7032 4.11294 20.43 4.40795 19.1447L5.11725 16.0527C5.14833 15.9107 5.14225 15.6908 5.07371 15.4495C5.00471 15.2065 4.89469 15.0199 4.79646 14.9209L2.31646 12.4207C1.49318 11.5907 1.03566 10.5704 1.34645 9.58923C1.65814 8.60521 2.62207 8.03979 3.77504 7.84606L6.96334 7.31202C7.08022 7.29177 7.26382 7.21456 7.45365 7.07266C7.64381 6.93051 7.77081 6.77532 7.82434 6.66513L9.58704 3.11094L9.58773 3.10954C10.1205 2.04102 10.9496 1.25 11.9977 1.25Z";
|
|
32
|
+
var ICON_HEART_PATH = "M7.56 2.25C4.06443 2.25 1.25 5.12533 1.25 8.65281C1.25 12.4387 2.98665 15.4297 5.06285 17.5808C7.12835 19.7209 9.57334 21.078 11.132 21.6168C11.4072 21.7143 11.7221 21.75 12 21.75C12.2779 21.75 12.5928 21.7143 12.868 21.6168C14.4267 21.078 16.8716 19.7209 18.9371 17.5808C21.0133 15.4297 22.75 12.4387 22.75 8.65281C22.75 5.12533 19.9356 2.25 16.44 2.25C15.2736 2.25 14.2461 2.85744 13.4328 3.55225C12.8969 4.01011 12.4142 4.54017 12.0004 5.04802C11.5876 4.54051 11.1064 4.01049 10.5714 3.55265C9.75846 2.85694 8.73097 2.25 7.56 2.25Z";
|
|
33
|
+
function useRating(props, emit) {
|
|
34
|
+
const {
|
|
35
|
+
id,
|
|
36
|
+
color,
|
|
37
|
+
modelValue,
|
|
38
|
+
maxValue,
|
|
39
|
+
variant,
|
|
40
|
+
isReadOnly
|
|
41
|
+
} = (0, import_vue.toRefs)(props);
|
|
42
|
+
const getId = id.value || (0, import_pixel3_utils.getUniqueId)("", "rating").value;
|
|
43
|
+
const iconWidth = (0, import_vue.ref)("0%");
|
|
44
|
+
const rating = (0, import_vue.ref)(0);
|
|
45
|
+
const rootAttrs = (0, import_vue.computed)(() => {
|
|
46
|
+
return {
|
|
47
|
+
"data-pixel-component": "MpRating",
|
|
48
|
+
id: getId,
|
|
49
|
+
class: (0, import_recipes.ratingSlotRecipe)().root,
|
|
50
|
+
style: {
|
|
51
|
+
cursor: isReadOnly.value ? "default" : "pointer"
|
|
52
|
+
},
|
|
53
|
+
onMouseleave: handleMouseLeave
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
const wrapperAttrs = (0, import_vue.computed)(() => {
|
|
57
|
+
return {
|
|
58
|
+
class: (0, import_recipes.ratingSlotRecipe)().wrapper
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
const valueAttrs = (0, import_vue.computed)(() => {
|
|
62
|
+
return {
|
|
63
|
+
class: (0, import_recipes.ratingSlotRecipe)().value
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
const backgroundIconWrapperAttrs = (0, import_vue.computed)(() => {
|
|
67
|
+
return {
|
|
68
|
+
id: `${getId}--background-icon-wrapper`,
|
|
69
|
+
class: (0, import_recipes.ratingSlotRecipe)().backgroundIconWrapper
|
|
70
|
+
};
|
|
71
|
+
});
|
|
72
|
+
const activeIconWrapperAttrs = (0, import_vue.computed)(() => {
|
|
73
|
+
return {
|
|
74
|
+
id: `${getId}--active-icon-wrapper`,
|
|
75
|
+
class: (0, import_recipes.ratingSlotRecipe)().activeIconWrapper,
|
|
76
|
+
style: {
|
|
77
|
+
width: iconWidth.value
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
const iconAttrs = /* @__PURE__ */ __name((i) => {
|
|
82
|
+
const propColor = (0, import_tokens.token)(`colors.${color.value}`) || color.value;
|
|
83
|
+
return {
|
|
84
|
+
id: `${getId}--icon-${i}`,
|
|
85
|
+
key: `icon-${i}`,
|
|
86
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
87
|
+
viewBox: "0 0 24 24",
|
|
88
|
+
innerHTML: `<path d="${getVariant.value}" fill="currentColor" />`,
|
|
89
|
+
"data-variant": variant.value,
|
|
90
|
+
style: {
|
|
91
|
+
color: propColor
|
|
92
|
+
},
|
|
93
|
+
onClick: () => handleClick(i),
|
|
94
|
+
onMouseenter: () => handleMMouseEnter(i)
|
|
95
|
+
};
|
|
96
|
+
}, "iconAttrs");
|
|
97
|
+
const getVariant = (0, import_vue.computed)(() => {
|
|
98
|
+
if (variant.value === "heart") {
|
|
99
|
+
return ICON_HEART_PATH;
|
|
100
|
+
}
|
|
101
|
+
return ICON_STAR_PATH;
|
|
102
|
+
});
|
|
103
|
+
function handleWidth(value) {
|
|
104
|
+
const result = value / maxValue.value * 100;
|
|
105
|
+
if (value > maxValue.value) {
|
|
106
|
+
iconWidth.value = "100%";
|
|
107
|
+
} else if (value < 0) {
|
|
108
|
+
iconWidth.value = "0%";
|
|
109
|
+
} else {
|
|
110
|
+
iconWidth.value = `${result}%`;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
__name(handleWidth, "handleWidth");
|
|
114
|
+
function handleClick(i) {
|
|
115
|
+
if (isReadOnly.value) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
rating.value = i + 1;
|
|
119
|
+
emit("click-rating", rating.value);
|
|
120
|
+
emit("update:modelValue", rating.value);
|
|
121
|
+
}
|
|
122
|
+
__name(handleClick, "handleClick");
|
|
123
|
+
function handleMMouseEnter(i) {
|
|
124
|
+
if (isReadOnly.value) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
rating.value = i + 1;
|
|
128
|
+
handleWidth(rating.value);
|
|
129
|
+
emit("hover-rating", rating.value);
|
|
130
|
+
}
|
|
131
|
+
__name(handleMMouseEnter, "handleMMouseEnter");
|
|
132
|
+
function handleMouseLeave() {
|
|
133
|
+
if (isReadOnly.value) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
rating.value = modelValue.value;
|
|
137
|
+
handleWidth(rating.value);
|
|
138
|
+
emit("hover-rating", rating.value);
|
|
139
|
+
}
|
|
140
|
+
__name(handleMouseLeave, "handleMouseLeave");
|
|
141
|
+
(0, import_vue.watch)(() => modelValue.value, (newValue) => {
|
|
142
|
+
handleWidth(newValue);
|
|
143
|
+
}, {
|
|
144
|
+
immediate: true
|
|
145
|
+
});
|
|
146
|
+
return {
|
|
147
|
+
rootAttrs,
|
|
148
|
+
wrapperAttrs,
|
|
149
|
+
valueAttrs,
|
|
150
|
+
backgroundIconWrapperAttrs,
|
|
151
|
+
activeIconWrapperAttrs,
|
|
152
|
+
iconAttrs
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
__name(useRating, "useRating");
|
|
156
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
157
|
+
0 && (module.exports = {
|
|
158
|
+
useRating
|
|
159
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
import { RatingVariant } from './rating.types.mjs';
|
|
3
|
+
import { ColorToken } from '@mekari/pixel3-styled-system/tokens';
|
|
4
|
+
import { CombinedString } from '@mekari/pixel3-utils';
|
|
5
|
+
|
|
6
|
+
declare const ratingProps: {
|
|
7
|
+
id: {
|
|
8
|
+
type: PropType<string>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: PropType<number>;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
maxValue: {
|
|
16
|
+
type: PropType<number>;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
variant: {
|
|
20
|
+
type: PropType<RatingVariant>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
color: {
|
|
24
|
+
type: PropType<ColorToken | CombinedString>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
isShowValue: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
isReadOnly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
declare const ratingEmit: readonly ["click-rating", "hover-rating", "update:modelValue"];
|
|
37
|
+
type RatingProps = ExtractPropTypes<typeof ratingProps>;
|
|
38
|
+
type RatingEmits = (event: (typeof ratingEmit)[number], value?: unknown, value2?: unknown) => void;
|
|
39
|
+
|
|
40
|
+
export { RatingEmits, RatingProps, ratingEmit, ratingProps };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { PropType, ExtractPropTypes } from 'vue';
|
|
2
|
+
import { RatingVariant } from './rating.types.js';
|
|
3
|
+
import { ColorToken } from '@mekari/pixel3-styled-system/tokens';
|
|
4
|
+
import { CombinedString } from '@mekari/pixel3-utils';
|
|
5
|
+
|
|
6
|
+
declare const ratingProps: {
|
|
7
|
+
id: {
|
|
8
|
+
type: PropType<string>;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
modelValue: {
|
|
12
|
+
type: PropType<number>;
|
|
13
|
+
default: number;
|
|
14
|
+
};
|
|
15
|
+
maxValue: {
|
|
16
|
+
type: PropType<number>;
|
|
17
|
+
default: number;
|
|
18
|
+
};
|
|
19
|
+
variant: {
|
|
20
|
+
type: PropType<RatingVariant>;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
color: {
|
|
24
|
+
type: PropType<ColorToken | CombinedString>;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
isShowValue: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
isReadOnly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
declare const ratingEmit: readonly ["click-rating", "hover-rating", "update:modelValue"];
|
|
37
|
+
type RatingProps = ExtractPropTypes<typeof ratingProps>;
|
|
38
|
+
type RatingEmits = (event: (typeof ratingEmit)[number], value?: unknown, value2?: unknown) => void;
|
|
39
|
+
|
|
40
|
+
export { RatingEmits, RatingProps, ratingEmit, ratingProps };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/modules/rating.props.ts
|
|
21
|
+
var rating_props_exports = {};
|
|
22
|
+
__export(rating_props_exports, {
|
|
23
|
+
ratingEmit: () => ratingEmit,
|
|
24
|
+
ratingProps: () => ratingProps
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(rating_props_exports);
|
|
27
|
+
var ratingProps = {
|
|
28
|
+
id: {
|
|
29
|
+
type: String,
|
|
30
|
+
default: ""
|
|
31
|
+
},
|
|
32
|
+
modelValue: {
|
|
33
|
+
type: Number,
|
|
34
|
+
default: 2
|
|
35
|
+
},
|
|
36
|
+
maxValue: {
|
|
37
|
+
type: Number,
|
|
38
|
+
default: 5
|
|
39
|
+
},
|
|
40
|
+
variant: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "star"
|
|
43
|
+
},
|
|
44
|
+
color: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: ""
|
|
47
|
+
},
|
|
48
|
+
isShowValue: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
51
|
+
},
|
|
52
|
+
isReadOnly: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var ratingEmit = ["click-rating", "hover-rating", "update:modelValue"];
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
ratingEmit,
|
|
61
|
+
ratingProps
|
|
62
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/modules/rating.types.ts
|
|
17
|
+
var rating_types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(rating_types_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "../chunk-BCGH7ZIH.mjs";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as _mekari_pixel3_utils from '@mekari/pixel3-utils';
|
|
3
|
+
import * as _mekari_pixel3_styled_system_tokens from '@mekari/pixel3-styled-system/tokens';
|
|
4
|
+
import { RatingVariant } from './modules/rating.types.mjs';
|
|
5
|
+
import * as vue from 'vue';
|
|
6
|
+
|
|
7
|
+
declare const MpRating: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
8
|
+
id: {
|
|
9
|
+
type: vue.PropType<string>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: vue.PropType<number>;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
maxValue: {
|
|
17
|
+
type: vue.PropType<number>;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: vue.PropType<RatingVariant>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
color: {
|
|
25
|
+
type: vue.PropType<_mekari_pixel3_styled_system_tokens.ColorToken | _mekari_pixel3_utils.CombinedString>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
isShowValue: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
isReadOnly: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
37
|
+
id: {
|
|
38
|
+
type: vue.PropType<string>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: vue.PropType<number>;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
maxValue: {
|
|
46
|
+
type: vue.PropType<number>;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
variant: {
|
|
50
|
+
type: vue.PropType<RatingVariant>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
color: {
|
|
54
|
+
type: vue.PropType<_mekari_pixel3_styled_system_tokens.ColorToken | _mekari_pixel3_utils.CombinedString>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
isShowValue: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
isReadOnly: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
}>> & Readonly<{}>, {
|
|
66
|
+
id: string;
|
|
67
|
+
modelValue: number;
|
|
68
|
+
maxValue: number;
|
|
69
|
+
variant: RatingVariant;
|
|
70
|
+
color: _mekari_pixel3_styled_system_tokens.ColorToken | _mekari_pixel3_utils.CombinedString;
|
|
71
|
+
isShowValue: boolean;
|
|
72
|
+
isReadOnly: boolean;
|
|
73
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
74
|
+
|
|
75
|
+
export { MpRating };
|
package/dist/rating.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as vue_jsx_runtime from 'vue/jsx-runtime';
|
|
2
|
+
import * as _mekari_pixel3_utils from '@mekari/pixel3-utils';
|
|
3
|
+
import * as _mekari_pixel3_styled_system_tokens from '@mekari/pixel3-styled-system/tokens';
|
|
4
|
+
import { RatingVariant } from './modules/rating.types.js';
|
|
5
|
+
import * as vue from 'vue';
|
|
6
|
+
|
|
7
|
+
declare const MpRating: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
8
|
+
id: {
|
|
9
|
+
type: vue.PropType<string>;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: vue.PropType<number>;
|
|
14
|
+
default: number;
|
|
15
|
+
};
|
|
16
|
+
maxValue: {
|
|
17
|
+
type: vue.PropType<number>;
|
|
18
|
+
default: number;
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: vue.PropType<RatingVariant>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
color: {
|
|
25
|
+
type: vue.PropType<_mekari_pixel3_styled_system_tokens.ColorToken | _mekari_pixel3_utils.CombinedString>;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
28
|
+
isShowValue: {
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
default: boolean;
|
|
31
|
+
};
|
|
32
|
+
isReadOnly: {
|
|
33
|
+
type: BooleanConstructor;
|
|
34
|
+
default: boolean;
|
|
35
|
+
};
|
|
36
|
+
}>, () => vue_jsx_runtime.JSX.Element, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
37
|
+
id: {
|
|
38
|
+
type: vue.PropType<string>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
modelValue: {
|
|
42
|
+
type: vue.PropType<number>;
|
|
43
|
+
default: number;
|
|
44
|
+
};
|
|
45
|
+
maxValue: {
|
|
46
|
+
type: vue.PropType<number>;
|
|
47
|
+
default: number;
|
|
48
|
+
};
|
|
49
|
+
variant: {
|
|
50
|
+
type: vue.PropType<RatingVariant>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
color: {
|
|
54
|
+
type: vue.PropType<_mekari_pixel3_styled_system_tokens.ColorToken | _mekari_pixel3_utils.CombinedString>;
|
|
55
|
+
default: string;
|
|
56
|
+
};
|
|
57
|
+
isShowValue: {
|
|
58
|
+
type: BooleanConstructor;
|
|
59
|
+
default: boolean;
|
|
60
|
+
};
|
|
61
|
+
isReadOnly: {
|
|
62
|
+
type: BooleanConstructor;
|
|
63
|
+
default: boolean;
|
|
64
|
+
};
|
|
65
|
+
}>> & Readonly<{}>, {
|
|
66
|
+
id: string;
|
|
67
|
+
modelValue: number;
|
|
68
|
+
maxValue: number;
|
|
69
|
+
variant: RatingVariant;
|
|
70
|
+
color: _mekari_pixel3_styled_system_tokens.ColorToken | _mekari_pixel3_utils.CombinedString;
|
|
71
|
+
isShowValue: boolean;
|
|
72
|
+
isReadOnly: boolean;
|
|
73
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
74
|
+
|
|
75
|
+
export { MpRating };
|