diff --git a/packages/lib/src/App/app-comp.vue b/packages/lib/src/App/app-comp.vue index e0ac3be..8940f62 100644 --- a/packages/lib/src/App/app-comp.vue +++ b/packages/lib/src/App/app-comp.vue @@ -89,6 +89,7 @@ variant="outlined" />
diff --git a/packages/lib/src/assets/button.scss b/packages/lib/src/assets/button.scss index 63b3dfe..4e7c259 100644 --- a/packages/lib/src/assets/button.scss +++ b/packages/lib/src/assets/button.scss @@ -12,7 +12,7 @@ .md-chip { --size: calc(var(--component-xs) * var(--scale)); - padding-inline: calc(var(--sm) * var(--scale)); + padding-inline: calc(var(--xs) * var(--scale)); } .md-button, diff --git a/packages/lib/src/assets/input.scss b/packages/lib/src/assets/input.scss index 8f96d7d..e4dcc5b 100644 --- a/packages/lib/src/assets/input.scss +++ b/packages/lib/src/assets/input.scss @@ -48,7 +48,6 @@ grid-area: input; font: inherit; width: 100%; - min-height: 100%; color: currentcolor; &:focus { @@ -97,22 +96,26 @@ transition: all 0.2s; } - &.outlined { - border-radius: var(--xxs); - box-shadow: 0 0 0 1px inset var(--outline); + &[variant='outlined'] { + .md-input-wrapper { + border-radius: var(--xxs); + box-shadow: 0 0 0 1px inset var(--outline); + } &:focus-within .md-input-wrapper { box-shadow: 0 0 0 2px inset var(--primary); } } - &.outlined &-placeholder { + &[variant='outlined'] &-placeholder { background: var(--surface); } - &.filled { - border-radius: var(--xxs) var(--xxs) 0 0; - background: var(--surface-container-highest); + &[variant='filled'] { + .md-input-wrapper { + border-radius: var(--xxs) var(--xxs) 0 0; + background: var(--surface-container-highest); + } input { padding-top: var(--md); @@ -123,8 +126,8 @@ } } - &.filled &-wrapper::before, - &.filled &-wrapper::after { + &[variant='filled'] &-wrapper::before, + &[variant='filled'] &-wrapper::after { content: ''; position: absolute; bottom: 0; @@ -132,22 +135,22 @@ height: 2px; } - &.filled &-wrapper::before { + &[variant='filled'] &-wrapper::before { height: 1px; background: var(--on-surface-variant); } - &.filled &-wrapper::after { + &[variant='filled'] &-wrapper::after { scale: 0 1; transition: all 0.2s; } - &.filled &-prefix, - &.filled &-suffix { + &[variant='filled'] &-prefix, + &[variant='filled'] &-suffix { padding: var(--md) var(--xs) 0 0; } - &.filled:focus-within &-wrapper::after { + &[variant='filled']:focus-within &-wrapper::after { background: var(--primary); scale: 1 1; } @@ -168,6 +171,7 @@ width: 100%; } + &[open], &:focus-within { .md-input-placeholder { color: var(--primary); @@ -188,16 +192,16 @@ } } - &.filled:focus-within, - &.filled:not([empty]) { + &[variant='filled']:focus-within, + &[variant='filled']:not([empty]) { .md-input-placeholder { top: var(--xxs); font-size: var(--font-sm); } } - &.outlined:focus-within, - &.outlined:not([empty]) { + &[variant='outlined']:focus-within, + &[variant='outlined']:not([empty]) { .md-input-placeholder { left: var(--sm) !important; padding-inline: var(--xxs); diff --git a/packages/lib/src/assets/layout.scss b/packages/lib/src/assets/layout.scss index 9689c96..71020ef 100644 --- a/packages/lib/src/assets/layout.scss +++ b/packages/lib/src/assets/layout.scss @@ -18,6 +18,7 @@ --lg: var(--padding-lg); --xl: var(--padding-xl); --xxl: var(--padding-xxl); + --bottom-offset: 0px; transform: translate3d(0, 0, 0); background: var(--surface); @@ -33,8 +34,9 @@ inset: 0; .md-layout-content { - position: absolute; inset: 0; + position: absolute; + bottom: var(--bottom-offset); } &:has(> .md-navbar) { @@ -67,9 +69,7 @@ } &:has(> .md-navbar) { - > .md-layout-content { - bottom: var(--navbar-size); - } + --bottom-offset: var(--navbar-size); } } } diff --git a/packages/lib/src/assets/ripple.scss b/packages/lib/src/assets/ripple.scss index bb471a5..bb2c720 100644 --- a/packages/lib/src/assets/ripple.scss +++ b/packages/lib/src/assets/ripple.scss @@ -4,7 +4,7 @@ position: absolute; transform: translate(-50%, -50%); pointer-events: none; - opacity: 0.1; + opacity: 0.05; scale: 0.1; transform-origin: left top; background-image: radial-gradient( diff --git a/packages/lib/src/components/Input/number.vue b/packages/lib/src/components/Input/number.vue index c254bf3..a1d4cf6 100644 --- a/packages/lib/src/components/Input/number.vue +++ b/packages/lib/src/components/Input/number.vue @@ -48,8 +48,7 @@
diff --git a/packages/lib/src/components/Input/text.vue b/packages/lib/src/components/Input/text.vue index c6d7687..2bd795e 100644 --- a/packages/lib/src/components/Input/text.vue +++ b/packages/lib/src/components/Input/text.vue @@ -50,7 +50,7 @@
diff --git a/packages/lib/src/components/Layout/fab.vue b/packages/lib/src/components/Layout/fab.vue index acb2850..5bd5e26 100644 --- a/packages/lib/src/components/Layout/fab.vue +++ b/packages/lib/src/components/Layout/fab.vue @@ -4,13 +4,14 @@ import { keyClick } from '@/utils/dom/events' import { rippleEffect } from '@/utils/dom/ripple' import { inject, ref } from 'vue' + import HybridIcon from '../Misc/hybrid-icon.vue' interface FabProperties extends /* @vue-ignore */ ButtonHTMLAttributes { icon?: string | Component } - const scrollTop = inject('content-scroll-top', ref(0)) + const scroll = inject('scroll-container', ref({ x: 0, y: 0 })) defineProps() defineOptions({ name: 'MdFloatingActionButton' }) @@ -20,7 +21,7 @@