@vifui/core 0.4.0-alpha.6
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/README.md +204 -0
- package/dist/components/accordion/accordion-body.vue.d.ts +29 -0
- package/dist/components/accordion/accordion-body.vue.js +27 -0
- package/dist/components/accordion/accordion-body.vue2.js +5 -0
- package/dist/components/accordion/accordion-content.vue.d.ts +29 -0
- package/dist/components/accordion/accordion-content.vue.js +26 -0
- package/dist/components/accordion/accordion-content.vue2.js +5 -0
- package/dist/components/accordion/accordion-header.vue.d.ts +30 -0
- package/dist/components/accordion/accordion-header.vue.js +28 -0
- package/dist/components/accordion/accordion-header.vue2.js +5 -0
- package/dist/components/accordion/accordion-indicator.vue.d.ts +32 -0
- package/dist/components/accordion/accordion-indicator.vue.js +22 -0
- package/dist/components/accordion/accordion-indicator.vue2.js +5 -0
- package/dist/components/accordion/accordion-item.vue.d.ts +54 -0
- package/dist/components/accordion/accordion-item.vue.js +30 -0
- package/dist/components/accordion/accordion-item.vue2.js +5 -0
- package/dist/components/accordion/accordion-root.vue.d.ts +94 -0
- package/dist/components/accordion/accordion-root.vue.js +55 -0
- package/dist/components/accordion/accordion-root.vue2.js +5 -0
- package/dist/components/accordion/accordion-trigger.vue.d.ts +44 -0
- package/dist/components/accordion/accordion-trigger.vue.js +30 -0
- package/dist/components/accordion/accordion-trigger.vue2.js +5 -0
- package/dist/components/accordion/accordion.styles.d.ts +99 -0
- package/dist/components/accordion/accordion.styles.js +42 -0
- package/dist/components/accordion/index.d.ts +15 -0
- package/dist/components/accordion/index.js +8 -0
- package/dist/components/alert/alert-body.vue.d.ts +16 -0
- package/dist/components/alert/alert-body.vue.js +54 -0
- package/dist/components/alert/alert-body.vue2.js +5 -0
- package/dist/components/alert/alert-close.vue.d.ts +12 -0
- package/dist/components/alert/alert-close.vue.js +38 -0
- package/dist/components/alert/alert-close.vue2.js +5 -0
- package/dist/components/alert/alert-content.vue.d.ts +28 -0
- package/dist/components/alert/alert-content.vue.js +54 -0
- package/dist/components/alert/alert-content.vue2.js +5 -0
- package/dist/components/alert/alert-description.vue.d.ts +16 -0
- package/dist/components/alert/alert-description.vue.js +41 -0
- package/dist/components/alert/alert-description.vue2.js +5 -0
- package/dist/components/alert/alert-footer.vue.d.ts +16 -0
- package/dist/components/alert/alert-footer.vue.js +54 -0
- package/dist/components/alert/alert-footer.vue2.js +5 -0
- package/dist/components/alert/alert-header.vue.d.ts +16 -0
- package/dist/components/alert/alert-header.vue.js +54 -0
- package/dist/components/alert/alert-header.vue2.js +5 -0
- package/dist/components/alert/alert-icon.vue.d.ts +8 -0
- package/dist/components/alert/alert-icon.vue.js +43 -0
- package/dist/components/alert/alert-icon.vue2.js +5 -0
- package/dist/components/alert/alert-root.vue.d.ts +48 -0
- package/dist/components/alert/alert-root.vue.js +57 -0
- package/dist/components/alert/alert-root.vue2.js +5 -0
- package/dist/components/alert/alert-title.vue.d.ts +16 -0
- package/dist/components/alert/alert-title.vue.js +41 -0
- package/dist/components/alert/alert-title.vue2.js +5 -0
- package/dist/components/alert/alert.styles.d.ts +96 -0
- package/dist/components/alert/alert.styles.js +147 -0
- package/dist/components/alert/index.d.ts +19 -0
- package/dist/components/alert/index.js +10 -0
- package/dist/components/avatar/avatar-fallback.vue.d.ts +14 -0
- package/dist/components/avatar/avatar-fallback.vue.js +35 -0
- package/dist/components/avatar/avatar-fallback.vue2.js +5 -0
- package/dist/components/avatar/avatar-group.vue.d.ts +20 -0
- package/dist/components/avatar/avatar-group.vue.js +101 -0
- package/dist/components/avatar/avatar-group.vue2.js +5 -0
- package/dist/components/avatar/avatar-image.vue.d.ts +14 -0
- package/dist/components/avatar/avatar-image.vue.js +37 -0
- package/dist/components/avatar/avatar-image.vue2.js +5 -0
- package/dist/components/avatar/avatar-root.vue.d.ts +57 -0
- package/dist/components/avatar/avatar-root.vue.js +102 -0
- package/dist/components/avatar/avatar-root.vue2.js +5 -0
- package/dist/components/avatar/avatar.styles.d.ts +209 -0
- package/dist/components/avatar/avatar.styles.js +50 -0
- package/dist/components/avatar/index.d.ts +9 -0
- package/dist/components/avatar/index.js +5 -0
- package/dist/components/badge/badge.styles.d.ts +87 -0
- package/dist/components/badge/badge.styles.js +41 -0
- package/dist/components/badge/badge.vue.d.ts +116 -0
- package/dist/components/badge/badge.vue.js +79 -0
- package/dist/components/badge/badge.vue2.js +5 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue.d.ts +29 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue.js +28 -0
- package/dist/components/breadcrumb/breadcrumb-current-link.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue.js +27 -0
- package/dist/components/breadcrumb/breadcrumb-item.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +53 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue.js +30 -0
- package/dist/components/breadcrumb/breadcrumb-link.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +28 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue.js +27 -0
- package/dist/components/breadcrumb/breadcrumb-list.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +78 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue.js +39 -0
- package/dist/components/breadcrumb/breadcrumb-root.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +41 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue.js +32 -0
- package/dist/components/breadcrumb/breadcrumb-separator.vue2.js +5 -0
- package/dist/components/breadcrumb/breadcrumb.styles.d.ts +144 -0
- package/dist/components/breadcrumb/breadcrumb.styles.js +58 -0
- package/dist/components/breadcrumb/index.d.ts +13 -0
- package/dist/components/breadcrumb/index.js +7 -0
- package/dist/components/button/button.styles.d.ts +90 -0
- package/dist/components/button/button.styles.js +41 -0
- package/dist/components/button/button.vue.d.ts +144 -0
- package/dist/components/button/button.vue.js +131 -0
- package/dist/components/button/button.vue2.js +5 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/card/card-body.vue.d.ts +29 -0
- package/dist/components/card/card-body.vue.js +27 -0
- package/dist/components/card/card-body.vue2.js +5 -0
- package/dist/components/card/card-footer.vue.d.ts +29 -0
- package/dist/components/card/card-footer.vue.js +27 -0
- package/dist/components/card/card-footer.vue2.js +5 -0
- package/dist/components/card/card-header.vue.d.ts +29 -0
- package/dist/components/card/card-header.vue.js +27 -0
- package/dist/components/card/card-header.vue2.js +5 -0
- package/dist/components/card/card-media.vue.d.ts +44 -0
- package/dist/components/card/card-media.vue.js +56 -0
- package/dist/components/card/card-media.vue2.js +5 -0
- package/dist/components/card/card-root.vue.d.ts +128 -0
- package/dist/components/card/card-root.vue.js +58 -0
- package/dist/components/card/card-root.vue2.js +5 -0
- package/dist/components/card/card.styles.d.ts +216 -0
- package/dist/components/card/card.styles.js +86 -0
- package/dist/components/card/index.d.ts +11 -0
- package/dist/components/card/index.js +6 -0
- package/dist/components/checkbox/checkbox-group-item.vue.d.ts +22 -0
- package/dist/components/checkbox/checkbox-group-item.vue.js +27 -0
- package/dist/components/checkbox/checkbox-group-item.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-group.vue.d.ts +35 -0
- package/dist/components/checkbox/checkbox-group.vue.js +53 -0
- package/dist/components/checkbox/checkbox-group.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-indicator.vue.d.ts +40 -0
- package/dist/components/checkbox/checkbox-indicator.vue.js +58 -0
- package/dist/components/checkbox/checkbox-indicator.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-label.vue.d.ts +27 -0
- package/dist/components/checkbox/checkbox-label.vue.js +24 -0
- package/dist/components/checkbox/checkbox-label.vue2.js +5 -0
- package/dist/components/checkbox/checkbox-root.vue.d.ts +42 -0
- package/dist/components/checkbox/checkbox-root.vue.js +51 -0
- package/dist/components/checkbox/checkbox-root.vue2.js +5 -0
- package/dist/components/checkbox/checkbox.styles.d.ts +155 -0
- package/dist/components/checkbox/checkbox.styles.js +66 -0
- package/dist/components/checkbox/index.d.ts +11 -0
- package/dist/components/checkbox/index.js +6 -0
- package/dist/components/divider/divider.styles.d.ts +93 -0
- package/dist/components/divider/divider.styles.js +43 -0
- package/dist/components/divider/divider.vue.d.ts +89 -0
- package/dist/components/divider/divider.vue.js +51 -0
- package/dist/components/divider/divider.vue2.js +5 -0
- package/dist/components/divider/index.d.ts +3 -0
- package/dist/components/divider/index.js +2 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.js +2 -0
- package/dist/components/spinner/spinner.styles.d.ts +112 -0
- package/dist/components/spinner/spinner.styles.js +47 -0
- package/dist/components/spinner/spinner.vue.d.ts +31 -0
- package/dist/components/spinner/spinner.vue.js +102 -0
- package/dist/components/spinner/spinner.vue2.js +5 -0
- package/dist/components/types/shared-types.d.ts +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +54 -0
- package/package.json +94 -0
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# @vifui/core
|
|
2
|
+
|
|
3
|
+
> 🚀 Beautiful and modern Vue UI library built with Tailwind CSS 4.0, inspired by Vuesax.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@vifui/core)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
## ⚠️ Alpha Notice
|
|
9
|
+
|
|
10
|
+
This library is in active development and currently in alpha stage. APIs may change between releases.
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
✨ **10+ High-Quality Components** - Built with Vue 3 Composition API
|
|
15
|
+
🎨 **Vuesax-Inspired Design** - Beautiful, modern aesthetic
|
|
16
|
+
⚡ **Tailwind CSS 4.0** - Utility-first styling with CSS variables
|
|
17
|
+
♿ **Accessible** - Built on Reka UI primitives (Radix Vue)
|
|
18
|
+
🎯 **TypeScript** - Full type safety
|
|
19
|
+
🌙 **Dark Mode** - Built-in theme support
|
|
20
|
+
📦 **Tree-shakeable** - Import only what you need
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# npm
|
|
26
|
+
npm install @vifui/core @vifui/styles
|
|
27
|
+
|
|
28
|
+
# pnpm
|
|
29
|
+
pnpm add @vifui/core @vifui/styles
|
|
30
|
+
|
|
31
|
+
# yarn
|
|
32
|
+
yarn add @vifui/core @vifui/styles
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Peer Dependencies
|
|
36
|
+
|
|
37
|
+
Make sure you have these installed:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npm install vue@^3.4.0 tailwindcss@^4.0.0 @iconify/vue@^4.0.0
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
### 1. Import Styles
|
|
46
|
+
|
|
47
|
+
In your `main.js` or `App.vue`:
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
import '@vifui/core/styles'
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2. Use Components
|
|
54
|
+
|
|
55
|
+
```vue
|
|
56
|
+
<script setup>
|
|
57
|
+
import { Button, Badge, Card } from '@vifui/core'
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<template>
|
|
61
|
+
<Card>
|
|
62
|
+
<CardHeader>
|
|
63
|
+
<h3>Welcome to VifUI</h3>
|
|
64
|
+
</CardHeader>
|
|
65
|
+
<CardBody>
|
|
66
|
+
<p>Beautiful components for Vue 3</p>
|
|
67
|
+
<Badge color="success">New</Badge>
|
|
68
|
+
</CardBody>
|
|
69
|
+
<CardFooter>
|
|
70
|
+
<Button color="brand">Get Started</Button>
|
|
71
|
+
</CardFooter>
|
|
72
|
+
</Card>
|
|
73
|
+
</template>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Available Components
|
|
77
|
+
|
|
78
|
+
### ✅ Ready to Use
|
|
79
|
+
|
|
80
|
+
- **Button** - Versatile button with variants, sizes, and colors
|
|
81
|
+
- **Badge** - Status indicators and labels
|
|
82
|
+
- **Accordion** - Collapsible content panels
|
|
83
|
+
- **Alert** - Contextual feedback messages
|
|
84
|
+
- **Avatar** - User profile images with fallbacks
|
|
85
|
+
- **Breadcrumb** - Navigation hierarchy
|
|
86
|
+
- **Card** - Content containers with media support
|
|
87
|
+
- **Checkbox** - Selection controls with indeterminate state
|
|
88
|
+
- **Divider** - Visual content separators
|
|
89
|
+
- **Spinner** - Loading indicators
|
|
90
|
+
|
|
91
|
+
### 🚧 Coming Soon
|
|
92
|
+
|
|
93
|
+
- Radio
|
|
94
|
+
- Switch
|
|
95
|
+
- Input
|
|
96
|
+
- Select
|
|
97
|
+
- Dialog
|
|
98
|
+
- Dropdown
|
|
99
|
+
- Tabs
|
|
100
|
+
- Tooltip
|
|
101
|
+
- And more...
|
|
102
|
+
|
|
103
|
+
## Component Example
|
|
104
|
+
|
|
105
|
+
```vue
|
|
106
|
+
<script setup>
|
|
107
|
+
import { ref } from 'vue'
|
|
108
|
+
import {
|
|
109
|
+
AlertRoot,
|
|
110
|
+
AlertIcon,
|
|
111
|
+
AlertContent,
|
|
112
|
+
AlertHeader,
|
|
113
|
+
AlertTitle,
|
|
114
|
+
AlertDescription,
|
|
115
|
+
Button
|
|
116
|
+
} from '@vifui/core'
|
|
117
|
+
|
|
118
|
+
const showAlert = ref(true)
|
|
119
|
+
</script>
|
|
120
|
+
|
|
121
|
+
<template>
|
|
122
|
+
<AlertRoot
|
|
123
|
+
v-model:visible="showAlert"
|
|
124
|
+
variant="soft"
|
|
125
|
+
color="success"
|
|
126
|
+
>
|
|
127
|
+
<AlertIcon icon="lucide:check-circle" />
|
|
128
|
+
<AlertContent>
|
|
129
|
+
<AlertHeader>
|
|
130
|
+
<AlertTitle>Success!</AlertTitle>
|
|
131
|
+
<AlertDescription>
|
|
132
|
+
Your changes have been saved.
|
|
133
|
+
</AlertDescription>
|
|
134
|
+
</AlertHeader>
|
|
135
|
+
</AlertContent>
|
|
136
|
+
</AlertRoot>
|
|
137
|
+
</template>
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Theming
|
|
141
|
+
|
|
142
|
+
VifUI uses Tailwind CSS 4.0 with CSS variables for theming:
|
|
143
|
+
|
|
144
|
+
```css
|
|
145
|
+
/* Customize theme colors */
|
|
146
|
+
:root {
|
|
147
|
+
--primary: oklch(0.61 0.2 263.6);
|
|
148
|
+
--success: oklch(0.77 0.2 145.5);
|
|
149
|
+
--warning: oklch(0.82 0.18 83.7);
|
|
150
|
+
--danger: oklch(0.62 0.22 10);
|
|
151
|
+
}
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Dark mode is automatically supported through Tailwind's `dark:` variants.
|
|
155
|
+
|
|
156
|
+
## Documentation
|
|
157
|
+
|
|
158
|
+
Full documentation coming soon at **vifui.com**
|
|
159
|
+
|
|
160
|
+
For now, explore our [Storybook examples](https://github.com/I-am-abdulazeez/vifui) in the repository.
|
|
161
|
+
|
|
162
|
+
## TypeScript Support
|
|
163
|
+
|
|
164
|
+
All components are built with TypeScript and include full type definitions:
|
|
165
|
+
|
|
166
|
+
```typescript
|
|
167
|
+
import type { ButtonProps, CardRootProps } from '@vifui/core'
|
|
168
|
+
|
|
169
|
+
const buttonProps: ButtonProps = {
|
|
170
|
+
color: 'brand',
|
|
171
|
+
size: 'lg',
|
|
172
|
+
variant: 'solid'
|
|
173
|
+
}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Browser Support
|
|
177
|
+
|
|
178
|
+
- Chrome (latest)
|
|
179
|
+
- Firefox (latest)
|
|
180
|
+
- Safari (latest)
|
|
181
|
+
- Edge (latest)
|
|
182
|
+
|
|
183
|
+
## Contributing
|
|
184
|
+
|
|
185
|
+
Contributions are welcome! This is an alpha project and we'd love your feedback.
|
|
186
|
+
|
|
187
|
+
1. Fork the repository
|
|
188
|
+
2. Create your feature branch
|
|
189
|
+
3. Make your changes
|
|
190
|
+
4. Submit a pull request
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
MIT © [AbdulAzeez Olamide](https://github.com/I-am-abdulazeez)
|
|
195
|
+
|
|
196
|
+
## Acknowledgments
|
|
197
|
+
|
|
198
|
+
- Inspired by [Vuesax](https://vuesax.com/)
|
|
199
|
+
- Built with [Reka UI](https://reka-ui.com/) (Radix Vue)
|
|
200
|
+
- Styled with [Tailwind CSS](https://tailwindcss.com/)
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
Made with ❤️ by the VifUI team
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the VifUI AccordionBody component.
|
|
3
|
+
* Serves as a wrapper for the main content inside an accordion item.
|
|
4
|
+
* Can be used to structure content within `AccordionContent`.
|
|
5
|
+
*/
|
|
6
|
+
export interface AccordionBodyProps {
|
|
7
|
+
/**
|
|
8
|
+
* Custom class names for the body wrapper.
|
|
9
|
+
* Applied directly to the outer `<div>` element.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```vue
|
|
13
|
+
* <AccordionBody class="p-4 text-gray-700" />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
declare var __VLS_1: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_1) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_component: import("vue").DefineComponent<AccordionBodyProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionBodyProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { defineComponent, inject, createElementBlock, openBlock, normalizeClass, unref, renderSlot } from 'vue';
|
|
2
|
+
|
|
3
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "accordion-body",
|
|
5
|
+
props: {
|
|
6
|
+
class: { type: String, required: false }
|
|
7
|
+
},
|
|
8
|
+
setup(__props) {
|
|
9
|
+
const props = __props;
|
|
10
|
+
const slots = inject("accordionSlots", null);
|
|
11
|
+
return (_ctx, _cache) => {
|
|
12
|
+
return openBlock(), createElementBlock(
|
|
13
|
+
"div",
|
|
14
|
+
{
|
|
15
|
+
class: normalizeClass([unref(slots)?.body?.(), props.class])
|
|
16
|
+
},
|
|
17
|
+
[
|
|
18
|
+
renderSlot(_ctx.$slots, "default")
|
|
19
|
+
],
|
|
20
|
+
2
|
|
21
|
+
/* CLASS */
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the VifUI AccordionContent component.
|
|
3
|
+
* Represents the collapsible content section of an accordion item.
|
|
4
|
+
* Typically paired with `AccordionTrigger` inside an `AccordionItem`.
|
|
5
|
+
*/
|
|
6
|
+
export interface AccordionContentProps {
|
|
7
|
+
/**
|
|
8
|
+
* Custom class names for the content wrapper.
|
|
9
|
+
* Applied directly to the `<RekaAccordionContent>` element.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```vue
|
|
13
|
+
* <AccordionContent class="p-4 bg-gray-50" />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
declare var __VLS_6: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_6) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_component: import("vue").DefineComponent<AccordionContentProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionContentProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
26
|
+
new (): {
|
|
27
|
+
$slots: S;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent, inject, createBlock, openBlock, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { AccordionContent } from 'reka-ui';
|
|
3
|
+
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "accordion-content",
|
|
6
|
+
props: {
|
|
7
|
+
class: { type: String, required: false }
|
|
8
|
+
},
|
|
9
|
+
setup(__props) {
|
|
10
|
+
const props = __props;
|
|
11
|
+
const slots = inject("accordionSlots", null);
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return openBlock(), createBlock(unref(AccordionContent), {
|
|
14
|
+
class: normalizeClass([unref(slots)?.content?.(), props.class])
|
|
15
|
+
}, {
|
|
16
|
+
default: withCtx(() => [
|
|
17
|
+
renderSlot(_ctx.$slots, "default")
|
|
18
|
+
]),
|
|
19
|
+
_: 3
|
|
20
|
+
/* FORWARDED */
|
|
21
|
+
}, 8, ["class"]);
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type AccordionHeaderProps as RekaAccordionHeaderProps } from "reka-ui";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the VifUI AccordionHeader component.
|
|
4
|
+
* Serves as the wrapper for the accordion trigger and title,
|
|
5
|
+
* and extends the base Reka UI `AccordionHeaderProps`.
|
|
6
|
+
*/
|
|
7
|
+
export interface AccordionHeaderProps extends RekaAccordionHeaderProps {
|
|
8
|
+
/**
|
|
9
|
+
* Custom class names for the header wrapper.
|
|
10
|
+
* Applied directly to the `<RekaAccordionHeader>` element.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```vue
|
|
14
|
+
* <AccordionHeader class="bg-gray-50 px-4 py-2" />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
class?: string;
|
|
18
|
+
}
|
|
19
|
+
declare var __VLS_6: {};
|
|
20
|
+
type __VLS_Slots = {} & {
|
|
21
|
+
default?: (props: typeof __VLS_6) => any;
|
|
22
|
+
};
|
|
23
|
+
declare const __VLS_component: import("vue").DefineComponent<AccordionHeaderProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionHeaderProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent, inject, createBlock, openBlock, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { AccordionHeader } from 'reka-ui';
|
|
3
|
+
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "accordion-header",
|
|
6
|
+
props: {
|
|
7
|
+
class: { type: String, required: false },
|
|
8
|
+
asChild: { type: Boolean, required: false },
|
|
9
|
+
as: { type: null, required: false }
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const slots = inject("accordionSlots", null);
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
return openBlock(), createBlock(unref(AccordionHeader), {
|
|
16
|
+
class: normalizeClass([unref(slots)?.header?.(), props.class])
|
|
17
|
+
}, {
|
|
18
|
+
default: withCtx(() => [
|
|
19
|
+
renderSlot(_ctx.$slots, "default")
|
|
20
|
+
]),
|
|
21
|
+
_: 3
|
|
22
|
+
/* FORWARDED */
|
|
23
|
+
}, 8, ["class"]);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the VifUI AccordionIndicator component.
|
|
3
|
+
* Renders the visual indicator (typically a chevron) for
|
|
4
|
+
* accordion items, showing their expanded/collapsed state.
|
|
5
|
+
*/
|
|
6
|
+
export interface AccordionIndicatorProps {
|
|
7
|
+
/**
|
|
8
|
+
* Custom icon to use instead of the default chevron.
|
|
9
|
+
* Accepts any Iconify icon name.
|
|
10
|
+
*
|
|
11
|
+
* @default "lucide:chevron-down"
|
|
12
|
+
* @example
|
|
13
|
+
* ```vue
|
|
14
|
+
* <AccordionIndicator icon="mdi:arrow-up-bold" />
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
icon?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Custom class names for the indicator icon.
|
|
20
|
+
* Applied directly to the `<Icon>` component.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```vue
|
|
24
|
+
* <AccordionIndicator class="text-primary-600" />
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
class?: string;
|
|
28
|
+
}
|
|
29
|
+
declare const _default: import("vue").DefineComponent<AccordionIndicatorProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionIndicatorProps> & Readonly<{}>, {
|
|
30
|
+
icon: string;
|
|
31
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineComponent, inject, createBlock, openBlock, unref, normalizeClass } from 'vue';
|
|
2
|
+
import { Icon } from '@iconify/vue';
|
|
3
|
+
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "accordion-indicator",
|
|
6
|
+
props: {
|
|
7
|
+
icon: { type: String, required: false, default: "lucide:chevron-down" },
|
|
8
|
+
class: { type: String, required: false }
|
|
9
|
+
},
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const props = __props;
|
|
12
|
+
const slots = inject("accordionSlots", null);
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createBlock(unref(Icon), {
|
|
15
|
+
icon: __props.icon,
|
|
16
|
+
class: normalizeClass([unref(slots)?.icon?.(), props.class])
|
|
17
|
+
}, null, 8, ["icon", "class"]);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for the VifUI AccordionItem component.
|
|
3
|
+
* Represents a single accordion section that can expand or collapse,
|
|
4
|
+
* controlled by its associated trigger and content components.
|
|
5
|
+
*/
|
|
6
|
+
export interface AccordionItemProps {
|
|
7
|
+
/**
|
|
8
|
+
* A unique identifier for the accordion item.
|
|
9
|
+
* Used to control expansion state in both controlled
|
|
10
|
+
* and uncontrolled accordion modes.
|
|
11
|
+
*
|
|
12
|
+
* @required
|
|
13
|
+
* @example
|
|
14
|
+
* ```vue
|
|
15
|
+
* <AccordionItem value="account-settings" />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
value: string;
|
|
19
|
+
/**
|
|
20
|
+
* Disables this specific accordion item.
|
|
21
|
+
* Prevents interaction and disables its trigger.
|
|
22
|
+
*
|
|
23
|
+
* @default false
|
|
24
|
+
* @example
|
|
25
|
+
* ```vue
|
|
26
|
+
* <AccordionItem value="billing" disabled />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Custom class names for the accordion item wrapper.
|
|
32
|
+
* Applied directly to the `<RekaAccordionItem>` element.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```vue
|
|
36
|
+
* <AccordionItem class="border-b" />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
class?: string;
|
|
40
|
+
}
|
|
41
|
+
declare var __VLS_6: {};
|
|
42
|
+
type __VLS_Slots = {} & {
|
|
43
|
+
default?: (props: typeof __VLS_6) => any;
|
|
44
|
+
};
|
|
45
|
+
declare const __VLS_component: import("vue").DefineComponent<AccordionItemProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<AccordionItemProps> & Readonly<{}>, {
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
48
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
49
|
+
export default _default;
|
|
50
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent, inject, createBlock, openBlock, unref, normalizeClass, withCtx, renderSlot } from 'vue';
|
|
2
|
+
import { AccordionItem } from 'reka-ui';
|
|
3
|
+
|
|
4
|
+
var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
|
+
__name: "accordion-item",
|
|
6
|
+
props: {
|
|
7
|
+
value: { type: String, required: true },
|
|
8
|
+
disabled: { type: Boolean, required: false, default: false },
|
|
9
|
+
class: { type: String, required: false }
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
const props = __props;
|
|
13
|
+
const slots = inject("accordionSlots", null);
|
|
14
|
+
return (_ctx, _cache) => {
|
|
15
|
+
return openBlock(), createBlock(unref(AccordionItem), {
|
|
16
|
+
value: __props.value,
|
|
17
|
+
disabled: __props.disabled,
|
|
18
|
+
class: normalizeClass([unref(slots)?.item?.(), props.class])
|
|
19
|
+
}, {
|
|
20
|
+
default: withCtx(() => [
|
|
21
|
+
renderSlot(_ctx.$slots, "default")
|
|
22
|
+
]),
|
|
23
|
+
_: 3
|
|
24
|
+
/* FORWARDED */
|
|
25
|
+
}, 8, ["value", "disabled", "class"]);
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { AccordionVariantProps } from "./accordion.styles";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the VifUI AccordionRoot component.
|
|
4
|
+
* Serves as the main container that manages accordion behavior,
|
|
5
|
+
* state, orientation, and overall styling.
|
|
6
|
+
*/
|
|
7
|
+
export interface AccordionRootProps {
|
|
8
|
+
/**
|
|
9
|
+
* Defines the visual style of the accordion.
|
|
10
|
+
* Maps to style variants from `accordion.styles`.
|
|
11
|
+
*
|
|
12
|
+
* @default "default"
|
|
13
|
+
*/
|
|
14
|
+
variant?: AccordionVariantProps["variant"];
|
|
15
|
+
/**
|
|
16
|
+
* Controls the overall accordion size.
|
|
17
|
+
* Determines paddings, icon sizes, and text sizing.
|
|
18
|
+
*
|
|
19
|
+
* @default "md"
|
|
20
|
+
*/
|
|
21
|
+
size?: AccordionVariantProps["size"];
|
|
22
|
+
/**
|
|
23
|
+
* Controls the expanded accordion item(s) in controlled usage.
|
|
24
|
+
* Accepts a single string for `"single"` mode, or an array for `"multiple"` mode.
|
|
25
|
+
*/
|
|
26
|
+
modelValue?: string | string[];
|
|
27
|
+
/**
|
|
28
|
+
* Default expanded item(s) for uncontrolled usage.
|
|
29
|
+
* Ignored when `modelValue` is provided.
|
|
30
|
+
*/
|
|
31
|
+
defaultValue?: string | string[];
|
|
32
|
+
/**
|
|
33
|
+
* Determines accordion expansion behavior.
|
|
34
|
+
* `"single"` allows only one item open — `"multiple"` allows many.
|
|
35
|
+
*
|
|
36
|
+
* @default "single"
|
|
37
|
+
*/
|
|
38
|
+
type?: "single" | "multiple";
|
|
39
|
+
/**
|
|
40
|
+
* When using `"single"` mode, allows closing the currently open item.
|
|
41
|
+
*
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
collapsible?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Disables the entire accordion.
|
|
47
|
+
* Prevents expanding or collapsing items.
|
|
48
|
+
*
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Custom class names for extending or overriding styles.
|
|
54
|
+
* Applied directly to the accordion root element.
|
|
55
|
+
*/
|
|
56
|
+
class?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Orientation of the accordion layout.
|
|
59
|
+
* `"vertical"` stacks items top-to-bottom — `"horizontal"` arranges them side-by-side.
|
|
60
|
+
*
|
|
61
|
+
* @default "vertical"
|
|
62
|
+
*/
|
|
63
|
+
orientation?: "vertical" | "horizontal";
|
|
64
|
+
/**
|
|
65
|
+
* Document direction, useful for RTL layouts.
|
|
66
|
+
*
|
|
67
|
+
* @default "ltr"
|
|
68
|
+
*/
|
|
69
|
+
dir?: "ltr" | "rtl";
|
|
70
|
+
}
|
|
71
|
+
declare var __VLS_10: {};
|
|
72
|
+
type __VLS_Slots = {} & {
|
|
73
|
+
default?: (props: typeof __VLS_10) => any;
|
|
74
|
+
};
|
|
75
|
+
declare const __VLS_component: import("vue").DefineComponent<AccordionRootProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
76
|
+
"update:modelValue": (value: string | string[] | undefined) => any;
|
|
77
|
+
}, string, import("vue").PublicProps, Readonly<AccordionRootProps> & Readonly<{
|
|
78
|
+
"onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
|
|
79
|
+
}>, {
|
|
80
|
+
size: "sm" | "md" | "lg";
|
|
81
|
+
variant: "shadow" | "default" | "flat" | "bordered";
|
|
82
|
+
type: "single" | "multiple";
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
collapsible: boolean;
|
|
85
|
+
orientation: "vertical" | "horizontal";
|
|
86
|
+
dir: "ltr" | "rtl";
|
|
87
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
88
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
89
|
+
export default _default;
|
|
90
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
91
|
+
new (): {
|
|
92
|
+
$slots: S;
|
|
93
|
+
};
|
|
94
|
+
};
|