diff --git a/resources/css/app.css b/resources/css/app.css index 28279b99..f7ca8c23 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -3,10 +3,8 @@ @import 'tailwindcss/utilities'; @import 'base.css'; -@import 'switch'; @import 'layout'; @import 'buttons'; @import 'table'; @import 'bool'; -@import 'form'; @import 'editor'; diff --git a/resources/css/form.css b/resources/css/form.css deleted file mode 100644 index cd23a5c3..00000000 --- a/resources/css/form.css +++ /dev/null @@ -1,313 +0,0 @@ -:root { - --h-field-sm: 23px; - --h-field-base: 35px; - --h-field-lg: 42px; - --m-field-sm: 0.2rem; - --m-field-base: 0.3rem; - --m-field-lg: 0.4rem; -} -.size-sm { - height: var(--h-field-sm); -} -.size-base { - height: var(--h-field-base); -} -.size-lg { - height: var(--h-field-lg); -} - -.checkbox { - @apply flex flex-col relative cursor-pointer; - input[type="checkbox"] { - @apply invisible absolute; - & + span { - @apply transition-colors duration-300 flex items-center; - span { - @apply border-2 border-gray-800 relative rounded cursor-pointer flex flex-none justify-center items-center; - } - svg { - @apply text-white transition-opacity duration-300; - opacity: 0; - } - & + span { - a { - @apply text-primary-300; - } - } - } - &:checked + span svg { - opacity: 1; - } - } - &.size-sm { - height: auto; - input[type="checkbox"] { - & + span { - min-height: var(--h-field-sm); - span { - width: var(--h-field-sm); - height: var(--h-field-sm); - } - svg { - width: calc(var(--h-field-sm) - var(--m-field-sm) * 2); - height: calc(var(--h-field-sm) - var(--m-field-sm) * 2); - } - } - & + span + span { - min-height: var(--h-field-sm); - } - } - } - &.size-base { - height: auto; - input[type="checkbox"] { - & + span { - min-height: var(--h-field-base); - span { - width: var(--h-field-base); - height: var(--h-field-base); - } - svg { - width: calc(var(--h-field-base) - var(--m-field-base) * 2); - height: calc(var(--h-field-base) - var(--m-field-base) * 2); - } - } - & + span + span { - min-height: var(--h-field-base); - } - } - } - &.size-lg { - height: auto; - input[type="checkbox"] { - & + span { - min-height: var(--h-field-lg); - span { - width: var(--h-field-lg); - height: var(--h-field-lg); - } - svg { - width: calc(var(--h-field-lg) - var(--m-field-lg) * 2); - height: calc(var(--h-field-lg) - var(--m-field-lg) * 2); - } - } - & + span + span { - min-height: var(--h-field-lg); - } - } - } -} - -.field-wrap { - @apply flex flex-col; - - .field-label { - @apply font-semibold leading-none text-gray-400; - } - - .real-field-wrap { - @apply relative flex-none flex; - } - - .info-wrap { - @apply h-full items-center flex; - &:not(.info-wrap-inline) { - @apply absolute top-0 right-0; - } - &.info-wrap-inline { - @apply ml-2; - } - .info-button { - @apply text-primary-700; - } - svg.chevron { - @apply text-gray-400; - } - } - - input:not([type="checkbox"]):not([type="color"]), select { - @apply border-gray-600 text-gray-300 leading-none border-solid bg-gray-700 w-full appearance-none outline-none rounded-lg; - &:disabled { - @apply bg-gray-400; - } - } - .switch { - input[type="checkbox"] { - @apply invisible absolute; - & + span { - @apply rounded transition-colors duration-300 relative cursor-pointer flex grow h-full; - span { - @apply absolute flex items-center justify-center; - } - var { - @apply duration-300; - transition-property: left; - } - } - } - } - - &.field-wrap-sm { - .field-label { - @apply text-xs; - } - input:not([type="checkbox"]), select, input:not([type="color"]) { - @apply size-sm text-xs px-1 border; - } - input[type="color"] { - @apply size-sm px-0; - } - select { - @apply pr-6; - } - .switch { - width: calc(var(--h-field-sm) * 2); - input[type="checkbox"] { - & + span { - span:nth-of-type(1) { - width: calc(var(--h-field-sm) - var(--m-field-sm)); - height: calc(var(--h-field-sm) - var(--m-field-sm) * 2); - top: var(--m-field-sm); - left: var(--m-field-sm); - } - span:nth-of-type(2) { - width: calc(var(--h-field-sm) - var(--m-field-sm)); - height: calc(var(--h-field-sm) - var(--m-field-sm) * 2); - top: var(--m-field-sm); - left: calc(100% - var(--h-field-sm)); - } - var { - width: calc(var(--h-field-sm) - var(--m-field-sm) * 2); - height: calc(var(--h-field-sm) - var(--m-field-sm) * 2); - top: var(--m-field-sm); - left: var(--m-field-sm); - } - svg { - @apply w-2 h-2; - } - } - &:checked + span var { - left: calc(var(--h-field-sm) + var(--m-field-sm)); - } - } - } - .info-wrap { - @apply mr-1; - .info-button { - @apply w-4 h-4; - } - } - } - - &.field-wrap-base { - .field-label { - @apply text-sm; - } - input:not([type="checkbox"]):not([type="color"]), select { - @apply size-base text-sm px-2 border-2; - } - input[type="color"] { - @apply size-base px-0; - } - .switch { - width: calc(var(--h-field-base) * 2); - input[type="checkbox"] { - & + span { - span:nth-of-type(1) { - width: calc(var(--h-field-base) - var(--m-field-base)); - height: calc(var(--h-field-base) - var(--m-field-base) * 2); - top: var(--m-field-base); - left: var(--m-field-base); - } - span:nth-of-type(2) { - width: calc(var(--h-field-base) - var(--m-field-base)); - height: calc(var(--h-field-base) - var(--m-field-base) * 2); - top: var(--m-field-base); - left: calc(100% - var(--h-field-base)); - } - var { - width: calc(var(--h-field-base) - var(--m-field-base) * 2); - height: calc(var(--h-field-base) - var(--m-field-base) * 2); - top: var(--m-field-base); - left: var(--m-field-base); - } - svg { - @apply w-3 h-3; - } - } - &:checked + span var { - left: calc(var(--h-field-base) + var(--m-field-base)); - } - } - } - .info-wrap { - @apply mr-2; - .info-button { - @apply w-5 h-5; - } - } - } - - &.field-wrap-lg { - .field-label { - @apply text-sm; - } - input:not([type="checkbox"]):not([type="color"]), select { - @apply size-lg px-3 border-2; - } - input[type="color"] { - @apply size-lg px-0; - } - .switch { - width: calc(var(--h-field-lg) * 2); - input[type="checkbox"] { - & + span { - span:nth-of-type(1) { - width: calc(var(--h-field-lg) - var(--m-field-lg)); - height: calc(var(--h-field-lg) - var(--m-field-lg) * 2); - top: var(--m-field-lg); - left: var(--m-field-lg); - } - span:nth-of-type(2) { - width: calc(var(--h-field-lg) - var(--m-field-lg)); - height: calc(var(--h-field-lg) - var(--m-field-lg) * 2); - top: var(--m-field-lg); - left: calc(100% - var(--h-field-lg)); - } - var { - width: calc(var(--h-field-lg) - var(--m-field-lg) * 2); - height: calc(var(--h-field-lg) - var(--m-field-lg) * 2); - top: var(--m-field-lg); - left: var(--m-field-lg); - } - svg { - @apply w-5 h-5; - } - } - &:checked + span var { - left: calc(var(--h-field-lg) + var(--m-field-lg)); - } - } - } - .info-wrap { - @apply mr-3; - .info-button { - @apply w-6 h-6; - } - } - } - -} - -.pointer-events-none { - pointer-events: none; -} - -input:disabled, selct:disabled { - @apply bg-gray-400; -} - -.justify-self-end { - justify-self: end; -} - diff --git a/resources/css/switch.css b/resources/css/switch.css deleted file mode 100644 index 6d70c6c3..00000000 --- a/resources/css/switch.css +++ /dev/null @@ -1,116 +0,0 @@ -:root { - --margin: 0.2rem; - --n-width: 37px; - --sm-width: 35px; - --sm-margin: 0.2rem; - --xs-width: 23px; - --xs-margin: 0.2rem; -} - -.bg-switch { - @apply bg-primary-700; -} - -.field-switch { - input:checked + span { - transition: background 0.3s; - } - - .display { - width: calc(var(--n-width) * 2); - height: var(--n-width); - border-radius: 0.3rem; - var { - width: calc(var(--n-width) - var(--margin) * 2); - height: calc(var(--n-width) - var(--margin) * 2); - top: var(--margin); - left: var(--margin); - transition: left 0.3s; - } - & > span:nth-of-type(1) { - position: absolute; - width: calc(var(--n-width) - var(--margin)); - height: calc(var(--n-width) - var(--margin) * 2); - top: var(--margin); - left: var(--margin); - display: flex; - justify-content: center; - align-items: center; - } - & > span:nth-of-type(2) { - position: absolute; - width: calc(var(--n-width) - var(--margin)); - height: calc(var(--n-width) - var(--margin) * 2); - top: var(--margin); - left: calc(100% - var(--n-width)); - display: flex; - justify-content: center; - align-items: center; - } - } - - input:checked + .display var { - left: calc(var(--n-width) + var(--margin)); - transition: left 0.3s; - } - - /* --------------------------------- small size ---------------------------------- */ - .inner-field.h-field-sm { - input:checked + .display var { - left: calc(var(--sm-width) + var(--sm-margin)); - } - - .display { - width: calc(var(--sm-width) * 2); - height: var(--sm-width); - var { - width: calc(var(--sm-width) - var(--sm-margin) * 2); - height: calc(var(--sm-width) - var(--sm-margin) * 2); - top: var(--sm-margin); - left: var(--sm-margin); - } - & > span:nth-of-type(1) { - width: calc(var(--sm-width) - var(--sm-margin)); - height: calc(var(--sm-width) - var(--sm-margin) * 2); - top: var(--sm-margin); - left: var(--sm-margin); - } - & > span:nth-of-type(2) { - width: calc(var(--sm-width) - var(--sm-margin)); - height: calc(var(--sm-width) - var(--sm-margin) * 2); - top: var(--sm-margin); - left: calc(100% - var(--sm-width)); - } - } - } - - /* ------------------------------ very small size -------------------------------- */ - .inner-field.h-field-xs { - input:checked + .display var { - left: calc(var(--xs-width) + var(--xs-margin)); - } - - .display { - width: calc(var(--xs-width) * 2); - height: var(--xs-width); - var { - width: calc(var(--xs-width) - var(--xs-margin) * 2); - height: calc(var(--xs-width) - var(--xs-margin) * 2); - top: var(--xs-margin); - left: var(--xs-margin); - } - & > span:nth-of-type(1) { - width: calc(var(--xs-width) - var(--xs-margin)); - height: calc(var(--xs-width) - var(--xs-margin) * 2); - top: var(--xs-margin); - left: var(--xs-margin); - } - & > span:nth-of-type(2) { - width: calc(var(--xs-width) - var(--xs-margin)); - height: calc(var(--xs-width) - var(--xs-margin) * 2); - top: var(--xs-margin); - left: calc(100% - var(--xs-width)); - } - } - } -} diff --git a/resources/js/components/form/Multipleselect.vue b/resources/js/components/form/Multipleselect.vue index 3eea13a9..c0d9525e 100644 --- a/resources/js/components/form/Multipleselect.vue +++ b/resources/js/components/form/Multipleselect.vue @@ -8,7 +8,7 @@ @click="visible = !visible" v-text="`${modelValue.length} Einträge ausgewählt`" > -