ui-ingredients 0.0.24 → 0.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. package/README.md +4 -4
  2. package/dist/date-picker/date-picker.d.ts +1 -0
  3. package/dist/date-picker/date-picker.js +1 -0
  4. package/dist/date-picker/index.d.ts +1 -0
  5. package/dist/date-picker/view-trigger.svelte +21 -0
  6. package/dist/date-picker/view-trigger.svelte.d.ts +18 -0
  7. package/dist/index.d.ts +2 -0
  8. package/dist/index.js +2 -0
  9. package/dist/progress/index.d.ts +1 -0
  10. package/dist/progress/progress.d.ts +1 -0
  11. package/dist/progress/progress.js +1 -0
  12. package/dist/progress/view.svelte +21 -0
  13. package/dist/progress/view.svelte.d.ts +18 -0
  14. package/dist/signature-pad/guide.svelte +2 -2
  15. package/dist/splitter/context.svelte.d.ts +3 -0
  16. package/dist/splitter/context.svelte.js +2 -0
  17. package/dist/splitter/create-splitter.svelte.d.ts +7 -0
  18. package/dist/splitter/create-splitter.svelte.js +17 -0
  19. package/dist/splitter/index.d.ts +4 -0
  20. package/dist/splitter/index.js +1 -0
  21. package/dist/splitter/panel.svelte +29 -0
  22. package/dist/splitter/panel.svelte.d.ts +18 -0
  23. package/dist/splitter/resize-trigger.svelte +41 -0
  24. package/dist/splitter/resize-trigger.svelte.d.ts +18 -0
  25. package/dist/splitter/root.svelte +44 -0
  26. package/dist/splitter/root.svelte.d.ts +18 -0
  27. package/dist/splitter/splitter.d.ts +4 -0
  28. package/dist/splitter/splitter.js +4 -0
  29. package/dist/time-picker/clear-trigger.svelte +20 -0
  30. package/dist/time-picker/clear-trigger.svelte.d.ts +18 -0
  31. package/dist/time-picker/column.svelte +21 -0
  32. package/dist/time-picker/column.svelte.d.ts +18 -0
  33. package/dist/time-picker/content.svelte +20 -0
  34. package/dist/time-picker/content.svelte.d.ts +18 -0
  35. package/dist/time-picker/context.svelte.d.ts +3 -0
  36. package/dist/time-picker/context.svelte.js +2 -0
  37. package/dist/time-picker/control.svelte +20 -0
  38. package/dist/time-picker/control.svelte.d.ts +18 -0
  39. package/dist/time-picker/create-time-picker.svelte.d.ts +8 -0
  40. package/dist/time-picker/create-time-picker.svelte.js +20 -0
  41. package/dist/time-picker/hour-cell.svelte +21 -0
  42. package/dist/time-picker/hour-cell.svelte.d.ts +18 -0
  43. package/dist/time-picker/index.d.ts +15 -0
  44. package/dist/time-picker/index.js +1 -0
  45. package/dist/time-picker/input.svelte +18 -0
  46. package/dist/time-picker/input.svelte.d.ts +18 -0
  47. package/dist/time-picker/label.svelte +20 -0
  48. package/dist/time-picker/label.svelte.d.ts +18 -0
  49. package/dist/time-picker/minute-cell.svelte +21 -0
  50. package/dist/time-picker/minute-cell.svelte.d.ts +18 -0
  51. package/dist/time-picker/period-cell.svelte +28 -0
  52. package/dist/time-picker/period-cell.svelte.d.ts +18 -0
  53. package/dist/time-picker/positioner.svelte +20 -0
  54. package/dist/time-picker/positioner.svelte.d.ts +18 -0
  55. package/dist/time-picker/root.svelte +70 -0
  56. package/dist/time-picker/root.svelte.d.ts +18 -0
  57. package/dist/time-picker/second-cell.svelte +21 -0
  58. package/dist/time-picker/second-cell.svelte.d.ts +18 -0
  59. package/dist/time-picker/spacer.svelte +20 -0
  60. package/dist/time-picker/spacer.svelte.d.ts +18 -0
  61. package/dist/time-picker/time-picker.d.ts +15 -0
  62. package/dist/time-picker/time-picker.js +15 -0
  63. package/dist/time-picker/trigger.svelte +20 -0
  64. package/dist/time-picker/trigger.svelte.d.ts +18 -0
  65. package/package.json +1 -1
  66. package/dist/time-picker/.gitkeep +0 -0
package/README.md CHANGED
@@ -41,7 +41,7 @@ npm install ui-ingredients
41
41
  - 🟢 Checkbox
42
42
  - 🟢 Clipboard
43
43
  - 🟢 Collapsible
44
- - 🟡 ColorPicker
44
+ - ColorPicker
45
45
  - 🟢 Combobox
46
46
  - 🟢 DatePicker
47
47
  - 🟢 Dialog
@@ -55,7 +55,7 @@ npm install ui-ingredients
55
55
  - 🟢 PinInput
56
56
  - 🟢 Popover
57
57
  - 🟢 Portal
58
- - Presence
58
+ - 🟡 Presence
59
59
  - 🟢 Progress
60
60
  - 🟢 QRCode
61
61
  - 🟢 RadioGroup
@@ -64,12 +64,12 @@ npm install ui-ingredients
64
64
  - 🟢 SegmentGroup
65
65
  - 🟢 SignaturePad
66
66
  - 🟢 Slider
67
- - Splitter
67
+ - 🟢 Splitter
68
68
  - 🟢 Steps
69
69
  - 🟢 Switch
70
70
  - 🟢 Tabs
71
71
  - 🟢 TagsInput
72
- - 🟡 TimePicker
72
+ - 🟢 TimePicker
73
73
  - 🟢 Timer
74
74
  - 🟢 Toast
75
75
  - 🟢 ToggleGroup
@@ -23,6 +23,7 @@ export { default as TableRow } from './table-row.svelte';
23
23
  export { default as Table } from './table.svelte';
24
24
  export { default as Trigger } from './trigger.svelte';
25
25
  export { default as ViewControl } from './view-control.svelte';
26
+ export { default as ViewTrigger } from './view-trigger.svelte';
26
27
  export { default as View } from './view.svelte';
27
28
  export { default as YearSelect } from './year-select.svelte';
28
29
  export { default as YearTableCellTrigger } from './year-table-cell-trigger.svelte';
@@ -23,6 +23,7 @@ export { default as TableRow } from './table-row.svelte';
23
23
  export { default as Table } from './table.svelte';
24
24
  export { default as Trigger } from './trigger.svelte';
25
25
  export { default as ViewControl } from './view-control.svelte';
26
+ export { default as ViewTrigger } from './view-trigger.svelte';
26
27
  export { default as View } from './view.svelte';
27
28
  export { default as YearSelect } from './year-select.svelte';
28
29
  export { default as YearTableCellTrigger } from './year-table-cell-trigger.svelte';
@@ -22,6 +22,7 @@ export type { DatePickerTableRowProps } from './table-row.svelte';
22
22
  export type { DatePickerTableProps } from './table.svelte';
23
23
  export type { DatePickerTriggerProps } from './trigger.svelte';
24
24
  export type { DatePickerViewControlProps } from './view-control.svelte';
25
+ export type { DatePickerViewTriggerProps } from './view-trigger.svelte';
25
26
  export type { DatePickerViewProps } from './view.svelte';
26
27
  export type { DatePickerYearSelectProps } from './year-select.svelte';
27
28
  export type { DatePickerYearTableCellTriggerProps } from './year-table-cell-trigger.svelte';
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface DatePickerViewTriggerProps 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}: DatePickerViewTriggerProps = $props();
12
+
13
+ let datePicker = datePickerContext.get();
14
+ let viewProps = datePickerViewPropsContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, datePicker.getViewTriggerProps(viewProps)));
17
+ </script>
18
+
19
+ <button type="button" {...attrs}>
20
+ {@render children?.()}
21
+ </button>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const ViewTrigger: $$__sveltets_2_IsomorphicComponent<DatePickerViewTriggerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type ViewTrigger = InstanceType<typeof ViewTrigger>;
18
+ export default ViewTrigger;
package/dist/index.d.ts CHANGED
@@ -27,10 +27,12 @@ export * from './segment-group/index.js';
27
27
  export * from './select/index.js';
