@opengovsg/confetti 0.3.4 → 0.4.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.
@@ -0,0 +1,261 @@
1
+ import { n as ModalContainerProps, t as ModalContainer } from "./ModalContainer-CPX4GCql.js";
2
+ import { a as MultiSelectQuestionProperties, c as StatementQuestionProperties, l as TextQuestionProperties, n as ConfettiState, o as RatingQuestionProperties, r as Question, s as SingleSelectQuestionProperties, t as Answer } from "./types-CJY8TUUa.js";
3
+ import { a as Question$1, c as ConfettiProviderProps, d as ConfettiControllerProps, i as BaseFieldProps, l as useConfetti, n as ConfettiProps, o as ConfettiContext, r as BugReportOptions, s as ConfettiProvider, t as Confetti, u as ConfettiController } from "./Confetti-X1LYIVnH.js";
4
+ import { HTMLAttributes, JSX, PropsWithChildren, SVGProps } from "react";
5
+
6
+ //#region src/components/container/PopoverContainer.d.ts
7
+ interface PopoverContainerProps {
8
+ closeOnFinishMs?: number | null;
9
+ classNames?: {
10
+ dialog?: string;
11
+ closeButton?: string;
12
+ icon?: string;
13
+ };
14
+ onDismiss?: () => void;
15
+ containerProps?: Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
16
+ children: React.ReactNode | ((props: {
17
+ setIsFinished: () => void;
18
+ }) => React.ReactNode);
19
+ }
20
+ declare const PopoverContainer: ({
21
+ children,
22
+ classNames,
23
+ containerProps,
24
+ onDismiss,
25
+ closeOnFinishMs
26
+ }: PopoverContainerProps) => import("react").JSX.Element;
27
+ //#endregion
28
+ //#region src/components/CloseButton.d.ts
29
+ interface CloseButtonProps {
30
+ className?: string;
31
+ iconClassName?: string;
32
+ onClose: () => void;
33
+ }
34
+ declare const CloseButton: ({
35
+ className,
36
+ iconClassName,
37
+ onClose
38
+ }: CloseButtonProps) => import("react").JSX.Element | null;
39
+ //#endregion
40
+ //#region src/components/questions/factory.d.ts
41
+ interface SurveyQuestionFactoryProps extends BugReportOptions {
42
+ question: Question$1;
43
+ onChange: (answer: Answer) => void;
44
+ error?: string;
45
+ }
46
+ declare const SurveyQuestionFactory: ({
47
+ question,
48
+ onChange,
49
+ error,
50
+ maskAllInputs
51
+ }: SurveyQuestionFactoryProps) => import("react").JSX.Element;
52
+ //#endregion
53
+ //#region src/components/questions/Rating.d.ts
54
+ interface RatingProps extends BaseFieldProps {
55
+ properties: RatingQuestionProperties;
56
+ classNames?: {
57
+ question?: string;
58
+ header?: string;
59
+ title?: string;
60
+ description?: string;
61
+ optionalLabel?: string;
62
+ ratingSection?: string;
63
+ ratingDisplay?: string;
64
+ ratingText?: string;
65
+ ratingTextLower?: string;
66
+ ratingTextUpper?: string;
67
+ ratingDisplayStar?: string;
68
+ ratingStar?: string;
69
+ ratingDisplayNumber?: string;
70
+ ratingNumber?: string;
71
+ ratingDisplayEmoji?: string;
72
+ ratingEmoji?: string;
73
+ error?: string;
74
+ };
75
+ }
76
+ declare const Rating: ({
77
+ properties,
78
+ title,
79
+ description,
80
+ classNames,
81
+ onChange,
82
+ id,
83
+ error,
84
+ required
85
+ }: RatingProps) => JSX.Element;
86
+ //#endregion
87
+ //#region src/components/questions/FreeText.d.ts
88
+ interface FreeTextProps extends BaseFieldProps {
89
+ properties: TextQuestionProperties;
90
+ classNames?: {
91
+ question?: string;
92
+ header?: string;
93
+ title?: string;
94
+ optionalLabel?: string;
95
+ description?: string;
96
+ textarea?: string;
97
+ error?: string;
98
+ };
99
+ }
100
+ declare const FreeText: ({
101
+ id,
102
+ title,
103
+ description,
104
+ properties,
105
+ onChange,
106
+ classNames,
107
+ required,
108
+ error
109
+ }: FreeTextProps) => import("react").JSX.Element;
110
+ //#endregion
111
+ //#region src/components/questions/SingleChoice.d.ts
112
+ interface SingleChoiceProps extends BaseFieldProps {
113
+ properties: SingleSelectQuestionProperties;
114
+ classNames?: {
115
+ question?: string;
116
+ header?: string;
117
+ label?: string;
118
+ title?: string;
119
+ description?: string;
120
+ optionalLabel?: string;
121
+ group?: string;
122
+ radio?: string;
123
+ indicator?: string;
124
+ othersChoice?: string;
125
+ othersInput?: string;
126
+ choiceDescription?: string;
127
+ error?: string;
128
+ };
129
+ }
130
+ declare const SingleChoice: ({
131
+ title,
132
+ description,
133
+ properties,
134
+ classNames,
135
+ onChange,
136
+ id,
137
+ required,
138
+ error
139
+ }: SingleChoiceProps) => import("react").JSX.Element;
140
+ //#endregion
141
+ //#region src/components/questions/MultiChoice.d.ts
142
+ interface MultiChoiceProps extends BaseFieldProps {
143
+ properties: MultiSelectQuestionProperties;
144
+ classNames?: {
145
+ question?: string;
146
+ header?: string;
147
+ label?: string;
148
+ title?: string;
149
+ description?: string;
150
+ optionalLabel?: string;
151
+ choiceDescription?: string;
152
+ group?: string;
153
+ checkbox?: string;
154
+ tag?: string;
155
+ tagLabel?: string;
156
+ indicator?: string;
157
+ svg?: string;
158
+ othersChoice?: string;
159
+ othersInput?: string;
160
+ error?: string;
161
+ };
162
+ }
163
+ declare const MultiChoice: ({
164
+ title,
165
+ description,
166
+ properties,
167
+ classNames,
168
+ onChange,
169
+ id,
170
+ required,
171
+ error
172
+ }: MultiChoiceProps) => import("react").JSX.Element;
173
+ //#endregion
174
+ //#region src/components/questions/Statement.d.ts
175
+ interface StatementProps extends BaseFieldProps {
176
+ properties: StatementQuestionProperties;
177
+ classNames?: {
178
+ question?: string;
179
+ header?: string;
180
+ title?: string;
181
+ description?: string;
182
+ ctaButton?: string;
183
+ };
184
+ }
185
+ declare const Statement: ({
186
+ properties: _properties,
187
+ title,
188
+ description,
189
+ classNames
190
+ }: StatementProps) => import("react").JSX.Element;
191
+ //#endregion
192
+ //#region src/components/ThankYouMessage.d.ts
193
+ interface ThankYouMessageProps {
194
+ title?: string;
195
+ description?: string;
196
+ classNames?: {
197
+ question?: string;
198
+ header?: string;
199
+ title?: string;
200
+ description?: string;
201
+ };
202
+ }
203
+ declare const ThankYouMessage: ({
204
+ title,
205
+ description,
206
+ classNames
207
+ }: ThankYouMessageProps) => import("react").JSX.Element | null;
208
+ //#endregion
209
+ //#region src/components/presentation/Flow.d.ts
210
+ type ChildField = (_: {
211
+ onChange: (answer: Answer) => void;
212
+ question: Question$1;
213
+ error?: string;
214
+ }) => React.ReactNode;
215
+ interface FlowProps {
216
+ onSubmit: (answer: Answer) => void;
217
+ children: ChildField;
218
+ question: Question$1;
219
+ isLastQuestion: boolean;
220
+ }
221
+ declare const Flow: ({
222
+ onSubmit,
223
+ children,
224
+ question,
225
+ isLastQuestion
226
+ }: FlowProps) => import("react").JSX.Element;
227
+ //#endregion
228
+ //#region src/components/presentation/Embed.d.ts
229
+ type EmbedProps = PropsWithChildren<{
230
+ isCompleted: boolean;
231
+ onSubmit: () => void;
232
+ }>;
233
+ declare const Embed: ({
234
+ isCompleted,
235
+ onSubmit,
236
+ children
237
+ }: EmbedProps) => import("react").JSX.Element;
238
+ //#endregion
239
+ //#region src/components/trigger/ConfettiTriggerIcon.d.ts
240
+ declare const ConfettiTriggerIcon: (props: SVGProps<SVGSVGElement>) => import("react").JSX.Element;
241
+ //#endregion
242
+ //#region src/components/trigger/DefaultConfettiTrigger.d.ts
243
+ interface DefaultConfettiTriggerProps {
244
+ onClick: () => void;
245
+ isWidgetOpen: boolean;
246
+ label?: string;
247
+ classNames?: {
248
+ trigger?: string;
249
+ icon?: string;
250
+ iconWrapper?: string;
251
+ label?: string;
252
+ };
253
+ }
254
+ declare const DefaultConfettiTrigger: ({
255
+ onClick,
256
+ isWidgetOpen,
257
+ classNames,
258
+ label
259
+ }: DefaultConfettiTriggerProps) => import("react").JSX.Element | null;
260
+ //#endregion
261
+ export { type Answer, CloseButton, Confetti, ConfettiContext, ConfettiController, type ConfettiControllerProps, type ConfettiProps, ConfettiProvider, type ConfettiProviderProps, type ConfettiState, ConfettiTriggerIcon, DefaultConfettiTrigger, type DefaultConfettiTriggerProps, Embed, type EmbedProps, Flow, type FlowProps, FreeText, type FreeTextProps, ModalContainer, type ModalContainerProps, MultiChoice, type MultiChoiceProps, PopoverContainer, type PopoverContainerProps, type Question, Rating, type RatingProps, SingleChoice, type SingleChoiceProps, Statement, type StatementProps, SurveyQuestionFactory, type SurveyQuestionFactoryProps, ThankYouMessage, useConfetti };
@@ -0,0 +1 @@
1
+ import{a as e,c as t,d as n,f as r,i,l as a,m as o,n as s,o as c,p as l,r as u,s as d,t as f,u as p}from"./DefaultConfettiTrigger-JDSIZWbW.js";import{B as m,H as h,V as g,r as _,t as v}from"./ModalContainer-B3QLAjgy.js";export{_ as CloseButton,l as Confetti,m as ConfettiContext,o as ConfettiController,g as ConfettiProvider,s as ConfettiTriggerIcon,f as DefaultConfettiTrigger,n as Embed,r as Flow,p as FreeText,v as ModalContainer,a as MultiChoice,u as PopoverContainer,t as Rating,d as SingleChoice,c as Statement,e as SurveyQuestionFactory,i as ThankYouMessage,h as useConfetti};
package/build/index.d.ts CHANGED
@@ -1,369 +1,9 @@
1
- import { n as ModalContainerProps, t as ModalContainer } from "./ModalContainer-BT1Bys9H.js";
2
- import { a as MultiSelectQuestionProperties, c as StatementQuestionProperties, i as PublicGetSurveyOutput, l as TextQuestionProperties, n as ConfettiState, o as RatingQuestionProperties, r as Question, s as SingleSelectQuestionProperties, t as Answer } from "./types-CJY8TUUa.js";
3
- import { HTMLAttributes, PropsWithChildren, SVGProps } from "react";
1
+ import { c as ConfettiProviderProps, n as ConfettiProps } from "./Confetti-X1LYIVnH.js";
4
2
 
