@bitrix24/b24ui-nuxt 0.2.4 → 0.2.6

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/dist/meta.d.ts CHANGED
@@ -7431,6 +7431,34 @@ var B24UIMeta = {
7431
7431
  }
7432
7432
  }
7433
7433
  },
7434
+ {
7435
+ "name": "externalIcon",
7436
+ "global": false,
7437
+ "description": "The icon displayed when the item is an external link.\nSet to `false` to hide the external icon.",
7438
+ "tags": [
7439
+ {
7440
+ "name": "defaultValue",
7441
+ "text": "icons.external = `OpenIn50Icon`"
7442
+ }
7443
+ ],
7444
+ "required": false,
7445
+ "type": "boolean | IconComponent | undefined",
7446
+ "schema": {
7447
+ "kind": "enum",
7448
+ "type": "boolean | IconComponent | undefined",
7449
+ "schema": {
7450
+ "0": "undefined",
7451
+ "1": "false",
7452
+ "2": "true",
7453
+ "3": {
7454
+ "kind": "event",
7455
+ "type": "(props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Data; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, \"expose\">): any",
7456
+ "schema": []
7457
+ }
7458
+ }
7459
+ },
7460
+ "default": "true"
7461
+ },
7434
7462
  {
7435
7463
  "name": "content",
7436
7464
  "global": false,
@@ -12668,6 +12696,28 @@ var B24UIMeta = {
12668
12696
  }
12669
12697
  }
12670
12698
  },
12699
+ {
12700
+ "name": "externalIcon",
12701
+ "global": false,
12702
+ "description": "",
12703
+ "tags": [],
12704
+ "required": false,
12705
+ "type": "boolean | IconComponent | undefined",
12706
+ "schema": {
12707
+ "kind": "enum",
12708
+ "type": "boolean | IconComponent | undefined",
12709
+ "schema": {
12710
+ "0": "undefined",
12711
+ "1": "false",
12712
+ "2": "true",
12713
+ "3": {
12714
+ "kind": "event",
12715
+ "type": "(props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Data; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, \"expose\">): any",
12716
+ "schema": []
12717
+ }
12718
+ }
12719
+ }
12720
+ },
12671
12721
  {
12672
12722
  "name": "b24uiOverride",
12673
12723
  "global": false,
@@ -12733,15 +12783,15 @@ var B24UIMeta = {
12733
12783
  }
12734
12784
  ],
12735
12785
  "required": false,
12736
- "type": "\"start\" | \"end\" | \"center\" | undefined",
12786
+ "type": "\"start\" | \"center\" | \"end\" | undefined",
12737
12787
  "schema": {
12738
12788
  "kind": "enum",
12739
- "type": "\"start\" | \"end\" | \"center\" | undefined",
12789
+ "type": "\"start\" | \"center\" | \"end\" | undefined",
12740
12790
  "schema": {
12741
12791
  "0": "undefined",
12742
12792
  "1": "\"start\"",
12743
- "2": "\"end\"",
12744
- "3": "\"center\""
12793
+ "2": "\"center\"",
12794
+ "3": "\"end\""
12745
12795
  }
12746
12796
  }
12747
12797
  },
@@ -19553,22 +19603,6 @@ var B24UIMeta = {
19553
19603
  }
19554
19604
  }
19555
19605
  },
19556
- {
19557
- "name": "b24ui",
19558
- "global": false,
19559
- "description": "",
19560
- "tags": [],
19561
- "required": false,
19562
- "type": "Partial<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
19563
- "schema": {
19564
- "kind": "enum",
19565
- "type": "Partial<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
19566
- "schema": {
19567
- "0": "undefined",
19568
- "1": "Partial<{ root: string; base: string; increment: string; decrement: string; tag: string; }>"
19569
- }
19570
- }
19571
- },
19572
19606
  {
19573
19607
  "name": "orientation",
19574
19608
  "global": false,
@@ -21442,6 +21476,22 @@ var B24UIMeta = {
21442
21476
  }
21443
21477
  }
21444
21478
  },