28
28
  export * from './signature-pad/index.js';
29
29
  export * from './slider/index.js';
30
+ export * from './splitter/index.js';
30
31
  export * from './steps/index.js';
31
32
  export * from './switch/index.js';
32
33
  export * from './tabs/index.js';
33
34
  export * from './tags-input/index.js';
35
+ export * from './time-picker/index.js';
34
36
  export * from './timer/index.js';
35
37
  export * from './toast/index.js';
36
38
  export * from './toggle-group/index.js';
package/dist/index.js CHANGED
@@ -27,10 +27,12 @@ export * from './segment-group/index.js';
27
27
  export * from './select/index.js';
28
28
  export * from './signature-pad/index.js';
29
29
  export * from './slider/index.js';
30
+ export * from './splitter/index.js';
30
31
  export * from './steps/index.js';
31
32
  export * from './switch/index.js';
32
33
  export * from './tabs/index.js';
33
34
  export * from './tags-input/index.js';
35
+ export * from './time-picker/index.js';
34
36
  export * from './timer/index.js';
35
37
  export * from './toast/index.js';
36
38
  export * from './toggle-group/index.js';
@@ -7,3 +7,4 @@ export type { ProgressRangeProps } from './range.svelte';
7
7
  export type { ProgressProps } from './root.svelte';
8
8
  export type { ProgressTrackProps } from './track.svelte';
9
9
  export type { ProgressValueTextProps } from './value-text.svelte';
10
+ export type { ProgressViewProps } from './view.svelte';
@@ -7,3 +7,4 @@ export { default as Range } from './range.svelte';
7
7
  export { default as Root } from './root.svelte';
8
8
  export { default as Track } from './track.svelte';
9
9
  export { default as ValueText } from './value-text.svelte';
10
+ export { default as View } from './view.svelte';
@@ -7,3 +7,4 @@ export { default as Range } from './range.svelte';
7
7
  export { default as Root } from './root.svelte';
8
8
  export { default as Track } from './track.svelte';
9
9
  export { default as ValueText } from './value-text.svelte';
10
+ export { default as View } from './view.svelte';
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {ViewProps} from '@zag-js/progress';
4
+
5
+ export interface ProgressViewProps extends Assign<HtmlProps<'div'>, ViewProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {progressContext} from './context.svelte.js';
11
+
12
+ let {state, children, ...props}: ProgressViewProps = $props();
13
+
14
+ let progress = progressContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, progress.getViewProps({state})));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const View: $$__sveltets_2_IsomorphicComponent<ProgressViewProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type View = InstanceType<typeof View>;
18
+ export default View;
@@ -8,13 +8,13 @@
8
8
  import {mergeProps} from '@zag-js/svelte';
9
9
  import {signaturePadContext} from './context.svelte.js';
10
10
 
11
- let {children,...props}: SignaturePadGuideProps = $props();
11
+ let {children, ...props}: SignaturePadGuideProps = $props();
12
12
 
13
13
  let signaturePad = signaturePadContext.get();
14
14
 
15
15
  let attrs = $derived(mergeProps(props, signaturePad.getGuideProps()));
16
16
  </script>
17
17
 
18
- <div {...attrs} >
18
+ <div {...attrs}>
19
19
  {@render children?.()}
20
20
  </div>
