@bitrix24/b24ui-nuxt 0.4.0 → 0.4.1
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/.nuxt/b24ui/index.ts +1 -0
- package/.nuxt/b24ui/modal.ts +1 -1
- package/.nuxt/b24ui/prose/prose-h1.ts +6 -0
- package/.nuxt/b24ui/prose/prose-h2.ts +16 -0
- package/.nuxt/b24ui/prose/prose-h3.ts +16 -0
- package/.nuxt/b24ui/prose/prose-li.ts +5 -0
- package/.nuxt/b24ui/prose/prose-ol.ts +5 -0
- package/.nuxt/b24ui/prose/prose-p.ts +5 -0
- package/.nuxt/b24ui/prose/prose-ul.ts +5 -0
- package/.nuxt/b24ui/slideover.ts +3 -2
- package/dist/meta.cjs +31777 -28683
- package/dist/meta.d.cts +31777 -28683
- package/dist/meta.d.mts +31777 -28683
- package/dist/meta.d.ts +31777 -28683
- package/dist/meta.mjs +31777 -28683
- package/dist/module.cjs +6 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +6 -1
- package/dist/runtime/components/Advice.vue +3 -0
- package/dist/runtime/components/Alert.vue +17 -2
- package/dist/runtime/components/Avatar.vue +7 -0
- package/dist/runtime/components/AvatarGroup.vue +3 -0
- package/dist/runtime/components/Badge.vue +21 -3
- package/dist/runtime/components/Button.vue +37 -7
- package/dist/runtime/components/ButtonGroup.vue +7 -1
- package/dist/runtime/components/Checkbox.vue +6 -0
- package/dist/runtime/components/Chip.vue +18 -2
- package/dist/runtime/components/Countdown.vue +32 -8
- package/dist/runtime/components/{content/DescriptionList.vue → DescriptionList.vue} +19 -8
- package/dist/runtime/components/DropdownMenu.vue +14 -2
- package/dist/runtime/components/DropdownMenuContent.vue +6 -0
- package/dist/runtime/components/FormField.vue +6 -0
- package/dist/runtime/components/Input.vue +50 -6
- package/dist/runtime/components/InputMenu.vue +67 -15
- package/dist/runtime/components/InputNumber.vue +42 -8
- package/dist/runtime/components/Kbd.vue +6 -0
- package/dist/runtime/components/Link.vue +8 -4
- package/dist/runtime/components/Modal.vue +9 -3
- package/dist/runtime/components/Progress.vue +19 -3
- package/dist/runtime/components/RadioGroup.vue +6 -0
- package/dist/runtime/components/Range.vue +9 -1
- package/dist/runtime/components/Select.vue +47 -10
- package/dist/runtime/components/SelectMenu.vue +52 -12
- package/dist/runtime/components/Separator.vue +16 -2
- package/dist/runtime/components/Slideover.vue +12 -2
- package/dist/runtime/components/Switch.vue +19 -3
- package/dist/runtime/components/Tabs.vue +12 -0
- package/dist/runtime/components/Textarea.vue +50 -6
- package/dist/runtime/components/Toast.vue +13 -2
- package/dist/runtime/components/Toaster.vue +8 -0
- package/dist/runtime/components/{prose → content}/TableWrapper.vue +27 -3
- package/dist/runtime/composables/useComponentIcons.d.ts +11 -4
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/prose/ProseH1.vue +36 -0
- package/dist/runtime/prose/ProseH2.vue +36 -0
- package/dist/runtime/prose/ProseH3.vue +36 -0
- package/dist/runtime/prose/ProseLi.vue +36 -0
- package/dist/runtime/prose/ProseOl.vue +36 -0
- package/dist/runtime/prose/ProseP.vue +36 -0
- package/dist/runtime/prose/ProseUl.vue +36 -0
- package/dist/runtime/types/index.d.ts +9 -2
- package/dist/runtime/types/index.js +9 -2
- package/dist/runtime/utils/index.js +1 -1
- package/dist/runtime/vue/components/Link.vue +8 -4
- package/dist/shared/{b24ui-nuxt.CBO0gAWn.mjs → b24ui-nuxt.BGGwh89R.mjs} +198 -83
- package/dist/shared/{b24ui-nuxt.BT9wxrhm.cjs → b24ui-nuxt.CnMGpwQb.cjs} +198 -83
- package/dist/unplugin.cjs +4 -4
- package/dist/unplugin.mjs +4 -4
- package/dist/vite.cjs +1 -1
- package/dist/vite.mjs +1 -1
- package/package.json +4 -3
- /package/.nuxt/b24ui/{prose → content}/table-wrapper.ts +0 -0
- /package/.nuxt/b24ui/{content/description-list.ts → description-list.ts} +0 -0
|
@@ -18,6 +18,10 @@ type InputMenuVariants = VariantProps<typeof inputMenu>
|
|
|
18
18
|
|
|
19
19
|
export interface InputMenuItem {
|
|
20
20
|
label?: string
|
|
21
|
+
/**
|
|
22
|
+
* Display an icon on the left side.
|
|
23
|
+
* @IconComponent
|
|
24
|
+
*/
|
|
21
25
|
icon?: IconComponent
|
|
22
26
|
avatar?: AvatarProps
|
|
23
27
|
color?: InputMenuVariants['color']
|
|
@@ -38,36 +42,71 @@ export interface InputMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends Ma
|
|
|
38
42
|
*/
|
|
39
43
|
as?: any
|
|
40
44
|
id?: string
|
|
45
|
+
/**
|
|
46
|
+
* @defaultValue 'text'
|
|
47
|
+
*/
|
|
41
48
|
type?: InputHTMLAttributes['type']
|
|
42
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* The placeholder text when the input is empty
|
|
51
|
+
*/
|
|
43
52
|
placeholder?: string
|
|
53
|
+
/**
|
|
54
|
+
* @defaultValue 'primary'
|
|
55
|
+
*/
|
|
44
56
|
color?: InputMenuVariants['color']
|
|
57
|
+
/**
|
|
58
|
+
* @defaultValue 'md'
|
|
59
|
+
*/
|
|
45
60
|
size?: InputMenuVariants['size']
|
|
46
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Removes padding from input
|
|
63
|
+
* @defaultValue false
|
|
64
|
+
*/
|
|
47
65
|
noPadding?: boolean
|
|
48
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Removes all borders (rings)
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
49
70
|
noBorder?: boolean
|
|
50
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Removes all borders (rings) except the bottom one
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
51
75
|
underline?: boolean
|
|
52
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* Rounds the corners of the button
|
|
78
|
+
* @defaultValue false
|
|
79
|
+
*/
|
|
53
80
|
rounded?: boolean
|
|
81
|
+
/**
|
|
82
|
+
* @defaultValue false
|
|
83
|
+
*/
|
|
54
84
|
required?: boolean
|
|
85
|
+
/**
|
|
86
|
+
* @defaultValue false
|
|
87
|
+
*/
|
|
55
88
|
autofocus?: boolean
|
|
89
|
+
/**
|
|
90
|
+
* @defaultValue 0
|
|
91
|
+
*/
|
|
56
92
|
autofocusDelay?: number
|
|
57
93
|
/**
|
|
58
94
|
* The icon displayed to open the menu.
|
|
59
|
-
* @defaultValue icons.chevronDown
|
|
95
|
+
* @defaultValue icons.chevronDown
|
|
96
|
+
* @IconComponent
|
|
60
97
|
*/
|
|
61
98
|
trailingIcon?: IconComponent
|
|
62
99
|
/**
|
|
63
100
|
* The icon displayed when an item is selected.
|
|
64
|
-
* @defaultValue icons.check
|
|
101
|
+
* @defaultValue icons.check
|
|
102
|
+
* @IconComponent
|
|
65
103
|
*/
|
|
66
104
|
selectedIcon?: IconComponent
|
|
67
105
|
/**
|
|
68
106
|
* The icon displayed to delete a tag.
|
|
69
107
|
* Works only when `multiple` is `true`.
|
|
70
|
-
* @defaultValue icons.close
|
|
108
|
+
* @defaultValue icons.close
|
|
109
|
+
* @IconComponent
|
|
71
110
|
*/
|
|
72
111
|
deleteIcon?: IconComponent
|
|
73
112
|
/**
|
|
@@ -96,15 +135,28 @@ export interface InputMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends Ma
|
|
|
96
135
|
*/
|
|
97
136
|
labelKey?: V
|
|
98
137
|
items?: I
|
|
99
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* The value of the InputMenu when initially rendered. Use when you do not need to control the state of the InputMenu
|
|
140
|
+
*/
|
|
100
141
|
defaultValue?: SelectModelValue<T, V, M>
|
|
101
|
-
/**
|
|
142
|
+
/**
|
|
143
|
+
* The controlled value of the InputMenu. Can be binded-with with `v-model`
|
|
144
|
+
*/
|
|
102
145
|
modelValue?: SelectModelValue<T, V, M>
|
|
103
|
-
/**
|
|
146
|
+
/**
|
|
147
|
+
* Whether multiple options can be selected or not
|
|
148
|
+
* @defaultValue false
|
|
149
|
+
*/
|
|
104
150
|
multiple?: M & boolean
|
|
105
151
|
tag?: string
|
|
152
|
+
/**
|
|
153
|
+
* @defaultValue 'primary'
|
|
154
|
+
*/
|
|
106
155
|
tagColor?: InputMenuVariants['tagColor']
|
|
107
|
-
/**
|
|
156
|
+
/**
|
|
157
|
+
* Highlight the ring color like a focus state
|
|
158
|
+
* @defaultValue false
|
|
159
|
+
*/
|
|
108
160
|
highlight?: boolean
|
|
109
161
|
/**
|
|
110
162
|
* Determines if custom user input that does not exist in options can be added.
|
|
@@ -152,7 +204,7 @@ export interface InputMenuSlots<T, M extends boolean> {
|
|
|
152
204
|
import { computed, ref, toRef, onMounted, toRaw } from 'vue'
|
|
153
205
|
import { ComboboxRoot, ComboboxArrow, ComboboxAnchor, ComboboxInput, ComboboxTrigger, ComboboxPortal, ComboboxContent, ComboboxViewport, ComboboxEmpty, ComboboxGroup, ComboboxLabel, ComboboxSeparator, ComboboxItem, ComboboxItemIndicator, TagsInputRoot, TagsInputItem, TagsInputItemText, TagsInputItemDelete, TagsInputInput, useForwardPropsEmits, useFilter } from 'reka-ui'
|
|
154
206
|
import { defu } from 'defu'
|
|
155
|
-
import { isEqual } from 'ohash'
|
|
207
|
+
import { isEqual } from 'ohash/utils'
|
|
156
208
|
import { reactivePick, createReusableTemplate } from '@vueuse/core'
|
|
157
209
|
import { useButtonGroup } from '../composables/useButtonGroup'
|
|
158
210
|
import { useComponentIcons } from '../composables/useComponentIcons'
|
|
@@ -179,7 +231,7 @@ const searchTerm = defineModel<string>('searchTerm', { default: '' })
|
|
|
179
231
|
const { t } = useLocale()
|
|
180
232
|
const { contains } = useFilter({ sensitivity: 'base' })
|
|
181
233
|
|
|
182
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur', 'highlightOnHover', 'ignoreFilter'), emits)
|
|
234
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, 'as', 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'required', 'multiple', 'resetSearchTermOnBlur', 'highlightOnHover', 'ignoreFilter'), emits)
|
|
183
235
|
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }) as ComboboxContentProps)
|
|
184
236
|
const arrowProps = toRef(() => props.arrow as ComboboxArrowProps)
|
|
185
237
|
|
|
@@ -363,6 +415,7 @@ defineExpose({
|
|
|
363
415
|
v-slot="{ modelValue: tags }"
|
|
364
416
|
:model-value="(modelValue as string[])"
|
|
365
417
|
:disabled="disabled"
|
|
418
|
+
:required="required"
|
|
366
419
|
delimiter=""
|
|
367
420
|
as-child
|
|
368
421
|
@blur="onBlur"
|
|
@@ -391,7 +444,6 @@ defineExpose({
|
|
|
391
444
|
ref="inputRef"
|
|
392
445
|
v-bind="{ ...$attrs, ...ariaAttrs }"
|
|
393
446
|
:placeholder="placeholder"
|
|
394
|
-
:required="required"
|
|
395
447
|
:class="b24ui.tagsInput({ class: props.b24ui?.tagsInput })"
|
|
396
448
|
@keydown.enter.prevent
|
|
397
449
|
/>
|
|
@@ -20,21 +20,47 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
20
20
|
* @defaultValue 'div'
|
|
21
21
|
*/
|
|
22
22
|
as?: any
|
|
23
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The placeholder text when the input is empty
|
|
25
|
+
*/
|
|
24
26
|
placeholder?: string
|
|
27
|
+
/**
|
|
28
|
+
* @defaultValue 'primary'
|
|
29
|
+
*/
|
|
25
30
|
color?: InputNumberVariants['color']
|
|
31
|
+
/**
|
|
32
|
+
* @defaultValue 'md'
|
|
33
|
+
*/
|
|
26
34
|
size?: InputNumberVariants['size']
|
|
27
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Removes padding from input
|
|
37
|
+
* @defaultValue false
|
|
38
|
+
*/
|
|
28
39
|
noPadding?: boolean
|
|
29
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Removes all borders (rings)
|
|
42
|
+
* @defaultValue false
|
|
43
|
+
*/
|
|
30
44
|
noBorder?: boolean
|
|
31
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Removes all borders (rings) except the bottom one
|
|
47
|
+
* @defaultValue false
|
|
48
|
+
*/
|
|
32
49
|
underline?: boolean
|
|
33
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Rounds the corners of the button
|
|
52
|
+
* @defaultValue false
|
|
53
|
+
*/
|
|
34
54
|
rounded?: boolean
|
|
35
55
|
tag?: string
|
|
56
|
+
/**
|
|
57
|
+
* @defaultValue 'primary'
|
|
58
|
+
*/
|
|
36
59
|
tagColor?: InputNumberVariants['tagColor']
|
|
37
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* Highlight the ring color like a focus state
|
|
62
|
+
* @defaultValue false
|
|
63
|
+
*/
|
|
38
64
|
highlight?: boolean
|
|
39
65
|
/**
|
|
40
66
|
* The orientation of the input menu.
|
|
@@ -48,7 +74,8 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
48
74
|
increment?: ButtonProps
|
|
49
75
|
/**
|
|
50
76
|
* The icon displayed to increment the value.
|
|
51
|
-
* @defaultValue icons.plus
|
|
77
|
+
* @defaultValue icons.plus
|
|
78
|
+
* @IconComponent
|
|
52
79
|
*/
|
|
53
80
|
incrementIcon?: IconComponent
|
|
54
81
|
/**
|
|
@@ -58,10 +85,17 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
|
|
|
58
85
|
decrement?: ButtonProps
|
|
59
86
|
/**
|
|
60
87
|
* The icon displayed to decrement the value.
|
|
61
|
-
* @defaultValue icons.minus
|
|
88
|
+
* @defaultValue icons.minus
|
|
89
|
+
* @IconComponent
|
|
62
90
|
*/
|
|
63
91
|
decrementIcon?: IconComponent
|
|
92
|
+
/**
|
|
93
|
+
* @defaultValue false
|
|
94
|
+
*/
|
|
64
95
|
autofocus?: boolean
|
|
96
|
+
/**
|
|
97
|
+
* @defaultValue 0
|
|
98
|
+
*/
|
|
65
99
|
autofocusDelay?: number
|
|
66
100
|
/**
|
|
67
101
|
* The locale to use for formatting and parsing numbers.
|
|
@@ -93,7 +93,7 @@ export interface LinkSlots {
|
|
|
93
93
|
|
|
94
94
|
<script setup lang="ts">
|
|
95
95
|
import { computed } from 'vue'
|
|
96
|
-
import { isEqual, diff } from 'ohash'
|
|
96
|
+
import { isEqual, diff } from 'ohash/utils'
|
|
97
97
|
import { useForwardProps } from 'reka-ui'
|
|
98
98
|
import { reactiveOmit } from '@vueuse/core'
|
|
99
99
|
import { useRoute } from '#imports'
|
|
@@ -127,11 +127,15 @@ const b24ui = computed(() => tv({
|
|
|
127
127
|
function isPartiallyEqual(item1: any, item2: any) {
|
|
128
128
|
const diffedKeys = diff(item1, item2).reduce((filtered, q) => {
|
|
129
129
|
if (q.type === 'added') {
|
|
130
|
-
filtered.
|
|
130
|
+
filtered.add(q.key)
|
|
131
131
|
}
|
|
132
132
|
return filtered
|
|
133
|
-
},
|
|
134
|
-
|
|
133
|
+
}, new Set<string>())
|
|
134
|
+
|
|
135
|
+
const item1Filtered = Object.fromEntries(Object.entries(item1).filter(([key]) => !diffedKeys.has(key)))
|
|
136
|
+
const item2Filtered = Object.fromEntries(Object.entries(item2).filter(([key]) => !diffedKeys.has(key)))
|
|
137
|
+
|
|
138
|
+
return isEqual(item1Filtered, item2Filtered)
|
|
135
139
|
}
|
|
136
140
|
|
|
137
141
|
function isLinkActive({ route: linkRoute, isActive, isExactActive }: any) {
|
|
@@ -13,7 +13,9 @@ const modal = tv({ extend: tv(theme), ...(appConfigModal.b24ui?.modal || {}) })
|
|
|
13
13
|
export interface ModalProps extends DialogRootProps {
|
|
14
14
|
title?: string
|
|
15
15
|
description?: string
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The content of the modal
|
|
18
|
+
*/
|
|
17
19
|
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
18
20
|
/**
|
|
19
21
|
* Render an overlay behind the modal.
|
|
@@ -37,20 +39,24 @@ export interface ModalProps extends DialogRootProps {
|
|
|
37
39
|
portal?: boolean
|
|
38
40
|
/**
|
|
39
41
|
* Display a close button to dismiss the modal.
|
|
40
|
-
* `{ size: 'xs', color: 'link' }`{lang="ts
|
|
42
|
+
* `{ size: 'xs', color: 'link' }`{lang="ts"}
|
|
41
43
|
* @defaultValue true
|
|
42
44
|
*/
|
|
43
45
|
close?: boolean | Partial<ButtonProps>
|
|
44
46
|
/**
|
|
45
47
|
* The icon displayed in the close button.
|
|
46
48
|
* @defaultValue icons.close
|
|
49
|
+
* @IconComponent
|
|
47
50
|
*/
|
|
48
51
|
closeIcon?: IconComponent
|
|
49
52
|
/**
|
|
50
53
|
* When `false`, the modal will not close when clicking outside or pressing escape.
|
|
51
|
-
* @defaultValue
|
|
54
|
+
* @defaultValue false
|
|
52
55
|
*/
|
|
53
56
|
dismissible?: boolean
|
|
57
|
+
/**
|
|
58
|
+
* @defaultValue true
|
|
59
|
+
*/
|
|
54
60
|
scrollbarThin?: boolean
|
|
55
61
|
class?: any
|
|
56
62
|
b24ui?: Partial<typeof modal.slots>
|
|
@@ -19,19 +19,35 @@ export interface ProgressProps extends Pick<ProgressRootProps, 'getValueLabel' |
|
|
|
19
19
|
* @defaultValue 'div'
|
|
20
20
|
*/
|
|
21
21
|
as?: any
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The maximum progress value
|
|
24
|
+
*/
|
|
23
25
|
max?: number | Array<any>
|
|
24
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Display the current progress value
|
|
28
|
+
*/
|
|
25
29
|
status?: boolean
|
|
26
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Whether the progress is visually inverted
|
|
32
|
+
* @defaultValue false
|
|
33
|
+
*/
|
|
27
34
|
inverted?: boolean
|
|
35
|
+
/**
|
|
36
|
+
* @defaultValue 'md'
|
|
37
|
+
*/
|
|
28
38
|
size?: ProgressVariants['size']
|
|
39
|
+
/**
|
|
40
|
+
* @defaultValue 'primary'
|
|
41
|
+
*/
|
|
29
42
|
color?: ProgressVariants['color']
|
|
30
43
|
/**
|
|
31
44
|
* The orientation of the progress bar.
|
|
32
45
|
* @defaultValue 'horizontal'
|
|
33
46
|
*/
|
|
34
47
|
orientation?: ProgressVariants['orientation']
|
|
48
|
+
/**
|
|
49
|
+
* @defaultValue 'loading'
|
|
50
|
+
*/
|
|
35
51
|
animation?: ProgressVariants['animation']
|
|
36
52
|
class?: any
|
|
37
53
|
b24ui?: Partial<typeof progress.slots>
|
|
@@ -42,7 +42,13 @@ export interface RadioGroupProps<T> extends Pick<RadioGroupRootProps, 'defaultVa
|
|
|
42
42
|
*/
|
|
43
43
|
descriptionKey?: string
|
|
44
44
|
items?: T[]
|
|
45
|
+
/**
|
|
46
|
+
* @defaultValue 'md'
|
|
47
|
+
*/
|
|
45
48
|
size?: RadioGroupVariants['size']
|
|
49
|
+
/**
|
|
50
|
+
* @defaultValue 'primary'
|
|
51
|
+
*/
|
|
46
52
|
color?: RadioGroupVariants['color']
|
|
47
53
|
/**
|
|
48
54
|
* The orientation the radio buttons are laid out.
|
|
@@ -18,14 +18,22 @@ export interface RangeProps extends Pick<SliderRootProps, 'name' | 'disabled' |
|
|
|
18
18
|
* @defaultValue 'div'
|
|
19
19
|
*/
|
|
20
20
|
as?: any
|
|
21
|
+
/**
|
|
22
|
+
* @defaultValue 'md'
|
|
23
|
+
*/
|
|
21
24
|
size?: RangeVariants['size']
|
|
25
|
+
/**
|
|
26
|
+
* @defaultValue 'primary'
|
|
27
|
+
*/
|
|
22
28
|
color?: RangeVariants['color']
|
|
23
29
|
/**
|
|
24
30
|
* The orientation of the Range.
|
|
25
31
|
* @defaultValue 'horizontal'
|
|
26
32
|
*/
|
|
27
33
|
orientation?: SliderRootProps['orientation']
|
|
28
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* The value of the Range when initially rendered. Use when you do not need to control the state of the Range
|
|
36
|
+
*/
|
|
29
37
|
defaultValue?: number | number[]
|
|
30
38
|
class?: any
|
|
31
39
|
b24ui?: Partial<typeof range.slots>
|
|
@@ -17,6 +17,10 @@ type SelectVariants = VariantProps<typeof select>
|
|
|
17
17
|
|
|
18
18
|
export interface SelectItem {
|
|
19
19
|
label?: string
|
|
20
|
+
/**
|
|
21
|
+
* Display an icon on the left side.
|
|
22
|
+
* @IconComponent
|
|
23
|
+
*/
|
|
20
24
|
icon?: IconComponent
|
|
21
25
|
avatar?: AvatarProps
|
|
22
26
|
color?: SelectVariants['color']
|
|
@@ -34,26 +38,49 @@ export interface SelectProps<T extends MaybeArrayOfArrayItem<I>, I extends Maybe
|
|
|
34
38
|
id?: string
|
|
35
39
|
/** The placeholder text when the select is empty. */
|
|
36
40
|
placeholder?: string
|
|
41
|
+
/**
|
|
42
|
+
* @defaultValue 'primary'
|
|
43
|
+
*/
|
|
37
44
|
color?: SelectVariants['color']
|
|
45
|
+
/**
|
|
46
|
+
* @defaultValue 'md'
|
|
47
|
+
*/
|
|
38
48
|
size?: SelectVariants['size']
|
|
39
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* Removes padding from input
|
|
51
|
+
* @defaultValue false
|
|
52
|
+
*/
|
|
40
53
|
noPadding?: boolean
|
|
41
|
-
/**
|
|
54
|
+
/**
|
|
55
|
+
* Removes all borders (rings)
|
|
56
|
+
* @defaultValue false
|
|
57
|
+
*/
|
|
42
58
|
noBorder?: boolean
|
|
43
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Removes all borders (rings) except the bottom one
|
|
61
|
+
* @defaultValue false
|
|
62
|
+
*/
|
|
44
63
|
underline?: boolean
|
|
45
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* Rounds the corners of the button
|
|
66
|
+
* @defaultValue false
|
|
67
|
+
*/
|
|
46
68
|
rounded?: boolean
|
|
47
69
|
tag?: string
|
|
70
|
+
/**
|
|
71
|
+
* @defaultValue 'primary'
|
|
72
|
+
*/
|
|
48
73
|
tagColor?: SelectVariants['tagColor']
|
|
49
74
|
/**
|
|
50
75
|
* The icon displayed to open the menu.
|
|
51
|
-
* @defaultValue icons.chevronDown
|
|
76
|
+
* @defaultValue icons.chevronDown
|
|
77
|
+
* @IconComponent
|
|
52
78
|
*/
|
|
53
79
|
trailingIcon?: IconComponent
|
|
54
80
|
/**
|
|
55
81
|
* The icon displayed when an item is selected.
|
|
56
|
-
* @defaultValue icons.check
|
|
82
|
+
* @defaultValue icons.check
|
|
83
|
+
* @IconComponent
|
|
57
84
|
*/
|
|
58
85
|
selectedIcon?: IconComponent
|
|
59
86
|
/**
|
|
@@ -82,13 +109,23 @@ export interface SelectProps<T extends MaybeArrayOfArrayItem<I>, I extends Maybe
|
|
|
82
109
|
*/
|
|
83
110
|
labelKey?: V
|
|
84
111
|
items?: I
|
|
85
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* The value of the Select when initially rendered. Use when you do not need to control the state of the Select
|
|
114
|
+
*/
|
|
86
115
|
defaultValue?: SelectModelValue<T, V, M, T extends { value: infer U } ? U : never>
|
|
87
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* The controlled value of the Select. Can be bind as `v-model`
|
|
118
|
+
*/
|
|
88
119
|
modelValue?: SelectModelValue<T, V, M, T extends { value: infer U } ? U : never>
|
|
89
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* Whether multiple options can be selected or not
|
|
122
|
+
* @defaultValue false
|
|
123
|
+
*/
|
|
90
124
|
multiple?: M & boolean
|
|
91
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* Highlight the ring color like a focus state
|
|
127
|
+
* @defaultValue false
|
|
128
|
+
*/
|
|
92
129
|
highlight?: boolean
|
|
93
130
|
class?: any
|
|
94
131
|
b24ui?: PartialString<typeof select.slots>
|
|
@@ -17,6 +17,10 @@ type SelectMenuVariants = VariantProps<typeof selectMenu>
|
|
|
17
17
|
|
|
18
18
|
export interface SelectMenuItem {
|
|
19
19
|
label?: string
|
|
20
|
+
/**
|
|
21
|
+
* Display an icon on the left side.
|
|
22
|
+
* @IconComponent
|
|
23
|
+
*/
|
|
20
24
|
icon?: IconComponent
|
|
21
25
|
avatar?: AvatarProps
|
|
22
26
|
color?: SelectMenuVariants['color']
|
|
@@ -37,31 +41,57 @@ export interface SelectMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends M
|
|
|
37
41
|
/**
|
|
38
42
|
* Whether to display the search input or not.
|
|
39
43
|
* Can be an object to pass additional props to the input.
|
|
40
|
-
* `{ placeholder: 'Search...', type: 'search' }`{lang="ts
|
|
44
|
+
* `{ placeholder: 'Search...', type: 'search' }`{lang="ts"}
|
|
41
45
|
* @defaultValue true
|
|
42
46
|
*/
|
|
43
47
|
searchInput?: boolean | InputProps
|
|
48
|
+
/**
|
|
49
|
+
* @defaultValue 'primary'
|
|
50
|
+
*/
|
|
44
51
|
color?: SelectMenuVariants['color']
|
|
52
|
+
/**
|
|
53
|
+
* @defaultValue 'md'
|
|
54
|
+
*/
|
|
45
55
|
size?: SelectMenuVariants['size']
|
|
46
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* Removes padding from input
|
|
58
|
+
* @defaultValue false
|
|
59
|
+
*/
|
|
47
60
|
noPadding?: boolean
|
|
48
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* Removes all borders (rings)
|
|
63
|
+
* @defaultValue false
|
|
64
|
+
*/
|
|
49
65
|
noBorder?: boolean
|
|
50
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* Removes all borders (rings) except the bottom one
|
|
68
|
+
* @defaultValue false
|
|
69
|
+
*/
|
|
51
70
|
underline?: boolean
|
|
52
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* Rounds the corners of the button
|
|
73
|
+
* @defaultValue false
|
|
74
|
+
*/
|
|
53
75
|
rounded?: boolean
|
|
54
76
|
tag?: string
|
|
77
|
+
/**
|
|
78
|
+
* @defaultValue 'primary'
|
|
79
|
+
*/
|
|
55
80
|
tagColor?: SelectMenuVariants['tagColor']
|
|
81
|
+
/**
|
|
82
|
+
* @defaultValue false
|
|
83
|
+
*/
|
|
56
84
|
required?: boolean
|
|
57
85
|
/**
|
|
58
86
|
* The icon displayed to open the menu.
|
|
59
|
-
* @defaultValue icons.chevronDown
|
|
87
|
+
* @defaultValue icons.chevronDown
|
|
88
|
+
* @IconComponent
|
|
60
89
|
*/
|
|
61
90
|
trailingIcon?: IconComponent
|
|
62
91
|
/**
|
|
63
92
|
* The icon displayed when an item is selected.
|
|
64
|
-
* @defaultValue icons.check
|
|
93
|
+
* @defaultValue icons.check
|
|
94
|
+
* @IconComponent
|
|
65
95
|
*/
|
|
66
96
|
selectedIcon?: IconComponent
|
|
67
97
|
/**
|
|
@@ -90,13 +120,23 @@ export interface SelectMenuProps<T extends MaybeArrayOfArrayItem<I>, I extends M
|
|
|
90
120
|
*/
|
|
91
121
|
labelKey?: V
|
|
92
122
|
items?: I
|
|
93
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* The value of the SelectMenu when initially rendered. Use when you do not need to control the state of the SelectMenu
|
|
125
|
+
*/
|
|
94
126
|
defaultValue?: SelectModelValue<T, V, M>
|
|
95
|
-
/**
|
|
127
|
+
/**
|
|
128
|
+
* The controlled value of the SelectMenu. Can be binded-with with `v-model`
|
|
129
|
+
*/
|
|
96
130
|
modelValue?: SelectModelValue<T, V, M>
|
|
97
|
-
/**
|
|
131
|
+
/**
|
|
132
|
+
* Whether multiple options can be selected or not
|
|
133
|
+
* @defaultValue false
|
|
134
|
+
*/
|
|
98
135
|
multiple?: M & boolean
|
|
99
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* Highlight the ring color like a focus state
|
|
138
|
+
* @defaultValue false
|
|
139
|
+
*/
|
|
100
140
|
highlight?: boolean
|
|
101
141
|
/**
|
|
102
142
|
* Determines if custom user input that does not exist in options can be added.
|
|
@@ -189,7 +229,7 @@ const searchTerm = defineModel<string>('searchTerm', { default: '' })
|
|
|
189
229
|
const { t } = useLocale()
|
|
190
230
|
const { contains } = useFilter({ sensitivity: 'base' })
|
|
191
231
|
|
|
192
|
-
const rootProps = useForwardPropsEmits(reactivePick(props, 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'multiple', 'resetSearchTermOnBlur', 'highlightOnHover'), emits)
|
|
232
|
+
const rootProps = useForwardPropsEmits(reactivePick(props, 'modelValue', 'defaultValue', 'open', 'defaultOpen', 'required', 'multiple', 'resetSearchTermOnBlur', 'highlightOnHover'), emits)
|
|
193
233
|
const contentProps = toRef(() => defu(props.content, { side: 'bottom', sideOffset: 8, collisionPadding: 8, position: 'popper' }) as ComboboxContentProps)
|
|
194
234
|
const arrowProps = toRef(() => props.arrow as ComboboxArrowProps)
|
|
195
235
|
const searchInputProps = toRef(() => defu(props.searchInput, { placeholder: t('selectMenu.search'), type: 'search' }) as InputProps)
|
|
@@ -21,12 +21,26 @@ export interface SeparatorProps extends Pick<_SeparatorProps, 'decorative'> {
|
|
|
21
21
|
as?: any
|
|
22
22
|
/** Display a label in the middle. */
|
|
23
23
|
label?: string
|
|
24
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* Display an icon in the middle
|
|
26
|
+
* @IconComponent
|
|
27
|
+
*/
|
|
25
28
|
icon?: IconComponent
|
|
26
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Display an avatar in the middle
|
|
31
|
+
*/
|
|
27
32
|
avatar?: AvatarProps
|
|
33
|
+
/**
|
|
34
|
+
* @defaultValue 'default'
|
|
35
|
+
*/
|
|
28
36
|
color?: SeparatorVariants['color']
|
|
37
|
+
/**
|
|
38
|
+
* @defaultValue 'xs'
|
|
39
|
+
*/
|
|
29
40
|
size?: SeparatorVariants['size']
|
|
41
|
+
/**
|
|
42
|
+
* @defaultValue 'solid'
|
|
43
|
+
*/
|
|
30
44
|
type?: SeparatorVariants['type']
|
|
31
45
|
/**
|
|
32
46
|
* The orientation of the separator.
|
|
@@ -16,7 +16,9 @@ type SlideoverVariants = VariantProps<typeof slideover>
|
|
|
16
16
|
export interface SlideoverProps extends DialogRootProps {
|
|
17
17
|
title?: string
|
|
18
18
|
description?: string
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The content of the slideover
|
|
21
|
+
*/
|
|
20
22
|
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
21
23
|
/**
|
|
22
24
|
* Render an overlay behind the slideover.
|
|
@@ -28,6 +30,10 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
28
30
|
* @defaultValue true
|
|
29
31
|
*/
|
|
30
32
|
transition?: boolean
|
|
33
|
+
/**
|
|
34
|
+
* The side of the slideover.
|
|
35
|
+
* @defaultValue 'right'
|
|
36
|
+
*/
|
|
31
37
|
side?: SlideoverVariants['side']
|
|
32
38
|
/**
|
|
33
39
|
* Render the slideover in a portal.
|
|
@@ -44,13 +50,17 @@ export interface SlideoverProps extends DialogRootProps {
|
|
|
44
50
|
/**
|
|
45
51
|
* The icon displayed in the close button.
|
|
46
52
|
* @defaultValue icons.close
|
|
53
|
+
* @IconifyIcon
|
|
47
54
|
*/
|
|
48
55
|
closeIcon?: IconComponent
|
|
49
56
|
/**
|
|
50
57
|
* When `false`, the slideover will not close when clicking outside or pressing escape.
|
|
51
|
-
* @defaultValue
|
|
58
|
+
* @defaultValue false
|
|
52
59
|
*/
|
|
53
60
|
dismissible?: boolean
|
|
61
|
+
/**
|
|
62
|
+
* @defaultValue true
|
|
63
|
+
*/
|
|
54
64
|
scrollbarThin?: boolean
|
|
55
65
|
class?: any
|
|
56
66
|
b24ui?: Partial<typeof slideover.slots>
|