diff --git a/dist/css/field.css b/dist/css/field.css index ac4188b..26d6bd0 100644 --- a/dist/css/field.css +++ b/dist/css/field.css @@ -1 +1 @@ -.tabs-mt-2{margin-top:.5rem!important}.tabs-mt-3{margin-top:.75rem!important}.tabs-border-b-2{border-bottom-width:2px!important}.tabs-border-b-amber-500{--tw-border-opacity:1!important;border-bottom-color:rgb(245 158 11/var(--tw-border-opacity))!important}.tabs-border-b-blue-500{--tw-border-opacity:1!important;border-bottom-color:rgb(59 130 246/var(--tw-border-opacity))!important}.tabs-border-b-cyan-500{--tw-border-opacity:1!important;border-bottom-color:rgb(6 182 212/var(--tw-border-opacity))!important}.tabs-border-b-emerald-500{--tw-border-opacity:1!important;border-bottom-color:rgb(16 185 129/var(--tw-border-opacity))!important}.tabs-border-b-fuchsia-500{--tw-border-opacity:1!important;border-bottom-color:rgb(217 70 239/var(--tw-border-opacity))!important}.tabs-border-b-gray-500{--tw-border-opacity:1!important;border-bottom-color:rgb(100 116 139/var(--tw-border-opacity))!important}.tabs-border-b-green-500{--tw-border-opacity:1!important;border-bottom-color:rgb(34 197 94/var(--tw-border-opacity))!important}.tabs-border-b-indigo-500{--tw-border-opacity:1!important;border-bottom-color:rgb(99 102 241/var(--tw-border-opacity))!important}.tabs-border-b-lime-500{--tw-border-opacity:1!important;border-bottom-color:rgb(132 204 22/var(--tw-border-opacity))!important}.tabs-border-b-neutral-500{--tw-border-opacity:1!important;border-bottom-color:rgb(115 115 115/var(--tw-border-opacity))!important}.tabs-border-b-orange-500{--tw-border-opacity:1!important;border-bottom-color:rgb(249 115 22/var(--tw-border-opacity))!important}.tabs-border-b-pink-500{--tw-border-opacity:1!important;border-bottom-color:rgb(236 72 153/var(--tw-border-opacity))!important}.tabs-border-b-purple-500{--tw-border-opacity:1!important;border-bottom-color:rgb(168 85 247/var(--tw-border-opacity))!important}.tabs-border-b-red-500{--tw-border-opacity:1!important;border-bottom-color:rgb(239 68 68/var(--tw-border-opacity))!important}.tabs-border-b-rose-500{--tw-border-opacity:1!important;border-bottom-color:rgb(244 63 94/var(--tw-border-opacity))!important}.tabs-border-b-sky-500{--tw-border-opacity:1!important;border-bottom-color:rgb(14 165 233/var(--tw-border-opacity))!important}.tabs-border-b-slate-500{--tw-border-opacity:1!important;border-bottom-color:rgb(100 116 139/var(--tw-border-opacity))!important}.tabs-border-b-stone-500{--tw-border-opacity:1!important;border-bottom-color:rgb(120 113 108/var(--tw-border-opacity))!important}.tabs-border-b-teal-500{--tw-border-opacity:1!important;border-bottom-color:rgb(20 184 166/var(--tw-border-opacity))!important}.tabs-border-b-violet-500{--tw-border-opacity:1!important;border-bottom-color:rgb(139 92 246/var(--tw-border-opacity))!important}.tabs-border-b-yellow-500{--tw-border-opacity:1!important;border-bottom-color:rgb(234 179 8/var(--tw-border-opacity))!important}.tabs-border-b-zinc-500{--tw-border-opacity:1!important;border-bottom-color:rgb(113 113 122/var(--tw-border-opacity))!important}.tabs-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.tabs-font-bold{font-weight:700!important}.tabs-font-semibold{font-weight:600!important}.tabs-italic{font-style:italic!important}.tabs-text-amber-500{--tw-text-opacity:1!important;color:rgb(245 158 11/var(--tw-text-opacity))!important}.tabs-text-blue-500{--tw-text-opacity:1!important;color:rgb(59 130 246/var(--tw-text-opacity))!important}.tabs-text-cyan-500{--tw-text-opacity:1!important;color:rgb(6 182 212/var(--tw-text-opacity))!important}.tabs-text-emerald-500{--tw-text-opacity:1!important;color:rgb(16 185 129/var(--tw-text-opacity))!important}.tabs-text-fuchsia-500{--tw-text-opacity:1!important;color:rgb(217 70 239/var(--tw-text-opacity))!important}.tabs-text-gray-500{--tw-text-opacity:1!important;color:rgb(100 116 139/var(--tw-text-opacity))!important}.tabs-text-gray-600{--tw-text-opacity:1!important;color:rgb(71 85 105/var(--tw-text-opacity))!important}.tabs-text-green-500{--tw-text-opacity:1!important;color:rgb(34 197 94/var(--tw-text-opacity))!important}.tabs-text-indigo-500{--tw-text-opacity:1!important;color:rgb(99 102 241/var(--tw-text-opacity))!important}.tabs-text-lime-500{--tw-text-opacity:1!important;color:rgb(132 204 22/var(--tw-text-opacity))!important}.tabs-text-neutral-500{--tw-text-opacity:1!important;color:rgb(115 115 115/var(--tw-text-opacity))!important}.tabs-text-orange-500{--tw-text-opacity:1!important;color:rgb(249 115 22/var(--tw-text-opacity))!important}.tabs-text-pink-500{--tw-text-opacity:1!important;color:rgb(236 72 153/var(--tw-text-opacity))!important}.tabs-text-purple-500{--tw-text-opacity:1!important;color:rgb(168 85 247/var(--tw-text-opacity))!important}.tabs-text-red-500{--tw-text-opacity:1!important;color:rgb(239 68 68/var(--tw-text-opacity))!important}.tabs-text-rose-500{--tw-text-opacity:1!important;color:rgb(244 63 94/var(--tw-text-opacity))!important}.tabs-text-sky-500{--tw-text-opacity:1!important;color:rgb(14 165 233/var(--tw-text-opacity))!important}.tabs-text-slate-500{--tw-text-opacity:1!important;color:rgb(100 116 139/var(--tw-text-opacity))!important}.tabs-text-stone-500{--tw-text-opacity:1!important;color:rgb(120 113 108/var(--tw-text-opacity))!important}.tabs-text-teal-500{--tw-text-opacity:1!important;color:rgb(20 184 166/var(--tw-text-opacity))!important}.tabs-text-violet-500{--tw-text-opacity:1!important;color:rgb(139 92 246/var(--tw-text-opacity))!important}.tabs-text-yellow-500{--tw-text-opacity:1!important;color:rgb(234 179 8/var(--tw-text-opacity))!important}.tabs-text-zinc-500{--tw-text-opacity:1!important;color:rgb(113 113 122/var(--tw-text-opacity))!important}.tab-group+div{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.relationship-tabs-panel.card .flex-no-shrink.ml-auto.mb-6{margin-bottom:0}.tab-group .tab-menu{margin-left:auto;margin-right:auto;position:relative;z-index:0}.tab-group .tab-menu>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.tab-group .tab-menu{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-bottom-width:1px;border-color:rgb(226 232 240/var(--tw-border-opacity));border-left-color:rgb(226 232 240/var(--tw-border-opacity));border-right-color:rgb(226 232 240/var(--tw-border-opacity));border-top-left-radius:.5rem;border-top-right-radius:.5rem;overflow-x:auto}.tab-group .tab-menu:is(.tabs-dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(51 65 85/var(--tw-divide-opacity))}.tab-group .tab-menu:is(.tabs-dark *){--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity));border-color:rgb(51 65 85/var(--tw-border-opacity))}.tab-group .tab-menu{display:flex}.tab-group .tab-item{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));cursor:pointer;flex:1 1 0%;flex-shrink:0;font-weight:600;min-width:-moz-min-content;min-width:min-content;overflow:hidden;padding:1rem;position:relative;text-align:center}.tab-group .tab-item:first-child{border-top-left-radius:.5rem}.tab-group .tab-item:last-child{border-top-right-radius:.5rem}.tab-group .tab-item:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.tab-group .tab-item:focus{z-index:10}.tab-group .tab-item:is(.tabs-dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.tab-group .tab-item:is(.tabs-dark *):hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.tab-group .tab.fields-tab{padding:.5rem 1.5rem}form .tab-group .tab.fields-tab{padding:.5rem 0}.tab-group .tab-card{--tw-bg-opacity:1;--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity));border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;border-top-left-radius:.5rem;border-top-right-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tab-group .tab-card:is(.tabs-dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.tab-group .tab h1{display:none}.tab-group h1+.flex{padding:1rem 1rem 0}.tab-group h1+.flex>div.mb-6,.tab-group h1+.flex>div>div.mb-6{margin-bottom:0}.tab-group h1+.flex+div{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;border-top-left-radius:0;border-top-right-radius:0;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tab-has-error:after{content:" *"}.tabs-border-b-primary-500{border-bottom-color:rgba(var(--colors-primary-500))}.tabs-text-primary-500{color:rgba(var(--colors-primary-500))}.hover\:tabs-text-gray-800:hover{--tw-text-opacity:1!important;color:rgb(30 41 59/var(--tw-text-opacity))!important}.dark\:tabs-text-gray-400:is(.tabs-dark *){--tw-text-opacity:1!important;color:rgb(148 163 184/var(--tw-text-opacity))!important}.hover\:dark\:tabs-text-gray-200:is(.tabs-dark *):hover{--tw-text-opacity:1!important;color:rgb(226 232 240/var(--tw-text-opacity))!important} +.tabs-mt-2{margin-top:.5rem!important}.tabs-mt-3{margin-top:.75rem!important}.tabs-border-b-2{border-bottom-width:2px!important}.tabs-border-b-amber-500{--tw-border-opacity:1!important;border-bottom-color:rgb(245 158 11/var(--tw-border-opacity))!important}.tabs-border-b-blue-500{--tw-border-opacity:1!important;border-bottom-color:rgb(59 130 246/var(--tw-border-opacity))!important}.tabs-border-b-cyan-500{--tw-border-opacity:1!important;border-bottom-color:rgb(6 182 212/var(--tw-border-opacity))!important}.tabs-border-b-emerald-500{--tw-border-opacity:1!important;border-bottom-color:rgb(16 185 129/var(--tw-border-opacity))!important}.tabs-border-b-fuchsia-500{--tw-border-opacity:1!important;border-bottom-color:rgb(217 70 239/var(--tw-border-opacity))!important}.tabs-border-b-gray-500{--tw-border-opacity:1!important;border-bottom-color:rgb(100 116 139/var(--tw-border-opacity))!important}.tabs-border-b-green-500{--tw-border-opacity:1!important;border-bottom-color:rgb(34 197 94/var(--tw-border-opacity))!important}.tabs-border-b-indigo-500{--tw-border-opacity:1!important;border-bottom-color:rgb(99 102 241/var(--tw-border-opacity))!important}.tabs-border-b-lime-500{--tw-border-opacity:1!important;border-bottom-color:rgb(132 204 22/var(--tw-border-opacity))!important}.tabs-border-b-neutral-500{--tw-border-opacity:1!important;border-bottom-color:rgb(115 115 115/var(--tw-border-opacity))!important}.tabs-border-b-orange-500{--tw-border-opacity:1!important;border-bottom-color:rgb(249 115 22/var(--tw-border-opacity))!important}.tabs-border-b-pink-500{--tw-border-opacity:1!important;border-bottom-color:rgb(236 72 153/var(--tw-border-opacity))!important}.tabs-border-b-purple-500{--tw-border-opacity:1!important;border-bottom-color:rgb(168 85 247/var(--tw-border-opacity))!important}.tabs-border-b-red-500{--tw-border-opacity:1!important;border-bottom-color:rgb(239 68 68/var(--tw-border-opacity))!important}.tabs-border-b-rose-500{--tw-border-opacity:1!important;border-bottom-color:rgb(244 63 94/var(--tw-border-opacity))!important}.tabs-border-b-sky-500{--tw-border-opacity:1!important;border-bottom-color:rgb(14 165 233/var(--tw-border-opacity))!important}.tabs-border-b-slate-500{--tw-border-opacity:1!important;border-bottom-color:rgb(100 116 139/var(--tw-border-opacity))!important}.tabs-border-b-stone-500{--tw-border-opacity:1!important;border-bottom-color:rgb(120 113 108/var(--tw-border-opacity))!important}.tabs-border-b-teal-500{--tw-border-opacity:1!important;border-bottom-color:rgb(20 184 166/var(--tw-border-opacity))!important}.tabs-border-b-violet-500{--tw-border-opacity:1!important;border-bottom-color:rgb(139 92 246/var(--tw-border-opacity))!important}.tabs-border-b-yellow-500{--tw-border-opacity:1!important;border-bottom-color:rgb(234 179 8/var(--tw-border-opacity))!important}.tabs-border-b-zinc-500{--tw-border-opacity:1!important;border-bottom-color:rgb(113 113 122/var(--tw-border-opacity))!important}.tabs-text-sm{font-size:.875rem!important;line-height:1.25rem!important}.tabs-font-bold{font-weight:700!important}.tabs-font-semibold{font-weight:600!important}.tabs-italic{font-style:italic!important}.tabs-text-amber-500{--tw-text-opacity:1!important;color:rgb(245 158 11/var(--tw-text-opacity))!important}.tabs-text-blue-500{--tw-text-opacity:1!important;color:rgb(59 130 246/var(--tw-text-opacity))!important}.tabs-text-cyan-500{--tw-text-opacity:1!important;color:rgb(6 182 212/var(--tw-text-opacity))!important}.tabs-text-emerald-500{--tw-text-opacity:1!important;color:rgb(16 185 129/var(--tw-text-opacity))!important}.tabs-text-fuchsia-500{--tw-text-opacity:1!important;color:rgb(217 70 239/var(--tw-text-opacity))!important}.tabs-text-gray-500{--tw-text-opacity:1!important;color:rgb(100 116 139/var(--tw-text-opacity))!important}.tabs-text-gray-600{--tw-text-opacity:1!important;color:rgb(71 85 105/var(--tw-text-opacity))!important}.tabs-text-green-500{--tw-text-opacity:1!important;color:rgb(34 197 94/var(--tw-text-opacity))!important}.tabs-text-indigo-500{--tw-text-opacity:1!important;color:rgb(99 102 241/var(--tw-text-opacity))!important}.tabs-text-lime-500{--tw-text-opacity:1!important;color:rgb(132 204 22/var(--tw-text-opacity))!important}.tabs-text-neutral-500{--tw-text-opacity:1!important;color:rgb(115 115 115/var(--tw-text-opacity))!important}.tabs-text-orange-500{--tw-text-opacity:1!important;color:rgb(249 115 22/var(--tw-text-opacity))!important}.tabs-text-pink-500{--tw-text-opacity:1!important;color:rgb(236 72 153/var(--tw-text-opacity))!important}.tabs-text-purple-500{--tw-text-opacity:1!important;color:rgb(168 85 247/var(--tw-text-opacity))!important}.tabs-text-red-500{--tw-text-opacity:1!important;color:rgb(239 68 68/var(--tw-text-opacity))!important}.tabs-text-rose-500{--tw-text-opacity:1!important;color:rgb(244 63 94/var(--tw-text-opacity))!important}.tabs-text-sky-500{--tw-text-opacity:1!important;color:rgb(14 165 233/var(--tw-text-opacity))!important}.tabs-text-slate-500{--tw-text-opacity:1!important;color:rgb(100 116 139/var(--tw-text-opacity))!important}.tabs-text-stone-500{--tw-text-opacity:1!important;color:rgb(120 113 108/var(--tw-text-opacity))!important}.tabs-text-teal-500{--tw-text-opacity:1!important;color:rgb(20 184 166/var(--tw-text-opacity))!important}.tabs-text-violet-500{--tw-text-opacity:1!important;color:rgb(139 92 246/var(--tw-text-opacity))!important}.tabs-text-yellow-500{--tw-text-opacity:1!important;color:rgb(234 179 8/var(--tw-text-opacity))!important}.tabs-text-zinc-500{--tw-text-opacity:1!important;color:rgb(113 113 122/var(--tw-text-opacity))!important}.tab-group+div{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity))}.relationship-tabs-panel.card .flex-no-shrink.ml-auto.mb-6{margin-bottom:0}.tab-group .tab-menu{margin-left:auto;margin-right:auto;position:relative;z-index:0}.tab-group .tab-menu>:not([hidden])~:not([hidden]){--tw-divide-x-reverse:0;border-left-width:calc(1px*(1 - var(--tw-divide-x-reverse)));border-right-width:calc(1px*var(--tw-divide-x-reverse))}.tab-group .tab-menu{--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));border-bottom-width:1px;border-color:rgb(226 232 240/var(--tw-border-opacity));border-left-color:rgb(226 232 240/var(--tw-border-opacity));border-right-color:rgb(226 232 240/var(--tw-border-opacity));border-top-left-radius:.5rem;border-top-right-radius:.5rem;overflow-x:auto}.tab-group .tab-menu:is(.tabs-dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity:1;border-color:rgb(51 65 85/var(--tw-divide-opacity))}.tab-group .tab-menu:is(.tabs-dark *){--tw-border-opacity:1;--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity));border-color:rgb(51 65 85/var(--tw-border-opacity))}.tab-group .tab-menu{display:flex}.tab-group .tab-item{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));cursor:pointer;flex:1 1 0%;flex-shrink:0;font-weight:600;min-width:-moz-min-content;min-width:min-content;overflow:hidden;padding:1rem;position:relative;text-align:center}.tab-group .tab-item:first-child{border-top-left-radius:.5rem}.tab-group .tab-item:last-child{border-top-right-radius:.5rem}.tab-group .tab-item:hover{--tw-bg-opacity:1;background-color:rgb(248 250 252/var(--tw-bg-opacity))}.tab-group .tab-item:focus{z-index:10}.tab-group .tab-item:is(.tabs-dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.tab-group .tab-item:is(.tabs-dark *):hover{--tw-bg-opacity:1;background-color:rgb(51 65 85/var(--tw-bg-opacity))}.tab-group .tab.fields-tab{padding:.5rem 1.5rem}form .tab-group .tab.fields-tab{padding:.5rem 0}.tab-group .tab-card{--tw-bg-opacity:1;--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);background-color:rgb(255 255 255/var(--tw-bg-opacity));border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;border-top-left-radius:.5rem;border-top-right-radius:.5rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tab-group .tab-card:is(.tabs-dark *){--tw-bg-opacity:1;background-color:rgb(30 41 59/var(--tw-bg-opacity))}.tab-group .tab h1{display:none}.tab-group h1+.flex{padding:1rem 1rem 0}.tab-group h1+.flex>div.mb-6,.tab-group h1+.flex>div>div.mb-6{margin-bottom:0}.tab-group h1+.flex+div{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border-bottom-left-radius:.5rem;border-bottom-right-radius:.5rem;border-top-left-radius:0;border-top-right-radius:0;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.tab-has-error:after{content:" *"}.tabs-border-b-primary-500{border-bottom-color:rgba(var(--colors-primary-500))}.tabs-text-primary-500{color:rgba(var(--colors-primary-500))}.hover\:tabs-text-gray-800:hover{--tw-text-opacity:1!important;color:rgb(30 41 59/var(--tw-text-opacity))!important}.dark\:tabs-text-gray-400:is(.tabs-dark *){--tw-text-opacity:1!important;color:rgb(148 163 184/var(--tw-text-opacity))!important}.hover\:dark\:tabs-text-gray-200:is(.tabs-dark *):hover{--tw-text-opacity:1!important;color:rgb(226 232 240/var(--tw-text-opacity))!important} \ No newline at end of file diff --git a/dist/mix-manifest.json b/dist/mix-manifest.json index 507a525..5d59e8f 100644 --- a/dist/mix-manifest.json +++ b/dist/mix-manifest.json @@ -1,4 +1,4 @@ { "/js/field.js": "/js/field.js", "/css/field.css": "/css/field.css" -} +} diff --git a/resources/js/components/FormTabs.vue b/resources/js/components/FormTabs.vue index 61b0cf7..aa20789 100644 --- a/resources/js/components/FormTabs.vue +++ b/resources/js/components/FormTabs.vue @@ -25,6 +25,7 @@ > e.visible).length > 0 + }, + + fieldShown(e) { + Object.keys(this.tabs).forEach(key => { + this.tabs[key].fields.forEach(field => { + if (field.attribute == e) { + field.visible = true + } + }) + }) + }, + + fieldHidden(e) { + Object.keys(this.tabs).forEach(key => { + this.tabs[key].fields.forEach(field => { + if (field.attribute == e) { + field.visible = false + } + }) + }) + }, /** * Set Tabs