vue-composable-ui 0.0.1 → 1.0.2
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 +1 -1
- package/README.md +5 -1
- package/dist/combobox.vue_vue_type_script_setup_true_lang-BhVMcx67.js +140 -0
- package/dist/comboboxHiddenInput.vue_vue_type_script_setup_true_lang-Ba-UPd-M.js +29 -0
- package/dist/comboboxInput.vue_vue_type_script_setup_true_lang-DzRfJ5ke.js +33 -0
- package/dist/comboboxOption.vue_vue_type_script_setup_true_lang-OyJxB4Jk.js +42 -0
- package/dist/comboboxOptions.vue_vue_type_script_setup_true_lang-Doy6MfEQ.js +20 -0
- package/dist/composable-ui.js +49 -0
- package/dist/composable-ui10.js +4 -0
- package/dist/composable-ui11.js +4 -0
- package/dist/composable-ui12.js +4 -0
- package/dist/composable-ui13.js +4 -0
- package/dist/composable-ui14.js +4 -0
- package/dist/composable-ui15.js +4 -0
- package/dist/composable-ui16.js +4 -0
- package/dist/composable-ui17.js +31 -0
- package/dist/composable-ui18.js +4 -0
- package/dist/composable-ui19.js +4 -0
- package/dist/composable-ui2.js +55 -0
- package/dist/composable-ui20.js +4 -0
- package/dist/composable-ui21.js +100 -0
- package/dist/composable-ui22.js +144 -0
- package/dist/composable-ui23.js +7 -0
- package/dist/composable-ui24.js +7 -0
- package/dist/composable-ui3.js +4 -0
- package/dist/composable-ui4.js +4 -0
- package/dist/composable-ui5.js +4 -0
- package/dist/composable-ui6.js +4 -0
- package/dist/composable-ui7.js +4 -0
- package/dist/composable-ui8.js +4 -0
- package/dist/composable-ui9.js +4 -0
- package/dist/listbox.vue_vue_type_script_setup_true_lang-Bj1ZXiBX.js +69 -0
- package/dist/listboxOption.vue_vue_type_script_setup_true_lang-B_yRptJm.js +37 -0
- package/dist/menu.vue_vue_type_script_setup_true_lang-Ci7q2rOg.js +82 -0
- package/dist/menuItem.vue_vue_type_script_setup_true_lang-mXtMa4gO.js +63 -0
- package/dist/menuItems.vue_vue_type_script_setup_true_lang-p9vftREy.js +49 -0
- package/dist/popover.vue_vue_type_script_setup_true_lang-DhKF7_nY.js +50 -0
- package/dist/popoverDialog.vue_vue_type_script_setup_true_lang-CDXUO7wZ.js +33 -0
- package/dist/tab.vue_vue_type_script_setup_true_lang-Y5OFGqMB.js +29 -0
- package/dist/tabContainer.vue_vue_type_script_setup_true_lang-fPpLno2Z.js +40 -0
- package/dist/tabList.vue_vue_type_script_setup_true_lang-CZyqGCuj.js +48 -0
- package/dist/tabPanel.vue_vue_type_script_setup_true_lang-CGhP6SHR.js +31 -0
- package/dist/tooltip.vue_vue_type_script_setup_true_lang-DVKYJyfL.js +85 -0
- package/dist/types/components/combobox/combobox.vue.d.ts +45 -0
- package/dist/types/components/combobox/comboboxHiddenInput.vue.d.ts +6 -0
- package/dist/types/components/combobox/comboboxInput.vue.d.ts +9 -0
- package/dist/types/components/combobox/comboboxOption.vue.d.ts +20 -0
- package/dist/types/components/combobox/comboboxOptions.vue.d.ts +12 -0
- package/dist/types/components/injectionKeys.d.ts +43 -0
- package/dist/types/components/listbox/listbox.vue.d.ts +26 -0
- package/dist/types/components/listbox/listboxOption.vue.d.ts +20 -0
- package/dist/types/components/menu/menu.vue.d.ts +42 -0
- package/dist/types/components/menu/menuItem.vue.d.ts +24 -0
- package/dist/types/components/menu/menuItems.vue.d.ts +12 -0
- package/dist/types/components/popover/popover.vue.d.ts +40 -0
- package/dist/types/components/popover/popoverDialog.vue.d.ts +12 -0
- package/dist/types/components/tabs/tab.vue.d.ts +17 -0
- package/dist/types/components/tabs/tabContainer.vue.d.ts +19 -0
- package/dist/types/components/tabs/tabList.vue.d.ts +17 -0
- package/dist/types/components/tabs/tabPanel.vue.d.ts +15 -0
- package/dist/types/components/tooltip.vue.d.ts +34 -0
- package/dist/types/composables/formControl.d.ts +48 -0
- package/dist/types/composables/list.d.ts +107 -0
- package/dist/types/composables/listOption.d.ts +34 -0
- package/dist/types/composables/popover.d.ts +68 -0
- package/dist/types/main.d.ts +22 -0
- package/dist/types/utils/element.d.ts +3 -0
- package/package.json +28 -12
- package/.github/workflows/deploy.yml +0 -21
- package/.github/workflows/docs.yml +0 -62
- package/.vscode/extensions.json +0 -7
- package/docs/.vitepress/config.mts +0 -40
- package/docs/.vitepress/theme/index.js +0 -4
- package/docs/.vitepress/theme/style.scss +0 -155
- package/docs/components/combobox.md +0 -174
- package/docs/components/demos/combobox.vue +0 -142
- package/docs/components/demos/combobox_autocomplete.vue +0 -75
- package/docs/components/demos/combobox_tags.vue +0 -127
- package/docs/components/demos/input.vue +0 -35
- package/docs/components/demos/listbox.vue +0 -64
- package/docs/components/demos/menu.vue +0 -93
- package/docs/components/demos/popover.vue +0 -16
- package/docs/components/demos/tabs.vue +0 -59
- package/docs/components/demos/tooltip.vue +0 -27
- package/docs/components/listbox.md +0 -9
- package/docs/components/menu.md +0 -121
- package/docs/components/popover.md +0 -82
- package/docs/components/tabs.md +0 -9
- package/docs/components/tooltip.md +0 -78
- package/docs/composables/form-control.md +0 -130
- package/docs/composables/list-option.md +0 -47
- package/docs/composables/list.md +0 -192
- package/docs/composables/popover.md +0 -90
- package/docs/index.md +0 -24
- package/docs/intro.md +0 -0
- package/src/components/combobox/combobox.vue +0 -229
- package/src/components/combobox/comboboxFormInput.vue +0 -33
- package/src/components/combobox/comboboxOption.vue +0 -52
- package/src/components/combobox/comboboxOptions.vue +0 -17
- package/src/components/injectionKeys.ts +0 -50
- package/src/components/listbox/listbox.vue +0 -91
- package/src/components/listbox/listboxOption.vue +0 -37
- package/src/components/menu/menu.vue +0 -100
- package/src/components/menu/menuItem.vue +0 -86
- package/src/components/menu/menuItems.vue +0 -51
- package/src/components/popover/popover.vue +0 -68
- package/src/components/popover/popoverDialog.vue +0 -35
- package/src/components/tabs/tab.vue +0 -35
- package/src/components/tabs/tabContainer.vue +0 -50
- package/src/components/tabs/tabList.vue +0 -52
- package/src/components/tabs/tabPanel.vue +0 -36
- package/src/components/tooltip.vue +0 -115
- package/src/composables/formControl.ts +0 -144
- package/src/composables/list.ts +0 -326
- package/src/composables/listOption.ts +0 -80
- package/src/composables/popover.ts +0 -306
- package/src/main.ts +0 -65
- package/src/utils/element.ts +0 -19
- package/src/utils/id.ts +0 -5
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -27
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -28
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import type { ComputedRef, MaybeRef, Ref, ShallowRef, InjectionKey } from "vue";
|
|
2
|
+
import { TemplateRefOrSelector } from "../utils/element";
|
|
3
|
+
export type ItemValue = unknown;
|
|
4
|
+
export interface Item {
|
|
5
|
+
id: number;
|
|
6
|
+
element: Ref<HTMLElement | null>;
|
|
7
|
+
value: ItemValue;
|
|
8
|
+
disabled: MaybeRef<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export interface ActivationOptions {
|
|
11
|
+
/**
|
|
12
|
+
* Focus the corresponding HTML element
|
|
13
|
+
*
|
|
14
|
+
* @defaultValue `false`
|
|
15
|
+
*/
|
|
16
|
+
focus?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface NavigationOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Infinitely cycle through the items
|
|
21
|
+
*
|
|
22
|
+
* @defaultValue `false`
|
|
23
|
+
*/
|
|
24
|
+
loop?: boolean;
|
|
25
|
+
}
|
|
26
|
+
export interface UseListReturn {
|
|
27
|
+
/**
|
|
28
|
+
* Array of items
|
|
29
|
+
*/
|
|
30
|
+
items: Readonly<ShallowRef<Item[]>>;
|
|
31
|
+
/**
|
|
32
|
+
* Multiselection flag
|
|
33
|
+
*/
|
|
34
|
+
isMultiselectable: Readonly<Ref<boolean>>;
|
|
35
|
+
/**
|
|
36
|
+
* Currently active item
|
|
37
|
+
*/
|
|
38
|
+
activeItem: ComputedRef<Item | undefined>;
|
|
39
|
+
/**
|
|
40
|
+
* Select the currently active item
|
|
41
|
+
*/
|
|
42
|
+
selectActiveItem: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Activate the currently selected item
|
|
45
|
+
*/
|
|
46
|
+
activateSelectedItem: (options?: ActivationOptions) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Activate the first item
|
|
49
|
+
*/
|
|
50
|
+
activateFirstItem: (options?: ActivationOptions) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Activate the last item
|
|
53
|
+
*/
|
|
54
|
+
activateLastItem: (options?: ActivationOptions) => void;
|
|
55
|
+
/**
|
|
56
|
+
* Activate next item
|
|
57
|
+
*/
|
|
58
|
+
activateNextItem: (options?: ActivationOptions & NavigationOptions) => void;
|
|
59
|
+
/**
|
|
60
|
+
* Activate previous item
|
|
61
|
+
*/
|
|
62
|
+
activatePrevItem: (options?: ActivationOptions & NavigationOptions) => void;
|
|
63
|
+
}
|
|
64
|
+
interface UseListInjectionKey {
|
|
65
|
+
/**
|
|
66
|
+
* The list value
|
|
67
|
+
*/
|
|
68
|
+
value: Readonly<Ref<unknown>>;
|
|
69
|
+
/**
|
|
70
|
+
* Select an item by ID
|
|
71
|
+
*/
|
|
72
|
+
selectItem: (itemId: number) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Activate an item by ID
|
|
75
|
+
*/
|
|
76
|
+
activateItem: (itemId: number, options?: ActivationOptions) => void;
|
|
77
|
+
/**
|
|
78
|
+
* Deactivates the currently active item
|
|
79
|
+
*/
|
|
80
|
+
deactivateItem: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Check if an item is selected
|
|
83
|
+
*/
|
|
84
|
+
isSelected: (itemId: number) => boolean;
|
|
85
|
+
/**
|
|
86
|
+
* Check if an item is active
|
|
87
|
+
*/
|
|
88
|
+
isActive: (itemId: number) => boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Add an item to the list
|
|
91
|
+
*
|
|
92
|
+
* @returns New item ID
|
|
93
|
+
*/
|
|
94
|
+
addItem: (itemEl: TemplateRefOrSelector, itemVal: ItemValue, disabled?: MaybeRef<boolean>) => number;
|
|
95
|
+
/**
|
|
96
|
+
* Remove an item from the list by ID
|
|
97
|
+
*/
|
|
98
|
+
removeItem: (itemId: number) => void;
|
|
99
|
+
}
|
|
100
|
+
export declare const injectList: InjectionKey<UseListInjectionKey>;
|
|
101
|
+
/**
|
|
102
|
+
* Creates a reactive list of HTML elements with assigned values.
|
|
103
|
+
*
|
|
104
|
+
* @param value A ref to store the list value. Set to an array to enable multiselection.
|
|
105
|
+
*/
|
|
106
|
+
export declare function useList(value: Ref<unknown>): UseListReturn;
|
|
107
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComputedRef, MaybeRef } from "vue";
|
|
2
|
+
import type { TemplateRefOrSelector } from "../utils/element";
|
|
3
|
+
import type { ItemValue, ActivationOptions } from "./list";
|
|
4
|
+
interface UseListOptionReturn {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the item is selected
|
|
7
|
+
*/
|
|
8
|
+
isSelected: ComputedRef<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Whether the item is active
|
|
11
|
+
*/
|
|
12
|
+
isActive: ComputedRef<boolean>;
|
|
13
|
+
/**
|
|
14
|
+
* Select the item
|
|
15
|
+
*/
|
|
16
|
+
select: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Activate the item
|
|
19
|
+
*/
|
|
20
|
+
activate: (options?: ActivationOptions) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Deactivate the item
|
|
23
|
+
*/
|
|
24
|
+
deactivate: () => void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Registers an HTML element and an associated value in the list created in the parent component
|
|
28
|
+
*
|
|
29
|
+
* @param el A template ref or a CSS selector
|
|
30
|
+
* @param value A value of any type
|
|
31
|
+
* @param disabled Whether the item is disabled (false by default)
|
|
32
|
+
*/
|
|
33
|
+
export declare function useListOption(el: TemplateRefOrSelector, value: ItemValue, disabled?: MaybeRef<boolean>): UseListOptionReturn;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import { TemplateRefOrSelector } from "../utils/element";
|
|
3
|
+
interface UsePopoverOptions {
|
|
4
|
+
/**
|
|
5
|
+
* The direction of the popover dialog
|
|
6
|
+
*
|
|
7
|
+
* @defaultValue `"down"`
|
|
8
|
+
*/
|
|
9
|
+
direction?: "up" | "down" | "left" | "right";
|
|
10
|
+
/**
|
|
11
|
+
* The alignment of the popover dialog
|
|
12
|
+
*
|
|
13
|
+
* @defaultValue `"left"`
|
|
14
|
+
*/
|
|
15
|
+
align?: "top" | "bottom" | "left" | "right" | "center" | "stretch";
|
|
16
|
+
/**
|
|
17
|
+
* The CSS position of the popover dialog
|
|
18
|
+
*
|
|
19
|
+
* @defaultValue `"fixed"`
|
|
20
|
+
*/
|
|
21
|
+
position?: "fixed" | "absolute";
|
|
22
|
+
/**
|
|
23
|
+
* Close the popover on a click outside of the dialog
|
|
24
|
+
*
|
|
25
|
+
* @defaultValue `true`
|
|
26
|
+
*/
|
|
27
|
+
closeOnOutsideClick?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Close the popover on a click inside of the dialog
|
|
30
|
+
*
|
|
31
|
+
* @defaultValue `false`
|
|
32
|
+
*/
|
|
33
|
+
closeOnInsideClick?: boolean;
|
|
34
|
+
}
|
|
35
|
+
interface FocusOptions {
|
|
36
|
+
/**
|
|
37
|
+
* Focus the popover/activator
|
|
38
|
+
*
|
|
39
|
+
* @defaultValue `true`
|
|
40
|
+
*/
|
|
41
|
+
focus?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface UsePopoverReturn {
|
|
44
|
+
/**
|
|
45
|
+
* The popover state
|
|
46
|
+
*/
|
|
47
|
+
isOpen: Ref<boolean>;
|
|
48
|
+
/**
|
|
49
|
+
* Open the popover
|
|
50
|
+
*/
|
|
51
|
+
open: (options?: FocusOptions) => void;
|
|
52
|
+
/**
|
|
53
|
+
* Close the popover
|
|
54
|
+
*/
|
|
55
|
+
close: (options?: FocusOptions) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Toggle the popover
|
|
58
|
+
*/
|
|
59
|
+
toggle: (options?: FocusOptions) => void;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @param activatorEl A template ref or a CSS selector
|
|
64
|
+
* @param popupEl A template ref or a CSS selector
|
|
65
|
+
* @param options Popover options
|
|
66
|
+
*/
|
|
67
|
+
export declare function usePopover(activatorEl: TemplateRefOrSelector, popupEl: TemplateRefOrSelector, { direction, align, position, closeOnOutsideClick, closeOnInsideClick, }?: UsePopoverOptions): UsePopoverReturn;
|
|
68
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { usePopover } from "./composables/popover";
|
|
2
|
+
export { useList } from "./composables/list";
|
|
3
|
+
export { useListOption } from "./composables/listOption";
|
|
4
|
+
export { useFormControl } from "./composables/formControl";
|
|
5
|
+
export { useHTMLElement } from "./utils/element";
|
|
6
|
+
export * from "./components/injectionKeys";
|
|
7
|
+
export { default as Listbox } from "./components/listbox/listbox.vue";
|
|
8
|
+
export { default as ListboxOption } from "./components/listbox/listboxOption.vue";
|
|
9
|
+
export { default as TabContainer } from "./components/tabs/tabContainer.vue";
|
|
10
|
+
export { default as TabList } from "./components/tabs/tabList.vue";
|
|
11
|
+
export { default as Tab } from "./components/tabs/tab.vue";
|
|
12
|
+
export { default as TabPanel } from "./components/tabs/tabPanel.vue";
|
|
13
|
+
export { default as Popover } from "./components/popover/popover.vue";
|
|
14
|
+
export { default as PopoverDialog } from "./components/popover/popoverDialog.vue";
|
|
15
|
+
export { default as Tooltip } from "./components/tooltip.vue";
|
|
16
|
+
export { default as Menu } from "./components/menu/menu.vue";
|
|
17
|
+
export { default as MenuItems } from "./components/menu/menuItems.vue";
|
|
18
|
+
export { default as MenuItem } from "./components/menu/menuItem.vue";
|
|
19
|
+
export { default as Combobox } from "./components/combobox/combobox.vue";
|
|
20
|
+
export { default as ComboboxInput } from "./components/combobox/comboboxInput.vue";
|
|
21
|
+
export { default as ComboboxOptions } from "./components/combobox/comboboxOptions.vue";
|
|
22
|
+
export { default as ComboboxOption } from "./components/combobox/comboboxOption.vue";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
export type TemplateRefOrSelector<E extends HTMLElement = HTMLElement> = Ref<E | null> | E | string;
|
|
3
|
+
export declare function useHTMLElement<E extends HTMLElement = HTMLElement>(el: TemplateRefOrSelector<E>): Ref<E | null, E | null> | ([E | null] extends [Ref<any, any>] ? import("@vue/shared").IfAny<Ref<any, any> & E, Ref<Ref<any, any> & E, Ref<any, any> & E>, Ref<any, any> & E> : Ref<import("vue").UnwrapRef<E> | null, E | import("vue").UnwrapRef<E> | null>);
|
package/package.json
CHANGED
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-composable-ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"repository":
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/dzapletin/vue-composable-ui.git"
|
|
8
|
+
},
|
|
6
9
|
"main": "./dist/composable-ui.umd.cjs",
|
|
7
10
|
"module": "./dist/composable-ui.js",
|
|
8
11
|
"exports": {
|
|
9
12
|
".": {
|
|
10
|
-
"import":
|
|
11
|
-
|
|
13
|
+
"import": {
|
|
14
|
+
"types": "./dist/types/main.d.ts",
|
|
15
|
+
"default": "./dist/composable-ui.js"
|
|
16
|
+
},
|
|
17
|
+
"require": {
|
|
18
|
+
"types": "./dist/types/main.d.ts",
|
|
19
|
+
"default": "./dist/composable-ui.umd.cjs"
|
|
20
|
+
}
|
|
12
21
|
}
|
|
13
22
|
},
|
|
14
23
|
"types": "./dist/types/main.d.ts",
|
|
@@ -18,18 +27,25 @@
|
|
|
18
27
|
"preview": "vite preview",
|
|
19
28
|
"docs:dev": "vitepress dev docs",
|
|
20
29
|
"docs:build": "vitepress build docs",
|
|
21
|
-
"docs:preview": "vitepress preview docs"
|
|
30
|
+
"docs:preview": "vitepress preview docs",
|
|
31
|
+
"release": "release-it"
|
|
22
32
|
},
|
|
23
|
-
"
|
|
24
|
-
"
|
|
33
|
+
"files": [
|
|
34
|
+
"dist"
|
|
35
|
+
],
|
|
36
|
+
"peerDependencies": {
|
|
37
|
+
"vue": "^3.5.12"
|
|
25
38
|
},
|
|
26
39
|
"devDependencies": {
|
|
27
|
-
"@types/node": "^
|
|
28
|
-
"@vitejs/plugin-vue": "^
|
|
40
|
+
"@types/node": "^24.1.0",
|
|
41
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
42
|
+
"glob": "^11.0.2",
|
|
43
|
+
"release-it": "^19.0.4",
|
|
29
44
|
"sass": "^1.69.5",
|
|
30
45
|
"typescript": "^5.0.2",
|
|
31
|
-
"vite": "^
|
|
32
|
-
"vitepress": "^1.
|
|
33
|
-
"vue
|
|
46
|
+
"vite": "^7.0.6",
|
|
47
|
+
"vitepress": "^1.6.4",
|
|
48
|
+
"vue": "^3.5.12",
|
|
49
|
+
"vue-tsc": "^3.0.5"
|
|
34
50
|
}
|
|
35
51
|
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
name: Publish Package to npmjs
|
|
2
|
-
on:
|
|
3
|
-
release:
|
|
4
|
-
types: [published]
|
|
5
|
-
jobs:
|
|
6
|
-
build:
|
|
7
|
-
runs-on: ubuntu-latest
|
|
8
|
-
permissions:
|
|
9
|
-
contents: read
|
|
10
|
-
id-token: write
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v4
|
|
13
|
-
# Setup .npmrc file to publish to npm
|
|
14
|
-
- uses: actions/setup-node@v4
|
|
15
|
-
with:
|
|
16
|
-
node-version: "20.x"
|
|
17
|
-
registry-url: "https://registry.npmjs.org"
|
|
18
|
-
- run: npm ci
|
|
19
|
-
- run: npm publish --provenance --access public
|
|
20
|
-
env:
|
|
21
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
name: Deploy Docs to Pages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
|
|
5
|
-
# using the `master` branch as the default branch.
|
|
6
|
-
push:
|
|
7
|
-
branches: [main]
|
|
8
|
-
|
|
9
|
-
# Allows you to run this workflow manually from the Actions tab
|
|
10
|
-
workflow_dispatch:
|
|
11
|
-
|
|
12
|
-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
pages: write
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
19
|
-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
20
|
-
concurrency:
|
|
21
|
-
group: pages
|
|
22
|
-
cancel-in-progress: false
|
|
23
|
-
|
|
24
|
-
jobs:
|
|
25
|
-
# Build job
|
|
26
|
-
build:
|
|
27
|
-
runs-on: ubuntu-latest
|
|
28
|
-
steps:
|
|
29
|
-
- name: Checkout
|
|
30
|
-
uses: actions/checkout@v4
|
|
31
|
-
with:
|
|
32
|
-
fetch-depth: 0 # Not needed if lastUpdated is not enabled
|
|
33
|
-
# - uses: pnpm/action-setup@v3 # Uncomment this if you're using pnpm
|
|
34
|
-
# - uses: oven-sh/setup-bun@v1 # Uncomment this if you're using Bun
|
|
35
|
-
- name: Setup Node
|
|
36
|
-
uses: actions/setup-node@v4
|
|
37
|
-
with:
|
|
38
|
-
node-version: 20
|
|
39
|
-
cache: npm # or pnpm / yarn
|
|
40
|
-
- name: Setup Pages
|
|
41
|
-
uses: actions/configure-pages@v4
|
|
42
|
-
- name: Install dependencies
|
|
43
|
-
run: npm ci # or pnpm install / yarn install / bun install
|
|
44
|
-
- name: Build with VitePress
|
|
45
|
-
run: npm run docs:build # or pnpm docs:build / yarn docs:build / bun run docs:build
|
|
46
|
-
- name: Upload artifact
|
|
47
|
-
uses: actions/upload-pages-artifact@v3
|
|
48
|
-
with:
|
|
49
|
-
path: docs/.vitepress/dist
|
|
50
|
-
|
|
51
|
-
# Deployment job
|
|
52
|
-
deploy:
|
|
53
|
-
environment:
|
|
54
|
-
name: github-pages
|
|
55
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
56
|
-
needs: build
|
|
57
|
-
runs-on: ubuntu-latest
|
|
58
|
-
name: Deploy
|
|
59
|
-
steps:
|
|
60
|
-
- name: Deploy to GitHub Pages
|
|
61
|
-
id: deployment
|
|
62
|
-
uses: actions/deploy-pages@v4
|
package/.vscode/extensions.json
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vitepress";
|
|
2
|
-
|
|
3
|
-
// https://vitepress.dev/reference/site-config
|
|
4
|
-
export default defineConfig({
|
|
5
|
-
title: "Vue Composable UI",
|
|
6
|
-
description: "A truly headless UI framework",
|
|
7
|
-
base: "/vue-composable-ui/",
|
|
8
|
-
themeConfig: {
|
|
9
|
-
// https://vitepress.dev/reference/default-theme-config
|
|
10
|
-
nav: [{ text: "Home", link: "/" }],
|
|
11
|
-
|
|
12
|
-
sidebar: [
|
|
13
|
-
{
|
|
14
|
-
text: "Composables",
|
|
15
|
-
items: [
|
|
16
|
-
{ text: "useList", link: "/composables/list" },
|
|
17
|
-
{ text: "useListOption", link: "/composables/list-option" },
|
|
18
|
-
{ text: "usePopover", link: "/composables/popover" },
|
|
19
|
-
{ text: "useFormControl", link: "/composables/form-control" },
|
|
20
|
-
],
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
text: "Components",
|
|
24
|
-
items: [
|
|
25
|
-
{ text: "Listbox", link: "/components/listbox" },
|
|
26
|
-
{ text: "Tabs", link: "/components/tabs" },
|
|
27
|
-
{ text: "Popover", link: "/components/popover" },
|
|
28
|
-
{ text: "Tooltip", link: "/components/tooltip" },
|
|
29
|
-
{ text: "Menu", link: "/components/menu" },
|
|
30
|
-
{ text: "Combobox", link: "/components/combobox" },
|
|
31
|
-
],
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
|
|
35
|
-
socialLinks: [
|
|
36
|
-
{ icon: "github", link: "https://github.com/dzapletin/vue-composable-ui" },
|
|
37
|
-
],
|
|
38
|
-
},
|
|
39
|
-
lastUpdated: true,
|
|
40
|
-
});
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
.d-demo {
|
|
2
|
-
display: flex;
|
|
3
|
-
gap: 1rem;
|
|
4
|
-
flex-wrap: wrap;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
justify-items: stretch;
|
|
7
|
-
position: relative;
|
|
8
|
-
border-radius: 1rem;
|
|
9
|
-
padding: 5rem;
|
|
10
|
-
background: linear-gradient(90deg, #e3ffe7 0%, #d9e7ff 100%);
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
|
|
13
|
-
&__column {
|
|
14
|
-
flex-grow: 1;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
h5 {
|
|
18
|
-
font-weight: 600;
|
|
19
|
-
line-height: 24px;
|
|
20
|
-
font-size: 16px;
|
|
21
|
-
margin-bottom: 0.5rem;
|
|
22
|
-
color: black;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.d-demo [tabindex]:not([tabindex="-1"]):focus {
|
|
27
|
-
outline: 3px solid DeepPink;
|
|
28
|
-
outline-offset: 2px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.d-pointer {
|
|
32
|
-
cursor: pointer;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.d-btn {
|
|
36
|
-
padding: 0.375rem 0.75rem;
|
|
37
|
-
border-radius: 0.25rem;
|
|
38
|
-
font-size: 1rem;
|
|
39
|
-
line-height: 1.5;
|
|
40
|
-
border: 1px solid transparent;
|
|
41
|
-
background-color: #6267ec;
|
|
42
|
-
color: white;
|
|
43
|
-
|
|
44
|
-
&:hover {
|
|
45
|
-
background-color: #5047e0;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.d-tooltip {
|
|
50
|
-
background-color: rgba($color: #000, $alpha: 0.8);
|
|
51
|
-
color: white;
|
|
52
|
-
border-radius: 0.25rem;
|
|
53
|
-
padding: 0.25rem 0.5rem;
|
|
54
|
-
margin: 0.5rem 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.d-popover {
|
|
58
|
-
z-index: 20;
|
|
59
|
-
outline: none;
|
|
60
|
-
padding: 1rem;
|
|
61
|
-
background: white;
|
|
62
|
-
color: black;
|
|
63
|
-
border-radius: 0.5rem;
|
|
64
|
-
box-shadow: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12);
|
|
65
|
-
margin: 0.5rem 0;
|
|
66
|
-
|
|
67
|
-
&--h {
|
|
68
|
-
margin: 0 0.5rem;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.d-menu {
|
|
73
|
-
@extend .d-popover;
|
|
74
|
-
padding: 0.25rem;
|
|
75
|
-
margin: 0.25rem 0;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.d-menu-item {
|
|
79
|
-
display: flex;
|
|
80
|
-
gap: 0.5rem;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: space-between;
|
|
83
|
-
padding: 0.25rem 0.5rem;
|
|
84
|
-
outline: none;
|
|
85
|
-
border-radius: 0.25rem;
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
user-select: none;
|
|
88
|
-
&[aria-disabled="true"] {
|
|
89
|
-
color: gray;
|
|
90
|
-
cursor: default;
|
|
91
|
-
}
|
|
92
|
-
&[data-active="true"] {
|
|
93
|
-
background-color: #6267ec;
|
|
94
|
-
color: white;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.d-input {
|
|
99
|
-
padding: 0.375rem 0.75rem;
|
|
100
|
-
border-radius: 0.25rem;
|
|
101
|
-
background: white;
|
|
102
|
-
border: 1px solid #d1d5da;
|
|
103
|
-
outline: none;
|
|
104
|
-
width: 100%;
|
|
105
|
-
max-width: 100%;
|
|
106
|
-
color: black;
|
|
107
|
-
&:focus {
|
|
108
|
-
border-color: #6267ec;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
&--select {
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
position: relative;
|
|
114
|
-
&::after {
|
|
115
|
-
content: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGZpbGw9Im5vbmUiIHN0cm9rZT0iY3VycmVudENvbG9yIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIHN0cm9rZS13aWR0aD0iMS41IiBkPSJNOC4yNSAxNUwxMiAxOC43NUwxNS43NSAxNW0tNy41LTZMMTIgNS4yNUwxNS43NSA5Ii8+PC9zdmc+");
|
|
116
|
-
position: absolute;
|
|
117
|
-
right: 0;
|
|
118
|
-
top: 0;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
.d-combobox {
|
|
124
|
-
@extend .d-input;
|
|
125
|
-
padding: 0.25rem;
|
|
126
|
-
display: flex;
|
|
127
|
-
gap: 0.25rem;
|
|
128
|
-
|
|
129
|
-
&__tags {
|
|
130
|
-
display: flex;
|
|
131
|
-
gap: 0.25rem;
|
|
132
|
-
align-items: center;
|
|
133
|
-
color: gray;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
input {
|
|
137
|
-
flex-grow: 1;
|
|
138
|
-
width: 100%;
|
|
139
|
-
padding: 0.125rem 0.5rem;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.d-tag {
|
|
144
|
-
background-color: #6267ec;
|
|
145
|
-
color: white;
|
|
146
|
-
border-radius: 0.25rem;
|
|
147
|
-
padding: 0.125rem 0.5rem;
|
|
148
|
-
white-space: nowrap;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.d-no-options {
|
|
152
|
-
padding: 0.25rem 0.5rem;
|
|
153
|
-
text-align: center;
|
|
154
|
-
color: gray;
|
|
155
|
-
}
|