|
1 | 1 | .p-message {
|
2 |
| - @apply mb-4 shadow-sm rounded-md border-0; |
| 2 | + @apply rounded-md outline-none outline-0; |
3 | 3 |
|
4 |
| - &-wrapper { |
5 |
| - @apply flex items-center; // gap-3.5; |
6 |
| - } |
7 |
| - |
8 |
| - & &-wrapper { |
9 |
| - @apply py-3 px-4; |
| 4 | + &-content { |
| 5 | + @apply flex items-center gap-4 py-3 px-4 h-full; |
10 | 6 | }
|
11 | 7 |
|
12 | 8 | &-icon {
|
13 |
| - @apply shrink-0; |
| 9 | + @apply shrink-0 text-body-1 w-6 h-6; |
14 | 10 | }
|
15 | 11 |
|
16 |
| - & &-icon { |
17 |
| - @apply text-body-1 mr-2; |
| 12 | + &-close-button { |
| 13 | + @apply flex items-center justify-center shrink-0 ms-auto overflow-hidden relative w-8 h-8 rounded-full bg-transparent transition outline-none cursor-pointer select-none; |
18 | 14 |
|
19 |
| - &:not(.p-message-close-icon) { |
20 |
| - @apply w-6 h-6; |
| 15 | + &:focus-visible { |
| 16 | + @apply outline-none outline-0; |
21 | 17 | }
|
| 18 | + |
| 19 | + .p-message-info & { } |
| 20 | + |
| 21 | + .p-message-success & { } |
| 22 | + |
| 23 | + .p-message-warn & { } |
| 24 | + |
| 25 | + .p-message-error & { } |
| 26 | + |
| 27 | + .p-message-secondary & { } |
| 28 | + |
| 29 | + .p-message-contrast & { } |
| 30 | + } |
| 31 | + |
| 32 | + &-close-icon { |
| 33 | + @apply text-body-2 w-6 h-6; |
22 | 34 | }
|
23 | 35 |
|
24 |
| - &-close { |
25 |
| - @apply flex items-center justify-center shrink-0; // rounded-full transition duration-200 min-w-[1rem] min-h-[1rem]; |
| 36 | + &-info { |
| 37 | + @apply bg-info text-white outline-none; |
26 | 38 |
|
27 |
| - &.p-link { |
28 |
| - @apply ml-auto overflow-hidden relative; |
29 |
| - } |
| 39 | + &.p-message-outlined { } |
| 40 | + |
| 41 | + &.p-message-simple { } |
30 | 42 | }
|
31 | 43 |
|
32 |
| - & &-close { |
33 |
| - @apply w-8 h-8 rounded-full bg-transparent transition-none outline-transparent |
34 |
| - hover:bg-white/50 |
35 |
| - focus-visible:outline-none focus-visible:outline-offset-0 focus-visible:drop-shadow-lg; |
| 44 | + &-success { |
| 45 | + @apply bg-success text-white outline-none; |
| 46 | + |
| 47 | + &.p-message-outlined { } |
| 48 | + |
| 49 | + &.p-message-simple { } |
| 50 | + } |
| 51 | + |
| 52 | + &-warn { |
| 53 | + @apply bg-warning text-gray-90 outline-none; |
| 54 | + |
| 55 | + &.p-message-outlined { } |
| 56 | + |
| 57 | + &.p-message-simple { } |
| 58 | + } |
| 59 | + |
| 60 | + &-error { |
| 61 | + @apply bg-danger text-white outline-none; |
| 62 | + |
| 63 | + &.p-message-outlined { } |
| 64 | + |
| 65 | + &.p-message-simple { } |
| 66 | + } |
| 67 | + |
| 68 | + &-secondary { |
| 69 | + @apply bg-secondary text-white outline-none; |
| 70 | + |
| 71 | + &.p-message-outlined { } |
| 72 | + |
| 73 | + &.p-message-simple { } |
| 74 | + } |
| 75 | + |
| 76 | + &-contrast { |
| 77 | + @apply bg-gray-90 text-white outline-none; |
| 78 | + |
| 79 | + &.p-message-outlined { } |
| 80 | + |
| 81 | + &.p-message-simple { } |
| 82 | + } |
| 83 | + |
| 84 | + &-text { |
| 85 | + @apply text-body-2 font-normal; |
36 | 86 | }
|
37 | 87 |
|
38 | 88 | &-enter-from {
|
39 | 89 | @apply opacity-0;
|
40 | 90 | }
|
41 | 91 |
|
42 | 92 | &-enter-active {
|
43 |
| - @apply transition-opacity duration-300; |
| 93 | + @apply transition-opacity duration-200; |
44 | 94 | }
|
45 | 95 |
|
46 | 96 | &.p-message-leave-from {
|
47 |
| - @apply max-h-96; |
| 97 | + @apply max-h-[1000px]; |
48 | 98 | }
|
49 | 99 |
|
50 |
| - &.p-message-leave-to { |
| 100 | + &.p-message-leave-from { |
51 | 101 | @apply max-h-0 opacity-0 m-0;
|
52 | 102 | }
|
53 | 103 |
|
54 | 104 | &-leave-active {
|
55 | 105 | @apply overflow-hidden transition;
|
56 |
| - } |
57 | 106 |
|
58 |
| - &-leave-active &-close { |
59 |
| - @apply hidden; |
| 107 | + & .p-message-close-button { |
| 108 | + @apply opacity-0; |
| 109 | + } |
60 | 110 | }
|
61 | 111 |
|
62 |
| - & &-text { |
63 |
| - @apply text-body-2 w-full; |
64 |
| - |
65 |
| - a { |
66 |
| - @apply font-semibold; |
| 112 | + &-sm { |
| 113 | + & .p-message-content { |
| 114 | + @apply p-2; |
67 | 115 | }
|
68 |
| - } |
69 | 116 |
|
70 |
| - .p-message-icon { |
71 |
| - @apply leading-normal; |
72 |
| - } |
| 117 | + & .p-message-text { |
| 118 | + @apply text-body-2; |
| 119 | + } |
73 | 120 |
|
74 |
| - &.p-message-info { |
75 |
| - @apply bg-info text-white; |
| 121 | + & .p-message-icon { |
| 122 | + @apply text-body-1 w-4 h-4; |
| 123 | + } |
76 | 124 |
|
77 |
| - .p-message-icon, |
78 |
| - .p-message-close { |
79 |
| - @apply text-white; |
| 125 | + &.p-message-close-icon { |
| 126 | + @apply text-body-2 w-4 h-4; |
80 | 127 | }
|
81 | 128 | }
|
82 | 129 |
|
83 |
| - &.p-message-success { |
84 |
| - @apply bg-success text-white; |
| 130 | + &-lg { |
| 131 | + & .p-message-content { |
| 132 | + @apply p-6; |
| 133 | + } |
85 | 134 |
|
86 |
| - .p-message-icon, |
87 |
| - .p-message-close { |
88 |
| - @apply text-white; |
| 135 | + & .p-message-text { |
| 136 | + @apply text-body-1; |
89 | 137 | }
|
90 |
| - } |
91 | 138 |
|
92 |
| - &.p-message-warn { |
93 |
| - @apply bg-warning text-gray-90; |
| 139 | + & .p-message-icon { |
| 140 | + @apply text-h5 w-8 h-8; |
| 141 | + } |
94 | 142 |
|
95 |
| - .p-message-icon, |
96 |
| - .p-message-close { |
97 |
| - @apply text-gray-90; |
| 143 | + &.p-message-close-icon { |
| 144 | + @apply text-body-2 w-6 h-6; |
98 | 145 | }
|
99 | 146 | }
|
100 | 147 |
|
101 |
| - &.p-message-error { |
102 |
| - @apply bg-error text-white; |
| 148 | + &-message-outlined { |
| 149 | + @apply bg-transparent outline-none; |
| 150 | + } |
| 151 | + |
| 152 | + &-simple { |
| 153 | + @apply bg-transparent outline-none; |
103 | 154 |
|
104 |
| - .p-message-icon, |
105 |
| - .p-message-close { |
106 |
| - @apply text-white; |
| 155 | + & .p-message-content { |
| 156 | + @apply p-0; |
107 | 157 | }
|
108 | 158 | }
|
109 | 159 | }
|
0 commit comments