@wire-ui/vue 0.1.0

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.
Files changed (160) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +311 -0
  3. package/dist/components/accordion/Accordion.types.d.ts +52 -0
  4. package/dist/components/accordion/AccordionContent.vue.d.ts +22 -0
  5. package/dist/components/accordion/AccordionItem.vue.d.ts +23 -0
  6. package/dist/components/accordion/AccordionRoot.vue.d.ts +31 -0
  7. package/dist/components/accordion/AccordionTrigger.vue.d.ts +17 -0
  8. package/dist/components/accordion/index.d.ts +137 -0
  9. package/dist/components/accordion/keys.d.ts +6 -0
  10. package/dist/components/alert/Alert.types.d.ts +27 -0
  11. package/dist/components/alert/AlertDescription.vue.d.ts +17 -0
  12. package/dist/components/alert/AlertDismiss.vue.d.ts +17 -0
  13. package/dist/components/alert/AlertRoot.vue.d.ts +28 -0
  14. package/dist/components/alert/AlertTitle.vue.d.ts +17 -0
  15. package/dist/components/alert/index.d.ts +101 -0
  16. package/dist/components/alert/keys.d.ts +4 -0
  17. package/dist/components/avatar/Avatar.types.d.ts +20 -0
  18. package/dist/components/avatar/AvatarFallback.vue.d.ts +22 -0
  19. package/dist/components/avatar/AvatarImage.vue.d.ts +9 -0
  20. package/dist/components/avatar/AvatarRoot.vue.d.ts +17 -0
  21. package/dist/components/avatar/index.d.ts +59 -0
  22. package/dist/components/avatar/keys.d.ts +8 -0
  23. package/dist/components/badge/Badge.types.d.ts +8 -0
  24. package/dist/components/badge/Badge.vue.d.ts +7 -0
  25. package/dist/components/badge/index.d.ts +2 -0
  26. package/dist/components/button/Button.types.d.ts +13 -0
  27. package/dist/components/button/Button.vue.d.ts +29 -0
  28. package/dist/components/button/index.d.ts +2 -0
  29. package/dist/components/card/Card.types.d.ts +9 -0
  30. package/dist/components/card/Card.vue.d.ts +21 -0
  31. package/dist/components/card/index.d.ts +2 -0
  32. package/dist/components/checkbox/Checkbox.types.d.ts +29 -0
  33. package/dist/components/checkbox/CheckboxIndicator.vue.d.ts +17 -0
  34. package/dist/components/checkbox/CheckboxItem.vue.d.ts +23 -0
  35. package/dist/components/checkbox/CheckboxLabel.vue.d.ts +17 -0
  36. package/dist/components/checkbox/CheckboxRoot.vue.d.ts +25 -0
  37. package/dist/components/checkbox/index.d.ts +107 -0
  38. package/dist/components/checkbox/keys.d.ts +6 -0
  39. package/dist/components/divider/Divider.types.d.ts +15 -0
  40. package/dist/components/divider/Divider.vue.d.ts +9 -0
  41. package/dist/components/divider/index.d.ts +2 -0
  42. package/dist/components/drawer/Drawer.types.d.ts +24 -0
  43. package/dist/components/drawer/DrawerClose.vue.d.ts +17 -0
  44. package/dist/components/drawer/DrawerContent.vue.d.ts +17 -0
  45. package/dist/components/drawer/DrawerHeader.vue.d.ts +17 -0
  46. package/dist/components/drawer/DrawerOverlay.vue.d.ts +17 -0
  47. package/dist/components/drawer/DrawerPortal.vue.d.ts +20 -0
  48. package/dist/components/drawer/DrawerRoot.vue.d.ts +26 -0
  49. package/dist/components/drawer/index.d.ts +135 -0
  50. package/dist/components/drawer/keys.d.ts +4 -0
  51. package/dist/components/dropdown/Dropdown.types.d.ts +19 -0
  52. package/dist/components/dropdown/DropdownMenu.vue.d.ts +21 -0
  53. package/dist/components/dropdown/DropdownRoot.vue.d.ts +30 -0
  54. package/dist/components/dropdown/DropdownTrigger.vue.d.ts +17 -0
  55. package/dist/components/dropdown/index.d.ts +86 -0
  56. package/dist/components/dropdown/keys.d.ts +4 -0
  57. package/dist/components/icon/Icon.types.d.ts +14 -0
  58. package/dist/components/icon/Icon.vue.d.ts +9 -0
  59. package/dist/components/icon/index.d.ts +3 -0
  60. package/dist/components/image/Image.types.d.ts +13 -0
  61. package/dist/components/image/Image.vue.d.ts +8 -0
  62. package/dist/components/image/index.d.ts +2 -0
  63. package/dist/components/index.d.ts +26 -0
  64. package/dist/components/input/Input.types.d.ts +34 -0
  65. package/dist/components/input/InputError.vue.d.ts +17 -0
  66. package/dist/components/input/InputField.vue.d.ts +2 -0
  67. package/dist/components/input/InputLabel.vue.d.ts +17 -0
  68. package/dist/components/input/InputRoot.vue.d.ts +35 -0
  69. package/dist/components/input/index.d.ts +106 -0
  70. package/dist/components/input/keys.d.ts +4 -0
  71. package/dist/components/list/List.types.d.ts +11 -0
  72. package/dist/components/list/List.vue.d.ts +24 -0
  73. package/dist/components/list/index.d.ts +2 -0
  74. package/dist/components/modal/Modal.types.d.ts +21 -0
  75. package/dist/components/modal/ModalClose.vue.d.ts +17 -0
  76. package/dist/components/modal/ModalContent.vue.d.ts +17 -0
  77. package/dist/components/modal/ModalOverlay.vue.d.ts +17 -0
  78. package/dist/components/modal/ModalPortal.vue.d.ts +20 -0
  79. package/dist/components/modal/ModalRoot.vue.d.ts +26 -0
  80. package/dist/components/modal/index.d.ts +118 -0
  81. package/dist/components/modal/keys.d.ts +4 -0
  82. package/dist/components/otp/OTP.types.d.ts +27 -0
  83. package/dist/components/otp/OTPRoot.vue.d.ts +31 -0
  84. package/dist/components/otp/OTPSeparator.vue.d.ts +17 -0
  85. package/dist/components/otp/OTPSlot.vue.d.ts +5 -0
  86. package/dist/components/otp/index.d.ts +81 -0
  87. package/dist/components/otp/keys.d.ts +4 -0
  88. package/dist/components/password/Password.types.d.ts +36 -0
  89. package/dist/components/password/PasswordError.vue.d.ts +17 -0
  90. package/dist/components/password/PasswordField.vue.d.ts +2 -0
  91. package/dist/components/password/PasswordLabel.vue.d.ts +17 -0
  92. package/dist/components/password/PasswordRoot.vue.d.ts +33 -0
  93. package/dist/components/password/PasswordToggle.vue.d.ts +17 -0
  94. package/dist/components/password/index.d.ts +117 -0
  95. package/dist/components/password/keys.d.ts +4 -0
  96. package/dist/components/progress-bar/ProgressBar.types.d.ts +9 -0
  97. package/dist/components/progress-bar/ProgressBar.vue.d.ts +9 -0
  98. package/dist/components/progress-bar/index.d.ts +2 -0
  99. package/dist/components/radio/Radio.types.d.ts +29 -0
  100. package/dist/components/radio/RadioIndicator.vue.d.ts +17 -0
  101. package/dist/components/radio/RadioItem.vue.d.ts +23 -0
  102. package/dist/components/radio/RadioLabel.vue.d.ts +17 -0
  103. package/dist/components/radio/RadioRoot.vue.d.ts +23 -0
  104. package/dist/components/radio/index.d.ts +101 -0
  105. package/dist/components/radio/keys.d.ts +6 -0
  106. package/dist/components/rating/Rating.types.d.ts +10 -0
  107. package/dist/components/rating/Rating.vue.d.ts +16 -0
  108. package/dist/components/rating/index.d.ts +2 -0
  109. package/dist/components/search/Search.types.d.ts +46 -0
  110. package/dist/components/search/SearchContent.vue.d.ts +17 -0
  111. package/dist/components/search/SearchEmpty.vue.d.ts +17 -0
  112. package/dist/components/search/SearchInput.vue.d.ts +2 -0
  113. package/dist/components/search/SearchItem.vue.d.ts +21 -0
  114. package/dist/components/search/SearchRoot.vue.d.ts +45 -0
  115. package/dist/components/search/index.d.ts +146 -0
  116. package/dist/components/search/keys.d.ts +4 -0
  117. package/dist/components/select/Select.types.d.ts +42 -0
  118. package/dist/components/select/SelectContent.vue.d.ts +17 -0
  119. package/dist/components/select/SelectGroup.vue.d.ts +17 -0
  120. package/dist/components/select/SelectGroupLabel.vue.d.ts +17 -0
  121. package/dist/components/select/SelectItem.vue.d.ts +24 -0
  122. package/dist/components/select/SelectRoot.vue.d.ts +32 -0
  123. package/dist/components/select/SelectSeparator.vue.d.ts +2 -0
  124. package/dist/components/select/SelectTrigger.vue.d.ts +17 -0
  125. package/dist/components/select/SelectValue.vue.d.ts +7 -0
  126. package/dist/components/select/index.d.ts +163 -0
  127. package/dist/components/select/keys.d.ts +4 -0
  128. package/dist/components/switch/Switch.types.d.ts +14 -0
  129. package/dist/components/switch/SwitchRoot.vue.d.ts +28 -0
  130. package/dist/components/switch/SwitchThumb.vue.d.ts +2 -0
  131. package/dist/components/switch/index.d.ts +51 -0
  132. package/dist/components/switch/keys.d.ts +4 -0
  133. package/dist/components/textarea/Textarea.types.d.ts +34 -0
  134. package/dist/components/textarea/TextareaError.vue.d.ts +17 -0
  135. package/dist/components/textarea/TextareaField.vue.d.ts +2 -0
  136. package/dist/components/textarea/TextareaLabel.vue.d.ts +17 -0
  137. package/dist/components/textarea/TextareaRoot.vue.d.ts +35 -0
  138. package/dist/components/textarea/index.d.ts +106 -0
  139. package/dist/components/textarea/keys.d.ts +4 -0
  140. package/dist/components/timeago/Timeago.types.d.ts +29 -0
  141. package/dist/components/timeago/Timeago.vue.d.ts +23 -0
  142. package/dist/components/timeago/index.d.ts +2 -0
  143. package/dist/components/tooltip/Tooltip.types.d.ts +17 -0
  144. package/dist/components/tooltip/TooltipContent.vue.d.ts +22 -0
  145. package/dist/components/tooltip/TooltipRoot.vue.d.ts +28 -0
  146. package/dist/components/tooltip/TooltipTrigger.vue.d.ts +17 -0
  147. package/dist/components/tooltip/index.d.ts +96 -0
  148. package/dist/components/tooltip/keys.d.ts +4 -0
  149. package/dist/composables/index.d.ts +3 -0
  150. package/dist/composables/use-click-outside.d.ts +2 -0
  151. package/dist/composables/use-interactive-state.d.ts +48 -0
  152. package/dist/index.d.ts +30 -0
  153. package/dist/types/common.d.ts +19 -0
  154. package/dist/types/index.d.ts +1 -0
  155. package/dist/utils/helper.d.ts +3 -0
  156. package/dist/utils/index.d.ts +2 -0
  157. package/dist/utils/merge-props.d.ts +9 -0
  158. package/dist/wire-ui-vue.cjs.js +1 -0
  159. package/dist/wire-ui-vue.es.js +2255 -0
  160. package/package.json +91 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jerald Austero
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,311 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/wire-ui/wire-ui/main/apps/docs/public/images/logo/wire-ui-logo.svg" alt="Wire UI" height="52" />
3
+ </p>
4
+
5
+ <h3 align="center">Wire UI</h3>
6
+
7
+ <p align="center">
8
+ AI-native unstyled primitives framework. Headless, compound components with zero CSS.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://www.npmjs.com/package/@wire-ui/vue"><img src="https://img.shields.io/npm/v/@wire-ui/vue?style=flat-square&colorA=0a0a0a&colorB=0a0a0a" alt="npm version" /></a>
13
+ <a href="https://www.npmjs.com/package/@wire-ui/vue"><img src="https://img.shields.io/npm/dm/@wire-ui/vue?style=flat-square&colorA=0a0a0a&colorB=0a0a0a" alt="npm downloads" /></a>
14
+ <img src="https://img.shields.io/badge/vue-%3E%3D3.5.0-blue?style=flat-square&colorA=0a0a0a&colorB=0a0a0a" alt="vue >= 3.5" />
15
+ <a href="https://github.com/wire-ui/wire-ui/blob/main/packages/vue/LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue?style=flat-square&colorA=0a0a0a&colorB=0a0a0a" alt="MIT license" /></a>
16
+ </p>
17
+
18
+ ---
19
+
20
+ ## What is Wire UI?
21
+
22
+ Wire UI is an AI-native, headless component library. Every component ships with **zero CSS** — style everything using your own classes by targeting `data-*` attributes that reflect interactive state. AI-integrated docs with `llms.txt` and machine-readable API references make it built for AI-assisted workflows.
23
+
24
+ - **AI-native.** AI-integrated docs with `llms.txt`, machine-readable API references, and MCP server support. Built for AI-assisted development.
25
+ - **Unstyled primitives.** No colors, spacing, or fonts baked in. You own every pixel of your design.
26
+ - **Compound components.** Complex widgets use provide/inject with named sub-components, giving you full control over markup structure and element nesting.
27
+ - **State via `data-*` attributes.** Hover, focus, pressed, disabled, open — all exposed as `data-hover`, `data-focus-visible`, `data-active`, etc.
28
+ - **`asChild` polymorphism.** Merge all behaviour onto your own element — perfect for router links, icon buttons, and custom wrappers.
29
+ - **Consumer-owned validation.** Form components expose `invalidType` and `errorMessage` but never validate internally. Your logic, your rules.
30
+
31
+ ## Documentation
32
+
33
+ Full documentation with live examples is at **[wire-ui.com](https://wire-ui.com)**.
34
+
35
+ ---
36
+
37
+ ## Installation
38
+
39
+ ```bash
40
+ npm install @wire-ui/vue
41
+ ```
42
+
43
+ **Peer requirements**
44
+
45
+ ```json
46
+ {
47
+ "vue": ">=3.5.0"
48
+ }
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Quick start
54
+
55
+ ```vue
56
+ <script setup>
57
+ import { Button } from '@wire-ui/vue'
58
+ </script>
59
+
60
+ <template>
61
+ <Button
62
+ class="
63
+ px-4 py-2 rounded-lg bg-indigo-600 text-white font-medium
64
+ [data-hover]:bg-indigo-700
65
+ [data-active]:scale-95
66
+ [data-focus-visible]:ring-2 [data-focus-visible]:ring-indigo-500
67
+ [data-disabled]:opacity-40 [data-disabled]:cursor-not-allowed
68
+ "
69
+ >
70
+ Save changes
71
+ </Button>
72
+ </template>
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Components
78
+
79
+ ### Form inputs
80
+
81
+ | Component | Description |
82
+ |---|---|
83
+ | `Input` | Text input with label, error, and success states |
84
+ | `Textarea` | Multi-line input with the same compound API as Input |
85
+ | `Password` | Input with a built-in show/hide toggle |
86
+ | `Checkbox` | Group and individual checkbox items |
87
+ | `Radio` | Single-selection radio group |
88
+ | `Switch` | Toggle on/off with a thumb element |
89
+ | `OTP` | One-time password input with individual slots |
90
+ | `Select` | Accessible select menu with groups and separators |
91
+ | `Search` | Search input with keyboard-navigable results list |
92
+
93
+ ### Overlay & dialog
94
+
95
+ | Component | Description |
96
+ |---|---|
97
+ | `Modal` | Dialog with Teleport rendering, overlay click-to-close, and Escape key |
98
+ | `Drawer` | Side-panel dialog — same structure as Modal |
99
+ | `Dropdown` | Trigger + floating menu with click-outside support |
100
+ | `Tooltip` | Hover/focus tooltip with configurable delay and side |
101
+
102
+ ### Layout & navigation
103
+
104
+ | Component | Description |
105
+ |---|---|
106
+ | `Accordion` | Collapsible sections — `single` or `multiple` open mode |
107
+ | `Divider` | Horizontal or vertical separator |
108
+
109
+ ### Display
110
+
111
+ | Component | Description |
112
+ |---|---|
113
+ | `Alert` | Dismissible alert with optional auto-dismiss |
114
+ | `Avatar` | Image with a text/initial fallback |
115
+ | `Badge` | Numeric count badge, capped at 9+ |
116
+ | `Card` | Container with optional color and size variants |
117
+ | `Icon` | SVG renderer from a consumer-supplied icon map |
118
+ | `Image` | Image with a loading placeholder |
119
+ | `List` | Ordered/unordered list with optional dividers and striping |
120
+ | `ProgressBar` | Accessible progress indicator |
121
+ | `Rating` | Interactive or read-only star rating |
122
+ | `Timeago` | Relative or formatted timestamp that updates live |
123
+
124
+ ---
125
+
126
+ ## Key concepts
127
+
128
+ ### Data attributes
129
+
130
+ Attributes are present as an **empty string** when active, and **absent** when not — never `"true"` or `"false"`.
131
+
132
+ | Attribute | When present |
133
+ |---|---|
134
+ | `data-hover` | Mouse is over the element |
135
+ | `data-focus-visible` | Keyboard focus (mirrors `:focus-visible`) |
136
+ | `data-active` | Element is being pressed |
137
+ | `data-disabled` | Element is disabled |
138
+ | `data-state` | Open/closed, checked/unchecked — varies per component |
139
+ | `data-invalid` | Consumer-controlled via `invalidType` |
140
+ | `data-success` | Consumer-controlled via `isSuccess` |
141
+
142
+ Style them in Tailwind:
143
+
144
+ ```vue
145
+ <Button class="[data-hover]:bg-blue-700 [data-active]:scale-95 [data-disabled]:opacity-50">
146
+ ```
147
+
148
+ Or in plain CSS:
149
+
150
+ ```css
151
+ button[data-hover] { background: #1d4ed8; }
152
+ button[data-active] { transform: scale(0.95); }
153
+ ```
154
+
155
+ ### Compound components
156
+
157
+ Complex widgets use named sub-components with provide/inject so you control the structure:
158
+
159
+ ```vue
160
+ <InputRoot v-model="email" :invalid-type="error">
161
+ <InputLabel>Email</InputLabel>
162
+ <InputField type="email" placeholder="you@example.com" />
163
+ <InputError />
164
+ </InputRoot>
165
+ ```
166
+
167
+ ### `asChild` polymorphism
168
+
169
+ Pass `asChild` to merge behaviour onto your own element:
170
+
171
+ ```vue
172
+ <!-- Renders as <a> but with all Button data attributes -->
173
+ <Button asChild>
174
+ <a href="/dashboard">Go to dashboard</a>
175
+ </Button>
176
+ ```
177
+
178
+ ### Consumer-owned validation
179
+
180
+ Set `invalidType` to a key and the component renders the matching error message — no internal validation ever runs:
181
+
182
+ ```vue
183
+ <InputRoot
184
+ :invalid-type="error"
185
+ :error-message="{
186
+ required: 'Email is required',
187
+ email: 'Enter a valid email address',
188
+ }"
189
+ >
190
+ <InputField type="email" />
191
+ <InputError />
192
+ </InputRoot>
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Composables
198
+
199
+ ### `useInteractiveState`
200
+
201
+ The same composable used internally by `Button`, `AccordionTrigger`, and `ModalClose` — exported for building your own interactive elements.
202
+
203
+ ```vue
204
+ <script setup>
205
+ import { useInteractiveState } from '@wire-ui/vue'
206
+
207
+ const props = defineProps<{ disabled?: boolean }>()
208
+ const { attrs, handlers } = useInteractiveState({ disabled: props.disabled })
209
+ </script>
210
+
211
+ <template>
212
+ <div
213
+ v-bind="attrs"
214
+ v-on="handlers"
215
+ class="[data-hover]:bg-gray-100 [data-active]:scale-95"
216
+ >
217
+ Card content
218
+ </div>
219
+ </template>
220
+ ```
221
+
222
+ ### `useClickOutside`
223
+
224
+ Fires a callback when the user clicks outside a referenced element.
225
+
226
+ ```vue
227
+ <script setup>
228
+ import { ref } from 'vue'
229
+ import { useClickOutside } from '@wire-ui/vue'
230
+
231
+ const popoverRef = ref<HTMLDivElement | null>(null)
232
+ useClickOutside(popoverRef, () => { open.value = false })
233
+ </script>
234
+
235
+ <template>
236
+ <div ref="popoverRef">Popover content</div>
237
+ </template>
238
+ ```
239
+
240
+ ---
241
+
242
+ ## TypeScript
243
+
244
+ All component props and composable types are exported:
245
+
246
+ ```ts
247
+ import type {
248
+ ButtonProps,
249
+ InputRootProps,
250
+ TextareaRootProps,
251
+ PasswordRootProps,
252
+ ModalRootProps,
253
+ AccordionRootProps,
254
+ SearchOption,
255
+ IconSize,
256
+ Size,
257
+ Status,
258
+ InteractiveStateOptions,
259
+ InteractiveStateResult,
260
+ } from '@wire-ui/vue'
261
+ ```
262
+
263
+ ---
264
+
265
+ ## Development
266
+
267
+ ```bash
268
+ # Install dependencies (from monorepo root)
269
+ npm install
270
+
271
+ # Run Storybook
272
+ npm run storybook
273
+
274
+ # Unit tests (watch mode)
275
+ npm test
276
+
277
+ # Unit tests (single run)
278
+ npm run test:run
279
+
280
+ # Unit tests with coverage
281
+ npm run test:coverage
282
+
283
+ # Type check + build
284
+ npm run build
285
+
286
+ # Lint
287
+ npm run lint
288
+
289
+ # Format
290
+ npm run format
291
+ ```
292
+
293
+ ---
294
+
295
+ ## Community
296
+
297
+ - Follow on X: [@wireuijs](https://x.com/wireuijs)
298
+
299
+ ## Authors
300
+
301
+ - Jerald Austero ([@jaoaustero](https://github.com/jaoaustero))
302
+
303
+ ---
304
+
305
+ ## Contributing
306
+
307
+ See the [contributing guide](../../CONTRIBUTING.md) for local development instructions and pull request guidelines.
308
+
309
+ ## License
310
+
311
+ MIT License © 2025 Wire UI. See [LICENSE](./LICENSE) for details.
@@ -0,0 +1,52 @@
1
+ export interface AccordionContextValue {
2
+ isOpen: (value: string) => boolean;
3
+ toggle: (value: string) => void;
4
+ disabled: boolean;
5
+ }
6
+ export interface AccordionItemContextValue {
7
+ value: string;
8
+ isOpen: boolean;
9
+ disabled: boolean;
10
+ }
11
+ interface AccordionRootBase {
12
+ /** Disables all items */
13
+ disabled?: boolean;
14
+ class?: string;
15
+ }
16
+ interface AccordionRootSingle extends AccordionRootBase {
17
+ type: 'single';
18
+ /** Controlled open value */
19
+ value?: string;
20
+ /** Initial open value (uncontrolled) */
21
+ defaultValue?: string;
22
+ /** Called when the open item changes */
23
+ onChange?: (value: string) => void;
24
+ /** Allow closing the open item by clicking it again (default: false) */
25
+ collapsible?: boolean;
26
+ }
27
+ interface AccordionRootMultiple extends AccordionRootBase {
28
+ type: 'multiple';
29
+ /** Controlled open values */
30
+ value?: string[];
31
+ /** Initial open values (uncontrolled) */
32
+ defaultValue?: string[];
33
+ /** Called when open items change */
34
+ onChange?: (value: string[]) => void;
35
+ }
36
+ export type AccordionRootProps = AccordionRootSingle | AccordionRootMultiple;
37
+ export interface AccordionItemProps {
38
+ /** Unique identifier — must match the value used in Root */
39
+ value: string;
40
+ /** Disables this item only */
41
+ disabled?: boolean;
42
+ class?: string;
43
+ }
44
+ export interface AccordionTriggerProps {
45
+ class?: string;
46
+ }
47
+ export interface AccordionContentProps {
48
+ /** Keep content mounted in the DOM even when closed */
49
+ forceMount?: boolean;
50
+ class?: string;
51
+ }
52
+ export {};
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ forceMount?: boolean;
3
+ };
4
+ declare function __VLS_template(): {
5
+ attrs: Partial<{}>;
6
+ slots: {
7
+ default?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: any;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
14
+ forceMount: boolean;
15
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,23 @@
1
+ type __VLS_Props = {
2
+ value: string;
3
+ disabled?: boolean;
4
+ };
5
+ declare function __VLS_template(): {
6
+ attrs: Partial<{}>;
7
+ slots: {
8
+ default?(_: {}): any;
9
+ };
10
+ refs: {};
11
+ rootEl: HTMLDivElement;
12
+ };
13
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
14
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
15
+ disabled: boolean;
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,31 @@
1
+ type __VLS_Props = {
2
+ type: 'single' | 'multiple';
3
+ value?: string | string[];
4
+ defaultValue?: string | string[];
5
+ onChange?: (value: string | string[]) => void;
6
+ collapsible?: boolean;
7
+ disabled?: boolean;
8
+ };
9
+ declare function __VLS_template(): {
10
+ attrs: Partial<{}>;
11
+ slots: {
12
+ default?(_: {}): any;
13
+ };
14
+ refs: {};
15
+ rootEl: HTMLDivElement;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
19
+ value: string | string[];
20
+ defaultValue: string | string[];
21
+ onChange: (value: string | string[]) => void;
22
+ collapsible: boolean;
23
+ disabled: boolean;
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
+ export default _default;
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLButtonElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,137 @@
1
+ export declare const Accordion: {
2
+ Root: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
4
+ type: "single" | "multiple";
5
+ value?: string | string[];
6
+ defaultValue?: string | string[];
7
+ onChange?: (value: string | string[]) => void;
8
+ collapsible?: boolean;
9
+ disabled?: boolean;
10
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
11
+ value: string | string[];
12
+ defaultValue: string | string[];
13
+ onChange: (value: string | string[]) => void;
14
+ collapsible: boolean;
15
+ disabled: boolean;
16
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
17
+ P: {};
18
+ B: {};
19
+ D: {};
20
+ C: {};
21
+ M: {};
22
+ Defaults: {};
23
+ }, Readonly<{
24
+ type: "single" | "multiple";
25
+ value?: string | string[];
26
+ defaultValue?: string | string[];
27
+ onChange?: (value: string | string[]) => void;
28
+ collapsible?: boolean;
29
+ disabled?: boolean;
30
+ }> & Readonly<{}>, {}, {}, {}, {}, {
31
+ value: string | string[];
32
+ defaultValue: string | string[];
33
+ onChange: (value: string | string[]) => void;
34
+ collapsible: boolean;
35
+ disabled: boolean;
36
+ }>;
37
+ __isFragment?: never;
38
+ __isTeleport?: never;
39
+ __isSuspense?: never;
40
+ } & import('vue').ComponentOptionsBase<Readonly<{
41
+ type: "single" | "multiple";
42
+ value?: string | string[];
43
+ defaultValue?: string | string[];
44
+ onChange?: (value: string | string[]) => void;
45
+ collapsible?: boolean;
46
+ disabled?: boolean;
47
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
48
+ value: string | string[];
49
+ defaultValue: string | string[];
50
+ onChange: (value: string | string[]) => void;
51
+ collapsible: boolean;
52
+ disabled: boolean;
53
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
54
+ $slots: {
55
+ default?(_: {}): any;
56
+ };
57
+ });
58
+ Item: {
59
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
60
+ value: string;
61
+ disabled?: boolean;
62
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
63
+ disabled: boolean;
64
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
65
+ P: {};
66
+ B: {};
67
+ D: {};
68
+ C: {};
69
+ M: {};
70
+ Defaults: {};
71
+ }, Readonly<{
72
+ value: string;
73
+ disabled?: boolean;
74
+ }> & Readonly<{}>, {}, {}, {}, {}, {
75
+ disabled: boolean;
76
+ }>;
77
+ __isFragment?: never;
78
+ __isTeleport?: never;
79
+ __isSuspense?: never;
80
+ } & import('vue').ComponentOptionsBase<Readonly<{
81
+ value: string;
82
+ disabled?: boolean;
83
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
84
+ disabled: boolean;
85
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
86
+ $slots: {
87
+ default?(_: {}): any;
88
+ };
89
+ });
90
+ Trigger: {
91
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLButtonElement, import('vue').ComponentProvideOptions, {
92
+ P: {};
93
+ B: {};
94
+ D: {};
95
+ C: {};
96
+ M: {};
97
+ Defaults: {};
98
+ }, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, {}>;
99
+ __isFragment?: never;
100
+ __isTeleport?: never;
101
+ __isSuspense?: never;
102
+ } & import('vue').ComponentOptionsBase<Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
103
+ $slots: {
104
+ default?(_: {}): any;
105
+ };
106
+ });
107
+ Content: {
108
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
109
+ forceMount?: boolean;
110
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
111
+ forceMount: boolean;
112
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
113
+ P: {};
114
+ B: {};
115
+ D: {};
116
+ C: {};
117
+ M: {};
118
+ Defaults: {};
119
+ }, Readonly<{
120
+ forceMount?: boolean;
121
+ }> & Readonly<{}>, {}, {}, {}, {}, {
122
+ forceMount: boolean;
123
+ }>;
124
+ __isFragment?: never;
125
+ __isTeleport?: never;
126
+ __isSuspense?: never;
127
+ } & import('vue').ComponentOptionsBase<Readonly<{
128
+ forceMount?: boolean;
129
+ }> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
130
+ forceMount: boolean;
131
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
132
+ $slots: {
133
+ default?(_: {}): any;
134
+ };
135
+ });
136
+ };
137
+ export type { AccordionRootProps, AccordionItemProps, AccordionTriggerProps, AccordionContentProps, } from './Accordion.types';
@@ -0,0 +1,6 @@
1
+ import { InjectionKey } from 'vue';
2
+ import { AccordionContextValue, AccordionItemContextValue } from './Accordion.types';
3
+ export declare const AccordionKey: InjectionKey<AccordionContextValue>;
4
+ export declare const AccordionItemKey: InjectionKey<AccordionItemContextValue>;
5
+ export declare function useAccordionContext(): AccordionContextValue;
6
+ export declare function useAccordionItemContext(): AccordionItemContextValue;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Alert Component Types
3
+ */
4
+ export interface AlertContextValue {
5
+ status?: string;
6
+ dismiss: () => void;
7
+ }
8
+ export interface AlertRootProps {
9
+ /** Status data attribute for styling */
10
+ status?: string;
11
+ /** Auto-dismiss after timeout */
12
+ isAutoDismissable?: boolean;
13
+ /** Milliseconds before auto-dismiss (default: 3000) */
14
+ dismissCountdown?: number;
15
+ /** Fired when the alert is dismissed */
16
+ onDismiss?: () => void;
17
+ class?: string;
18
+ }
19
+ export interface AlertTitleProps {
20
+ class?: string;
21
+ }
22
+ export interface AlertDescriptionProps {
23
+ class?: string;
24
+ }
25
+ export interface AlertDismissProps {
26
+ class?: string;
27
+ }
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ attrs: Partial<{}>;
3
+ slots: {
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ rootEl: HTMLParagraphElement;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLParagraphElement>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };