@descope/flow-components 2.0.38
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/.eslintrc +119 -0
- package/.github/actions/setup/action.yml +42 -0
- package/.github/workflows/ci.yml +105 -0
- package/.github/workflows/publish.yml +41 -0
- package/.github/workflows/release.yml +44 -0
- package/.husky/pre-commit +1 -0
- package/.prettierrc +8 -0
- package/.storybook/main.js +23 -0
- package/.storybook/manager.js +10 -0
- package/.storybook/preview-head.html +29 -0
- package/.storybook/preview.js +44 -0
- package/LICENSE +21 -0
- package/README.md +20 -0
- package/babel.config.js +7 -0
- package/dist/index.cjs.js +360 -0
- package/dist/index.d.ts +397 -0
- package/dist/index.esm.js +314 -0
- package/jest.config.js +33 -0
- package/jest.setup.js +2 -0
- package/package.json +110 -0
- package/renovate.json +4 -0
- package/rollup.config.mjs +47 -0
- package/src/Boolean/Boolean.tsx +24 -0
- package/src/Boolean/index.ts +1 -0
- package/src/Button/Button.tsx +49 -0
- package/src/Button/index.ts +1 -0
- package/src/Checkbox/Checkbox.tsx +16 -0
- package/src/Checkbox/index.ts +1 -0
- package/src/Code/Code.tsx +21 -0
- package/src/Code/index.ts +1 -0
- package/src/Container/Container.tsx +111 -0
- package/src/Container/index.ts +1 -0
- package/src/CssVarImage/CssVarImage.tsx +38 -0
- package/src/CssVarImage/index.ts +1 -0
- package/src/Divider/Divider.tsx +33 -0
- package/src/Divider/index.ts +1 -0
- package/src/EmailField/EmailField.tsx +20 -0
- package/src/EmailField/index.ts +1 -0
- package/src/Image/Image.tsx +32 -0
- package/src/Image/index.ts +1 -0
- package/src/Input/Input.tsx +27 -0
- package/src/Input/index.ts +1 -0
- package/src/Link/Link.tsx +33 -0
- package/src/Link/index.ts +1 -0
- package/src/Loader/Loader.tsx +40 -0
- package/src/Loader/index.ts +1 -0
- package/src/Logo/Logo.tsx +27 -0
- package/src/Logo/index.ts +1 -0
- package/src/NewPassword/NewPassword.tsx +25 -0
- package/src/NewPassword/index.ts +1 -0
- package/src/NumberField/NumberField.tsx +20 -0
- package/src/NumberField/index.ts +1 -0
- package/src/Password/Password.tsx +20 -0
- package/src/Password/index.ts +1 -0
- package/src/Phone/Phone.tsx +22 -0
- package/src/Phone/index.ts +1 -0
- package/src/Select/Select.tsx +29 -0
- package/src/Select/index.ts +1 -0
- package/src/Switch/Switch.tsx +21 -0
- package/src/Switch/index.ts +1 -0
- package/src/TOTPImage/TOTPImage.tsx +18 -0
- package/src/TOTPImage/index.ts +1 -0
- package/src/TOTPLink/TOTPLink.tsx +16 -0
- package/src/TOTPLink/index.ts +1 -0
- package/src/Text/Text.tsx +36 -0
- package/src/Text/index.ts +1 -0
- package/src/TextField/TextField.tsx +20 -0
- package/src/TextField/index.ts +1 -0
- package/src/Textarea/Textarea.tsx +20 -0
- package/src/Textarea/index.ts +1 -0
- package/src/icons/apple.tsx +14 -0
- package/src/icons/discord.tsx +14 -0
- package/src/icons/facebook.tsx +14 -0
- package/src/icons/fingerprint.tsx +14 -0
- package/src/icons/github.tsx +14 -0
- package/src/icons/gitlab.tsx +41 -0
- package/src/icons/google.tsx +29 -0
- package/src/icons/index.ts +11 -0
- package/src/icons/input-hidden.tsx +17 -0
- package/src/icons/input-visible.tsx +17 -0
- package/src/icons/linkedin.tsx +18 -0
- package/src/icons/microsoft.tsx +41 -0
- package/src/icons/passkey.tsx +16 -0
- package/src/icons/sso.tsx +14 -0
- package/src/index.ts +29 -0
- package/src/inputHelpers.ts +41 -0
- package/src/themeToCssVars/constants.ts +13 -0
- package/src/themeToCssVars/index.ts +153 -0
- package/src/themeToCssVars/types.ts +56 -0
- package/src/types.ts +52 -0
- package/src/utils.tsx +69 -0
- package/stories/Boolean.stories.jsx +37 -0
- package/stories/Button.stories.jsx +71 -0
- package/stories/Checkbox.stories.jsx +29 -0
- package/stories/Code.stories.jsx +60 -0
- package/stories/Container.stories.jsx +53 -0
- package/stories/Divider.stories.jsx +23 -0
- package/stories/EmailField.stories.jsx +36 -0
- package/stories/Image.stories.jsx +16 -0
- package/stories/Input.stories.jsx +63 -0
- package/stories/Link.stories.jsx +21 -0
- package/stories/Loader.stories.jsx +34 -0
- package/stories/Logo.stories.jsx +14 -0
- package/stories/NewPassword.stories.jsx +52 -0
- package/stories/NumberField.stories.jsx +35 -0
- package/stories/Password.stories.jsx +37 -0
- package/stories/Phone.stories.jsx +61 -0
- package/stories/Switch.stories.jsx +29 -0
- package/stories/TOTPImage.stories.jsx +22 -0
- package/stories/TOTPLink.stories.jsx +20 -0
- package/stories/Text.stories.jsx +35 -0
- package/stories/TextField.stories.jsx +39 -0
- package/stories/Textarea.stories.jsx +25 -0
- package/storybook-static/favicon.ico +0 -0
- package/test/__snapshots__/boolean.test.tsx.snap +47 -0
- package/test/__snapshots__/buttons.test.tsx.snap +843 -0
- package/test/__snapshots__/checkbox.test.tsx.snap +51 -0
- package/test/__snapshots__/code.test.tsx.snap +1184 -0
- package/test/__snapshots__/container.test.tsx.snap +218 -0
- package/test/__snapshots__/divider.test.tsx.snap +73 -0
- package/test/__snapshots__/image.test.tsx.snap +62 -0
- package/test/__snapshots__/input.test.tsx.snap +80 -0
- package/test/__snapshots__/link.test.tsx.snap +120 -0
- package/test/__snapshots__/loader.test.tsx.snap +53 -0
- package/test/__snapshots__/logo.test.tsx.snap +10 -0
- package/test/__snapshots__/newPassword.test.tsx.snap +69 -0
- package/test/__snapshots__/numeric-input.test.tsx.snap +21 -0
- package/test/__snapshots__/password.test.tsx.snap +26 -0
- package/test/__snapshots__/phone.test.tsx.snap +504 -0
- package/test/__snapshots__/switch.test.tsx.snap +51 -0
- package/test/__snapshots__/text.test.tsx.snap +89 -0
- package/test/__snapshots__/textarea.test.tsx.snap +73 -0
- package/test/__snapshots__/themeToCssVars.test.ts.snap +45 -0
- package/test/__snapshots__/totpImage.test.tsx.snap +10 -0
- package/test/__snapshots__/totpLink.test.tsx.snap +13 -0
- package/test/boolean.test.tsx +28 -0
- package/test/buttons.test.tsx +66 -0
- package/test/checkbox.test.tsx +67 -0
- package/test/code.test.tsx +182 -0
- package/test/container.test.tsx +91 -0
- package/test/divider.test.tsx +50 -0
- package/test/image.test.tsx +40 -0
- package/test/input.test.tsx +82 -0
- package/test/inputHelpers.test.tsx +58 -0
- package/test/link.test.tsx +71 -0
- package/test/loader.test.tsx +25 -0
- package/test/logo.test.tsx +10 -0
- package/test/newPassword.test.tsx +132 -0
- package/test/numeric-input.test.tsx +114 -0
- package/test/password.test.tsx +55 -0
- package/test/phone.test.tsx +158 -0
- package/test/switch.test.tsx +67 -0
- package/test/text.test.tsx +60 -0
- package/test/textarea.test.tsx +64 -0
- package/test/themeToCssVars.test.ts +82 -0
- package/test/totpImage.test.tsx +10 -0
- package/test/totpLink.test.tsx +10 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Password rendered with custom scripts 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<descope-password-field
|
|
6
|
+
size="md"
|
|
7
|
+
/>
|
|
8
|
+
</div>
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
exports[`Password should render with default props 1`] = `
|
|
12
|
+
<div>
|
|
13
|
+
<descope-password-field
|
|
14
|
+
size="md"
|
|
15
|
+
/>
|
|
16
|
+
</div>
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
exports[`Password should render with toggle on/off icons 1`] = `
|
|
20
|
+
<div>
|
|
21
|
+
<descope-password-field
|
|
22
|
+
endicons="inputVisible,inputHidden"
|
|
23
|
+
size="md"
|
|
24
|
+
/>
|
|
25
|
+
</div>
|
|
26
|
+
`;
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Phone rendered with className 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="className descope-input-wrapper p-0 form-control relative w-full"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="flex w-full items-stretch"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
13
|
+
>
|
|
14
|
+
<select
|
|
15
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
16
|
+
data-id="select"
|
|
17
|
+
>
|
|
18
|
+
<option
|
|
19
|
+
data-dial-code="+972"
|
|
20
|
+
value="IL"
|
|
21
|
+
>
|
|
22
|
+
(+972) Israel
|
|
23
|
+
</option>
|
|
24
|
+
<option
|
|
25
|
+
data-dial-code="+1"
|
|
26
|
+
value="US"
|
|
27
|
+
>
|
|
28
|
+
(+1) United States
|
|
29
|
+
</option>
|
|
30
|
+
</select>
|
|
31
|
+
</div>
|
|
32
|
+
<descope-text-field
|
|
33
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
34
|
+
data-exclude-field="true"
|
|
35
|
+
data-id="input"
|
|
36
|
+
full-width="true"
|
|
37
|
+
maxlength="15"
|
|
38
|
+
size="md"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<descope-text-field
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
data-input="input"
|
|
44
|
+
full-width="true"
|
|
45
|
+
size="md"
|
|
46
|
+
wrapperprops="[object Object]"
|
|
47
|
+
/>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
exports[`Phone rendered with custom error attributes 1`] = `
|
|
53
|
+
<div>
|
|
54
|
+
<div
|
|
55
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
56
|
+
>
|
|
57
|
+
<div
|
|
58
|
+
class="flex w-full items-stretch"
|
|
59
|
+
>
|
|
60
|
+
<div
|
|
61
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
62
|
+
>
|
|
63
|
+
<select
|
|
64
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
65
|
+
data-id="select"
|
|
66
|
+
>
|
|
67
|
+
<option
|
|
68
|
+
data-dial-code="+972"
|
|
69
|
+
value="IL"
|
|
70
|
+
>
|
|
71
|
+
(+972) Israel
|
|
72
|
+
</option>
|
|
73
|
+
<option
|
|
74
|
+
data-dial-code="+1"
|
|
75
|
+
value="US"
|
|
76
|
+
>
|
|
77
|
+
(+1) United States
|
|
78
|
+
</option>
|
|
79
|
+
</select>
|
|
80
|
+
</div>
|
|
81
|
+
<descope-text-field
|
|
82
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
83
|
+
data-errormessage-pattern-mismatch="pattern"
|
|
84
|
+
data-errormessage-value-missing="missing"
|
|
85
|
+
data-exclude-field="true"
|
|
86
|
+
data-id="input"
|
|
87
|
+
full-width="true"
|
|
88
|
+
maxlength="15"
|
|
89
|
+
size="md"
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
<descope-text-field
|
|
93
|
+
aria-hidden="true"
|
|
94
|
+
data-input="input"
|
|
95
|
+
full-width="true"
|
|
96
|
+
size="md"
|
|
97
|
+
wrapperprops="[object Object]"
|
|
98
|
+
/>
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
`;
|
|
102
|
+
|
|
103
|
+
exports[`Phone rendered with custom scripts 1`] = `
|
|
104
|
+
<div>
|
|
105
|
+
<div
|
|
106
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
107
|
+
>
|
|
108
|
+
<div
|
|
109
|
+
class="flex w-full items-stretch"
|
|
110
|
+
>
|
|
111
|
+
<div
|
|
112
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
113
|
+
>
|
|
114
|
+
<select
|
|
115
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
116
|
+
data-id="select"
|
|
117
|
+
>
|
|
118
|
+
<option
|
|
119
|
+
data-dial-code="+972"
|
|
120
|
+
value="IL"
|
|
121
|
+
>
|
|
122
|
+
(+972) Israel
|
|
123
|
+
</option>
|
|
124
|
+
<option
|
|
125
|
+
data-dial-code="+1"
|
|
126
|
+
value="US"
|
|
127
|
+
>
|
|
128
|
+
(+1) United States
|
|
129
|
+
</option>
|
|
130
|
+
</select>
|
|
131
|
+
</div>
|
|
132
|
+
<script
|
|
133
|
+
data-id="-1199187935"
|
|
134
|
+
>
|
|
135
|
+
|
|
136
|
+
const x = 1 + 1;
|
|
137
|
+
return x;
|
|
138
|
+
|
|
139
|
+
</script>
|
|
140
|
+
<descope-text-field
|
|
141
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
142
|
+
data-exclude-field="true"
|
|
143
|
+
data-id="input"
|
|
144
|
+
full-width="true"
|
|
145
|
+
maxlength="15"
|
|
146
|
+
size="md"
|
|
147
|
+
/>
|
|
148
|
+
</div>
|
|
149
|
+
<descope-text-field
|
|
150
|
+
aria-hidden="true"
|
|
151
|
+
data-input="input"
|
|
152
|
+
full-width="true"
|
|
153
|
+
size="md"
|
|
154
|
+
wrapperprops="[object Object]"
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
<script
|
|
158
|
+
data-id="-1199187935"
|
|
159
|
+
>
|
|
160
|
+
|
|
161
|
+
const x = 1 + 1;
|
|
162
|
+
return x;
|
|
163
|
+
|
|
164
|
+
</script>
|
|
165
|
+
<script
|
|
166
|
+
data-id="-1199187935"
|
|
167
|
+
>
|
|
168
|
+
|
|
169
|
+
const x = 1 + 1;
|
|
170
|
+
return x;
|
|
171
|
+
|
|
172
|
+
</script>
|
|
173
|
+
</div>
|
|
174
|
+
`;
|
|
175
|
+
|
|
176
|
+
exports[`Phone rendered with default props 1`] = `
|
|
177
|
+
<div>
|
|
178
|
+
<div
|
|
179
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
180
|
+
>
|
|
181
|
+
<div
|
|
182
|
+
class="flex w-full items-stretch"
|
|
183
|
+
>
|
|
184
|
+
<div
|
|
185
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
186
|
+
>
|
|
187
|
+
<select
|
|
188
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
189
|
+
data-id="select"
|
|
190
|
+
>
|
|
191
|
+
<option
|
|
192
|
+
data-dial-code="+972"
|
|
193
|
+
value="IL"
|
|
194
|
+
>
|
|
195
|
+
(+972) Israel
|
|
196
|
+
</option>
|
|
197
|
+
<option
|
|
198
|
+
data-dial-code="+1"
|
|
199
|
+
value="US"
|
|
200
|
+
>
|
|
201
|
+
(+1) United States
|
|
202
|
+
</option>
|
|
203
|
+
</select>
|
|
204
|
+
</div>
|
|
205
|
+
<descope-text-field
|
|
206
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
207
|
+
data-exclude-field="true"
|
|
208
|
+
data-id="input"
|
|
209
|
+
full-width="true"
|
|
210
|
+
maxlength="15"
|
|
211
|
+
size="md"
|
|
212
|
+
/>
|
|
213
|
+
</div>
|
|
214
|
+
<descope-text-field
|
|
215
|
+
aria-hidden="true"
|
|
216
|
+
data-input="input"
|
|
217
|
+
full-width="true"
|
|
218
|
+
size="md"
|
|
219
|
+
wrapperprops="[object Object]"
|
|
220
|
+
/>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
`;
|
|
224
|
+
|
|
225
|
+
exports[`Phone rendered with fullWidth 1`] = `
|
|
226
|
+
<div>
|
|
227
|
+
<div
|
|
228
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
229
|
+
>
|
|
230
|
+
<div
|
|
231
|
+
class="flex w-full items-stretch"
|
|
232
|
+
>
|
|
233
|
+
<div
|
|
234
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
235
|
+
>
|
|
236
|
+
<select
|
|
237
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
238
|
+
data-id="select"
|
|
239
|
+
>
|
|
240
|
+
<option
|
|
241
|
+
data-dial-code="+972"
|
|
242
|
+
value="IL"
|
|
243
|
+
>
|
|
244
|
+
(+972) Israel
|
|
245
|
+
</option>
|
|
246
|
+
<option
|
|
247
|
+
data-dial-code="+1"
|
|
248
|
+
value="US"
|
|
249
|
+
>
|
|
250
|
+
(+1) United States
|
|
251
|
+
</option>
|
|
252
|
+
</select>
|
|
253
|
+
</div>
|
|
254
|
+
<descope-text-field
|
|
255
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
256
|
+
data-exclude-field="true"
|
|
257
|
+
data-id="input"
|
|
258
|
+
full-width="true"
|
|
259
|
+
maxlength="15"
|
|
260
|
+
size="md"
|
|
261
|
+
/>
|
|
262
|
+
</div>
|
|
263
|
+
<descope-text-field
|
|
264
|
+
aria-hidden="true"
|
|
265
|
+
data-input="input"
|
|
266
|
+
full-width="true"
|
|
267
|
+
size="md"
|
|
268
|
+
wrapperprops="[object Object]"
|
|
269
|
+
/>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
`;
|
|
273
|
+
|
|
274
|
+
exports[`Phone rendered with label 1`] = `
|
|
275
|
+
<div>
|
|
276
|
+
<div
|
|
277
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
278
|
+
>
|
|
279
|
+
<label
|
|
280
|
+
class="label pt-0"
|
|
281
|
+
style="cursor: inherit;"
|
|
282
|
+
>
|
|
283
|
+
<span
|
|
284
|
+
class="label-text"
|
|
285
|
+
>
|
|
286
|
+
label
|
|
287
|
+
</span>
|
|
288
|
+
</label>
|
|
289
|
+
<div
|
|
290
|
+
class="flex w-full items-stretch"
|
|
291
|
+
>
|
|
292
|
+
<div
|
|
293
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
294
|
+
>
|
|
295
|
+
<select
|
|
296
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
297
|
+
data-id="select"
|
|
298
|
+
>
|
|
299
|
+
<option
|
|
300
|
+
data-dial-code="+972"
|
|
301
|
+
value="IL"
|
|
302
|
+
>
|
|
303
|
+
(+972) Israel
|
|
304
|
+
</option>
|
|
305
|
+
<option
|
|
306
|
+
data-dial-code="+1"
|
|
307
|
+
value="US"
|
|
308
|
+
>
|
|
309
|
+
(+1) United States
|
|
310
|
+
</option>
|
|
311
|
+
</select>
|
|
312
|
+
</div>
|
|
313
|
+
<descope-text-field
|
|
314
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
315
|
+
data-exclude-field="true"
|
|
316
|
+
data-id="input"
|
|
317
|
+
full-width="true"
|
|
318
|
+
maxlength="15"
|
|
319
|
+
size="md"
|
|
320
|
+
/>
|
|
321
|
+
</div>
|
|
322
|
+
<descope-text-field
|
|
323
|
+
aria-hidden="true"
|
|
324
|
+
data-input="input"
|
|
325
|
+
full-width="true"
|
|
326
|
+
size="md"
|
|
327
|
+
wrapperprops="[object Object]"
|
|
328
|
+
/>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
`;
|
|
332
|
+
|
|
333
|
+
exports[`Phone rendered with label and required 1`] = `
|
|
334
|
+
<div>
|
|
335
|
+
<div
|
|
336
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
337
|
+
>
|
|
338
|
+
<label
|
|
339
|
+
class="label pt-0"
|
|
340
|
+
style="cursor: inherit;"
|
|
341
|
+
>
|
|
342
|
+
<span
|
|
343
|
+
class="label-text"
|
|
344
|
+
>
|
|
345
|
+
label *
|
|
346
|
+
</span>
|
|
347
|
+
</label>
|
|
348
|
+
<div
|
|
349
|
+
class="flex w-full items-stretch"
|
|
350
|
+
>
|
|
351
|
+
<div
|
|
352
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
353
|
+
>
|
|
354
|
+
<select
|
|
355
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
356
|
+
data-id="select"
|
|
357
|
+
required=""
|
|
358
|
+
>
|
|
359
|
+
<option
|
|
360
|
+
data-dial-code="+972"
|
|
361
|
+
value="IL"
|
|
362
|
+
>
|
|
363
|
+
(+972) Israel
|
|
364
|
+
</option>
|
|
365
|
+
<option
|
|
366
|
+
data-dial-code="+1"
|
|
367
|
+
value="US"
|
|
368
|
+
>
|
|
369
|
+
(+1) United States
|
|
370
|
+
</option>
|
|
371
|
+
</select>
|
|
372
|
+
</div>
|
|
373
|
+
<descope-text-field
|
|
374
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
375
|
+
data-exclude-field="true"
|
|
376
|
+
data-id="input"
|
|
377
|
+
full-width="true"
|
|
378
|
+
maxlength="15"
|
|
379
|
+
required="true"
|
|
380
|
+
size="md"
|
|
381
|
+
/>
|
|
382
|
+
</div>
|
|
383
|
+
<descope-text-field
|
|
384
|
+
aria-hidden="true"
|
|
385
|
+
data-input="input"
|
|
386
|
+
full-width="true"
|
|
387
|
+
size="md"
|
|
388
|
+
wrapperprops="[object Object]"
|
|
389
|
+
/>
|
|
390
|
+
</div>
|
|
391
|
+
</div>
|
|
392
|
+
`;
|
|
393
|
+
|
|
394
|
+
exports[`Phone rendered with name 1`] = `
|
|
395
|
+
<div>
|
|
396
|
+
<div
|
|
397
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
398
|
+
>
|
|
399
|
+
<label
|
|
400
|
+
class="label pt-0"
|
|
401
|
+
for="name"
|
|
402
|
+
style="cursor: inherit;"
|
|
403
|
+
>
|
|
404
|
+
<span
|
|
405
|
+
class="label-text"
|
|
406
|
+
>
|
|
407
|
+
label
|
|
408
|
+
</span>
|
|
409
|
+
</label>
|
|
410
|
+
<div
|
|
411
|
+
class="flex w-full items-stretch"
|
|
412
|
+
>
|
|
413
|
+
<div
|
|
414
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
415
|
+
>
|
|
416
|
+
<select
|
|
417
|
+
class="select ml-[2px] descope-input select !rounded-r-none focus:outline-offset-0 select-bordered"
|
|
418
|
+
data-id="select"
|
|
419
|
+
>
|
|
420
|
+
<option
|
|
421
|
+
data-dial-code="+972"
|
|
422
|
+
value="IL"
|
|
423
|
+
>
|
|
424
|
+
(+972) Israel
|
|
425
|
+
</option>
|
|
426
|
+
<option
|
|
427
|
+
data-dial-code="+1"
|
|
428
|
+
value="US"
|
|
429
|
+
>
|
|
430
|
+
(+1) United States
|
|
431
|
+
</option>
|
|
432
|
+
</select>
|
|
433
|
+
</div>
|
|
434
|
+
<descope-text-field
|
|
435
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
436
|
+
data-exclude-field="true"
|
|
437
|
+
data-id="input"
|
|
438
|
+
full-width="true"
|
|
439
|
+
maxlength="15"
|
|
440
|
+
name="name"
|
|
441
|
+
size="md"
|
|
442
|
+
/>
|
|
443
|
+
</div>
|
|
444
|
+
<descope-text-field
|
|
445
|
+
aria-hidden="true"
|
|
446
|
+
data-input="input"
|
|
447
|
+
full-width="true"
|
|
448
|
+
name="name"
|
|
449
|
+
size="md"
|
|
450
|
+
wrapperprops="[object Object]"
|
|
451
|
+
/>
|
|
452
|
+
</div>
|
|
453
|
+
</div>
|
|
454
|
+
`;
|
|
455
|
+
|
|
456
|
+
exports[`Phone rendered with readOnly 1`] = `
|
|
457
|
+
<div>
|
|
458
|
+
<div
|
|
459
|
+
class="descope-input-wrapper p-0 form-control relative w-full"
|
|
460
|
+
>
|
|
461
|
+
<div
|
|
462
|
+
class="flex w-full items-stretch"
|
|
463
|
+
>
|
|
464
|
+
<div
|
|
465
|
+
class="descope-input-wrapper p-0 form-control inline-block"
|
|
466
|
+
>
|
|
467
|
+
<select
|
|
468
|
+
class="select ml-[2px] descope-input select !rounded-r-none pointer-events-none focus:outline-offset-0 select-bordered"
|
|
469
|
+
data-id="select"
|
|
470
|
+
>
|
|
471
|
+
<option
|
|
472
|
+
data-dial-code="+972"
|
|
473
|
+
value="IL"
|
|
474
|
+
>
|
|
475
|
+
(+972) Israel
|
|
476
|
+
</option>
|
|
477
|
+
<option
|
|
478
|
+
data-dial-code="+1"
|
|
479
|
+
value="US"
|
|
480
|
+
>
|
|
481
|
+
(+1) United States
|
|
482
|
+
</option>
|
|
483
|
+
</select>
|
|
484
|
+
</div>
|
|
485
|
+
<descope-text-field
|
|
486
|
+
classname="input flex-grow ml-0 !rounded-l-none"
|
|
487
|
+
data-exclude-field="true"
|
|
488
|
+
data-id="input"
|
|
489
|
+
full-width="true"
|
|
490
|
+
maxlength="15"
|
|
491
|
+
readonly="true"
|
|
492
|
+
size="md"
|
|
493
|
+
/>
|
|
494
|
+
</div>
|
|
495
|
+
<descope-text-field
|
|
496
|
+
aria-hidden="true"
|
|
497
|
+
data-input="input"
|
|
498
|
+
full-width="true"
|
|
499
|
+
size="md"
|
|
500
|
+
wrapperprops="[object Object]"
|
|
501
|
+
/>
|
|
502
|
+
</div>
|
|
503
|
+
</div>
|
|
504
|
+
`;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Boolean Input should render with size 1`] = `
|
|
4
|
+
<div>
|
|
5
|
+
<div
|
|
6
|
+
class="descope-input-wrapper p-0 form-control w-full"
|
|
7
|
+
>
|
|
8
|
+
<label
|
|
9
|
+
class="flex"
|
|
10
|
+
>
|
|
11
|
+
<input
|
|
12
|
+
class="toggle flex items-center toggle-sm"
|
|
13
|
+
name="toggle"
|
|
14
|
+
required=""
|
|
15
|
+
type="checkbox"
|
|
16
|
+
/>
|
|
17
|
+
<span
|
|
18
|
+
class="text-sm ml-4 flex items-center label-text cursor-pointer"
|
|
19
|
+
>
|
|
20
|
+
some label
|
|
21
|
+
<span
|
|
22
|
+
class="ml-1"
|
|
23
|
+
>
|
|
24
|
+
*
|
|
25
|
+
</span>
|
|
26
|
+
</span>
|
|
27
|
+
</label>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
exports[`Boolean Input should render with toggle component 1`] = `
|
|
33
|
+
<div>
|
|
34
|
+
<div
|
|
35
|
+
class="descope-input-wrapper p-0 form-control w-full"
|
|
36
|
+
>
|
|
37
|
+
<label
|
|
38
|
+
class="flex"
|
|
39
|
+
>
|
|
40
|
+
<input
|
|
41
|
+
class="toggle flex items-center"
|
|
42
|
+
name="toggle"
|
|
43
|
+
type="checkbox"
|
|
44
|
+
/>
|
|
45
|
+
<span
|
|
46
|
+
class="text-undefined ml-4 flex items-center label-text cursor-pointer"
|
|
47
|
+
/>
|
|
48
|
+
</label>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
`;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Text rendered with align 1`] = `
|
|
4
|
+
<span
|
|
5
|
+
class="antialiased text-base-content break-words descope-text max-w-full text-end inline-block"
|
|
6
|
+
>
|
|
7
|
+
Text
|
|
8
|
+
</span>
|
|
9
|
+
`;
|
|
10
|
+
|
|
11
|
+
exports[`Text rendered with color 1`] = `
|
|
12
|
+
<span
|
|
13
|
+
class="antialiased break-words descope-text max-w-full text-error inline-block"
|
|
14
|
+
>
|
|
15
|
+
Text
|
|
16
|
+
</span>
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
exports[`Text rendered with custom className 1`] = `
|
|
20
|
+
<span
|
|
21
|
+
class="kuku antialiased text-base-content break-words descope-text max-w-full inline-block"
|
|
22
|
+
>
|
|
23
|
+
Text
|
|
24
|
+
</span>
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
exports[`Text rendered with default props 1`] = `
|
|
28
|
+
<span
|
|
29
|
+
class="antialiased text-base-content break-words descope-text max-w-full inline-block"
|
|
30
|
+
>
|
|
31
|
+
Text
|
|
32
|
+
</span>
|
|
33
|
+
`;
|
|
34
|
+
|
|
35
|
+
exports[`Text rendered with fontFamily 1`] = `
|
|
36
|
+
<span
|
|
37
|
+
class="antialiased text-base-content break-words descope-text max-w-full font-mono inline-block"
|
|
38
|
+
>
|
|
39
|
+
Text
|
|
40
|
+
</span>
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
exports[`Text rendered with fontWeight 1`] = `
|
|
44
|
+
<span
|
|
45
|
+
class="antialiased text-base-content break-words descope-text max-w-full font-black inline-block"
|
|
46
|
+
>
|
|
47
|
+
Text
|
|
48
|
+
</span>
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
exports[`Text rendered with fullWidth 1`] = `
|
|
52
|
+
<span
|
|
53
|
+
class="antialiased text-base-content break-words descope-text max-w-full w-full block"
|
|
54
|
+
>
|
|
55
|
+
Text
|
|
56
|
+
</span>
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
exports[`Text rendered with italic 1`] = `
|
|
60
|
+
<span
|
|
61
|
+
class="antialiased text-base-content break-words descope-text max-w-full italic inline-block"
|
|
62
|
+
>
|
|
63
|
+
Text
|
|
64
|
+
</span>
|
|
65
|
+
`;
|
|
66
|
+
|
|
67
|
+
exports[`Text rendered with size 1`] = `
|
|
68
|
+
<span
|
|
69
|
+
class="antialiased text-base-content break-words descope-text max-w-full text-9xl inline-block"
|
|
70
|
+
>
|
|
71
|
+
Text
|
|
72
|
+
</span>
|
|
73
|
+
`;
|
|
74
|
+
|
|
75
|
+
exports[`Text rendered with typography 1`] = `
|
|
76
|
+
<span
|
|
77
|
+
class="antialiased text-base-content break-words descope-text max-w-full inline-block descope-typography-body1"
|
|
78
|
+
>
|
|
79
|
+
Text
|
|
80
|
+
</span>
|
|
81
|
+
`;
|
|
82
|
+
|
|
83
|
+
exports[`Text rendered with variant 1`] = `
|
|
84
|
+
<span
|
|
85
|
+
class="antialiased text-base-content break-words descope-text max-w-full inline-block descope-text-primary"
|
|
86
|
+
>
|
|
87
|
+
Text
|
|
88
|
+
</span>
|
|
89
|
+
`;
|