@invopop/popui 0.1.71 → 0.1.73

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.
@@ -16,7 +16,7 @@
16
16
  scrollIfSelected = false,
17
17
  onchange,
18
18
  onclick,
19
- onfocus
19
+ children
20
20
  }: DrawerContextItemProps = $props()
21
21
 
22
22
  let el: HTMLElement | undefined = $state()
@@ -96,7 +96,11 @@
96
96
  {#if item?.country && item?.flagPosition === 'before'}
97
97
  <BaseFlag country={item.country} />
98
98
  {/if}
99
- <span class="{labelStyles} text-base font-medium truncate">{item?.label || ''}</span>
99
+ {#if children}
100
+ {@render children()}
101
+ {:else}
102
+ <span class="{labelStyles} text-base font-medium truncate">{item?.label || ''}</span>
103
+ {/if}
100
104
 
101
105
  {#if item?.country && item?.flagPosition === 'after'}
102
106
  <BaseFlag country={item.country} />
@@ -90,8 +90,7 @@
90
90
  : clsx('border backdrop-blur-sm backdrop-filter dropdown-select', {
91
91
  'border-border-selected-bold shadow-active': isOpen,
92
92
  'border-border-default-secondary hover:border-border-default-secondary-hover': !isOpen
93
- }),
94
- className
93
+ })
95
94
  )
96
95
  )
97
96
 
@@ -146,7 +145,7 @@
146
145
  {strategy}
147
146
  {disabled}
148
147
  bind:this={selectDropdown}
149
- class={fullWidth || isStacked ? '' : widthClass}
148
+ class={cn(fullWidth || isStacked ? '' : widthClass, className)}
150
149
  >
151
150
  {#snippet trigger()}
152
151
  <div data-dropdown-select-trigger class={styles}>
@@ -25,6 +25,7 @@
25
25
  onclick,
26
26
  onfocus,
27
27
  onblur,
28
+ class: className = '',
28
29
  ...rest
29
30
  }: InputSearchProps = $props()
30
31
 
@@ -66,8 +67,9 @@
66
67
  })
67
68
  </script>
68
69
 
69
- <div class="relative flex items-center">
70
+ <div data-input-search class="relative flex items-center {className}">
70
71
  <input
72
+ data-input-search-input
71
73
  bind:this={input}
72
74
  bind:value
73
75
  type="text"
package/dist/types.d.ts CHANGED
@@ -359,7 +359,7 @@ export interface DrawerContextItemProps {
359
359
  scrollIfSelected?: boolean;
360
360
  onclick?: (value: AnyProp) => void;
361
361
  onchange?: (item: DrawerOption) => void;
362
- onfocus?: (item: DrawerOption) => void;
362
+ children?: Snippet;
363
363
  }
364
364
  export interface DropdownSelectProps {
365
365
  value?: AnyProp;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.71",
4
+ "version": "0.1.73",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },