@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,110 @@
|
|
|
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 { useSegmentedControlContext } from "./segmented-control.context.js";
|
|
4
|
+
import { computed, createBlock, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, toRaw, useAttrs, useTemplateRef, withCtx } from "vue";
|
|
5
|
+
import { segmentedControl, segmentedControlItemRecipe } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/segmented-control/segmented-control-item.vue
|
|
7
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
|
+
name: "HuiSegmentedControlItem",
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
__name: "segmented-control-item",
|
|
11
|
+
props: {
|
|
12
|
+
value: {
|
|
13
|
+
type: String,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
as: {
|
|
17
|
+
type: null,
|
|
18
|
+
required: false
|
|
19
|
+
},
|
|
20
|
+
class: {
|
|
21
|
+
type: [
|
|
22
|
+
Boolean,
|
|
23
|
+
null,
|
|
24
|
+
String,
|
|
25
|
+
Object,
|
|
26
|
+
Array
|
|
27
|
+
],
|
|
28
|
+
required: false,
|
|
29
|
+
skipCheck: true
|
|
30
|
+
},
|
|
31
|
+
style: {
|
|
32
|
+
type: [
|
|
33
|
+
Boolean,
|
|
34
|
+
null,
|
|
35
|
+
String,
|
|
36
|
+
Object,
|
|
37
|
+
Array
|
|
38
|
+
],
|
|
39
|
+
required: false,
|
|
40
|
+
skipCheck: true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
setup(__props, { expose: __expose }) {
|
|
44
|
+
const props = __props;
|
|
45
|
+
const attrs = useAttrs();
|
|
46
|
+
const resolvedProps = useHuiProps("SegmentedControlItem", props, attrs);
|
|
47
|
+
const component = computed(() => toRaw(resolvedProps.value.as ?? "button"));
|
|
48
|
+
const context = useSegmentedControlContext();
|
|
49
|
+
const recipe = computed(() => segmentedControlItemRecipe({}));
|
|
50
|
+
const cls = useHuiClasses("SegmentedControlItem", recipe, computed(() => ({ root: props.class })));
|
|
51
|
+
const sls = useHuiStyles("SegmentedControlItem", computed(() => ({ root: props.style })));
|
|
52
|
+
const forwardedAttrs = useHuiAttrs(resolvedProps, [
|
|
53
|
+
"as",
|
|
54
|
+
"value",
|
|
55
|
+
"class",
|
|
56
|
+
"style",
|
|
57
|
+
"onClick"
|
|
58
|
+
]);
|
|
59
|
+
const controlAttrs = computed(() => ({
|
|
60
|
+
...segmentedControl.getItemAttributes({
|
|
61
|
+
isButtonElement: resolvedProps.value.as === void 0,
|
|
62
|
+
selectedValue: context.selectedValue.value
|
|
63
|
+
}, resolvedProps.value.value),
|
|
64
|
+
...forwardedAttrs.value
|
|
65
|
+
}));
|
|
66
|
+
const controlRef = useTemplateRef("control");
|
|
67
|
+
function handleClick(event) {
|
|
68
|
+
const resolved = resolvedProps.value;
|
|
69
|
+
const onClick = resolved["onClick"];
|
|
70
|
+
if (typeof onClick === "function") onClick(event);
|
|
71
|
+
if (event.defaultPrevented) return;
|
|
72
|
+
context.onSelect(resolved.value);
|
|
73
|
+
}
|
|
74
|
+
__expose({ control: controlRef });
|
|
75
|
+
const __returned__ = {
|
|
76
|
+
props,
|
|
77
|
+
attrs,
|
|
78
|
+
resolvedProps,
|
|
79
|
+
component,
|
|
80
|
+
context,
|
|
81
|
+
recipe,
|
|
82
|
+
cls,
|
|
83
|
+
sls,
|
|
84
|
+
forwardedAttrs,
|
|
85
|
+
controlAttrs,
|
|
86
|
+
controlRef,
|
|
87
|
+
handleClick
|
|
88
|
+
};
|
|
89
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
90
|
+
enumerable: false,
|
|
91
|
+
value: true
|
|
92
|
+
});
|
|
93
|
+
return __returned__;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
97
|
+
return openBlock(), createElementBlock("li", null, [(openBlock(), createBlock(resolveDynamicComponent($setup.component), mergeProps({ ref: "control" }, $setup.controlAttrs, {
|
|
98
|
+
class: $setup.cls.root,
|
|
99
|
+
style: $setup.sls.root,
|
|
100
|
+
onClick: $setup.handleClick
|
|
101
|
+
}), {
|
|
102
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
103
|
+
_: 3
|
|
104
|
+
}, 16, ["class", "style"]))]);
|
|
105
|
+
}
|
|
106
|
+
var segmented_control_item_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/segmented-control/segmented-control-item.vue"]]);
|
|
107
|
+
//#endregion
|
|
108
|
+
export { segmented_control_item_default as default };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=segmented-control-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control-item.js","names":["_openBlock","_createElementBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/segmented-control/segmented-control-item.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'button'\"\n>\nimport { segmentedControl, segmentedControlItemRecipe } 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 { useSegmentedControlContext } from \"./segmented-control.context\";\nimport type { SegmentedControlItemOwnProps } from \"./segmented-control.types\";\n\ndefineOptions({\n name: \"HuiSegmentedControlItem\",\n inheritAttrs: false,\n});\n\ntype Props =\n & SegmentedControlItemOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof SegmentedControlItemOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"SegmentedControlItem\", props, attrs);\nconst component = computed<E | \"button\">(() =>\n toRaw(resolvedProps.value.as ?? \"button\")\n);\nconst context = useSegmentedControlContext();\nconst recipe = computed(() => segmentedControlItemRecipe({}));\nconst cls = useHuiClasses(\n \"SegmentedControlItem\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"SegmentedControlItem\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"value\",\n \"class\",\n \"style\",\n \"onClick\",\n]);\nconst controlAttrs = computed<Record<string, unknown>>(() => ({\n ...segmentedControl.getItemAttributes(\n {\n isButtonElement: resolvedProps.value.as === undefined,\n selectedValue: context.selectedValue.value,\n },\n resolvedProps.value.value,\n ),\n ...forwardedAttrs.value,\n}));\nconst controlRef = useTemplateRef<HuiElementInstance<E>>(\"control\");\n\nfunction handleClick(event: MouseEvent): void {\n const resolved = resolvedProps.value;\n const onClick = resolved[\"onClick\"];\n if (typeof onClick === \"function\") onClick(event);\n if (event.defaultPrevented) return;\n\n context.onSelect(resolved.value);\n}\n\ndefineExpose({\n control: controlRef,\n});\n</script>\n\n<template>\n <li>\n <component\n :is=\"component\"\n ref=\"control\"\n v-bind=\"controlAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n @click=\"handleClick\"\n >\n <slot />\n </component>\n </li>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,wBAAwB,OAAO,KAAK;EACtE,MAAM,YAAY,eAChB,MAAM,cAAc,MAAM,MAAM,QAAQ,CAC1C;EACA,MAAM,UAAU,2BAA2B;EAC3C,MAAM,SAAS,eAAe,2BAA2B,CAAC,CAAC,CAAC;EAC5D,MAAM,MAAM,cACV,wBACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,wBACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,eAAe,gBAAyC;GAC5D,GAAG,iBAAiB,kBAClB;IACE,iBAAiB,cAAc,MAAM,OAAO,KAAA;IAC5C,eAAe,QAAQ,cAAc;GACvC,GACA,cAAc,MAAM,KACtB;GACA,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,aAAa,eAAsC,SAAS;EAElE,SAAS,YAAY,OAAyB;GAC5C,MAAM,WAAW,cAAc;GAC/B,MAAM,UAAU,SAAS;GACzB,IAAI,OAAO,YAAY,YAAY,QAAQ,KAAK;GAChD,IAAI,MAAM,kBAAkB;GAE5B,QAAQ,SAAS,SAAS,KAAK;EACjC;EAEA,SAAa,EACX,SAAS,WACX,CAAC;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,mBAWK,MAAA,MAAA,EAVHD,UAAA,GAAAE,YASYC,wBARL,OAAA,SAAS,GADhBC,WASY,EAPV,KAAI,UAAS,GACL,OAAA,cAAY;EACnB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,SAAO,OAAA;;EAER,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 { SegmentedControlItemOwnProps } from "./segmented-control.types.js";
|
|
4
|
+
import { ClassValue, StyleValue } from "vue";
|
|
5
|
+
//#region src/components/segmented-control/segmented-control-item.vue.d.ts
|
|
6
|
+
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
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<SegmentedControlItemOwnProps & {
|
|
8
|
+
as?: E | undefined;
|
|
9
|
+
} & {
|
|
10
|
+
class?: ClassValue | undefined;
|
|
11
|
+
style?: StyleValue | undefined;
|
|
12
|
+
} & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | "value">> & (typeof globalThis extends {
|
|
13
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
14
|
+
} ? P : {});
|
|
15
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
16
|
+
control: 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=segmented-control-item.vue.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { inject } from "vue";
|
|
2
|
+
//#region src/components/segmented-control/segmented-control.context.ts
|
|
3
|
+
const SegmentedControlContext = Symbol("SegmentedControl");
|
|
4
|
+
function useSegmentedControlContext() {
|
|
5
|
+
const context = inject(SegmentedControlContext);
|
|
6
|
+
if (!context) throw new Error("[Hebium UI] SegmentedControl compound components must be used within <SegmentedControl>");
|
|
7
|
+
return context;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { SegmentedControlContext, useSegmentedControlContext };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=segmented-control.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.context.js","names":[],"sources":["../../../src/components/segmented-control/segmented-control.context.ts"],"sourcesContent":["import { type ComputedRef, inject, type InjectionKey } from \"vue\";\n\nexport interface SegmentedControlContextValue {\n readonly selectedValue: ComputedRef<string | undefined>;\n readonly onSelect: (value: string) => void;\n}\n\nexport const SegmentedControlContext: InjectionKey<SegmentedControlContextValue> = Symbol(\n \"SegmentedControl\",\n);\n\nexport function useSegmentedControlContext(): SegmentedControlContextValue {\n const context = inject(SegmentedControlContext);\n if (!context) {\n throw new Error(\n \"[Hebium UI] SegmentedControl compound components must be used within <SegmentedControl>\",\n );\n }\n return context;\n}\n"],"mappings":";;AAOA,MAAa,0BAAsE,OACjF,kBACF;AAEA,SAAgB,6BAA2D;CACzE,MAAM,UAAU,OAAO,uBAAuB;CAC9C,IAAI,CAAC,SACH,MAAM,IAAI,MACR,yFACF;CAEF,OAAO;AACT"}
|
|
@@ -0,0 +1,112 @@
|
|
|
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 { SegmentedControlContext } from "./segmented-control.context.js";
|
|
4
|
+
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, provide, renderSlot, shallowRef, useAttrs, useTemplateRef } from "vue";
|
|
5
|
+
import { segmentedControlRootRecipe } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/segmented-control/segmented-control.vue
|
|
7
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
8
|
+
name: "HuiSegmentedControl",
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
__name: "segmented-control",
|
|
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
|
+
class: {
|
|
30
|
+
type: [
|
|
31
|
+
Boolean,
|
|
32
|
+
null,
|
|
33
|
+
String,
|
|
34
|
+
Object,
|
|
35
|
+
Array
|
|
36
|
+
],
|
|
37
|
+
required: false,
|
|
38
|
+
skipCheck: true
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
type: [
|
|
42
|
+
Boolean,
|
|
43
|
+
null,
|
|
44
|
+
String,
|
|
45
|
+
Object,
|
|
46
|
+
Array
|
|
47
|
+
],
|
|
48
|
+
required: false,
|
|
49
|
+
skipCheck: true
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
setup(__props, { expose: __expose }) {
|
|
53
|
+
const props = __props;
|
|
54
|
+
const attrs = useAttrs();
|
|
55
|
+
const resolvedProps = useHuiProps("SegmentedControl", props, attrs);
|
|
56
|
+
const uncontrolledValue = shallowRef(resolvedProps.value.value ?? resolvedProps.value.defaultValue ?? resolvedProps.value.values[0]);
|
|
57
|
+
const selectedValue = computed(() => resolvedProps.value.value ?? uncontrolledValue.value);
|
|
58
|
+
const recipe = computed(() => segmentedControlRootRecipe({}));
|
|
59
|
+
const cls = useHuiClasses("SegmentedControl", recipe, computed(() => ({ root: props.class })));
|
|
60
|
+
const sls = useHuiStyles("SegmentedControl", computed(() => ({ root: props.style })));
|
|
61
|
+
const rootAttrs = useHuiAttrs(resolvedProps, [
|
|
62
|
+
"values",
|
|
63
|
+
"value",
|
|
64
|
+
"defaultValue",
|
|
65
|
+
"onChange",
|
|
66
|
+
"class",
|
|
67
|
+
"style"
|
|
68
|
+
]);
|
|
69
|
+
const rootRef = useTemplateRef("root");
|
|
70
|
+
function onSelect(nextValue) {
|
|
71
|
+
const resolved = resolvedProps.value;
|
|
72
|
+
if (!resolved.values.some((value) => value === nextValue)) throw new Error(`[Hebium UI] Unexpected SegmentedControl value: ${nextValue}`);
|
|
73
|
+
const value = nextValue;
|
|
74
|
+
uncontrolledValue.value = value;
|
|
75
|
+
resolved.onChange?.(value);
|
|
76
|
+
}
|
|
77
|
+
provide(SegmentedControlContext, {
|
|
78
|
+
selectedValue,
|
|
79
|
+
onSelect
|
|
80
|
+
});
|
|
81
|
+
__expose({ root: rootRef });
|
|
82
|
+
const __returned__ = {
|
|
83
|
+
props,
|
|
84
|
+
attrs,
|
|
85
|
+
resolvedProps,
|
|
86
|
+
uncontrolledValue,
|
|
87
|
+
selectedValue,
|
|
88
|
+
recipe,
|
|
89
|
+
cls,
|
|
90
|
+
sls,
|
|
91
|
+
rootAttrs,
|
|
92
|
+
rootRef,
|
|
93
|
+
onSelect
|
|
94
|
+
};
|
|
95
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
96
|
+
enumerable: false,
|
|
97
|
+
value: true
|
|
98
|
+
});
|
|
99
|
+
return __returned__;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
103
|
+
return openBlock(), createElementBlock("ul", mergeProps({ ref: "root" }, $setup.rootAttrs, {
|
|
104
|
+
class: $setup.cls.root,
|
|
105
|
+
style: $setup.sls.root
|
|
106
|
+
}), [renderSlot(_ctx.$slots, "default")], 16);
|
|
107
|
+
}
|
|
108
|
+
var segmented_control_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/segmented-control/segmented-control.vue"]]);
|
|
109
|
+
//#endregion
|
|
110
|
+
export { segmented_control_default as default };
|
|
111
|
+
|
|
112
|
+
//# sourceMappingURL=segmented-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segmented-control.js","names":["_openBlock","_createElementBlock","_mergeProps","_renderSlot"],"sources":["../../../src/components/segmented-control/segmented-control.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"V extends string\">\nimport { segmentedControlRootRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n provide,\n shallowRef,\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 { SegmentedControlContext } from \"./segmented-control.context\";\nimport type { SegmentedControlOwnProps } from \"./segmented-control.types\";\n\ndefineOptions({\n name: \"HuiSegmentedControl\",\n inheritAttrs: false,\n});\n\ntype Props =\n & SegmentedControlOwnProps<V>\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"ul\">,\n keyof SegmentedControlOwnProps<V> | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"SegmentedControl\", props, attrs);\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 recipe = computed(() => segmentedControlRootRecipe({}));\nconst cls = useHuiClasses(\n \"SegmentedControl\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"SegmentedControl\",\n computed(() => ({ root: props.style })),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"values\",\n \"value\",\n \"defaultValue\",\n \"onChange\",\n \"class\",\n \"style\",\n]);\nconst rootRef = useTemplateRef<HuiElementInstance<\"ul\">>(\"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(\n `[Hebium UI] Unexpected SegmentedControl value: ${nextValue}`,\n );\n }\n\n const value = nextValue as V;\n uncontrolledValue.value = value;\n resolved.onChange?.(value);\n}\n\nprovide(SegmentedControlContext, {\n selectedValue,\n onSelect,\n});\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <ul\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <slot />\n </ul>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,oBAAoB,OAAO,KAAK;EAClE,MAAM,oBAAoB,WACxB,cAAc,MAAM,SACf,cAAc,MAAM,gBACpB,cAAc,MAAM,OAAO,EAClC;EACA,MAAM,gBAAgB,eACpB,cAAc,MAAM,SAAS,kBAAkB,KACjD;EACA,MAAM,SAAS,eAAe,2BAA2B,CAAC,CAAC,CAAC;EAC5D,MAAM,MAAM,cACV,oBACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,oBACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,YAAY,YAAY,eAAe;GAC3C;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,UAAU,eAAyC,MAAM;EAE/D,SAAS,SAAS,WAAyB;GACzC,MAAM,WAAW,cAAc;GAC/B,IAAI,CAAC,SAAS,OAAO,MAAM,UAAa,UAAU,SAAS,GACzD,MAAM,IAAI,MACR,kDAAkD,WACpD;GAGF,MAAM,QAAQ;GACd,kBAAkB,QAAQ;GAC1B,SAAS,WAAW,KAAK;EAC3B;EAEA,QAAQ,yBAAyB;GAC/B;GACA;EACF,CAAC;EAED,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,mBAOK,MAPLC,WAOK,EANH,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;CAEZ,CAAA,GAAA,CAAAC,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ElementType, HuiElementInstance, HuiElementProps } from "../../types/element.js";
|
|
2
|
+
import { HuiComponentProps } from "../../types/hui-component.js";
|
|
3
|
+
import { HuiPolymorphicProps } from "../../types/polymorphic.js";
|
|
4
|
+
import "../../types/index.js";
|
|
5
|
+
import { SegmentedControlItemSlots, SegmentedControlRootSlots } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/segmented-control/segmented-control.types.d.ts
|
|
7
|
+
type HtmlUlProps = Omit<HuiElementProps<"ul">, "onChange">;
|
|
8
|
+
export interface SegmentedControlOwnProps<V extends string> {
|
|
9
|
+
/**
|
|
10
|
+
* The list of allowed segmented-control values.
|
|
11
|
+
*/
|
|
12
|
+
values: V[];
|
|
13
|
+
/**
|
|
14
|
+
* The currently selected segmented-control value.
|
|
15
|
+
*/
|
|
16
|
+
value?: V | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The initially selected segmented-control value for uncontrolled component.
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: V | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Called when the selected segmented-control value changes.
|
|
23
|
+
*/
|
|
24
|
+
onChange?: ((value: V) => void) | undefined;
|
|
25
|
+
}
|
|
26
|
+
export type SegmentedControlProps<V extends string> = HuiComponentProps<HtmlUlProps & SegmentedControlOwnProps<V>, SegmentedControlRootSlots>;
|
|
27
|
+
export interface SegmentedControlExposed {
|
|
28
|
+
readonly root: HuiElementInstance<"ul"> | null;
|
|
29
|
+
}
|
|
30
|
+
export interface SegmentedControlItemOwnProps {
|
|
31
|
+
/**
|
|
32
|
+
* The value represented by this control.
|
|
33
|
+
*/
|
|
34
|
+
value: string;
|
|
35
|
+
}
|
|
36
|
+
export type SegmentedControlItemProps<E extends ElementType = "button"> = HuiPolymorphicProps<E, SegmentedControlItemOwnProps, SegmentedControlItemSlots>;
|
|
37
|
+
export interface SegmentedControlItemExposed<E extends ElementType = "button"> {
|
|
38
|
+
readonly control: HuiElementInstance<E> | null;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=segmented-control.types.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SegmentedControlOwnProps } from "./segmented-control.types.js";
|
|
2
|
+
import { ClassValue, StyleValue } from "vue";
|
|
3
|
+
//#region src/components/segmented-control/segmented-control.vue.d.ts
|
|
4
|
+
declare const __VLS_export: <V extends string>(__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<{
|
|
5
|
+
props: import("vue").PublicProps & __VLS_PrettifyLocal<SegmentedControlOwnProps<V> & {
|
|
6
|
+
class?: ClassValue | undefined;
|
|
7
|
+
style?: StyleValue | undefined;
|
|
8
|
+
} & Omit<import("vue").HTMLAttributes & import("vue").ReservedProps, "style" | "class" | keyof SegmentedControlOwnProps<V>>> & (typeof globalThis extends {
|
|
9
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
10
|
+
} ? P : {});
|
|
11
|
+
expose: (exposed: import("vue").ShallowUnwrapRef<{
|
|
12
|
+
root: Readonly<import("vue").ShallowRef<HTMLUListElement | null>>;
|
|
13
|
+
}>) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: {
|
|
16
|
+
default?: () => unknown;
|
|
17
|
+
};
|
|
18
|
+
emit: {};
|
|
19
|
+
}>) => import("vue").VNode & {
|
|
20
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
21
|
+
};
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { _default as default };
|
|
26
|
+
//# sourceMappingURL=segmented-control.vue.d.ts.map
|
|
@@ -0,0 +1,124 @@
|
|
|
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, openBlock, renderSlot, useAttrs, useId, useSlots, useTemplateRef, withCtx } from "vue";
|
|
6
|
+
import { inputControl, selectRecipe, toStrbool } from "@hebium-ui/core";
|
|
7
|
+
//#region src/components/select/select.vue
|
|
8
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
9
|
+
name: "HuiSelect",
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
__name: "select",
|
|
12
|
+
props: {
|
|
13
|
+
labelProps: {
|
|
14
|
+
type: null,
|
|
15
|
+
required: false
|
|
16
|
+
},
|
|
17
|
+
classes: {
|
|
18
|
+
type: null,
|
|
19
|
+
required: false
|
|
20
|
+
},
|
|
21
|
+
styles: {
|
|
22
|
+
type: null,
|
|
23
|
+
required: false
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
setup(__props, { expose: __expose }) {
|
|
27
|
+
const props = __props;
|
|
28
|
+
const slots = useSlots();
|
|
29
|
+
const attrs = useAttrs();
|
|
30
|
+
const resolvedProps = useHuiProps("Select", props, attrs);
|
|
31
|
+
const generatedId = useId();
|
|
32
|
+
const hasLabel = computed(() => Boolean(slots.label || slots.description || slots.error));
|
|
33
|
+
const inputState = computed(() => {
|
|
34
|
+
const resolved = resolvedProps.value;
|
|
35
|
+
return {
|
|
36
|
+
id: resolved.id || generatedId,
|
|
37
|
+
invalid: Boolean(slots.error),
|
|
38
|
+
required: attrToBool(resolved.required ?? resolved["aria-required"]),
|
|
39
|
+
disabled: attrToBool(resolved.disabled) || attrToBool(resolved["aria-disabled"])
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
const recipe = computed(() => {
|
|
43
|
+
const state = inputState.value;
|
|
44
|
+
return selectRecipe({ error: toStrbool(state.invalid) });
|
|
45
|
+
});
|
|
46
|
+
const cls = useHuiClasses("Select", recipe, computed(() => props.classes ?? {}));
|
|
47
|
+
const sls = useHuiStyles("Select", computed(() => props.styles ?? {}));
|
|
48
|
+
const forwardedAttrs = useHuiAttrs(resolvedProps, [
|
|
49
|
+
"id",
|
|
50
|
+
"labelProps",
|
|
51
|
+
"classes",
|
|
52
|
+
"styles",
|
|
53
|
+
"class",
|
|
54
|
+
"style"
|
|
55
|
+
]);
|
|
56
|
+
const selectAttrs = computed(() => ({
|
|
57
|
+
...inputControl.getControlAttributes(inputState.value),
|
|
58
|
+
...forwardedAttrs.value
|
|
59
|
+
}));
|
|
60
|
+
const labelAttrs = computed(() => ({
|
|
61
|
+
...inputControl.getLabelAttributes(inputState.value),
|
|
62
|
+
...resolvedProps.value.labelProps
|
|
63
|
+
}));
|
|
64
|
+
const selectRef = useTemplateRef("select");
|
|
65
|
+
__expose({ select: selectRef });
|
|
66
|
+
const __returned__ = {
|
|
67
|
+
props,
|
|
68
|
+
slots,
|
|
69
|
+
attrs,
|
|
70
|
+
resolvedProps,
|
|
71
|
+
generatedId,
|
|
72
|
+
hasLabel,
|
|
73
|
+
inputState,
|
|
74
|
+
recipe,
|
|
75
|
+
cls,
|
|
76
|
+
sls,
|
|
77
|
+
forwardedAttrs,
|
|
78
|
+
selectAttrs,
|
|
79
|
+
labelAttrs,
|
|
80
|
+
selectRef,
|
|
81
|
+
get Label() {
|
|
82
|
+
return label_default;
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
86
|
+
enumerable: false,
|
|
87
|
+
value: true
|
|
88
|
+
});
|
|
89
|
+
return __returned__;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
93
|
+
return openBlock(), createElementBlock("div", {
|
|
94
|
+
class: normalizeClass($setup.cls.root),
|
|
95
|
+
style: normalizeStyle($setup.sls.root)
|
|
96
|
+
}, [$setup.hasLabel ? (openBlock(), createBlock($setup["Label"], normalizeProps(mergeProps({ key: 0 }, $setup.labelAttrs)), createSlots({ _: 2 }, [
|
|
97
|
+
$setup.slots.label ? {
|
|
98
|
+
name: "default",
|
|
99
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "label")]),
|
|
100
|
+
key: "0"
|
|
101
|
+
} : void 0,
|
|
102
|
+
$setup.slots.description ? {
|
|
103
|
+
name: "description",
|
|
104
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "description")]),
|
|
105
|
+
key: "1"
|
|
106
|
+
} : void 0,
|
|
107
|
+
$setup.slots.error ? {
|
|
108
|
+
name: "error",
|
|
109
|
+
fn: withCtx(() => [renderSlot(_ctx.$slots, "error")]),
|
|
110
|
+
key: "2"
|
|
111
|
+
} : void 0
|
|
112
|
+
]), 1040)) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
113
|
+
class: normalizeClass($setup.cls.wrapper),
|
|
114
|
+
style: normalizeStyle($setup.sls.wrapper)
|
|
115
|
+
}, [createElementVNode("select", mergeProps({ ref: "select" }, $setup.selectAttrs, {
|
|
116
|
+
class: $setup.cls.select,
|
|
117
|
+
style: $setup.sls.select
|
|
118
|
+
}), [renderSlot(_ctx.$slots, "default")], 16)], 6)], 6);
|
|
119
|
+
}
|
|
120
|
+
var select_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/select/select.vue"]]);
|
|
121
|
+
//#endregion
|
|
122
|
+
export { select_default as default };
|
|
123
|
+
|
|
124
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","names":["_useSlots","Label","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","_normalizeProps","_mergeProps","_createSlots","_withCtx","_renderSlot","_createCommentVNode","_createElementVNode"],"sources":["../../../src/components/select/select.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n inputControl,\n selectRecipe,\n type SelectSlots as SelectRecipeSlots,\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 } from \"~/utils\";\nimport { Label } from \"../label\";\nimport type { SelectOwnProps } from \"./select.types\";\n\ndefineOptions({\n name: \"HuiSelect\",\n inheritAttrs: false,\n});\n\ntype Props =\n & SelectOwnProps\n & {\n classes?:\n | Partial<Record<SelectRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<SelectRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"select\">,\n keyof SelectOwnProps | \"children\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n default?: () => unknown;\n label?: () => unknown;\n description?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Select\", props, attrs);\nconst generatedId = useId();\nconst hasLabel = computed(() =>\n Boolean(slots.label || slots.description || slots.error)\n);\nconst inputState = computed(() => {\n const resolved = resolvedProps.value;\n\n return {\n id: resolved.id || generatedId,\n invalid: Boolean(slots.error),\n required: attrToBool(resolved.required ?? resolved[\"aria-required\"]),\n disabled: attrToBool(resolved.disabled)\n || attrToBool(resolved[\"aria-disabled\"]),\n };\n});\nconst recipe = computed(() => {\n const state = inputState.value;\n\n return selectRecipe({\n error: toStrbool(state.invalid),\n });\n});\nconst cls = useHuiClasses(\n \"Select\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Select\", SelectRecipeSlots>(\n \"Select\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"id\",\n \"labelProps\",\n \"classes\",\n \"styles\",\n \"class\",\n \"style\",\n]);\nconst selectAttrs = 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 selectRef = useTemplateRef<HuiElementInstance<\"select\">>(\"select\");\n\ndefineExpose({\n select: selectRef,\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 <div :class=\"cls.wrapper\" :style=\"sls.wrapper\">\n <select\n ref=\"select\"\n v-bind=\"selectAttrs\"\n :class=\"cls.select\"\n :style=\"sls.select\"\n >\n <slot />\n </select>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;EA8CA,MAAM,QAAQ;EAEd,MAAM,QAAQA,SAAA;EAOd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,UAAU,OAAO,KAAK;EACxD,MAAM,cAAc,MAAM;EAC1B,MAAM,WAAW,eACf,QAAQ,MAAM,SAAS,MAAM,eAAe,MAAM,KAAK,CACzD;EACA,MAAM,aAAa,eAAe;GAChC,MAAM,WAAW,cAAc;GAE/B,OAAO;IACL,IAAI,SAAS,MAAM;IACnB,SAAS,QAAQ,MAAM,KAAK;IAC5B,UAAU,WAAW,SAAS,YAAY,SAAS,gBAAgB;IACnE,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;GAC3C;EACF,CAAC;EACD,MAAM,SAAS,eAAe;GAC5B,MAAM,QAAQ,WAAW;GAEzB,OAAO,aAAa,EAClB,OAAO,UAAU,MAAM,OAAO,EAChC,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,UACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,UACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,cAAc,gBAAyC;GAC3D,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,YAAY,eAA6C,QAAQ;EAEvE,SAAa,EACX,QAAQ,UACV,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAE,UAAA,GAAAC,mBAsBM,OAAA;EAtBA,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,mBASM,OAAA;EATA,OAAKT,eAAE,OAAA,IAAI,OAAO;EAAG,OAAKC,eAAE,OAAA,IAAI,OAAO;CAC3C,GAAA,CAAAQ,mBAOS,UAPTL,WAOS,EANP,KAAI,SAAQ,GACJ,OAAA,aAAW;EAClB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;CAEZ,CAAA,GAAA,CAAAG,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,EAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { SelectSlots } from "@hebium-ui/core";
|
|
7
|
+
//#region src/components/select/select.types.d.ts
|
|
8
|
+
type HtmlSelectProps = Omit<HuiElementProps<"select">, "children">;
|
|
9
|
+
export interface SelectOwnProps {
|
|
10
|
+
/**
|
|
11
|
+
* Additional props passed to the internal label component.
|
|
12
|
+
*/
|
|
13
|
+
labelProps?: LabelProps | undefined;
|
|
14
|
+
}
|
|
15
|
+
export type SelectProps = HuiComponentProps<HtmlSelectProps & SelectOwnProps, SelectSlots>;
|
|
16
|
+
export interface SelectExposed {
|
|
17
|
+
readonly select: HuiElementInstance<"select"> | null;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export {};
|
|
21
|
+
//# sourceMappingURL=select.types.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HuiElementPropsNoInfer } from "../../types/element.js";
|
|
2
|
+
import "../../types/index.js";
|
|
3
|
+
import { SelectOwnProps } from "./select.types.js";
|
|
4
|
+
import { ClassValue, StyleValue } from "vue";
|
|
5
|
+
import { SelectSlots } from "@hebium-ui/core";
|
|
6
|
+
//#region src/components/select/select.vue.d.ts
|
|
7
|
+
type Props = SelectOwnProps & {
|
|
8
|
+
classes?: Partial<Record<SelectSlots, ClassValue | undefined>> | undefined;
|
|
9
|
+
styles?: Partial<Record<SelectSlots, StyleValue | undefined>> | undefined;
|
|
10
|
+
} & /* @vue-ignore */ Omit<HuiElementPropsNoInfer<"select">, keyof SelectOwnProps | "children" | "class" | "style">;
|
|
11
|
+
type __VLS_Slots = {
|
|
12
|
+
default?: () => unknown;
|
|
13
|
+
label?: () => unknown;
|
|
14
|
+
description?: () => unknown;
|
|
15
|
+
error?: () => unknown;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {
|
|
18
|
+
select: Readonly<import("vue").ShallowRef<HTMLSelectElement | null>>;
|
|
19
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
//#endregion
|
|
28
|
+
export { _default as default };
|
|
29
|
+
//# sourceMappingURL=select.vue.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { TableCaptionExposed, TableCaptionOwnProps, TableCaptionProps, TableExposed, TableOwnProps, TableProps, TableTbodyExposed, TableTbodyProps, TableTdExposed, TableTdProps, TableTfootExposed, TableTfootProps, TableThExposed, TableThProps, TableTheadExposed, TableTheadProps, TableTrExposed, TableTrOwnProps, TableTrProps } from "./table.types.js";
|
|
2
|
+
import _default from "./table-caption.vue.js";
|
|
3
|
+
import _default$1 from "./table-tbody.vue.js";
|
|
4
|
+
import _default$2 from "./table-td.vue.js";
|
|
5
|
+
import _default$3 from "./table-tfoot.vue.js";
|
|
6
|
+
import _default$4 from "./table-th.vue.js";
|
|
7
|
+
import _default$5 from "./table-thead.vue.js";
|
|
8
|
+
import _default$6 from "./table-tr.vue.js";
|
|
9
|
+
import _default$7 from "./table.vue.js";
|
|
10
|
+
export { _default$7 as Table, _default as TableCaption, type TableCaptionExposed, type TableCaptionOwnProps, type TableCaptionProps, type TableExposed, type TableOwnProps, type TableProps, _default$1 as TableTbody, type TableTbodyExposed, type TableTbodyProps, _default$2 as TableTd, type TableTdExposed, type TableTdProps, _default$3 as TableTfoot, type TableTfootExposed, type TableTfootProps, _default$4 as TableTh, type TableThExposed, type TableThProps, _default$5 as TableThead, type TableTheadExposed, type TableTheadProps, _default$6 as TableTr, type TableTrExposed, type TableTrOwnProps, type TableTrProps };
|
|
@@ -0,0 +1,79 @@
|
|
|
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 { computed, createElementBlock, defineComponent, mergeProps, openBlock, renderSlot, useAttrs, useTemplateRef } from "vue";
|
|
4
|
+
import { captionRecipe } from "@hebium-ui/core";
|
|
5
|
+
//#region src/components/table/table-caption.vue
|
|
6
|
+
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
7
|
+
name: "HuiTableCaption",
|
|
8
|
+
inheritAttrs: false,
|
|
9
|
+
__name: "table-caption",
|
|
10
|
+
props: {
|
|
11
|
+
side: {
|
|
12
|
+
type: null,
|
|
13
|
+
required: false
|
|
14
|
+
},
|
|
15
|
+
class: {
|
|
16
|
+
type: [
|
|
17
|
+
Boolean,
|
|
18
|
+
null,
|
|
19
|
+
String,
|
|
20
|
+
Object,
|
|
21
|
+
Array
|
|
22
|
+
],
|
|
23
|
+
required: false,
|
|
24
|
+
skipCheck: true
|
|
25
|
+
},
|
|
26
|
+
style: {
|
|
27
|
+
type: [
|
|
28
|
+
Boolean,
|
|
29
|
+
null,
|
|
30
|
+
String,
|
|
31
|
+
Object,
|
|
32
|
+
Array
|
|
33
|
+
],
|
|
34
|
+
required: false,
|
|
35
|
+
skipCheck: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
setup(__props, { expose: __expose }) {
|
|
39
|
+
const props = __props;
|
|
40
|
+
const attrs = useAttrs();
|
|
41
|
+
const resolvedProps = useHuiProps("TableCaption", props, attrs);
|
|
42
|
+
const recipe = computed(() => captionRecipe({ side: resolvedProps.value.side }));
|
|
43
|
+
const cls = useHuiClasses("TableCaption", recipe, computed(() => ({ root: props.class })));
|
|
44
|
+
const sls = useHuiStyles("TableCaption", computed(() => ({ root: props.style })));
|
|
45
|
+
const rootAttrs = useHuiAttrs(resolvedProps, [
|
|
46
|
+
"side",
|
|
47
|
+
"class",
|
|
48
|
+
"style"
|
|
49
|
+
]);
|
|
50
|
+
const rootRef = useTemplateRef("root");
|
|
51
|
+
__expose({ root: rootRef });
|
|
52
|
+
const __returned__ = {
|
|
53
|
+
props,
|
|
54
|
+
attrs,
|
|
55
|
+
resolvedProps,
|
|
56
|
+
recipe,
|
|
57
|
+
cls,
|
|
58
|
+
sls,
|
|
59
|
+
rootAttrs,
|
|
60
|
+
rootRef
|
|
61
|
+
};
|
|
62
|
+
Object.defineProperty(__returned__, "__isScriptSetup", {
|
|
63
|
+
enumerable: false,
|
|
64
|
+
value: true
|
|
65
|
+
});
|
|
66
|
+
return __returned__;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
70
|
+
return openBlock(), createElementBlock("caption", mergeProps({ ref: "root" }, $setup.rootAttrs, {
|
|
71
|
+
class: $setup.cls.root,
|
|
72
|
+
style: $setup.sls.root
|
|
73
|
+
}), [renderSlot(_ctx.$slots, "default")], 16);
|
|
74
|
+
}
|
|
75
|
+
var table_caption_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/table/table-caption.vue"]]);
|
|
76
|
+
//#endregion
|
|
77
|
+
export { table_caption_default as default };
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=table-caption.js.map
|