Skip to content

Commit 912b1e7

Browse files
authored
Merge pull request #33 from StaticMania/new-component
Update: Update old component, Doc for component and add Select and InputOTP component.
2 parents a6de839 + 99b1ae6 commit 912b1e7

File tree

121 files changed

+11875
-244
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+11875
-244
lines changed

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
## Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
### v1.1.0
6+
7+
We are thrilled to announce the initial release of Keep vue, our open-source component library built on Vue and Tailwind CSS. This release marks the beginning of our journey in providing a collection of pre-designed UI components to simplify web application development.
8+
9+
### Key Features
10+
11+
- **Basic Components**: Our library includes a set of essential UI components, such as buttons, modals, alerts, and more.
12+
13+
- **Seamless Integration**: Keep Vue is designed to seamlessly integrate with your React projects. Just install the library and start using the components.
14+
15+
- **Tailwind CSS Integration**: Our components come with Tailwind CSS styles, making it easy to maintain and customize the look and feel of your app.
16+
17+
### v1.1.0 (2025-02-05)
18+
19+
### Features
20+
21+
- **`<AvatarFallback>`** component added to the Avatar component.
22+
- **Button Component:** New variants added - `default` and `softBg`.
23+
- **Checkbox Component:** API documentation updated.
24+
- **`<CarouselDotButton>`** component API added.
25+
- **Drawer Component:** API updated.
26+
- **Dropdown Component:** Added three new variants:
27+
- **Dropdown Submenu**
28+
- **Dropdown with Radio**
29+
- **Dropdown with Checkbox**
30+
- **Renamed:** `<DropdownList>` is now `<DropdownAction>`.
31+
- **Dropdown Component:** API documentation updated.
32+
- **Input Component:** API documentation updated.
33+
- **New Component:** `<InputOTP>` added.
34+
- **Radio Component:** API updated.
35+
- **New Component:** `<Select>` added.
36+
37+
---
38+
39+
### Bug Fixes
40+
41+
- **Switch Component:** Fixed prop suggestion issues.
42+
- **Input Component:** Resolved issue with capturing input values.

