Skip to content

Commit de381d6

Browse files
author
Корпусов Максим
committed
fix: tw prefixes update
1 parent e7cb785 commit de381d6

File tree

4 files changed

+49
-28
lines changed

4 files changed

+49
-28
lines changed

lib/src/components/MDialog/MDialog.vue

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
<template>
22
<transition v-bind="scrimFade">
33
<div
4-
v-show="show"
5-
class="fixed inset-0 opacity-40 bg-[--md-sys-color-scrim] z-[99998]"
4+
v-if="show"
5+
class="mv-fixed -mv-inset-20 mv-opacity-40 mv-bg-[--md-sys-color-scrim] mv-z-[99998]"
6+
:class="{ 'mv-pointer-event-none': !show }"
67
@click="close()"
78
/>
89
</transition>
910
<MEnterExit
10-
class="top-1/2 left-1/2 z-[99999] w-[312px] bg-[--md-sys-color-surface-container-high] rounded-[28px] fixed"
11+
class="mv-top-1/2 mv-left-1/2 mv-z-[99999] mv-w-[312px] mv-bg-[--md-sys-color-surface-container-high] mv-rounded-[28px] mv-fixed"
1112
ref="dialog"
12-
enter-class="opacity-100"
13-
exit-class="opacity-0 !max-h-2"
13+
enter-class="mv-opacity-100"
14+
exit-class="mv-opacity-0 !mv-max-h-2"
1415
:show="show"
1516
>
16-
<div ref="wrapper" class="p-6">
17+
<div ref="wrapper" class="mv-p-6">
1718
<span
1819
v-if="icon"
19-
class="material-symbols-rounded mb-4 block text-center text-[--md-sys-color-secondary] text-[24px]"
20+
class="material-symbols-rounded mv-mb-4 mv-block mv-text-center mv-text-[--md-sys-color-secondary] mv-text-[24px]"
2021
v-text="icon"
2122
/>
2223
<p
23-
class="headline-small text-[--md-sys-color-on-surface]"
24-
:class="{ 'text-center': !!icon }"
24+
class="headline-small mv-text-[--md-sys-color-on-surface]"
25+
:class="{ 'mv-text-center': !!icon }"
2526
v-text="title"
2627
/>
2728
<p
28-
class="body-medium text-[--md-sys-color-on-surface-variant] mt-4"
29+
class="body-medium mv-text-[--md-sys-color-on-surface-variant] mv-mt-4"
2930
v-text="text"
3031
/>
3132

3233
<slot />
3334

3435
<!--actions-->
35-
<div v-if="$slots.actions" class="flex gap-2 pt-6 justify-end">
36+
<div
37+
v-if="$slots.actions"
38+
class="mv-flex mv-gap-2 mv-pt-6 mv-justify-end"
39+
>
3640
<slot name="actions" />
3741
</div>
3842
</div>
@@ -41,7 +45,7 @@
4145