21479
+ {
21480
+ "name": "b24ui",
21481
+ "global": false,
21482
+ "description": "",
21483
+ "tags": [],
21484
+ "required": false,
21485
+ "type": "PartialString<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
21486
+ "schema": {
21487
+ "kind": "enum",
21488
+ "type": "PartialString<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
21489
+ "schema": {
21490
+ "0": "undefined",
21491
+ "1": "PartialString<{ root: string; base: string; increment: string; decrement: string; tag: string; }>"
21492
+ }
21493
+ }
21494
+ },
21445
21495
  {
21446
21496
  "name": "disabled",
21447
21497
  "global": false,
@@ -29780,13 +29830,13 @@ var B24UIMeta = {
29780
29830
  "description": "",
29781
29831
  "tags": [],
29782
29832
  "required": false,
29783
- "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 18 more ...; input: string; }> | undefined",
29833
+ "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 19 more ...; focusScope: string; }> | undefined",
29784
29834
  "schema": {
29785
29835
  "kind": "enum",
29786
- "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 18 more ...; input: string; }> | undefined",
29836
+ "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 19 more ...; focusScope: string; }> | undefined",
29787
29837
  "schema": {
29788
29838
  "0": "undefined",
29789
- "1": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 18 more ...; input: string; }>"
29839
+ "1": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 19 more ...; focusScope: string; }>"
29790
29840
  }
29791
29841
  }
29792
29842
  },
@@ -35911,13 +35961,13 @@ var B24UIMeta = {
35911
35961
  "description": "",
35912
35962
  "tags": [],
35913
35963
  "required": false,
35914
- "type": "Partial<{ root: string; base: string; tag: string; }> | undefined",
35964
+ "type": "PartialString<{ root: string; base: string; tag: string; }> | undefined",
35915
35965
  "schema": {
35916
35966
  "kind": "enum",
35917
- "type": "Partial<{ root: string; base: string; tag: string; }> | undefined",
35967
+ "type": "PartialString<{ root: string; base: string; tag: string; }> | undefined",
35918
35968
  "schema": {
35919
35969
  "0": "undefined",
35920
- "1": "Partial<{ root: string; base: string; tag: string; }>"
35970
+ "1": "PartialString<{ root: string; base: string; tag: string; }>"
35921
35971
  }
35922
35972
  }
35923
35973
  }
package/dist/meta.mjs CHANGED
@@ -7431,6 +7431,34 @@ const B24UIMeta = {
7431
7431
  }
7432
7432
  }
7433
7433
  },
7434
+ {
7435
+ "name": "externalIcon",
7436
+ "global": false,
7437
+ "description": "The icon displayed when the item is an external link.\nSet to `false` to hide the external icon.",
7438
+ "tags": [
7439
+ {
7440
+ "name": "defaultValue",
7441
+ "text": "icons.external = `OpenIn50Icon`"
7442
+ }
7443
+ ],
7444
+ "required": false,
7445
+ "type": "boolean | IconComponent | undefined",
7446
+ "schema": {
7447
+ "kind": "enum",
7448
+ "type": "boolean | IconComponent | undefined",
7449
+ "schema": {
7450
+ "0": "undefined",
7451
+ "1": "false",
7452
+ "2": "true",
7453
+ "3": {
7454
+ "kind": "event",
7455
+ "type": "(props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Data; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, \"expose\">): any",
7456
+ "schema": []
7457
+ }
7458
+ }
7459
+ },
7460
+ "default": "true"
7461
+ },
7434
7462
  {
7435
7463
  "name": "content",
7436
7464
  "global": false,
@@ -12668,6 +12696,28 @@ const B24UIMeta = {
12668
12696
  }
12669
12697
  }
12670
12698
  },
12699
+ {
12700
+ "name": "externalIcon",
12701
+ "global": false,
12702
+ "description": "",
12703
+ "tags": [],
12704
+ "required": false,
12705
+ "type": "boolean | IconComponent | undefined",
12706
+ "schema": {
12707
+ "kind": "enum",
12708
+ "type": "boolean | IconComponent | undefined",
12709
+ "schema": {
12710
+ "0": "undefined",
12711
+ "1": "false",
12712
+ "2": "true",
12713
+ "3": {
12714
+ "kind": "event",
12715
+ "type": "(props: HTMLAttributes & VNodeProps & {}, ctx: Omit<{ attrs: Data; slots: Readonly<InternalSlots>; emit: (event: string, ...args: any[]) => void; expose: <Exposed extends Record<string, any> = Record<...>>(exposed?: Exposed | undefined) => void; }, \"expose\">): any",
12716
+ "schema": []
12717
+ }
12718
+ }
12719
+ }
12720
+ },
12671
12721
  {
12672
12722
  "name": "b24uiOverride",
12673
12723
  "global": false,
@@ -12733,15 +12783,15 @@ const B24UIMeta = {
12733
12783
  }
12734
12784
  ],
