@bug-on/m3-expressive 1.3.4 → 1.3.5
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 +13 -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.js +1 -1
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +1 -1
- package/dist/forms.mjs.map +1 -1
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +266 -122
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +266 -122
- 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/navigation.d.mts +25 -83
- package/dist/navigation.d.ts +25 -83
- package/dist/navigation.js +22 -9
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +22 -9
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +1 -1
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +1 -1
- 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 +98 -65
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +98 -65
- package/dist/pickers.mjs.map +1 -1
- 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 +17 -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 }),
|
|
@@ -3124,7 +3147,9 @@ var DatePickerDialog = ({
|
|
|
3124
3147
|
dismissButton,
|
|
3125
3148
|
children,
|
|
3126
3149
|
className,
|
|
3127
|
-
title = "Select date"
|
|
3150
|
+
title = "Select date",
|
|
3151
|
+
width,
|
|
3152
|
+
maxWidth
|
|
3128
3153
|
}) => {
|
|
3129
3154
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open, onOpenChange: (v) => !v && onDismiss(), children: /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { open, children: [
|
|
3130
3155
|
/* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3160,7 +3185,10 @@ var DatePickerDialog = ({
|
|
|
3160
3185
|
"elevation-3",
|
|
3161
3186
|
className
|
|
3162
3187
|
),
|
|
3163
|
-
style: {
|
|
3188
|
+
style: {
|
|
3189
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(calc(100vw - 32px), 360px)",
|
|
3190
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
3191
|
+
},
|
|
3164
3192
|
initial: PICKER_CONTENT_ANIM.initial,
|
|
3165
3193
|
animate: PICKER_CONTENT_ANIM.animate,
|
|
3166
3194
|
exit: PICKER_CONTENT_ANIM.exit,
|
|
@@ -3184,7 +3212,9 @@ var DateRangePicker = ({
|
|
|
3184
3212
|
state,
|
|
3185
3213
|
showModeToggle = false,
|
|
3186
3214
|
title,
|
|
3187
|
-
className
|
|
3215
|
+
className,
|
|
3216
|
+
width,
|
|
3217
|
+
maxWidth
|
|
3188
3218
|
}) => {
|
|
3189
3219
|
const {
|
|
3190
3220
|
selectedStartMs,
|
|
@@ -3256,7 +3286,10 @@ var DateRangePicker = ({
|
|
|
3256
3286
|
"fieldset",
|
|
3257
3287
|
{
|
|
3258
3288
|
className: cn("flex flex-col select-none", className),
|
|
3259
|
-
style: {
|
|
3289
|
+
style: {
|
|
3290
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
|
|
3291
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
3292
|
+
},
|
|
3260
3293
|
"aria-label": computedAriaLabel,
|
|
3261
3294
|
children: [
|
|
3262
3295
|
/* @__PURE__ */ jsxRuntime.jsx("legend", { className: "sr-only", children: computedAriaLabel }),
|