diff --git a/dist/build/assets/statamic-group-29b7d030.css b/dist/build/assets/statamic-group-29b7d030.css new file mode 100644 index 0000000..ed33a9c --- /dev/null +++ b/dist/build/assets/statamic-group-29b7d030.css @@ -0,0 +1 @@ +.grp-mt-2{margin-top:.5rem}.grp-items-center{align-items:center}.grp-justify-between{justify-content:space-between}.group-fieldtype{padding:0!important;border-top-width:1px;border-bottom-width:1px}.group-fieldtype>.field-inner,.group-fieldtype>label,.group-fieldtype>label:first-child+.help-block{display:none!important}.group-fieldtype .section-fieldtype.form-group:first-child{border-top-left-radius:0;border-top-right-radius:0;border-top-width:1px} diff --git a/dist/build/assets/statamic-group-d752d391.js b/dist/build/assets/statamic-group-7565f277.js similarity index 61% rename from dist/build/assets/statamic-group-d752d391.js rename to dist/build/assets/statamic-group-7565f277.js index 1b64878..36bba1a 100644 --- a/dist/build/assets/statamic-group-d752d391.js +++ b/dist/build/assets/statamic-group-7565f277.js @@ -1 +1 @@ -function u(n,e,t,a,l,r,g,d){var i=typeof n=="function"?n.options:n;e&&(i.render=e,i.staticRenderFns=t,i._compiled=!0),a&&(i.functional=!0),r&&(i._scopeId="data-v-"+r);var s;if(g?(s=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),l&&l.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(g)},i._ssrRegister=s):l&&(s=d?function(){l.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:l),s)if(i.functional){i._injectStyles=s;var _=i.render;i.render=function(p,c){return s.call(c),_(p,c)}}else{var f=i.beforeCreate;i.beforeCreate=f?[].concat(f,s):[s]}return{exports:n,options:i}}const h={mixins:[Fieldtype],data(){return{toggle:!1}},watch:{toggle(){this.config.save_toggle_state&&this.update(this.toggle)}},mounted(){this.config.save_toggle_state&&(this.toggle=this.value);let n=this.$el.closest(".publish-field"),e=[];for(;n.nextElementSibling&&!n.nextElementSibling.classList.contains("group-fieldtype");)e.push(n.nextElementSibling),n=n.nextElementSibling;this.$nextTick(()=>{e.forEach(t=>{this.$el.querySelector(".publish-fields").appendChild(t)})})}};var v=function(){var e=this,t=e._self._c;return t("div",[e.config.show_header?t("div",{staticClass:"form-group section-fieldtype w-full"},[t("div",{staticClass:"flex grp-justify-between grp-items-center"},[t("div",{staticClass:"field-inner"},[t("label",{staticClass:"publish-field-label"},[t("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.config.handle,delay:300,autoHide:!1},expression:"{content: config.handle, delay: 300, autoHide: false}"}],domProps:{textContent:e._s(e.config.display)}})]),e.config.instructions?t("div",{staticClass:"help-block -mt-2"},[t("p",{domProps:{textContent:e._s(e.config.instructions)}})]):e._e()]),e.config.show_toggle?t("div",{staticClass:"toggle-fieldtype-wrapper grp-mt-2"},[t("toggle-input",{model:{value:e.toggle,callback:function(a){e.toggle=a},expression:"toggle"}})],1):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.config.toggle_controls_visibility||e.config.toggle_controls_visibility&&e.toggle,expression:"!config.toggle_controls_visibility || (config.toggle_controls_visibility && toggle)"}],staticClass:"publish-fields w-full"})])},m=[],b=u(h,v,m,!1,null,null,null,null);const C=b.exports;Statamic.booting(()=>{Statamic.$components.register("group-fieldtype",C)}); +function u(n,e,t,a,l,r,f,d){var i=typeof n=="function"?n.options:n;e&&(i.render=e,i.staticRenderFns=t,i._compiled=!0),a&&(i.functional=!0),r&&(i._scopeId="data-v-"+r);var s;if(f?(s=function(o){o=o||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!o&&typeof __VUE_SSR_CONTEXT__<"u"&&(o=__VUE_SSR_CONTEXT__),l&&l.call(this,o),o&&o._registeredComponents&&o._registeredComponents.add(f)},i._ssrRegister=s):l&&(s=d?function(){l.call(this,(i.functional?this.parent:this).$root.$options.shadowRoot)}:l),s)if(i.functional){i._injectStyles=s;var _=i.render;i.render=function(p,c){return s.call(c),_(p,c)}}else{var g=i.beforeCreate;i.beforeCreate=g?[].concat(g,s):[s]}return{exports:n,options:i}}const h={mixins:[Fieldtype],data(){return{toggle:!1}},watch:{toggle(){this.config.save_toggle_state&&this.update(this.toggle)}},mounted(){this.config.save_toggle_state&&(this.toggle=this.value);let n=this.$el.closest(".publish-field"),e=[];for(;n.nextElementSibling&&!n.nextElementSibling.classList.contains("group-fieldtype");)e.push(n.nextElementSibling),n=n.nextElementSibling;this.$nextTick(()=>{e.forEach(t=>{this.$el.querySelector(".publish-fields").appendChild(t)})})}};var v=function(){var e=this,t=e._self._c;return t("div",[e.config.show_header?t("div",{staticClass:"form-group section-fieldtype w-full"},[t("div",{staticClass:"flex grp-justify-between grp-items-center"},[t("div",{staticClass:"field-inner"},[t("label",{staticClass:"publish-field-label"},[t("span",{directives:[{name:"tooltip",rawName:"v-tooltip",value:{content:e.config.handle,delay:300,autoHide:!1},expression:"{content: config.handle, delay: 300, autoHide: false}"}],domProps:{textContent:e._s(e.config.display)}})]),e.config.instructions?t("div",{staticClass:"help-block -mt-2",domProps:{innerHTML:e._s(e.$options.filters.markdown(e.config.instructions))}}):e._e()]),e.config.show_toggle?t("div",{staticClass:"toggle-fieldtype-wrapper grp-mt-2"},[t("toggle-input",{model:{value:e.toggle,callback:function(a){e.toggle=a},expression:"toggle"}})],1):e._e()])]):e._e(),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.config.toggle_controls_visibility||e.config.toggle_controls_visibility&&e.toggle,expression:"!config.toggle_controls_visibility || (config.toggle_controls_visibility && toggle)"}],staticClass:"publish-fields w-full"})])},m=[],b=u(h,v,m,!1,null,null,null,null);const C=b.exports;Statamic.booting(()=>{Statamic.$components.register("group-fieldtype",C)}); diff --git a/dist/build/assets/statamic-group-89a25fd5.css b/dist/build/assets/statamic-group-89a25fd5.css deleted file mode 100644 index 8a2caf3..0000000 --- a/dist/build/assets/statamic-group-89a25fd5.css +++ /dev/null @@ -1 +0,0 @@ -.grp-mt-2{margin-top:.5rem}.grp-items-center{align-items:center}.grp-justify-between{justify-content:space-between}.group-fieldtype{padding:0!important;border-top-width:1px;border-bottom-width:1px}.group-fieldtype>.field-inner,.group-fieldtype>label{display:none!important}.group-fieldtype .section-fieldtype.form-group:first-child{border-top-left-radius:0;border-top-right-radius:0;border-top-width:1px} diff --git a/dist/build/manifest.json b/dist/build/manifest.json index fed677e..24a6820 100644 --- a/dist/build/manifest.json +++ b/dist/build/manifest.json @@ -1,11 +1,11 @@ { "resources/css/statamic-group.css": { - "file": "assets/statamic-group-89a25fd5.css", + "file": "assets/statamic-group-29b7d030.css", "isEntry": true, "src": "resources/css/statamic-group.css" }, "resources/js/statamic-group.js": { - "file": "assets/statamic-group-d752d391.js", + "file": "assets/statamic-group-7565f277.js", "isEntry": true, "src": "resources/js/statamic-group.js" } diff --git a/resources/css/statamic-group.css b/resources/css/statamic-group.css index dd89359..c7b44a6 100644 --- a/resources/css/statamic-group.css +++ b/resources/css/statamic-group.css @@ -8,7 +8,8 @@ } .group-fieldtype > .field-inner, -.group-fieldtype > label { +.group-fieldtype > label, +.group-fieldtype > label:first-child + .help-block { display: none !important; } diff --git a/resources/js/compontents/GroupFieldtype.vue b/resources/js/compontents/GroupFieldtype.vue index 69afbca..89eb5e8 100644 --- a/resources/js/compontents/GroupFieldtype.vue +++ b/resources/js/compontents/GroupFieldtype.vue @@ -6,9 +6,7 @@ -
-

-
+