Routes/routes.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ export const docsRoutes = ref<RouterPath[]>([
133133
tag: false,
134134
deprecate: false,
135135
},
136+
{
137+
id: generatedID.v4(),
138+
name: "Input OTP",
139+
href: "/docs/components/input-otp",
140+
tag: false,
141+
deprecate: false,
142+
},
136143
{
137144
id: generatedID.v4(),
138145
name: "Modal",
@@ -193,6 +200,13 @@ export const docsRoutes = ref<RouterPath[]>([
193200
tag: false,
194201
deprecate: false,
195202
},
203+
{
204+
id: generatedID.v4(),
205+
name: "Select",
206+
href: "/docs/components/select",
207+
tag: false,
208+
deprecate: false,
209+
},
196210

197211
{
198212
id: generatedID.v4(),

components/Command/CommandInput.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ defineOptions({
1414
1515
const props = defineProps<ComboboxInputProps & ClassProps>();
1616
17-
const delegatedProps = computed(() => {
18-
const { class: _, ...delegated } = props;
17+
const restProps = computed(() => {
18+
const { class: _, ...rest } = props;
1919
20-
return delegated;
20+
return rest;
2121
});
2222
23-
const forwardedProps = useForwardProps(delegatedProps);
23+
const forwardedProps = useForwardProps(restProps);
2424
</script>
2525

2626
<template>
@@ -36,7 +36,7 @@ const forwardedProps = useForwardProps(delegatedProps);
3636
height="32"
3737
viewBox="0 0 256 256">
3838
<path
39-
d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"></path>
39+
d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z" />
4040
</svg>
4141
<ComboboxInput
4242
v-bind="{ ...forwardedProps, ...$attrs }"

components/HeaderComponent.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { docsRoutes, gettingStaredRoutes, navbarRoutes } from "~/Routes/routes";
44
import {
55
buttonVariants,
66
Drawer,
7+
DrawerAction,
78
DrawerClose,
89
DrawerContent,
910
DrawerDescription,
1011
DrawerTitle,
11-
DrawerTrigger,
1212
} from "~/src";
1313
import { cn } from "~/src/utils/cn";
1414
import SearchBar from "./SearchBar.vue";
@@ -113,7 +113,7 @@ const isActive = (str: string): boolean => {
113113

114114
<!-- mobile drawer -->
115115
<Drawer v-model:open="active" position="right">
116-
<DrawerTrigger as-child>
116+
<DrawerAction as-child>
117117
<button
118118
class="rounded-lg border border-metal-100 bg-white p-2.5 transition-all duration-300 hover:bg-metal-25 laptop:hidden dark:border-metal-800 dark:bg-metal-900 dark:hover:border-metal-600 dark:hover:bg-metal-900"
119119
@click="() => (active = true)">
@@ -129,7 +129,7 @@ const isActive = (str: string): boolean => {
129129
class="text-metal-900 dark:text-white" />
130130
</span>
131131
</button>
132-
</DrawerTrigger>
132+
</DrawerAction>
133133

134134
<DrawerContent
135135
class="w-full overflow-y-auto overflow-x-hidden sm:w-1/2 lg:hidden dark:border-metal-900 dark:bg-metal-900">

components/content/ComponentApiTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
interface ComponentApiProps {
2+
export interface ComponentApiProps {
33
id: number;
44
propsName: string;
55
propsDescription: string;

components/content/docs/components/button/ButtonApi.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,23 @@ const buttonApiData = ref([
1010
{
1111
id: 2,
1212
propsName: "variant",
13-
propsType: ["link", "outline"],
13+
propsType: ["default", "link", "outline", "softBg"],
1414
propsDescription: "Variant of the button.",
15-
default: "outline",
15+
default: "default",
1616
},
1717
{
1818
id: 3,
1919
propsName: "shape",
2020
propsType: ["circle", "icon"],
2121
propsDescription: "Apply circular styling to the button.",
22-
default: "circle",
22+
default: "",
2323
},
2424
{
2525
id: 4,
2626
propsName: "position",
2727
propsType: ["start", "end", "center"],
2828
propsDescription: "Position of the button within a button group.",
29-
default: "start",
29+
default: "",
3030
},
3131
{
3232
id: 5,

components/content/docs/components/button/buttonCode.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ import { Button } from "keep-vue";
1515
</template>`,
1616
};
1717

18+
const buttonSoftBgVariantCode = {
19+
"ButtonComponent.vue": `<script setup>
20+
import { Button } from "keep-vue";
21+
</script>
22+
<template>
23+
<Button color="primary" variant="softBg">Click here</Button>
24+
</template>`,
25+
};
26+
1827
const buttonColorVariantCode = {
1928
"ButtonComponent.vue": `<script setup>
2029
import { Button } from "keep-vue";
@@ -119,13 +128,14 @@ import { Button } from "keep-vue";
119128
};
120129

121130
export {
122-
ButtonWithLeftSideIcon,
123-
ButtonWithRightSideIcon,
124131
buttonColorVariantCode,
125132
buttonLinkVariantCode,
126133
buttonOutlineVariantCode,
127134
buttonPrimaryCode,
128135
buttonRadiusVariantCode,
129136
buttonShapeVariantCode,
130137
buttonSizeVariantCode,
138+
buttonSoftBgVariantCode,
139+
ButtonWithLeftSideIcon,
140+
ButtonWithRightSideIcon,
131141
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<script lang="ts" setup>
2+
import CodeHighlightWithPreview from "~/components/content/CodeHighlightWithPreview.vue";
3+
import { Button } from "~/src";
4+
import { buttonSoftBgVariantCode } from "../buttonCode";
5+
</script>
6+
<template>
7+
<CodeHighlightWithPreview :code="buttonSoftBgVariantCode">
8+
<div
9+
class="flex h-32 flex-wrap items-center justify-center gap-2 gap-y-4 p-4">
10+
<Button color="primary" variant="softBg">Click here</Button>
11+
</div>
12+
</CodeHighlightWithPreview>
13+
</template>

components/content/docs/components/carousel/CarouselApi.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@ const carouselDataApi = [
77
propsName: "options",
88
propsType: "EmblaOptionsType",
99
propsDescription: "Embla carousel options.",
10-
default: "{}",
1110
},
1211
{
1312
id: 2,
1413
propsName: "plugins",
1514
propsType: "EmblaPluginType[]",
1615
propsDescription: "Embla carousel plugins for adding more variants.",
17-
default: "",
1816
},
1917
{
2018
id: 3,
21-
propsName: "carouselViewportClasses",
19+
propsName: "view-port-class",
2220
propsType: "String",
2321
propsDescription: "Customize the viewport of the carousel container",
24-
default: `''`,
2522
},
2623
];
2724
</script>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<script lang="ts" setup>
2+
import ComponentApiTable from "~/components/content/ComponentApiTable.vue";
3+
4+
const carouselIndicatorsApi = [
5+
{
6+
id: 1,
7+
propsName: " dot-button-style",
8+
propsType: "string",
9+
propsDescription:
10+
"Add your own class to style the dot button. Use data-[active=true] and data-[active=false] to apply specific styles to the dot buttons.",
11+
},
12+
];
13+
</script>
14+
15+
<template>
16+
<ComponentApiTable :data="carouselIndicatorsApi" />
17+
</template>

0 commit comments

Comments
 (0)