@indielayer/ui 1.6.1 → 1.6.2

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 (62) hide show
  1. package/docs/components/toolbar/Toolbar.vue +4 -2
  2. package/docs/components/toolbar/ToolbarSearch.vue +256 -0
  3. package/docs/pages/component/button/usage.vue +1 -1
  4. package/docs/pages/component/checkbox/states.vue +1 -1
  5. package/docs/pages/component/checkbox/usage.vue +1 -8
  6. package/docs/pages/component/input/size.vue +3 -2
  7. package/docs/pages/component/input/states.vue +3 -3
  8. package/docs/pages/component/input/usage.vue +1 -1
  9. package/docs/pages/component/input/variants.vue +2 -2
  10. package/docs/pages/component/radio/usage.vue +6 -7
  11. package/docs/pages/component/table/usage.vue +35 -40
  12. package/docs/pages/component/textarea/states.vue +8 -9
  13. package/docs/pages/component/textarea/variants.vue +7 -8
  14. package/docs/search/components.json +1 -0
  15. package/lib/components/button/theme/Button.base.theme.js +1 -1
  16. package/lib/components/card/theme/Card.base.theme.js +3 -3
  17. package/lib/components/checkbox/Checkbox.vue.d.ts +13 -3
  18. package/lib/components/formGroup/FormGroup.vue.d.ts +13 -3
  19. package/lib/components/input/Input.vue.d.ts +13 -3
  20. package/lib/components/input/Input.vue.js +15 -15
  21. package/lib/components/input/theme/Input.base.theme.js +1 -1
  22. package/lib/components/modal/Modal.vue.d.ts +30 -4
  23. package/lib/components/modal/Modal.vue.js +74 -60
  24. package/lib/components/modal/theme/Modal.base.theme.js +12 -8
  25. package/lib/components/notifications/theme/Notifications.base.theme.js +1 -1
  26. package/lib/components/radio/Radio.vue.d.ts +13 -3
  27. package/lib/components/select/Select.vue.d.ts +13 -3
  28. package/lib/components/select/theme/Select.base.theme.js +1 -1
  29. package/lib/components/slider/Slider.vue.d.ts +13 -3
  30. package/lib/components/table/Table.vue.js +101 -98
  31. package/lib/components/table/theme/TableCell.base.theme.js +1 -1
  32. package/lib/components/table/theme/TableHead.base.theme.js +5 -5
  33. package/lib/components/table/theme/TableHeader.base.theme.js +2 -2
  34. package/lib/components/table/theme/TableRow.base.theme.js +1 -1
  35. package/lib/components/textarea/Textarea.vue.d.ts +13 -3
  36. package/lib/components/textarea/Textarea.vue.js +9 -9
  37. package/lib/components/textarea/theme/Textarea.base.theme.js +1 -1
  38. package/lib/components/toggle/Toggle.vue.d.ts +13 -3
  39. package/lib/composables/useInputtable.d.ts +4 -1
  40. package/lib/composables/useInputtable.js +22 -19
  41. package/lib/index.js +1 -1
  42. package/lib/index.umd.js +4 -4
  43. package/lib/version.d.ts +1 -1
  44. package/lib/version.js +1 -1
  45. package/package.json +7 -5
  46. package/src/components/button/theme/Button.base.theme.ts +2 -2
  47. package/src/components/card/theme/Card.base.theme.ts +1 -1
  48. package/src/components/input/Input.vue +3 -4
  49. package/src/components/input/theme/Input.base.theme.ts +1 -1
  50. package/src/components/modal/Modal.vue +32 -18
  51. package/src/components/modal/theme/Modal.base.theme.ts +10 -0
  52. package/src/components/notifications/theme/Notifications.base.theme.ts +1 -1
  53. package/src/components/select/theme/Select.base.theme.ts +1 -1
  54. package/src/components/table/Table.vue +1 -1
  55. package/src/components/table/theme/TableCell.base.theme.ts +1 -1
  56. package/src/components/table/theme/TableHead.base.theme.ts +2 -2
  57. package/src/components/table/theme/TableHeader.base.theme.ts +2 -2
  58. package/src/components/table/theme/TableRow.base.theme.ts +1 -1
  59. package/src/components/textarea/Textarea.vue +1 -1
  60. package/src/components/textarea/theme/Textarea.base.theme.ts +1 -1
  61. package/src/composables/useInputtable.ts +5 -1
  62. package/src/version.ts +1 -1
