@jotul/jotul-widgets 0.0.4 → 1.0.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/README.md +7 -0
- package/dist/JotulWidget.css +1 -253
- package/dist/JotulWidget.d.ts +7 -35
- package/dist/JotulWidget.js +216 -149
- package/dist/api.d.ts +7 -0
- package/dist/api.js +118 -0
- package/dist/components/DealerCardSkeleton.d.ts +2 -0
- package/dist/components/DealerCardSkeleton.js +6 -0
- package/dist/components/FinderSearchRowSkeleton.d.ts +2 -0
- package/dist/components/FinderSearchRowSkeleton.js +6 -0
- package/dist/components/InquiryField.d.ts +10 -0
- package/dist/components/InquiryField.js +7 -0
- package/dist/components/ProductPageWidget.d.ts +26 -0
- package/dist/components/ProductPageWidget.js +16 -0
- package/dist/components/product-page/DealerList.d.ts +11 -0
- package/dist/components/product-page/DealerList.js +15 -0
- package/dist/components/product-page/InquiryForm.d.ts +12 -0
- package/dist/components/product-page/InquiryForm.js +14 -0
- package/dist/components/product-page/LocationSearch.d.ts +15 -0
- package/dist/components/product-page/LocationSearch.js +31 -0
- package/dist/components/product-page/StatusBanner.d.ts +6 -0
- package/dist/components/product-page/StatusBanner.js +8 -0
- package/dist/constants.d.ts +3 -0
- package/dist/constants.js +3 -0
- package/dist/i18n/widgetStrings.d.ts +39 -0
- package/dist/i18n/widgetStrings.js +87 -0
- package/dist/icons/ArrowRightIcon.d.ts +5 -0
- package/dist/icons/ArrowRightIcon.js +4 -0
- package/dist/icons/ButtonSpinner.d.ts +5 -0
- package/dist/icons/ButtonSpinner.js +4 -0
- package/dist/icons/PinIcon.d.ts +5 -0
- package/dist/icons/PinIcon.js +4 -0
- package/dist/icons/TelephoneIcon.d.ts +5 -0
- package/dist/icons/TelephoneIcon.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +59 -0
- package/dist/types.js +1 -0
- package/dist/utils.d.ts +13 -0
- package/dist/utils.js +75 -0
- package/dist/widgets/ProductPageWidget.d.ts +1 -0
- package/dist/widgets/ProductPageWidget.js +1 -0
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -9,6 +9,13 @@ It calls a partner-local backend route, for example:
|
|
|
9
9
|
- partner server route -> `@jotul/jotul-api`
|
|
10
10
|
- `@jotul/jotul-api` -> `https://api.jotul.com/api/v1/find-dealer`
|
|
11
11
|
|
|
12
|
+
## Styling
|
|
13
|
+
|
|
14
|
+
Styles are built into the published bundle as `dist/JotulWidget.css`. The component imports that file for you.
|
|
15
|
+
|
|
16
|
+
- **Partners do not need Tailwind** in their app for the widget to look correct.
|
|
17
|
+
- Utilities are compiled with Tailwind’s **`jwi-` prefix**, so they will not clash with a host app that also uses Tailwind.
|
|
18
|
+
|
|
12
19
|
## Example
|
|
13
20
|
|
|
14
21
|
```tsx
|
package/dist/JotulWidget.css
CHANGED
|
@@ -1,253 +1 @@
|
|
|
1
|
-
.jwi-
|
|
2
|
-
width: 100%;
|
|
3
|
-
color: #111111;
|
|
4
|
-
font-family:
|
|
5
|
-
Inter,
|
|
6
|
-
ui-sans-serif,
|
|
7
|
-
system-ui,
|
|
8
|
-
-apple-system,
|
|
9
|
-
BlinkMacSystemFont,
|
|
10
|
-
"Segoe UI",
|
|
11
|
-
sans-serif;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.jwi-shell {
|
|
15
|
-
width: 100%;
|
|
16
|
-
border: 1px solid #e9e5dc;
|
|
17
|
-
border-radius: 32px;
|
|
18
|
-
background: #f8f6f2;
|
|
19
|
-
padding: 16px;
|
|
20
|
-
box-shadow: 0 6px 20px rgba(17, 17, 17, 0.04);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.jwi-searchBox {
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
border: 1px solid #d8d2c7;
|
|
26
|
-
border-radius: 24px;
|
|
27
|
-
background: #ffffff;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.jwi-searchRow {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.jwi-inputWrap {
|
|
36
|
-
display: flex;
|
|
37
|
-
min-width: 0;
|
|
38
|
-
flex: 1;
|
|
39
|
-
align-items: center;
|
|
40
|
-
gap: 12px;
|
|
41
|
-
padding: 16px 20px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.jwi-pin {
|
|
45
|
-
display: inline-flex;
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
color: #000000;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.jwi-input {
|
|
51
|
-
width: 100%;
|
|
52
|
-
border: 0;
|
|
53
|
-
background: transparent;
|
|
54
|
-
color: #111111;
|
|
55
|
-
font-size: 16px;
|
|
56
|
-
line-height: 1.4;
|
|
57
|
-
outline: none;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.jwi-input::placeholder {
|
|
61
|
-
color: #767676;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.jwi-findButton {
|
|
65
|
-
min-height: 64px;
|
|
66
|
-
border: 0;
|
|
67
|
-
background: #000000;
|
|
68
|
-
padding: 0 32px;
|
|
69
|
-
color: #ffffff;
|
|
70
|
-
font-size: 16px;
|
|
71
|
-
font-weight: 500;
|
|
72
|
-
cursor: pointer;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.jwi-findButton:hover {
|
|
76
|
-
background: #1f1f1f;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.jwi-findButton:disabled {
|
|
80
|
-
cursor: not-allowed;
|
|
81
|
-
background: #444444;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.jwi-error {
|
|
85
|
-
margin-top: 16px;
|
|
86
|
-
border: 1px solid #f0c7c2;
|
|
87
|
-
border-radius: 16px;
|
|
88
|
-
background: #fff3f1;
|
|
89
|
-
padding: 12px 16px;
|
|
90
|
-
color: #8f2d21;
|
|
91
|
-
font-size: 14px;
|
|
92
|
-
line-height: 1.4;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.jwi-results {
|
|
96
|
-
margin-top: 20px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.jwi-resultsHeader {
|
|
100
|
-
border-bottom: 1px solid #e6e1d7;
|
|
101
|
-
padding-bottom: 16px;
|
|
102
|
-
color: #111111;
|
|
103
|
-
font-size: 16px;
|
|
104
|
-
font-weight: 500;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.jwi-resultsList {
|
|
108
|
-
margin-top: 20px;
|
|
109
|
-
display: flex;
|
|
110
|
-
max-height: 700px;
|
|
111
|
-
flex-direction: column;
|
|
112
|
-
gap: 16px;
|
|
113
|
-
overflow-y: auto;
|
|
114
|
-
padding-right: 4px;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.jwi-card {
|
|
118
|
-
border: 1px solid #e6e1d7;
|
|
119
|
-
border-radius: 24px;
|
|
120
|
-
background: #ffffff;
|
|
121
|
-
padding: 20px;
|
|
122
|
-
box-shadow: 0 1px 2px rgba(17, 17, 17, 0.03);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.jwi-cardTop {
|
|
126
|
-
display: flex;
|
|
127
|
-
align-items: flex-start;
|
|
128
|
-
justify-content: space-between;
|
|
129
|
-
gap: 16px;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.jwi-cardTitleWrap {
|
|
133
|
-
max-width: 70%;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.jwi-cardTitle {
|
|
137
|
-
margin: 0;
|
|
138
|
-
color: #111111;
|
|
139
|
-
font-size: 22px;
|
|
140
|
-
font-weight: 600;
|
|
141
|
-
line-height: 1.15;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
.jwi-distance {
|
|
145
|
-
border-radius: 9999px;
|
|
146
|
-
background: #fbf3db;
|
|
147
|
-
padding: 8px 16px;
|
|
148
|
-
color: #111111;
|
|
149
|
-
font-size: 20px;
|
|
150
|
-
font-weight: 500;
|
|
151
|
-
line-height: 1;
|
|
152
|
-
white-space: nowrap;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.jwi-address {
|
|
156
|
-
margin-top: 20px;
|
|
157
|
-
display: flex;
|
|
158
|
-
flex-direction: column;
|
|
159
|
-
gap: 4px;
|
|
160
|
-
color: #111111;
|
|
161
|
-
font-size: 18px;
|
|
162
|
-
line-height: 1.15;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.jwi-cardActions {
|
|
166
|
-
margin-top: 24px;
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-direction: column;
|
|
169
|
-
gap: 16px;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.jwi-cta {
|
|
173
|
-
display: inline-flex;
|
|
174
|
-
min-height: 70px;
|
|
175
|
-
width: 100%;
|
|
176
|
-
align-items: center;
|
|
177
|
-
justify-content: space-between;
|
|
178
|
-
border: 0;
|
|
179
|
-
border-radius: 16px;
|
|
180
|
-
background: #ef2b18;
|
|
181
|
-
padding: 0 28px;
|
|
182
|
-
color: #ffffff;
|
|
183
|
-
font-size: 18px;
|
|
184
|
-
font-weight: 500;
|
|
185
|
-
cursor: pointer;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.jwi-cta:hover {
|
|
189
|
-
background: #d92817;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.jwi-phoneLink {
|
|
193
|
-
display: inline-flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
gap: 12px;
|
|
196
|
-
color: #111111;
|
|
197
|
-
font-size: 18px;
|
|
198
|
-
font-weight: 500;
|
|
199
|
-
text-decoration: none;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.jwi-phoneLink:hover {
|
|
203
|
-
text-decoration: underline;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
.jwi-icon16 {
|
|
207
|
-
width: 16px;
|
|
208
|
-
height: 16px;
|
|
209
|
-
flex-shrink: 0;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.jwi-icon22 {
|
|
213
|
-
width: 22px;
|
|
214
|
-
height: 22px;
|
|
215
|
-
flex-shrink: 0;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.jwi-loading,
|
|
219
|
-
.jwi-message {
|
|
220
|
-
color: #111111;
|
|
221
|
-
font-family:
|
|
222
|
-
Inter,
|
|
223
|
-
ui-sans-serif,
|
|
224
|
-
system-ui,
|
|
225
|
-
-apple-system,
|
|
226
|
-
BlinkMacSystemFont,
|
|
227
|
-
"Segoe UI",
|
|
228
|
-
sans-serif;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
@media (min-width: 768px) {
|
|
232
|
-
.jwi-shell {
|
|
233
|
-
padding: 24px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.jwi-searchRow {
|
|
237
|
-
flex-direction: row;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
.jwi-inputWrap {
|
|
241
|
-
padding: 16px 24px;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.jwi-cardActions {
|
|
245
|
-
flex-direction: row;
|
|
246
|
-
align-items: center;
|
|
247
|
-
justify-content: space-between;
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
.jwi-cta {
|
|
251
|
-
width: 390px;
|
|
252
|
-
}
|
|
253
|
-
}
|
|
1
|
+
.jwi-pointer-events-none{pointer-events:none}.jwi-absolute{position:absolute}.jwi-relative{position:relative}.jwi-bottom-0{bottom:0}.jwi-left-0{left:0}.jwi-right-0{right:0}.jwi-z-20{z-index:20}.jwi-m-0{margin:0}.jwi--mx-6{margin-left:-1.5rem;margin-right:-1.5rem}.jwi-mb-3{margin-bottom:.75rem}.jwi-mr-\[-12px\]{margin-right:-12px}.jwi-mt-1{margin-top:.25rem}.jwi-mt-2{margin-top:.5rem}.jwi-mt-3{margin-top:.75rem}.jwi-mt-4{margin-top:1rem}.jwi-box-border{box-sizing:border-box}.jwi-flex{display:flex}.jwi-inline-flex{display:inline-flex}.jwi-h-10{height:2.5rem}.jwi-h-12{height:3rem}.jwi-h-3\.5{height:.875rem}.jwi-h-4{height:1rem}.jwi-h-5{height:1.25rem}.jwi-h-6{height:1.5rem}.jwi-h-\[14px\]{height:14px}.jwi-h-\[18px\]{height:18px}.jwi-h-\[22px\]{height:22px}.jwi-h-\[60px\]{height:60px}.jwi-max-h-\[min\(60vh\,480px\)\]{max-height:min(60vh,480px)}.jwi-min-h-\[48px\]{min-height:48px}.jwi-min-h-\[56px\]{min-height:56px}.jwi-w-14{width:3.5rem}.jwi-w-2\/3{width:66.666667%}.jwi-w-24{width:6rem}.jwi-w-28{width:7rem}.jwi-w-3\.5{width:.875rem}.jwi-w-4{width:1rem}.jwi-w-48{width:12rem}.jwi-w-5{width:1.25rem}.jwi-w-\[14px\]{width:14px}.jwi-w-\[18px\]{width:18px}.jwi-w-\[22px\]{width:22px}.jwi-w-\[540px\]{width:540px}.jwi-w-auto{width:auto}.jwi-w-fit{width:-moz-fit-content;width:fit-content}.jwi-w-full{width:100%}.jwi-min-w-0{min-width:0}.jwi-max-w-\[220px\]{max-width:220px}.jwi-max-w-\[70\%\]{max-width:70%}.jwi-max-w-\[calc\(100\%-5rem\)\]{max-width:calc(100% - 5rem)}.jwi-max-w-full{max-width:100%}.jwi-flex-1{flex:1 1 0%}.jwi-flex-shrink-0,.jwi-shrink-0{flex-shrink:0}@keyframes jwi-pulse{50%{opacity:.5}}.jwi-animate-pulse{animation:jwi-pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes jwi-spin{to{transform:rotate(1turn)}}.jwi-animate-spin{animation:jwi-spin 1s linear infinite}.jwi-cursor-pointer{cursor:pointer}.jwi-resize-y{resize:vertical}.jwi-flex-row{flex-direction:row}.jwi-flex-col{flex-direction:column}.jwi-items-start{align-items:flex-start}.jwi-items-center{align-items:center}.jwi-items-stretch{align-items:stretch}.jwi-justify-center{justify-content:center}.jwi-justify-between{justify-content:space-between}.jwi-gap-0\.5{gap:.125rem}.jwi-gap-1\.5{gap:.375rem}.jwi-gap-2{gap:.5rem}.jwi-gap-3{gap:.75rem}.jwi-gap-4{gap:1rem}.jwi-space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem*(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem*var(--tw-space-y-reverse))}.jwi-self-stretch{align-self:stretch}.jwi-overflow-hidden{overflow:hidden}.jwi-overflow-y-auto{overflow-y:auto}.jwi-whitespace-nowrap{white-space:nowrap}.jwi-break-all{word-break:break-all}.jwi-rounded-\[10px\]{border-radius:10px}.jwi-rounded-full{border-radius:9999px}.jwi-border{border-width:1px}.jwi-border-0{border-width:0}.jwi-border-b{border-bottom-width:1px}.jwi-border-\[\#b7e5c2\]{--tw-border-opacity:1;border-color:rgb(183 229 194/var(--tw-border-opacity,1))}.jwi-border-\[\#d8d2c7\]{--tw-border-opacity:1;border-color:rgb(216 210 199/var(--tw-border-opacity,1))}.jwi-border-\[\#e6e1d7\]{--tw-border-opacity:1;border-color:rgb(230 225 215/var(--tw-border-opacity,1))}.jwi-border-\[\#f0c7c2\]{--tw-border-opacity:1;border-color:rgb(240 199 194/var(--tw-border-opacity,1))}.jwi-bg-\[\#FCFCFC\]{--tw-bg-opacity:1;background-color:rgb(252 252 252/var(--tw-bg-opacity,1))}.jwi-bg-\[\#ece8df\]{--tw-bg-opacity:1;background-color:rgb(236 232 223/var(--tw-bg-opacity,1))}.jwi-bg-\[\#eefbf2\]{--tw-bg-opacity:1;background-color:rgb(238 251 242/var(--tw-bg-opacity,1))}.jwi-bg-\[\#ef2b18\]{--tw-bg-opacity:1;background-color:rgb(239 43 24/var(--tw-bg-opacity,1))}.jwi-bg-\[\#f7f5ef\]{--tw-bg-opacity:1;background-color:rgb(247 245 239/var(--tw-bg-opacity,1))}.jwi-bg-\[\#fbf3db\]{--tw-bg-opacity:1;background-color:rgb(251 243 219/var(--tw-bg-opacity,1))}.jwi-bg-\[\#fff3f1\]{--tw-bg-opacity:1;background-color:rgb(255 243 241/var(--tw-bg-opacity,1))}.jwi-bg-transparent{background-color:transparent}.jwi-bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.jwi-bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.jwi-from-white{--tw-gradient-from:#fff var(--tw-gradient-from-position);--tw-gradient-to:hsla(0,0%,100%,0) var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-from),var(--tw-gradient-to)}.jwi-to-transparent{--tw-gradient-to:transparent var(--tw-gradient-to-position)}.jwi-p-0{padding:0}.jwi-p-4{padding:1rem}.jwi-p-6{padding:1.5rem}.jwi-px-2\.5{padding-left:.625rem;padding-right:.625rem}.jwi-px-4{padding-left:1rem;padding-right:1rem}.jwi-px-5{padding-left:1.25rem;padding-right:1.25rem}.jwi-px-6{padding-left:1.5rem;padding-right:1.5rem}.jwi-px-7{padding-left:1.75rem;padding-right:1.75rem}.jwi-py-1{padding-top:.25rem;padding-bottom:.25rem}.jwi-py-3{padding-top:.75rem;padding-bottom:.75rem}.jwi-py-4{padding-top:1rem;padding-bottom:1rem}.jwi-py-8{padding-top:2rem;padding-bottom:2rem}.jwi-pb-3{padding-bottom:.75rem}.jwi-pl-5{padding-left:1.25rem}.jwi-pr-1{padding-right:.25rem}.jwi-pr-3{padding-right:.75rem}.jwi-pr-\[12px\]{padding-right:12px}.jwi-text-left{text-align:left}.jwi-font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.jwi-text-\[14px\]{font-size:14px}.jwi-text-base{font-size:1rem;line-height:1.5rem}.jwi-text-sm{font-size:.875rem;line-height:1.25rem}.jwi-text-xs{font-size:.75rem;line-height:1rem}.jwi-font-medium{font-weight:500}.jwi-font-normal{font-weight:400}.jwi-font-semibold{font-weight:600}.jwi-tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.jwi-leading-\[1\.35\]{line-height:1.35}.jwi-leading-\[1\.4\]{line-height:1.4}.jwi-leading-none{line-height:1}.jwi-leading-snug{line-height:1.375}.jwi-text-\[\#111111\]{--tw-text-opacity:1;color:rgb(17 17 17/var(--tw-text-opacity,1))}.jwi-text-\[\#1b5e20\]{--tw-text-opacity:1;color:rgb(27 94 32/var(--tw-text-opacity,1))}.jwi-text-\[\#767676\]{--tw-text-opacity:1;color:rgb(118 118 118/var(--tw-text-opacity,1))}.jwi-text-\[\#8f2d21\]{--tw-text-opacity:1;color:rgb(143 45 33/var(--tw-text-opacity,1))}.jwi-text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.jwi-text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.jwi-opacity-25{opacity:.25}.jwi-opacity-75{opacity:.75}.jwi-opacity-95{opacity:.95}.jwi-shadow-\[0_1px_2px_rgba\(17\,17\,17\,0\.03\)\]{--tw-shadow:0 1px 2px hsla(0,0%,7%,.03);--tw-shadow-colored:0 1px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.jwi-shadow-\[0_8px_24px_rgba\(17\,17\,17\,0\.08\)\]{--tw-shadow:0 8px 24px hsla(0,0%,7%,.08);--tw-shadow-colored:0 8px 24px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.jwi-outline-none{outline:2px solid transparent;outline-offset:2px}.placeholder\:jwi-text-\[\#767676\]::-moz-placeholder{--tw-text-opacity:1;color:rgb(118 118 118/var(--tw-text-opacity,1))}.placeholder\:jwi-text-\[\#767676\]::placeholder{--tw-text-opacity:1;color:rgb(118 118 118/var(--tw-text-opacity,1))}.hover\:jwi-bg-\[\#d92817\]:hover{--tw-bg-opacity:1;background-color:rgb(217 40 23/var(--tw-bg-opacity,1))}.hover\:jwi-bg-\[\#f7f5f0\]:hover{--tw-bg-opacity:1;background-color:rgb(247 245 240/var(--tw-bg-opacity,1))}.hover\:jwi-text-\[\#444444\]:hover{--tw-text-opacity:1;color:rgb(68 68 68/var(--tw-text-opacity,1))}.hover\:jwi-underline:hover{text-decoration-line:underline}.focus\:jwi-border-\[\#111111\]:focus{--tw-border-opacity:1;border-color:rgb(17 17 17/var(--tw-border-opacity,1))}.disabled\:jwi-cursor-wait:disabled{cursor:wait}.disabled\:hover\:jwi-bg-\[\#ef2b18\]:hover:disabled{--tw-bg-opacity:1;background-color:rgb(239 43 24/var(--tw-bg-opacity,1))}@media (min-width:768px){.md\:jwi-max-w-\[220px\]{max-width:220px}.md\:jwi-flex-row{flex-direction:row}.md\:jwi-items-center{align-items:center}.md\:jwi-justify-between{justify-content:space-between}}
|
package/dist/JotulWidget.d.ts
CHANGED
|
@@ -1,36 +1,8 @@
|
|
|
1
1
|
import './JotulWidget.css';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
error?: string;
|
|
11
|
-
};
|
|
12
|
-
export type DealerSearchResponse = {
|
|
13
|
-
apiVersion?: string;
|
|
14
|
-
ok: boolean;
|
|
15
|
-
type?: 'postalCode';
|
|
16
|
-
origin?: {
|
|
17
|
-
postalCode?: string | null;
|
|
18
|
-
postalCodeNumber?: number | null;
|
|
19
|
-
market?: string;
|
|
20
|
-
};
|
|
21
|
-
total?: number;
|
|
22
|
-
dealers?: Array<Record<string, unknown>>;
|
|
23
|
-
error?: string;
|
|
24
|
-
};
|
|
25
|
-
export type CheckWidgetAuthorizationOptions = {
|
|
26
|
-
endpoint?: string;
|
|
27
|
-
fetcher?: typeof fetch;
|
|
28
|
-
};
|
|
29
|
-
export type JotulWidgetProps = {
|
|
30
|
-
type?: string;
|
|
31
|
-
endpoint?: string;
|
|
32
|
-
className?: string;
|
|
33
|
-
};
|
|
34
|
-
export declare function checkWidgetAuthorization(options?: CheckWidgetAuthorizationOptions): Promise<WidgetAuthClientResponse>;
|
|
35
|
-
export declare function searchDealersByPostalCode(postalCode: string, options?: CheckWidgetAuthorizationOptions): Promise<DealerSearchResponse>;
|
|
36
|
-
export declare function JotulWidget({ type, endpoint, className, }: JotulWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
import { checkWidgetAuthorization, searchLocationSuggestions, searchDealersByCoordinates, searchDealersByPostalCode } from './api';
|
|
3
|
+
import type { JotulWidgetProps } from './types';
|
|
4
|
+
export { normalizeWidgetLocale } from './i18n/widgetStrings';
|
|
5
|
+
export type { JotulWidgetLocale } from './i18n/widgetStrings';
|
|
6
|
+
export { checkWidgetAuthorization, searchLocationSuggestions, searchDealersByCoordinates, searchDealersByPostalCode, };
|
|
7
|
+
export type { CheckWidgetAuthorizationOptions, DealerSearchResponse, JotulWidgetProps, JotulWidgetType, WidgetAuthClientResponse, } from './types';
|
|
8
|
+
export declare function JotulWidget({ type, endpoint, className, productName, locale: localeProp, brands, }: JotulWidgetProps): import("react/jsx-runtime").JSX.Element;
|