12735
12785
  "required": false,
12736
- "type": "\"start\" | \"end\" | \"center\" | undefined",
12786
+ "type": "\"start\" | \"center\" | \"end\" | undefined",
12737
12787
  "schema": {
12738
12788
  "kind": "enum",
12739
- "type": "\"start\" | \"end\" | \"center\" | undefined",
12789
+ "type": "\"start\" | \"center\" | \"end\" | undefined",
12740
12790
  "schema": {
12741
12791
  "0": "undefined",
12742
12792
  "1": "\"start\"",
12743
- "2": "\"end\"",
12744
- "3": "\"center\""
12793
+ "2": "\"center\"",
12794
+ "3": "\"end\""
12745
12795
  }
12746
12796
  }
12747
12797
  },
@@ -19553,22 +19603,6 @@ const B24UIMeta = {
19553
19603
  }
19554
19604
  }
19555
19605
  },
19556
- {
19557
- "name": "b24ui",
19558
- "global": false,
19559
- "description": "",
19560
- "tags": [],
19561
- "required": false,
19562
- "type": "Partial<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
19563
- "schema": {
19564
- "kind": "enum",
19565
- "type": "Partial<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
19566
- "schema": {
19567
- "0": "undefined",
19568
- "1": "Partial<{ root: string; base: string; increment: string; decrement: string; tag: string; }>"
19569
- }
19570
- }
19571
- },
19572
19606
  {
19573
19607
  "name": "orientation",
19574
19608
  "global": false,
@@ -21442,6 +21476,22 @@ const B24UIMeta = {
21442
21476
  }
21443
21477
  }
21444
21478
  },
21479
+ {
21480
+ "name": "b24ui",
21481
+ "global": false,
21482
+ "description": "",
21483
+ "tags": [],
21484
+ "required": false,
21485
+ "type": "PartialString<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
21486
+ "schema": {
21487
+ "kind": "enum",
21488
+ "type": "PartialString<{ root: string; base: string; increment: string; decrement: string; tag: string; }> | undefined",
21489
+ "schema": {
21490
+ "0": "undefined",
21491
+ "1": "PartialString<{ root: string; base: string; increment: string; decrement: string; tag: string; }>"
21492
+ }
21493
+ }
21494
+ },
21445
21495
  {
21446
21496
  "name": "disabled",
21447
21497
  "global": false,
@@ -29780,13 +29830,13 @@ const B24UIMeta = {
29780
29830
  "description": "",
29781
29831
  "tags": [],
29782
29832
  "required": false,
29783
- "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 18 more ...; input: string; }> | undefined",
29833
+ "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 19 more ...; focusScope: string; }> | undefined",
29784
29834
  "schema": {
29785
29835
  "kind": "enum",
29786
- "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 18 more ...; input: string; }> | undefined",
29836
+ "type": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 19 more ...; focusScope: string; }> | undefined",
29787
29837
  "schema": {
29788
29838
  "0": "undefined",
29789
- "1": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 18 more ...; input: string; }>"
29839
+ "1": "PartialString<{ root: string; base: string; leading: string; leadingIcon: string; leadingAvatar: string; leadingAvatarSize: string; trailing: string; trailingIcon: string; tag: string; value: string; placeholder: string; ... 19 more ...; focusScope: string; }>"
29790
29840
  }
29791
29841
  }
29792
29842
  },
