@bitrix24/b24ui-nuxt 0.4.0 → 0.4.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.
- package/.nuxt/b24ui/button.ts +8 -0
- package/.nuxt/b24ui/index.ts +1 -0
- package/.nuxt/b24ui/modal.ts +21 -3
- package/.nuxt/b24ui/prose/blockquote.ts +5 -0
- package/.nuxt/b24ui/prose/em.ts +5 -0
- package/.nuxt/b24ui/prose/h1.ts +6 -0
- package/.nuxt/b24ui/prose/h2.ts +16 -0
- package/.nuxt/b24ui/prose/h3.ts +16 -0
- package/.nuxt/b24ui/prose/h4.ts +16 -0
- package/.nuxt/b24ui/prose/h5.ts +16 -0
- package/.nuxt/b24ui/prose/h6.ts +16 -0
- package/.nuxt/b24ui/prose/hr.ts +5 -0
- package/.nuxt/b24ui/prose/li.ts +5 -0
- package/.nuxt/b24ui/prose/ol.ts +5 -0
- package/.nuxt/b24ui/prose/p.ts +5 -0
- package/.nuxt/b24ui/prose/strong.ts +5 -0
- package/.nuxt/b24ui/prose/ul.ts +5 -0
- package/.nuxt/b24ui/slideover.ts +26 -7
- package/dist/meta.cjs +32768 -29015
- package/dist/meta.d.cts +32768 -29015
- package/dist/meta.d.mts +32768 -29015
- package/dist/meta.d.ts +32768 -29015
- package/dist/meta.mjs +32768 -29015
- 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 +120 -52
- 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 +22 -5
- 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 +22 -4
- 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 +9 -2
- package/dist/runtime/index.css +1 -1
- package/dist/runtime/prose/Blockquote.vue +36 -0
- package/dist/runtime/prose/Em.vue +36 -0
- package/dist/runtime/prose/H1.vue +36 -0
- package/dist/runtime/prose/H2.vue +36 -0
- package/dist/runtime/prose/H3.vue +36 -0
- package/dist/runtime/prose/H4.vue +36 -0
- package/dist/runtime/prose/H5.vue +36 -0
- package/dist/runtime/prose/H6.vue +36 -0
- package/dist/runtime/prose/Hr.vue +30 -0
- package/dist/runtime/prose/Li.vue +36 -0
- package/dist/runtime/prose/Ol.vue +36 -0
- package/dist/runtime/prose/P.vue +36 -0
- package/dist/runtime/prose/Strong.vue +36 -0
- package/dist/runtime/prose/Ul.vue +36 -0
- package/dist/runtime/types/index.d.ts +16 -2
- package/dist/runtime/types/index.js +16 -2
- package/dist/runtime/utils/index.js +1 -1
- package/dist/runtime/vue/components/Link.vue +10 -6
- package/dist/shared/{b24ui-nuxt.BT9wxrhm.cjs → b24ui-nuxt.Bt28CeAD.cjs} +350 -90
- package/dist/shared/{b24ui-nuxt.CBO0gAWn.mjs → b24ui-nuxt.Bx_-_mhu.mjs} +350 -90
- 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 +7 -6
- /package/.nuxt/b24ui/{prose → content}/table-wrapper.ts +0 -0
- /package/.nuxt/b24ui/{content/description-list.ts → description-list.ts} +0 -0
|
@@ -23,27 +23,71 @@ export interface InputProps extends UseComponentIconsProps {
|
|
|
23
23
|
as?: any
|
|
24
24
|
id?: string
|
|
25
25
|
name?: string
|
|
26
|
+
/**
|
|
27
|
+
* @defaultValue 'text'
|
|
28
|
+
*/
|
|
26
29
|
type?: InputHTMLAttributes['type']
|
|
27
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* The placeholder text when the input is empty.
|
|
32
|
+
*/
|
|
28
33
|
placeholder?: string
|
|
34
|
+
/**
|
|
35
|
+
* @defaultValue 'primary'
|
|
36
|
+
*/
|
|
29
37
|
color?: InputVariants['color']
|
|
38
|
+
/**
|
|
39
|
+
* @defaultValue 'md'
|
|
40
|
+
*/
|
|
30
41
|
size?: InputVariants['size']
|
|
31
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Removes padding from input
|
|
44
|
+
* @defaultValue false
|
|
45
|
+
*/
|
|
32
46
|
noPadding?: boolean
|
|
33
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Removes all borders (rings)
|
|
49
|
+
* @defaultValue false
|
|
50
|
+
*/
|
|
34
51
|
noBorder?: boolean
|
|
35
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* Removes all borders (rings) except the bottom one
|
|
54
|
+
* @defaultValue false
|
|
55
|
+
*/
|
|
36
56
|
underline?: boolean
|
|
37
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Rounds the corners of the button
|
|
59
|
+
* @defaultValue false
|
|
60
|
+
*/
|
|
38
61
|
rounded?: boolean
|
|
62
|
+
/**
|
|
63
|
+
* @defaultValue false
|
|
64
|
+
*/
|
|
39
65
|
required?: boolean
|
|
66
|
+
/**
|
|
67
|
+
* @defaultValue 'off'
|
|
68
|
+
*/
|
|
40
69
|
autocomplete?: InputHTMLAttributes['autocomplete']
|
|
70
|
+
/**
|
|
71
|
+
* @defaultValue false
|
|
72
|
+
*/
|
|
41
73
|
autofocus?: boolean
|
|
74
|
+
/**
|
|
75
|
+
* @defaultValue 0
|
|
76
|
+
*/
|
|
42
77
|
autofocusDelay?: number
|
|
78
|
+
/**
|
|
79
|
+
* @defaultValue false
|
|
80
|
+
*/
|
|
43
81
|
disabled?: boolean
|
|
44
82
|
tag?: string
|
|
83
|
+
/**
|
|
84
|
+
* @defaultValue 'primary'
|
|
85
|
+
*/
|
|
45
86
|
tagColor?: InputVariants['tagColor']
|
|
46
|
-
/**
|
|
87
|
+
/**
|
|
88
|
+
* Highlight the ring color like a focus state
|
|
89
|
+
* @defaultValue false
|
|
90
|
+
*/
|
|
47
91
|
highlight?: boolean
|
|
48
92
|
class?: any
|
|
49
93
|
b24ui?: PartialString<typeof input.slots>
|
|
@@ -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) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { DialogRootProps, DialogRootEmits, DialogContentProps } from 'reka-ui'
|
|
3
|
+
import type { VariantProps } from 'tailwind-variants'
|
|
3
4
|
import type { AppConfig } from '@nuxt/schema'
|
|
4
5
|
import _appConfig from '#build/app.config'
|
|
5
6
|
import theme from '#build/b24ui/modal'
|
|
@@ -10,16 +11,26 @@ const appConfigModal = _appConfig as AppConfig & { b24ui: { modal: Partial<typeo
|
|
|
10
11
|
|
|
11
12
|
const modal = tv({ extend: tv(theme), ...(appConfigModal.b24ui?.modal || {}) })
|
|
12
13
|
|
|
14
|
+
type ModalVariants = VariantProps<typeof modal>
|
|
15
|
+
|
|
13
16
|
export interface ModalProps extends DialogRootProps {
|
|
14
17
|
title?: string
|
|
15
18
|
description?: string
|
|
16
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The content of the modal
|
|
21
|
+
*/
|
|
17
22
|
content?: Omit<DialogContentProps, 'as' | 'asChild' | 'forceMount'>
|
|
18
23
|
/**
|
|
19
24
|
* Render an overlay behind the modal.
|
|
20
25
|
* @defaultValue true
|
|
21
26
|
*/
|
|
22
27
|
overlay?: boolean
|
|
28
|
+
/**
|
|
29
|
+
* Render an overlay blur behind the modal.
|
|
30
|
+
* `auto` use `motion-safe`.
|
|
31
|
+
* @defaultValue 'auto'
|
|
32
|
+
*/
|
|
33
|
+
overlayBlur?: ModalVariants['overlayBlur']
|
|
23
34
|
/**
|
|
24
35
|
* Animate the modal when opening or closing.
|
|
25
36
|
* @defaultValue true
|
|
@@ -37,20 +48,24 @@ export interface ModalProps extends DialogRootProps {
|
|
|
37
48
|
portal?: boolean
|
|
38
49
|
/**
|
|
39
50
|
* Display a close button to dismiss the modal.
|
|
40
|
-
* `{ size: 'xs', color: 'link' }`{lang="ts
|
|
51
|
+
* `{ size: 'xs', color: 'link' }`{lang="ts"}
|
|
41
52
|
* @defaultValue true
|
|
42
53
|
*/
|
|
43
54
|
close?: boolean | Partial<ButtonProps>
|
|
44
55
|
/**
|
|
45
56
|
* The icon displayed in the close button.
|
|
46
57
|
* @defaultValue icons.close
|
|
58
|
+
* @IconComponent
|
|
47
59
|
*/
|
|
48
60
|
closeIcon?: IconComponent
|
|
49
61
|
/**
|
|
50
62
|
* When `false`, the modal will not close when clicking outside or pressing escape.
|
|
51
|
-
* @defaultValue
|
|
63
|
+
* @defaultValue false
|
|
52
64
|
*/
|
|
53
65
|
dismissible?: boolean
|
|
66
|
+
/**
|
|
67
|
+
* @defaultValue true
|
|
68
|
+
*/
|
|
54
69
|
scrollbarThin?: boolean
|
|
55
70
|
class?: any
|
|
56
71
|
b24ui?: Partial<typeof modal.slots>
|
|
@@ -87,7 +102,8 @@ const props = withDefaults(defineProps<ModalProps>(), {
|
|
|
87
102
|
transition: true,
|
|
88
103
|
modal: true,
|
|
89
104
|
dismissible: true,
|
|
90
|
-
scrollbarThin: true
|
|
105
|
+
scrollbarThin: true,
|
|
106
|
+
overlayBlur: 'auto'
|
|
91
107
|
})
|
|
92
108
|
const emits = defineEmits<ModalEmits>()
|
|
93
109
|
const slots = defineSlots<ModalSlots>()
|
|
@@ -113,7 +129,8 @@ const contentEvents = computed(() => {
|
|
|
113
129
|
|
|
114
130
|
const b24ui = computed(() => modal({
|
|
115
131
|
transition: props.transition,
|
|
116
|
-
fullscreen: props.fullscreen
|
|
132
|
+
fullscreen: props.fullscreen,
|
|
133
|
+
overlayBlur: props.overlayBlur
|
|
117
134
|
}))
|
|
118
135
|
</script>
|
|
119
136
|
|
|
@@ -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>
|