@bug-on/m3-expressive 1.1.0 → 1.2.1
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 +18 -0
- package/dist/buttons.d.mts +3 -3
- package/dist/buttons.d.ts +3 -3
- package/dist/buttons.js +708 -606
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +707 -605
- package/dist/buttons.mjs.map +1 -1
- package/dist/core-Bc5Wj_pc.d.ts +497 -0
- package/dist/core-D4048_K5.d.mts +497 -0
- package/dist/core.d.mts +6 -422
- package/dist/core.d.ts +6 -422
- package/dist/core.js +223 -129
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +224 -130
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.js +85 -61
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +85 -61
- package/dist/feedback.mjs.map +1 -1
- package/dist/forms.d.mts +2 -2
- package/dist/forms.d.ts +2 -2
- package/dist/forms.js +70 -8
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +70 -8
- package/dist/forms.mjs.map +1 -1
- package/dist/{icon-button-D-gs0gfj.d.mts → icon-button-sSt6PPLg.d.mts} +6 -0
- package/dist/{icon-button-D-gs0gfj.d.ts → icon-button-sSt6PPLg.d.ts} +6 -0
- package/dist/index.css +6 -1
- package/dist/index.d.mts +68 -6
- package/dist/index.d.ts +68 -6
- package/dist/index.js +1177 -580
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1172 -583
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +18 -1
- package/dist/layout.d.ts +18 -1
- package/dist/layout.js +94 -8
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +94 -8
- package/dist/layout.mjs.map +1 -1
- package/dist/{md3-DFhj-NZj.d.mts → md3-Dty-Qcad.d.mts} +7 -1
- package/dist/{md3-DFhj-NZj.d.ts → md3-Dty-Qcad.d.ts} +7 -1
- package/dist/navigation.d.mts +134 -9
- package/dist/navigation.d.ts +134 -9
- package/dist/navigation.js +403 -93
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +397 -94
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +214 -189
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +176 -151
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +222 -197
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +189 -164
- package/dist/pickers.mjs.map +1 -1
- package/dist/{split-button-trailing-uncheckable-BRPuTqi1.d.mts → split-button-trailing-uncheckable-BcPD_7uK.d.ts} +73 -7
- package/dist/{split-button-trailing-uncheckable-CjOFCoyW.d.ts → split-button-trailing-uncheckable-DtFJkTFr.d.mts} +73 -7
- package/dist/{text-field-eAIpz9z1.d.mts → text-field-T4Rg-9Bw.d.mts} +7 -0
- package/dist/{text-field-eAIpz9z1.d.ts → text-field-T4Rg-9Bw.d.ts} +7 -0
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import * as React59 from 'react';
|
|
3
3
|
import { createContext, forwardRef, useState, useRef, useCallback, useMemo, useEffect, useLayoutEffect, useReducer, useContext, useId, cloneElement, createElement } from 'react';
|
|
4
|
+
import { hexFromArgb, Hct, SchemeExpressive, SchemeNeutral, SchemeMonochrome, SchemeContent, SchemeFidelity, SchemeVibrant, SchemeTonalSpot } from '@material/material-color-utilities';
|
|
4
5
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
-
import { argbFromHex, themeFromSourceColor, hexFromArgb } from '@material/material-color-utilities';
|
|
6
6
|
import { clsx } from 'clsx';
|
|
7
7
|
import { twMerge } from 'tailwind-merge';
|
|
8
8
|
import * as RxContextMenu from '@radix-ui/react-context-menu';
|
|
@@ -118,6 +118,143 @@ function useRipple(options = {}) {
|
|
|
118
118
|
);
|
|
119
119
|
return { rippleRef: ref, onPointerDown };
|
|
120
120
|
}
|
|
121
|
+
function resolveMode(mode) {
|
|
122
|
+
if (mode !== "system") return mode;
|
|
123
|
+
if (typeof window === "undefined") return "light";
|
|
124
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
125
|
+
}
|
|
126
|
+
function createDynamicScheme(sourceColorHex, isDark, variant = "expressive", contrastLevel = 0) {
|
|
127
|
+
const hct = Hct.fromInt(argbFromHex(sourceColorHex));
|
|
128
|
+
const spec = "2025";
|
|
129
|
+
switch (variant) {
|
|
130
|
+
case "tonal_spot":
|
|
131
|
+
return new SchemeTonalSpot(hct, isDark, contrastLevel, spec);
|
|
132
|
+
case "vibrant":
|
|
133
|
+
return new SchemeVibrant(hct, isDark, contrastLevel, spec);
|
|
134
|
+
case "fidelity":
|
|
135
|
+
return new SchemeFidelity(hct, isDark, contrastLevel, spec);
|
|
136
|
+
case "content":
|
|
137
|
+
return new SchemeContent(hct, isDark, contrastLevel, spec);
|
|
138
|
+
case "monochrome":
|
|
139
|
+
return new SchemeMonochrome(hct, isDark, contrastLevel, spec);
|
|
140
|
+
case "neutral":
|
|
141
|
+
return new SchemeNeutral(hct, isDark, contrastLevel, spec);
|
|
142
|
+
default:
|
|
143
|
+
return new SchemeExpressive(hct, isDark, contrastLevel, spec);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
function argbFromHex(hex) {
|
|
147
|
+
const sanitized = hex.replace(/^#/, "");
|
|
148
|
+
const r = Number.parseInt(sanitized.substring(0, 2), 16);
|
|
149
|
+
const g = Number.parseInt(sanitized.substring(2, 4), 16);
|
|
150
|
+
const b = Number.parseInt(sanitized.substring(4, 6), 16);
|
|
151
|
+
return (4278190080 | r << 16 | g << 8 | b) >>> 0;
|
|
152
|
+
}
|
|
153
|
+
function generateM3Theme(sourceColorHex, mode = "light", options = {}) {
|
|
154
|
+
const { variant = "expressive", contrastLevel = 0 } = options;
|
|
155
|
+
const isDark = mode === "dark";
|
|
156
|
+
const scheme = createDynamicScheme(
|
|
157
|
+
sourceColorHex,
|
|
158
|
+
isDark,
|
|
159
|
+
variant,
|
|
160
|
+
contrastLevel
|
|
161
|
+
);
|
|
162
|
+
const hex = (argb) => hexFromArgb(argb);
|
|
163
|
+
return {
|
|
164
|
+
// Primary
|
|
165
|
+
primary: hex(scheme.primary),
|
|
166
|
+
onPrimary: hex(scheme.onPrimary),
|
|
167
|
+
primaryContainer: hex(scheme.primaryContainer),
|
|
168
|
+
onPrimaryContainer: hex(scheme.onPrimaryContainer),
|
|
169
|
+
inversePrimary: hex(scheme.inversePrimary),
|
|
170
|
+
primaryFixed: hex(scheme.primaryFixed),
|
|
171
|
+
primaryFixedDim: hex(scheme.primaryFixedDim),
|
|
172
|
+
onPrimaryFixed: hex(scheme.onPrimaryFixed),
|
|
173
|
+
onPrimaryFixedVariant: hex(scheme.onPrimaryFixedVariant),
|
|
174
|
+
primaryDim: hex(scheme.primaryDim),
|
|
175
|
+
// Secondary
|
|
176
|
+
secondary: hex(scheme.secondary),
|
|
177
|
+
onSecondary: hex(scheme.onSecondary),
|
|
178
|
+
secondaryContainer: hex(scheme.secondaryContainer),
|
|
179
|
+
onSecondaryContainer: hex(scheme.onSecondaryContainer),
|
|
180
|
+
secondaryFixed: hex(scheme.secondaryFixed),
|
|
181
|
+
secondaryFixedDim: hex(scheme.secondaryFixedDim),
|
|
182
|
+
onSecondaryFixed: hex(scheme.onSecondaryFixed),
|
|
183
|
+
onSecondaryFixedVariant: hex(scheme.onSecondaryFixedVariant),
|
|
184
|
+
secondaryDim: hex(scheme.secondaryDim),
|
|
185
|
+
// Tertiary
|
|
186
|
+
tertiary: hex(scheme.tertiary),
|
|
187
|
+
onTertiary: hex(scheme.onTertiary),
|
|
188
|
+
tertiaryContainer: hex(scheme.tertiaryContainer),
|
|
189
|
+
onTertiaryContainer: hex(scheme.onTertiaryContainer),
|
|
190
|
+
tertiaryFixed: hex(scheme.tertiaryFixed),
|
|
191
|
+
tertiaryFixedDim: hex(scheme.tertiaryFixedDim),
|
|
192
|
+
onTertiaryFixed: hex(scheme.onTertiaryFixed),
|
|
193
|
+
onTertiaryFixedVariant: hex(scheme.onTertiaryFixedVariant),
|
|
194
|
+
tertiaryDim: hex(scheme.tertiaryDim),
|
|
195
|
+
// Error
|
|
196
|
+
error: hex(scheme.error),
|
|
197
|
+
onError: hex(scheme.onError),
|
|
198
|
+
errorContainer: hex(scheme.errorContainer),
|
|
199
|
+
onErrorContainer: hex(scheme.onErrorContainer),
|
|
200
|
+
// Surface
|
|
201
|
+
surface: hex(scheme.surface),
|
|
202
|
+
onSurface: hex(scheme.onSurface),
|
|
203
|
+
surfaceVariant: hex(scheme.surfaceVariant),
|
|
204
|
+
onSurfaceVariant: hex(scheme.onSurfaceVariant),
|
|
205
|
+
surfaceTint: hex(scheme.surfaceTint),
|
|
206
|
+
surfaceDim: hex(scheme.surfaceDim),
|
|
207
|
+
surfaceBright: hex(scheme.surfaceBright),
|
|
208
|
+
surfaceContainerLowest: hex(scheme.surfaceContainerLowest),
|
|
209
|
+
surfaceContainerLow: hex(scheme.surfaceContainerLow),
|
|
210
|
+
surfaceContainer: hex(scheme.surfaceContainer),
|
|
211
|
+
surfaceContainerHigh: hex(scheme.surfaceContainerHigh),
|
|
212
|
+
surfaceContainerHighest: hex(scheme.surfaceContainerHighest),
|
|
213
|
+
// Inverse
|
|
214
|
+
inverseSurface: hex(scheme.inverseSurface),
|
|
215
|
+
inverseOnSurface: hex(scheme.inverseOnSurface),
|
|
216
|
+
// Background
|
|
217
|
+
background: hex(scheme.background),
|
|
218
|
+
onBackground: hex(scheme.onBackground),
|
|
219
|
+
// Outline
|
|
220
|
+
outline: hex(scheme.outline),
|
|
221
|
+
outlineVariant: hex(scheme.outlineVariant),
|
|
222
|
+
// Utility
|
|
223
|
+
shadow: hex(scheme.shadow),
|
|
224
|
+
scrim: hex(scheme.scrim)
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function applyTheme(sourceColorHex, mode = "light", root = document.documentElement, options = {}) {
|
|
228
|
+
const resolved = resolveMode(mode);
|
|
229
|
+
const colors = generateM3Theme(sourceColorHex, resolved, options);
|
|
230
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
231
|
+
const kebabKey = key.replace(/[A-Z]/g, (m68) => `-${m68.toLowerCase()}`);
|
|
232
|
+
root.style.setProperty(`--md-sys-color-${kebabKey}`, value);
|
|
233
|
+
root.style.setProperty(`--color-m3-${kebabKey}`, value);
|
|
234
|
+
}
|
|
235
|
+
root.setAttribute("data-theme", resolved);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/lib/create-theme.ts
|
|
239
|
+
function createMd3ExpressiveTheme(options) {
|
|
240
|
+
const { seedColor, isDark = false, variant, contrastLevel } = options;
|
|
241
|
+
const themeOptions = { variant, contrastLevel };
|
|
242
|
+
const colorScheme = generateM3Theme(
|
|
243
|
+
seedColor,
|
|
244
|
+
isDark ? "dark" : "light",
|
|
245
|
+
themeOptions
|
|
246
|
+
);
|
|
247
|
+
const cssVariables = schemeToCssVariables(colorScheme);
|
|
248
|
+
return { cssVariables, colorScheme };
|
|
249
|
+
}
|
|
250
|
+
function schemeToCssVariables(scheme) {
|
|
251
|
+
const result = {};
|
|
252
|
+
for (const [key, value] of Object.entries(scheme)) {
|
|
253
|
+
const kebabKey = key.replace(/[A-Z]/g, (m68) => `-${m68.toLowerCase()}`);
|
|
254
|
+
result[`--md-sys-color-${kebabKey}`] = value;
|
|
255
|
+
}
|
|
256
|
+
return result;
|
|
257
|
+
}
|
|
121
258
|
function MaterialSymbolsPreconnect({
|
|
122
259
|
variants = ["outlined"]
|
|
123
260
|
}) {
|
|
@@ -157,78 +294,6 @@ function MaterialSymbolsPreconnect({
|
|
|
157
294
|
)
|
|
158
295
|
] });
|
|
159
296
|
}
|
|
160
|
-
function resolveMode(mode) {
|
|
161
|
-
if (mode !== "system") return mode;
|
|
162
|
-
if (typeof window === "undefined") return "light";
|
|
163
|
-
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
164
|
-
}
|
|
165
|
-
function generateM3Theme(sourceColorHex, mode = "light") {
|
|
166
|
-
const sourceColor = argbFromHex(sourceColorHex);
|
|
167
|
-
const theme = themeFromSourceColor(sourceColor);
|
|
168
|
-
const scheme = mode === "light" ? theme.schemes.light : theme.schemes.dark;
|
|
169
|
-
const palettes = theme.palettes;
|
|
170
|
-
const tone = (palette, t) => hexFromArgb(palette.tone(t));
|
|
171
|
-
return {
|
|
172
|
-
primary: hexFromArgb(scheme.primary),
|
|
173
|
-
onPrimary: hexFromArgb(scheme.onPrimary),
|
|
174
|
-
primaryContainer: hexFromArgb(scheme.primaryContainer),
|
|
175
|
-
onPrimaryContainer: hexFromArgb(scheme.onPrimaryContainer),
|
|
176
|
-
inversePrimary: hexFromArgb(scheme.inversePrimary),
|
|
177
|
-
primaryFixed: tone(palettes.primary, 90),
|
|
178
|
-
primaryFixedDim: tone(palettes.primary, 80),
|
|
179
|
-
onPrimaryFixed: tone(palettes.primary, 10),
|
|
180
|
-
onPrimaryFixedVariant: tone(palettes.primary, 30),
|
|
181
|
-
secondary: hexFromArgb(scheme.secondary),
|
|
182
|
-
onSecondary: hexFromArgb(scheme.onSecondary),
|
|
183
|
-
secondaryContainer: hexFromArgb(scheme.secondaryContainer),
|
|
184
|
-
onSecondaryContainer: hexFromArgb(scheme.onSecondaryContainer),
|
|
185
|
-
secondaryFixed: tone(palettes.secondary, 90),
|
|
186
|
-
secondaryFixedDim: tone(palettes.secondary, 80),
|
|
187
|
-
onSecondaryFixed: tone(palettes.secondary, 10),
|
|
188
|
-
onSecondaryFixedVariant: tone(palettes.secondary, 30),
|
|
189
|
-
tertiary: hexFromArgb(scheme.tertiary),
|
|
190
|
-
onTertiary: hexFromArgb(scheme.onTertiary),
|
|
191
|
-
tertiaryContainer: hexFromArgb(scheme.tertiaryContainer),
|
|
192
|
-
onTertiaryContainer: hexFromArgb(scheme.onTertiaryContainer),
|
|
193
|
-
tertiaryFixed: tone(palettes.tertiary, 90),
|
|
194
|
-
tertiaryFixedDim: tone(palettes.tertiary, 80),
|
|
195
|
-
onTertiaryFixed: tone(palettes.tertiary, 10),
|
|
196
|
-
onTertiaryFixedVariant: tone(palettes.tertiary, 30),
|
|
197
|
-
error: hexFromArgb(scheme.error),
|
|
198
|
-
onError: hexFromArgb(scheme.onError),
|
|
199
|
-
errorContainer: hexFromArgb(scheme.errorContainer),
|
|
200
|
-
onErrorContainer: hexFromArgb(scheme.onErrorContainer),
|
|
201
|
-
surface: hexFromArgb(scheme.surface),
|
|
202
|
-
onSurface: hexFromArgb(scheme.onSurface),
|
|
203
|
-
surfaceVariant: hexFromArgb(scheme.surfaceVariant),
|
|
204
|
-
onSurfaceVariant: hexFromArgb(scheme.onSurfaceVariant),
|
|
205
|
-
surfaceTint: hexFromArgb(scheme.primary),
|
|
206
|
-
// Surface container roles from neutral palette tones
|
|
207
|
-
surfaceContainerLowest: mode === "light" ? tone(palettes.neutral, 100) : tone(palettes.neutral, 4),
|
|
208
|
-
surfaceContainerLow: mode === "light" ? tone(palettes.neutral, 96) : tone(palettes.neutral, 10),
|
|
209
|
-
surfaceContainer: mode === "light" ? tone(palettes.neutral, 94) : tone(palettes.neutral, 12),
|
|
210
|
-
surfaceContainerHigh: mode === "light" ? tone(palettes.neutral, 92) : tone(palettes.neutral, 17),
|
|
211
|
-
surfaceContainerHighest: mode === "light" ? tone(palettes.neutral, 90) : tone(palettes.neutral, 22),
|
|
212
|
-
inverseSurface: hexFromArgb(scheme.inverseSurface),
|
|
213
|
-
inverseOnSurface: hexFromArgb(scheme.inverseOnSurface),
|
|
214
|
-
background: hexFromArgb(scheme.background),
|
|
215
|
-
onBackground: hexFromArgb(scheme.onBackground),
|
|
216
|
-
outline: hexFromArgb(scheme.outline),
|
|
217
|
-
outlineVariant: hexFromArgb(scheme.outlineVariant),
|
|
218
|
-
shadow: hexFromArgb(scheme.shadow),
|
|
219
|
-
scrim: hexFromArgb(scheme.scrim)
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
function applyTheme(sourceColorHex, mode = "light", root = document.documentElement) {
|
|
223
|
-
const resolved = resolveMode(mode);
|
|
224
|
-
const colors = generateM3Theme(sourceColorHex, resolved);
|
|
225
|
-
for (const [key, value] of Object.entries(colors)) {
|
|
226
|
-
const kebabKey = key.replace(/[A-Z]/g, (m67) => `-${m67.toLowerCase()}`);
|
|
227
|
-
root.style.setProperty(`--md-sys-color-${kebabKey}`, value);
|
|
228
|
-
root.style.setProperty(`--color-m3-${kebabKey}`, value);
|
|
229
|
-
}
|
|
230
|
-
root.setAttribute("data-theme", resolved);
|
|
231
|
-
}
|
|
232
297
|
function cn(...inputs) {
|
|
233
298
|
return twMerge(clsx(inputs));
|
|
234
299
|
}
|
|
@@ -1022,8 +1087,8 @@ var RoundedPolygon = class _RoundedPolygon {
|
|
|
1022
1087
|
);
|
|
1023
1088
|
const mid = c.pointOnCurve(0.5);
|
|
1024
1089
|
const md = distanceSquared(mid.x - this.centerX, mid.y - this.centerY);
|
|
1025
|
-
const
|
|
1026
|
-
if (
|
|
1090
|
+
const m68 = Math.max(ad, md);
|
|
1091
|
+
if (m68 > maxDistSq) maxDistSq = m68;
|
|
1027
1092
|
}
|
|
1028
1093
|
const d = Math.sqrt(maxDistSq);
|
|
1029
1094
|
return [
|
|
@@ -6559,6 +6624,35 @@ var BUTTON_COLOR_TOKENS = {
|
|
|
6559
6624
|
default: "bg-transparent text-m3-primary",
|
|
6560
6625
|
selected: "bg-transparent text-m3-primary",
|
|
6561
6626
|
unselected: "bg-transparent text-m3-primary"
|
|
6627
|
+
},
|
|
6628
|
+
// ── MD3 Expressive accent variants ──────────────────────────────────────
|
|
6629
|
+
/**
|
|
6630
|
+
* High-chroma tertiary tone. Use for hero CTAs and expressive moments where
|
|
6631
|
+
* a distinct accent beyond primary is needed (e.g., hero chip, highlight fab).
|
|
6632
|
+
*/
|
|
6633
|
+
tertiary: {
|
|
6634
|
+
default: "bg-m3-tertiary text-m3-on-tertiary",
|
|
6635
|
+
selected: "bg-m3-tertiary text-m3-on-tertiary",
|
|
6636
|
+
unselected: "bg-m3-tertiary-container text-m3-on-tertiary-container"
|
|
6637
|
+
},
|
|
6638
|
+
/**
|
|
6639
|
+
* Brand-stable primary fixed. Hue stays consistent across light and dark modes.
|
|
6640
|
+
* Ideal for badges, pill chips, and elements that must carry the brand color
|
|
6641
|
+
* regardless of the active theme.
|
|
6642
|
+
*/
|
|
6643
|
+
"primary-fixed": {
|
|
6644
|
+
default: "bg-m3-primary-fixed text-m3-on-primary-fixed",
|
|
6645
|
+
selected: "bg-m3-primary-fixed text-m3-on-primary-fixed",
|
|
6646
|
+
unselected: "bg-m3-primary-fixed text-m3-on-primary-fixed-variant"
|
|
6647
|
+
},
|
|
6648
|
+
/**
|
|
6649
|
+
* Brand-stable tertiary fixed. Use for special-state indicators, achievement
|
|
6650
|
+
* badges, or accent pills that need a fixed tertiary hue across themes.
|
|
6651
|
+
*/
|
|
6652
|
+
"tertiary-fixed": {
|
|
6653
|
+
default: "bg-m3-tertiary-fixed text-m3-on-tertiary-fixed",
|
|
6654
|
+
selected: "bg-m3-tertiary-fixed text-m3-on-tertiary-fixed",
|
|
6655
|
+
unselected: "bg-m3-tertiary-fixed text-m3-on-tertiary-fixed-variant"
|
|
6562
6656
|
}
|
|
6563
6657
|
};
|
|
6564
6658
|
var MOTION_PROP_KEYS = [
|
|
@@ -6930,7 +7024,7 @@ var PILL_BORDER_RADIUS = 9999;
|
|
|
6930
7024
|
var MIN_FLEX_GROW = 0.01;
|
|
6931
7025
|
var PADDING_EXPAND_MULTIPLIER = 4;
|
|
6932
7026
|
var CHECK_ICON_SIZE = 24;
|
|
6933
|
-
var CHECK_ICON = /* @__PURE__ */ jsx(Icon, { name: "check", size: CHECK_ICON_SIZE, weight: 700 });
|
|
7027
|
+
var CHECK_ICON = /* @__PURE__ */ jsx(Icon, { name: "check", variant: "rounded", size: CHECK_ICON_SIZE, weight: 700 });
|
|
6934
7028
|
var CHECK_ICON_GAP_MAP = {
|
|
6935
7029
|
xs: 6,
|
|
6936
7030
|
sm: 8,
|
|
@@ -6950,12 +7044,6 @@ var WIDTH_MORPH_SPRING = {
|
|
|
6950
7044
|
damping: 38,
|
|
6951
7045
|
mass: 0.85
|
|
6952
7046
|
};
|
|
6953
|
-
var NAVBAR_EXPRESSIVE_SPRING = {
|
|
6954
|
-
type: "spring",
|
|
6955
|
-
stiffness: 430,
|
|
6956
|
-
damping: 38,
|
|
6957
|
-
mass: 0.8
|
|
6958
|
-
};
|
|
6959
7047
|
var AnimatedCheckLabel = React59.memo(function AnimatedCheckLabel2({
|
|
6960
7048
|
selected,
|
|
6961
7049
|
size,
|
|
@@ -6993,23 +7081,6 @@ var AnimatedCheckLabel = React59.memo(function AnimatedCheckLabel2({
|
|
|
6993
7081
|
}
|
|
6994
7082
|
);
|
|
6995
7083
|
});
|
|
6996
|
-
var AnimatedNavbarLabel = React59.memo(function AnimatedNavbarLabel2({
|
|
6997
|
-
show,
|
|
6998
|
-
children
|
|
6999
|
-
}) {
|
|
7000
|
-
return /* @__PURE__ */ jsx(AnimatePresence, { initial: false, mode: "popLayout", children: show && /* @__PURE__ */ jsx(
|
|
7001
|
-
m.span,
|
|
7002
|
-
{
|
|
7003
|
-
initial: { width: 0, opacity: 0, scale: 0.8 },
|
|
7004
|
-
animate: { width: "auto", opacity: 1, scale: 1 },
|
|
7005
|
-
exit: { width: 0, opacity: 0, scale: 0.8 },
|
|
7006
|
-
transition: NAVBAR_EXPRESSIVE_SPRING,
|
|
7007
|
-
className: "overflow-hidden whitespace-nowrap text-sm font-semibold tracking-[0.01em] ml-1.5",
|
|
7008
|
-
children
|
|
7009
|
-
},
|
|
7010
|
-
"navbar-label"
|
|
7011
|
-
) });
|
|
7012
|
-
});
|
|
7013
7084
|
function resolveConnectedShapes(variant, orientation, isFirst, isLast, itemSize) {
|
|
7014
7085
|
const defaults = ButtonGroupDefaults.connectedLeadingButtonShapes(itemSize);
|
|
7015
7086
|
if (variant !== "connected") return defaults;
|
|
@@ -7030,7 +7101,7 @@ function resolveConnectedShapes(variant, orientation, isFirst, isLast, itemSize)
|
|
|
7030
7101
|
}
|
|
7031
7102
|
return defaults;
|
|
7032
7103
|
}
|
|
7033
|
-
function resolveIconAndLabel(element, isSelected, itemSize,
|
|
7104
|
+
function resolveIconAndLabel(element, isSelected, itemSize, showCheck, iconBehavior, labelBehavior) {
|
|
7034
7105
|
let icon = element.props.icon;
|
|
7035
7106
|
let label = element.props.children;
|
|
7036
7107
|
const animateCheckInLabel = showCheck && iconBehavior !== "none" && iconBehavior !== "selected" && label !== void 0;
|
|
@@ -7046,9 +7117,6 @@ function resolveIconAndLabel(element, isSelected, itemSize, variant, showCheck,
|
|
|
7046
7117
|
}
|
|
7047
7118
|
if (animateCheckInLabel && label !== void 0) {
|
|
7048
7119
|
label = /* @__PURE__ */ jsx(AnimatedCheckLabel, { selected: isSelected, size: itemSize, children: label });
|
|
7049
|
-
} else if (variant === "navbar" && label !== void 0) {
|
|
7050
|
-
const showLabel = !labelBehavior || labelBehavior === "all" || labelBehavior === "selected" && isSelected;
|
|
7051
|
-
label = /* @__PURE__ */ jsx(AnimatedNavbarLabel, { show: showLabel, children: label });
|
|
7052
7120
|
}
|
|
7053
7121
|
return { icon, label };
|
|
7054
7122
|
}
|
|
@@ -7083,13 +7151,11 @@ function resolveFlexTargets(variant, orientation, isSelected, isPressed, hasSele
|
|
|
7083
7151
|
function buildMotionProps(variant, isSelected, isPressed, itemSize, shapes, flex, existingAnimate, existingWhileTap) {
|
|
7084
7152
|
var _a, _b;
|
|
7085
7153
|
const props = { animate: __spreadValues({}, existingAnimate) };
|
|
7086
|
-
if (
|
|
7087
|
-
|
|
7088
|
-
|
|
7089
|
-
|
|
7090
|
-
|
|
7091
|
-
props.animate.paddingInline = flex.paddingInline;
|
|
7092
|
-
}
|
|
7154
|
+
if (flex.flexGrow !== void 0) {
|
|
7155
|
+
props.animate.flexGrow = flex.flexGrow;
|
|
7156
|
+
}
|
|
7157
|
+
if (flex.paddingInline !== void 0) {
|
|
7158
|
+
props.animate.paddingInline = flex.paddingInline;
|
|
7093
7159
|
}
|
|
7094
7160
|
if (variant === "standard") {
|
|
7095
7161
|
const pressedRadius = (_a = PRESSED_RADIUS_MAP[itemSize]) != null ? _a : PRESSED_RADIUS_MAP.sm;
|
|
@@ -7140,13 +7206,6 @@ function buildMotionProps(variant, isSelected, isPressed, itemSize, shapes, flex
|
|
|
7140
7206
|
});
|
|
7141
7207
|
props.layout = true;
|
|
7142
7208
|
}
|
|
7143
|
-
if (variant === "navbar") {
|
|
7144
|
-
props.layout = true;
|
|
7145
|
-
props.transition = {
|
|
7146
|
-
layout: WIDTH_MORPH_SPRING,
|
|
7147
|
-
default: BUTTON_SHAPE_MORPH_SPRING
|
|
7148
|
-
};
|
|
7149
|
-
}
|
|
7150
7209
|
return props;
|
|
7151
7210
|
}
|
|
7152
7211
|
var ButtonGroupComponent = React59.forwardRef(
|
|
@@ -7186,7 +7245,6 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7186
7245
|
const [lockedGroupSize, setLockedGroupSize] = React59.useState(
|
|
7187
7246
|
null
|
|
7188
7247
|
);
|
|
7189
|
-
const layoutIdGroup = React59.useId();
|
|
7190
7248
|
const rootRef = React59.useRef(null);
|
|
7191
7249
|
const setRootRef = React59.useCallback(
|
|
7192
7250
|
(node) => {
|
|
@@ -7269,7 +7327,7 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7269
7327
|
className: cn(
|
|
7270
7328
|
"inline-flex p-0 m-0 border-none max-w-full [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
7271
7329
|
orientation === "vertical" ? "flex-col items-stretch overflow-y-auto overflow-x-hidden" : "flex-row overflow-x-auto overflow-y-hidden",
|
|
7272
|
-
variant === "standard" ? "gap-3" :
|
|
7330
|
+
variant === "standard" ? "gap-3" : "gap-0.5",
|
|
7273
7331
|
fullWidth && "w-full",
|
|
7274
7332
|
fullWidth && orientation === "vertical" && "h-full",
|
|
7275
7333
|
className
|
|
@@ -7279,7 +7337,7 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7279
7337
|
onPointerUp: handlePointerLeaveAndUp
|
|
7280
7338
|
}, props), {
|
|
7281
7339
|
children: childrenArray.map((child, index) => {
|
|
7282
|
-
var _a2, _b2
|
|
7340
|
+
var _a2, _b2;
|
|
7283
7341
|
const element = child;
|
|
7284
7342
|
const isSelected = element.props.selected === true;
|
|
7285
7343
|
const isFirst = index === 0;
|
|
@@ -7291,7 +7349,6 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7291
7349
|
element,
|
|
7292
7350
|
isSelected,
|
|
7293
7351
|
itemSize,
|
|
7294
|
-
variant,
|
|
7295
7352
|
showCheck,
|
|
7296
7353
|
iconBehavior,
|
|
7297
7354
|
labelBehavior
|
|
@@ -7317,7 +7374,7 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7317
7374
|
basePx
|
|
7318
7375
|
);
|
|
7319
7376
|
const dynamicStyle = __spreadValues({}, element.props.style);
|
|
7320
|
-
if (
|
|
7377
|
+
if (flex.flexGrow !== void 0 && fullWidth) {
|
|
7321
7378
|
dynamicStyle.flexBasis = 0;
|
|
7322
7379
|
dynamicStyle.flexShrink = 1;
|
|
7323
7380
|
dynamicStyle.minWidth = 0;
|
|
@@ -7335,13 +7392,7 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7335
7392
|
existingWhileTap
|
|
7336
7393
|
);
|
|
7337
7394
|
const connectedClasses = variant === "connected" && isSelected ? "z-20" : "";
|
|
7338
|
-
const
|
|
7339
|
-
flexBasis: fullWidth && labelBehavior !== "selected" ? 0 : "auto",
|
|
7340
|
-
flexShrink: fullWidth ? 1 : 0,
|
|
7341
|
-
flexGrow: flex.flexGrow,
|
|
7342
|
-
minWidth: labelBehavior !== "selected" ? 0 : "fit-content"
|
|
7343
|
-
} : {};
|
|
7344
|
-
const clonedElement = React59.cloneElement(element, __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({
|
|
7395
|
+
const clonedElement = React59.cloneElement(element, __spreadValues(__spreadProps(__spreadValues({
|
|
7345
7396
|
key: (_b2 = element.key) != null ? _b2 : index,
|
|
7346
7397
|
tabIndex: isFirst ? 0 : -1,
|
|
7347
7398
|
size: size || element.props.size,
|
|
@@ -7350,71 +7401,20 @@ var ButtonGroupComponent = React59.forwardRef(
|
|
|
7350
7401
|
}, variant === "connected" && {
|
|
7351
7402
|
colorStyle: element.props.colorStyle || "tonal",
|
|
7352
7403
|
selectedColorStyle: element.props.selectedColorStyle || "filled"
|
|
7353
|
-
}),
|
|
7354
|
-
colorStyle: "text",
|
|
7355
|
-
selectedColorStyle: "text",
|
|
7356
|
-
className: cn(
|
|
7357
|
-
element.props.className,
|
|
7358
|
-
"w-full! h-full! px-3! min-w-0! relative z-20 flex items-center justify-center",
|
|
7359
|
-
isSelected ? "text-m3-on-secondary-container! hover:bg-transparent! active:bg-transparent!" : "text-m3-on-surface-variant! hover:bg-transparent! active:bg-transparent!",
|
|
7360
|
-
itemClassName
|
|
7361
|
-
)
|
|
7362
|
-
}), variant !== "navbar" && {
|
|
7404
|
+
}), {
|
|
7363
7405
|
className: cn(
|
|
7364
7406
|
element.props.className,
|
|
7365
7407
|
connectedClasses,
|
|
7366
7408
|
"focus-visible:z-10 hover:z-10 relative min-w-0",
|
|
7367
7409
|
orientation === "vertical" && "w-full",
|
|
7368
7410
|
itemClassName
|
|
7369
|
-
)
|
|
7370
|
-
|
|
7371
|
-
style: variant === "navbar" ? __spreadProps(__spreadValues({}, dynamicStyle), { minWidth: 0 }) : dynamicStyle,
|
|
7411
|
+
),
|
|
7412
|
+
style: dynamicStyle,
|
|
7372
7413
|
onPointerDown: (e) => {
|
|
7373
7414
|
setPressedIndex(index);
|
|
7374
7415
|
if (element.props.onPointerDown) element.props.onPointerDown(e);
|
|
7375
7416
|
}
|
|
7376
7417
|
}), motionProps));
|
|
7377
|
-
if (variant === "navbar") {
|
|
7378
|
-
return /* @__PURE__ */ jsxs(
|
|
7379
|
-
m.div,
|
|
7380
|
-
{
|
|
7381
|
-
layout: true,
|
|
7382
|
-
whileTap: { scale: 0.96 },
|
|
7383
|
-
transition: NAVBAR_EXPRESSIVE_SPRING,
|
|
7384
|
-
className: "group relative h-full flex items-center justify-center min-w-0",
|
|
7385
|
-
style: navbarFlexStyle,
|
|
7386
|
-
children: [
|
|
7387
|
-
/* @__PURE__ */ jsxs(
|
|
7388
|
-
"div",
|
|
7389
|
-
{
|
|
7390
|
-
className: "absolute inset-x-1 inset-y-0 m-auto flex items-center justify-center pointer-events-none",
|
|
7391
|
-
style: { zIndex: 1 },
|
|
7392
|
-
children: [
|
|
7393
|
-
/* @__PURE__ */ jsx(
|
|
7394
|
-
"div",
|
|
7395
|
-
{
|
|
7396
|
-
className: "w-full h-[40px] bg-m3-on-surface-variant/8 opacity-0 group-hover:opacity-100 transition-opacity duration-200",
|
|
7397
|
-
style: { borderRadius: PILL_BORDER_RADIUS }
|
|
7398
|
-
}
|
|
7399
|
-
),
|
|
7400
|
-
/* @__PURE__ */ jsx(AnimatePresence, { children: isSelected && /* @__PURE__ */ jsx(
|
|
7401
|
-
m.div,
|
|
7402
|
-
{
|
|
7403
|
-
layoutId: `navbar-active-indicator-${layoutIdGroup}`,
|
|
7404
|
-
className: "absolute inset-0 m-auto w-full h-[40px] bg-m3-secondary-container",
|
|
7405
|
-
style: { borderRadius: PILL_BORDER_RADIUS },
|
|
7406
|
-
transition: NAVBAR_EXPRESSIVE_SPRING
|
|
7407
|
-
}
|
|
7408
|
-
) })
|
|
7409
|
-
]
|
|
7410
|
-
}
|
|
7411
|
-
),
|
|
7412
|
-
clonedElement
|
|
7413
|
-
]
|
|
7414
|
-
},
|
|
7415
|
-
(_c = element.key) != null ? _c : index
|
|
7416
|
-
);
|
|
7417
|
-
}
|
|
7418
7418
|
return clonedElement;
|
|
7419
7419
|
})
|
|
7420
7420
|
})
|
|
@@ -7519,6 +7519,8 @@ var ExtendedFABComponent = React59.forwardRef(
|
|
|
7519
7519
|
scrollThreshold = 50,
|
|
7520
7520
|
collapsed,
|
|
7521
7521
|
onCollapsedChange,
|
|
7522
|
+
asChild = false,
|
|
7523
|
+
children,
|
|
7522
7524
|
onClick,
|
|
7523
7525
|
onKeyDown,
|
|
7524
7526
|
layoutId,
|
|
@@ -7538,6 +7540,8 @@ var ExtendedFABComponent = React59.forwardRef(
|
|
|
7538
7540
|
"scrollThreshold",
|
|
7539
7541
|
"collapsed",
|
|
7540
7542
|
"onCollapsedChange",
|
|
7543
|
+
"asChild",
|
|
7544
|
+
"children",
|
|
7541
7545
|
"onClick",
|
|
7542
7546
|
"onKeyDown",
|
|
7543
7547
|
"layoutId",
|
|
@@ -7589,7 +7593,109 @@ var ExtendedFABComponent = React59.forwardRef(
|
|
|
7589
7593
|
},
|
|
7590
7594
|
[loading, onClick, onKeyDown]
|
|
7591
7595
|
);
|
|
7592
|
-
|
|
7596
|
+
const containerClassName = cn(
|
|
7597
|
+
"relative shrink-0 inline-flex items-center select-none cursor-pointer overflow-hidden",
|
|
7598
|
+
"transition-[box-shadow,filter] duration-200",
|
|
7599
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-2",
|
|
7600
|
+
"disabled:pointer-events-none disabled:opacity-[0.38] disabled:shadow-none",
|
|
7601
|
+
colors.bg,
|
|
7602
|
+
colors.text,
|
|
7603
|
+
lowered ? "shadow-sm" : "shadow-md",
|
|
7604
|
+
(_d = SIZE_HEIGHT[size]) != null ? _d : "h-14",
|
|
7605
|
+
SIZE_TEXT[size],
|
|
7606
|
+
isCollapsed ? cn("px-0 justify-center", SIZE_WIDTH_COLLAPSED[size]) : cn(
|
|
7607
|
+
hasIcon ? "justify-start" : "justify-center",
|
|
7608
|
+
SIZE_PADDING[size],
|
|
7609
|
+
hasIcon && SIZE_GAP[size]
|
|
7610
|
+
),
|
|
7611
|
+
dir === "rtl" || restProps.dir === "rtl" ? "flex-row-reverse" : "flex-row",
|
|
7612
|
+
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
7613
|
+
className
|
|
7614
|
+
);
|
|
7615
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7616
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
7617
|
+
hasIcon && /* @__PURE__ */ jsx(
|
|
7618
|
+
m.span,
|
|
7619
|
+
{
|
|
7620
|
+
layout: "position",
|
|
7621
|
+
className: cn(
|
|
7622
|
+
"flex items-center justify-center shrink-0",
|
|
7623
|
+
sizeIcon.cls
|
|
7624
|
+
),
|
|
7625
|
+
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsx(
|
|
7626
|
+
m.span,
|
|
7627
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7628
|
+
transition: SPRING_TRANSITION,
|
|
7629
|
+
className: "flex items-center justify-center shrink-0 w-full h-full",
|
|
7630
|
+
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsx(
|
|
7631
|
+
LoadingIndicator,
|
|
7632
|
+
{
|
|
7633
|
+
size: sizeIcon.px,
|
|
7634
|
+
color: "currentColor",
|
|
7635
|
+
"aria-label": "Loading"
|
|
7636
|
+
}
|
|
7637
|
+
) : /* @__PURE__ */ jsx(
|
|
7638
|
+
ProgressIndicator,
|
|
7639
|
+
{
|
|
7640
|
+
variant: "circular",
|
|
7641
|
+
size: sizeIcon.px,
|
|
7642
|
+
color: "currentColor",
|
|
7643
|
+
trackColor: "transparent",
|
|
7644
|
+
"aria-label": "Loading"
|
|
7645
|
+
}
|
|
7646
|
+
)
|
|
7647
|
+
}),
|
|
7648
|
+
"loading"
|
|
7649
|
+
) : icon && /* @__PURE__ */ jsx(
|
|
7650
|
+
m.span,
|
|
7651
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7652
|
+
transition: SPRING_TRANSITION,
|
|
7653
|
+
"aria-hidden": "true",
|
|
7654
|
+
className: "flex items-center justify-center shrink-0 w-full h-full [&>svg]:w-full [&>svg]:h-full",
|
|
7655
|
+
children: icon
|
|
7656
|
+
}),
|
|
7657
|
+
"icon"
|
|
7658
|
+
) })
|
|
7659
|
+
}
|
|
7660
|
+
),
|
|
7661
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !isCollapsed && /* @__PURE__ */ jsx(
|
|
7662
|
+
m.span,
|
|
7663
|
+
{
|
|
7664
|
+
layout: "position",
|
|
7665
|
+
initial: { opacity: 0, width: 0 },
|
|
7666
|
+
animate: { opacity: 1, width: "auto" },
|
|
7667
|
+
exit: { opacity: 0, width: 0 },
|
|
7668
|
+
transition: {
|
|
7669
|
+
opacity: { duration: 0.15, ease: "linear" },
|
|
7670
|
+
width: SPRING_TRANSITION
|
|
7671
|
+
},
|
|
7672
|
+
className: "overflow-hidden whitespace-nowrap",
|
|
7673
|
+
children: label
|
|
7674
|
+
},
|
|
7675
|
+
"label"
|
|
7676
|
+
) })
|
|
7677
|
+
] });
|
|
7678
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: visible && !(isCollapsed && !hasIcon) && (asChild ? /* @__PURE__ */ jsx(
|
|
7679
|
+
Slot,
|
|
7680
|
+
__spreadProps(__spreadValues({
|
|
7681
|
+
ref: localRef,
|
|
7682
|
+
"aria-label": ariaLabel || label,
|
|
7683
|
+
"aria-busy": loading || void 0,
|
|
7684
|
+
"aria-disabled": loading || restProps.disabled,
|
|
7685
|
+
onClick: handleClick,
|
|
7686
|
+
onPointerDown,
|
|
7687
|
+
onKeyDown: handleKeyDown,
|
|
7688
|
+
style: __spreadProps(__spreadValues({}, style), {
|
|
7689
|
+
borderRadius: `${radiusConfig.default}px`
|
|
7690
|
+
}),
|
|
7691
|
+
className: containerClassName
|
|
7692
|
+
}, restProps), {
|
|
7693
|
+
children: React59.cloneElement(
|
|
7694
|
+
React59.Children.only(children),
|
|
7695
|
+
{ children: innerContent }
|
|
7696
|
+
)
|
|
7697
|
+
})
|
|
7698
|
+
) : /* @__PURE__ */ jsx(
|
|
7593
7699
|
m.button,
|
|
7594
7700
|
__spreadProps(__spreadValues({
|
|
7595
7701
|
ref: localRef,
|
|
@@ -7621,91 +7727,11 @@ var ExtendedFABComponent = React59.forwardRef(
|
|
|
7621
7727
|
opacity: { duration: 0.2, ease: "linear" },
|
|
7622
7728
|
layout: SPRING_TRANSITION
|
|
7623
7729
|
},
|
|
7624
|
-
className:
|
|
7625
|
-
"relative shrink-0 inline-flex items-center select-none cursor-pointer overflow-hidden",
|
|
7626
|
-
"transition-[box-shadow,filter] duration-200",
|
|
7627
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-2",
|
|
7628
|
-
"disabled:pointer-events-none disabled:opacity-[0.38] disabled:shadow-none",
|
|
7629
|
-
colors.bg,
|
|
7630
|
-
colors.text,
|
|
7631
|
-
lowered ? "shadow-sm" : "shadow-md",
|
|
7632
|
-
(_d = SIZE_HEIGHT[size]) != null ? _d : "h-14",
|
|
7633
|
-
SIZE_TEXT[size],
|
|
7634
|
-
isCollapsed ? cn("px-0 justify-center", SIZE_WIDTH_COLLAPSED[size]) : cn(
|
|
7635
|
-
hasIcon ? "justify-start" : "justify-center",
|
|
7636
|
-
SIZE_PADDING[size],
|
|
7637
|
-
hasIcon && SIZE_GAP[size]
|
|
7638
|
-
),
|
|
7639
|
-
dir === "rtl" || restProps.dir === "rtl" ? "flex-row-reverse" : "flex-row",
|
|
7640
|
-
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
7641
|
-
className
|
|
7642
|
-
)
|
|
7730
|
+
className: containerClassName
|
|
7643
7731
|
}, restProps), {
|
|
7644
|
-
children:
|
|
7645
|
-
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
7646
|
-
hasIcon && /* @__PURE__ */ jsx(
|
|
7647
|
-
m.span,
|
|
7648
|
-
{
|
|
7649
|
-
layout: "position",
|
|
7650
|
-
className: cn(
|
|
7651
|
-
"flex items-center justify-center shrink-0",
|
|
7652
|
-
sizeIcon.cls
|
|
7653
|
-
),
|
|
7654
|
-
children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsx(
|
|
7655
|
-
m.span,
|
|
7656
|
-
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7657
|
-
transition: SPRING_TRANSITION,
|
|
7658
|
-
className: "flex items-center justify-center shrink-0 w-full h-full",
|
|
7659
|
-
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsx(
|
|
7660
|
-
LoadingIndicator,
|
|
7661
|
-
{
|
|
7662
|
-
size: sizeIcon.px,
|
|
7663
|
-
color: "currentColor",
|
|
7664
|
-
"aria-label": "Loading"
|
|
7665
|
-
}
|
|
7666
|
-
) : /* @__PURE__ */ jsx(
|
|
7667
|
-
ProgressIndicator,
|
|
7668
|
-
{
|
|
7669
|
-
variant: "circular",
|
|
7670
|
-
size: sizeIcon.px,
|
|
7671
|
-
color: "currentColor",
|
|
7672
|
-
trackColor: "transparent",
|
|
7673
|
-
"aria-label": "Loading"
|
|
7674
|
-
}
|
|
7675
|
-
)
|
|
7676
|
-
}),
|
|
7677
|
-
"loading"
|
|
7678
|
-
) : icon && /* @__PURE__ */ jsx(
|
|
7679
|
-
m.span,
|
|
7680
|
-
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7681
|
-
transition: SPRING_TRANSITION,
|
|
7682
|
-
"aria-hidden": "true",
|
|
7683
|
-
className: "flex items-center justify-center shrink-0 w-full h-full [&>svg]:w-full [&>svg]:h-full",
|
|
7684
|
-
children: icon
|
|
7685
|
-
}),
|
|
7686
|
-
"icon"
|
|
7687
|
-
) })
|
|
7688
|
-
}
|
|
7689
|
-
),
|
|
7690
|
-
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: !isCollapsed && /* @__PURE__ */ jsx(
|
|
7691
|
-
m.span,
|
|
7692
|
-
{
|
|
7693
|
-
layout: "position",
|
|
7694
|
-
initial: { opacity: 0, width: 0 },
|
|
7695
|
-
animate: { opacity: 1, width: "auto" },
|
|
7696
|
-
exit: { opacity: 0, width: 0 },
|
|
7697
|
-
transition: {
|
|
7698
|
-
opacity: { duration: 0.15, ease: "linear" },
|
|
7699
|
-
width: SPRING_TRANSITION
|
|
7700
|
-
},
|
|
7701
|
-
className: "overflow-hidden whitespace-nowrap",
|
|
7702
|
-
children: label
|
|
7703
|
-
},
|
|
7704
|
-
"label"
|
|
7705
|
-
) })
|
|
7706
|
-
]
|
|
7732
|
+
children: innerContent
|
|
7707
7733
|
})
|
|
7708
|
-
) }) });
|
|
7734
|
+
)) }) });
|
|
7709
7735
|
}
|
|
7710
7736
|
);
|
|
7711
7737
|
ExtendedFABComponent.displayName = "ExtendedFAB";
|
|
@@ -7794,6 +7820,7 @@ var FABComponent = React59.forwardRef(
|
|
|
7794
7820
|
loading = false,
|
|
7795
7821
|
loadingVariant = "loading-indicator",
|
|
7796
7822
|
visible = true,
|
|
7823
|
+
asChild = false,
|
|
7797
7824
|
onClick,
|
|
7798
7825
|
onKeyDown,
|
|
7799
7826
|
"aria-label": ariaLabel
|
|
@@ -7809,6 +7836,7 @@ var FABComponent = React59.forwardRef(
|
|
|
7809
7836
|
"loading",
|
|
7810
7837
|
"loadingVariant",
|
|
7811
7838
|
"visible",
|
|
7839
|
+
"asChild",
|
|
7812
7840
|
"onClick",
|
|
7813
7841
|
"onKeyDown",
|
|
7814
7842
|
"aria-label"
|
|
@@ -7846,101 +7874,129 @@ var FABComponent = React59.forwardRef(
|
|
|
7846
7874
|
},
|
|
7847
7875
|
[loading, onClick, onKeyDown]
|
|
7848
7876
|
);
|
|
7849
|
-
|
|
7877
|
+
const labelContent = asChild ? React59.Children.only(children).props.children : children;
|
|
7878
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7879
|
+
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
7880
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
7881
|
+
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsx(
|
|
7882
|
+
m.span,
|
|
7883
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7884
|
+
transition: SPRING_TRANSITION,
|
|
7885
|
+
className: cn(
|
|
7886
|
+
"flex items-center justify-center shrink-0",
|
|
7887
|
+
iconClass
|
|
7888
|
+
),
|
|
7889
|
+
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsx(
|
|
7890
|
+
LoadingIndicator,
|
|
7891
|
+
{
|
|
7892
|
+
size: iconPx,
|
|
7893
|
+
color: "currentColor",
|
|
7894
|
+
"aria-label": "Loading"
|
|
7895
|
+
}
|
|
7896
|
+
) : /* @__PURE__ */ jsx(
|
|
7897
|
+
ProgressIndicator,
|
|
7898
|
+
{
|
|
7899
|
+
variant: "circular",
|
|
7900
|
+
size: iconPx,
|
|
7901
|
+
color: "currentColor",
|
|
7902
|
+
trackColor: "transparent",
|
|
7903
|
+
"aria-label": "Loading"
|
|
7904
|
+
}
|
|
7905
|
+
)
|
|
7906
|
+
}),
|
|
7907
|
+
"loading"
|
|
7908
|
+
) : /* @__PURE__ */ jsx(
|
|
7909
|
+
m.span,
|
|
7910
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7911
|
+
transition: SPRING_TRANSITION,
|
|
7912
|
+
"aria-hidden": "true",
|
|
7913
|
+
className: cn(
|
|
7914
|
+
"flex items-center justify-center shrink-0 [&>svg]:w-full [&>svg]:h-full",
|
|
7915
|
+
iconClass
|
|
7916
|
+
),
|
|
7917
|
+
children: icon
|
|
7918
|
+
}),
|
|
7919
|
+
"icon"
|
|
7920
|
+
) }),
|
|
7921
|
+
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: extended && labelContent && /* @__PURE__ */ jsx(
|
|
7922
|
+
m.span,
|
|
7923
|
+
{
|
|
7924
|
+
initial: { width: 0, opacity: 0 },
|
|
7925
|
+
animate: { width: "auto", opacity: 1 },
|
|
7926
|
+
exit: { width: 0, opacity: 0 },
|
|
7927
|
+
transition: SPRING_TRANSITION,
|
|
7928
|
+
className: "overflow-hidden whitespace-nowrap ml-3",
|
|
7929
|
+
children: labelContent
|
|
7930
|
+
},
|
|
7931
|
+
"label"
|
|
7932
|
+
) })
|
|
7933
|
+
] });
|
|
7934
|
+
const containerClassName = cn(
|
|
7935
|
+
"relative shrink-0 inline-flex items-center justify-center",
|
|
7936
|
+
"select-none cursor-pointer overflow-hidden",
|
|
7937
|
+
"transition-[box-shadow,opacity,filter] duration-200",
|
|
7938
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-2",
|
|
7939
|
+
"disabled:pointer-events-none disabled:opacity-[0.38] disabled:shadow-none",
|
|
7940
|
+
colors.bg,
|
|
7941
|
+
colors.text,
|
|
7942
|
+
lowered ? "shadow-sm" : colors.shadow,
|
|
7943
|
+
(_d = SIZE_STYLES[size]) != null ? _d : "h-14 w-14",
|
|
7944
|
+
extended && "w-auto px-6",
|
|
7945
|
+
SIZE_TEXT_CLASS[size],
|
|
7946
|
+
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
7947
|
+
className
|
|
7948
|
+
);
|
|
7949
|
+
const computedAriaLabel = ariaLabel || (typeof children === "string" ? children : void 0);
|
|
7950
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: visible && (asChild ? /* @__PURE__ */ jsx(
|
|
7951
|
+
Slot,
|
|
7952
|
+
__spreadProps(__spreadValues({
|
|
7953
|
+
ref,
|
|
7954
|
+
"aria-label": computedAriaLabel,
|
|
7955
|
+
"aria-busy": loading || void 0,
|
|
7956
|
+
"aria-disabled": loading || restProps.disabled,
|
|
7957
|
+
onClick: handleClick,
|
|
7958
|
+
onPointerDown,
|
|
7959
|
+
onKeyDown: handleKeyDown,
|
|
7960
|
+
style: __spreadProps(__spreadValues({}, style), {
|
|
7961
|
+
borderRadius: `${animateRadius}px`
|
|
7962
|
+
}),
|
|
7963
|
+
className: containerClassName
|
|
7964
|
+
}, restProps), {
|
|
7965
|
+
children: React59.cloneElement(
|
|
7966
|
+
React59.Children.only(children),
|
|
7967
|
+
{ children: innerContent }
|
|
7968
|
+
)
|
|
7969
|
+
})
|
|
7970
|
+
) : /* @__PURE__ */ jsx(
|
|
7850
7971
|
m.button,
|
|
7851
7972
|
__spreadProps(__spreadValues({
|
|
7852
7973
|
ref,
|
|
7853
7974
|
type: "button",
|
|
7854
|
-
"aria-label":
|
|
7975
|
+
"aria-label": computedAriaLabel,
|
|
7855
7976
|
"aria-busy": loading || void 0,
|
|
7856
7977
|
"aria-disabled": loading || restProps.disabled,
|
|
7857
7978
|
onClick: handleClick,
|
|
7858
7979
|
onPointerDown,
|
|
7859
7980
|
onKeyDown: handleKeyDown,
|
|
7860
7981
|
style,
|
|
7861
|
-
initial: {
|
|
7862
|
-
|
|
7863
|
-
|
|
7982
|
+
initial: {
|
|
7983
|
+
scale: 0.5,
|
|
7984
|
+
opacity: 0,
|
|
7985
|
+
borderRadius: animateRadius
|
|
7986
|
+
},
|
|
7987
|
+
animate: { scale: 1, opacity: 1, borderRadius: animateRadius },
|
|
7988
|
+
exit: { scale: 0.5, opacity: 0 },
|
|
7864
7989
|
whileTap: { borderRadius: pressedRadius },
|
|
7865
7990
|
transition: {
|
|
7866
7991
|
borderRadius: SPRING_TRANSITION_FAST,
|
|
7867
7992
|
scale: SPRING_TRANSITION,
|
|
7868
7993
|
opacity: { duration: 0.25, ease: "easeOut" }
|
|
7869
7994
|
},
|
|
7870
|
-
className:
|
|
7871
|
-
"relative shrink-0 inline-flex items-center justify-center",
|
|
7872
|
-
"select-none cursor-pointer overflow-hidden",
|
|
7873
|
-
"transition-[box-shadow,opacity,filter] duration-200",
|
|
7874
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-2",
|
|
7875
|
-
"disabled:pointer-events-none disabled:opacity-[0.38] disabled:shadow-none",
|
|
7876
|
-
colors.bg,
|
|
7877
|
-
colors.text,
|
|
7878
|
-
lowered ? "shadow-sm" : colors.shadow,
|
|
7879
|
-
(_d = SIZE_STYLES[size]) != null ? _d : "h-14 w-14",
|
|
7880
|
-
extended && "w-auto px-6",
|
|
7881
|
-
SIZE_TEXT_CLASS[size],
|
|
7882
|
-
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
7883
|
-
className
|
|
7884
|
-
)
|
|
7995
|
+
className: containerClassName
|
|
7885
7996
|
}, restProps), {
|
|
7886
|
-
children:
|
|
7887
|
-
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
7888
|
-
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
7889
|
-
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsx(
|
|
7890
|
-
m.span,
|
|
7891
|
-
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7892
|
-
transition: SPRING_TRANSITION,
|
|
7893
|
-
className: cn(
|
|
7894
|
-
"flex items-center justify-center shrink-0",
|
|
7895
|
-
iconClass
|
|
7896
|
-
),
|
|
7897
|
-
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsx(
|
|
7898
|
-
LoadingIndicator,
|
|
7899
|
-
{
|
|
7900
|
-
size: iconPx,
|
|
7901
|
-
color: "currentColor",
|
|
7902
|
-
"aria-label": "Loading"
|
|
7903
|
-
}
|
|
7904
|
-
) : /* @__PURE__ */ jsx(
|
|
7905
|
-
ProgressIndicator,
|
|
7906
|
-
{
|
|
7907
|
-
variant: "circular",
|
|
7908
|
-
size: iconPx,
|
|
7909
|
-
color: "currentColor",
|
|
7910
|
-
trackColor: "transparent",
|
|
7911
|
-
"aria-label": "Loading"
|
|
7912
|
-
}
|
|
7913
|
-
)
|
|
7914
|
-
}),
|
|
7915
|
-
"loading"
|
|
7916
|
-
) : /* @__PURE__ */ jsx(
|
|
7917
|
-
m.span,
|
|
7918
|
-
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
7919
|
-
transition: SPRING_TRANSITION,
|
|
7920
|
-
"aria-hidden": "true",
|
|
7921
|
-
className: cn(
|
|
7922
|
-
"flex items-center justify-center shrink-0 [&>svg]:w-full [&>svg]:h-full",
|
|
7923
|
-
iconClass
|
|
7924
|
-
),
|
|
7925
|
-
children: icon
|
|
7926
|
-
}),
|
|
7927
|
-
"icon"
|
|
7928
|
-
) }),
|
|
7929
|
-
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: extended && children && /* @__PURE__ */ jsx(
|
|
7930
|
-
m.span,
|
|
7931
|
-
{
|
|
7932
|
-
initial: { width: 0, opacity: 0 },
|
|
7933
|
-
animate: { width: "auto", opacity: 1 },
|
|
7934
|
-
exit: { width: 0, opacity: 0 },
|
|
7935
|
-
transition: SPRING_TRANSITION,
|
|
7936
|
-
className: "overflow-hidden whitespace-nowrap ml-3",
|
|
7937
|
-
children
|
|
7938
|
-
},
|
|
7939
|
-
"label"
|
|
7940
|
-
) })
|
|
7941
|
-
]
|
|
7997
|
+
children: innerContent
|
|
7942
7998
|
})
|
|
7943
|
-
) }) });
|
|
7999
|
+
)) }) });
|
|
7944
8000
|
}
|
|
7945
8001
|
);
|
|
7946
8002
|
FABComponent.displayName = "FAB";
|
|
@@ -8140,7 +8196,9 @@ function FABMenuItem({
|
|
|
8140
8196
|
disabled = false,
|
|
8141
8197
|
colorVariant = "primary",
|
|
8142
8198
|
className,
|
|
8143
|
-
tabIndex = 0
|
|
8199
|
+
tabIndex = 0,
|
|
8200
|
+
asChild = false,
|
|
8201
|
+
children
|
|
8144
8202
|
}) {
|
|
8145
8203
|
var _a;
|
|
8146
8204
|
const colors = (_a = MENU_ITEM_COLORS[colorVariant]) != null ? _a : MENU_ITEM_COLORS.primary;
|
|
@@ -8165,7 +8223,55 @@ function FABMenuItem({
|
|
|
8165
8223
|
},
|
|
8166
8224
|
[disabled, onClick]
|
|
8167
8225
|
);
|
|
8168
|
-
|
|
8226
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8227
|
+
/* @__PURE__ */ jsx(TouchTarget, {}),
|
|
8228
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
8229
|
+
/* @__PURE__ */ jsx(
|
|
8230
|
+
"span",
|
|
8231
|
+
{
|
|
8232
|
+
"aria-hidden": "true",
|
|
8233
|
+
className: "relative z-10 flex items-center justify-center size-6 shrink-0 [&>svg]:w-full [&>svg]:h-full pointer-events-none",
|
|
8234
|
+
children: icon
|
|
8235
|
+
}
|
|
8236
|
+
),
|
|
8237
|
+
label && /* @__PURE__ */ jsx("span", { className: "relative z-10 text-base font-medium leading-none pointer-events-none", children: label })
|
|
8238
|
+
] });
|
|
8239
|
+
const containerClassName = cn(
|
|
8240
|
+
"relative inline-flex flex-row items-center",
|
|
8241
|
+
"select-none cursor-pointer overflow-hidden",
|
|
8242
|
+
"whitespace-nowrap",
|
|
8243
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-1",
|
|
8244
|
+
MENU_ITEM_STYLES.size,
|
|
8245
|
+
MENU_ITEM_STYLES.gap,
|
|
8246
|
+
label ? MENU_ITEM_STYLES.padding : "px-4",
|
|
8247
|
+
!label && "justify-center",
|
|
8248
|
+
colors.bg,
|
|
8249
|
+
colors.text,
|
|
8250
|
+
disabled && "opacity-[0.38] pointer-events-none",
|
|
8251
|
+
className
|
|
8252
|
+
);
|
|
8253
|
+
const containerStyle = {
|
|
8254
|
+
transformOrigin: "right",
|
|
8255
|
+
borderRadius: `${MENU_ITEM_STYLES.cornerRadius}px`
|
|
8256
|
+
};
|
|
8257
|
+
if (asChild) {
|
|
8258
|
+
const child = React59.Children.only(children);
|
|
8259
|
+
return /* @__PURE__ */ jsx(m.div, { variants: MENU_ITEM_VARIANTS, style: containerStyle, children: /* @__PURE__ */ jsx(
|
|
8260
|
+
Slot,
|
|
8261
|
+
{
|
|
8262
|
+
role: "menuitem",
|
|
8263
|
+
tabIndex,
|
|
8264
|
+
"aria-disabled": disabled ? "true" : void 0,
|
|
8265
|
+
"data-disabled": disabled ? "true" : void 0,
|
|
8266
|
+
onClick: handleClick,
|
|
8267
|
+
onPointerDown,
|
|
8268
|
+
onKeyDown: handleKeyDown,
|
|
8269
|
+
className: containerClassName,
|
|
8270
|
+
children: React59.cloneElement(child, { children: innerContent })
|
|
8271
|
+
}
|
|
8272
|
+
) });
|
|
8273
|
+
}
|
|
8274
|
+
return /* @__PURE__ */ jsx(
|
|
8169
8275
|
m.div,
|
|
8170
8276
|
{
|
|
8171
8277
|
role: "menuitem",
|
|
@@ -8176,37 +8282,9 @@ function FABMenuItem({
|
|
|
8176
8282
|
onPointerDown,
|
|
8177
8283
|
onKeyDown: handleKeyDown,
|
|
8178
8284
|
variants: MENU_ITEM_VARIANTS,
|
|
8179
|
-
style:
|
|
8180
|
-
|
|
8181
|
-
|
|
8182
|
-
},
|
|
8183
|
-
className: cn(
|
|
8184
|
-
"relative inline-flex flex-row items-center",
|
|
8185
|
-
"select-none cursor-pointer overflow-hidden",
|
|
8186
|
-
"whitespace-nowrap",
|
|
8187
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary focus-visible:ring-offset-1",
|
|
8188
|
-
MENU_ITEM_STYLES.size,
|
|
8189
|
-
MENU_ITEM_STYLES.gap,
|
|
8190
|
-
label ? MENU_ITEM_STYLES.padding : "px-4",
|
|
8191
|
-
!label && "justify-center",
|
|
8192
|
-
colors.bg,
|
|
8193
|
-
colors.text,
|
|
8194
|
-
disabled && "opacity-[0.38] pointer-events-none",
|
|
8195
|
-
className
|
|
8196
|
-
),
|
|
8197
|
-
children: [
|
|
8198
|
-
/* @__PURE__ */ jsx(TouchTarget, {}),
|
|
8199
|
-
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
8200
|
-
/* @__PURE__ */ jsx(
|
|
8201
|
-
"span",
|
|
8202
|
-
{
|
|
8203
|
-
"aria-hidden": "true",
|
|
8204
|
-
className: "relative z-10 flex items-center justify-center size-6 shrink-0 [&>svg]:w-full [&>svg]:h-full pointer-events-none",
|
|
8205
|
-
children: icon
|
|
8206
|
-
}
|
|
8207
|
-
),
|
|
8208
|
-
label && /* @__PURE__ */ jsx("span", { className: "relative z-10 text-base font-medium leading-none pointer-events-none", children: label })
|
|
8209
|
-
]
|
|
8285
|
+
style: containerStyle,
|
|
8286
|
+
className: containerClassName,
|
|
8287
|
+
children: innerContent
|
|
8210
8288
|
}
|
|
8211
8289
|
);
|
|
8212
8290
|
}
|
|
@@ -8488,6 +8566,7 @@ var IconButtonComponent = React59.forwardRef(
|
|
|
8488
8566
|
loading = false,
|
|
8489
8567
|
loadingVariant = "loading-indicator",
|
|
8490
8568
|
iconSize,
|
|
8569
|
+
asChild = false,
|
|
8491
8570
|
children,
|
|
8492
8571
|
onClick,
|
|
8493
8572
|
onKeyDown,
|
|
@@ -8503,6 +8582,7 @@ var IconButtonComponent = React59.forwardRef(
|
|
|
8503
8582
|
"loading",
|
|
8504
8583
|
"loadingVariant",
|
|
8505
8584
|
"iconSize",
|
|
8585
|
+
"asChild",
|
|
8506
8586
|
"children",
|
|
8507
8587
|
"onClick",
|
|
8508
8588
|
"onKeyDown",
|
|
@@ -8564,7 +8644,87 @@ var IconButtonComponent = React59.forwardRef(
|
|
|
8564
8644
|
},
|
|
8565
8645
|
[loading, onClick, onKeyDown]
|
|
8566
8646
|
);
|
|
8567
|
-
|
|
8647
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
8648
|
+
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
8649
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
8650
|
+
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsx(
|
|
8651
|
+
m.span,
|
|
8652
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
8653
|
+
transition: SPRING_TRANSITION,
|
|
8654
|
+
className: cn(
|
|
8655
|
+
"flex items-center justify-center shrink-0",
|
|
8656
|
+
iconSize != null ? void 0 : iconClass
|
|
8657
|
+
),
|
|
8658
|
+
style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
|
|
8659
|
+
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsx(
|
|
8660
|
+
LoadingIndicator,
|
|
8661
|
+
{
|
|
8662
|
+
size: typeof iconPx === "number" ? iconPx : defaultIconPx,
|
|
8663
|
+
color: "currentColor",
|
|
8664
|
+
"aria-label": "Loading"
|
|
8665
|
+
}
|
|
8666
|
+
) : /* @__PURE__ */ jsx(
|
|
8667
|
+
ProgressIndicator,
|
|
8668
|
+
{
|
|
8669
|
+
variant: "circular",
|
|
8670
|
+
size: typeof iconPx === "number" ? iconPx : defaultIconPx,
|
|
8671
|
+
color: "currentColor",
|
|
8672
|
+
trackColor: "transparent",
|
|
8673
|
+
"aria-label": "Loading"
|
|
8674
|
+
}
|
|
8675
|
+
)
|
|
8676
|
+
}),
|
|
8677
|
+
"loading"
|
|
8678
|
+
) : /* @__PURE__ */ jsx(
|
|
8679
|
+
m.span,
|
|
8680
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
8681
|
+
transition: SPRING_TRANSITION,
|
|
8682
|
+
"aria-hidden": "true",
|
|
8683
|
+
className: cn(
|
|
8684
|
+
"flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]!",
|
|
8685
|
+
iconSize != null ? void 0 : iconClass
|
|
8686
|
+
),
|
|
8687
|
+
style: {
|
|
8688
|
+
fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
|
|
8689
|
+
width: isCustomSize ? `${iconSize}px` : void 0,
|
|
8690
|
+
height: isCustomSize ? `${iconSize}px` : void 0
|
|
8691
|
+
},
|
|
8692
|
+
children: asChild ? React59.Children.only(children).props.children : children
|
|
8693
|
+
}),
|
|
8694
|
+
"content"
|
|
8695
|
+
) })
|
|
8696
|
+
] });
|
|
8697
|
+
const containerClassName = cn(
|
|
8698
|
+
baseIconButtonClasses,
|
|
8699
|
+
resolvedColorClass,
|
|
8700
|
+
outlineWidthClass,
|
|
8701
|
+
disabledBgClass,
|
|
8702
|
+
"overflow-hidden",
|
|
8703
|
+
SIZE_STYLES2[size],
|
|
8704
|
+
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
8705
|
+
className
|
|
8706
|
+
);
|
|
8707
|
+
if (asChild) {
|
|
8708
|
+
const child = React59.Children.only(children);
|
|
8709
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
8710
|
+
Slot,
|
|
8711
|
+
__spreadProps(__spreadValues({
|
|
8712
|
+
ref,
|
|
8713
|
+
"aria-pressed": isToggle ? isSelected : void 0,
|
|
8714
|
+
"aria-label": ariaLabel,
|
|
8715
|
+
"aria-busy": loading || void 0,
|
|
8716
|
+
"aria-disabled": loading || restProps.disabled,
|
|
8717
|
+
onClick: handleClick,
|
|
8718
|
+
onPointerDown,
|
|
8719
|
+
onKeyDown: handleKeyDown,
|
|
8720
|
+
style: __spreadProps(__spreadValues({}, style), { borderRadius: `${animateRadius}px` }),
|
|
8721
|
+
className: containerClassName
|
|
8722
|
+
}, restProps), {
|
|
8723
|
+
children: React59.cloneElement(child, { children: innerContent })
|
|
8724
|
+
})
|
|
8725
|
+
) });
|
|
8726
|
+
}
|
|
8727
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
8568
8728
|
m.button,
|
|
8569
8729
|
__spreadProps(__spreadValues({
|
|
8570
8730
|
ref,
|
|
@@ -8580,67 +8740,9 @@ var IconButtonComponent = React59.forwardRef(
|
|
|
8580
8740
|
animate: { borderRadius: animateRadius },
|
|
8581
8741
|
whileTap: { borderRadius: pressedRadius },
|
|
8582
8742
|
transition: { borderRadius: SPRING_TRANSITION_FAST },
|
|
8583
|
-
className:
|
|
8584
|
-
baseIconButtonClasses,
|
|
8585
|
-
resolvedColorClass,
|
|
8586
|
-
outlineWidthClass,
|
|
8587
|
-
disabledBgClass,
|
|
8588
|
-
"overflow-hidden",
|
|
8589
|
-
SIZE_STYLES2[size],
|
|
8590
|
-
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
8591
|
-
className
|
|
8592
|
-
)
|
|
8743
|
+
className: containerClassName
|
|
8593
8744
|
}, restProps), {
|
|
8594
|
-
children:
|
|
8595
|
-
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
8596
|
-
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
8597
|
-
/* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsx(
|
|
8598
|
-
m.span,
|
|
8599
|
-
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
8600
|
-
transition: SPRING_TRANSITION,
|
|
8601
|
-
className: cn(
|
|
8602
|
-
"flex items-center justify-center shrink-0",
|
|
8603
|
-
iconSize != null ? void 0 : iconClass
|
|
8604
|
-
),
|
|
8605
|
-
style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
|
|
8606
|
-
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsx(
|
|
8607
|
-
LoadingIndicator,
|
|
8608
|
-
{
|
|
8609
|
-
size: typeof iconPx === "number" ? iconPx : defaultIconPx,
|
|
8610
|
-
color: "currentColor",
|
|
8611
|
-
"aria-label": "Loading"
|
|
8612
|
-
}
|
|
8613
|
-
) : /* @__PURE__ */ jsx(
|
|
8614
|
-
ProgressIndicator,
|
|
8615
|
-
{
|
|
8616
|
-
variant: "circular",
|
|
8617
|
-
size: typeof iconPx === "number" ? iconPx : defaultIconPx,
|
|
8618
|
-
color: "currentColor",
|
|
8619
|
-
trackColor: "transparent",
|
|
8620
|
-
"aria-label": "Loading"
|
|
8621
|
-
}
|
|
8622
|
-
)
|
|
8623
|
-
}),
|
|
8624
|
-
"loading"
|
|
8625
|
-
) : /* @__PURE__ */ jsx(
|
|
8626
|
-
m.span,
|
|
8627
|
-
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
8628
|
-
transition: SPRING_TRANSITION,
|
|
8629
|
-
"aria-hidden": "true",
|
|
8630
|
-
className: cn(
|
|
8631
|
-
"flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]!",
|
|
8632
|
-
iconSize != null ? void 0 : iconClass
|
|
8633
|
-
),
|
|
8634
|
-
style: {
|
|
8635
|
-
fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
|
|
8636
|
-
width: isCustomSize ? `${iconSize}px` : void 0,
|
|
8637
|
-
height: isCustomSize ? `${iconSize}px` : void 0
|
|
8638
|
-
},
|
|
8639
|
-
children
|
|
8640
|
-
}),
|
|
8641
|
-
"content"
|
|
8642
|
-
) })
|
|
8643
|
-
]
|
|
8745
|
+
children: innerContent
|
|
8644
8746
|
})
|
|
8645
8747
|
) });
|
|
8646
8748
|
}
|
|
@@ -8960,6 +9062,7 @@ var SplitButtonLeadingComponent = React59.forwardRef(
|
|
|
8960
9062
|
icon,
|
|
8961
9063
|
children,
|
|
8962
9064
|
disabled,
|
|
9065
|
+
asChild = false,
|
|
8963
9066
|
onClick,
|
|
8964
9067
|
onPointerDown,
|
|
8965
9068
|
onPointerUp,
|
|
@@ -8975,6 +9078,7 @@ var SplitButtonLeadingComponent = React59.forwardRef(
|
|
|
8975
9078
|
"icon",
|
|
8976
9079
|
"children",
|
|
8977
9080
|
"disabled",
|
|
9081
|
+
"asChild",
|
|
8978
9082
|
"onClick",
|
|
8979
9083
|
"onPointerDown",
|
|
8980
9084
|
"onPointerUp",
|
|
@@ -9061,12 +9165,73 @@ var SplitButtonLeadingComponent = React59.forwardRef(
|
|
|
9061
9165
|
[onBlur]
|
|
9062
9166
|
);
|
|
9063
9167
|
const leadingIconSize = LEADING_ICON_SIZE_FOR_SIZE[actualSize];
|
|
9064
|
-
|
|
9168
|
+
const labelContent = asChild ? React59.Children.only(children).props.children : children;
|
|
9169
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9170
|
+
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
9171
|
+
/* @__PURE__ */ jsx(
|
|
9172
|
+
StateLayer,
|
|
9173
|
+
{
|
|
9174
|
+
hovered: isHovered,
|
|
9175
|
+
focused: isFocused,
|
|
9176
|
+
pressed: isPressed
|
|
9177
|
+
}
|
|
9178
|
+
),
|
|
9179
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
9180
|
+
icon && /* @__PURE__ */ jsx(
|
|
9181
|
+
"span",
|
|
9182
|
+
{
|
|
9183
|
+
className: "flex items-center justify-center shrink-0 [&>svg]:w-full [&>svg]:h-full overflow-hidden [&_.md-icon]:text-[length:inherit]!",
|
|
9184
|
+
style: {
|
|
9185
|
+
fontSize: leadingIconSize,
|
|
9186
|
+
width: leadingIconSize,
|
|
9187
|
+
height: leadingIconSize
|
|
9188
|
+
},
|
|
9189
|
+
children: icon
|
|
9190
|
+
}
|
|
9191
|
+
),
|
|
9192
|
+
labelContent && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center h-full gap-[inherit]", children: labelContent })
|
|
9193
|
+
] });
|
|
9194
|
+
const containerClassName = cn(
|
|
9195
|
+
splitButtonVariants({
|
|
9196
|
+
variant: actualVariant,
|
|
9197
|
+
size: actualSize,
|
|
9198
|
+
disabled
|
|
9199
|
+
}),
|
|
9200
|
+
typographyClass,
|
|
9201
|
+
className
|
|
9202
|
+
);
|
|
9203
|
+
const mergedStyle = __spreadValues({
|
|
9204
|
+
paddingInlineStart: tokens.leadingPadding.start,
|
|
9205
|
+
paddingInlineEnd: tokens.leadingPadding.end,
|
|
9206
|
+
gap: "8px",
|
|
9207
|
+
borderRadius
|
|
9208
|
+
}, style);
|
|
9209
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: asChild ? /* @__PURE__ */ jsx(
|
|
9210
|
+
Slot,
|
|
9211
|
+
__spreadProps(__spreadValues({
|
|
9212
|
+
ref,
|
|
9213
|
+
"aria-disabled": disabled || void 0,
|
|
9214
|
+
onClick: handleClick,
|
|
9215
|
+
onPointerDown: handlePointerDown,
|
|
9216
|
+
onPointerUp: handlePointerUp,
|
|
9217
|
+
onPointerEnter: handlePointerEnter,
|
|
9218
|
+
onPointerLeave: handlePointerLeave,
|
|
9219
|
+
onPointerCancel: handlePointerCancel,
|
|
9220
|
+
onFocus: handleFocus,
|
|
9221
|
+
onBlur: handleBlur,
|
|
9222
|
+
style: mergedStyle,
|
|
9223
|
+
className: containerClassName
|
|
9224
|
+
}, restProps), {
|
|
9225
|
+
children: React59.cloneElement(
|
|
9226
|
+
React59.Children.only(children),
|
|
9227
|
+
{ children: innerContent }
|
|
9228
|
+
)
|
|
9229
|
+
})
|
|
9230
|
+
) : /* @__PURE__ */ jsx(
|
|
9065
9231
|
m.button,
|
|
9066
9232
|
__spreadProps(__spreadValues({
|
|
9067
9233
|
ref,
|
|
9068
9234
|
type: "button",
|
|
9069
|
-
"aria-disabled": disabled,
|
|
9070
9235
|
disabled,
|
|
9071
9236
|
onClick: handleClick,
|
|
9072
9237
|
onPointerDown: handlePointerDown,
|
|
@@ -9083,41 +9248,9 @@ var SplitButtonLeadingComponent = React59.forwardRef(
|
|
|
9083
9248
|
paddingInlineEnd: tokens.leadingPadding.end,
|
|
9084
9249
|
gap: "8px"
|
|
9085
9250
|
}, style),
|
|
9086
|
-
className:
|
|
9087
|
-
splitButtonVariants({
|
|
9088
|
-
variant: actualVariant,
|
|
9089
|
-
size: actualSize,
|
|
9090
|
-
disabled
|
|
9091
|
-
}),
|
|
9092
|
-
typographyClass,
|
|
9093
|
-
className
|
|
9094
|
-
)
|
|
9251
|
+
className: containerClassName
|
|
9095
9252
|
}, restProps), {
|
|
9096
|
-
children:
|
|
9097
|
-
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
9098
|
-
/* @__PURE__ */ jsx(
|
|
9099
|
-
StateLayer,
|
|
9100
|
-
{
|
|
9101
|
-
hovered: isHovered,
|
|
9102
|
-
focused: isFocused,
|
|
9103
|
-
pressed: isPressed
|
|
9104
|
-
}
|
|
9105
|
-
),
|
|
9106
|
-
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
9107
|
-
icon && /* @__PURE__ */ jsx(
|
|
9108
|
-
"span",
|
|
9109
|
-
{
|
|
9110
|
-
className: "flex items-center justify-center shrink-0 [&>svg]:w-full [&>svg]:h-full overflow-hidden [&_.md-icon]:text-[length:inherit]!",
|
|
9111
|
-
style: {
|
|
9112
|
-
fontSize: leadingIconSize,
|
|
9113
|
-
width: leadingIconSize,
|
|
9114
|
-
height: leadingIconSize
|
|
9115
|
-
},
|
|
9116
|
-
children: icon
|
|
9117
|
-
}
|
|
9118
|
-
),
|
|
9119
|
-
children && /* @__PURE__ */ jsx("span", { className: "inline-flex items-center h-full gap-[inherit]", children })
|
|
9120
|
-
]
|
|
9253
|
+
children: innerContent
|
|
9121
9254
|
})
|
|
9122
9255
|
) });
|
|
9123
9256
|
}
|
|
@@ -9149,6 +9282,8 @@ var SplitButtonTrailingComponent = React59.forwardRef(
|
|
|
9149
9282
|
onPointerCancel,
|
|
9150
9283
|
onFocus,
|
|
9151
9284
|
onBlur,
|
|
9285
|
+
asChild = false,
|
|
9286
|
+
children,
|
|
9152
9287
|
"aria-label": ariaLabel
|
|
9153
9288
|
} = _b, restProps = __objRest(_b, [
|
|
9154
9289
|
"className",
|
|
@@ -9165,6 +9300,8 @@ var SplitButtonTrailingComponent = React59.forwardRef(
|
|
|
9165
9300
|
"onPointerCancel",
|
|
9166
9301
|
"onFocus",
|
|
9167
9302
|
"onBlur",
|
|
9303
|
+
"asChild",
|
|
9304
|
+
"children",
|
|
9168
9305
|
"aria-label"
|
|
9169
9306
|
]);
|
|
9170
9307
|
var _a2, _b2;
|
|
@@ -9239,14 +9376,81 @@ var SplitButtonTrailingComponent = React59.forwardRef(
|
|
|
9239
9376
|
},
|
|
9240
9377
|
[onBlur]
|
|
9241
9378
|
);
|
|
9242
|
-
|
|
9379
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9380
|
+
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
9381
|
+
/* @__PURE__ */ jsx(
|
|
9382
|
+
StateLayer,
|
|
9383
|
+
{
|
|
9384
|
+
hovered: isHovered,
|
|
9385
|
+
focused: isFocused,
|
|
9386
|
+
pressed: isPressed
|
|
9387
|
+
}
|
|
9388
|
+
),
|
|
9389
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
9390
|
+
/* @__PURE__ */ jsx(
|
|
9391
|
+
m.div,
|
|
9392
|
+
{
|
|
9393
|
+
animate: {
|
|
9394
|
+
rotate: checked ? 180 : 0,
|
|
9395
|
+
x: checked ? 0 : tokens.opticalCenterOffset
|
|
9396
|
+
},
|
|
9397
|
+
transition: prefersReducedMotion2 ? { duration: 0 } : SPLIT_BUTTON_CHEVRON_SPRING,
|
|
9398
|
+
className: "flex items-center justify-center shrink-0",
|
|
9399
|
+
children: icon != null ? icon : /* @__PURE__ */ jsx(
|
|
9400
|
+
Icon,
|
|
9401
|
+
{
|
|
9402
|
+
name: "arrow_drop_down",
|
|
9403
|
+
size: tokens.trailingIconSize,
|
|
9404
|
+
opticalSize: 24
|
|
9405
|
+
}
|
|
9406
|
+
)
|
|
9407
|
+
}
|
|
9408
|
+
)
|
|
9409
|
+
] });
|
|
9410
|
+
const containerClassName = cn(
|
|
9411
|
+
splitButtonVariants({
|
|
9412
|
+
variant: actualVariant,
|
|
9413
|
+
size: actualSize,
|
|
9414
|
+
disabled
|
|
9415
|
+
}),
|
|
9416
|
+
className
|
|
9417
|
+
);
|
|
9418
|
+
const mergedStyle = __spreadValues({
|
|
9419
|
+
paddingInlineStart: tokens.trailingPadding.start,
|
|
9420
|
+
paddingInlineEnd: tokens.trailingPadding.end,
|
|
9421
|
+
borderRadius
|
|
9422
|
+
}, style);
|
|
9423
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: asChild ? /* @__PURE__ */ jsx(
|
|
9424
|
+
Slot,
|
|
9425
|
+
__spreadProps(__spreadValues({
|
|
9426
|
+
ref,
|
|
9427
|
+
"aria-label": ariaLabel,
|
|
9428
|
+
"aria-expanded": checked,
|
|
9429
|
+
"aria-disabled": disabled,
|
|
9430
|
+
onClick: handleToggle,
|
|
9431
|
+
onPointerDown: handlePointerDown,
|
|
9432
|
+
onPointerUp: handlePointerUp,
|
|
9433
|
+
onPointerEnter: handlePointerEnter,
|
|
9434
|
+
onPointerLeave: handlePointerLeave,
|
|
9435
|
+
onPointerCancel: handlePointerCancel,
|
|
9436
|
+
onFocus: handleFocus,
|
|
9437
|
+
onBlur: handleBlur,
|
|
9438
|
+
style: mergedStyle,
|
|
9439
|
+
className: containerClassName
|
|
9440
|
+
}, restProps), {
|
|
9441
|
+
children: React59.cloneElement(
|
|
9442
|
+
React59.Children.only(children),
|
|
9443
|
+
{ children: innerContent }
|
|
9444
|
+
)
|
|
9445
|
+
})
|
|
9446
|
+
) : /* @__PURE__ */ jsx(
|
|
9243
9447
|
m.button,
|
|
9244
9448
|
__spreadProps(__spreadValues({
|
|
9245
9449
|
ref,
|
|
9246
9450
|
type: "button",
|
|
9247
|
-
"aria-pressed": checked,
|
|
9248
|
-
"aria-expanded": checked,
|
|
9249
9451
|
"aria-label": ariaLabel,
|
|
9452
|
+
"aria-expanded": checked,
|
|
9453
|
+
"aria-disabled": disabled,
|
|
9250
9454
|
disabled,
|
|
9251
9455
|
onClick: handleToggle,
|
|
9252
9456
|
onPointerDown: handlePointerDown,
|
|
@@ -9262,46 +9466,9 @@ var SplitButtonTrailingComponent = React59.forwardRef(
|
|
|
9262
9466
|
paddingInlineStart: tokens.trailingPadding.start,
|
|
9263
9467
|
paddingInlineEnd: tokens.trailingPadding.end
|
|
9264
9468
|
}, style),
|
|
9265
|
-
className:
|
|
9266
|
-
splitButtonVariants({
|
|
9267
|
-
variant: actualVariant,
|
|
9268
|
-
size: actualSize,
|
|
9269
|
-
disabled
|
|
9270
|
-
}),
|
|
9271
|
-
className
|
|
9272
|
-
)
|
|
9469
|
+
className: containerClassName
|
|
9273
9470
|
}, restProps), {
|
|
9274
|
-
children:
|
|
9275
|
-
needsTouchTarget && /* @__PURE__ */ jsx(TouchTarget, {}),
|
|
9276
|
-
/* @__PURE__ */ jsx(
|
|
9277
|
-
StateLayer,
|
|
9278
|
-
{
|
|
9279
|
-
hovered: isHovered,
|
|
9280
|
-
focused: isFocused,
|
|
9281
|
-
pressed: isPressed
|
|
9282
|
-
}
|
|
9283
|
-
),
|
|
9284
|
-
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
9285
|
-
/* @__PURE__ */ jsx(
|
|
9286
|
-
m.div,
|
|
9287
|
-
{
|
|
9288
|
-
animate: {
|
|
9289
|
-
rotate: checked ? 180 : 0,
|
|
9290
|
-
x: checked ? 0 : tokens.opticalCenterOffset
|
|
9291
|
-
},
|
|
9292
|
-
transition: prefersReducedMotion2 ? { duration: 0 } : SPLIT_BUTTON_CHEVRON_SPRING,
|
|
9293
|
-
className: "flex items-center justify-center shrink-0",
|
|
9294
|
-
children: icon != null ? icon : /* @__PURE__ */ jsx(
|
|
9295
|
-
Icon,
|
|
9296
|
-
{
|
|
9297
|
-
name: "arrow_drop_down",
|
|
9298
|
-
size: tokens.trailingIconSize,
|
|
9299
|
-
opticalSize: 24
|
|
9300
|
-
}
|
|
9301
|
-
)
|
|
9302
|
-
}
|
|
9303
|
-
)
|
|
9304
|
-
]
|
|
9471
|
+
children: innerContent
|
|
9305
9472
|
})
|
|
9306
9473
|
) });
|
|
9307
9474
|
}
|
|
@@ -9555,6 +9722,7 @@ var CardImpl = React59.forwardRef(
|
|
|
9555
9722
|
target,
|
|
9556
9723
|
rel: relProp,
|
|
9557
9724
|
onClick,
|
|
9725
|
+
asChild = false,
|
|
9558
9726
|
children
|
|
9559
9727
|
} = _b, props = __objRest(_b, [
|
|
9560
9728
|
"className",
|
|
@@ -9565,10 +9733,11 @@ var CardImpl = React59.forwardRef(
|
|
|
9565
9733
|
"target",
|
|
9566
9734
|
"rel",
|
|
9567
9735
|
"onClick",
|
|
9736
|
+
"asChild",
|
|
9568
9737
|
"children"
|
|
9569
9738
|
]);
|
|
9570
9739
|
const safeVariant = variant;
|
|
9571
|
-
const isInteractive = !!onClick || !!href || interactive;
|
|
9740
|
+
const isInteractive = !!onClick || !!href || interactive || asChild;
|
|
9572
9741
|
const elevationProps = useCardElevation(safeVariant, disabled);
|
|
9573
9742
|
const { ripples, onPointerDown, removeRipple } = useRippleState();
|
|
9574
9743
|
const baseClass = cn(
|
|
@@ -9589,6 +9758,26 @@ var CardImpl = React59.forwardRef(
|
|
|
9589
9758
|
// Outlined interactive card: change border color to m3-outline on focus/press/hover
|
|
9590
9759
|
variant === "outlined" && "hover:border-m3-outline focus-visible:border-m3-outline active:border-m3-outline"
|
|
9591
9760
|
);
|
|
9761
|
+
if (asChild) {
|
|
9762
|
+
const child = React59.Children.only(children);
|
|
9763
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
9764
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
9765
|
+
child.props.children
|
|
9766
|
+
] });
|
|
9767
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
9768
|
+
Slot,
|
|
9769
|
+
__spreadProps(__spreadValues({
|
|
9770
|
+
ref,
|
|
9771
|
+
className: cn(baseClass, interactiveClass),
|
|
9772
|
+
"aria-disabled": disabled ? true : void 0,
|
|
9773
|
+
tabIndex: disabled ? -1 : 0,
|
|
9774
|
+
onPointerDown,
|
|
9775
|
+
onClick
|
|
9776
|
+
}, props), {
|
|
9777
|
+
children: React59.cloneElement(child, { children: innerContent })
|
|
9778
|
+
})
|
|
9779
|
+
) });
|
|
9780
|
+
}
|
|
9592
9781
|
if (!isInteractive) {
|
|
9593
9782
|
return /* @__PURE__ */ jsx(
|
|
9594
9783
|
"div",
|
|
@@ -10055,7 +10244,9 @@ var ChipImpl = React59.forwardRef(
|
|
|
10055
10244
|
avatar,
|
|
10056
10245
|
onRemove,
|
|
10057
10246
|
className,
|
|
10058
|
-
onClick
|
|
10247
|
+
onClick,
|
|
10248
|
+
asChild = false,
|
|
10249
|
+
children
|
|
10059
10250
|
} = _b, props = __objRest(_b, [
|
|
10060
10251
|
"variant",
|
|
10061
10252
|
"elevated",
|
|
@@ -10067,7 +10258,9 @@ var ChipImpl = React59.forwardRef(
|
|
|
10067
10258
|
"avatar",
|
|
10068
10259
|
"onRemove",
|
|
10069
10260
|
"className",
|
|
10070
|
-
"onClick"
|
|
10261
|
+
"onClick",
|
|
10262
|
+
"asChild",
|
|
10263
|
+
"children"
|
|
10071
10264
|
]);
|
|
10072
10265
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
10073
10266
|
disabled
|
|
@@ -10182,6 +10375,63 @@ var ChipImpl = React59.forwardRef(
|
|
|
10182
10375
|
) : null }),
|
|
10183
10376
|
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: label })
|
|
10184
10377
|
] });
|
|
10378
|
+
if (asChild) {
|
|
10379
|
+
const child = React59.Children.only(children);
|
|
10380
|
+
const innerContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
10381
|
+
/* @__PURE__ */ jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
10382
|
+
mainContent,
|
|
10383
|
+
hasTrailingContent && /* @__PURE__ */ jsx("span", { className: "flex items-center justify-center shrink-0", children: onRemove ? /* @__PURE__ */ jsx(
|
|
10384
|
+
"button",
|
|
10385
|
+
{
|
|
10386
|
+
type: "button",
|
|
10387
|
+
tabIndex: disabled ? -1 : 0,
|
|
10388
|
+
"aria-label": typeof label === "string" ? `Remove ${label}` : "Remove",
|
|
10389
|
+
onClick: (e) => {
|
|
10390
|
+
e.stopPropagation();
|
|
10391
|
+
onRemove(e);
|
|
10392
|
+
},
|
|
10393
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
10394
|
+
className: cn(
|
|
10395
|
+
"flex items-center justify-center w-8.5 h-full",
|
|
10396
|
+
"cursor-pointer focus-visible:outline-none",
|
|
10397
|
+
"transition-all duration-150",
|
|
10398
|
+
"relative overflow-hidden rounded-r-[7px] rounded-l-none",
|
|
10399
|
+
"before:absolute before:-inset-px before:pointer-events-none before:bg-current",
|
|
10400
|
+
"before:transition-opacity before:duration-200 before:opacity-0 before:rounded-r-[7px]",
|
|
10401
|
+
"hover:before:opacity-[0.08] active:before:opacity-[0.12]",
|
|
10402
|
+
selected ? "text-m3-on-secondary-container" : "text-m3-on-surface-variant"
|
|
10403
|
+
),
|
|
10404
|
+
children: /* @__PURE__ */ jsx(CloseIcon3, {})
|
|
10405
|
+
}
|
|
10406
|
+
) : trailingIcon ? /* @__PURE__ */ jsx(
|
|
10407
|
+
"span",
|
|
10408
|
+
{
|
|
10409
|
+
className: cn(
|
|
10410
|
+
"flex items-center justify-center w-4.5 h-4.5 [&_.md-icon]:text-[length:inherit]!",
|
|
10411
|
+
selected ? "text-m3-on-secondary-container" : "text-m3-on-surface-variant"
|
|
10412
|
+
),
|
|
10413
|
+
style: { fontSize: 18 },
|
|
10414
|
+
"aria-hidden": "true",
|
|
10415
|
+
children: trailingIcon
|
|
10416
|
+
}
|
|
10417
|
+
) : null })
|
|
10418
|
+
] });
|
|
10419
|
+
const strippedProps = __spreadValues({}, props);
|
|
10420
|
+
delete strippedProps.children;
|
|
10421
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
10422
|
+
Slot,
|
|
10423
|
+
__spreadProps(__spreadValues({
|
|
10424
|
+
ref,
|
|
10425
|
+
"aria-disabled": disabled || void 0,
|
|
10426
|
+
tabIndex: disabled ? -1 : 0,
|
|
10427
|
+
onClick,
|
|
10428
|
+
onPointerDown,
|
|
10429
|
+
className: containerClass
|
|
10430
|
+
}, strippedProps), {
|
|
10431
|
+
children: React59.cloneElement(child, { children: innerContent })
|
|
10432
|
+
})
|
|
10433
|
+
) });
|
|
10434
|
+
}
|
|
10185
10435
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsxs(
|
|
10186
10436
|
Root8,
|
|
10187
10437
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({
|
|
@@ -13123,7 +13373,7 @@ var TimePickerDialog = ({
|
|
|
13123
13373
|
TimePickerDialog.displayName = "TimePickerDialog";
|
|
13124
13374
|
var clamp = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
13125
13375
|
var isValidHourInput = (h, is24hour) => is24hour ? h >= 0 && h <= 23 : h >= 1 && h <= 12;
|
|
13126
|
-
var isValidMinuteInput = (
|
|
13376
|
+
var isValidMinuteInput = (m68) => m68 >= 0 && m68 <= 59;
|
|
13127
13377
|
var to24Hour = (hour12, isPm) => {
|
|
13128
13378
|
if (isPm) {
|
|
13129
13379
|
return hour12 === 12 ? 12 : hour12 + 12;
|
|
@@ -13159,8 +13409,8 @@ var useTimePickerState = (options) => {
|
|
|
13159
13409
|
},
|
|
13160
13410
|
[is24hour]
|
|
13161
13411
|
);
|
|
13162
|
-
const setMinute = useCallback((
|
|
13163
|
-
const clamped = clamp(
|
|
13412
|
+
const setMinute = useCallback((m68) => {
|
|
13413
|
+
const clamped = clamp(m68, 0, 59);
|
|
13164
13414
|
setMinuteState(clamped);
|
|
13165
13415
|
setMinuteInputState(clamped);
|
|
13166
13416
|
}, []);
|
|
@@ -13174,10 +13424,10 @@ var useTimePickerState = (options) => {
|
|
|
13174
13424
|
},
|
|
13175
13425
|
[is24hour, isPm]
|
|
13176
13426
|
);
|
|
13177
|
-
const setMinuteInput = useCallback((
|
|
13178
|
-
setMinuteInputState(
|
|
13179
|
-
if (isValidMinuteInput(
|
|
13180
|
-
setMinuteState(
|
|
13427
|
+
const setMinuteInput = useCallback((m68) => {
|
|
13428
|
+
setMinuteInputState(m68);
|
|
13429
|
+
if (isValidMinuteInput(m68)) {
|
|
13430
|
+
setMinuteState(m68);
|
|
13181
13431
|
}
|
|
13182
13432
|
}, []);
|
|
13183
13433
|
const setSelection = useCallback((mode) => {
|
|
@@ -15317,7 +15567,7 @@ var NavigationBarItemComponent = React59.forwardRef(
|
|
|
15317
15567
|
className,
|
|
15318
15568
|
"aria-label": ariaLabelProp
|
|
15319
15569
|
}, ref) => {
|
|
15320
|
-
const { variant, itemLayout } = React59.useContext(NavigationBarContext);
|
|
15570
|
+
const { variant, itemLayout, itemClassName: contextItemClassName } = React59.useContext(NavigationBarContext);
|
|
15321
15571
|
const isForcedHorizontal = itemLayout === "horizontal";
|
|
15322
15572
|
const isResponsiveHorizontal = (variant === "flexible" || variant === "xr") && itemLayout === void 0;
|
|
15323
15573
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
@@ -15352,9 +15602,10 @@ var NavigationBarItemComponent = React59.forwardRef(
|
|
|
15352
15602
|
onClick: handleClick,
|
|
15353
15603
|
onPointerDown,
|
|
15354
15604
|
className: cn(
|
|
15355
|
-
"group relative flex
|
|
15356
|
-
variant === "xr" ? "
|
|
15605
|
+
"group relative flex cursor-pointer transition-colors duration-200 outline-none select-none h-full items-center justify-center min-w-0",
|
|
15606
|
+
variant === "xr" ? isResponsiveHorizontal ? "flex-1 min-[600px]:flex-initial min-[600px]:w-auto" : isForcedHorizontal ? "flex-initial w-auto" : "flex-1" : isForcedHorizontal ? "flex-initial w-auto" : "flex-1",
|
|
15357
15607
|
disabled && "pointer-events-none opacity-[0.38]",
|
|
15608
|
+
contextItemClassName,
|
|
15358
15609
|
className
|
|
15359
15610
|
),
|
|
15360
15611
|
children: [
|
|
@@ -15362,9 +15613,9 @@ var NavigationBarItemComponent = React59.forwardRef(
|
|
|
15362
15613
|
"div",
|
|
15363
15614
|
{
|
|
15364
15615
|
className: cn(
|
|
15365
|
-
"relative flex items-center justify-center flex-col gap-y-1 w-full",
|
|
15366
|
-
isResponsiveHorizontal && "min-[600px]:flex-row min-[600px]:gap-y-0 min-[600px]:gap-x-1 min-[600px]:h-10 min-[600px]:px-4 min-[600px]:
|
|
15367
|
-
isForcedHorizontal && "flex-row gap-y-0 gap-x-1 h-10 px-4 rounded-full w-auto
|
|
15616
|
+
"relative flex items-center justify-center flex-col gap-y-1 w-full px-1 py-1.5",
|
|
15617
|
+
isResponsiveHorizontal && "min-[600px]:flex-row min-[600px]:gap-y-0 min-[600px]:gap-x-1.5 min-[600px]:h-10 min-[600px]:px-4 min-[600px]:py-0 min-[600px]:rounded-full min-[600px]:w-auto",
|
|
15618
|
+
isForcedHorizontal && "flex-row gap-y-0 gap-x-1.5 h-10 px-4 py-0 rounded-full w-auto"
|
|
15368
15619
|
),
|
|
15369
15620
|
children: [
|
|
15370
15621
|
/* @__PURE__ */ jsxs(
|
|
@@ -15441,7 +15692,7 @@ var navContainerVariants = cva(
|
|
|
15441
15692
|
variant: {
|
|
15442
15693
|
flexible: "bottom-0 left-0 right-0 w-full h-16 pb-safe",
|
|
15443
15694
|
baseline: "bottom-0 left-0 right-0 w-full h-20 pb-safe",
|
|
15444
|
-
xr: "bottom-6 left-1/2 -translate-x-1/2 w-auto max-w-fit h-20 min-[600px]:h-16 rounded-[48px] px-2"
|
|
15695
|
+
xr: "bottom-6 left-1/2 -translate-x-1/2 w-auto max-w-[calc(100%-2rem)] min-[600px]:max-w-fit h-20 min-[600px]:h-16 rounded-[48px] px-2"
|
|
15445
15696
|
},
|
|
15446
15697
|
position: {
|
|
15447
15698
|
fixed: "fixed",
|
|
@@ -15469,6 +15720,7 @@ var NavigationBarComponent = React59.forwardRef(
|
|
|
15469
15720
|
scrollContainerRef,
|
|
15470
15721
|
activeIndicatorTransition,
|
|
15471
15722
|
children,
|
|
15723
|
+
itemClassName,
|
|
15472
15724
|
className,
|
|
15473
15725
|
style
|
|
15474
15726
|
}, ref) => {
|
|
@@ -15519,7 +15771,7 @@ var NavigationBarComponent = React59.forwardRef(
|
|
|
15519
15771
|
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
15520
15772
|
NavigationBarContext.Provider,
|
|
15521
15773
|
{
|
|
15522
|
-
value: { variant, itemLayout, activeIndicatorTransition },
|
|
15774
|
+
value: { variant, itemLayout, activeIndicatorTransition, itemClassName },
|
|
15523
15775
|
children: /* @__PURE__ */ jsx(
|
|
15524
15776
|
m.nav,
|
|
15525
15777
|
{
|
|
@@ -15540,7 +15792,7 @@ var NavigationBarComponent = React59.forwardRef(
|
|
|
15540
15792
|
"aria-orientation": "horizontal",
|
|
15541
15793
|
className: cn(
|
|
15542
15794
|
"flex w-full h-full mx-auto",
|
|
15543
|
-
variant === "xr" ? "gap-0 min-[600px]:gap-1.5" : "max-w-7xl gap-1.5"
|
|
15795
|
+
variant === "xr" ? "gap-0 min-[600px]:gap-1.5 items-center justify-center px-1" : "max-w-7xl gap-1.5"
|
|
15544
15796
|
),
|
|
15545
15797
|
children
|
|
15546
15798
|
}
|
|
@@ -20636,6 +20888,7 @@ var TabsList = React59.memo(TabsListComponent);
|
|
|
20636
20888
|
var typographyVariants = cva("m-0 p-0 text-m3-on-surface", {
|
|
20637
20889
|
variants: {
|
|
20638
20890
|
variant: {
|
|
20891
|
+
// Short hyphenated
|
|
20639
20892
|
"display-lg": "text-[57px] leading-[64px] font-normal tracking-[-0.25px]",
|
|
20640
20893
|
"display-md": "text-[45px] leading-[52px] font-normal tracking-[0px]",
|
|
20641
20894
|
"display-sm": "text-[36px] leading-[44px] font-normal tracking-[0px]",
|
|
@@ -20650,7 +20903,39 @@ var typographyVariants = cva("m-0 p-0 text-m3-on-surface", {
|
|
|
20650
20903
|
"label-sm": "text-[11px] leading-[16px] font-medium tracking-[0.5px]",
|
|
20651
20904
|
"body-lg": "text-[16px] leading-[24px] font-normal tracking-[0.5px]",
|
|
20652
20905
|
"body-md": "text-[14px] leading-[20px] font-normal tracking-[0.25px]",
|
|
20653
|
-
"body-sm": "text-[12px] leading-[16px] font-normal tracking-[0.4px]"
|
|
20906
|
+
"body-sm": "text-[12px] leading-[16px] font-normal tracking-[0.4px]",
|
|
20907
|
+
// Full hyphenated aliases
|
|
20908
|
+
"display-large": "text-[57px] leading-[64px] font-normal tracking-[-0.25px]",
|
|
20909
|
+
"display-medium": "text-[45px] leading-[52px] font-normal tracking-[0px]",
|
|
20910
|
+
"display-small": "text-[36px] leading-[44px] font-normal tracking-[0px]",
|
|
20911
|
+
"headline-large": "text-[32px] leading-[40px] font-normal tracking-[0px]",
|
|
20912
|
+
"headline-medium": "text-[28px] leading-[36px] font-normal tracking-[0px]",
|
|
20913
|
+
"headline-small": "text-[24px] leading-[32px] font-normal tracking-[0px]",
|
|
20914
|
+
"title-large": "text-[22px] leading-[28px] font-normal tracking-[0px]",
|
|
20915
|
+
"title-medium": "text-[16px] leading-[24px] font-medium tracking-[0.15px]",
|
|
20916
|
+
"title-small": "text-[14px] leading-[20px] font-medium tracking-[0.1px]",
|
|
20917
|
+
"label-large": "text-[14px] leading-[20px] font-medium tracking-[0.1px]",
|
|
20918
|
+
"label-medium": "text-[12px] leading-[16px] font-medium tracking-[0.5px]",
|
|
20919
|
+
"label-small": "text-[11px] leading-[16px] font-medium tracking-[0.5px]",
|
|
20920
|
+
"body-large": "text-[16px] leading-[24px] font-normal tracking-[0.5px]",
|
|
20921
|
+
"body-medium": "text-[14px] leading-[20px] font-normal tracking-[0.25px]",
|
|
20922
|
+
"body-small": "text-[12px] leading-[16px] font-normal tracking-[0.4px]",
|
|
20923
|
+
// CamelCase aliases
|
|
20924
|
+
displayLarge: "text-[57px] leading-[64px] font-normal tracking-[-0.25px]",
|
|
20925
|
+
displayMedium: "text-[45px] leading-[52px] font-normal tracking-[0px]",
|
|
20926
|
+
displaySmall: "text-[36px] leading-[44px] font-normal tracking-[0px]",
|
|
20927
|
+
headlineLarge: "text-[32px] leading-[40px] font-normal tracking-[0px]",
|
|
20928
|
+
headlineMedium: "text-[28px] leading-[36px] font-normal tracking-[0px]",
|
|
20929
|
+
headlineSmall: "text-[24px] leading-[32px] font-normal tracking-[0px]",
|
|
20930
|
+
titleLarge: "text-[22px] leading-[28px] font-normal tracking-[0px]",
|
|
20931
|
+
titleMedium: "text-[16px] leading-[24px] font-medium tracking-[0.15px]",
|
|
20932
|
+
titleSmall: "text-[14px] leading-[20px] font-medium tracking-[0.1px]",
|
|
20933
|
+
labelLarge: "text-[14px] leading-[20px] font-medium tracking-[0.1px]",
|
|
20934
|
+
labelMedium: "text-[12px] leading-[16px] font-medium tracking-[0.5px]",
|
|
20935
|
+
labelSmall: "text-[11px] leading-[16px] font-medium tracking-[0.5px]",
|
|
20936
|
+
bodyLarge: "text-[16px] leading-[24px] font-normal tracking-[0.5px]",
|
|
20937
|
+
bodyMedium: "text-[14px] leading-[20px] font-normal tracking-[0.25px]",
|
|
20938
|
+
bodySmall: "text-[12px] leading-[16px] font-normal tracking-[0.4px]"
|
|
20654
20939
|
}
|
|
20655
20940
|
},
|
|
20656
20941
|
defaultVariants: {
|
|
@@ -20659,19 +20944,21 @@ var typographyVariants = cva("m-0 p-0 text-m3-on-surface", {
|
|
|
20659
20944
|
});
|
|
20660
20945
|
var Text = React59.forwardRef(
|
|
20661
20946
|
(_a, ref) => {
|
|
20662
|
-
var _b = _a, { className, variant, as: Component } = _b, props = __objRest(_b, ["className", "variant", "as"]);
|
|
20947
|
+
var _b = _a, { className, variant, as: Component, color, weight, style } = _b, props = __objRest(_b, ["className", "variant", "as", "color", "weight", "style"]);
|
|
20663
20948
|
const defaultComponent = React59.useMemo(() => {
|
|
20664
|
-
|
|
20665
|
-
|
|
20666
|
-
if (
|
|
20949
|
+
const v = variant ? String(variant).toLowerCase() : "";
|
|
20950
|
+
if (v.startsWith("display") || v.startsWith("headline")) return "h1";
|
|
20951
|
+
if (v.startsWith("title")) return "h2";
|
|
20667
20952
|
return "p";
|
|
20668
20953
|
}, [variant]);
|
|
20669
20954
|
const Tag = Component || defaultComponent;
|
|
20955
|
+
const customStyle = __spreadValues(__spreadValues(__spreadValues({}, style), color ? { color } : {}), weight ? { fontWeight: weight } : {});
|
|
20670
20956
|
return /* @__PURE__ */ jsx(
|
|
20671
20957
|
Tag,
|
|
20672
20958
|
__spreadValues({
|
|
20673
20959
|
ref,
|
|
20674
|
-
className: cn(typographyVariants({ variant, className }))
|
|
20960
|
+
className: cn(typographyVariants({ variant, className })),
|
|
20961
|
+
style: customStyle
|
|
20675
20962
|
}, props)
|
|
20676
20963
|
);
|
|
20677
20964
|
}
|
|
@@ -20796,7 +21083,6 @@ var FloatingLabel = React59.memo(function FloatingLabel2({
|
|
|
20796
21083
|
"absolute pointer-events-none select-none origin-[left_center] leading-6 text-base whitespace-nowrap",
|
|
20797
21084
|
"px-1 -mx-1",
|
|
20798
21085
|
// Clear the notch gap and keep text aligned
|
|
20799
|
-
variant === "outlined" && isFloated && "bg-m3-surface",
|
|
20800
21086
|
"left-4",
|
|
20801
21087
|
isDisabled && "opacity-[0.38]"
|
|
20802
21088
|
),
|
|
@@ -20872,7 +21158,8 @@ var OutlineContainer = React59.memo(function OutlineContainer2({
|
|
|
20872
21158
|
);
|
|
20873
21159
|
const borderWidth = isFocused || isError ? TF_SIZE.outlineThick : TF_SIZE.outlineThin;
|
|
20874
21160
|
const leftSegmentWidth = TF_SIZE.paddingStart;
|
|
20875
|
-
const
|
|
21161
|
+
const isNotched = isFloated && labelWidth > 0;
|
|
21162
|
+
const notchWidth = isNotched ? labelWidth * TF_TYPOGRAPHY.labelScaleRatio + TF_SIZE.notchPadding * 2 : 0;
|
|
20876
21163
|
const borderTransition = { duration: colorDuration, ease };
|
|
20877
21164
|
const notchTransition = { duration: notchDuration, ease };
|
|
20878
21165
|
return /* @__PURE__ */ jsxs(
|
|
@@ -20910,7 +21197,7 @@ var OutlineContainer = React59.memo(function OutlineContainer2({
|
|
|
20910
21197
|
style: { height: borderWidth },
|
|
20911
21198
|
animate: {
|
|
20912
21199
|
borderTopColor: borderColor,
|
|
20913
|
-
opacity:
|
|
21200
|
+
opacity: isNotched ? 0 : 1,
|
|
20914
21201
|
borderTopWidth: borderWidth,
|
|
20915
21202
|
borderTopStyle: "solid"
|
|
20916
21203
|
},
|
|
@@ -21362,7 +21649,7 @@ var TextFieldComponent = React59.forwardRef(
|
|
|
21362
21649
|
const computedDescribedby = [hasSupporting ? supportingId : "", ariaDescribedby != null ? ariaDescribedby : ""].filter(Boolean).join(" ") || void 0;
|
|
21363
21650
|
const inputClass = cn(
|
|
21364
21651
|
"bg-transparent outline-none w-full",
|
|
21365
|
-
isInToolbar ? "self-center" : "self-end",
|
|
21652
|
+
!resolvedLabel || isInToolbar ? "self-center" : "self-end",
|
|
21366
21653
|
"text-base leading-6 text-m3-on-surface",
|
|
21367
21654
|
"caret-[var(--color-m3-primary)]",
|
|
21368
21655
|
"placeholder:text-m3-on-surface-variant/60",
|
|
@@ -21373,7 +21660,7 @@ var TextFieldComponent = React59.forwardRef(
|
|
|
21373
21660
|
id: inputId,
|
|
21374
21661
|
name,
|
|
21375
21662
|
value: currentValue,
|
|
21376
|
-
placeholder: isFloated ? placeholder != null ? placeholder : "" : "",
|
|
21663
|
+
placeholder: !resolvedLabel || isFloated ? placeholder != null ? placeholder : "" : "",
|
|
21377
21664
|
disabled,
|
|
21378
21665
|
readOnly,
|
|
21379
21666
|
required,
|
|
@@ -21405,7 +21692,7 @@ var TextFieldComponent = React59.forwardRef(
|
|
|
21405
21692
|
"relative flex flex-col flex-1 min-w-0 h-full",
|
|
21406
21693
|
paddingStart,
|
|
21407
21694
|
paddingEnd,
|
|
21408
|
-
isInToolbar ? "justify-center" : variant === "filled" ? resolvedDense ? "pt-5 pb-2" : "pt-6 pb-2" : resolvedDense ? "py-3" : "py-4"
|
|
21695
|
+
isInToolbar || !resolvedLabel ? "justify-center" : variant === "filled" ? resolvedDense ? "pt-5 pb-2" : "pt-6 pb-2" : resolvedDense ? "py-3" : "py-4"
|
|
21409
21696
|
);
|
|
21410
21697
|
const wrapperClass = cn(
|
|
21411
21698
|
"group/tf inline-flex flex-col",
|
|
@@ -22314,6 +22601,8 @@ function MD3ThemeProvider({
|
|
|
22314
22601
|
sourceColor: initialSourceColor = "#6750A4",
|
|
22315
22602
|
defaultMode = "light",
|
|
22316
22603
|
persistToLocalStorage = false,
|
|
22604
|
+
variant = "expressive",
|
|
22605
|
+
contrastLevel = 0,
|
|
22317
22606
|
typography: typographyProp,
|
|
22318
22607
|
fontFamily,
|
|
22319
22608
|
fontVariationAxes,
|
|
@@ -22322,6 +22611,17 @@ function MD3ThemeProvider({
|
|
|
22322
22611
|
const [sourceColor, setSourceColor] = useState(initialSourceColor);
|
|
22323
22612
|
const [mode, setMode] = useState(defaultMode);
|
|
22324
22613
|
const [isHydrated, setIsHydrated] = useState(!persistToLocalStorage);
|
|
22614
|
+
const [systemMode, setSystemMode] = useState("light");
|
|
22615
|
+
useEffect(() => {
|
|
22616
|
+
if (typeof window === "undefined") return;
|
|
22617
|
+
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
|
|
22618
|
+
const updateSystemMode = () => {
|
|
22619
|
+
setSystemMode(mediaQuery.matches ? "dark" : "light");
|
|
22620
|
+
};
|
|
22621
|
+
updateSystemMode();
|
|
22622
|
+
mediaQuery.addEventListener("change", updateSystemMode);
|
|
22623
|
+
return () => mediaQuery.removeEventListener("change", updateSystemMode);
|
|
22624
|
+
}, []);
|
|
22325
22625
|
useEffect(() => {
|
|
22326
22626
|
if (!persistToLocalStorage) return;
|
|
22327
22627
|
const savedColor = localStorage.getItem(STORAGE_KEY_COLOR);
|
|
@@ -22333,25 +22633,37 @@ function MD3ThemeProvider({
|
|
|
22333
22633
|
setMode(savedMode);
|
|
22334
22634
|
setIsHydrated(true);
|
|
22335
22635
|
}, [persistToLocalStorage]);
|
|
22636
|
+
const effectiveMode = mode === "system" ? systemMode : mode;
|
|
22336
22637
|
useEffect(() => {
|
|
22337
22638
|
if (!isHydrated) return;
|
|
22338
|
-
applyTheme(sourceColor,
|
|
22639
|
+
applyTheme(sourceColor, effectiveMode, document.documentElement, {
|
|
22640
|
+
variant,
|
|
22641
|
+
contrastLevel
|
|
22642
|
+
});
|
|
22339
22643
|
if (persistToLocalStorage) {
|
|
22340
22644
|
localStorage.setItem(STORAGE_KEY_COLOR, sourceColor);
|
|
22341
22645
|
localStorage.setItem(STORAGE_KEY_MODE, mode);
|
|
22342
22646
|
}
|
|
22343
|
-
}, [
|
|
22344
|
-
|
|
22345
|
-
|
|
22346
|
-
|
|
22347
|
-
|
|
22348
|
-
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22647
|
+
}, [
|
|
22648
|
+
sourceColor,
|
|
22649
|
+
mode,
|
|
22650
|
+
effectiveMode,
|
|
22651
|
+
persistToLocalStorage,
|
|
22652
|
+
isHydrated,
|
|
22653
|
+
variant,
|
|
22654
|
+
contrastLevel
|
|
22655
|
+
]);
|
|
22352
22656
|
const themeValue = useMemo(
|
|
22353
|
-
() => ({
|
|
22354
|
-
|
|
22657
|
+
() => ({
|
|
22658
|
+
sourceColor,
|
|
22659
|
+
setSourceColor,
|
|
22660
|
+
mode,
|
|
22661
|
+
setMode,
|
|
22662
|
+
effectiveMode,
|
|
22663
|
+
variant,
|
|
22664
|
+
contrastLevel
|
|
22665
|
+
}),
|
|
22666
|
+
[sourceColor, mode, effectiveMode, variant, contrastLevel]
|
|
22355
22667
|
);
|
|
22356
22668
|
const typographyValue = useMemo(() => {
|
|
22357
22669
|
if (typographyProp) return typographyProp;
|
|
@@ -22464,6 +22776,47 @@ var vibrantFloatingToolbarColors = {
|
|
|
22464
22776
|
fabContainerColor: "var(--md-sys-color-tertiary-container)",
|
|
22465
22777
|
fabContentColor: "var(--md-sys-color-on-tertiary-container)"
|
|
22466
22778
|
};
|
|
22779
|
+
var surfaceContainerHighFloatingToolbarColors = {
|
|
22780
|
+
toolbarContainerColor: "var(--md-sys-color-surface-container-high)",
|
|
22781
|
+
toolbarContentColor: "var(--md-sys-color-on-surface)",
|
|
22782
|
+
fabContainerColor: "var(--md-sys-color-secondary-container)",
|
|
22783
|
+
fabContentColor: "var(--md-sys-color-on-secondary-container)"
|
|
22784
|
+
};
|
|
22785
|
+
var surfaceContainerHighestFloatingToolbarColors = {
|
|
22786
|
+
toolbarContainerColor: "var(--md-sys-color-surface-container-highest)",
|
|
22787
|
+
toolbarContentColor: "var(--md-sys-color-on-surface)",
|
|
22788
|
+
fabContainerColor: "var(--md-sys-color-secondary-container)",
|
|
22789
|
+
fabContentColor: "var(--md-sys-color-on-secondary-container)"
|
|
22790
|
+
};
|
|
22791
|
+
var tertiaryContainerFloatingToolbarColors = {
|
|
22792
|
+
toolbarContainerColor: "var(--md-sys-color-tertiary-container)",
|
|
22793
|
+
toolbarContentColor: "var(--md-sys-color-on-tertiary-container)",
|
|
22794
|
+
fabContainerColor: "var(--md-sys-color-primary-container)",
|
|
22795
|
+
fabContentColor: "var(--md-sys-color-on-primary-container)"
|
|
22796
|
+
};
|
|
22797
|
+
var xrFloatingToolbarColors = {
|
|
22798
|
+
toolbarContainerColor: "color-mix(in srgb, var(--md-sys-color-surface-container-high) 80%, transparent)",
|
|
22799
|
+
toolbarContentColor: "var(--md-sys-color-on-surface)",
|
|
22800
|
+
fabContainerColor: "color-mix(in srgb, var(--md-sys-color-secondary-container) 85%, transparent)",
|
|
22801
|
+
fabContentColor: "var(--md-sys-color-on-secondary-container)"
|
|
22802
|
+
};
|
|
22803
|
+
function getToolbarColors(variant = "standard", customColors) {
|
|
22804
|
+
if (customColors) return customColors;
|
|
22805
|
+
switch (variant) {
|
|
22806
|
+
case "vibrant":
|
|
22807
|
+
return vibrantFloatingToolbarColors;
|
|
22808
|
+
case "surface-high":
|
|
22809
|
+
return surfaceContainerHighFloatingToolbarColors;
|
|
22810
|
+
case "surface-highest":
|
|
22811
|
+
return surfaceContainerHighestFloatingToolbarColors;
|
|
22812
|
+
case "tertiary":
|
|
22813
|
+
return tertiaryContainerFloatingToolbarColors;
|
|
22814
|
+
case "xr":
|
|
22815
|
+
return xrFloatingToolbarColors;
|
|
22816
|
+
default:
|
|
22817
|
+
return standardFloatingToolbarColors;
|
|
22818
|
+
}
|
|
22819
|
+
}
|
|
22467
22820
|
var BottomDockedToolbar = React59.forwardRef(
|
|
22468
22821
|
(_a, ref) => {
|
|
22469
22822
|
var _b = _a, {
|
|
@@ -22493,7 +22846,7 @@ var BottomDockedToolbar = React59.forwardRef(
|
|
|
22493
22846
|
"className",
|
|
22494
22847
|
"aria-label"
|
|
22495
22848
|
]);
|
|
22496
|
-
const colors =
|
|
22849
|
+
const colors = getToolbarColors(variant, customColors);
|
|
22497
22850
|
const { scrollY } = useScroll(
|
|
22498
22851
|
scrollContainerRef ? { container: scrollContainerRef } : void 0
|
|
22499
22852
|
);
|
|
@@ -22522,6 +22875,7 @@ var BottomDockedToolbar = React59.forwardRef(
|
|
|
22522
22875
|
full: "rounded-full"
|
|
22523
22876
|
};
|
|
22524
22877
|
const justifyClass = justify === "center" ? "justify-center gap-4" : "justify-between";
|
|
22878
|
+
const isXr = variant === "xr";
|
|
22525
22879
|
return /* @__PURE__ */ jsx(ToolbarContext.Provider, { value: { orientation: "horizontal" }, children: /* @__PURE__ */ jsxs(
|
|
22526
22880
|
m.div,
|
|
22527
22881
|
__spreadProps(__spreadValues({
|
|
@@ -22542,11 +22896,12 @@ var BottomDockedToolbar = React59.forwardRef(
|
|
|
22542
22896
|
paddingRight: paddingX
|
|
22543
22897
|
}),
|
|
22544
22898
|
className: cn(
|
|
22545
|
-
"fixed bottom-0 left-0 right-0 w-full z-40",
|
|
22899
|
+
"fixed bottom-0 left-0 right-0 w-full z-40 text-(--toolbar-color) [&_.text-m3-on-surface-variant]:text-current",
|
|
22546
22900
|
"flex items-center h-16",
|
|
22547
22901
|
justifyClass,
|
|
22548
22902
|
SHAPE_CLASSES[shape],
|
|
22549
|
-
"shadow-[0_-1px_3px_rgba(0,0,0,0.1)]
|
|
22903
|
+
isXr ? "backdrop-blur-md border-t border-white/10 shadow-lg" : "shadow-[0_-1px_3px_rgba(0,0,0,0.1)]",
|
|
22904
|
+
"pointer-events-auto",
|
|
22550
22905
|
className
|
|
22551
22906
|
)
|
|
22552
22907
|
}, props), {
|
|
@@ -22593,6 +22948,13 @@ var ToolbarIconButtonTokens = {
|
|
|
22593
22948
|
/** Icon size in dp — larger than standard 24dp to fill the 48dp button properly */
|
|
22594
22949
|
IconSize: 28
|
|
22595
22950
|
};
|
|
22951
|
+
var ToolbarToggleButtonTokens = {
|
|
22952
|
+
Height: 48,
|
|
22953
|
+
MinWidth: 95,
|
|
22954
|
+
IconSize: 24,
|
|
22955
|
+
PaddingX: 16,
|
|
22956
|
+
Gap: 8
|
|
22957
|
+
};
|
|
22596
22958
|
var ALIGNMENT_CLASS = {
|
|
22597
22959
|
start: "justify-start",
|
|
22598
22960
|
center: "justify-center",
|
|
@@ -22651,7 +23013,8 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22651
23013
|
var _b = _a, {
|
|
22652
23014
|
expanded,
|
|
22653
23015
|
orientation = "horizontal",
|
|
22654
|
-
|
|
23016
|
+
variant = "standard",
|
|
23017
|
+
colors: customColors,
|
|
22655
23018
|
shape = "full",
|
|
22656
23019
|
contentPadding,
|
|
22657
23020
|
scrollBehavior,
|
|
@@ -22669,6 +23032,7 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22669
23032
|
} = _b, props = __objRest(_b, [
|
|
22670
23033
|
"expanded",
|
|
22671
23034
|
"orientation",
|
|
23035
|
+
"variant",
|
|
22672
23036
|
"colors",
|
|
22673
23037
|
"shape",
|
|
22674
23038
|
"contentPadding",
|
|
@@ -22685,6 +23049,7 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22685
23049
|
"style",
|
|
22686
23050
|
"aria-label"
|
|
22687
23051
|
]);
|
|
23052
|
+
const colors = getToolbarColors(variant, customColors);
|
|
22688
23053
|
const isHorizontal = orientation === "horizontal";
|
|
22689
23054
|
const isStringPadding = typeof contentPadding === "string";
|
|
22690
23055
|
const cssVars = __spreadValues(__spreadValues({
|
|
@@ -22693,7 +23058,8 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22693
23058
|
"--toolbar-size": `${FloatingToolbarTokens.ContainerHeight}px`
|
|
22694
23059
|
}, isStringPadding ? {} : contentPadding), style);
|
|
22695
23060
|
const isScrolledOff = scrollBehavior && scrollBehavior.offset < 0;
|
|
22696
|
-
const
|
|
23061
|
+
const isXr = variant === "xr";
|
|
23062
|
+
const shadowClass = isXr ? "shadow-lg border border-white/10 backdrop-blur-md" : expanded ? "shadow-md" : "shadow-sm";
|
|
22697
23063
|
const containerShapeClass = shape === "full" ? "rounded-full" : "rounded-2xl";
|
|
22698
23064
|
const leadingVariants = buildSlotVariants(
|
|
22699
23065
|
isHorizontal ? "-100%" : 0,
|
|
@@ -22710,7 +23076,7 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22710
23076
|
scrollBehavior,
|
|
22711
23077
|
disableScrollTranslation
|
|
22712
23078
|
);
|
|
22713
|
-
return /* @__PURE__ */ jsx(ToolbarContext.Provider, { value: { orientation }, children: /* @__PURE__ */ jsx(
|
|
23079
|
+
return /* @__PURE__ */ jsx(ToolbarContext.Provider, { value: { orientation, itemClassName }, children: /* @__PURE__ */ jsx(
|
|
22714
23080
|
m.div,
|
|
22715
23081
|
{
|
|
22716
23082
|
ref,
|
|
@@ -22732,8 +23098,8 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22732
23098
|
color: "var(--toolbar-color)"
|
|
22733
23099
|
}),
|
|
22734
23100
|
className: cn(
|
|
22735
|
-
"flex pointer-events-auto relative",
|
|
22736
|
-
isHorizontal ? "max-w-[90vw] h-(--toolbar-size)" : "max-h-[90vh] w-(--toolbar-size) h-fit",
|
|
23101
|
+
"flex pointer-events-auto relative text-(--toolbar-color) [&_.text-m3-on-surface-variant]:text-current",
|
|
23102
|
+
isHorizontal ? "max-w-[min(90vw,100%)] h-(--toolbar-size)" : "max-h-[min(90vh,100%)] w-(--toolbar-size) h-fit",
|
|
22737
23103
|
containerShapeClass,
|
|
22738
23104
|
shadowClass,
|
|
22739
23105
|
className
|
|
@@ -22750,11 +23116,11 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22750
23116
|
"div",
|
|
22751
23117
|
{
|
|
22752
23118
|
className: cn(
|
|
22753
|
-
"flex items-center
|
|
23119
|
+
"flex items-center min-w-0 min-h-0",
|
|
22754
23120
|
isHorizontal ? "flex-row h-full" : "flex-col w-full",
|
|
22755
|
-
isStringPadding ? contentPadding : isHorizontal ? "px-
|
|
23121
|
+
isStringPadding ? contentPadding : isHorizontal ? "px-2" : "py-2"
|
|
22756
23122
|
),
|
|
22757
|
-
style: isStringPadding ?
|
|
23123
|
+
style: __spreadValues({ gap: itemGap }, isStringPadding ? {} : contentPadding),
|
|
22758
23124
|
children: [
|
|
22759
23125
|
/* @__PURE__ */ jsx(AnimatePresence, { initial: false, children: expanded && startContent && /* @__PURE__ */ jsx(
|
|
22760
23126
|
m.div,
|
|
@@ -22764,9 +23130,10 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22764
23130
|
animate: "visible",
|
|
22765
23131
|
exit: "hidden",
|
|
22766
23132
|
className: cn(
|
|
22767
|
-
"flex shrink-0 overflow-hidden",
|
|
23133
|
+
"flex shrink-0 items-center overflow-hidden",
|
|
22768
23134
|
isHorizontal ? "flex-row" : "flex-col"
|
|
22769
23135
|
),
|
|
23136
|
+
style: { gap: itemGap },
|
|
22770
23137
|
children: processNodes(startContent)
|
|
22771
23138
|
},
|
|
22772
23139
|
"start"
|
|
@@ -22791,9 +23158,10 @@ var FloatingToolbarBase = React59.forwardRef(
|
|
|
22791
23158
|
animate: "visible",
|
|
22792
23159
|
exit: "hidden",
|
|
22793
23160
|
className: cn(
|
|
22794
|
-
"flex shrink-0 overflow-hidden",
|
|
23161
|
+
"flex shrink-0 items-center overflow-hidden",
|
|
22795
23162
|
isHorizontal ? "flex-row" : "flex-col"
|
|
22796
23163
|
),
|
|
23164
|
+
style: { gap: itemGap },
|
|
22797
23165
|
children: processNodes(endContent)
|
|
22798
23166
|
},
|
|
22799
23167
|
"end"
|
|
@@ -22819,7 +23187,8 @@ var FloatingToolbarWithFabBase = React59.forwardRef(
|
|
|
22819
23187
|
var _b = _a, {
|
|
22820
23188
|
expanded,
|
|
22821
23189
|
orientation = "horizontal",
|
|
22822
|
-
|
|
23190
|
+
variant = "standard",
|
|
23191
|
+
colors: customColors,
|
|
22823
23192
|
floatingActionButton,
|
|
22824
23193
|
fabPosition = orientation === "horizontal" ? "end" : "bottom",
|
|
22825
23194
|
animationDuration = 0.3,
|
|
@@ -22830,6 +23199,7 @@ var FloatingToolbarWithFabBase = React59.forwardRef(
|
|
|
22830
23199
|
} = _b, props = __objRest(_b, [
|
|
22831
23200
|
"expanded",
|
|
22832
23201
|
"orientation",
|
|
23202
|
+
"variant",
|
|
22833
23203
|
"colors",
|
|
22834
23204
|
"floatingActionButton",
|
|
22835
23205
|
"fabPosition",
|
|
@@ -22839,6 +23209,7 @@ var FloatingToolbarWithFabBase = React59.forwardRef(
|
|
|
22839
23209
|
"className",
|
|
22840
23210
|
"style"
|
|
22841
23211
|
]);
|
|
23212
|
+
const colors = getToolbarColors(variant, customColors);
|
|
22842
23213
|
const isHorizontal = orientation === "horizontal";
|
|
22843
23214
|
const effectiveExpanded = expanded && (!scrollBehavior || scrollBehavior.isExpanded);
|
|
22844
23215
|
const isFabBefore = fabPosition === "start" || fabPosition === "top";
|
|
@@ -22916,7 +23287,8 @@ var FloatingToolbarWithFabBase = React59.forwardRef(
|
|
|
22916
23287
|
expanded,
|
|
22917
23288
|
colors,
|
|
22918
23289
|
disableScrollTranslation: true,
|
|
22919
|
-
disableLayoutAnimation: true
|
|
23290
|
+
disableLayoutAnimation: true,
|
|
23291
|
+
className: className ? cn("h-full", className) : void 0
|
|
22920
23292
|
}, props)
|
|
22921
23293
|
) : /* @__PURE__ */ jsx(
|
|
22922
23294
|
VerticalFloatingToolbar,
|
|
@@ -22924,7 +23296,8 @@ var FloatingToolbarWithFabBase = React59.forwardRef(
|
|
|
22924
23296
|
expanded,
|
|
22925
23297
|
colors,
|
|
22926
23298
|
disableScrollTranslation: true,
|
|
22927
|
-
disableLayoutAnimation: true
|
|
23299
|
+
disableLayoutAnimation: true,
|
|
23300
|
+
className: className ? cn("w-full", className) : void 0
|
|
22928
23301
|
}, props)
|
|
22929
23302
|
)
|
|
22930
23303
|
},
|
|
@@ -22954,7 +23327,7 @@ var ToolbarDivider = ({
|
|
|
22954
23327
|
"aria-orientation": isHorizontalToolbar ? "vertical" : "horizontal",
|
|
22955
23328
|
className: cn(
|
|
22956
23329
|
"shrink-0 bg-current opacity-30 border-none",
|
|
22957
|
-
isHorizontalToolbar ? "w-px h-8 self-center mx-
|
|
23330
|
+
isHorizontalToolbar ? "w-px h-8 self-center mx-1" : "h-px w-8 self-center my-1",
|
|
22958
23331
|
className
|
|
22959
23332
|
),
|
|
22960
23333
|
style: {
|
|
@@ -22977,20 +23350,47 @@ var VARIANT_TO_COLOR_STYLE = {
|
|
|
22977
23350
|
};
|
|
22978
23351
|
var ToolbarIconButton = React59.forwardRef(
|
|
22979
23352
|
(_a, ref) => {
|
|
22980
|
-
var _b = _a, {
|
|
23353
|
+
var _b = _a, {
|
|
23354
|
+
emphasis = "standard",
|
|
23355
|
+
toolbarSize = "default",
|
|
23356
|
+
selected,
|
|
23357
|
+
asChild,
|
|
23358
|
+
className
|
|
23359
|
+
} = _b, props = __objRest(_b, [
|
|
23360
|
+
"emphasis",
|
|
23361
|
+
"toolbarSize",
|
|
23362
|
+
"selected",
|
|
23363
|
+
"asChild",
|
|
23364
|
+
"className"
|
|
23365
|
+
]);
|
|
23366
|
+
const context = useToolbarContext();
|
|
22981
23367
|
const widthClass = TOOLBAR_ICON_BUTTON_WIDTH[toolbarSize];
|
|
22982
23368
|
const colorStyle = VARIANT_TO_COLOR_STYLE[emphasis];
|
|
23369
|
+
const iconButtonProps = selected !== void 0 ? {
|
|
23370
|
+
variant: "toggle",
|
|
23371
|
+
selected: Boolean(selected)
|
|
23372
|
+
} : {
|
|
23373
|
+
variant: "default"
|
|
23374
|
+
};
|
|
22983
23375
|
return /* @__PURE__ */ jsx(
|
|
22984
23376
|
IconButton,
|
|
22985
|
-
__spreadValues({
|
|
23377
|
+
__spreadValues(__spreadProps(__spreadValues({
|
|
22986
23378
|
ref,
|
|
22987
|
-
|
|
23379
|
+
asChild,
|
|
22988
23380
|
colorStyle,
|
|
22989
23381
|
size: "md",
|
|
22990
23382
|
shape: "round",
|
|
22991
|
-
iconSize: ToolbarIconButtonTokens.IconSize
|
|
22992
|
-
|
|
22993
|
-
|
|
23383
|
+
iconSize: ToolbarIconButtonTokens.IconSize
|
|
23384
|
+
}, iconButtonProps), {
|
|
23385
|
+
className: cn(
|
|
23386
|
+
"h-[48px]",
|
|
23387
|
+
widthClass,
|
|
23388
|
+
emphasis === "standard" && !selected && "text-current hover:bg-current/8 active:bg-current/12",
|
|
23389
|
+
emphasis === "standard" && selected && "bg-current/16 text-current hover:bg-current/20 active:bg-current/24",
|
|
23390
|
+
context == null ? void 0 : context.itemClassName,
|
|
23391
|
+
className
|
|
23392
|
+
)
|
|
23393
|
+
}), props)
|
|
22994
23394
|
);
|
|
22995
23395
|
}
|
|
22996
23396
|
);
|
|
@@ -23061,6 +23461,195 @@ function useFloatingToolbarScrollBehavior(options = {}) {
|
|
|
23061
23461
|
exitDirection
|
|
23062
23462
|
};
|
|
23063
23463
|
}
|
|
23464
|
+
var MOTION_PROP_KEYS2 = [
|
|
23465
|
+
"animate",
|
|
23466
|
+
"exit",
|
|
23467
|
+
"initial",
|
|
23468
|
+
"transition",
|
|
23469
|
+
"variants",
|
|
23470
|
+
"whileHover",
|
|
23471
|
+
"whileTap",
|
|
23472
|
+
"whileFocus",
|
|
23473
|
+
"whileDrag",
|
|
23474
|
+
"whileInView",
|
|
23475
|
+
"onAnimationStart",
|
|
23476
|
+
"onAnimationComplete",
|
|
23477
|
+
"onUpdate",
|
|
23478
|
+
"onDragStart",
|
|
23479
|
+
"onDragEnd",
|
|
23480
|
+
"onDrag",
|
|
23481
|
+
"onDirectionLock",
|
|
23482
|
+
"onDragTransitionEnd",
|
|
23483
|
+
"layout",
|
|
23484
|
+
"layoutId",
|
|
23485
|
+
"onLayoutAnimationComplete"
|
|
23486
|
+
];
|
|
23487
|
+
var ToolbarToggleButton = React59.forwardRef(
|
|
23488
|
+
(_a, ref) => {
|
|
23489
|
+
var _b = _a, {
|
|
23490
|
+
emphasis = "standard",
|
|
23491
|
+
selected = false,
|
|
23492
|
+
icon,
|
|
23493
|
+
children,
|
|
23494
|
+
pressScale = 0.95,
|
|
23495
|
+
pressBounceOffset = 6,
|
|
23496
|
+
ripple = true,
|
|
23497
|
+
asChild = false,
|
|
23498
|
+
className,
|
|
23499
|
+
type = "button",
|
|
23500
|
+
disabled,
|
|
23501
|
+
onPointerDown: onPointerDownProp
|
|
23502
|
+
} = _b, props = __objRest(_b, [
|
|
23503
|
+
"emphasis",
|
|
23504
|
+
"selected",
|
|
23505
|
+
"icon",
|
|
23506
|
+
"children",
|
|
23507
|
+
"pressScale",
|
|
23508
|
+
"pressBounceOffset",
|
|
23509
|
+
"ripple",
|
|
23510
|
+
"asChild",
|
|
23511
|
+
"className",
|
|
23512
|
+
"type",
|
|
23513
|
+
"disabled",
|
|
23514
|
+
"onPointerDown"
|
|
23515
|
+
]);
|
|
23516
|
+
const context = useToolbarContext();
|
|
23517
|
+
const {
|
|
23518
|
+
ripples,
|
|
23519
|
+
onPointerDown: handleRipplePointerDown,
|
|
23520
|
+
removeRipple
|
|
23521
|
+
} = useRippleState({
|
|
23522
|
+
disabled: Boolean(disabled) || !ripple
|
|
23523
|
+
});
|
|
23524
|
+
const handlePointerDown = React59.useCallback(
|
|
23525
|
+
(e) => {
|
|
23526
|
+
if (!disabled && ripple) {
|
|
23527
|
+
handleRipplePointerDown(e);
|
|
23528
|
+
}
|
|
23529
|
+
onPointerDownProp == null ? void 0 : onPointerDownProp(e);
|
|
23530
|
+
},
|
|
23531
|
+
[disabled, ripple, handleRipplePointerDown, onPointerDownProp]
|
|
23532
|
+
);
|
|
23533
|
+
const baseClasses = "relative overflow-hidden inline-flex items-center justify-center min-w-[95px] h-[48px] px-4 rounded-full text-sm font-medium transition-colors select-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-current/40 disabled:pointer-events-none disabled:opacity-38";
|
|
23534
|
+
const variantClasses = {
|
|
23535
|
+
standard: selected ? "bg-current/16 text-current hover:bg-current/20 active:bg-current/24" : "bg-transparent text-current hover:bg-current/8 active:bg-current/12",
|
|
23536
|
+
tonal: selected ? "bg-m3-secondary-container text-m3-on-secondary-container hover:shadow-sm" : "bg-m3-surface-container-high text-m3-on-surface hover:bg-m3-surface-container-highest",
|
|
23537
|
+
filled: selected ? "bg-m3-primary text-m3-on-primary hover:shadow-sm" : "bg-m3-surface-container-highest text-m3-on-surface hover:bg-m3-surface-container-high"
|
|
23538
|
+
};
|
|
23539
|
+
const combinedClassName = cn(
|
|
23540
|
+
baseClasses,
|
|
23541
|
+
variantClasses[emphasis],
|
|
23542
|
+
context == null ? void 0 : context.itemClassName,
|
|
23543
|
+
className
|
|
23544
|
+
);
|
|
23545
|
+
const whileTapConfig = React59.useMemo(
|
|
23546
|
+
() => ({
|
|
23547
|
+
scale: pressScale,
|
|
23548
|
+
x: pressBounceOffset ? [
|
|
23549
|
+
0,
|
|
23550
|
+
-pressBounceOffset,
|
|
23551
|
+
pressBounceOffset,
|
|
23552
|
+
-pressBounceOffset / 2,
|
|
23553
|
+
pressBounceOffset / 2,
|
|
23554
|
+
0
|
|
23555
|
+
] : 0
|
|
23556
|
+
}),
|
|
23557
|
+
[pressScale, pressBounceOffset]
|
|
23558
|
+
);
|
|
23559
|
+
const transitionConfig = React59.useMemo(
|
|
23560
|
+
() => ({
|
|
23561
|
+
scale: FAST_SPATIAL_SPRING,
|
|
23562
|
+
x: {
|
|
23563
|
+
duration: 0.35,
|
|
23564
|
+
ease: "easeInOut"
|
|
23565
|
+
}
|
|
23566
|
+
}),
|
|
23567
|
+
[]
|
|
23568
|
+
);
|
|
23569
|
+
const mainContent = /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center justify-center h-full gap-2", children: [
|
|
23570
|
+
icon && /* @__PURE__ */ jsx(
|
|
23571
|
+
"span",
|
|
23572
|
+
{
|
|
23573
|
+
className: "shrink-0 inline-flex items-center justify-center",
|
|
23574
|
+
style: {
|
|
23575
|
+
width: ToolbarToggleButtonTokens.IconSize,
|
|
23576
|
+
height: ToolbarToggleButtonTokens.IconSize
|
|
23577
|
+
},
|
|
23578
|
+
children: icon
|
|
23579
|
+
}
|
|
23580
|
+
),
|
|
23581
|
+
children && (typeof children === "string" || typeof children === "number" ? /* @__PURE__ */ jsx("span", { children }) : children)
|
|
23582
|
+
] });
|
|
23583
|
+
if (asChild) {
|
|
23584
|
+
const child = React59.Children.only(children);
|
|
23585
|
+
const childContent = child.props.children;
|
|
23586
|
+
const innerChildContent = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23587
|
+
ripple && /* @__PURE__ */ jsx(
|
|
23588
|
+
Ripple,
|
|
23589
|
+
{
|
|
23590
|
+
ripples,
|
|
23591
|
+
onRippleDone: removeRipple,
|
|
23592
|
+
disabled
|
|
23593
|
+
}
|
|
23594
|
+
),
|
|
23595
|
+
/* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center h-full gap-2", children: icon ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
23596
|
+
/* @__PURE__ */ jsx(
|
|
23597
|
+
"span",
|
|
23598
|
+
{
|
|
23599
|
+
className: "shrink-0 inline-flex items-center justify-center",
|
|
23600
|
+
style: {
|
|
23601
|
+
width: ToolbarToggleButtonTokens.IconSize,
|
|
23602
|
+
height: ToolbarToggleButtonTokens.IconSize
|
|
23603
|
+
},
|
|
23604
|
+
children: icon
|
|
23605
|
+
}
|
|
23606
|
+
),
|
|
23607
|
+
typeof childContent === "string" || typeof childContent === "number" ? /* @__PURE__ */ jsx("span", { children: childContent }) : childContent
|
|
23608
|
+
] }) : childContent })
|
|
23609
|
+
] });
|
|
23610
|
+
const strippedProps = __spreadValues({}, props);
|
|
23611
|
+
for (const key of MOTION_PROP_KEYS2) delete strippedProps[key];
|
|
23612
|
+
delete strippedProps.children;
|
|
23613
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
|
|
23614
|
+
Slot,
|
|
23615
|
+
__spreadProps(__spreadValues({
|
|
23616
|
+
ref,
|
|
23617
|
+
"aria-pressed": selected,
|
|
23618
|
+
className: combinedClassName,
|
|
23619
|
+
onPointerDown: handlePointerDown
|
|
23620
|
+
}, strippedProps), {
|
|
23621
|
+
children: React59.cloneElement(child, { children: innerChildContent })
|
|
23622
|
+
})
|
|
23623
|
+
) });
|
|
23624
|
+
}
|
|
23625
|
+
return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsxs(
|
|
23626
|
+
m.button,
|
|
23627
|
+
__spreadProps(__spreadValues({
|
|
23628
|
+
ref,
|
|
23629
|
+
type,
|
|
23630
|
+
"aria-pressed": selected,
|
|
23631
|
+
disabled,
|
|
23632
|
+
whileTap: whileTapConfig,
|
|
23633
|
+
transition: transitionConfig,
|
|
23634
|
+
onPointerDown: handlePointerDown,
|
|
23635
|
+
className: combinedClassName
|
|
23636
|
+
}, props), {
|
|
23637
|
+
children: [
|
|
23638
|
+
ripple && /* @__PURE__ */ jsx(
|
|
23639
|
+
Ripple,
|
|
23640
|
+
{
|
|
23641
|
+
ripples,
|
|
23642
|
+
onRippleDone: removeRipple,
|
|
23643
|
+
disabled
|
|
23644
|
+
}
|
|
23645
|
+
),
|
|
23646
|
+
mainContent
|
|
23647
|
+
]
|
|
23648
|
+
})
|
|
23649
|
+
) });
|
|
23650
|
+
}
|
|
23651
|
+
);
|
|
23652
|
+
ToolbarToggleButton.displayName = "ToolbarToggleButton";
|
|
23064
23653
|
|
|
23065
23654
|
// src/ui/tooltip/tooltip.tokens.ts
|
|
23066
23655
|
var TooltipTokens = {
|
|
@@ -23663,6 +24252,6 @@ function TooltipBox({
|
|
|
23663
24252
|
] });
|
|
23664
24253
|
}
|
|
23665
24254
|
|
|
23666
|
-
export { ANGLE_EPSILON, APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, BUTTON_COLOR_TOKENS, BUTTON_SIZE_TOKENS, Badge, BadgedBox, BottomAppBar, BottomDockedToolbar, BottomSheet, BottomSheetModal, Button, ButtonGroup, CHECK_ICON_VARIANTS, Card, Checkbox, Chip, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, Cubic, DISTANCE_EPSILON, DIVIDER_COLOR, DIVIDER_PADDING, DP_CLASSES, DP_COLORS, DP_SHAPE, DP_SIZE, DatePicker, DatePickerDialog, DatePickerInput, DateRangePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogFullScreenContent, DialogHeader, DialogIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DockedToolbar, DragHandle, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, ElevatedSplitButtonLeading, ElevatedSplitButtonTrailing, ElevatedSplitButtonTrailingUncheckable, ExtendedFAB, FAB, FABMenu, FABMenuItem, FABPosition, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FLOAT_PI, FilledSplitButtonLeading, FilledSplitButtonTrailing, FilledSplitButtonTrailingUncheckable, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, Icon, IconButton, LIST_TOKENS, LargeFlexibleAppBar, List, ListContext, ListDivider, ListItem, LoadingIndicator, MD3CornerRadius, MD3Shapes, MD3ThemeProvider, MD3_EXPRESSIVE_FONT_VARIATION, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MaterialSymbolsPreconnect, MeasuredPolygon, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, Morph, MutableCubic, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, OutlinedSplitButtonLeading, OutlinedSplitButtonTrailing, OutlinedSplitButtonTrailingUncheckable, PlainTooltip, ProgressIndicator, RadioButton, RadioGroup, RangeSlider, RichTooltip, Ripple, RoundedPolygon, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Scrim, ScrollArea, ScrollAreaScrollbar, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, ShapeIcon, ShapeMedia, ShapeMediaServer, ShapeSvg, SideSheet, SideSheetModal, Slider, SliderColors, SliderTokens, SmallAppBar, Snackbar, SnackbarHost, SnackbarProvider, SplitButtonLayout, SplitButtonLeading, SplitButtonTrailing, SplitButtonTrailingUncheckable, SubMenu, Switch, SwitchColors, SwitchTokens, TP_CLASSES, TP_COLORS, TP_SHAPE, TP_SIZE, Tab, TableOfContents, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, Text, TextField, TimeInput, TimePicker, TimePickerDialog, ToggleFAB, TonalSplitButtonLeading, TonalSplitButtonTrailing, TonalSplitButtonTrailingUncheckable, ToolbarDivider, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonTokens, TooltipBox, TooltipCaretShape, TooltipTokens, TriStateCheckbox, TypeScaleTokens, Typography, TypographyContext, TypographyKeyTokens, TypographyProvider, TypographyTokens, UNROUNDED, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, addPoints, appBarTypography, applyTheme, buildWavePath, circle, clockwise, cn, convex, cornerFeature, cornerRounding, createDoubleMapper, directionVector, distance, distanceSquared, dividePoint, dotProduct, edgeFeature, featureMapper, generateM3Theme, getDirection, getDistance, getDistanceSquared, getExpressiveShape, getListItemHeight, interpolate, interpolatePath, lerpPoint, pill, pillStar, point, positiveModulo, radialToCartesian, rectangle, resolveMode, rotate90, scalePoint, shouldTopAlign, square, standardFloatingToolbarColors, star, subtractPoints, toClipPath, toSvgPath, transformFeature, transformPoint, useAppBarScroll, useBottomSheet, useRipple as useDOMRipple, useDatePickerState, useDateRangePickerState, useFloatingToolbarScrollBehavior, useListContext, useMediaQuery, useMenuContext, useRipple2 as useRipple, useRippleState, useSearchKeyboard, useShapeMorph, useSnackbar, useSnackbarState, useTheme, useThemeMode, useTimePickerState, useTooltipPosition, useTooltipState, useTypography, vibrantFloatingToolbarColors };
|
|
24255
|
+
export { ANGLE_EPSILON, APP_BAR_BOTTOM_SPRING, APP_BAR_COLORS, APP_BAR_COLOR_TRANSITION, APP_BAR_ENTER_ALWAYS_SPRING, APP_BAR_TITLE_FADE, AppBarColumn, AppBarOverflowIndicator, AppBarRow, AppBarTokens, BUTTON_COLOR_TOKENS, BUTTON_SIZE_TOKENS, Badge, BadgedBox, BottomAppBar, BottomDockedToolbar, BottomSheet, BottomSheetModal, Button, ButtonGroup, CHECK_ICON_VARIANTS, Card, Checkbox, Chip, CodeBlock, ContextMenu, ContextMenuContent, ContextMenuTrigger, Cubic, DISTANCE_EPSILON, DIVIDER_COLOR, DIVIDER_PADDING, DP_CLASSES, DP_COLORS, DP_SHAPE, DP_SIZE, DatePicker, DatePickerDialog, DatePickerInput, DateRangePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogFullScreenContent, DialogHeader, DialogIcon, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DockedToolbar, DragHandle, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, ElevatedSplitButtonLeading, ElevatedSplitButtonTrailing, ElevatedSplitButtonTrailingUncheckable, ExtendedFAB, FAB, FABMenu, FABMenuItem, FABPosition, FAST_EFFECTS_TRANSITION, FAST_SPATIAL_SPRING, FLOAT_PI, FilledSplitButtonLeading, FilledSplitButtonTrailing, FilledSplitButtonTrailingUncheckable, GROUP_SHAPES, HorizontalFloatingToolbar, HorizontalFloatingToolbarWithFab, ITEM_SHAPE_CLASSES, Icon, IconButton, LIST_TOKENS, LargeFlexibleAppBar, List, ListContext, ListDivider, ListItem, LoadingIndicator, MD3CornerRadius, MD3Shapes, MD3ThemeProvider, MD3_EXPRESSIVE_FONT_VARIATION, MENU_CHECK_ICON_SIZE, MENU_CONTAINER_VARIANTS, MENU_GROUP_GAP, MENU_ICON_SIZE, MENU_ITEM_MIN_HEIGHT, MENU_MAX_WIDTH, MENU_MIN_WIDTH, MaterialSymbolsPreconnect, MeasuredPolygon, MediumFlexibleAppBar, Menu, MenuContent, MenuDivider, MenuGroup, MenuItem, MenuProvider, MenuTrigger, Morph, MutableCubic, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, OutlinedSplitButtonLeading, OutlinedSplitButtonTrailing, OutlinedSplitButtonTrailingUncheckable, PlainTooltip, ProgressIndicator, RadioButton, RadioGroup, RangeSlider, RichTooltip, Ripple, RoundedPolygon, SEARCH_BAR_EXPAND_SPRING, SEARCH_COLORS, SEARCH_DOCKED_REVEAL_SPRING, SEARCH_FULLSCREEN_SPRING, SEARCH_TYPOGRAPHY, SEARCH_VIEW_SPRING, STANDARD_COLORS, SUBMENU_CONTAINER_VARIANTS, Scrim, ScrollArea, ScrollAreaScrollbar, Search, SearchAppBar, SearchBar, SearchTokens, SearchView, SearchViewContainer, SearchViewDocked, SearchViewFullScreen, ShapeIcon, ShapeMedia, ShapeMediaServer, ShapeSvg, SideSheet, SideSheetModal, Slider, SliderColors, SliderTokens, SmallAppBar, Snackbar, SnackbarHost, SnackbarProvider, SplitButtonLayout, SplitButtonLeading, SplitButtonTrailing, SplitButtonTrailingUncheckable, SubMenu, Switch, SwitchColors, SwitchTokens, TP_CLASSES, TP_COLORS, TP_SHAPE, TP_SIZE, Tab, TableOfContents, Tabs, TabsColors, TabsContent, TabsList, TabsTokens, Text, TextField, TimeInput, TimePicker, TimePickerDialog, ToggleFAB, TonalSplitButtonLeading, TonalSplitButtonTrailing, TonalSplitButtonTrailingUncheckable, ToolbarDivider, ToolbarDividerTokens, ToolbarIconButton, ToolbarIconButtonTokens, ToolbarToggleButton, ToolbarToggleButtonTokens, TooltipBox, TooltipCaretShape, TooltipTokens, TriStateCheckbox, TypeScaleTokens, Typography, TypographyContext, TypographyKeyTokens, TypographyProvider, TypographyTokens, UNROUNDED, VIBRANT_COLORS, VerticalFloatingToolbar, VerticalFloatingToolbarWithFab, VerticalMenu, VerticalMenuContent, VerticalMenuDivider, VerticalMenuGroup, addPoints, appBarTypography, applyTheme, buildWavePath, circle, clockwise, cn, convex, cornerFeature, cornerRounding, createDoubleMapper, createMd3ExpressiveTheme, directionVector, distance, distanceSquared, dividePoint, dotProduct, edgeFeature, featureMapper, generateM3Theme, getDirection, getDistance, getDistanceSquared, getExpressiveShape, getListItemHeight, getToolbarColors, interpolate, interpolatePath, lerpPoint, pill, pillStar, point, positiveModulo, radialToCartesian, rectangle, resolveMode, rotate90, scalePoint, shouldTopAlign, square, standardFloatingToolbarColors, star, subtractPoints, surfaceContainerHighFloatingToolbarColors, surfaceContainerHighestFloatingToolbarColors, tertiaryContainerFloatingToolbarColors, toClipPath, toSvgPath, transformFeature, transformPoint, useAppBarScroll, useBottomSheet, useRipple as useDOMRipple, useDatePickerState, useDateRangePickerState, useFloatingToolbarScrollBehavior, useListContext, useMediaQuery, useMenuContext, useRipple2 as useRipple, useRippleState, useSearchKeyboard, useShapeMorph, useSnackbar, useSnackbarState, useTheme, useThemeMode, useTimePickerState, useTooltipPosition, useTooltipState, useTypography, vibrantFloatingToolbarColors, xrFloatingToolbarColors };
|
|
23667
24256
|
//# sourceMappingURL=index.mjs.map
|
|
23668
24257
|
//# sourceMappingURL=index.mjs.map
|