@@ -35911,13 +35961,13 @@ const B24UIMeta = {
35911
35961
  "description": "",
35912
35962
  "tags": [],
35913
35963
  "required": false,
35914
- "type": "Partial<{ root: string; base: string; tag: string; }> | undefined",
35964
+ "type": "PartialString<{ root: string; base: string; tag: string; }> | undefined",
35915
35965
  "schema": {
35916
35966
  "kind": "enum",
35917
- "type": "Partial<{ root: string; base: string; tag: string; }> | undefined",
35967
+ "type": "PartialString<{ root: string; base: string; tag: string; }> | undefined",
35918
35968
  "schema": {
35919
35969
  "0": "undefined",
35920
- "1": "Partial<{ root: string; base: string; tag: string; }>"
35970
+ "1": "PartialString<{ root: string; base: string; tag: string; }>"
35921
35971
  }
35922
35972
  }
35923
35973
  }
package/dist/module.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  const defu = require('defu');
4
4
  const kit = require('@nuxt/kit');
5
- const templates = require('./shared/b24ui-nuxt.DGjopCKm.cjs');
5
+ const templates = require('./shared/b24ui-nuxt.D-N3gDSr.cjs');
6
6
  require('node:url');
7
7
  require('scule');
8
8
 
package/dist/module.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "nuxt": ">=3.13.1"
6
6
  },
7
7
  "docs": "https://bitrix24.github.io/b24ui/guide/installation-nuxt-app.html",
8
- "version": "0.2.4",
8
+ "version": "0.2.6",
9
9
  "builder": {
10
10
  "@nuxt/module-builder": "0.8.4",
11
11
  "unbuild": "2.0.0"
package/dist/module.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defu } from 'defu';
2
2
  import { defineNuxtModule, createResolver, addVitePlugin, addPlugin, addComponentsDir, addImportsDir, hasNuxtModule, installModule } from '@nuxt/kit';
3
- import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.V9TzyCqH.mjs';
3
+ import { d as defaultOptions, a as getDefaultUiConfig, b as addTemplates } from './shared/b24ui-nuxt.CAS1q3My.mjs';
4
4
  import 'node:url';
5
5
  import 'scule';
6
6
 
@@ -45,6 +45,12 @@ export interface DropdownMenuProps<T> extends Omit<DropdownMenuRootProps, 'dir'>
45
45
  * @defaultValue icons.check = `CheckIcon`
46
46
  */
47
47
  checkedIcon?: IconComponent
