@bug-on/m3-expressive 1.3.4 → 1.3.6
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 +19 -0
- package/README.md +31 -7
- package/dist/assets/material-symbols-cdn.css +17 -23
- package/dist/buttons.js +129 -35
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +129 -35
- package/dist/buttons.mjs.map +1 -1
- package/dist/{core-COvZHQ_k.d.ts → core-Cckt8qEm.d.ts} +10 -4
- package/dist/{core-CRkixy1y.d.mts → core-DDfG4pym.d.mts} +10 -4
- package/dist/core.d.mts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +6 -5
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +6 -5
- package/dist/core.mjs.map +1 -1
- package/dist/fading-blur-mask--uZbBKLj.d.mts +77 -0
- package/dist/fading-blur-mask--uZbBKLj.d.ts +77 -0
- package/dist/feedback.js +1 -1
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +1 -1
- 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 +17 -7
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +17 -7
- package/dist/forms.mjs.map +1 -1
- package/dist/index.d.mts +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +988 -309
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +984 -310
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +5 -3
- package/dist/layout.d.ts +5 -3
- package/dist/layout.js +61 -6
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +61 -7
- package/dist/layout.mjs.map +1 -1
- package/dist/material-symbols-cdn.css +17 -23
- package/dist/{md3-expressive-shapes-CPcfl_Hf.d.mts → md3-expressive-shapes-wk_98LJh.d.mts} +20 -1
- package/dist/{md3-expressive-shapes-CPcfl_Hf.d.ts → md3-expressive-shapes-wk_98LJh.d.ts} +20 -1
- package/dist/navigation.d.mts +26 -84
- package/dist/navigation.d.ts +26 -84
- package/dist/navigation.js +95 -29
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +95 -29
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.d.mts +4 -2
- package/dist/overlays.d.ts +4 -2
- package/dist/overlays.js +85 -44
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +85 -44
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.d.mts +12 -0
- package/dist/pickers.d.ts +12 -0
- package/dist/pickers.js +186 -120
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +186 -120
- package/dist/pickers.mjs.map +1 -1
- package/dist/shapes.d.mts +141 -15
- package/dist/shapes.d.ts +141 -15
- package/dist/shapes.js +618 -126
- package/dist/shapes.js.map +1 -1
- package/dist/shapes.mjs +614 -127
- package/dist/shapes.mjs.map +1 -1
- package/dist/{side-sheet-modal-64FGhDxL.d.mts → side-sheet-modal-BycxrabB.d.mts} +70 -0
- package/dist/{side-sheet-modal-Bd5Qqvp9.d.ts → side-sheet-modal-Cw4vemKx.d.ts} +70 -0
- package/dist/{text-field-4OlT9o8s.d.mts → text-field-B1fLh5Sh.d.mts} +22 -3
- package/dist/{text-field-DARNdj14.d.ts → text-field-C0VQLp8Y.d.ts} +22 -3
- package/dist/{typography-339RV6v7.d.mts → typography-CKTjvlZ4.d.mts} +25 -0
- package/dist/{typography-339RV6v7.d.ts → typography-CKTjvlZ4.d.ts} +25 -0
- package/dist/typography.css +1 -1
- package/llms-full.txt +24 -13
- package/llms.txt +11 -6
- package/package.json +3 -3
package/dist/pickers.d.mts
CHANGED
|
@@ -248,6 +248,10 @@ interface DatePickerProps {
|
|
|
248
248
|
headline?: React.ReactNode;
|
|
249
249
|
/** Additional CSS class for container */
|
|
250
250
|
className?: string;
|
|
251
|
+
/** Custom width for the picker container */
|
|
252
|
+
width?: number | string;
|
|
253
|
+
/** Custom maxWidth for the picker container */
|
|
254
|
+
maxWidth?: number | string;
|
|
251
255
|
}
|
|
252
256
|
/** Props for `DateRangePicker` component */
|
|
253
257
|
interface DateRangePickerProps {
|
|
@@ -265,6 +269,10 @@ interface DateRangePickerProps {
|
|
|
265
269
|
title?: React.ReactNode;
|
|
266
270
|
/** Additional CSS class */
|
|
267
271
|
className?: string;
|
|
272
|
+
/** Custom width for the picker container */
|
|
273
|
+
width?: number | string;
|
|
274
|
+
/** Custom maxWidth for the picker container */
|
|
275
|
+
maxWidth?: number | string;
|
|
268
276
|
}
|
|
269
277
|
/** Props for `DatePickerDialog` component */
|
|
270
278
|
interface DatePickerDialogProps {
|
|
@@ -287,6 +295,10 @@ interface DatePickerDialogProps {
|
|
|
287
295
|
children: React.ReactNode;
|
|
288
296
|
/** Additional CSS class for dialog panel */
|
|
289
297
|
className?: string;
|
|
298
|
+
/** Custom width for the dialog container. Defaults to `min(calc(100vw - 32px), 360px)` */
|
|
299
|
+
width?: number | string;
|
|
300
|
+
/** Custom maxWidth constraint for the dialog container */
|
|
301
|
+
maxWidth?: number | string;
|
|
290
302
|
}
|
|
291
303
|
/** Props for `DatePickerInput` component */
|
|
292
304
|
interface DatePickerInputProps {
|
package/dist/pickers.d.ts
CHANGED
|
@@ -248,6 +248,10 @@ interface DatePickerProps {
|
|
|
248
248
|
headline?: React.ReactNode;
|
|
249
249
|
/** Additional CSS class for container */
|
|
250
250
|
className?: string;
|
|
251
|
+
/** Custom width for the picker container */
|
|
252
|
+
width?: number | string;
|
|
253
|
+
/** Custom maxWidth for the picker container */
|
|
254
|
+
maxWidth?: number | string;
|
|
251
255
|
}
|
|
252
256
|
/** Props for `DateRangePicker` component */
|
|
253
257
|
interface DateRangePickerProps {
|
|
@@ -265,6 +269,10 @@ interface DateRangePickerProps {
|
|
|
265
269
|
title?: React.ReactNode;
|
|
266
270
|
/** Additional CSS class */
|
|
267
271
|
className?: string;
|
|
272
|
+
/** Custom width for the picker container */
|
|
273
|
+
width?: number | string;
|
|
274
|
+
/** Custom maxWidth for the picker container */
|
|
275
|
+
maxWidth?: number | string;
|
|
268
276
|
}
|
|
269
277
|
/** Props for `DatePickerDialog` component */
|
|
270
278
|
interface DatePickerDialogProps {
|
|
@@ -287,6 +295,10 @@ interface DatePickerDialogProps {
|
|
|
287
295
|
children: React.ReactNode;
|
|
288
296
|
/** Additional CSS class for dialog panel */
|
|
289
297
|
className?: string;
|
|
298
|
+
/** Custom width for the dialog container. Defaults to `min(calc(100vw - 32px), 360px)` */
|
|
299
|
+
width?: number | string;
|
|
300
|
+
/** Custom maxWidth constraint for the dialog container */
|
|
301
|
+
maxWidth?: number | string;
|
|
290
302
|
}
|
|
291
303
|
/** Props for `DatePickerInput` component */
|
|
292
304
|
interface DatePickerInputProps {
|
package/dist/pickers.js
CHANGED
|
@@ -2170,7 +2170,7 @@ var IconComponent = React6__namespace.forwardRef(
|
|
|
2170
2170
|
(_a, ref) => {
|
|
2171
2171
|
var _b = _a, {
|
|
2172
2172
|
name,
|
|
2173
|
-
variant = "
|
|
2173
|
+
variant = "rounded",
|
|
2174
2174
|
fill = 0,
|
|
2175
2175
|
weight = 400,
|
|
2176
2176
|
grade = 0,
|
|
@@ -2233,7 +2233,7 @@ var IconComponent = React6__namespace.forwardRef(
|
|
|
2233
2233
|
);
|
|
2234
2234
|
IconComponent.displayName = "Icon";
|
|
2235
2235
|
var Icon = React6__namespace.memo(IconComponent);
|
|
2236
|
-
var selectorClassName = "flex items-center gap-1 rounded-m3-full px-2 py-1 text-[length:var(--md-typescale-title-small-size,14px)] font-[number:var(--md-typescale-title-small-weight,500)] text-m3-on-surface transition-m3-fast-effects hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary";
|
|
2236
|
+
var selectorClassName = "flex items-center gap-1 rounded-m3-full px-2 py-1 text-[length:var(--md-typescale-title-small-size,14px)] font-[number:var(--md-typescale-title-small-weight,500)] text-m3-on-surface transition-m3-fast-effects hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary whitespace-nowrap select-none min-w-0";
|
|
2237
2237
|
var CalendarHeader = ({
|
|
2238
2238
|
displayedMonthMs,
|
|
2239
2239
|
activeSelector,
|
|
@@ -2259,57 +2259,70 @@ var CalendarHeader = ({
|
|
|
2259
2259
|
timeZone: "UTC"
|
|
2260
2260
|
}).format(date);
|
|
2261
2261
|
const yearLabel = String(date.getUTCFullYear());
|
|
2262
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 px-6 pb-
|
|
2263
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-(length:--md-typescale-label-large-size,14px) font-(--md-typescale-label-large-weight,500) text-m3-on-surface-variant", children: title }),
|
|
2264
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2262
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1 px-4 sm:px-6 pb-3 pt-5 w-full", children: [
|
|
2263
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-(length:--md-typescale-label-large-size,14px) font-(--md-typescale-label-large-weight,500) text-m3-on-surface-variant truncate", children: title }),
|
|
2264
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2265
|
+
"div",
|
|
2266
|
+
{
|
|
2267
|
+
className: "mb-2 leading-tight text-[26px] sm:text-[32px] font-(--md-typescale-headline-large-weight,400) text-m3-on-surface-variant truncate",
|
|
2268
|
+
title: typeof headline === "string" ? headline : void 0,
|
|
2269
|
+
children: headline
|
|
2270
|
+
}
|
|
2271
|
+
),
|
|
2272
|
+
displayMode === "picker" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-h-10 items-center justify-between gap-0.5 w-full overflow-hidden", children: [
|
|
2273
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-0.5 min-w-0 shrink", children: [
|
|
2274
|
+
activeSelector === null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2275
|
+
IconButton,
|
|
2276
|
+
{
|
|
2277
|
+
onClick: onPrev,
|
|
2278
|
+
"aria-label": "Previous month",
|
|
2279
|
+
disabled: !canNavigatePrev,
|
|
2280
|
+
size: "xs",
|
|
2281
|
+
className: "shrink-0",
|
|
2282
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron_left" })
|
|
2283
|
+
}
|
|
2284
|
+
),
|
|
2285
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2286
|
+
"button",
|
|
2287
|
+
{
|
|
2288
|
+
type: "button",
|
|
2289
|
+
onClick: () => onToggleSelector("month"),
|
|
2290
|
+
"aria-expanded": activeSelector === "month",
|
|
2291
|
+
"aria-controls": "date-picker-selection",
|
|
2292
|
+
className: cn(
|
|
2293
|
+
selectorClassName,
|
|
2294
|
+
"min-w-0 max-w-[125px] shrink",
|
|
2295
|
+
activeSelector === "month" && "bg-m3-on-surface/8"
|
|
2296
|
+
),
|
|
2297
|
+
title: monthLabel,
|
|
2298
|
+
children: [
|
|
2299
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: monthLabel }),
|
|
2300
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2301
|
+
Icon,
|
|
2302
|
+
{
|
|
2303
|
+
name: "arrow_drop_down",
|
|
2304
|
+
className: cn(
|
|
2305
|
+
"text-[20px] shrink-0 transition-transform duration-200",
|
|
2306
|
+
activeSelector === "month" && "rotate-180"
|
|
2307
|
+
)
|
|
2308
|
+
}
|
|
2309
|
+
)
|
|
2310
|
+
]
|
|
2311
|
+
}
|
|
2312
|
+
),
|
|
2313
|
+
activeSelector === null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2314
|
+
IconButton,
|
|
2315
|
+
{
|
|
2316
|
+
onClick: onNext,
|
|
2317
|
+
"aria-label": "Next month",
|
|
2318
|
+
disabled: !canNavigateNext,
|
|
2319
|
+
size: "xs",
|
|
2320
|
+
className: "shrink-0",
|
|
2321
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron_right" })
|
|
2322
|
+
}
|
|
2323
|
+
)
|
|
2324
|
+
] }),
|
|
2325
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-0.5 shrink-0", children: [
|
|
2313
2326
|
activeSelector === null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2314
2327
|
IconButton,
|
|
2315
2328
|
{
|
|
@@ -2317,6 +2330,7 @@ var CalendarHeader = ({
|
|
|
2317
2330
|
"aria-label": "Previous year",
|
|
2318
2331
|
disabled: !canNavigatePreviousYear,
|
|
2319
2332
|
size: "xs",
|
|
2333
|
+
className: "shrink-0",
|
|
2320
2334
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron_left" })
|
|
2321
2335
|
}
|
|
2322
2336
|
),
|
|
@@ -2329,16 +2343,18 @@ var CalendarHeader = ({
|
|
|
2329
2343
|
"aria-controls": "date-picker-selection",
|
|
2330
2344
|
className: cn(
|
|
2331
2345
|
selectorClassName,
|
|
2346
|
+
"shrink-0",
|
|
2332
2347
|
activeSelector === "year" && "bg-m3-on-surface/8"
|
|
2333
2348
|
),
|
|
2349
|
+
title: yearLabel,
|
|
2334
2350
|
children: [
|
|
2335
|
-
yearLabel,
|
|
2351
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: yearLabel }),
|
|
2336
2352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2337
2353
|
Icon,
|
|
2338
2354
|
{
|
|
2339
2355
|
name: "arrow_drop_down",
|
|
2340
2356
|
className: cn(
|
|
2341
|
-
"text-[20px] transition-transform duration-200",
|
|
2357
|
+
"text-[20px] shrink-0 transition-transform duration-200",
|
|
2342
2358
|
activeSelector === "year" && "rotate-180"
|
|
2343
2359
|
)
|
|
2344
2360
|
}
|
|
@@ -2353,6 +2369,7 @@ var CalendarHeader = ({
|
|
|
2353
2369
|
"aria-label": "Next year",
|
|
2354
2370
|
disabled: !canNavigateNextYear,
|
|
2355
2371
|
size: "xs",
|
|
2372
|
+
className: "shrink-0",
|
|
2356
2373
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "chevron_right" })
|
|
2357
2374
|
}
|
|
2358
2375
|
),
|
|
@@ -2362,6 +2379,7 @@ var CalendarHeader = ({
|
|
|
2362
2379
|
onClick: onToggleMode,
|
|
2363
2380
|
"aria-label": "Switch to text input",
|
|
2364
2381
|
size: "xs",
|
|
2382
|
+
className: "shrink-0",
|
|
2365
2383
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "keyboard" })
|
|
2366
2384
|
}
|
|
2367
2385
|
)
|
|
@@ -2373,7 +2391,7 @@ var CalendarHeader = ({
|
|
|
2373
2391
|
onClick: onToggleMode,
|
|
2374
2392
|
"aria-label": "Switch to calendar",
|
|
2375
2393
|
size: "xs",
|
|
2376
|
-
className: "self-end",
|
|
2394
|
+
className: "self-end shrink-0",
|
|
2377
2395
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "calendar_month" })
|
|
2378
2396
|
}
|
|
2379
2397
|
),
|
|
@@ -2420,14 +2438,14 @@ var MonthPickerList = ({
|
|
|
2420
2438
|
onClick: () => onMonthSelect(month),
|
|
2421
2439
|
className: cn(
|
|
2422
2440
|
"flex min-h-12 w-full items-center gap-4 px-6 text-left",
|
|
2423
|
-
"text-
|
|
2441
|
+
"text-(length:--md-typescale-body-large-size,16px)",
|
|
2424
2442
|
"text-m3-on-surface transition-m3-fast-effects",
|
|
2425
2443
|
"hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary",
|
|
2426
2444
|
isSelected && "bg-m3-secondary-container text-m3-on-secondary-container"
|
|
2427
2445
|
),
|
|
2428
2446
|
children: [
|
|
2429
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-6", "aria-hidden": true, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "text-[20px]" }) }),
|
|
2430
|
-
getMonthLabel(month, locale.locale)
|
|
2447
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-6 shrink-0", "aria-hidden": true, children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "check", className: "text-[20px]" }) }),
|
|
2448
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: getMonthLabel(month, locale.locale) })
|
|
2431
2449
|
]
|
|
2432
2450
|
},
|
|
2433
2451
|
month
|
|
@@ -2505,7 +2523,9 @@ var DatePicker = ({
|
|
|
2505
2523
|
showModeToggle = true,
|
|
2506
2524
|
title,
|
|
2507
2525
|
headline,
|
|
2508
|
-
className
|
|
2526
|
+
className,
|
|
2527
|
+
width,
|
|
2528
|
+
maxWidth
|
|
2509
2529
|
}) => {
|
|
2510
2530
|
const {
|
|
2511
2531
|
selectedDateMs,
|
|
@@ -2586,7 +2606,10 @@ var DatePicker = ({
|
|
|
2586
2606
|
"fieldset",
|
|
2587
2607
|
{
|
|
2588
2608
|
className: cn("flex flex-col select-none", className),
|
|
2589
|
-
style: {
|
|
2609
|
+
style: {
|
|
2610
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
|
|
2611
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
2612
|
+
},
|
|
2590
2613
|
"aria-label": computedAriaLabel,
|
|
2591
2614
|
children: [
|
|
2592
2615
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "sr-only", children: computedAriaLabel }),
|
|
@@ -2954,45 +2977,64 @@ var DialogOverlay = React6__namespace.forwardRef((_a, ref) => {
|
|
|
2954
2977
|
) }));
|
|
2955
2978
|
});
|
|
2956
2979
|
DialogOverlay.displayName = "DialogOverlay";
|
|
2957
|
-
var
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
)
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2980
|
+
var DEFAULT_CLOSE_BTN_PROPS = {
|
|
2981
|
+
size: "sm",
|
|
2982
|
+
colorStyle: "standard",
|
|
2983
|
+
className: "absolute right-4 top-4",
|
|
2984
|
+
"aria-label": "Close"
|
|
2985
|
+
};
|
|
2986
|
+
var DialogContent = React6__namespace.forwardRef(
|
|
2987
|
+
(_a, ref) => {
|
|
2988
|
+
var _b = _a, {
|
|
2989
|
+
className,
|
|
2990
|
+
children,
|
|
2991
|
+
hideCloseButton = false,
|
|
2992
|
+
closeButtonProps,
|
|
2993
|
+
closeButton
|
|
2994
|
+
} = _b, props = __objRest(_b, [
|
|
2995
|
+
"className",
|
|
2996
|
+
"children",
|
|
2997
|
+
"hideCloseButton",
|
|
2998
|
+
"closeButtonProps",
|
|
2999
|
+
"closeButton"
|
|
3000
|
+
]);
|
|
3001
|
+
const closeAriaLabel = (() => {
|
|
3002
|
+
var _a2, _b2, _c;
|
|
3003
|
+
if (closeButton == null) {
|
|
3004
|
+
return (_a2 = closeButtonProps == null ? void 0 : closeButtonProps["aria-label"]) != null ? _a2 : DEFAULT_CLOSE_BTN_PROPS["aria-label"];
|
|
3005
|
+
}
|
|
3006
|
+
const el = closeButton;
|
|
3007
|
+
return (_c = (_b2 = el == null ? void 0 : el.props) == null ? void 0 : _b2["aria-label"]) != null ? _c : "Close";
|
|
3008
|
+
})();
|
|
3009
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3010
|
+
RadixDialog__namespace.Content,
|
|
3011
|
+
__spreadProps(__spreadValues({
|
|
3012
|
+
ref,
|
|
3013
|
+
asChild: true,
|
|
3014
|
+
"aria-describedby": void 0
|
|
3015
|
+
}, props), {
|
|
3016
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3017
|
+
react.m.div,
|
|
3018
|
+
__spreadProps(__spreadValues({
|
|
3019
|
+
className: cn(
|
|
3020
|
+
"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
|
|
3021
|
+
"w-[calc(100%-2rem)] max-w-140",
|
|
3022
|
+
"rounded-[28px] bg-m3-surface-container-high p-6",
|
|
3023
|
+
"shadow-lg outline-none focus-visible:ring-2 focus-visible:ring-m3-primary",
|
|
3024
|
+
className
|
|
3025
|
+
),
|
|
3026
|
+
role: "dialog"
|
|
3027
|
+
}, MD3_CONTENT_ANIM), {
|
|
3028
|
+
children: [
|
|
3029
|
+
children,
|
|
3030
|
+
closeButton != null ? /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Close, { asChild: true, "aria-label": closeAriaLabel, children: closeButton }) : !hideCloseButton ? /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Close, { asChild: true, "aria-label": closeAriaLabel, children: /* @__PURE__ */ jsxRuntime.jsx(IconButton, __spreadProps(__spreadValues(__spreadValues({}, DEFAULT_CLOSE_BTN_PROPS), closeButtonProps), { children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", "aria-hidden": "true" }) })) }) : null
|
|
3031
|
+
]
|
|
3032
|
+
})
|
|
3033
|
+
)
|
|
3034
|
+
})
|
|
3035
|
+
);
|
|
3036
|
+
}
|
|
3037
|
+
);
|
|
2996
3038
|
DialogContent.displayName = "DialogContent";
|
|
2997
3039
|
var DialogIcon = React6__namespace.forwardRef((_a, ref) => {
|
|
2998
3040
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
@@ -3059,6 +3101,8 @@ var DialogFullScreenContent = React6__namespace.forwardRef(
|
|
|
3059
3101
|
title,
|
|
3060
3102
|
actionLabel,
|
|
3061
3103
|
onAction,
|
|
3104
|
+
actionButtonProps,
|
|
3105
|
+
closeButtonProps,
|
|
3062
3106
|
showDivider
|
|
3063
3107
|
} = _b, props = __objRest(_b, [
|
|
3064
3108
|
"className",
|
|
@@ -3066,8 +3110,11 @@ var DialogFullScreenContent = React6__namespace.forwardRef(
|
|
|
3066
3110
|
"title",
|
|
3067
3111
|
"actionLabel",
|
|
3068
3112
|
"onAction",
|
|
3113
|
+
"actionButtonProps",
|
|
3114
|
+
"closeButtonProps",
|
|
3069
3115
|
"showDivider"
|
|
3070
3116
|
]);
|
|
3117
|
+
var _a2;
|
|
3071
3118
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3072
3119
|
RadixDialog__namespace.Content,
|
|
3073
3120
|
__spreadProps(__spreadValues({
|
|
@@ -3087,16 +3134,33 @@ var DialogFullScreenContent = React6__namespace.forwardRef(
|
|
|
3087
3134
|
}, MD3_FULLSCREEN_ANIM), {
|
|
3088
3135
|
children: [
|
|
3089
3136
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center px-4 h-14 gap-2 bg-m3-surface", children: [
|
|
3090
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3137
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3138
|
+
RadixDialog__namespace.Close,
|
|
3139
|
+
{
|
|
3140
|
+
asChild: true,
|
|
3141
|
+
"aria-label": (_a2 = closeButtonProps == null ? void 0 : closeButtonProps["aria-label"]) != null ? _a2 : "Close",
|
|
3142
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3143
|
+
IconButton,
|
|
3144
|
+
__spreadProps(__spreadValues({
|
|
3145
|
+
size: "sm",
|
|
3146
|
+
colorStyle: "standard",
|
|
3147
|
+
"aria-label": "Close"
|
|
3148
|
+
}, closeButtonProps), {
|
|
3149
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "close", "aria-hidden": "true" })
|
|
3150
|
+
})
|
|
3151
|
+
)
|
|
3152
|
+
}
|
|
3153
|
+
),
|
|
3091
3154
|
title && /* @__PURE__ */ jsxRuntime.jsx(DialogTitle, { className: "flex-1 text-[22px] leading-7 font-medium truncate pr-2", children: title }),
|
|
3092
3155
|
actionLabel && onAction && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3093
3156
|
"button",
|
|
3094
|
-
{
|
|
3157
|
+
__spreadProps(__spreadValues({
|
|
3095
3158
|
type: "button",
|
|
3096
3159
|
onClick: onAction,
|
|
3097
|
-
className: "text-sm font-medium text-m3-primary px-3 py-2 rounded-full hover:bg-m3-primary/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary transition-colors whitespace-nowrap"
|
|
3160
|
+
className: "text-sm font-medium text-m3-primary px-3 py-2 rounded-full hover:bg-m3-primary/8 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-m3-primary transition-colors whitespace-nowrap disabled:opacity-[0.38] disabled:pointer-events-none"
|
|
3161
|
+
}, actionButtonProps), {
|
|
3098
3162
|
children: actionLabel
|
|
3099
|
-
}
|
|
3163
|
+
})
|
|
3100
3164
|
)
|
|
3101
3165
|
] }),
|
|
3102
3166
|
showDivider && /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-m3-outline-variant w-full shrink-0 m-0" }),
|
|
@@ -3124,7 +3188,9 @@ var DatePickerDialog = ({
|
|
|
3124
3188
|
dismissButton,
|
|
3125
3189
|
children,
|
|
3126
3190
|
className,
|
|
3127
|
-
title = "Select date"
|
|
3191
|
+
title = "Select date",
|
|
3192
|
+
width,
|
|
3193
|
+
maxWidth
|
|
3128
3194
|
}) => {
|
|
3129
3195
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: (v) => !v && onDismiss(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { open, children: [
|
|
3130
3196
|
/* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3160,7 +3226,10 @@ var DatePickerDialog = ({
|
|
|
3160
3226
|
"elevation-3",
|
|
3161
3227
|
className
|
|
3162
3228
|
),
|
|
3163
|
-
style: {
|
|
3229
|
+
style: {
|
|
3230
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(calc(100vw - 32px), 360px)",
|
|
3231
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
3232
|
+
},
|
|
3164
3233
|
initial: PICKER_CONTENT_ANIM.initial,
|
|
3165
3234
|
animate: PICKER_CONTENT_ANIM.animate,
|
|
3166
3235
|
exit: PICKER_CONTENT_ANIM.exit,
|
|
@@ -3184,7 +3253,9 @@ var DateRangePicker = ({
|
|
|
3184
3253
|
state,
|
|
3185
3254
|
showModeToggle = false,
|
|
3186
3255
|
title,
|
|
3187
|
-
className
|
|
3256
|
+
className,
|
|
3257
|
+
width,
|
|
3258
|
+
maxWidth
|
|
3188
3259
|
}) => {
|
|
3189
3260
|
const {
|
|
3190
3261
|
selectedStartMs,
|
|
@@ -3256,7 +3327,10 @@ var DateRangePicker = ({
|
|
|
3256
3327
|
"fieldset",
|
|
3257
3328
|
{
|
|
3258
3329
|
className: cn("flex flex-col select-none", className),
|
|
3259
|
-
style: {
|
|
3330
|
+
style: {
|
|
3331
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
|
|
3332
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
3333
|
+
},
|
|
3260
3334
|
"aria-label": computedAriaLabel,
|
|
3261
3335
|
children: [
|
|
3262
3336
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "sr-only", children: computedAriaLabel }),
|
|
@@ -4082,21 +4156,13 @@ var normalizeAngle = (angle) => {
|
|
|
4082
4156
|
return a;
|
|
4083
4157
|
};
|
|
4084
4158
|
var angleToHour12 = (angle) => {
|
|
4085
|
-
const
|
|
4086
|
-
const
|
|
4087
|
-
const hour = Math.round((angle + totalOffset) / RADIANS_PER_HOUR) % 12;
|
|
4159
|
+
const normalized = normalizeAngle(angle + QUARTER_CIRCLE);
|
|
4160
|
+
const hour = Math.round(normalized / RADIANS_PER_HOUR) % 12;
|
|
4088
4161
|
return hour === 0 ? 12 : hour;
|
|
4089
4162
|
};
|
|
4090
|
-
var angleToMinute = (angle,
|
|
4091
|
-
if (snap) {
|
|
4092
|
-
const minuteOffset = RADIANS_PER_MINUTE / 2;
|
|
4093
|
-
const totalOffset = minuteOffset + QUARTER_CIRCLE;
|
|
4094
|
-
const raw2 = Math.round((angle + totalOffset) / RADIANS_PER_MINUTE) % 60;
|
|
4095
|
-
return raw2 < 0 ? raw2 + 60 : raw2;
|
|
4096
|
-
}
|
|
4163
|
+
var angleToMinute = (angle, _snap = true) => {
|
|
4097
4164
|
const normalized = normalizeAngle(angle + QUARTER_CIRCLE);
|
|
4098
|
-
|
|
4099
|
-
return raw < 0 ? raw + 60 : raw;
|
|
4165
|
+
return Math.round(normalized / RADIANS_PER_MINUTE) % 60;
|
|
4100
4166
|
};
|
|
4101
4167
|
var getSelectorPosition = (angle, selection, is24hour, isPm) => {
|
|
4102
4168
|
const useInner = is24hour && isPm && selection === "hour";
|