@ark-ui/svelte 5.6.0 → 5.7.0

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.
@@ -0,0 +1,23 @@
1
+ <script module lang="ts">
2
+ import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
3
+
4
+ export interface ComboboxEmptyBaseProps extends PolymorphicProps<'div'>, RefAttribute {}
5
+ export interface ComboboxEmptyProps extends Assign<HTMLProps<'div'>, ComboboxEmptyBaseProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import { Ark } from '../factory'
10
+ import { comboboxAnatomy } from './combobox.anatomy'
11
+ import { useComboboxContext } from './use-combobox-context'
12
+
13
+ const parts = comboboxAnatomy.build()
14
+
15
+ let { ref = $bindable(null), ...props }: ComboboxEmptyProps = $props()
16
+
17
+ const combobox = useComboboxContext()
18
+ const isEmpty = $derived(combobox().collection.size === 0)
19
+ </script>
20
+
21
+ {#if isEmpty}
22
+ <Ark as="div" bind:ref {...parts.empty.attrs} {...props} role="presentation" />
23
+ {/if}
@@ -0,0 +1,8 @@
1
+ import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
2
+ export interface ComboboxEmptyBaseProps extends PolymorphicProps<'div'>, RefAttribute {
3
+ }
4
+ export interface ComboboxEmptyProps extends Assign<HTMLProps<'div'>, ComboboxEmptyBaseProps> {
5
+ }
6
+ declare const ComboboxEmpty: import("svelte").Component<ComboboxEmptyProps, {}, "ref">;
7
+ type ComboboxEmpty = ReturnType<typeof ComboboxEmpty>;
8
+ export default ComboboxEmpty;
@@ -1 +1 @@
1
- export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
1
+ export declare const comboboxAnatomy: import("@zag-js/anatomy").AnatomyInstance<"input" | "label" | "list" | "root" | "content" | "trigger" | "control" | "positioner" | "clearTrigger" | "item" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "empty">;
@@ -1 +1,2 @@
1
- export { anatomy as comboboxAnatomy } from '@zag-js/combobox';
1
+ import { anatomy } from '@zag-js/combobox';
2
+ export const comboboxAnatomy = anatomy.extendWith('empty');
@@ -1,6 +1,7 @@
1
1
  export type { HighlightChangeDetails, InputValueChangeDetails, OpenChangeDetails, SelectionDetails, ValueChangeDetails, } from '@zag-js/combobox';
2
2
  export { default as ClearTrigger, type ComboboxClearTriggerProps as ClearTriggerProps, type ComboboxClearTriggerBaseProps as ClearTriggerBaseProps, } from './combobox-clear-trigger.svelte';
3
3
  export { default as Content, type ComboboxContentProps as ContentProps, type ComboboxContentBaseProps as ContentBaseProps, } from './combobox-content.svelte';
4
+ export { default as Empty, type ComboboxEmptyProps as EmptyProps, type ComboboxEmptyBaseProps as EmptyBaseProps, } from './combobox-empty.svelte';
4
5
  export { default as Context, type ComboboxContextProps as ContextProps } from './combobox-context.svelte';
5
6
  export { default as Control, type ComboboxControlProps as ControlProps, type ComboboxControlBaseProps as ControlBaseProps, } from './combobox-control.svelte';
6
7
  export { default as Input, type ComboboxInputProps as InputProps, type ComboboxInputBaseProps as InputBaseProps, } from './combobox-input.svelte';
@@ -1,5 +1,6 @@
1
1
  export { default as ClearTrigger, } from './combobox-clear-trigger.svelte';
2
2
  export { default as Content, } from './combobox-content.svelte';
3
+ export { default as Empty, } from './combobox-empty.svelte';
3
4
  export { default as Context } from './combobox-context.svelte';
4
5
  export { default as Control, } from './combobox-control.svelte';
5
6
  export { default as Input, } from './combobox-input.svelte';
@@ -2,6 +2,7 @@ export type { HighlightChangeDetails as ComboboxHighlightChangeDetails, InputVal
2
2
  export { createListCollection, useListCollection, type CollectionItem, type ListCollection, type UseListCollectionProps, } from '../collection';
3
3
  export { default as ComboboxClearTrigger, type ComboboxClearTriggerProps, type ComboboxClearTriggerBaseProps, } from './combobox-clear-trigger.svelte';
4
4
  export { default as ComboboxContent, type ComboboxContentProps, type ComboboxContentBaseProps, } from './combobox-content.svelte';
5
+ export { default as ComboboxEmpty, type ComboboxEmptyProps, type ComboboxEmptyBaseProps } from './combobox-empty.svelte';
5
6
  export { default as ComboboxContext, type ComboboxContextProps } from './combobox-context.svelte';
6
7
  export { default as ComboboxControl, type ComboboxControlProps, type ComboboxControlBaseProps, } from './combobox-control.svelte';
7
8
  export { default as ComboboxInput, type ComboboxInputProps, type ComboboxInputBaseProps } from './combobox-input.svelte';
@@ -1,6 +1,7 @@
1
1
  export { createListCollection, useListCollection, } from '../collection';
2
2
  export { default as ComboboxClearTrigger, } from './combobox-clear-trigger.svelte';
3
3
  export { default as ComboboxContent, } from './combobox-content.svelte';
4
+ export { default as ComboboxEmpty } from './combobox-empty.svelte';
4
5
  export { default as ComboboxContext } from './combobox-context.svelte';
5
6
  export { default as ComboboxControl, } from './combobox-control.svelte';
6
7
  export { default as ComboboxInput } from './combobox-input.svelte';
@@ -2,6 +2,7 @@ export type { HighlightChangeDetails as ListboxHighlightChangeDetails, ScrollToI
2
2
  export { createListCollection, type CollectionItem, type ListCollection } from '../collection/index.js';
3
3
  export { default as ListboxContent, type ListboxContentBaseProps, type ListboxContentProps, } from './listbox-content.svelte';
4
4
  export { default as ListboxContext, type ListboxContextProps } from './listbox-context.svelte';
5
+ export { default as ListboxEmpty, type ListboxEmptyBaseProps, type ListboxEmptyProps } from './listbox-empty.svelte';
5
6
  export { default as ListboxInput, type ListboxInputBaseProps, type ListboxInputProps } from './listbox-input.svelte';
6
7
  export { default as ListboxItem, type ListboxItemBaseProps, type ListboxItemProps } from './listbox-item.svelte';
7
8
  export { default as ListboxItemContext, type ListboxItemContextProps } from './listbox-item-context.svelte';
@@ -1,6 +1,7 @@
1
1
  export { createListCollection } from '../collection/index.js';
2
2
  export { default as ListboxContent, } from './listbox-content.svelte';
3
3
  export { default as ListboxContext } from './listbox-context.svelte';
4
+ export { default as ListboxEmpty } from './listbox-empty.svelte';
4
5
  export { default as ListboxInput } from './listbox-input.svelte';
5
6
  export { default as ListboxItem } from './listbox-item.svelte';
6
7
  export { default as ListboxItemContext } from './listbox-item-context.svelte';
@@ -0,0 +1,23 @@
1
+ <script module lang="ts">
2
+ import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types'
3
+
4
+ export interface ListboxEmptyBaseProps extends PolymorphicProps<'div'>, RefAttribute {}
5
+ export interface ListboxEmptyProps extends Assign<HTMLProps<'div'>, ListboxEmptyBaseProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import { Ark } from '../factory'
10
+ import { listboxAnatomy } from './listbox.anatomy'
11
+ import { useListboxContext } from './use-listbox-context'
12
+
13
+ const parts = listboxAnatomy.build()
14
+
15
+ let { ref = $bindable(null), ...props }: ListboxEmptyProps = $props()
16
+
17
+ const listbox = useListboxContext()
18
+ const isEmpty = $derived(listbox().collection.size === 0)
19
+ </script>
20
+
21
+ {#if isEmpty}
22
+ <Ark as="div" bind:ref {...parts.empty.attrs} {...props} role="presentation" />
23
+ {/if}
@@ -0,0 +1,8 @@
1
+ import type { Assign, HTMLProps, PolymorphicProps, RefAttribute } from '../../types';
2
+ export interface ListboxEmptyBaseProps extends PolymorphicProps<'div'>, RefAttribute {
3
+ }
4
+ export interface ListboxEmptyProps extends Assign<HTMLProps<'div'>, ListboxEmptyBaseProps> {
5
+ }
6
+ declare const ListboxEmpty: import("svelte").Component<ListboxEmptyProps, {}, "ref">;
7
+ type ListboxEmpty = ReturnType<typeof ListboxEmpty>;
8
+ export default ListboxEmpty;
@@ -1 +1 @@
1
- export { anatomy as listboxAnatomy } from '@zag-js/listbox';
1
+ export declare const listboxAnatomy: import("@zag-js/anatomy").AnatomyInstance<"input" | "label" | "root" | "content" | "valueText" | "item" | "itemGroup" | "itemGroupLabel" | "itemIndicator" | "itemText" | "empty">;
@@ -1 +1,2 @@
1
- export { anatomy as listboxAnatomy } from '@zag-js/listbox';
1
+ import { anatomy } from '@zag-js/listbox';
2
+ export const listboxAnatomy = anatomy.extendWith('empty');
@@ -1,5 +1,6 @@
1
1
  export { default as Content, type ListboxContentBaseProps as ContentBaseProps, type ListboxContentProps as ContentProps, } from './listbox-content.svelte';
2
2
  export { default as Context, type ListboxContextProps as ContextProps } from './listbox-context.svelte';
3
+ export { default as Empty, type ListboxEmptyBaseProps as EmptyBaseProps, type ListboxEmptyProps as EmptyProps, } from './listbox-empty.svelte';
3
4
  export { default as Input, type ListboxInputBaseProps as InputBaseProps, type ListboxInputProps as InputProps, } from './listbox-input.svelte';
4
5
  export { default as Item, type ListboxItemBaseProps as ItemBaseProps, type ListboxItemProps as ItemProps, } from './listbox-item.svelte';
5
6
  export { default as ItemContext, type ListboxItemContextProps as ItemContextProps } from './listbox-item-context.svelte';
@@ -1,5 +1,6 @@
1
1
  export { default as Content, } from './listbox-content.svelte';
2
2
  export { default as Context } from './listbox-context.svelte';
3
+ export { default as Empty, } from './listbox-empty.svelte';
3
4
  export { default as Input, } from './listbox-input.svelte';
4
5
  export { default as Item, } from './listbox-item.svelte';
5
6
  export { default as ItemContext } from './listbox-item-context.svelte';
@@ -40,6 +40,7 @@
40
40
  'onInteractOutside',
41
41
  'onOpenChange',
42
42
  'onPointerDownOutside',
43
+ 'onRequestDismiss',
43
44
  'onSelect',
44
45
  'open',
45
46
  'positioning',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ark-ui/svelte",
3
3
  "type": "module",
4
- "version": "5.6.0",
4
+ "version": "5.7.0",
5
5
  "description": "A collection of unstyled, accessible UI components for Svelte",
6
6
  "keywords": [
7
7
  "accordion",
@@ -120,88 +120,88 @@
120
120
  "sideEffects": false,
121
121
  "dependencies": {
122
122
  "@internationalized/date": "3.8.2",
123
- "@zag-js/accordion": "1.21.9",
124
- "@zag-js/anatomy": "1.21.9",
125
- "@zag-js/angle-slider": "1.21.9",
126
- "@zag-js/async-list": "1.21.9",
127
- "@zag-js/auto-resize": "1.21.9",
128
- "@zag-js/avatar": "1.21.9",
129
- "@zag-js/carousel": "1.21.9",
130
- "@zag-js/checkbox": "1.21.9",
131
- "@zag-js/clipboard": "1.21.9",
132
- "@zag-js/collapsible": "1.21.9",
133
- "@zag-js/collection": "1.21.9",
134
- "@zag-js/color-picker": "1.21.9",
135
- "@zag-js/color-utils": "1.21.9",
136
- "@zag-js/combobox": "1.21.9",
137
- "@zag-js/core": "1.21.9",
138
- "@zag-js/date-picker": "1.21.9",
139
- "@zag-js/date-utils": "1.21.9",
140
- "@zag-js/dialog": "1.21.9",
141
- "@zag-js/dom-query": "1.21.9",
142
- "@zag-js/editable": "1.21.9",
143
- "@zag-js/file-upload": "1.21.9",
144
- "@zag-js/file-utils": "1.21.9",
145
- "@zag-js/floating-panel": "1.21.9",
146
- "@zag-js/focus-trap": "1.21.9",
147
- "@zag-js/highlight-word": "1.21.9",
148
- "@zag-js/hover-card": "1.21.9",
149
- "@zag-js/i18n-utils": "1.21.9",
150
- "@zag-js/json-tree-utils": "1.21.9",
151
- "@zag-js/listbox": "1.21.9",
152
- "@zag-js/menu": "1.21.9",
153
- "@zag-js/number-input": "1.21.9",
154
- "@zag-js/pagination": "1.21.9",
155
- "@zag-js/password-input": "1.21.9",
156
- "@zag-js/pin-input": "1.21.9",
157
- "@zag-js/popover": "1.21.9",
158
- "@zag-js/presence": "1.21.9",
159
- "@zag-js/progress": "1.21.9",
160
- "@zag-js/qr-code": "1.21.9",
161
- "@zag-js/radio-group": "1.21.9",
162
- "@zag-js/rating-group": "1.21.9",
163
- "@zag-js/scroll-area": "1.21.9",
164
- "@zag-js/select": "1.21.9",
165
- "@zag-js/signature-pad": "1.21.9",
166
- "@zag-js/slider": "1.21.9",
167
- "@zag-js/splitter": "1.21.9",
168
- "@zag-js/steps": "1.21.9",
169
- "@zag-js/svelte": "1.21.9",
170
- "@zag-js/switch": "1.21.9",
171
- "@zag-js/tabs": "1.21.9",
172
- "@zag-js/tags-input": "1.21.9",
173
- "@zag-js/time-picker": "1.21.9",
174
- "@zag-js/timer": "1.21.9",
175
- "@zag-js/toast": "1.21.9",
176
- "@zag-js/toggle": "1.21.9",
177
- "@zag-js/toggle-group": "1.21.9",
178
- "@zag-js/tooltip": "1.21.9",
179
- "@zag-js/tour": "1.21.9",
180
- "@zag-js/tree-view": "1.21.9",
181
- "@zag-js/types": "1.21.9",
182
- "@zag-js/utils": "1.21.9"
123
+ "@zag-js/accordion": "1.22.1",
124
+ "@zag-js/anatomy": "1.22.1",
125
+ "@zag-js/angle-slider": "1.22.1",
126
+ "@zag-js/async-list": "1.22.1",
127
+ "@zag-js/auto-resize": "1.22.1",
128
+ "@zag-js/avatar": "1.22.1",
129
+ "@zag-js/carousel": "1.22.1",
130
+ "@zag-js/checkbox": "1.22.1",
131
+ "@zag-js/clipboard": "1.22.1",
132
+ "@zag-js/collapsible": "1.22.1",
133
+ "@zag-js/collection": "1.22.1",
134
+ "@zag-js/color-picker": "1.22.1",
135
+ "@zag-js/color-utils": "1.22.1",
136
+ "@zag-js/combobox": "1.22.1",
137
+ "@zag-js/core": "1.22.1",
138
+ "@zag-js/date-picker": "1.22.1",
139
+ "@zag-js/date-utils": "1.22.1",
140
+ "@zag-js/dialog": "1.22.1",
141
+ "@zag-js/dom-query": "1.22.1",
142
+ "@zag-js/editable": "1.22.1",
143
+ "@zag-js/file-upload": "1.22.1",
144
+ "@zag-js/file-utils": "1.22.1",
145
+ "@zag-js/floating-panel": "1.22.1",
146
+ "@zag-js/focus-trap": "1.22.1",
147
+ "@zag-js/highlight-word": "1.22.1",
148
+ "@zag-js/hover-card": "1.22.1",
149
+ "@zag-js/i18n-utils": "1.22.1",
150
+ "@zag-js/json-tree-utils": "1.22.1",
151
+ "@zag-js/listbox": "1.22.1",
152
+ "@zag-js/menu": "1.22.1",
153
+ "@zag-js/number-input": "1.22.1",
154
+ "@zag-js/pagination": "1.22.1",
155
+ "@zag-js/password-input": "1.22.1",
156
+ "@zag-js/pin-input": "1.22.1",
157
+ "@zag-js/popover": "1.22.1",
158
+ "@zag-js/presence": "1.22.1",
159
+ "@zag-js/progress": "1.22.1",
160
+ "@zag-js/qr-code": "1.22.1",
161
+ "@zag-js/radio-group": "1.22.1",
162
+ "@zag-js/rating-group": "1.22.1",
163
+ "@zag-js/scroll-area": "1.22.1",
164
+ "@zag-js/select": "1.22.1",
165
+ "@zag-js/signature-pad": "1.22.1",
166
+ "@zag-js/slider": "1.22.1",
167
+ "@zag-js/splitter": "1.22.1",
168
+ "@zag-js/steps": "1.22.1",
169
+ "@zag-js/svelte": "1.22.1",
170
+ "@zag-js/switch": "1.22.1",
171
+ "@zag-js/tabs": "1.22.1",
172
+ "@zag-js/tags-input": "1.22.1",
173
+ "@zag-js/time-picker": "1.22.1",
174
+ "@zag-js/timer": "1.22.1",
175
+ "@zag-js/toast": "1.22.1",
176
+ "@zag-js/toggle": "1.22.1",
177
+ "@zag-js/toggle-group": "1.22.1",
178
+ "@zag-js/tooltip": "1.22.1",
179
+ "@zag-js/tour": "1.22.1",
180
+ "@zag-js/tree-view": "1.22.1",
181
+ "@zag-js/types": "1.22.1",
182
+ "@zag-js/utils": "1.22.1"
183
183
  },
184
184
  "devDependencies": {
185
- "@storybook/addon-a11y": "9.1.2",
186
- "@storybook/sveltekit": "9.1.2",
185
+ "@storybook/addon-a11y": "9.1.3",
186
+ "@storybook/sveltekit": "9.1.3",
187
187
  "@sveltejs/adapter-auto": "6.1.0",
188
- "@sveltejs/kit": "2.31.1",
189
- "@sveltejs/package": "2.4.1",
190
- "@sveltejs/vite-plugin-svelte": "6.1.2",
188
+ "@sveltejs/kit": "2.36.2",
189
+ "@sveltejs/package": "2.5.0",
190
+ "@sveltejs/vite-plugin-svelte": "6.1.3",
191
191
  "@tanstack/svelte-form": "1.19.2",
192
- "@testing-library/jest-dom": "6.7.0",
192
+ "@testing-library/jest-dom": "6.8.0",
193
193
  "@testing-library/svelte": "5.2.8",
194
194
  "@testing-library/user-event": "14.6.1",
195
195
  "@vitest/coverage-v8": "3.2.4",
196
196
  "clean-package": "2.2.0",
197
197
  "image-conversion": "2.1.1",
198
- "lucide-svelte": "0.540.0",
199
- "storybook": "9.1.2",
200
- "svelte": "5.38.2",
198
+ "lucide-svelte": "0.541.0",
199
+ "storybook": "9.1.3",
200
+ "svelte": "5.38.3",
201
201
  "svelte-check": "4.3.1",
202
202
  "tslib": "2.8.1",
203
203
  "typescript": "5.9.2",
204
- "vite": "7.1.2",
204
+ "vite": "7.1.3",
205
205
  "vitest": "3.2.4"
206
206
  },
207
207
  "peerDependencies": {