@proj-airi/ui 0.9.0-alpha.23 → 0.9.0-alpha.25
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/package.json
CHANGED
|
@@ -38,6 +38,7 @@ const props = withDefaults(defineProps<{
|
|
|
38
38
|
by?: string | ((a: T, b: T) => boolean)
|
|
39
39
|
contentMinWidth?: string | number
|
|
40
40
|
contentWidth?: string | number
|
|
41
|
+
shape?: 'rounded' | 'default'
|
|
41
42
|
variant?: 'blurry' | 'default'
|
|
42
43
|
}>(), {
|
|
43
44
|
placeholder: 'Select an option',
|
|
@@ -45,6 +46,7 @@ const props = withDefaults(defineProps<{
|
|
|
45
46
|
by: undefined,
|
|
46
47
|
contentMinWidth: 160,
|
|
47
48
|
contentWidth: undefined,
|
|
49
|
+
shape: 'default',
|
|
48
50
|
variant: 'default',
|
|
49
51
|
})
|
|
50
52
|
|
|
@@ -110,10 +112,11 @@ function toCssSize(value?: string | number): string | undefined {
|
|
|
110
112
|
<SelectTrigger
|
|
111
113
|
:class="[
|
|
112
114
|
'group',
|
|
113
|
-
'w-full inline-flex items-center justify-between
|
|
115
|
+
'w-full inline-flex items-center justify-between border px-1 leading-none h-fit gap-[5px] outline-none',
|
|
116
|
+
props.shape === 'rounded' ? 'rounded-full' : 'rounded-lg',
|
|
114
117
|
'text-sm text-neutral-700 dark:text-neutral-200 data-[placeholder]:text-neutral-400 dark:data-[placeholder]:text-neutral-500',
|
|
115
118
|
props.variant === 'default' ? 'bg-white dark:bg-neutral-900 disabled:bg-neutral-100 hover:bg-neutral-50 dark:disabled:bg-neutral-900 dark:hover:bg-neutral-700' : '',
|
|
116
|
-
props.variant === 'blurry' ? 'bg-neutral-50/70 dark:bg-neutral-800/70 disabled:bg-neutral-100 hover:bg-neutral-
|
|
119
|
+
props.variant === 'blurry' ? 'bg-neutral-50/70 dark:bg-neutral-800/70 disabled:bg-neutral-100 hover:bg-neutral-100 dark:disabled:bg-neutral-900 dark:hover:bg-neutral-800' : '',
|
|
117
120
|
props.variant === 'blurry' ? 'backdrop-blur-md' : '',
|
|
118
121
|
'border-2 border-solid focus:border-primary-300 dark:focus:border-primary-400/50',
|
|
119
122
|
props.variant === 'default' ? 'border-neutral-200 dark:border-neutral-800' : '',
|
|
@@ -132,9 +135,7 @@ function toCssSize(value?: string | number): string | undefined {
|
|
|
132
135
|
<span
|
|
133
136
|
:class="[
|
|
134
137
|
'block truncate',
|
|
135
|
-
selectedOption
|
|
136
|
-
? 'text-neutral-700 dark:text-neutral-200'
|
|
137
|
-
: 'text-neutral-400 dark:text-neutral-500',
|
|
138
|
+
selectedOption ? 'text-neutral-700 dark:text-neutral-200' : 'text-neutral-400 dark:text-neutral-500',
|
|
138
139
|
]"
|
|
139
140
|
>
|
|
140
141
|
{{ selectedOption?.label ?? props.placeholder }}
|