@una-ui/nuxt 0.38.0-beta.1 → 0.39.0-beta.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/module.json +1 -1
- package/dist/module.mjs +8 -1
- package/dist/runtime/components/elements/card/Card.vue +1 -8
- package/dist/runtime/components/forms/select/Select.vue +14 -3
- package/dist/runtime/components/forms/select/SelectContent.vue +2 -1
- package/dist/runtime/components/forms/select/SelectGroup.vue +8 -1
- package/dist/runtime/components/forms/select/SelectItem.vue +2 -1
- package/dist/runtime/components/forms/select/SelectItemIndicator.vue +1 -1
- package/dist/runtime/components/forms/select/SelectLabel.vue +7 -1
- package/dist/runtime/components/forms/select/SelectRoot.vue +1 -1
- package/dist/runtime/components/forms/select/SelectScrollDownButton.vue +8 -1
- package/dist/runtime/components/forms/select/SelectScrollUpButton.vue +8 -1
- package/dist/runtime/components/forms/select/SelectSeparator.vue +8 -1
- package/dist/runtime/components/forms/select/SelectTrigger.vue +13 -7
- package/dist/runtime/components/forms/select/SelectValue.vue +5 -1
- package/dist/runtime/components/scroll-area/ScrollArea.vue +50 -0
- package/dist/runtime/components/scroll-area/ScrollBar.vue +41 -0
- package/dist/runtime/types/index.d.ts +1 -0
- package/dist/runtime/types/index.js +1 -0
- package/dist/runtime/types/scroll-area.d.ts +55 -0
- package/dist/runtime/types/scroll-area.js +0 -0
- package/dist/runtime/types/select.d.ts +37 -44
- package/package.json +3 -3
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import 'unocss';
|
|
|
7
7
|
import 'unocss-preset-animations';
|
|
8
8
|
|
|
9
9
|
const name = "@una-ui/nuxt";
|
|
10
|
-
const version = "0.
|
|
10
|
+
const version = "0.39.0-beta.1";
|
|
11
11
|
|
|
12
12
|
const module = defineNuxtModule({
|
|
13
13
|
meta: {
|
|
@@ -169,6 +169,13 @@ const module = defineNuxtModule({
|
|
|
169
169
|
watch: nuxt.options.dev,
|
|
170
170
|
priority: 10
|
|
171
171
|
});
|
|
172
|
+
addComponentsDir({
|
|
173
|
+
path: resolve(runtimeDir, "components", "scroll-area"),
|
|
174
|
+
prefix: options.prefix,
|
|
175
|
+
global: options.global,
|
|
176
|
+
watch: nuxt.options.dev,
|
|
177
|
+
priority: 10
|
|
178
|
+
});
|
|
172
179
|
if (options.themeable) {
|
|
173
180
|
addPlugin(resolve(runtimeDir, "plugins", "theme.client"));
|
|
174
181
|
addPlugin(resolve(runtimeDir, "plugins", "theme.server"));
|
|
@@ -13,9 +13,7 @@ defineOptions({
|
|
|
13
13
|
})
|
|
14
14
|
|
|
15
15
|
const props = withDefaults(defineProps<NCardProps>(), {
|
|
16
|
-
|
|
17
|
-
cardDefaultVariant: 'card-default-variant',
|
|
18
|
-
}),
|
|
16
|
+
card: 'outline-gray',
|
|
19
17
|
})
|
|
20
18
|
|
|
21
19
|
const delegatedProps = computed(() => {
|
|
@@ -23,10 +21,6 @@ const delegatedProps = computed(() => {
|
|
|
23
21
|
|
|
24
22
|
return delegated
|
|
25
23
|
})
|
|
26
|
-
|
|
27
|
-
const cardVariants = ['soft', 'outline'] as const
|
|
28
|
-
const hasVariant = computed(() => cardVariants.some(cardVariant => props.card?.includes(cardVariant)))
|
|
29
|
-
const isBaseVariant = computed(() => props.card?.includes('~'))
|
|
30
24
|
</script>
|
|
31
25
|
|
|
32
26
|
<template>
|
|
@@ -35,7 +29,6 @@ const isBaseVariant = computed(() => props.card?.includes('~'))
|
|
|
35
29
|
:card="card"
|
|
36
30
|
:class="cn(
|
|
37
31
|
'card',
|
|
38
|
-
!hasVariant && !isBaseVariant ? una?.cardDefaultVariant : '',
|
|
39
32
|
props.class,
|
|
40
33
|
)"
|
|
41
34
|
>
|
|
@@ -79,6 +79,7 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
79
79
|
:status
|
|
80
80
|
:select
|
|
81
81
|
v-bind="props._selectTrigger"
|
|
82
|
+
:una
|
|
82
83
|
>
|
|
83
84
|
<slot name="trigger" :model-value :open="open">
|
|
84
85
|
<SelectValue
|
|
@@ -86,6 +87,7 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
86
87
|
v-bind="props._selectValue"
|
|
87
88
|
:aria-label="formatSelectedValue(modelValue)"
|
|
88
89
|
:data-status="status"
|
|
90
|
+
:una
|
|
89
91
|
>
|
|
90
92
|
<slot name="value" :model-value :open>
|
|
91
93
|
{{ formatSelectedValue(modelValue) || props.placeholder }}
|
|
@@ -101,12 +103,14 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
101
103
|
_selectScrollDownButton,
|
|
102
104
|
_selectScrollUpButton,
|
|
103
105
|
}"
|
|
106
|
+
:una
|
|
104
107
|
>
|
|
105
108
|
<slot name="content" :items="items">
|
|
106
109
|
<template v-if="!group">
|
|
107
110
|
<SelectLabel
|
|
108
111
|
v-if="label"
|
|
109
112
|
v-bind="_selectLabel"
|
|
113
|
+
:una
|
|
110
114
|
>
|
|
111
115
|
<slot name="label" :label>
|
|
112
116
|
{{ label }}
|
|
@@ -119,9 +123,11 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
119
123
|
>
|
|
120
124
|
<SelectItem
|
|
121
125
|
:value="item"
|
|
122
|
-
:size
|
|
126
|
+
:size
|
|
127
|
+
:select-item
|
|
123
128
|
v-bind="props._selectItem"
|
|
124
129
|
:is-selected="isItemSelected(item, modelValue)"
|
|
130
|
+
:una
|
|
125
131
|
>
|
|
126
132
|
<slot name="item" :item="item">
|
|
127
133
|
{{ props.itemKey && item ? (item as any)[props.itemKey] : item }}
|
|
@@ -135,17 +141,20 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
135
141
|
v-for="(group, i) in items as SelectGroupType<T>[]"
|
|
136
142
|
:key="i"
|
|
137
143
|
v-bind="props._selectGroup"
|
|
144
|
+
:una
|
|
138
145
|
>
|
|
139
146
|
<SelectSeparator
|
|
140
147
|
v-if="i > 0"
|
|
141
148
|
v-bind="props._selectSeparator"
|
|
149
|
+
:una
|
|
142
150
|
/>
|
|
143
151
|
|
|
144
152
|
<slot name="group" :items="group">
|
|
145
153
|
<SelectLabel
|
|
146
154
|
v-if="group.label"
|
|
147
|
-
:size
|
|
155
|
+
:size
|
|
148
156
|
v-bind="{ ...props._selectLabel, ...group._selectLabel }"
|
|
157
|
+
:una
|
|
149
158
|
>
|
|
150
159
|
<slot name="label" :label="group.label">
|
|
151
160
|
{{ group.label }}
|
|
@@ -158,9 +167,11 @@ function isItemSelected(item: unknown, modelValue: unknown) {
|
|
|
158
167
|
>
|
|
159
168
|
<SelectItem
|
|
160
169
|
:value="item"
|
|
161
|
-
:size
|
|
170
|
+
:size
|
|
171
|
+
:select-item
|
|
162
172
|
v-bind="{ ..._selectItem, ...group._selectItem }"
|
|
163
173
|
:is-selected="isItemSelected(item, modelValue)"
|
|
174
|
+
:una
|
|
164
175
|
>
|
|
165
176
|
<slot name="item" :item="item">
|
|
166
177
|
{{ props.itemKey ? (item as any)[props.itemKey] : item }}
|
|
@@ -51,7 +51,8 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
|
|
|
51
51
|
<SelectViewport
|
|
52
52
|
:class="cn(
|
|
53
53
|
'select-viewport',
|
|
54
|
-
position === 'popper' && 'select-viewport-popper')
|
|
54
|
+
position === 'popper' && 'select-viewport-popper')
|
|
55
|
+
"
|
|
55
56
|
>
|
|
56
57
|
<slot />
|
|
57
58
|
</SelectViewport>
|
|
@@ -14,7 +14,14 @@ const delegatedProps = computed(() => {
|
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
|
-
<SelectGroup
|
|
17
|
+
<SelectGroup
|
|
18
|
+
:class="cn(
|
|
19
|
+
'select-group',
|
|
20
|
+
props.una?.selectGroup,
|
|
21
|
+
props.class,
|
|
22
|
+
)"
|
|
23
|
+
v-bind="delegatedProps"
|
|
24
|
+
>
|
|
18
25
|
<slot />
|
|
19
26
|
</SelectGroup>
|
|
20
27
|
</template>
|
|
@@ -26,14 +26,15 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
26
26
|
:class="
|
|
27
27
|
cn(
|
|
28
28
|
'select-item',
|
|
29
|
-
props.class,
|
|
30
29
|
props.una?.selectItem,
|
|
30
|
+
props.class,
|
|
31
31
|
)
|
|
32
32
|
"
|
|
33
33
|
:select-item
|
|
34
34
|
>
|
|
35
35
|
<SelectItemIndicator
|
|
36
36
|
v-if="isSelected"
|
|
37
|
+
:una
|
|
37
38
|
v-bind="props._selectItemIndicator"
|
|
38
39
|
>
|
|
39
40
|
<slot name="item-indicator" />
|
|
@@ -7,7 +7,13 @@ const props = defineProps<NSelectLabelProps>()
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<SelectLabel
|
|
10
|
+
<SelectLabel
|
|
11
|
+
:class="cn(
|
|
12
|
+
'select-label',
|
|
13
|
+
props.una?.selectLabel,
|
|
14
|
+
props.class,
|
|
15
|
+
)"
|
|
16
|
+
>
|
|
11
17
|
<slot />
|
|
12
18
|
</SelectLabel>
|
|
13
19
|
</template>
|
|
@@ -17,7 +17,14 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<SelectScrollDownButton
|
|
20
|
+
<SelectScrollDownButton
|
|
21
|
+
v-bind="forwardedProps"
|
|
22
|
+
:class="cn(
|
|
23
|
+
'select-scroll-down-button',
|
|
24
|
+
props.una?.selectScrollDownButton,
|
|
25
|
+
props.class,
|
|
26
|
+
)"
|
|
27
|
+
>
|
|
21
28
|
<slot>
|
|
22
29
|
<Icon
|
|
23
30
|
:name="forwardedProps?.una?.selectScrollDownButtonIcon || 'select-scroll-down-button-icon'"
|
|
@@ -17,7 +17,14 @@ const forwardedProps = useForwardProps(delegatedProps)
|
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<template>
|
|
20
|
-
<SelectScrollUpButton
|
|
20
|
+
<SelectScrollUpButton
|
|
21
|
+
v-bind="forwardedProps"
|
|
22
|
+
:class="cn(
|
|
23
|
+
'select-scroll-up-button',
|
|
24
|
+
props.una?.selectScrollUpButton,
|
|
25
|
+
props.class,
|
|
26
|
+
)"
|
|
27
|
+
>
|
|
21
28
|
<slot>
|
|
22
29
|
<Icon
|
|
23
30
|
:name="forwardedProps?.una?.selectScrollUpButtonIcon || 'select-scroll-up-button-icon'"
|
|
@@ -14,5 +14,12 @@ const delegatedProps = computed(() => {
|
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
16
|
<template>
|
|
17
|
-
<SelectSeparator
|
|
17
|
+
<SelectSeparator
|
|
18
|
+
v-bind="delegatedProps"
|
|
19
|
+
:class="cn(
|
|
20
|
+
'select-separator',
|
|
21
|
+
props.una?.selectSeparator,
|
|
22
|
+
props.class,
|
|
23
|
+
)"
|
|
24
|
+
/>
|
|
18
25
|
</template>
|
|
@@ -51,13 +51,18 @@ const id = computed(() => props.id ?? randomId('select-trigger'))
|
|
|
51
51
|
)"
|
|
52
52
|
:una="{
|
|
53
53
|
...props.una,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
54
|
+
btn: props.una?.selectTrigger,
|
|
55
|
+
btnLeading: cn(
|
|
56
|
+
'select-trigger-leading',
|
|
57
|
+
props.una?.btnLeading,
|
|
58
|
+
props.una?.selectTriggerLeading,
|
|
59
|
+
),
|
|
60
|
+
btnTrailing: cn(
|
|
61
|
+
'select-trigger-trailing',
|
|
62
|
+
props.una?.btnTrailing,
|
|
63
|
+
props.una?.selectTriggerTrailing,
|
|
64
|
+
),
|
|
65
|
+
btnDefaultVariant: statusClassVariants.btn,
|
|
61
66
|
}"
|
|
62
67
|
>
|
|
63
68
|
<slot />
|
|
@@ -72,6 +77,7 @@ const id = computed(() => props.id ?? randomId('select-trigger'))
|
|
|
72
77
|
:class="cn(
|
|
73
78
|
'select-trigger-trailing',
|
|
74
79
|
props.una?.btnTrailing,
|
|
80
|
+
props.una?.selectTriggerTrailing,
|
|
75
81
|
)"
|
|
76
82
|
/>
|
|
77
83
|
</SelectIcon>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NScrollAreaProps } from '../../types'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import {
|
|
5
|
+
ScrollAreaCorner,
|
|
6
|
+
ScrollAreaRoot,
|
|
7
|
+
ScrollAreaViewport,
|
|
8
|
+
} from 'reka-ui'
|
|
9
|
+
import { cn } from '../../utils'
|
|
10
|
+
import ScrollBar from './ScrollBar.vue'
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<NScrollAreaProps>(), {
|
|
13
|
+
scrollArea: 'gray',
|
|
14
|
+
rounded: 'full',
|
|
15
|
+
size: 'md',
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const delegatedProps = reactiveOmit(props, ['class', 'size', 'rounded'])
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<ScrollAreaRoot
|
|
23
|
+
v-bind="delegatedProps"
|
|
24
|
+
:class="cn(
|
|
25
|
+
'scroll-area-root',
|
|
26
|
+
props.una?.scrollAreaRoot,
|
|
27
|
+
props.class,
|
|
28
|
+
)"
|
|
29
|
+
>
|
|
30
|
+
<ScrollAreaViewport
|
|
31
|
+
v-bind="_scrollAreaViewport"
|
|
32
|
+
:class="cn(
|
|
33
|
+
'scroll-area-viewport',
|
|
34
|
+
props.una?.scrollAreaViewport,
|
|
35
|
+
_scrollAreaViewport?.class,
|
|
36
|
+
)"
|
|
37
|
+
>
|
|
38
|
+
<slot />
|
|
39
|
+
</ScrollAreaViewport>
|
|
40
|
+
<ScrollBar
|
|
41
|
+
v-bind="_scrollAreaScrollbar"
|
|
42
|
+
:orientation="orientation ?? _scrollAreaScrollbar?.orientation"
|
|
43
|
+
:una
|
|
44
|
+
:size
|
|
45
|
+
:rounded
|
|
46
|
+
:scroll-area
|
|
47
|
+
/>
|
|
48
|
+
<ScrollAreaCorner />
|
|
49
|
+
</ScrollAreaRoot>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { NScrollAreaScrollbarProps } from '../../types'
|
|
3
|
+
import { reactiveOmit } from '@vueuse/core'
|
|
4
|
+
import { ScrollAreaScrollbar, ScrollAreaThumb } from 'reka-ui'
|
|
5
|
+
import { computed } from 'vue'
|
|
6
|
+
import { cn } from '../../utils'
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<NScrollAreaScrollbarProps>(), {
|
|
9
|
+
orientation: 'vertical',
|
|
10
|
+
rounded: 'full',
|
|
11
|
+
})
|
|
12
|
+
|
|
13
|
+
const delegatedProps = reactiveOmit(props, ['class', 'size', 'rounded', 'scrollArea'])
|
|
14
|
+
|
|
15
|
+
const orientationClass = computed(() => {
|
|
16
|
+
return props.orientation === 'vertical' ? 'scroll-area-scrollbar-vertical' : 'scroll-area-scrollbar-horizontal'
|
|
17
|
+
})
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<ScrollAreaScrollbar
|
|
22
|
+
v-bind="delegatedProps"
|
|
23
|
+
:size
|
|
24
|
+
:class="
|
|
25
|
+
cn(
|
|
26
|
+
'scroll-area-scrollbar',
|
|
27
|
+
orientationClass,
|
|
28
|
+
props.una?.scrollAreaScrollbar,
|
|
29
|
+
props.class,
|
|
30
|
+
)"
|
|
31
|
+
>
|
|
32
|
+
<ScrollAreaThumb
|
|
33
|
+
:scroll-area
|
|
34
|
+
:rounded
|
|
35
|
+
:class="cn(
|
|
36
|
+
'scroll-area-scrollbar-thumb',
|
|
37
|
+
props.una?.scrollAreaThumb,
|
|
38
|
+
)"
|
|
39
|
+
/>
|
|
40
|
+
</ScrollAreaScrollbar>
|
|
41
|
+
</template>
|
|
@@ -22,6 +22,7 @@ export * from './pagination.js';
|
|
|
22
22
|
export * from './popover.js';
|
|
23
23
|
export * from './progress.js';
|
|
24
24
|
export * from './radio-group.js';
|
|
25
|
+
export * from './scroll-area.js';
|
|
25
26
|
export * from './select.js';
|
|
26
27
|
export * from './separator.js';
|
|
27
28
|
export * from './sheet.js';
|
|
@@ -22,6 +22,7 @@ export * from "./pagination.js";
|
|
|
22
22
|
export * from "./popover.js";
|
|
23
23
|
export * from "./progress.js";
|
|
24
24
|
export * from "./radio-group.js";
|
|
25
|
+
export * from "./scroll-area.js";
|
|
25
26
|
export * from "./select.js";
|
|
26
27
|
export * from "./separator.js";
|
|
27
28
|
export * from "./sheet.js";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ScrollAreaRootProps, ScrollAreaScrollbarProps, ScrollAreaThumbProps, ScrollAreaViewportProps } from 'reka-ui';
|
|
2
|
+
import type { HTMLAttributes } from 'vue';
|
|
3
|
+
interface BaseExtension {
|
|
4
|
+
class?: HTMLAttributes['class'];
|
|
5
|
+
size?: HTMLAttributes['class'];
|
|
6
|
+
rounded?: HTMLAttributes['class'];
|
|
7
|
+
}
|
|
8
|
+
export interface NScrollAreaProps extends ScrollAreaRootProps, Pick<ScrollAreaScrollbarProps, 'orientation'>, BaseExtension {
|
|
9
|
+
/**
|
|
10
|
+
* Allows you to add `UnaUI` scroll area preset properties,
|
|
11
|
+
* Think of it as a shortcut for adding options or variants to the preset if available.
|
|
12
|
+
*
|
|
13
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/scroll-area.ts
|
|
14
|
+
* @example
|
|
15
|
+
* scrollArea="green"
|
|
16
|
+
*/
|
|
17
|
+
scrollArea?: HTMLAttributes['class'];
|
|
18
|
+
/**
|
|
19
|
+
* The scroll area root props.
|
|
20
|
+
*/
|
|
21
|
+
_scrollAreaRoot?: NScrollAreaRootProps;
|
|
22
|
+
/**
|
|
23
|
+
* The scroll area scrollbar props.
|
|
24
|
+
*/
|
|
25
|
+
_scrollAreaScrollbar?: NScrollAreaScrollbarProps;
|
|
26
|
+
/**
|
|
27
|
+
* The scroll area viewport props.
|
|
28
|
+
*/
|
|
29
|
+
_scrollAreaViewport?: NScrollAreaViewportProps;
|
|
30
|
+
/**
|
|
31
|
+
* `UnaUI` preset configuration
|
|
32
|
+
*
|
|
33
|
+
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/scroll-area.ts
|
|
34
|
+
*/
|
|
35
|
+
una?: NScrollAreaUnaProps;
|
|
36
|
+
}
|
|
37
|
+
export interface NScrollAreaRootProps extends ScrollAreaRootProps, BaseExtension {
|
|
38
|
+
una?: NScrollAreaUnaProps['scrollAreaRoot'];
|
|
39
|
+
}
|
|
40
|
+
export interface NScrollAreaScrollbarProps extends ScrollAreaScrollbarProps, Pick<NScrollAreaProps, 'scrollArea'>, BaseExtension {
|
|
41
|
+
una?: Pick<NScrollAreaUnaProps, 'scrollAreaScrollbar' | 'scrollAreaThumb'>;
|
|
42
|
+
}
|
|
43
|
+
export interface NScrollAreaThumbProps extends ScrollAreaThumbProps, BaseExtension {
|
|
44
|
+
una?: NScrollAreaUnaProps['scrollAreaThumb'];
|
|
45
|
+
}
|
|
46
|
+
export interface NScrollAreaViewportProps extends ScrollAreaViewportProps, Pick<BaseExtension, 'class'> {
|
|
47
|
+
una?: NScrollAreaUnaProps['scrollAreaViewport'];
|
|
48
|
+
}
|
|
49
|
+
export interface NScrollAreaUnaProps {
|
|
50
|
+
scrollAreaRoot?: HTMLAttributes['class'];
|
|
51
|
+
scrollAreaViewport?: HTMLAttributes['class'];
|
|
52
|
+
scrollAreaScrollbar?: HTMLAttributes['class'];
|
|
53
|
+
scrollAreaThumb?: HTMLAttributes['class'];
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
File without changes
|
|
@@ -58,6 +58,7 @@ export interface NSelectProps<T extends AcceptableValue> extends SelectExtension
|
|
|
58
58
|
_selectTrigger?: Partial<NSelectTriggerProps>;
|
|
59
59
|
_selectItem?: Partial<NSelectItemProps>;
|
|
60
60
|
_selectLabel?: Partial<NSelectLabelProps>;
|
|
61
|
+
una?: NSelectUnaProps;
|
|
61
62
|
}
|
|
62
63
|
export interface NSelectRootProps extends RootExtensions {
|
|
63
64
|
una?: {
|
|
@@ -87,78 +88,70 @@ export interface NSelectTriggerProps extends TriggerExtensions {
|
|
|
87
88
|
*
|
|
88
89
|
* @see https://github.com/una-ui/una-ui/blob/main/packages/preset/src/_shortcuts/select.ts
|
|
89
90
|
*/
|
|
90
|
-
una?:
|
|
91
|
-
selectTrigger?: HTMLAttributes['class'];
|
|
92
|
-
selectTriggerTrailing?: HTMLAttributes['class'];
|
|
93
|
-
selectTriggerTrailingIcon?: HTMLAttributes['class'];
|
|
94
|
-
selectTriggerLeading?: HTMLAttributes['class'];
|
|
95
|
-
selectTriggerInfoIcon?: HTMLAttributes['class'];
|
|
96
|
-
selectTriggerSuccessIcon?: HTMLAttributes['class'];
|
|
97
|
-
selectTriggerWarningIcon?: HTMLAttributes['class'];
|
|
98
|
-
selectTriggerErrorIcon?: HTMLAttributes['class'];
|
|
99
|
-
} & NButtonProps['una'];
|
|
91
|
+
una?: Pick<NSelectUnaProps, 'selectTrigger' | 'selectTriggerTrailing' | 'selectTriggerTrailingIcon' | 'selectTriggerLeading' | 'selectTriggerInfoIcon' | 'selectTriggerSuccessIcon' | 'selectTriggerWarningIcon' | 'selectTriggerErrorIcon'> & NButtonProps['una'];
|
|
100
92
|
}
|
|
101
93
|
export interface NSelectValueProps extends ValueExtensions {
|
|
102
|
-
una?:
|
|
103
|
-
selectValue?: HTMLAttributes['class'];
|
|
104
|
-
};
|
|
94
|
+
una?: Pick<NSelectUnaProps, 'selectValue'>;
|
|
105
95
|
}
|
|
106
96
|
export interface NSelectScrollDownButtonProps extends ScrollDownButtonExtensions {
|
|
107
|
-
una?:
|
|
108
|
-
selectScrollDownButton?: HTMLAttributes['class'];
|
|
109
|
-
selectScrollDownButtonIcon?: HTMLAttributes['class'];
|
|
110
|
-
};
|
|
97
|
+
una?: Pick<NSelectUnaProps, 'selectScrollDownButton' | 'selectScrollDownButtonIcon'>;
|
|
111
98
|
}
|
|
112
99
|
export interface NSelectScrollUpButtonProps extends ScrollUpButtonExtensions {
|
|
113
|
-
una?:
|
|
114
|
-
selectScrollUpButton?: HTMLAttributes['class'];
|
|
115
|
-
selectScrollUpButtonIcon?: HTMLAttributes['class'];
|
|
116
|
-
};
|
|
100
|
+
una?: Pick<NSelectUnaProps, 'selectScrollUpButton' | 'selectScrollUpButtonIcon'>;
|
|
117
101
|
}
|
|
118
102
|
export interface NSelectContentProps extends ContentExtensions {
|
|
119
103
|
_selectScrollDownButton?: NSelectScrollDownButtonProps;
|
|
120
104
|
_selectScrollUpButton?: NSelectScrollUpButtonProps;
|
|
121
105
|
_selectSeparator?: NSelectSeparator;
|
|
122
|
-
una?:
|
|
123
|
-
selectContent?: HTMLAttributes['class'];
|
|
124
|
-
};
|
|
106
|
+
una?: Pick<NSelectUnaProps, 'selectContent'>;
|
|
125
107
|
}
|
|
126
108
|
export interface NSelectItemIndicatorProps extends SelectItemIndicatorProps {
|
|
127
109
|
icon?: HTMLAttributes['class'];
|
|
128
110
|
class?: HTMLAttributes['class'];
|
|
129
|
-
una?:
|
|
130
|
-
selectItemIndicator?: HTMLAttributes['class'];
|
|
131
|
-
selectItemIndicatorIcon?: HTMLAttributes['class'];
|
|
132
|
-
};
|
|
111
|
+
una?: Pick<NSelectUnaProps, 'selectItemIndicator' | 'selectItemIndicatorIcon'>;
|
|
133
112
|
}
|
|
134
113
|
export interface NSelectItemProps extends ItemExtensions {
|
|
135
114
|
selectItem?: HTMLAttributes['class'];
|
|
136
115
|
isSelected?: boolean;
|
|
137
116
|
_selectItemText?: NSelectItemTextProps;
|
|
138
117
|
_selectItemIndicator?: NSelectItemIndicatorProps;
|
|
139
|
-
una?:
|
|
140
|
-
selectItem?: HTMLAttributes['class'];
|
|
141
|
-
selectItemIndicatorWrapper?: HTMLAttributes['class'];
|
|
142
|
-
};
|
|
118
|
+
una?: Pick<NSelectUnaProps, 'selectItem' | 'selectItemIndicator'>;
|
|
143
119
|
}
|
|
144
120
|
export interface NSelectItemTextProps extends ItemTextExtensions {
|
|
145
|
-
una?:
|
|
146
|
-
selectItemText?: HTMLAttributes['class'];
|
|
147
|
-
};
|
|
121
|
+
una?: Pick<NSelectUnaProps, 'selectItemText'>;
|
|
148
122
|
}
|
|
149
123
|
export interface NSelectGroupProps extends GroupExtensions {
|
|
150
|
-
una?:
|
|
151
|
-
selectGroup?: HTMLAttributes['class'];
|
|
152
|
-
};
|
|
124
|
+
una?: Pick<NSelectUnaProps, 'selectGroup'>;
|
|
153
125
|
}
|
|
154
126
|
export interface NSelectLabelProps extends LabelExtensions {
|
|
155
|
-
una?:
|
|
156
|
-
selectLabel?: HTMLAttributes['class'];
|
|
157
|
-
};
|
|
127
|
+
una?: Pick<NSelectUnaProps, 'selectLabel'>;
|
|
158
128
|
}
|
|
159
129
|
export interface NSelectSeparator extends SeparatorExtensions {
|
|
160
|
-
una?:
|
|
161
|
-
|
|
162
|
-
|
|
130
|
+
una?: Pick<NSelectUnaProps, 'selectSeparator'>;
|
|
131
|
+
}
|
|
132
|
+
export interface NSelectUnaProps {
|
|
133
|
+
select?: HTMLAttributes['class'];
|
|
134
|
+
selectRoot?: HTMLAttributes['class'];
|
|
135
|
+
selectTrigger?: HTMLAttributes['class'];
|
|
136
|
+
selectTriggerTrailing?: HTMLAttributes['class'];
|
|
137
|
+
selectTriggerTrailingIcon?: HTMLAttributes['class'];
|
|
138
|
+
selectTriggerLeading?: HTMLAttributes['class'];
|
|
139
|
+
selectTriggerInfoIcon?: HTMLAttributes['class'];
|
|
140
|
+
selectTriggerSuccessIcon?: HTMLAttributes['class'];
|
|
141
|
+
selectTriggerWarningIcon?: HTMLAttributes['class'];
|
|
142
|
+
selectTriggerErrorIcon?: HTMLAttributes['class'];
|
|
143
|
+
selectValue?: HTMLAttributes['class'];
|
|
144
|
+
selectContent?: HTMLAttributes['class'];
|
|
145
|
+
selectItem?: HTMLAttributes['class'];
|
|
146
|
+
selectItemText?: HTMLAttributes['class'];
|
|
147
|
+
selectItemIndicator?: HTMLAttributes['class'];
|
|
148
|
+
selectItemIndicatorIcon?: HTMLAttributes['class'];
|
|
149
|
+
selectGroup?: HTMLAttributes['class'];
|
|
150
|
+
selectLabel?: HTMLAttributes['class'];
|
|
151
|
+
selectSeparator?: HTMLAttributes['class'];
|
|
152
|
+
selectScrollDownButton?: HTMLAttributes['class'];
|
|
153
|
+
selectScrollDownButtonIcon?: HTMLAttributes['class'];
|
|
154
|
+
selectScrollUpButton?: HTMLAttributes['class'];
|
|
155
|
+
selectScrollUpButtonIcon?: HTMLAttributes['class'];
|
|
163
156
|
}
|
|
164
157
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@una-ui/nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.39.0-beta.1",
|
|
5
5
|
"description": "Nuxt module for @una-ui",
|
|
6
6
|
"author": "Phojie Rengel <phojrengel@gmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"typescript": "5.6.3",
|
|
50
50
|
"unocss": "^65.4.3",
|
|
51
51
|
"unocss-preset-animations": "^1.1.1",
|
|
52
|
-
"@una-ui/extractor-vue-script": "^0.
|
|
53
|
-
"@una-ui/preset": "^0.
|
|
52
|
+
"@una-ui/extractor-vue-script": "^0.39.0-beta.1",
|
|
53
|
+
"@una-ui/preset": "^0.39.0-beta.1"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@nuxt/module-builder": "^0.8.4",
|