@bug-on/m3-expressive 1.2.7 → 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 +6 -0
- package/dist/buttons.d.mts +3 -3
- package/dist/buttons.d.ts +3 -3
- package/dist/buttons.js +10 -10
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +10 -10
- 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 +3 -3
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +3 -3
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.d.mts +8 -6
- package/dist/feedback.d.ts +8 -6
- package/dist/feedback.js +5 -5
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +5 -5
- 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 +291 -163
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +291 -164
- 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 +1 -33
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +1 -33
- 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 +287 -127
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +288 -129
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +3 -3
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +3 -3
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +3 -3
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +3 -3
- 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, useAnimationFrame, useMotionValue, animate, 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
|
},
|
|
@@ -7328,7 +7487,7 @@ var IconButtonComponent = React37.forwardRef(
|
|
|
7328
7487
|
variant = "default",
|
|
7329
7488
|
colorStyle = "standard",
|
|
7330
7489
|
size = "sm",
|
|
7331
|
-
|
|
7490
|
+
width = "default",
|
|
7332
7491
|
shape = "round",
|
|
7333
7492
|
selected,
|
|
7334
7493
|
selectedIcon,
|
|
@@ -7346,7 +7505,7 @@ var IconButtonComponent = React37.forwardRef(
|
|
|
7346
7505
|
"variant",
|
|
7347
7506
|
"colorStyle",
|
|
7348
7507
|
"size",
|
|
7349
|
-
"
|
|
7508
|
+
"width",
|
|
7350
7509
|
"shape",
|
|
7351
7510
|
"selected",
|
|
7352
7511
|
"selectedIcon",
|
|
@@ -7391,7 +7550,7 @@ var IconButtonComponent = React37.forwardRef(
|
|
|
7391
7550
|
const iconPx = iconSize != null ? iconSize : defaultIconPx;
|
|
7392
7551
|
const isCustomSize = iconSize != null && iconSize !== "inherit";
|
|
7393
7552
|
const heightClass = (_c = SIZE_HEIGHT_STYLES[size]) != null ? _c : SIZE_HEIGHT_STYLES.sm;
|
|
7394
|
-
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;
|
|
7395
7554
|
const needsTouchTarget = size === "xs" || size === "sm";
|
|
7396
7555
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
7397
7556
|
disabled: loading
|
|
@@ -8014,9 +8173,9 @@ function BadgedBox({
|
|
|
8014
8173
|
badge,
|
|
8015
8174
|
children,
|
|
8016
8175
|
className,
|
|
8017
|
-
|
|
8176
|
+
size
|
|
8018
8177
|
}) {
|
|
8019
|
-
const isLarge =
|
|
8178
|
+
const isLarge = size ? size === "lg" : detectBadgeHasContent(badge);
|
|
8020
8179
|
const badgePositionClass = isLarge ? "translate-x-[35%] -translate-y-[35%]" : "translate-x-[50%] -translate-y-[50%]";
|
|
8021
8180
|
return /* @__PURE__ */ jsxs("span", { className: cn("relative inline-flex", className), children: [
|
|
8022
8181
|
children,
|
|
@@ -9027,7 +9186,7 @@ var FloatingToolbarWithFabBase = React37.forwardRef(
|
|
|
9027
9186
|
fabPosition = orientation === "horizontal" ? "end" : "bottom",
|
|
9028
9187
|
animationDuration = 0.3,
|
|
9029
9188
|
scrollBehavior,
|
|
9030
|
-
fabSize = "
|
|
9189
|
+
fabSize = "sm",
|
|
9031
9190
|
className,
|
|
9032
9191
|
style
|
|
9033
9192
|
} = _b, props = __objRest(_b, [
|
|
@@ -9047,7 +9206,7 @@ var FloatingToolbarWithFabBase = React37.forwardRef(
|
|
|
9047
9206
|
const isHorizontal = orientation === "horizontal";
|
|
9048
9207
|
const effectiveExpanded = expanded && (!scrollBehavior || scrollBehavior.isExpanded);
|
|
9049
9208
|
const isFabBefore = fabPosition === "start" || fabPosition === "top";
|
|
9050
|
-
const resolvedFabSize = fabSize === "
|
|
9209
|
+
const resolvedFabSize = fabSize === "md" ? FabBaselineTokens.MediumContainerHeight : FabBaselineTokens.ContainerHeight;
|
|
9051
9210
|
const transitionSpec = __spreadProps(__spreadValues({}, SPRING_TRANSITION), {
|
|
9052
9211
|
duration: animationDuration
|
|
9053
9212
|
});
|
|
@@ -9186,7 +9345,7 @@ var ToolbarIconButton = React37.forwardRef(
|
|
|
9186
9345
|
(_a, ref) => {
|
|
9187
9346
|
var _b = _a, {
|
|
9188
9347
|
emphasis = "standard",
|
|
9189
|
-
|
|
9348
|
+
width = "default",
|
|
9190
9349
|
selected,
|
|
9191
9350
|
asChild,
|
|
9192
9351
|
className,
|
|
@@ -9194,7 +9353,7 @@ var ToolbarIconButton = React37.forwardRef(
|
|
|
9194
9353
|
whileTap
|
|
9195
9354
|
} = _b, props = __objRest(_b, [
|
|
9196
9355
|
"emphasis",
|
|
9197
|
-
"
|
|
9356
|
+
"width",
|
|
9198
9357
|
"selected",
|
|
9199
9358
|
"asChild",
|
|
9200
9359
|
"className",
|
|
@@ -9202,7 +9361,7 @@ var ToolbarIconButton = React37.forwardRef(
|
|
|
9202
9361
|
"whileTap"
|
|
9203
9362
|
]);
|
|
9204
9363
|
const context = useToolbarContext();
|
|
9205
|
-
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[
|
|
9364
|
+
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[width];
|
|
9206
9365
|
const colorStyle = VARIANT_TO_COLOR_STYLE[emphasis];
|
|
9207
9366
|
const iconButtonProps = selected !== void 0 ? {
|
|
9208
9367
|
variant: "toggle",
|
|
@@ -9537,6 +9696,6 @@ var ToolbarToggleButton = React37.forwardRef(
|
|
|
9537
9696
|
);
|
|
9538
9697
|
ToolbarToggleButton.displayName = "ToolbarToggleButton";
|
|
9539
9698
|
|
|
9540
|
-
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 };
|
|
9541
9700
|
//# sourceMappingURL=navigation.mjs.map
|
|
9542
9701
|
//# sourceMappingURL=navigation.mjs.map
|