@saasmakers/ui 2.0.12 → 2.0.13
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.
|
@@ -26,23 +26,52 @@ const modelValue = defineModel<FieldCheckbox['modelValue']>({ default: false })
|
|
|
26
26
|
:class="{ 'w-full': fullWidth }"
|
|
27
27
|
@click.stop
|
|
28
28
|
>
|
|
29
|
-
<div class="flex flex-1 items-center">
|
|
30
|
-
<
|
|
29
|
+
<div class="group flex flex-1 items-center">
|
|
30
|
+
<label
|
|
31
31
|
v-if="!loading"
|
|
32
|
-
|
|
33
|
-
v-model="modelValue"
|
|
34
|
-
class="border border-gray-300 rounded-lg accent-indigo-700 transition-shadow flex-initial dark:border-gray-700"
|
|
32
|
+
class="relative flex items-center justify-center flex-initial"
|
|
35
33
|
:class="{
|
|
36
|
-
'cursor-pointer
|
|
34
|
+
'cursor-pointer': !disabled,
|
|
37
35
|
'field-disabled': disabled,
|
|
38
|
-
'h-3.5 w-3.5': size === 'xs',
|
|
39
|
-
'h-4 w-4': size === 'sm',
|
|
40
|
-
'h-4.5 w-4.5': size === 'base',
|
|
41
|
-
'h-5 w-5': size === 'lg',
|
|
42
36
|
}"
|
|
43
|
-
:disabled="disabled"
|
|
44
|
-
type="checkbox"
|
|
45
37
|
>
|
|
38
|
+
<input
|
|
39
|
+
:id="id"
|
|
40
|
+
v-model="modelValue"
|
|
41
|
+
class="peer sr-only"
|
|
42
|
+
:class="{ 'field-disabled': disabled }"
|
|
43
|
+
:disabled="disabled"
|
|
44
|
+
type="checkbox"
|
|
45
|
+
>
|
|
46
|
+
|
|
47
|
+
<span
|
|
48
|
+
aria-hidden="true"
|
|
49
|
+
class="flex items-center justify-center border-2 rounded-full transition-colors"
|
|
50
|
+
:class="{
|
|
51
|
+
'border-indigo-600 dark:border-indigo-400': modelValue,
|
|
52
|
+
'border-gray-300 dark:border-gray-600': !modelValue,
|
|
53
|
+
'group-hover:border-gray-400 dark:group-hover:border-gray-500': !disabled && !modelValue,
|
|
54
|
+
'group-hover:border-indigo-700 dark:group-hover:border-indigo-300': !disabled && modelValue,
|
|
55
|
+
'h-3.5 w-3.5': size === 'xs',
|
|
56
|
+
'h-4 w-4': size === 'sm',
|
|
57
|
+
'h-4.5 w-4.5': size === 'base',
|
|
58
|
+
'h-5 w-5': size === 'lg',
|
|
59
|
+
'peer-focus-visible:ring-2 peer-focus-visible:ring-indigo-500/40 peer-focus-visible:ring-offset-2 peer-focus-visible:outline-none': !disabled,
|
|
60
|
+
}"
|
|
61
|
+
>
|
|
62
|
+
<Icon
|
|
63
|
+
v-if="modelValue"
|
|
64
|
+
:name="getLayerIcon('check')"
|
|
65
|
+
class="shrink-0 text-indigo-600 dark:text-indigo-400"
|
|
66
|
+
:class="{
|
|
67
|
+
'size-2': size === 'xs',
|
|
68
|
+
'size-2.5': size === 'sm',
|
|
69
|
+
'size-3': size === 'base',
|
|
70
|
+
'size-3.5': size === 'lg',
|
|
71
|
+
}"
|
|
72
|
+
/>
|
|
73
|
+
</span>
|
|
74
|
+
</label>
|
|
46
75
|
|
|
47
76
|
<BaseSpinner
|
|
48
77
|
v-else
|
package/app/utils/layerIcons.ts
CHANGED
|
@@ -13,6 +13,7 @@ export const layerIcons = {
|
|
|
13
13
|
arrowRight: 'solar:alt-arrow-right-bold',
|
|
14
14
|
arrowUp: 'solar:alt-arrow-up-bold',
|
|
15
15
|
back: 'hugeicons:arrow-turn-backward',
|
|
16
|
+
check: 'mdi:check',
|
|
16
17
|
checkCircle: 'hugeicons:checkmark-circle-02',
|
|
17
18
|
chevronLeft: 'hugeicons:arrow-left-01',
|
|
18
19
|
chevronRight: 'hugeicons:arrow-right-01',
|