ui-ingredients 0.18.2 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,12 +1,17 @@
1
1
  <script lang="ts" module>
2
- import type {HtmlIngredientProps} from '../types.js';
2
+ import {mergeProps} from '../merge-props.js';
3
+ import type {Assign, HtmlIngredientProps} from '../types.js';
3
4
 
4
5
  export interface ComboboxTriggerProps
5
- extends HtmlIngredientProps<'button', HTMLButtonElement> {}
6
+ extends Assign<
7
+ HtmlIngredientProps<'button', HTMLButtonElement>,
8
+ TriggerProps
9
+ > {}
6
10
  </script>
7
11
 
8
12
  <script lang="ts">
9
- import {mergeProps} from '../merge-props.js';
13
+ import type {TriggerProps} from '@zag-js/combobox';
14
+ import {createSplitProps} from '@zag-js/utils';
10
15
  import {getComboboxContext} from './combobox-context.svelte.js';
11
16
 
12
17
  let {
@@ -16,9 +21,15 @@
16
21
  ...props
17
22
  }: ComboboxTriggerProps = $props();
18
23
 
24
+ let [triggerProps, localProps] = $derived(
25
+ createSplitProps<TriggerProps>(['focusable'])(props),
26
+ );
27
+
19
28
  let combobox = getComboboxContext();
20
29
 
21
- let mergedProps = $derived(mergeProps(combobox.getTriggerProps(), props));
30
+ let mergedProps = $derived(
31
+ mergeProps(combobox.getTriggerProps(triggerProps), localProps),
32
+ );
22
33
  </script>
23
34
 
