@proj-airi/ui 0.9.0-alpha.32 → 0.9.0-alpha.34

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.32",
4
+ "version": "0.9.0-alpha.34",
5
5
  "description": "A collection of UI components that used by Project AIRI",
6
6
  "author": {
7
7
  "name": "Moeru AI Project AIRI Team",
@@ -1,18 +1,22 @@
1
1
  <script setup lang="ts">
2
2
  import { Checkbox } from '../checkbox'
3
3
 
4
- const props = defineProps<{
4
+ const props = withDefaults(defineProps<{
5
5
  label?: string
6
6
  description?: string
7
7
  disabled?: boolean
8
- }>()
8
+ /** Controls whether the switch is placed on the left or right side of the label. */
9
+ placement?: 'left' | 'right'
10
+ }>(), {
11
+ placement: 'right',
12
+ })
9
13
 
10
14
  const modelValue = defineModel<boolean>({ required: true })
11
15
  </script>
12
16
 
13
17
  <template>
14
18
  <label class="flex flex-col gap-4">
15
- <div class="flex flex-row items-center gap-2">
19
+ <div :class="['flex items-center gap-2', props.placement === 'left' ? 'flex-row-reverse' : 'flex-row']">
16
20
  <div class="flex-1">
17
21
  <div class="flex items-center gap-1 text-sm font-medium">
18
22
  <slot name="label">