@skewedaspect/sleekspace-ui 0.6.0 → 0.7.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/ColorPicker/SkColorPicker.vue.d.ts +29 -0
- package/dist/components/ColorPicker/index.d.ts +2 -0
- package/dist/components/ColorPicker/types.d.ts +4 -0
- package/dist/components/ContextMenu/SkContextMenu.vue.d.ts +25 -0
- package/dist/components/ContextMenu/SkContextMenuCheckboxItem.vue.d.ts +28 -0
- package/dist/components/ContextMenu/SkContextMenuItem.vue.d.ts +26 -0
- package/dist/components/ContextMenu/SkContextMenuLabel.vue.d.ts +17 -0
- package/dist/components/ContextMenu/SkContextMenuRadioGroup.vue.d.ts +26 -0
- package/dist/components/ContextMenu/SkContextMenuRadioItem.vue.d.ts +23 -0
- package/dist/components/ContextMenu/SkContextMenuSeparator.vue.d.ts +2 -0
- package/dist/components/ContextMenu/SkContextMenuSubmenu.vue.d.ts +24 -0
- package/dist/components/ContextMenu/index.d.ts +9 -0
- package/dist/components/ContextMenu/types.d.ts +2 -0
- package/dist/components/Dropdown/SkDropdown.vue.d.ts +1 -1
- package/dist/components/Dropdown/SkDropdownCheckboxItem.vue.d.ts +28 -0
- package/dist/components/Dropdown/SkDropdownMenuLabel.vue.d.ts +17 -0
- package/dist/components/Dropdown/SkDropdownRadioGroup.vue.d.ts +26 -0
- package/dist/components/Dropdown/SkDropdownRadioItem.vue.d.ts +23 -0
- package/dist/components/Dropdown/index.d.ts +4 -0
- package/dist/components/Popover/SkPopover.vue.d.ts +1 -1
- package/dist/components/ScrollArea/SkScrollArea.vue.d.ts +31 -0
- package/dist/components/ScrollArea/index.d.ts +2 -0
- package/dist/components/ScrollArea/types.d.ts +4 -0
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +1 -1
- package/dist/components/Skeleton/SkSkeleton.vue.d.ts +1 -1
- package/dist/components/Splitter/SkSplitter.vue.d.ts +29 -0
- package/dist/components/Splitter/SkSplitterHandle.vue.d.ts +7 -0
- package/dist/components/Splitter/SkSplitterPanel.vue.d.ts +30 -0
- package/dist/components/Splitter/index.d.ts +4 -0
- package/dist/components/Splitter/types.d.ts +3 -0
- package/dist/components/Toolbar/SkToolbar.vue.d.ts +31 -0
- package/dist/components/Toolbar/SkToolbarButton.vue.d.ts +22 -0
- package/dist/components/Toolbar/SkToolbarSeparator.vue.d.ts +2 -0
- package/dist/components/Toolbar/SkToolbarToggleGroup.vue.d.ts +31 -0
- package/dist/components/Toolbar/SkToolbarToggleItem.vue.d.ts +23 -0
- package/dist/components/Toolbar/index.d.ts +6 -0
- package/dist/components/Toolbar/types.d.ts +5 -0
- package/dist/components/Tooltip/SkTooltip.vue.d.ts +1 -1
- package/dist/components/TreeView/SkTreeItem.vue.d.ts +39 -0
- package/dist/components/TreeView/SkTreeView.vue.d.ts +31 -0
- package/dist/components/TreeView/index.d.ts +3 -0
- package/dist/components/TreeView/types.d.ts +3 -0
- package/dist/index.d.ts +54 -0
- package/dist/sleekspace-ui.css +1215 -46
- package/dist/sleekspace-ui.es.js +16874 -7224
- package/dist/sleekspace-ui.umd.js +16855 -7205
- package/package.json +2 -1
- package/src/components/ColorPicker/SkColorPicker.vue +355 -0
- package/src/components/ColorPicker/index.ts +6 -0
- package/src/components/ColorPicker/types.ts +11 -0
- package/src/components/ContextMenu/SkContextMenu.vue +83 -0
- package/src/components/ContextMenu/SkContextMenuCheckboxItem.vue +72 -0
- package/src/components/ContextMenu/SkContextMenuItem.vue +49 -0
- package/src/components/ContextMenu/SkContextMenuLabel.vue +17 -0
- package/src/components/ContextMenu/SkContextMenuRadioGroup.vue +36 -0
- package/src/components/ContextMenu/SkContextMenuRadioItem.vue +53 -0
- package/src/components/ContextMenu/SkContextMenuSeparator.vue +21 -0
- package/src/components/ContextMenu/SkContextMenuSubmenu.vue +94 -0
- package/src/components/ContextMenu/index.ts +15 -0
- package/src/components/ContextMenu/types.ts +9 -0
- package/src/components/Dropdown/SkDropdown.vue +1 -1
- package/src/components/Dropdown/SkDropdownCheckboxItem.vue +72 -0
- package/src/components/Dropdown/SkDropdownMenuItem.vue +1 -1
- package/src/components/Dropdown/SkDropdownMenuLabel.vue +17 -0
- package/src/components/Dropdown/SkDropdownRadioGroup.vue +36 -0
- package/src/components/Dropdown/SkDropdownRadioItem.vue +53 -0
- package/src/components/Dropdown/SkDropdownSubmenu.vue +2 -2
- package/src/components/Dropdown/index.ts +4 -0
- package/src/components/ScrollArea/SkScrollArea.vue +87 -0
- package/src/components/ScrollArea/index.ts +8 -0
- package/src/components/ScrollArea/types.ts +11 -0
- package/src/components/Splitter/SkSplitter.vue +65 -0
- package/src/components/Splitter/SkSplitterHandle.vue +40 -0
- package/src/components/Splitter/SkSplitterPanel.vue +45 -0
- package/src/components/Splitter/index.ts +10 -0
- package/src/components/Splitter/types.ts +10 -0
- package/src/components/Toolbar/SkToolbar.vue +69 -0
- package/src/components/Toolbar/SkToolbarButton.vue +36 -0
- package/src/components/Toolbar/SkToolbarSeparator.vue +15 -0
- package/src/components/Toolbar/SkToolbarToggleGroup.vue +49 -0
- package/src/components/Toolbar/SkToolbarToggleItem.vue +37 -0
- package/src/components/Toolbar/index.ts +12 -0
- package/src/components/Toolbar/types.ts +12 -0
- package/src/components/TreeView/SkTreeItem.vue +84 -0
- package/src/components/TreeView/SkTreeView.vue +120 -0
- package/src/components/TreeView/index.ts +9 -0
- package/src/components/TreeView/types.ts +10 -0
- package/src/global.d.ts +20 -0
- package/src/index.ts +100 -0
- package/src/styles/components/_color-picker.scss +552 -0
- package/src/styles/components/_index.scss +5 -0
- package/src/styles/components/_menu.scss +52 -3
- package/src/styles/components/_scroll-area.scss +120 -0
- package/src/styles/components/_slider.scss +4 -4
- package/src/styles/components/_splitter.scss +136 -0
- package/src/styles/components/_toolbar.scss +296 -0
- package/src/styles/components/_tree-view.scss +187 -0
- package/web-types.json +1022 -122
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- ContextMenuRadioItem Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<ContextMenuRadioItem
|
|
7
|
+
:class="classes"
|
|
8
|
+
:value="value"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
@select.prevent
|
|
11
|
+
>
|
|
12
|
+
<ContextMenuItemIndicator class="sk-menu-item-indicator">
|
|
13
|
+
<div class="sk-menu-radio-dot" />
|
|
14
|
+
</ContextMenuItemIndicator>
|
|
15
|
+
<slot />
|
|
16
|
+
</ContextMenuRadioItem>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
// Component styles are in /src/styles/components/_menu.scss
|
|
23
|
+
</style>
|
|
24
|
+
|
|
25
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { computed } from 'vue';
|
|
29
|
+
import { ContextMenuItemIndicator, ContextMenuRadioItem } from 'reka-ui';
|
|
30
|
+
|
|
31
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
export interface SkContextMenuRadioItemComponentProps
|
|
34
|
+
{
|
|
35
|
+
value : string;
|
|
36
|
+
disabled ?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
withDefaults(defineProps<SkContextMenuRadioItemComponentProps>(), {
|
|
42
|
+
disabled: false,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
const classes = computed(() => ({
|
|
48
|
+
'sk-menu-item': true,
|
|
49
|
+
'sk-menu-radio-item': true,
|
|
50
|
+
}));
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- ContextMenuSeparator Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<ContextMenuSeparator class="sk-menu-separator" />
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
10
|
+
|
|
11
|
+
<style lang="scss" scoped>
|
|
12
|
+
// Component styles are in /src/styles/components/_menu.scss
|
|
13
|
+
</style>
|
|
14
|
+
|
|
15
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { ContextMenuSeparator } from 'reka-ui';
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- ContextMenuSubmenu Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<ContextMenuSub>
|
|
7
|
+
<ContextMenuSubTrigger :class="triggerClasses">
|
|
8
|
+
{{ triggerText }}
|
|
9
|
+
<svg
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
stroke="currentColor"
|
|
14
|
+
stroke-width="2"
|
|
15
|
+
stroke-linecap="square"
|
|
16
|
+
stroke-linejoin="miter"
|
|
17
|
+
class="sk-submenu-caret"
|
|
18
|
+
>
|
|
19
|
+
<polyline points="9 6 15 12 9 18" />
|
|
20
|
+
</svg>
|
|
21
|
+
</ContextMenuSubTrigger>
|
|
22
|
+
<ContextMenuPortal>
|
|
23
|
+
<ContextMenuSubContent
|
|
24
|
+
:data-scheme="theme"
|
|
25
|
+
:class="contentClasses"
|
|
26
|
+
>
|
|
27
|
+
<slot />
|
|
28
|
+
</ContextMenuSubContent>
|
|
29
|
+
</ContextMenuPortal>
|
|
30
|
+
</ContextMenuSub>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
34
|
+
|
|
35
|
+
<style lang="scss" scoped>
|
|
36
|
+
// Component styles use shared menu styles from /src/styles/components/_menu.scss
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
40
|
+
|
|
41
|
+
<script setup lang="ts">
|
|
42
|
+
import { computed, inject } from 'vue';
|
|
43
|
+
import {
|
|
44
|
+
ContextMenuPortal,
|
|
45
|
+
ContextMenuSub,
|
|
46
|
+
ContextMenuSubContent,
|
|
47
|
+
ContextMenuSubTrigger,
|
|
48
|
+
} from 'reka-ui';
|
|
49
|
+
|
|
50
|
+
// Types
|
|
51
|
+
import type { SkContextMenuKind } from './types';
|
|
52
|
+
|
|
53
|
+
// Composables
|
|
54
|
+
import { usePortalContext } from '@/composables/usePortalContext';
|
|
55
|
+
|
|
56
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
57
|
+
|
|
58
|
+
export interface SkContextMenuSubmenuComponentProps
|
|
59
|
+
{
|
|
60
|
+
triggerText : string;
|
|
61
|
+
kind ?: SkContextMenuKind;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
const props = withDefaults(defineProps<SkContextMenuSubmenuComponentProps>(), {
|
|
67
|
+
kind: undefined,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
71
|
+
|
|
72
|
+
const { theme } = usePortalContext();
|
|
73
|
+
|
|
74
|
+
const parentKind = inject<any>('context-menu-kind', computed(() => 'neutral'));
|
|
75
|
+
|
|
76
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
77
|
+
|
|
78
|
+
const effectiveKind = computed(() => props.kind || parentKind.value || 'neutral');
|
|
79
|
+
|
|
80
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
81
|
+
|
|
82
|
+
const triggerClasses = computed(() => ({
|
|
83
|
+
'sk-menu-item': true,
|
|
84
|
+
}));
|
|
85
|
+
|
|
86
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
87
|
+
|
|
88
|
+
const contentClasses = computed(() => ({
|
|
89
|
+
'sk-menu-content': true,
|
|
90
|
+
[`sk-${ effectiveKind.value }`]: true,
|
|
91
|
+
}));
|
|
92
|
+
</script>
|
|
93
|
+
|
|
94
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
// ContextMenu Component Exports
|
|
3
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
export { default as SkContextMenu } from './SkContextMenu.vue';
|
|
6
|
+
export { default as SkContextMenuCheckboxItem } from './SkContextMenuCheckboxItem.vue';
|
|
7
|
+
export { default as SkContextMenuItem } from './SkContextMenuItem.vue';
|
|
8
|
+
export { default as SkContextMenuLabel } from './SkContextMenuLabel.vue';
|
|
9
|
+
export { default as SkContextMenuRadioGroup } from './SkContextMenuRadioGroup.vue';
|
|
10
|
+
export { default as SkContextMenuRadioItem } from './SkContextMenuRadioItem.vue';
|
|
11
|
+
export { default as SkContextMenuSeparator } from './SkContextMenuSeparator.vue';
|
|
12
|
+
export { default as SkContextMenuSubmenu } from './SkContextMenuSubmenu.vue';
|
|
13
|
+
export type { SkContextMenuKind } from './types';
|
|
14
|
+
|
|
15
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
// ContextMenu Component Types
|
|
3
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
import type { ComponentKind } from '@/types';
|
|
6
|
+
|
|
7
|
+
export type SkContextMenuKind = ComponentKind;
|
|
8
|
+
|
|
9
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
//------------------------------------------------------------------------------------------------------------------
|
|
178
178
|
|
|
179
179
|
const classes = computed(() => ({
|
|
180
|
-
'sk-
|
|
180
|
+
'sk-menu-content': true,
|
|
181
181
|
[`sk-${ props.kind }`]: true,
|
|
182
182
|
}));
|
|
183
183
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- DropdownCheckboxItem Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<DropdownMenuCheckboxItem
|
|
7
|
+
:class="classes"
|
|
8
|
+
:model-value="modelValue"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
@update:model-value="$emit('update:modelValue', $event)"
|
|
11
|
+
@select.prevent
|
|
12
|
+
>
|
|
13
|
+
<DropdownMenuItemIndicator class="sk-menu-item-indicator">
|
|
14
|
+
<svg
|
|
15
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
fill="none"
|
|
18
|
+
stroke="currentColor"
|
|
19
|
+
stroke-width="3"
|
|
20
|
+
stroke-linecap="square"
|
|
21
|
+
stroke-linejoin="miter"
|
|
22
|
+
style="width: 0.875rem; height: 0.875rem;"
|
|
23
|
+
>
|
|
24
|
+
<polyline points="4 12 10 18 20 6" />
|
|
25
|
+
</svg>
|
|
26
|
+
</DropdownMenuItemIndicator>
|
|
27
|
+
<slot />
|
|
28
|
+
</DropdownMenuCheckboxItem>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
32
|
+
|
|
33
|
+
<style lang="scss" scoped>
|
|
34
|
+
// Component styles are in /src/styles/components/_menu.scss
|
|
35
|
+
</style>
|
|
36
|
+
|
|
37
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
38
|
+
|
|
39
|
+
<script setup lang="ts">
|
|
40
|
+
import { computed } from 'vue';
|
|
41
|
+
import { DropdownMenuCheckboxItem, DropdownMenuItemIndicator } from 'reka-ui';
|
|
42
|
+
|
|
43
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
44
|
+
|
|
45
|
+
export interface SkDropdownCheckboxItemComponentProps
|
|
46
|
+
{
|
|
47
|
+
modelValue ?: boolean;
|
|
48
|
+
disabled ?: boolean;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
52
|
+
|
|
53
|
+
withDefaults(defineProps<SkDropdownCheckboxItemComponentProps>(), {
|
|
54
|
+
modelValue: false,
|
|
55
|
+
disabled: false,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
59
|
+
|
|
60
|
+
defineEmits<{
|
|
61
|
+
'update:modelValue' : [value : boolean];
|
|
62
|
+
}>();
|
|
63
|
+
|
|
64
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
65
|
+
|
|
66
|
+
const classes = computed(() => ({
|
|
67
|
+
'sk-menu-item': true,
|
|
68
|
+
'sk-menu-checkbox-item': true,
|
|
69
|
+
}));
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- DropdownMenuLabel Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<DropdownMenuLabel class="sk-menu-label">
|
|
7
|
+
<slot />
|
|
8
|
+
</DropdownMenuLabel>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { DropdownMenuLabel } from 'reka-ui';
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- DropdownRadioGroup Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<DropdownMenuRadioGroup :model-value="modelValue" @update:model-value="$emit('update:modelValue', $event)">
|
|
7
|
+
<slot />
|
|
8
|
+
</DropdownMenuRadioGroup>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { DropdownMenuRadioGroup } from 'reka-ui';
|
|
15
|
+
|
|
16
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
export interface SkDropdownRadioGroupComponentProps
|
|
19
|
+
{
|
|
20
|
+
modelValue ?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
withDefaults(defineProps<SkDropdownRadioGroupComponentProps>(), {
|
|
26
|
+
modelValue: '',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
defineEmits<{
|
|
32
|
+
'update:modelValue' : [value : string];
|
|
33
|
+
}>();
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- DropdownRadioItem Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<DropdownMenuRadioItem
|
|
7
|
+
:class="classes"
|
|
8
|
+
:value="value"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
@select.prevent
|
|
11
|
+
>
|
|
12
|
+
<DropdownMenuItemIndicator class="sk-menu-item-indicator">
|
|
13
|
+
<div class="sk-menu-radio-dot" />
|
|
14
|
+
</DropdownMenuItemIndicator>
|
|
15
|
+
<slot />
|
|
16
|
+
</DropdownMenuRadioItem>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
20
|
+
|
|
21
|
+
<style lang="scss" scoped>
|
|
22
|
+
// Component styles are in /src/styles/components/_menu.scss
|
|
23
|
+
</style>
|
|
24
|
+
|
|
25
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
26
|
+
|
|
27
|
+
<script setup lang="ts">
|
|
28
|
+
import { computed } from 'vue';
|
|
29
|
+
import { DropdownMenuItemIndicator, DropdownMenuRadioItem } from 'reka-ui';
|
|
30
|
+
|
|
31
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
export interface SkDropdownRadioItemComponentProps
|
|
34
|
+
{
|
|
35
|
+
value : string;
|
|
36
|
+
disabled ?: boolean;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
withDefaults(defineProps<SkDropdownRadioItemComponentProps>(), {
|
|
42
|
+
disabled: false,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
46
|
+
|
|
47
|
+
const classes = computed(() => ({
|
|
48
|
+
'sk-menu-item': true,
|
|
49
|
+
'sk-menu-radio-item': true,
|
|
50
|
+
}));
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -115,13 +115,13 @@
|
|
|
115
115
|
//------------------------------------------------------------------------------------------------------------------
|
|
116
116
|
|
|
117
117
|
const triggerClasses = computed(() => ({
|
|
118
|
-
'sk-
|
|
118
|
+
'sk-menu-item': true,
|
|
119
119
|
}));
|
|
120
120
|
|
|
121
121
|
//------------------------------------------------------------------------------------------------------------------
|
|
122
122
|
|
|
123
123
|
const contentClasses = computed(() => ({
|
|
124
|
-
'sk-
|
|
124
|
+
'sk-menu-content': true,
|
|
125
125
|
[`sk-${ effectiveKind.value }`]: true,
|
|
126
126
|
}));
|
|
127
127
|
</script>
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
//----------------------------------------------------------------------------------------------------------------------
|
|
4
4
|
|
|
5
5
|
export { default as SkDropdown } from './SkDropdown.vue';
|
|
6
|
+
export { default as SkDropdownCheckboxItem } from './SkDropdownCheckboxItem.vue';
|
|
7
|
+
export { default as SkDropdownMenuLabel } from './SkDropdownMenuLabel.vue';
|
|
6
8
|
export { default as SkDropdownMenuItem } from './SkDropdownMenuItem.vue';
|
|
7
9
|
export { default as SkDropdownMenuSeparator } from './SkDropdownMenuSeparator.vue';
|
|
10
|
+
export { default as SkDropdownRadioGroup } from './SkDropdownRadioGroup.vue';
|
|
11
|
+
export { default as SkDropdownRadioItem } from './SkDropdownRadioItem.vue';
|
|
8
12
|
export { default as SkDropdownSubmenu } from './SkDropdownSubmenu.vue';
|
|
9
13
|
export type { SkDropdownAlign, SkDropdownKind, SkDropdownSide } from './types';
|
|
10
14
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- ScrollArea Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<ScrollAreaRoot :type="type" :class="classes" :style="customColorStyles">
|
|
7
|
+
<ScrollAreaViewport class="sk-scroll-area-viewport">
|
|
8
|
+
<slot />
|
|
9
|
+
</ScrollAreaViewport>
|
|
10
|
+
<ScrollAreaScrollbar
|
|
11
|
+
v-if="orientation !== 'horizontal'"
|
|
12
|
+
class="sk-scroll-area-scrollbar"
|
|
13
|
+
orientation="vertical"
|
|
14
|
+
>
|
|
15
|
+
<ScrollAreaThumb class="sk-scroll-area-thumb" />
|
|
16
|
+
</ScrollAreaScrollbar>
|
|
17
|
+
<ScrollAreaScrollbar
|
|
18
|
+
v-if="orientation !== 'vertical'"
|
|
19
|
+
class="sk-scroll-area-scrollbar"
|
|
20
|
+
orientation="horizontal"
|
|
21
|
+
>
|
|
22
|
+
<ScrollAreaThumb class="sk-scroll-area-thumb" />
|
|
23
|
+
</ScrollAreaScrollbar>
|
|
24
|
+
<ScrollAreaCorner v-if="orientation === 'both'" class="sk-scroll-area-corner" />
|
|
25
|
+
</ScrollAreaRoot>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
29
|
+
|
|
30
|
+
<style lang="scss" scoped>
|
|
31
|
+
// Component styles are in /src/styles/components/_scroll-area.scss
|
|
32
|
+
</style>
|
|
33
|
+
|
|
34
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
35
|
+
|
|
36
|
+
<script setup lang="ts">
|
|
37
|
+
import { computed, toRef } from 'vue';
|
|
38
|
+
import {
|
|
39
|
+
ScrollAreaCorner,
|
|
40
|
+
ScrollAreaRoot,
|
|
41
|
+
ScrollAreaScrollbar,
|
|
42
|
+
ScrollAreaThumb,
|
|
43
|
+
ScrollAreaViewport,
|
|
44
|
+
} from 'reka-ui';
|
|
45
|
+
|
|
46
|
+
// Types
|
|
47
|
+
import type { SkScrollAreaKind, SkScrollAreaOrientation, SkScrollAreaType } from './types';
|
|
48
|
+
|
|
49
|
+
// Composables
|
|
50
|
+
import { useCustomColors } from '@/composables/useCustomColors';
|
|
51
|
+
|
|
52
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
53
|
+
|
|
54
|
+
export interface SkScrollAreaComponentProps
|
|
55
|
+
{
|
|
56
|
+
type ?: SkScrollAreaType;
|
|
57
|
+
orientation ?: SkScrollAreaOrientation;
|
|
58
|
+
kind ?: SkScrollAreaKind;
|
|
59
|
+
baseColor ?: string;
|
|
60
|
+
textColor ?: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
const props = withDefaults(defineProps<SkScrollAreaComponentProps>(), {
|
|
66
|
+
type: 'hover',
|
|
67
|
+
orientation: 'vertical',
|
|
68
|
+
kind: 'neutral',
|
|
69
|
+
baseColor: undefined,
|
|
70
|
+
textColor: undefined,
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
const customColorStyles = useCustomColors(
|
|
76
|
+
'scroll-area',
|
|
77
|
+
toRef(() => props.baseColor),
|
|
78
|
+
toRef(() => props.textColor)
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
const classes = computed(() => ({
|
|
82
|
+
'sk-scroll-area': true,
|
|
83
|
+
[`sk-${ props.kind }`]: true,
|
|
84
|
+
}));
|
|
85
|
+
</script>
|
|
86
|
+
|
|
87
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
// ScrollArea Component Exports
|
|
3
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
export { default as SkScrollArea } from './SkScrollArea.vue';
|
|
6
|
+
export type { SkScrollAreaKind, SkScrollAreaOrientation, SkScrollAreaType } from './types';
|
|
7
|
+
|
|
8
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
// ScrollArea Component Types
|
|
3
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
4
|
+
|
|
5
|
+
import type { ComponentKind } from '@/types';
|
|
6
|
+
|
|
7
|
+
export type SkScrollAreaKind = ComponentKind;
|
|
8
|
+
export type SkScrollAreaType = 'auto' | 'always' | 'scroll' | 'hover';
|
|
9
|
+
export type SkScrollAreaOrientation = 'vertical' | 'horizontal' | 'both';
|
|
10
|
+
|
|
11
|
+
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- Splitter Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<SplitterGroup :direction="direction" :class="classes" :style="customColorStyles">
|
|
7
|
+
<slot />
|
|
8
|
+
</SplitterGroup>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
12
|
+
|
|
13
|
+
<style lang="scss" scoped>
|
|
14
|
+
// Component styles are in /src/styles/components/_splitter.scss
|
|
15
|
+
</style>
|
|
16
|
+
|
|
17
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { computed, provide, toRef } from 'vue';
|
|
21
|
+
import { SplitterGroup } from 'reka-ui';
|
|
22
|
+
|
|
23
|
+
// Types
|
|
24
|
+
import type { SkSplitterDirection, SkSplitterKind } from './types';
|
|
25
|
+
|
|
26
|
+
// Composables
|
|
27
|
+
import { useCustomColors } from '@/composables/useCustomColors';
|
|
28
|
+
|
|
29
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
export interface SkSplitterComponentProps
|
|
32
|
+
{
|
|
33
|
+
direction ?: SkSplitterDirection;
|
|
34
|
+
kind ?: SkSplitterKind;
|
|
35
|
+
baseColor ?: string;
|
|
36
|
+
textColor ?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
40
|
+
|
|
41
|
+
const props = withDefaults(defineProps<SkSplitterComponentProps>(), {
|
|
42
|
+
direction: 'horizontal',
|
|
43
|
+
kind: 'neutral',
|
|
44
|
+
baseColor: undefined,
|
|
45
|
+
textColor: undefined,
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
49
|
+
|
|
50
|
+
provide('splitter-kind', computed(() => props.kind));
|
|
51
|
+
|
|
52
|
+
const customColorStyles = useCustomColors(
|
|
53
|
+
'splitter',
|
|
54
|
+
toRef(() => props.baseColor),
|
|
55
|
+
toRef(() => props.textColor)
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const classes = computed(() => ({
|
|
59
|
+
'sk-splitter': true,
|
|
60
|
+
[`sk-${ props.kind }`]: true,
|
|
61
|
+
[`sk-${ props.direction }`]: true,
|
|
62
|
+
}));
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- SplitterHandle Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<SplitterResizeHandle class="sk-splitter-handle" :disabled="disabled">
|
|
7
|
+
<div class="sk-splitter-handle-grip">
|
|
8
|
+
<div class="sk-splitter-handle-dot" />
|
|
9
|
+
<div class="sk-splitter-handle-dot" />
|
|
10
|
+
<div class="sk-splitter-handle-dot" />
|
|
11
|
+
</div>
|
|
12
|
+
</SplitterResizeHandle>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
16
|
+
|
|
17
|
+
<style lang="scss" scoped>
|
|
18
|
+
// Component styles are in /src/styles/components/_splitter.scss
|
|
19
|
+
</style>
|
|
20
|
+
|
|
21
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
22
|
+
|
|
23
|
+
<script setup lang="ts">
|
|
24
|
+
import { SplitterResizeHandle } from 'reka-ui';
|
|
25
|
+
|
|
26
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
export interface SkSplitterHandleComponentProps
|
|
29
|
+
{
|
|
30
|
+
disabled ?: boolean;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
34
|
+
|
|
35
|
+
withDefaults(defineProps<SkSplitterHandleComponentProps>(), {
|
|
36
|
+
disabled: false,
|
|
37
|
+
});
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|