66 @loaded =" metaLoaded"
77 v-slot =" { meta, value, loading: loadingMeta }"
88 >
9- <div :class =" classes" >
9+ <component :is = " wrapFieldsInCards ? 'Card' : ' div' " :class =" classes" >
1010 <div class =" field-inner" >
1111 <label
1212 v-if =" showLabel"
1616 >
1717 <span
1818 v-if =" showLabelText"
19- class =" ltr:mr-1 rtl:ml -1"
19+ class =" me -1"
2020 :class =" { 'text-gray-600': syncable && isSynced }"
2121 v-text =" __(labelText)"
2222 v-tooltip =" { content: config.handle, delay: 500, autoHide: false }"
2323 />
24- <i class =" required ltr:mr-1 rtl:ml -1" v-if =" showLabelText && config.required" >*</i >
24+ <i class =" required me -1" v-if =" showLabelText && config.required" >*</i >
2525 <avatar
2626 v-if =" isLocked"
2727 :user =" lockingUser"
3030 />
3131 <span
3232 v-if =" isReadOnly && !isTab && !isSection"
33- class =" mt-0.5 text-2xs font-normal text-gray-500 dark:text-dark-200 ltr:mr-1 rtl:ml -1"
33+ class =" mt-0.5 text-2xs font-normal text-gray-500 dark:text-dark-200 me -1"
3434 >
3535 {{ isLocked ? __('Locked') : __('Read Only') }}
3636 </span >
3737 <svg-icon
3838 name =" translate"
39- class =" h -4 w-4 text-gray-600 ltr:mr-1 rtl:ml -1"
39+ class =" size -4 text-gray-600 me -1"
4040 v-if =" isLocalizable && !isTab"
4141 v-tooltip.top =" __('Localizable field')"
4242 />
5050 >
5151 <svg-icon
5252 name =" light/hyperlink"
53- class =" mb-1 h -4 w-4 text-gray-600 ltr:mr-1.5 rtl:ml -1.5"
53+ class =" mb-1 size -4 text-gray-600 me -1.5"
5454 v-tooltip.top =" __('messages.field_synced_with_origin')"
5555 />
5656 </button >
6464 >
6565 <svg-icon
6666 name =" light/hyperlink-broken"
67- class =" mb-1 h -4 w-4 text-gray-600 ltr:mr-1.5 rtl:ml -1.5"
67+ class =" mb-1 size -4 text-gray-600 me -1.5"
6868 v-tooltip.top =" __('messages.field_desynced_from_origin')"
6969 />
7070 </button >
7171 </label >
7272
73- <div
74- class =" help-block"
75- :class =" { '-mt-2': showLabel }"
73+ <ui-description
74+ :class =" { '-mt-1 mb-2': showLabel }"
7675 v-if =" instructions && config.instructions_position !== 'below'"
7776 v-html =" instructions"
7877 />
105104 <!-- TODO: name prop should include prefixing when used recursively like inside a grid. -->
106105 </slot >
107106
108- <div
109- class =" help-block mt-2"
107+ <ui-description
108+ class =" mt-2"
110109 v-if =" instructions && config.instructions_position === 'below'"
111110 v-html =" instructions"
112111 />
113112
114113 <div v-if =" hasError" >
115114 <small class =" help-block mb-0 mt-2 text-red-500" v-for =" (error, i) in errors" :key =" i" v-text =" error" />
116115 </div >
117- </div >
116+ </component >
118117 </publish-field-meta >
119118</template >
120119
121120<script >
121+ import { Card } from ' @statamic/ui' ;
122122import { marked } from ' marked' ;
123123import titleize from ' ../../util/titleize' ;
124124import deslugify from ' ../../util/deslugify' ;
125125
126126export default {
127+ components: {
128+ Card,
129+ },
130+
127131 props: {
128132 config: {
129133 type: Object ,
@@ -145,6 +149,7 @@ export default {
145149 inject: {
146150 store: {},
147151 isInsideConfigFields: { default: false },
152+ wrapFieldsInCards: { default: false },
148153 },
149154
150155 data () {
@@ -195,7 +200,7 @@ export default {
195200 ` ${ this .config .component || this .config .type } -fieldtype` ,
196201 ,
197202 this .isReadOnly ? ' read-only-field' : ' ' ,
198- this .isInsideConfigFields ? ' config-field' : ` ${ tailwind_width_class (this .config .width )} ` ,
203+ this .isInsideConfigFields ? ' config-field' : ` ${ field_width_class (this .config .width )} ` ,
199204 this .showLabel ? ' has-field-label' : ' ' ,
200205 this .shouldShowFieldActions ? ' has-field-dropdown' : ' ' ,
201206 this .config .classes || ' ' ,
0 commit comments