Skip to content

Commit bc08e21

Browse files
committed
Updated
1 parent c8116ed commit bc08e21

File tree

13 files changed

+265
-211
lines changed

13 files changed

+265
-211
lines changed

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

Lines changed: 43 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6282,12 +6282,12 @@ exports[`single fields checkboxes widget with custom options and labels 1`] = `
62826282
<div
62836283
class=""
62846284
>
6285-
<p
6285+
<div
62866286
class="help-block"
62876287
id="root__help"
62886288
>
62896289
Select all that apply
6290-
</p>
6290+
</div>
62916291
</div>
62926292
</div>
62936293
<div
@@ -7575,12 +7575,12 @@ exports[`single fields help and error display 1`] = `
75757575
<div
75767576
class="ant-form-item-explain-error"
75777577
>
7578-
<p
7578+
<div
75797579
class="help-block"
75807580
id="root__help"
75817581
>
75827582
help me!
7583-
</p>
7583+
</div>
75847584
</div>
75857585
</div>
75867586
</div>
@@ -19012,12 +19012,23 @@ exports[`single fields string field field with markdown help and description 1`]
1901219012
<div
1901319013
class=""
1901419014
>
19015-
<p
19015+
<div
1901619016
class="help-block"
1901719017
id="root__help"
1901819018
>
19019-
This is **help** text with [a link](https://example.com)
19020-
</p>
19019+
<span>
19020+
This is
19021+
<strong>
19022+
help
19023+
</strong>
19024+
text with
19025+
<a
19026+
href="https://example.com"
19027+
>
19028+
a link
19029+
</a>
19030+
</span>
19031+
</div>
1902119032
</div>
1902219033
</div>
1902319034
<div
@@ -19113,12 +19124,23 @@ exports[`single fields string field field with markdown help text 1`] = `
1911319124
<div
1911419125
class=""
1911519126
>
19116-
<p
19127+
<div
1911719128
class="help-block"
1911819129
id="root__help"
1911919130
>
19120-
This is **markdown** help text with [a link](https://example.com)
19121-
</p>
19131+
<span>
19132+
This is
19133+
<strong>
19134+
markdown
19135+
</strong>
19136+
help text with
19137+
<a
19138+
href="https://example.com"
19139+
>
19140+
a link
19141+
</a>
19142+
</span>
19143+
</div>
1912219144
</div>
1912319145
</div>
1912419146
<div
@@ -19214,12 +19236,12 @@ exports[`single fields string field field with markdown help text without enabli
1921419236
<div
1921519237
class=""
1921619238
>
19217-
<p
19239+
<div
1921819240
class="help-block"
1921919241
id="root__help"
1922019242
>
1922119243
This is **markdown** help text with [a link](https://example.com)
19222-
</p>
19244+
</div>
1922319245
</div>
1922419246
</div>
1922519247
<div
@@ -19613,12 +19635,18 @@ exports[`single fields string field required field with markdown help 1`] = `
1961319635
<div
1961419636
class=""
1961519637
>
19616-
<p
19638+
<div
1961719639
class="help-block"
1961819640
id="root__help"
1961919641
>
19620-
This field is **required**. Please provide a value.
19621-
</p>
19642+
<span>
19643+
This field is
19644+
<strong>
19645+
required
19646+
</strong>
19647+
. Please provide a value.
19648+
</span>
19649+
</div>
1962219650
</div>
1962319651
</div>
1962419652
<div

packages/core/src/components/templates/FieldHelpTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function FieldHelpTemplate<
1010
S extends StrictRJSFSchema = RJSFSchema,
1111
F extends FormContextType = any,
1212
>(props: FieldHelpProps<T, S, F>) {
13-
const { fieldPathId, help, uiSchema = {}, registry } = props;
13+
const { fieldPathId, help, uiSchema, registry } = props;
1414
if (!help) {
1515
return null;
1616
}

packages/daisyui/src/templates/FieldHelpTemplate/FieldHelpTemplate.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ export default function FieldHelpTemplate<
2020
return null;
2121
}
2222
return (
23-
<div id={helpId(fieldPathId)} className='description-field my-4'>
24-
<div className='text-sm text-base-content/80'>
25-
<RichHelp help={help} registry={registry} uiSchema={uiSchema} />
26-
</div>
23+
<div id={helpId(fieldPathId)} className='rjsf-field-help-template text-gray-500 text-sm'>
24+
<RichHelp help={help} registry={registry} uiSchema={uiSchema} />
2725
</div>
2826
);
2927
}

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

Lines changed: 40 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -3953,14 +3953,10 @@ exports[`single fields checkboxes widget with custom options and labels 1`] = `
39533953
/>
39543954
</div>
39553955
<div
3956-
class="description-field my-4"
3956+
class="rjsf-field-help-template text-gray-500 text-sm"
39573957
id="root__help"
39583958
>
3959-
<div
3960-
class="text-sm text-base-content/80"
3961-
>
3962-
Select all that apply
3963-
</div>
3959+
Select all that apply
39643960
</div>
39653961
</div>
39663962
</div>
@@ -4770,14 +4766,10 @@ exports[`single fields help and error display 1`] = `
47704766
</ul>
47714767
</div>
47724768
<div
4773-
class="description-field my-4"
4769+
class="rjsf-field-help-template text-gray-500 text-sm"
47744770
id="root__help"
47754771
>
4776-
<div
4777-
class="text-sm text-base-content/80"
4778-
>
4779-
help me!
4780-
</div>
4772+
help me!
47814773
</div>
47824774
</div>
47834775
</div>
@@ -12307,25 +12299,21 @@ exports[`single fields string field field with markdown help and description 1`]
1230712299
/>
1230812300
</div>
1230912301
<div
12310-
class="description-field my-4"
12302+
class="rjsf-field-help-template text-gray-500 text-sm"
1231112303
id="root__help"
1231212304
>
12313-
<div
12314-
class="text-sm text-base-content/80"
12315-
>
12316-
<span>
12317-
This is
12318-
<strong>
12319-
help
12320-
</strong>
12321-
text with
12322-
<a
12323-
href="https://example.com"
12324-
>
12325-
a link
12326-
</a>
12327-
</span>
12328-
</div>
12305+
<span>
12306+
This is
12307+
<strong>
12308+
help
12309+
</strong>
12310+
text with
12311+
<a
12312+
href="https://example.com"
12313+
>
12314+
a link
12315+
</a>
12316+
</span>
1232912317
</div>
1233012318
</div>
1233112319
</div>
@@ -12394,25 +12382,21 @@ exports[`single fields string field field with markdown help text 1`] = `
1239412382
/>
1239512383
</div>
1239612384
<div
12397-
class="description-field my-4"
12385+
class="rjsf-field-help-template text-gray-500 text-sm"
1239812386
id="root__help"
1239912387
>
12400-
<div
12401-
class="text-sm text-base-content/80"
12402-
>
12403-
<span>
12404-
This is
12405-
<strong>
12406-
markdown
12407-
</strong>
12408-
help text with
12409-
<a
12410-
href="https://example.com"
12411-
>
12412-
a link
12413-
</a>
12414-
</span>
12415-
</div>
12388+
<span>
12389+
This is
12390+
<strong>
12391+
markdown
12392+
</strong>
12393+
help text with
12394+
<a
12395+
href="https://example.com"
12396+
>
12397+
a link
12398+
</a>
12399+
</span>
1241612400
</div>
1241712401
</div>
1241812402
</div>
@@ -12481,14 +12465,10 @@ exports[`single fields string field field with markdown help text without enabli
1248112465
/>
1248212466
</div>
1248312467
<div
12484-
class="description-field my-4"
12468+
class="rjsf-field-help-template text-gray-500 text-sm"
1248512469
id="root__help"
1248612470
>
12487-
<div
12488-
class="text-sm text-base-content/80"
12489-
>
12490-
This is **markdown** help text with [a link](https://example.com)
12491-
</div>
12471+
This is **markdown** help text with [a link](https://example.com)
1249212472
</div>
1249312473
</div>
1249412474
</div>
@@ -12807,20 +12787,16 @@ exports[`single fields string field required field with markdown help 1`] = `
1280712787
/>
1280812788
</div>
1280912789
<div
12810-
class="description-field my-4"
12790+
class="rjsf-field-help-template text-gray-500 text-sm"
1281112791
id="root__help"
1281212792
>
12813-
<div
12814-
class="text-sm text-base-content/80"
12815-
>
12816-
<span>
12817-
This field is
12818-
<strong>
12819-
required
12820-
</strong>
12821-
. Please provide a value.
12822-
</span>
12823-
</div>
12793+
<span>
12794+
This field is
12795+
<strong>
12796+
required
12797+
</strong>
12798+
. Please provide a value.
12799+
</span>
1282412800
</div>
1282512801
</div>
1282612802
</div>

packages/fluentui-rc/src/FieldHelpTemplate/FieldHelpTemplate.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Text } from '@fluentui/react-components';
1+
import { Caption1 } from '@fluentui/react-components';
22
import { helpId, FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
33
import { RichHelp } from '@rjsf/core';
44

@@ -17,8 +17,8 @@ export default function FieldHelpTemplate<
1717
return null;
1818
}
1919
return (
20-
<Text block id={helpId(fieldPathId)}>
20+
<Caption1 id={helpId(fieldPathId)}>
2121
<RichHelp help={help} registry={registry} uiSchema={uiSchema} />
22-
</Text>
22+
</Caption1>
2323
);
2424
}

packages/fluentui-rc/test/__snapshots__/Form.test.tsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3335,7 +3335,7 @@ exports[`single fields checkboxes widget with custom options and labels 1`] = `
33353335
</span>
33363336
</p>
33373337
<span
3338-
class="fui-Text ___3772g50_1srj68j fk6fouc fkhj508 f1i3iumi figsok6 fpgzoln ftgm304 f6juhto f1gl81tg f2jf649"
3338+
class="fui-Caption1 fui-Text ___13vod6f_1082073 fk6fouc fy9rknc fwrc4pm figsok6 fpgzoln f1w7gpdv f6juhto f1gl81tg f2jf649"
33393339
id="root__help"
33403340
>
33413341
Select all that apply
@@ -4006,7 +4006,7 @@ exports[`single fields help and error display 1`] = `
40064006
</li>
40074007
</ul>
40084008
<span
4009-
class="fui-Text ___3772g50_1srj68j fk6fouc fkhj508 f1i3iumi figsok6 fpgzoln ftgm304 f6juhto f1gl81tg f2jf649"
4009+
class="fui-Caption1 fui-Text ___13vod6f_1082073 fk6fouc fy9rknc fwrc4pm figsok6 fpgzoln f1w7gpdv f6juhto f1gl81tg f2jf649"
40104010
id="root__help"
40114011
>
40124012
help me!
@@ -9980,7 +9980,7 @@ exports[`single fields string field field with markdown help and description 1`]
99809980
</span>
99819981
</p>
99829982
<span
9983-
class="fui-Text ___3772g50_1srj68j fk6fouc fkhj508 f1i3iumi figsok6 fpgzoln ftgm304 f6juhto f1gl81tg f2jf649"
9983+
class="fui-Caption1 fui-Text ___13vod6f_1082073 fk6fouc fy9rknc fwrc4pm figsok6 fpgzoln f1w7gpdv f6juhto f1gl81tg f2jf649"
99849984
id="root__help"
99859985
>
99869986
<span>
@@ -10054,7 +10054,7 @@ exports[`single fields string field field with markdown help text 1`] = `
1005410054
</span>
1005510055
</p>
1005610056
<span
10057-
class="fui-Text ___3772g50_1srj68j fk6fouc fkhj508 f1i3iumi figsok6 fpgzoln ftgm304 f6juhto f1gl81tg f2jf649"
10057+
class="fui-Caption1 fui-Text ___13vod6f_1082073 fk6fouc fy9rknc fwrc4pm figsok6 fpgzoln f1w7gpdv f6juhto f1gl81tg f2jf649"
1005810058
id="root__help"
1005910059
>
1006010060
<span>
@@ -10128,7 +10128,7 @@ exports[`single fields string field field with markdown help text without enabli
1012810128
</span>
1012910129
</p>
1013010130
<span
10131-
class="fui-Text ___3772g50_1srj68j fk6fouc fkhj508 f1i3iumi figsok6 fpgzoln ftgm304 f6juhto f1gl81tg f2jf649"
10131+
class="fui-Caption1 fui-Text ___13vod6f_1082073 fk6fouc fy9rknc fwrc4pm figsok6 fpgzoln f1w7gpdv f6juhto f1gl81tg f2jf649"
1013210132
id="root__help"
1013310133
>
1013410134
This is **markdown** help text with [a link](https://example.com)
@@ -10369,7 +10369,7 @@ exports[`single fields string field required field with markdown help 1`] = `
1036910369
</span>
1037010370
</p>
1037110371
<span
10372-
class="fui-Text ___3772g50_1srj68j fk6fouc fkhj508 f1i3iumi figsok6 fpgzoln ftgm304 f6juhto f1gl81tg f2jf649"
10372+
class="fui-Caption1 fui-Text ___13vod6f_1082073 fk6fouc fy9rknc fwrc4pm figsok6 fpgzoln f1w7gpdv f6juhto f1gl81tg f2jf649"
1037310373
id="root__help"
1037410374
>
1037510375
<span>

packages/mui/src/FieldHelpTemplate/FieldHelpTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import FormHelperText from '@mui/material/FormHelperText';
21
import { RichHelp } from '@rjsf/core';
32
import { helpId, FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
3+
import FormHelperText from '@mui/material/FormHelperText';
44

55
/** The `FieldHelpTemplate` component renders any help desired for a field
66
*

0 commit comments

Comments
 (0)