4246
<script setup>
4347
import MEnterExit from '../transitions/MEnterExit.vue'
44-
import { onMounted, ref } from 'vue'
48+
import { nextTick, onMounted, ref } from 'vue'
4549
import { scrimFade } from '../../utils/transitions.js'
4650
4751
const props = defineProps({

lib/src/components/MIconButton/MIconButton.vue

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,31 @@
22
<component
33
:is="element"
44
:href="href"
5-
class="inline-flex !no-underline select-none justify-center items-center gap-2 h-10 w-10 relative overflow-hidden rounded-full"
5+
class="mv-inline-flex !mv-no-underline mv-select-none mv-justify-center mv-items-center mv-gap-2 mv-h-10 mv-w-10 mv-relative mv-overflow-hidden mv-rounded-full"
66
:class="[
77
{
8-
'border-solid border !border-[--md-sys-color-outline]':
8+
'mv-border-solid mv-border !mv-border-[--md-sys-color-outline]':
99
variant === 'outlined' && (!toggleable || (toggleable && !active)),
10-
'pointer-events-none': disabled,
10+
'mv-pointer-events-none': disabled,
1111
},
1212
]"
1313
:style="[iconColor, backgroundColor]"
14-
@click="active = !active"
1514
>
16-
<MStateLayer :background="stateBackground" :disabled="disabled" />
15+
<MStateLayer
16+
:background="stateBackground"
17+
:disabled="disabled"
18+
classes="mv-rounded-full"
19+
@click="
20+
() => {
21+
active = !active
22+
$emit('update:modelValue', active)
23+
$emit('click')
24+
}
25+
"
26+
/>
1727
<span
1828
:class="{ 'filled-icon': toggleable && active }"
19-
class="material-symbols-rounded text-[24px]"
29+
class="material-symbols-rounded mv-text-[24px]"
2030
v-text="icon"
2131
/>
2232
</component>
@@ -60,6 +70,8 @@ const props = defineProps({
6070
const active = ref()
6171
useLocalModel(props.modelValue, active)
6272
73+
const emits = defineEmits(['update:modelValue', 'click'])
74+
6375
const element = computed(() => {
6476
return h(props.href ? 'a' : 'button', {})
6577
})

lib/src/components/MRadio/MRadio.vue

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
<template>
2-
<div class="flex gap-0.5 cursor-pointer items-center" @click="click">
3-
<div class="w-12 h-12 relative">
4-
<div class="absolute inset-1 rounded-full overflow-hidden">
2+
<div
3+
class="mv-flex mv-gap-0.5 mv-cursor-pointer mv-items-center"
4+
@click.stop="click"
5+
>
6+
<div class="mv-w-12 mv-h-12 mv-relative">
7+
<div class="mv-absolute mv-inset-1 mv-rounded-full mv-overflow-hidden">
58
<MStateLayer
9+
classes="mv-rounded-full"
610
:background="stateBackground"
711
:ripple-background="rippleBackground"
12+
@click="click"
813
/>
914
</div>
1015
<span
11-
class="material-symbols-rounded m-3 z-10 pointer-events-none absolute w-6 h-6"
16+
class="material-symbols-rounded mv-m-3 mv-z-10 mv-pointer-events-none mv-absolute mv-w-6 mv-h-6"
1217
:class="contentColor"
1318
v-text="actualState ? 'radio_button_checked' : 'radio_button_unchecked'"
1419
/>
1520
</div>
1621
<p
1722
v-if="text"
18-
class="body-large lowercase first-letter:uppercase text-[--md-sys-color-on-surface]"
23+
class="body-large mv-lowercase first-letter:mv-uppercase mv-text-[--md-sys-color-on-surface]"
1924
v-text="text"
2025
/>
2126
</div>
@@ -40,10 +45,9 @@ const props = defineProps({
4045
},
4146
})
4247
43-
//TODO: symbol
4448
let group = inject(radioGroupModelValueSymbol, undefined)
4549
46-
const emits = defineEmits(['update:modelValue'])
50+
const emits = defineEmits(['update:modelValue', 'click'])
4751
4852
const actualState = ref(group ? group === props.value : props.modelValue)
4953
@@ -71,11 +75,12 @@ const rippleBackground = computed(() => {
7175
7276
const contentColor = computed(() => {
7377
return actualState.value
74-
? 'text-[--md-sys-color-primary]'
75-
: 'text-[--md-sys-color-on-surface]'
78+
? 'mv-text-[--md-sys-color-primary]'
79+
: 'mv-text-[--md-sys-color-on-surface]'
7680
})
7781
7882
function click() {
83+
emits('click')
7984
if (group === undefined) {
8085
actualState.value = !actualState.value
8186
emits('update:modelValue', actualState.value)

lib/src/components/transitions/MEnterExit.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
ref="grow"
4-
class="max-h-0 overflow-hidden"
4+
class="mv-max-h-0 mv-overflow-hidden"
55
:class="`${show ? enterClass : exitClass}`"
66
style="transition-property: max-height, transform, opacity"
77
:style="{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy