@falcondev-oss/nuxt-layers-base 0.41.0 → 0.41.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.
@@ -43,7 +43,7 @@ export default defineSetupComponent(
43
43
  ...forwarded.value.ui,
44
44
  body: mergeSlotClass(forwarded.value.ui?.body, 'p-0!'),
45
45
  }}
46
- class="ring-accented relative shadow-[0_-2px_3px_-1px_rgb(0_0_0/0.08)]"
46
+ class="relative shadow-[0_-2px_3px_-1px_rgb(0_0_0/0.08)]"
47
47
  v-slots={vSlots(UCard, omit(slots, ['ribbon']))}
48
48
  />
49
49
  ) : null}
@@ -0,0 +1,46 @@
1
+ import { Icon, UButton } from '#components'
2
+
3
+ export default defineSetupComponent(
4
+ (_: {
5
+ props: {
6
+ modelValue: boolean
7
+ label: string
8
+ icon: string
9
+ }
10
+ emits: { 'update:modelValue': (value: boolean) => void }
11
+ }) =>
12
+ options(_, {
13
+ name: 'UToggleButton',
14
+ props: ['modelValue', 'label', 'icon'],
15
+ emits: ['update:modelValue'],
16
+ setup:
17
+ (props, { emit }) =>
18
+ () => (
19
+ <UButton
20
+ color="neutral"
21
+ variant="soft"
22
+ class={['ring-accented px-1.5! ring', props.modelValue && 'bg-accented']}
23
+ aria-pressed={props.modelValue}
24
+ onClick={() => {
25
+ emit('update:modelValue', !props.modelValue)
26
+ }}
27
+ >
28
+ {{
29
+ leading: () => (
30
+ <span
31
+ class={[
32
+ 'flex size-5 items-center justify-center rounded-sm transition-colors',
33
+ props.modelValue
34
+ ? 'bg-primary text-inverted'
35
+ : 'ring-accented text-muted ring inset-ring-0',
36
+ ]}
37
+ >
38
+ <Icon name={props.icon} class="size-4" />
39
+ </span>
40
+ ),
41
+ default: () => props.label,
42
+ }}
43
+ </UButton>
44
+ ),
45
+ }),
46
+ )
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@falcondev-oss/nuxt-layers-base",
3
3
  "type": "module",
4
- "version": "0.41.0",
4
+ "version": "0.41.1",
5
5
  "description": "Nuxt layer with lots of useful helpers and @nuxt/ui components",
6
6
  "license": "MIT",
7
7
  "repository": {