@@ -1,6 +1,7 @@
1
1
  <script setup lang="ts">
2
2
  import { inject, ref, unref, watch } from 'vue'
3
3
  import { version, type UITheme } from '@indielayer/ui'
4
+ import ToolbarSearch from './ToolbarSearch.vue'
4
5
 
5
6
  const selectTheme = inject('selectTheme', {
6
7
  theme: {} as UITheme,
@@ -40,9 +41,10 @@ const isDev = import.meta.env.DEV
40
41
  <x-spacer/>
41
42
 
42
43
  <div class="flex items-center font-semibold text-sm">
43
-
44
+ <toolbar-search />
45
+ <x-divider vertical class="!h-2 px-2"/>
44
46
  <div class="tracking-wide text-xs">v{{ version }}</div>
45
- <x-divider vertical style="height: 10px;" class="px-2 hidden sm:block"/>
47
+ <x-divider vertical class="!h-2 px-2 hidden sm:flex"/>
46
48
  <x-link
47
49
  href="https://github.com/indielayer/ui"
48
50
  target="_blank"
@@ -0,0 +1,256 @@
1
+ <script setup lang="ts">
2
+ import { useEventListener, useMouse } from '@vueuse/core'
3
+ import { computed, ref, watch, nextTick, onMounted } from 'vue'
4
+ import Fuse from 'fuse.js'
5
+ import ComponentsSearchIndex from '../../search/components.json'
6
+ import type { XInput } from 'src'
7
+
8
+ const fuse = new Fuse(ComponentsSearchIndex, {
9
+ keys: [{
10
+ name: 'name',
11
+ weight: 2,
12
+ }, {
13
+ name: 'description',
14
+ weight: 1,
15
+ }],
16
+ includeScore: true,
17
+ })
18
+
19
+ type FuseResult = {
20
+ item: {
21
+ name: string;
22
+ description: string;
23
+ url: string;
24
+ };
25
+ refIndex: number;
26
+ score: number;
27
+ }
28
+
29
+ const isModalOpen = ref(false)
30
+ const searchInput = ref('')
31
+ const ui = ref<FuseResult[]>([])
32
+ const searchList = ref<HTMLDivElement>()
33
+ const results = ref<HTMLLIElement[]>([])
34
+ const selectedIndex = ref<number>(-1)
35
+
36
+ const inputEl = ref<InstanceType<typeof XInput> | null>(null)
37
+
38
+ watch(isModalOpen, (newValue, oldValue) => {
39
+ setTimeout(() => {
40
+ if (newValue) inputEl.value?.focus()
41
+ }, 100)
42
+ })
43
+
44
+ const searchSections = computed(() => [
45
+ { key:'ui', label: 'UI', items: ui.value },
46
+ ])
47
+
48
+ function clearSearch() {
49
+ selectedIndex.value = -1
50
+ ui.value = []
51
+ }
52
+
53
+ function openSearch() {
54
+ clearSearch()
55
+
56
+ searchInput.value = ''
57
+ isModalOpen.value = true
58
+ }
59
+
60
+ function selectItem(item: HTMLLIElement, index?: number) {
61
+ if (!item) {
62
+ return
63
+ }
64
+
65
+ results.value?.[selectedIndex.value]?.setAttribute('aria-selected', 'false')
66
+
67
+ item.setAttribute('aria-selected', 'true')
68
+ item.scrollIntoView({ 'block':'nearest' })
69
+
70
+ if (!index) {
71
+ index = results.value.findIndex(({ id }) => id === item.id)
72
+ }
73
+
74
+ selectedIndex.value = index
75
+ }
76
+
77
+ function selectItemByIndex(index: number) {
78
+ selectItem(results.value?.[index], index)
79
+ }
80
+
81
+ function selectFirstItem() {
82
+ selectItemByIndex(0)
83
+ }
84
+
85
+ function selectLastItem() {
86
+ selectItemByIndex(results.value.length - 1)
87
+ }
88
+
89
+ function selectNextItem() {
90
+ const totalResults = results.value.length
91
+
92
+ if (totalResults <= 0) {
93
+ return
94
+ }
95
+
96
+ const nextIndex = selectedIndex.value + 1
97
+
98
+ if (nextIndex >= totalResults) {
99
+ selectFirstItem()
100
+ } else {
101
+ selectItemByIndex(nextIndex)
102
+ }
103
+ }
104
+
105
+ function selectPreviousItem() {
106
+ const totalResults = results.value.length
107
+
108
+ if (totalResults <= 0) {
109
+ return
110
+ }
111
+
112
+ const previousIndex = selectedIndex.value - 1
113
+
114
+ if (previousIndex >= 0) {
115
+ selectItemByIndex(previousIndex)
116
+ } else {
117
+ selectLastItem()
118
+ }
119
+ }
120
+
121
+ function keydownInput(e: KeyboardEvent) {
122
+ if (e.key === 'ArrowDown') {
123
+ e.preventDefault()
124
+ selectNextItem()
125
+ }
126
+
127
+ if (e.key === 'ArrowUp') {
128
+ e.preventDefault()
129
+ selectPreviousItem()
130
+ }
131
+
132
+ if (e.key === 'Enter') {
133
+ const item = results.value?.[selectedIndex.value]
134
+
135
+ if (item) {
136
+ (item.firstElementChild as HTMLLinkElement)?.click()
137
+ }
138
+ }
139
+ }
140
+
141
+ const { x: mouseX, y: mouseY } = useMouse({ type: 'page' })
142
+
143
+ function hoverResult(e: MouseEvent) {
144
+ if (mouseX.value !== e.x || mouseY.value !== e.y) {
145
+ selectItem(e.target as HTMLLIElement)
146
+ }
147
+ }
148
+
149
+ function searchIndexes() {
150
+ ui.value = fuse.search(searchInput.value, {
151
+ limit: 10,
152
+ }) as FuseResult[]
153
+ }
154
+
155
+ watch(searchSections, async () => {
156
+ results.value = []
157
+
158
+ await nextTick()
159
+
160
+ const items = searchList.value?.querySelectorAll('[data-name="list-item"]')
161
+
162
+ items?.forEach((el) => {
163
+ el.setAttribute('aria-selected', 'false')
164
+ results.value.push(el as HTMLLIElement)
165
+ })
166
+
167
+ setTimeout(() => selectFirstItem())
168
+ })
169
+
170
+ const metaKey = ref('')
171
+
172
+ onMounted(() => {
173
+ metaKey.value = /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)
174
+ ? '⌘'
175
+ : 'Ctrl'
176
+ })
177
+
178
+ if (document) {
179
+ useEventListener(document, 'keydown', (e: KeyboardEvent) => {
180
+ if (e.key === 'k' && (e.ctrlKey || e.metaKey)) {
181
+ e.preventDefault()
182
+ openSearch()
183
+ }
184
+ })
185
+ }
186
+ </script>
187
+
188
+ <template>
189
+ <x-button
190
+ icon="search"
191
+ outlined
192
+ size="xs"
193
+ @click="openSearch"
194
+ >
195
+ Search
196
+ <span class="text-secondary-400 ml-2">
197
+ {{ metaKey }}K
198
+ </span>
199
+ </x-button>
200
+
201
+ <x-modal v-model="isModalOpen" size="md" position="top">
202
+ <template #header>
203
+ <div class="py-4 px-6 border-b">
204
+ <x-input
205
+ ref="inputEl"
206
+ v-model="searchInput"
207
+ type="search"
208
+ aria-controls="search-list"
209
+ placeholder="Search components"
210
+ hide-footer
211
+ icon-left="search"
212
+ @input="searchIndexes"
213
+ @keydown="keydownInput"
214
+ />
215
+ </div>
216
+ </template>
217
+ <div id="search-list" ref="searchList">
218
+ <template v-for="section in searchSections" :key="section.key">
219
+ <section v-if="section.items.length > 0">
220
+ <!-- <x-divider :id="`${section.key}-label`" class="my-2" :label="section.label" /> -->
221
+ <ul role="listbox" :aria-labelledby="`${section.key}-label`">
222
+ <li
223
+ v-for="(result) in section.items"
224
+ :id="result.item.url"
225
+ :key="result.item.url"
226
+ data-name="list-item"
227
+ role="option"
228
+ class="aria-selected:bg-secondary-100 dark:aria-selected:bg-secondary-800 rounded p-2 mb-2"
229
+ @mouseenter="hoverResult"
230
+ >
231
+ <x-link
232
+ :to="result.item.url"
233
+ class="w-full flex flex-wrap"
234
+ @click="isModalOpen = false"
235
+ >
236
+ <p class="text-base w-full mb-1 mt-0 font-bold">{{ result.item.name }}</p>
237
+ <p class="text-sm m-0">{{ result.item.description }}</p>
238
+ </x-link>
239
+ </li>
240
+ </ul>
241
+ </section>
242
+ </template>
243
+ </div>
244
+
245
+ <template #actions>
246
+ <footer class="w-full flex gap-2 items-center justify-center">
247
+ <span class="bg-context-7 px-1 inline-flex items-center rounded-sm">&#8626;</span>
248
+ <span class="text-xs">to select</span>
249
+ <span class="bg-context-7 px-1 inline-flex items-center rounded-sm">&#11139;</span>
250
+ <span class="text-xs">to navigate</span>
251
+ <span class="bg-context-7 px-1 inline-flex items-center rounded-sm">&#9243;</span>
252
+ <span class="text-xs">to close</span>
253
+ </footer>
254
+ </template>
255
+ </x-modal>
256
+ </template>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="grid gap-4 grid-cols-4">
2
+ <div class="grid grid-cols-2 md:grid-cols-4 gap-4">
3
3
  <x-button>Default</x-button>
4
4
  <x-button color="primary" icon-right="star">Submit</x-button>
5
5
  <x-button color="primary" light>Light</x-button>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="grid grid-cols-4 gap-4">
2
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
3
3
  <x-checkbox disabled label="Disabled" />
4
4
  <x-checkbox helper="Helper text">Helper</x-checkbox>
5
5
  <x-checkbox loading>Loading</x-checkbox>
@@ -4,12 +4,5 @@ const checked = ref(true)
4
4
  </script>
5
5
 
6
6
  <template>
7
- <div class="grid grid-cols-5">
8
-
9
- <x-checkbox v-model="checked" label="Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque, unde." color="primary" />
10
- <x-checkbox color="secondary" label="Secondary" />
11
- <x-checkbox color="success" label="Success" />
12
- <x-checkbox color="warning" label="Warning" />
13
- <x-checkbox color="error" label="Error" />
14
- </div>
7
+ <x-checkbox v-model="checked" label="Checkbox label" color="primary" />
15
8
  </template>
@@ -1,10 +1,11 @@
1
- <script setup>
1
+ <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
3
  const other = ref('Sample text')
4
4
  </script>
5
5
 
6
6
  <template>
7
- <div class="grid grid-cols-4 gap-2">
7
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-2">
8
+ <x-input v-model="other" size="xs"/>
8
9
  <x-input v-model="other" size="sm"/>
9
10
  <x-input v-model="other" size="md"/>
10
11
  <x-input v-model="other" size="lg"/>
@@ -1,11 +1,11 @@
1
- <script setup>
1
+ <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
3
  const name = ref('not a valid input')
4
4
  </script>
5
5
 
6
6
  <template>
7
- <div class="grid grid-cols-4 gap-4">
8
- <x-input value="disabled" disabled label="Disabled"/>
7
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
8
+ <x-input disabled label="Disabled"/>
9
9
  <x-input value="readonly" readonly label="Read only"/>
10
10
  <x-input v-model="name" label="Error" error="Invalid input" />
11
11
  </div>
@@ -1,6 +1,6 @@
1
1
  <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
- const name = ref('')
3
+ const name = ref(0)
4
4
  </script>
5
5
 
6
6
  <template>
@@ -1,11 +1,11 @@
1
- <script setup>
1
+ <script setup lang="ts">
2
2
  import { ref } from 'vue'
3
3
  const password = ref('secret')
4
4
  const other = ref('I have an icon')
5
5
  </script>
6
6
 
7
7
  <template>
8
- <div class="grid grid-cols-3 gap-4">
8
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
9
9
  <x-input
10
10
  v-model="password"
11
11
  label="Password input"
@@ -1,14 +1,13 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ const selected = ref('a')
4
+ </script>
5
+
1
6
  <template>
2
- <div class="grid grid-cols-4 gap-4">
7
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
3
8
  <x-radio v-model="selected" name="inputName" value="a" label="Option A" />
4
9
  <x-radio v-model="selected" name="inputName" value="b" label="Option B" />
5
10
  <x-radio v-model="selected" name="inputName" value="c" label="Option C" />
6
11
  <x-radio v-model="selected" name="inputName" value="d" label="Option D" />
7
12
  </div>
8
13
  </template>
9
-
10
- <script>
11
- export default {
12
- data() { return { selected: 'a' } },
13
- }
14
- </script>
@@ -63,45 +63,40 @@ const itemsSorted = computed<Book[]>(() => {
63
63
  </script>
64
64
 
65
65
  <template>
66
- <x-table
67
- v-model:sort="sort"
68
- expandable
69
- :headers="headers"
70
- :items="itemsSorted"
71
- >
72
- <template #expanded-row="{ item }">
73
- {{ item }}
74
- {{ item }}
75
- {{ item }}
76
- {{ item }}
77
- {{ item }}
78
- {{ item }}
79
- {{ item }}
80
- {{ item }}
81
- {{ item }}
82
- </template>
66
+ <div class="grid gap-4">
67
+ <x-card>
68
+ <x-table
69
+ v-model:sort="sort"
70
+ expandable
71
+ :headers="headers"
72
+ :items="itemsSorted"
73
+ >
74
+ <template #expanded-row="{ item }">
75
+ {{ item }}
76
+ </template>
83
77
 
84
- <template #item-published="{ item }">
85
- {{ formatDate(item.published) }}
86
- </template>
87
- <template #item-status="{ item }">
88
- <x-tag size="sm" color="primary" rounded>{{ item.status }}</x-tag>
89
- </template>
90
- </x-table>
91
- <x-table
92
- v-model:sort="sort"
93
- class="my-10"
94
- dense
95
- striped
96
- :headers="headers"
97
- :items="itemsSorted"
98
- @click-row="notifications?.log('open')"
99
- >
100
- <template #item-published="{ item }">
101
- {{ formatDate(item.published) }}
102
- </template>
103
- <template #item-status="{ item }">
104
- <x-tag size="sm" color="pink" rounded>{{ item.status }}</x-tag>
105
- </template>
106
- </x-table>
78
+ <template #item-published="{ item }">
79
+ {{ formatDate(item.published) }}
80
+ </template>
81
+ <template #item-status="{ item }">
82
+ <x-tag size="xs" color="primary" rounded>{{ item.status }}</x-tag>
83
+ </template>
84
+ </x-table>
85
+ </x-card>
86
+
87
+ <x-card>
88
+ <x-table
89
+ v-model:sort="sort"
90
+ dense
91
+ striped
92
+ :headers="headers"
93
+ :items="itemsSorted"
94
+ @click-row="notifications?.log('open')"
95
+ >
96
+ <template #item-published="{ item }">
97
+ {{ formatDate(item.published) }}
98
+ </template>
99
+ </x-table>
100
+ </x-card>
101
+ </div>
107
102
  </template>
@@ -1,13 +1,12 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ const name = ref('invalid input')
4
+ </script>
5
+
1
6
  <template>
2
- <div class="grid grid-cols-4 gap-4">
3
- <x-textarea v-model="name" disabled label="Disabled"/>
4
- <x-textarea v-model="name" readonly label="Read only"/>
7
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
8
+ <x-textarea disabled label="Disabled"/>
9
+ <x-textarea readonly label="Read only"/>
5
10
  <x-textarea v-model="name" label="Error" error="Invalid input" />
6
11
  </div>
7
12
  </template>
8
-
9
- <script>
10
- export default {
11
- data() { return { name: 'disabled' } },
12
- }
13
- </script>
@@ -1,15 +1,14 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ const sizes = ref('Text size')
4
+ </script>
5
+
1
6
  <template>
2
- <div class="grid grid-cols-3 gap-4">
7
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
3
8
  <x-textarea v-model="sizes" label="xs" size="xs" />
4
- <x-textarea v-model="sizes" label="xs" size="sm" />
9
+ <x-textarea v-model="sizes" label="sm" size="sm" />
5
10
  <x-textarea v-model="sizes" label="md" />
6
11
  <x-textarea v-model="sizes" label="lg" size="lg" />
7
12
  <x-textarea v-model="sizes" label="xl" size="xl" />
8
13
  </div>
9
14
  </template>
10
-
11
- <script>
12
- export default {
13
- data() { return { sizes: 'Text size' } },
14
- }
15
- </script>
@@ -0,0 +1 @@
1
+ [{"name":"Accordion","description":"Accordion","url":"/component/accordion"},{"name":"Alert","description":"Alerts are used to communicate a state that affects a system, feature or page.","url":"/component/alert"},{"name":"Avatar","description":"Avatars are used to represent a user.","url":"/component/avatar"},{"name":"Badge","description":"Badges are used to display a small amount of information.","url":"/component/badge"},{"name":"Breadcrumbs","description":"Breadcrumbs are used to indicate the current page\\","url":"/component/breadcrumbs"},{"name":"Button","description":"Used to trigger an action, such as submitting a form, opening a menu, or performing a command.","url":"/component/button"},{"name":"Card","description":"Cards are used to display content in an organized manner.","url":"/component/card"},{"name":"Carousel","description":"A carousel is a rotating set of images.","url":"/component/carousel"},{"name":"Checkbox","description":"Checkboxes allow the user to select one or more items from a set. Checkboxes can be used to turn an option on or off.","url":"/component/checkbox"},{"name":"Container","description":"Containers are used to wrap content in an organized manner.","url":"/component/container"},{"name":"Datepicker","description":"The datepicker component is used to select a date or time.","url":"/component/datepicker"},{"name":"Divider","description":"Dividers are used to separate content.","url":"/component/divider"},{"name":"Drawer","description":"Drawers are used to display content in a side panel.","url":"/component/drawer"},{"name":"Form","description":"Forms are used to collect user input.","url":"/component/form"},{"name":"FormGroup","description":"A form group is a wrapper for form elements.","url":"/component/formGroup"},{"name":"Icon","description":"Icons are used to represent an action or an object.","url":"/component/icon"},{"name":"Image","description":"Image is used to load an image file with a skeleton as placeholder and on load display the image.","url":"/component/image"},{"name":"Input","description":"This is a text input component that allows users to enter and edit text.","url":"/component/input"},{"name":"Link","description":"Links are used to navigate to a different page.","url":"/component/link"},{"name":"Loader","description":"Loader component is used to show a loading state.","url":"/component/loader"},{"name":"Menu","description":"Menus are used to display a list of options.","url":"/component/menu"},{"name":"Modal","description":"Modals are used to display content on top of the current page.","url":"/component/modal"},{"name":"Notifications","description":"Notifications are used to display a message to the user.","url":"/component/notifications"},{"name":"Pagination","description":"Pagination is used to navigate through a list of items.","url":"/component/pagination"},{"name":"Popover","description":"Popover is used to display content in a small overlay.","url":"/component/popover"},{"name":"Progress","description":"Progress is used to show the progress of an operation.","url":"/component/progress"},{"name":"QR Code","description":"The QR Code component is used to generate a QR code.","url":"/component/qrCode"},{"name":"Radio","description":"Radios allow the user to select one option from a set. Use radio buttons for exclusive selection if you think that the user needs to see all available options side-by-side.","url":"/component/radio"},{"name":"Scroll","description":"Scroll is used to scroll through a list of items with added features like inner shadows to indicate there is more to scroll.","url":"/component/scroll"},{"name":"Select","description":"Selects allow the user to select one or more options from a set.","url":"/component/select"},{"name":"Skeleton","description":"Skeletons are used to display a loading state.","url":"/component/skeleton"},{"name":"Slider","description":"Sliders are used to select a value from a range.","url":"/component/slider"},{"name":"Spacer","description":"Spacer is used to add space between elements inside a display flex wrapper.","url":"/component/spacer"},{"name":"Spinner","description":"Spinners are used to indicate that an operation is in progress.","url":"/component/spinner"},{"name":"Stepper","description":"Stepper is a navigation component that guides users through the steps of a task.","url":"/component/stepper"},{"name":"Table","description":"Tables are used to display data in a tabular format.","url":"/component/table"},{"name":"Tabs","description":"Tabs are used to navigate through a set of views.","url":"/component/tabs"},{"name":"Tag","description":"Tags are used to display a label.","url":"/component/tag"},{"name":"Textarea","description":"Textareas allow the user to enter text.","url":"/component/textarea"},{"name":"Toggle","description":"Toggles are used to switch between two states.","url":"/component/toggle"},{"name":"Tooltip","description":"Tooltips are used to display a message when hovering over an element.","url":"/component/tooltip"}]
@@ -2,7 +2,7 @@ const r = {
2
2
  classes: {
3
3
  wrapper({ props: e, slots: n, data: i }) {
4
4
  const d = ["relative transition duration-150 focus:outline-none inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden align-middle active:!shadow-none border appearance-none"];
5
- return i.isButtonGroup || d.push(e.rounded ? "rounded-full" : "rounded-md"), !e.flat && !e.light && !e.ghost && !e.disabled && !e.loading && d.push("shadow-sm"), e.size === "xs" ? d.push(n.default ? `py-1 text-xs ${e.icon ? "px-2" : "px-3"}` : "leading-none p-1") : e.size === "sm" ? d.push(n.default ? `py-2 text-sm ${e.icon ? "px-3" : "px-4"}` : "leading-none p-2") : e.size === "lg" ? d.push(n.default ? `py-3 text-lg ${e.icon ? "px-4" : "px-6"}` : "leading-none p-3") : e.size === "xl" ? d.push(n.default ? `py-4 text-xl ${e.icon, "px-6"}` : "leading-none p-4") : d.push(n.default ? `py-2 ${e.icon ? "px-4" : "px-5"}` : "leading-none p-2"), e.disabled ? d.push("cursor-not-allowed") : e.loading ? d.push("cursor-default") : d.push("cursor-pointer"), d;
5
+ return i.isButtonGroup || d.push(e.rounded ? "rounded-full" : "rounded-md"), !e.flat && !e.light && !e.ghost && !e.disabled && !e.loading && d.push("shadow-sm"), e.size === "xs" ? d.push(n.default ? `py-1 text-xs ${e.icon, "px-2"}` : "leading-none p-1") : e.size === "sm" ? d.push(n.default ? `py-1.5 text-sm ${e.icon, "px-3"}` : "leading-none p-1.5") : e.size === "lg" ? d.push(n.default ? `py-3 text-lg ${e.icon ? "px-4" : "px-6"}` : "leading-none p-3") : e.size === "xl" ? d.push(n.default ? `py-4 text-xl ${e.icon, "px-6"}` : "leading-none p-4") : d.push(n.default ? `py-2 ${e.icon ? "px-4" : "px-5"}` : "leading-none p-2"), e.disabled ? d.push("cursor-not-allowed") : e.loading ? d.push("cursor-default") : d.push("cursor-pointer"), d;
6
6
  },
7
7
  iconLeft: ({ slots: e }) => e.default ? "mr-2" : "m-0.5",
8
8
  iconRight: ({ slots: e }) => e.default ? "ml-2" : "m-0.5"
@@ -1,8 +1,8 @@
1
1
  const a = {
2
2
  classes: {
3
- wrapper: ({ props: e }) => `bg-slate-50 dark:bg-slate-800 rounded-md ${e.flat ? "" : "shadow"}`
3
+ wrapper: ({ props: e }) => `bg-white dark:bg-secondary-800 overflow-hidden rounded-md ${e.flat ? "" : "shadow"}`
4
4
  }
5
- }, s = a;
5
+ }, d = a;
6
6
  export {
7
- s as default
7
+ d as default
8
8
  };
@@ -4,7 +4,10 @@ declare const checkboxProps: {
4
4
  value: (StringConstructor | NumberConstructor)[];
5
5
  indeterminate: BooleanConstructor;
6
6
  glow: BooleanConstructor;
7
- modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
7
+ modelValue: {
8
+ readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
9
+ readonly default: undefined;
10
+ };
8
11
  id: StringConstructor;
9
12
  name: StringConstructor;
10
13
  readonly: BooleanConstructor;
@@ -52,7 +55,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
52
55
  value: (StringConstructor | NumberConstructor)[];
53
56
  indeterminate: BooleanConstructor;
54
57
  glow: BooleanConstructor;
55
- modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
58
+ modelValue: {
59
+ readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
60
+ readonly default: undefined;
61
+ };
56
62
  id: StringConstructor;
57
63
  name: StringConstructor;
58
64
  readonly: BooleanConstructor;
@@ -97,7 +103,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
97
103
  value: (StringConstructor | NumberConstructor)[];
98
104
  indeterminate: BooleanConstructor;
99
105
  glow: BooleanConstructor;
100
- modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
106
+ modelValue: {
107
+ readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
108
+ readonly default: undefined;
109
+ };
101
110
  id: StringConstructor;
102
111
  name: StringConstructor;
103
112
  readonly: BooleanConstructor;
@@ -141,6 +150,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
141
150
  loading: boolean;
142
151
  loadingStatus: import("../loader/Loader.vue").LoaderStatus;
143
152
  indeterminate: boolean;
153
+ modelValue: string | number | boolean | object | any[] | undefined;
144
154
  readonly: boolean;
145
155
  required: boolean;
146
156
  validateOnInput: boolean;
@@ -5,7 +5,10 @@ declare const formGroupProps: {
5
5
  type: BooleanConstructor;
6
6
  default: boolean;
7
7
  };
8
- modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
8
+ modelValue: {
9
+ readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
10
+ readonly default: undefined;
11
+ };
9
12
  id: StringConstructor;
10
13
  name: StringConstructor;
11
14
  readonly: BooleanConstructor;
@@ -51,7 +54,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
51
54
  type: BooleanConstructor;
52
55
  default: boolean;
53
56
  };
54
- modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
57
+ modelValue: {
58
+ readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
59
+ readonly default: undefined;
60
+ };
55
61
  id: StringConstructor;
56
62
  name: StringConstructor;
57
63
  readonly: BooleanConstructor;
@@ -87,7 +93,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
87
93
  type: BooleanConstructor;
88
94
  default: boolean;
89
95
  };
90
- modelValue: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
96
+ modelValue: {
97
+ readonly type: import("vue").PropType<string | number | boolean | object | any[] | undefined>;
98
+ readonly default: undefined;
99
+ };
91
100
  id: StringConstructor;
92
101
  name: StringConstructor;
93
102
  readonly: BooleanConstructor;
@@ -118,6 +127,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
118
127
  disabled: boolean;
119
128
  loading: boolean;
120
129
  loadingStatus: import("../loader/Loader.vue").LoaderStatus;
130
+ modelValue: string | number | boolean | object | any[] | undefined;
121
131
  readonly: boolean;
122
132
  required: boolean;
123
133
  validateOnInput: boolean;