@vifui/core 0.4.0-alpha.6
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/README.md +204 -0
- package/dist/components/accordion/accordion-body.vue.d.ts +29 -0
- package/dist/components/accordion/accordion-body.vue.js +27 -0
- package/dist/components/accordion/accordion-body.vue2.js +5 -0
- package/dist/components/accordion/accordion-content.vue.d.ts +29 -0
- package/dist/components/accordion/accordion-content.vue.js +26 -0
- package/dist/components/accordion/accordion-content.vue2.js +5 -0
- package/dist/components/accordion/accordion-header.vue.d.ts +30 -0
- package/dist/components/accordion/accordion-header.vue.js +28 -0
- package/dist/components/accordion/accordion-header.vue2.js +5 -0
- package/dist/components/accordion/accordion-indicator.vue.d.ts +32 -0
- package/dist/components/accordion/accordion-indicator.vue.js +22 -0
- package/dist/components/accordion/accordion-indicator.vue2.js +5 -0
- package/dist/components/accordion/accordion-item.vue.d.ts +54 -0
- package/dist/components/accordion/accordion-item.vue.js +30 -0
- package/dist/components/accordion/accordion-item.vue2.js +5 -0
- package/dist/components/accordion/accordion-root.vue.d.ts +94 -0
- package/dist/components/accordion/accordion-root.vue.js +55 -0
- package/dist/components/accordion/accordion-root.vue2.js +5 -0
- package/dist/components/accordion/accordion-trigger.vue.d.ts +44 -0
- package/dist/components/accordion/accordion-trigger.vue.js +30 -0
- package/dist/components/accordion/accordion-trigger.vue2.js +5 -0
- package/dist/components/accordion/accordion.styles.d.ts +99 -0
- package/dist/components/accordion/accordion.styles.js +42 -0
- package/dist/components/accordion/index.d.ts +15 -0
- package/dist/components/accordion/index.js +8 -0
- package/dist/components/alert/alert-body.vue.d.ts +16 -0
- package/dist/components/alert/alert-body.vue.js +54 -0
- package/dist/components/alert/alert-body.vue2.js +5 -0
- package/dist/components/alert/alert-close.vue.d.ts +12 -0
- package/dist/components/alert/alert-close.vue.js +38 -0
- package/dist/components/alert/alert-close.vue2.js +5 -0
- package/dist/components/alert/alert-content.vue.d.ts +28 -0
- package/dist/components/alert/alert-content.vue.js +54 -0
- package/dist/components/alert/alert-content.vue2.js +5 -0
- package/dist/components/alert/alert-description.vue.d.ts +16 -0
- package/dist/components/alert/alert-description.vue.js +41 -0
- package/dist/components/alert/alert-description.vue2.js +5 -0
- package/dist/components/alert/alert-footer.vue.d.ts +16 -0
- package/dist/components/alert/alert-footer.vue.js +54 -0
- package/dist/components/alert/alert-footer.vue2.js +5 -0
- package/dist/components/alert/alert-header.vue.d.ts +16 -0
- package/dist/components/alert/alert-header.vue.js +54 -0
- package/dist/components/alert/alert-header.vue2.js +5 -0
- package/dist/components/alert/alert-icon.vue.d.ts +8 -0
- package/dist/components/alert/alert-icon.vue.js +43 -0
- package/dist/components/alert/alert-icon.vue2.js +5 -0
- package/dist/components/alert/alert-root.vue.d.ts +48 -0
- package/dist/components/alert/alert-root.vue.js +57 -0
- package/dist/components/alert/alert-root.vue2.js +5 -0
- package/dist/components/alert/alert-title.vue.d.ts +16 -0
- package/dist/components/alert/alert-title.vue.js +41 -0
- package/dist/components/alert/alert-title.vue2.js +5 -0
- package/dist/components/alert/alert.styles.d.ts +96 -0
- package/dist/components/alert/alert.styles.js +147 -0
- package/dist/components/alert/index.d.ts +19 -0
- package/dist/components/alert/index.js +10 -0
- package/dist/components/avatar/avatar-fallback.vue.d.ts +14 -0
- package/dist/components/avatar/avatar-fallback.vue.js +35 -0
- package/dist/components/avatar/avatar-fallback.vue2.js +5 -0
- package/dist/components/avatar/avatar-group.vue.d.ts +20 -0
- package/dist/components/avatar/avatar-group.vue.js +101 -0
- package/dist/components/avatar/avatar-group.vue2.js +5 -0
- package/dist/components/avatar/avatar-image.vue.d.ts +14 -0
- package/dist/components/avatar/avatar-image.vue.js +37 -0
- package/dist/components/avatar/avatar-image.vue2.js +5 -0
- package/dist/components/avatar/avatar-root.vue.d.ts +57 -0
- package/dist/components/avatar/avatar-root.vue.js +102 -0
- package/dist/components/avatar/avatar-root.vue2.js +5 -0
- package/dist/components/avatar/avatar.styles.d.ts +209 -0
- package/dist/components/avatar/avatar.styles.js +50 -0
- package/dist/components/avatar/index.d.ts +9 -0
- package/dist/components/avatar/index.js +5 -0
- package/dist/components/badge/badge.styles.d.ts +87 -0
- package/dist/components/badge/badge.styles.js +41 -0
- package/dist/components/badge/badge.vue.d.ts +116 -0
- package/dist/components/badge/badge.vue.js +79 -0
- package/dist/components/badge/badge.vue2.js +5 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue.js +28 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.js +27 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +53 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue.js +30 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue.js +27 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +78 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue.js +39 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue.js +32 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +144 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +58 -0
- package/dist/components/breadcrumb/index.d.ts +13 -0
- package/dist/components/breadcrumb/index.js +7 -0
- package/dist/components/button/button.styles.d.ts +90 -0
- package/dist/components/button/button.styles.js +41 -0
- package/dist/components/button/button.vue.d.ts +144 -0
- package/dist/components/button/button.vue.js +131 -0
- package/dist/components/button/button.vue2.js +5 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/card/card-body.vue.d.ts +29 -0
- package/dist/components/card/card-body.vue.js +27 -0
- package/dist/components/card/card-body.vue2.js +5 -0
- package/dist/components/card/card-footer.vue.d.ts +29 -0
- package/dist/components/card/card-footer.vue.js +27 -0
- package/dist/components/card/card-footer.vue2.js +5 -0
- package/dist/components/card/card-header.vue.d.ts +29 -0
- package/dist/components/card/card-header.vue.js +27 -0
- package/dist/components/card/card-header.vue2.js +5 -0
- package/dist/components/card/card-media.vue.d.ts +44 -0
- package/dist/components/card/card-media.vue.js +56 -0
- package/dist/components/card/card-media.vue2.js +5 -0
- package/dist/components/card/card-root.vue.d.ts +128 -0
- package/dist/components/card/card-root.vue.js +58 -0
- package/dist/components/card/card-root.vue2.js +5 -0
- package/dist/components/card/card.styles.d.ts +216 -0
- package/dist/components/card/card.styles.js +86 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +6 -0
- package/dist/components/checkbox/checkbox-group-item.vue.d.ts +22 -0
- package/dist/components/checkbox/checkbox-group-item.vue.js +27 -0
- package/dist/components/checkbox/checkbox-group-item.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-group.vue.d.ts +35 -0
- package/dist/components/checkbox/checkbox-group.vue.js +53 -0
- package/dist/components/checkbox/checkbox-group.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-indicator.vue.d.ts +40 -0
- package/dist/components/checkbox/checkbox-indicator.vue.js +58 -0
- package/dist/components/checkbox/checkbox-indicator.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-label.vue.d.ts +27 -0
- package/dist/components/checkbox/checkbox-label.vue.js +24 -0
- package/dist/components/checkbox/checkbox-label.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-root.vue.d.ts +42 -0
- package/dist/components/checkbox/checkbox-root.vue.js +51 -0
- package/dist/components/checkbox/checkbox-root.vue2.js +5 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +155 -0
- package/dist/components/checkbox/checkbox.styles.js +66 -0
- package/dist/components/checkbox/index.d.ts +11 -0
- package/dist/components/checkbox/index.js +6 -0
- package/dist/components/divider/divider.styles.d.ts +93 -0
- package/dist/components/divider/divider.styles.js +43 -0
- package/dist/components/divider/divider.vue.d.ts +89 -0
- package/dist/components/divider/divider.vue.js +51 -0
- package/dist/components/divider/divider.vue2.js +5 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/divider/index.js +2 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/spinner/spinner.styles.d.ts +112 -0
- package/dist/components/spinner/spinner.styles.js +47 -0
- package/dist/components/spinner/spinner.vue.d.ts +31 -0
- package/dist/components/spinner/spinner.vue.js +102 -0
- package/dist/components/spinner/spinner.vue2.js +5 -0
- package/dist/components/types/shared-types.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +54 -0
- package/package.json +94 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type CheckboxIndicatorProps as RekaCheckboxIndicatorProps } from "reka-ui";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the VifUI CheckboxIndicator component.
|
|
4
|
+
* Wraps Reka UI's CheckboxIndicator with icon support.
|
|
5
|
+
*/
|
|
6
|
+
export interface CheckboxIndicatorProps extends RekaCheckboxIndicatorProps {
|
|
7
|
+
/**
|
|
8
|
+
* Icon to show when checked.
|
|
9
|
+
* @default "lucide:check"
|
|
10
|
+
*/
|
|
11
|
+
checkedIcon?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Icon to show when indeterminate.
|
|
14
|
+
* @default "lucide:minus"
|
|
15
|
+
*/
|
|
16
|
+
indeterminateIcon?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Custom class names for the indicator wrapper.
|
|
19
|
+
*/
|
|
20
|
+
class?: string;
|
|
21
|
+
}
|
|
22
|
+
declare var __VLS_5: {
|
|
23
|
+
checkedIcon: string;
|
|
24
|
+
indeterminateIcon: string;
|
|
25
|
+
};
|
|
26
|
+
type __VLS_Slots = {} & {
|
|
27
|
+
default?: (props: typeof __VLS_5) => any;
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_component: import("vue").DefineComponent<CheckboxIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CheckboxIndicatorProps> & Readonly<{}>, {
|
|
30
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
31
|
+
checkedIcon: string;
|
|
32
|
+
indeterminateIcon: string;
|
|
33
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
34
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
35
|
+
export default _default;
|
|
36
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
37
|
+
new (): {
|
|
38
|
+
$slots: S;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent, computed, inject, createElementBlock, openBlock, normalizeClass, unref, createElementVNode, createVNode, mergeProps, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
|
+
import { useForwardProps, CheckboxIndicator } from 'reka-ui';
|
|
3
|
+
import { Icon } from '@iconify/vue';
|
|
4
|
+
|
|
5
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "checkbox-indicator",
|
|
7
|
+
props: {
|
|
8
|
+
checkedIcon: { type: String, required: false, default: "lucide:check" },
|
|
9
|
+
indeterminateIcon: { type: String, required: false, default: "lucide:minus" },
|
|
10
|
+
class: { type: String, required: false },
|
|
11
|
+
forceMount: { type: Boolean, required: false },
|
|
12
|
+
asChild: { type: Boolean, required: false },
|
|
13
|
+
as: { type: null, required: false, default: "span" }
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const delegatedProps = computed(() => {
|
|
18
|
+
const { class: _, checkedIcon, indeterminateIcon, ...delegated } = props;
|
|
19
|
+
return delegated;
|
|
20
|
+
});
|
|
21
|
+
const forwarded = useForwardProps(delegatedProps);
|
|
22
|
+
const slots = inject("checkboxSlots", null);
|
|
23
|
+
return (_ctx, _cache) => {
|
|
24
|
+
return openBlock(), createElementBlock(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
class: normalizeClass(unref(slots)?.box?.())
|
|
28
|
+
},
|
|
29
|
+
[
|
|
30
|
+
createElementVNode(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
class: normalizeClass(unref(slots)?.check?.())
|
|
34
|
+
},
|
|
35
|
+
null,
|
|
36
|
+
2
|
|
37
|
+
/* CLASS */
|
|
38
|
+
),
|
|
39
|
+
createVNode(unref(CheckboxIndicator), mergeProps(unref(forwarded), {
|
|
40
|
+
class: [unref(slots)?.indicator?.(), props.class]
|
|
41
|
+
}), {
|
|
42
|
+
default: withCtx(() => [
|
|
43
|
+
renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ checkedIcon: __props.checkedIcon, indeterminateIcon: __props.indeterminateIcon })), () => [
|
|
44
|
+
createVNode(unref(Icon), { icon: __props.checkedIcon }, null, 8, ["icon"])
|
|
45
|
+
])
|
|
46
|
+
]),
|
|
47
|
+
_: 3
|
|
48
|
+
/* FORWARDED */
|
|
49
|
+
}, 16, ["class"])
|
|
50
|
+
],
|
|
51
|
+
2
|
|
52
|
+
/* CLASS */
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the VifUI CheckboxLabel component.
|
|
3
|
+
* Provides accessible label for checkbox.
|
|
4
|
+
*/
|
|
5
|
+
export interface CheckboxLabelProps {
|
|
6
|
+
/**
|
|
7
|
+
* HTML for attribute to associate with checkbox.
|
|
8
|
+
* If not provided, clicking label won't toggle checkbox.
|
|
9
|
+
*/
|
|
10
|
+
for?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Custom class names for the label.
|
|
13
|
+
*/
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
|
+
type __VLS_Slots = {} & {
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_component: import("vue").DefineComponent<CheckboxLabelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CheckboxLabelProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
|
+
|
|
3
|
+
const _hoisted_1 = ["for"];
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "checkbox-label",
|
|
6
|
+
props: {
|
|
7
|
+
for: { type: String, required: false },
|
|
8
|
+
class: { type: String, required: false }
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const slots = inject("checkboxSlots", null);
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("label", {
|
|
15
|
+
for: props.for,
|
|
16
|
+
class: normalizeClass([unref(slots)?.label?.(), props.class])
|
|
17
|
+
}, [
|
|
18
|
+
renderSlot(_ctx.$slots, "default")
|
|
19
|
+
], 10, _hoisted_1);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type CheckboxRootProps as RekaCheckboxRootProps } from "reka-ui";
|
|
2
|
+
import type { Colors, Sizes } from "../types/shared-types";
|
|
3
|
+
/**
|
|
4
|
+
* Props for the VifUI CheckboxRoot component.
|
|
5
|
+
* Wraps Reka UI's CheckboxRoot with VifUI styling.
|
|
6
|
+
*/
|
|
7
|
+
export interface CheckboxRootProps extends RekaCheckboxRootProps {
|
|
8
|
+
/**
|
|
9
|
+
* The color theme of the checkbox.
|
|
10
|
+
* @default "brand"
|
|
11
|
+
*/
|
|
12
|
+
color?: Colors;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the checkbox.
|
|
15
|
+
* @default "md"
|
|
16
|
+
*/
|
|
17
|
+
size?: Extract<Sizes, "sm" | "md" | "lg">;
|
|
18
|
+
/**
|
|
19
|
+
* Custom class names for the checkbox wrapper.
|
|
20
|
+
*/
|
|
21
|
+
class?: string;
|
|
22
|
+
}
|
|
23
|
+
declare var __VLS_6: {};
|
|
24
|
+
type __VLS_Slots = {} & {
|
|
25
|
+
default?: (props: typeof __VLS_6) => any;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_component: import("vue").DefineComponent<CheckboxRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
"update:modelValue": (value: boolean | "indeterminate") => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<CheckboxRootProps> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
size: Extract<Sizes, "sm" | "md" | "lg">;
|
|
33
|
+
color: Colors;
|
|
34
|
+
as: import("reka-ui").AsTag | import("vue").Component;
|
|
35
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
36
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
39
|
+
new (): {
|
|
40
|
+
$slots: S;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent, computed, provide, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { useForwardPropsEmits, CheckboxRoot } from 'reka-ui';
|
|
3
|
+
import { checkboxVariants } from './checkbox.styles.js';
|
|
4
|
+
|
|
5
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "checkbox-root",
|
|
7
|
+
props: {
|
|
8
|
+
color: { type: String, required: false, default: "brand" },
|
|
9
|
+
size: { type: String, required: false, default: "md" },
|
|
10
|
+
class: { type: String, required: false },
|
|
11
|
+
defaultValue: { type: [Boolean, String], required: false },
|
|
12
|
+
modelValue: { type: [Boolean, String, null], required: false },
|
|
13
|
+
disabled: { type: Boolean, required: false },
|
|
14
|
+
value: { type: null, required: false },
|
|
15
|
+
id: { type: String, required: false },
|
|
16
|
+
asChild: { type: Boolean, required: false },
|
|
17
|
+
as: { type: null, required: false, default: "button" },
|
|
18
|
+
name: { type: String, required: false },
|
|
19
|
+
required: { type: Boolean, required: false }
|
|
20
|
+
},
|
|
21
|
+
emits: ["update:modelValue"],
|
|
22
|
+
setup(__props, { emit: __emit }) {
|
|
23
|
+
const props = __props;
|
|
24
|
+
const emits = __emit;
|
|
25
|
+
const delegatedProps = computed(() => {
|
|
26
|
+
const { class: _, color, size, ...delegated } = props;
|
|
27
|
+
return delegated;
|
|
28
|
+
});
|
|
29
|
+
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
|
30
|
+
const slots = computed(
|
|
31
|
+
() => checkboxVariants({
|
|
32
|
+
color: props.color,
|
|
33
|
+
size: props.size
|
|
34
|
+
})
|
|
35
|
+
);
|
|
36
|
+
provide("checkboxSlots", slots);
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return openBlock(), createBlock(unref(CheckboxRoot), mergeProps(unref(forwarded), {
|
|
39
|
+
class: [slots.value.root(), props.class]
|
|
40
|
+
}), {
|
|
41
|
+
default: withCtx(() => [
|
|
42
|
+
renderSlot(_ctx.$slots, "default")
|
|
43
|
+
]),
|
|
44
|
+
_: 3
|
|
45
|
+
/* FORWARDED */
|
|
46
|
+
}, 16, ["class"]);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
/**
|
|
3
|
+
* Checkbox component variant mapper
|
|
4
|
+
*
|
|
5
|
+
* Maps variant props to @vifui/styles CSS classes
|
|
6
|
+
* Inspired by Vuesax's checkbox architecture
|
|
7
|
+
*/
|
|
8
|
+
export declare const checkboxVariants: import("tailwind-variants").TVReturnType<{
|
|
9
|
+
size: {
|
|
10
|
+
sm: {
|
|
11
|
+
root: string;
|
|
12
|
+
};
|
|
13
|
+
md: {
|
|
14
|
+
root: string;
|
|
15
|
+
};
|
|
16
|
+
lg: {
|
|
17
|
+
root: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
color: {
|
|
21
|
+
brand: {
|
|
22
|
+
root: string;
|
|
23
|
+
};
|
|
24
|
+
success: {
|
|
25
|
+
root: string;
|
|
26
|
+
};
|
|
27
|
+
warning: {
|
|
28
|
+
root: string;
|
|
29
|
+
};
|
|
30
|
+
danger: {
|
|
31
|
+
root: string;
|
|
32
|
+
};
|
|
33
|
+
neutral: {
|
|
34
|
+
root: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}, {
|
|
38
|
+
root: string;
|
|
39
|
+
box: string;
|
|
40
|
+
check: string;
|
|
41
|
+
indicator: string;
|
|
42
|
+
label: string;
|
|
43
|
+
}, undefined, {
|
|
44
|
+
size: {
|
|
45
|
+
sm: {
|
|
46
|
+
root: string;
|
|
47
|
+
};
|
|
48
|
+
md: {
|
|
49
|
+
root: string;
|
|
50
|
+
};
|
|
51
|
+
lg: {
|
|
52
|
+
root: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
color: {
|
|
56
|
+
brand: {
|
|
57
|
+
root: string;
|
|
58
|
+
};
|
|
59
|
+
success: {
|
|
60
|
+
root: string;
|
|
61
|
+
};
|
|
62
|
+
warning: {
|
|
63
|
+
root: string;
|
|
64
|
+
};
|
|
65
|
+
danger: {
|
|
66
|
+
root: string;
|
|
67
|
+
};
|
|
68
|
+
neutral: {
|
|
69
|
+
root: string;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
root: string;
|
|
74
|
+
box: string;
|
|
75
|
+
check: string;
|
|
76
|
+
indicator: string;
|
|
77
|
+
label: string;
|
|
78
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
79
|
+
size: {
|
|
80
|
+
sm: {
|
|
81
|
+
root: string;
|
|
82
|
+
};
|
|
83
|
+
md: {
|
|
84
|
+
root: string;
|
|
85
|
+
};
|
|
86
|
+
lg: {
|
|
87
|
+
root: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
color: {
|
|
91
|
+
brand: {
|
|
92
|
+
root: string;
|
|
93
|
+
};
|
|
94
|
+
success: {
|
|
95
|
+
root: string;
|
|
96
|
+
};
|
|
97
|
+
warning: {
|
|
98
|
+
root: string;
|
|
99
|
+
};
|
|
100
|
+
danger: {
|
|
101
|
+
root: string;
|
|
102
|
+
};
|
|
103
|
+
neutral: {
|
|
104
|
+
root: string;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
}, {
|
|
108
|
+
root: string;
|
|
109
|
+
box: string;
|
|
110
|
+
check: string;
|
|
111
|
+
indicator: string;
|
|
112
|
+
label: string;
|
|
113
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
114
|
+
/**
|
|
115
|
+
* Checkbox Group variant mapper
|
|
116
|
+
*/
|
|
117
|
+
export declare const checkboxGroupVariants: import("tailwind-variants").TVReturnType<{
|
|
118
|
+
orientation: {
|
|
119
|
+
vertical: {
|
|
120
|
+
root: string;
|
|
121
|
+
};
|
|
122
|
+
horizontal: {
|
|
123
|
+
root: string;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
}, {
|
|
127
|
+
root: string;
|
|
128
|
+
item: string;
|
|
129
|
+
}, undefined, {
|
|
130
|
+
orientation: {
|
|
131
|
+
vertical: {
|
|
132
|
+
root: string;
|
|
133
|
+
};
|
|
134
|
+
horizontal: {
|
|
135
|
+
root: string;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
}, {
|
|
139
|
+
root: string;
|
|
140
|
+
item: string;
|
|
141
|
+
}, import("tailwind-variants").TVReturnType<{
|
|
142
|
+
orientation: {
|
|
143
|
+
vertical: {
|
|
144
|
+
root: string;
|
|
145
|
+
};
|
|
146
|
+
horizontal: {
|
|
147
|
+
root: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
}, {
|
|
151
|
+
root: string;
|
|
152
|
+
item: string;
|
|
153
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
154
|
+
export type CheckboxVariantProps = VariantProps<typeof checkboxVariants>;
|
|
155
|
+
export type CheckboxGroupVariantProps = VariantProps<typeof checkboxGroupVariants>;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
|
|
3
|
+
const checkboxVariants = tv({
|
|
4
|
+
slots: {
|
|
5
|
+
root: "vif-checkbox",
|
|
6
|
+
box: "vif-checkbox__box",
|
|
7
|
+
check: "vif-checkbox__check",
|
|
8
|
+
indicator: "vif-checkbox__indicator",
|
|
9
|
+
label: "vif-checkbox__label"
|
|
10
|
+
},
|
|
11
|
+
variants: {
|
|
12
|
+
size: {
|
|
13
|
+
sm: {
|
|
14
|
+
root: "vif-checkbox--sm"
|
|
15
|
+
},
|
|
16
|
+
md: {
|
|
17
|
+
root: "vif-checkbox--md"
|
|
18
|
+
},
|
|
19
|
+
lg: {
|
|
20
|
+
root: "vif-checkbox--lg"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
color: {
|
|
24
|
+
brand: {
|
|
25
|
+
root: "vif-checkbox--brand"
|
|
26
|
+
},
|
|
27
|
+
success: {
|
|
28
|
+
root: "vif-checkbox--success"
|
|
29
|
+
},
|
|
30
|
+
warning: {
|
|
31
|
+
root: "vif-checkbox--warning"
|
|
32
|
+
},
|
|
33
|
+
danger: {
|
|
34
|
+
root: "vif-checkbox--danger"
|
|
35
|
+
},
|
|
36
|
+
neutral: {
|
|
37
|
+
root: "vif-checkbox--neutral"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
size: "md",
|
|
43
|
+
color: "brand"
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
const checkboxGroupVariants = tv({
|
|
47
|
+
slots: {
|
|
48
|
+
root: "vif-checkbox-group",
|
|
49
|
+
item: "vif-checkbox-group__item"
|
|
50
|
+
},
|
|
51
|
+
variants: {
|
|
52
|
+
orientation: {
|
|
53
|
+
vertical: {
|
|
54
|
+
root: "vif-checkbox-group--vertical"
|
|
55
|
+
},
|
|
56
|
+
horizontal: {
|
|
57
|
+
root: "vif-checkbox-group--horizontal"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
orientation: "vertical"
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export { checkboxGroupVariants, checkboxVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default as CheckboxRoot } from "./checkbox-root.vue";
|
|
2
|
+
export { default as CheckboxIndicator } from "./checkbox-indicator.vue";
|
|
3
|
+
export { default as CheckboxLabel } from "./checkbox-label.vue";
|
|
4
|
+
export { default as CheckboxGroup } from "./checkbox-group.vue";
|
|
5
|
+
export { default as CheckboxGroupItem } from "./checkbox-group-item.vue";
|
|
6
|
+
export { checkboxVariants, checkboxGroupVariants, type CheckboxVariantProps, type CheckboxGroupVariantProps, } from "./checkbox.styles";
|
|
7
|
+
export type { CheckboxRootProps } from "./checkbox-root.vue";
|
|
8
|
+
export type { CheckboxIndicatorProps } from "./checkbox-indicator.vue";
|
|
9
|
+
export type { CheckboxLabelProps } from "./checkbox-label.vue";
|
|
10
|
+
export type { CheckboxGroupProps } from "./checkbox-group.vue";
|
|
11
|
+
export type { CheckboxGroupItemProps } from "./checkbox-group-item.vue";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as CheckboxRoot } from './checkbox-root.vue.js';
|
|
2
|
+
export { default as CheckboxIndicator } from './checkbox-indicator.vue.js';
|
|
3
|
+
export { default as CheckboxLabel } from './checkbox-label.vue.js';
|
|
4
|
+
export { default as CheckboxGroup } from './checkbox-group.vue.js';
|
|
5
|
+
export { default as CheckboxGroupItem } from './checkbox-group-item.vue.js';
|
|
6
|
+
export { checkboxGroupVariants, checkboxVariants } from './checkbox.styles.js';
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { VariantProps } from "tailwind-variants";
|
|
2
|
+
/**
|
|
3
|
+
* Divider component variant mapper
|
|
4
|
+
*
|
|
5
|
+
* Maps variant props to @vifui/styles CSS classes
|
|
6
|
+
* Inspired by Vuesax's divider architecture
|
|
7
|
+
*/
|
|
8
|
+
export declare const dividerVariants: import("tailwind-variants").TVReturnType<{
|
|
9
|
+
orientation: {
|
|
10
|
+
horizontal: string;
|
|
11
|
+
vertical: string;
|
|
12
|
+
};
|
|
13
|
+
variant: {
|
|
14
|
+
solid: string;
|
|
15
|
+
dashed: string;
|
|
16
|
+
dotted: string;
|
|
17
|
+
};
|
|
18
|
+
size: {
|
|
19
|
+
xs: string;
|
|
20
|
+
sm: string;
|
|
21
|
+
md: string;
|
|
22
|
+
lg: string;
|
|
23
|
+
};
|
|
24
|
+
color: {
|
|
25
|
+
neutral: string;
|
|
26
|
+
brand: string;
|
|
27
|
+
success: string;
|
|
28
|
+
warning: string;
|
|
29
|
+
danger: string;
|
|
30
|
+
};
|
|
31
|
+
labelPosition: {
|
|
32
|
+
start: string;
|
|
33
|
+
center: string;
|
|
34
|
+
end: string;
|
|
35
|
+
};
|
|
36
|
+
}, undefined, "vif-divider", {
|
|
37
|
+
orientation: {
|
|
38
|
+
horizontal: string;
|
|
39
|
+
vertical: string;
|
|
40
|
+
};
|
|
41
|
+
variant: {
|
|
42
|
+
solid: string;
|
|
43
|
+
dashed: string;
|
|
44
|
+
dotted: string;
|
|
45
|
+
};
|
|
46
|
+
size: {
|
|
47
|
+
xs: string;
|
|
48
|
+
sm: string;
|
|
49
|
+
md: string;
|
|
50
|
+
lg: string;
|
|
51
|
+
};
|
|
52
|
+
color: {
|
|
53
|
+
neutral: string;
|
|
54
|
+
brand: string;
|
|
55
|
+
success: string;
|
|
56
|
+
warning: string;
|
|
57
|
+
danger: string;
|
|
58
|
+
};
|
|
59
|
+
labelPosition: {
|
|
60
|
+
start: string;
|
|
61
|
+
center: string;
|
|
62
|
+
end: string;
|
|
63
|
+
};
|
|
64
|
+
}, undefined, import("tailwind-variants").TVReturnType<{
|
|
65
|
+
orientation: {
|
|
66
|
+
horizontal: string;
|
|
67
|
+
vertical: string;
|
|
68
|
+
};
|
|
69
|
+
variant: {
|
|
70
|
+
solid: string;
|
|
71
|
+
dashed: string;
|
|
72
|
+
dotted: string;
|
|
73
|
+
};
|
|
74
|
+
size: {
|
|
75
|
+
xs: string;
|
|
76
|
+
sm: string;
|
|
77
|
+
md: string;
|
|
78
|
+
lg: string;
|
|
79
|
+
};
|
|
80
|
+
color: {
|
|
81
|
+
neutral: string;
|
|
82
|
+
brand: string;
|
|
83
|
+
success: string;
|
|
84
|
+
warning: string;
|
|
85
|
+
danger: string;
|
|
86
|
+
};
|
|
87
|
+
labelPosition: {
|
|
88
|
+
start: string;
|
|
89
|
+
center: string;
|
|
90
|
+
end: string;
|
|
91
|
+
};
|
|
92
|
+
}, undefined, "vif-divider", unknown, unknown, undefined>>;
|
|
93
|
+
export type DividerVariantProps = VariantProps<typeof dividerVariants>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { tv } from 'tailwind-variants';
|
|
2
|
+
|
|
3
|
+
const dividerVariants = tv({
|
|
4
|
+
base: "vif-divider",
|
|
5
|
+
variants: {
|
|
6
|
+
orientation: {
|
|
7
|
+
horizontal: "vif-divider--horizontal",
|
|
8
|
+
vertical: "vif-divider--vertical"
|
|
9
|
+
},
|
|
10
|
+
variant: {
|
|
11
|
+
solid: "vif-divider--solid",
|
|
12
|
+
dashed: "vif-divider--dashed",
|
|
13
|
+
dotted: "vif-divider--dotted"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
xs: "vif-divider--xs",
|
|
17
|
+
sm: "vif-divider--sm",
|
|
18
|
+
md: "vif-divider--md",
|
|
19
|
+
lg: "vif-divider--lg"
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
neutral: "vif-divider--neutral",
|
|
23
|
+
brand: "vif-divider--brand",
|
|
24
|
+
success: "vif-divider--success",
|
|
25
|
+
warning: "vif-divider--warning",
|
|
26
|
+
danger: "vif-divider--danger"
|
|
27
|
+
},
|
|
28
|
+
labelPosition: {
|
|
29
|
+
start: "vif-divider--label-start",
|
|
30
|
+
center: "vif-divider--label-center",
|
|
31
|
+
end: "vif-divider--label-end"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
orientation: "horizontal",
|
|
36
|
+
variant: "solid",
|
|
37
|
+
size: "sm",
|
|
38
|
+
color: "neutral",
|
|
39
|
+
labelPosition: "center"
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export { dividerVariants };
|