48
+ /**
49
+ * The icon displayed when the item is an external link.
50
+ * Set to `false` to hide the external icon.
51
+ * @defaultValue icons.external = `OpenIn50Icon`
52
+ */
53
+ externalIcon?: boolean | IconComponent
48
54
  /**
49
55
  * The content of the menu.
50
56
  * @defaultValue { side: 'bottom', sideOffset: 8, collisionPadding: 8 }
@@ -94,6 +100,7 @@ import B24DropdownMenuContent from './DropdownMenuContent.vue'
94
100
  const props = withDefaults(defineProps<DropdownMenuProps<T>>(), {
95
101
  portal: true,
96
102
  modal: true,
103
+ externalIcon: true,
97
104
  labelKey: 'label'
98
105
  })
99
106
  const emits = defineEmits<DropdownMenuEmits>()
@@ -124,6 +131,7 @@ const b24ui = computed(() => dropdownMenu({
124
131
  :portal="portal"
125
132
  :label-key="labelKey"
126
133
  :checked-icon="checkedIcon"
134
+ :external-icon="externalIcon"
127
135
  >
128
136
  <template v-for="(_, name) in proxySlots" #[name]="slotData: any">
129
137
  <slot :name="name" v-bind="slotData" />
@@ -13,6 +13,7 @@ interface DropdownMenuContentProps<T> extends Omit<RekaDropdownMenuContentProps,
13
13
  sub?: boolean
14
14
  labelKey: string
15
15
  checkedIcon?: IconComponent
16
+ externalIcon?: boolean | IconComponent
16
17
  class?: any
17
18
  b24ui: typeof _dropdownMenu
18
19
  b24uiOverride?: any
@@ -44,7 +45,7 @@ const props = defineProps<DropdownMenuContentProps<T>>()
44
45
  const emits = defineEmits<DropdownMenuContentEmits>()
45
46
  const slots = defineSlots<DropdownMenuContentSlots<T>>()
46
47
 
47
- const contentProps = useForwardPropsEmits(reactiveOmit(props, 'sub', 'items', 'portal', 'labelKey', 'checkedIcon', 'class', 'b24ui', 'b24uiOverride'), emits)
48
+ const contentProps = useForwardPropsEmits(reactiveOmit(props, 'sub', 'items', 'portal', 'labelKey', 'checkedIcon', 'externalIcon', 'class', 'b24ui', 'b24uiOverride'), emits)
48
49
  const proxySlots = omit(slots, ['default']) as Record<string, DropdownMenuContentSlots<T>[string]>
49
50
 
50
51
  const [DefineItemTemplate, ReuseItemTemplate] = createReusableTemplate<{ item: DropdownMenuItem, active?: boolean, index: number }>()
@@ -79,8 +80,8 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
79
80
  {{ get(item, props.labelKey as string) }}
80
81
  </slot>
81
82
  <Component
82
- :is="icons.external"
83
- v-if="item.target === '_blank'"
83
+ :is="typeof externalIcon !== 'boolean' ? externalIcon : icons.external"
84
+ v-if="item.target === '_blank' && externalIcon !== false"
84
85
  :class="b24ui.itemLabelExternalIcon({ class: b24uiOverride?.itemLabelExternalIcon, color: item?.color, active })"
85
86
  />
86
87
  </span>
@@ -139,6 +140,7 @@ const groups = computed(() => props.items?.length ? (Array.isArray(props.items[0
139
140
  :side-offset="3"
140
141
  :label-key="labelKey"
141
142
  :checked-icon="checkedIcon"
143
+ :external-icon="externalIcon"
142
144
  v-bind="item.content"
143
145
  >
144
146
  <template v-for="(_, name) in proxySlots" #[name]="slotData: any">
@@ -6,6 +6,7 @@ import _appConfig from '#build/app.config'
6
6
  import theme from '#build/b24ui/input-number'
7
7
  import { tv } from '../utils/tv'
8
8
  import type { ButtonProps, IconComponent } from '../types'
9
+ import type { PartialString } from '../types/utils'
9
10
 
10
11
  const appConfigInputNumber = _appConfig as AppConfig & { b24ui: { inputNumber: Partial<typeof theme> } }
11
12
 
@@ -35,8 +36,6 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
35
36
  tagColor?: InputNumberVariants['tagColor']
36
37
  /** Highlight the ring color like a focus state. */
37
38
  highlight?: boolean
38
- class?: any
39
- b24ui?: Partial<typeof inputNumber.slots>
40
39
  /**
41
40
  * The orientation of the input menu.
42
41
  * @defaultValue 'horizontal'
@@ -69,6 +68,8 @@ export interface InputNumberProps extends Pick<NumberFieldRootProps, 'modelValue
69
68
  * @defaultValue B24App.locale.code
70
69
  */
71
70
  locale?: string
71
+ class?: any
72
+ b24ui?: PartialString<typeof inputNumber.slots>
72
73
  }
73
74
 