5
- //#region src/core/ConfettiController.d.ts
6
- interface ConfettiControllerProps {
7
- children: (props: ConfettiState) => React.ReactElement;
8
- /**
9
- * Control the current question index that is being displayed.
10
- * If not provided, the component will manage it internally.
11
- */
12
- current?: number;
13
- shouldAutoSubmit?: boolean;
14
- onFinished?: () => void;
15
- }
16
- declare const ConfettiController: ({
17
- current: currentProp,
18
- shouldAutoSubmit,
19
- onFinished,
20
- children
21
- }: ConfettiControllerProps) => import("react/jsx-runtime").JSX.Element;
22
- //#endregion
23
- //#region src/contracts/state.d.ts
24
- interface ConfettiRespondentState {
25
- lastRespondedAt: Date | null;
26
- lastDismissedAt: Date | null;
27
- }
28
- //#endregion
29
- //#region src/core/logic/is-visible.d.ts
30
- type IsSurveyVisible = boolean | ((s: ConfettiRespondentState) => boolean) | undefined;
31
- //#endregion
32
- //#region src/core/ConfettiProvider.d.ts
33
- interface ConfettiContextValue {
34
- surveyId: string;
35
- metadata: Record<string, string>;
36
- submit: ({
37
- answers
38
- }: {
39
- answers: Record<Question['id'], Answer>;
40
- }) => Promise<void>;
41
- dismiss: () => Promise<void> | void;
42
- survey: PublicGetSurveyOutput | undefined;
43
- isVisible: boolean;
44
- }
45
- declare const ConfettiContext: import("react").Context<ConfettiContextValue | null>;
46
- interface ConfettiProviderProps {
47
- children: React.ReactNode;
48
- surveyId: string;
49
- publishableKey: string;
50
- respondent?: string;
51
- metadata?: Record<string, string>;
52
- apiBaseUrl?: string;
53
- isSurveyVisible?: IsSurveyVisible;
54
- alwaysRenderChildren?: boolean;
55
- }
56
- declare const ConfettiProvider: (props: ConfettiProviderProps) => import("react/jsx-runtime").JSX.Element;
57
- declare const useConfetti: () => ConfettiContextValue;
58
- //#endregion
59
- //#region src/components/questions/types.d.ts
60
- type Question$1 = PublicGetSurveyOutput['questions'][number];
61
- interface BaseFieldProps {
62
- id: string;
63
- title: string | null | undefined;
64
- description?: string | null | undefined;
65
- required?: boolean;
66
- onChange: (answer: Answer) => void;
67
- error?: string;
68
- }
69
- //#endregion
70
- //#region src/components/questions/BugReport/BugReport.d.ts
71
- interface BugReportOptions {
72
- maskAllInputs?: boolean;
73
- }
74
- //#endregion
75
- //#region src/components/Confetti.d.ts
76
- interface ConfettiProps extends Omit<ConfettiProviderProps, 'children'>, Pick<ConfettiControllerProps, 'onFinished' | 'shouldAutoSubmit'> {
77
- options?: {
78
- bugReport?: BugReportOptions;
79
- };
80
- }
81
- declare const Confetti: ({
82
- children,
83
- onFinished,
84
- shouldAutoSubmit,
85
- ...props
86
- }: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) => import("react/jsx-runtime").JSX.Element;
87
- //#endregion
88
- //#region src/components/ThankYouMessage.d.ts
89
- interface ThankYouMessageProps {
90
- title?: string;
91
- description?: string;
92
- classNames?: {
93
- question?: string;
94
- header?: string;
95
- title?: string;
96
- description?: string;
97
- };
98
- }
99
- declare const ThankYouMessage: ({
100
- title,
101
- description,
102
- classNames
103
- }: ThankYouMessageProps) => import("react/jsx-runtime").JSX.Element | null;
104
- //#endregion
105
- //#region src/components/container/PopoverContainer.d.ts
106
- interface PopoverContainerProps {
107
- closeOnFinishMs?: number | null;
108
- classNames?: {
109
- dialog?: string;
110
- closeButton?: string;
111
- icon?: string;
112
- };
113
- onDismiss?: () => void;
114
- containerProps?: Omit<HTMLAttributes<HTMLDivElement>, 'children'>;
115
- children: React.ReactNode | ((props: {
116
- setIsFinished: () => void;
117
- }) => React.ReactNode);
118
- }
119
- declare const PopoverContainer: ({
120
- children,
121
- classNames,
122
- containerProps,
123
- onDismiss,
124
- closeOnFinishMs
125
- }: PopoverContainerProps) => import("react/jsx-runtime").JSX.Element;
126
- //#endregion
127
- //#region src/components/questions/factory.d.ts
128
- interface SurveyQuestionFactoryProps extends BugReportOptions {
129
- question: Question$1;
130
- onChange: (answer: Answer) => void;
131
- error?: string;
132
- }
133
- declare const SurveyQuestionFactory: ({
134
- question,
135
- onChange,
136
- error,
137
- maskAllInputs
138
- }: SurveyQuestionFactoryProps) => import("react/jsx-runtime").JSX.Element;
139
- //#endregion
140
- //#region src/components/questions/Rating.d.ts
141
- interface RatingProps extends BaseFieldProps {
142
- properties: RatingQuestionProperties;
143
- classNames?: {
144
- question?: string;
145
- header?: string;
146
- title?: string;
147
- description?: string;
148
- optionalLabel?: string;
149
- ratingSection?: string;
150
- ratingDisplay?: string;
151
- ratingText?: string;
152
- ratingTextLower?: string;
153
- ratingTextUpper?: string;
154
- ratingDisplayStar?: string;
155
- ratingStar?: string;
156
- ratingDisplayNumber?: string;
157
- ratingNumber?: string;
158
- ratingDisplayEmoji?: string;
159
- ratingEmoji?: string;
160
- error?: string;
161
- };
162
- }
163
- declare const Rating: ({
164
- properties,
165
- title,
166
- description,
167
- classNames,
168
- onChange,
169
- id,
170
- error,
171
- required
172
- }: RatingProps) => import("react/jsx-runtime").JSX.Element;
173
- //#endregion
174
- //#region src/components/questions/FreeText.d.ts
175
- interface FreeTextProps extends BaseFieldProps {
176
- properties: TextQuestionProperties;
177
- classNames?: {
178
- question?: string;
179
- header?: string;
180
- title?: string;
181
- optionalLabel?: string;
182
- description?: string;
183
- textarea?: string;
184
- error?: string;
185
- };
186
- }
187
- declare const FreeText: ({
188
- id,
189
- title,
190
- description,
191
- properties,
192
- onChange,
193
- classNames,
194
- required,
195
- error
196
- }: FreeTextProps) => import("react/jsx-runtime").JSX.Element;
197
- //#endregion
198
- //#region src/components/questions/SingleChoice.d.ts
199
- interface SingleChoiceProps extends BaseFieldProps {
200
- properties: SingleSelectQuestionProperties;
201
- classNames?: {
202
- question?: string;
203
- header?: string;
204
- label?: string;
205
- title?: string;
206
- description?: string;
207
- optionalLabel?: string;
208
- group?: string;
209
- radio?: string;
210
- indicator?: string;
211
- othersChoice?: string;
212
- othersInput?: string;
213
- choiceDescription?: string;
214
- error?: string;
215
- };
216
- }
217
- declare const SingleChoice: ({
218
- title,
219
- description,
220
- properties,
221
- classNames,
222
- onChange,
223
- id,
224
- required,
225
- error
226
- }: SingleChoiceProps) => import("react/jsx-runtime").JSX.Element;
227
- //#endregion
228
- //#region src/components/questions/MultiChoice.d.ts
229
- interface MultiChoiceProps extends BaseFieldProps {
230
- properties: MultiSelectQuestionProperties;
231
- classNames?: {
232
- question?: string;
233
- header?: string;
234
- label?: string;
235
- title?: string;
236
- description?: string;
237
- optionalLabel?: string;
238
- choiceDescription?: string;
239
- group?: string;
240
- checkbox?: string;
241
- tag?: string;
242
- tagLabel?: string;
243
- indicator?: string;
244
- svg?: string;
245
- othersChoice?: string;
246
- othersInput?: string;
247
- error?: string;
248
- };
249
- }
250
- declare const MultiChoice: ({
251
- title,
252
- description,
253
- properties,
254
- classNames,
255
- onChange,
256
- id,
257
- required,
258
- error
259
- }: MultiChoiceProps) => import("react/jsx-runtime").JSX.Element;
260
- //#endregion
261
- //#region src/components/questions/Statement.d.ts
262
- interface StatementProps extends BaseFieldProps {
263
- properties: StatementQuestionProperties;
264
- classNames?: {
265
- question?: string;
266
- header?: string;
267
- title?: string;
268
- description?: string;
269
- ctaButton?: string;
270
- };
271
- }
272
- declare const Statement: ({
273
- properties: _properties,
274
- title,
275
- description,
276
- classNames
277
- }: StatementProps) => import("react/jsx-runtime").JSX.Element;
278
- //#endregion
279
- //#region src/components/presentation/Flow.d.ts
280
- type ChildField = (_: {
281
- onChange: (answer: Answer) => void;
282
- question: Question$1;
283
- error?: string;
284
- }) => React.ReactNode;
285
- interface FlowProps {
286
- onSubmit: (answer: Answer) => void;
287
- children: ChildField;
288
- question: Question$1;
289
- isLastQuestion: boolean;
290
- }
291
- declare const Flow: ({
292
- onSubmit,
293
- children,
294
- question,
295
- isLastQuestion
296
- }: FlowProps) => import("react/jsx-runtime").JSX.Element;
297
- //#endregion
298
- //#region src/components/presentation/Embed.d.ts
299
- declare const Embed: ({
300
- isCompleted,
301
- onSubmit,
302
- children
303
- }: PropsWithChildren<{
304
- isCompleted: boolean;
305
- onSubmit: () => void;
306
- }>) => import("react/jsx-runtime").JSX.Element;
3
+ //#region src/templates/EmbeddedConfettiContent.d.ts
4
+ declare const EmbeddedConfetti: (props: ConfettiProps) => import("react").JSX.Element;
307
5
  //#endregion
308
- //#region src/components/CloseButton.d.ts
309
- interface CloseButtonProps {
310
- className?: string;
311
- iconClassName?: string;
312
- onClose: () => void;
313
- }
314
- declare const CloseButton: ({
315
- className,
316
- iconClassName,
317
- onClose
318
- }: CloseButtonProps) => import("react/jsx-runtime").JSX.Element | null;
319
- //#endregion
320
- //#region src/components/trigger/ConfettiTriggerIcon.d.ts
321
- declare const ConfettiTriggerIcon: (props: SVGProps<SVGSVGElement>) => import("react/jsx-runtime").JSX.Element;
322
- //#endregion
323
- //#region src/components/trigger/DefaultConfettiTrigger.d.ts
324
- interface DefaultConfettiTriggerProps {
325
- onClick: () => void;
326
- isWidgetOpen: boolean;
327
- label?: string;
328
- classNames?: {
329
- trigger?: string;
330
- icon?: string;
331
- iconWrapper?: string;
332
- label?: string;
333
- };
334
- }
335
- declare const DefaultConfettiTrigger: ({
336
- onClick,
337
- isWidgetOpen,
338
- classNames,
339
- label
340
- }: DefaultConfettiTriggerProps) => import("react/jsx-runtime").JSX.Element | null;
341
- //#endregion
342
- //#region src/templates/ConfettiTrigger.d.ts
343
- interface TriggerRenderProps {
344
- onClick: () => void;
345
- isWidgetOpen: boolean;
346
- hasSubmitted: boolean;
347
- }
348
- interface TriggerChildProps extends Pick<ConfettiProviderProps, 'publishableKey' | 'surveyId'> {
349
- onDismiss: () => void;
350
- }
351
- interface ConfettiTriggerProps extends Omit<ConfettiProviderProps, 'children' | 'alwaysRenderChildren'> {
352
- surveyId: string;
353
- publishableKey: string;
354
- trigger?: (renderProps: TriggerRenderProps) => React.ReactNode;
355
- children: (triggerProps: TriggerChildProps) => React.ReactNode;
356
- }
357
- declare const ConfettiTrigger: ({
358
- trigger,
359
- children,
360
- ...providerProps
361
- }: ConfettiTriggerProps) => import("react/jsx-runtime").JSX.Element;
362
- //#endregion
363
- //#region src/templates/EmbeddedConfetti.d.ts
364
- declare const EmbeddedConfetti: (props: ConfettiProps) => import("react/jsx-runtime").JSX.Element;
365
- //#endregion
366
- //#region src/templates/ModalConfetti.d.ts
6
+ //#region src/templates/ModalConfettiContent.d.ts
367
7
  interface ModalConfettiProps extends ConfettiProps {
368
8
  closeOnFinishMs?: number | null;
369
9
  onDismiss?: () => void;
@@ -374,9 +14,9 @@ declare const ModalConfetti: ({
374
14
  closeOnFinishMs,
375
15
  isDismissable,
376
16
  ...props
377
- }: ModalConfettiProps) => import("react/jsx-runtime").JSX.Element;
17
+ }: ModalConfettiProps) => import("react").JSX.Element;
378
18
  //#endregion
