Skip to content

Commit 8395ce0

Browse files
committed
chore: update test snapshot
1 parent 9af5bf3 commit 8395ce0

File tree

1 file changed

+306
-12
lines changed

1 file changed

+306
-12
lines changed

packages/shadcn/test/__snapshots__/Form.test.tsx.snap

Lines changed: 306 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,8 +1553,8 @@ exports[`single fields select field multiple choice enumDisabled 1`] = `
15531553
>
15541554
<label
15551555
cmdk-label=""
1556-
htmlFor="radix-:rg:"
1557-
id="radix-:rf:"
1556+
htmlFor="radix-:rk:"
1557+
id="radix-:rj:"
15581558
style={
15591559
{
15601560
"borderWidth": "0",
@@ -1577,15 +1577,15 @@ exports[`single fields select field multiple choice enumDisabled 1`] = `
15771577
>
15781578
<input
15791579
aria-autocomplete="list"
1580-
aria-controls="radix-:re:"
1580+
aria-controls="radix-:ri:"
15811581
aria-expanded={true}
1582-
aria-labelledby="radix-:rf:"
1582+
aria-labelledby="radix-:rj:"
15831583
autoComplete="off"
15841584
autoCorrect="off"
15851585
className="rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1"
15861586
cmdk-input=""
15871587
disabled={false}
1588-
id="radix-:rg:"
1588+
id="radix-:rk:"
15891589
onBlur={[Function]}
15901590
onChange={[Function]}
15911591
onFocus={[Function]}
@@ -1867,8 +1867,8 @@ exports[`single fields select field multiple choice formData 1`] = `
18671867
>
18681868
<label
18691869
cmdk-label=""
1870-
htmlFor="radix-:rm:"
1871-
id="radix-:rl:"
1870+
htmlFor="radix-:rq:"
1871+
id="radix-:rp:"
18721872
style={
18731873
{
18741874
"borderWidth": "0",
@@ -1895,6 +1895,7 @@ exports[`single fields select field multiple choice formData 1`] = `
18951895
foo
18961896
<button
18971897
className="rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1"
1898+
disabled={false}
18981899
onClick={[Function]}
18991900
onKeyDown={[Function]}
19001901
onMouseDown={[Function]}
@@ -1927,6 +1928,7 @@ exports[`single fields select field multiple choice formData 1`] = `
19271928
bar
19281929
<button
19291930
className="rtl:mr-1 ltr:ml-1 ring-offset-background rounded-full outline-none focus:ring-1 focus:ring-ring focus:ring-offset-1"
1931+
disabled={false}
19301932
onClick={[Function]}
19311933
onKeyDown={[Function]}
19321934
onMouseDown={[Function]}
@@ -1955,15 +1957,15 @@ exports[`single fields select field multiple choice formData 1`] = `
19551957
</div>
19561958
<input
19571959
aria-autocomplete="list"
1958-
aria-controls="radix-:rk:"
1960+
aria-controls="radix-:ro:"
19591961
aria-expanded={true}
1960-
aria-labelledby="radix-:rl:"
1962+
aria-labelledby="radix-:rp:"
19611963
autoComplete="off"
19621964
autoCorrect="off"
19631965
className="rtl:mr-2 ltr:ml-2 bg-transparent outline-none placeholder:text-muted-foreground flex-1"
19641966
cmdk-input=""
19651967
disabled={false}
1966-
id="radix-:rm:"
1968+
id="radix-:rq:"
19671969
onBlur={[Function]}
19681970
onChange={[Function]}
19691971
onFocus={[Function]}
@@ -2317,6 +2319,152 @@ exports[`single fields select field single choice enumDisabled using radio widge
23172319
</form>
23182320
`;
23192321

2322+
exports[`single fields select field single choice form disabled using radio widget 1`] = `
2323+
<form
2324+
className="rjsf"
2325+
noValidate={false}
2326+
onSubmit={[Function]}
2327+
>
2328+
<div
2329+
className="form-group field field-string"
2330+
>
2331+
<div
2332+
className="flex flex-col gap-2"
2333+
>
2334+
<label
2335+
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2336+
htmlFor="root"
2337+
/>
2338+
<div
2339+
className="mb-0"
2340+
>
2341+
<div
2342+
aria-describedby="root__error root__description root__help"
2343+
aria-orientation="vertical"
2344+
aria-required={false}
2345+
className="gap-2 flex flex-wrap flex-col"
2346+
data-disabled=""
2347+
data-orientation="vertical"
2348+
dir="ltr"
2349+
onBlur={[Function]}
2350+
onFocus={[Function]}
2351+
onMouseDown={[Function]}
2352+
role="radiogroup"
2353+
style={
2354+
{
2355+
"outline": "none",
2356+
}
2357+
}
2358+
tabIndex={-1}
2359+
>
2360+
<div
2361+
className="flex items-center gap-2"
2362+
>
2363+
<button
2364+
aria-checked={false}
2365+
className="aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
2366+
data-disabled=""
2367+
data-orientation="vertical"
2368+
data-radix-collection-item=""
2369+
data-state="unchecked"
2370+
disabled={true}
2371+
id="root-0"
2372+
onClick={[Function]}
2373+
onFocus={[Function]}
2374+
onKeyDown={[Function]}
2375+
onMouseDown={[Function]}
2376+
role="radio"
2377+
tabIndex={-1}
2378+
type="button"
2379+
value="0"
2380+
/>
2381+
<input
2382+
aria-hidden={true}
2383+
defaultChecked={false}
2384+
disabled={true}
2385+
required={false}
2386+
style={
2387+
{
2388+
"margin": 0,
2389+
"opacity": 0,
2390+
"pointerEvents": "none",
2391+
"position": "absolute",
2392+
"transform": "translateX(-100%)",
2393+
}
2394+
}
2395+
tabIndex={-1}
2396+
type="radio"
2397+
value="0"
2398+
/>
2399+
<label
2400+
className="text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70 leading-tight"
2401+
onMouseDown={[Function]}
2402+
>
2403+
foo
2404+
</label>
2405+
</div>
2406+
<div
2407+
className="flex items-center gap-2"
2408+
>
2409+
<button
2410+
aria-checked={false}
2411+
className="aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
2412+
data-disabled=""
2413+
data-orientation="vertical"
2414+
data-radix-collection-item=""
2415+
data-state="unchecked"
2416+
disabled={true}
2417+
id="root-1"
2418+
onClick={[Function]}
2419+
onFocus={[Function]}
2420+
onKeyDown={[Function]}
2421+
onMouseDown={[Function]}
2422+
role="radio"
2423+
tabIndex={-1}
2424+
type="button"
2425+
value="1"
2426+
/>
2427+
<input
2428+
aria-hidden={true}
2429+
defaultChecked={false}
2430+
disabled={true}
2431+
required={false}
2432+
style={
2433+
{
2434+
"margin": 0,
2435+
"opacity": 0,
2436+
"pointerEvents": "none",
2437+
"position": "absolute",
2438+
"transform": "translateX(-100%)",
2439+
}
2440+
}
2441+
tabIndex={-1}
2442+
type="radio"
2443+
value="1"
2444+
/>
2445+
<label
2446+
className="text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70 leading-tight"
2447+
onMouseDown={[Function]}
2448+
>
2449+
bar
2450+
</label>
2451+
</div>
2452+
</div>
2453+
</div>
2454+
</div>
2455+
</div>
2456+
<div>
2457+
<button
2458+
className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2 my-2"
2459+
disabled={true}
2460+
type="submit"
2461+
>
2462+
Submit
2463+
</button>
2464+
</div>
2465+
</form>
2466+
`;
2467+
23202468
exports[`single fields select field single choice formData 1`] = `
23212469
<form
23222470
className="rjsf"
@@ -2349,8 +2497,8 @@ exports[`single fields select field single choice formData 1`] = `
23492497
>
23502498
<label
23512499
cmdk-label=""
2352-
htmlFor="radix-:rj:"
2353-
id="radix-:ri:"
2500+
htmlFor="radix-:rn:"
2501+
id="radix-:rm:"
23542502
style={
23552503
{
23562504
"borderWidth": "0",
@@ -2410,6 +2558,152 @@ exports[`single fields select field single choice formData 1`] = `
24102558
</form>
24112559
`;
24122560

2561+
exports[`single fields select field single choice uiSchema disabled using radio widget 1`] = `
2562+
<form
2563+
className="rjsf"
2564+
noValidate={false}
2565+
onSubmit={[Function]}
2566+
>
2567+
<div
2568+
className="form-group field field-string"
2569+
>
2570+
<div
2571+
className="flex flex-col gap-2"
2572+
>
2573+
<label
2574+
className="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
2575+
htmlFor="root"
2576+
/>
2577+
<div
2578+
className="mb-0"
2579+
>
2580+
<div
2581+
aria-describedby="root__error root__description root__help"
2582+
aria-orientation="vertical"
2583+
aria-required={false}
2584+
className="gap-2 flex flex-wrap flex-col"
2585+
data-disabled=""
2586+
data-orientation="vertical"
2587+
dir="ltr"
2588+
onBlur={[Function]}
2589+
onFocus={[Function]}
2590+
onMouseDown={[Function]}
2591+
role="radiogroup"
2592+
style={
2593+
{
2594+
"outline": "none",
2595+
}
2596+
}
2597+
tabIndex={-1}
2598+
>
2599+
<div
2600+
className="flex items-center gap-2"
2601+
>
2602+
<button
2603+
aria-checked={false}
2604+
className="aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
2605+
data-disabled=""
2606+
data-orientation="vertical"
2607+
data-radix-collection-item=""
2608+
data-state="unchecked"
2609+
disabled={true}
2610+
id="root-0"
2611+
onClick={[Function]}
2612+
onFocus={[Function]}
2613+
onKeyDown={[Function]}
2614+
onMouseDown={[Function]}
2615+
role="radio"
2616+
tabIndex={-1}
2617+
type="button"
2618+
value="0"
2619+
/>
2620+
<input
2621+
aria-hidden={true}
2622+
defaultChecked={false}
2623+
disabled={true}
2624+
required={false}
2625+
style={
2626+
{
2627+
"margin": 0,
2628+
"opacity": 0,
2629+
"pointerEvents": "none",
2630+
"position": "absolute",
2631+
"transform": "translateX(-100%)",
2632+
}
2633+
}
2634+
tabIndex={-1}
2635+
type="radio"
2636+
value="0"
2637+
/>
2638+
<label
2639+
className="text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70 leading-tight"
2640+
onMouseDown={[Function]}
2641+
>
2642+
foo
2643+
</label>
2644+
</div>
2645+
<div
2646+
className="flex items-center gap-2"
2647+
>
2648+
<button
2649+
aria-checked={false}
2650+
className="aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
2651+
data-disabled=""
2652+
data-orientation="vertical"
2653+
data-radix-collection-item=""
2654+
data-state="unchecked"
2655+
disabled={true}
2656+
id="root-1"
2657+
onClick={[Function]}
2658+
onFocus={[Function]}
2659+
onKeyDown={[Function]}
2660+
onMouseDown={[Function]}
2661+
role="radio"
2662+
tabIndex={-1}
2663+
type="button"
2664+
value="1"
2665+
/>
2666+
<input
2667+
aria-hidden={true}
2668+
defaultChecked={false}
2669+
disabled={true}
2670+
required={false}
2671+
style={
2672+
{
2673+
"margin": 0,
2674+
"opacity": 0,
2675+
"pointerEvents": "none",
2676+
"position": "absolute",
2677+
"transform": "translateX(-100%)",
2678+
}
2679+
}
2680+
tabIndex={-1}
2681+
type="radio"
2682+
value="1"
2683+
/>
2684+
<label
2685+
className="text-sm font-medium peer-disabled:cursor-not-allowed peer-disabled:opacity-70 leading-tight"
2686+
onMouseDown={[Function]}
2687+
>
2688+
bar
2689+
</label>
2690+
</div>
2691+
</div>
2692+
</div>
2693+
</div>
2694+
</div>
2695+
<div>
2696+
<button
2697+
className="inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 bg-primary text-primary-foreground shadow hover:bg-primary/90 h-9 px-4 py-2 my-2"
2698+
disabled={false}
2699+
type="submit"
2700+
>
2701+
Submit
2702+
</button>
2703+
</div>
2704+
</form>
2705+
`;
2706+
24132707
exports[`single fields slider field 1`] = `
24142708
<form
24152709
className="rjsf"

0 commit comments

Comments
 (0)