74
75
  export interface InputNumberEmits {
@@ -155,6 +155,7 @@ import {
155
155
  ComboboxSeparator,
156
156
  ComboboxItem,
157
157
  ComboboxItemIndicator,
158
+ FocusScope,
158
159
  useForwardPropsEmits,
159
160
  useFilter,
160
161
  Primitive
@@ -286,7 +287,7 @@ function onUpdate(value: any) {
286
287
  }
287
288
 
288
289
  function onUpdateOpen(value: boolean) {
289
- let timeoutId
290
+ let timeoutId: ReturnType<typeof setTimeout> | undefined
290
291
 
291
292
  if (!value) {
292
293
  const event = new FocusEvent('blur')
@@ -307,7 +308,9 @@ function onUpdateOpen(value: boolean) {
307
308
  const event = new FocusEvent('focus')
308
309
  emits('focus', event)
309
310
  emitFormFocus()
310
- clearTimeout(timeoutId)
311
+ if (timeoutId) {
312
+ clearTimeout(timeoutId)
313
+ }
311
314
  }
312
315
  }
313
316
  </script>
@@ -387,76 +390,77 @@ function onUpdateOpen(value: boolean) {
387
390
 
388
391
  <ComboboxPortal :disabled="!portal">
389
392
  <ComboboxContent :class="b24ui.content({ class: props.b24ui?.content })" v-bind="contentProps">
390
- <ComboboxInput v-if="!!searchInput" v-model="searchTerm" :display-value="() => searchTerm" as-child>
391
- <B24Input no-border autofocus autocomplete="off" v-bind="searchInputProps" :class="b24ui.input({ class: props.b24ui?.input })" />
392
- </ComboboxInput>
393
-
394
- <ComboboxEmpty :class="b24ui.empty({ class: props.b24ui?.empty })">
395
- <slot name="empty" :search-term="searchTerm">
396
- {{ searchTerm ? t('selectMenu.noMatch', { searchTerm }) : t('selectMenu.noData') }}
397
- </slot>
398
- </ComboboxEmpty>
399
-
400
- <ComboboxViewport :class="b24ui.viewport({ class: props.b24ui?.viewport })">
401
- <ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'top'" />
402
-
403
- <ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" :class="b24ui.group({ class: props.b24ui?.group })">
404
- <template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
405
- <ComboboxLabel v-if="item?.type === 'label'" :class="b24ui.label({ class: props.b24ui?.label })">
406
- {{ get(item, props.labelKey as string) }}
407
- </ComboboxLabel>
408
-
409
- <ComboboxSeparator v-else-if="item?.type === 'separator'" :class="b24ui.separator({ class: props.b24ui?.separator })" />
410
-
411
- <ComboboxItem
412
- v-else
413
- :class="b24ui.item({ class: props.b24ui?.item })"
414
- :disabled="item.disabled"
415
- :value="valueKey && typeof item === 'object' ? get(item, props.valueKey as string) : item"
416
- @select="item.onSelect"
417
- >
418
- <slot name="item" :item="(item as T)" :index="index">
419
- <slot name="item-leading" :item="(item as T)" :index="index">
420
- <Component
421
- :is="item.icon"
422
- v-if="item.icon"
423
- :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon })"
424
- />
425
- <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })" />
426
- <B24Chip
427
- v-else-if="item.chip"
428
- :size="((props.b24ui?.itemLeadingChipSize || b24ui.itemLeadingChipSize()) as ChipProps['size'])"
429
- inset
430
- standalone
431
- v-bind="item.chip"
432
- :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip })"
433
- />
434
- </slot>
435
-
436
- <span :class="b24ui.itemLabel({ class: props.b24ui?.itemLabel })">
437
- <slot name="item-label" :item="(item as T)" :index="index">
438
- {{ typeof item === 'object' ? get(item, props.labelKey as string) : item }}
439
- </slot>
440
- </span>
441
-
442
- <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing })">
443
- <slot name="item-trailing" :item="(item as T)" :index="index" />
444
-
445
- <ComboboxItemIndicator as-child>
393
+ <FocusScope trapped :class="b24ui.focusScope({ class: props.b24ui?.focusScope })">
394
+ <ComboboxInput v-if="!!searchInput" v-model="searchTerm" :display-value="() => searchTerm" as-child>
395
+ <B24Input no-border autofocus autocomplete="off" v-bind="searchInputProps" :class="b24ui.input({ class: props.b24ui?.input })" />
396
+ </ComboboxInput>
397
+
398
+ <ComboboxEmpty :class="b24ui.empty({ class: props.b24ui?.empty })">
399
+ <slot name="empty" :search-term="searchTerm">
400
+ {{ searchTerm ? t('selectMenu.noMatch', { searchTerm }) : t('selectMenu.noData') }}
401
+ </slot>
402
+ </ComboboxEmpty>
403
+
404
+ <ComboboxViewport :class="b24ui.viewport({ class: props.b24ui?.viewport })">
405
+ <ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'top'" />
406
+
407
+ <ComboboxGroup v-for="(group, groupIndex) in filteredGroups" :key="`group-${groupIndex}`" :class="b24ui.group({ class: props.b24ui?.group })">
408
+ <template v-for="(item, index) in group" :key="`group-${groupIndex}-${index}`">
409
+ <ComboboxLabel v-if="item?.type === 'label'" :class="b24ui.label({ class: props.b24ui?.label })">
410
+ {{ get(item, props.labelKey as string) }}
411
+ </ComboboxLabel>
412
+
413
+ <ComboboxSeparator v-else-if="item?.type === 'separator'" :class="b24ui.separator({ class: props.b24ui?.separator })" />
414
+
415
+ <ComboboxItem
416
+ v-else
417
+ :class="b24ui.item({ class: props.b24ui?.item })"
418
+ :disabled="item.disabled"
419
+ :value="valueKey && typeof item === 'object' ? get(item, props.valueKey as string) : item"
420
+ @select="item.onSelect"
421
+ >
422
+ <slot name="item" :item="(item as T)" :index="index">
423
+ <slot name="item-leading" :item="(item as T)" :index="index">
446
424
  <Component
