@knocklabs/react 0.2.27 → 0.3.0-rc.0
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/CHANGELOG.md +20 -0
- package/dist/cjs/index.css +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/modules/in-app-messages/components/Banner/Banner.js +2 -0
- package/dist/cjs/modules/in-app-messages/components/Banner/Banner.js.map +1 -0
- package/dist/cjs/modules/in-app-messages/components/Card/Card.js +2 -0
- package/dist/cjs/modules/in-app-messages/components/Card/Card.js.map +1 -0
- package/dist/cjs/modules/in-app-messages/components/Modal/Modal.js +2 -0
- package/dist/cjs/modules/in-app-messages/components/Modal/Modal.js.map +1 -0
- package/dist/cjs/modules/slack/components/SlackAuthButton/SlackAuthButton.js +1 -1
- package/dist/cjs/modules/slack/components/SlackAuthButton/SlackAuthButton.js.map +1 -1
- package/dist/esm/index.mjs +45 -36
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/modules/in-app-messages/components/Banner/Banner.mjs +97 -0
- package/dist/esm/modules/in-app-messages/components/Banner/Banner.mjs.map +1 -0
- package/dist/esm/modules/in-app-messages/components/Card/Card.mjs +109 -0
- package/dist/esm/modules/in-app-messages/components/Card/Card.mjs.map +1 -0
- package/dist/esm/modules/in-app-messages/components/Modal/Modal.mjs +113 -0
- package/dist/esm/modules/in-app-messages/components/Modal/Modal.mjs.map +1 -0
- package/dist/esm/modules/slack/components/SlackAuthButton/SlackAuthButton.mjs +23 -22
- package/dist/esm/modules/slack/components/SlackAuthButton/SlackAuthButton.mjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/modules/in-app-messages/components/Banner/Banner.d.ts +52 -0
- package/dist/types/modules/in-app-messages/components/Banner/Banner.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/Banner/index.d.ts +2 -0
- package/dist/types/modules/in-app-messages/components/Banner/index.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/Card/Card.d.ts +57 -0
- package/dist/types/modules/in-app-messages/components/Card/Card.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/Card/index.d.ts +2 -0
- package/dist/types/modules/in-app-messages/components/Card/index.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/Modal/Modal.d.ts +70 -0
- package/dist/types/modules/in-app-messages/components/Modal/Modal.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/Modal/index.d.ts +2 -0
- package/dist/types/modules/in-app-messages/components/Modal/index.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/index.d.ts +4 -0
- package/dist/types/modules/in-app-messages/components/index.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/components/types.d.ts +5 -0
- package/dist/types/modules/in-app-messages/components/types.d.ts.map +1 -0
- package/dist/types/modules/in-app-messages/index.d.ts +2 -0
- package/dist/types/modules/in-app-messages/index.d.ts.map +1 -0
- package/dist/types/modules/slack/components/SlackAuthButton/SlackAuthButton.d.ts +1 -0
- package/dist/types/modules/slack/components/SlackAuthButton/SlackAuthButton.d.ts.map +1 -1
- package/package.json +11 -7
@@ -0,0 +1,52 @@
|
|
1
|
+
import { ColorMode, UseInAppMessageOptions } from '@knocklabs/react-core';
|
2
|
+
import { default as React } from 'react';
|
3
|
+
import { ActionContent } from '../types';
|
4
|
+
|
5
|
+
export interface BannerProps {
|
6
|
+
filters?: UseInAppMessageOptions;
|
7
|
+
}
|
8
|
+
export interface BannerContent {
|
9
|
+
title: string;
|
10
|
+
body: string;
|
11
|
+
primary_button?: {
|
12
|
+
text: string;
|
13
|
+
action: string;
|
14
|
+
};
|
15
|
+
secondary_button?: {
|
16
|
+
text: string;
|
17
|
+
action: string;
|
18
|
+
};
|
19
|
+
dismissible?: boolean;
|
20
|
+
}
|
21
|
+
declare const Root: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
22
|
+
declare const Content: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
23
|
+
declare const Title: React.FC<{
|
24
|
+
title: string;
|
25
|
+
} & React.ComponentPropsWithRef<"div">>;
|
26
|
+
declare const Body: React.FC<{
|
27
|
+
body: string;
|
28
|
+
} & React.ComponentPropsWithRef<"div">>;
|
29
|
+
declare const Actions: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
30
|
+
declare const PrimaryAction: React.FC<ActionContent & React.ComponentPropsWithRef<"a">>;
|
31
|
+
declare const SecondaryAction: React.FC<ActionContent & React.ComponentPropsWithRef<"a">>;
|
32
|
+
declare const DismissButton: React.FC<React.ComponentPropsWithRef<"button">>;
|
33
|
+
declare const DefaultView: React.FC<{
|
34
|
+
content: BannerContent;
|
35
|
+
colorMode?: ColorMode;
|
36
|
+
onInteract?: () => void;
|
37
|
+
onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
|
38
|
+
}>;
|
39
|
+
declare const Banner: React.FC<BannerProps>;
|
40
|
+
declare const BannerView: {
|
41
|
+
Default: typeof DefaultView;
|
42
|
+
Root: typeof Root;
|
43
|
+
Content: typeof Content;
|
44
|
+
Title: typeof Title;
|
45
|
+
Body: typeof Body;
|
46
|
+
Actions: typeof Actions;
|
47
|
+
PrimaryAction: typeof PrimaryAction;
|
48
|
+
SecondaryAction: typeof SecondaryAction;
|
49
|
+
DismissButton: typeof DismissButton;
|
50
|
+
};
|
51
|
+
export { Banner, BannerView };
|
52
|
+
//# sourceMappingURL=Banner.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Banner.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/in-app-messages/components/Banner/Banner.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,sBAAsB,EAGvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CA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D,CAAC;AAGF,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAC7B,aAAa,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAcjD,CAAC;AAGF,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAmBlE,CAAC;AAGF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,aAAa,CAAC;IACvB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACxD,CA0BA,CAAC;AAGF,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkCjC,CAAC;AAGF,QAAA,MAAM,UAAU,EAAS;IACvB,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,aAAa,EAAE,OAAO,aAAa,CAAC;CACrC,CAAC;AAcF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/in-app-messages/components/Banner/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
import { ColorMode, UseInAppMessageOptions } from '@knocklabs/react-core';
|
2
|
+
import { default as React } from 'react';
|
3
|
+
import { ActionContent } from '../types';
|
4
|
+
|
5
|
+
export interface CardProps {
|
6
|
+
filters?: UseInAppMessageOptions;
|
7
|
+
}
|
8
|
+
export interface CardContent {
|
9
|
+
headline: string;
|
10
|
+
title: string;
|
11
|
+
body: string;
|
12
|
+
primary_button?: {
|
13
|
+
text: string;
|
14
|
+
action: string;
|
15
|
+
};
|
16
|
+
secondary_button?: {
|
17
|
+
text: string;
|
18
|
+
action: string;
|
19
|
+
};
|
20
|
+
dismissible?: boolean;
|
21
|
+
}
|
22
|
+
declare const Root: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
23
|
+
declare const Content: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
24
|
+
declare const Headline: React.FC<{
|
25
|
+
headline: string;
|
26
|
+
} & React.ComponentPropsWithRef<"div">>;
|
27
|
+
declare const Title: React.FC<{
|
28
|
+
title: string;
|
29
|
+
} & React.ComponentPropsWithRef<"div">>;
|
30
|
+
declare const Body: React.FC<{
|
31
|
+
body: string;
|
32
|
+
} & React.ComponentPropsWithRef<"div">>;
|
33
|
+
declare const Actions: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
34
|
+
declare const PrimaryAction: React.FC<ActionContent & React.ComponentPropsWithRef<"a">>;
|
35
|
+
declare const SecondaryAction: React.FC<ActionContent & React.ComponentPropsWithRef<"a">>;
|
36
|
+
declare const DismissButton: React.FC<React.ComponentPropsWithRef<"button">>;
|
37
|
+
declare const DefaultView: React.FC<{
|
38
|
+
content: CardContent;
|
39
|
+
colorMode?: ColorMode;
|
40
|
+
onInteract?: () => void;
|
41
|
+
onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
|
42
|
+
}>;
|
43
|
+
declare const Card: React.FC<CardProps>;
|
44
|
+
declare const CardView: {
|
45
|
+
Default: typeof DefaultView;
|
46
|
+
Root: typeof Root;
|
47
|
+
Content: typeof Content;
|
48
|
+
Headline: typeof Headline;
|
49
|
+
Title: typeof Title;
|
50
|
+
Body: typeof Body;
|
51
|
+
Actions: typeof Actions;
|
52
|
+
PrimaryAction: typeof PrimaryAction;
|
53
|
+
SecondaryAction: typeof SecondaryAction;
|
54
|
+
DismissButton: typeof DismissButton;
|
55
|
+
};
|
56
|
+
export { Card, CardView };
|
57
|
+
//# sourceMappingURL=Card.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/in-app-messages/components/Card/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,sBAAsB,EAGvB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,cAAc,CAAC;AAItB,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAClB,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAO5D,CAAC;AAGF,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CACrB,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAO5D,CAAC;AAcF,QAAA,MAAM,QAAQ,EAAE,KAAK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AA,MAAM,QAAQ,EAAS;IACrB,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,QAAQ,CAAC;IAC1B,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,aAAa,EAAE,OAAO,aAAa,CAAC;CACrC,CAAC;AAcF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/in-app-messages/components/Card/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
@@ -0,0 +1,70 @@
|
|
1
|
+
import { ColorMode, UseInAppMessageOptions } from '@knocklabs/react-core';
|
2
|
+
import { default as React } from 'react';
|
3
|
+
import { ActionContent } from '../types';
|
4
|
+
|
5
|
+
import * as Dialog from "@radix-ui/react-dialog";
|
6
|
+
export interface ModalProps {
|
7
|
+
filters?: UseInAppMessageOptions;
|
8
|
+
}
|
9
|
+
export interface ModalContent {
|
10
|
+
title: string;
|
11
|
+
body: string;
|
12
|
+
primary_button?: {
|
13
|
+
text: string;
|
14
|
+
action: string;
|
15
|
+
};
|
16
|
+
secondary_button?: {
|
17
|
+
text: string;
|
18
|
+
action: string;
|
19
|
+
};
|
20
|
+
dismissible?: boolean;
|
21
|
+
}
|
22
|
+
type RootProps = Omit<React.ComponentPropsWithoutRef<typeof Dialog.Root>, "modal"> & React.PropsWithChildren<React.ComponentPropsWithRef<"div">>;
|
23
|
+
declare const Root: {
|
24
|
+
({ children, onOpenChange, ...props }: RootProps): import("react/jsx-runtime").JSX.Element;
|
25
|
+
displayName: string;
|
26
|
+
};
|
27
|
+
type OverlayProps = React.ComponentPropsWithoutRef<typeof Dialog.Overlay> & React.ComponentPropsWithRef<"div">;
|
28
|
+
declare const Overlay: React.ForwardRefExoticComponent<Omit<OverlayProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
29
|
+
type ContentProps = React.ComponentPropsWithoutRef<typeof Dialog.Content> & React.ComponentPropsWithRef<"div">;
|
30
|
+
declare const Content: React.ForwardRefExoticComponent<Omit<ContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
31
|
+
type TitleProps = React.ComponentPropsWithoutRef<typeof Dialog.Title> & React.ComponentPropsWithRef<"div"> & {
|
32
|
+
title: string;
|
33
|
+
};
|
34
|
+
declare const Title: {
|
35
|
+
({ title, className, ...props }: TitleProps): import("react/jsx-runtime").JSX.Element;
|
36
|
+
displayName: string;
|
37
|
+
};
|
38
|
+
declare const Body: React.FC<{
|
39
|
+
body: string;
|
40
|
+
} & React.ComponentPropsWithRef<"div">>;
|
41
|
+
declare const Actions: React.FC<React.PropsWithChildren<React.ComponentPropsWithRef<"div">>>;
|
42
|
+
declare const PrimaryAction: React.FC<ActionContent & React.ComponentPropsWithRef<"a">>;
|
43
|
+
declare const SecondaryAction: React.FC<ActionContent & React.ComponentPropsWithRef<"a">>;
|
44
|
+
type CloseProps = React.ComponentPropsWithoutRef<typeof Dialog.Close> & React.ComponentPropsWithRef<"button">;
|
45
|
+
declare const Close: {
|
46
|
+
({ className, ...props }: CloseProps): import("react/jsx-runtime").JSX.Element;
|
47
|
+
displayName: string;
|
48
|
+
};
|
49
|
+
declare const DefaultView: React.FC<{
|
50
|
+
content: ModalContent;
|
51
|
+
colorMode?: ColorMode;
|
52
|
+
onOpenChange?: (open: boolean) => void;
|
53
|
+
onInteract?: () => void;
|
54
|
+
onDismiss?: React.MouseEventHandler<HTMLButtonElement>;
|
55
|
+
}>;
|
56
|
+
declare const Modal: React.FC<ModalProps>;
|
57
|
+
declare const ModalView: {
|
58
|
+
Default: typeof DefaultView;
|
59
|
+
Root: typeof Root;
|
60
|
+
Overlay: typeof Overlay;
|
61
|
+
Content: typeof Content;
|
62
|
+
Title: typeof Title;
|
63
|
+
Body: typeof Body;
|
64
|
+
Actions: typeof Actions;
|
65
|
+
PrimaryAction: typeof PrimaryAction;
|
66
|
+
SecondaryAction: typeof SecondaryAction;
|
67
|
+
Close: typeof Close;
|
68
|
+
};
|
69
|
+
export { Modal, ModalView };
|
70
|
+
//# sourceMappingURL=Modal.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/in-app-messages/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,sBAAsB,EAGvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,wBAAwB,CAAC;AAEjD,OAAO,KAAoB,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,cAAc,CAAC;AAItB,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,sBAAsB,CAAC;CAClC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,CAAC,EAAE;QACf,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,gBAAgB,CAAC,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,KAAK,SAAS,GAAG,IAAI,CACnB,KAAK,CAAC,wBAAwB,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,EAClD,OAAO,CACR,GACC,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAA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,KAAK,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AAExC,QAAA,MAAM,KAAK;8BAA6B,UAAU;;CAmBjD,CAAC;AAGF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;IAC1B,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACxD,CAoCA,CAAC;AAGF,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAwC/B,CAAC;AAGF,QAAA,MAAM,SAAS,EAAS;IACtB,OAAO,EAAE,OAAO,WAAW,CAAC;IAC5B,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,KAAK,EAAE,OAAO,KAAK,CAAC;IACpB,IAAI,EAAE,OAAO,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,aAAa,CAAC;IACpC,eAAe,EAAE,OAAO,eAAe,CAAC;IACxC,KAAK,EAAE,OAAO,KAAK,CAAC;CACrB,CAAC;AAeF,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/in-app-messages/components/Modal/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/in-app-messages/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/modules/in-app-messages/components/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/in-app-messages/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
@@ -4,6 +4,7 @@ export interface SlackAuthButtonProps {
|
|
4
4
|
slackClientId: string;
|
5
5
|
redirectUrl?: string;
|
6
6
|
onAuthenticationComplete?: (authenticationResp: string) => void;
|
7
|
+
additionalScopes?: string[];
|
7
8
|
}
|
8
9
|
export declare const SlackAuthButton: FunctionComponent<SlackAuthButtonProps>;
|
9
10
|
//# sourceMappingURL=SlackAuthButton.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SlackAuthButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/slack/components/SlackAuthButton/SlackAuthButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,iBAAiB,CAAC;AAGzB,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"SlackAuthButton.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/slack/components/SlackAuthButton/SlackAuthButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,iBAAiB,CAAC;AAGzB,OAAO,cAAc,CAAC;AAEtB,MAAM,WAAW,oBAAoB;IACnC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wBAAwB,CAAC,EAAE,CAAC,kBAAkB,EAAE,MAAM,KAAK,IAAI,CAAC;IAChE,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAyBD,eAAO,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAsHnE,CAAC"}
|
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@knocklabs/react",
|
3
3
|
"description": "A set of React components to build notification experiences powered by Knock",
|
4
4
|
"author": "@knocklabs",
|
5
|
-
"version": "0.
|
5
|
+
"version": "0.3.0-rc.0",
|
6
6
|
"license": "MIT",
|
7
7
|
"main": "dist/cjs/index.js",
|
8
8
|
"module": "dist/esm/index.mjs",
|
@@ -33,6 +33,7 @@
|
|
33
33
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
34
34
|
"format": "prettier \"src/**/*.{js,ts,tsx}\" --write",
|
35
35
|
"format:check": "prettier \"src/**/*.{js,ts,tsx}\" --check",
|
36
|
+
"gen:tokens": "node ./scripts/generateCssTokens.js",
|
36
37
|
"test": "vitest run",
|
37
38
|
"test:watch": "vitest",
|
38
39
|
"type:check": "tsc --noEmit",
|
@@ -51,11 +52,14 @@
|
|
51
52
|
"react-dom": "^16.11.0 || ^17.0.0 || ^18.0.0"
|
52
53
|
},
|
53
54
|
"dependencies": {
|
54
|
-
"@knocklabs/client": "^0.
|
55
|
-
"@knocklabs/react-core": "^0.
|
55
|
+
"@knocklabs/client": "^0.11.0-rc.0",
|
56
|
+
"@knocklabs/react-core": "^0.3.0-rc.0",
|
56
57
|
"@popperjs/core": "^2.11.8",
|
58
|
+
"@radix-ui/react-dialog": "^1.1.2",
|
57
59
|
"@radix-ui/react-popover": "^1.0.7",
|
58
60
|
"@radix-ui/react-visually-hidden": "^1.0.3",
|
61
|
+
"@telegraph/tokens": "^0.0.13",
|
62
|
+
"clsx": "^2.1.1",
|
59
63
|
"lodash.debounce": "^4.0.8",
|
60
64
|
"react-popper": "^2.3.0",
|
61
65
|
"react-popper-tooltip": "^4.4.2"
|
@@ -63,11 +67,11 @@
|
|
63
67
|
"devDependencies": {
|
64
68
|
"@testing-library/react": "^14.2.0",
|
65
69
|
"@types/lodash.debounce": "^4.0.9",
|
66
|
-
"@types/react": "^18.
|
70
|
+
"@types/react": "^18.3.6",
|
67
71
|
"@types/react-dom": "^18.2.15",
|
68
72
|
"@typescript-eslint/eslint-plugin": "^6.20.0",
|
69
|
-
"@typescript-eslint/parser": "^
|
70
|
-
"@vitejs/plugin-react": "^4.2
|
73
|
+
"@typescript-eslint/parser": "^8.8.1",
|
74
|
+
"@vitejs/plugin-react": "^4.3.2",
|
71
75
|
"babel-plugin-react-require": "^4.0.3",
|
72
76
|
"eslint": "^8.56.0",
|
73
77
|
"eslint-plugin-react-hooks": "^4.6.0",
|
@@ -77,7 +81,7 @@
|
|
77
81
|
"react-dom": "^18.2.0",
|
78
82
|
"rimraf": "^6.0.1",
|
79
83
|
"rollup-plugin-execute": "^1.1.1",
|
80
|
-
"typescript": "^5.
|
84
|
+
"typescript": "^5.6.2",
|
81
85
|
"vite": "^5.0.0",
|
82
86
|
"vite-plugin-dts": "^3.6.3",
|
83
87
|
"vite-plugin-no-bundle": "^4.0.0",
|