Compare commits
1 Commits
api-utils
...
lite/defin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8f741cb29 |
@@ -21,9 +21,14 @@ import AccountButton from "@/components/AccountButton.vue";
|
|||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
import { useNavigationStore } from "@/stores/navigation.store";
|
import { useNavigationStore } from "@/stores/navigation.store";
|
||||||
import { useUiStore } from "@/stores/ui.store";
|
import { useUiStore } from "@/stores/ui.store";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import { faBars } from "@fortawesome/free-solid-svg-icons";
|
import { faBars } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { storeToRefs } from "pinia";
|
import { storeToRefs } from "pinia";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const uiStore = useUiStore();
|
const uiStore = useUiStore();
|
||||||
const { isMobile } = storeToRefs(uiStore);
|
const { isMobile } = storeToRefs(uiStore);
|
||||||
|
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import { computed, toRef, watch } from "vue";
|
import { computed, toRef, watch } from "vue";
|
||||||
import type { Filters } from "@/types/filter";
|
import type { Filters } from "@/types/filter";
|
||||||
import type { Sorts } from "@/types/sort";
|
import type { Sorts } from "@/types/sort";
|
||||||
@@ -55,6 +56,11 @@ import useFilteredCollection from "@/composables/filtered-collection.composable"
|
|||||||
import useMultiSelect from "@/composables/multi-select.composable";
|
import useMultiSelect from "@/composables/multi-select.composable";
|
||||||
import useSortedCollection from "@/composables/sorted-collection.composable";
|
import useSortedCollection from "@/composables/sorted-collection.composable";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
"head-row": SlotDefinition;
|
||||||
|
"body-row": SlotDefinition<{ item: any }>;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue?: string[];
|
modelValue?: string[];
|
||||||
availableFilters?: Filters;
|
availableFilters?: Filters;
|
||||||
|
|||||||
@@ -11,8 +11,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon?: IconDefinition;
|
icon?: IconDefinition;
|
||||||
}>();
|
}>();
|
||||||
|
|||||||
@@ -13,10 +13,15 @@
|
|||||||
>
|
>
|
||||||
import UiSpinner from "@/components/ui/UiSpinner.vue";
|
import UiSpinner from "@/components/ui/UiSpinner.vue";
|
||||||
import type { XenApiRecord } from "@/libs/xen-api";
|
import type { XenApiRecord } from "@/libs/xen-api";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import ObjectNotFoundView from "@/views/ObjectNotFoundView.vue";
|
import ObjectNotFoundView from "@/views/ObjectNotFoundView.vue";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
isReady: boolean;
|
isReady: boolean;
|
||||||
uuidChecker: (uuid: I) => boolean;
|
uuidChecker: (uuid: I) => boolean;
|
||||||
|
|||||||
@@ -11,10 +11,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import UiTab from "@/components/ui/UiTab.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import { IK_TAB_BAR_DISABLED } from "@/types/injection-keys";
|
import { IK_TAB_BAR_DISABLED } from "@/types/injection-keys";
|
||||||
import { computed, inject } from "vue";
|
import { computed, inject } from "vue";
|
||||||
import type { RouteLocationRaw } from "vue-router";
|
import type { RouteLocationRaw } from "vue-router";
|
||||||
import UiTab from "@/components/ui/UiTab.vue";
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
to: RouteLocationRaw;
|
to: RouteLocationRaw;
|
||||||
|
|||||||
@@ -12,8 +12,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
actions: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon: IconDefinition;
|
icon: IconDefinition;
|
||||||
}>();
|
}>();
|
||||||
|
|||||||
@@ -26,8 +26,13 @@
|
|||||||
import UiProgressBar from "@/components/ui/progress/UiProgressBar.vue";
|
import UiProgressBar from "@/components/ui/progress/UiProgressBar.vue";
|
||||||
import UiProgressLegend from "@/components/ui/progress/UiProgressLegend.vue";
|
import UiProgressLegend from "@/components/ui/progress/UiProgressLegend.vue";
|
||||||
import UiCardSpinner from "@/components/ui/UiCardSpinner.vue";
|
import UiCardSpinner from "@/components/ui/UiCardSpinner.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import { computed } from "vue";
|
import { computed } from "vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
footer: SlotDefinition<{ totalPercent: number }>;
|
||||||
|
}>();
|
||||||
|
|
||||||
interface Data {
|
interface Data {
|
||||||
id: string;
|
id: string;
|
||||||
value: number;
|
value: number;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UiCard from "@/components/ui/UiCard.vue";
|
import UiCard from "@/components/ui/UiCard.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { LinearChartData, ValueFormatter } from "@/types/chart";
|
import type { LinearChartData, ValueFormatter } from "@/types/chart";
|
||||||
import { IK_CHART_VALUE_FORMATTER } from "@/types/injection-keys";
|
import { IK_CHART_VALUE_FORMATTER } from "@/types/injection-keys";
|
||||||
import { utcFormat } from "d3-time-format";
|
import { utcFormat } from "d3-time-format";
|
||||||
@@ -25,6 +26,10 @@ import VueCharts from "vue-echarts";
|
|||||||
|
|
||||||
const Y_AXIS_MAX_VALUE = 200;
|
const Y_AXIS_MAX_VALUE = 200;
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
summary: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
title?: string;
|
title?: string;
|
||||||
subtitle?: string;
|
subtitle?: string;
|
||||||
|
|||||||
@@ -118,12 +118,20 @@ import {
|
|||||||
ModelParam,
|
ModelParam,
|
||||||
type Param,
|
type Param,
|
||||||
} from "@/libs/story/story-param";
|
} from "@/libs/story/story-param";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import { faSliders } from "@fortawesome/free-solid-svg-icons";
|
import { faSliders } from "@fortawesome/free-solid-svg-icons";
|
||||||
import "highlight.js/styles/github-dark.css";
|
import "highlight.js/styles/github-dark.css";
|
||||||
import { uniqueId, upperFirst } from "lodash-es";
|
import { uniqueId, upperFirst } from "lodash-es";
|
||||||
import { computed, reactive, ref, watch, watchEffect } from "vue";
|
import { computed, reactive, ref, watch, watchEffect } from "vue";
|
||||||
import { useRoute } from "vue-router";
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition<{
|
||||||
|
properties: Record<string, any>;
|
||||||
|
settings: Record<string, any>;
|
||||||
|
}>;
|
||||||
|
}>();
|
||||||
|
|
||||||
const tab = (tab: TAB, params: Param[]) =>
|
const tab = (tab: TAB, params: Param[]) =>
|
||||||
reactive({
|
reactive({
|
||||||
onClick: () => (selectedTab.value = tab),
|
onClick: () => (selectedTab.value = tab),
|
||||||
|
|||||||
@@ -41,8 +41,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
|
|
||||||
const moonDistance = 384400;
|
const moonDistance = 384400;
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
"named-slot": SlotDefinition;
|
||||||
|
"named-scoped-slot": SlotDefinition<{
|
||||||
|
moonDistance: number;
|
||||||
|
}>;
|
||||||
|
}>();
|
||||||
|
|
||||||
withDefaults(
|
withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
imString: string;
|
imString: string;
|
||||||
|
|||||||
@@ -4,7 +4,13 @@
|
|||||||
</table>
|
</table>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup></script>
|
<script lang="ts" setup>
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="postcss" scoped>
|
<style lang="postcss" scoped>
|
||||||
.story-params-table {
|
.story-params-table {
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
import type { Color } from "@/types";
|
import type { Color, SlotDefinition } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_FORM_INPUT_COLOR,
|
IK_FORM_INPUT_COLOR,
|
||||||
IK_FORM_LABEL_DISABLED,
|
IK_FORM_LABEL_DISABLED,
|
||||||
@@ -73,6 +73,10 @@ import {
|
|||||||
|
|
||||||
defineOptions({ inheritAttrs: false });
|
defineOptions({ inheritAttrs: false });
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
id?: string;
|
id?: string;
|
||||||
|
|||||||
@@ -39,7 +39,6 @@
|
|||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
import type { Color } from "@/types";
|
import type { Color } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_FORM_HAS_LABEL,
|
|
||||||
IK_FORM_INPUT_COLOR,
|
IK_FORM_INPUT_COLOR,
|
||||||
IK_FORM_LABEL_DISABLED,
|
IK_FORM_LABEL_DISABLED,
|
||||||
IK_INPUT_ID,
|
IK_INPUT_ID,
|
||||||
@@ -47,9 +46,7 @@ import {
|
|||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
|
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { uniqueId } from "lodash-es";
|
import { uniqueId } from "lodash-es";
|
||||||
import { computed, provide, useSlots } from "vue";
|
import { computed, provide } from "vue";
|
||||||
|
|
||||||
const slots = useSlots();
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
label?: string;
|
label?: string;
|
||||||
@@ -79,11 +76,6 @@ const color = computed<Color | undefined>(() => {
|
|||||||
|
|
||||||
provide(IK_FORM_INPUT_COLOR, color);
|
provide(IK_FORM_INPUT_COLOR, color);
|
||||||
|
|
||||||
provide(
|
|
||||||
IK_FORM_HAS_LABEL,
|
|
||||||
computed(() => slots.label !== undefined)
|
|
||||||
);
|
|
||||||
|
|
||||||
provide(
|
provide(
|
||||||
IK_FORM_LABEL_DISABLED,
|
IK_FORM_LABEL_DISABLED,
|
||||||
computed(() => props.disabled ?? false)
|
computed(() => props.disabled ?? false)
|
||||||
|
|||||||
@@ -6,9 +6,14 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import FormInput from "@/components/form/FormInput.vue";
|
import FormInput from "@/components/form/FormInput.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import { IK_INPUT_TYPE } from "@/types/injection-keys";
|
import { IK_INPUT_TYPE } from "@/types/injection-keys";
|
||||||
import { provide } from "vue";
|
import { provide } from "vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
provide(IK_INPUT_TYPE, "select");
|
provide(IK_INPUT_TYPE, "select");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,13 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon?: IconDefinition;
|
icon?: IconDefinition;
|
||||||
}>();
|
}>();
|
||||||
|
|||||||
@@ -24,10 +24,16 @@
|
|||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
import { vTooltip } from "@/directives/tooltip.directive";
|
import { vTooltip } from "@/directives/tooltip.directive";
|
||||||
import { hasEllipsis } from "@/libs/utils";
|
import { hasEllipsis } from "@/libs/utils";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import { computed, ref } from "vue";
|
import { computed, ref } from "vue";
|
||||||
import type { RouteLocationRaw } from "vue-router";
|
import type { RouteLocationRaw } from "vue-router";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
actions: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon: IconDefinition;
|
icon: IconDefinition;
|
||||||
route: RouteLocationRaw;
|
route: RouteLocationRaw;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<slot :is-open="isOpen" :open="open" name="trigger" />
|
<slot :is-open="isOpen" :open="open" name="trigger" />
|
||||||
<Teleport to="body" :disabled="!shouldTeleport">
|
<Teleport :disabled="!shouldTeleport" to="body">
|
||||||
<ul
|
<ul
|
||||||
v-if="!hasTrigger || isOpen"
|
v-if="!hasTrigger || isOpen"
|
||||||
ref="menu"
|
ref="menu"
|
||||||
@@ -14,15 +14,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_CLOSE_MENU,
|
IK_CLOSE_MENU,
|
||||||
IK_MENU_DISABLED,
|
IK_MENU_DISABLED,
|
||||||
IK_MENU_HORIZONTAL,
|
IK_MENU_HORIZONTAL,
|
||||||
IK_MENU_TELEPORTED,
|
IK_MENU_TELEPORTED,
|
||||||
} from "@/types/injection-keys";
|
} from "@/types/injection-keys";
|
||||||
|
import { onClickOutside, unrefElement, whenever } from "@vueuse/core";
|
||||||
import placementJs, { type Options } from "placement.js";
|
import placementJs, { type Options } from "placement.js";
|
||||||
import { computed, inject, nextTick, provide, ref, useSlots } from "vue";
|
import { computed, inject, nextTick, provide, ref, useSlots } from "vue";
|
||||||
import { onClickOutside, unrefElement, whenever } from "@vueuse/core";
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
trigger: SlotDefinition<{
|
||||||
|
isOpen: boolean;
|
||||||
|
open: (event: MouseEvent) => void;
|
||||||
|
}>;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
horizontal?: boolean;
|
horizontal?: boolean;
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
import AppMenu from "@/components/menu/AppMenu.vue";
|
import AppMenu from "@/components/menu/AppMenu.vue";
|
||||||
import MenuTrigger from "@/components/menu/MenuTrigger.vue";
|
import MenuTrigger from "@/components/menu/MenuTrigger.vue";
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_CLOSE_MENU,
|
IK_CLOSE_MENU,
|
||||||
IK_MENU_DISABLED,
|
IK_MENU_DISABLED,
|
||||||
@@ -45,6 +46,11 @@ import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
|||||||
import { faAngleDown, faAngleRight } from "@fortawesome/free-solid-svg-icons";
|
import { faAngleDown, faAngleRight } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { computed, inject, ref } from "vue";
|
import { computed, inject, ref } from "vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
submenu?: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
icon?: IconDefinition;
|
icon?: IconDefinition;
|
||||||
onClick?: () => any;
|
onClick?: () => any;
|
||||||
|
|||||||
@@ -6,9 +6,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
active?: boolean;
|
active?: boolean;
|
||||||
busy?: boolean;
|
busy?: boolean;
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
'has-icon': icon !== undefined,
|
'has-icon': icon !== undefined,
|
||||||
}"
|
}"
|
||||||
:disabled="isBusy || isDisabled"
|
:disabled="isBusy || isDisabled"
|
||||||
type="button"
|
|
||||||
class="ui-action-button"
|
class="ui-action-button"
|
||||||
|
type="button"
|
||||||
>
|
>
|
||||||
<UiIcon :busy="isBusy" :icon="icon" />
|
<UiIcon :busy="isBusy" :icon="icon" />
|
||||||
<slot />
|
<slot />
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_BUTTON_GROUP_BUSY,
|
IK_BUTTON_GROUP_BUSY,
|
||||||
IK_BUTTON_GROUP_DISABLED,
|
IK_BUTTON_GROUP_DISABLED,
|
||||||
@@ -24,6 +25,10 @@ import {
|
|||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import { computed, inject } from "vue";
|
import { computed, inject } from "vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
busy?: boolean;
|
busy?: boolean;
|
||||||
|
|||||||
@@ -6,9 +6,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import type { SlotDefinition } from "@/types";
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
icon?: IconDefinition;
|
icon?: IconDefinition;
|
||||||
}>();
|
}>();
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
|
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
||||||
import UiSpinner from "@/components/ui/UiSpinner.vue";
|
import UiSpinner from "@/components/ui/UiSpinner.vue";
|
||||||
|
import type { Color, SlotDefinition } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_BUTTON_GROUP_BUSY,
|
IK_BUTTON_GROUP_BUSY,
|
||||||
IK_BUTTON_GROUP_COLOR,
|
IK_BUTTON_GROUP_COLOR,
|
||||||
@@ -22,10 +24,12 @@ import {
|
|||||||
IK_BUTTON_GROUP_OUTLINED,
|
IK_BUTTON_GROUP_OUTLINED,
|
||||||
IK_BUTTON_GROUP_TRANSPARENT,
|
IK_BUTTON_GROUP_TRANSPARENT,
|
||||||
} from "@/types/injection-keys";
|
} from "@/types/injection-keys";
|
||||||
import { computed, inject } from "vue";
|
|
||||||
import type { Color } from "@/types";
|
|
||||||
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
import type { IconDefinition } from "@fortawesome/fontawesome-common-types";
|
||||||
import UiIcon from "@/components/ui/icon/UiIcon.vue";
|
import { computed, inject } from "vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import type { Color } from "@/types";
|
import type { Color, SlotDefinition } from "@/types";
|
||||||
import {
|
import {
|
||||||
IK_BUTTON_GROUP_BUSY,
|
IK_BUTTON_GROUP_BUSY,
|
||||||
IK_BUTTON_GROUP_COLOR,
|
IK_BUTTON_GROUP_COLOR,
|
||||||
@@ -15,6 +15,9 @@ import {
|
|||||||
} from "@/types/injection-keys";
|
} from "@/types/injection-keys";
|
||||||
import { computed, provide } from "vue";
|
import { computed, provide } from "vue";
|
||||||
|
|
||||||
|
defineSlots<{
|
||||||
|
default: SlotDefinition;
|
||||||
|
}>();
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
busy?: boolean;
|
busy?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
|||||||
@@ -1 +1,6 @@
|
|||||||
export type Color = "info" | "error" | "warning" | "success";
|
export type Color = "info" | "error" | "warning" | "success";
|
||||||
|
|
||||||
|
export type SlotDefinition<
|
||||||
|
T extends Record<string, unknown> = Record<string, never>,
|
||||||
|
R = any
|
||||||
|
> = (props: T) => R;
|
||||||
|
|||||||
Reference in New Issue
Block a user