447
- :is="selectedIcon || icons.check"
448
- :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon })"
425
+ :is="item.icon"
426
+ v-if="item.icon"
427
+ :class="b24ui.itemLeadingIcon({ class: props.b24ui?.itemLeadingIcon })"
428
+ />
429
+ <B24Avatar v-else-if="item.avatar" :size="((props.b24ui?.itemLeadingAvatarSize || b24ui.itemLeadingAvatarSize()) as AvatarProps['size'])" v-bind="item.avatar" :class="b24ui.itemLeadingAvatar({ class: props.b24ui?.itemLeadingAvatar })" />
430
+ <B24Chip
431
+ v-else-if="item.chip"
432
+ :size="((props.b24ui?.itemLeadingChipSize || b24ui.itemLeadingChipSize()) as ChipProps['size'])"
433
+ inset
434
+ standalone
435
+ v-bind="item.chip"
436
+ :class="b24ui.itemLeadingChip({ class: props.b24ui?.itemLeadingChip })"
449
437
  />
450
- </ComboboxItemIndicator>
451
- </span>
452
- </slot>
453
- </ComboboxItem>
454
- </template>
455
- </ComboboxGroup>
438
+ </slot>
456
439
 
457
- <ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
458
- </ComboboxViewport>
440
+ <span :class="b24ui.itemLabel({ class: props.b24ui?.itemLabel })">
441
+ <slot name="item-label" :item="(item as T)" :index="index">
442
+ {{ typeof item === 'object' ? get(item, props.labelKey as string) : item }}
443
+ </slot>
444
+ </span>
445
+
446
+ <span :class="b24ui.itemTrailing({ class: props.b24ui?.itemTrailing })">
447
+ <slot name="item-trailing" :item="(item as T)" :index="index" />
448
+
449
+ <ComboboxItemIndicator as-child>
450
+ <Component
451
+ :is="selectedIcon || icons.check"
452
+ :class="b24ui.itemTrailingIcon({ class: props.b24ui?.itemTrailingIcon })"
453
+ />
454
+ </ComboboxItemIndicator>
455
+ </span>
456
+ </slot>
457
+ </ComboboxItem>
458
+ </template>
459
+ </ComboboxGroup>
459
460
 
461
+ <ReuseCreateItemTemplate v-if="createItem && createItemPosition === 'bottom'" />
462
+ </ComboboxViewport>
463
+ </FocusScope>
460
464
  <ComboboxArrow v-if="!!arrow" v-bind="arrowProps" :class="b24ui.arrow({ class: props.b24ui?.arrow })" />
461
465
  </ComboboxContent>
462
466
  </ComboboxPortal>
@@ -4,6 +4,7 @@ import type { AppConfig } from '@nuxt/schema'
4
4
  import _appConfig from '#build/app.config'
5
5
  import theme from '#build/b24ui/textarea'
6
6
  import { tv } from '../utils/tv'
7
+ import type { PartialString } from '../types/utils'
7
8
 
8
9
  const appConfigTextarea = _appConfig as AppConfig & { b24ui: { textarea: Partial<typeof theme> } }
9
10
 
@@ -42,7 +43,7 @@ export interface TextareaProps {
42
43
  /** Highlight the ring color like a focus state. */
43
44
  highlight?: boolean
44
45
  class?: any
45
- b24ui?: Partial<typeof textarea.slots>
46
+ b24ui?: PartialString<typeof textarea.slots>
46
47
  }
47
48
 
48
49
  export interface TextareaEmits {