@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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@proj-airi/ui",
3
3
  "type": "module",
4
- "version": "0.9.0-alpha.23",
4
+ "version": "0.9.0-alpha.25",
5
5
  "description": "A collection of UI components that used by Project AIRI",
6
6
  "author": {
7
7
  "name": "Moeru AI Project AIRI Team",
@@ -37,7 +37,7 @@ const props = defineProps<{
37
37
  :class="[
38
38
  'col-start-1 row-start-1',
39
39
  'inline-flex items-center justify-center',
40
- 'w-[1.25rem]',
40
+ 'w-[1rem]',
41
41
  'opacity-30',
42
42
  'text-current',
43
43
  ]"
@@ -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 rounded-xl border px-3 leading-none h-fit gap-[5px] outline-none',
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-50 dark:disabled:bg-neutral-900 dark:hover:bg-neutral-700' : '',
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 }}