nuance-ui 0.1.19 → 0.1.20
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/module.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from '../box.vue.js';
|
|
3
3
|
export interface ActionIconProps {
|
|
4
|
-
size?: NuanceSize | `
|
|
4
|
+
size?: NuanceSize | `input-${NuanceSize}` | string;
|
|
5
5
|
variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
|
|
6
6
|
gradient?: NuanceGradient;
|
|
7
7
|
loading?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NuanceColor, NuanceGradient, NuanceRadius, NuanceSize } from '@nui/types';
|
|
2
2
|
import type { BoxProps } from '../box.vue.js';
|
|
3
3
|
export interface ActionIconProps {
|
|
4
|
-
size?: NuanceSize | `
|
|
4
|
+
size?: NuanceSize | `input-${NuanceSize}` | string;
|
|
5
5
|
variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default' | 'gradient';
|
|
6
6
|
gradient?: NuanceGradient;
|
|
7
7
|
loading?: boolean;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { useTheme } from "@nui/composals";
|
|
3
3
|
import { getThemeColor } from "@nui/utils";
|
|
4
4
|
import { computed, watch } from "vue";
|
|
5
|
+
import ActionIcon from "../../action-icon/action-icon.vue";
|
|
5
6
|
import Button from "../../button/button.vue";
|
|
6
7
|
import Loader from "../../loader/loader.vue";
|
|
7
8
|
import RovingFocusItem from "../../roving-focus/roving-focus-item.vue";
|
|
@@ -60,6 +61,7 @@ const { handleClick, handleKeyDown } = useTreeItemHandlers(path, isFolder, expan
|
|
|
60
61
|
:aria-level='level'
|
|
61
62
|
:aria-selected='selected'
|
|
62
63
|
:mod='{ active, selected, "tree-item": path }'
|
|
64
|
+
right-section-p-e='all'
|
|
63
65
|
@click.prevent='handleClick'
|
|
64
66
|
@keydown.prevent='handleKeyDown'
|
|
65
67
|
>
|
|
@@ -83,6 +85,18 @@ const { handleClick, handleKeyDown } = useTreeItemHandlers(path, isFolder, expan
|
|
|
83
85
|
</template>
|
|
84
86
|
|
|
85
87
|
{{ name ?? path }}
|
|
88
|
+
|
|
89
|
+
<template v-if='isFolder' #rightSection>
|
|
90
|
+
<ActionIcon
|
|
91
|
+
icon='gravity-ui:chevron-down'
|
|
92
|
+
size='sm'
|
|
93
|
+
:color='ctx.color'
|
|
94
|
+
:classes='{ root: $style.chevron, icon: $style["chevron-icon"] }'
|
|
95
|
+
:mod='{ expanded }'
|
|
96
|
+
variant='subtle'
|
|
97
|
+
@click.stop='ctx.toggle("expand", path)'
|
|
98
|
+
/>
|
|
99
|
+
</template>
|
|
86
100
|
</Button>
|
|
87
101
|
</RovingFocusItem>
|
|
88
102
|
|
|
@@ -117,6 +131,22 @@ const { handleClick, handleKeyDown } = useTreeItemHandlers(path, isFolder, expan
|
|
|
117
131
|
height: var(--tree-icon-size);
|
|
118
132
|
}
|
|
119
133
|
|
|
134
|
+
.chevron {
|
|
135
|
+
color: var(--color-dimmed);
|
|
136
|
+
|
|
137
|
+
transition: transform .3s ease-in-out;
|
|
138
|
+
|
|
139
|
+
&:hover {
|
|
140
|
+
color: var(--color-dimmed);
|
|
141
|
+
|
|
142
|
+
background-color: transparent;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&[data-expanded] .chevron-icon {
|
|
146
|
+
transform: rotate(-180deg);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
120
150
|
.list {
|
|
121
151
|
display: grid;
|
|
122
152
|
gap: .25rem;
|