@hebium-ui/vue 0.0.0-stage → 0.1.0-alpha.1
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/LICENSE +21 -0
- package/README.md +7 -2
- package/dist/_virtual/_/plugin-vue/export-helper.js +8 -0
- package/dist/components/alert/alert.js +108 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/alert.types.d.ts +31 -0
- package/dist/components/alert/alert.vue.d.ts +28 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/anchor/anchor.js +106 -0
- package/dist/components/anchor/anchor.js.map +1 -0
- package/dist/components/anchor/anchor.types.d.ts +31 -0
- package/dist/components/anchor/anchor.vue.d.ts +30 -0
- package/dist/components/anchor/index.d.ts +3 -0
- package/dist/components/avatar/avatar.js +111 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/avatar.types.d.ts +17 -0
- package/dist/components/avatar/avatar.vue.d.ts +17 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/blockquote/blockquote.js +82 -0
- package/dist/components/blockquote/blockquote.js.map +1 -0
- package/dist/components/blockquote/blockquote.types.d.ts +25 -0
- package/dist/components/blockquote/blockquote.vue.d.ts +27 -0
- package/dist/components/blockquote/index.d.ts +3 -0
- package/dist/components/button/button.js +106 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/button.types.d.ts +31 -0
- package/dist/components/button/button.vue.d.ts +30 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/checkbox/checkbox.js +124 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.types.d.ts +27 -0
- package/dist/components/checkbox/checkbox.vue.d.ts +29 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/code/code.js +84 -0
- package/dist/components/code/code.js.map +1 -0
- package/dist/components/code/code.types.d.ts +12 -0
- package/dist/components/code/code.vue.d.ts +30 -0
- package/dist/components/code/index.d.ts +3 -0
- package/dist/components/details/details.js +76 -0
- package/dist/components/details/details.js.map +1 -0
- package/dist/components/details/details.types.d.ts +19 -0
- package/dist/components/details/details.vue.d.ts +27 -0
- package/dist/components/details/index.d.ts +3 -0
- package/dist/components/dialog/dialog-close.js +100 -0
- package/dist/components/dialog/dialog-close.js.map +1 -0
- package/dist/components/dialog/dialog-close.vue.d.ts +27 -0
- package/dist/components/dialog/dialog-content.js +180 -0
- package/dist/components/dialog/dialog-content.js.map +1 -0
- package/dist/components/dialog/dialog-content.vue.d.ts +30 -0
- package/dist/components/dialog/dialog-trigger.js +105 -0
- package/dist/components/dialog/dialog-trigger.js.map +1 -0
- package/dist/components/dialog/dialog-trigger.vue.d.ts +31 -0
- package/dist/components/dialog/dialog.context.d.ts +5 -0
- package/dist/components/dialog/dialog.context.js +15 -0
- package/dist/components/dialog/dialog.context.js.map +1 -0
- package/dist/components/dialog/dialog.js +62 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/dialog.types.d.ts +73 -0
- package/dist/components/dialog/dialog.vue.d.ts +18 -0
- package/dist/components/dialog/index.d.ts +7 -0
- package/dist/components/dl/dl-dd.js +71 -0
- package/dist/components/dl/dl-dd.js.map +1 -0
- package/dist/components/dl/dl-dd.vue.d.ts +24 -0
- package/dist/components/dl/dl-dt.js +71 -0
- package/dist/components/dl/dl-dt.js.map +1 -0
- package/dist/components/dl/dl-dt.vue.d.ts +24 -0
- package/dist/components/dl/dl.js +71 -0
- package/dist/components/dl/dl.js.map +1 -0
- package/dist/components/dl/dl.types.d.ts +19 -0
- package/dist/components/dl/dl.vue.d.ts +24 -0
- package/dist/components/dl/index.d.ts +5 -0
- package/dist/components/drawer/drawer-close.js +100 -0
- package/dist/components/drawer/drawer-close.js.map +1 -0
- package/dist/components/drawer/drawer-close.vue.d.ts +27 -0
- package/dist/components/drawer/drawer-content.js +185 -0
- package/dist/components/drawer/drawer-content.js.map +1 -0
- package/dist/components/drawer/drawer-content.vue.d.ts +30 -0
- package/dist/components/drawer/drawer-trigger.js +96 -0
- package/dist/components/drawer/drawer-trigger.js.map +1 -0
- package/dist/components/drawer/drawer-trigger.vue.d.ts +31 -0
- package/dist/components/drawer/drawer.context.d.ts +5 -0
- package/dist/components/drawer/drawer.context.js +15 -0
- package/dist/components/drawer/drawer.context.js.map +1 -0
- package/dist/components/drawer/drawer.js +43 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/drawer.types.d.ts +73 -0
- package/dist/components/drawer/drawer.vue.d.ts +16 -0
- package/dist/components/drawer/index.d.ts +7 -0
- package/dist/components/fieldset/fieldset.js +71 -0
- package/dist/components/fieldset/fieldset.js.map +1 -0
- package/dist/components/fieldset/fieldset.types.d.ts +11 -0
- package/dist/components/fieldset/fieldset.vue.d.ts +24 -0
- package/dist/components/fieldset/index.d.ts +3 -0
- package/dist/components/heading/heading.js +95 -0
- package/dist/components/heading/heading.js.map +1 -0
- package/dist/components/heading/heading.types.d.ts +25 -0
- package/dist/components/heading/heading.vue.d.ts +25 -0
- package/dist/components/heading/index.d.ts +3 -0
- package/dist/components/hr/hr.js +81 -0
- package/dist/components/hr/hr.js.map +1 -0
- package/dist/components/hr/hr.types.d.ts +12 -0
- package/dist/components/hr/hr.vue.d.ts +28 -0
- package/dist/components/hr/index.d.ts +3 -0
- package/dist/components/index.d.ts +122 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/input.js +136 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/input/input.types.d.ts +27 -0
- package/dist/components/input/input.vue.d.ts +28 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/label.js +142 -0
- package/dist/components/label/label.js.map +1 -0
- package/dist/components/label/label.types.d.ts +26 -0
- package/dist/components/label/label.vue.d.ts +33 -0
- package/dist/components/menu/index.d.ts +7 -0
- package/dist/components/menu/menu-content.js +128 -0
- package/dist/components/menu/menu-content.js.map +1 -0
- package/dist/components/menu/menu-content.vue.d.ts +30 -0
- package/dist/components/menu/menu-item.js +165 -0
- package/dist/components/menu/menu-item.js.map +1 -0
- package/dist/components/menu/menu-item.vue.d.ts +30 -0
- package/dist/components/menu/menu-trigger.js +103 -0
- package/dist/components/menu/menu-trigger.js.map +1 -0
- package/dist/components/menu/menu-trigger.vue.d.ts +31 -0
- package/dist/components/menu/menu.context.d.ts +5 -0
- package/dist/components/menu/menu.context.js +15 -0
- package/dist/components/menu/menu.context.js.map +1 -0
- package/dist/components/menu/menu.js +43 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menu/menu.types.d.ts +80 -0
- package/dist/components/menu/menu.vue.d.ts +16 -0
- package/dist/components/paragraph/index.d.ts +3 -0
- package/dist/components/paragraph/paragraph.js +89 -0
- package/dist/components/paragraph/paragraph.js.map +1 -0
- package/dist/components/paragraph/paragraph.types.d.ts +19 -0
- package/dist/components/paragraph/paragraph.vue.d.ts +30 -0
- package/dist/components/popover/index.d.ts +6 -0
- package/dist/components/popover/popover-content.js +120 -0
- package/dist/components/popover/popover-content.js.map +1 -0
- package/dist/components/popover/popover-content.vue.d.ts +30 -0
- package/dist/components/popover/popover-trigger.js +91 -0
- package/dist/components/popover/popover-trigger.js.map +1 -0
- package/dist/components/popover/popover-trigger.vue.d.ts +31 -0
- package/dist/components/popover/popover.context.d.ts +5 -0
- package/dist/components/popover/popover.context.js +15 -0
- package/dist/components/popover/popover.context.js.map +1 -0
- package/dist/components/popover/popover.js +43 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/popover/popover.types.d.ts +50 -0
- package/dist/components/popover/popover.vue.d.ts +16 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/progress.js +149 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/progress/progress.types.d.ts +53 -0
- package/dist/components/progress/progress.vue.d.ts +26 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio/radio.js +112 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/radio/radio.types.d.ts +21 -0
- package/dist/components/radio/radio.vue.d.ts +27 -0
- package/dist/components/radiogroup/index.d.ts +3 -0
- package/dist/components/radiogroup/radiogroup.js +130 -0
- package/dist/components/radiogroup/radiogroup.js.map +1 -0
- package/dist/components/radiogroup/radiogroup.types.d.ts +25 -0
- package/dist/components/radiogroup/radiogroup.vue.d.ts +34 -0
- package/dist/components/section/index.d.ts +3 -0
- package/dist/components/section/section.js +112 -0
- package/dist/components/section/section.js.map +1 -0
- package/dist/components/section/section.types.d.ts +37 -0
- package/dist/components/section/section.vue.d.ts +30 -0
- package/dist/components/segmented-control/index.d.ts +4 -0
- package/dist/components/segmented-control/segmented-control-item.js +110 -0
- package/dist/components/segmented-control/segmented-control-item.js.map +1 -0
- package/dist/components/segmented-control/segmented-control-item.vue.d.ts +30 -0
- package/dist/components/segmented-control/segmented-control.context.js +12 -0
- package/dist/components/segmented-control/segmented-control.context.js.map +1 -0
- package/dist/components/segmented-control/segmented-control.js +112 -0
- package/dist/components/segmented-control/segmented-control.js.map +1 -0
- package/dist/components/segmented-control/segmented-control.types.d.ts +42 -0
- package/dist/components/segmented-control/segmented-control.vue.d.ts +26 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/select.js +124 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select/select.types.d.ts +21 -0
- package/dist/components/select/select.vue.d.ts +29 -0
- package/dist/components/table/index.d.ts +10 -0
- package/dist/components/table/table-caption.js +79 -0
- package/dist/components/table/table-caption.js.map +1 -0
- package/dist/components/table/table-caption.vue.d.ts +25 -0
- package/dist/components/table/table-tbody.js +70 -0
- package/dist/components/table/table-tbody.js.map +1 -0
- package/dist/components/table/table-tbody.vue.d.ts +24 -0
- package/dist/components/table/table-td.js +71 -0
- package/dist/components/table/table-td.js.map +1 -0
- package/dist/components/table/table-td.vue.d.ts +24 -0
- package/dist/components/table/table-tfoot.js +70 -0
- package/dist/components/table/table-tfoot.js.map +1 -0
- package/dist/components/table/table-tfoot.vue.d.ts +24 -0
- package/dist/components/table/table-th.js +71 -0
- package/dist/components/table/table-th.js.map +1 -0
- package/dist/components/table/table-th.vue.d.ts +24 -0
- package/dist/components/table/table-thead.js +70 -0
- package/dist/components/table/table-thead.js.map +1 -0
- package/dist/components/table/table-thead.vue.d.ts +24 -0
- package/dist/components/table/table-tr.js +79 -0
- package/dist/components/table/table-tr.js.map +1 -0
- package/dist/components/table/table-tr.vue.d.ts +25 -0
- package/dist/components/table/table.js +79 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/table/table.types.d.ts +59 -0
- package/dist/components/table/table.vue.d.ts +25 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/tabs-list.js +98 -0
- package/dist/components/tabs/tabs-list.js.map +1 -0
- package/dist/components/tabs/tabs-list.vue.d.ts +29 -0
- package/dist/components/tabs/tabs-panel.js +100 -0
- package/dist/components/tabs/tabs-panel.js.map +1 -0
- package/dist/components/tabs/tabs-panel.vue.d.ts +30 -0
- package/dist/components/tabs/tabs-tab.js +135 -0
- package/dist/components/tabs/tabs-tab.js.map +1 -0
- package/dist/components/tabs/tabs-tab.vue.d.ts +30 -0
- package/dist/components/tabs/tabs.context.js +12 -0
- package/dist/components/tabs/tabs.context.js.map +1 -0
- package/dist/components/tabs/tabs.js +144 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tabs/tabs.types.d.ts +61 -0
- package/dist/components/tabs/tabs.vue.d.ts +30 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/textarea.js +137 -0
- package/dist/components/textarea/textarea.js.map +1 -0
- package/dist/components/textarea/textarea.types.d.ts +27 -0
- package/dist/components/textarea/textarea.vue.d.ts +28 -0
- package/dist/components/tooltip/index.d.ts +6 -0
- package/dist/components/tooltip/tooltip-content.js +128 -0
- package/dist/components/tooltip/tooltip-content.js.map +1 -0
- package/dist/components/tooltip/tooltip-content.vue.d.ts +30 -0
- package/dist/components/tooltip/tooltip-trigger.js +125 -0
- package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
- package/dist/components/tooltip/tooltip-trigger.vue.d.ts +31 -0
- package/dist/components/tooltip/tooltip.context.d.ts +5 -0
- package/dist/components/tooltip/tooltip.context.js +15 -0
- package/dist/components/tooltip/tooltip.context.js.map +1 -0
- package/dist/components/tooltip/tooltip.js +43 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tooltip/tooltip.types.d.ts +50 -0
- package/dist/components/tooltip/tooltip.vue.d.ts +16 -0
- package/dist/components/visually-hidden/index.d.ts +3 -0
- package/dist/components/visually-hidden/visually-hidden.js +84 -0
- package/dist/components/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/components/visually-hidden/visually-hidden.types.d.ts +12 -0
- package/dist/components/visually-hidden/visually-hidden.vue.d.ts +30 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.js +64 -0
- package/dist/plugin.d.ts +126 -0
- package/dist/plugin.js +124 -0
- package/dist/plugin.js.map +1 -0
- package/dist/provider/hui-provider.context.d.ts +108 -0
- package/dist/provider/hui-provider.context.js +79 -0
- package/dist/provider/hui-provider.context.js.map +1 -0
- package/dist/provider/hui-provider.js +37 -0
- package/dist/provider/hui-provider.js.map +1 -0
- package/dist/provider/hui-provider.vue.d.ts +27 -0
- package/dist/provider/index.d.ts +3 -0
- package/dist/types/element.d.ts +12 -0
- package/dist/types/hui-component.d.ts +13 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/polymorphic.d.ts +19 -0
- package/dist/utils/attr-to-bool.js +8 -0
- package/dist/utils/attr-to-bool.js.map +1 -0
- package/package.json +59 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { inject } from "vue";
|
|
2
|
+
//#region src/components/tabs/tabs.context.ts
|
|
3
|
+
const TabsContext = Symbol("Tabs");
|
|
4
|
+
function useTabsContext() {
|
|
5
|
+
const context = inject(TabsContext);
|
|
6
|
+
if (!context) throw new Error("[Hebium UI] Tabs compound components must be used within <Tabs>");
|
|
7
|
+
return context;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { TabsContext, useTabsContext };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=tabs.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.context.js","names":[],"sources":["../../../src/components/tabs/tabs.context.ts"],"sourcesContent":["import { type ComputedRef, inject, type InjectionKey } from \"vue\";\nimport type { ActivationMode } from \"./tabs.types\";\n\nexport interface TabsContextValue {\n readonly rootId: ComputedRef<string>;\n readonly selectedValue: ComputedRef<string | undefined>;\n readonly onSelect: (value: string) => void;\n readonly activation: ComputedRef<ActivationMode>;\n}\n\nexport const TabsContext: InjectionKey<TabsContextValue> = Symbol(\"Tabs\");\n\nexport function useTabsContext(): TabsContextValue {\n const context = inject(TabsContext);\n if (!context) {\n throw new Error(\n \"[Hebium UI] Tabs compound components must be used within <Tabs>\",\n );\n }\n return context;\n}\n"],"mappings":";;AAUA,MAAa,cAA8C,OAAO,MAAM;AAExE,SAAgB,iBAAmC;CACjD,MAAM,UAAU,OAAO,WAAW;CAClC,IAAI,CAAC,SACH,MAAM,IAAI,MACR,iEACF;CAEF,OAAO;AACT"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../provider/hui-provider.context.js";
|
|
2
|
+
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
|
+
import { TabsContext } from "./tabs.context.js";
|
|
4
|
+
import { computed, createBlock, defineComponent, mergeProps, openBlock, provide, renderSlot, resolveDynamicComponent, shallowRef, toRaw, useAttrs, useId, useTemplateRef, withCtx } from "vue";
|
|
5
|
+
import { tabrootRecipe, tabsControl } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/tabs/tabs.vue
|
|
7
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
|
+
name: "HuiTabs",
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
__name: "tabs",
|
|
11
|
+
props: {
|
|
12
|
+
values: {
|
|
13
|
+
type: Array,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
value: {
|
|
17
|
+
type: null,
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
defaultValue: {
|
|
21
|
+
type: null,
|
|
22
|
+
required: false
|
|
23
|
+
},
|
|
24
|
+
onChange: {
|
|
25
|
+
type: Function,
|
|
26
|
+
required: false,
|
|
27
|
+
skipCheck: true
|
|
28
|
+
},
|
|
29
|
+
activation: {
|
|
30
|
+
type: null,
|
|
31
|
+
required: false
|
|
32
|
+
},
|
|
33
|
+
as: {
|
|
34
|
+
type: null,
|
|
35
|
+
required: false
|
|
36
|
+
},
|
|
37
|
+
class: {
|
|
38
|
+
type: [
|
|
39
|
+
Boolean,
|
|
40
|
+
null,
|
|
41
|
+
String,
|
|
42
|
+
Object,
|
|
43
|
+
Array
|
|
44
|
+
],
|
|
45
|
+
required: false,
|
|
46
|
+
skipCheck: true
|
|
47
|
+
},
|
|
48
|
+
style: {
|
|
49
|
+
type: [
|
|
50
|
+
Boolean,
|
|
51
|
+
null,
|
|
52
|
+
String,
|
|
53
|
+
Object,
|
|
54
|
+
Array
|
|
55
|
+
],
|
|
56
|
+
required: false,
|
|
57
|
+
skipCheck: true
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
setup(__props, { expose: __expose }) {
|
|
61
|
+
const props = __props;
|
|
62
|
+
const attrs = useAttrs();
|
|
63
|
+
const resolvedProps = useHuiProps("Tabs", props, attrs);
|
|
64
|
+
const component = computed(() => toRaw(resolvedProps.value.as ?? "div"));
|
|
65
|
+
const generatedId = useId();
|
|
66
|
+
const rootId = computed(() => resolvedProps.value["id"] || generatedId);
|
|
67
|
+
const uncontrolledValue = shallowRef(resolvedProps.value.value ?? resolvedProps.value.defaultValue ?? resolvedProps.value.values[0]);
|
|
68
|
+
const selectedValue = computed(() => resolvedProps.value.value ?? uncontrolledValue.value);
|
|
69
|
+
const activation = computed(() => resolvedProps.value.activation ?? "manual");
|
|
70
|
+
const recipe = computed(() => tabrootRecipe({}));
|
|
71
|
+
const cls = useHuiClasses("Tabs", recipe, computed(() => ({ root: props.class })));
|
|
72
|
+
const sls = useHuiStyles("Tabs", computed(() => ({ root: props.style })));
|
|
73
|
+
const forwardedAttrs = useHuiAttrs(resolvedProps, [
|
|
74
|
+
"as",
|
|
75
|
+
"id",
|
|
76
|
+
"values",
|
|
77
|
+
"value",
|
|
78
|
+
"defaultValue",
|
|
79
|
+
"onChange",
|
|
80
|
+
"activation",
|
|
81
|
+
"class",
|
|
82
|
+
"style"
|
|
83
|
+
]);
|
|
84
|
+
const rootAttrs = computed(() => ({
|
|
85
|
+
...tabsControl.getRootAttributes({
|
|
86
|
+
rootId: rootId.value,
|
|
87
|
+
selectedValue: selectedValue.value
|
|
88
|
+
}),
|
|
89
|
+
...forwardedAttrs.value
|
|
90
|
+
}));
|
|
91
|
+
const rootRef = useTemplateRef("root");
|
|
92
|
+
function onSelect(nextValue) {
|
|
93
|
+
const resolved = resolvedProps.value;
|
|
94
|
+
if (!resolved.values.some((value) => value === nextValue)) throw new Error(`[Hebium UI] Unexpected Tab value: ${nextValue}`);
|
|
95
|
+
const value = nextValue;
|
|
96
|
+
uncontrolledValue.value = value;
|
|
97
|
+
resolved.onChange?.(value);
|
|
98
|
+
}
|
|
99
|
+
provide(TabsContext, {
|
|
100
|
+
rootId,
|
|
101
|
+
selectedValue,
|
|
102
|
+
onSelect,
|
|
103
|
+
activation
|
|
104
|
+
});
|
|
105
|
+
__expose({ root: rootRef });
|
|
106
|
+
const __returned__ = {
|
|
107
|
+
props,
|
|
108
|
+
attrs,
|
|
109
|
+
resolvedProps,
|
|
110
|
+
component,
|
|
111
|
+
generatedId,
|
|
112
|
+
rootId,
|
|
113
|
+
uncontrolledValue,
|
|
114
|
+
selectedValue,
|
|
115
|
+
activation,
|
|
116
|
+
recipe,
|
|
117
|
+
cls,
|
|
118
|
+
sls,
|
|
119
|
+
forwardedAttrs,
|
|
120
|
+
rootAttrs,
|
|
121
|
+
rootRef,
|
|
122
|
+
onSelect
|
|
123
|
+
};
|
|
124
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
125
|
+
enumerable: false,
|
|
126
|
+
value: true
|
|
127
|
+
});
|
|
128
|
+
return __returned__;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
132
|
+
return openBlock(), createBlock(resolveDynamicComponent($setup.component), mergeProps({ ref: "root" }, $setup.rootAttrs, {
|
|
133
|
+
class: $setup.cls.root,
|
|
134
|
+
style: $setup.sls.root
|
|
135
|
+
}), {
|
|
136
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
137
|
+
_: 3
|
|
138
|
+
}, 16, ["class", "style"]);
|
|
139
|
+
}
|
|
140
|
+
var tabs_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/tabs/tabs.vue"]]);
|
|
141
|
+
//#endregion
|
|
142
|
+
export { tabs_default as default };
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabs.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/tabs/tabs.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"V extends string, E extends ElementType = 'div'\"\n>\nimport { tabrootRecipe, tabsControl } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n provide,\n shallowRef,\n type StyleValue,\n toRaw,\n useAttrs,\n useId,\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 { TabsContext } from \"./tabs.context\";\nimport type { ActivationMode, TabsOwnProps } from \"./tabs.types\";\n\ndefineOptions({\n name: \"HuiTabs\",\n inheritAttrs: false,\n});\n\ntype Props =\n & TabsOwnProps<V>\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof TabsOwnProps<V> | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Tabs\", props, attrs);\nconst component = computed<E | \"div\">(() =>\n toRaw(resolvedProps.value.as ?? \"div\")\n);\nconst generatedId = useId();\nconst rootId = computed(() => resolvedProps.value[\"id\"] || generatedId);\nconst uncontrolledValue = shallowRef<V | undefined>(\n resolvedProps.value.value\n ?? resolvedProps.value.defaultValue\n ?? resolvedProps.value.values[0],\n);\nconst selectedValue = computed<V | undefined>(() =>\n resolvedProps.value.value ?? uncontrolledValue.value\n);\nconst activation = computed<ActivationMode>(() =>\n resolvedProps.value.activation ?? \"manual\"\n);\nconst recipe = computed(() => tabrootRecipe({}));\nconst cls = useHuiClasses(\n \"Tabs\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"Tabs\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"id\",\n \"values\",\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"activation\",\n \"class\",\n \"style\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => ({\n ...tabsControl.getRootAttributes({\n rootId: rootId.value,\n selectedValue: selectedValue.value,\n }),\n ...forwardedAttrs.value,\n}));\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nfunction onSelect(nextValue: string): void {\n const resolved = resolvedProps.value;\n if (!resolved.values.some((value: V) => value === nextValue)) {\n throw new Error(`[Hebium UI] Unexpected Tab value: ${nextValue}`);\n }\n\n const value = nextValue as V;\n uncontrolledValue.value = value;\n resolved.onChange?.(value);\n}\n\nprovide(TabsContext, {\n rootId,\n selectedValue,\n onSelect,\n activation,\n});\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,QAAQ,OAAO,KAAK;EACtD,MAAM,YAAY,eAChB,MAAM,cAAc,MAAM,MAAM,KAAK,CACvC;EACA,MAAM,cAAc,MAAM;EAC1B,MAAM,SAAS,eAAe,cAAc,MAAM,SAAS,WAAW;EACtE,MAAM,oBAAoB,WACxB,cAAc,MAAM,SACf,cAAc,MAAM,gBACpB,cAAc,MAAM,OAAO,EAClC;EACA,MAAM,gBAAgB,eACpB,cAAc,MAAM,SAAS,kBAAkB,KACjD;EACA,MAAM,aAAa,eACjB,cAAc,MAAM,cAAc,QACpC;EACA,MAAM,SAAS,eAAe,cAAc,CAAC,CAAC,CAAC;EAC/C,MAAM,MAAM,cACV,QACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,gBAAyC;GACzD,GAAG,YAAY,kBAAkB;IAC/B,QAAQ,OAAO;IACf,eAAe,cAAc;GAC/B,CAAC;GACD,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAS,SAAS,WAAyB;GACzC,MAAM,WAAW,cAAc;GAC/B,IAAI,CAAC,SAAS,OAAO,MAAM,UAAa,UAAU,SAAS,GACzD,MAAM,IAAI,MAAM,qCAAqC,WAAW;GAGlE,MAAM,QAAQ;GACd,kBAAkB,QAAQ;GAC1B,SAAS,WAAW,KAAK;EAC3B;EAEA,QAAQ,aAAa;GACnB;GACA;GACA;GACA;EACF,CAAC;EAED,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"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ElementType, HuiElementInstance } from "../../types/element.js";
|
|
2
|
+
import { HuiPolymorphicProps } from "../../types/polymorphic.js";
|
|
3
|
+
import "../../types/index.js";
|
|
4
|
+
import { TabSlots, TablistSlots, TabpanelSlots, TabrootSlots } from "@hebium-ui/core";
|
|
5
|
+
//#region src/components/tabs/tabs.types.d.ts
|
|
6
|
+
export type ActivationMode = "manual" | "auto";
|
|
7
|
+
export interface TabsOwnProps<V extends string> {
|
|
8
|
+
/**
|
|
9
|
+
* The list of allowed tab values.
|
|
10
|
+
*/
|
|
11
|
+
values: V[];
|
|
12
|
+
/**
|
|
13
|
+
* The currently selected tab value.
|
|
14
|
+
*/
|
|
15
|
+
value?: V | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* The initially selected tab value for uncontrolled tabs.
|
|
18
|
+
*/
|
|
19
|
+
defaultValue?: V | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Called when the selected tab value changes.
|
|
22
|
+
*/
|
|
23
|
+
onChange?: ((value: V) => void) | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The activation mode used when focus moves between tabs.
|
|
26
|
+
*
|
|
27
|
+
* @default "manual"
|
|
28
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_selection_follows_focus | WAI-ARIA APG: Deciding When to Make Selection Automatically Follow Focus}
|
|
29
|
+
*/
|
|
30
|
+
activation?: ActivationMode | undefined;
|
|
31
|
+
}
|
|
32
|
+
export type TabsProps<V extends string, E extends ElementType = "div"> = HuiPolymorphicProps<E, TabsOwnProps<V>, TabrootSlots>;
|
|
33
|
+
export interface TabsExposed<E extends ElementType = "div"> {
|
|
34
|
+
readonly root: HuiElementInstance<E> | null;
|
|
35
|
+
}
|
|
36
|
+
export type TabsListProps<E extends ElementType = "div"> = HuiPolymorphicProps<E, object, TablistSlots>;
|
|
37
|
+
export interface TabsListExposed<E extends ElementType = "div"> {
|
|
38
|
+
readonly root: HuiElementInstance<E> | null;
|
|
39
|
+
}
|
|
40
|
+
export interface TabsTabOwnProps {
|
|
41
|
+
/**
|
|
42
|
+
* The value represented by this tab.
|
|
43
|
+
*/
|
|
44
|
+
value: string;
|
|
45
|
+
}
|
|
46
|
+
export type TabsTabProps<E extends ElementType = "button"> = HuiPolymorphicProps<E, TabsTabOwnProps, TabSlots>;
|
|
47
|
+
export interface TabsTabExposed<E extends ElementType = "button"> {
|
|
48
|
+
readonly root: HuiElementInstance<E> | null;
|
|
49
|
+
}
|
|
50
|
+
export interface TabsPanelOwnProps {
|
|
51
|
+
/**
|
|
52
|
+
* The tab value associated with this panel.
|
|
53
|
+
*/
|
|
54
|
+
value: string;
|
|
55
|
+
}
|
|
56
|
+
export type TabsPanelProps<E extends ElementType = "div"> = HuiPolymorphicProps<E, TabsPanelOwnProps, TabpanelSlots>;
|
|
57
|
+
export interface TabsPanelExposed<E extends ElementType = "div"> {
|
|
58
|
+
readonly root: HuiElementInstance<E> | null;
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//# sourceMappingURL=tabs.types.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ElementType, HuiElementInstance, HuiElementPropsNoInfer } from "../../types/element.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
import { TabsOwnProps } from "./tabs.types.js";
|
|
4
|
+
import { ClassValue, StyleValue } from "vue";
|
|
5
|
+
//#region src/components/tabs/tabs.vue.d.ts
|
|
6
|
+
declare const __VLS_export: <V extends string, E extends ElementType = "div">(__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
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TabsOwnProps<V> & {
|
|
8
|
+
as?: E | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
class?: ClassValue | undefined;
|
|
11
|
+
style?: StyleValue | undefined;
|
|
12
|
+
} & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | keyof TabsOwnProps<V>>> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
16
|
+
root: Readonly<import("vue").ShallowRef<HuiElementInstance<E> | null>>;
|
|
17
|
+
}>) => void;
|
|
18
|
+
attrs: any;
|
|
19
|
+
slots: {
|
|
20
|
+
default?: () => unknown;
|
|
21
|
+
};
|
|
22
|
+
emit: {};
|
|
23
|
+
}>) => import("vue").VNode & {
|
|
24
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
25
|
+
};
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { _default as default };
|
|
30
|
+
//# sourceMappingURL=tabs.vue.d.ts.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../provider/hui-provider.context.js";
|
|
2
|
+
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
|
+
import { attrToBool } from "../../utils/attr-to-bool.js";
|
|
4
|
+
import label_default from "../label/label.js";
|
|
5
|
+
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, defineComponent, mergeProps, normalizeClass, normalizeProps, normalizeStyle, onBeforeUpdate, openBlock, ref, renderSlot, useAttrs, useId, useSlots, useTemplateRef, withCtx } from "vue";
|
|
6
|
+
import { inputControl, inputRecipe, toStrbool } from "@hebium-ui/core";
|
|
7
|
+
//#region src/components/textarea/textarea.vue
|
|
8
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
9
|
+
name: "HuiTextarea",
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
__name: "textarea",
|
|
12
|
+
props: {
|
|
13
|
+
color: {
|
|
14
|
+
type: null,
|
|
15
|
+
required: false
|
|
16
|
+
},
|
|
17
|
+
labelProps: {
|
|
18
|
+
type: null,
|
|
19
|
+
required: false
|
|
20
|
+
},
|
|
21
|
+
classes: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
},
|
|
25
|
+
styles: {
|
|
26
|
+
type: null,
|
|
27
|
+
required: false
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
setup(__props, { expose: __expose }) {
|
|
31
|
+
const props = __props;
|
|
32
|
+
const slots = useSlots();
|
|
33
|
+
const attrs = useAttrs();
|
|
34
|
+
const resolvedProps = useHuiProps("Textarea", props, attrs);
|
|
35
|
+
const generatedId = useId();
|
|
36
|
+
const hasLabel = ref(Boolean(slots.label || slots.description || slots.error));
|
|
37
|
+
const hasError = ref(Boolean(slots.error));
|
|
38
|
+
onBeforeUpdate(() => {
|
|
39
|
+
hasLabel.value = Boolean(slots.label || slots.description || slots.error);
|
|
40
|
+
hasError.value = Boolean(slots.error);
|
|
41
|
+
});
|
|
42
|
+
const inputState = computed(() => {
|
|
43
|
+
const resolved = resolvedProps.value;
|
|
44
|
+
return {
|
|
45
|
+
id: resolved.id || generatedId,
|
|
46
|
+
invalid: hasError.value,
|
|
47
|
+
required: attrToBool(resolved.required ?? resolved["aria-required"]),
|
|
48
|
+
disabled: attrToBool(resolved.disabled) || attrToBool(resolved["aria-disabled"]),
|
|
49
|
+
readOnly: attrToBool(resolved.readonly) || attrToBool(resolved["aria-readonly"])
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
const recipe = computed(() => {
|
|
53
|
+
const state = inputState.value;
|
|
54
|
+
return inputRecipe({
|
|
55
|
+
color: resolvedProps.value.color,
|
|
56
|
+
height: "auto",
|
|
57
|
+
error: toStrbool(state.invalid)
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
const cls = useHuiClasses("Textarea", recipe, computed(() => props.classes ?? {}));
|
|
61
|
+
const sls = useHuiStyles("Textarea", computed(() => props.styles ?? {}));
|
|
62
|
+
const forwardedAttrs = useHuiAttrs(resolvedProps, [
|
|
63
|
+
"id",
|
|
64
|
+
"color",
|
|
65
|
+
"labelProps",
|
|
66
|
+
"classes",
|
|
67
|
+
"styles",
|
|
68
|
+
"class",
|
|
69
|
+
"style"
|
|
70
|
+
]);
|
|
71
|
+
const textareaAttrs = computed(() => ({
|
|
72
|
+
...inputControl.getControlAttributes(inputState.value),
|
|
73
|
+
...forwardedAttrs.value
|
|
74
|
+
}));
|
|
75
|
+
const labelAttrs = computed(() => ({
|
|
76
|
+
...inputControl.getLabelAttributes(inputState.value),
|
|
77
|
+
...resolvedProps.value.labelProps
|
|
78
|
+
}));
|
|
79
|
+
const textareaRef = useTemplateRef("textarea");
|
|
80
|
+
__expose({ textarea: textareaRef });
|
|
81
|
+
const __returned__ = {
|
|
82
|
+
props,
|
|
83
|
+
slots,
|
|
84
|
+
attrs,
|
|
85
|
+
resolvedProps,
|
|
86
|
+
generatedId,
|
|
87
|
+
hasLabel,
|
|
88
|
+
hasError,
|
|
89
|
+
inputState,
|
|
90
|
+
recipe,
|
|
91
|
+
cls,
|
|
92
|
+
sls,
|
|
93
|
+
forwardedAttrs,
|
|
94
|
+
textareaAttrs,
|
|
95
|
+
labelAttrs,
|
|
96
|
+
textareaRef,
|
|
97
|
+
get Label() {
|
|
98
|
+
return label_default;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
102
|
+
enumerable: false,
|
|
103
|
+
value: true
|
|
104
|
+
});
|
|
105
|
+
return __returned__;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
109
|
+
return openBlock(), createElementBlock("div", {
|
|
110
|
+
class: normalizeClass($setup.cls.root),
|
|
111
|
+
style: normalizeStyle($setup.sls.root)
|
|
112
|
+
}, [$setup.hasLabel ? (openBlock(), createBlock($setup["Label"], normalizeProps(mergeProps({ key: 0 }, $setup.labelAttrs)), createSlots({ _: 2 }, [
|
|
113
|
+
$setup.slots.label ? {
|
|
114
|
+
name: "default",
|
|
115
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "label")]),
|
|
116
|
+
key: "0"
|
|
117
|
+
} : void 0,
|
|
118
|
+
$setup.slots.description ? {
|
|
119
|
+
name: "description",
|
|
120
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
121
|
+
key: "1"
|
|
122
|
+
} : void 0,
|
|
123
|
+
$setup.slots.error ? {
|
|
124
|
+
name: "error",
|
|
125
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
|
|
126
|
+
key: "2"
|
|
127
|
+
} : void 0
|
|
128
|
+
]), 1040)) : createCommentVNode("v-if", true), createElementVNode("textarea", mergeProps({ ref: "textarea" }, $setup.textareaAttrs, {
|
|
129
|
+
class: $setup.cls.input,
|
|
130
|
+
style: $setup.sls.input
|
|
131
|
+
}), null, 16)], 6);
|
|
132
|
+
}
|
|
133
|
+
var textarea_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/textarea/textarea.vue"]]);
|
|
134
|
+
//#endregion
|
|
135
|
+
export { textarea_default as default };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"textarea.js","names":["_useSlots","Label","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","_normalizeProps","_mergeProps","_createSlots","_withCtx","_renderSlot","_createCommentVNode","_createElementVNode"],"sources":["../../../src/components/textarea/textarea.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n inputControl,\n inputRecipe,\n type InputSlots as InputRecipeSlots,\n toStrbool,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n onBeforeUpdate,\n ref,\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 } from \"~/utils\";\nimport { Label } from \"../label\";\nimport type { TextareaOwnProps } from \"./textarea.types\";\n\ndefineOptions({\n name: \"HuiTextarea\",\n inheritAttrs: false,\n});\n\ntype Props =\n & TextareaOwnProps\n & {\n classes?:\n | Partial<Record<InputRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<InputRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"textarea\">,\n keyof TextareaOwnProps | \"children\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n label?: () => unknown;\n description?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Textarea\", props, attrs);\nconst generatedId = useId();\nconst hasLabel = ref(Boolean(slots.label || slots.description || slots.error));\nconst hasError = ref(Boolean(slots.error));\n\nonBeforeUpdate(() => {\n hasLabel.value = Boolean(slots.label || slots.description || slots.error);\n hasError.value = Boolean(slots.error);\n});\n\nconst inputState = computed(() => {\n const resolved = resolvedProps.value;\n\n return {\n id: resolved.id || generatedId,\n invalid: hasError.value,\n required: attrToBool(resolved.required ?? resolved[\"aria-required\"]),\n disabled: attrToBool(resolved.disabled)\n || attrToBool(resolved[\"aria-disabled\"]),\n readOnly: attrToBool(resolved.readonly)\n || attrToBool(resolved[\"aria-readonly\"]),\n };\n});\nconst recipe = computed(() => {\n const state = inputState.value;\n\n return inputRecipe({\n color: resolvedProps.value.color,\n height: \"auto\",\n error: toStrbool(state.invalid),\n });\n});\nconst cls = useHuiClasses(\n \"Textarea\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Textarea\", InputRecipeSlots>(\n \"Textarea\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"id\",\n \"color\",\n \"labelProps\",\n \"classes\",\n \"styles\",\n \"class\",\n \"style\",\n]);\nconst textareaAttrs = computed<Record<string, unknown>>(() => ({\n ...inputControl.getControlAttributes(inputState.value),\n ...forwardedAttrs.value,\n}));\nconst labelAttrs = computed<Record<string, unknown>>(() => ({\n ...inputControl.getLabelAttributes(inputState.value),\n ...resolvedProps.value.labelProps,\n}));\nconst textareaRef = useTemplateRef<HuiElementInstance<\"textarea\">>(\"textarea\");\n\ndefineExpose({\n textarea: textareaRef,\n});\n</script>\n\n<template>\n <div :class=\"cls.root\" :style=\"sls.root\">\n <Label v-if=\"hasLabel\" v-bind=\"labelAttrs\">\n <template v-if=\"slots.label\" #default>\n <slot name=\"label\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n <template v-if=\"slots.error\" #error>\n <slot name=\"error\" />\n </template>\n </Label>\n <textarea\n ref=\"textarea\"\n v-bind=\"textareaAttrs\"\n :class=\"cls.input\"\n :style=\"sls.input\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDA,MAAM,QAAQ;EAEd,MAAM,QAAQA,SAAA;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,YAAY,OAAO,KAAK;EAC1D,MAAM,cAAc,MAAM;EAC1B,MAAM,WAAW,IAAI,QAAQ,MAAM,SAAS,MAAM,eAAe,MAAM,KAAK,CAAC;EAC7E,MAAM,WAAW,IAAI,QAAQ,MAAM,KAAK,CAAC;EAEzC,qBAAqB;GACnB,SAAS,QAAQ,QAAQ,MAAM,SAAS,MAAM,eAAe,MAAM,KAAK;GACxE,SAAS,QAAQ,QAAQ,MAAM,KAAK;EACtC,CAAC;EAED,MAAM,aAAa,eAAe;GAChC,MAAM,WAAW,cAAc;GAE/B,OAAO;IACL,IAAI,SAAS,MAAM;IACnB,SAAS,SAAS;IAClB,UAAU,WAAW,SAAS,YAAY,SAAS,gBAAgB;IACnE,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;IACzC,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;GAC3C;EACF,CAAC;EACD,MAAM,SAAS,eAAe;GAC5B,MAAM,QAAQ,WAAW;GAEzB,OAAO,YAAY;IACjB,OAAO,cAAc,MAAM;IAC3B,QAAQ;IACR,OAAO,UAAU,MAAM,OAAO;GAChC,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;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,gBAAgB,gBAAyC;GAC7D,GAAG,aAAa,qBAAqB,WAAW,KAAK;GACrD,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,aAAa,gBAAyC;GAC1D,GAAG,aAAa,mBAAmB,WAAW,KAAK;GACnD,GAAG,cAAc,MAAM;EACzB,EAAE;EACF,MAAM,cAAc,eAA+C,UAAU;EAE7E,SAAa,EACX,UAAU,YACZ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAE,UAAA,GAAAC,mBAkBM,OAAA;EAlBA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;CACxB,GAAA,CAAA,OAAA,YAAbH,UAAA,GAAAI,YAUQ,OAAA,UAAAC,eAAAC,WAAA,EAAA,KAAA,EAAA,GAVuB,OAAA,UAAU,CAAA,GAAAC,YAAA,EAAA,GAAA,EAAA,GAAA;EACvB,OAAA,MAAM,QAAA;GAAQ,MAAA;GAC5B,IAAAC,cAAqB,CAArBC,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;;EAEP,OAAA,MAAM,cAAA;GAAc,MAAA;GAClC,IAAAD,cAA2B,CAA3BC,WAA2B,KAAA,QAAA,aAAA,CAAA,CAAA;;;EAEb,OAAA,MAAM,QAAA;GAAQ,MAAA;GAC5B,IAAAD,cAAqB,CAArBC,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;;CAGzB,CAAA,GAAA,IAAA,KAAAC,mBAAA,QAAA,IAAA,GAAAC,mBAKE,YALFL,WAKE,EAJA,KAAI,WAAU,GACN,OAAA,eAAa;EACpB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { HuiElementInstance, HuiElementProps } from "../../types/element.js";
|
|
2
|
+
import { HuiComponentProps } from "../../types/hui-component.js";
|
|
3
|
+
import "../../types/index.js";
|
|
4
|
+
import { LabelProps } from "../label/label.types.js";
|
|
5
|
+
import "../label/index.js";
|
|
6
|
+
import { InputSlots, InputVariants } from "@hebium-ui/core";
|
|
7
|
+
//#region src/components/textarea/textarea.types.d.ts
|
|
8
|
+
type HtmlTextareaProps = Omit<HuiElementProps<"textarea">, "children" | "color">;
|
|
9
|
+
export interface TextareaOwnProps {
|
|
10
|
+
/**
|
|
11
|
+
* The semantic color of the textarea.
|
|
12
|
+
*
|
|
13
|
+
* @default "accent"
|
|
14
|
+
*/
|
|
15
|
+
color?: InputVariants["color"] | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Additional props passed to the internal label component.
|
|
18
|
+
*/
|
|
19
|
+
labelProps?: LabelProps | undefined;
|
|
20
|
+
}
|
|
21
|
+
export type TextareaProps = HuiComponentProps<HtmlTextareaProps & TextareaOwnProps, InputSlots>;
|
|
22
|
+
export interface TextareaExposed {
|
|
23
|
+
readonly textarea: HuiElementInstance<"textarea"> | null;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=textarea.types.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { HuiElementPropsNoInfer } from "../../types/element.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
import { TextareaOwnProps } from "./textarea.types.js";
|
|
4
|
+
import { ClassValue, StyleValue } from "vue";
|
|
5
|
+
import { InputSlots } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/textarea/textarea.vue.d.ts
|
|
7
|
+
type Props = TextareaOwnProps & {
|
|
8
|
+
classes?: Partial<Record<InputSlots, ClassValue | undefined>> | undefined;
|
|
9
|
+
styles?: Partial<Record<InputSlots, StyleValue | undefined>> | undefined;
|
|
10
|
+
} & /* @vue-ignore */ Omit<HuiElementPropsNoInfer<"textarea">, keyof TextareaOwnProps | "children" | "class" | "style">;
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
label?: () => unknown;
|
|
13
|
+
description?: () => unknown;
|
|
14
|
+
error?: () => unknown;
|
|
15
|
+
};
|
|
16
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {
|
|
17
|
+
textarea: Readonly<import("vue").ShallowRef<HTMLTextAreaElement | null>>;
|
|
18
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { _default as default };
|
|
28
|
+
//# sourceMappingURL=textarea.vue.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TooltipContentExposed, TooltipContentProps, TooltipProps, TooltipTriggerExposed, TooltipTriggerProps } from "./tooltip.types.js";
|
|
2
|
+
import _default from "./tooltip-content.vue.js";
|
|
3
|
+
import _default$1 from "./tooltip-trigger.vue.js";
|
|
4
|
+
import { useTooltipId } from "./tooltip.context.js";
|
|
5
|
+
import _default$2 from "./tooltip.vue.js";
|
|
6
|
+
export { _default$2 as Tooltip, _default as TooltipContent, type TooltipContentExposed, type TooltipContentProps, type TooltipProps, _default$1 as TooltipTrigger, type TooltipTriggerExposed, type TooltipTriggerProps, useTooltipId };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../provider/hui-provider.context.js";
|
|
2
|
+
import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
|
|
3
|
+
import { useTooltipId } from "./tooltip.context.js";
|
|
4
|
+
import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, useAttrs, useTemplateRef, withCtx } from "vue";
|
|
5
|
+
import { popoverRecipe, tooltipControl } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/tooltip/tooltip-content.vue
|
|
7
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
|
+
name: "HuiTooltipContent",
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
__name: "tooltip-content",
|
|
11
|
+
props: {
|
|
12
|
+
position: {
|
|
13
|
+
type: null,
|
|
14
|
+
required: false
|
|
15
|
+
},
|
|
16
|
+
fallbacks: {
|
|
17
|
+
type: null,
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
visibility: {
|
|
21
|
+
type: null,
|
|
22
|
+
required: false
|
|
23
|
+
},
|
|
24
|
+
padding: {
|
|
25
|
+
type: null,
|
|
26
|
+
required: false
|
|
27
|
+
},
|
|
28
|
+
as: {
|
|
29
|
+
type: null,
|
|
30
|
+
required: false
|
|
31
|
+
},
|
|
32
|
+
class: {
|
|
33
|
+
type: [
|
|
34
|
+
Boolean,
|
|
35
|
+
null,
|
|
36
|
+
String,
|
|
37
|
+
Object,
|
|
38
|
+
Array
|
|
39
|
+
],
|
|
40
|
+
required: false,
|
|
41
|
+
skipCheck: true
|
|
42
|
+
},
|
|
43
|
+
style: {
|
|
44
|
+
type: [
|
|
45
|
+
Boolean,
|
|
46
|
+
null,
|
|
47
|
+
String,
|
|
48
|
+
Object,
|
|
49
|
+
Array
|
|
50
|
+
],
|
|
51
|
+
required: false,
|
|
52
|
+
skipCheck: true
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setup(__props, { expose: __expose }) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const attrs = useAttrs();
|
|
58
|
+
const resolvedProps = useHuiProps("TooltipContent", props, attrs);
|
|
59
|
+
const component = computed(() => resolvedProps.value.as ?? "div");
|
|
60
|
+
const tooltipId = useTooltipId();
|
|
61
|
+
const recipe = computed(() => {
|
|
62
|
+
const resolved = resolvedProps.value;
|
|
63
|
+
return popoverRecipe({
|
|
64
|
+
position: resolved.position,
|
|
65
|
+
fallbacks: resolved.fallbacks,
|
|
66
|
+
visibility: resolved.visibility,
|
|
67
|
+
padding: resolved.padding
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
const cls = useHuiClasses("TooltipContent", recipe, computed(() => ({ root: props.class })));
|
|
71
|
+
const sls = useHuiStyles("TooltipContent", computed(() => ({ root: props.style })));
|
|
72
|
+
const forwardedAttrs = useHuiAttrs(resolvedProps, [
|
|
73
|
+
"as",
|
|
74
|
+
"position",
|
|
75
|
+
"fallbacks",
|
|
76
|
+
"visibility",
|
|
77
|
+
"padding",
|
|
78
|
+
"class",
|
|
79
|
+
"style",
|
|
80
|
+
"onPointerleave"
|
|
81
|
+
]);
|
|
82
|
+
const rootAttrs = computed(() => ({
|
|
83
|
+
...tooltipControl.getContentAttributes({ tooltipId: tooltipId.value }),
|
|
84
|
+
...forwardedAttrs.value
|
|
85
|
+
}));
|
|
86
|
+
const rootRef = useTemplateRef("root");
|
|
87
|
+
function handlePointerLeave(event) {
|
|
88
|
+
const onPointerleave = resolvedProps.value["onPointerleave"];
|
|
89
|
+
if (typeof onPointerleave === "function") onPointerleave(event);
|
|
90
|
+
tooltipControl.hideTooltip(tooltipId.value);
|
|
91
|
+
}
|
|
92
|
+
__expose({ root: rootRef });
|
|
93
|
+
const __returned__ = {
|
|
94
|
+
props,
|
|
95
|
+
attrs,
|
|
96
|
+
resolvedProps,
|
|
97
|
+
component,
|
|
98
|
+
tooltipId,
|
|
99
|
+
recipe,
|
|
100
|
+
cls,
|
|
101
|
+
sls,
|
|
102
|
+
forwardedAttrs,
|
|
103
|
+
rootAttrs,
|
|
104
|
+
rootRef,
|
|
105
|
+
handlePointerLeave
|
|
106
|
+
};
|
|
107
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
108
|
+
enumerable: false,
|
|
109
|
+
value: true
|
|
110
|
+
});
|
|
111
|
+
return __returned__;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
115
|
+
return openBlock(), createBlock(resolveDynamicComponent($setup.component), mergeProps({ ref: "root" }, $setup.rootAttrs, {
|
|
116
|
+
class: $setup.cls.root,
|
|
117
|
+
style: $setup.sls.root,
|
|
118
|
+
onPointerleave: $setup.handlePointerLeave
|
|
119
|
+
}), {
|
|
120
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
121
|
+
_: 3
|
|
122
|
+
}, 16, ["class", "style"]);
|
|
123
|
+
}
|
|
124
|
+
var tooltip_content_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/tooltip/tooltip-content.vue"]]);
|
|
125
|
+
//#endregion
|
|
126
|
+
export { tooltip_content_default as default };
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=tooltip-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip-content.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/tooltip/tooltip-content.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'div'\"\n>\nimport { popoverRecipe, tooltipControl } 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 { useTooltipId } from \"./tooltip.context\";\nimport type { TooltipContentOwnProps } from \"./tooltip.types\";\n\ndefineOptions({\n name: \"HuiTooltipContent\",\n inheritAttrs: false,\n});\n\ntype Props =\n & TooltipContentOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof TooltipContentOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"TooltipContent\", props, attrs);\nconst component = computed<E | \"div\">(() => resolvedProps.value.as ?? \"div\");\nconst tooltipId = useTooltipId();\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return popoverRecipe({\n position: resolved.position,\n fallbacks: resolved.fallbacks,\n visibility: resolved.visibility,\n padding: resolved.padding,\n });\n});\nconst cls = useHuiClasses(\n \"TooltipContent\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"TooltipContent\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"position\",\n \"fallbacks\",\n \"visibility\",\n \"padding\",\n \"class\",\n \"style\",\n \"onPointerleave\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => ({\n ...tooltipControl.getContentAttributes({ tooltipId: tooltipId.value }),\n ...forwardedAttrs.value,\n}));\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nfunction handlePointerLeave(event: PointerEvent): void {\n const onPointerleave = resolvedProps.value[\"onPointerleave\"];\n if (typeof onPointerleave === \"function\") onPointerleave(event);\n tooltipControl.hideTooltip(tooltipId.value);\n}\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 @pointerleave=\"handlePointerLeave\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,kBAAkB,OAAO,KAAK;EAChE,MAAM,YAAY,eAA0B,cAAc,MAAM,MAAM,KAAK;EAC3E,MAAM,YAAY,aAAa;EAC/B,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,cAAc;IACnB,UAAU,SAAS;IACnB,WAAW,SAAS;IACpB,YAAY,SAAS;IACrB,SAAS,SAAS;GACpB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,kBACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,kBACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,gBAAyC;GACzD,GAAG,eAAe,qBAAqB,EAAE,WAAW,UAAU,MAAM,CAAC;GACrE,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAS,mBAAmB,OAA2B;GACrD,MAAM,iBAAiB,cAAc,MAAM;GAC3C,IAAI,OAAO,mBAAmB,YAAY,eAAe,KAAK;GAC9D,eAAe,YAAY,UAAU,KAAK;EAC5C;EAEA,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,YASYC,wBARL,OAAA,SAAS,GADhBC,WASY,EAPV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,gBAAc,OAAA;;EAEf,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ElementType, HuiElementInstance, HuiElementPropsNoInfer } from "../../types/element.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
import { TooltipContentOwnProps } from "./tooltip.types.js";
|
|
4
|
+
import { ClassValue, StyleValue } from "vue";
|
|
5
|
+
//#region src/components/tooltip/tooltip-content.vue.d.ts
|
|
6
|
+
declare const __VLS_export: <E extends ElementType = "div">(__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
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<TooltipContentOwnProps & {
|
|
8
|
+
as?: E | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
class?: ClassValue | undefined;
|
|
11
|
+
style?: StyleValue | undefined;
|
|
12
|
+
} & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | keyof TooltipContentOwnProps>> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
16
|
+
root: Readonly<import("vue").ShallowRef<HuiElementInstance<E> | null>>;
|
|
17
|
+
}>) => void;
|
|
18
|
+
attrs: any;
|
|
19
|
+
slots: {
|
|
20
|
+
default?: () => unknown;
|
|
21
|
+
};
|
|
22
|
+
emit: {};
|
|
23
|
+
}>) => import("vue").VNode & {
|
|
24
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
25
|
+
};
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
28
|
+
//#endregion
|
|
29
|
+
export { _default as default };
|
|
30
|
+
//# sourceMappingURL=tooltip-content.vue.d.ts.map
|