@hebium-ui/vue 0.1.0-alpha.1 → 0.1.0-alpha.3
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/_virtual/_/plugin-vue/export-helper.js +1 -2
- package/dist/components/alert/alert.js +2 -5
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/alert.types.d.ts +0 -2
- package/dist/components/alert/alert.vue.d.ts +0 -2
- package/dist/components/anchor/anchor.js +2 -5
- package/dist/components/anchor/anchor.js.map +1 -1
- package/dist/components/anchor/anchor.types.d.ts +0 -2
- package/dist/components/anchor/anchor.vue.d.ts +1 -3
- package/dist/components/avatar/avatar.js +2 -7
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/avatar.types.d.ts +0 -2
- package/dist/components/avatar/avatar.vue.d.ts +0 -2
- package/dist/components/blockquote/blockquote.js +2 -10
- package/dist/components/blockquote/blockquote.js.map +1 -1
- package/dist/components/blockquote/blockquote.types.d.ts +0 -2
- package/dist/components/blockquote/blockquote.vue.d.ts +0 -2
- package/dist/components/button/button.js +2 -5
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/button.types.d.ts +0 -2
- package/dist/components/button/button.vue.d.ts +1 -3
- package/dist/components/checkbox/checkbox.js +18 -15
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/checkbox/checkbox.types.d.ts +1 -3
- package/dist/components/checkbox/checkbox.vue.d.ts +0 -2
- package/dist/components/code/code.js +2 -7
- package/dist/components/code/code.js.map +1 -1
- package/dist/components/code/code.types.d.ts +0 -2
- package/dist/components/code/code.vue.d.ts +1 -3
- package/dist/components/details/details.js +2 -9
- package/dist/components/details/details.js.map +1 -1
- package/dist/components/details/details.types.d.ts +0 -2
- package/dist/components/details/details.vue.d.ts +0 -2
- package/dist/components/dialog/dialog-close.js +2 -3
- package/dist/components/dialog/dialog-close.js.map +1 -1
- package/dist/components/dialog/dialog-close.vue.d.ts +0 -2
- package/dist/components/dialog/dialog-content.js +1 -6
- package/dist/components/dialog/dialog-content.js.map +1 -1
- package/dist/components/dialog/dialog-content.vue.d.ts +0 -2
- package/dist/components/dialog/dialog-trigger.js +2 -8
- package/dist/components/dialog/dialog-trigger.js.map +1 -1
- package/dist/components/dialog/dialog-trigger.vue.d.ts +1 -3
- package/dist/components/dialog/dialog.context.d.ts +0 -2
- package/dist/components/dialog/dialog.context.js +1 -2
- package/dist/components/dialog/dialog.js +1 -2
- package/dist/components/dialog/dialog.types.d.ts +0 -2
- package/dist/components/dialog/dialog.vue.d.ts +0 -2
- package/dist/components/dl/dl-dd.js +2 -3
- package/dist/components/dl/dl-dd.js.map +1 -1
- package/dist/components/dl/dl-dd.vue.d.ts +0 -2
- package/dist/components/dl/dl-dt.js +2 -3
- package/dist/components/dl/dl-dt.js.map +1 -1
- package/dist/components/dl/dl-dt.vue.d.ts +0 -2
- package/dist/components/dl/dl.js +2 -3
- package/dist/components/dl/dl.js.map +1 -1
- package/dist/components/dl/dl.types.d.ts +0 -2
- package/dist/components/dl/dl.vue.d.ts +0 -2
- package/dist/components/drawer/drawer-close.js +2 -3
- package/dist/components/drawer/drawer-close.js.map +1 -1
- package/dist/components/drawer/drawer-close.vue.d.ts +0 -2
- package/dist/components/drawer/drawer-content.js +1 -6
- package/dist/components/drawer/drawer-content.js.map +1 -1
- package/dist/components/drawer/drawer-content.vue.d.ts +0 -2
- package/dist/components/drawer/drawer-trigger.js +2 -7
- package/dist/components/drawer/drawer-trigger.js.map +1 -1
- package/dist/components/drawer/drawer-trigger.vue.d.ts +1 -3
- package/dist/components/drawer/drawer.context.d.ts +0 -2
- package/dist/components/drawer/drawer.context.js +1 -2
- package/dist/components/drawer/drawer.js +1 -2
- package/dist/components/drawer/drawer.types.d.ts +0 -2
- package/dist/components/drawer/drawer.vue.d.ts +0 -2
- package/dist/components/fieldset/fieldset.js +2 -3
- package/dist/components/fieldset/fieldset.js.map +1 -1
- package/dist/components/fieldset/fieldset.types.d.ts +0 -2
- package/dist/components/fieldset/fieldset.vue.d.ts +0 -2
- package/dist/components/heading/heading.js +2 -8
- package/dist/components/heading/heading.js.map +1 -1
- package/dist/components/heading/heading.types.d.ts +0 -2
- package/dist/components/heading/heading.vue.d.ts +0 -2
- package/dist/components/hr/hr.js +2 -7
- package/dist/components/hr/hr.js.map +1 -1
- package/dist/components/hr/hr.types.d.ts +0 -2
- package/dist/components/hr/hr.vue.d.ts +1 -3
- package/dist/components/index.d.ts +24 -18
- package/dist/components/input/input.js +10 -14
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input/input.types.d.ts +0 -2
- package/dist/components/input/input.vue.d.ts +0 -2
- package/dist/components/label/label.js +2 -7
- package/dist/components/label/label.js.map +1 -1
- package/dist/components/label/label.types.d.ts +0 -2
- package/dist/components/label/label.vue.d.ts +1 -3
- package/dist/components/menu/menu-content.js +1 -4
- package/dist/components/menu/menu-content.js.map +1 -1
- package/dist/components/menu/menu-content.vue.d.ts +1 -3
- package/dist/components/menu/menu-item.js +1 -4
- package/dist/components/menu/menu-item.js.map +1 -1
- package/dist/components/menu/menu-item.vue.d.ts +1 -3
- package/dist/components/menu/menu-trigger.js +2 -8
- package/dist/components/menu/menu-trigger.js.map +1 -1
- package/dist/components/menu/menu-trigger.vue.d.ts +1 -3
- package/dist/components/menu/menu.context.d.ts +0 -2
- package/dist/components/menu/menu.context.js +1 -2
- package/dist/components/menu/menu.js +1 -2
- package/dist/components/menu/menu.types.d.ts +0 -2
- package/dist/components/menu/menu.vue.d.ts +0 -2
- package/dist/components/paragraph/paragraph.js +10 -5
- package/dist/components/paragraph/paragraph.js.map +1 -1
- package/dist/components/paragraph/paragraph.types.d.ts +6 -2
- package/dist/components/paragraph/paragraph.vue.d.ts +1 -3
- package/dist/components/popover/popover-content.js +2 -5
- package/dist/components/popover/popover-content.js.map +1 -1
- package/dist/components/popover/popover-content.vue.d.ts +1 -3
- package/dist/components/popover/popover-trigger.js +2 -7
- package/dist/components/popover/popover-trigger.js.map +1 -1
- package/dist/components/popover/popover-trigger.vue.d.ts +1 -3
- package/dist/components/popover/popover.context.d.ts +0 -2
- package/dist/components/popover/popover.context.js +1 -2
- package/dist/components/popover/popover.js +1 -2
- package/dist/components/popover/popover.types.d.ts +0 -2
- package/dist/components/popover/popover.vue.d.ts +0 -2
- package/dist/components/progress/progress.js +3 -7
- package/dist/components/progress/progress.js.map +1 -1
- package/dist/components/progress/progress.types.d.ts +0 -2
- package/dist/components/progress/progress.vue.d.ts +0 -2
- package/dist/components/radio/radio.js +4 -11
- package/dist/components/radio/radio.js.map +1 -1
- package/dist/components/radio/radio.types.d.ts +0 -2
- package/dist/components/radio/radio.vue.d.ts +0 -2
- package/dist/components/radiogroup/radiogroup.js +11 -9
- package/dist/components/radiogroup/radiogroup.js.map +1 -1
- package/dist/components/radiogroup/radiogroup.types.d.ts +0 -2
- package/dist/components/radiogroup/radiogroup.vue.d.ts +1 -3
- package/dist/components/section/section.js +2 -5
- package/dist/components/section/section.js.map +1 -1
- package/dist/components/section/section.types.d.ts +0 -2
- package/dist/components/section/section.vue.d.ts +1 -3
- package/dist/components/segmented-control/segmented-control-item.js +1 -4
- package/dist/components/segmented-control/segmented-control-item.js.map +1 -1
- package/dist/components/segmented-control/segmented-control-item.vue.d.ts +1 -3
- package/dist/components/segmented-control/segmented-control.context.js +1 -2
- package/dist/components/segmented-control/segmented-control.js +2 -5
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.types.d.ts +1 -3
- package/dist/components/segmented-control/segmented-control.vue.d.ts +1 -3
- package/dist/components/select/select.js +11 -12
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/select/select.types.d.ts +0 -2
- package/dist/components/select/select.vue.d.ts +0 -2
- package/dist/components/skip-link/index.d.ts +3 -0
- package/dist/components/skip-link/skip-link.js +79 -0
- package/dist/components/skip-link/skip-link.js.map +1 -0
- package/dist/components/skip-link/skip-link.types.d.ts +10 -0
- package/dist/components/skip-link/skip-link.vue.d.ts +28 -0
- package/dist/components/table/table-caption.js +2 -7
- package/dist/components/table/table-caption.js.map +1 -1
- package/dist/components/table/table-caption.vue.d.ts +0 -2
- package/dist/components/table/table-tbody.js +2 -3
- package/dist/components/table/table-tbody.js.map +1 -1
- package/dist/components/table/table-tbody.vue.d.ts +0 -2
- package/dist/components/table/table-td.js +2 -3
- package/dist/components/table/table-td.js.map +1 -1
- package/dist/components/table/table-td.vue.d.ts +0 -2
- package/dist/components/table/table-tfoot.js +2 -3
- package/dist/components/table/table-tfoot.js.map +1 -1
- package/dist/components/table/table-tfoot.vue.d.ts +0 -2
- package/dist/components/table/table-th.js +2 -3
- package/dist/components/table/table-th.js.map +1 -1
- package/dist/components/table/table-th.vue.d.ts +0 -2
- package/dist/components/table/table-thead.js +2 -3
- package/dist/components/table/table-thead.js.map +1 -1
- package/dist/components/table/table-thead.vue.d.ts +0 -2
- package/dist/components/table/table-tr.js +2 -7
- package/dist/components/table/table-tr.js.map +1 -1
- package/dist/components/table/table-tr.vue.d.ts +0 -2
- package/dist/components/table/table.js +2 -7
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table/table.types.d.ts +0 -2
- package/dist/components/table/table.vue.d.ts +0 -2
- package/dist/components/tabs/tabs-list.js +2 -7
- package/dist/components/tabs/tabs-list.js.map +1 -1
- package/dist/components/tabs/tabs-list.vue.d.ts +1 -3
- package/dist/components/tabs/tabs-panel.js +2 -8
- package/dist/components/tabs/tabs-panel.js.map +1 -1
- package/dist/components/tabs/tabs-panel.vue.d.ts +1 -3
- package/dist/components/tabs/tabs-tab.js +1 -4
- package/dist/components/tabs/tabs-tab.js.map +1 -1
- package/dist/components/tabs/tabs-tab.vue.d.ts +1 -3
- package/dist/components/tabs/tabs.context.js +1 -2
- package/dist/components/tabs/tabs.js +2 -5
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/tabs/tabs.types.d.ts +1 -3
- package/dist/components/tabs/tabs.vue.d.ts +1 -3
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/text.js +96 -0
- package/dist/components/text/text.js.map +1 -0
- package/dist/components/text/text.types.d.ts +24 -0
- package/dist/components/text/text.vue.d.ts +28 -0
- package/dist/components/textarea/textarea.js +10 -14
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/textarea/textarea.types.d.ts +0 -2
- package/dist/components/textarea/textarea.vue.d.ts +0 -2
- package/dist/components/tooltip/tooltip-content.js +1 -4
- package/dist/components/tooltip/tooltip-content.js.map +1 -1
- package/dist/components/tooltip/tooltip-content.vue.d.ts +1 -3
- package/dist/components/tooltip/tooltip-trigger.js +1 -4
- package/dist/components/tooltip/tooltip-trigger.js.map +1 -1
- package/dist/components/tooltip/tooltip-trigger.vue.d.ts +1 -3
- package/dist/components/tooltip/tooltip.context.d.ts +0 -2
- package/dist/components/tooltip/tooltip.context.js +1 -2
- package/dist/components/tooltip/tooltip.js +1 -2
- package/dist/components/tooltip/tooltip.types.d.ts +0 -2
- package/dist/components/tooltip/tooltip.vue.d.ts +0 -2
- package/dist/components/visually-hidden/visually-hidden.js +2 -7
- package/dist/components/visually-hidden/visually-hidden.js.map +1 -1
- package/dist/components/visually-hidden/visually-hidden.types.d.ts +0 -2
- package/dist/components/visually-hidden/visually-hidden.vue.d.ts +1 -3
- package/dist/index.d.ts +22 -18
- package/dist/index.js +3 -1
- package/dist/plugin.d.ts +40 -38
- package/dist/plugin.js +5 -2
- package/dist/plugin.js.map +1 -1
- package/dist/provider/hui-provider.context.d.ts +8 -4
- package/dist/provider/hui-provider.context.js +9 -3
- package/dist/provider/hui-provider.context.js.map +1 -1
- package/dist/provider/hui-provider.js +1 -2
- package/dist/provider/hui-provider.vue.d.ts +0 -2
- package/dist/types/element.d.ts +0 -2
- package/dist/types/hui-component.d.ts +0 -2
- package/dist/types/polymorphic.d.ts +0 -2
- package/dist/utils/attr-to-bool.js +1 -2
- package/dist/utils/use-slot-presence.js +13 -0
- package/dist/utils/use-slot-presence.js.map +1 -0
- package/package.json +8 -8
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// \0/plugin-vue/export-helper
|
|
2
2
|
var export_helper_default = (sfc, props) => {
|
|
3
3
|
const target = sfc.__vccOpts || sfc;
|
|
4
4
|
for (const [key, val] of props) target[key] = val;
|
|
5
5
|
return target;
|
|
6
6
|
};
|
|
7
|
-
//#endregion
|
|
8
7
|
export { export_helper_default as default };
|
|
@@ -2,7 +2,7 @@ import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../pro
|
|
|
2
2
|
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
3
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, useAttrs, useSlots, useTemplateRef } from "vue";
|
|
4
4
|
import { alertRecipe } from "@hebium-ui/core";
|
|
5
|
-
|
|
5
|
+
// src/components/alert/alert.vue
|
|
6
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
7
|
name: "HuiAlert",
|
|
8
8
|
inheritAttrs: false,
|
|
@@ -47,9 +47,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
47
47
|
const forwardedAttrs = useHuiAttrs(resolvedProps, [
|
|
48
48
|
"variant",
|
|
49
49
|
"color",
|
|
50
|
-
"padding"
|
|
51
|
-
"classes",
|
|
52
|
-
"styles"
|
|
50
|
+
"padding"
|
|
53
51
|
]);
|
|
54
52
|
const rootAttrs = computed(() => ({
|
|
55
53
|
role: "alert",
|
|
@@ -102,7 +100,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
102
100
|
}, [renderSlot(_ctx.$slots, "description")], 6)) : createCommentVNode("v-if", true)], 6)], 16);
|
|
103
101
|
}
|
|
104
102
|
var alert_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/alert/alert.vue"]]);
|
|
105
|
-
//#endregion
|
|
106
103
|
export { alert_default as default };
|
|
107
104
|
|
|
108
105
|
//# sourceMappingURL=alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.js","names":["_useSlots","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_normalizeClass","_normalizeStyle","_renderSlot","_createCommentVNode"],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n alertRecipe,\n type AlertSlots as AlertRecipeSlots,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport type { AlertOwnProps } from \"./alert.types\";\n\ndefineOptions({\n name: \"HuiAlert\",\n inheritAttrs: false,\n});\n\ntype Props =\n & AlertOwnProps\n & {\n classes?:\n | Partial<Record<AlertRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<AlertRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"div\">,\n keyof AlertOwnProps | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n message?: () => unknown;\n description?: () => unknown;\n icon?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Alert\", props, attrs);\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return alertRecipe({\n variant: resolved.variant,\n color: resolved.color,\n padding: resolved.padding,\n });\n});\nconst cls = useHuiClasses(\n \"Alert\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Alert\", AlertRecipeSlots>(\n \"Alert\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"variant\",\n \"color\",\n \"padding\",\n
|
|
1
|
+
{"version":3,"file":"alert.js","names":["_useSlots","_openBlock","_createElementBlock","_mergeProps","_createElementVNode","_normalizeClass","_normalizeStyle","_renderSlot","_createCommentVNode"],"sources":["../../../src/components/alert/alert.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n alertRecipe,\n type AlertSlots as AlertRecipeSlots,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport type { AlertOwnProps } from \"./alert.types\";\n\ndefineOptions({\n name: \"HuiAlert\",\n inheritAttrs: false,\n});\n\ntype Props =\n & AlertOwnProps\n & {\n classes?:\n | Partial<Record<AlertRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<AlertRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"div\">,\n keyof AlertOwnProps | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n message?: () => unknown;\n description?: () => unknown;\n icon?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Alert\", props, attrs);\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return alertRecipe({\n variant: resolved.variant,\n color: resolved.color,\n padding: resolved.padding,\n });\n});\nconst cls = useHuiClasses(\n \"Alert\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Alert\", AlertRecipeSlots>(\n \"Alert\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"variant\",\n \"color\",\n \"padding\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => ({\n role: \"alert\",\n ...forwardedAttrs.value,\n}));\nconst rootRef = useTemplateRef<HuiElementInstance<\"div\">>(\"root\");\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <div\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <div :class=\"cls.icon\" :style=\"sls.icon\">\n <slot v-if=\"slots.icon\" name=\"icon\" />\n <span\n v-else\n aria-hidden=\"true\"\n :class=\"cls.errorIcon\"\n :style=\"sls.errorIcon\"\n />\n </div>\n <div :class=\"cls.content\" :style=\"sls.content\">\n <div v-if=\"slots.message\" :class=\"cls.message\" :style=\"sls.message\">\n <slot name=\"message\" />\n </div>\n <div\n v-if=\"slots.description\"\n :class=\"cls.description\"\n :style=\"sls.description\"\n >\n <slot name=\"description\" />\n </div>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ;EAEd,MAAM,QAAQA,SAAA;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,SAAS,OAAO,KAAK;EACvD,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,YAAY;IACjB,SAAS,SAAS;IAClB,OAAO,SAAS;IAChB,SAAS,SAAS;GACpB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,SACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,SACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,gBAAyC;GACzD,MAAM;GACN,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,UAAU,eAA0C,MAAM;EAEhE,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,mBA2BM,OA3BNC,WA2BM,EA1BJ,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;C,KAEZC,mBAQM,OAAA;EARA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;C,IACzB,OAAA,MAAM,OAAlBC,WAAsC,KAAA,QAAA,QAAA,CAAA,GAAA,KAAA,GAAA,KAAA,GAAA,CAAA,KACtCN,UAAA,GAAAC,mBAKE,QAAA;;EAHA,eAAY;EACX,OAAKG,eAAE,OAAA,IAAI,SAAS;EACpB,OAAKC,eAAE,OAAA,IAAI,SAAS;C,mBAGzBF,mBAWM,OAAA;EAXA,OAAKC,eAAE,OAAA,IAAI,OAAO;EAAG,OAAKC,eAAE,OAAA,IAAI,OAAO;C,IAChC,OAAA,MAAM,WAAjBL,UAAA,GAAAC,mBAEM,OAAA;;EAFqB,OAAKG,eAAE,OAAA,IAAI,OAAO;EAAG,OAAKC,eAAE,OAAA,IAAI,OAAO;C,IAChEC,WAAuB,KAAA,QAAA,SAAA,C,2CAGjB,OAAA,MAAM,eADdN,UAAA,GAAAC,mBAMM,OAAA;;EAJH,OAAKG,eAAE,OAAA,IAAI,WAAW;EACtB,OAAKC,eAAE,OAAA,IAAI,WAAW;C,IAEvBC,WAA2B,KAAA,QAAA,aAAA,C"}
|
|
@@ -2,7 +2,6 @@ import { HuiElementInstance, HuiElementProps } from "../../types/element.js";
|
|
|
2
2
|
import { HuiComponentProps } from "../../types/hui-component.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
4
|
import { AlertSlots, AlertVariants } from "@hebium-ui/core";
|
|
5
|
-
//#region src/components/alert/alert.types.d.ts
|
|
6
5
|
export interface AlertOwnProps {
|
|
7
6
|
/**
|
|
8
7
|
* The visual style of the alert.
|
|
@@ -27,5 +26,4 @@ export type AlertProps = HuiComponentProps<HuiElementProps<"div"> & AlertOwnProp
|
|
|
27
26
|
export interface AlertExposed {
|
|
28
27
|
readonly root: HuiElementInstance<"div"> | null;
|
|
29
28
|
}
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=alert.types.d.ts.map
|
|
@@ -3,7 +3,6 @@ import "../../types/index.js";
|
|
|
3
3
|
import { AlertOwnProps } from "./alert.types.js";
|
|
4
4
|
import { ClassValue, StyleValue } from "vue";
|
|
5
5
|
import { AlertSlots } from "@hebium-ui/core";
|
|
6
|
-
//#region src/components/alert/alert.vue.d.ts
|
|
7
6
|
type Props = AlertOwnProps & {
|
|
8
7
|
classes?: Partial<Record<AlertSlots, ClassValue | undefined>> | undefined;
|
|
9
8
|
styles?: Partial<Record<AlertSlots, StyleValue | undefined>> | undefined;
|
|
@@ -23,6 +22,5 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
23
22
|
$slots: S;
|
|
24
23
|
};
|
|
25
24
|
};
|
|
26
|
-
//#endregion
|
|
27
25
|
export { _default as default };
|
|
28
26
|
//# sourceMappingURL=alert.vue.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../pro
|
|
|
2
2
|
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
3
|
import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, toRaw, useAttrs, useTemplateRef, withCtx } from "vue";
|
|
4
4
|
import { anchorRecipe } from "@hebium-ui/core";
|
|
5
|
-
|
|
5
|
+
// src/components/anchor/anchor.vue
|
|
6
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
7
|
name: "HuiAnchor",
|
|
8
8
|
inheritAttrs: false,
|
|
@@ -66,9 +66,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
66
66
|
"as",
|
|
67
67
|
"color",
|
|
68
68
|
"marker",
|
|
69
|
-
"decoration"
|
|
70
|
-
"class",
|
|
71
|
-
"style"
|
|
69
|
+
"decoration"
|
|
72
70
|
]);
|
|
73
71
|
const rootRef = useTemplateRef("root");
|
|
74
72
|
__expose({ root: rootRef });
|
|
@@ -100,7 +98,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
98
|
}, 16, ["class", "style"]);
|
|
101
99
|
}
|
|
102
100
|
var anchor_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/anchor/anchor.vue"]]);
|
|
103
|
-
//#endregion
|
|
104
101
|
export { anchor_default as default };
|
|
105
102
|
|
|
106
103
|
//# sourceMappingURL=anchor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anchor.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/anchor/anchor.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'a'\"\n>\nimport { anchorRecipe } 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 { AnchorOwnProps } from \"./anchor.types\";\n\ndefineOptions({\n name: \"HuiAnchor\",\n inheritAttrs: false,\n});\n\ntype Props =\n & AnchorOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof AnchorOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Anchor\", props, attrs);\nconst component = computed<E | \"a\">(() => toRaw(resolvedProps.value.as ?? \"a\"));\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n\n return anchorRecipe({\n color: resolved.color,\n marker: resolved.marker,\n decoration: resolved.decoration,\n });\n});\nconst cls = useHuiClasses(\n \"Anchor\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Anchor\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"color\",\n \"marker\",\n \"decoration\",\n
|
|
1
|
+
{"version":3,"file":"anchor.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/anchor/anchor.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'a'\"\n>\nimport { anchorRecipe } 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 { AnchorOwnProps } from \"./anchor.types\";\n\ndefineOptions({\n name: \"HuiAnchor\",\n inheritAttrs: false,\n});\n\ntype Props =\n & AnchorOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof AnchorOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Anchor\", props, attrs);\nconst component = computed<E | \"a\">(() => toRaw(resolvedProps.value.as ?? \"a\"));\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n\n return anchorRecipe({\n color: resolved.color,\n marker: resolved.marker,\n decoration: resolved.decoration,\n });\n});\nconst cls = useHuiClasses(\n \"Anchor\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Anchor\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"color\",\n \"marker\",\n \"decoration\",\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,UAAU,OAAO,KAAK;EACxD,MAAM,YAAY,eAAwB,MAAM,cAAc,MAAM,MAAM,GAAG,CAAC;EAC9E,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAE/B,OAAO,aAAa;IAClB,OAAO,SAAS;IAChB,QAAQ,SAAS;IACjB,YAAY,SAAS;GACvB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,UACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,UACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,YAAY,YAAY,eAAe;GAC3C;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,C"}
|
|
@@ -2,7 +2,6 @@ import { ElementType, HuiElementInstance } from "../../types/element.js";
|
|
|
2
2
|
import { HuiPolymorphicProps } from "../../types/polymorphic.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
4
|
import { AnchorSlots, AnchorVariants } from "@hebium-ui/core";
|
|
5
|
-
//#region src/components/anchor/anchor.types.d.ts
|
|
6
5
|
export interface AnchorOwnProps {
|
|
7
6
|
/**
|
|
8
7
|
* The semantic color of the anchor.
|
|
@@ -27,5 +26,4 @@ export type AnchorProps<E extends ElementType = "a"> = HuiPolymorphicProps<E, An
|
|
|
27
26
|
export interface AnchorExposed<E extends ElementType = "a"> {
|
|
28
27
|
readonly root: HuiElementInstance<E> | null;
|
|
29
28
|
}
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=anchor.types.d.ts.map
|
|
@@ -2,14 +2,13 @@ import { ElementType, HuiElementInstance, HuiElementPropsNoInfer } from "../../t
|
|
|
2
2
|
import "../../types/index.js";
|
|
3
3
|
import { AnchorOwnProps } from "./anchor.types.js";
|
|
4
4
|
import { ClassValue, StyleValue } from "vue";
|
|
5
|
-
//#region src/components/anchor/anchor.vue.d.ts
|
|
6
5
|
declare const __VLS_export: <E extends ElementType = "a">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
6
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<AnchorOwnProps & {
|
|
8
7
|
as?: E | undefined;
|
|
9
8
|
} & {
|
|
10
9
|
class?: ClassValue | undefined;
|
|
11
10
|
style?: StyleValue | undefined;
|
|
12
|
-
} & Omit<HuiElementPropsNoInfer<E>, "
|
|
11
|
+
} & Omit<HuiElementPropsNoInfer<E>, "class" | "style" | "as" | keyof AnchorOwnProps>> & (typeof globalThis extends {
|
|
13
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
14
13
|
} ? P : {});
|
|
15
14
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
@@ -25,6 +24,5 @@ declare const __VLS_export: <E extends ElementType = "a">(__VLS_props: NonNullab
|
|
|
25
24
|
};
|
|
26
25
|
declare const _default: typeof __VLS_export;
|
|
27
26
|
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
28
|
-
//#endregion
|
|
29
27
|
export { _default as default };
|
|
30
28
|
//# sourceMappingURL=anchor.vue.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../pro
|
|
|
2
2
|
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
3
|
import { computed, createElementBlock, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, ref, toDisplayString, useAttrs, useTemplateRef } from "vue";
|
|
4
4
|
import { avatartRecipe, getAvatarPlaceholder, shouldShowAvatarPlaceholder } from "@hebium-ui/core";
|
|
5
|
-
|
|
5
|
+
// src/components/avatar/avatar.vue
|
|
6
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
7
|
name: "HuiAvatar",
|
|
8
8
|
inheritAttrs: false,
|
|
@@ -35,15 +35,11 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
35
35
|
const cls = useHuiClasses("Avatar", recipe, computed(() => props.classes ?? {}));
|
|
36
36
|
const sls = useHuiStyles("Avatar", computed(() => props.styles ?? {}));
|
|
37
37
|
const imageAttrs = useHuiAttrs(resolvedProps, [
|
|
38
|
-
"classes",
|
|
39
|
-
"styles",
|
|
40
38
|
"name",
|
|
41
39
|
"src",
|
|
42
40
|
"srcset",
|
|
43
41
|
"alt",
|
|
44
|
-
"onError"
|
|
45
|
-
"class",
|
|
46
|
-
"style"
|
|
42
|
+
"onError"
|
|
47
43
|
]);
|
|
48
44
|
const placeholder = computed(() => getAvatarPlaceholder(resolvedProps.value.name));
|
|
49
45
|
const imgRef = useTemplateRef("img");
|
|
@@ -105,7 +101,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
105
101
|
}), null, 16, _hoisted_1))], 6);
|
|
106
102
|
}
|
|
107
103
|
var avatar_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/avatar/avatar.vue"]]);
|
|
108
|
-
//#endregion
|
|
109
104
|
export { avatar_default as default };
|
|
110
105
|
|
|
111
106
|
//# sourceMappingURL=avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar.js","names":["_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_toDisplayString","_mergeProps"],"sources":["../../../src/components/avatar/avatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n type AvatarSlots as AvatarRecipeSlots,\n type AvatarSource,\n avatartRecipe,\n getAvatarPlaceholder,\n shouldShowAvatarPlaceholder,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n ref,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport type { AvatarOwnProps } from \"./avatar.types\";\n\ndefineOptions({\n name: \"HuiAvatar\",\n inheritAttrs: false,\n});\n\ntype Props =\n & AvatarOwnProps\n & {\n classes?:\n | Partial<Record<AvatarRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<AvatarRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"img\">,\n keyof AvatarOwnProps | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Avatar\", props, attrs);\nconst failedSource = ref<AvatarSource | null>(null);\nconst shouldShowPlaceholder = computed(() =>\n shouldShowAvatarPlaceholder({\n src: resolvedProps.value.src,\n srcSet: resolvedProps.value.srcset,\n failedSource: failedSource.value,\n })\n);\nconst recipe = computed(() =>\n avatartRecipe({\n background: shouldShowPlaceholder.value ? \"box\" : \"transparent\",\n })\n);\nconst cls = useHuiClasses(\n \"Avatar\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Avatar\", AvatarRecipeSlots>(\n \"Avatar\",\n computed(() => props.styles ?? {}),\n);\nconst imageAttrs = useHuiAttrs(resolvedProps, [\n \"
|
|
1
|
+
{"version":3,"file":"avatar.js","names":["_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_toDisplayString","_mergeProps"],"sources":["../../../src/components/avatar/avatar.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n type AvatarSlots as AvatarRecipeSlots,\n type AvatarSource,\n avatartRecipe,\n getAvatarPlaceholder,\n shouldShowAvatarPlaceholder,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n ref,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport type { AvatarOwnProps } from \"./avatar.types\";\n\ndefineOptions({\n name: \"HuiAvatar\",\n inheritAttrs: false,\n});\n\ntype Props =\n & AvatarOwnProps\n & {\n classes?:\n | Partial<Record<AvatarRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<AvatarRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"img\">,\n keyof AvatarOwnProps | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Avatar\", props, attrs);\nconst failedSource = ref<AvatarSource | null>(null);\nconst shouldShowPlaceholder = computed(() =>\n shouldShowAvatarPlaceholder({\n src: resolvedProps.value.src,\n srcSet: resolvedProps.value.srcset,\n failedSource: failedSource.value,\n })\n);\nconst recipe = computed(() =>\n avatartRecipe({\n background: shouldShowPlaceholder.value ? \"box\" : \"transparent\",\n })\n);\nconst cls = useHuiClasses(\n \"Avatar\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Avatar\", AvatarRecipeSlots>(\n \"Avatar\",\n computed(() => props.styles ?? {}),\n);\nconst imageAttrs = useHuiAttrs(resolvedProps, [\n \"name\",\n \"src\",\n \"srcset\",\n \"alt\",\n \"onError\",\n]);\nconst placeholder = computed(() =>\n getAvatarPlaceholder(resolvedProps.value.name)\n);\nconst imgRef = useTemplateRef<HuiElementInstance<\"img\">>(\"img\");\n\nfunction handleError(event: Event): void {\n const resolved = resolvedProps.value;\n const source: AvatarSource = {\n src: resolved.src,\n srcSet: resolved.srcset,\n };\n const onError = resolved.onError;\n\n if (typeof onError === \"function\") onError(event);\n failedSource.value = source;\n}\n\ndefineExpose({\n img: imgRef,\n});\n</script>\n\n<template>\n <div :class=\"cls.root\" :style=\"sls.root\">\n <span\n v-if=\"shouldShowPlaceholder\"\n :class=\"cls.placeholder\"\n :style=\"sls.placeholder\"\n >\n {{ placeholder }}\n </span>\n <img\n v-else\n ref=\"img\"\n v-bind=\"imageAttrs\"\n :class=\"cls.img\"\n :style=\"sls.img\"\n :src=\"resolvedProps.src\"\n :srcset=\"resolvedProps.srcset\"\n :alt=\"resolvedProps.alt ?? resolvedProps.name\"\n @error=\"handleError\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAEd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,UAAU,OAAO,KAAK;EACxD,MAAM,eAAe,IAAyB,IAAI;EAClD,MAAM,wBAAwB,eAC5B,4BAA4B;GAC1B,KAAK,cAAc,MAAM;GACzB,QAAQ,cAAc,MAAM;GAC5B,cAAc,aAAa;EAC7B,CAAC,CACH;EACA,MAAM,SAAS,eACb,cAAc,EACZ,YAAY,sBAAsB,QAAQ,QAAQ,cACpD,CAAC,CACH;EACA,MAAM,MAAM,cACV,UACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,UACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,aAAa,YAAY,eAAe;GAC5C;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,cAAc,eAClB,qBAAqB,cAAc,MAAM,IAAI,CAC/C;EACA,MAAM,SAAS,eAA0C,KAAK;EAE9D,SAAS,YAAY,OAAoB;GACvC,MAAM,WAAW,cAAc;GAC/B,MAAM,SAAuB;IAC3B,KAAK,SAAS;IACd,QAAQ,SAAS;GACnB;GACA,MAAM,UAAU,SAAS;GAEzB,IAAI,OAAO,YAAY,YAAY,QAAQ,KAAK;GAChD,aAAa,QAAQ;EACvB;EAEA,SAAa,EACX,KAAK,OACP,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,mBAmBM,OAAA;EAnBA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;C,IAE7B,OAAA,yBADRH,UAAA,GAAAC,mBAMO,QAAA;;EAJJ,OAAKC,eAAE,OAAA,IAAI,WAAW;EACtB,OAAKC,eAAE,OAAA,IAAI,WAAW;CAEpB,GAAAC,gBAAA,OAAA,WAAW,GAAA,CAAA,MAEhBJ,UAAA,GAAAC,mBAUE,OAVFI,WAUE;;EARA,KAAI;CACI,GAAA,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,KAAK,OAAA,cAAc;EACnB,QAAQ,OAAA,cAAc;EACtB,KAAK,OAAA,cAAc,OAAO,OAAA,cAAc;EACxC,SAAO,OAAA"}
|
|
@@ -2,7 +2,6 @@ import { HuiElementInstance, HuiElementProps } from "../../types/element.js";
|
|
|
2
2
|
import { HuiComponentProps } from "../../types/hui-component.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
4
|
import { AvatarSlots } from "@hebium-ui/core";
|
|
5
|
-
//#region src/components/avatar/avatar.types.d.ts
|
|
6
5
|
export interface AvatarOwnProps {
|
|
7
6
|
/**
|
|
8
7
|
* The name represented by the avatar. It is used as the default image alternative text and to generate placeholder initials.
|
|
@@ -13,5 +12,4 @@ export type AvatarProps = HuiComponentProps<HuiElementProps<"img"> & AvatarOwnPr
|
|
|
13
12
|
export interface AvatarExposed {
|
|
14
13
|
readonly img: HuiElementInstance<"img"> | null;
|
|
15
14
|
}
|
|
16
|
-
//#endregion
|
|
17
15
|
//# sourceMappingURL=avatar.types.d.ts.map
|
|
@@ -3,7 +3,6 @@ import "../../types/index.js";
|
|
|
3
3
|
import { AvatarOwnProps } from "./avatar.types.js";
|
|
4
4
|
import { ClassValue, StyleValue } from "vue";
|
|
5
5
|
import { AvatarSlots } from "@hebium-ui/core";
|
|
6
|
-
//#region src/components/avatar/avatar.vue.d.ts
|
|
7
6
|
type Props = AvatarOwnProps & {
|
|
8
7
|
classes?: Partial<Record<AvatarSlots, ClassValue | undefined>> | undefined;
|
|
9
8
|
styles?: Partial<Record<AvatarSlots, StyleValue | undefined>> | undefined;
|
|
@@ -12,6 +11,5 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {
|
|
|
12
11
|
img: Readonly<import("vue").ShallowRef<HTMLImageElement | null>>;
|
|
13
12
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
13
|
declare const _default: typeof __VLS_export;
|
|
15
|
-
//#endregion
|
|
16
14
|
export { _default as default };
|
|
17
15
|
//# sourceMappingURL=avatar.vue.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../pro
|
|
|
2
2
|
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
3
|
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, useAttrs, useSlots, useTemplateRef } from "vue";
|
|
4
4
|
import { blockquoteRecipe } from "@hebium-ui/core";
|
|
5
|
-
|
|
5
|
+
// src/components/blockquote/blockquote.vue
|
|
6
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
7
|
name: "HuiBlockquote",
|
|
8
8
|
inheritAttrs: false,
|
|
@@ -33,14 +33,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
33
33
|
const recipe = computed(() => blockquoteRecipe({ color: resolvedProps.value.color }));
|
|
34
34
|
const cls = useHuiClasses("Blockquote", recipe, computed(() => props.classes ?? {}));
|
|
35
35
|
const sls = useHuiStyles("Blockquote", computed(() => props.styles ?? {}));
|
|
36
|
-
const quoteAttrs = useHuiAttrs(resolvedProps, [
|
|
37
|
-
"color",
|
|
38
|
-
"captionProps",
|
|
39
|
-
"classes",
|
|
40
|
-
"styles",
|
|
41
|
-
"class",
|
|
42
|
-
"style"
|
|
43
|
-
]);
|
|
36
|
+
const quoteAttrs = useHuiAttrs(resolvedProps, ["color", "captionProps"]);
|
|
44
37
|
const captionAttrs = computed(() => resolvedProps.value.captionProps ?? {});
|
|
45
38
|
const blockquoteRef = useTemplateRef("blockquote");
|
|
46
39
|
__expose({ blockquote: blockquoteRef });
|
|
@@ -76,7 +69,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
76
69
|
}), [renderSlot(_ctx.$slots, "caption")], 16)) : createCommentVNode("v-if", true)], 6);
|
|
77
70
|
}
|
|
78
71
|
var blockquote_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/blockquote/blockquote.vue"]]);
|
|
79
|
-
//#endregion
|
|
80
72
|
export { blockquote_default as default };
|
|
81
73
|
|
|
82
74
|
//# sourceMappingURL=blockquote.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blockquote.js","names":["_useSlots","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createElementVNode","_mergeProps","_renderSlot","_createCommentVNode"],"sources":["../../../src/components/blockquote/blockquote.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n blockquoteRecipe,\n type BlockquoteSlots as BlockquoteRecipeSlots,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport type { BlockquoteOwnProps } from \"./blockquote.types\";\n\ndefineOptions({\n name: \"HuiBlockquote\",\n inheritAttrs: false,\n});\n\ntype Props =\n & BlockquoteOwnProps\n & {\n classes?:\n | Partial<Record<BlockquoteRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<BlockquoteRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"blockquote\">,\n keyof BlockquoteOwnProps | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n default?: () => unknown;\n caption?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Blockquote\", props, attrs);\nconst recipe = computed(() =>\n blockquoteRecipe({ color: resolvedProps.value.color })\n);\nconst cls = useHuiClasses(\n \"Blockquote\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Blockquote\", BlockquoteRecipeSlots>(\n \"Blockquote\",\n computed(() => props.styles ?? {}),\n);\nconst quoteAttrs = useHuiAttrs(resolvedProps, [\n \"color\",\n \"captionProps\",\n
|
|
1
|
+
{"version":3,"file":"blockquote.js","names":["_useSlots","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createElementVNode","_mergeProps","_renderSlot","_createCommentVNode"],"sources":["../../../src/components/blockquote/blockquote.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n blockquoteRecipe,\n type BlockquoteSlots as BlockquoteRecipeSlots,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport type { BlockquoteOwnProps } from \"./blockquote.types\";\n\ndefineOptions({\n name: \"HuiBlockquote\",\n inheritAttrs: false,\n});\n\ntype Props =\n & BlockquoteOwnProps\n & {\n classes?:\n | Partial<Record<BlockquoteRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<BlockquoteRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"blockquote\">,\n keyof BlockquoteOwnProps | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n default?: () => unknown;\n caption?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Blockquote\", props, attrs);\nconst recipe = computed(() =>\n blockquoteRecipe({ color: resolvedProps.value.color })\n);\nconst cls = useHuiClasses(\n \"Blockquote\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Blockquote\", BlockquoteRecipeSlots>(\n \"Blockquote\",\n computed(() => props.styles ?? {}),\n);\nconst quoteAttrs = useHuiAttrs(resolvedProps, [\n \"color\",\n \"captionProps\",\n]);\nconst captionAttrs = computed(() => resolvedProps.value.captionProps ?? {});\nconst blockquoteRef = useTemplateRef<HuiElementInstance<\"blockquote\">>(\n \"blockquote\",\n);\n\ndefineExpose({\n blockquote: blockquoteRef,\n});\n</script>\n\n<template>\n <figure :class=\"cls.root\" :style=\"sls.root\">\n <blockquote\n ref=\"blockquote\"\n v-bind=\"quoteAttrs\"\n :class=\"cls.blockquote\"\n :style=\"sls.blockquote\"\n >\n <slot />\n </blockquote>\n <figcaption\n v-if=\"slots.caption\"\n v-bind=\"captionAttrs\"\n :class=\"cls.caption\"\n :style=\"sls.caption\"\n >\n <slot name=\"caption\" />\n </figcaption>\n </figure>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyCA,MAAM,QAAQ;EAEd,MAAM,QAAQA,SAAA;EAKd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,cAAc,OAAO,KAAK;EAC5D,MAAM,SAAS,eACb,iBAAiB,EAAE,OAAO,cAAc,MAAM,MAAM,CAAC,CACvD;EACA,MAAM,MAAM,cACV,cACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,cACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,aAAa,YAAY,eAAe,CAC5C,SACA,cACF,CAAC;EACD,MAAM,eAAe,eAAe,cAAc,MAAM,gBAAgB,CAAC,CAAC;EAC1E,MAAM,gBAAgB,eACpB,YACF;EAEA,SAAa,EACX,YAAY,cACd,CAAC;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,mBAiBS,UAAA;EAjBA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;C,IACxCC,mBAOa,cAPbC,WAOa,EANX,KAAI,aAAY,GACR,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;C,KAEZC,WAAQ,KAAA,QAAA,SAAA,C,QAGF,OAAA,MAAM,WADdN,UAAA,GAAAC,mBAOa,cAPbI,WAOa,EAAA,KAAA,EAAA,GALH,OAAA,cAAY;EACnB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;C,KAEZC,WAAuB,KAAA,QAAA,SAAA,C"}
|
|
@@ -2,7 +2,6 @@ import { HuiElementInstance, HuiElementProps } from "../../types/element.js";
|
|
|
2
2
|
import { HuiComponentProps } from "../../types/hui-component.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
4
|
import { BlockquoteSlots, BlockquoteVariants } from "@hebium-ui/core";
|
|
5
|
-
//#region src/components/blockquote/blockquote.types.d.ts
|
|
6
5
|
type HtmlFigcaptionProps = Omit<HuiElementProps<"figcaption">, "class" | "style">;
|
|
7
6
|
export interface BlockquoteOwnProps {
|
|
8
7
|
/**
|
|
@@ -20,6 +19,5 @@ export type BlockquoteProps = HuiComponentProps<Omit<HuiElementProps<"blockquote
|
|
|
20
19
|
export interface BlockquoteExposed {
|
|
21
20
|
readonly blockquote: HuiElementInstance<"blockquote"> | null;
|
|
22
21
|
}
|
|
23
|
-
//#endregion
|
|
24
22
|
export {};
|
|
25
23
|
//# sourceMappingURL=blockquote.types.d.ts.map
|
|
@@ -3,7 +3,6 @@ import "../../types/index.js";
|
|
|
3
3
|
import { BlockquoteOwnProps } from "./blockquote.types.js";
|
|
4
4
|
import { ClassValue, StyleValue } from "vue";
|
|
5
5
|
import { BlockquoteSlots } from "@hebium-ui/core";
|
|
6
|
-
//#region src/components/blockquote/blockquote.vue.d.ts
|
|
7
6
|
type Props = BlockquoteOwnProps & {
|
|
8
7
|
classes?: Partial<Record<BlockquoteSlots, ClassValue | undefined>> | undefined;
|
|
9
8
|
styles?: Partial<Record<BlockquoteSlots, StyleValue | undefined>> | undefined;
|
|
@@ -22,6 +21,5 @@ type __VLS_WithSlots<T, S> = T & {
|
|
|
22
21
|
$slots: S;
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
|
-
//#endregion
|
|
26
24
|
export { _default as default };
|
|
27
25
|
//# sourceMappingURL=blockquote.vue.d.ts.map
|
|
@@ -2,7 +2,7 @@ import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../pro
|
|
|
2
2
|
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
3
|
import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, useAttrs, useTemplateRef, withCtx } from "vue";
|
|
4
4
|
import { buttonRecipe } from "@hebium-ui/core";
|
|
5
|
-
|
|
5
|
+
// src/components/button/button.vue
|
|
6
6
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
7
|
name: "HuiButton",
|
|
8
8
|
inheritAttrs: false,
|
|
@@ -66,9 +66,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
66
66
|
"as",
|
|
67
67
|
"variant",
|
|
68
68
|
"color",
|
|
69
|
-
"shape"
|
|
70
|
-
"class",
|
|
71
|
-
"style"
|
|
69
|
+
"shape"
|
|
72
70
|
]);
|
|
73
71
|
const rootRef = useTemplateRef("root");
|
|
74
72
|
__expose({ root: rootRef });
|
|
@@ -100,7 +98,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
100
98
|
}, 16, ["class", "style"]);
|
|
101
99
|
}
|
|
102
100
|
var button_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/button/button.vue"]]);
|
|
103
|
-
//#endregion
|
|
104
101
|
export { button_default as default };
|
|
105
102
|
|
|
106
103
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/button/button.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'button'\"\n>\nimport { buttonRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\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 { ButtonOwnProps } from \"./button.types\";\n\ndefineOptions({\n name: \"HuiButton\",\n inheritAttrs: false,\n});\n\ntype Props =\n & ButtonOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof ButtonOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Button\", props, attrs);\nconst component = computed<E | \"button\">(() =>\n resolvedProps.value.as ?? \"button\"\n);\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return buttonRecipe({\n variant: resolved.variant,\n color: resolved.color,\n shape: resolved.shape,\n });\n});\nconst cls = useHuiClasses(\n \"Button\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Button\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"variant\",\n \"color\",\n \"shape\",\n
|
|
1
|
+
{"version":3,"file":"button.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/button/button.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'button'\"\n>\nimport { buttonRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\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 { ButtonOwnProps } from \"./button.types\";\n\ndefineOptions({\n name: \"HuiButton\",\n inheritAttrs: false,\n});\n\ntype Props =\n & ButtonOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof ButtonOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Button\", props, attrs);\nconst component = computed<E | \"button\">(() =>\n resolvedProps.value.as ?? \"button\"\n);\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return buttonRecipe({\n variant: resolved.variant,\n color: resolved.color,\n shape: resolved.shape,\n });\n});\nconst cls = useHuiClasses(\n \"Button\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Button\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"variant\",\n \"color\",\n \"shape\",\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,UAAU,OAAO,KAAK;EACxD,MAAM,YAAY,eAChB,cAAc,MAAM,MAAM,QAC5B;EACA,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,aAAa;IAClB,SAAS,SAAS;IAClB,OAAO,SAAS;IAChB,OAAO,SAAS;GAClB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,UACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,UACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,YAAY,YAAY,eAAe;GAC3C;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,C"}
|
|
@@ -2,7 +2,6 @@ import { ElementType, HuiElementInstance } from "../../types/element.js";
|
|
|
2
2
|
import { HuiPolymorphicProps } from "../../types/polymorphic.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
4
|
import { ButtonSlots, ButtonVariants } from "@hebium-ui/core";
|
|
5
|
-
//#region src/components/button/button.types.d.ts
|
|
6
5
|
export interface ButtonOwnProps {
|
|
7
6
|
/**
|
|
8
7
|
* The visual style of the button.
|
|
@@ -27,5 +26,4 @@ export type ButtonProps<E extends ElementType = "button"> = HuiPolymorphicProps<
|
|
|
27
26
|
export interface ButtonExposed<E extends ElementType = "button"> {
|
|
28
27
|
readonly root: HuiElementInstance<E> | null;
|
|
29
28
|
}
|
|
30
|
-
//#endregion
|
|
31
29
|
//# sourceMappingURL=button.types.d.ts.map
|
|
@@ -2,14 +2,13 @@ import { ElementType, HuiElementInstance, HuiElementPropsNoInfer } from "../../t
|
|
|
2
2
|
import "../../types/index.js";
|
|
3
3
|
import { ButtonOwnProps } from "./button.types.js";
|
|
4
4
|
import { ClassValue, StyleValue } from "vue";
|
|
5
|
-
//#region src/components/button/button.vue.d.ts
|
|
6
5
|
declare const __VLS_export: <E extends ElementType = "button">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
7
6
|
props: import("vue").PublicProps & __VLS_PrettifyLocal<ButtonOwnProps & {
|
|
8
7
|
as?: E | undefined;
|
|
9
8
|
} & {
|
|
10
9
|
class?: ClassValue | undefined;
|
|
11
10
|
style?: StyleValue | undefined;
|
|
12
|
-
} & Omit<HuiElementPropsNoInfer<E>, "
|
|
11
|
+
} & Omit<HuiElementPropsNoInfer<E>, "class" | "style" | "as" | keyof ButtonOwnProps>> & (typeof globalThis extends {
|
|
13
12
|
__VLS_PROPS_FALLBACK: infer P;
|
|
14
13
|
} ? P : {});
|
|
15
14
|
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
@@ -25,6 +24,5 @@ declare const __VLS_export: <E extends ElementType = "button">(__VLS_props: NonN
|
|
|
25
24
|
};
|
|
26
25
|
declare const _default: typeof __VLS_export;
|
|
27
26
|
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
28
|
-
//#endregion
|
|
29
27
|
export { _default as default };
|
|
30
28
|
//# sourceMappingURL=button.vue.d.ts.map
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../provider/hui-provider.context.js";
|
|
2
2
|
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
3
|
import { attrToBool } from "../../utils/attr-to-bool.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useSlotPresence } from "../../utils/use-slot-presence.js";
|
|
5
|
+
import { computed, createCommentVNode, createElementBlock, createElementVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, useAttrs, useId, useSlots, useTemplateRef } from "vue";
|
|
5
6
|
import { checkboxControl, checkboxRecipe, toStrbool } from "@hebium-ui/core";
|
|
6
|
-
|
|
7
|
+
// src/components/checkbox/checkbox.vue
|
|
7
8
|
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
9
|
name: "HuiCheckbox",
|
|
9
10
|
inheritAttrs: false,
|
|
@@ -33,7 +34,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
33
34
|
const slots = useSlots();
|
|
34
35
|
const attrs = useAttrs();
|
|
35
36
|
const resolvedProps = useHuiProps("Checkbox", props, attrs);
|
|
36
|
-
const hasError =
|
|
37
|
+
const hasError = useSlotPresence(slots, ["error"]);
|
|
37
38
|
const generatedId = useId();
|
|
38
39
|
const checkboxState = computed(() => ({
|
|
39
40
|
id: resolvedProps.value.id ?? generatedId,
|
|
@@ -45,7 +46,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
45
46
|
const resolved = resolvedProps.value;
|
|
46
47
|
return checkboxRecipe({
|
|
47
48
|
color: resolved.color,
|
|
48
|
-
icon: resolved.indeterminate ? "indeterminate" : "check",
|
|
49
49
|
error: toStrbool(checkboxState.value.invalid)
|
|
50
50
|
});
|
|
51
51
|
});
|
|
@@ -55,10 +55,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
55
55
|
"id",
|
|
56
56
|
"color",
|
|
57
57
|
"indeterminate",
|
|
58
|
-
"
|
|
59
|
-
"styles",
|
|
60
|
-
"class",
|
|
61
|
-
"style"
|
|
58
|
+
"onChange"
|
|
62
59
|
]);
|
|
63
60
|
const inputAttrs = computed(() => ({
|
|
64
61
|
...checkboxControl.getControlAttributes(checkboxState.value),
|
|
@@ -67,9 +64,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
67
64
|
const labelAttrs = computed(() => checkboxControl.getLabelAttributes(checkboxState.value));
|
|
68
65
|
const errorAttrs = computed(() => checkboxControl.getErrorAttributes(checkboxState.value));
|
|
69
66
|
const inputRef = useTemplateRef("input");
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
function handleChange(event) {
|
|
68
|
+
const input = event.currentTarget;
|
|
69
|
+
const onChange = resolvedProps.value["onChange"];
|
|
70
|
+
if (typeof onChange === "function") onChange(event);
|
|
71
|
+
input.indeterminate = Boolean(resolvedProps.value.indeterminate);
|
|
72
|
+
}
|
|
73
73
|
__expose({ input: inputRef });
|
|
74
74
|
const __returned__ = {
|
|
75
75
|
props,
|
|
@@ -86,7 +86,8 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
86
86
|
inputAttrs,
|
|
87
87
|
labelAttrs,
|
|
88
88
|
errorAttrs,
|
|
89
|
-
inputRef
|
|
89
|
+
inputRef,
|
|
90
|
+
handleChange
|
|
90
91
|
};
|
|
91
92
|
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
92
93
|
enumerable: false,
|
|
@@ -95,14 +96,17 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
|
95
96
|
return __returned__;
|
|
96
97
|
}
|
|
97
98
|
});
|
|
99
|
+
const _hoisted_1 = [".indeterminate"];
|
|
98
100
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
99
101
|
return openBlock(), createElementBlock("div", {
|
|
100
102
|
class: normalizeClass($setup.cls.root),
|
|
101
103
|
style: normalizeStyle($setup.sls.root)
|
|
102
104
|
}, [createElementVNode("input", mergeProps({ ref: "input" }, $setup.inputAttrs, {
|
|
103
105
|
class: $setup.cls.checkbox,
|
|
104
|
-
style: $setup.sls.checkbox
|
|
105
|
-
|
|
106
|
+
style: $setup.sls.checkbox,
|
|
107
|
+
".indeterminate": Boolean($setup.resolvedProps.indeterminate),
|
|
108
|
+
onChange: $setup.handleChange
|
|
109
|
+
}), null, 48, _hoisted_1), createElementVNode("div", null, [$setup.slots.label ? (openBlock(), createElementBlock("label", mergeProps({ key: 0 }, $setup.labelAttrs, {
|
|
106
110
|
class: $setup.cls.label,
|
|
107
111
|
style: $setup.sls.label
|
|
108
112
|
}), [renderSlot(_ctx.$slots, "label")], 16)) : createCommentVNode("v-if", true), $setup.slots.error ? (openBlock(), createElementBlock("p", mergeProps({ key: 1 }, $setup.errorAttrs, {
|
|
@@ -118,7 +122,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
118
122
|
}, [renderSlot(_ctx.$slots, "error")], 6)], 16)) : createCommentVNode("v-if", true)])], 6);
|
|
119
123
|
}
|
|
120
124
|
var checkbox_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/checkbox/checkbox.vue"]]);
|
|
121
|
-
//#endregion
|
|
122
125
|
export { checkbox_default as default };
|
|
123
126
|
|
|
124
127
|
//# sourceMappingURL=checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","names":["_useSlots","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createElementVNode","_mergeProps","_renderSlot","_createCommentVNode"],"sources":["../../../src/components/checkbox/checkbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n checkboxControl,\n checkboxRecipe,\n type CheckboxSlots as CheckboxRecipeSlots,\n toStrbool,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useId,\n useTemplateRef,\n
|
|
1
|
+
{"version":3,"file":"checkbox.js","names":["_useSlots","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createElementVNode","_mergeProps","_renderSlot","_createCommentVNode"],"sources":["../../../src/components/checkbox/checkbox.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n checkboxControl,\n checkboxRecipe,\n type CheckboxSlots as CheckboxRecipeSlots,\n toStrbool,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useId,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport { attrToBool, useSlotPresence } from \"~/utils\";\nimport type { CheckboxOwnProps } from \"./checkbox.types\";\n\ndefineOptions({\n name: \"HuiCheckbox\",\n inheritAttrs: false,\n});\n\ntype Props =\n & CheckboxOwnProps\n & {\n classes?:\n | Partial<Record<CheckboxRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<CheckboxRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"input\">,\n keyof CheckboxOwnProps | \"children\" | \"type\" | \"class\" | \"style\"\n >;\n\nconst props = withDefaults(defineProps<Props>(), {\n indeterminate: undefined,\n});\n\nconst slots = defineSlots<{\n label?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Checkbox\", props, attrs);\nconst hasError = useSlotPresence(slots, [\"error\"]);\nconst generatedId = useId();\nconst checkboxState = computed(() => ({\n id: resolvedProps.value.id ?? generatedId,\n invalid: hasError.value,\n indeterminate: Boolean(resolvedProps.value.indeterminate),\n disabled: attrToBool(resolvedProps.value.disabled)\n || attrToBool(resolvedProps.value[\"aria-disabled\"]),\n}));\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n\n return checkboxRecipe({\n color: resolved.color,\n error: toStrbool(checkboxState.value.invalid),\n });\n});\nconst cls = useHuiClasses(\n \"Checkbox\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Checkbox\", CheckboxRecipeSlots>(\n \"Checkbox\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"id\",\n \"color\",\n \"indeterminate\",\n \"onChange\",\n]);\nconst inputAttrs = computed<Record<string, unknown>>(() => ({\n ...checkboxControl.getControlAttributes(checkboxState.value),\n ...forwardedAttrs.value,\n}));\nconst labelAttrs = computed(() =>\n checkboxControl.getLabelAttributes(checkboxState.value)\n);\nconst errorAttrs = computed(() =>\n checkboxControl.getErrorAttributes(checkboxState.value)\n);\nconst inputRef = useTemplateRef<HuiElementInstance<\"input\">>(\"input\");\n\nfunction handleChange(event: Event): void {\n const input = event.currentTarget as HTMLInputElement;\n const onChange = resolvedProps.value[\"onChange\"];\n if (typeof onChange === \"function\") onChange(event);\n input.indeterminate = Boolean(resolvedProps.value.indeterminate);\n}\n\ndefineExpose({\n input: inputRef,\n});\n</script>\n\n<template>\n <div :class=\"cls.root\" :style=\"sls.root\">\n <input\n ref=\"input\"\n v-bind=\"inputAttrs\"\n :class=\"cls.checkbox\"\n :style=\"sls.checkbox\"\n :indeterminate.prop=\"Boolean(resolvedProps.indeterminate)\"\n @change=\"handleChange\"\n />\n <div>\n <label\n v-if=\"slots.label\"\n v-bind=\"labelAttrs\"\n :class=\"cls.label\"\n :style=\"sls.label\"\n >\n <slot name=\"label\" />\n </label>\n <p\n v-if=\"slots.error\"\n v-bind=\"errorAttrs\"\n :class=\"cls.error\"\n :style=\"sls.error\"\n >\n <span\n aria-hidden=\"true\"\n :class=\"cls.errorIcon\"\n :style=\"sls.errorIcon\"\n />\n <span :class=\"cls.errorMessage\" :style=\"sls.errorMessage\">\n <slot name=\"error\" />\n </span>\n </p>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAId,MAAM,QAAQA,SAAA;EAKd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,YAAY,OAAO,KAAK;EAC1D,MAAM,WAAW,gBAAgB,OAAO,CAAC,OAAO,CAAC;EACjD,MAAM,cAAc,MAAM;EAC1B,MAAM,gBAAgB,gBAAgB;GACpC,IAAI,cAAc,MAAM,MAAM;GAC9B,SAAS,SAAS;GAClB,eAAe,QAAQ,cAAc,MAAM,aAAa;GACxD,UAAU,WAAW,cAAc,MAAM,QAAQ,KAC5C,WAAW,cAAc,MAAM,gBAAgB;EACtD,EAAE;EACF,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAE/B,OAAO,eAAe;IACpB,OAAO,SAAS;IAChB,OAAO,UAAU,cAAc,MAAM,OAAO;GAC9C,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,YACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,YACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,aAAa,gBAAyC;GAC1D,GAAG,gBAAgB,qBAAqB,cAAc,KAAK;GAC3D,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,aAAa,eACjB,gBAAgB,mBAAmB,cAAc,KAAK,CACxD;EACA,MAAM,aAAa,eACjB,gBAAgB,mBAAmB,cAAc,KAAK,CACxD;EACA,MAAM,WAAW,eAA4C,OAAO;EAEpE,SAAS,aAAa,OAAoB;GACxC,MAAM,QAAQ,MAAM;GACpB,MAAM,WAAW,cAAc,MAAM;GACrC,IAAI,OAAO,aAAa,YAAY,SAAS,KAAK;GAClD,MAAM,gBAAgB,QAAQ,cAAc,MAAM,aAAa;EACjE;EAEA,SAAa,EACX,OAAO,SACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,mBAkCM,OAAA;EAlCA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;C,IACrCC,mBAOE,SAPFC,WAOE,EANA,KAAI,QAAO,GACH,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,kBAAoB,QAAQ,OAAA,cAAc,aAAa;EACvD,UAAQ,OAAA;C,2BAEXD,mBAwBM,OAAA,MAAA,CAtBI,OAAA,MAAM,SADdJ,UAAA,GAAAC,mBAOQ,SAPRI,WAOQ,EAAA,KAAA,EAAA,GALE,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;C,KAEZC,WAAqB,KAAA,QAAA,OAAA,C,4CAGf,OAAA,MAAM,SADdN,UAAA,GAAAC,mBAcI,KAdJI,WAcI,EAAA,KAAA,EAAA,GAZM,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;C,KAEZD,mBAIE,QAAA;EAHA,eAAY;EACX,OAAKF,eAAE,OAAA,IAAI,SAAS;EACpB,OAAKC,eAAE,OAAA,IAAI,SAAS;C,aAEvBC,mBAEO,QAAA;EAFA,OAAKF,eAAE,OAAA,IAAI,YAAY;EAAG,OAAKC,eAAE,OAAA,IAAI,YAAY;C,IACtDG,WAAqB,KAAA,QAAA,OAAA,C"}
|
|
@@ -2,7 +2,6 @@ import { HuiElementInstance, HuiElementProps } from "../../types/element.js";
|
|
|
2
2
|
import { HuiComponentProps } from "../../types/hui-component.js";
|
|
3
3
|
import "../../types/index.js";
|
|
4
4
|
import { CheckboxSlots, CheckboxVariants } from "@hebium-ui/core";
|
|
5
|
-
//#region src/components/checkbox/checkbox.types.d.ts
|
|
6
5
|
type HtmlInputProps = Omit<HuiElementProps<"input">, "children" | "color" | "type">;
|
|
7
6
|
export interface CheckboxOwnProps {
|
|
8
7
|
/**
|
|
@@ -12,7 +11,7 @@ export interface CheckboxOwnProps {
|
|
|
12
11
|
*/
|
|
13
12
|
color?: CheckboxVariants["color"] | undefined;
|
|
14
13
|
/**
|
|
15
|
-
*
|
|
14
|
+
* The controlled indeterminate state. Update this prop in response to user interaction.
|
|
16
15
|
*
|
|
17
16
|
* @default false
|
|
18
17
|
*/
|
|
@@ -22,6 +21,5 @@ export type CheckboxProps = HuiComponentProps<HtmlInputProps & CheckboxOwnProps,
|
|
|
22
21
|
export interface CheckboxExposed {
|
|
23
22
|
readonly input: HuiElementInstance<"input"> | null;
|
|
24
23
|
}
|
|
25
|
-
//#endregion
|
|
26
24
|
export {};
|
|
27
25
|
//# sourceMappingURL=checkbox.types.d.ts.map
|