@bug-on/m3-expressive 1.3.3 → 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 +21 -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-DyEy8H9Z.d.ts → core-Cckt8qEm.d.ts} +11 -8
- package/dist/{core-D8FdHY6I.d.mts → core-DDfG4pym.d.mts} +11 -8
- package/dist/core.d.mts +2 -3
- package/dist/core.d.ts +2 -3
- package/dist/core.js +7 -7
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +8 -7
- 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 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +270 -127
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +271 -127
- 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 +18 -18
package/dist/pickers.mjs
CHANGED
|
@@ -2147,7 +2147,7 @@ var IconComponent = React6.forwardRef(
|
|
|
2147
2147
|
(_a, ref) => {
|
|
2148
2148
|
var _b = _a, {
|
|
2149
2149
|
name,
|
|
2150
|
-
variant = "
|
|
2150
|
+
variant = "rounded",
|
|
2151
2151
|
fill = 0,
|
|
2152
2152
|
weight = 400,
|
|
2153
2153
|
grade = 0,
|
|
@@ -2210,7 +2210,7 @@ var IconComponent = React6.forwardRef(
|
|
|
2210
2210
|
);
|
|
2211
2211
|
IconComponent.displayName = "Icon";
|
|
2212
2212
|
var Icon = React6.memo(IconComponent);
|
|
2213
|
-
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";
|
|
2213
|
+
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";
|
|
2214
2214
|
var CalendarHeader = ({
|
|
2215
2215
|
displayedMonthMs,
|
|
2216
2216
|
activeSelector,
|
|
@@ -2236,57 +2236,70 @@ var CalendarHeader = ({
|
|
|
2236
2236
|
timeZone: "UTC"
|
|
2237
2237
|
}).format(date);
|
|
2238
2238
|
const yearLabel = String(date.getUTCFullYear());
|
|
2239
|
-
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 px-6 pb-
|
|
2240
|
-
/* @__PURE__ */ 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 }),
|
|
2241
|
-
/* @__PURE__ */ jsx(
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
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
|
-
|
|
2239
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1 px-4 sm:px-6 pb-3 pt-5 w-full", children: [
|
|
2240
|
+
/* @__PURE__ */ 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 }),
|
|
2241
|
+
/* @__PURE__ */ jsx(
|
|
2242
|
+
"div",
|
|
2243
|
+
{
|
|
2244
|
+
className: "mb-2 leading-tight text-[26px] sm:text-[32px] font-(--md-typescale-headline-large-weight,400) text-m3-on-surface-variant truncate",
|
|
2245
|
+
title: typeof headline === "string" ? headline : void 0,
|
|
2246
|
+
children: headline
|
|
2247
|
+
}
|
|
2248
|
+
),
|
|
2249
|
+
displayMode === "picker" && /* @__PURE__ */ jsxs("div", { className: "flex min-h-10 items-center justify-between gap-0.5 w-full overflow-hidden", children: [
|
|
2250
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-0.5 min-w-0 shrink", children: [
|
|
2251
|
+
activeSelector === null && /* @__PURE__ */ jsx(
|
|
2252
|
+
IconButton,
|
|
2253
|
+
{
|
|
2254
|
+
onClick: onPrev,
|
|
2255
|
+
"aria-label": "Previous month",
|
|
2256
|
+
disabled: !canNavigatePrev,
|
|
2257
|
+
size: "xs",
|
|
2258
|
+
className: "shrink-0",
|
|
2259
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" })
|
|
2260
|
+
}
|
|
2261
|
+
),
|
|
2262
|
+
/* @__PURE__ */ jsxs(
|
|
2263
|
+
"button",
|
|
2264
|
+
{
|
|
2265
|
+
type: "button",
|
|
2266
|
+
onClick: () => onToggleSelector("month"),
|
|
2267
|
+
"aria-expanded": activeSelector === "month",
|
|
2268
|
+
"aria-controls": "date-picker-selection",
|
|
2269
|
+
className: cn(
|
|
2270
|
+
selectorClassName,
|
|
2271
|
+
"min-w-0 max-w-[125px] shrink",
|
|
2272
|
+
activeSelector === "month" && "bg-m3-on-surface/8"
|
|
2273
|
+
),
|
|
2274
|
+
title: monthLabel,
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: monthLabel }),
|
|
2277
|
+
/* @__PURE__ */ jsx(
|
|
2278
|
+
Icon,
|
|
2279
|
+
{
|
|
2280
|
+
name: "arrow_drop_down",
|
|
2281
|
+
className: cn(
|
|
2282
|
+
"text-[20px] shrink-0 transition-transform duration-200",
|
|
2283
|
+
activeSelector === "month" && "rotate-180"
|
|
2284
|
+
)
|
|
2285
|
+
}
|
|
2286
|
+
)
|
|
2287
|
+
]
|
|
2288
|
+
}
|
|
2289
|
+
),
|
|
2290
|
+
activeSelector === null && /* @__PURE__ */ jsx(
|
|
2291
|
+
IconButton,
|
|
2292
|
+
{
|
|
2293
|
+
onClick: onNext,
|
|
2294
|
+
"aria-label": "Next month",
|
|
2295
|
+
disabled: !canNavigateNext,
|
|
2296
|
+
size: "xs",
|
|
2297
|
+
className: "shrink-0",
|
|
2298
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" })
|
|
2299
|
+
}
|
|
2300
|
+
)
|
|
2301
|
+
] }),
|
|
2302
|
+
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-0.5 shrink-0", children: [
|
|
2290
2303
|
activeSelector === null && /* @__PURE__ */ jsx(
|
|
2291
2304
|
IconButton,
|
|
2292
2305
|
{
|
|
@@ -2294,6 +2307,7 @@ var CalendarHeader = ({
|
|
|
2294
2307
|
"aria-label": "Previous year",
|
|
2295
2308
|
disabled: !canNavigatePreviousYear,
|
|
2296
2309
|
size: "xs",
|
|
2310
|
+
className: "shrink-0",
|
|
2297
2311
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron_left" })
|
|
2298
2312
|
}
|
|
2299
2313
|
),
|
|
@@ -2306,16 +2320,18 @@ var CalendarHeader = ({
|
|
|
2306
2320
|
"aria-controls": "date-picker-selection",
|
|
2307
2321
|
className: cn(
|
|
2308
2322
|
selectorClassName,
|
|
2323
|
+
"shrink-0",
|
|
2309
2324
|
activeSelector === "year" && "bg-m3-on-surface/8"
|
|
2310
2325
|
),
|
|
2326
|
+
title: yearLabel,
|
|
2311
2327
|
children: [
|
|
2312
|
-
yearLabel,
|
|
2328
|
+
/* @__PURE__ */ jsx("span", { children: yearLabel }),
|
|
2313
2329
|
/* @__PURE__ */ jsx(
|
|
2314
2330
|
Icon,
|
|
2315
2331
|
{
|
|
2316
2332
|
name: "arrow_drop_down",
|
|
2317
2333
|
className: cn(
|
|
2318
|
-
"text-[20px] transition-transform duration-200",
|
|
2334
|
+
"text-[20px] shrink-0 transition-transform duration-200",
|
|
2319
2335
|
activeSelector === "year" && "rotate-180"
|
|
2320
2336
|
)
|
|
2321
2337
|
}
|
|
@@ -2330,6 +2346,7 @@ var CalendarHeader = ({
|
|
|
2330
2346
|
"aria-label": "Next year",
|
|
2331
2347
|
disabled: !canNavigateNextYear,
|
|
2332
2348
|
size: "xs",
|
|
2349
|
+
className: "shrink-0",
|
|
2333
2350
|
children: /* @__PURE__ */ jsx(Icon, { name: "chevron_right" })
|
|
2334
2351
|
}
|
|
2335
2352
|
),
|
|
@@ -2339,6 +2356,7 @@ var CalendarHeader = ({
|
|
|
2339
2356
|
onClick: onToggleMode,
|
|
2340
2357
|
"aria-label": "Switch to text input",
|
|
2341
2358
|
size: "xs",
|
|
2359
|
+
className: "shrink-0",
|
|
2342
2360
|
children: /* @__PURE__ */ jsx(Icon, { name: "keyboard" })
|
|
2343
2361
|
}
|
|
2344
2362
|
)
|
|
@@ -2350,7 +2368,7 @@ var CalendarHeader = ({
|
|
|
2350
2368
|
onClick: onToggleMode,
|
|
2351
2369
|
"aria-label": "Switch to calendar",
|
|
2352
2370
|
size: "xs",
|
|
2353
|
-
className: "self-end",
|
|
2371
|
+
className: "self-end shrink-0",
|
|
2354
2372
|
children: /* @__PURE__ */ jsx(Icon, { name: "calendar_month" })
|
|
2355
2373
|
}
|
|
2356
2374
|
),
|
|
@@ -2397,14 +2415,14 @@ var MonthPickerList = ({
|
|
|
2397
2415
|
onClick: () => onMonthSelect(month),
|
|
2398
2416
|
className: cn(
|
|
2399
2417
|
"flex min-h-12 w-full items-center gap-4 px-6 text-left",
|
|
2400
|
-
"text-
|
|
2418
|
+
"text-(length:--md-typescale-body-large-size,16px)",
|
|
2401
2419
|
"text-m3-on-surface transition-m3-fast-effects",
|
|
2402
2420
|
"hover:bg-m3-on-surface/8 focus-visible:outline-2 focus-visible:outline-m3-primary",
|
|
2403
2421
|
isSelected && "bg-m3-secondary-container text-m3-on-secondary-container"
|
|
2404
2422
|
),
|
|
2405
2423
|
children: [
|
|
2406
|
-
/* @__PURE__ */ jsx("span", { className: "w-6", "aria-hidden": true, children: isSelected && /* @__PURE__ */ jsx(Icon, { name: "check", className: "text-[20px]" }) }),
|
|
2407
|
-
getMonthLabel(month, locale.locale)
|
|
2424
|
+
/* @__PURE__ */ jsx("span", { className: "w-6 shrink-0", "aria-hidden": true, children: isSelected && /* @__PURE__ */ jsx(Icon, { name: "check", className: "text-[20px]" }) }),
|
|
2425
|
+
/* @__PURE__ */ jsx("span", { className: "truncate", children: getMonthLabel(month, locale.locale) })
|
|
2408
2426
|
]
|
|
2409
2427
|
},
|
|
2410
2428
|
month
|
|
@@ -2482,7 +2500,9 @@ var DatePicker = ({
|
|
|
2482
2500
|
showModeToggle = true,
|
|
2483
2501
|
title,
|
|
2484
2502
|
headline,
|
|
2485
|
-
className
|
|
2503
|
+
className,
|
|
2504
|
+
width,
|
|
2505
|
+
maxWidth
|
|
2486
2506
|
}) => {
|
|
2487
2507
|
const {
|
|
2488
2508
|
selectedDateMs,
|
|
@@ -2563,7 +2583,10 @@ var DatePicker = ({
|
|
|
2563
2583
|
"fieldset",
|
|
2564
2584
|
{
|
|
2565
2585
|
className: cn("flex flex-col select-none", className),
|
|
2566
|
-
style: {
|
|
2586
|
+
style: {
|
|
2587
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
|
|
2588
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
2589
|
+
},
|
|
2567
2590
|
"aria-label": computedAriaLabel,
|
|
2568
2591
|
children: [
|
|
2569
2592
|
/* @__PURE__ */ jsx("legend", { className: "sr-only", children: computedAriaLabel }),
|
|
@@ -3101,7 +3124,9 @@ var DatePickerDialog = ({
|
|
|
3101
3124
|
dismissButton,
|
|
3102
3125
|
children,
|
|
3103
3126
|
className,
|
|
3104
|
-
title = "Select date"
|
|
3127
|
+
title = "Select date",
|
|
3128
|
+
width,
|
|
3129
|
+
maxWidth
|
|
3105
3130
|
}) => {
|
|
3106
3131
|
return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (v) => !v && onDismiss(), children: /* @__PURE__ */ jsxs(DialogPortal, { open, children: [
|
|
3107
3132
|
/* @__PURE__ */ jsx(RadixDialog.Overlay, { asChild: true, forceMount: true, children: /* @__PURE__ */ jsx(
|
|
@@ -3137,7 +3162,10 @@ var DatePickerDialog = ({
|
|
|
3137
3162
|
"elevation-3",
|
|
3138
3163
|
className
|
|
3139
3164
|
),
|
|
3140
|
-
style: {
|
|
3165
|
+
style: {
|
|
3166
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(calc(100vw - 32px), 360px)",
|
|
3167
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
3168
|
+
},
|
|
3141
3169
|
initial: PICKER_CONTENT_ANIM.initial,
|
|
3142
3170
|
animate: PICKER_CONTENT_ANIM.animate,
|
|
3143
3171
|
exit: PICKER_CONTENT_ANIM.exit,
|
|
@@ -3161,7 +3189,9 @@ var DateRangePicker = ({
|
|
|
3161
3189
|
state,
|
|
3162
3190
|
showModeToggle = false,
|
|
3163
3191
|
title,
|
|
3164
|
-
className
|
|
3192
|
+
className,
|
|
3193
|
+
width,
|
|
3194
|
+
maxWidth
|
|
3165
3195
|
}) => {
|
|
3166
3196
|
const {
|
|
3167
3197
|
selectedStartMs,
|
|
@@ -3233,7 +3263,10 @@ var DateRangePicker = ({
|
|
|
3233
3263
|
"fieldset",
|
|
3234
3264
|
{
|
|
3235
3265
|
className: cn("flex flex-col select-none", className),
|
|
3236
|
-
style: {
|
|
3266
|
+
style: {
|
|
3267
|
+
width: typeof width === "number" ? `${width}px` : width != null ? width : "min(100%, 360px)",
|
|
3268
|
+
maxWidth: typeof maxWidth === "number" ? `${maxWidth}px` : maxWidth
|
|
3269
|
+
},
|
|
3237
3270
|
"aria-label": computedAriaLabel,
|
|
3238
3271
|
children: [
|
|
3239
3272
|
/* @__PURE__ */ jsx("legend", { className: "sr-only", children: computedAriaLabel }),
|