11<script setup>
22import Layout from ' @/pages/layout/Layout.vue' ;
3+ import PanelLayout from ' @/pages/layout/PanelLayout.vue' ;
34import FormsLayout from ' ./Layout.vue' ;
45import { Button , Card , Checkbox , CheckboxGroup , Field , Header , Heading , Icon , Input , Panel , PanelHeader , Radio , RadioGroup , Select , StatusIndicator , Switch , Textarea , Tabs , TabList , TabTrigger , TabContent } from ' @ui' ;
56import LayoutPanel from ' @/pages/layout/LayoutPanel.vue' ;
67import { computed , ref } from ' vue' ;
78
8- defineOptions ({ layout: [Layout, FormsLayout] });
9+ defineOptions ({ layout: [Layout, PanelLayout, FormsLayout] });
910
1011const props = defineProps ({
1112 form: Object ,
@@ -21,6 +22,10 @@ const favoriteAlbum = ref(null);
2122const secondFavoriteAlbum = ref (null );
2223const emailNotifications = ref ([]);
2324const wantsFreeDrinkVoucher = ref (false );
25+ const settingsLabel = ref (__ (' Which album was your favorite?' ));
26+ const settingsHelpText = ref (' ' );
27+ const settingsPlaceholder = ref (' ' );
28+ const settingsCharacterLimit = ref (null );
2429const heardAboutOptions = [
2530 { label: __ (' Instagram' ), value: ' instagram' },
2631 { label: __ (' Friend referral' ), value: ' referral' },
@@ -43,6 +48,7 @@ const notificationOptions = [
4348< / script>
4449
4550< template>
51+
4652 < Teleport to= " #form-layout-actions" >
4753 < Button variant= " primary" : aria- label= " __('Save')" >
4854 < Icon name= " save" class = " sm:hidden" / >
@@ -52,7 +58,7 @@ const notificationOptions = [
5258
5359 < Button
5460 class = "
55- min-[1000px]:hidden sticky top-3 mt-3 z-[var (--z-index-above)]
61+ min-[1000px]:hidden sticky top-3 mt-3 z-(--z-index-above)
5662 sm:-translate-x-3 md:-translate-x-9 col-start-1 row-start-1
5763 "
5864 popovertarget= " popover-left-panel"
@@ -367,7 +373,9 @@ const notificationOptions = [
367373 < / div>
368374 < / LayoutPanel>
369375
376+
370377 < div class = " col-span-full row-start-1 max-[1000px]:pt-14" >
378+
371379 < Header class = " mx-auto max-w-5xl" >
372380 < template #title>
373381 < StatusIndicator status= " published" / >
@@ -392,9 +400,11 @@ const notificationOptions = [
392400 / >
393401 < / Field>
394402
403+ < div data- editing- field>
395404 < Field : label= " __('What do you like most about our band?')" required>
396405 < Textarea v- model= " favoriteThing" : rows= " 4" resize= " vertical" / >
397406 < / Field>
407+ < / div>
398408
399409 < Field : label= " __('How long have you been a fan?')" : instructions= " __('If you don\' t remember, just give your best estimate.')" >
400410 < Input v- model= " fanLength" / >
@@ -447,7 +457,7 @@ const notificationOptions = [
447457
448458 < Button
449459 class = "
450- min-[1000px]:hidden sticky top-3 mt-3 z-[var (--z-index-above)]
460+ min-[1000px]:hidden sticky top-3 mt-3 z-(--z-index-above)
451461 sm:translate-x-3 md:translate-x-9 mb-5 col-start-3 row-start-1"
452462 popovertarget= " popover-right-panel"
453463 : text= " __('Settings')"
@@ -463,7 +473,7 @@ const notificationOptions = [
463473 < button class = " right-panel-popover__close-button" title= " Close" popovertarget= " popover-right-panel" >
464474 < svg height= " 100pt" aria- hidden= " true" viewBox= " 0 0 100 100" width= " 100pt" xmlns= " http://www.w3.org/2000/svg" >< path d= " m91.668 13.676-5.3398-5.3398-36.328 36.324-36.328-36.324-5.3398 5.3398 36.328 36.324-36.328 36.324 5.3398 5.3398 36.328-36.324 36.328 36.324 5.3398-5.3398-36.328-36.324z" / >< / svg>
465475 < / button>
466- < div class = " @container py-6 px-4 " >
476+ < div class = " @container py-6 px-2.5 " >
467477 < Tabs v- model: modelValue= " activeSettingsTab" : unmount- on- hide= " false" >
468478 < TabList class = " inline-flex flex-wrap [&_button]:w-auto! mb-4 mx-0!" >
469479 < TabTrigger name= " settings" : text= " __('Settings')" / >
@@ -472,7 +482,28 @@ const notificationOptions = [
472482 < / TabList>
473483
474484 < TabContent name= " settings" >
475- < p class = " text-sm text-gray-700 dark:text-gray-200" > {{ __ (' Settings' ) }}< / p>
485+ < div class = " space-y-6 pt-8" >
486+ < div class = " flex items-center gap-2.5" >
487+ < Icon name= " fieldtype-radio" class = " size-4 text-gray-500 dark:text-gray-300" / >
488+ < h3 class = " text-xl font-medium antialiased" > {{ __ (' Multi Choice' ) }}< / h3>
489+ < / div>
490+
491+ < Field : label= " __('Label')" >
492+ < Input v- model= " settingsLabel" / >
493+ < / Field>
494+
495+ < Field : label= " __('Help Text')" : instructions= " __('Additional field instructions like this.')" >
496+ < Textarea v- model= " settingsHelpText" : rows= " 2" resize= " vertical" / >
497+ < / Field>
498+
499+ < Field : label= " __('Placeholder')" >
500+ < Input v- model= " settingsPlaceholder" / >
501+ < / Field>
502+
503+ < Field : label= " __('Character Limit')" : instructions= " __('Set the recommended maximum number of enterable characters.')" >
504+ < Input v- model= " settingsCharacterLimit" type= " number" / >
505+ < / Field>
506+ < / div>
476507 < / TabContent>
477508 < TabContent name= " logic" >
478509 < p class = " text-sm text-gray-700 dark:text-gray-200" > {{ __ (' Logic' ) }}< / p>
@@ -484,8 +515,9 @@ const notificationOptions = [
484515 < / div>
485516 < / div>
486517 < / div>
518+
487519 <!-- This is the desktop nav - the content is repeated from the right panel -->
488- < div class = " @container relative py-6 px-4 max-[1000px]:hidden" >
520+ < div class = " @container relative py-6 px-2.5 max-[1000px]:hidden" >
489521 < Tabs v- model: modelValue= " activeSettingsTab" : unmount- on- hide= " false" >
490522 < TabList class = " inline-flex flex-wrap [&_button]:w-auto! mb-4 mx-0!" >
491523 < TabTrigger name= " settings" : text= " __('Settings')" / >
@@ -494,7 +526,64 @@ const notificationOptions = [
494526 < / TabList>
495527
496528 < TabContent name= " settings" >
497- < p class = " text-sm text-gray-700 dark:text-gray-200" > {{ __ (' Settings' ) }}< / p>
529+ < div class = " space-y-6 pt-8" >
530+ < div data- field- settings class = " flex items-center gap-2.5" >
531+ < Icon name= " fieldtype-radio" class = " size-4 text-gray-500 dark:text-gray-300" / >
532+ < h3 class = " text-xl font-medium antialiased" > {{ __ (' Multi Choice' ) }}< / h3>
533+ < / div>
534+
535+ < Field : label= " __('Label')" >
536+ < Input v- model= " settingsLabel" / >
537+ < / Field>
538+
539+ < Field : label= " __('Help Text')" : instructions= " __('Additional field instructions like this.')" >
540+ < Textarea v- model= " settingsHelpText" : rows= " 2" resize= " vertical" / >
541+ < / Field>
542+
543+ < Field : label= " __('Placeholder')" >
544+ < Input v- model= " settingsPlaceholder" / >
545+ < / Field>
546+
547+ < Field : label= " __('Character Limit')" : instructions= " __('Set the recommended maximum number of enterable characters.')" >
548+ < Input v- model= " settingsCharacterLimit" type= " number" / >
549+ < / Field>
550+
551+ < Field : label= " __('Help Text')" : instructions= " __('Additional field instructions like this.')" >
552+ < Textarea v- model= " settingsHelpText" : rows= " 2" resize= " vertical" / >
553+ < / Field>
554+
555+ < Field : label= " __('Placeholder')" >
556+ < Input v- model= " settingsPlaceholder" / >
557+ < / Field>
558+
559+ < Field : label= " __('Character Limit')" : instructions= " __('Set the recommended maximum number of enterable characters.')" >
560+ < Input v- model= " settingsCharacterLimit" type= " number" / >
561+ < / Field>
562+
563+ < Field : label= " __('Help Text')" : instructions= " __('Additional field instructions like this.')" >
564+ < Textarea v- model= " settingsHelpText" : rows= " 2" resize= " vertical" / >
565+ < / Field>
566+
567+ < Field : label= " __('Placeholder')" >
568+ < Input v- model= " settingsPlaceholder" / >
569+ < / Field>
570+
571+ < Field : label= " __('Character Limit')" : instructions= " __('Set the recommended maximum number of enterable characters.')" >
572+ < Input v- model= " settingsCharacterLimit" type= " number" / >
573+ < / Field>
574+
575+ < Field : label= " __('Help Text')" : instructions= " __('Additional field instructions like this.')" >
576+ < Textarea v- model= " settingsHelpText" : rows= " 2" resize= " vertical" / >
577+ < / Field>
578+
579+ < Field : label= " __('Placeholder')" >
580+ < Input v- model= " settingsPlaceholder" / >
581+ < / Field>
582+
583+ < Field : label= " __('Character Limit')" : instructions= " __('Set the recommended maximum number of enterable characters.')" >
584+ < Input v- model= " settingsCharacterLimit" type= " number" / >
585+ < / Field>
586+ < / div>
498587 < / TabContent>
499588 < TabContent name= " logic" >
500589 < p class = " text-sm text-gray-700 dark:text-gray-200" > {{ __ (' Logic' ) }}< / p>
0 commit comments