@neobrut-vue/core 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.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +335 -0
- package/dist/components/NbAccordion/NbAccordion.vue.d.ts +30 -0
- package/dist/components/NbAccordion/NbAccordionItem.vue.d.ts +24 -0
- package/dist/components/NbAccordion/index.d.ts +2 -0
- package/dist/components/NbAlert/NbAlert.vue.d.ts +30 -0
- package/dist/components/NbAlert/index.d.ts +1 -0
- package/dist/components/NbAspectRatio/NbAspectRatio.vue.d.ts +22 -0
- package/dist/components/NbAspectRatio/index.d.ts +1 -0
- package/dist/components/NbAvatar/NbAvatar.vue.d.ts +13 -0
- package/dist/components/NbAvatar/index.d.ts +1 -0
- package/dist/components/NbBadge/NbBadge.vue.d.ts +26 -0
- package/dist/components/NbBadge/index.d.ts +1 -0
- package/dist/components/NbBreadcrumbs/NbBreadcrumbs.vue.d.ts +12 -0
- package/dist/components/NbBreadcrumbs/index.d.ts +2 -0
- package/dist/components/NbButton/NbButton.vue.d.ts +32 -0
- package/dist/components/NbButton/index.d.ts +1 -0
- package/dist/components/NbCard/NbCard.vue.d.ts +27 -0
- package/dist/components/NbCard/index.d.ts +1 -0
- package/dist/components/NbCheckbox/NbCheckbox.vue.d.ts +15 -0
- package/dist/components/NbCheckbox/index.d.ts +1 -0
- package/dist/components/NbCombobox/NbCombobox.vue.d.ts +30 -0
- package/dist/components/NbCombobox/index.d.ts +2 -0
- package/dist/components/NbDialog/NbDialog.vue.d.ts +35 -0
- package/dist/components/NbDialog/index.d.ts +1 -0
- package/dist/components/NbDropdownMenu/NbDropdownMenu.vue.d.ts +35 -0
- package/dist/components/NbDropdownMenu/NbDropdownMenuItem.vue.d.ts +28 -0
- package/dist/components/NbDropdownMenu/NbDropdownMenuSeparator.vue.d.ts +2 -0
- package/dist/components/NbDropdownMenu/index.d.ts +3 -0
- package/dist/components/NbEmptyState/NbEmptyState.vue.d.ts +22 -0
- package/dist/components/NbEmptyState/index.d.ts +1 -0
- package/dist/components/NbFieldset/NbFieldset.vue.d.ts +24 -0
- package/dist/components/NbFieldset/index.d.ts +1 -0
- package/dist/components/NbInput/NbInput.vue.d.ts +17 -0
- package/dist/components/NbInput/index.d.ts +1 -0
- package/dist/components/NbInputGroup/NbInputGroup.vue.d.ts +19 -0
- package/dist/components/NbInputGroup/index.d.ts +1 -0
- package/dist/components/NbNumberInput/NbNumberInput.vue.d.ts +26 -0
- package/dist/components/NbNumberInput/index.d.ts +1 -0
- package/dist/components/NbPagination/NbPagination.vue.d.ts +21 -0
- package/dist/components/NbPagination/index.d.ts +1 -0
- package/dist/components/NbPopover/NbPopover.vue.d.ts +36 -0
- package/dist/components/NbPopover/index.d.ts +1 -0
- package/dist/components/NbProgress/NbProgress.vue.d.ts +13 -0
- package/dist/components/NbProgress/index.d.ts +1 -0
- package/dist/components/NbRadioGroup/NbRadioGroup.vue.d.ts +23 -0
- package/dist/components/NbRadioGroup/index.d.ts +2 -0
- package/dist/components/NbScrollArea/NbScrollArea.vue.d.ts +26 -0
- package/dist/components/NbScrollArea/index.d.ts +1 -0
- package/dist/components/NbSelect/NbSelect.vue.d.ts +37 -0
- package/dist/components/NbSelect/NbSelectItem.vue.d.ts +23 -0
- package/dist/components/NbSelect/index.d.ts +2 -0
- package/dist/components/NbSeparator/NbSeparator.vue.d.ts +9 -0
- package/dist/components/NbSeparator/index.d.ts +1 -0
- package/dist/components/NbSkeleton/NbSkeleton.vue.d.ts +11 -0
- package/dist/components/NbSkeleton/index.d.ts +1 -0
- package/dist/components/NbSlider/NbSlider.vue.d.ts +30 -0
- package/dist/components/NbSlider/index.d.ts +1 -0
- package/dist/components/NbSpinner/NbSpinner.vue.d.ts +9 -0
- package/dist/components/NbSpinner/index.d.ts +1 -0
- package/dist/components/NbSwitch/NbSwitch.vue.d.ts +16 -0
- package/dist/components/NbSwitch/index.d.ts +1 -0
- package/dist/components/NbTable/NbTable.vue.d.ts +20 -0
- package/dist/components/NbTable/index.d.ts +1 -0
- package/dist/components/NbTabs/NbTabs.vue.d.ts +30 -0
- package/dist/components/NbTabs/NbTabsContent.vue.d.ts +20 -0
- package/dist/components/NbTabs/NbTabsList.vue.d.ts +17 -0
- package/dist/components/NbTabs/NbTabsTrigger.vue.d.ts +23 -0
- package/dist/components/NbTabs/index.d.ts +5 -0
- package/dist/components/NbTabs/tabsContext.d.ts +11 -0
- package/dist/components/NbTextarea/NbTextarea.vue.d.ts +17 -0
- package/dist/components/NbTextarea/index.d.ts +1 -0
- package/dist/components/NbToast/NbToast.vue.d.ts +35 -0
- package/dist/components/NbToast/index.d.ts +2 -0
- package/dist/components/NbToggleGroup/NbToggleGroup.vue.d.ts +40 -0
- package/dist/components/NbToggleGroup/NbToggleGroupItem.vue.d.ts +23 -0
- package/dist/components/NbToggleGroup/index.d.ts +3 -0
- package/dist/components/NbTooltip/NbTooltip.vue.d.ts +21 -0
- package/dist/components/NbTooltip/index.d.ts +1 -0
- package/dist/components/formField.d.ts +6 -0
- package/dist/index.d.ts +42 -0
- package/dist/lib/ids.d.ts +1 -0
- package/dist/lib/variants.d.ts +1 -0
- package/dist/neobrut-vue.css +1 -0
- package/dist/neobrut-vue.js +1875 -0
- package/dist/plugin.d.ts +2 -0
- package/package.json +56 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 neobrut-vue contributors
|
|
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,335 @@
|
|
|
1
|
+
# @neobrut-vue/core
|
|
2
|
+
|
|
3
|
+
Colorful and accessible neo-brutalist components for Vue 3.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Vue 3.5 or newer
|
|
8
|
+
- A client-side Vue application
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @neobrut-vue/core
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Import the stylesheet once in your application entry:
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import { createApp } from 'vue'
|
|
20
|
+
import '@neobrut-vue/core/style.css'
|
|
21
|
+
import App from './App.vue'
|
|
22
|
+
|
|
23
|
+
createApp(App).mount('#app')
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Components are available as named imports:
|
|
27
|
+
|
|
28
|
+
```vue
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import { NbBadge, NbButton, NbCard } from '@neobrut-vue/core'
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<NbCard tone="primary" interactive>
|
|
35
|
+
<template #header><NbBadge tone="accent">New</NbBadge></template>
|
|
36
|
+
<h2>Make it loud.</h2>
|
|
37
|
+
<template #footer><NbButton variant="accent">Launch</NbButton></template>
|
|
38
|
+
</NbCard>
|
|
39
|
+
</template>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Components
|
|
43
|
+
|
|
44
|
+
| Group | Components |
|
|
45
|
+
| --- | --- |
|
|
46
|
+
| Actions and surfaces | `NbButton`, `NbCard`, `NbAlert`, `NbBadge` |
|
|
47
|
+
| Forms | `NbCheckbox`, `NbCombobox`, `NbFieldset`, `NbInput`, `NbInputGroup`, `NbNumberInput`, `NbRadioGroup`, `NbSelect`, `NbSelectItem`, `NbSlider`, `NbSwitch`, `NbTextarea`, `NbToggleGroup`, `NbToggleGroupItem` |
|
|
48
|
+
| Navigation | `NbBreadcrumbs`, `NbPagination`, `NbTabs`, `NbTabsList`, `NbTabsTrigger`, `NbTabsContent` |
|
|
49
|
+
| Overlays | `NbDialog`, `NbDropdownMenu`, `NbDropdownMenuItem`, `NbDropdownMenuSeparator`, `NbPopover`, `NbToast`, `NbTooltip` |
|
|
50
|
+
| Data display | `NbAccordion`, `NbAccordionItem`, `NbAvatar`, `NbEmptyState`, `NbProgress`, `NbSkeleton`, `NbSpinner`, `NbTable` |
|
|
51
|
+
| Layout | `NbAspectRatio`, `NbScrollArea`, `NbSeparator` |
|
|
52
|
+
|
|
53
|
+
## Forms
|
|
54
|
+
|
|
55
|
+
Form components use `v-model`, forward native input attributes, and expose labels, hints, and errors through the relevant ARIA relationships.
|
|
56
|
+
|
|
57
|
+
```vue
|
|
58
|
+
<script setup lang="ts">
|
|
59
|
+
import { ref } from 'vue'
|
|
60
|
+
import {
|
|
61
|
+
NbCheckbox,
|
|
62
|
+
NbInput,
|
|
63
|
+
NbSelect,
|
|
64
|
+
NbSelectItem,
|
|
65
|
+
NbSwitch,
|
|
66
|
+
NbTextarea,
|
|
67
|
+
} from '@neobrut-vue/core'
|
|
68
|
+
|
|
69
|
+
const name = ref('')
|
|
70
|
+
const tone = ref('primary')
|
|
71
|
+
const note = ref('')
|
|
72
|
+
const alerts = ref(true)
|
|
73
|
+
const accepted = ref(false)
|
|
74
|
+
</script>
|
|
75
|
+
|
|
76
|
+
<template>
|
|
77
|
+
<form>
|
|
78
|
+
<NbInput v-model="name" label="Name" required placeholder="Ada Lovelace" />
|
|
79
|
+
|
|
80
|
+
<NbSelect v-model="tone" label="Favorite tone">
|
|
81
|
+
<NbSelectItem value="primary">Electric blue</NbSelectItem>
|
|
82
|
+
<NbSelectItem value="accent">Bubblegum pink</NbSelectItem>
|
|
83
|
+
</NbSelect>
|
|
84
|
+
|
|
85
|
+
<NbTextarea v-model="note" label="Note" hint="Keep it short and loud." />
|
|
86
|
+
<NbSwitch v-model="alerts" label="Launch alerts" description="Notify me when it ships." />
|
|
87
|
+
<NbCheckbox v-model="accepted" label="I accept the chaos" />
|
|
88
|
+
</form>
|
|
89
|
+
</template>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Searchable, numeric, range, and segmented controls share the same field contract:
|
|
93
|
+
|
|
94
|
+
```vue
|
|
95
|
+
<script setup lang="ts">
|
|
96
|
+
import { ref } from 'vue'
|
|
97
|
+
import {
|
|
98
|
+
NbCombobox,
|
|
99
|
+
NbNumberInput,
|
|
100
|
+
NbSlider,
|
|
101
|
+
NbToggleGroup,
|
|
102
|
+
NbToggleGroupItem,
|
|
103
|
+
type NbComboboxOption,
|
|
104
|
+
} from '@neobrut-vue/core'
|
|
105
|
+
|
|
106
|
+
const frameworks: NbComboboxOption[] = [
|
|
107
|
+
{ value: 'vue', label: 'Vue' },
|
|
108
|
+
{ value: 'svelte', label: 'Svelte' },
|
|
109
|
+
]
|
|
110
|
+
const framework = ref('vue')
|
|
111
|
+
const seats = ref(3)
|
|
112
|
+
const volume = ref(65)
|
|
113
|
+
const alignment = ref('center')
|
|
114
|
+
</script>
|
|
115
|
+
|
|
116
|
+
<template>
|
|
117
|
+
<NbCombobox v-model="framework" label="Framework" :options="frameworks" />
|
|
118
|
+
<NbNumberInput v-model="seats" label="Seats" :min="1" :max="12" />
|
|
119
|
+
<NbSlider v-model="volume" label="Volume" :step="5" show-value />
|
|
120
|
+
<NbToggleGroup v-model="alignment" label="Alignment">
|
|
121
|
+
<NbToggleGroupItem value="left">Left</NbToggleGroupItem>
|
|
122
|
+
<NbToggleGroupItem value="center">Center</NbToggleGroupItem>
|
|
123
|
+
<NbToggleGroupItem value="right">Right</NbToggleGroupItem>
|
|
124
|
+
</NbToggleGroup>
|
|
125
|
+
</template>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`NbInputGroup` attaches prefixes, suffixes, or small actions to a native input. Give the input its normal label or accessible name:
|
|
129
|
+
|
|
130
|
+
```vue
|
|
131
|
+
<script setup lang="ts">
|
|
132
|
+
import { ref } from 'vue'
|
|
133
|
+
import { NbInputGroup } from '@neobrut-vue/core'
|
|
134
|
+
|
|
135
|
+
const handle = ref('')
|
|
136
|
+
</script>
|
|
137
|
+
|
|
138
|
+
<template>
|
|
139
|
+
<label for="handle">Profile handle</label>
|
|
140
|
+
<NbInputGroup>
|
|
141
|
+
<template #start>@</template>
|
|
142
|
+
<input id="handle" v-model="handle" autocomplete="username">
|
|
143
|
+
<template #end>.dev</template>
|
|
144
|
+
</NbInputGroup>
|
|
145
|
+
</template>
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Navigation and disclosure
|
|
149
|
+
|
|
150
|
+
Tabs support controlled and uncontrolled state plus horizontal or vertical keyboard navigation:
|
|
151
|
+
|
|
152
|
+
```vue
|
|
153
|
+
<script setup lang="ts">
|
|
154
|
+
import { ref } from 'vue'
|
|
155
|
+
import { NbTabs, NbTabsContent, NbTabsList, NbTabsTrigger } from '@neobrut-vue/core'
|
|
156
|
+
|
|
157
|
+
const activeTab = ref('account')
|
|
158
|
+
</script>
|
|
159
|
+
|
|
160
|
+
<template>
|
|
161
|
+
<NbTabs v-model="activeTab">
|
|
162
|
+
<NbTabsList>
|
|
163
|
+
<NbTabsTrigger value="account">Account</NbTabsTrigger>
|
|
164
|
+
<NbTabsTrigger value="billing">Billing</NbTabsTrigger>
|
|
165
|
+
</NbTabsList>
|
|
166
|
+
<NbTabsContent value="account">Account settings</NbTabsContent>
|
|
167
|
+
<NbTabsContent value="billing">Billing settings</NbTabsContent>
|
|
168
|
+
</NbTabs>
|
|
169
|
+
</template>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Use `default-value` instead of `v-model` for uncontrolled tabs. Accordions follow the same pattern:
|
|
173
|
+
|
|
174
|
+
```vue
|
|
175
|
+
<script setup lang="ts">
|
|
176
|
+
import { NbAccordion, NbAccordionItem } from '@neobrut-vue/core'
|
|
177
|
+
</script>
|
|
178
|
+
|
|
179
|
+
<template>
|
|
180
|
+
<NbAccordion default-value="shipping">
|
|
181
|
+
<NbAccordionItem value="shipping" title="How fast is shipping?">
|
|
182
|
+
Loudly fast.
|
|
183
|
+
</NbAccordionItem>
|
|
184
|
+
<NbAccordionItem value="returns" title="Can I return it?">
|
|
185
|
+
Absolutely.
|
|
186
|
+
</NbAccordionItem>
|
|
187
|
+
</NbAccordion>
|
|
188
|
+
</template>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Dialogs and menus
|
|
192
|
+
|
|
193
|
+
`NbDialog` traps focus, closes on Escape, and restores focus to its trigger:
|
|
194
|
+
|
|
195
|
+
```vue
|
|
196
|
+
<script setup lang="ts">
|
|
197
|
+
import { ref } from 'vue'
|
|
198
|
+
import { NbButton, NbDialog } from '@neobrut-vue/core'
|
|
199
|
+
|
|
200
|
+
const open = ref(false)
|
|
201
|
+
</script>
|
|
202
|
+
|
|
203
|
+
<template>
|
|
204
|
+
<NbButton @click="open = true">Open dialog</NbButton>
|
|
205
|
+
<NbDialog v-model:open="open" title="Confirm launch">
|
|
206
|
+
This action is delightfully irreversible.
|
|
207
|
+
<template #footer>
|
|
208
|
+
<NbButton variant="ghost" @click="open = false">Cancel</NbButton>
|
|
209
|
+
<NbButton variant="accent" @click="open = false">Launch</NbButton>
|
|
210
|
+
</template>
|
|
211
|
+
</NbDialog>
|
|
212
|
+
</template>
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Dropdown menus provide styled keyboard navigation through Reka UI:
|
|
216
|
+
|
|
217
|
+
```vue
|
|
218
|
+
<script setup lang="ts">
|
|
219
|
+
import {
|
|
220
|
+
NbDropdownMenu,
|
|
221
|
+
NbDropdownMenuItem,
|
|
222
|
+
NbDropdownMenuSeparator,
|
|
223
|
+
} from '@neobrut-vue/core'
|
|
224
|
+
</script>
|
|
225
|
+
|
|
226
|
+
<template>
|
|
227
|
+
<NbDropdownMenu label="Project actions">
|
|
228
|
+
<template #trigger>Actions</template>
|
|
229
|
+
<NbDropdownMenuItem>Duplicate</NbDropdownMenuItem>
|
|
230
|
+
<NbDropdownMenuSeparator />
|
|
231
|
+
<NbDropdownMenuItem destructive>Delete</NbDropdownMenuItem>
|
|
232
|
+
</NbDropdownMenu>
|
|
233
|
+
</template>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Data display
|
|
237
|
+
|
|
238
|
+
```vue
|
|
239
|
+
<script setup lang="ts">
|
|
240
|
+
import { ref } from 'vue'
|
|
241
|
+
import { NbAvatar, NbPagination, NbProgress, NbTable } from '@neobrut-vue/core'
|
|
242
|
+
|
|
243
|
+
const page = ref(1)
|
|
244
|
+
</script>
|
|
245
|
+
|
|
246
|
+
<template>
|
|
247
|
+
<NbAvatar name="Ada Lovelace" size="lg" />
|
|
248
|
+
<NbProgress :value="72" label="Package build" show-value />
|
|
249
|
+
<NbPagination v-model:page="page" :total="120" :items-per-page="10" />
|
|
250
|
+
|
|
251
|
+
<NbTable caption="Release status">
|
|
252
|
+
<thead><tr><th>Package</th><th>Status</th></tr></thead>
|
|
253
|
+
<tbody><tr><td>Core</td><td>Ready</td></tr></tbody>
|
|
254
|
+
</NbTable>
|
|
255
|
+
</template>
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## VeeValidate
|
|
259
|
+
|
|
260
|
+
VeeValidate is optional. Standard model and attribute bindings work without an adapter:
|
|
261
|
+
|
|
262
|
+
```vue
|
|
263
|
+
<script setup lang="ts">
|
|
264
|
+
import { useForm } from 'vee-validate'
|
|
265
|
+
import { NbInput } from '@neobrut-vue/core'
|
|
266
|
+
|
|
267
|
+
const { defineField, errors } = useForm({
|
|
268
|
+
validationSchema: {
|
|
269
|
+
email: (value: string) => value ? true : 'Email is required',
|
|
270
|
+
},
|
|
271
|
+
})
|
|
272
|
+
const [email, emailAttrs] = defineField('email')
|
|
273
|
+
</script>
|
|
274
|
+
|
|
275
|
+
<template>
|
|
276
|
+
<NbInput
|
|
277
|
+
v-model="email"
|
|
278
|
+
v-bind="emailAttrs"
|
|
279
|
+
name="email"
|
|
280
|
+
label="Email"
|
|
281
|
+
:error="errors.email"
|
|
282
|
+
/>
|
|
283
|
+
</template>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
## Global registration
|
|
287
|
+
|
|
288
|
+
Named imports are preferred. For templates that need every component globally, install the optional plugin:
|
|
289
|
+
|
|
290
|
+
```ts
|
|
291
|
+
import { createApp } from 'vue'
|
|
292
|
+
import { NeoBrutalVue } from '@neobrut-vue/core'
|
|
293
|
+
import '@neobrut-vue/core/style.css'
|
|
294
|
+
import App from './App.vue'
|
|
295
|
+
|
|
296
|
+
createApp(App).use(NeoBrutalVue).mount('#app')
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
## Theming
|
|
300
|
+
|
|
301
|
+
Override CSS custom properties on `:root` or any wrapper. Components inherit the nearest values.
|
|
302
|
+
|
|
303
|
+
```css
|
|
304
|
+
:root {
|
|
305
|
+
--nb-color-paper: #fff8e7;
|
|
306
|
+
--nb-color-ink: #171717;
|
|
307
|
+
--nb-color-primary: #ffdf3f;
|
|
308
|
+
--nb-color-secondary: #72ddc3;
|
|
309
|
+
--nb-color-accent: #ff7b71;
|
|
310
|
+
--nb-color-danger: #ff4d5a;
|
|
311
|
+
--nb-border-width: 3px;
|
|
312
|
+
--nb-shadow-x: 7px;
|
|
313
|
+
--nb-shadow-y: 7px;
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
## Accessibility
|
|
318
|
+
|
|
319
|
+
The components prefer native elements and established ARIA patterns. Labels, hints, errors, invalid states, dialog focus management, menu navigation, tabs, accordions, progress, pagination, toasts, and tooltips are covered by automated axe tests and browser checks.
|
|
320
|
+
|
|
321
|
+
Consumers are still responsible for meaningful labels, sensible content, heading order, and sufficient contrast after overriding theme tokens.
|
|
322
|
+
|
|
323
|
+
## Development
|
|
324
|
+
|
|
325
|
+
```bash
|
|
326
|
+
bun install
|
|
327
|
+
bun run dev:playground
|
|
328
|
+
bun run check
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
`bun run check` runs the tests, TypeScript validation, and production build. `npm pack --dry-run` runs the same checks and prints the exact files that would be published.
|
|
332
|
+
|
|
333
|
+
## License
|
|
334
|
+
|
|
335
|
+
MIT
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
defaultValue?: string;
|
|
4
|
+
collapsible?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
collapsible: boolean;
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: string;
|
|
3
|
+
title: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
type AlertTone = 'info' | 'success' | 'danger' | 'warning';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
tone?: AlertTone;
|
|
4
|
+
title?: string;
|
|
5
|
+
dismissible?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: any;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
17
|
+
dismiss: () => any;
|
|
18
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
19
|
+
onDismiss?: (() => any) | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
tone: AlertTone;
|
|
22
|
+
dismissible: boolean;
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NbAlert } from './NbAlert.vue';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
ratio?: number;
|
|
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
|
+
ratio: number;
|
|
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 @@
|
|
|
1
|
+
export { default as NbAspectRatio } from './NbAspectRatio.vue';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type AvatarSize = 'sm' | 'md' | 'lg';
|
|
2
|
+
type AvatarTone = 'primary' | 'secondary' | 'accent';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
name: string;
|
|
5
|
+
src?: string;
|
|
6
|
+
size?: AvatarSize;
|
|
7
|
+
tone?: AvatarTone;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
size: AvatarSize;
|
|
11
|
+
tone: AvatarTone;
|
|
12
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NbAvatar } from './NbAvatar.vue';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type BadgeTone = 'paper' | 'primary' | 'secondary' | 'accent' | 'danger' | 'ink';
|
|
2
|
+
type BadgeSize = 'sm' | 'md';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
tone?: BadgeTone;
|
|
5
|
+
size?: BadgeSize;
|
|
6
|
+
};
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
rootEl: HTMLSpanElement;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
17
|
+
size: BadgeSize;
|
|
18
|
+
tone: BadgeTone;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLSpanElement>;
|
|
20
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
23
|
+
new (): {
|
|
24
|
+
$slots: S;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NbBadge } from './NbBadge.vue';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface NbBreadcrumbItem {
|
|
2
|
+
label: string;
|
|
3
|
+
href?: string;
|
|
4
|
+
}
|
|
5
|
+
type __VLS_Props = {
|
|
6
|
+
items: NbBreadcrumbItem[];
|
|
7
|
+
label?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
label: string;
|
|
11
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
type ButtonVariant = 'primary' | 'secondary' | 'accent' | 'danger' | 'ghost';
|
|
2
|
+
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
variant?: ButtonVariant;
|
|
5
|
+
size?: ButtonSize;
|
|
6
|
+
type?: 'button' | 'submit' | 'reset';
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: {};
|
|
16
|
+
rootEl: any;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
19
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
20
|
+
size: ButtonSize;
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
type: "button" | "submit" | "reset";
|
|
23
|
+
variant: ButtonVariant;
|
|
24
|
+
loading: boolean;
|
|
25
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NbButton } from './NbButton.vue';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type CardTone = 'paper' | 'primary' | 'secondary' | 'ink';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
tone?: CardTone;
|
|
4
|
+
interactive?: boolean;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
header?(_: {}): any;
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
footer?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
rootEl: any;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
18
|
+
tone: CardTone;
|
|
19
|
+
interactive: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NbCard } from './NbCard.vue';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
modelValue?: boolean;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
id?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
8
|
+
"update:modelValue": (value: boolean) => any;
|
|
9
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
modelValue: boolean;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as NbCheckbox } from './NbCheckbox.vue';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface NbComboboxOption {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
type __VLS_Props = {
|
|
7
|
+
modelValue?: string;
|
|
8
|
+
options: NbComboboxOption[];
|
|
9
|
+
label?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
emptyText?: string;
|
|
12
|
+
hint?: string;
|
|
13
|
+
error?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
name?: string;
|
|
17
|
+
id?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
20
|
+
"update:modelValue": (value: string) => any;
|
|
21
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
22
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
23
|
+
}>, {
|
|
24
|
+
modelValue: string;
|
|
25
|
+
disabled: boolean;
|
|
26
|
+
placeholder: string;
|
|
27
|
+
required: boolean;
|
|
28
|
+
emptyText: string;
|
|
29
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
30
|
+
export default _default;
|