@dolanske/vui 1.1.5 → 1.2.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/dist/components/Accordion/AccordionGroup.vue.d.ts +3 -17
- package/dist/components/Breadcrumbs/Breadcrumbs.vue.d.ts +1 -11
- package/dist/components/Kbd/KbdGroup.vue.d.ts +1 -6
- package/dist/components/Radio/RadioGroup.vue.d.ts +1 -6
- package/dist/components/Tabs/Tab.vue.d.ts +1 -1
- package/dist/components/Tabs/Tabs.vue.d.ts +1 -15
- package/dist/shared/slots.d.ts +20 -0
- package/dist/vui.css +1 -1
- package/dist/vui.js +2975 -2941
- package/package.json +12 -10
- package/src/components/Accordion/AccordionGroup.vue +18 -12
- package/src/components/Breadcrumbs/Breadcrumbs.vue +6 -7
- package/src/components/Dropdown/Dropdown.vue +0 -1
- package/src/components/Kbd/KbdGroup.vue +6 -5
- package/src/components/Radio/RadioGroup.vue +5 -11
- package/src/components/Select/Select.vue +1 -1
- package/src/components/Sheet/Sheet.vue +1 -3
- package/src/components/Sheet/sheet.scss +3 -1
- package/src/components/Tabs/Tab.vue +4 -4
- package/src/components/Tabs/Tabs.vue +14 -14
- package/src/components/Tabs/tabs.scss +2 -2
- package/src/examples/ExampleAccordions.vue +13 -15
- package/src/examples/ExampleFlexGrid.vue +4 -4
- package/src/examples/ExampleSidebars.vue +10 -4
- package/src/examples/ExampleTabs.vue +37 -32
- package/src/shared/slots.ts +61 -0
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
|
-
import { AccordionProps } from './Accordion.vue';
|
|
3
1
|
interface Props {
|
|
4
2
|
/**
|
|
5
3
|
* If set to true, if an accordion opens, all other close
|
|
@@ -8,24 +6,12 @@ interface Props {
|
|
|
8
6
|
}
|
|
9
7
|
declare function __VLS_template(): {
|
|
10
8
|
attrs: Partial<{}>;
|
|
11
|
-
slots: Readonly<
|
|
12
|
-
|
|
13
|
-
props: AccordionProps;
|
|
14
|
-
}>;
|
|
15
|
-
}> & {
|
|
16
|
-
default: () => Array<VNode & {
|
|
17
|
-
props: AccordionProps;
|
|
18
|
-
}>;
|
|
19
|
-
};
|
|
20
|
-
refs: {
|
|
21
|
-
accordion: unknown[];
|
|
22
|
-
};
|
|
9
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
10
|
+
refs: {};
|
|
23
11
|
rootEl: any;
|
|
24
12
|
};
|
|
25
13
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
26
|
-
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
27
|
-
accordion: unknown[];
|
|
28
|
-
}, any>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
29
15
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
30
16
|
export default _default;
|
|
31
17
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
|
-
import { BreadcrumbItemProps } from './BreadcrumbItem.vue';
|
|
3
1
|
interface Props {
|
|
4
2
|
separator?: string;
|
|
5
3
|
}
|
|
6
4
|
declare function __VLS_template(): {
|
|
7
5
|
attrs: Partial<{}>;
|
|
8
|
-
slots: Readonly<
|
|
9
|
-
default: () => Array<VNode & {
|
|
10
|
-
props: BreadcrumbItemProps;
|
|
11
|
-
}>;
|
|
12
|
-
}> & {
|
|
13
|
-
default: () => Array<VNode & {
|
|
14
|
-
props: BreadcrumbItemProps;
|
|
15
|
-
}>;
|
|
16
|
-
};
|
|
6
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
17
7
|
refs: {};
|
|
18
8
|
rootEl: HTMLUListElement;
|
|
19
9
|
};
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { default as Kbd } from './Kbd.vue';
|
|
2
1
|
declare function __VLS_template(): {
|
|
3
2
|
attrs: Partial<{}>;
|
|
4
|
-
slots: Readonly<
|
|
5
|
-
default: () => Array<typeof Kbd>;
|
|
6
|
-
}> & {
|
|
7
|
-
default: () => Array<typeof Kbd>;
|
|
8
|
-
};
|
|
3
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
9
4
|
refs: {};
|
|
10
5
|
rootEl: any;
|
|
11
6
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FlexProps } from '../Flex/Flex.vue';
|
|
2
|
-
import { default as Radio } from './Radio.vue';
|
|
3
2
|
interface Props extends FlexProps {
|
|
4
3
|
disabled?: boolean;
|
|
5
4
|
}
|
|
@@ -9,11 +8,7 @@ type __VLS_PublicProps = {
|
|
|
9
8
|
} & __VLS_Props;
|
|
10
9
|
declare function __VLS_template(): {
|
|
11
10
|
attrs: Partial<{}>;
|
|
12
|
-
slots: Readonly<
|
|
13
|
-
default: () => Array<typeof Radio>;
|
|
14
|
-
}> & {
|
|
15
|
-
default: () => Array<typeof Radio>;
|
|
16
|
-
};
|
|
11
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
17
12
|
refs: {};
|
|
18
13
|
rootEl: HTMLDivElement;
|
|
19
14
|
};
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { VNode } from 'vue';
|
|
2
|
-
import { TabProps } from './Tab.vue';
|
|
3
1
|
interface Props {
|
|
4
2
|
variant?: 'default' | 'filled';
|
|
5
3
|
expand?: boolean;
|
|
@@ -11,19 +9,7 @@ type __VLS_PublicProps = {
|
|
|
11
9
|
} & __VLS_Props;
|
|
12
10
|
declare function __VLS_template(): {
|
|
13
11
|
attrs: Partial<{}>;
|
|
14
|
-
slots: Readonly<
|
|
15
|
-
default: () => Array<VNode & {
|
|
16
|
-
props: TabProps;
|
|
17
|
-
}>;
|
|
18
|
-
start: unknown;
|
|
19
|
-
end: unknown;
|
|
20
|
-
}> & {
|
|
21
|
-
default: () => Array<VNode & {
|
|
22
|
-
props: TabProps;
|
|
23
|
-
}>;
|
|
24
|
-
start: unknown;
|
|
25
|
-
end: unknown;
|
|
26
|
-
};
|
|
12
|
+
slots: Readonly<Record<string, any>> & Record<string, any>;
|
|
27
13
|
refs: {
|
|
28
14
|
tabs: HTMLDivElement;
|
|
29
15
|
underline: HTMLDivElement;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ShallowRef, VNode } from 'vue';
|
|
2
|
+
type VNodesProps<T extends object> = Array<VNode & {
|
|
3
|
+
props: T;
|
|
4
|
+
}>;
|
|
5
|
+
/**
|
|
6
|
+
* Flattens slot children and keeps them in sync reactively.
|
|
7
|
+
* @param slotFn The slot function (e.g., slots.default)
|
|
8
|
+
* @returns Computed array of flattened VNodes
|
|
9
|
+
*/
|
|
10
|
+
export declare function useFlattenedSlot<T extends object>(slotFn?: () => VNode[] | undefined): ShallowRef<VNodesProps<T>>;
|
|
11
|
+
/**
|
|
12
|
+
* Checks whether all of the provided VNodes are of the same type. Throws an
|
|
13
|
+
* error if not. This function should be used in components that only allow a
|
|
14
|
+
* single type of component
|
|
15
|
+
*
|
|
16
|
+
* @param vnodes Array of VNodes to check
|
|
17
|
+
* @param name Expected name of the components
|
|
18
|
+
*/
|
|
19
|
+
export declare function enforceSlotType(vnodes: ShallowRef<VNodesProps<any>>, name: string): void;
|
|
20
|
+
export {};
|