@@ -0,0 +1,3 @@
1
+ import { Context } from '../utils.svelte.js';
2
+ import type { CreateSplitterReturn } from './create-splitter.svelte.js';
3
+ export declare const splitterContext: Context<CreateSplitterReturn>;
@@ -0,0 +1,2 @@
1
+ import { Context } from '../utils.svelte.js';
2
+ export const splitterContext = new Context('Splitter');
@@ -0,0 +1,7 @@
1
+ import * as splitter from '@zag-js/splitter';
2
+ export interface CreateSplitterProps extends Omit<splitter.Context, 'id' | 'dir' | 'getRootNode'> {
3
+ id?: string | null;
4
+ }
5
+ export interface CreateSplitterReturn extends splitter.Api {
6
+ }
7
+ export declare function createSplitter(props: CreateSplitterProps): CreateSplitterReturn;
@@ -0,0 +1,17 @@
1
+ import { getEnvironmentContext } from '../environment-provider/context.svelte.js';
2
+ import { getLocaleContext } from '../locale-provider/context.svelte.js';
3
+ import { createUniqueId } from '../utils.svelte.js';
4
+ import * as splitter from '@zag-js/splitter';
5
+ import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
6
+ export function createSplitter(props) {
7
+ const locale = getLocaleContext();
8
+ const environment = getEnvironmentContext();
9
+ const [state, send] = useMachine(splitter.machine({
10
+ ...props,
11
+ id: props.id ?? createUniqueId(),
12
+ dir: locale?.dir,
13
+ getRootNode: environment?.getRootNode,
14
+ }));
15
+ const api = $derived(reflect(() => splitter.connect(state, send, normalizeProps)));
16
+ return api;
17
+ }
@@ -0,0 +1,4 @@
1
+ export * as Splitter from './splitter.js';
2
+ export type { SplitterPanelProps } from './panel.svelte';
3
+ export type { SplitterResizeTriggerProps } from './resize-trigger.svelte';
4
+ export type { SplitterProps } from './root.svelte';
@@ -0,0 +1 @@
1
+ export * as Splitter from './splitter.js';
@@ -0,0 +1,29 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {PanelProps} from '@zag-js/splitter';
4
+
5
+ export interface SplitterPanelProps extends Assign<HtmlProps<'div'>, PanelProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {splitterContext} from './context.svelte.js';
11
+
12
+ let {id, snapSize, children, ...props}: SplitterPanelProps = $props();
13
+
14
+ let splitter = splitterContext.get();
15
+
16
+ let attrs = $derived(
17
+ mergeProps(
18
+ props,
19
+ splitter.getPanelProps({
20
+ id,
21
+ snapSize,
22
+ }),
23
+ ),
24
+ );
25
+ </script>
26
+
27
+ <div {...attrs}>
28
+ {@render children?.()}
29
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Panel: $$__sveltets_2_IsomorphicComponent<SplitterPanelProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Panel = InstanceType<typeof Panel>;
18
+ export default Panel;
@@ -0,0 +1,41 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {ResizeTriggerProps} from '@zag-js/splitter';
4
+
5
+ /* Currently not exported in zag */
6
+ interface ResizeTriggerState {
7
+ min: number | undefined;
8
+ max: number | undefined;
9
+ value: number;
10
+ focused: boolean;
11
+ disabled: boolean;
12
+ panelIds: string[];
13
+ }
14
+
15
+ export interface SplitterResizeTriggerProps
16
+ extends Assign<Omit<HtmlProps<'div'>, 'children'>, ResizeTriggerProps> {
17
+ children?: Snippet<[state: ResizeTriggerState]>;
18
+ }
19
+ </script>
20
+
21
+ <script lang="ts">
22
+ import {mergeProps} from '@zag-js/svelte';
23
+ import type {Snippet} from 'svelte';
24
+ import {splitterContext} from './context.svelte.js';
25
+
26
+ let {id, step, disabled, children, ...props}: SplitterResizeTriggerProps = $props();
27
+
28
+ let splitter = splitterContext.get();
29
+ let resizeTriggerProps: ResizeTriggerProps = $derived({
30
+ id,
31
+ step,
32
+ disabled,
33
+ });
34
+
35
+ let attrs = $derived(mergeProps(props, splitter.getResizeTriggerProps(resizeTriggerProps)));
36
+ let state = $derived(splitter.getResizeTriggerState(resizeTriggerProps));
37
+ </script>
38
+
39
+ <div {...attrs}>
40
+ {@render children?.(state)}
41
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const ResizeTrigger: $$__sveltets_2_IsomorphicComponent<SplitterResizeTriggerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type ResizeTrigger = InstanceType<typeof ResizeTrigger>;
18
+ export default ResizeTrigger;
@@ -0,0 +1,44 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
4
+ import type {CreateSplitterProps, CreateSplitterReturn} from './create-splitter.svelte.js';
5
+
6
+ export interface SplitterProps
7
+ extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateSplitterProps> {
8
+ children?: Snippet<[splitter: CreateSplitterReturn]>;
9
+ }
10
+ </script>
11
+
12
+ <script lang="ts">
13
+ import {mergeProps} from '@zag-js/svelte';
14
+ import {splitterContext} from './context.svelte.js';
15
+ import {createSplitter} from './create-splitter.svelte.js';
16
+
17
+ let {
18
+ id,
19
+ ids,
20
+ size,
21
+ orientation,
22
+ onSizeChange,
23
+ onSizeChangeEnd,
24
+ children,
25
+ ...props
26
+ }: SplitterProps = $props();
27
+
28
+ let splitter = createSplitter({
29
+ id,
30
+ ids,
31
+ size,
32
+ orientation,
33
+ onSizeChange,
34
+ onSizeChangeEnd,
35
+ });
36
+
37
+ let attrs = $derived(mergeProps(props, splitter.getRootProps()));
38
+
39
+ splitterContext.set(splitter);
40
+ </script>
41
+
42
+ <div {...attrs}>
43
+ {@render children?.(splitter)}
44
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Root: $$__sveltets_2_IsomorphicComponent<SplitterProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Root = InstanceType<typeof Root>;
18
+ export default Root;
@@ -0,0 +1,4 @@
1
+ export { anatomy } from '@zag-js/splitter';
2
+ export { default as Panel } from './panel.svelte';
3
+ export { default as ResizeTrigger } from './resize-trigger.svelte';
4
+ export { default as Root } from './root.svelte';
@@ -0,0 +1,4 @@
1
+ export { anatomy } from '@zag-js/splitter';
2
+ export { default as Panel } from './panel.svelte';
3
+ export { default as ResizeTrigger } from './resize-trigger.svelte';
4
+ export { default as Root } from './root.svelte';
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerClearTriggerProps extends HtmlProps<'button'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerClearTriggerProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getClearTriggerProps()));
16
+ </script>
17
+
18
+ <button type="button" {...attrs}>
19
+ {@render children?.()}
20
+ </button>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const ClearTrigger: $$__sveltets_2_IsomorphicComponent<TimePickerClearTriggerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type ClearTrigger = InstanceType<typeof ClearTrigger>;
18
+ export default ClearTrigger;
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {ColumnProps} from '@zag-js/time-picker';
4
+
5
+ export interface TimePickerColumnProps extends Assign<HtmlProps<'div'>, ColumnProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {timePickerContext} from './context.svelte.js';
11
+
12
+ let {unit, children, ...props}: TimePickerColumnProps = $props();
13
+
14
+ let timePicker = timePickerContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, timePicker.getColumnProps({unit})));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Column: $$__sveltets_2_IsomorphicComponent<TimePickerColumnProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Column = InstanceType<typeof Column>;
18
+ export default Column;
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerContentProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerContentProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getContentProps()));
16
+ </script>
17
+
18
+ <div {...attrs}>
19
+ {@render children?.()}
20
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Content: $$__sveltets_2_IsomorphicComponent<TimePickerContentProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Content = InstanceType<typeof Content>;
18
+ export default Content;
@@ -0,0 +1,3 @@
1
+ import { Context } from '../utils.svelte.js';
2
+ import type { CreateTimePickerReturn } from './create-time-picker.svelte.js';
3
+ export declare const timePickerContext: Context<CreateTimePickerReturn>;
@@ -0,0 +1,2 @@
1
+ import { Context } from '../utils.svelte.js';
2
+ export const timePickerContext = new Context('TimePicker');
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerControlProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerControlProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getControlProps()));
16
+ </script>
17
+
18
+ <div {...attrs}>
19
+ {@render children?.()}
20
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Control: $$__sveltets_2_IsomorphicComponent<TimePickerControlProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Control = InstanceType<typeof Control>;
18
+ export default Control;
@@ -0,0 +1,8 @@
1
+ import * as timePicker from '@zag-js/time-picker';
2
+ export interface CreateTimePickerProps extends Omit<timePicker.Context, 'id' | 'dir' | 'getRootNode' | 'open.controlled'> {
3
+ id?: string | null;
4
+ defaultOpen?: boolean;
5
+ }
6
+ export interface CreateTimePickerReturn extends timePicker.Api {
7
+ }
8
+ export declare function createTimePicker(props: CreateTimePickerProps): CreateTimePickerReturn;
@@ -0,0 +1,20 @@
1
+ import { getEnvironmentContext } from '../environment-provider/context.svelte.js';
2
+ import { getLocaleContext } from '../locale-provider/context.svelte.js';
3
+ import { createUniqueId } from '../utils.svelte.js';
4
+ import { normalizeProps, reflect, useMachine } from '@zag-js/svelte';
5
+ import * as timePicker from '@zag-js/time-picker';
6
+ export function createTimePicker(props) {
7
+ const locale = getLocaleContext();
8
+ const environment = getEnvironmentContext();
9
+ const [state, send] = useMachine(timePicker.machine({
10
+ ...props,
11
+ id: props.id ?? createUniqueId(),
12
+ dir: locale?.dir,
13
+ open: props.defaultOpen,
14
+ locale: props.locale ?? locale?.locale,
15
+ getRootNode: environment?.getRootNode,
16
+ 'open.controlled': props.defaultOpen != null,
17
+ }));
18
+ const api = $derived(reflect(() => timePicker.connect(state, send, normalizeProps)));
19
+ return api;
20
+ }
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {CellProps} from '@zag-js/time-picker';
4
+
5
+ export interface TimePickerHourCellProps extends Assign<HtmlProps<'div'>, CellProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {timePickerContext} from './context.svelte.js';
11
+
12
+ let {value, children, ...props}: TimePickerHourCellProps = $props();
13
+
14
+ let timePicker = timePickerContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, timePicker.getHourCellProps({value})));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const HourCell: $$__sveltets_2_IsomorphicComponent<TimePickerHourCellProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type HourCell = InstanceType<typeof HourCell>;
18
+ export default HourCell;
@@ -0,0 +1,15 @@
1
+ export * as TimePicker from './time-picker.js';
2
+ export type { TimePickerClearTriggerProps } from './clear-trigger.svelte';
3
+ export type { TimePickerColumnProps } from './column.svelte';
4
+ export type { TimePickerContentProps } from './content.svelte';
5
+ export type { TimePickerControlProps } from './control.svelte';
6
+ export type { TimePickerHourCellProps } from './hour-cell.svelte';
7
+ export type { TimePickerInputProps } from './input.svelte';
8
+ export type { TimePickerLabelProps } from './label.svelte';
9
+ export type { TimePickerMinuteCellProps } from './minute-cell.svelte';
10
+ export type { TimePickerPeriodCellProps } from './period-cell.svelte';
11
+ export type { TimePickerPositionerProps } from './positioner.svelte';
12
+ export type { TimePickerProps } from './root.svelte';
13
+ export type { TimePickerSecondCellProps } from './second-cell.svelte';
14
+ export type { TimePickerSpacerProps } from './spacer.svelte';
15
+ export type { TimePickerTriggerProps } from './trigger.svelte';
@@ -0,0 +1 @@
1
+ export * as TimePicker from './time-picker.js';
@@ -0,0 +1,18 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerInputProps extends HtmlProps<'input'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerInputProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getInputProps()));
16
+ </script>
17
+
18
+ <input {...attrs} />
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Input: $$__sveltets_2_IsomorphicComponent<TimePickerInputProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Input = InstanceType<typeof Input>;
18
+ export default Input;
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerLabelProps extends HtmlProps<'label'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerLabelProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getLabelProps()));
16
+ </script>
17
+
18
+ <label {...attrs}>
19
+ {@render children?.()}
20
+ </label>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Label: $$__sveltets_2_IsomorphicComponent<TimePickerLabelProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Label = InstanceType<typeof Label>;
18
+ export default Label;
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {CellProps} from '@zag-js/time-picker';
4
+
5
+ export interface TimePickerMinuteCellProps extends Assign<HtmlProps<'div'>, CellProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {timePickerContext} from './context.svelte.js';
11
+
12
+ let {value, children, ...props}: TimePickerMinuteCellProps = $props();
13
+
14
+ let timePicker = timePickerContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, timePicker.getMinuteCellProps({value})));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const MinuteCell: $$__sveltets_2_IsomorphicComponent<TimePickerMinuteCellProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type MinuteCell = InstanceType<typeof MinuteCell>;
18
+ export default MinuteCell;
@@ -0,0 +1,28 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {PeriodCellProps} from '@zag-js/time-picker';
4
+
5
+ export interface TimePickerPeriodCellProps extends Assign<HtmlProps<'div'>, PeriodCellProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {timePickerContext} from './context.svelte.js';
11
+
12
+ let {value, children, ...props}: TimePickerPeriodCellProps = $props();
13
+
14
+ let timePicker = timePickerContext.get();
15
+
16
+ let attrs = $derived(
17
+ mergeProps(
18
+ props,
19
+ timePicker.getPeriodCellProps({
20
+ value,
21
+ }),
22
+ ),
23
+ );
24
+ </script>
25
+
26
+ <div {...attrs}>
27
+ {@render children?.()}
28
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const PeriodCell: $$__sveltets_2_IsomorphicComponent<TimePickerPeriodCellProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type PeriodCell = InstanceType<typeof PeriodCell>;
18
+ export default PeriodCell;
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerPositionerProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerPositionerProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getPositionerProps()));
16
+ </script>
17
+
18
+ <div {...attrs}>
19
+ {@render children?.()}
20
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Positioner: $$__sveltets_2_IsomorphicComponent<TimePickerPositionerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Positioner = InstanceType<typeof Positioner>;
18
+ export default Positioner;
@@ -0,0 +1,70 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {Snippet} from 'svelte';
4
+ import type {CreateTimePickerProps, CreateTimePickerReturn} from './create-time-picker.svelte.js';
5
+
6
+ export interface TimePickerProps
7
+ extends Assign<Omit<HtmlProps<'div'>, 'children'>, CreateTimePickerProps> {
8
+ children?: Snippet<[timePicker: CreateTimePickerReturn]>;
9
+ }
10
+ </script>
11
+
12
+ <script lang="ts">
13
+ import {mergeProps} from '@zag-js/svelte';
14
+ import {timePickerContext} from './context.svelte.js';
15
+ import {createTimePicker} from './create-time-picker.svelte.js';
16
+
17
+ let {
18
+ id,
19
+ ids,
20
+ min,
21
+ max,
22
+ name,
23
+ open,
24
+ steps,
25
+ value,
26
+ locale,
27
+ readOnly,
28
+ disabled,
29
+ defaultOpen,
30
+ placeholder,
31
+ positioning,
32
+ allowSeconds,
33
+ disableLayer,
34
+ onOpenChange,
35
+ onValueChange,
36
+ onFocusChange,
37
+ children,
38
+ ...props
39
+ }: TimePickerProps = $props();
40
+
41
+ let timePicker = createTimePicker({
42
+ id,
43
+ ids,
44
+ min,
45
+ max,
46
+ name,
47
+ open,
48
+ steps,
49
+ value,
50
+ locale,
51
+ readOnly,
52
+ disabled,
53
+ defaultOpen,
54
+ placeholder,
55
+ positioning,
56
+ allowSeconds,
57
+ disableLayer,
58
+ onOpenChange,
59
+ onValueChange,
60
+ onFocusChange,
61
+ });
62
+
63
+ let attrs = $derived(mergeProps(props, timePicker.getRootProps()));
64
+
65
+ timePickerContext.set(timePicker);
66
+ </script>
67
+
68
+ <div {...attrs}>
69
+ {@render children?.(timePicker)}
70
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Root: $$__sveltets_2_IsomorphicComponent<TimePickerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Root = InstanceType<typeof Root>;
18
+ export default Root;
@@ -0,0 +1,21 @@
1
+ <script lang="ts" module>
2
+ import type {Assign, HtmlProps} from '../types.js';
3
+ import type {CellProps} from '@zag-js/time-picker';
4
+
5
+ export interface TimePickerSecondCellProps extends Assign<HtmlProps<'div'>, CellProps> {}
6
+ </script>
7
+
8
+ <script lang="ts">
9
+ import {mergeProps} from '@zag-js/svelte';
10
+ import {timePickerContext} from './context.svelte.js';
11
+
12
+ let {value, children, ...props}: TimePickerSecondCellProps = $props();
13
+
14
+ let timePicker = timePickerContext.get();
15
+
16
+ let attrs = $derived(mergeProps(props, timePicker.getSecondCellProps({value})));
17
+ </script>
18
+
19
+ <div {...attrs}>
20
+ {@render children?.()}
21
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const SecondCell: $$__sveltets_2_IsomorphicComponent<TimePickerSecondCellProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type SecondCell = InstanceType<typeof SecondCell>;
18
+ export default SecondCell;
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerSpacerProps extends HtmlProps<'div'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerSpacerProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getSpacerProps()));
16
+ </script>
17
+
18
+ <div {...attrs}>
19
+ {@render children?.()}
20
+ </div>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Spacer: $$__sveltets_2_IsomorphicComponent<TimePickerSpacerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Spacer = InstanceType<typeof Spacer>;
18
+ export default Spacer;
@@ -0,0 +1,15 @@
1
+ export { anatomy, parse } from '@zag-js/time-picker';
2
+ export { default as ClearTrigger } from './clear-trigger.svelte';
3
+ export { default as Column } from './column.svelte';
4
+ export { default as Content } from './content.svelte';
5
+ export { default as Control } from './control.svelte';
6
+ export { default as HourCell } from './hour-cell.svelte';
7
+ export { default as Input } from './input.svelte';
8
+ export { default as Label } from './label.svelte';
9
+ export { default as MinuteCell } from './minute-cell.svelte';
10
+ export { default as PeriodCell } from './period-cell.svelte';
11
+ export { default as Positioner } from './positioner.svelte';
12
+ export { default as Root } from './root.svelte';
13
+ export { default as SecondCell } from './second-cell.svelte';
14
+ export { default as Spacer } from './spacer.svelte';
15
+ export { default as Trigger } from './trigger.svelte';
@@ -0,0 +1,15 @@
1
+ export { anatomy, parse } from '@zag-js/time-picker';
2
+ export { default as ClearTrigger } from './clear-trigger.svelte';
3
+ export { default as Column } from './column.svelte';
4
+ export { default as Content } from './content.svelte';
5
+ export { default as Control } from './control.svelte';
6
+ export { default as HourCell } from './hour-cell.svelte';
7
+ export { default as Input } from './input.svelte';
8
+ export { default as Label } from './label.svelte';
9
+ export { default as MinuteCell } from './minute-cell.svelte';
10
+ export { default as PeriodCell } from './period-cell.svelte';
11
+ export { default as Positioner } from './positioner.svelte';
12
+ export { default as Root } from './root.svelte';
13
+ export { default as SecondCell } from './second-cell.svelte';
14
+ export { default as Spacer } from './spacer.svelte';
15
+ export { default as Trigger } from './trigger.svelte';
@@ -0,0 +1,20 @@
1
+ <script lang="ts" module>
2
+ import type {HtmlProps} from '../types.js';
3
+
4
+ export interface TimePickerTriggerProps extends HtmlProps<'button'> {}
5
+ </script>
6
+
7
+ <script lang="ts">
8
+ import {mergeProps} from '@zag-js/svelte';
9
+ import {timePickerContext} from './context.svelte.js';
10
+
11
+ let {children, ...props}: TimePickerTriggerProps = $props();
12
+
13
+ let timePicker = timePickerContext.get();
14
+
15
+ let attrs = $derived(mergeProps(props, timePicker.getTriggerProps()));
16
+ </script>
17
+
18
+ <button type="button" {...attrs}>
19
+ {@render children?.()}
20
+ </button>
@@ -0,0 +1,18 @@
1
+ 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> {
2
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
3
+ $$bindings?: Bindings;
4
+ } & Exports;
5
+ (internal: unknown, props: Props & {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Trigger: $$__sveltets_2_IsomorphicComponent<TimePickerTriggerProps, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, "">;
17
+ type Trigger = InstanceType<typeof Trigger>;
18
+ export default Trigger;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui-ingredients",
3
3
  "type": "module",
4
- "version": "0.0.24",
4
+ "version": "0.0.25",
5
5
  "packageManager": "pnpm@9.7.0",
6
6
  "svelte": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
File without changes