@dropins/tools 0.28.0-alpha1 → 0.28.0-alpha3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/initializer.js +2 -2
- package/chunks/vcomponent.js +12 -12
- package/components.js +1 -1
- package/initializer.js +2 -2
- package/lib.js +1 -1
- package/package.json +1 -1
- package/types/elsie/src/components/Header/Header.d.ts +11 -0
- package/types/elsie/src/components/Header/index.d.ts +3 -0
- package/types/elsie/src/components/InputPassword/InputPassword.d.ts +2 -0
- package/types/elsie/src/components/Picker/Picker.d.ts +4 -2
- package/types/elsie/src/components/Tag/Tag.d.ts +8 -0
- package/types/elsie/src/components/Tag/index.d.ts +3 -0
- package/types/elsie/src/components/index.d.ts +2 -1
- package/types/elsie/src/i18n/en_US.json.d.ts +5 -1
- package/types/elsie/src/i18n/index.d.ts +12 -0
- package/types/elsie/src/lib/render.d.ts +9 -5
- package/types/elsie/src/lib/slot.d.ts +4 -3
- package/types/elsie/src/components/PriceSummary/PriceSummary.d.ts +0 -49
- package/types/elsie/src/components/PriceSummary/index.d.ts +0 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject, VNode } from 'preact';
|
|
1
|
+
import { ComponentChildren, RefObject, VNode } from 'preact';
|
|
2
2
|
import { StateUpdater } from 'preact/hooks';
|
|
3
3
|
import { Lang } from '../i18n';
|
|
4
4
|
import { HTMLAttributes } from 'preact/compat';
|
|
@@ -27,18 +27,19 @@ interface DefaultSlotContext<T> extends PrivateContext<T> {
|
|
|
27
27
|
prependChild: MutateElement;
|
|
28
28
|
appendSibling: MutateElement;
|
|
29
29
|
prependSibling: MutateElement;
|
|
30
|
+
onRender: (cb: (next: T & DefaultSlotContext<T>) => void) => void;
|
|
30
31
|
onChange: (cb: (next: T & DefaultSlotContext<T>) => void) => void;
|
|
31
32
|
}
|
|
32
33
|
type Context<T> = T & ThisType<DefaultSlotContext<T>>;
|
|
33
34
|
export type SlotProps<T = any> = (ctx: T & DefaultSlotContext<T>, element: HTMLDivElement | null) => Promise<void> | void;
|
|
34
35
|
export type SlotMethod<P = any> = (callback: (next: unknown, state: State) => P) => void;
|
|
35
|
-
export declare function useSlot<K, V extends HTMLDivElement>(context?: Context<K>, callback?: SlotProps<K>, render?: Function): [RefObject<V>, Record<string, any>];
|
|
36
|
+
export declare function useSlot<K, V extends HTMLDivElement>(name: string, context?: Context<K>, callback?: SlotProps<K>, children?: ComponentChildren, render?: Function): [RefObject<V>, Record<string, any>];
|
|
36
37
|
interface SlotPropsComponent<T> extends Omit<HTMLAttributes<HTMLDivElement>, 'slot'> {
|
|
37
38
|
name: string;
|
|
38
39
|
slot?: SlotProps<T>;
|
|
39
40
|
context?: Context<T>;
|
|
40
41
|
render?: (props: Record<string, any>) => VNode | VNode[];
|
|
41
42
|
}
|
|
42
|
-
export declare function Slot<T>({ name,
|
|
43
|
+
export declare function Slot<T>({ name, context, slot, children, render, ...props }: Readonly<SlotPropsComponent<T>>): import("preact").JSX.Element;
|
|
43
44
|
export {};
|
|
44
45
|
//# sourceMappingURL=slot.d.ts.map
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, VNode } from 'preact';
|
|
2
|
-
import { HTMLAttributes } from 'preact/compat';
|
|
3
|
-
|
|
4
|
-
export interface PriceSummaryProps extends Omit<HTMLAttributes<HTMLDivElement>, 'loading'> {
|
|
5
|
-
heading: string;
|
|
6
|
-
loading?: boolean;
|
|
7
|
-
total?: {
|
|
8
|
-
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
9
|
-
estimated?: boolean;
|
|
10
|
-
priceWithoutTax?: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
11
|
-
};
|
|
12
|
-
subTotal?: {
|
|
13
|
-
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
14
|
-
priceExcludingTax?: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
15
|
-
taxIncluded?: boolean;
|
|
16
|
-
taxExcluded?: boolean;
|
|
17
|
-
zeroTaxSubtotal?: boolean;
|
|
18
|
-
};
|
|
19
|
-
shipping?: {
|
|
20
|
-
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
21
|
-
estimated?: boolean;
|
|
22
|
-
taxIncluded?: boolean;
|
|
23
|
-
taxExcluded?: boolean;
|
|
24
|
-
priceIncludingTax?: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
25
|
-
priceExcludingTax?: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
26
|
-
countryField?: VNode<HTMLAttributes<HTMLInputElement>>;
|
|
27
|
-
stateField?: VNode<HTMLAttributes<HTMLInputElement>>;
|
|
28
|
-
zipField?: VNode<HTMLAttributes<HTMLInputElement>>;
|
|
29
|
-
destinationText?: string;
|
|
30
|
-
onEstimate?: (formData: any) => void;
|
|
31
|
-
estimateButton?: VNode<HTMLAttributes<HTMLButtonElement>>;
|
|
32
|
-
};
|
|
33
|
-
taxTotal?: {
|
|
34
|
-
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
35
|
-
estimated?: boolean;
|
|
36
|
-
};
|
|
37
|
-
taxesApplied?: {
|
|
38
|
-
label: string;
|
|
39
|
-
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
40
|
-
}[];
|
|
41
|
-
discounts?: {
|
|
42
|
-
label: string;
|
|
43
|
-
price: VNode<HTMLAttributes<HTMLSpanElement>>;
|
|
44
|
-
caption?: VNode<HTMLAttributes<HTMLDivElement>>;
|
|
45
|
-
}[];
|
|
46
|
-
primaryAction?: VNode<HTMLAttributes<HTMLButtonElement>>;
|
|
47
|
-
}
|
|
48
|
-
export declare const PriceSummary: FunctionComponent<PriceSummaryProps>;
|
|
49
|
-
//# sourceMappingURL=PriceSummary.d.ts.map
|