ui-ingredients 0.0.18 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/collapsible/create-collapsible.svelte.d.ts +1 -0
- package/dist/collapsible/create-collapsible.svelte.js +1 -0
- package/dist/collapsible/root.svelte +4 -2
- package/dist/collapsible/trigger.svelte +2 -2
- package/dist/combobox/create-combobox.svelte.d.ts +1 -0
- package/dist/combobox/create-combobox.svelte.js +1 -0
- package/dist/combobox/root.svelte +2 -0
- package/dist/date-picker/anatomy.js +3 -0
- package/dist/date-picker/clear-trigger.svelte +19 -2
- package/dist/date-picker/clear-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/content.svelte +19 -2
- package/dist/date-picker/content.svelte.d.ts +3 -3
- package/dist/date-picker/context.svelte.d.ts +8 -8
- package/dist/date-picker/context.svelte.js +6 -14
- package/dist/date-picker/control.svelte +19 -2
- package/dist/date-picker/control.svelte.d.ts +3 -3
- package/dist/date-picker/create-date-picker.svelte.d.ts +14 -0
- package/dist/date-picker/create-date-picker.svelte.js +24 -0
- package/dist/date-picker/date-picker.d.ts +3 -3
- package/dist/date-picker/date-picker.js +3 -3
- package/dist/date-picker/day-table-cell-trigger.svelte +21 -2
- package/dist/date-picker/day-table-cell-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/day-table-cell.svelte +40 -2
- package/dist/date-picker/day-table-cell.svelte.d.ts +3 -3
- package/dist/date-picker/index.d.ts +29 -0
- package/dist/date-picker/index.js +2 -0
- package/dist/date-picker/input.svelte +18 -2
- package/dist/date-picker/input.svelte.d.ts +3 -3
- package/dist/date-picker/label.svelte +20 -2
- package/dist/date-picker/label.svelte.d.ts +3 -3
- package/dist/date-picker/month-select.svelte +40 -2
- package/dist/date-picker/month-select.svelte.d.ts +3 -3
- package/dist/date-picker/month-table-cell-trigger.svelte +21 -2
- package/dist/date-picker/month-table-cell-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/month-table-cell.svelte +40 -2
- package/dist/date-picker/month-table-cell.svelte.d.ts +3 -3
- package/dist/date-picker/next-trigger.svelte +21 -2
- package/dist/date-picker/next-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/positioner.svelte +19 -2
- package/dist/date-picker/positioner.svelte.d.ts +3 -3
- package/dist/date-picker/preset-trigger.svelte +21 -2
- package/dist/date-picker/preset-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/prev-trigger.svelte +21 -2
- package/dist/date-picker/prev-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/range-text.svelte +23 -2
- package/dist/date-picker/range-text.svelte.d.ts +3 -3
- package/dist/date-picker/root.svelte +85 -2
- package/dist/date-picker/root.svelte.d.ts +3 -3
- package/dist/date-picker/table-body.svelte +21 -2
- package/dist/date-picker/table-body.svelte.d.ts +3 -3
- package/dist/date-picker/table-head.svelte +21 -2
- package/dist/date-picker/table-head.svelte.d.ts +3 -3
- package/dist/date-picker/table-header.svelte +21 -2
- package/dist/date-picker/table-header.svelte.d.ts +3 -3
- package/dist/date-picker/table-row.svelte +21 -2
- package/dist/date-picker/table-row.svelte.d.ts +3 -3
- package/dist/date-picker/table.svelte +31 -2
- package/dist/date-picker/table.svelte.d.ts +3 -3
- package/dist/date-picker/trigger.svelte +19 -2
- package/dist/date-picker/trigger.svelte.d.ts +3 -3
- package/dist/date-picker/view-control.svelte +21 -2
- package/dist/date-picker/view-control.svelte.d.ts +3 -3
- package/dist/date-picker/view.svelte +24 -0
- package/dist/date-picker/{view-trigger.svelte.d.ts → view.svelte.d.ts} +5 -5
- package/dist/date-picker/year-select.svelte +40 -2
- package/dist/date-picker/year-select.svelte.d.ts +3 -3
- package/dist/date-picker/year-table-cell-trigger.svelte +21 -2
- package/dist/date-picker/year-table-cell-trigger.svelte.d.ts +3 -3
- package/dist/date-picker/year-table-cell.svelte +40 -2
- package/dist/date-picker/year-table-cell.svelte.d.ts +3 -3
- package/dist/dialog/create-dialog.svelte.d.ts +1 -0
- package/dist/dialog/create-dialog.svelte.js +1 -0
- package/dist/editable/create-editable.svelte.d.ts +1 -0
- package/dist/editable/create-editable.svelte.js +1 -0
- package/dist/hover-card/create-hover-card.svelte.d.ts +1 -0
- package/dist/hover-card/create-hover-card.svelte.js +1 -0
- package/dist/menu/create-menu.svelte.d.ts +1 -0
- package/dist/menu/create-menu.svelte.js +1 -0
- package/dist/menu/option-item.svelte +5 -8
- package/dist/popover/create-popover.svelte.d.ts +1 -0
- package/dist/popover/create-popover.svelte.js +1 -0
- package/dist/select/create-select.svelte.d.ts +1 -0
- package/dist/select/create-select.svelte.js +1 -0
- package/dist/select/root.svelte +2 -0
- package/dist/tooltip/create-tooltip.svelte.d.ts +1 -0
- package/dist/tooltip/create-tooltip.svelte.js +1 -0
- package/dist/types.d.ts +2 -4
- package/package.json +1 -1
- package/dist/date-picker/view-trigger.svelte +0 -3
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const MonthSelect: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const MonthSelect: $$__sveltets_2_IsomorphicComponent<DatePickerMonthSelectProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type MonthSelect = InstanceType<typeof MonthSelect>;
|
18
18
|
export default MonthSelect;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerMonthTableCellTriggerProps extends HtmlProps<'button'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerTableCellPropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerMonthTableCellTriggerProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let tableCellProps = datePickerTableCellPropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getMonthTableCellTriggerProps(tableCellProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<button type="button" {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</button>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const MonthTableCellTrigger: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const MonthTableCellTrigger: $$__sveltets_2_IsomorphicComponent<DatePickerMonthTableCellTriggerProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type MonthTableCellTrigger = InstanceType<typeof MonthTableCellTrigger>;
|
18
18
|
export default MonthTableCellTrigger;
|
@@ -1,3 +1,41 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {TableCellProps, TableCellState} from '@zag-js/date-picker';
|
4
|
+
import type {Snippet} from 'svelte';
|
2
5
|
|
3
|
-
|
6
|
+
export interface DatePickerMonthTableCellProps
|
7
|
+
extends Assign<Omit<HtmlProps<'div'>, 'children'>, TableCellProps> {
|
8
|
+
children?: Snippet<[state: TableCellState]>;
|
9
|
+
}
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<script lang="ts">
|
13
|
+
import {mergeProps} from '@zag-js/svelte';
|
14
|
+
import {datePickerContext, datePickerTableCellPropsContext} from './context.svelte.js';
|
15
|
+
|
16
|
+
let {
|
17
|
+
/**/
|
18
|
+
value,
|
19
|
+
disabled,
|
20
|
+
columns,
|
21
|
+
children,
|
22
|
+
...props
|
23
|
+
}: DatePickerMonthTableCellProps = $props();
|
24
|
+
|
25
|
+
let context = datePickerContext.get();
|
26
|
+
|
27
|
+
let tableCellProps: TableCellProps = $derived({
|
28
|
+
value,
|
29
|
+
disabled,
|
30
|
+
columns,
|
31
|
+
});
|
32
|
+
|
33
|
+
let state = $derived(context.getMonthTableCellState(tableCellProps));
|
34
|
+
let attrs = $derived(mergeProps(props, context.getMonthTableCellProps(tableCellProps)));
|
35
|
+
|
36
|
+
datePickerTableCellPropsContext.set(() => tableCellProps);
|
37
|
+
</script>
|
38
|
+
|
39
|
+
<div {...attrs}>
|
40
|
+
{@render children?.(state)}
|
41
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const MonthTableCell: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const MonthTableCell: $$__sveltets_2_IsomorphicComponent<DatePickerMonthTableCellProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type MonthTableCell = InstanceType<typeof MonthTableCell>;
|
18
18
|
export default MonthTableCell;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerNextTriggerProps extends HtmlProps<'button'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerViewPropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerNextTriggerProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let viewProps = datePickerViewPropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getNextTriggerProps(viewProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<button type="button" {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</button>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const NextTrigger: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const NextTrigger: $$__sveltets_2_IsomorphicComponent<DatePickerNextTriggerProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type NextTrigger = InstanceType<typeof NextTrigger>;
|
18
18
|
export default NextTrigger;
|
@@ -1,3 +1,20 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerPositionerProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerPositionerProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, context.getPositionerProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<div {...attrs}>
|
19
|
+
{@render children?.()}
|
20
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const Positioner: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const Positioner: $$__sveltets_2_IsomorphicComponent<DatePickerPositionerProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type Positioner = InstanceType<typeof Positioner>;
|
18
18
|
export default Positioner;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {PresetTriggerProps} from '@zag-js/date-picker';
|
2
4
|
|
3
|
-
|
5
|
+
export interface DatePickerPresetTriggerProps
|
6
|
+
extends Assign<HtmlProps<'button'>, PresetTriggerProps> {}
|
7
|
+
</script>
|
8
|
+
|
9
|
+
<script lang="ts">
|
10
|
+
import {mergeProps} from '@zag-js/svelte';
|
11
|
+
import {datePickerContext} from './context.svelte.js';
|
12
|
+
|
13
|
+
let {value, children, ...props}: DatePickerPresetTriggerProps = $props();
|
14
|
+
|
15
|
+
let context = datePickerContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getPresetTriggerProps({value})));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<button type="button" {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</button>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const PresetTrigger: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const PresetTrigger: $$__sveltets_2_IsomorphicComponent<DatePickerPresetTriggerProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type PresetTrigger = InstanceType<typeof PresetTrigger>;
|
18
18
|
export default PresetTrigger;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerPrevTriggerProps extends HtmlProps<'button'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerViewPropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerPrevTriggerProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let viewProps = datePickerViewPropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getPrevTriggerProps(viewProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<button type="button" {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</button>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const PrevTrigger: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const PrevTrigger: $$__sveltets_2_IsomorphicComponent<DatePickerPrevTriggerProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type PrevTrigger = InstanceType<typeof PrevTrigger>;
|
18
18
|
export default PrevTrigger;
|
@@ -1,3 +1,24 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerRangeTextProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerRangeTextProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let attrs = $derived(mergeProps(props, context.getRangeTextProps()));
|
16
|
+
</script>
|
17
|
+
|
18
|
+
<div {...attrs}>
|
19
|
+
{#if children}
|
20
|
+
{@render children()}
|
21
|
+
{:else}
|
22
|
+
{context.visibleRangeText.formatted}
|
23
|
+
{/if}
|
24
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const RangeText: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const RangeText: $$__sveltets_2_IsomorphicComponent<DatePickerRangeTextProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type RangeText = InstanceType<typeof RangeText>;
|
18
18
|
export default RangeText;
|
@@ -1,3 +1,86 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {Assign, HtmlProps} from '../types.js';
|
3
|
+
import type {Snippet} from 'svelte';
|
4
|
+
import type {CreateDatePickerProps, CreateDatePickerReturn} from './create-date-picker.svelte.js';
|
2
5
|
|
3
|
-
|
6
|
+
export interface DatePickerProps
|
7
|
+
extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateDatePickerProps> {
|
8
|
+
children?: Snippet<[api: CreateDatePickerReturn]>;
|
9
|
+
}
|
10
|
+
</script>
|
11
|
+
|
12
|
+
<script lang="ts">
|
13
|
+
import {mergeProps} from '@zag-js/svelte';
|
14
|
+
import {datePickerContext} from './context.svelte.js';
|
15
|
+
import {createDatePicker} from './create-date-picker.svelte.js';
|
16
|
+
|
17
|
+
let {
|
18
|
+
id,
|
19
|
+
ids,
|
20
|
+
min,
|
21
|
+
max,
|
22
|
+
name,
|
23
|
+
open,
|
24
|
+
view,
|
25
|
+
value,
|
26
|
+
modal,
|
27
|
+
disabled,
|
28
|
+
readOnly,
|
29
|
+
timeZone,
|
30
|
+
fixedWeeks,
|
31
|
+
startOfWeek,
|
32
|
+
defaultOpen,
|
33
|
+
positioning,
|
34
|
+
numOfMonths,
|
35
|
+
translations,
|
36
|
+
focusedValue,
|
37
|
+
closeOnSelect,
|
38
|
+
selectionMode,
|
39
|
+
format,
|
40
|
+
onViewChange,
|
41
|
+
onOpenChange,
|
42
|
+
onValueChange,
|
43
|
+
onFocusChange,
|
44
|
+
isDateUnavailable,
|
45
|
+
children,
|
46
|
+
...props
|
47
|
+
}: DatePickerProps = $props();
|
48
|
+
|
49
|
+
let context = createDatePicker({
|
50
|
+
id,
|
51
|
+
ids,
|
52
|
+
min,
|
53
|
+
max,
|
54
|
+
name,
|
55
|
+
open,
|
56
|
+
view,
|
57
|
+
value: $state.snapshot(value),
|
58
|
+
modal,
|
59
|
+
disabled,
|
60
|
+
readOnly,
|
61
|
+
timeZone,
|
62
|
+
fixedWeeks,
|
63
|
+
defaultOpen,
|
64
|
+
startOfWeek,
|
65
|
+
positioning,
|
66
|
+
numOfMonths,
|
67
|
+
translations,
|
68
|
+
focusedValue,
|
69
|
+
closeOnSelect,
|
70
|
+
selectionMode,
|
71
|
+
format,
|
72
|
+
onViewChange,
|
73
|
+
onOpenChange,
|
74
|
+
onValueChange,
|
75
|
+
onFocusChange,
|
76
|
+
isDateUnavailable,
|
77
|
+
});
|
78
|
+
|
79
|
+
let attrs = $derived(mergeProps(props, context.getRootProps()));
|
80
|
+
|
81
|
+
datePickerContext.set(context);
|
82
|
+
</script>
|
83
|
+
|
84
|
+
<div {...attrs}>
|
85
|
+
{@render children?.(context)}
|
86
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const Root: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const Root: $$__sveltets_2_IsomorphicComponent<DatePickerProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type Root = InstanceType<typeof Root>;
|
18
18
|
export default Root;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerTableBodyProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerTableBodyProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let tableProps = datePickerTablePropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getTableBodyProps(tableProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<div {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const TableBody: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const TableBody: $$__sveltets_2_IsomorphicComponent<DatePickerTableBodyProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type TableBody = InstanceType<typeof TableBody>;
|
18
18
|
export default TableBody;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerTableHeadProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerTableHeadProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let tableProps = datePickerTablePropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getTableHeadProps(tableProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<div {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const TableHead: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const TableHead: $$__sveltets_2_IsomorphicComponent<DatePickerTableHeadProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type TableHead = InstanceType<typeof TableHead>;
|
18
18
|
export default TableHead;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerTableHeaderProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerTableHeaderProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let tableProps = datePickerTablePropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getTableHeaderProps(tableProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<div {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const TableHeader: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const TableHeader: $$__sveltets_2_IsomorphicComponent<DatePickerTableHeaderProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type TableHeader = InstanceType<typeof TableHeader>;
|
18
18
|
export default TableHeader;
|
@@ -1,3 +1,22 @@
|
|
1
|
-
<script lang="ts" module
|
1
|
+
<script lang="ts" module>
|
2
|
+
import type {HtmlProps} from '../types.js';
|
2
3
|
|
3
|
-
<
|
4
|
+
export interface DatePickerTableRowProps extends HtmlProps<'div'> {}
|
5
|
+
</script>
|
6
|
+
|
7
|
+
<script lang="ts">
|
8
|
+
import {mergeProps} from '@zag-js/svelte';
|
9
|
+
import {datePickerContext, datePickerTablePropsContext} from './context.svelte.js';
|
10
|
+
|
11
|
+
let {children, ...props}: DatePickerTableRowProps = $props();
|
12
|
+
|
13
|
+
let context = datePickerContext.get();
|
14
|
+
|
15
|
+
let tableProps = datePickerTablePropsContext.get();
|
16
|
+
|
17
|
+
let attrs = $derived(mergeProps(props, context.getTableRowProps(tableProps)));
|
18
|
+
</script>
|
19
|
+
|
20
|
+
<div {...attrs}>
|
21
|
+
{@render children?.()}
|
22
|
+
</div>
|
@@ -2,7 +2,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
2
2
|
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
3
3
|
$$bindings?: Bindings;
|
4
4
|
} & Exports;
|
5
|
-
(internal: unknown, props: {
|
5
|
+
(internal: unknown, props: Props & {
|
6
6
|
$$events?: Events;
|
7
7
|
$$slots?: Slots;
|
8
8
|
}): Exports & {
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
11
11
|
};
|
12
12
|
z_$$bindings?: Bindings;
|
13
13
|
}
|
14
|
-
declare const TableRow: $$__sveltets_2_IsomorphicComponent<
|
14
|
+
declare const TableRow: $$__sveltets_2_IsomorphicComponent<DatePickerTableRowProps, {
|
15
15
|
[evt: string]: CustomEvent<any>;
|
16
|
-
}, {}, {},
|
16
|
+
}, {}, {}, "">;
|
17
17
|
type TableRow = InstanceType<typeof TableRow>;
|
18
18
|
export default TableRow;
|