@skewedaspect/sleekspace-ui 0.5.1 → 0.7.0
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/Card/SkCard.vue.d.ts +13 -1
- 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/Panel/SkPanel.vue.d.ts +15 -1
- package/dist/components/Panel/types.d.ts +1 -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/Select/SkSelect.vue.d.ts +61 -0
- package/dist/components/Select/SkSelectItem.vue.d.ts +134 -0
- package/dist/components/Select/SkSelectSeparator.vue.d.ts +2 -0
- package/dist/components/Select/index.d.ts +4 -0
- package/dist/components/Select/types.d.ts +3 -0
- package/dist/components/Sidebar/SkSidebar.vue.d.ts +8 -1
- package/dist/components/Sidebar/types.d.ts +1 -0
- package/dist/components/Skeleton/SkSkeleton.vue.d.ts +2 -2
- 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 +61 -0
- package/dist/sleekspace-ui.css +1644 -65
- package/dist/sleekspace-ui.es.js +17444 -6063
- package/dist/sleekspace-ui.umd.js +17426 -6045
- package/package.json +2 -1
- package/src/components/Card/SkCard.vue +17 -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/Panel/SkPanel.vue +29 -4
- package/src/components/Panel/types.ts +3 -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/Select/SkSelect.vue +210 -0
- package/src/components/Select/SkSelectItem.vue +112 -0
- package/src/components/Select/SkSelectSeparator.vue +40 -0
- package/src/components/Select/index.ts +10 -0
- package/src/components/Select/types.ts +10 -0
- package/src/components/Sidebar/SkSidebar.vue +39 -2
- package/src/components/Sidebar/types.ts +2 -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 +22 -0
- package/src/index.ts +110 -0
- package/src/styles/components/_card.scss +45 -9
- package/src/styles/components/_color-picker.scss +552 -0
- package/src/styles/components/_index.scss +6 -0
- package/src/styles/components/_listbox.scss +1 -0
- package/src/styles/components/_menu.scss +52 -3
- package/src/styles/components/_panel.scss +119 -13
- package/src/styles/components/_scroll-area.scss +120 -0
- package/src/styles/components/_select.scss +439 -0
- package/src/styles/components/_sidebar.scss +83 -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 +1244 -197
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<!----------------------------------------------------------------------------------------------------------------------
|
|
2
|
+
- ContextMenuRadioGroup Component
|
|
3
|
+
--------------------------------------------------------------------------------------------------------------------->
|
|
4
|
+
|
|
5
|
+
<template>
|
|
6
|
+
<ContextMenuRadioGroup :model-value="modelValue" @update:model-value="$emit('update:modelValue', $event)">
|
|
7
|
+
<slot />
|
|
8
|
+
</ContextMenuRadioGroup>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { ContextMenuRadioGroup } from 'reka-ui';
|
|
15
|
+
|
|
16
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
export interface SkContextMenuRadioGroupComponentProps
|
|
19
|
+
{
|
|
20
|
+
modelValue ?: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
withDefaults(defineProps<SkContextMenuRadioGroupComponentProps>(), {
|
|
26
|
+
modelValue: '',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
30
|
+
|
|
31
|
+
defineEmits<{
|
|
32
|
+
'update:modelValue' : [value : string];
|
|
33
|
+
}>();
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<!--------------------------------------------------------------------------------------------------------------------->
|
|
@@ -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
|
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
|
|
41
41
|
// Types
|
|
42
42
|
import type { ComponentCustomColors } from '@/types';
|
|
43
|
-
import type { SkPanelKind, SkPanelSize } from './types';
|
|
43
|
+
import type { SkPanelCorner, SkPanelKind, SkPanelSize } from './types';
|
|
44
44
|
|
|
45
45
|
// Composables
|
|
46
46
|
import { useCustomColors } from '@/composables/useCustomColors';
|
|
@@ -81,6 +81,20 @@
|
|
|
81
81
|
* @default false
|
|
82
82
|
*/
|
|
83
83
|
noBorder ?: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Which corners receive the beveled cut. Any combination of the four corners can be
|
|
87
|
+
* specified. Pass an empty array for no cut corners.
|
|
88
|
+
* @default ['bottom-right']
|
|
89
|
+
*/
|
|
90
|
+
corners ?: SkPanelCorner[];
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Which corner displays the decorative accent stripe. Must be one of the active
|
|
94
|
+
* `corners` for the decoration to be visible.
|
|
95
|
+
* @default 'bottom-right'
|
|
96
|
+
*/
|
|
97
|
+
decorationCorner ?: SkPanelCorner;
|
|
84
98
|
}
|
|
85
99
|
|
|
86
100
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -90,6 +104,8 @@
|
|
|
90
104
|
size: 'md',
|
|
91
105
|
showDecoration: true,
|
|
92
106
|
noBorder: false,
|
|
107
|
+
corners: () => [ 'bottom-right' ],
|
|
108
|
+
decorationCorner: 'bottom-right',
|
|
93
109
|
});
|
|
94
110
|
|
|
95
111
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -101,6 +117,11 @@
|
|
|
101
117
|
[`sk-${ props.kind }`]: true,
|
|
102
118
|
[`sk-${ props.size }`]: true,
|
|
103
119
|
'sk-no-border': props.noBorder,
|
|
120
|
+
'sk-cut-top-left': props.corners.includes('top-left'),
|
|
121
|
+
'sk-cut-top-right': props.corners.includes('top-right'),
|
|
122
|
+
'sk-cut-bottom-right': props.corners.includes('bottom-right'),
|
|
123
|
+
'sk-cut-bottom-left': props.corners.includes('bottom-left'),
|
|
124
|
+
[`sk-decoration-${ props.decorationCorner }`]: true,
|
|
104
125
|
};
|
|
105
126
|
});
|
|
106
127
|
|
|
@@ -116,14 +137,18 @@
|
|
|
116
137
|
//------------------------------------------------------------------------------------------------------------------
|
|
117
138
|
|
|
118
139
|
// Control decoration visibility
|
|
119
|
-
//
|
|
140
|
+
// Hidden when: noBorder, showDecoration is false, or decorationCorner isn't in corners
|
|
120
141
|
const decorationDisplay = computed(() =>
|
|
121
142
|
{
|
|
122
|
-
if(props.noBorder)
|
|
143
|
+
if(props.noBorder || !props.showDecoration)
|
|
144
|
+
{
|
|
145
|
+
return 'none';
|
|
146
|
+
}
|
|
147
|
+
if(!props.corners.includes(props.decorationCorner))
|
|
123
148
|
{
|
|
124
149
|
return 'none';
|
|
125
150
|
}
|
|
126
|
-
return
|
|
151
|
+
return 'block';
|
|
127
152
|
});
|
|
128
153
|
</script>
|
|
129
154
|
|
|
@@ -12,4 +12,7 @@ export type SkPanelKind = ComponentKind;
|
|
|
12
12
|
// Panel sizes (only affects cut size, not padding or dimensions)
|
|
13
13
|
export type SkPanelSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
14
|
|
|
15
|
+
// Which corners get the bevel cut
|
|
16
|
+
export type SkPanelCorner = 'top-left' | 'top-right' | 'bottom-right' | 'bottom-left';
|
|
17
|
+
|
|
15
18
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -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
|
+
//----------------------------------------------------------------------------------------------------------------------
|