@hebium-ui/vue 0.1.0-alpha.1 → 0.1.0-alpha.2
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.
|
@@ -12,6 +12,10 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
12
12
|
type: null,
|
|
13
13
|
required: false
|
|
14
14
|
},
|
|
15
|
+
margin: {
|
|
16
|
+
type: null,
|
|
17
|
+
required: false
|
|
18
|
+
},
|
|
15
19
|
as: {
|
|
16
20
|
type: null,
|
|
17
21
|
required: false
|
|
@@ -44,12 +48,16 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
44
48
|
const attrs = useAttrs();
|
|
45
49
|
const resolvedProps = useHuiProps("Paragraph", props, attrs);
|
|
46
50
|
const component = computed(() => toRaw(resolvedProps.value.as ?? "p"));
|
|
47
|
-
const recipe = computed(() => paragraphRecipe({
|
|
51
|
+
const recipe = computed(() => paragraphRecipe({
|
|
52
|
+
color: resolvedProps.value.color,
|
|
53
|
+
margin: resolvedProps.value.margin
|
|
54
|
+
}));
|
|
48
55
|
const cls = useHuiClasses("Paragraph", recipe, computed(() => ({ root: props.class })));
|
|
49
56
|
const sls = useHuiStyles("Paragraph", computed(() => ({ root: props.style })));
|
|
50
57
|
const rootAttrs = useHuiAttrs(resolvedProps, [
|
|
51
58
|
"as",
|
|
52
59
|
"color",
|
|
60
|
+
"margin",
|
|
53
61
|
"class",
|
|
54
62
|
"style"
|
|
55
63
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paragraph.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/paragraph/paragraph.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'p'\"\n>\nimport { paragraphRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n toRaw,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport type { ParagraphOwnProps } from \"./paragraph.types\";\n\ndefineOptions({\n name: \"HuiParagraph\",\n inheritAttrs: false,\n});\n\ntype Props =\n & ParagraphOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof ParagraphOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Paragraph\", props, attrs);\nconst component = computed<E | \"p\">(() => toRaw(resolvedProps.value.as ?? \"p\"));\nconst recipe = computed(() =>\n paragraphRecipe({\n color: resolvedProps.value.color,\n })\n);\nconst cls = useHuiClasses(\n \"Paragraph\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Paragraph\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"color\",\n \"class\",\n \"style\",\n]);\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"paragraph.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/paragraph/paragraph.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'p'\"\n>\nimport { paragraphRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n toRaw,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport type { ParagraphOwnProps } from \"./paragraph.types\";\n\ndefineOptions({\n name: \"HuiParagraph\",\n inheritAttrs: false,\n});\n\ntype Props =\n & ParagraphOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof ParagraphOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Paragraph\", props, attrs);\nconst component = computed<E | \"p\">(() => toRaw(resolvedProps.value.as ?? \"p\"));\nconst recipe = computed(() =>\n paragraphRecipe({\n color: resolvedProps.value.color,\n margin: resolvedProps.value.margin,\n })\n);\nconst cls = useHuiClasses(\n \"Paragraph\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Paragraph\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"color\",\n \"margin\",\n \"class\",\n \"style\",\n]);\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,aAAa,OAAO,KAAK;EAC3D,MAAM,YAAY,eAAwB,MAAM,cAAc,MAAM,MAAM,GAAG,CAAC;EAC9E,MAAM,SAAS,eACb,gBAAgB;GACd,OAAO,cAAc,MAAM;GAC3B,QAAQ,cAAc,MAAM;EAC9B,CAAC,CACH;EACA,MAAM,MAAM,cACV,aACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,aACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,YAAY,YAAY,eAAe;GAC3C;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,YAQYC,wBAPL,OAAA,SAAS,GADhBC,WAQY,EANV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;;EAEZ,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -10,6 +10,12 @@ export interface ParagraphOwnProps {
|
|
|
10
10
|
* @default "text"
|
|
11
11
|
*/
|
|
12
12
|
color?: ParagraphVariants["color"] | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The block margin applied to the paragraph.
|
|
15
|
+
*
|
|
16
|
+
* @default "block"
|
|
17
|
+
*/
|
|
18
|
+
margin?: ParagraphVariants["margin"] | undefined;
|
|
13
19
|
}
|
|
14
20
|
export type ParagraphProps<E extends ElementType = "p"> = HuiPolymorphicProps<E, ParagraphOwnProps, ParagraphSlots>;
|
|
15
21
|
export interface ParagraphExposed<E extends ElementType = "p"> {
|
|
@@ -9,7 +9,7 @@ declare const __VLS_export: <E extends ElementType = "p">(__VLS_props: NonNullab
|
|
|
9
9
|
} & {
|
|
10
10
|
class?: ClassValue | undefined;
|
|
11
11
|
style?: StyleValue | undefined;
|
|
12
|
-
} & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" |
|
|
12
|
+
} & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | keyof ParagraphOwnProps>> & (typeof globalThis extends {
|
|
13
13
|
__VLS_PROPS_FALLBACK: infer P;
|
|
14
14
|
} ? P : {});
|
|
15
15
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hebium-ui/vue",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.2",
|
|
4
4
|
"description": "Experimental Vue 3 bindings for the Hebium UI core components.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -30,24 +30,24 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@vitest/browser-playwright": "5.0.
|
|
33
|
+
"@vitest/browser-playwright": "5.0.5",
|
|
34
34
|
"axe-core": "4.14.0",
|
|
35
|
-
"oxlint": "1.
|
|
36
|
-
"playwright": "1.64.
|
|
35
|
+
"oxlint": "1.88.0",
|
|
36
|
+
"playwright": "1.64.1",
|
|
37
37
|
"tsdown": "0.23.1",
|
|
38
38
|
"typescript": "6.0.3",
|
|
39
39
|
"unplugin-vue": "8.0.0",
|
|
40
40
|
"vite": "8.3.4",
|
|
41
|
-
"vitest": "5.0.
|
|
41
|
+
"vitest": "5.0.5",
|
|
42
42
|
"vitest-browser-vue": "3.1.0",
|
|
43
|
-
"vue": "3.5.
|
|
43
|
+
"vue": "3.5.44",
|
|
44
44
|
"vue-tsc": "3.3.13"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"vue-component-type-helpers": "3.3.13"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@hebium-ui/core": "0.1.0-alpha.
|
|
50
|
+
"@hebium-ui/core": "0.1.0-alpha.2",
|
|
51
51
|
"vue": "^3.5.0"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|