24
35
  {#if asChild}
@@ -1,6 +1,7 @@
1
- import type { HtmlIngredientProps } from '../types.js';
2
- export interface ComboboxTriggerProps extends HtmlIngredientProps<'button', HTMLButtonElement> {
1
+ import type { Assign, HtmlIngredientProps } from '../types.js';
2
+ export interface ComboboxTriggerProps extends Assign<HtmlIngredientProps<'button', HTMLButtonElement>, TriggerProps> {
3
3
  }
4
+ import type { TriggerProps } from '@zag-js/combobox';
4
5
  interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
5
6
  new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
6
7
  $$bindings?: Bindings;
@@ -45,7 +45,6 @@
45
45
  'openControlled',
46
46
  'view',
47
47
  'value',
48
- 'modal',
49
48
  'format',
50
49
  'locale',
51
50
  'disabled',
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "ui-ingredients",
3
3
  "type": "module",
4
4
  "license": "MIT",
5
- "version": "0.18.2",
5
+ "version": "0.19.0",
6
6
  "packageManager": "pnpm@9.14.4",
7
7
  "svelte": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -307,54 +307,54 @@
307
307
  "release": "release-it"
308
308
  },
309
309
  "dependencies": {
310
- "@zag-js/accordion": "^0.78.1",
311
- "@zag-js/anatomy": "^0.78.1",
312
- "@zag-js/angle-slider": "^0.78.1",
313
- "@zag-js/auto-resize": "^0.78.1",
314
- "@zag-js/avatar": "^0.78.1",
315
- "@zag-js/carousel": "^0.78.1",
316
- "@zag-js/checkbox": "^0.78.1",
317
- "@zag-js/clipboard": "^0.78.1",
318
- "@zag-js/collapsible": "^0.78.1",
319
- "@zag-js/color-picker": "^0.78.1",
320
- "@zag-js/combobox": "^0.78.1",
321
- "@zag-js/core": "^0.78.1",
322
- "@zag-js/date-picker": "^0.78.1",
323
- "@zag-js/dialog": "^0.78.1",
324
- "@zag-js/dom-query": "^0.78.1",
325
- "@zag-js/editable": "^0.78.1",
326
- "@zag-js/file-upload": "^0.78.1",
327
- "@zag-js/floating-panel": "^0.78.1",
328
- "@zag-js/highlight-word": "^0.78.1",
329
- "@zag-js/hover-card": "^0.78.1",
330
- "@zag-js/i18n-utils": "^0.78.1",
331
- "@zag-js/menu": "^0.78.1",
332
- "@zag-js/number-input": "^0.78.1",
333
- "@zag-js/pagination": "^0.78.1",
334
- "@zag-js/pin-input": "^0.78.1",
335
- "@zag-js/popover": "^0.78.1",
336
- "@zag-js/presence": "^0.78.1",
337
- "@zag-js/progress": "^0.78.1",
338
- "@zag-js/qr-code": "^0.78.1",
339
- "@zag-js/radio-group": "^0.78.1",
340
- "@zag-js/rating-group": "^0.78.1",
341
- "@zag-js/select": "^0.78.1",
342
- "@zag-js/signature-pad": "^0.78.1",
343
- "@zag-js/slider": "^0.78.1",
344
- "@zag-js/splitter": "^0.78.1",
345
- "@zag-js/steps": "^0.78.1",
346
- "@zag-js/svelte": "^0.78.1",
347
- "@zag-js/switch": "^0.78.1",
348
- "@zag-js/tabs": "^0.78.1",
349
- "@zag-js/tags-input": "^0.78.1",
350
- "@zag-js/time-picker": "^0.78.1",
351
- "@zag-js/timer": "^0.78.1",
352
- "@zag-js/toast": "^0.78.1",
353
- "@zag-js/toggle-group": "^0.78.1",
354
- "@zag-js/tooltip": "^0.78.1",
355
- "@zag-js/tour": "^0.78.1",
356
- "@zag-js/tree-view": "^0.78.1",
357
- "@zag-js/utils": "^0.78.1"
310
+ "@zag-js/accordion": "^0.78.2",
311
+ "@zag-js/anatomy": "^0.78.2",
312
+ "@zag-js/angle-slider": "^0.78.2",
313
+ "@zag-js/auto-resize": "^0.78.2",
314
+ "@zag-js/avatar": "^0.78.2",
315
+ "@zag-js/carousel": "^0.78.2",
316
+ "@zag-js/checkbox": "^0.78.2",
317
+ "@zag-js/clipboard": "^0.78.2",
318
+ "@zag-js/collapsible": "^0.78.2",
319
+ "@zag-js/color-picker": "^0.78.2",
320
+ "@zag-js/combobox": "^0.78.2",
321
+ "@zag-js/core": "^0.78.2",
322
+ "@zag-js/date-picker": "^0.78.2",
323
+ "@zag-js/dialog": "^0.78.2",
324
+ "@zag-js/dom-query": "^0.78.2",
325
+ "@zag-js/editable": "^0.78.2",
326
+ "@zag-js/file-upload": "^0.78.2",
327
+ "@zag-js/floating-panel": "^0.78.2",
328
+ "@zag-js/highlight-word": "^0.78.2",
329
+ "@zag-js/hover-card": "^0.78.2",
330
+ "@zag-js/i18n-utils": "^0.78.2",
331
+ "@zag-js/menu": "^0.78.2",
332
+ "@zag-js/number-input": "^0.78.2",
333
+ "@zag-js/pagination": "^0.78.2",
334
+ "@zag-js/pin-input": "^0.78.2",
335
+ "@zag-js/popover": "^0.78.2",
336
+ "@zag-js/presence": "^0.78.2",
337
+ "@zag-js/progress": "^0.78.2",
338
+ "@zag-js/qr-code": "^0.78.2",
339
+ "@zag-js/radio-group": "^0.78.2",
340
+ "@zag-js/rating-group": "^0.78.2",
341
+ "@zag-js/select": "^0.78.2",
342
+ "@zag-js/signature-pad": "^0.78.2",
343
+ "@zag-js/slider": "^0.78.2",
344
+ "@zag-js/splitter": "^0.78.2",
345
+ "@zag-js/steps": "^0.78.2",
346
+ "@zag-js/svelte": "^0.78.2",
347
+ "@zag-js/switch": "^0.78.2",
348
+ "@zag-js/tabs": "^0.78.2",
349
+ "@zag-js/tags-input": "^0.78.2",
350
+ "@zag-js/time-picker": "^0.78.2",
351
+ "@zag-js/timer": "^0.78.2",
352
+ "@zag-js/toast": "^0.78.2",
353
+ "@zag-js/toggle-group": "^0.78.2",
354
+ "@zag-js/tooltip": "^0.78.2",
355
+ "@zag-js/tour": "^0.78.2",
356
+ "@zag-js/tree-view": "^0.78.2",
357
+ "@zag-js/utils": "^0.78.2"
358
358
  },
359
359
  "peerDependencies": {
360
360
  "svelte": ">=5.0.0"
@@ -377,13 +377,13 @@
377
377
  "publint": "^0.2.12",
378
378
  "release-it": "^17.10.0",
379
379
  "resize-observer-polyfill": "^1.5.1",
380
- "svelte": "^5.5.3",
380
+ "svelte": "^5.7.1",
381
381
  "svelte-check": "^4.1.1",
382
382
  "tailwind-merge": "^2.5.5",
383
383
  "tailwind-variants": "^0.3.0",
384
384
  "tailwindcss": "^3.4.16",
385
385
  "typescript": "^5.7.2",
386
- "vite": "^6.0.2",
386
+ "vite": "^6.0.3",
387
387
  "vitest": "^2.1.8",
388
388
  "vitest-axe": "^1.0.0-pre.3",
389
389
  "vitest-canvas-mock": "^0.3.3"