@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.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import { useRef, useEffect, useState } from 'react';
|
|
2
|
+
import { AnimatePresence, m, LazyMotion, domMax, useAnimationFrame, useMotionValue, animate, useReducedMotion, LayoutGroup, useScroll, useMotionValueEvent, useTransform } from 'motion/react';
|
|
4
3
|
import { clsx } from 'clsx';
|
|
5
4
|
import { twMerge } from 'tailwind-merge';
|
|
6
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
6
|
+
import * as React37 from 'react';
|
|
7
|
+
import { useRef, useEffect, useState } from 'react';
|
|
7
8
|
import * as RxContextMenu from '@radix-ui/react-context-menu';
|
|
8
|
-
import { AnimatePresence, m, LazyMotion, domMax, useMotionValue, animate, useAnimationFrame, useReducedMotion, LayoutGroup, useScroll, useMotionValueEvent, useTransform } from 'motion/react';
|
|
9
9
|
import { cornerRadius } from '@bug-on/m3-tokens';
|
|
10
10
|
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
11
11
|
import { Slot } from '@radix-ui/react-slot';
|
|
@@ -43,6 +43,55 @@ var __objRest = (source, exclude) => {
|
|
|
43
43
|
}
|
|
44
44
|
return target;
|
|
45
45
|
};
|
|
46
|
+
function cn(...inputs) {
|
|
47
|
+
return twMerge(clsx(inputs));
|
|
48
|
+
}
|
|
49
|
+
function getMaskGradient(direction) {
|
|
50
|
+
switch (direction) {
|
|
51
|
+
case "bottom":
|
|
52
|
+
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%)";
|
|
53
|
+
case "both":
|
|
54
|
+
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%)";
|
|
55
|
+
default:
|
|
56
|
+
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%)";
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function FadingBlurMask({
|
|
60
|
+
direction = "top",
|
|
61
|
+
blurIntensity = 12,
|
|
62
|
+
blurHeight = "100%",
|
|
63
|
+
color = "var(--md-sys-color-surface)",
|
|
64
|
+
className,
|
|
65
|
+
style,
|
|
66
|
+
children
|
|
67
|
+
}) {
|
|
68
|
+
const shouldReduceMotion = useReducedMotion();
|
|
69
|
+
const activeBlur = shouldReduceMotion ? 0 : blurIntensity;
|
|
70
|
+
const maskGradient = getMaskGradient(direction);
|
|
71
|
+
const maskStyle = __spreadValues({
|
|
72
|
+
position: "absolute",
|
|
73
|
+
inset: 0,
|
|
74
|
+
pointerEvents: "none",
|
|
75
|
+
height: typeof blurHeight === "number" ? `${blurHeight}px` : blurHeight,
|
|
76
|
+
backdropFilter: activeBlur > 0 ? `blur(${activeBlur}px)` : void 0,
|
|
77
|
+
WebkitBackdropFilter: activeBlur > 0 ? `blur(${activeBlur}px)` : void 0,
|
|
78
|
+
maskImage: maskGradient,
|
|
79
|
+
WebkitMaskImage: maskGradient,
|
|
80
|
+
backgroundColor: color
|
|
81
|
+
}, style);
|
|
82
|
+
return /* @__PURE__ */ jsx(
|
|
83
|
+
"div",
|
|
84
|
+
{
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
className: cn(
|
|
87
|
+
"absolute inset-0 pointer-events-none z-0 rounded-[inherit]",
|
|
88
|
+
className
|
|
89
|
+
),
|
|
90
|
+
style: maskStyle,
|
|
91
|
+
children
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
46
95
|
|
|
47
96
|
// src/ui/shared/motion-tokens.ts
|
|
48
97
|
var FAST_SPATIAL_SPRING = {
|
|
@@ -197,9 +246,6 @@ var APP_BAR_TITLE_FADE = {
|
|
|
197
246
|
duration: 0.15,
|
|
198
247
|
ease: "easeInOut"
|
|
199
248
|
};
|
|
200
|
-
function cn(...inputs) {
|
|
201
|
-
return twMerge(clsx(inputs));
|
|
202
|
-
}
|
|
203
249
|
function AppBarItemButton({ item }) {
|
|
204
250
|
const isDisabled = item.enabled === false;
|
|
205
251
|
if (item.type === "custom" && item.appBarContent) {
|
|
@@ -1726,7 +1772,10 @@ function BottomAppBar({
|
|
|
1726
1772
|
floatingActionButton,
|
|
1727
1773
|
scrollBehavior = "visible",
|
|
1728
1774
|
scrollElement,
|
|
1729
|
-
className
|
|
1775
|
+
className,
|
|
1776
|
+
enableFadingBlur,
|
|
1777
|
+
blurIntensity,
|
|
1778
|
+
blurHeight
|
|
1730
1779
|
}) {
|
|
1731
1780
|
const shouldReduceMotion = useReducedMotion();
|
|
1732
1781
|
const { isHidden } = useAppBarScroll({
|
|
@@ -1741,9 +1790,9 @@ function BottomAppBar({
|
|
|
1741
1790
|
role: "navigation",
|
|
1742
1791
|
"aria-label": "Bottom app bar",
|
|
1743
1792
|
className: cn(
|
|
1744
|
-
"fixed bottom-0 inset-x-0 z-50",
|
|
1793
|
+
"fixed bottom-0 inset-x-0 z-50 overflow-hidden rounded-[inherit]",
|
|
1745
1794
|
"flex items-center",
|
|
1746
|
-
"bg-m3-surface-container",
|
|
1795
|
+
!enableFadingBlur && "bg-m3-surface-container",
|
|
1747
1796
|
"px-2",
|
|
1748
1797
|
// minimal horizontal padding, icon buttons provide spacing
|
|
1749
1798
|
"elevation-2",
|
|
@@ -1756,8 +1805,19 @@ function BottomAppBar({
|
|
|
1756
1805
|
animate: { y: translateY },
|
|
1757
1806
|
transition: hideTransition,
|
|
1758
1807
|
children: [
|
|
1759
|
-
|
|
1760
|
-
|
|
1808
|
+
enableFadingBlur && /* @__PURE__ */ jsx(
|
|
1809
|
+
FadingBlurMask,
|
|
1810
|
+
{
|
|
1811
|
+
direction: "bottom",
|
|
1812
|
+
blurIntensity,
|
|
1813
|
+
blurHeight,
|
|
1814
|
+
color: "var(--md-sys-color-surface-container)"
|
|
1815
|
+
}
|
|
1816
|
+
),
|
|
1817
|
+
/* @__PURE__ */ jsxs("div", { className: "relative z-10 flex items-center w-full h-full", children: [
|
|
1818
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex items-center flex-1", children: actions }),
|
|
1819
|
+
floatingActionButton && /* @__PURE__ */ jsx("div", { className: "shrink-0 ml-auto mr-2", children: floatingActionButton })
|
|
1820
|
+
] })
|
|
1761
1821
|
]
|
|
1762
1822
|
}
|
|
1763
1823
|
);
|
|
@@ -1865,7 +1925,10 @@ function LargeFlexibleAppBar({
|
|
|
1865
1925
|
headerContent,
|
|
1866
1926
|
collapsedHeight = AppBarTokens.heights.flexibleCollapsed,
|
|
1867
1927
|
expandedHeight,
|
|
1868
|
-
className
|
|
1928
|
+
className,
|
|
1929
|
+
enableFadingBlur,
|
|
1930
|
+
blurIntensity,
|
|
1931
|
+
blurHeight
|
|
1869
1932
|
}) {
|
|
1870
1933
|
var _a, _b, _c;
|
|
1871
1934
|
const resolvedExpandedHeight = expandedHeight != null ? expandedHeight : subtitle ? AppBarTokens.heights.largeFlexWithSubtitleExpanded : AppBarTokens.heights.largeFlexExpanded;
|
|
@@ -1895,15 +1958,28 @@ function LargeFlexibleAppBar({
|
|
|
1895
1958
|
{
|
|
1896
1959
|
role: "banner",
|
|
1897
1960
|
className: cn(
|
|
1898
|
-
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden",
|
|
1961
|
+
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden rounded-[inherit]",
|
|
1899
1962
|
className
|
|
1900
1963
|
),
|
|
1901
|
-
style: {
|
|
1964
|
+
style: {
|
|
1965
|
+
height,
|
|
1966
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
1967
|
+
transition: cssTransition
|
|
1968
|
+
},
|
|
1902
1969
|
children: [
|
|
1970
|
+
enableFadingBlur && /* @__PURE__ */ jsx(
|
|
1971
|
+
FadingBlurMask,
|
|
1972
|
+
{
|
|
1973
|
+
direction: "top",
|
|
1974
|
+
blurIntensity,
|
|
1975
|
+
blurHeight,
|
|
1976
|
+
color: currentBg
|
|
1977
|
+
}
|
|
1978
|
+
),
|
|
1903
1979
|
/* @__PURE__ */ jsxs(
|
|
1904
1980
|
"div",
|
|
1905
1981
|
{
|
|
1906
|
-
className: "flex items-center px-1 shrink-0",
|
|
1982
|
+
className: "relative z-10 flex items-center px-1 shrink-0",
|
|
1907
1983
|
style: { height: collapsedHeight },
|
|
1908
1984
|
children: [
|
|
1909
1985
|
navigationIcon && /* @__PURE__ */ jsx(
|
|
@@ -1945,7 +2021,7 @@ function LargeFlexibleAppBar({
|
|
|
1945
2021
|
"div",
|
|
1946
2022
|
{
|
|
1947
2023
|
className: cn(
|
|
1948
|
-
"flex flex-col flex-1 px-4 pb-
|
|
2024
|
+
"relative z-10 flex flex-col flex-1 px-4 pb-3 justify-end",
|
|
1949
2025
|
isCentered ? "items-center" : "items-start"
|
|
1950
2026
|
),
|
|
1951
2027
|
children: [
|
|
@@ -1998,7 +2074,10 @@ function MediumFlexibleAppBar({
|
|
|
1998
2074
|
headerContent,
|
|
1999
2075
|
collapsedHeight = AppBarTokens.heights.flexibleCollapsed,
|
|
2000
2076
|
expandedHeight,
|
|
2001
|
-
className
|
|
2077
|
+
className,
|
|
2078
|
+
enableFadingBlur,
|
|
2079
|
+
blurIntensity,
|
|
2080
|
+
blurHeight
|
|
2002
2081
|
}) {
|
|
2003
2082
|
var _a, _b, _c;
|
|
2004
2083
|
const resolvedExpandedHeight = expandedHeight != null ? expandedHeight : subtitle ? AppBarTokens.heights.mediumFlexWithSubtitleExpanded : AppBarTokens.heights.mediumFlexExpanded;
|
|
@@ -2028,15 +2107,28 @@ function MediumFlexibleAppBar({
|
|
|
2028
2107
|
{
|
|
2029
2108
|
role: "banner",
|
|
2030
2109
|
className: cn(
|
|
2031
|
-
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden",
|
|
2110
|
+
"fixed top-0 inset-x-0 z-50 flex flex-col overflow-hidden rounded-[inherit]",
|
|
2032
2111
|
className
|
|
2033
2112
|
),
|
|
2034
|
-
style: {
|
|
2113
|
+
style: {
|
|
2114
|
+
height,
|
|
2115
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
2116
|
+
transition: cssTransition
|
|
2117
|
+
},
|
|
2035
2118
|
children: [
|
|
2119
|
+
enableFadingBlur && /* @__PURE__ */ jsx(
|
|
2120
|
+
FadingBlurMask,
|
|
2121
|
+
{
|
|
2122
|
+
direction: "top",
|
|
2123
|
+
blurIntensity,
|
|
2124
|
+
blurHeight,
|
|
2125
|
+
color: currentBg
|
|
2126
|
+
}
|
|
2127
|
+
),
|
|
2036
2128
|
/* @__PURE__ */ jsxs(
|
|
2037
2129
|
"div",
|
|
2038
2130
|
{
|
|
2039
|
-
className: "flex items-center px-1 shrink-0",
|
|
2131
|
+
className: "relative z-10 flex items-center px-1 shrink-0",
|
|
2040
2132
|
style: { height: collapsedHeight },
|
|
2041
2133
|
children: [
|
|
2042
2134
|
navigationIcon && /* @__PURE__ */ jsx(
|
|
@@ -2078,7 +2170,7 @@ function MediumFlexibleAppBar({
|
|
|
2078
2170
|
"div",
|
|
2079
2171
|
{
|
|
2080
2172
|
className: cn(
|
|
2081
|
-
"flex flex-col flex-1 px-4 pb-3 justify-end",
|
|
2173
|
+
"relative z-10 flex flex-col flex-1 px-4 pb-3 justify-end",
|
|
2082
2174
|
isCentered ? "items-center" : "items-start"
|
|
2083
2175
|
),
|
|
2084
2176
|
children: [
|
|
@@ -2125,7 +2217,7 @@ function SearchIcon({ className }) {
|
|
|
2125
2217
|
"span",
|
|
2126
2218
|
{
|
|
2127
2219
|
className: cn(
|
|
2128
|
-
"material-symbols-rounded text-[20px] leading-none select-none",
|
|
2220
|
+
"material-symbols-rounded text-[20px] leading-none select-none flex items-center justify-center",
|
|
2129
2221
|
className
|
|
2130
2222
|
),
|
|
2131
2223
|
"aria-hidden": "true",
|
|
@@ -2145,7 +2237,12 @@ function SearchAppBar({
|
|
|
2145
2237
|
scrollBehavior = "pinned",
|
|
2146
2238
|
scrollElement,
|
|
2147
2239
|
searchBarId = "search-bar",
|
|
2148
|
-
|
|
2240
|
+
searchBarVariant = "filled",
|
|
2241
|
+
searchBarHeight = 56,
|
|
2242
|
+
className,
|
|
2243
|
+
enableFadingBlur,
|
|
2244
|
+
blurIntensity,
|
|
2245
|
+
blurHeight
|
|
2149
2246
|
}) {
|
|
2150
2247
|
var _a, _b;
|
|
2151
2248
|
const shouldReduceMotion = useReducedMotion();
|
|
@@ -2168,65 +2265,92 @@ function SearchAppBar({
|
|
|
2168
2265
|
handleSearchClick();
|
|
2169
2266
|
}
|
|
2170
2267
|
};
|
|
2268
|
+
const searchBarBg = isScrolled ? "var(--md-sys-color-surface-container-highest)" : APP_BAR_COLORS.searchBarBg;
|
|
2269
|
+
const isOutlined = searchBarVariant === "outlined";
|
|
2171
2270
|
return /* @__PURE__ */ jsxs(
|
|
2172
2271
|
m.header,
|
|
2173
2272
|
{
|
|
2174
2273
|
role: "banner",
|
|
2175
2274
|
className: cn(
|
|
2176
|
-
"fixed top-0 inset-x-0 z-50 flex items-center gap-2 px-4",
|
|
2275
|
+
"fixed top-0 inset-x-0 z-50 flex items-center gap-2 px-4 overflow-hidden rounded-[inherit]",
|
|
2177
2276
|
className
|
|
2178
2277
|
),
|
|
2179
2278
|
style: {
|
|
2180
2279
|
height: AppBarTokens.heights.small,
|
|
2181
|
-
backgroundColor: currentBg,
|
|
2280
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
2182
2281
|
transition: cssTransition
|
|
2183
2282
|
},
|
|
2184
2283
|
children: [
|
|
2185
|
-
|
|
2186
|
-
|
|
2284
|
+
enableFadingBlur && /* @__PURE__ */ jsx(
|
|
2285
|
+
FadingBlurMask,
|
|
2187
2286
|
{
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
},
|
|
2193
|
-
children: navigationIcon
|
|
2287
|
+
direction: "top",
|
|
2288
|
+
blurIntensity,
|
|
2289
|
+
blurHeight,
|
|
2290
|
+
color: currentBg
|
|
2194
2291
|
}
|
|
2195
2292
|
),
|
|
2196
|
-
/* @__PURE__ */ jsxs(
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
"
|
|
2219
|
-
|
|
2220
|
-
className: "flex-1 text-[16px] leading-6 truncate select-none",
|
|
2221
|
-
style: { color: APP_BAR_COLORS.searchBarContent },
|
|
2222
|
-
children: searchValue != null ? searchValue : searchPlaceholder
|
|
2223
|
-
}
|
|
2293
|
+
/* @__PURE__ */ jsxs("div", { className: "relative z-10 flex items-center gap-2 w-full h-full", children: [
|
|
2294
|
+
navigationIcon && /* @__PURE__ */ jsx(
|
|
2295
|
+
"div",
|
|
2296
|
+
{
|
|
2297
|
+
className: "shrink-0 flex items-center justify-center",
|
|
2298
|
+
style: {
|
|
2299
|
+
width: AppBarTokens.iconButtonTouchTarget,
|
|
2300
|
+
height: AppBarTokens.iconButtonTouchTarget
|
|
2301
|
+
},
|
|
2302
|
+
children: navigationIcon
|
|
2303
|
+
}
|
|
2304
|
+
),
|
|
2305
|
+
/* @__PURE__ */ jsxs(
|
|
2306
|
+
m.div,
|
|
2307
|
+
{
|
|
2308
|
+
layoutId: shouldReduceMotion ? void 0 : searchBarId,
|
|
2309
|
+
role: "search",
|
|
2310
|
+
"aria-label": searchPlaceholder,
|
|
2311
|
+
"aria-expanded": isSearchOpen,
|
|
2312
|
+
tabIndex: 0,
|
|
2313
|
+
className: cn(
|
|
2314
|
+
"relative flex flex-1 items-center gap-2 rounded-full cursor-text px-4",
|
|
2315
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
2316
|
+
isOutlined && "border border-(--md-sys-color-outline)"
|
|
2224
2317
|
),
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2318
|
+
style: { height: searchBarHeight },
|
|
2319
|
+
onClick: handleSearchClick,
|
|
2320
|
+
onKeyDown: handleKeyDown,
|
|
2321
|
+
children: [
|
|
2322
|
+
!isOutlined && /* @__PURE__ */ jsx(
|
|
2323
|
+
"div",
|
|
2324
|
+
{
|
|
2325
|
+
className: "absolute inset-0 rounded-full -z-10 transition-colors",
|
|
2326
|
+
style: {
|
|
2327
|
+
backgroundColor: searchBarBg,
|
|
2328
|
+
transition: cssTransition
|
|
2329
|
+
}
|
|
2330
|
+
}
|
|
2331
|
+
),
|
|
2332
|
+
/* @__PURE__ */ jsx(
|
|
2333
|
+
"span",
|
|
2334
|
+
{
|
|
2335
|
+
className: "shrink-0 flex items-center justify-center h-full",
|
|
2336
|
+
style: { color: APP_BAR_COLORS.searchBarContent },
|
|
2337
|
+
children: leadingSearchIcon != null ? leadingSearchIcon : /* @__PURE__ */ jsx(SearchIcon, {})
|
|
2338
|
+
}
|
|
2339
|
+
),
|
|
2340
|
+
/* @__PURE__ */ jsx(
|
|
2341
|
+
"span",
|
|
2342
|
+
{
|
|
2343
|
+
className: "flex-1 text-[16px] leading-6 truncate select-none",
|
|
2344
|
+
style: { color: APP_BAR_COLORS.searchBarContent },
|
|
2345
|
+
children: searchValue != null ? searchValue : searchPlaceholder
|
|
2346
|
+
}
|
|
2347
|
+
),
|
|
2348
|
+
trailingSearchActions && /* @__PURE__ */ jsx("div", { className: "flex items-center shrink-0", children: trailingSearchActions })
|
|
2349
|
+
]
|
|
2350
|
+
}
|
|
2351
|
+
),
|
|
2352
|
+
externalActions && /* @__PURE__ */ jsx("div", { className: "flex items-center shrink-0", children: externalActions })
|
|
2353
|
+
] })
|
|
2230
2354
|
]
|
|
2231
2355
|
}
|
|
2232
2356
|
);
|
|
@@ -2399,9 +2523,11 @@ function SmallAppBarInner({
|
|
|
2399
2523
|
navigationIcon,
|
|
2400
2524
|
actions,
|
|
2401
2525
|
colors,
|
|
2402
|
-
className,
|
|
2403
2526
|
currentBg,
|
|
2404
|
-
cssTransition
|
|
2527
|
+
cssTransition,
|
|
2528
|
+
enableFadingBlur,
|
|
2529
|
+
blurIntensity,
|
|
2530
|
+
blurHeight
|
|
2405
2531
|
}) {
|
|
2406
2532
|
var _a, _b;
|
|
2407
2533
|
const isCentered = titleAlignment === "center";
|
|
@@ -2409,57 +2535,81 @@ function SmallAppBarInner({
|
|
|
2409
2535
|
m.header,
|
|
2410
2536
|
{
|
|
2411
2537
|
role: "banner",
|
|
2412
|
-
className:
|
|
2413
|
-
style: {
|
|
2538
|
+
className: "relative flex items-center px-1 h-full w-full overflow-hidden rounded-[inherit]",
|
|
2539
|
+
style: {
|
|
2540
|
+
backgroundColor: enableFadingBlur ? "transparent" : currentBg,
|
|
2541
|
+
transition: cssTransition
|
|
2542
|
+
},
|
|
2414
2543
|
children: [
|
|
2415
|
-
|
|
2416
|
-
|
|
2544
|
+
enableFadingBlur && /* @__PURE__ */ jsx(
|
|
2545
|
+
FadingBlurMask,
|
|
2417
2546
|
{
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
},
|
|
2423
|
-
children: navigationIcon
|
|
2547
|
+
direction: "top",
|
|
2548
|
+
blurIntensity,
|
|
2549
|
+
blurHeight,
|
|
2550
|
+
color: currentBg
|
|
2424
2551
|
}
|
|
2425
2552
|
),
|
|
2426
|
-
/* @__PURE__ */ jsxs(
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
"
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
}
|
|
2553
|
+
/* @__PURE__ */ jsxs("div", { className: "relative z-10 flex items-center w-full h-full", children: [
|
|
2554
|
+
navigationIcon && /* @__PURE__ */ jsx(
|
|
2555
|
+
"div",
|
|
2556
|
+
{
|
|
2557
|
+
className: "shrink-0 flex items-center justify-center",
|
|
2558
|
+
style: {
|
|
2559
|
+
width: AppBarTokens.iconButtonTouchTarget,
|
|
2560
|
+
height: AppBarTokens.iconButtonTouchTarget
|
|
2561
|
+
},
|
|
2562
|
+
children: navigationIcon
|
|
2563
|
+
}
|
|
2564
|
+
),
|
|
2565
|
+
/* @__PURE__ */ jsxs(
|
|
2566
|
+
"div",
|
|
2567
|
+
{
|
|
2568
|
+
className: cn(
|
|
2569
|
+
"flex-1 flex flex-col justify-center min-w-0",
|
|
2570
|
+
isCentered ? "items-center" : "items-start",
|
|
2571
|
+
!navigationIcon && !isCentered && "pl-4"
|
|
2446
2572
|
),
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2573
|
+
children: [
|
|
2574
|
+
/* @__PURE__ */ jsx(
|
|
2575
|
+
"span",
|
|
2576
|
+
{
|
|
2577
|
+
className: cn(
|
|
2578
|
+
appBarTypography.titleLarge,
|
|
2579
|
+
"truncate w-full",
|
|
2580
|
+
isCentered && "text-center"
|
|
2581
|
+
),
|
|
2582
|
+
style: { color: (_a = colors == null ? void 0 : colors.titleColor) != null ? _a : APP_BAR_COLORS.title },
|
|
2583
|
+
children: title
|
|
2584
|
+
}
|
|
2585
|
+
),
|
|
2586
|
+
subtitle && /* @__PURE__ */ jsx(
|
|
2587
|
+
"span",
|
|
2588
|
+
{
|
|
2589
|
+
className: cn(
|
|
2590
|
+
appBarTypography.labelMedium,
|
|
2591
|
+
"truncate w-full",
|
|
2592
|
+
isCentered && "text-center"
|
|
2593
|
+
),
|
|
2594
|
+
style: {
|
|
2595
|
+
color: (_b = colors == null ? void 0 : colors.subtitleColor) != null ? _b : APP_BAR_COLORS.subtitle
|
|
2596
|
+
},
|
|
2597
|
+
children: subtitle
|
|
2598
|
+
}
|
|
2599
|
+
)
|
|
2600
|
+
]
|
|
2601
|
+
}
|
|
2602
|
+
),
|
|
2603
|
+
isCentered && !actions && navigationIcon && /* @__PURE__ */ jsx(
|
|
2604
|
+
"div",
|
|
2605
|
+
{
|
|
2606
|
+
"aria-hidden": "true",
|
|
2607
|
+
style: { width: AppBarTokens.iconButtonTouchTarget },
|
|
2608
|
+
className: "shrink-0"
|
|
2609
|
+
}
|
|
2610
|
+
),
|
|
2611
|
+
actions && /* @__PURE__ */ jsx("div", { className: "flex items-center shrink-0", children: actions })
|
|
2612
|
+
] })
|
|
2463
2613
|
]
|
|
2464
2614
|
}
|
|
2465
2615
|
);
|
|
@@ -2473,7 +2623,10 @@ function SmallAppBar({
|
|
|
2473
2623
|
colors,
|
|
2474
2624
|
scrollBehavior = "pinned",
|
|
2475
2625
|
scrollElement,
|
|
2476
|
-
className
|
|
2626
|
+
className,
|
|
2627
|
+
enableFadingBlur,
|
|
2628
|
+
blurIntensity,
|
|
2629
|
+
blurHeight
|
|
2477
2630
|
}) {
|
|
2478
2631
|
var _a, _b;
|
|
2479
2632
|
const shouldReduceMotion = useReducedMotion();
|
|
@@ -2493,14 +2646,17 @@ function SmallAppBar({
|
|
|
2493
2646
|
actions,
|
|
2494
2647
|
colors,
|
|
2495
2648
|
currentBg,
|
|
2496
|
-
cssTransition
|
|
2649
|
+
cssTransition,
|
|
2650
|
+
enableFadingBlur,
|
|
2651
|
+
blurIntensity,
|
|
2652
|
+
blurHeight
|
|
2497
2653
|
};
|
|
2498
2654
|
const barHeight = AppBarTokens.heights.small;
|
|
2499
2655
|
if (scrollBehavior !== "enterAlways") {
|
|
2500
2656
|
return /* @__PURE__ */ jsx(
|
|
2501
2657
|
"div",
|
|
2502
2658
|
{
|
|
2503
|
-
className: cn("fixed top-0 inset-x-0 z-50", className),
|
|
2659
|
+
className: cn("fixed top-0 inset-x-0 z-50 overflow-hidden", className),
|
|
2504
2660
|
style: { height: barHeight },
|
|
2505
2661
|
children: /* @__PURE__ */ jsx(SmallAppBarInner, __spreadValues({}, innerProps))
|
|
2506
2662
|
}
|
|
@@ -2513,7 +2669,10 @@ function SmallAppBar({
|
|
|
2513
2669
|
animate: { y: 0 },
|
|
2514
2670
|
exit: { y: "-100%" },
|
|
2515
2671
|
transition: shouldReduceMotion ? { duration: 0 } : APP_BAR_ENTER_ALWAYS_SPRING,
|
|
2516
|
-
className: cn(
|
|
2672
|
+
className: cn(
|
|
2673
|
+
"fixed top-0 inset-x-0 z-50 overflow-hidden",
|
|
2674
|
+
className
|
|
2675
|
+
),
|
|
2517
2676
|
style: { height: barHeight },
|
|
2518
2677
|
children: /* @__PURE__ */ jsx(SmallAppBarInner, __spreadValues({}, innerProps))
|
|
2519
2678
|
},
|
|
@@ -6315,7 +6474,7 @@ function generateWavyCircularPath(center, radius, amplitude, wavelength) {
|
|
|
6315
6474
|
if (i === 0) d += `M ${xAt(t0).toFixed(2)} ${yAt(t0).toFixed(2)}`;
|
|
6316
6475
|
d += ` C ${cp1x.toFixed(2)} ${cp1y.toFixed(2)}, ${cp2x.toFixed(2)} ${cp2y.toFixed(2)}, ${xAt(t1).toFixed(2)} ${yAt(t1).toFixed(2)}`;
|
|
6317
6476
|
}
|
|
6318
|
-
return d
|
|
6477
|
+
return `${d} Z`;
|
|
6319
6478
|
}
|
|
6320
6479
|
function getSinePath(startX, endX, phase, wl, amp) {
|
|
6321
6480
|
if (startX >= endX) return "";
|
|
@@ -6347,6 +6506,14 @@ function getSinePath(startX, endX, phase, wl, amp) {
|
|
|
6347
6506
|
}
|
|
6348
6507
|
return d;
|
|
6349
6508
|
}
|
|
6509
|
+
var GLOBAL_ROTATION_DURATION = 6e3;
|
|
6510
|
+
var GLOBAL_ROTATION_TARGET = 1080;
|
|
6511
|
+
var ADDITIONAL_ROTATION_CYCLE = 1500;
|
|
6512
|
+
var ADDITIONAL_ROTATION_STEP = 90;
|
|
6513
|
+
var ADDITIONAL_ROTATION_EASE_DURATION = 500;
|
|
6514
|
+
var DEFAULT_MIN_PROGRESS = 0.1;
|
|
6515
|
+
var DEFAULT_MAX_PROGRESS = 0.8;
|
|
6516
|
+
var PROGRESS_CYCLE_DURATION = 1500;
|
|
6350
6517
|
var CircularProgress = React37.forwardRef(
|
|
6351
6518
|
(_a, ref) => {
|
|
6352
6519
|
var _b = _a, {
|
|
@@ -6360,6 +6527,10 @@ var CircularProgress = React37.forwardRef(
|
|
|
6360
6527
|
crawlerSpeed = 1,
|
|
6361
6528
|
color,
|
|
6362
6529
|
trackColor,
|
|
6530
|
+
showTrack = "auto",
|
|
6531
|
+
minProgress = DEFAULT_MIN_PROGRESS,
|
|
6532
|
+
maxProgress = DEFAULT_MAX_PROGRESS,
|
|
6533
|
+
amplitudeRange,
|
|
6363
6534
|
className,
|
|
6364
6535
|
"aria-label": ariaLabel
|
|
6365
6536
|
} = _b, restProps = __objRest(_b, [
|
|
@@ -6373,6 +6544,10 @@ var CircularProgress = React37.forwardRef(
|
|
|
6373
6544
|
"crawlerSpeed",
|
|
6374
6545
|
"color",
|
|
6375
6546
|
"trackColor",
|
|
6547
|
+
"showTrack",
|
|
6548
|
+
"minProgress",
|
|
6549
|
+
"maxProgress",
|
|
6550
|
+
"amplitudeRange",
|
|
6376
6551
|
"className",
|
|
6377
6552
|
"aria-label"
|
|
6378
6553
|
]);
|
|
@@ -6383,6 +6558,7 @@ var CircularProgress = React37.forwardRef(
|
|
|
6383
6558
|
const activeColor = color || "var(--md-sys-color-indicator-active)";
|
|
6384
6559
|
const bgTrackColor = trackColor || "var(--md-sys-color-indicator-track)";
|
|
6385
6560
|
const isWavy = shape === "wavy";
|
|
6561
|
+
const shouldShowIndeterminateTrack = showTrack === "auto" ? isWavy : showTrack;
|
|
6386
6562
|
const BASELINE_SIZE = 48;
|
|
6387
6563
|
const scaleFactor = size / BASELINE_SIZE;
|
|
6388
6564
|
const effectiveAmplitude = React37.useMemo(
|
|
@@ -6393,6 +6569,10 @@ var CircularProgress = React37.forwardRef(
|
|
|
6393
6569
|
() => wavelength != null ? wavelength : 15 * scaleFactor,
|
|
6394
6570
|
[wavelength, scaleFactor]
|
|
6395
6571
|
);
|
|
6572
|
+
const resolvedAmplitudeRange = React37.useMemo(
|
|
6573
|
+
() => amplitudeRange != null ? amplitudeRange : [0, effectiveAmplitude],
|
|
6574
|
+
[amplitudeRange, effectiveAmplitude]
|
|
6575
|
+
);
|
|
6396
6576
|
const wavyActivePath = React37.useMemo(
|
|
6397
6577
|
() => isWavy ? generateWavyCircularPath(
|
|
6398
6578
|
center,
|
|
@@ -6412,6 +6592,145 @@ var CircularProgress = React37.forwardRef(
|
|
|
6412
6592
|
const trackLength = isDeterminate ? Math.max(1e-3, 1 - activeAngularFraction - 2 * gapForTrack) : 1;
|
|
6413
6593
|
const ActiveCircleElem = m.circle;
|
|
6414
6594
|
const ActivePathElem = m.path;
|
|
6595
|
+
const indeterminateSvgRef = React37.useRef(null);
|
|
6596
|
+
const indeterminateTrackRef = React37.useRef(null);
|
|
6597
|
+
const indeterminateActiveRef = React37.useRef(null);
|
|
6598
|
+
const indeterminateWavyTrackPathRef = React37.useRef(null);
|
|
6599
|
+
const indeterminateWavyActivePathRef = React37.useRef(null);
|
|
6600
|
+
const cachedPathLengthRef = React37.useRef(0);
|
|
6601
|
+
React37.useLayoutEffect(() => {
|
|
6602
|
+
if (!isWavy || !wavyActivePath) {
|
|
6603
|
+
cachedPathLengthRef.current = circumference;
|
|
6604
|
+
return;
|
|
6605
|
+
}
|
|
6606
|
+
const el = indeterminateActiveRef.current;
|
|
6607
|
+
if (el && "getTotalLength" in el) {
|
|
6608
|
+
try {
|
|
6609
|
+
const len = el.getTotalLength();
|
|
6610
|
+
if (len > 0) {
|
|
6611
|
+
cachedPathLengthRef.current = len;
|
|
6612
|
+
return;
|
|
6613
|
+
}
|
|
6614
|
+
} catch (e) {
|
|
6615
|
+
}
|
|
6616
|
+
}
|
|
6617
|
+
cachedPathLengthRef.current = circumference;
|
|
6618
|
+
}, [isWavy, circumference, wavyActivePath]);
|
|
6619
|
+
useAnimationFrame((time) => {
|
|
6620
|
+
if (isDeterminate) return;
|
|
6621
|
+
const safeCrawlerSpeed = Math.max(0.1, crawlerSpeed);
|
|
6622
|
+
const scaledTime = time * safeCrawlerSpeed;
|
|
6623
|
+
const globalCycle = scaledTime % GLOBAL_ROTATION_DURATION;
|
|
6624
|
+
const globalAngle = globalCycle / GLOBAL_ROTATION_DURATION * GLOBAL_ROTATION_TARGET;
|
|
6625
|
+
const additionalFullCycles = Math.floor(
|
|
6626
|
+
scaledTime / ADDITIONAL_ROTATION_CYCLE
|
|
6627
|
+
);
|
|
6628
|
+
const additionalCycleTime = scaledTime % ADDITIONAL_ROTATION_CYCLE;
|
|
6629
|
+
const additionalEaseT = Math.min(
|
|
6630
|
+
1,
|
|
6631
|
+
additionalCycleTime / ADDITIONAL_ROTATION_EASE_DURATION
|
|
6632
|
+
);
|
|
6633
|
+
const additionalAngle = (additionalFullCycles + easeInOutCubic(additionalEaseT)) * ADDITIONAL_ROTATION_STEP;
|
|
6634
|
+
const totalRotation = globalAngle + additionalAngle;
|
|
6635
|
+
if (indeterminateSvgRef.current) {
|
|
6636
|
+
indeterminateSvgRef.current.style.transform = `rotate(${totalRotation - 90}deg)`;
|
|
6637
|
+
}
|
|
6638
|
+
const progressFullCycle = PROGRESS_CYCLE_DURATION * 2;
|
|
6639
|
+
const progressCycleTime = scaledTime % progressFullCycle;
|
|
6640
|
+
let progress;
|
|
6641
|
+
if (progressCycleTime < PROGRESS_CYCLE_DURATION) {
|
|
6642
|
+
const t = progressCycleTime / PROGRESS_CYCLE_DURATION;
|
|
6643
|
+
progress = minProgress + (maxProgress - minProgress) * easeInOutCubic(t);
|
|
6644
|
+
} else {
|
|
6645
|
+
const t = (progressCycleTime - PROGRESS_CYCLE_DURATION) / PROGRESS_CYCLE_DURATION;
|
|
6646
|
+
progress = maxProgress - (maxProgress - minProgress) * easeInOutCubic(t);
|
|
6647
|
+
}
|
|
6648
|
+
if (isWavy) {
|
|
6649
|
+
const amplitudeT = (progress - minProgress) / (maxProgress - minProgress);
|
|
6650
|
+
const currentAmplitude = resolvedAmplitudeRange[0] + (resolvedAmplitudeRange[1] - resolvedAmplitudeRange[0]) * amplitudeT;
|
|
6651
|
+
const dynamicPath = generateWavyCircularPath(
|
|
6652
|
+
center,
|
|
6653
|
+
radius,
|
|
6654
|
+
currentAmplitude,
|
|
6655
|
+
effectiveWavelength
|
|
6656
|
+
);
|
|
6657
|
+
if (indeterminateWavyActivePathRef.current) {
|
|
6658
|
+
indeterminateWavyActivePathRef.current.setAttribute("d", dynamicPath);
|
|
6659
|
+
}
|
|
6660
|
+
if (indeterminateWavyTrackPathRef.current) {
|
|
6661
|
+
indeterminateWavyTrackPathRef.current.setAttribute("d", dynamicPath);
|
|
6662
|
+
}
|
|
6663
|
+
const pathEl = indeterminateWavyActivePathRef.current;
|
|
6664
|
+
let totalLen = cachedPathLengthRef.current || circumference;
|
|
6665
|
+
if (pathEl) {
|
|
6666
|
+
try {
|
|
6667
|
+
const len = pathEl.getTotalLength();
|
|
6668
|
+
if (len > 0) totalLen = len;
|
|
6669
|
+
} catch (e) {
|
|
6670
|
+
}
|
|
6671
|
+
}
|
|
6672
|
+
const gapFrac = (gapSize + trackHeight) / totalLen;
|
|
6673
|
+
const activeLen = totalLen * progress;
|
|
6674
|
+
const activeOff = 0;
|
|
6675
|
+
if (indeterminateWavyActivePathRef.current) {
|
|
6676
|
+
indeterminateWavyActivePathRef.current.setAttribute(
|
|
6677
|
+
"stroke-dasharray",
|
|
6678
|
+
`${activeLen} ${totalLen}`
|
|
6679
|
+
);
|
|
6680
|
+
indeterminateWavyActivePathRef.current.setAttribute(
|
|
6681
|
+
"stroke-dashoffset",
|
|
6682
|
+
`${activeOff}`
|
|
6683
|
+
);
|
|
6684
|
+
}
|
|
6685
|
+
if (shouldShowIndeterminateTrack && indeterminateWavyTrackPathRef.current) {
|
|
6686
|
+
const trackStartFrac = progress + gapFrac;
|
|
6687
|
+
const trackLen = Math.max(
|
|
6688
|
+
1e-3,
|
|
6689
|
+
totalLen * (1 - progress - 2 * gapFrac)
|
|
6690
|
+
);
|
|
6691
|
+
const trackOff = -totalLen * trackStartFrac;
|
|
6692
|
+
indeterminateWavyTrackPathRef.current.setAttribute(
|
|
6693
|
+
"stroke-dasharray",
|
|
6694
|
+
`${trackLen} ${totalLen}`
|
|
6695
|
+
);
|
|
6696
|
+
indeterminateWavyTrackPathRef.current.setAttribute(
|
|
6697
|
+
"stroke-dashoffset",
|
|
6698
|
+
`${trackOff}`
|
|
6699
|
+
);
|
|
6700
|
+
}
|
|
6701
|
+
} else {
|
|
6702
|
+
const totalLen = circumference;
|
|
6703
|
+
const activeLen = totalLen * progress;
|
|
6704
|
+
const activeOff = 0;
|
|
6705
|
+
if (indeterminateActiveRef.current) {
|
|
6706
|
+
indeterminateActiveRef.current.setAttribute(
|
|
6707
|
+
"stroke-dasharray",
|
|
6708
|
+
`${activeLen} ${totalLen}`
|
|
6709
|
+
);
|
|
6710
|
+
indeterminateActiveRef.current.setAttribute(
|
|
6711
|
+
"stroke-dashoffset",
|
|
6712
|
+
`${activeOff}`
|
|
6713
|
+
);
|
|
6714
|
+
}
|
|
6715
|
+
if (shouldShowIndeterminateTrack && indeterminateTrackRef.current) {
|
|
6716
|
+
const gapFrac = (gapSize + trackHeight) / totalLen;
|
|
6717
|
+
const trackStartFrac = progress + gapFrac;
|
|
6718
|
+
const trackLen = Math.max(
|
|
6719
|
+
1e-3,
|
|
6720
|
+
totalLen * (1 - progress - 2 * gapFrac)
|
|
6721
|
+
);
|
|
6722
|
+
const trackOff = -totalLen * trackStartFrac;
|
|
6723
|
+
indeterminateTrackRef.current.setAttribute(
|
|
6724
|
+
"stroke-dasharray",
|
|
6725
|
+
`${trackLen} ${totalLen}`
|
|
6726
|
+
);
|
|
6727
|
+
indeterminateTrackRef.current.setAttribute(
|
|
6728
|
+
"stroke-dashoffset",
|
|
6729
|
+
`${trackOff}`
|
|
6730
|
+
);
|
|
6731
|
+
}
|
|
6732
|
+
}
|
|
6733
|
+
});
|
|
6415
6734
|
return /* @__PURE__ */ jsx(
|
|
6416
6735
|
"div",
|
|
6417
6736
|
__spreadProps(__spreadValues({
|
|
@@ -6488,9 +6807,10 @@ var CircularProgress = React37.forwardRef(
|
|
|
6488
6807
|
]
|
|
6489
6808
|
}
|
|
6490
6809
|
),
|
|
6491
|
-
!isDeterminate && /* @__PURE__ */
|
|
6492
|
-
|
|
6810
|
+
!isDeterminate && /* @__PURE__ */ jsx(
|
|
6811
|
+
"svg",
|
|
6493
6812
|
{
|
|
6813
|
+
ref: indeterminateSvgRef,
|
|
6494
6814
|
width: size,
|
|
6495
6815
|
height: size,
|
|
6496
6816
|
viewBox: `0 0 ${size} ${size}`,
|
|
@@ -6499,84 +6819,60 @@ var CircularProgress = React37.forwardRef(
|
|
|
6499
6819
|
position: "absolute",
|
|
6500
6820
|
inset: 0,
|
|
6501
6821
|
overflow: "visible",
|
|
6502
|
-
transformOrigin: "center"
|
|
6503
|
-
|
|
6504
|
-
animate: { rotate: [0, 360] },
|
|
6505
|
-
transition: {
|
|
6506
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6507
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6508
|
-
ease: "linear"
|
|
6822
|
+
transformOrigin: "center",
|
|
6823
|
+
transform: "rotate(-90deg)"
|
|
6509
6824
|
},
|
|
6510
|
-
children: [
|
|
6511
|
-
/* @__PURE__ */ jsx(
|
|
6512
|
-
|
|
6825
|
+
children: isWavy ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6826
|
+
shouldShowIndeterminateTrack && /* @__PURE__ */ jsx(
|
|
6827
|
+
"path",
|
|
6513
6828
|
{
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
r: radius,
|
|
6829
|
+
ref: indeterminateWavyTrackPathRef,
|
|
6830
|
+
d: wavyActivePath != null ? wavyActivePath : "",
|
|
6517
6831
|
fill: "none",
|
|
6518
6832
|
stroke: bgTrackColor,
|
|
6519
6833
|
strokeWidth: trackHeight,
|
|
6520
|
-
strokeLinecap: "round"
|
|
6521
|
-
animate: {
|
|
6522
|
-
pathLength: [
|
|
6523
|
-
Math.max(1e-3, 0.9 - 2 * gapForTrack),
|
|
6524
|
-
Math.max(1e-3, 0.25 - 2 * gapForTrack),
|
|
6525
|
-
Math.max(1e-3, 0.9 - 2 * gapForTrack)
|
|
6526
|
-
],
|
|
6527
|
-
pathOffset: [
|
|
6528
|
-
0.1 + gapForTrack,
|
|
6529
|
-
0.75 + gapForTrack,
|
|
6530
|
-
0.1 + gapForTrack
|
|
6531
|
-
]
|
|
6532
|
-
},
|
|
6533
|
-
transition: {
|
|
6534
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6535
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6536
|
-
ease: [0.4, 0, 0.2, 1]
|
|
6537
|
-
}
|
|
6834
|
+
strokeLinecap: "round"
|
|
6538
6835
|
}
|
|
6539
6836
|
),
|
|
6540
|
-
|
|
6541
|
-
|
|
6837
|
+
/* @__PURE__ */ jsx(
|
|
6838
|
+
"path",
|
|
6542
6839
|
{
|
|
6840
|
+
ref: indeterminateWavyActivePathRef,
|
|
6543
6841
|
d: wavyActivePath != null ? wavyActivePath : "",
|
|
6544
6842
|
fill: "none",
|
|
6545
6843
|
stroke: activeColor,
|
|
6546
6844
|
strokeWidth: trackHeight,
|
|
6547
|
-
strokeLinecap: "round"
|
|
6548
|
-
animate: {
|
|
6549
|
-
pathLength: [0.1, 0.75, 0.1],
|
|
6550
|
-
pathOffset: [0, 0.65, 1]
|
|
6551
|
-
},
|
|
6552
|
-
transition: {
|
|
6553
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6554
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6555
|
-
ease: [0.4, 0, 0.2, 1]
|
|
6556
|
-
}
|
|
6845
|
+
strokeLinecap: "round"
|
|
6557
6846
|
}
|
|
6558
|
-
)
|
|
6559
|
-
|
|
6847
|
+
)
|
|
6848
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6849
|
+
shouldShowIndeterminateTrack && /* @__PURE__ */ jsx(
|
|
6850
|
+
"circle",
|
|
6560
6851
|
{
|
|
6852
|
+
ref: indeterminateTrackRef,
|
|
6853
|
+
cx: center,
|
|
6854
|
+
cy: center,
|
|
6855
|
+
r: radius,
|
|
6856
|
+
fill: "none",
|
|
6857
|
+
stroke: bgTrackColor,
|
|
6858
|
+
strokeWidth: trackHeight,
|
|
6859
|
+
strokeLinecap: "round"
|
|
6860
|
+
}
|
|
6861
|
+
),
|
|
6862
|
+
/* @__PURE__ */ jsx(
|
|
6863
|
+
"circle",
|
|
6864
|
+
{
|
|
6865
|
+
ref: indeterminateActiveRef,
|
|
6561
6866
|
cx: center,
|
|
6562
6867
|
cy: center,
|
|
6563
6868
|
r: radius,
|
|
6564
6869
|
fill: "none",
|
|
6565
6870
|
stroke: activeColor,
|
|
6566
6871
|
strokeWidth: trackHeight,
|
|
6567
|
-
strokeLinecap: "round"
|
|
6568
|
-
animate: {
|
|
6569
|
-
pathLength: [0.1, 0.75, 0.1],
|
|
6570
|
-
pathOffset: [0, 0.65, 1]
|
|
6571
|
-
},
|
|
6572
|
-
transition: {
|
|
6573
|
-
duration: 2 / Math.max(0.1, crawlerSpeed),
|
|
6574
|
-
repeat: Number.POSITIVE_INFINITY,
|
|
6575
|
-
ease: [0.4, 0, 0.2, 1]
|
|
6576
|
-
}
|
|
6872
|
+
strokeLinecap: "round"
|
|
6577
6873
|
}
|
|
6578
6874
|
)
|
|
6579
|
-
]
|
|
6875
|
+
] })
|
|
6580
6876
|
}
|
|
6581
6877
|
)
|
|
6582
6878
|
] })
|
|
@@ -6782,7 +7078,7 @@ var WavyLinearTrack = React37.memo(function WavyLinearTrack2({
|
|
|
6782
7078
|
currentAmp
|
|
6783
7079
|
);
|
|
6784
7080
|
} else if (fraction === 0) {
|
|
6785
|
-
activePathD =
|
|
7081
|
+
activePathD = "";
|
|
6786
7082
|
}
|
|
6787
7083
|
const trackStart = adjHead + totalGap;
|
|
6788
7084
|
if (trackStart < width - capWidth) {
|
|
@@ -6814,20 +7110,20 @@ var WavyLinearTrack = React37.memo(function WavyLinearTrack2({
|
|
|
6814
7110
|
activeLines.push({ tail: l1T, head: l1H });
|
|
6815
7111
|
activeLines.push({ tail: l2T, head: l2H });
|
|
6816
7112
|
}
|
|
6817
|
-
const
|
|
6818
|
-
const
|
|
6819
|
-
const
|
|
7113
|
+
const activeSegments = activeLines.map((line) => {
|
|
7114
|
+
const rawTail = line.tail * width;
|
|
7115
|
+
const rawHead = line.head * width;
|
|
6820
7116
|
const adjTail = Math.max(
|
|
6821
7117
|
capWidth,
|
|
6822
|
-
Math.min(width - capWidth,
|
|
7118
|
+
Math.min(width - capWidth, rawTail)
|
|
6823
7119
|
);
|
|
6824
7120
|
const adjHead = Math.max(
|
|
6825
7121
|
capWidth,
|
|
6826
|
-
Math.min(width - capWidth,
|
|
7122
|
+
Math.min(width - capWidth, rawHead)
|
|
6827
7123
|
);
|
|
6828
7124
|
return { adjTail, adjHead };
|
|
6829
7125
|
}).filter((seg) => seg.adjHead - seg.adjTail > 0.1);
|
|
6830
|
-
activePathD =
|
|
7126
|
+
activePathD = activeSegments.map(
|
|
6831
7127
|
(seg) => getSinePath(
|
|
6832
7128
|
seg.adjTail,
|
|
6833
7129
|
seg.adjHead,
|
|
@@ -6836,13 +7132,24 @@ var WavyLinearTrack = React37.memo(function WavyLinearTrack2({
|
|
|
6836
7132
|
currentAmp
|
|
6837
7133
|
)
|
|
6838
7134
|
).join(" ");
|
|
7135
|
+
const validActiveLines = activeLines.filter(
|
|
7136
|
+
(line) => line.head > line.tail && line.head * width > 0 && line.tail * width < width
|
|
7137
|
+
).sort((a, b) => a.tail - b.tail);
|
|
6839
7138
|
let currentTrackX = capWidth;
|
|
6840
|
-
for (const
|
|
6841
|
-
const
|
|
7139
|
+
for (const line of validActiveLines) {
|
|
7140
|
+
const blockStart = line.tail * width - totalGap;
|
|
7141
|
+
const blockEnd = line.head * width + totalGap;
|
|
7142
|
+
const trackEnd = Math.min(width - capWidth, blockStart);
|
|
6842
7143
|
if (trackEnd > currentTrackX) {
|
|
6843
|
-
trackD += `${getSinePath(
|
|
7144
|
+
trackD += `${getSinePath(
|
|
7145
|
+
currentTrackX,
|
|
7146
|
+
trackEnd,
|
|
7147
|
+
phase,
|
|
7148
|
+
activeWavelength,
|
|
7149
|
+
trackAmp
|
|
7150
|
+
)} `;
|
|
6844
7151
|
}
|
|
6845
|
-
currentTrackX = Math.max(currentTrackX,
|
|
7152
|
+
currentTrackX = Math.max(currentTrackX, blockEnd);
|
|
6846
7153
|
}
|
|
6847
7154
|
if (currentTrackX < width - capWidth) {
|
|
6848
7155
|
trackD += getSinePath(
|
|
@@ -6855,9 +7162,9 @@ var WavyLinearTrack = React37.memo(function WavyLinearTrack2({
|
|
|
6855
7162
|
}
|
|
6856
7163
|
}
|
|
6857
7164
|
if (activePathRef.current)
|
|
6858
|
-
activePathRef.current.setAttribute("d", activePathD);
|
|
7165
|
+
activePathRef.current.setAttribute("d", activePathD || "");
|
|
6859
7166
|
if (trackPathRef.current)
|
|
6860
|
-
trackPathRef.current.setAttribute("d", trackD.trim());
|
|
7167
|
+
trackPathRef.current.setAttribute("d", trackD.trim() || "");
|
|
6861
7168
|
});
|
|
6862
7169
|
return /* @__PURE__ */ jsx(
|
|
6863
7170
|
"div",
|
|
@@ -7180,7 +7487,7 @@ var IconButtonComponent = React37.forwardRef(
|
|
|
7180
7487
|
variant = "default",
|
|
7181
7488
|
colorStyle = "standard",
|
|
7182
7489
|
size = "sm",
|
|
7183
|
-
|
|
7490
|
+
width = "default",
|
|
7184
7491
|
shape = "round",
|
|
7185
7492
|
selected,
|
|
7186
7493
|
selectedIcon,
|
|
@@ -7198,7 +7505,7 @@ var IconButtonComponent = React37.forwardRef(
|
|
|
7198
7505
|
"variant",
|
|
7199
7506
|
"colorStyle",
|
|
7200
7507
|
"size",
|
|
7201
|
-
"
|
|
7508
|
+
"width",
|
|
7202
7509
|
"shape",
|
|
7203
7510
|
"selected",
|
|
7204
7511
|
"selectedIcon",
|
|
@@ -7243,7 +7550,7 @@ var IconButtonComponent = React37.forwardRef(
|
|
|
7243
7550
|
const iconPx = iconSize != null ? iconSize : defaultIconPx;
|
|
7244
7551
|
const isCustomSize = iconSize != null && iconSize !== "inherit";
|
|
7245
7552
|
const heightClass = (_c = SIZE_HEIGHT_STYLES[size]) != null ? _c : SIZE_HEIGHT_STYLES.sm;
|
|
7246
|
-
const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[
|
|
7553
|
+
const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[width]) != null ? _e : WIDTH_SIZE_STYLES.sm.default;
|
|
7247
7554
|
const needsTouchTarget = size === "xs" || size === "sm";
|
|
7248
7555
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
7249
7556
|
disabled: loading
|
|
@@ -7866,9 +8173,9 @@ function BadgedBox({
|
|
|
7866
8173
|
badge,
|
|
7867
8174
|
children,
|
|
7868
8175
|
className,
|
|
7869
|
-
|
|
8176
|
+
size
|
|
7870
8177
|
}) {
|
|
7871
|
-
const isLarge =
|
|
8178
|
+
const isLarge = size ? size === "lg" : detectBadgeHasContent(badge);
|
|
7872
8179
|
const badgePositionClass = isLarge ? "translate-x-[35%] -translate-y-[35%]" : "translate-x-[50%] -translate-y-[50%]";
|
|
7873
8180
|
return /* @__PURE__ */ jsxs("span", { className: cn("relative inline-flex", className), children: [
|
|
7874
8181
|
children,
|
|
@@ -8879,7 +9186,7 @@ var FloatingToolbarWithFabBase = React37.forwardRef(
|
|
|
8879
9186
|
fabPosition = orientation === "horizontal" ? "end" : "bottom",
|
|
8880
9187
|
animationDuration = 0.3,
|
|
8881
9188
|
scrollBehavior,
|
|
8882
|
-
fabSize = "
|
|
9189
|
+
fabSize = "sm",
|
|
8883
9190
|
className,
|
|
8884
9191
|
style
|
|
8885
9192
|
} = _b, props = __objRest(_b, [
|
|
@@ -8899,7 +9206,7 @@ var FloatingToolbarWithFabBase = React37.forwardRef(
|
|
|
8899
9206
|
const isHorizontal = orientation === "horizontal";
|
|
8900
9207
|
const effectiveExpanded = expanded && (!scrollBehavior || scrollBehavior.isExpanded);
|
|
8901
9208
|
const isFabBefore = fabPosition === "start" || fabPosition === "top";
|
|
8902
|
-
const resolvedFabSize = fabSize === "
|
|
9209
|
+
const resolvedFabSize = fabSize === "md" ? FabBaselineTokens.MediumContainerHeight : FabBaselineTokens.ContainerHeight;
|
|
8903
9210
|
const transitionSpec = __spreadProps(__spreadValues({}, SPRING_TRANSITION), {
|
|
8904
9211
|
duration: animationDuration
|
|
8905
9212
|
});
|
|
@@ -9038,7 +9345,7 @@ var ToolbarIconButton = React37.forwardRef(
|
|
|
9038
9345
|
(_a, ref) => {
|
|
9039
9346
|
var _b = _a, {
|
|
9040
9347
|
emphasis = "standard",
|
|
9041
|
-
|
|
9348
|
+
width = "default",
|
|
9042
9349
|
selected,
|
|
9043
9350
|
asChild,
|
|
9044
9351
|
className,
|
|
@@ -9046,7 +9353,7 @@ var ToolbarIconButton = React37.forwardRef(
|
|
|
9046
9353
|
whileTap
|
|
9047
9354
|
} = _b, props = __objRest(_b, [
|
|
9048
9355
|
"emphasis",
|
|
9049
|
-
"
|
|
9356
|
+
"width",
|
|
9050
9357
|
"selected",
|
|
9051
9358
|
"asChild",
|
|
9052
9359
|
"className",
|
|
@@ -9054,7 +9361,7 @@ var ToolbarIconButton = React37.forwardRef(
|
|
|
9054
9361
|
"whileTap"
|
|
9055
9362
|
]);
|
|
9056
9363
|
const context = useToolbarContext();
|
|
9057
|
-
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[
|
|
9364
|
+
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[width];
|
|
9058
9365
|
const colorStyle = VARIANT_TO_COLOR_STYLE[emphasis];
|
|
9059
9366
|
const iconButtonProps = selected !== void 0 ? {
|
|
9060
9367
|
variant: "toggle",
|
|
@@ -9389,6 +9696,6 @@ var ToolbarToggleButton = React37.forwardRef(
|
|
|
9389
9696
|
);
|
|
9390
9697
|
ToolbarToggleButton.displayName = "ToolbarToggleButton";
|
|
9391
9698
|
|
|
9392
|
-
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, BottomAppBar, BottomDockedToolbar, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, ContextMenuTrigger, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, LargeFlexibleAppBar, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, NavigationBar, NavigationBarComponent, NavigationBarItem, NavigationRail, NavigationRailItem, SEARCH_BAR_EXIT_SPRING, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, SmallAppBar, SubMenu, Tab, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, ToolbarDivider, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonTokens, ToolbarToggleButton, ToolbarToggleButtonTokens, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, appBarTypography, getNavigationShapeStyle, getToolbarColors, isSquareShape, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|
|
9699
|
+
export { APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, BottomAppBar, BottomDockedToolbar, CHECK_ICON_VARIANTS, ContextMenu, ContextMenuContent, ContextMenuTrigger, DIVIDER_COLOR, DIVIDER_PADDING, DockedToolbar, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FadingBlurMask, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, LargeFlexibleAppBar, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, NavigationBar, NavigationBarComponent, NavigationBarItem, NavigationRail, NavigationRailItem, SEARCH_BAR_EXIT_SPRING, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, SmallAppBar, SubMenu, Tab, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, ToolbarDivider, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonTokens, ToolbarToggleButton, ToolbarToggleButtonTokens, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, appBarTypography, getNavigationShapeStyle, getToolbarColors, isSquareShape, standardFloatingToolbarColors, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, useAppBarScroll, useFloatingToolbarScrollBehavior, useMenuContext, useSearch, useSearchKeyboard, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|
|
9393
9700
|
//# sourceMappingURL=navigation.mjs.map
|
|
9394
9701
|
//# sourceMappingURL=navigation.mjs.map
|