quirk-ui 0.1.74 → 0.1.76
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/dist/AccordionItem.css.d.ts +13 -0
- package/dist/CategoryFilters.css.d.ts +31 -0
- package/dist/FormField-BO1hKjUb.js +228 -0
- package/dist/FormField-wfYSN1Vd.cjs +1 -0
- package/dist/FormField.css +1 -0
- package/dist/FormField.css.d.ts +22 -0
- package/dist/HeroSubComponents.css.d.ts +30 -0
- package/dist/NavLink.css.d.ts +72 -0
- package/dist/core/components/Badge/index.cjs +1 -1
- package/dist/core/components/Badge/index.mjs +1 -1
- package/dist/core/components/Box/index.cjs +1 -1
- package/dist/core/components/Box/index.mjs +1 -1
- package/dist/core/components/Breadcrumbs/index.cjs +1 -1
- package/dist/core/components/Breadcrumbs/index.mjs +1 -1
- package/dist/core/components/Card/index.cjs +1 -1
- package/dist/core/components/Card/index.mjs +1 -1
- package/dist/core/components/Container/index.cjs +1 -1
- package/dist/core/components/Container/index.mjs +1 -1
- package/dist/core/components/Divider/index.cjs +1 -1
- package/dist/core/components/Divider/index.mjs +1 -1
- package/dist/core/components/Drawer/index.cjs +1 -1
- package/dist/core/components/Drawer/index.mjs +1 -1
- package/dist/core/components/Fieldset/index.cjs +1 -1
- package/dist/core/components/Fieldset/index.mjs +1 -1
- package/dist/core/components/FloatingActionButton/index.cjs +1 -1
- package/dist/core/components/FloatingActionButton/index.mjs +1 -1
- package/dist/core/components/Footer/index.cjs +1 -1
- package/dist/core/components/Footer/index.mjs +1 -1
- package/dist/core/components/Form/index.cjs +1 -1
- package/dist/core/components/Form/index.mjs +1 -1
- package/dist/core/components/Input/index.cjs +1 -1
- package/dist/core/components/Input/index.mjs +25 -31
- package/dist/core/components/Label/index.cjs +1 -1
- package/dist/core/components/Label/index.mjs +1 -1
- package/dist/core/components/List/index.cjs +1 -1
- package/dist/core/components/List/index.mjs +1 -1
- package/dist/core/components/Modal/index.cjs +1 -1
- package/dist/core/components/Modal/index.mjs +1 -1
- package/dist/core/components/NotificationContainer/index.cjs +1 -1
- package/dist/core/components/NotificationContainer/index.mjs +1 -1
- package/dist/core/components/ProgressBar/index.cjs +1 -1
- package/dist/core/components/ProgressBar/index.mjs +1 -1
- package/dist/core/components/Radio/index.cjs +1 -1
- package/dist/core/components/Radio/index.mjs +1 -1
- package/dist/core/components/Range/index.cjs +1 -1
- package/dist/core/components/Range/index.mjs +1 -1
- package/dist/core/components/Skeleton/index.cjs +1 -1
- package/dist/core/components/Skeleton/index.mjs +1 -1
- package/dist/core/components/Spacer/index.cjs +1 -1
- package/dist/core/components/Spacer/index.mjs +1 -1
- package/dist/core/components/Spinner/index.cjs +1 -1
- package/dist/core/components/Spinner/index.mjs +1 -1
- package/dist/core/components/Stack/index.cjs +1 -1
- package/dist/core/components/Stack/index.mjs +1 -1
- package/dist/core/components/Switch/index.cjs +1 -1
- package/dist/core/components/Switch/index.mjs +1 -1
- package/dist/core/components/Textarea/index.cjs +1 -1
- package/dist/core/components/Textarea/index.mjs +1 -1
- package/dist/index.css.d.ts +1 -0
- package/dist/index10.css.d.ts +7 -0
- package/dist/index11.css.d.ts +26 -0
- package/dist/index12.css.d.ts +24 -0
- package/dist/index13.css.d.ts +33 -0
- package/dist/index14.css.d.ts +10 -0
- package/dist/index15.css.d.ts +18 -0
- package/dist/index16.css.d.ts +38 -0
- package/dist/index17.css.d.ts +16 -0
- package/dist/index18.css.d.ts +14 -0
- package/dist/index19.css.d.ts +17 -0
- package/dist/index2.css.d.ts +9 -0
- package/dist/index20.css.d.ts +13 -0
- package/dist/index21.css.d.ts +25 -0
- package/dist/index22.css.d.ts +5 -0
- package/dist/index23.css.d.ts +19 -0
- package/dist/index24.css.d.ts +21 -0
- package/dist/index25.css.d.ts +16 -0
- package/dist/index26.css.d.ts +10 -0
- package/dist/index27.css.d.ts +18 -0
- package/dist/index28.css.d.ts +16 -0
- package/dist/index29.css.d.ts +10 -0
- package/dist/index3.css.d.ts +12 -0
- package/dist/index30.css.d.ts +19 -0
- package/dist/index31.css.d.ts +15 -0
- package/dist/index32.css.d.ts +22 -0
- package/dist/index33.css.d.ts +15 -0
- package/dist/index34.css +1 -1
- package/dist/index34.css.d.ts +14 -0
- package/dist/index35.css +1 -1
- package/dist/index35.css.d.ts +23 -0
- package/dist/index36.css +1 -1
- package/dist/index36.css.d.ts +14 -0
- package/dist/index37.css +1 -1
- package/dist/index37.css.d.ts +18 -0
- package/dist/index38.css +1 -1
- package/dist/index38.css.d.ts +21 -0
- package/dist/index39.css +1 -1
- package/dist/index39.css.d.ts +20 -0
- package/dist/index4.css.d.ts +10 -0
- package/dist/index40.css +1 -1
- package/dist/index40.css.d.ts +17 -0
- package/dist/index41.css +1 -1
- package/dist/index41.css.d.ts +14 -0
- package/dist/index42.css +1 -1
- package/dist/index42.css.d.ts +22 -0
- package/dist/index43.css +1 -1
- package/dist/index43.css.d.ts +35 -0
- package/dist/index44.css +1 -1
- package/dist/index44.css.d.ts +13 -0
- package/dist/index45.css +1 -1
- package/dist/index45.css.d.ts +23 -0
- package/dist/index46.css +1 -1
- package/dist/index46.css.d.ts +12 -0
- package/dist/index47.css +1 -1
- package/dist/index47.css.d.ts +19 -0
- package/dist/index48.css +1 -1
- package/dist/index48.css.d.ts +20 -0
- package/dist/index49.css +1 -1
- package/dist/index49.css.d.ts +20 -0
- package/dist/index5.css.d.ts +22 -0
- package/dist/index50.css +1 -1
- package/dist/index50.css.d.ts +27 -0
- package/dist/index51.css +1 -1
- package/dist/index51.css.d.ts +17 -0
- package/dist/index52.css +1 -1
- package/dist/index52.css.d.ts +11 -0
- package/dist/index53.css +1 -1
- package/dist/index53.css.d.ts +12 -0
- package/dist/index54.css +1 -1
- package/dist/index54.css.d.ts +14 -0
- package/dist/index55.css +1 -1
- package/dist/index55.css.d.ts +20 -0
- package/dist/index56.css +1 -1
- package/dist/index56.css.d.ts +25 -0
- package/dist/index57.css +1 -1
- package/dist/index57.css.d.ts +13 -0
- package/dist/index58.css.d.ts +12 -0
- package/dist/index59.css.d.ts +20 -0
- package/dist/index6.css.d.ts +19 -0
- package/dist/index60.css.d.ts +20 -0
- package/dist/index61.css.d.ts +18 -0
- package/dist/index62.css.d.ts +22 -0
- package/dist/index63.css.d.ts +28 -0
- package/dist/index64.css.d.ts +26 -0
- package/dist/index65.css.d.ts +19 -0
- package/dist/index7.css.d.ts +40 -0
- package/dist/index8.css.d.ts +32 -0
- package/dist/index9.css.d.ts +9 -0
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +18 -0
- package/dist/main.mjs +55 -53
- package/dist/next/blocks/FormBlock/FormField.cjs +1 -0
- package/dist/next/blocks/FormBlock/FormField.mjs +13 -0
- package/dist/next/blocks/FormBlock/index.cjs +1 -0
- package/dist/next/blocks/FormBlock/index.mjs +192 -0
- package/dist/next/blocks/FormBlock/validate.cjs +1 -0
- package/dist/next/blocks/FormBlock/validate.mjs +76 -0
- package/dist/next.cjs +1 -1
- package/dist/next.d.ts +18 -0
- package/dist/next.mjs +45 -43
- package/dist/styles.css.d.ts +1 -0
- package/dist/tokens.css.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -3,16 +3,16 @@ import { Accordion as t } from "./core/components/Accordion/index.mjs";
|
|
|
3
3
|
import { A as m } from "./AccordionItem-CH19zWNr.js";
|
|
4
4
|
import { Avatar as f } from "./core/components/Avatar/index.mjs";
|
|
5
5
|
import { Badge as i } from "./core/components/Badge/index.mjs";
|
|
6
|
-
import { Box as
|
|
6
|
+
import { Box as l } from "./core/components/Box/index.mjs";
|
|
7
7
|
import { Breadcrumbs as n } from "./core/components/Breadcrumbs/index.mjs";
|
|
8
8
|
import { ButtonGroup as C } from "./core/components/ButtonGroup/index.mjs";
|
|
9
|
-
import { B as
|
|
9
|
+
import { B as s } from "./index-paelIj6o.js";
|
|
10
10
|
import { Card as T } from "./core/components/Card/index.mjs";
|
|
11
11
|
import { Carousel as S } from "./core/components/Carousel/index.mjs";
|
|
12
12
|
import { Checkbox as h } from "./core/components/Checkbox/index.mjs";
|
|
13
13
|
import { Container as R } from "./core/components/Container/index.mjs";
|
|
14
|
-
import { DatePicker as
|
|
15
|
-
import { Divider as
|
|
14
|
+
import { DatePicker as F } from "./core/components/DatePicker/index.mjs";
|
|
15
|
+
import { Divider as P } from "./core/components/Divider/index.mjs";
|
|
16
16
|
import { Drawer as G } from "./core/components/Drawer/index.mjs";
|
|
17
17
|
import { Fieldset as w } from "./core/components/Fieldset/index.mjs";
|
|
18
18
|
import { FileUpload as N } from "./core/components/FileUpload/index.mjs";
|
|
@@ -32,14 +32,14 @@ import { ProgressBar as fo } from "./core/components/ProgressBar/index.mjs";
|
|
|
32
32
|
import { Radio as io } from "./core/components/Radio/index.mjs";
|
|
33
33
|
import { Range as lo } from "./core/components/Range/index.mjs";
|
|
34
34
|
import { Select as Bo } from "./core/components/Select/index.mjs";
|
|
35
|
-
import { Sidebar as
|
|
35
|
+
import { Sidebar as ko } from "./core/components/Sidebar/index.mjs";
|
|
36
36
|
import { Skeleton as uo } from "./core/components/Skeleton/index.mjs";
|
|
37
37
|
import { Spacer as Ao } from "./core/components/Spacer/index.mjs";
|
|
38
38
|
import { Spinner as go } from "./core/components/Spinner/index.mjs";
|
|
39
39
|
import { Stack as vo } from "./core/components/Stack/index.mjs";
|
|
40
40
|
import { Switch as bo } from "./core/components/Switch/index.mjs";
|
|
41
|
-
import { Table as
|
|
42
|
-
import { Tabs as
|
|
41
|
+
import { Table as Lo } from "./core/components/Table/index.mjs";
|
|
42
|
+
import { Tabs as Do } from "./core/components/Tabs/index.mjs";
|
|
43
43
|
import { Text as Ho } from "./core/components/Text/index.mjs";
|
|
44
44
|
import { Textarea as Io } from "./core/components/Textarea/index.mjs";
|
|
45
45
|
import { Tooltip as yo } from "./core/components/Tooltip/index.mjs";
|
|
@@ -56,41 +56,42 @@ import { HeroProvider as er, useHeroContext as tr } from "./next/blocks/HeroBloc
|
|
|
56
56
|
import { LocaleLink as mr } from "./next/ui/LocaleLink/index.mjs";
|
|
57
57
|
import { QuoteBlock as fr } from "./next/blocks/QuoteBlock/index.mjs";
|
|
58
58
|
import { RichTextBlock as ir } from "./next/blocks/RichTextBlock/index.mjs";
|
|
59
|
-
import { RichText as
|
|
59
|
+
import { RichText as lr } from "./next/ui/PortableTextRenderer/index.mjs";
|
|
60
60
|
import { StickyScrollBlock as nr } from "./next/blocks/StickyScrollBlock/index.mjs";
|
|
61
61
|
import { TabsBlock as Cr } from "./next/blocks/TabsBlock/index.mjs";
|
|
62
|
-
import { WasHelpfulBlock as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
62
|
+
import { WasHelpfulBlock as sr } from "./next/blocks/WasHelpfulBlock/index.mjs";
|
|
63
|
+
import { FormBlock as Tr } from "./next/blocks/FormBlock/index.mjs";
|
|
64
|
+
import { SpotlightCard as Sr } from "./next/cards/SpotlightCard/index.mjs";
|
|
65
|
+
import { BlogArticleCard as hr } from "./next/cards/BlogArticleCard/index.mjs";
|
|
66
|
+
import { SpotlightCardAdapter as Rr } from "./next/cards/SpotlightCardAdapter.mjs";
|
|
67
|
+
import { BlogArticleCardAdapter as Fr } from "./next/cards/BlogArticleCardAdapter.mjs";
|
|
68
|
+
import { CARD_REGISTRY as Pr, resolveCard as Dr } from "./next/cards/cardRegistry.mjs";
|
|
69
|
+
import { BioCard as Hr } from "./next/cards/BioCard/index.mjs";
|
|
70
|
+
import { GridCard as Ir } from "./next/cards/GridCard/index.mjs";
|
|
71
|
+
import { ProductCard as yr } from "./next/cards/ProductCard/index.mjs";
|
|
72
|
+
import { ReviewCard as Mr } from "./next/cards/ReviewCard/index.mjs";
|
|
73
|
+
import { SegmentCard as Ur } from "./next/cards/SegmentCard/index.mjs";
|
|
74
|
+
import { ServiceCard as Yr } from "./next/cards/ServiceCard/index.mjs";
|
|
75
|
+
import { TestimonialCard as jr } from "./next/cards/TestimonialCard/index.mjs";
|
|
76
|
+
import { LocaleBridgeProvider as zr, useLocaleBridge as Jr } from "./next/context/LocaleBridge.mjs";
|
|
77
|
+
import { AppThemeProvider as Or, useTheme as Vr } from "./core/context/ThemeContext.mjs";
|
|
78
|
+
import { extractText as Zr, renderCallToAction as $r, renderRichText as oe } from "./next/utils/blockRenderers.mjs";
|
|
78
79
|
export {
|
|
79
80
|
t as Accordion,
|
|
80
81
|
Uo as AccordionBlock,
|
|
81
82
|
m as AccordionItem,
|
|
82
83
|
Yo as AdditionalCategoriesBlock,
|
|
83
|
-
|
|
84
|
+
Or as AppThemeProvider,
|
|
84
85
|
f as Avatar,
|
|
85
86
|
i as Badge,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
Hr as BioCard,
|
|
88
|
+
hr as BlogArticleCard,
|
|
89
|
+
Fr as BlogArticleCardAdapter,
|
|
90
|
+
l as Box,
|
|
90
91
|
n as Breadcrumbs,
|
|
91
|
-
|
|
92
|
+
s as Button,
|
|
92
93
|
C as ButtonGroup,
|
|
93
|
-
|
|
94
|
+
Pr as CARD_REGISTRY,
|
|
94
95
|
T as Card,
|
|
95
96
|
jo as CardGridBlock,
|
|
96
97
|
S as Carousel,
|
|
@@ -98,8 +99,8 @@ export {
|
|
|
98
99
|
h as Checkbox,
|
|
99
100
|
R as Container,
|
|
100
101
|
Ko as ContentBlock,
|
|
101
|
-
|
|
102
|
-
|
|
102
|
+
F as DatePicker,
|
|
103
|
+
P as Divider,
|
|
103
104
|
Vo as DocumentListBlock,
|
|
104
105
|
G as Drawer,
|
|
105
106
|
Zo as FeaturedDocumentsBlock,
|
|
@@ -108,54 +109,55 @@ export {
|
|
|
108
109
|
E as FloatingActionButton,
|
|
109
110
|
Q as Footer,
|
|
110
111
|
W as Form,
|
|
112
|
+
Tr as FormBlock,
|
|
111
113
|
_ as Grid,
|
|
112
|
-
|
|
114
|
+
Ir as GridCard,
|
|
113
115
|
q as Heading,
|
|
114
116
|
or as HeroBlock,
|
|
115
117
|
er as HeroProvider,
|
|
116
118
|
J as Input,
|
|
117
119
|
O as Label,
|
|
118
120
|
X as List,
|
|
119
|
-
|
|
121
|
+
zr as LocaleBridgeProvider,
|
|
120
122
|
mr as LocaleLink,
|
|
121
123
|
$ as Modal,
|
|
122
124
|
ro as Navbar,
|
|
123
125
|
to as Notification,
|
|
124
126
|
mo as NotificationContainer,
|
|
125
|
-
|
|
127
|
+
yr as ProductCard,
|
|
126
128
|
fo as ProgressBar,
|
|
127
129
|
fr as QuoteBlock,
|
|
128
130
|
io as Radio,
|
|
129
131
|
lo as Range,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
+
Mr as ReviewCard,
|
|
133
|
+
lr as RichText,
|
|
132
134
|
ir as RichTextBlock,
|
|
133
|
-
|
|
135
|
+
Ur as SegmentCard,
|
|
134
136
|
Bo as Select,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
+
Yr as ServiceCard,
|
|
138
|
+
ko as Sidebar,
|
|
137
139
|
uo as Skeleton,
|
|
138
140
|
Ao as Spacer,
|
|
139
141
|
go as Spinner,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
Sr as SpotlightCard,
|
|
143
|
+
Rr as SpotlightCardAdapter,
|
|
142
144
|
vo as Stack,
|
|
143
145
|
nr as StickyScrollBlock,
|
|
144
146
|
bo as Switch,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
+
Lo as Table,
|
|
148
|
+
Do as Tabs,
|
|
147
149
|
Cr as TabsBlock,
|
|
148
|
-
|
|
150
|
+
jr as TestimonialCard,
|
|
149
151
|
Ho as Text,
|
|
150
152
|
Io as Textarea,
|
|
151
153
|
Mo as ThemeProvider,
|
|
152
154
|
yo as Tooltip,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
sr as WasHelpfulBlock,
|
|
156
|
+
Zr as extractText,
|
|
157
|
+
$r as renderCallToAction,
|
|
158
|
+
oe as renderRichText,
|
|
159
|
+
Dr as resolveCard,
|
|
158
160
|
tr as useHeroContext,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
+
Jr as useLocaleBridge,
|
|
162
|
+
Vr as useTheme
|
|
161
163
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("../../../core/components/Input/index.cjs");require("../../../core/components/Textarea/index.cjs");require("../../../core/components/Select/index.cjs");require("../../../core/components/Checkbox/index.cjs");require("../../../core/components/Radio/index.cjs");require("../../../core/components/Fieldset/index.cjs");require("../../../core/components/DatePicker/index.cjs");require("../../../core/components/Range/index.cjs");const e=require("../../../FormField-wfYSN1Vd.cjs");exports.FormField=e.FormField;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "react/jsx-runtime";
|
|
2
|
+
import "../../../core/components/Input/index.mjs";
|
|
3
|
+
import "../../../core/components/Textarea/index.mjs";
|
|
4
|
+
import "../../../core/components/Select/index.mjs";
|
|
5
|
+
import "../../../core/components/Checkbox/index.mjs";
|
|
6
|
+
import "../../../core/components/Radio/index.mjs";
|
|
7
|
+
import "../../../core/components/Fieldset/index.mjs";
|
|
8
|
+
import "../../../core/components/DatePicker/index.mjs";
|
|
9
|
+
import "../../../core/components/Range/index.mjs";
|
|
10
|
+
import { F as l } from "../../../FormField-BO1hKjUb.js";
|
|
11
|
+
export {
|
|
12
|
+
l as FormField
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),U=require("../../../core/components/Form/index.cjs"),E=require("../../../index-hPJqlEOh.cjs"),V=require("../../../core/components/ProgressBar/index.cjs"),$=require("../../hooks/useStyleClasses.cjs"),r=require("../../../FormField-wfYSN1Vd.cjs"),_=require("./validate.cjs");function I(t,s){switch(s.type){case"SET_VALUE":return{...t,values:{...t.values,[s.name]:s.value},errors:{...t.errors,[s.name]:""}};case"SET_ERRORS":return{...t,errors:s.errors};case"CLEAR_ERROR":return{...t,errors:{...t.errors,[s.name]:""}};case"NEXT_STEP":return{...t,currentStep:t.currentStep+1,errors:{}};case"PREV_STEP":return{...t,currentStep:t.currentStep-1,errors:{}};case"SET_SUBMITTING":return{...t,isSubmitting:s.value};case"SET_RESULT":return{...t,submitResult:s.result,isSubmitting:!1};case"RESET":return{...t,currentStep:0,errors:{},submitResult:null,isSubmitting:!1};default:return t}}function A({id:t,heading:s,layout:f="vertical",steps:S,submitLabel:B="Submit",nextLabel:x="Next",backLabel:T="Back",successMessage:C="Thank you! Your submission has been received.",errorMessage:y="Something went wrong. Please try again.",styleOptions:R,renderRichText:n,onSubmit:v}){const j=$.useStyleClasses(R??{}),F=i.useMemo(()=>_.buildInitialValues(S),[]),[P,c]=i.useReducer(I,{values:F,errors:{},currentStep:0,isSubmitting:!1,submitResult:null}),{values:u,errors:h,currentStep:m,isSubmitting:b,submitResult:a}=P,p=S.length,k=p>1,N=m===p-1,q=(m+1)/p*100,o=S[m],L=i.useCallback((l,d)=>{c({type:"SET_VALUE",name:l,value:d})},[]),g=i.useCallback(()=>{const l=_.validateStep(o.fields,u);if(Object.keys(l).length>0){c({type:"SET_ERRORS",errors:l});return}c({type:"NEXT_STEP"})},[o.fields,u]),w=i.useCallback(()=>{c({type:"PREV_STEP"})},[]),O=i.useCallback(async()=>{const l=_.validateStep(o.fields,u);if(Object.keys(l).length>0){c({type:"SET_ERRORS",errors:l});return}c({type:"SET_SUBMITTING",value:!0});try{const d=await v(u);c({type:"SET_RESULT",result:d})}catch{c({type:"SET_RESULT",result:{success:!1,message:y}})}},[o.fields,u,v,y]);return a!=null&&a.success?e.jsx("section",{id:t,className:`${r.styles.formBlock} ${j}`,children:e.jsx("div",{className:r.styles.container,children:e.jsxs("div",{className:r.styles.success,children:[e.jsx("p",{children:a.message??C}),e.jsx(E.Button,{as:"button",variant:"secondary",onClick:()=>c({type:"RESET"}),children:"Submit another response"})]})})}):e.jsx("section",{id:t,className:`${r.styles.formBlock} ${j}`,children:e.jsxs("div",{className:r.styles.container,children:[((s==null?void 0:s.title)||(s==null?void 0:s.description))&&e.jsxs("div",{className:r.styles.heading,children:[s.eyebrow&&(n==null?void 0:n({blocks:s.eyebrow,className:r.styles.eyebrow})),s.title&&(n==null?void 0:n({blocks:s.title,className:r.styles.title})),s.description&&(n==null?void 0:n({blocks:s.description}))]}),k&&e.jsxs("div",{className:r.styles.progress,children:[e.jsxs("div",{className:r.styles.progressHeader,children:[e.jsx("span",{className:r.styles.stepLabel,children:o.title}),e.jsxs("span",{className:r.styles.stepCount,children:[m+1," / ",p]})]}),e.jsx(V.ProgressBar,{progress:q,variant:"primary",size:"sm",showLabel:!1})]}),o.description&&e.jsx("p",{className:r.styles.stepDescription,children:o.description}),a&&!a.success&&e.jsx("div",{className:r.styles.errorBanner,role:"alert",children:a.message??y}),e.jsxs(U.Form,{layout:f,noValidate:!0,onSubmit:l=>{l.preventDefault(),N?O():g()},children:[e.jsx("div",{className:r.styles.fields,children:o.fields.map(l=>e.jsx(r.FormField,{field:l,value:u[l.name.current],error:h[l.name.current],onChange:L},l._key))}),e.jsxs("div",{className:r.styles.actions,children:[k&&m>0&&e.jsx(E.Button,{as:"button",type:"button",variant:"secondary",onClick:w,disabled:b,children:T}),e.jsx(E.Button,{as:"button",type:"submit",variant:"primary",disabled:b,className:r.styles.submitButton,children:b?"Submitting…":N?B:x})]})]})]})})}exports.FormBlock=A;
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { jsx as l, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as $, useReducer as A, useCallback as S } from "react";
|
|
3
|
+
import { Form as D } from "../../../core/components/Form/index.mjs";
|
|
4
|
+
import { B as f } from "../../../index-paelIj6o.js";
|
|
5
|
+
import { ProgressBar as G } from "../../../core/components/ProgressBar/index.mjs";
|
|
6
|
+
import { useStyleClasses as M } from "../../hooks/useStyleClasses.mjs";
|
|
7
|
+
import { s as r, F as X } from "../../../FormField-BO1hKjUb.js";
|
|
8
|
+
import { buildInitialValues as z, validateStep as B } from "./validate.mjs";
|
|
9
|
+
function H(e, s) {
|
|
10
|
+
switch (s.type) {
|
|
11
|
+
case "SET_VALUE":
|
|
12
|
+
return {
|
|
13
|
+
...e,
|
|
14
|
+
values: { ...e.values, [s.name]: s.value },
|
|
15
|
+
errors: { ...e.errors, [s.name]: "" }
|
|
16
|
+
};
|
|
17
|
+
case "SET_ERRORS":
|
|
18
|
+
return { ...e, errors: s.errors };
|
|
19
|
+
case "CLEAR_ERROR":
|
|
20
|
+
return {
|
|
21
|
+
...e,
|
|
22
|
+
errors: { ...e.errors, [s.name]: "" }
|
|
23
|
+
};
|
|
24
|
+
case "NEXT_STEP":
|
|
25
|
+
return { ...e, currentStep: e.currentStep + 1, errors: {} };
|
|
26
|
+
case "PREV_STEP":
|
|
27
|
+
return { ...e, currentStep: e.currentStep - 1, errors: {} };
|
|
28
|
+
case "SET_SUBMITTING":
|
|
29
|
+
return { ...e, isSubmitting: s.value };
|
|
30
|
+
case "SET_RESULT":
|
|
31
|
+
return { ...e, submitResult: s.result, isSubmitting: !1 };
|
|
32
|
+
case "RESET":
|
|
33
|
+
return {
|
|
34
|
+
...e,
|
|
35
|
+
currentStep: 0,
|
|
36
|
+
errors: {},
|
|
37
|
+
submitResult: null,
|
|
38
|
+
isSubmitting: !1
|
|
39
|
+
};
|
|
40
|
+
default:
|
|
41
|
+
return e;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function ss({
|
|
45
|
+
id: e,
|
|
46
|
+
heading: s,
|
|
47
|
+
layout: T = "vertical",
|
|
48
|
+
steps: E,
|
|
49
|
+
submitLabel: R = "Submit",
|
|
50
|
+
nextLabel: L = "Next",
|
|
51
|
+
backLabel: h = "Back",
|
|
52
|
+
successMessage: w = "Thank you! Your submission has been received.",
|
|
53
|
+
errorMessage: b = "Something went wrong. Please try again.",
|
|
54
|
+
styleOptions: C,
|
|
55
|
+
renderRichText: a,
|
|
56
|
+
onSubmit: v
|
|
57
|
+
}) {
|
|
58
|
+
const N = M(C ?? {}), P = $(
|
|
59
|
+
() => z(E),
|
|
60
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
|
+
[]
|
|
62
|
+
), [U, o] = A(H, {
|
|
63
|
+
values: P,
|
|
64
|
+
errors: {},
|
|
65
|
+
currentStep: 0,
|
|
66
|
+
isSubmitting: !1,
|
|
67
|
+
submitResult: null
|
|
68
|
+
}), { values: u, errors: V, currentStep: m, isSubmitting: y, submitResult: i } = U, p = E.length, _ = p > 1, k = m === p - 1, O = (m + 1) / p * 100, n = E[m], g = S((t, d) => {
|
|
69
|
+
o({ type: "SET_VALUE", name: t, value: d });
|
|
70
|
+
}, []), F = S(() => {
|
|
71
|
+
const t = B(n.fields, u);
|
|
72
|
+
if (Object.keys(t).length > 0) {
|
|
73
|
+
o({ type: "SET_ERRORS", errors: t });
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
o({ type: "NEXT_STEP" });
|
|
77
|
+
}, [n.fields, u]), I = S(() => {
|
|
78
|
+
o({ type: "PREV_STEP" });
|
|
79
|
+
}, []), j = S(async () => {
|
|
80
|
+
const t = B(n.fields, u);
|
|
81
|
+
if (Object.keys(t).length > 0) {
|
|
82
|
+
o({ type: "SET_ERRORS", errors: t });
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
o({ type: "SET_SUBMITTING", value: !0 });
|
|
86
|
+
try {
|
|
87
|
+
const d = await v(u);
|
|
88
|
+
o({ type: "SET_RESULT", result: d });
|
|
89
|
+
} catch {
|
|
90
|
+
o({
|
|
91
|
+
type: "SET_RESULT",
|
|
92
|
+
result: { success: !1, message: b }
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}, [n.fields, u, v, b]);
|
|
96
|
+
return i != null && i.success ? /* @__PURE__ */ l("section", { id: e, className: `${r.formBlock} ${N}`, children: /* @__PURE__ */ l("div", { className: r.container, children: /* @__PURE__ */ c("div", { className: r.success, children: [
|
|
97
|
+
/* @__PURE__ */ l("p", { children: i.message ?? w }),
|
|
98
|
+
/* @__PURE__ */ l(
|
|
99
|
+
f,
|
|
100
|
+
{
|
|
101
|
+
as: "button",
|
|
102
|
+
variant: "secondary",
|
|
103
|
+
onClick: () => o({ type: "RESET" }),
|
|
104
|
+
children: "Submit another response"
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
] }) }) }) : /* @__PURE__ */ l("section", { id: e, className: `${r.formBlock} ${N}`, children: /* @__PURE__ */ c("div", { className: r.container, children: [
|
|
108
|
+
((s == null ? void 0 : s.title) || (s == null ? void 0 : s.description)) && /* @__PURE__ */ c("div", { className: r.heading, children: [
|
|
109
|
+
s.eyebrow && (a == null ? void 0 : a({
|
|
110
|
+
blocks: s.eyebrow,
|
|
111
|
+
className: r.eyebrow
|
|
112
|
+
})),
|
|
113
|
+
s.title && (a == null ? void 0 : a({
|
|
114
|
+
blocks: s.title,
|
|
115
|
+
className: r.title
|
|
116
|
+
})),
|
|
117
|
+
s.description && (a == null ? void 0 : a({
|
|
118
|
+
blocks: s.description
|
|
119
|
+
}))
|
|
120
|
+
] }),
|
|
121
|
+
_ && /* @__PURE__ */ c("div", { className: r.progress, children: [
|
|
122
|
+
/* @__PURE__ */ c("div", { className: r.progressHeader, children: [
|
|
123
|
+
/* @__PURE__ */ l("span", { className: r.stepLabel, children: n.title }),
|
|
124
|
+
/* @__PURE__ */ c("span", { className: r.stepCount, children: [
|
|
125
|
+
m + 1,
|
|
126
|
+
" / ",
|
|
127
|
+
p
|
|
128
|
+
] })
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ l(
|
|
131
|
+
G,
|
|
132
|
+
{
|
|
133
|
+
progress: O,
|
|
134
|
+
variant: "primary",
|
|
135
|
+
size: "sm",
|
|
136
|
+
showLabel: !1
|
|
137
|
+
}
|
|
138
|
+
)
|
|
139
|
+
] }),
|
|
140
|
+
n.description && /* @__PURE__ */ l("p", { className: r.stepDescription, children: n.description }),
|
|
141
|
+
i && !i.success && /* @__PURE__ */ l("div", { className: r.errorBanner, role: "alert", children: i.message ?? b }),
|
|
142
|
+
/* @__PURE__ */ c(
|
|
143
|
+
D,
|
|
144
|
+
{
|
|
145
|
+
layout: T,
|
|
146
|
+
noValidate: !0,
|
|
147
|
+
onSubmit: (t) => {
|
|
148
|
+
t.preventDefault(), k ? j() : F();
|
|
149
|
+
},
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ l("div", { className: r.fields, children: n.fields.map((t) => /* @__PURE__ */ l(
|
|
152
|
+
X,
|
|
153
|
+
{
|
|
154
|
+
field: t,
|
|
155
|
+
value: u[t.name.current],
|
|
156
|
+
error: V[t.name.current],
|
|
157
|
+
onChange: g
|
|
158
|
+
},
|
|
159
|
+
t._key
|
|
160
|
+
)) }),
|
|
161
|
+
/* @__PURE__ */ c("div", { className: r.actions, children: [
|
|
162
|
+
_ && m > 0 && /* @__PURE__ */ l(
|
|
163
|
+
f,
|
|
164
|
+
{
|
|
165
|
+
as: "button",
|
|
166
|
+
type: "button",
|
|
167
|
+
variant: "secondary",
|
|
168
|
+
onClick: I,
|
|
169
|
+
disabled: y,
|
|
170
|
+
children: h
|
|
171
|
+
}
|
|
172
|
+
),
|
|
173
|
+
/* @__PURE__ */ l(
|
|
174
|
+
f,
|
|
175
|
+
{
|
|
176
|
+
as: "button",
|
|
177
|
+
type: "submit",
|
|
178
|
+
variant: "primary",
|
|
179
|
+
disabled: y,
|
|
180
|
+
className: r.submitButton,
|
|
181
|
+
children: y ? "Submitting…" : k ? R : L
|
|
182
|
+
}
|
|
183
|
+
)
|
|
184
|
+
] })
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
] }) });
|
|
189
|
+
}
|
|
190
|
+
export {
|
|
191
|
+
ss as FormBlock
|
|
192
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function s(e,t){const n=e.label||e.name.current;if(e.required){if(t==null||t==="")return`${n} is required`;if(Array.isArray(t)&&t.length===0)return`${n} is required`;if(typeof t=="boolean"&&t===!1&&e.fieldType==="checkbox")return`${n} must be checked`}if(t==null||t==="")return null;const r=String(t);if(e.minLength&&r.length<e.minLength)return`${n} must be at least ${e.minLength} characters`;if(e.maxLength&&r.length>e.maxLength)return`${n} must be no more than ${e.maxLength} characters`;if(e.fieldType==="email"&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(r))return`${n} must be a valid email address`;if(e.fieldType==="url")try{new URL(r)}catch{return`${n} must be a valid URL`}if(e.fieldType==="phone"&&!/^[+\d\s\-().]{7,}$/.test(r))return`${n} must be a valid phone number`;if(e.pattern)try{if(!new RegExp(e.pattern).test(r))return e.patternMessage||`${n} is invalid`}catch{}return null}function c(e,t){const n={};for(const r of e){const a=r.name.current,i=s(r,t[a]);i&&(n[a]=i)}return n}function o(e,t){return e.reduce((n,r)=>({...n,...c(r.fields,t)}),{})}function u(e){const t={};for(const n of e)for(const r of n.fields){const a=r.name.current;switch(r.fieldType){case"checkbox":t[a]=!1;break;case"checkboxGroup":case"multiselect":t[a]=[];break;case"range":t[a]=r.rangeMin??0;break;case"hidden":t[a]=r.hiddenValue??"";break;default:t[a]=r.defaultValue??""}}return t}exports.buildInitialValues=u;exports.validateField=s;exports.validateForm=o;exports.validateStep=c;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
function i(e, t) {
|
|
2
|
+
const r = e.label || e.name.current;
|
|
3
|
+
if (e.required) {
|
|
4
|
+
if (t == null || t === "")
|
|
5
|
+
return `${r} is required`;
|
|
6
|
+
if (Array.isArray(t) && t.length === 0)
|
|
7
|
+
return `${r} is required`;
|
|
8
|
+
if (typeof t == "boolean" && t === !1 && e.fieldType === "checkbox")
|
|
9
|
+
return `${r} must be checked`;
|
|
10
|
+
}
|
|
11
|
+
if (t == null || t === "") return null;
|
|
12
|
+
const n = String(t);
|
|
13
|
+
if (e.minLength && n.length < e.minLength)
|
|
14
|
+
return `${r} must be at least ${e.minLength} characters`;
|
|
15
|
+
if (e.maxLength && n.length > e.maxLength)
|
|
16
|
+
return `${r} must be no more than ${e.maxLength} characters`;
|
|
17
|
+
if (e.fieldType === "email" && !/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n))
|
|
18
|
+
return `${r} must be a valid email address`;
|
|
19
|
+
if (e.fieldType === "url")
|
|
20
|
+
try {
|
|
21
|
+
new URL(n);
|
|
22
|
+
} catch {
|
|
23
|
+
return `${r} must be a valid URL`;
|
|
24
|
+
}
|
|
25
|
+
if (e.fieldType === "phone" && !/^[+\d\s\-().]{7,}$/.test(n))
|
|
26
|
+
return `${r} must be a valid phone number`;
|
|
27
|
+
if (e.pattern)
|
|
28
|
+
try {
|
|
29
|
+
if (!new RegExp(e.pattern).test(n))
|
|
30
|
+
return e.patternMessage || `${r} is invalid`;
|
|
31
|
+
} catch {
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
function c(e, t) {
|
|
36
|
+
const r = {};
|
|
37
|
+
for (const n of e) {
|
|
38
|
+
const a = n.name.current, s = i(n, t[a]);
|
|
39
|
+
s && (r[a] = s);
|
|
40
|
+
}
|
|
41
|
+
return r;
|
|
42
|
+
}
|
|
43
|
+
function o(e, t) {
|
|
44
|
+
return e.reduce((r, n) => ({ ...r, ...c(n.fields, t) }), {});
|
|
45
|
+
}
|
|
46
|
+
function u(e) {
|
|
47
|
+
const t = {};
|
|
48
|
+
for (const r of e)
|
|
49
|
+
for (const n of r.fields) {
|
|
50
|
+
const a = n.name.current;
|
|
51
|
+
switch (n.fieldType) {
|
|
52
|
+
case "checkbox":
|
|
53
|
+
t[a] = !1;
|
|
54
|
+
break;
|
|
55
|
+
case "checkboxGroup":
|
|
56
|
+
case "multiselect":
|
|
57
|
+
t[a] = [];
|
|
58
|
+
break;
|
|
59
|
+
case "range":
|
|
60
|
+
t[a] = n.rangeMin ?? 0;
|
|
61
|
+
break;
|
|
62
|
+
case "hidden":
|
|
63
|
+
t[a] = n.hiddenValue ?? "";
|
|
64
|
+
break;
|
|
65
|
+
default:
|
|
66
|
+
t[a] = n.defaultValue ?? "";
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return t;
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
u as buildInitialValues,
|
|
73
|
+
i as validateField,
|
|
74
|
+
o as validateForm,
|
|
75
|
+
c as validateStep
|
|
76
|
+
};
|
package/dist/next.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./next/blocks/AccordionBlock/index.cjs"),n=require("./next/blocks/AdditionalCategoriesBlock/index.cjs"),d=require("./next/blocks/CardGridBlock/index.cjs"),l=require("./next/blocks/CarouselBlock/index.cjs"),a=require("./next/blocks/ContentBlock/index.cjs"),s=require("./next/blocks/DocumentListBlock/index.cjs"),_=require("./next/blocks/FeaturedDocumentsBlock/index.cjs"),x=require("./next/blocks/HeroBlock/index.cjs"),r=require("./next/blocks/HeroBlock/HeroContext.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./next/blocks/AccordionBlock/index.cjs"),n=require("./next/blocks/AdditionalCategoriesBlock/index.cjs"),d=require("./next/blocks/CardGridBlock/index.cjs"),l=require("./next/blocks/CarouselBlock/index.cjs"),a=require("./next/blocks/ContentBlock/index.cjs"),s=require("./next/blocks/DocumentListBlock/index.cjs"),_=require("./next/blocks/FeaturedDocumentsBlock/index.cjs"),x=require("./next/blocks/HeroBlock/index.cjs"),r=require("./next/blocks/HeroBlock/HeroContext.cjs"),k=require("./next/ui/LocaleLink/index.cjs"),u=require("./next/blocks/QuoteBlock/index.cjs"),B=require("./next/blocks/RichTextBlock/index.cjs"),C=require("./next/ui/PortableTextRenderer/index.cjs"),q=require("./next/blocks/StickyScrollBlock/index.cjs"),g=require("./next/blocks/TabsBlock/index.cjs"),T=require("./next/blocks/WasHelpfulBlock/index.cjs"),A=require("./next/blocks/FormBlock/index.cjs"),b=require("./next/cards/SpotlightCard/index.cjs"),S=require("./next/cards/BlogArticleCard/index.cjs"),m=require("./next/cards/SpotlightCardAdapter.cjs"),p=require("./next/cards/BlogArticleCardAdapter.cjs"),o=require("./next/cards/cardRegistry.cjs"),R=require("./next/cards/BioCard/index.cjs"),h=require("./next/cards/GridCard/index.cjs"),v=require("./next/cards/ProductCard/index.cjs"),L=require("./next/cards/ReviewCard/index.cjs"),H=require("./next/cards/SegmentCard/index.cjs"),P=require("./next/cards/ServiceCard/index.cjs"),D=require("./next/cards/TestimonialCard/index.cjs"),t=require("./next/context/LocaleBridge.cjs"),c=require("./core/context/ThemeContext.cjs"),e=require("./next/utils/blockRenderers.cjs");exports.AccordionBlock=i.AccordionBlock;exports.AdditionalCategoriesBlock=n.AdditionalCategoriesBlock;exports.CardGridBlock=d.CardGridBlock;exports.CarouselBlock=l.CarouselBlock;exports.ContentBlock=a.ContentBlock;exports.DocumentListBlock=s.DocumentListBlock;exports.FeaturedDocumentsBlock=_.FeaturedDocumentsBlock;exports.HeroBlock=x.HeroBlock;exports.HeroProvider=r.HeroProvider;exports.useHeroContext=r.useHeroContext;exports.LocaleLink=k.LocaleLink;exports.QuoteBlock=u.QuoteBlock;exports.RichTextBlock=B.RichTextBlock;exports.RichText=C.RichText;exports.StickyScrollBlock=q.StickyScrollBlock;exports.TabsBlock=g.TabsBlock;exports.WasHelpfulBlock=T.WasHelpfulBlock;exports.FormBlock=A.FormBlock;exports.SpotlightCard=b.SpotlightCard;exports.BlogArticleCard=S.BlogArticleCard;exports.SpotlightCardAdapter=m.SpotlightCardAdapter;exports.BlogArticleCardAdapter=p.BlogArticleCardAdapter;exports.CARD_REGISTRY=o.CARD_REGISTRY;exports.resolveCard=o.resolveCard;exports.BioCard=R.BioCard;exports.GridCard=h.GridCard;exports.ProductCard=v.ProductCard;exports.ReviewCard=L.ReviewCard;exports.SegmentCard=H.SegmentCard;exports.ServiceCard=P.ServiceCard;exports.TestimonialCard=D.TestimonialCard;exports.LocaleBridgeProvider=t.LocaleBridgeProvider;exports.useLocaleBridge=t.useLocaleBridge;exports.AppThemeProvider=c.AppThemeProvider;exports.useTheme=c.useTheme;exports.extractText=e.extractText;exports.renderCallToAction=e.renderCallToAction;exports.renderRichText=e.renderRichText;
|
package/dist/next.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ import { DocumentListBlockProps } from './next/blocks/DocumentListBlock/Document
|
|
|
14
14
|
import { DocumentListBlockProps as DocumentListBlockProps_2 } from './DocumentListBlock.types';
|
|
15
15
|
import { FeaturedDocumentsBlockProps } from './next/blocks/FeaturedDocumentsBlock/FeaturedDocumentsBlock.types';
|
|
16
16
|
import { FeaturedDocumentsBlockProps as FeaturedDocumentsBlockProps_2 } from './FeaturedDocumentsBlock.types';
|
|
17
|
+
import { FormBlockProps } from './next/blocks/FormBlock/FormBlock.types';
|
|
18
|
+
import { FormBlockProps as FormBlockProps_2 } from './FormBlock.types';
|
|
19
|
+
import { FormField } from './next/blocks/FormBlock/FormBlock.types';
|
|
20
|
+
import { FormStep } from './next/blocks/FormBlock/FormBlock.types';
|
|
21
|
+
import { FormValue } from './next/blocks/FormBlock/FormBlock.types';
|
|
17
22
|
import { HeroBlockProps } from './next/blocks/HeroBlock/HeroBlock.types';
|
|
18
23
|
import { HeroBlockProps as HeroBlockProps_2 } from './HeroBlock.types';
|
|
19
24
|
import { ItemType } from '../../sanity/types/item';
|
|
@@ -34,6 +39,7 @@ import { RichTextBlockProps as RichTextBlockProps_2 } from './RichTextBlock.type
|
|
|
34
39
|
import { SanitySpotlight } from '../../../sanity/types/spotlight';
|
|
35
40
|
import { StickyScrollBlockProps } from './next/blocks/StickyScrollBlock/StickyScrollBlock.types';
|
|
36
41
|
import { StickyScrollBlockProps as StickyScrollBlockProps_2 } from './StickyScrollBlock.types';
|
|
42
|
+
import { SubmitResult } from './next/blocks/FormBlock/FormBlock.types';
|
|
37
43
|
import { TabsBlockProps } from './next/blocks/TabsBlock/TabsBlock.types';
|
|
38
44
|
import { TabsBlockProps as TabsBlockProps_2 } from './TabsBlock.types';
|
|
39
45
|
import { WasHelpfulBlockProps } from './next/blocks/WasHelpfulBlock/WasHelpful.types';
|
|
@@ -162,6 +168,16 @@ export declare function FeaturedDocumentsBlock({ heading, selectionMode, layout,
|
|
|
162
168
|
|
|
163
169
|
export { FeaturedDocumentsBlockProps }
|
|
164
170
|
|
|
171
|
+
export declare function FormBlock({ id, heading, layout, steps, submitLabel, nextLabel, backLabel, successMessage, errorMessage, styleOptions, renderRichText, onSubmit, }: FormBlockProps_2): JSX.Element;
|
|
172
|
+
|
|
173
|
+
export { FormBlockProps }
|
|
174
|
+
|
|
175
|
+
export { FormField }
|
|
176
|
+
|
|
177
|
+
export { FormStep }
|
|
178
|
+
|
|
179
|
+
export { FormValue }
|
|
180
|
+
|
|
165
181
|
export declare function GridCard({ style, variant, metricValue, eyebrow, title, description, image, icon, callToAction, onHover, onLeave, gridArea, styleOptions, renderImage, renderRichText, }: GridCardProps): JSX.Element;
|
|
166
182
|
|
|
167
183
|
declare type GridCardProps = ItemType_2 & {
|
|
@@ -352,6 +368,8 @@ export declare function StickyScrollBlock({ heading, items, showNumbers, styleOp
|
|
|
352
368
|
|
|
353
369
|
export { StickyScrollBlockProps }
|
|
354
370
|
|
|
371
|
+
export { SubmitResult }
|
|
372
|
+
|
|
355
373
|
export declare function TabsBlock({ heading, image, items, callToAction, styleOptions, renderRichText, renderCallToAction, renderImage, }: TabsBlockProps_2): JSX.Element | null;
|
|
356
374
|
|
|
357
375
|
export { TabsBlockProps }
|