ui-ingredients 0.0.61 → 0.0.62

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,4 @@
1
+ import type { HTMLAttributes, HTMLInputAttributes, HTMLLabelAttributes, HTMLSelectAttributes, HTMLTextareaAttributes } from 'svelte/elements';
1
2
  interface ElementIds {
2
3
  root?: string;
3
4
  label?: string;
@@ -13,7 +14,20 @@ export interface CreateFieldProps {
13
14
  disabled?: boolean;
14
15
  readOnly?: boolean;
15
16
  }
16
- export interface CreateFieldReturn extends ReturnType<typeof createField> {
17
+ export interface CreateFieldReturn {
18
+ ids: ElementIds;
19
+ disabled: boolean;
20
+ required: boolean;
21
+ readOnly: boolean;
22
+ invalid: boolean;
23
+ 'aria-describedby': string;
24
+ getRootProps: () => HTMLAttributes<HTMLElement>;
25
+ getLabelProps: () => HTMLLabelAttributes;
26
+ getErrorTextProps: () => HTMLAttributes<HTMLElement>;
27
+ getHelperTextProps: () => HTMLAttributes<HTMLElement>;
28
+ getInputProps: () => HTMLInputAttributes;
29
+ getSelectProps: () => HTMLSelectAttributes;
30
+ getTextareaProps: () => HTMLTextareaAttributes;
17
31
  }
18
- export declare function createField(props: CreateFieldProps): any;
32
+ export declare function createField(props: CreateFieldProps): CreateFieldReturn;
19
33
  export {};
@@ -9,10 +9,9 @@ export interface PresenceStrategyProps {
9
9
  export interface CreatePresenceProps extends PresenceStrategyProps {
10
10
  present: boolean;
11
11
  }
12
- export interface CreatePresenceReturn extends ReturnType<typeof createPresence> {
13
- }
14
- export declare function createPresence(props: CreatePresenceProps): {
15
- ref: Action<HTMLElement, undefined, Record<never, any>>;
12
+ export interface CreatePresenceReturn {
13
+ ref: Action;
16
14
  getPresenceProps: () => HTMLAttributes<HTMLElement>;
17
- readonly mounted: boolean;
18
- };
15
+ mounted: boolean;
16
+ }
17
+ export declare function createPresence(props: CreatePresenceProps): CreatePresenceReturn;
@@ -6,5 +6,5 @@ export interface CreateSelectProps<T> extends select.CollectionOptions<T>, Omit<
6
6
  }
7
7
  export interface CreateSelectReturn extends select.Api {
8
8
  }
9
- export declare function createSelect<T>(props: CreateSelectProps<T>): any;
9
+ export declare function createSelect<T>(props: CreateSelectProps<T>): CreateSelectReturn;
10
10
  export {};
@@ -4,4 +4,4 @@ export interface CreateStepsProps extends Omit<steps.Context, 'id' | 'dir' | 'ge
4
4
  }
5
5
  export interface CreateStepsReturn extends steps.Api {
6
6
  }
7
- export declare function createSteps(props: CreateStepsProps): any;
7
+ export declare function createSteps(props: CreateStepsProps): CreateStepsReturn;
@@ -4,4 +4,4 @@ export interface CreateSwitchProps extends Omit<switch_.Context, 'id' | 'dir' |
4
4
  }
5
5
  export interface CreateSwitchReturn extends switch_.Api {
6
6
  }
7
- export declare function createSwitch(props: CreateSwitchProps): any;
7
+ export declare function createSwitch(props: CreateSwitchProps): CreateSwitchReturn;
@@ -4,4 +4,4 @@ export interface CreateTabsProps extends Omit<tabs.Context, 'id' | 'dir' | 'getR
4
4
  }
5
5
  export interface CreateTabsReturn extends tabs.Api {
6
6
  }
7
- export declare function createTabs(props: CreateTabsProps): any;
7
+ export declare function createTabs(props: CreateTabsProps): CreateTabsReturn;
@@ -4,4 +4,4 @@ export interface CreateTagsInputProps extends Omit<tagsInput.Context, 'id' | 'di
4
4
  }
5
5
  export interface CreateTagsInputReturn extends tagsInput.Api {
6
6
  }
7
- export declare function createTagsInput(props: CreateTagsInputProps): any;
7
+ export declare function createTagsInput(props: CreateTagsInputProps): CreateTagsInputReturn;
@@ -3,4 +3,4 @@ export interface CreateToastProps extends toast.Service {
3
3
  }
4
4
  export interface CreateToastReturn extends toast.Api {
5
5
  }
6
- export declare function createToast(props: CreateToastProps): any;
6
+ export declare function createToast(props: CreateToastProps): CreateToastReturn;
@@ -12,9 +12,11 @@ export interface CreateToasterProps {
12
12
  removeDelay?: toast.GroupMachineContext['removeDelay'];
13
13
  pauseOnPageIdle?: toast.GroupMachineContext['pauseOnPageIdle'];
14
14
  }
15
+ type ToasterMachine = Machine<toast.GroupMachineContext<any>, {
16
+ value: 'stack' | 'overlap';
17
+ }, StateMachine.AnyEventObject>;
15
18
  export interface CreateToasterReturn extends toast.GroupApi {
16
- machine: Machine<toast.GroupMachineContext<any>, {
17
- value: 'stack' | 'overlap';
18
- }, StateMachine.AnyEventObject>;
19
+ machine: ToasterMachine;
19
20
  }
20
- export declare function createToaster(props?: CreateToasterProps): any;
21
+ export declare function createToaster(props?: CreateToasterProps): CreateToasterReturn;
22
+ export {};
@@ -5,4 +5,4 @@ export interface CreateTooltipProps extends Omit<tooltip.Context, 'id' | 'dir' |
5
5
  }
6
6
  export interface CreateTooltipReturn extends tooltip.Api {
7
7
  }
8
- export declare function createTooltip(props: CreateTooltipProps): any;
8
+ export declare function createTooltip(props: CreateTooltipProps): CreateTooltipReturn;
@@ -4,4 +4,4 @@ export interface CreateTreeViewProps extends Omit<treeView.Context, 'id' | 'dir'
4
4
  }
5
5
  export interface CreateTreeViewReturn extends treeView.Api {
6
6
  }
7
- export declare function createTreeView(props: CreateTreeViewProps): any;
7
+ export declare function createTreeView(props: CreateTreeViewProps): CreateTreeViewReturn;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ui-ingredients",
3
3
  "type": "module",
4
- "version": "0.0.61",
4
+ "version": "0.0.62",
5
5
  "packageManager": "pnpm@9.7.0",
6
6
  "svelte": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",