@bug-on/m3-expressive 1.2.6 → 1.3.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/CHANGELOG.md +12 -0
- package/dist/buttons.d.mts +3 -3
- package/dist/buttons.d.ts +3 -3
- package/dist/buttons.js +230 -82
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +231 -83
- package/dist/buttons.mjs.map +1 -1
- package/dist/{core-D4048_K5.d.mts → core-CAU8g2HY.d.mts} +1 -1
- package/dist/{core-Bc5Wj_pc.d.ts → core-DRrLnsnJ.d.ts} +1 -1
- package/dist/core.d.mts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +300 -152
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +283 -135
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.d.mts +40 -6
- package/dist/feedback.d.ts +40 -6
- package/dist/feedback.js +313 -165
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +291 -143
- package/dist/feedback.mjs.map +1 -1
- package/dist/{icon-button-CSsDmuQC.d.mts → icon-button-CqdQBsRe.d.ts} +11 -5
- package/dist/{icon-button-CSsDmuQC.d.ts → icon-button-USJo7AqO.d.mts} +11 -5
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +511 -235
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +511 -236
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +1 -1
- package/dist/layout.d.ts +1 -1
- package/dist/layout.js +221 -105
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +222 -106
- package/dist/layout.mjs.map +1 -1
- package/dist/{md3-Dty-Qcad.d.mts → md3-D0_Z7IXj.d.mts} +9 -1
- package/dist/{md3-Dty-Qcad.d.ts → md3-D0_Z7IXj.d.ts} +9 -1
- package/dist/navigation.d.mts +103 -33
- package/dist/navigation.d.ts +103 -33
- package/dist/navigation.js +507 -199
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +508 -201
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +354 -206
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +317 -169
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +362 -214
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +330 -182
- package/dist/pickers.mjs.map +1 -1
- package/dist/{split-button-trailing-uncheckable-DPJL3bO6.d.mts → split-button-trailing-uncheckable-26qlZvKT.d.mts} +10 -7
- package/dist/{split-button-trailing-uncheckable--BhNTEJw.d.ts → split-button-trailing-uncheckable-CXUVrH64.d.ts} +10 -7
- package/package.json +1 -1
package/dist/navigation.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var react = require('motion/react');
|
|
5
5
|
var clsx = require('clsx');
|
|
6
6
|
var tailwindMerge = require('tailwind-merge');
|
|
7
7
|
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var React37 = require('react');
|
|
8
9
|
var RxContextMenu = require('@radix-ui/react-context-menu');
|
|
9
|
-
var react = require('motion/react');
|
|
10
10
|
var m3Tokens = require('@bug-on/m3-tokens');
|
|
11
11
|
var DropdownMenu = require('@radix-ui/react-dropdown-menu');
|
|
12
12
|
var reactSlot = require('@radix-ui/react-slot');
|
|
@@ -66,6 +66,55 @@ var __objRest = (source, exclude) => {
|
|
|
66
66
|
}
|
|
67
67
|
return target;
|
|
68
68
|
};
|
|
69
|
+
function cn(...inputs) {
|
|
70
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
71
|
+
}
|
|
72
|
+
function getMaskGradient(direction) {
|
|
73
|
+
switch (direction) {
|
|
74
|
+
case "bottom":
|
|
75
|
+
return "linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.7) 75%, rgba(0, 0, 0, 0) 100%)";
|
|
76
|
+
case "both":
|
|
77
|
+
return "linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.7) 20%, rgba(0, 0, 0, 1) 40%, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0.7) 80%, rgba(0, 0, 0, 0) 100%)";
|
|
78
|
+
default:
|
|
79
|
+
return "linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 45%, rgba(0, 0, 0, 0.7) 75%, rgba(0, 0, 0, 0) 100%)";
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function FadingBlurMask({
|
|
83
|
+
direction = "top",
|
|
84
|
+
blurIntensity = 12,
|
|
85
|
+
blurHeight = "100%",
|
|
86
|
+
color = "var(--md-sys-color-surface)",
|
|
87
|
+
className,
|
|
88
|
+
style,
|
|
89
|
+
children
|
|
90
|
+
}) {
|
|
91
|
+
const shouldReduceMotion = react.useReducedMotion();
|
|
92
|
+
const activeBlur = shouldReduceMotion ? 0 : blurIntensity;
|
|
93
|
+
const maskGradient = getMaskGradient(direction);
|
|
94
|
+
const maskStyle = __spreadValues({
|
|
95
|
+
position: "absolute",
|
|
96
|
+
inset: 0,
|
|
97
|
+
pointerEvents: "none",
|
|
98
|
+
height: typeof blurHeight === "number" ? `${blurHeight}px` : blurHeight,
|
|
99
|
+
backdropFilter: activeBlur > 0 ? `blur(${activeBlur}px)` : void 0,
|
|
100
|
+
WebkitBackdropFilter: activeBlur > 0 ? `blur(${activeBlur}px)` : void 0,
|
|
101
|
+
maskImage: maskGradient,
|
|
102
|
+
WebkitMaskImage: maskGradient,
|
|
103
|
+
backgroundColor: color
|
|
104
|
+
}, style);
|
|
105
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
"aria-hidden": "true",
|
|
109
|
+
className: cn(
|
|
110
|
+
"absolute inset-0 pointer-events-none z-0 rounded-[inherit]",
|
|
111
|
+
className
|
|
112
|
+
),
|
|
113
|
+
style: maskStyle,
|
|
114
|
+
children
|
|
115
|
+
}
|
|
116
|
+
);
|
|
117
|
+
}
|
|
69
118
|
|
|
70
119
|
// src/ui/shared/motion-tokens.ts
|
|
71
120
|
var FAST_SPATIAL_SPRING = {
|
|
@@ -220,9 +269,6 @@ var APP_BAR_TITLE_FADE = {
|
|
|
220
269
|
duration: 0.15,
|
|
221
270
|
ease: "easeInOut"
|
|
222
271
|
};
|
|
223
|
-
function cn(...inputs) {
|
|
224
|
-
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
225
|
-
}
|
|
226
272
|
function AppBarItemButton({ item }) {
|
|
227
273
|
const isDisabled = item.enabled === false;
|
|
228
274
|
if (item.type === "custom" && item.appBarContent) {
|
|
@@ -1749,7 +1795,10 @@ function BottomAppBar({
|
|
|
1749
1795
|
floatingActionButton,
|
|
1750
1796
|
scrollBehavior = "visible",
|
|
1751
1797
|
scrollElement,
|
|
1752
|
-
className
|
|
1798
|
+
className,
|
|
1799
|
+
enableFadingBlur,
|
|
1800
|
+
blurIntensity,
|
|
1801
|
+
blurHeight
|
|
1753
1802
|
}) {
|
|
1754
1803
|
const shouldReduceMotion = react.useReducedMotion();
|
|
1755
1804
|
const { isHidden } = useAppBarScroll({
|
|
@@ -1764,9 +1813,9 @@ function BottomAppBar({
|
|
|
1764
1813
|
role: "navigation",
|
|
1765
1814
|
"aria-label": "Bottom app bar",
|
|
1766
1815
|
className: cn(
|
|
1767
|
-
"fixed bottom-0 inset-x-0 z-50",
|
|
1816
|
+
"fixed bottom-0 inset-x-0 z-50 overflow-hidden rounded-[inherit]",
|
|
1768
1817
|
"flex items-center",
|
|
1769
|
-
"bg-m3-surface-container",
|
|
1818
|
+
!enableFadingBlur && "bg-m3-surface-container",
|
|
1770
1819
|
"px-2",
|
|
1771
1820
|
// minimal horizontal padding, icon buttons provide spacing
|
|
1772
1821
|
"elevation-2",
|
|
@@ -1779,8 +1828,19 @@ function BottomAppBar({
|
|
|
1779
1828
|
animate: { y: translateY },
|
|
1780
1829
|
transition: hideTransition,
|
|
1781
1830
|
children: [
|
|
1782
|
-
|
|
1783
|
-
|
|
1831
|
+
enableFadingBlur && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1832
|
+
FadingBlurMask,
|
|
1833
|
+
{
|
|
1834
|
+
direction: "bottom",
|
|
1835
|
+
blurIntensity,
|
|
1836
|
+
blurHeight,
|
|
1837
|
+
color: "var(--md-sys-color-surface-container)"
|
|
1838
|
+
}
|
|
1839
|
+
),
|
|
1840
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 flex items-center w-full h-full", children: [
|
|
1841
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center flex-1", children: actions }),
|
|
1842
|
+
floatingActionButton && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "shrink-0 ml-auto mr-2", children: floatingActionButton })
|
|
1843
|
+
] })
|
|
1784
1844
|
]
|
|
1785
1845
|
}
|
|
1786
1846
|
);
|
|
@@ -1888,7 +1948,10 @@ function LargeFlexibleAppBar({
|
|
|
1888
1948
|
headerContent,
|
|
1889
1949
|
collapsedHeight = AppBarTokens.heights.flexibleCollapsed,
|
|
1890
1950
|
expandedHeight,
|
|
1891
|
-
className
|
|
1951
|
+
className,
|
|
1952
|
+
enableFadingBlur,
|
|
1953
|
+
blurIntensity,
|
|
1954
|
+
blurHeight
|
|
1892
1955
|
}) {
|
|
1893
1956
|
var _a, _b, _c;
|
|
1894
1957
|
const resolvedExpandedHeight = expandedHeight != null ? expandedHeight : subtitle ? AppBarTokens.heights.largeFlexWithSubtitleExpanded : AppBarTokens.heights.largeFlexExpanded;
|
|
@@ -1918,15 +1981,28 @@ function LargeFlexibleAppBar({
|
|
|
1918
1981
|
{
|
|
1919
1982
|
role: "banner",
|
|
1920
1983
|
className: cn(
|
|
1921
|
-
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden",
|
|
1984
|
+
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden rounded-[inherit]",
|
|
1922
1985
|
className
|
|
1923
1986
|
),
|
|
1924
|
-
style: {
|
|
1987
|
+
style: {
|
|
1988
|
+
height,
|
|
1989
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
1990
|
+
transition: cssTransition
|
|
1991
|
+
},
|
|
1925
1992
|
children: [
|
|
1993
|
+
enableFadingBlur && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1994
|
+
FadingBlurMask,
|
|
1995
|
+
{
|
|
1996
|
+
direction: "top",
|
|
1997
|
+
blurIntensity,
|
|
1998
|
+
blurHeight,
|
|
1999
|
+
color: currentBg
|
|
2000
|
+
}
|
|
2001
|
+
),
|
|
1926
2002
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1927
2003
|
"div",
|
|
1928
2004
|
{
|
|
1929
|
-
className: "flex items-center px-1 shrink-0",
|
|
2005
|
+
className: "relative z-10 flex items-center px-1 shrink-0",
|
|
1930
2006
|
style: { height: collapsedHeight },
|
|
1931
2007
|
children: [
|
|
1932
2008
|
navigationIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1968,7 +2044,7 @@ function LargeFlexibleAppBar({
|
|
|
1968
2044
|
"div",
|
|
1969
2045
|
{
|
|
1970
2046
|
className: cn(
|
|
1971
|
-
"flex flex-col flex-1 px-4 pb-
|
|
2047
|
+
"relative z-10 flex flex-col flex-1 px-4 pb-3 justify-end",
|
|
1972
2048
|
isCentered ? "items-center" : "items-start"
|
|
1973
2049
|
),
|
|
1974
2050
|
children: [
|
|
@@ -2021,7 +2097,10 @@ function MediumFlexibleAppBar({
|
|
|
2021
2097
|
headerContent,
|
|
2022
2098
|
collapsedHeight = AppBarTokens.heights.flexibleCollapsed,
|
|
2023
2099
|
expandedHeight,
|
|
2024
|
-
className
|
|
2100
|
+
className,
|
|
2101
|
+
enableFadingBlur,
|
|
2102
|
+
blurIntensity,
|
|
2103
|
+
blurHeight
|
|
2025
2104
|
}) {
|
|
2026
2105
|
var _a, _b, _c;
|
|
2027
2106
|
const resolvedExpandedHeight = expandedHeight != null ? expandedHeight : subtitle ? AppBarTokens.heights.mediumFlexWithSubtitleExpanded : AppBarTokens.heights.mediumFlexExpanded;
|
|
@@ -2051,15 +2130,28 @@ function MediumFlexibleAppBar({
|
|
|
2051
2130
|
{
|
|
2052
2131
|
role: "banner",
|
|
2053
2132
|
className: cn(
|
|
2054
|
-
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden",
|
|
2133
|
+
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden rounded-[inherit]",
|
|
2055
2134
|
className
|
|
2056
2135
|
),
|
|
2057
|
-
style: {
|
|
2136
|
+
style: {
|
|
2137
|
+
height,
|
|
2138
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
2139
|
+
transition: cssTransition
|
|
2140
|
+
},
|
|
2058
2141
|
children: [
|
|
2142
|
+
enableFadingBlur && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2143
|
+
FadingBlurMask,
|
|
2144
|
+
{
|
|
2145
|
+
direction: "top",
|
|
2146
|
+
blurIntensity,
|
|
2147
|
+
blurHeight,
|
|
2148
|
+
color: currentBg
|
|
2149
|
+
}
|
|
2150
|
+
),
|
|
2059
2151
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2060
2152
|
"div",
|
|
2061
2153
|
{
|
|
2062
|
-
className: "flex items-center px-1 shrink-0",
|
|
2154
|
+
className: "relative z-10 flex items-center px-1 shrink-0",
|
|
2063
2155
|
style: { height: collapsedHeight },
|
|
2064
2156
|
children: [
|
|
2065
2157
|
navigationIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2101,7 +2193,7 @@ function MediumFlexibleAppBar({
|
|
|
2101
2193
|
"div",
|
|
2102
2194
|
{
|
|
2103
2195
|
className: cn(
|
|
2104
|
-
"flex flex-col flex-1 px-4 pb-3 justify-end",
|
|
2196
|
+
"relative z-10 flex flex-col flex-1 px-4 pb-3 justify-end",
|
|
2105
2197
|
isCentered ? "items-center" : "items-start"
|
|
2106
2198
|
),
|
|
2107
2199
|
children: [
|
|
@@ -2148,7 +2240,7 @@ function SearchIcon({ className }) {
|
|
|
2148
2240
|
"span",
|
|
2149
2241
|
{
|
|
2150
2242
|
className: cn(
|
|
2151
|
-
"material-symbols-rounded text-[20px] leading-none select-none",
|
|
2243
|
+
"material-symbols-rounded text-[20px] leading-none select-none flex items-center justify-center",
|
|
2152
2244
|
className
|
|
2153
2245
|
),
|
|
2154
2246
|
"aria-hidden": "true",
|
|
@@ -2168,7 +2260,12 @@ function SearchAppBar({
|
|
|
2168
2260
|
scrollBehavior = "pinned",
|
|
2169
2261
|
scrollElement,
|
|
2170
2262
|
searchBarId = "search-bar",
|
|
2171
|
-
|
|
2263
|
+
searchBarVariant = "filled",
|
|
2264
|
+
searchBarHeight = 56,
|
|
2265
|
+
className,
|
|
2266
|
+
enableFadingBlur,
|
|
2267
|
+
blurIntensity,
|
|
2268
|
+
blurHeight
|
|
2172
2269
|
}) {
|
|
2173
2270
|
var _a, _b;
|
|
2174
2271
|
const shouldReduceMotion = react.useReducedMotion();
|
|
@@ -2191,65 +2288,92 @@ function SearchAppBar({
|
|
|
2191
2288
|
handleSearchClick();
|
|
2192
2289
|
}
|
|
2193
2290
|
};
|
|
2291
|
+
const searchBarBg = isScrolled ? "var(--md-sys-color-surface-container-highest)" : APP_BAR_COLORS.searchBarBg;
|
|
2292
|
+
const isOutlined = searchBarVariant === "outlined";
|
|
2194
2293
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2195
2294
|
react.m.header,
|
|
2196
2295
|
{
|
|
2197
2296
|
role: "banner",
|
|
2198
2297
|
className: cn(
|
|
2199
|
-
"fixed top-0 inset-x-0 z-50 flex items-center gap-2 px-4",
|
|
2298
|
+
"fixed top-0 inset-x-0 z-50 flex items-center gap-2 px-4 overflow-hidden rounded-[inherit]",
|
|
2200
2299
|
className
|
|
2201
2300
|
),
|
|
2202
2301
|
style: {
|
|
2203
2302
|
height: AppBarTokens.heights.small,
|
|
2204
|
-
backgroundColor: currentBg,
|
|
2303
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
2205
2304
|
transition: cssTransition
|
|
2206
2305
|
},
|
|
2207
2306
|
children: [
|
|
2208
|
-
|
|
2209
|
-
|
|
2307
|
+
enableFadingBlur && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2308
|
+
FadingBlurMask,
|
|
2210
2309
|
{
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
},
|
|
2216
|
-
children: navigationIcon
|
|
2310
|
+
direction: "top",
|
|
2311
|
+
blurIntensity,
|
|
2312
|
+
blurHeight,
|
|
2313
|
+
color: currentBg
|
|
2217
2314
|
}
|
|
2218
2315
|
),
|
|
2219
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
"
|
|
2242
|
-
|
|
2243
|
-
className: "flex-1 text-[16px] leading-6 truncate select-none",
|
|
2244
|
-
style: { color: APP_BAR_COLORS.searchBarContent },
|
|
2245
|
-
children: searchValue != null ? searchValue : searchPlaceholder
|
|
2246
|
-
}
|
|
2316
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 flex items-center gap-2 w-full h-full", children: [
|
|
2317
|
+
navigationIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2318
|
+
"div",
|
|
2319
|
+
{
|
|
2320
|
+
className: "shrink-0 flex items-center justify-center",
|
|
2321
|
+
style: {
|
|
2322
|
+
width: AppBarTokens.iconButtonTouchTarget,
|
|
2323
|
+
height: AppBarTokens.iconButtonTouchTarget
|
|
2324
|
+
},
|
|
2325
|
+
children: navigationIcon
|
|
2326
|
+
}
|
|
2327
|
+
),
|
|
2328
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2329
|
+
react.m.div,
|
|
2330
|
+
{
|
|
2331
|
+
layoutId: shouldReduceMotion ? void 0 : searchBarId,
|
|
2332
|
+
role: "search",
|
|
2333
|
+
"aria-label": searchPlaceholder,
|
|
2334
|
+
"aria-expanded": isSearchOpen,
|
|
2335
|
+
tabIndex: 0,
|
|
2336
|
+
className: cn(
|
|
2337
|
+
"relative flex flex-1 items-center gap-2 rounded-full cursor-text px-4",
|
|
2338
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
2339
|
+
isOutlined && "border border-(--md-sys-color-outline)"
|
|
2247
2340
|
),
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2341
|
+
style: { height: searchBarHeight },
|
|
2342
|
+
onClick: handleSearchClick,
|
|
2343
|
+
onKeyDown: handleKeyDown,
|
|
2344
|
+
children: [
|
|
2345
|
+
!isOutlined && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2346
|
+
"div",
|
|
2347
|
+
{
|
|
2348
|
+
className: "absolute inset-0 rounded-full -z-10 transition-colors",
|
|
2349
|
+
style: {
|
|
2350
|
+
backgroundColor: searchBarBg,
|
|
2351
|
+
transition: cssTransition
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
),
|
|
2355
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2356
|
+
"span",
|
|
2357
|
+
{
|
|
2358
|
+
className: "shrink-0 flex items-center justify-center h-full",
|
|
2359
|
+
style: { color: APP_BAR_COLORS.searchBarContent },
|
|
2360
|
+
children: leadingSearchIcon != null ? leadingSearchIcon : /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, {})
|
|
2361
|
+
}
|
|
2362
|
+
),
|
|
2363
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2364
|
+
"span",
|
|
2365
|
+
{
|
|
2366
|
+
className: "flex-1 text-[16px] leading-6 truncate select-none",
|
|
2367
|
+
style: { color: APP_BAR_COLORS.searchBarContent },
|
|
2368
|
+
children: searchValue != null ? searchValue : searchPlaceholder
|
|
2369
|
+
}
|
|
2370
|
+
),
|
|
2371
|
+
trailingSearchActions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center shrink-0", children: trailingSearchActions })
|
|
2372
|
+
]
|
|
2373
|
+
}
|
|
2374
|
+
),
|
|
2375
|
+
externalActions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center shrink-0", children: externalActions })
|
|
2376
|
+
] })
|
|
2253
2377
|
]
|
|
2254
2378
|
}
|
|
2255
2379
|
);
|
|
@@ -2422,9 +2546,11 @@ function SmallAppBarInner({
|
|
|
2422
2546
|
navigationIcon,
|
|
2423
2547
|
actions,
|
|
2424
2548
|
colors,
|
|
2425
|
-
className,
|
|
2426
2549
|
currentBg,
|
|
2427
|
-
cssTransition
|
|
2550
|
+
cssTransition,
|
|
2551
|
+
enableFadingBlur,
|
|
2552
|
+
blurIntensity,
|
|
2553
|
+
blurHeight
|
|
2428
2554
|
}) {
|
|
2429
2555
|
var _a, _b;
|
|
2430
2556
|
const isCentered = titleAlignment === "center";
|
|
@@ -2432,57 +2558,81 @@ function SmallAppBarInner({
|
|
|
2432
2558
|
react.m.header,
|
|
2433
2559
|
{
|
|
2434
2560
|
role: "banner",
|
|
2435
|
-
className:
|
|
2436
|
-
style: {
|
|
2561
|
+
className: "relative flex items-center px-1 h-full w-full overflow-hidden rounded-[inherit]",
|
|
2562
|
+
style: {
|
|
2563
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
2564
|
+
transition: cssTransition
|
|
2565
|
+
},
|
|
2437
2566
|
children: [
|
|
2438
|
-
|
|
2439
|
-
|
|
2567
|
+
enableFadingBlur && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2568
|
+
FadingBlurMask,
|
|
2440
2569
|
{
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
},
|
|
2446
|
-
children: navigationIcon
|
|
2570
|
+
direction: "top",
|
|
2571
|
+
blurIntensity,
|
|
2572
|
+
blurHeight,
|
|
2573
|
+
color: currentBg
|
|
2447
2574
|
}
|
|
2448
2575
|
),
|
|
2449
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
"
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
}
|
|
2576
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative z-10 flex items-center w-full h-full", children: [
|
|
2577
|
+
navigationIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2578
|
+
"div",
|
|
2579
|
+
{
|
|
2580
|
+
className: "shrink-0 flex items-center justify-center",
|
|
2581
|
+
style: {
|
|
2582
|
+
width: AppBarTokens.iconButtonTouchTarget,
|
|
2583
|
+
height: AppBarTokens.iconButtonTouchTarget
|
|
2584
|
+
},
|
|
2585
|
+
children: navigationIcon
|
|
2586
|
+
}
|
|
2587
|
+
),
|
|
2588
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2589
|
+
"div",
|
|
2590
|
+
{
|
|
2591
|
+
className: cn(
|
|
2592
|
+
"flex-1 flex flex-col justify-center min-w-0",
|
|
2593
|
+
isCentered ? "items-center" : "items-start",
|
|
2594
|
+
!navigationIcon && !isCentered && "pl-4"
|
|
2469
2595
|
),
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2596
|
+
children: [
|
|
2597
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2598
|
+
"span",
|
|
2599
|
+
{
|
|
2600
|
+
className: cn(
|
|
2601
|
+
appBarTypography.titleLarge,
|
|
2602
|
+
"truncate w-full",
|
|
2603
|
+
isCentered && "text-center"
|
|
2604
|
+
),
|
|
2605
|
+
style: { color: (_a = colors == null ? void 0 : colors.titleColor) != null ? _a : APP_BAR_COLORS.title },
|
|
2606
|
+
children: title
|
|
2607
|
+
}
|
|
2608
|
+
),
|
|
2609
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2610
|
+
"span",
|
|
2611
|
+
{
|
|
2612
|
+
className: cn(
|
|
2613
|
+
appBarTypography.labelMedium,
|
|
2614
|
+
"truncate w-full",
|
|
2615
|
+
isCentered && "text-center"
|
|
2616
|
+
),
|
|
2617
|
+
style: {
|
|
2618
|
+
color: (_b = colors == null ? void 0 : colors.subtitleColor) != null ? _b : APP_BAR_COLORS.subtitle
|
|
2619
|
+
},
|
|
2620
|
+
children: subtitle
|
|
2621
|
+
}
|
|
2622
|
+
)
|
|
2623
|
+
]
|
|
2624
|
+
}
|
|
2625
|
+
),
|
|
2626
|
+
isCentered && !actions && navigationIcon && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2627
|
+
"div",
|
|
2628
|
+
{
|
|
2629
|
+
"aria-hidden": "true",
|
|
2630
|
+
style: { width: AppBarTokens.iconButtonTouchTarget },
|
|
2631
|
+
className: "shrink-0"
|
|
2632
|
+
}
|
|
2633
|
+
),
|
|
2634
|
+
actions && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center shrink-0", children: actions })
|
|
2635
|
+
] })
|
|
2486
2636
|
]
|
|
2487
2637
|
}
|
|
2488
2638
|
);
|
|
@@ -2496,7 +2646,10 @@ function SmallAppBar({
|
|
|
2496
2646
|
colors,
|
|
2497
2647
|
scrollBehavior = "pinned",
|
|
2498
2648
|
scrollElement,
|
|
2499
|
-
className
|
|
2649
|
+
className,
|
|
2650
|
+
enableFadingBlur,
|
|
2651
|
+
blurIntensity,
|
|
2652
|
+
blurHeight
|
|
2500
2653
|
}) {
|
|
2501
2654
|
var _a, _b;
|
|
2502
2655
|
const shouldReduceMotion = react.useReducedMotion();
|
|
@@ -2516,14 +2669,17 @@ function SmallAppBar({
|
|
|
2516
2669
|
actions,
|
|
2517
2670
|
colors,
|
|
2518
2671
|
currentBg,
|
|
2519
|
-
cssTransition
|
|
2672
|
+
cssTransition,
|
|
2673
|
+
enableFadingBlur,
|
|
2674
|
+
blurIntensity,
|
|
2675
|
+
blurHeight
|
|
2520
2676
|
};
|
|
2521
2677
|
const barHeight = AppBarTokens.heights.small;
|
|
2522
2678
|
if (scrollBehavior !== "enterAlways") {
|
|
2523
2679
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2524
2680
|
"div",
|
|
2525
2681
|
{
|
|
2526
|
-
className: cn("fixed top-0 inset-x-0 z-50", className),
|
|
2682
|
+
className: cn("fixed top-0 inset-x-0 z-50 overflow-hidden", className),
|
|
2527
2683
|
style: { height: barHeight },
|
|
2528
2684
|
children: /* @__PURE__ */ jsxRuntime.jsx(SmallAppBarInner, __spreadValues({}, innerProps))
|
|
2529
2685
|
}
|
|
@@ -2536,7 +2692,10 @@ function SmallAppBar({
|
|
|
2536
2692
|
animate: { y: 0 },
|
|
2537
2693
|
exit: { y: "-100%" },
|
|
2538
2694
|
transition: shouldReduceMotion ? { duration: 0 } : APP_BAR_ENTER_ALWAYS_SPRING,
|
|
2539
|
-
className: cn(
|
|
2695
|
+
className: cn(
|
|
2696
|
+
"fixed top-0 inset-x-0 z-50 overflow-hidden",
|
|
2697
|
+
className
|
|
2698
|
+
),
|
|
2540
2699
|
style: { height: barHeight },
|
|
2541
2700
|
children: /* @__PURE__ */ jsxRuntime.jsx(SmallAppBarInner, __spreadValues({}, innerProps))
|
|
2542
2701
|
},
|
|
@@ -6338,7 +6497,7 @@ function generateWavyCircularPath(center, radius, amplitude, wavelength) {
|
|
|
6338
6497
|
if (i === 0) d += `M ${xAt(t0).toFixed(2)} ${yAt(t0).toFixed(2)}`;
|
|
6339
6498
|
d += ` C ${cp1x.toFixed(2)} ${cp1y.toFixed(2)}, ${cp2x.toFixed(2)} ${cp2y.toFixed(2)}, ${xAt(t1).toFixed(2)} ${yAt(t1).toFixed(2)}`;
|
|
6340
6499
|
}
|
|
6341
|
-
return d
|
|
6500
|
+
return `${d} Z`;
|
|
6342
6501
|
}
|
|
6343
6502
|
function getSinePath(startX, endX, phase, wl, amp) {
|
|
6344
6503
|
if (startX >= endX) return "";
|
|
@@ -6370,6 +6529,14 @@ function getSinePath(startX, endX, phase, wl, amp) {
|
|
|
6370
6529
|
}
|
|
6371
6530
|
return d;
|
|
6372
6531
|
}
|
|
6532
|
+
var GLOBAL_ROTATION_DURATION = 6e3;
|
|
6533
|
+
var GLOBAL_ROTATION_TARGET = 1080;
|
|
6534
|
+
var ADDITIONAL_ROTATION_CYCLE = 1500;
|
|
6535
|
+
var ADDITIONAL_ROTATION_STEP = 90;
|
|
6536
|
+
var ADDITIONAL_ROTATION_EASE_DURATION = 500;
|
|
6537
|
+
var DEFAULT_MIN_PROGRESS = 0.1;
|
|
6538
|
+
var DEFAULT_MAX_PROGRESS = 0.8;
|
|
6539
|
+
var PROGRESS_CYCLE_DURATION = 1500;
|
|
6373
6540
|
var CircularProgress = React37__namespace.forwardRef(
|
|
6374
6541
|
(_a, ref) => {
|
|
6375
6542
|
var _b = _a, {
|
|
@@ -6383,6 +6550,10 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6383
6550
|
crawlerSpeed = 1,
|
|
6384
6551
|
color,
|
|
6385
6552
|
trackColor,
|
|
6553
|
+
showTrack = "auto",
|
|
6554
|
+
minProgress = DEFAULT_MIN_PROGRESS,
|
|
6555
|
+
maxProgress = DEFAULT_MAX_PROGRESS,
|
|
6556
|
+
amplitudeRange,
|
|
6386
6557
|
className,
|
|
6387
6558
|
"aria-label": ariaLabel
|
|
6388
6559
|
} = _b, restProps = __objRest(_b, [
|
|
@@ -6396,6 +6567,10 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6396
6567
|
"crawlerSpeed",
|
|
6397
6568
|
"color",
|
|
6398
6569
|
"trackColor",
|
|
6570
|
+
"showTrack",
|
|
6571
|
+
"minProgress",
|
|
6572
|
+
"maxProgress",
|
|
6573
|
+
"amplitudeRange",
|
|
6399
6574
|
"className",
|
|
6400
6575
|
"aria-label"
|
|
6401
6576
|
]);
|
|
@@ -6406,6 +6581,7 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6406
6581
|
const activeColor = color || "var(--md-sys-color-indicator-active)";
|
|
6407
6582
|
const bgTrackColor = trackColor || "var(--md-sys-color-indicator-track)";
|
|
6408
6583
|
const isWavy = shape === "wavy";
|
|
6584
|
+
const shouldShowIndeterminateTrack = showTrack === "auto" ? isWavy : showTrack;
|
|
6409
6585
|
const BASELINE_SIZE = 48;
|
|
6410
6586
|
const scaleFactor = size / BASELINE_SIZE;
|
|
6411
6587
|
const effectiveAmplitude = React37__namespace.useMemo(
|
|
@@ -6416,6 +6592,10 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6416
6592
|
() => wavelength != null ? wavelength : 15 * scaleFactor,
|
|
6417
6593
|
[wavelength, scaleFactor]
|
|
6418
6594
|
);
|
|
6595
|
+
const resolvedAmplitudeRange = React37__namespace.useMemo(
|
|
6596
|
+
() => amplitudeRange != null ? amplitudeRange : [0, effectiveAmplitude],
|
|
6597
|
+
[amplitudeRange, effectiveAmplitude]
|
|
6598
|
+
);
|
|
6419
6599
|
const wavyActivePath = React37__namespace.useMemo(
|
|
6420
6600
|
() => isWavy ? generateWavyCircularPath(
|
|
6421
6601
|
center,
|
|
@@ -6435,6 +6615,145 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6435
6615
|
const trackLength = isDeterminate ? Math.max(1e-3, 1 - activeAngularFraction - 2 * gapForTrack) : 1;
|
|
6436
6616
|
const ActiveCircleElem = react.m.circle;
|
|
6437
6617
|
const ActivePathElem = react.m.path;
|
|
6618
|
+
const indeterminateSvgRef = React37__namespace.useRef(null);
|
|
6619
|
+
const indeterminateTrackRef = React37__namespace.useRef(null);
|
|
6620
|
+
const indeterminateActiveRef = React37__namespace.useRef(null);
|
|
6621
|
+
const indeterminateWavyTrackPathRef = React37__namespace.useRef(null);
|
|
6622
|
+
const indeterminateWavyActivePathRef = React37__namespace.useRef(null);
|
|
6623
|
+
const cachedPathLengthRef = React37__namespace.useRef(0);
|
|
6624
|
+
React37__namespace.useLayoutEffect(() => {
|
|
6625
|
+
if (!isWavy || !wavyActivePath) {
|
|
6626
|
+
cachedPathLengthRef.current = circumference;
|
|
6627
|
+
return;
|
|
6628
|
+
}
|
|
6629
|
+
const el = indeterminateActiveRef.current;
|
|
6630
|
+
if (el && "getTotalLength" in el) {
|
|
6631
|
+
try {
|
|
6632
|
+
const len = el.getTotalLength();
|
|
6633
|
+
if (len > 0) {
|
|
6634
|
+
cachedPathLengthRef.current = len;
|
|
6635
|
+
return;
|
|
6636
|
+
}
|
|
6637
|
+
} catch (e) {
|
|
6638
|
+
}
|
|
6639
|
+
}
|
|
6640
|
+
cachedPathLengthRef.current = circumference;
|
|
6641
|
+
}, [isWavy, circumference, wavyActivePath]);
|
|
6642
|
+
react.useAnimationFrame((time) => {
|
|
6643
|
+
if (isDeterminate) return;
|
|
6644
|
+
const safeCrawlerSpeed = Math.max(0.1, crawlerSpeed);
|
|
6645
|
+
const scaledTime = time * safeCrawlerSpeed;
|
|
6646
|
+
const globalCycle = scaledTime % GLOBAL_ROTATION_DURATION;
|
|
6647
|
+
const globalAngle = globalCycle / GLOBAL_ROTATION_DURATION * GLOBAL_ROTATION_TARGET;
|
|
6648
|
+
const additionalFullCycles = Math.floor(
|
|
6649
|
+
scaledTime / ADDITIONAL_ROTATION_CYCLE
|
|
6650
|
+
);
|
|
6651
|
+
const additionalCycleTime = scaledTime % ADDITIONAL_ROTATION_CYCLE;
|
|
6652
|
+
const additionalEaseT = Math.min(
|
|
6653
|
+
1,
|
|
6654
|
+
additionalCycleTime / ADDITIONAL_ROTATION_EASE_DURATION
|
|
6655
|
+
);
|
|
6656
|
+
const additionalAngle = (additionalFullCycles + easeInOutCubic(additionalEaseT)) * ADDITIONAL_ROTATION_STEP;
|
|
6657
|
+
const totalRotation = globalAngle + additionalAngle;
|
|
6658
|
+
if (indeterminateSvgRef.current) {
|
|
6659
|
+
indeterminateSvgRef.current.style.transform = `rotate(${totalRotation - 90}deg)`;
|
|
6660
|
+
}
|
|
6661
|
+
const progressFullCycle = PROGRESS_CYCLE_DURATION * 2;
|
|
6662
|
+
const progressCycleTime = scaledTime % progressFullCycle;
|
|
6663
|
+
let progress;
|
|
6664
|
+
if (progressCycleTime < PROGRESS_CYCLE_DURATION) {
|
|
6665
|
+
const t = progressCycleTime / PROGRESS_CYCLE_DURATION;
|
|
6666
|
+
progress = minProgress + (maxProgress - minProgress) * easeInOutCubic(t);
|
|
6667
|
+
} else {
|
|
6668
|
+
const t = (progressCycleTime - PROGRESS_CYCLE_DURATION) / PROGRESS_CYCLE_DURATION;
|
|
6669
|
+
progress = maxProgress - (maxProgress - minProgress) * easeInOutCubic(t);
|
|
6670
|
+
}
|
|
6671
|
+
if (isWavy) {
|
|
6672
|
+
const amplitudeT = (progress - minProgress) / (maxProgress - minProgress);
|
|
6673
|
+
const currentAmplitude = resolvedAmplitudeRange[0] + (resolvedAmplitudeRange[1] - resolvedAmplitudeRange[0]) * amplitudeT;
|
|
6674
|
+
const dynamicPath = generateWavyCircularPath(
|
|
6675
|
+
center,
|
|
6676
|
+
radius,
|
|
6677
|
+
currentAmplitude,
|
|
6678
|
+
effectiveWavelength
|
|
6679
|
+
);
|
|
6680
|
+
if (indeterminateWavyActivePathRef.current) {
|
|
6681
|
+
indeterminateWavyActivePathRef.current.setAttribute("d", dynamicPath);
|
|
6682
|
+
}
|
|
6683
|
+
if (indeterminateWavyTrackPathRef.current) {
|
|
6684
|
+
indeterminateWavyTrackPathRef.current.setAttribute("d", dynamicPath);
|
|
6685
|
+
}
|
|
6686
|
+
const pathEl = indeterminateWavyActivePathRef.current;
|
|
6687
|
+
let totalLen = cachedPathLengthRef.current || circumference;
|
|
6688
|
+
if (pathEl) {
|
|
6689
|
+
try {
|
|
6690
|
+
const len = pathEl.getTotalLength();
|
|
6691
|
+
if (len > 0) totalLen = len;
|
|
6692
|
+
} catch (e) {
|
|
6693
|
+
}
|
|
6694
|
+
}
|
|
6695
|
+
const gapFrac = (gapSize + trackHeight) / totalLen;
|
|
6696
|
+
const activeLen = totalLen * progress;
|
|
6697
|
+
const activeOff = 0;
|
|
6698
|
+
if (indeterminateWavyActivePathRef.current) {
|
|
6699
|
+
indeterminateWavyActivePathRef.current.setAttribute(
|
|
6700
|
+
"stroke-dasharray",
|
|
6701
|
+
`${activeLen} ${totalLen}`
|
|
6702
|
+
);
|
|
6703
|
+
indeterminateWavyActivePathRef.current.setAttribute(
|
|
6704
|
+
"stroke-dashoffset",
|
|
6705
|
+
`${activeOff}`
|
|
6706
|
+
);
|
|
6707
|
+
}
|
|
6708
|
+
if (shouldShowIndeterminateTrack && indeterminateWavyTrackPathRef.current) {
|
|
6709
|
+
const trackStartFrac = progress + gapFrac;
|
|
6710
|
+
const trackLen = Math.max(
|
|
6711
|
+
1e-3,
|
|
6712
|
+
totalLen * (1 - progress - 2 * gapFrac)
|
|
6713
|
+
);
|
|
6714
|
+
const trackOff = -totalLen * trackStartFrac;
|
|
6715
|
+
indeterminateWavyTrackPathRef.current.setAttribute(
|
|
6716
|
+
"stroke-dasharray",
|
|
6717
|
+
`${trackLen} ${totalLen}`
|
|
6718
|
+
);
|
|
6719
|
+
indeterminateWavyTrackPathRef.current.setAttribute(
|
|
6720
|
+
"stroke-dashoffset",
|
|
6721
|
+
`${trackOff}`
|
|
6722
|
+
);
|
|
6723
|
+
}
|
|
6724
|
+
} else {
|
|
6725
|
+
const totalLen = circumference;
|
|
6726
|
+
const activeLen = totalLen * progress;
|
|
6727
|
+
const activeOff = 0;
|
|
6728
|
+
if (indeterminateActiveRef.current) {
|
|
6729
|
+
indeterminateActiveRef.current.setAttribute(
|
|
6730
|
+
"stroke-dasharray",
|
|
6731
|
+
`${activeLen} ${totalLen}`
|
|
6732
|
+
);
|
|
6733
|
+
indeterminateActiveRef.current.setAttribute(
|
|
6734
|
+
"stroke-dashoffset",
|
|
6735
|
+
`${activeOff}`
|
|
6736
|
+
);
|
|
6737
|
+
}
|
|
6738
|
+
if (shouldShowIndeterminateTrack && indeterminateTrackRef.current) {
|
|
6739
|
+
const gapFrac = (gapSize + trackHeight) / totalLen;
|
|
6740
|
+
const trackStartFrac = progress + gapFrac;
|
|
6741
|
+
const trackLen = Math.max(
|
|
6742
|
+
1e-3,
|
|
6743
|
+
totalLen * (1 - progress - 2 * gapFrac)
|
|
6744
|
+
);
|
|
6745
|
+
const trackOff = -totalLen * trackStartFrac;
|
|
6746
|
+
indeterminateTrackRef.current.setAttribute(
|
|
6747
|
+
"stroke-dasharray",
|
|
6748
|
+
`${trackLen} ${totalLen}`
|
|
6749
|
+
);
|
|
6750
|
+
indeterminateTrackRef.current.setAttribute(
|
|
6751
|
+
"stroke-dashoffset",
|
|
6752
|
+
`${trackOff}`
|
|
6753
|
+
);
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
});
|
|
6438
6757
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6439
6758
|
"div",
|
|
6440
6759
|
__spreadProps(__spreadValues({
|
|
@@ -6511,9 +6830,10 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6511
6830
|
]
|
|
6512
6831
|
}
|
|
6513
6832
|
),
|
|
6514
|
-
!isDeterminate && /* @__PURE__ */ jsxRuntime.
|
|
6515
|
-
|
|
6833
|
+
!isDeterminate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6834
|
+
"svg",
|
|
6516
6835
|
{
|
|
6836
|
+
ref: indeterminateSvgRef,
|
|
6517
6837
|
width: size,
|
|
6518
6838
|
height: size,
|
|
6519
6839
|
viewBox: `0 0 ${size} ${size}`,
|
|
@@ -6522,84 +6842,60 @@ var CircularProgress = React37__namespace.forwardRef(
|
|
|
6522
6842
|
position: "absolute",
|
|
6523
6843
|
inset: 0,
|
|
6524
6844
|
overflow: "visible",
|
|
6525
|
-
transformOrigin: "center"
|
|
6526
|
-
|
|
6527
|
-
animate: { rotate: [0, 360] },
|
|
6528
|
-
transition: {
|
|
6529
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6530
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6531
|
-
ease: "linear"
|
|
6845
|
+
transformOrigin: "center",
|
|
6846
|
+
transform: "rotate(-90deg)"
|
|
6532
6847
|
},
|
|
6533
|
-
children: [
|
|
6534
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6535
|
-
|
|
6848
|
+
children: isWavy ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6849
|
+
shouldShowIndeterminateTrack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6850
|
+
"path",
|
|
6536
6851
|
{
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
r: radius,
|
|
6852
|
+
ref: indeterminateWavyTrackPathRef,
|
|
6853
|
+
d: wavyActivePath != null ? wavyActivePath : "",
|
|
6540
6854
|
fill: "none",
|
|
6541
6855
|
stroke: bgTrackColor,
|
|
6542
6856
|
strokeWidth: trackHeight,
|
|
6543
|
-
strokeLinecap: "round"
|
|
6544
|
-
animate: {
|
|
6545
|
-
pathLength: [
|
|
6546
|
-
Math.max(1e-3, 0.9 - 2 * gapForTrack),
|
|
6547
|
-
Math.max(1e-3, 0.25 - 2 * gapForTrack),
|
|
6548
|
-
Math.max(1e-3, 0.9 - 2 * gapForTrack)
|
|
6549
|
-
],
|
|
6550
|
-
pathOffset: [
|
|
6551
|
-
0.1 + gapForTrack,
|
|
6552
|
-
0.75 + gapForTrack,
|
|
6553
|
-
0.1 + gapForTrack
|
|
6554
|
-
]
|
|
6555
|
-
},
|
|
6556
|
-
transition: {
|
|
6557
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6558
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6559
|
-
ease: [0.4, 0, 0.2, 1]
|
|
6560
|
-
}
|
|
6857
|
+
strokeLinecap: "round"
|
|
6561
6858
|
}
|
|
6562
6859
|
),
|
|
6563
|
-
|
|
6564
|
-
|
|
6860
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6861
|
+
"path",
|
|
6565
6862
|
{
|
|
6863
|
+
ref: indeterminateWavyActivePathRef,
|
|
6566
6864
|
d: wavyActivePath != null ? wavyActivePath : "",
|
|
6567
6865
|
fill: "none",
|
|
6568
6866
|
stroke: activeColor,
|
|
6569
6867
|
strokeWidth: trackHeight,
|
|
6570
|
-
strokeLinecap: "round"
|
|
6571
|
-
animate: {
|
|
6572
|
-
pathLength: [0.1, 0.75, 0.1],
|
|
6573
|
-
pathOffset: [0, 0.65, 1]
|
|
6574
|
-
},
|
|
6575
|
-
transition: {
|
|
6576
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6577
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6578
|
-
ease: [0.4, 0, 0.2, 1]
|
|
6579
|
-
}
|
|
6868
|
+
strokeLinecap: "round"
|
|
6580
6869
|
}
|
|
6581
|
-
)
|
|
6582
|
-
|
|
6870
|
+
)
|
|
6871
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6872
|
+
shouldShowIndeterminateTrack && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6873
|
+
"circle",
|
|
6583
6874
|
{
|
|
6875
|
+
ref: indeterminateTrackRef,
|
|
6876
|
+
cx: center,
|
|
6877
|
+
cy: center,
|
|
6878
|
+
r: radius,
|
|
6879
|
+
fill: "none",
|
|
6880
|
+
stroke: bgTrackColor,
|
|
6881
|
+
strokeWidth: trackHeight,
|
|
6882
|
+
strokeLinecap: "round"
|
|
6883
|
+
}
|
|
6884
|
+
),
|
|
6885
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6886
|
+
"circle",
|
|
6887
|
+
{
|
|
6888
|
+
ref: indeterminateActiveRef,
|
|
6584
6889
|
cx: center,
|
|
6585
6890
|
cy: center,
|
|
6586
6891
|
r: radius,
|
|
6587
6892
|
fill: "none",
|
|
6588
6893
|
stroke: activeColor,
|
|
6589
6894
|
strokeWidth: trackHeight,
|
|
6590
|
-
strokeLinecap: "round"
|
|
6591
|
-
animate: {
|
|
6592
|
-
pathLength: [0.1, 0.75, 0.1],
|
|
6593
|
-
pathOffset: [0, 0.65, 1]
|
|
6594
|
-
},
|
|
6595
|
-
transition: {
|
|
6596
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6597
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6598
|
-
ease: [0.4, 0, 0.2, 1]
|
|
6599
|
-
}
|
|
6895
|
+
strokeLinecap: "round"
|
|
6600
6896
|
}
|
|
6601
6897
|
)
|
|
6602
|
-
]
|
|
6898
|
+
] })
|
|
6603
6899
|
}
|
|
6604
6900
|
)
|
|
6605
6901
|
] })
|
|
@@ -6805,7 +7101,7 @@ var WavyLinearTrack = React37__namespace.memo(function WavyLinearTrack2({
|
|
|
6805
7101
|
currentAmp
|
|
6806
7102
|
);
|
|
6807
7103
|
} else if (fraction === 0) {
|
|
6808
|
-
activePathD =
|
|
7104
|
+
activePathD = "";
|
|
6809
7105
|
}
|
|
6810
7106
|
const trackStart = adjHead + totalGap;
|
|
6811
7107
|
if (trackStart < width - capWidth) {
|
|
@@ -6837,20 +7133,20 @@ var WavyLinearTrack = React37__namespace.memo(function WavyLinearTrack2({
|
|
|
6837
7133
|
activeLines.push({ tail: l1T, head: l1H });
|
|
6838
7134
|
activeLines.push({ tail: l2T, head: l2H });
|
|
6839
7135
|
}
|
|
6840
|
-
const
|
|
6841
|
-
const
|
|
6842
|
-
const
|
|
7136
|
+
const activeSegments = activeLines.map((line) => {
|
|
7137
|
+
const rawTail = line.tail * width;
|
|
7138
|
+
const rawHead = line.head * width;
|
|
6843
7139
|
const adjTail = Math.max(
|
|
6844
7140
|
capWidth,
|
|
6845
|
-
Math.min(width - capWidth,
|
|
7141
|
+
Math.min(width - capWidth, rawTail)
|
|
6846
7142
|
);
|
|
6847
7143
|
const adjHead = Math.max(
|
|
6848
7144
|
capWidth,
|
|
6849
|
-
Math.min(width - capWidth,
|
|
7145
|
+
Math.min(width - capWidth, rawHead)
|
|
6850
7146
|
);
|
|
6851
7147
|
return { adjTail, adjHead };
|
|
6852
7148
|
}).filter((seg) => seg.adjHead - seg.adjTail > 0.1);
|
|
6853
|
-
activePathD =
|
|
7149
|
+
activePathD = activeSegments.map(
|
|
6854
7150
|
(seg) => getSinePath(
|
|
6855
7151
|
seg.adjTail,
|
|
6856
7152
|
seg.adjHead,
|
|
@@ -6859,13 +7155,24 @@ var WavyLinearTrack = React37__namespace.memo(function WavyLinearTrack2({
|
|
|
6859
7155
|
currentAmp
|
|
6860
7156
|
)
|
|
6861
7157
|
).join(" ");
|
|
7158
|
+
const validActiveLines = activeLines.filter(
|
|
7159
|
+
(line) => line.head > line.tail && line.head * width > 0 && line.tail * width < width
|
|
7160
|
+
).sort((a, b) => a.tail - b.tail);
|
|
6862
7161
|
let currentTrackX = capWidth;
|
|
6863
|
-
for (const
|
|
6864
|
-
const
|
|
7162
|
+
for (const line of validActiveLines) {
|
|
7163
|
+
const blockStart = line.tail * width - totalGap;
|
|
7164
|
+
const blockEnd = line.head * width + totalGap;
|
|
7165
|
+
const trackEnd = Math.min(width - capWidth, blockStart);
|
|
6865
7166
|
if (trackEnd > currentTrackX) {
|
|
6866
|
-
trackD += `${getSinePath(
|
|
7167
|
+
trackD += `${getSinePath(
|
|
7168
|
+
currentTrackX,
|
|
7169
|
+
trackEnd,
|
|
7170
|
+
phase,
|
|
7171
|
+
activeWavelength,
|
|
7172
|
+
trackAmp
|
|
7173
|
+
)} `;
|
|
6867
7174
|
}
|
|
6868
|
-
currentTrackX = Math.max(currentTrackX,
|
|
7175
|
+
currentTrackX = Math.max(currentTrackX, blockEnd);
|
|
6869
7176
|
}
|
|
6870
7177
|
if (currentTrackX < width - capWidth) {
|
|
6871
7178
|
trackD += getSinePath(
|
|
@@ -6878,9 +7185,9 @@ var WavyLinearTrack = React37__namespace.memo(function WavyLinearTrack2({
|
|
|
6878
7185
|
}
|
|
6879
7186
|
}
|
|
6880
7187
|
if (activePathRef.current)
|
|
6881
|
-
activePathRef.current.setAttribute("d", activePathD);
|
|
7188
|
+
activePathRef.current.setAttribute("d", activePathD || "");
|
|
6882
7189
|
if (trackPathRef.current)
|
|
6883
|
-
trackPathRef.current.setAttribute("d", trackD.trim());
|
|
7190
|
+
trackPathRef.current.setAttribute("d", trackD.trim() || "");
|
|
6884
7191
|
});
|
|
6885
7192
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6886
7193
|
"div",
|
|
@@ -7203,7 +7510,7 @@ var IconButtonComponent = React37__namespace.forwardRef(
|
|
|
7203
7510
|
variant = "default",
|
|
7204
7511
|
colorStyle = "standard",
|
|
7205
7512
|
size = "sm",
|
|
7206
|
-
|
|
7513
|
+
width = "default",
|
|
7207
7514
|
shape = "round",
|
|
7208
7515
|
selected,
|
|
7209
7516
|
selectedIcon,
|
|
@@ -7221,7 +7528,7 @@ var IconButtonComponent = React37__namespace.forwardRef(
|
|
|
7221
7528
|
"variant",
|
|
7222
7529
|
"colorStyle",
|
|
7223
7530
|
"size",
|
|
7224
|
-
"
|
|
7531
|
+
"width",
|
|
7225
7532
|
"shape",
|
|
7226
7533
|
"selected",
|
|
7227
7534
|
"selectedIcon",
|
|
@@ -7266,7 +7573,7 @@ var IconButtonComponent = React37__namespace.forwardRef(
|
|
|
7266
7573
|
const iconPx = iconSize != null ? iconSize : defaultIconPx;
|
|
7267
7574
|
const isCustomSize = iconSize != null && iconSize !== "inherit";
|
|
7268
7575
|
const heightClass = (_c = SIZE_HEIGHT_STYLES[size]) != null ? _c : SIZE_HEIGHT_STYLES.sm;
|
|
7269
|
-
const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[
|
|
7576
|
+
const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[width]) != null ? _e : WIDTH_SIZE_STYLES.sm.default;
|
|
7270
7577
|
const needsTouchTarget = size === "xs" || size === "sm";
|
|
7271
7578
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
7272
7579
|
disabled: loading
|
|
@@ -7889,9 +8196,9 @@ function BadgedBox({
|
|
|
7889
8196
|
badge,
|
|
7890
8197
|
children,
|
|
7891
8198
|
className,
|
|
7892
|
-
|
|
8199
|
+
size
|
|
7893
8200
|
}) {
|
|
7894
|
-
const isLarge =
|
|
8201
|
+
const isLarge = size ? size === "lg" : detectBadgeHasContent(badge);
|
|
7895
8202
|
const badgePositionClass = isLarge ? "translate-x-[35%] -translate-y-[35%]" : "translate-x-[50%] -translate-y-[50%]";
|
|
7896
8203
|
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("relative inline-flex", className), children: [
|
|
7897
8204
|
children,
|
|
@@ -8902,7 +9209,7 @@ var FloatingToolbarWithFabBase = React37__namespace.forwardRef(
|
|
|
8902
9209
|
fabPosition = orientation === "horizontal" ? "end" : "bottom",
|
|
8903
9210
|
animationDuration = 0.3,
|
|
8904
9211
|
scrollBehavior,
|
|
8905
|
-
fabSize = "
|
|
9212
|
+
fabSize = "sm",
|
|
8906
9213
|
className,
|
|
8907
9214
|
style
|
|
8908
9215
|
} = _b, props = __objRest(_b, [
|
|
@@ -8922,7 +9229,7 @@ var FloatingToolbarWithFabBase = React37__namespace.forwardRef(
|
|
|
8922
9229
|
const isHorizontal = orientation === "horizontal";
|
|
8923
9230
|
const effectiveExpanded = expanded && (!scrollBehavior || scrollBehavior.isExpanded);
|
|
8924
9231
|
const isFabBefore = fabPosition === "start" || fabPosition === "top";
|
|
8925
|
-
const resolvedFabSize = fabSize === "
|
|
9232
|
+
const resolvedFabSize = fabSize === "md" ? FabBaselineTokens.MediumContainerHeight : FabBaselineTokens.ContainerHeight;
|
|
8926
9233
|
const transitionSpec = __spreadProps(__spreadValues({}, SPRING_TRANSITION), {
|
|
8927
9234
|
duration: animationDuration
|
|
8928
9235
|
});
|
|
@@ -9061,7 +9368,7 @@ var ToolbarIconButton = React37__namespace.forwardRef(
|
|
|
9061
9368
|
(_a, ref) => {
|
|
9062
9369
|
var _b = _a, {
|
|
9063
9370
|
emphasis = "standard",
|
|
9064
|
-
|
|
9371
|
+
width = "default",
|
|
9065
9372
|
selected,
|
|
9066
9373
|
asChild,
|
|
9067
9374
|
className,
|
|
@@ -9069,7 +9376,7 @@ var ToolbarIconButton = React37__namespace.forwardRef(
|
|
|
9069
9376
|
whileTap
|
|
9070
9377
|
} = _b, props = __objRest(_b, [
|
|
9071
9378
|
"emphasis",
|
|
9072
|
-
"
|
|
9379
|
+
"width",
|
|
9073
9380
|
"selected",
|
|
9074
9381
|
"asChild",
|
|
9075
9382
|
"className",
|
|
@@ -9077,7 +9384,7 @@ var ToolbarIconButton = React37__namespace.forwardRef(
|
|
|
9077
9384
|
"whileTap"
|
|
9078
9385
|
]);
|
|
9079
9386
|
const context = useToolbarContext();
|
|
9080
|
-
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[
|
|
9387
|
+
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[width];
|
|
9081
9388
|
const colorStyle = VARIANT_TO_COLOR_STYLE[emphasis];
|
|
9082
9389
|
const iconButtonProps = selected !== void 0 ? {
|
|
9083
9390
|
variant: "toggle",
|
|
@@ -9432,6 +9739,7 @@ exports.DIVIDER_PADDING = DIVIDER_PADDING;
|
|
|
9432
9739
|
exports.DockedToolbar = DockedToolbar;
|
|
9433
9740
|
exports.FAST_EFFECTS_TRANSITION = FAST_EFFECTS_TRANSITION;
|
|
9434
9741
|
exports.FAST_SPATIAL_SPRING = FAST_SPATIAL_SPRING;
|
|
9742
|
+
exports.FadingBlurMask = FadingBlurMask;
|
|
9435
9743
|
exports.GROUP_SHAPES = GROUP_SHAPES;
|
|
9436
9744
|
exports.HorizontalFloatingToolbar = HorizontalFloatingToolbar;
|
|
9437
9745
|
exports.HorizontalFloatingToolbarWithFab = HorizontalFloatingToolbarWithFab;
|