Mega recruitment pipeline overhaul
This commit is contained in:
31
ui/src/components/ui/stepper/Stepper.vue
Normal file
31
ui/src/components/ui/stepper/Stepper.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperRoot, useForwardPropsEmits } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
defaultValue: { type: Number, required: false },
|
||||
orientation: { type: String, required: false },
|
||||
dir: { type: String, required: false },
|
||||
modelValue: { type: Number, required: false },
|
||||
linear: { type: Boolean, required: false },
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
const emits = defineEmits(["update:modelValue"]);
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardPropsEmits(delegatedProps, emits);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperRoot
|
||||
v-slot="slotProps"
|
||||
:class="cn('flex gap-2', props.class)"
|
||||
v-bind="forwarded"
|
||||
>
|
||||
<slot v-bind="slotProps" />
|
||||
</StepperRoot>
|
||||
</template>
|
||||
25
ui/src/components/ui/stepper/StepperDescription.vue
Normal file
25
ui/src/components/ui/stepper/StepperDescription.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperDescription, useForwardProps } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperDescription
|
||||
v-slot="slotProps"
|
||||
v-bind="forwarded"
|
||||
:class="cn('text-xs text-muted-foreground', props.class)"
|
||||
>
|
||||
<slot v-bind="slotProps" />
|
||||
</StepperDescription>
|
||||
</template>
|
||||
36
ui/src/components/ui/stepper/StepperIndicator.vue
Normal file
36
ui/src/components/ui/stepper/StepperIndicator.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperIndicator, useForwardProps } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperIndicator
|
||||
v-slot="slotProps"
|
||||
v-bind="forwarded"
|
||||
:class="
|
||||
cn(
|
||||
'inline-flex items-center justify-center rounded-full text-muted-foreground/50 w-8 h-8',
|
||||
// Disabled
|
||||
'group-data-[disabled]:text-muted-foreground group-data-[disabled]:opacity-50',
|
||||
// Active
|
||||
'group-data-[state=active]:bg-primary group-data-[state=active]:text-primary-foreground',
|
||||
// Completed
|
||||
'group-data-[state=completed]:bg-accent group-data-[state=completed]:text-accent-foreground',
|
||||
props.class,
|
||||
)
|
||||
"
|
||||
>
|
||||
<slot v-bind="slotProps" />
|
||||
</StepperIndicator>
|
||||
</template>
|
||||
33
ui/src/components/ui/stepper/StepperItem.vue
Normal file
33
ui/src/components/ui/stepper/StepperItem.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperItem, useForwardProps } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
step: { type: Number, required: true },
|
||||
disabled: { type: Boolean, required: false },
|
||||
completed: { type: Boolean, required: false },
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperItem
|
||||
v-slot="slotProps"
|
||||
v-bind="forwarded"
|
||||
:class="
|
||||
cn(
|
||||
'flex items-center gap-2 group data-[disabled]:pointer-events-none',
|
||||
props.class,
|
||||
)
|
||||
"
|
||||
>
|
||||
<slot v-bind="slotProps" />
|
||||
</StepperItem>
|
||||
</template>
|
||||
33
ui/src/components/ui/stepper/StepperSeparator.vue
Normal file
33
ui/src/components/ui/stepper/StepperSeparator.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperSeparator, useForwardProps } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
orientation: { type: String, required: false },
|
||||
decorative: { type: Boolean, required: false },
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperSeparator
|
||||
v-bind="forwarded"
|
||||
:class="
|
||||
cn(
|
||||
'bg-muted',
|
||||
// Disabled
|
||||
'group-data-[disabled]:bg-muted group-data-[disabled]:opacity-50',
|
||||
// Completed
|
||||
'group-data-[state=completed]:bg-accent',
|
||||
props.class,
|
||||
)
|
||||
"
|
||||
/>
|
||||
</template>
|
||||
24
ui/src/components/ui/stepper/StepperTitle.vue
Normal file
24
ui/src/components/ui/stepper/StepperTitle.vue
Normal file
@@ -0,0 +1,24 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperTitle, useForwardProps } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperTitle
|
||||
v-bind="forwarded"
|
||||
:class="cn('text-md font-semibold whitespace-nowrap', props.class)"
|
||||
>
|
||||
<slot />
|
||||
</StepperTitle>
|
||||
</template>
|
||||
29
ui/src/components/ui/stepper/StepperTrigger.vue
Normal file
29
ui/src/components/ui/stepper/StepperTrigger.vue
Normal file
@@ -0,0 +1,29 @@
|
||||
<script setup>
|
||||
import { reactiveOmit } from "@vueuse/core";
|
||||
import { StepperTrigger, useForwardProps } from "reka-ui";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
const props = defineProps({
|
||||
asChild: { type: Boolean, required: false },
|
||||
as: { type: null, required: false },
|
||||
class: { type: null, required: false },
|
||||
});
|
||||
|
||||
const delegatedProps = reactiveOmit(props, "class");
|
||||
|
||||
const forwarded = useForwardProps(delegatedProps);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<StepperTrigger
|
||||
v-bind="forwarded"
|
||||
:class="
|
||||
cn(
|
||||
'p-1 flex flex-col items-center text-center gap-1 rounded-md',
|
||||
props.class,
|
||||
)
|
||||
"
|
||||
>
|
||||
<slot />
|
||||
</StepperTrigger>
|
||||
</template>
|
||||
7
ui/src/components/ui/stepper/index.js
Normal file
7
ui/src/components/ui/stepper/index.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export { default as Stepper } from "./Stepper.vue";
|
||||
export { default as StepperDescription } from "./StepperDescription.vue";
|
||||
export { default as StepperIndicator } from "./StepperIndicator.vue";
|
||||
export { default as StepperItem } from "./StepperItem.vue";
|
||||
export { default as StepperSeparator } from "./StepperSeparator.vue";
|
||||
export { default as StepperTitle } from "./StepperTitle.vue";
|
||||
export { default as StepperTrigger } from "./StepperTrigger.vue";
|
||||
Reference in New Issue
Block a user