ui-ingredients 0.12.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/accordion/accordion-item-trigger.svelte +1 -1
- package/dist/alert-dialog/alert-dialog-close-trigger.svelte +1 -1
- package/dist/alert-dialog/alert-dialog-trigger.svelte +1 -1
- package/dist/carousel/carousel-indicator.svelte +1 -1
- package/dist/carousel/carousel-next-trigger.svelte +1 -1
- package/dist/carousel/carousel-prev-trigger.svelte +1 -1
- package/dist/clipboard/clipboard-trigger.svelte +1 -1
- package/dist/collapsible/collapsible-trigger.svelte +1 -1
- package/dist/color-picker/color-picker-channel-slider-label.svelte +2 -5
- package/dist/color-picker/color-picker-channel-slider-label.svelte.d.ts +2 -3
- package/dist/color-picker/color-picker-swatch-trigger.svelte +1 -1
- package/dist/color-picker/create-color-picker.svelte.d.ts +1 -2
- package/dist/color-picker/create-color-picker.svelte.js +0 -1
- package/dist/color-picker/index.d.ts +1 -0
- package/dist/combobox/combobox-clear-trigger.svelte +1 -1
- package/dist/combobox/combobox-root.svelte +6 -10
- package/dist/combobox/combobox-root.svelte.d.ts +16 -19
- package/dist/combobox/combobox-trigger.svelte +1 -1
- package/dist/combobox/combobox.d.ts +1 -0
- package/dist/combobox/combobox.js +1 -0
- package/dist/combobox/create-combobox.svelte.d.ts +3 -3
- package/dist/combobox/create-combobox.svelte.js +1 -10
- package/dist/create-context.svelte.d.ts +1 -1
- package/dist/date-picker/create-date-picker.svelte.d.ts +1 -5
- package/dist/date-picker/create-date-picker.svelte.js +0 -6
- package/dist/date-picker/date-picker-clear-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-day-table-cell-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-month-table-cell-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-next-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-preset-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-prev-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-view-trigger.svelte +1 -1
- package/dist/date-picker/date-picker-year-table-cell-trigger.svelte +1 -1
- package/dist/date-picker/index.d.ts +1 -0
- package/dist/dialog/dialog-close-trigger.svelte +1 -1
- package/dist/dialog/dialog-trigger.svelte +1 -1
- package/dist/drawer/drawer-close-trigger.svelte +1 -1
- package/dist/drawer/drawer-trigger.svelte +1 -1
- package/dist/editable/editable-cancel-trigger.svelte +1 -1
- package/dist/editable/editable-edit-trigger.svelte +1 -1
- package/dist/editable/editable-submit-trigger.svelte +1 -1
- package/dist/field/field-textarea.svelte +30 -4
- package/dist/field/field-textarea.svelte.d.ts +3 -1
- package/dist/file-upload/file-upload-clear-trigger.svelte +1 -1
- package/dist/file-upload/file-upload-item-delete-trigger.svelte +1 -1
- package/dist/file-upload/file-upload-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-close-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-drag-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-maximize-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-minimize-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-resize-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-restore-trigger.svelte +1 -1
- package/dist/floating-panel/floating-panel-trigger.svelte +1 -1
- package/dist/menu/menu-context-trigger.svelte +1 -1
- package/dist/menu/menu-trigger-item.svelte +1 -1
- package/dist/menu/menu-trigger.svelte +1 -1
- package/dist/number-input/number-input-decrement-trigger.svelte +1 -1
- package/dist/number-input/number-input-increment-trigger.svelte +1 -1
- package/dist/pagination/pagination-item.svelte +1 -1
- package/dist/pagination/pagination-next-trigger.svelte +1 -1
- package/dist/pagination/pagination-prev-trigger.svelte +1 -1
- package/dist/pin-input/create-pin-input.svelte.js +1 -0
- package/dist/pin-input/pin-input-clear-trigger.svelte +1 -1
- package/dist/popover/popover-close-trigger.svelte +1 -1
- package/dist/popover/popover-trigger.svelte +1 -1
- package/dist/select/create-select.svelte.d.ts +3 -3
- package/dist/select/create-select.svelte.js +1 -10
- package/dist/select/select-clear-trigger.svelte +1 -1
- package/dist/select/select-root.svelte +6 -9
- package/dist/select/select-root.svelte.d.ts +16 -19
- package/dist/select/select-trigger.svelte +1 -1
- package/dist/select/select.d.ts +1 -0
- package/dist/select/select.js +1 -0
- package/dist/signature-pad/signature-pad-clear-trigger.svelte +1 -1
- package/dist/steps/steps-next-trigger.svelte +1 -1
- package/dist/steps/steps-prev-trigger.svelte +1 -1
- package/dist/steps/steps-trigger.svelte +1 -1
- package/dist/tabs/tabs-trigger.svelte +1 -1
- package/dist/tags-input/tags-input-clear-trigger.svelte +1 -1
- package/dist/tags-input/tags-input-item-delete-trigger.svelte +1 -1
- package/dist/time-picker/index.d.ts +1 -1
- package/dist/time-picker/time-picker-clear-trigger.svelte +1 -1
- package/dist/time-picker/time-picker-trigger.svelte +1 -1
- package/dist/timer/timer-action-trigger.svelte +1 -1
- package/dist/toast/create-toaster.svelte.d.ts +3 -17
- package/dist/toast/toast-action-trigger.svelte +1 -1
- package/dist/toast/toast-close-trigger.svelte +1 -1
- package/dist/toggle-group/toggle-group-item.svelte +1 -1
- package/dist/tooltip/tooltip-trigger.svelte +1 -1
- package/dist/tour/tour-action-trigger.svelte +1 -1
- package/dist/tour/tour-close-trigger.svelte +1 -1
- package/dist/tour/tour-trigger.svelte +1 -1
- package/dist/tree-view/index.d.ts +2 -0
- package/dist/tree-view/tree-view-branch-content.svelte +6 -7
- package/dist/tree-view/tree-view-branch-control.svelte +3 -5
- package/dist/tree-view/tree-view-branch-indent-guide.svelte +35 -0
- package/dist/tree-view/tree-view-branch-indent-guide.svelte.d.ts +21 -0
- package/dist/tree-view/tree-view-branch-indicator.svelte +6 -8
- package/dist/tree-view/tree-view-branch-indicator.svelte.d.ts +1 -1
- package/dist/tree-view/tree-view-branch-text.svelte +3 -5
- package/dist/tree-view/tree-view-branch-trigger.svelte +3 -5
- package/dist/tree-view/tree-view-branch.svelte +11 -20
- package/dist/tree-view/tree-view-branch.svelte.d.ts +2 -2
- package/dist/tree-view/tree-view-context.svelte.d.ts +2 -10
- package/dist/tree-view/tree-view-context.svelte.js +1 -3
- package/dist/tree-view/tree-view-item-indicator.svelte +3 -5
- package/dist/tree-view/tree-view-item-text.svelte +3 -5
- package/dist/tree-view/tree-view-item.svelte +9 -22
- package/dist/tree-view/tree-view-item.svelte.d.ts +2 -2
- package/dist/tree-view/tree-view-label.svelte +0 -1
- package/dist/tree-view/tree-view-root.svelte +1 -0
- package/dist/tree-view/tree-view-tree.svelte +2 -11
- package/dist/tree-view/tree-view-tree.svelte.d.ts +0 -1
- package/dist/tree-view/tree-view.d.ts +2 -0
- package/dist/tree-view/tree-view.js +2 -0
- package/dist/tree-view/types.d.ts +4 -0
- package/dist/tree-view/types.js +1 -0
- package/package.json +59 -58
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as select from '@zag-js/select';
|
2
|
-
type Omitted = 'id' | 'dir' | 'getRootNode' | '
|
3
|
-
export interface CreateSelectProps
|
2
|
+
type Omitted = 'id' | 'dir' | 'getRootNode' | 'open.controlled';
|
3
|
+
export interface CreateSelectProps extends Omit<select.Context, Omitted> {
|
4
4
|
id?: string;
|
5
5
|
openControlled?: boolean;
|
6
6
|
}
|
7
7
|
export interface CreateSelectReturn extends select.Api {
|
8
8
|
}
|
9
|
-
export declare function createSelect
|
9
|
+
export declare function createSelect(props: CreateSelectProps): CreateSelectReturn;
|
10
10
|
export {};
|
@@ -4,15 +4,7 @@ import { getFieldContext } from '../field/field-context.svelte.js';
|
|
4
4
|
import { getLocaleContext } from '../locale-provider/local-provider-context.svelte.js';
|
5
5
|
import * as select from '@zag-js/select';
|
6
6
|
import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
|
7
|
-
import { createSplitProps } from '@zag-js/utils';
|
8
7
|
export function createSelect(props) {
|
9
|
-
const [collectionProps, selectProps] = $derived(createSplitProps([
|
10
|
-
'items',
|
11
|
-
'itemToValue',
|
12
|
-
'itemToString',
|
13
|
-
'isItemDisabled',
|
14
|
-
])(props));
|
15
|
-
const collection = $derived(select.collection(collectionProps));
|
16
8
|
const field = getFieldContext();
|
17
9
|
const locale = getLocaleContext();
|
18
10
|
const environment = getEnvironmentContext();
|
@@ -28,10 +20,9 @@ export function createSelect(props) {
|
|
28
20
|
disabled: field?.disabled,
|
29
21
|
readOnly: field?.readOnly,
|
30
22
|
required: field?.required,
|
31
|
-
...
|
23
|
+
...props,
|
32
24
|
getRootNode: environment?.getRootNode,
|
33
25
|
'open.controlled': props.openControlled,
|
34
|
-
collection,
|
35
26
|
}));
|
36
27
|
const [state, send] = useMachine(select.machine(context), { context });
|
37
28
|
return reflect(() => {
|
@@ -6,15 +6,15 @@
|
|
6
6
|
CreateSelectReturn,
|
7
7
|
} from './create-select.svelte.js';
|
8
8
|
|
9
|
-
export interface SelectProps
|
9
|
+
export interface SelectProps
|
10
10
|
extends Assign<
|
11
11
|
HtmlIngredientProps<'div', HTMLDivElement, CreateSelectReturn>,
|
12
|
-
CreateSelectProps
|
12
|
+
CreateSelectProps
|
13
13
|
>,
|
14
14
|
PresenceStrategyProps {}
|
15
15
|
</script>
|
16
16
|
|
17
|
-
<script lang="ts"
|
17
|
+
<script lang="ts">
|
18
18
|
import {mergeProps} from '../merge-props.js';
|
19
19
|
import {createPresence} from '../presence/create-presence.svelte.js';
|
20
20
|
import {setPresenceContext} from '../presence/presence-context.svelte.js';
|
@@ -28,10 +28,10 @@
|
|
28
28
|
asChild,
|
29
29
|
children,
|
30
30
|
...props
|
31
|
-
}: SelectProps
|
31
|
+
}: SelectProps = $props();
|
32
32
|
|
33
33
|
let [createSelectProps, rest] = $derived(
|
34
|
-
createSplitProps<CreateSelectProps
|
34
|
+
createSplitProps<CreateSelectProps>([
|
35
35
|
'id',
|
36
36
|
'ids',
|
37
37
|
'form',
|
@@ -39,7 +39,6 @@
|
|
39
39
|
'open',
|
40
40
|
'openControlled',
|
41
41
|
'value',
|
42
|
-
'items',
|
43
42
|
'invalid',
|
44
43
|
'multiple',
|
45
44
|
'disabled',
|
@@ -51,9 +50,6 @@
|
|
51
50
|
'deselectable',
|
52
51
|
'closeOnSelect',
|
53
52
|
'highlightedValue',
|
54
|
-
'itemToValue',
|
55
|
-
'itemToString',
|
56
|
-
'isItemDisabled',
|
57
53
|
'onOpenChange',
|
58
54
|
'onValueChange',
|
59
55
|
'onFocusOutside',
|
@@ -61,6 +57,7 @@
|
|
61
57
|
'onInteractOutside',
|
62
58
|
'onPointerDownOutside',
|
63
59
|
'scrollToIndexFn',
|
60
|
+
'collection',
|
64
61
|
])(props),
|
65
62
|
);
|
66
63
|
|
@@ -1,26 +1,23 @@
|
|
1
1
|
import type { PresenceStrategyProps } from '../presence/create-presence.svelte.js';
|
2
2
|
import type { Assign, HtmlIngredientProps } from '../types.js';
|
3
3
|
import type { CreateSelectProps, CreateSelectReturn } from './create-select.svelte.js';
|
4
|
-
export interface SelectProps
|
4
|
+
export interface SelectProps extends Assign<HtmlIngredientProps<'div', HTMLDivElement, CreateSelectReturn>, CreateSelectProps>, PresenceStrategyProps {
|
5
5
|
}
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
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> {
|
7
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
8
|
+
$$bindings?: Bindings;
|
9
|
+
} & Exports;
|
10
|
+
(internal: unknown, props: Props & {
|
11
|
+
$$events?: Events;
|
12
|
+
$$slots?: Slots;
|
13
|
+
}): Exports & {
|
14
|
+
$set?: any;
|
15
|
+
$on?: any;
|
10
16
|
};
|
11
|
-
|
12
|
-
bindings(): "ref";
|
13
|
-
exports(): {};
|
17
|
+
z_$$bindings?: Bindings;
|
14
18
|
}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {
|
20
|
-
$$events?: ReturnType<__sveltets_Render<T>['events']>;
|
21
|
-
}): ReturnType<__sveltets_Render<T>['exports']>;
|
22
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
23
|
-
}
|
24
|
-
declare const SelectRoot: $$IsomorphicComponent;
|
25
|
-
type SelectRoot<T> = InstanceType<typeof SelectRoot<T>>;
|
19
|
+
declare const SelectRoot: $$__sveltets_2_IsomorphicComponent<SelectProps, {
|
20
|
+
[evt: string]: CustomEvent<any>;
|
21
|
+
}, {}, {}, "ref">;
|
22
|
+
type SelectRoot = InstanceType<typeof SelectRoot>;
|
26
23
|
export default SelectRoot;
|
package/dist/select/select.d.ts
CHANGED
package/dist/select/select.js
CHANGED
@@ -13,5 +13,5 @@ export type { TimePickerProps } from './time-picker-root.svelte';
|
|
13
13
|
export type { TimePickerSecondCellProps } from './time-picker-second-cell.svelte';
|
14
14
|
export type { TimePickerSpacerProps } from './time-picker-spacer.svelte';
|
15
15
|
export type { TimePickerTriggerProps } from './time-picker-trigger.svelte';
|
16
|
-
export { anatomy as timePickerAnatomy } from '@zag-js/time-picker';
|
16
|
+
export { anatomy as timePickerAnatomy, type Time } from '@zag-js/time-picker';
|
17
17
|
export { getTimePickerContext } from './time-picker-context.svelte.js';
|
@@ -1,23 +1,9 @@
|
|
1
|
-
import type { Machine, StateMachine } from '@zag-js/core';
|
2
1
|
import * as toast from '@zag-js/toast';
|
3
|
-
export interface CreateToasterProps {
|
2
|
+
export interface CreateToasterProps extends Omit<Partial<toast.GroupMachineContext>, 'id'> {
|
4
3
|
id?: string;
|
5
|
-
|
6
|
-
gap?: toast.GroupMachineContext['gap'];
|
7
|
-
hotkey?: toast.GroupMachineContext['hotkey'];
|
8
|
-
offsets?: toast.GroupMachineContext['offsets'];
|
9
|
-
overlap?: toast.GroupMachineContext['overlap'];
|
10
|
-
duration?: toast.GroupMachineContext['duration'];
|
11
|
-
placement?: toast.GroupMachineContext['placement'];
|
12
|
-
removeDelay?: toast.GroupMachineContext['removeDelay'];
|
13
|
-
pauseOnPageIdle?: toast.GroupMachineContext['pauseOnPageIdle'];
|
4
|
+
placement?: toast.Placement;
|
14
5
|
}
|
15
|
-
type ToasterMachineState = {
|
16
|
-
value: 'stack' | 'overlap';
|
17
|
-
};
|
18
|
-
type ToasterMachine = Machine<toast.GroupMachineContext, ToasterMachineState, StateMachine.AnyEventObject>;
|
19
6
|
export interface CreateToasterReturn extends toast.GroupApi {
|
20
|
-
machine:
|
7
|
+
machine: toast.GroupService;
|
21
8
|
}
|
22
9
|
export declare function createToaster(props?: CreateToasterProps): CreateToasterReturn;
|
23
|
-
export {};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
export * as TreeView from './tree-view.js';
|
2
2
|
export type { TreeViewBranchContentProps } from './tree-view-branch-content.svelte';
|
3
3
|
export type { TreeViewBranchControlProps } from './tree-view-branch-control.svelte';
|
4
|
+
export type { TreeViewBranchIndentGuideProps } from './tree-view-branch-indent-guide.svelte';
|
4
5
|
export type { TreeViewBranchIndicatorProps } from './tree-view-branch-indicator.svelte';
|
5
6
|
export type { TreeViewBranchTextProps } from './tree-view-branch-text.svelte';
|
6
7
|
export type { TreeViewBranchTriggerProps } from './tree-view-branch-trigger.svelte';
|
@@ -13,3 +14,4 @@ export type { TreeViewProps } from './tree-view-root.svelte';
|
|
13
14
|
export type { TreeViewTreeProps } from './tree-view-tree.svelte';
|
14
15
|
export { anatomy as treeViewAnatomy } from '@zag-js/tree-view';
|
15
16
|
export { getTreeViewContext } from './tree-view-context.svelte.js';
|
17
|
+
export type { NodeProps } from './types.js';
|