@yoyaflow/yoya-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -7
- package/README.zh-CN.md +15 -9
- package/dist/yoya-ui.umd.js +2 -2
- package/dist/yoya.ui.css +255 -0
- package/dist/yoya.ui.js +2432 -1995
- package/package.json +2 -2
- package/types/async.d.ts +52 -2
- package/types/data-display.d.ts +25 -0
- package/types/effects.d.ts +24 -0
- package/types/layout.d.ts +15 -0
package/dist/yoya.ui.css
CHANGED
|
@@ -2007,4 +2007,259 @@
|
|
|
2007
2007
|
.yoya-vglow-button[data-glow-play='hover']:focus-visible::before {
|
|
2008
2008
|
opacity: 1 !important;
|
|
2009
2009
|
}
|
|
2010
|
+
|
|
2011
|
+
:where(.yoya-vskeleton) {
|
|
2012
|
+
box-sizing: border-box;
|
|
2013
|
+
display: flex;
|
|
2014
|
+
flex-direction: column;
|
|
2015
|
+
gap: 10px;
|
|
2016
|
+
max-width: 100%;
|
|
2017
|
+
width: 100%;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
.yoya-vskeleton .yoya-vskeleton-bar,
|
|
2021
|
+
.yoya-vskeleton .yoya-vskeleton-avatar,
|
|
2022
|
+
.yoya-vskeleton .yoya-vskeleton-block {
|
|
2023
|
+
animation: yoya-vskeleton-shimmer 1.4s ease-in-out infinite;
|
|
2024
|
+
background: linear-gradient(
|
|
2025
|
+
90deg,
|
|
2026
|
+
var(--yoya-color-surface-muted, #f5f5f5) 25%,
|
|
2027
|
+
var(--yoya-color-surface-active, #e9e9e9) 37%,
|
|
2028
|
+
var(--yoya-color-surface-muted, #f5f5f5) 63%
|
|
2029
|
+
);
|
|
2030
|
+
background-size: 400% 100%;
|
|
2031
|
+
}
|
|
2032
|
+
|
|
2033
|
+
.yoya-vskeleton .yoya-vskeleton-bar {
|
|
2034
|
+
border-radius: 4px;
|
|
2035
|
+
height: 20px;
|
|
2036
|
+
}
|
|
2037
|
+
|
|
2038
|
+
.yoya-vskeleton .yoya-vskeleton-avatar {
|
|
2039
|
+
border-radius: 50%;
|
|
2040
|
+
flex: 0 0 auto;
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
.yoya-vskeleton .yoya-vskeleton-block {
|
|
2044
|
+
border-radius: 8px;
|
|
2045
|
+
height: 96px;
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
@keyframes yoya-vskeleton-shimmer {
|
|
2049
|
+
from {
|
|
2050
|
+
background-position: 100% 50%;
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
to {
|
|
2054
|
+
background-position: 0 50%;
|
|
2055
|
+
}
|
|
2056
|
+
}
|
|
2057
|
+
|
|
2058
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2059
|
+
.yoya-vskeleton[data-motion='auto'] .yoya-vskeleton-bar,
|
|
2060
|
+
.yoya-vskeleton[data-motion='auto'] .yoya-vskeleton-avatar,
|
|
2061
|
+
.yoya-vskeleton[data-motion='auto'] .yoya-vskeleton-block {
|
|
2062
|
+
animation: none;
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
:where(.yoya-vlazyimage) {
|
|
2067
|
+
box-sizing: border-box;
|
|
2068
|
+
display: inline-block;
|
|
2069
|
+
max-width: 100%;
|
|
2070
|
+
min-height: 48px;
|
|
2071
|
+
min-width: 48px;
|
|
2072
|
+
overflow: hidden;
|
|
2073
|
+
position: relative;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
.yoya-vlazyimage .yoya-vlazyimage-placeholder {
|
|
2077
|
+
background: var(--yoya-color-surface-muted, #f5f5f5);
|
|
2078
|
+
inset: 0;
|
|
2079
|
+
position: absolute;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
.yoya-vlazyimage img {
|
|
2083
|
+
display: block;
|
|
2084
|
+
height: 100%;
|
|
2085
|
+
object-fit: cover;
|
|
2086
|
+
position: relative;
|
|
2087
|
+
transition: opacity 240ms ease;
|
|
2088
|
+
width: 100%;
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
.yoya-vlazyimage .yoya-vlazyimage-retry {
|
|
2092
|
+
align-items: center;
|
|
2093
|
+
background: var(--yoya-color-surface, #ffffff);
|
|
2094
|
+
border: 1px solid var(--yoya-color-border-strong, #cbd5e1);
|
|
2095
|
+
border-radius: 6px;
|
|
2096
|
+
box-sizing: border-box;
|
|
2097
|
+
color: var(--yoya-color-text-muted, #64748b);
|
|
2098
|
+
cursor: pointer;
|
|
2099
|
+
font-size: 12px;
|
|
2100
|
+
gap: 6px;
|
|
2101
|
+
inset: 50% auto auto 50%;
|
|
2102
|
+
line-height: 1;
|
|
2103
|
+
padding: 7px 10px;
|
|
2104
|
+
position: absolute;
|
|
2105
|
+
transform: translate(-50%, -50%);
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
.yoya-vlazyimage .yoya-vlazyimage-retry:hover {
|
|
2109
|
+
border-color: var(--yoya-color-primary, #2563eb);
|
|
2110
|
+
color: var(--yoya-color-primary, #2563eb);
|
|
2111
|
+
}
|
|
2112
|
+
|
|
2113
|
+
:where(.yoya-vtransition) {
|
|
2114
|
+
box-sizing: border-box;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
.yoya-vtransition[data-state='enter'] {
|
|
2118
|
+
animation: yoya-vtransition-enter var(--yoya-vtransition-duration, 280ms) ease both;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
.yoya-vtransition[data-state='leave'] {
|
|
2122
|
+
animation: yoya-vtransition-leave var(--yoya-vtransition-duration, 240ms) ease both;
|
|
2123
|
+
}
|
|
2124
|
+
|
|
2125
|
+
.yoya-vtransition[data-motion='always'] {
|
|
2126
|
+
animation: none !important;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
@keyframes yoya-vtransition-enter {
|
|
2130
|
+
from {
|
|
2131
|
+
opacity: 0;
|
|
2132
|
+
transform: translateY(12px) scale(0.98);
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
to {
|
|
2136
|
+
opacity: 1;
|
|
2137
|
+
transform: none;
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
@keyframes yoya-vtransition-leave {
|
|
2142
|
+
from {
|
|
2143
|
+
opacity: 1;
|
|
2144
|
+
transform: none;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
to {
|
|
2148
|
+
opacity: 0;
|
|
2149
|
+
transform: translateY(-12px) scale(0.98);
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2154
|
+
.yoya-vtransition[data-motion='auto'] {
|
|
2155
|
+
animation: none;
|
|
2156
|
+
}
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
:where(.yoya-vmasonry) {
|
|
2160
|
+
box-sizing: border-box;
|
|
2161
|
+
width: 100%;
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
.yoya-vmasonry > * {
|
|
2165
|
+
break-inside: avoid;
|
|
2166
|
+
box-sizing: border-box;
|
|
2167
|
+
margin-bottom: var(--yoya-masonry-gap, 16px);
|
|
2168
|
+
}
|
|
2169
|
+
|
|
2170
|
+
:where(.yoya-vimagepreview) {
|
|
2171
|
+
box-sizing: border-box;
|
|
2172
|
+
cursor: zoom-in;
|
|
2173
|
+
display: inline-block;
|
|
2174
|
+
line-height: 0;
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
.yoya-vimagepreview > img {
|
|
2178
|
+
display: block;
|
|
2179
|
+
max-width: 100%;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
.yoya-vimagepreview-overlay {
|
|
2183
|
+
align-items: center;
|
|
2184
|
+
background: rgba(0, 0, 0, 0.72);
|
|
2185
|
+
box-sizing: border-box;
|
|
2186
|
+
display: flex;
|
|
2187
|
+
inset: 0;
|
|
2188
|
+
justify-content: center;
|
|
2189
|
+
position: fixed;
|
|
2190
|
+
z-index: 1000;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-backdrop {
|
|
2194
|
+
inset: 0;
|
|
2195
|
+
position: absolute;
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-stage {
|
|
2199
|
+
position: relative;
|
|
2200
|
+
transform-origin: center;
|
|
2201
|
+
transition: transform 180ms ease;
|
|
2202
|
+
z-index: 1;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2205
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-stage .yoya-vlazyimage {
|
|
2206
|
+
max-height: 86vh;
|
|
2207
|
+
max-width: 90vw;
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-close {
|
|
2211
|
+
align-items: center;
|
|
2212
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2213
|
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
2214
|
+
border-radius: 50%;
|
|
2215
|
+
box-sizing: border-box;
|
|
2216
|
+
color: #ffffff;
|
|
2217
|
+
cursor: pointer;
|
|
2218
|
+
display: inline-flex;
|
|
2219
|
+
font-size: 22px;
|
|
2220
|
+
height: 40px;
|
|
2221
|
+
justify-content: center;
|
|
2222
|
+
line-height: 1;
|
|
2223
|
+
position: absolute;
|
|
2224
|
+
right: 18px;
|
|
2225
|
+
top: 18px;
|
|
2226
|
+
width: 40px;
|
|
2227
|
+
z-index: 2;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-close:hover {
|
|
2231
|
+
background: rgba(255, 255, 255, 0.26);
|
|
2232
|
+
}
|
|
2233
|
+
|
|
2234
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-toolbar {
|
|
2235
|
+
align-items: center;
|
|
2236
|
+
bottom: 18px;
|
|
2237
|
+
display: flex;
|
|
2238
|
+
gap: 8px;
|
|
2239
|
+
left: 50%;
|
|
2240
|
+
position: absolute;
|
|
2241
|
+
transform: translateX(-50%);
|
|
2242
|
+
z-index: 2;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-tool {
|
|
2246
|
+
align-items: center;
|
|
2247
|
+
background: rgba(255, 255, 255, 0.14);
|
|
2248
|
+
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
2249
|
+
border-radius: 6px;
|
|
2250
|
+
box-sizing: border-box;
|
|
2251
|
+
color: #ffffff;
|
|
2252
|
+
cursor: pointer;
|
|
2253
|
+
display: inline-flex;
|
|
2254
|
+
font-size: 13px;
|
|
2255
|
+
height: 32px;
|
|
2256
|
+
justify-content: center;
|
|
2257
|
+
line-height: 1;
|
|
2258
|
+
min-width: 44px;
|
|
2259
|
+
padding: 0 10px;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
.yoya-vimagepreview-overlay .yoya-vimagepreview-tool:hover {
|
|
2263
|
+
background: rgba(255, 255, 255, 0.26);
|
|
2264
|
+
}
|
|
2010
2265
|
}
|