379
- //#region src/templates/PopoverConfetti.d.ts
19
+ //#region src/templates/PopoverConfettiContent.d.ts
380
20
  interface PopoverConfettiProps extends ConfettiProps {
381
21
  /**
382
22
  * The popover will automatically close this many milliseconds
@@ -394,10 +34,10 @@ declare const PopoverConfetti: ({
394
34
  onDismiss,
395
35
  closeOnFinishMs,
396
36
  ...props
397
- }: PopoverConfettiProps) => import("react/jsx-runtime").JSX.Element;
37
+ }: PopoverConfettiProps) => import("react").JSX.Element;
398
38
  //#endregion
399
- //#region src/templates/StepperConfetti.d.ts
400
- declare const StepperConfetti: (props: ConfettiProps) => import("react/jsx-runtime").JSX.Element;
39
+ //#region src/templates/StepperConfettiContent.d.ts
40
+ declare const StepperConfetti: (props: ConfettiProps) => import("react").JSX.Element;
401
41
  //#endregion
402
42
  //#region src/hooks/useVisibleAfterDelay.d.ts
403
43
  interface UseVisibleAfterDelayOptions {
@@ -439,4 +79,25 @@ declare const useVisibleAfterScroll: ({
439
79
  isVisible: boolean;
440
80
  };
441
81
  //#endregion
442
- export { type Answer, CloseButton, Confetti, ConfettiContext, ConfettiController, type ConfettiControllerProps, type ConfettiProps, ConfettiProvider, type ConfettiProviderProps, type ConfettiState, ConfettiTrigger, ConfettiTriggerIcon, type ConfettiTriggerProps, DefaultConfettiTrigger, type DefaultConfettiTriggerProps, Embed, EmbeddedConfetti, Flow, FreeText, type FreeTextProps, ModalConfetti, ModalContainer, type ModalContainerProps, MultiChoice, type MultiChoiceProps, PopoverConfetti, PopoverContainer, type PopoverContainerProps, type Question, Rating, type RatingProps, SingleChoice, type SingleChoiceProps, Statement, type StatementProps, StepperConfetti, SurveyQuestionFactory, type SurveyQuestionFactoryProps, ThankYouMessage, type TriggerChildProps, type TriggerRenderProps, useConfetti, useVisibleAfterDelay, useVisibleAfterPageVisits, useVisibleAfterScroll, useVisibleAfterSessionPageVisits };
82
+ //#region src/static/ConfettiTrigger.d.ts
83
+ interface TriggerRenderProps {
84
+ onClick: () => void;
85
+ isWidgetOpen: boolean;
86
+ hasSubmitted: boolean;
87
+ }
88
+ interface TriggerChildProps extends Pick<ConfettiProviderProps, 'publishableKey' | 'surveyId'> {
89
+ onDismiss: () => void;
90
+ }
91
+ interface ConfettiTriggerProps extends Omit<ConfettiProviderProps, 'children' | 'alwaysRenderChildren'> {
92
+ surveyId: string;
93
+ publishableKey: string;
94
+ trigger?: (renderProps: TriggerRenderProps) => React.ReactNode;
95
+ children: (triggerProps: TriggerChildProps) => React.ReactNode;
96
+ }
97
+ declare const ConfettiTrigger: ({
98
+ trigger,
99
+ children,
100
+ ...providerProps
101
+ }: ConfettiTriggerProps) => import("react").JSX.Element;
102
+ //#endregion
103
+ export { ConfettiTrigger, type ConfettiTriggerProps, EmbeddedConfetti, ModalConfetti, PopoverConfetti, StepperConfetti, type TriggerChildProps, type TriggerRenderProps, useVisibleAfterDelay, useVisibleAfterPageVisits, useVisibleAfterScroll, useVisibleAfterSessionPageVisits };