sprintify-ui 0.6.2 → 0.6.4
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/dist/sprintify-ui.es.js +349 -342
- package/dist/types/src/components/BaseSwitch.vue.d.ts +9 -0
- package/package.json +1 -1
- package/src/components/BaseLayoutSidebar.vue +3 -3
- package/src/components/BaseLayoutStacked.vue +1 -1
- package/src/components/BaseSwitch.stories.js +5 -0
- package/src/components/BaseSwitch.vue +13 -2
|
@@ -24,6 +24,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
24
24
|
default: boolean;
|
|
25
25
|
type: BooleanConstructor;
|
|
26
26
|
};
|
|
27
|
+
disabled: {
|
|
28
|
+
default: boolean;
|
|
29
|
+
type: BooleanConstructor;
|
|
30
|
+
};
|
|
27
31
|
checkedIcon: {
|
|
28
32
|
default: string;
|
|
29
33
|
type: StringConstructor;
|
|
@@ -59,6 +63,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
59
63
|
default: boolean;
|
|
60
64
|
type: BooleanConstructor;
|
|
61
65
|
};
|
|
66
|
+
disabled: {
|
|
67
|
+
default: boolean;
|
|
68
|
+
type: BooleanConstructor;
|
|
69
|
+
};
|
|
62
70
|
checkedIcon: {
|
|
63
71
|
default: string;
|
|
64
72
|
type: StringConstructor;
|
|
@@ -74,6 +82,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
74
82
|
name: string;
|
|
75
83
|
color: "dark" | "light" | "danger" | "success" | "warning" | "primary" | "info";
|
|
76
84
|
modelValue: string | number | boolean | null | undefined;
|
|
85
|
+
disabled: boolean;
|
|
77
86
|
hasError: boolean;
|
|
78
87
|
size: "base" | "xs" | "sm" | "lg" | "xl";
|
|
79
88
|
checkedIcon: string;
|
package/package.json
CHANGED
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
</Dialog>
|
|
87
87
|
</TransitionRoot>
|
|
88
88
|
|
|
89
|
-
<div class="flex flex-col min-h-full xl:pl-64">
|
|
90
|
-
<div class="sticky top-0 left-0 z-10 shadow shrink-0">
|
|
89
|
+
<div class="flex flex-col min-h-full || xl:pl-64 || xl:print:pl-0">
|
|
90
|
+
<div class="sticky top-0 left-0 z-10 shadow shrink-0 || print:hidden">
|
|
91
91
|
<BaseSystemAlert
|
|
92
92
|
v-for="systemAlert in systemAlerts"
|
|
93
93
|
:key="systemAlert.id"
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
</div>
|
|
132
132
|
|
|
133
133
|
<!-- Static sidebar for desktop -->
|
|
134
|
-
<div class="z-10 hidden xl:fixed xl:inset-y-0 xl:flex xl:w-64 xl:flex-col">
|
|
134
|
+
<div class="z-10 hidden || xl:fixed xl:inset-y-0 xl:flex xl:w-64 xl:flex-col || xl:print:hidden">
|
|
135
135
|
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
|
136
136
|
<div
|
|
137
137
|
data-scroll-lock-scrollable
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
:model-value="normalizedModelValue"
|
|
6
6
|
:class="[
|
|
7
7
|
modelValue ? bg : 'bg-slate-200',
|
|
8
|
-
'relative inline-flex shrink-0
|
|
8
|
+
'relative inline-flex shrink-0 items-center rounded-full transition-colors duration-200 ease-in-out',
|
|
9
|
+
disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer focus:outline-none focus:ring-2 focus:ring-offset-2',
|
|
9
10
|
focus,
|
|
10
11
|
]"
|
|
11
12
|
:style="{
|
|
@@ -32,7 +33,9 @@
|
|
|
32
33
|
</Switch>
|
|
33
34
|
<SwitchLabel
|
|
34
35
|
v-if="$slots.default"
|
|
35
|
-
class="
|
|
36
|
+
:class="[
|
|
37
|
+
disabled ? 'cursor-not-allowed' : 'cursor-pointer',
|
|
38
|
+
]"
|
|
36
39
|
>
|
|
37
40
|
<slot />
|
|
38
41
|
</SwitchLabel>
|
|
@@ -75,6 +78,10 @@ const props = defineProps({
|
|
|
75
78
|
default: false,
|
|
76
79
|
type: Boolean,
|
|
77
80
|
},
|
|
81
|
+
disabled: {
|
|
82
|
+
default: false,
|
|
83
|
+
type: Boolean,
|
|
84
|
+
},
|
|
78
85
|
checkedIcon: {
|
|
79
86
|
default: '',
|
|
80
87
|
type: String,
|
|
@@ -210,6 +217,10 @@ const icon = computed(() => {
|
|
|
210
217
|
});
|
|
211
218
|
|
|
212
219
|
function update(payload: any) {
|
|
220
|
+
if (props.disabled) {
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
|
|
213
224
|
emitUpdate(payload);
|
|
214
225
|
}
|
|
215
226
|
</script>
|