@opengovsg/confetti 0.0.6 → 0.0.7
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/build/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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-COft9SvA.js";
|
|
2
2
|
import * as react0 from "react";
|
|
3
3
|
import { HTMLAttributes, PropsWithChildren } from "react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
6
|
//#region src/core/ConfettiController.d.ts
|
|
7
7
|
interface ConfettiControllerProps {
|
|
@@ -19,7 +19,7 @@ declare const ConfettiController: ({
|
|
|
19
19
|
shouldAutoSubmit,
|
|
20
20
|
onFinished,
|
|
21
21
|
children
|
|
22
|
-
}: ConfettiControllerProps) =>
|
|
22
|
+
}: ConfettiControllerProps) => react_jsx_runtime2.JSX.Element;
|
|
23
23
|
//#endregion
|
|
24
24
|
//#region src/core/ConfettiProvider.d.ts
|
|
25
25
|
interface ConfettiContextValue {
|
|
@@ -53,7 +53,7 @@ declare const ConfettiProvider: ({
|
|
|
53
53
|
metadata,
|
|
54
54
|
isSurveyVisible: isSurveyVisibleInput,
|
|
55
55
|
apiBaseUrl
|
|
56
|
-
}: ConfettiProviderProps) =>
|
|
56
|
+
}: ConfettiProviderProps) => react_jsx_runtime2.JSX.Element | null;
|
|
57
57
|
declare const useConfetti: () => ConfettiContextValue;
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/components/Confetti.d.ts
|
|
@@ -63,7 +63,7 @@ declare const Confetti: ({
|
|
|
63
63
|
onFinished,
|
|
64
64
|
shouldAutoSubmit,
|
|
65
65
|
...props
|
|
66
|
-
}: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) =>
|
|
66
|
+
}: ConfettiProps & Pick<ConfettiControllerProps, "children" | "shouldAutoSubmit">) => react_jsx_runtime2.JSX.Element;
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/components/ThankYouMessage.d.ts
|
|
69
69
|
interface ThankYouMessageProps {
|
|
@@ -80,7 +80,7 @@ declare const ThankYouMessage: ({
|
|
|
80
80
|
title,
|
|
81
81
|
description,
|
|
82
82
|
classNames
|
|
83
|
-
}: ThankYouMessageProps) =>
|
|
83
|
+
}: ThankYouMessageProps) => react_jsx_runtime2.JSX.Element | null;
|
|
84
84
|
//#endregion
|
|
85
85
|
//#region src/components/container/PopoverContainer.d.ts
|
|
86
86
|
interface PopoverContainerProps {
|
|
@@ -102,7 +102,7 @@ declare const PopoverContainer: ({
|
|
|
102
102
|
containerProps,
|
|
103
103
|
onDismiss,
|
|
104
104
|
closeOnFinishMs
|
|
105
|
-
}: PopoverContainerProps) =>
|
|
105
|
+
}: PopoverContainerProps) => react_jsx_runtime2.JSX.Element;
|
|
106
106
|
//#endregion
|
|
107
107
|
//#region src/components/questions/types.d.ts
|
|
108
108
|
type Question$1 = PublicGetSurveyOutput['questions'][number];
|
|
@@ -125,7 +125,7 @@ declare const SurveyQuestionFactory: ({
|
|
|
125
125
|
question,
|
|
126
126
|
onChange,
|
|
127
127
|
error
|
|
128
|
-
}: SurveyQuestionFactoryProps) =>
|
|
128
|
+
}: SurveyQuestionFactoryProps) => react_jsx_runtime2.JSX.Element;
|
|
129
129
|
//#endregion
|
|
130
130
|
//#region src/components/questions/Rating.d.ts
|
|
131
131
|
interface RatingProps extends BaseFieldProps {
|
|
@@ -160,7 +160,7 @@ declare const Rating: ({
|
|
|
160
160
|
id,
|
|
161
161
|
error,
|
|
162
162
|
required
|
|
163
|
-
}: RatingProps) =>
|
|
163
|
+
}: RatingProps) => react_jsx_runtime2.JSX.Element;
|
|
164
164
|
//#endregion
|
|
165
165
|
//#region src/components/questions/FreeText.d.ts
|
|
166
166
|
interface FreeTextProps extends BaseFieldProps {
|
|
@@ -184,7 +184,7 @@ declare const FreeText: ({
|
|
|
184
184
|
classNames,
|
|
185
185
|
required,
|
|
186
186
|
error
|
|
187
|
-
}: FreeTextProps) =>
|
|
187
|
+
}: FreeTextProps) => react_jsx_runtime2.JSX.Element;
|
|
188
188
|
//#endregion
|
|
189
189
|
//#region src/components/questions/SingleChoice.d.ts
|
|
190
190
|
interface SingleChoiceProps extends BaseFieldProps {
|
|
@@ -214,7 +214,7 @@ declare const SingleChoice: ({
|
|
|
214
214
|
id,
|
|
215
215
|
required,
|
|
216
216
|
error
|
|
217
|
-
}: SingleChoiceProps) =>
|
|
217
|
+
}: SingleChoiceProps) => react_jsx_runtime2.JSX.Element;
|
|
218
218
|
//#endregion
|
|
219
219
|
//#region src/components/questions/MultiChoice.d.ts
|
|
220
220
|
interface MultiChoiceProps extends BaseFieldProps {
|
|
@@ -247,7 +247,7 @@ declare const MultiChoice: ({
|
|
|
247
247
|
id,
|
|
248
248
|
required,
|
|
249
249
|
error
|
|
250
|
-
}: MultiChoiceProps) =>
|
|
250
|
+
}: MultiChoiceProps) => react_jsx_runtime2.JSX.Element;
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/components/questions/Statement.d.ts
|
|
253
253
|
interface StatementProps extends BaseFieldProps {
|
|
@@ -265,7 +265,7 @@ declare const Statement: ({
|
|
|
265
265
|
title,
|
|
266
266
|
description,
|
|
267
267
|
classNames
|
|
268
|
-
}: StatementProps) =>
|
|
268
|
+
}: StatementProps) => react_jsx_runtime2.JSX.Element;
|
|
269
269
|
//#endregion
|
|
270
270
|
//#region src/components/presentation/Flow.d.ts
|
|
271
271
|
type ChildField = (_: {
|
|
@@ -284,7 +284,7 @@ declare const Flow: ({
|
|
|
284
284
|
children,
|
|
285
285
|
question,
|
|
286
286
|
isLastQuestion
|
|
287
|
-
}: FlowProps) =>
|
|
287
|
+
}: FlowProps) => react_jsx_runtime2.JSX.Element;
|
|
288
288
|
//#endregion
|
|
289
289
|
//#region src/components/presentation/Embed.d.ts
|
|
290
290
|
declare const Embed: ({
|
|
@@ -294,10 +294,10 @@ declare const Embed: ({
|
|
|
294
294
|
}: PropsWithChildren<{
|
|
295
295
|
isCompleted: boolean;
|
|
296
296
|
onSubmit: () => void;
|
|
297
|
-
}>) =>
|
|
297
|
+
}>) => react_jsx_runtime2.JSX.Element;
|
|
298
298
|
//#endregion
|
|
299
299
|
//#region src/templates/EmbeddedConfetti.d.ts
|
|
300
|
-
declare const EmbeddedConfetti: (props: ConfettiProps) =>
|
|
300
|
+
declare const EmbeddedConfetti: (props: ConfettiProps) => react_jsx_runtime2.JSX.Element;
|
|
301
301
|
//#endregion
|
|
302
302
|
//#region src/templates/PopoverConfetti.d.ts
|
|
303
303
|
interface PopoverConfettiProps extends ConfettiProps {
|
|
@@ -312,10 +312,10 @@ interface PopoverConfettiProps extends ConfettiProps {
|
|
|
312
312
|
declare const PopoverConfetti: ({
|
|
313
313
|
closeOnFinishMs,
|
|
314
314
|
...props
|
|
315
|
-
}: PopoverConfettiProps) =>
|
|
315
|
+
}: PopoverConfettiProps) => react_jsx_runtime2.JSX.Element;
|
|
316
316
|
//#endregion
|
|
317
317
|
//#region src/templates/StepperConfetti.d.ts
|
|
318
|
-
declare const StepperConfetti: (props: ConfettiProps) =>
|
|
318
|
+
declare const StepperConfetti: (props: ConfettiProps) => react_jsx_runtime2.JSX.Element;
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/hooks/useVisibleAfterDelay.d.ts
|
|
321
321
|
interface UseVisibleAfterDelayOptions {
|
package/build/index.js
CHANGED
|
@@ -92,6 +92,7 @@ const ratingQuestionPropertiesSchema = z.object({
|
|
|
92
92
|
});
|
|
93
93
|
const textQuestionPropertiesSchema = z.object({
|
|
94
94
|
type: z.literal("open-ended"),
|
|
95
|
+
placeholder: z.optional(z.string()),
|
|
95
96
|
buttonLabel: buttonLabelSchema,
|
|
96
97
|
max: z.number()
|
|
97
98
|
});
|
|
@@ -555,7 +556,7 @@ const FreeText = ({ id, title, description, properties, onChange, classNames, re
|
|
|
555
556
|
className: clsx("cf-textarea", classNames?.textarea),
|
|
556
557
|
maxLength: properties.max,
|
|
557
558
|
rows: 4,
|
|
558
|
-
placeholder: "Start typing..."
|
|
559
|
+
placeholder: properties.placeholder || "Start typing..."
|
|
559
560
|
}),
|
|
560
561
|
/* @__PURE__ */ jsx(FieldError, {
|
|
561
562
|
className: clsx("cf-error", classNames?.error),
|
package/build/internals.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare const ratingQuestionPropertiesSchema: z.ZodMiniObject<{
|
|
|
34
34
|
type RatingQuestionProperties = z.infer<typeof ratingQuestionPropertiesSchema>;
|
|
35
35
|
declare const textQuestionPropertiesSchema: z.ZodMiniObject<{
|
|
36
36
|
type: z.ZodMiniLiteral<"open-ended">;
|
|
37
|
+
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
37
38
|
buttonLabel: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
38
39
|
max: z.ZodMiniNumber<number>;
|
|
39
40
|
}, z.core.$strip>;
|
|
@@ -108,6 +109,7 @@ declare const publicGetSurveyOutputSchema: z.ZodMiniObject<{
|
|
|
108
109
|
}, z.core.$strip>>;
|
|
109
110
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
110
111
|
type: z.ZodMiniLiteral<"open-ended">;
|
|
112
|
+
placeholder: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
111
113
|
buttonLabel: z.ZodMiniOptional<z.ZodMiniString<string>>;
|
|
112
114
|
max: z.ZodMiniNumber<number>;
|
|
113
115
|
}, z.core.$strip>, z.ZodMiniObject<{
|
|
@@ -201,4 +203,4 @@ interface ConfettiState {
|
|
|
201
203
|
}
|
|
202
204
|
//#endregion
|
|
203
205
|
export { MultiSelectQuestionProperties as a, StatementQuestionProperties as c, PublicGetSurveyOutput as i, TextQuestionProperties as l, ConfettiState as n, RatingQuestionProperties as o, Question as r, SingleSelectQuestionProperties as s, Answer as t, BinaryOperatorCondition as u };
|
|
204
|
-
//# sourceMappingURL=types-
|
|
206
|
+
//# sourceMappingURL=types-COft9SvA.d.ts.map
|