diff --git a/src/components/base/input/Input.vue b/src/components/base/input/Input.vue
index 8e49af25b..b3295bdef 100644
--- a/src/components/base/input/Input.vue
+++ b/src/components/base/input/Input.vue
@@ -1,6 +1,6 @@
+
+
+
+
diff --git a/src/components/base/select/Select.vue b/src/components/base/select/Select.vue
new file mode 100644
index 000000000..df73d354e
--- /dev/null
+++ b/src/components/base/select/Select.vue
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+
diff --git a/src/components/base/select/__tests__/Select.spec.ts b/src/components/base/select/__tests__/Select.spec.ts
new file mode 100644
index 000000000..fa32c0065
--- /dev/null
+++ b/src/components/base/select/__tests__/Select.spec.ts
@@ -0,0 +1,20 @@
+import { describe, expect, it } from "vitest";
+import { VSelect } from "../index";
+import { mount } from "@vue/test-utils";
+
+describe("Select", () => {
+ it("should render", () => {
+ expect(VSelect).toBeDefined();
+ expect(mount(VSelect).html()).toMatchSnapshot();
+ });
+
+ it("should work with size prop", function () {
+ ["lg", "md", "sm", "xs"].forEach((size) => {
+ const select = mount(VSelect, { props: { size } });
+
+ expect(select.html()).toMatchSnapshot();
+ expect(select.find("select").classes()).toContain(`select-${size}`);
+ select.unmount();
+ });
+ });
+});
diff --git a/src/components/base/select/__tests__/__snapshots__/Select.spec.ts.snap b/src/components/base/select/__tests__/__snapshots__/Select.spec.ts.snap
new file mode 100644
index 000000000..0e5cadb01
--- /dev/null
+++ b/src/components/base/select/__tests__/__snapshots__/Select.spec.ts.snap
@@ -0,0 +1,31 @@
+// Vitest Snapshot v1
+
+exports[`Select > should render 1`] = `
+"
"
+`;
+
+exports[`Select > should work with size prop 1`] = `
+""
+`;
+
+exports[`Select > should work with size prop 2`] = `
+""
+`;
+
+exports[`Select > should work with size prop 3`] = `
+""
+`;
+
+exports[`Select > should work with size prop 4`] = `
+""
+`;
diff --git a/src/components/base/select/index.ts b/src/components/base/select/index.ts
new file mode 100644
index 000000000..52a2b33f4
--- /dev/null
+++ b/src/components/base/select/index.ts
@@ -0,0 +1,2 @@
+export { default as VSelect } from "./Select.vue";
+export { default as VOption } from "./Option.vue";
diff --git a/src/components/base/select/interface.ts b/src/components/base/select/interface.ts
new file mode 100644
index 000000000..b14de4e3d
--- /dev/null
+++ b/src/components/base/select/interface.ts
@@ -0,0 +1 @@
+export type Size = "lg" | "md" | "sm" | "xs";
diff --git a/src/router/routes.config.ts b/src/router/routes.config.ts
index 472205178..84d680f04 100644
--- a/src/router/routes.config.ts
+++ b/src/router/routes.config.ts
@@ -1,82 +1,85 @@
import type { RouteRecordRaw } from "vue-router";
+import HomeView from "../views/HomeView.vue";
+import AboutView from "../views/AboutView.vue";
+import ViewComponents from "../views/ViewComponents.vue";
export const routes: Array = [
{
path: "/",
name: "Dashboard",
- component: () => import("../views/HomeView.vue"),
+ component: HomeView,
},
{
path: "/about",
name: "about",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/posts",
name: "Posts",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
children: [
{
path: "/posts/categories",
name: "Categories",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/posts/tags",
name: "Tags",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
],
},
{
path: "/sheets",
name: "Sheets",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/comment",
name: "Comment",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/attachment",
name: "Attachment",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/themes",
name: "Themes",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/menus",
name: "Menus",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/visual",
name: "Visual",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/plugins",
name: "Plugins",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/users",
name: "Users",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/settings",
name: "Settings",
- component: () => import("../views/AboutView.vue"),
+ component: AboutView,
},
{
path: "/components",
name: "Components",
- component: () => import("../views/ViewComponents.vue"),
+ component: ViewComponents,
},
];
diff --git a/src/views/ViewComponents.vue b/src/views/ViewComponents.vue
index 005af8ade..400424b44 100644
--- a/src/views/ViewComponents.vue
+++ b/src/views/ViewComponents.vue
@@ -37,29 +37,71 @@
Danger
-
+
Input
Size:
-
-
-
-
+
+
+
+
- With Icon:
+
+
+
+
+
+
+
+
+
+
+
+ Disabled:
-
-
-
-
-
-
-
-
+
+
+
+
+ Select
+ Size:
+
+
+
+ {{ option.label }}
+
+
Disabled:
-
+
+
+ {{ option.label }}
+
+
@@ -70,5 +112,20 @@
import { FilledLayout } from "../layouts";
import { VButton } from "@/components/base/button";
import { VInput } from "@/components/base/input";
-import { IconDashboard } from "@/core/icons";
+import { VSelect, VOption } from "@/components/base/select";
+import { ref } from "vue";
+
+const inputValue = ref();
+const selectValue = ref();
+
+const selectData = [
+ {
+ value: "1",
+ label: "1",
+ },
+ {
+ value: "2",
+ label: "2",
+ },
+];