@tinybigui/react 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -2118,277 +2118,332 @@ var FAB = React.forwardRef(
2118
2118
  }
2119
2119
  );
2120
2120
  FAB.displayName = "FAB";
2121
- var textFieldContainerVariants = classVarianceAuthority.cva(
2121
+ var textFieldRootVariants = classVarianceAuthority.cva(["relative inline-flex flex-col"], {
2122
+ variants: {
2123
+ fullWidth: {
2124
+ true: "w-full",
2125
+ false: "w-auto"
2126
+ }
2127
+ },
2128
+ defaultVariants: {
2129
+ fullWidth: false
2130
+ }
2131
+ });
2132
+ var textFieldFieldVariants = classVarianceAuthority.cva(
2122
2133
  [
2123
- // Base container styles
2124
- "relative inline-flex flex-col"
2134
+ "relative flex items-center w-full min-h-14",
2135
+ // Cursor — disabled via group-data
2136
+ "group-data-[disabled]/text-field:cursor-not-allowed",
2137
+ "group-data-[disabled]/text-field:pointer-events-none"
2125
2138
  ],
2126
2139
  {
2127
2140
  variants: {
2128
- fullWidth: {
2129
- true: "w-full",
2130
- false: "w-auto"
2141
+ variant: {
2142
+ filled: [
2143
+ "rounded-t-xs bg-surface-container-highest",
2144
+ // Disabled: background fades to on-surface/4
2145
+ "group-data-[disabled]/text-field:bg-on-surface/4"
2146
+ ],
2147
+ outlined: ["rounded-xs bg-transparent"]
2131
2148
  }
2132
2149
  },
2133
2150
  defaultVariants: {
2134
- fullWidth: false
2151
+ variant: "filled"
2135
2152
  }
2136
2153
  }
2137
2154
  );
2138
- var textFieldWrapperVariants = classVarianceAuthority.cva(
2155
+ var textFieldStateLayerVariants = classVarianceAuthority.cva([
2156
+ "absolute inset-0 rounded-t-xs pointer-events-none opacity-0",
2157
+ "bg-on-surface",
2158
+ // Effects transition — no spatial overshoot on opacity
2159
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
2160
+ // Hover: 8%
2161
+ "group-data-[hovered]/text-field:opacity-8",
2162
+ // Focus: 10% (focus wins over hover via cascade order — placed after)
2163
+ "group-data-[focused]/text-field:opacity-10",
2164
+ // No state layer when disabled
2165
+ "group-data-[disabled]/text-field:hidden"
2166
+ ]);
2167
+ var textFieldActiveIndicatorVariants = classVarianceAuthority.cva([
2168
+ "absolute bottom-0 left-0 right-0 pointer-events-none",
2169
+ // Spatial transition: height is a spatial property
2170
+ "transition-[height,background-color]",
2171
+ "duration-spring-standard-fast-spatial ease-spring-standard-fast-spatial",
2172
+ // Base
2173
+ "h-px bg-on-surface-variant",
2174
+ // Hover
2175
+ "group-data-[hovered]/text-field:bg-on-surface",
2176
+ // Focused — 2px + primary color (focused placed after hovered to win cascade)
2177
+ "group-data-[focused]/text-field:h-0.5 group-data-[focused]/text-field:bg-primary",
2178
+ // Invalid
2179
+ "group-data-[invalid]/text-field:bg-error",
2180
+ // Invalid + focused
2181
+ "group-data-[invalid]/text-field:group-data-[focused]/text-field:bg-error",
2182
+ // Disabled: hidden
2183
+ "group-data-[disabled]/text-field:hidden"
2184
+ ]);
2185
+ var textFieldOutlineVariants = classVarianceAuthority.cva([
2186
+ "absolute inset-0 rounded-xs m-0 px-2 pointer-events-none",
2187
+ "border border-outline",
2188
+ // Effects transition for color; spatial for border-width
2189
+ "transition-[border-color,border-width]",
2190
+ "duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
2191
+ // Hover
2192
+ "group-data-[hovered]/text-field:border-on-surface",
2193
+ // Focused — 2px + primary color
2194
+ "group-data-[focused]/text-field:border-2 group-data-[focused]/text-field:border-primary",
2195
+ // Invalid
2196
+ "group-data-[invalid]/text-field:border-error",
2197
+ // Invalid + focused
2198
+ "group-data-[invalid]/text-field:group-data-[focused]/text-field:border-2",
2199
+ "group-data-[invalid]/text-field:group-data-[focused]/text-field:border-error",
2200
+ // Disabled
2201
+ "group-data-[disabled]/text-field:border-on-surface/12"
2202
+ ]);
2203
+ var textFieldNotchVariants = classVarianceAuthority.cva([
2204
+ "invisible whitespace-nowrap text-body-small px-1",
2205
+ // 0 width when not floating (no gap)
2206
+ "max-w-0 overflow-hidden",
2207
+ // Full width when floating (gap opens)
2208
+ "group-data-[float]/text-field:max-w-full",
2209
+ // Spatial transition for max-width change
2210
+ "transition-[max-width] duration-spring-standard-fast-spatial ease-spring-standard-fast-spatial"
2211
+ ]);
2212
+ var textFieldLabelVariants = classVarianceAuthority.cva(
2139
2213
  [
2140
- // Base wrapper styles
2141
- "relative inline-flex items-center w-full",
2142
- "transition-all duration-200",
2143
- "rounded-t"
2214
+ "absolute pointer-events-none origin-top-left select-none",
2215
+ "text-body-large text-on-surface-variant",
2216
+ // Spatial + effects both use standard fast — no overshoot on font/color
2217
+ "transition-[transform,font-size,color,line-height]",
2218
+ "duration-spring-standard-fast-spatial ease-spring-standard-fast-spatial",
2219
+ // Disabled
2220
+ "group-data-[disabled]/text-field:text-on-surface/38",
2221
+ // Invalid (placed after default, before focused so focused invalid wins)
2222
+ "group-data-[invalid]/text-field:text-error",
2223
+ // Focused (singly-chained wins by cascade order)
2224
+ "group-data-[focused]/text-field:text-primary",
2225
+ // Invalid + focused — doubly-chained, wins over single-chained focused
2226
+ "group-data-[invalid]/text-field:group-data-[focused]/text-field:text-error"
2144
2227
  ],
2145
2228
  {
2146
2229
  variants: {
2147
2230
  variant: {
2148
- filled: ["bg-surface-container-highest", "border-b-2 border-on-surface-variant"],
2149
- outlined: ["bg-transparent", "border border-outline", "rounded-b"]
2150
- },
2151
- size: {
2152
- small: "min-h-10",
2153
- medium: "min-h-12",
2154
- large: "min-h-14"
2155
- },
2156
- disabled: {
2157
- true: ["cursor-not-allowed", "opacity-38"],
2158
- false: ""
2159
- },
2160
- error: {
2161
- true: "",
2162
- false: ""
2163
- },
2164
- focused: {
2165
- true: "",
2166
- false: ""
2231
+ /**
2232
+ * Filled: label rests at center (top-1/2 -translate-y-1/2).
2233
+ * When floating: moves up to top-2 (8dp) with body-small size.
2234
+ */
2235
+ filled: [
2236
+ "top-1/2 -translate-y-1/2 left-4",
2237
+ // Floated position — sits in the top 8dp zone
2238
+ "group-data-[float]/text-field:top-2 group-data-[float]/text-field:-translate-y-0",
2239
+ "group-data-[float]/text-field:text-body-small",
2240
+ // Leading-icon offset
2241
+ "group-data-[with-leading-icon]/text-field:left-[52px]"
2242
+ ],
2243
+ /**
2244
+ * Outlined: label rests at center (top-1/2 -translate-y-1/2).
2245
+ * When floating: moves up to sit on the top border (-translate-y-1/2 from top-0).
2246
+ */
2247
+ outlined: [
2248
+ "top-1/2 -translate-y-1/2 left-3",
2249
+ // bg-surface ensures label text punches through the border
2250
+ "bg-surface px-1",
2251
+ // Floated: sits on the top border
2252
+ "group-data-[float]/text-field:top-0 group-data-[float]/text-field:-translate-y-1/2",
2253
+ "group-data-[float]/text-field:text-body-small",
2254
+ // Leading-icon offset
2255
+ "group-data-[with-leading-icon]/text-field:left-[52px]"
2256
+ ]
2167
2257
  }
2168
2258
  },
2169
- compoundVariants: [
2170
- // FILLED VARIANT - Focused state
2171
- {
2172
- variant: "filled",
2173
- focused: true,
2174
- error: false,
2175
- className: "border-primary"
2176
- },
2177
- // FILLED VARIANT - Error state
2178
- {
2179
- variant: "filled",
2180
- error: true,
2181
- className: "border-error"
2182
- },
2183
- // FILLED VARIANT - Hover state (handled via group-hover in parent)
2184
- {
2185
- variant: "filled",
2186
- disabled: false,
2187
- className: "hover:bg-on-surface/[0.08]"
2188
- },
2189
- // OUTLINED VARIANT - Focused state
2190
- {
2191
- variant: "outlined",
2192
- focused: true,
2193
- error: false,
2194
- className: "border-2 border-primary"
2195
- },
2196
- // OUTLINED VARIANT - Error state
2197
- {
2198
- variant: "outlined",
2199
- error: true,
2200
- className: "border-2 border-error"
2201
- },
2202
- // OUTLINED VARIANT - Hover state
2203
- {
2204
- variant: "outlined",
2205
- disabled: false,
2206
- className: "hover:border-on-surface"
2207
- }
2208
- ],
2209
2259
  defaultVariants: {
2210
- variant: "filled",
2211
- size: "medium",
2212
- disabled: false,
2213
- error: false,
2214
- focused: false
2260
+ variant: "filled"
2215
2261
  }
2216
2262
  }
2217
2263
  );
2218
2264
  var textFieldInputVariants = classVarianceAuthority.cva(
2219
2265
  [
2220
- // Base input styles
2221
- "w-full bg-transparent outline-none",
2222
- "text-on-surface text-base",
2223
- "placeholder:text-on-surface-variant placeholder:opacity-60",
2224
- "transition-colors duration-200"
2266
+ "relative z-10 w-full bg-transparent outline-none border-none",
2267
+ "text-body-large text-on-surface",
2268
+ "placeholder:text-on-surface-variant",
2269
+ // Placeholder hidden unless field is floating (avoids overlap with label)
2270
+ "placeholder:opacity-0",
2271
+ "group-data-[float]/text-field:placeholder:opacity-100",
2272
+ // Disabled
2273
+ "group-data-[disabled]/text-field:text-on-surface/38",
2274
+ "group-data-[disabled]/text-field:cursor-not-allowed",
2275
+ // Readonly
2276
+ "group-data-[readonly]/text-field:cursor-default",
2277
+ // Effects transition for color
2278
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects"
2225
2279
  ],
2226
2280
  {
2227
2281
  variants: {
2228
2282
  variant: {
2229
- filled: "px-4",
2230
- outlined: "px-4"
2231
- },
2232
- size: {
2233
- small: "h-10 py-2 text-sm",
2234
- medium: "h-12 py-3 text-base",
2235
- large: "h-14 py-4 text-lg"
2236
- },
2237
- disabled: {
2238
- true: "cursor-not-allowed",
2239
- false: ""
2240
- },
2241
- hasLeadingIcon: {
2242
- true: "pl-12",
2243
- false: ""
2244
- },
2245
- hasTrailingIcon: {
2246
- true: "pr-12",
2247
- false: ""
2283
+ /**
2284
+ * Filled: top padding creates room for floating label (label rests at 8dp).
2285
+ * Horizontal padding: 16dp left / 16dp right — but yielded to prefix/suffix
2286
+ * when they are present so the affix handles the edge spacing instead.
2287
+ */
2288
+ filled: [
2289
+ "pt-6 pb-2 px-4",
2290
+ // No label present: vertically center
2291
+ "group-data-[no-label]/text-field:py-4",
2292
+ // Leading icon horizontal offset
2293
+ "group-data-[with-leading-icon]/text-field:pl-[52px]",
2294
+ // Trailing icon horizontal offset
2295
+ "group-data-[with-trailing-icon]/text-field:pr-[52px]",
2296
+ // Prefix present: prefix handles left edge — remove input's left padding
2297
+ "group-data-[with-prefix]/text-field:pl-0",
2298
+ // Leading icon + prefix together: compound wins over both singles
2299
+ "group-data-[with-leading-icon]/text-field:group-data-[with-prefix]/text-field:pl-0",
2300
+ // Suffix present: suffix handles right edge — remove input's right padding
2301
+ "group-data-[with-suffix]/text-field:pr-0",
2302
+ // Trailing icon + suffix together: compound wins over both singles
2303
+ "group-data-[with-trailing-icon]/text-field:group-data-[with-suffix]/text-field:pr-0"
2304
+ ],
2305
+ /**
2306
+ * Outlined: label sits on the border, no extra top padding needed.
2307
+ * Horizontal padding: 16dp — yielded to prefix/suffix when present.
2308
+ */
2309
+ outlined: [
2310
+ "py-4 px-4",
2311
+ // Leading icon horizontal offset
2312
+ "group-data-[with-leading-icon]/text-field:pl-[52px]",
2313
+ // Trailing icon horizontal offset
2314
+ "group-data-[with-trailing-icon]/text-field:pr-[52px]",
2315
+ // Prefix present: prefix handles left edge
2316
+ "group-data-[with-prefix]/text-field:pl-0",
2317
+ "group-data-[with-leading-icon]/text-field:group-data-[with-prefix]/text-field:pl-0",
2318
+ // Suffix present: suffix handles right edge
2319
+ "group-data-[with-suffix]/text-field:pr-0",
2320
+ "group-data-[with-trailing-icon]/text-field:group-data-[with-suffix]/text-field:pr-0"
2321
+ ]
2248
2322
  },
2249
2323
  multiline: {
2250
- true: "resize-y",
2251
- false: ""
2324
+ true: "resize-y min-h-[1.5rem]",
2325
+ false: "h-full"
2252
2326
  }
2253
2327
  },
2254
2328
  defaultVariants: {
2255
2329
  variant: "filled",
2256
- size: "medium",
2257
- disabled: false,
2258
- hasLeadingIcon: false,
2259
- hasTrailingIcon: false,
2260
2330
  multiline: false
2261
2331
  }
2262
2332
  }
2263
2333
  );
2264
- var textFieldLabelVariants = classVarianceAuthority.cva(
2334
+ var textFieldIconVariants = classVarianceAuthority.cva(
2265
2335
  [
2266
- // Base label styles
2267
- "absolute left-4 transition-all duration-200 pointer-events-none",
2268
- "text-on-surface-variant origin-top-left"
2336
+ "absolute z-10 flex items-center justify-center size-6 pointer-events-none",
2337
+ "text-on-surface-variant",
2338
+ // Effects transition
2339
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
2340
+ // Disabled
2341
+ "group-data-[disabled]/text-field:text-on-surface/38"
2269
2342
  ],
2270
2343
  {
2271
2344
  variants: {
2272
- variant: {
2273
- filled: "top-2.5",
2274
- outlined: "top-2.5 bg-surface px-1"
2275
- },
2276
- size: {
2277
- small: "text-sm",
2278
- medium: "text-base",
2279
- large: "text-lg"
2280
- },
2281
- floating: {
2282
- true: "-translate-y-5 scale-75",
2283
- false: "scale-100"
2284
- },
2285
- focused: {
2286
- true: "text-primary",
2287
- false: ""
2288
- },
2289
- error: {
2290
- true: "text-error",
2291
- false: ""
2292
- },
2293
- disabled: {
2294
- true: "text-on-surface/38",
2295
- false: ""
2296
- },
2297
- hasLeadingIcon: {
2298
- true: "left-12",
2299
- false: ""
2345
+ position: {
2346
+ leading: "left-3",
2347
+ trailing: [
2348
+ "right-3",
2349
+ // Trailing → error color when invalid
2350
+ "group-data-[invalid]/text-field:text-error"
2351
+ ]
2300
2352
  }
2301
2353
  },
2302
- compoundVariants: [
2303
- // Outlined variant floating label positioning
2304
- {
2305
- variant: "outlined",
2306
- floating: true,
2307
- className: "top-2.5"
2308
- }
2309
- ],
2310
2354
  defaultVariants: {
2311
- variant: "filled",
2312
- size: "medium",
2313
- floating: false,
2314
- focused: false,
2315
- error: false,
2316
- disabled: false,
2317
- hasLeadingIcon: false
2355
+ position: "leading"
2318
2356
  }
2319
2357
  }
2320
2358
  );
2321
- var textFieldIconVariants = classVarianceAuthority.cva(
2359
+ var textFieldAffixVariants = classVarianceAuthority.cva(
2322
2360
  [
2323
- // Base icon styles
2324
- "absolute flex items-center justify-center",
2325
- "text-on-surface-variant transition-colors duration-200",
2326
- "pointer-events-none"
2361
+ "relative z-10 text-body-large text-on-surface-variant select-none shrink-0",
2362
+ "opacity-0 pointer-events-none",
2363
+ // Visible once label is floated
2364
+ "group-data-[float]/text-field:opacity-100 group-data-[float]/text-field:pointer-events-auto",
2365
+ // Effects transition
2366
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
2367
+ // Disabled
2368
+ "group-data-[disabled]/text-field:text-on-surface/38"
2327
2369
  ],
2328
2370
  {
2329
2371
  variants: {
2330
- position: {
2331
- leading: "left-3",
2332
- trailing: "right-3"
2333
- },
2334
- size: {
2335
- small: "w-5 h-5",
2336
- medium: "w-6 h-6",
2337
- large: "w-7 h-7"
2372
+ variant: {
2373
+ /**
2374
+ * Filled: mirror the input's pt-6 pb-2 so the text sits in the same
2375
+ * vertical zone. When no label is present, the input uses py-4 — match
2376
+ * that too so the affix stays centred with the input text.
2377
+ */
2378
+ filled: [
2379
+ "pt-6 pb-2",
2380
+ "group-data-[no-label]/text-field:pt-4 group-data-[no-label]/text-field:pb-4"
2381
+ ],
2382
+ /**
2383
+ * Outlined: input uses py-4 and h-full; items-center on the content
2384
+ * column already centres the naturally-sized affix at the same 28px
2385
+ * midpoint as the input text. No extra vertical padding needed.
2386
+ */
2387
+ outlined: []
2338
2388
  },
2339
- disabled: {
2340
- true: "opacity-38",
2341
- false: ""
2389
+ position: {
2390
+ /**
2391
+ * Prefix: sits before the input in the flex row.
2392
+ * pl-4 aligns the left text edge to the 16dp field margin.
2393
+ * With a leading icon that shifts to 52dp to clear the icon.
2394
+ * pr-0.5 is a small gap between prefix text and the input cursor.
2395
+ */
2396
+ prefix: ["pl-4", "group-data-[with-leading-icon]/text-field:pl-[52px]", "pr-0.5"],
2397
+ /**
2398
+ * Suffix: sits after the input in the flex row.
2399
+ * pl-0.5 is a small gap between the input text and the suffix.
2400
+ * pr-4 keeps 16dp from the right field edge.
2401
+ * With a trailing icon that shifts to 52dp to avoid overlap.
2402
+ */
2403
+ suffix: ["pl-0.5", "pr-4", "group-data-[with-trailing-icon]/text-field:pr-[52px]"]
2342
2404
  }
2343
2405
  },
2344
2406
  defaultVariants: {
2345
- position: "leading",
2346
- size: "medium",
2347
- disabled: false
2407
+ variant: "filled",
2408
+ position: "prefix"
2348
2409
  }
2349
2410
  }
2350
2411
  );
2351
- var textFieldHelperTextVariants = classVarianceAuthority.cva(
2412
+ var textFieldSupportingRowVariants = classVarianceAuthority.cva([
2413
+ "flex items-start justify-between w-full gap-4 px-4 pt-1"
2414
+ ]);
2415
+ var textFieldSupportingTextVariants = classVarianceAuthority.cva(
2352
2416
  [
2353
- // Base helper text styles
2354
- "text-xs mt-1 px-4 transition-colors duration-200"
2417
+ "text-body-small",
2418
+ // Effects transition for color
2419
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects"
2355
2420
  ],
2356
2421
  {
2357
2422
  variants: {
2358
2423
  type: {
2359
2424
  description: "text-on-surface-variant",
2360
2425
  error: "text-error"
2361
- },
2362
- disabled: {
2363
- true: "opacity-38",
2364
- false: ""
2365
2426
  }
2366
2427
  },
2367
2428
  defaultVariants: {
2368
- type: "description",
2369
- disabled: false
2429
+ type: "description"
2370
2430
  }
2371
2431
  }
2372
2432
  );
2373
- var textFieldCharacterCountVariants = classVarianceAuthority.cva(
2433
+ var textFieldCounterVariants = classVarianceAuthority.cva(
2374
2434
  [
2375
- // Base character counter styles
2376
- "text-xs mt-1 px-4 text-right text-on-surface-variant transition-colors duration-200"
2435
+ "text-body-small shrink-0 text-right",
2436
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects"
2377
2437
  ],
2378
2438
  {
2379
2439
  variants: {
2380
2440
  exceeded: {
2381
2441
  true: "text-error",
2382
- false: ""
2383
- },
2384
- disabled: {
2385
- true: "opacity-38",
2386
- false: ""
2442
+ false: "text-on-surface-variant"
2387
2443
  }
2388
2444
  },
2389
2445
  defaultVariants: {
2390
- exceeded: false,
2391
- disabled: false
2446
+ exceeded: false
2392
2447
  }
2393
2448
  }
2394
2449
  );
@@ -2500,12 +2555,13 @@ TextFieldHeadless.displayName = "TextFieldHeadless";
2500
2555
  var TextField = React.forwardRef(
2501
2556
  ({
2502
2557
  variant = "filled",
2503
- size = "medium",
2504
2558
  label,
2505
2559
  description,
2506
2560
  errorMessage,
2507
2561
  leadingIcon,
2508
2562
  trailingIcon,
2563
+ prefix,
2564
+ suffix,
2509
2565
  characterCount = false,
2510
2566
  maxLength,
2511
2567
  fullWidth = false,
@@ -2525,6 +2581,7 @@ var TextField = React.forwardRef(
2525
2581
  ...props
2526
2582
  }, ref) => {
2527
2583
  const spellCheckProp = spellCheck === void 0 ? void 0 : typeof spellCheck === "string" ? spellCheck === "true" : spellCheck;
2584
+ const { isHovered, hoverProps } = reactAria.useHover({ isDisabled });
2528
2585
  const headlessProps = {
2529
2586
  ...label !== void 0 ? { label } : {},
2530
2587
  ...description !== void 0 ? { description } : {},
@@ -2551,149 +2608,131 @@ var TextField = React.forwardRef(
2551
2608
  errorMessageProps,
2552
2609
  isInvalid: fieldIsInvalid,
2553
2610
  isFocused,
2611
+ isFocusVisible,
2554
2612
  currentValue,
2555
2613
  inputRef
2556
2614
  }) => {
2557
2615
  const hasValue = currentValue.length > 0;
2558
- const shouldFloatLabel = isFocused || hasValue;
2616
+ const hasPlaceholder = !!props.placeholder;
2617
+ const hasPrefix = !!prefix;
2618
+ const hasSuffix = !!suffix;
2619
+ const shouldFloat = isFocused || hasValue || hasPlaceholder || hasPrefix;
2559
2620
  const characterLength = currentValue.length;
2560
2621
  const isCharacterLimitExceeded = maxLength ? characterLength > maxLength : false;
2561
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(textFieldContainerVariants({ fullWidth }), className), children: [
2562
- /* @__PURE__ */ jsxRuntime.jsxs(
2563
- "div",
2564
- {
2565
- className: cn(
2566
- textFieldWrapperVariants({
2567
- variant,
2568
- size,
2569
- disabled: isDisabled,
2570
- error: fieldIsInvalid,
2571
- focused: isFocused
2572
- })
2573
- ),
2574
- children: [
2622
+ const hasLeadingIcon = !!leadingIcon;
2623
+ const hasTrailingIcon = !!trailingIcon;
2624
+ const hasLabel = !!label;
2625
+ const showDescription = !!description && !fieldIsInvalid;
2626
+ const showError = fieldIsInvalid && !!errorMessage;
2627
+ const showCounter = characterCount && maxLength !== void 0;
2628
+ const showSupportingRow = showDescription || showError || showCounter;
2629
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2630
+ "div",
2631
+ {
2632
+ className: cn(textFieldRootVariants({ fullWidth }), "group/text-field", className),
2633
+ ...getInteractionDataAttributes({
2634
+ isHovered,
2635
+ isFocusVisible,
2636
+ isDisabled,
2637
+ isReadOnly,
2638
+ isInvalid: fieldIsInvalid
2639
+ }),
2640
+ "data-focused": isFocused ? "" : void 0,
2641
+ "data-float": shouldFloat ? "" : void 0,
2642
+ "data-with-leading-icon": hasLeadingIcon ? "" : void 0,
2643
+ "data-with-trailing-icon": hasTrailingIcon ? "" : void 0,
2644
+ "data-with-prefix": hasPrefix ? "" : void 0,
2645
+ "data-with-suffix": hasSuffix ? "" : void 0,
2646
+ "data-no-label": !hasLabel ? "" : void 0,
2647
+ "data-multiline": multiline ? "" : void 0,
2648
+ children: [
2649
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { ...hoverProps, className: cn(textFieldFieldVariants({ variant })), children: [
2650
+ variant === "filled" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(textFieldStateLayerVariants()), "aria-hidden": "true" }),
2575
2651
  leadingIcon && /* @__PURE__ */ jsxRuntime.jsx(
2576
2652
  "span",
2577
2653
  {
2578
- className: textFieldIconVariants({
2579
- position: "leading",
2580
- size,
2581
- disabled: isDisabled
2582
- }),
2654
+ className: cn(textFieldIconVariants({ position: "leading" })),
2655
+ "aria-hidden": "true",
2583
2656
  children: leadingIcon
2584
2657
  }
2585
2658
  ),
2586
- label && /* @__PURE__ */ jsxRuntime.jsxs(
2587
- "label",
2659
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex h-full min-w-0 flex-1 items-center", children: [
2660
+ label && /* @__PURE__ */ jsxRuntime.jsxs("label", { ...labelProps, className: cn(textFieldLabelVariants({ variant })), children: [
2661
+ label,
2662
+ isRequired && /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": "true", children: "\u2009*" })
2663
+ ] }),
2664
+ prefix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(textFieldAffixVariants({ variant, position: "prefix" })), children: prefix }),
2665
+ multiline ? /* @__PURE__ */ jsxRuntime.jsx(
2666
+ "textarea",
2667
+ {
2668
+ ...inputProps,
2669
+ ref: inputRef,
2670
+ className: cn(textFieldInputVariants({ variant, multiline: true })),
2671
+ rows,
2672
+ spellCheck: spellCheckProp
2673
+ }
2674
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
2675
+ "input",
2676
+ {
2677
+ ...inputProps,
2678
+ ref: inputRef,
2679
+ className: cn(textFieldInputVariants({ variant, multiline: false })),
2680
+ spellCheck: spellCheckProp
2681
+ }
2682
+ ),
2683
+ suffix && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(textFieldAffixVariants({ variant, position: "suffix" })), children: suffix })
2684
+ ] }),
2685
+ trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(
2686
+ "span",
2588
2687
  {
2589
- ...labelProps,
2590
- className: cn(
2591
- textFieldLabelVariants({
2592
- variant,
2593
- size,
2594
- floating: shouldFloatLabel,
2595
- focused: isFocused,
2596
- error: fieldIsInvalid,
2597
- disabled: isDisabled,
2598
- hasLeadingIcon: !!leadingIcon
2599
- })
2600
- ),
2601
- children: [
2602
- label,
2603
- isRequired && " *"
2604
- ]
2688
+ className: cn(textFieldIconVariants({ position: "trailing" })),
2689
+ "aria-hidden": "true",
2690
+ children: trailingIcon
2605
2691
  }
2606
2692
  ),
2607
- multiline ? /* @__PURE__ */ jsxRuntime.jsx(
2608
- "textarea",
2609
- {
2610
- ...inputProps,
2611
- ref: inputRef,
2612
- className: cn(
2613
- textFieldInputVariants({
2614
- variant,
2615
- size,
2616
- disabled: isDisabled,
2617
- hasLeadingIcon: !!leadingIcon,
2618
- hasTrailingIcon: !!trailingIcon,
2619
- multiline: true
2620
- }),
2621
- label && "placeholder:opacity-0"
2622
- ),
2623
- rows,
2624
- spellCheck: spellCheckProp
2625
- }
2626
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2627
- "input",
2693
+ variant === "filled" && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(textFieldActiveIndicatorVariants()), "aria-hidden": "true" }),
2694
+ variant === "outlined" && /* @__PURE__ */ jsxRuntime.jsx("fieldset", { "aria-hidden": "true", className: cn(textFieldOutlineVariants()), children: /* @__PURE__ */ jsxRuntime.jsx("legend", { className: cn(textFieldNotchVariants()), children: label && /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
2695
+ label,
2696
+ isRequired && "\u2009*"
2697
+ ] }) }) })
2698
+ ] }),
2699
+ showSupportingRow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(textFieldSupportingRowVariants()), children: [
2700
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
2701
+ showDescription && /* @__PURE__ */ jsxRuntime.jsx(
2702
+ "p",
2703
+ {
2704
+ ...descriptionProps,
2705
+ className: cn(textFieldSupportingTextVariants({ type: "description" })),
2706
+ children: description
2707
+ }
2708
+ ),
2709
+ showError && /* @__PURE__ */ jsxRuntime.jsx(
2710
+ "p",
2711
+ {
2712
+ ...errorMessageProps,
2713
+ className: cn(textFieldSupportingTextVariants({ type: "error" })),
2714
+ children: errorMessage
2715
+ }
2716
+ )
2717
+ ] }),
2718
+ showCounter && /* @__PURE__ */ jsxRuntime.jsxs(
2719
+ "span",
2628
2720
  {
2629
- ...inputProps,
2630
- ref: inputRef,
2631
2721
  className: cn(
2632
- textFieldInputVariants({
2633
- variant,
2634
- size,
2635
- disabled: isDisabled,
2636
- hasLeadingIcon: !!leadingIcon,
2637
- hasTrailingIcon: !!trailingIcon,
2638
- multiline: false
2639
- }),
2640
- label && "placeholder:opacity-0"
2641
- // Hide placeholder when there's a value to prevent overlap with floating label
2722
+ textFieldCounterVariants({ exceeded: isCharacterLimitExceeded })
2642
2723
  ),
2643
- spellCheck: spellCheckProp
2644
- }
2645
- ),
2646
- trailingIcon && /* @__PURE__ */ jsxRuntime.jsx(
2647
- "span",
2648
- {
2649
- className: textFieldIconVariants({
2650
- position: "trailing",
2651
- size,
2652
- disabled: isDisabled
2653
- }),
2654
- children: trailingIcon
2724
+ "aria-live": "polite",
2725
+ children: [
2726
+ characterLength,
2727
+ "\u2009/\u2009",
2728
+ maxLength
2729
+ ]
2655
2730
  }
2656
2731
  )
2657
- ]
2658
- }
2659
- ),
2660
- description && !fieldIsInvalid && /* @__PURE__ */ jsxRuntime.jsx(
2661
- "div",
2662
- {
2663
- ...descriptionProps,
2664
- className: textFieldHelperTextVariants({
2665
- type: "description",
2666
- disabled: isDisabled
2667
- }),
2668
- children: description
2669
- }
2670
- ),
2671
- fieldIsInvalid && errorMessage && /* @__PURE__ */ jsxRuntime.jsx(
2672
- "div",
2673
- {
2674
- ...errorMessageProps,
2675
- className: textFieldHelperTextVariants({
2676
- type: "error",
2677
- disabled: isDisabled
2678
- }),
2679
- children: errorMessage
2680
- }
2681
- ),
2682
- characterCount && maxLength && /* @__PURE__ */ jsxRuntime.jsxs(
2683
- "div",
2684
- {
2685
- className: textFieldCharacterCountVariants({
2686
- exceeded: isCharacterLimitExceeded,
2687
- disabled: isDisabled
2688
- }),
2689
- children: [
2690
- characterLength,
2691
- " / ",
2692
- maxLength
2693
- ]
2694
- }
2695
- )
2696
- ] });
2732
+ ] })
2733
+ ]
2734
+ }
2735
+ );
2697
2736
  } });
2698
2737
  }
2699
2738
  );
@@ -13204,10 +13243,17 @@ function mapToInputProps(props) {
13204
13243
  const { orientation: _orientation, minuteStep: _minuteStep, ...inputProps } = props;
13205
13244
  return inputProps;
13206
13245
  }
13207
- function CalendarCell({ date: date$1, state }) {
13246
+ function CalendarCell({
13247
+ date: date$1,
13248
+ state,
13249
+ className,
13250
+ children
13251
+ }) {
13208
13252
  const ref = React.useRef(null);
13209
13253
  const { cellProps, buttonProps, isSelected, isDisabled, isUnavailable, formattedDate } = reactAria.useCalendarCell({ date: date$1 }, state, ref);
13210
- const { focusProps, isFocusVisible, isFocused } = reactAria.useFocusRing();
13254
+ const { focusProps, isFocusVisible } = reactAria.useFocusRing();
13255
+ const { hoverProps, isHovered } = reactAria.useHover({ isDisabled: isDisabled || isUnavailable });
13256
+ const { pressProps, isPressed } = reactAria.usePress({ isDisabled: isDisabled || isUnavailable });
13211
13257
  const isCurrentDay = date.isSameDay(date$1, date.today(date.getLocalTimeZone()));
13212
13258
  const isOutsideMonth = date$1.month !== state.visibleRange.start.month || date$1.year !== state.visibleRange.start.year;
13213
13259
  let isRangeStart = false;
@@ -13219,28 +13265,38 @@ function CalendarCell({ date: date$1, state }) {
13219
13265
  isRangeEnd = date.isSameDay(date$1, range.end);
13220
13266
  isRangeMiddle = date$1.compare(range.start) > 0 && date$1.compare(range.end) < 0;
13221
13267
  }
13222
- return /* @__PURE__ */ jsxRuntime.jsx("td", { ...cellProps, children: /* @__PURE__ */ jsxRuntime.jsx(
13268
+ return /* @__PURE__ */ jsxRuntime.jsx("td", { ...cellProps, children: /* @__PURE__ */ jsxRuntime.jsxs(
13223
13269
  "div",
13224
13270
  {
13225
- ...reactAria.mergeProps(buttonProps, focusProps),
13271
+ ...reactAria.mergeProps(buttonProps, focusProps, hoverProps, pressProps),
13226
13272
  ref,
13273
+ className,
13227
13274
  "aria-current": isCurrentDay ? "date" : void 0,
13228
- "data-selected": isSelected || void 0,
13229
- "data-today": isCurrentDay || void 0,
13230
- "data-outside-month": isOutsideMonth || void 0,
13231
- "data-range-start": isRangeStart || void 0,
13232
- "data-range-end": isRangeEnd || void 0,
13233
- "data-range-middle": isRangeMiddle || void 0,
13234
- "data-disabled": isDisabled || void 0,
13235
- "data-unavailable": isUnavailable || void 0,
13236
- "data-focused": isFocused || void 0,
13237
- "data-focus-visible": isFocusVisible || void 0,
13238
- children: formattedDate
13275
+ "data-selected": isSelected ? "" : void 0,
13276
+ "data-today": isCurrentDay ? "" : void 0,
13277
+ "data-outside-month": isOutsideMonth ? "" : void 0,
13278
+ "data-range-start": isRangeStart ? "" : void 0,
13279
+ "data-range-end": isRangeEnd ? "" : void 0,
13280
+ "data-range-middle": isRangeMiddle ? "" : void 0,
13281
+ "data-disabled": isDisabled ? "" : void 0,
13282
+ "data-unavailable": isUnavailable ? "" : void 0,
13283
+ "data-focus-visible": isFocusVisible ? "" : void 0,
13284
+ "data-hovered": isHovered ? "" : void 0,
13285
+ "data-pressed": isPressed ? "" : void 0,
13286
+ children: [
13287
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none relative z-10", children: formattedDate }),
13288
+ children
13289
+ ]
13239
13290
  }
13240
13291
  ) });
13241
13292
  }
13242
13293
  CalendarCell.displayName = "CalendarCell";
13243
- function CalendarGrid({ state, firstDayOfWeek }) {
13294
+ function CalendarGrid({
13295
+ state,
13296
+ firstDayOfWeek,
13297
+ CellComponent = CalendarCell,
13298
+ WeekdayComponent
13299
+ }) {
13244
13300
  const { locale } = reactAria.useLocale();
13245
13301
  const gridOptions = firstDayOfWeek ? { firstDayOfWeek } : {};
13246
13302
  const { gridProps, headerProps, weekDays } = reactAria.useCalendarGrid(gridOptions, state);
@@ -13250,9 +13306,11 @@ function CalendarGrid({ state, firstDayOfWeek }) {
13250
13306
  firstDayOfWeek ?? void 0
13251
13307
  );
13252
13308
  return /* @__PURE__ */ jsxRuntime.jsxs("table", { ...gridProps, children: [
13253
- /* @__PURE__ */ jsxRuntime.jsx("thead", { ...headerProps, "aria-hidden": void 0, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: weekDays.map((day, index) => /* @__PURE__ */ jsxRuntime.jsx("th", { role: "columnheader", children: day }, index)) }) }),
13309
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { ...headerProps, "aria-hidden": void 0, children: /* @__PURE__ */ jsxRuntime.jsx("tr", { children: weekDays.map(
13310
+ (day, index) => WeekdayComponent ? /* @__PURE__ */ jsxRuntime.jsx("th", { role: "columnheader", children: /* @__PURE__ */ jsxRuntime.jsx(WeekdayComponent, { label: day }) }, index) : /* @__PURE__ */ jsxRuntime.jsx("th", { role: "columnheader", children: day }, index)
13311
+ ) }) }),
13254
13312
  /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ jsxRuntime.jsx("tr", { children: state.getDatesInWeek(weekIndex).map(
13255
- (date, i) => date ? /* @__PURE__ */ jsxRuntime.jsx(CalendarCell, { state, date }, i) : /* @__PURE__ */ jsxRuntime.jsx("td", {}, i)
13313
+ (date, i) => date ? /* @__PURE__ */ jsxRuntime.jsx(CellComponent, { state, date }, i) : /* @__PURE__ */ jsxRuntime.jsx("td", {}, i)
13256
13314
  ) }, weekIndex)) })
13257
13315
  ] });
13258
13316
  }
@@ -13283,12 +13341,32 @@ function ChevronRightIcon() {
13283
13341
  function DropdownArrowIcon() {
13284
13342
  return /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 10l5 5 5-5z" }) });
13285
13343
  }
13286
- function CalendarHeader({
13287
- title,
13288
- prevButtonProps,
13289
- nextButtonProps,
13344
+ function DefaultTitle({ title, onClick, showDropdownIndicator }) {
13345
+ if (onClick) {
13346
+ return /* @__PURE__ */ jsxRuntime.jsxs(
13347
+ "button",
13348
+ {
13349
+ type: "button",
13350
+ onClick,
13351
+ "data-calendar-title": true,
13352
+ "aria-label": `${title}, click to select year`,
13353
+ children: [
13354
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { "aria-live": "polite", children: title }),
13355
+ showDropdownIndicator && /* @__PURE__ */ jsxRuntime.jsx(DropdownArrowIcon, {})
13356
+ ]
13357
+ }
13358
+ );
13359
+ }
13360
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-calendar-title": true, children: /* @__PURE__ */ jsxRuntime.jsx("h2", { "aria-live": "polite", children: title }) });
13361
+ }
13362
+ function CalendarHeader({
13363
+ title,
13364
+ prevButtonProps,
13365
+ nextButtonProps,
13290
13366
  onTitleClick,
13291
- showDropdownIndicator = false
13367
+ showDropdownIndicator = false,
13368
+ NavButtonComponent = NavigationButton,
13369
+ TitleComponent = DefaultTitle
13292
13370
  }) {
13293
13371
  const enhancedPrevProps = {
13294
13372
  ...prevButtonProps,
@@ -13299,22 +13377,17 @@ function CalendarHeader({
13299
13377
  "aria-label": "Next month"
13300
13378
  };
13301
13379
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-calendar-header": true, children: [
13302
- onTitleClick ? /* @__PURE__ */ jsxRuntime.jsxs(
13303
- "button",
13380
+ /* @__PURE__ */ jsxRuntime.jsx(
13381
+ TitleComponent,
13304
13382
  {
13305
- type: "button",
13383
+ title,
13306
13384
  onClick: onTitleClick,
13307
- "data-calendar-title": true,
13308
- "aria-label": `${title}, click to select year`,
13309
- children: [
13310
- /* @__PURE__ */ jsxRuntime.jsx("h2", { "aria-live": "polite", children: title }),
13311
- showDropdownIndicator && /* @__PURE__ */ jsxRuntime.jsx(DropdownArrowIcon, {})
13312
- ]
13385
+ showDropdownIndicator
13313
13386
  }
13314
- ) : /* @__PURE__ */ jsxRuntime.jsx("div", { "data-calendar-title": true, children: /* @__PURE__ */ jsxRuntime.jsx("h2", { "aria-live": "polite", children: title }) }),
13387
+ ),
13315
13388
  /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-calendar-nav": true, children: [
13316
- /* @__PURE__ */ jsxRuntime.jsx(NavigationButton, { ...enhancedPrevProps, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {}) }),
13317
- /* @__PURE__ */ jsxRuntime.jsx(NavigationButton, { ...enhancedNextProps, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, {}) })
13389
+ /* @__PURE__ */ jsxRuntime.jsx(NavButtonComponent, { ...enhancedPrevProps, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronLeftIcon, {}) }),
13390
+ /* @__PURE__ */ jsxRuntime.jsx(NavButtonComponent, { ...enhancedNextProps, children: /* @__PURE__ */ jsxRuntime.jsx(ChevronRightIcon, {}) })
13318
13391
  ] })
13319
13392
  ] });
13320
13393
  }
@@ -13333,7 +13406,8 @@ function YearGrid({
13333
13406
  selectedYear,
13334
13407
  onYearSelect,
13335
13408
  minYear,
13336
- maxYear
13409
+ maxYear,
13410
+ YearItemComponent
13337
13411
  }) {
13338
13412
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
13339
13413
  const startYear = minYear ?? currentYear - YEAR_RANGE_OFFSET;
@@ -13359,6 +13433,17 @@ function YearGrid({
13359
13433
  },
13360
13434
  children: years.map((year) => {
13361
13435
  const isSelected = year === selectedYear;
13436
+ if (YearItemComponent) {
13437
+ return /* @__PURE__ */ jsxRuntime.jsx(
13438
+ YearItemComponent,
13439
+ {
13440
+ year,
13441
+ isSelected,
13442
+ onSelect: onYearSelect
13443
+ },
13444
+ year
13445
+ );
13446
+ }
13362
13447
  return /* @__PURE__ */ jsxRuntime.jsx(
13363
13448
  "button",
13364
13449
  {
@@ -13366,7 +13451,7 @@ function YearGrid({
13366
13451
  role: "gridcell",
13367
13452
  "aria-selected": isSelected,
13368
13453
  "data-year-item": true,
13369
- "data-selected": isSelected || void 0,
13454
+ "data-selected": isSelected ? "" : void 0,
13370
13455
  ref: isSelected ? selectedRef : void 0,
13371
13456
  onClick: () => onYearSelect(year),
13372
13457
  children: year
@@ -13422,6 +13507,7 @@ function SingleCalendarInner({ calendarRef, ...props }) {
13422
13507
  setCurrentView("day");
13423
13508
  props.onViewChange?.("day");
13424
13509
  };
13510
+ const slots = props.slots ?? {};
13425
13511
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...calendarProps, ref: calendarRef, className: props.className, "data-view": currentView, children: [
13426
13512
  /* @__PURE__ */ jsxRuntime.jsx(
13427
13513
  CalendarHeader,
@@ -13430,14 +13516,25 @@ function SingleCalendarInner({ calendarRef, ...props }) {
13430
13516
  prevButtonProps: currentView === "day" ? prevButtonProps : { isDisabled: true },
13431
13517
  nextButtonProps: currentView === "day" ? nextButtonProps : { isDisabled: true },
13432
13518
  onTitleClick: handleTitleClick,
13433
- showDropdownIndicator: true
13519
+ showDropdownIndicator: true,
13520
+ ...slots.NavButtonComponent ? { NavButtonComponent: slots.NavButtonComponent } : {},
13521
+ ...slots.TitleComponent ? { TitleComponent: slots.TitleComponent } : {}
13434
13522
  }
13435
13523
  ),
13436
- currentView === "day" ? /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, { state, firstDayOfWeek: firstDay }) : /* @__PURE__ */ jsxRuntime.jsx(
13524
+ currentView === "day" ? /* @__PURE__ */ jsxRuntime.jsx(
13525
+ CalendarGrid,
13526
+ {
13527
+ state,
13528
+ firstDayOfWeek: firstDay,
13529
+ ...slots.CellComponent ? { CellComponent: slots.CellComponent } : {},
13530
+ ...slots.WeekdayComponent ? { WeekdayComponent: slots.WeekdayComponent } : {}
13531
+ }
13532
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
13437
13533
  YearGrid,
13438
13534
  {
13439
13535
  selectedYear: state.focusedDate.year,
13440
13536
  onYearSelect: handleYearSelect,
13537
+ ...slots.YearItemComponent ? { YearItemComponent: slots.YearItemComponent } : {},
13441
13538
  ...props.minValue ? { minYear: props.minValue.year } : {},
13442
13539
  ...props.maxValue ? { maxYear: props.maxValue.year } : {}
13443
13540
  }
@@ -13497,6 +13594,7 @@ function RangeCalendarInner({ calendarRef, ...props }) {
13497
13594
  setCurrentView("day");
13498
13595
  props.onViewChange?.("day");
13499
13596
  };
13597
+ const slots = props.slots ?? {};
13500
13598
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...calendarProps, ref: calendarRef, className: props.className, "data-view": currentView, children: [
13501
13599
  /* @__PURE__ */ jsxRuntime.jsx(
13502
13600
  CalendarHeader,
@@ -13505,14 +13603,25 @@ function RangeCalendarInner({ calendarRef, ...props }) {
13505
13603
  prevButtonProps: currentView === "day" ? prevButtonProps : { isDisabled: true },
13506
13604
  nextButtonProps: currentView === "day" ? nextButtonProps : { isDisabled: true },
13507
13605
  onTitleClick: handleTitleClick,
13508
- showDropdownIndicator: true
13606
+ showDropdownIndicator: true,
13607
+ ...slots.NavButtonComponent ? { NavButtonComponent: slots.NavButtonComponent } : {},
13608
+ ...slots.TitleComponent ? { TitleComponent: slots.TitleComponent } : {}
13509
13609
  }
13510
13610
  ),
13511
- currentView === "day" ? /* @__PURE__ */ jsxRuntime.jsx(CalendarGrid, { state, firstDayOfWeek: firstDay }) : /* @__PURE__ */ jsxRuntime.jsx(
13611
+ currentView === "day" ? /* @__PURE__ */ jsxRuntime.jsx(
13612
+ CalendarGrid,
13613
+ {
13614
+ state,
13615
+ firstDayOfWeek: firstDay,
13616
+ ...slots.CellComponent ? { CellComponent: slots.CellComponent } : {},
13617
+ ...slots.WeekdayComponent ? { WeekdayComponent: slots.WeekdayComponent } : {}
13618
+ }
13619
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
13512
13620
  YearGrid,
13513
13621
  {
13514
13622
  selectedYear: state.focusedDate.year,
13515
13623
  onYearSelect: handleYearSelect,
13624
+ ...slots.YearItemComponent ? { YearItemComponent: slots.YearItemComponent } : {},
13516
13625
  ...props.minValue ? { minYear: props.minValue.year } : {},
13517
13626
  ...props.maxValue ? { maxYear: props.maxValue.year } : {}
13518
13627
  }
@@ -13530,6 +13639,24 @@ var CalendarCore = React.forwardRef((props, forwardedRef) => {
13530
13639
  return /* @__PURE__ */ jsxRuntime.jsx(SingleCalendarInner, { ...rest, calendarRef: ref }, "single");
13531
13640
  });
13532
13641
  CalendarCore.displayName = "CalendarCore";
13642
+ function HeadlessActionButton({
13643
+ label,
13644
+ "aria-label": ariaLabel,
13645
+ onPress,
13646
+ isDisabled,
13647
+ "data-action": dataAction
13648
+ }) {
13649
+ const ref = React.useRef(null);
13650
+ const { buttonProps } = reactAria.useButton(
13651
+ {
13652
+ "aria-label": ariaLabel ?? label,
13653
+ isDisabled: isDisabled ?? false,
13654
+ ...onPress ? { onPress } : {}
13655
+ },
13656
+ ref
13657
+ );
13658
+ return /* @__PURE__ */ jsxRuntime.jsx("button", { ...buttonProps, ref, type: "button", "data-action": dataAction, children: label });
13659
+ }
13533
13660
  function DatePickerActions({
13534
13661
  cancelLabel = "Cancel",
13535
13662
  confirmLabel = "OK",
@@ -13539,37 +13666,38 @@ function DatePickerActions({
13539
13666
  onCancel,
13540
13667
  onConfirm,
13541
13668
  onClear,
13542
- className
13669
+ className,
13670
+ ButtonComponent = HeadlessActionButton
13543
13671
  }) {
13544
- const clearRef = React.useRef(null);
13545
- const cancelRef = React.useRef(null);
13546
- const confirmRef = React.useRef(null);
13547
- const { buttonProps: clearButtonProps } = reactAria.useButton(
13548
- {
13549
- "aria-label": clearLabel,
13550
- ...onClear ? { onPress: onClear } : {}
13551
- },
13552
- clearRef
13553
- );
13554
- const { buttonProps: cancelButtonProps } = reactAria.useButton(
13555
- {
13556
- "aria-label": cancelLabel,
13557
- ...onCancel ? { onPress: onCancel } : {}
13558
- },
13559
- cancelRef
13560
- );
13561
- const { buttonProps: confirmButtonProps } = reactAria.useButton(
13562
- {
13563
- "aria-label": confirmLabel,
13564
- isDisabled: isConfirmDisabled,
13565
- ...onConfirm ? { onPress: onConfirm } : {}
13566
- },
13567
- confirmRef
13568
- );
13569
13672
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, "data-actions": true, children: [
13570
- showClear && /* @__PURE__ */ jsxRuntime.jsx("button", { ...clearButtonProps, ref: clearRef, type: "button", "data-action": "clear", children: clearLabel }),
13571
- /* @__PURE__ */ jsxRuntime.jsx("button", { ...cancelButtonProps, ref: cancelRef, type: "button", "data-action": "cancel", children: cancelLabel }),
13572
- /* @__PURE__ */ jsxRuntime.jsx("button", { ...confirmButtonProps, ref: confirmRef, type: "button", "data-action": "confirm", children: confirmLabel })
13673
+ showClear && /* @__PURE__ */ jsxRuntime.jsx(
13674
+ ButtonComponent,
13675
+ {
13676
+ label: clearLabel,
13677
+ "aria-label": clearLabel,
13678
+ onPress: onClear,
13679
+ "data-action": "clear"
13680
+ }
13681
+ ),
13682
+ /* @__PURE__ */ jsxRuntime.jsx(
13683
+ ButtonComponent,
13684
+ {
13685
+ label: cancelLabel,
13686
+ "aria-label": cancelLabel,
13687
+ onPress: onCancel,
13688
+ "data-action": "cancel"
13689
+ }
13690
+ ),
13691
+ /* @__PURE__ */ jsxRuntime.jsx(
13692
+ ButtonComponent,
13693
+ {
13694
+ label: confirmLabel,
13695
+ "aria-label": confirmLabel,
13696
+ onPress: onConfirm,
13697
+ isDisabled: isConfirmDisabled,
13698
+ "data-action": "confirm"
13699
+ }
13700
+ )
13573
13701
  ] });
13574
13702
  }
13575
13703
  DatePickerActions.displayName = "DatePickerActions";
@@ -13608,21 +13736,26 @@ function CalendarTriggerIcon() {
13608
13736
  }
13609
13737
  function PopoverContent({
13610
13738
  popoverRef,
13611
- triggerRef,
13739
+ anchorRef,
13612
13740
  state,
13613
13741
  dialogProps,
13614
13742
  calendarProps,
13615
13743
  cancelLabel,
13616
13744
  confirmLabel,
13617
13745
  onCancel,
13618
- onConfirm
13746
+ onConfirm,
13747
+ slots,
13748
+ ActionButtonComponent,
13749
+ popoverClassName
13619
13750
  }) {
13620
13751
  const { popoverProps } = reactAria.usePopover(
13621
13752
  {
13622
13753
  popoverRef,
13623
- triggerRef,
13754
+ triggerRef: anchorRef,
13624
13755
  placement: "bottom start",
13625
- offset: 4
13756
+ offset: 4,
13757
+ shouldFlip: true,
13758
+ containerPadding: 12
13626
13759
  },
13627
13760
  state
13628
13761
  );
@@ -13636,7 +13769,10 @@ function PopoverContent({
13636
13769
  document.addEventListener("keydown", handleKeyDown);
13637
13770
  return () => document.removeEventListener("keydown", handleKeyDown);
13638
13771
  }, [state]);
13639
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { ...popoverProps, ref: popoverRef, "data-popover": true, children: [
13772
+ if (typeof document === "undefined") {
13773
+ return null;
13774
+ }
13775
+ const content = /* @__PURE__ */ jsxRuntime.jsxs("div", { ...popoverProps, ref: popoverRef, "data-popover": true, className: cn(popoverClassName), children: [
13640
13776
  /* @__PURE__ */ jsxRuntime.jsx(reactAria.DismissButton, { onDismiss: () => state.close() }),
13641
13777
  /* @__PURE__ */ jsxRuntime.jsxs("div", { ...dialogProps, role: "dialog", children: [
13642
13778
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -13651,7 +13787,8 @@ function PopoverContent({
13651
13787
  ...calendarProps.isReadOnly ? { isReadOnly: calendarProps.isReadOnly } : {},
13652
13788
  ...calendarProps.isDateUnavailable ? { isDateUnavailable: calendarProps.isDateUnavailable } : {}
13653
13789
  },
13654
- "aria-label": calendarProps["aria-label"] ?? "Calendar"
13790
+ "aria-label": calendarProps["aria-label"] ?? "Calendar",
13791
+ ...slots ? { slots } : {}
13655
13792
  }
13656
13793
  ),
13657
13794
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -13660,12 +13797,14 @@ function PopoverContent({
13660
13797
  cancelLabel,
13661
13798
  confirmLabel,
13662
13799
  onCancel,
13663
- onConfirm
13800
+ onConfirm,
13801
+ ...ActionButtonComponent !== void 0 ? { ButtonComponent: ActionButtonComponent } : {}
13664
13802
  }
13665
13803
  )
13666
13804
  ] }),
13667
13805
  /* @__PURE__ */ jsxRuntime.jsx(reactAria.DismissButton, { onDismiss: () => state.close() })
13668
13806
  ] });
13807
+ return reactDom.createPortal(content, document.body);
13669
13808
  }
13670
13809
  var DatePickerDocked = React.forwardRef(
13671
13810
  (props, forwardedRef) => {
@@ -13675,11 +13814,15 @@ var DatePickerDocked = React.forwardRef(
13675
13814
  onCancel,
13676
13815
  onConfirm,
13677
13816
  className,
13817
+ popoverClassName,
13818
+ slots,
13819
+ ActionButtonComponent,
13678
13820
  ...datePickerProps
13679
13821
  } = props;
13680
13822
  const internalRef = React.useRef(null);
13681
13823
  const ref = forwardedRef ?? internalRef;
13682
13824
  const triggerRef = React.useRef(null);
13825
+ const groupRef = React.useRef(null);
13683
13826
  const popoverRef = React.useRef(null);
13684
13827
  const stateProps = {
13685
13828
  ...datePickerProps.value !== void 0 ? { value: datePickerProps.value } : {},
@@ -13710,7 +13853,14 @@ var DatePickerDocked = React.forwardRef(
13710
13853
  dialogProps,
13711
13854
  calendarProps
13712
13855
  } = reactAria.useDatePicker(stateProps, state, ref);
13713
- const { buttonProps: iconButtonProps } = reactAria.useButton(triggerButtonAriaProps, triggerRef);
13856
+ const { buttonProps: iconButtonProps, isPressed: isTriggerPressed } = reactAria.useButton(
13857
+ triggerButtonAriaProps,
13858
+ triggerRef
13859
+ );
13860
+ const { isFocusVisible: isTriggerFocusVisible, focusProps: triggerFocusProps } = reactAria.useFocusRing();
13861
+ const { isHovered: isTriggerHovered, hoverProps: triggerHoverProps } = reactAria.useHover({
13862
+ isDisabled: datePickerProps.isDisabled ?? false
13863
+ });
13714
13864
  const valueBeforeOpenRef = React.useRef(null);
13715
13865
  React.useEffect(() => {
13716
13866
  if (state.isOpen) {
@@ -13739,26 +13889,44 @@ var DatePickerDocked = React.forwardRef(
13739
13889
  ref,
13740
13890
  className,
13741
13891
  "data-variant": "docked",
13742
- "data-open": state.isOpen ?? void 0,
13743
- "data-disabled": datePickerProps.isDisabled ?? void 0,
13892
+ "data-open": state.isOpen ? "" : void 0,
13893
+ "data-disabled": datePickerProps.isDisabled ? "" : void 0,
13744
13894
  children: [
13745
13895
  datePickerProps.label && /* @__PURE__ */ jsxRuntime.jsx("label", { ...labelProps, "data-label": true, children: datePickerProps.label }),
13746
- /* @__PURE__ */ jsxRuntime.jsxs("div", { ...groupProps, "data-field-group": true, children: [
13896
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { ...groupProps, ref: groupRef, "data-field-group": true, children: [
13747
13897
  /* @__PURE__ */ jsxRuntime.jsx(PickerDateField, { fieldProps }),
13748
- /* @__PURE__ */ jsxRuntime.jsx("button", { ...iconButtonProps, ref: triggerRef, type: "button", "data-trigger": true, children: /* @__PURE__ */ jsxRuntime.jsx(CalendarTriggerIcon, {}) })
13898
+ /* @__PURE__ */ jsxRuntime.jsx(
13899
+ "button",
13900
+ {
13901
+ ...reactAria.mergeProps(iconButtonProps, triggerFocusProps, triggerHoverProps),
13902
+ ref: triggerRef,
13903
+ type: "button",
13904
+ "data-trigger": true,
13905
+ ...getInteractionDataAttributes({
13906
+ isHovered: isTriggerHovered,
13907
+ isFocusVisible: isTriggerFocusVisible,
13908
+ isPressed: isTriggerPressed,
13909
+ isDisabled: datePickerProps.isDisabled ?? false
13910
+ }),
13911
+ children: /* @__PURE__ */ jsxRuntime.jsx(CalendarTriggerIcon, {})
13912
+ }
13913
+ )
13749
13914
  ] }),
13750
13915
  state.isOpen && /* @__PURE__ */ jsxRuntime.jsx(
13751
13916
  PopoverContent,
13752
13917
  {
13753
13918
  popoverRef,
13754
- triggerRef,
13919
+ anchorRef: groupRef,
13755
13920
  state,
13756
13921
  dialogProps,
13757
13922
  calendarProps,
13758
13923
  cancelLabel,
13759
13924
  confirmLabel,
13760
13925
  onCancel: handleCancel,
13761
- onConfirm: handleConfirm
13926
+ onConfirm: handleConfirm,
13927
+ ...slots !== void 0 ? { slots } : {},
13928
+ ...ActionButtonComponent !== void 0 ? { ActionButtonComponent } : {},
13929
+ ...popoverClassName !== void 0 ? { popoverClassName } : {}
13762
13930
  }
13763
13931
  )
13764
13932
  ]
@@ -13767,298 +13935,570 @@ var DatePickerDocked = React.forwardRef(
13767
13935
  }
13768
13936
  );
13769
13937
  DatePickerDocked.displayName = "DatePickerDocked";
13770
- var datePickerContainerVariants = classVarianceAuthority.cva(
13938
+ var datePickerContainerVariants = classVarianceAuthority.cva("", {
13939
+ variants: {
13940
+ variant: {
13941
+ docked: "w-[360px]",
13942
+ // NOTE: measurement-derived (360dp fixed width); permitted exception
13943
+ modal: [
13944
+ "bg-surface-container-high",
13945
+ "rounded-3xl",
13946
+ "overflow-hidden",
13947
+ "w-[360px]"
13948
+ // NOTE: measurement-derived (360dp fixed width); permitted exception
13949
+ ],
13950
+ "modal-input": [
13951
+ "bg-surface-container-high",
13952
+ "rounded-3xl",
13953
+ "overflow-hidden",
13954
+ "w-[328px]"
13955
+ // NOTE: measurement-derived (328dp); permitted exception
13956
+ ]
13957
+ }
13958
+ },
13959
+ defaultVariants: {
13960
+ variant: "docked"
13961
+ }
13962
+ });
13963
+ var calendarCellVariants = classVarianceAuthority.cva([
13964
+ // Layout — 48dp circle touch target
13965
+ "relative flex items-center justify-center",
13966
+ "w-[48px] h-[48px]",
13967
+ // NOTE: measurement-derived (48dp touch target); permitted exception
13968
+ "rounded-full",
13969
+ "select-none cursor-pointer",
13970
+ "overflow-hidden",
13971
+ // clips state layer to circle
13972
+ // Typography
13973
+ "text-body-large",
13974
+ // Base text color
13975
+ "text-on-surface",
13976
+ // Effects transition for color changes (not spatial — no overshoot)
13977
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
13978
+ // Remove default focus outline — handled via calendarCellFocusRingVariants
13979
+ "focus-visible:outline-none",
13980
+ // Carries group scope for child slots
13981
+ "group/calendar-cell",
13982
+ // ── Today (unselected) ────────────────────────────────────────────────────
13983
+ "data-[today]:not([data-selected]):text-primary",
13984
+ "data-[today]:not([data-selected]):border data-[today]:not([data-selected]):border-primary",
13985
+ // ── Selected ──────────────────────────────────────────────────────────────
13986
+ "data-[selected]:bg-primary data-[selected]:text-on-primary",
13987
+ // ── Range start/end: half-pill shape (right-flat for start, left-flat for end) ──
13988
+ "data-[range-start]:rounded-r-none",
13989
+ "data-[range-end]:rounded-l-none",
13990
+ // ── Range middle ──────────────────────────────────────────────────────────
13991
+ "data-[range-middle]:bg-secondary-container",
13992
+ "data-[range-middle]:text-on-secondary-container",
13993
+ "data-[range-middle]:rounded-none",
13994
+ // ── Outside month ─────────────────────────────────────────────────────────
13995
+ "data-[outside-month]:not([data-selected]):text-on-surface-variant",
13996
+ // ── Disabled ──────────────────────────────────────────────────────────────
13997
+ "data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed",
13998
+ // ── Unavailable ───────────────────────────────────────────────────────────
13999
+ "data-[unavailable]:text-on-surface/38 data-[unavailable]:line-through"
14000
+ ]);
14001
+ var calendarCellStateLayerVariants = classVarianceAuthority.cva([
14002
+ "pointer-events-none absolute inset-0 rounded-[inherit] opacity-0",
14003
+ // Base state-layer color (unselected)
14004
+ "bg-on-surface",
14005
+ // Effects transition — spring standard fast (no spatial overshoot)
14006
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14007
+ // Selected → state layer color switches to on-primary
14008
+ "group-data-[selected]/calendar-cell:bg-on-primary",
14009
+ // Range middle → state layer color switches to on-secondary-container
14010
+ "group-data-[range-middle]/calendar-cell:bg-on-secondary-container",
14011
+ // Interaction opacities (MD3: hover 8%, focus/pressed 10%)
14012
+ "group-data-[hovered]/calendar-cell:opacity-8",
14013
+ "group-data-[focus-visible]/calendar-cell:opacity-10",
14014
+ "group-data-[pressed]/calendar-cell:opacity-10",
14015
+ // No state layer for disabled/unavailable
14016
+ "group-data-[disabled]/calendar-cell:hidden",
14017
+ "group-data-[unavailable]/calendar-cell:hidden"
14018
+ ]);
14019
+ var calendarCellFocusRingVariants = classVarianceAuthority.cva([
14020
+ "pointer-events-none absolute inset-0 rounded-full",
14021
+ "outline outline-2 outline-offset-0 outline-secondary",
14022
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14023
+ "opacity-0",
14024
+ "group-data-[focus-visible]/calendar-cell:opacity-100"
14025
+ ]);
14026
+ var calendarHeaderVariants = classVarianceAuthority.cva([
14027
+ "flex items-center justify-between",
14028
+ "px-3 py-2"
14029
+ // NOTE: measurement-derived padding; permitted exception
14030
+ ]);
14031
+ var navButtonVariants = classVarianceAuthority.cva([
14032
+ // Layout
14033
+ "relative flex items-center justify-center",
14034
+ "w-10 h-10 rounded-full",
14035
+ // NOTE: 40dp; permitted exception
14036
+ // Typography
14037
+ "text-on-surface-variant",
14038
+ // Reset
14039
+ "bg-transparent border-none cursor-pointer",
14040
+ "overflow-hidden",
14041
+ // Focus outline removed — ring handled by navButtonFocusRingVariants
14042
+ "focus-visible:outline-none",
14043
+ // Effects transition
14044
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14045
+ // Disabled — self-targeting
14046
+ "data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none",
14047
+ // Carries group scope
14048
+ "group/nav-button"
14049
+ ]);
14050
+ var navButtonStateLayerVariants = classVarianceAuthority.cva([
14051
+ "pointer-events-none absolute inset-0 rounded-full opacity-0",
14052
+ "bg-on-surface-variant",
14053
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14054
+ "group-data-[hovered]/nav-button:opacity-8",
14055
+ "group-data-[focus-visible]/nav-button:opacity-10",
14056
+ "group-data-[pressed]/nav-button:opacity-10",
14057
+ "group-data-[disabled]/nav-button:hidden"
14058
+ ]);
14059
+ var navButtonFocusRingVariants = classVarianceAuthority.cva([
14060
+ "pointer-events-none absolute inset-0 rounded-full",
14061
+ "outline outline-2 outline-offset-0 outline-secondary",
14062
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14063
+ "opacity-0",
14064
+ "group-data-[focus-visible]/nav-button:opacity-100"
14065
+ ]);
14066
+ var calendarTitleVariants = classVarianceAuthority.cva([
14067
+ "relative flex items-center gap-0.5",
14068
+ "bg-transparent border-none cursor-pointer",
14069
+ "rounded-full px-2 py-1",
14070
+ "overflow-hidden",
14071
+ "focus-visible:outline-none",
14072
+ // Effects transition
14073
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14074
+ // Group scope
14075
+ "group/calendar-title"
14076
+ ]);
14077
+ var calendarTitleTextVariants = classVarianceAuthority.cva([
14078
+ "text-label-large text-on-surface-variant m-0 pointer-events-none"
14079
+ ]);
14080
+ var calendarTitleIconVariants = classVarianceAuthority.cva(["text-on-surface-variant pointer-events-none"]);
14081
+ var calendarTitleStateLayerVariants = classVarianceAuthority.cva([
14082
+ "pointer-events-none absolute inset-0 rounded-full opacity-0",
14083
+ "bg-on-surface-variant",
14084
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14085
+ "group-data-[hovered]/calendar-title:opacity-8",
14086
+ "group-data-[focus-visible]/calendar-title:opacity-10",
14087
+ "group-data-[pressed]/calendar-title:opacity-10"
14088
+ ]);
14089
+ var yearGridVariants = classVarianceAuthority.cva([
14090
+ "grid grid-cols-3 gap-2",
14091
+ "px-3 py-2",
14092
+ "max-h-[280px] overflow-y-auto",
14093
+ // NOTE: measurement-derived max height; permitted exception
14094
+ "place-items-center"
14095
+ ]);
14096
+ var yearItemVariants = classVarianceAuthority.cva([
14097
+ // Layout
14098
+ "relative flex items-center justify-center",
14099
+ "w-[88px] h-[52px]",
14100
+ // NOTE: measurement-derived (88dp×52dp); permitted exception
14101
+ "rounded-full",
14102
+ "cursor-pointer select-none",
14103
+ "overflow-hidden",
14104
+ // Typography
14105
+ "text-body-large",
14106
+ // Reset
14107
+ "bg-transparent border-none",
14108
+ // Focus outline removed — ring handled by yearItemFocusRingVariants
14109
+ "focus-visible:outline-none",
14110
+ // Effects transition
14111
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14112
+ // Group scope
14113
+ "group/year-item",
14114
+ // ── Unselected (base) ─────────────────────────────────────────────────────
14115
+ "text-on-surface-variant",
14116
+ // ── Selected ──────────────────────────────────────────────────────────────
14117
+ "data-[selected]:bg-primary data-[selected]:text-on-primary",
14118
+ // ── Disabled ──────────────────────────────────────────────────────────────
14119
+ "data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none"
14120
+ ]);
14121
+ var yearItemStateLayerVariants = classVarianceAuthority.cva([
14122
+ "pointer-events-none absolute inset-0 rounded-full opacity-0",
14123
+ "bg-on-surface-variant",
14124
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14125
+ // Selected → state layer switches color
14126
+ "group-data-[selected]/year-item:bg-on-primary",
14127
+ // Interaction opacities
14128
+ "group-data-[hovered]/year-item:opacity-8",
14129
+ "group-data-[focus-visible]/year-item:opacity-10",
14130
+ "group-data-[pressed]/year-item:opacity-10",
14131
+ "group-data-[disabled]/year-item:hidden"
14132
+ ]);
14133
+ var yearItemFocusRingVariants = classVarianceAuthority.cva([
14134
+ "pointer-events-none absolute inset-0 rounded-full",
14135
+ "outline outline-2 outline-offset-0 outline-secondary",
14136
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14137
+ "opacity-0",
14138
+ "group-data-[focus-visible]/year-item:opacity-100"
14139
+ ]);
14140
+ var weekdayVariants = classVarianceAuthority.cva([
14141
+ "text-body-small text-on-surface-variant font-normal",
14142
+ "w-[48px] h-[48px]",
14143
+ // NOTE: measurement-derived; permitted exception
14144
+ "flex items-center justify-center",
14145
+ "select-none"
14146
+ ]);
14147
+ var calendarDividerVariants = classVarianceAuthority.cva(["border-t border-outline-variant w-full"]);
14148
+ var actionRowVariants = classVarianceAuthority.cva([
14149
+ "flex items-center justify-end gap-2",
14150
+ "px-3 py-2",
14151
+ "h-12"
14152
+ // NOTE: measurement-derived (48dp action row height); permitted exception
14153
+ ]);
14154
+ var actionButtonVariants = classVarianceAuthority.cva([
14155
+ // Layout
14156
+ "relative flex items-center justify-center",
14157
+ "rounded-full px-3 py-2 min-h-[48px]",
14158
+ // NOTE: 48dp min touch; permitted exception
14159
+ // Typography + color
14160
+ "text-label-large text-primary",
14161
+ // Reset
14162
+ "bg-transparent border-none cursor-pointer",
14163
+ "overflow-hidden",
14164
+ "focus-visible:outline-none",
14165
+ // Effects transition
14166
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14167
+ // Group scope
14168
+ "group/action-button",
14169
+ // Disabled
14170
+ "data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none"
14171
+ ]);
14172
+ var actionButtonStateLayerVariants = classVarianceAuthority.cva([
14173
+ "pointer-events-none absolute inset-0 rounded-full opacity-0",
14174
+ "bg-primary",
14175
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14176
+ "group-data-[hovered]/action-button:opacity-8",
14177
+ "group-data-[focus-visible]/action-button:opacity-10",
14178
+ "group-data-[pressed]/action-button:opacity-10",
14179
+ "group-data-[disabled]/action-button:hidden"
14180
+ ]);
14181
+ var actionButtonFocusRingVariants = classVarianceAuthority.cva([
14182
+ "pointer-events-none absolute inset-0 rounded-full",
14183
+ "outline outline-2 outline-offset-0 outline-primary",
14184
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14185
+ "opacity-0",
14186
+ "group-data-[focus-visible]/action-button:opacity-100"
14187
+ ]);
14188
+ var modalDialogVariants = classVarianceAuthority.cva(
13771
14189
  [
13772
- "bg-surface-container-high",
13773
- "rounded-3xl",
13774
- // NOTE: shape.extra-large = 28dp; mapped via @theme token
13775
- "overflow-hidden"
14190
+ "bg-surface-container-high rounded-3xl overflow-hidden",
14191
+ "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
14192
+ "z-50",
14193
+ "max-h-[90vh] overflow-y-auto"
13776
14194
  ],
13777
14195
  {
13778
14196
  variants: {
13779
14197
  variant: {
13780
- docked: "w-[360px]",
13781
- // NOTE: measurement-derived value from MD3 spec (360dp fixed width); permitted exception
13782
14198
  modal: "w-[360px]",
13783
- // NOTE: measurement-derived value from MD3 spec (360dp fixed width); permitted exception
14199
+ // NOTE: measurement-derived; permitted exception
13784
14200
  "modal-input": "w-[328px]"
13785
- // NOTE: measurement-derived value from MD3 spec (328dp); permitted exception
13786
- }
13787
- },
13788
- defaultVariants: {
13789
- variant: "docked"
13790
- }
13791
- }
13792
- );
13793
- var calendarCellVariants = classVarianceAuthority.cva(
13794
- [
13795
- "w-[48px]",
13796
- // NOTE: measurement-derived (48dp touch target); permitted exception
13797
- "h-[48px]",
13798
- // NOTE: measurement-derived (48dp); permitted exception
13799
- "rounded-full",
13800
- // shape.full = circle
13801
- "flex",
13802
- "items-center",
13803
- "justify-center",
13804
- "text-body-large",
13805
- "relative",
13806
- "cursor-pointer",
13807
- "select-none",
13808
- "transition-colors",
13809
- "duration-spring-standard-fast-effects",
13810
- "ease-spring-standard-fast-effects"
13811
- ],
13812
- {
13813
- variants: {
13814
- cellType: {
13815
- default: "text-on-surface",
13816
- today: "text-primary border border-primary",
13817
- selected: "bg-primary text-on-primary",
13818
- "selected-range-middle": "bg-secondary-container text-on-secondary-container rounded-none",
13819
- "outside-month": "text-on-surface-variant",
13820
- disabled: "text-on-surface/38 cursor-not-allowed"
13821
- },
13822
- state: {
13823
- enabled: "",
13824
- hovered: "",
13825
- focused: "",
13826
- pressed: ""
14201
+ // NOTE: measurement-derived; permitted exception
13827
14202
  }
13828
14203
  },
13829
- compoundVariants: [
13830
- // Default cell states
13831
- {
13832
- cellType: "default",
13833
- state: "hovered",
13834
- className: "bg-on-surface/8"
13835
- },
13836
- {
13837
- cellType: "default",
13838
- state: "focused",
13839
- className: "bg-on-surface/10 ring-2 ring-on-surface"
13840
- },
13841
- {
13842
- cellType: "default",
13843
- state: "pressed",
13844
- className: "bg-on-surface/10"
13845
- },
13846
- // Today cell states
13847
- {
13848
- cellType: "today",
13849
- state: "hovered",
13850
- className: "bg-primary/8"
13851
- },
13852
- {
13853
- cellType: "today",
13854
- state: "focused",
13855
- className: "bg-primary/10"
13856
- },
13857
- {
13858
- cellType: "today",
13859
- state: "pressed",
13860
- className: "bg-primary/10"
13861
- },
13862
- // Selected cell states
13863
- {
13864
- cellType: "selected",
13865
- state: "hovered",
13866
- className: "bg-primary shadow-sm"
13867
- },
13868
- {
13869
- cellType: "selected",
13870
- state: "focused",
13871
- className: "bg-primary shadow-sm"
13872
- },
13873
- {
13874
- cellType: "selected",
13875
- state: "pressed",
13876
- className: "bg-primary shadow-sm"
13877
- },
13878
- // Range middle states
13879
- {
13880
- cellType: "selected-range-middle",
13881
- state: "hovered",
13882
- className: "bg-secondary-container/80"
13883
- },
13884
- {
13885
- cellType: "selected-range-middle",
13886
- state: "focused",
13887
- className: "bg-secondary-container/80"
13888
- }
13889
- ],
13890
14204
  defaultVariants: {
13891
- cellType: "default",
13892
- state: "enabled"
14205
+ variant: "modal"
13893
14206
  }
13894
14207
  }
13895
14208
  );
13896
- var datePickerHeaderVariants = classVarianceAuthority.cva(
13897
- ["px-6", "pt-4", "pb-3"],
14209
+ var modalHeaderVariants = classVarianceAuthority.cva([
14210
+ "flex items-start justify-between",
14211
+ "px-6 pt-4 pb-3"
13898
14212
  // NOTE: measurement-derived padding; permitted exception
13899
- {
13900
- variants: {
13901
- variant: {
13902
- docked: "h-[56px] px-3 flex items-center",
13903
- // NOTE: measurement-derived (56dp header); permitted exception
13904
- modal: "h-auto",
13905
- "modal-input": "h-auto"
13906
- }
13907
- },
13908
- defaultVariants: {
13909
- variant: "docked"
13910
- }
13911
- }
13912
- );
13913
- var datePickerNavVariants = classVarianceAuthority.cva(
13914
- ["text-on-surface-variant", "flex", "items-center", "gap-1"],
13915
- {
13916
- variants: {
13917
- state: {
13918
- enabled: "",
13919
- hovered: "bg-on-surface-variant/8",
13920
- focused: "bg-on-surface-variant/10",
13921
- pressed: "bg-on-surface-variant/10",
13922
- disabled: "text-on-surface/38 cursor-not-allowed"
13923
- }
14213
+ ]);
14214
+ var headlineVariants = classVarianceAuthority.cva(["text-label-large text-on-surface-variant m-0"]);
14215
+ var supportingTextVariants = classVarianceAuthority.cva([
14216
+ "text-headline-large text-on-surface mt-9 m-0"
14217
+ // NOTE: measurement-derived mt; permitted exception
14218
+ ]);
14219
+ var modeToggleVariants = classVarianceAuthority.cva([
14220
+ "relative flex items-center justify-center",
14221
+ "w-12 h-12 rounded-full",
14222
+ // NOTE: 48dp; permitted exception
14223
+ "text-on-surface-variant",
14224
+ "bg-transparent border-none cursor-pointer self-end",
14225
+ "overflow-hidden",
14226
+ "focus-visible:outline-none",
14227
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14228
+ "group/mode-toggle"
14229
+ ]);
14230
+ var modeToggleStateLayerVariants = classVarianceAuthority.cva([
14231
+ "pointer-events-none absolute inset-0 rounded-full opacity-0",
14232
+ "bg-on-surface-variant",
14233
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14234
+ "group-data-[hovered]/mode-toggle:opacity-8",
14235
+ "group-data-[focus-visible]/mode-toggle:opacity-10",
14236
+ "group-data-[pressed]/mode-toggle:opacity-10"
14237
+ ]);
14238
+ var scrimVariants2 = classVarianceAuthority.cva([
14239
+ "fixed inset-0 z-40",
14240
+ "bg-scrim opacity-32",
14241
+ "transition-opacity duration-medium2 ease-standard"
14242
+ ]);
14243
+ var dateInputFieldVariants = classVarianceAuthority.cva(["px-6 py-2"]);
14244
+ var dateInputFieldGroupVariants = classVarianceAuthority.cva([
14245
+ "flex items-center",
14246
+ "border border-outline rounded-sm",
14247
+ "px-4 py-3",
14248
+ // NOTE: measurement-derived; permitted exception
14249
+ "text-body-large text-on-surface",
14250
+ // Focus state (data-focused on parent wrapper)
14251
+ "peer-data-[focused]:border-2 peer-data-[focused]:border-primary",
14252
+ // Invalid state
14253
+ "peer-data-[invalid]:border-error peer-data-[invalid]:border-2"
14254
+ ]);
14255
+ var dateInputLabelVariants = classVarianceAuthority.cva(["text-body-small text-on-surface-variant block mb-1"]);
14256
+ var dateInputErrorVariants = classVarianceAuthority.cva(["text-body-small text-error mt-1"]);
14257
+ var dockedFieldGroupVariants = classVarianceAuthority.cva([
14258
+ "flex items-center",
14259
+ "border border-outline rounded",
14260
+ "h-14",
14261
+ // NOTE: measurement-derived (56dp); permitted exception
14262
+ "px-3 gap-2",
14263
+ "bg-transparent",
14264
+ // Focus-within: promote to primary 2dp border
14265
+ "focus-within:border-primary focus-within:border-2"
14266
+ ]);
14267
+ var dockedTriggerVariants = classVarianceAuthority.cva([
14268
+ "relative flex items-center justify-center",
14269
+ "w-10 h-10 rounded-full",
14270
+ // NOTE: 40dp; permitted exception
14271
+ "text-on-surface-variant",
14272
+ "bg-transparent border-none cursor-pointer",
14273
+ "overflow-hidden",
14274
+ "focus-visible:outline-none",
14275
+ "transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14276
+ "group/docked-trigger"
14277
+ ]);
14278
+ var dockedTriggerStateLayerVariants = classVarianceAuthority.cva([
14279
+ "pointer-events-none absolute inset-0 rounded-full opacity-0",
14280
+ "bg-on-surface-variant",
14281
+ "transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
14282
+ "group-data-[hovered]/docked-trigger:opacity-8",
14283
+ "group-data-[focus-visible]/docked-trigger:opacity-10",
14284
+ "group-data-[pressed]/docked-trigger:opacity-10"
14285
+ ]);
14286
+ var popoverVariants = classVarianceAuthority.cva([
14287
+ "bg-surface-container-high rounded-3xl",
14288
+ "shadow-elevation-2 overflow-hidden",
14289
+ "z-50 w-[360px]"
14290
+ ]);
14291
+ var dockedLabelVariants = classVarianceAuthority.cva(["text-body-small text-on-surface-variant block mb-1"]);
14292
+ var dateFieldVariants = classVarianceAuthority.cva([
14293
+ "flex items-center flex-1",
14294
+ "text-body-large text-on-surface"
14295
+ ]);
14296
+ var dateSegmentPlaceholderVariants = classVarianceAuthority.cva(["text-on-surface-variant"]);
14297
+ function StyledCalendarCell({ date, state }) {
14298
+ return /* @__PURE__ */ jsxRuntime.jsxs(CalendarCell, { date, state, className: cn(calendarCellVariants()), children: [
14299
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(calendarCellStateLayerVariants()), "aria-hidden": "true" }),
14300
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(calendarCellFocusRingVariants()), "aria-hidden": "true" })
14301
+ ] });
14302
+ }
14303
+ StyledCalendarCell.displayName = "StyledCalendarCell";
14304
+ function StyledNavButton({
14305
+ children,
14306
+ isDisabled,
14307
+ onPress,
14308
+ "aria-label": ariaLabel
14309
+ }) {
14310
+ const ref = React.useRef(null);
14311
+ const { buttonProps, isPressed } = reactAria.useButton(
14312
+ {
14313
+ isDisabled: isDisabled ?? false,
14314
+ ...onPress ? { onPress } : {},
14315
+ ...ariaLabel ? { "aria-label": ariaLabel } : {}
13924
14316
  },
13925
- defaultVariants: {
13926
- state: "enabled"
14317
+ ref
14318
+ );
14319
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
14320
+ const { isHovered, hoverProps } = reactAria.useHover({ isDisabled: isDisabled ?? false });
14321
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14322
+ "button",
14323
+ {
14324
+ ...reactAria.mergeProps(buttonProps, focusProps, hoverProps),
14325
+ ref,
14326
+ type: "button",
14327
+ className: cn(navButtonVariants()),
14328
+ ...getInteractionDataAttributes({
14329
+ isHovered,
14330
+ isFocusVisible,
14331
+ isPressed,
14332
+ isDisabled: isDisabled ?? false
14333
+ }),
14334
+ children: [
14335
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(navButtonStateLayerVariants()), "aria-hidden": "true" }),
14336
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(navButtonFocusRingVariants()), "aria-hidden": "true" }),
14337
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none relative z-10 flex items-center justify-center", children })
14338
+ ]
13927
14339
  }
13928
- }
13929
- );
13930
- var yearItemVariants = classVarianceAuthority.cva(
13931
- [
13932
- "w-[88px]",
13933
- // NOTE: measurement-derived (88dp); permitted exception
13934
- "h-[52px]",
13935
- // NOTE: measurement-derived (52dp); permitted exception
13936
- "rounded-full",
13937
- // pill shape
13938
- "flex",
13939
- "items-center",
13940
- "justify-center",
13941
- "text-body-large",
13942
- "cursor-pointer",
13943
- "transition-colors",
13944
- "duration-spring-standard-fast-effects",
13945
- "ease-spring-standard-fast-effects"
13946
- ],
13947
- {
13948
- variants: {
13949
- selected: {
13950
- true: "bg-primary text-on-primary",
13951
- false: "text-on-surface-variant"
13952
- },
13953
- state: {
13954
- enabled: "",
13955
- hovered: "",
13956
- focused: "",
13957
- pressed: "",
13958
- disabled: "text-on-surface/38 cursor-not-allowed"
13959
- }
13960
- },
13961
- compoundVariants: [
13962
- {
13963
- selected: false,
13964
- state: "hovered",
13965
- className: "bg-on-surface-variant/8"
13966
- },
13967
- {
13968
- selected: false,
13969
- state: "focused",
13970
- className: "bg-on-surface-variant/10"
13971
- },
13972
- {
13973
- selected: true,
13974
- state: "hovered",
13975
- className: "bg-primary/90"
13976
- },
14340
+ );
14341
+ }
14342
+ StyledNavButton.displayName = "StyledNavButton";
14343
+ function StyledCalendarTitle({
14344
+ title,
14345
+ onClick,
14346
+ showDropdownIndicator
14347
+ }) {
14348
+ const ref = React.useRef(null);
14349
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
14350
+ const { isHovered, hoverProps } = reactAria.useHover({});
14351
+ const { pressProps, isPressed } = reactAria.usePress({});
14352
+ if (onClick) {
14353
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14354
+ "button",
13977
14355
  {
13978
- selected: true,
13979
- state: "focused",
13980
- className: "bg-primary/90"
14356
+ ...reactAria.mergeProps(focusProps, hoverProps, pressProps),
14357
+ ref,
14358
+ type: "button",
14359
+ className: cn(calendarTitleVariants()),
14360
+ "aria-label": `${title}, click to select year`,
14361
+ onClick,
14362
+ ...getInteractionDataAttributes({ isHovered, isFocusVisible, isPressed }),
14363
+ children: [
14364
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(calendarTitleStateLayerVariants()), "aria-hidden": "true" }),
14365
+ /* @__PURE__ */ jsxRuntime.jsx("h2", { "aria-live": "polite", className: cn(calendarTitleTextVariants()), children: title }),
14366
+ showDropdownIndicator && /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(calendarTitleIconVariants()), children: /* @__PURE__ */ jsxRuntime.jsx(DropdownArrowIcon, {}) })
14367
+ ]
13981
14368
  }
13982
- ],
13983
- defaultVariants: {
13984
- selected: false,
13985
- state: "enabled"
13986
- }
14369
+ );
13987
14370
  }
13988
- );
13989
- var datePickerDividerVariants = classVarianceAuthority.cva(["border-outline-variant", "border-t", "w-full"]);
13990
- var datePickerActionVariants = classVarianceAuthority.cva([
13991
- "flex",
13992
- "items-center",
13993
- "justify-end",
13994
- "gap-2",
13995
- "px-3",
13996
- "py-2",
13997
- "h-12"
13998
- // NOTE: measurement-derived (48dp action row height); permitted exception
13999
- ]);
14000
- var datePickerActionButtonVariants = classVarianceAuthority.cva([
14001
- "text-primary",
14002
- "text-label-large",
14003
- "rounded-full",
14004
- "px-3",
14005
- "py-2",
14006
- "transition-colors",
14007
- "duration-spring-standard-fast-effects",
14008
- "ease-spring-standard-fast-effects",
14009
- "hover:bg-primary/8",
14010
- "focus-visible:bg-primary/10",
14011
- "active:bg-primary/10"
14012
- ]);
14013
- var datePickerWeekdayVariants = classVarianceAuthority.cva([
14014
- "text-body-small",
14015
- "text-on-surface",
14016
- "font-normal",
14017
- "w-[48px]",
14018
- // NOTE: measurement-derived (48dp column width); permitted exception
14019
- "h-[48px]",
14020
- // NOTE: measurement-derived (48dp row height); permitted exception
14021
- "text-center"
14022
- ]);
14023
- var datePickerRangeIndicatorVariants = classVarianceAuthority.cva([
14024
- "bg-secondary-container",
14025
- "h-[48px]",
14026
- // NOTE: measurement-derived (48dp range indicator height); permitted exception
14027
- "rounded-none"
14028
- ]);
14029
- var datePickerHeadlineVariants = classVarianceAuthority.cva([], {
14030
- variants: {
14031
- variant: {
14032
- docked: "",
14033
- modal: ["text-headline-small", "text-on-surface"],
14034
- "modal-input": ["text-headline-small", "text-on-surface"]
14371
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(calendarTitleVariants(), "cursor-default"), children: /* @__PURE__ */ jsxRuntime.jsx("h2", { "aria-live": "polite", className: cn(calendarTitleTextVariants()), children: title }) });
14372
+ }
14373
+ StyledCalendarTitle.displayName = "StyledCalendarTitle";
14374
+ calendarHeaderVariants();
14375
+ function StyledYearItem({
14376
+ year,
14377
+ isSelected,
14378
+ onSelect
14379
+ }) {
14380
+ const ref = React.useRef(null);
14381
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
14382
+ const { isHovered, hoverProps } = reactAria.useHover({});
14383
+ const { pressProps, isPressed } = reactAria.usePress({});
14384
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14385
+ "button",
14386
+ {
14387
+ ...reactAria.mergeProps(focusProps, hoverProps, pressProps),
14388
+ ref,
14389
+ type: "button",
14390
+ role: "gridcell",
14391
+ "aria-selected": isSelected,
14392
+ className: cn(yearItemVariants()),
14393
+ onClick: () => onSelect(year),
14394
+ ...getInteractionDataAttributes({
14395
+ isHovered,
14396
+ isFocusVisible,
14397
+ isPressed,
14398
+ isSelected
14399
+ }),
14400
+ children: [
14401
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(yearItemStateLayerVariants()), "aria-hidden": "true" }),
14402
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(yearItemFocusRingVariants()), "aria-hidden": "true" }),
14403
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none relative z-10", children: year })
14404
+ ]
14405
+ }
14406
+ );
14407
+ }
14408
+ StyledYearItem.displayName = "StyledYearItem";
14409
+ function StyledWeekday({ label }) {
14410
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(weekdayVariants()), children: label });
14411
+ }
14412
+ StyledWeekday.displayName = "StyledWeekday";
14413
+ function StyledActionButton({
14414
+ label,
14415
+ "aria-label": ariaLabel,
14416
+ onPress,
14417
+ isDisabled,
14418
+ "data-action": dataAction
14419
+ }) {
14420
+ const ref = React.useRef(null);
14421
+ const { buttonProps, isPressed } = reactAria.useButton(
14422
+ {
14423
+ "aria-label": ariaLabel ?? label,
14424
+ isDisabled: isDisabled ?? false,
14425
+ ...onPress ? { onPress } : {}
14426
+ },
14427
+ ref
14428
+ );
14429
+ const { isFocusVisible, focusProps } = reactAria.useFocusRing();
14430
+ const { isHovered, hoverProps } = reactAria.useHover({ isDisabled: isDisabled ?? false });
14431
+ return /* @__PURE__ */ jsxRuntime.jsxs(
14432
+ "button",
14433
+ {
14434
+ ...reactAria.mergeProps(buttonProps, focusProps, hoverProps),
14435
+ ref,
14436
+ type: "button",
14437
+ "data-action": dataAction,
14438
+ className: cn(actionButtonVariants()),
14439
+ ...getInteractionDataAttributes({
14440
+ isHovered,
14441
+ isFocusVisible,
14442
+ isPressed,
14443
+ isDisabled: isDisabled ?? false
14444
+ }),
14445
+ children: [
14446
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(actionButtonStateLayerVariants()), "aria-hidden": "true" }),
14447
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(actionButtonFocusRingVariants()), "aria-hidden": "true" }),
14448
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "pointer-events-none relative z-10", children: label })
14449
+ ]
14035
14450
  }
14036
- },
14037
- defaultVariants: {
14038
- variant: "modal"
14039
- }
14040
- });
14041
- var datePickerSupportingTextVariants = classVarianceAuthority.cva([
14042
- "text-label-large",
14043
- "text-on-surface-variant"
14044
- ]);
14045
- var datePickerScrimVariants = classVarianceAuthority.cva([
14046
- "fixed",
14047
- "inset-0",
14048
- "z-40",
14049
- "bg-scrim",
14050
- "opacity-32",
14051
- "transition-opacity",
14052
- "duration-medium2",
14053
- "ease-standard"
14054
- ]);
14055
- var CALENDAR_STYLES = [
14056
- // ── Label ─────────────────────────────────────────────────────────────────
14451
+ );
14452
+ }
14453
+ StyledActionButton.displayName = "StyledActionButton";
14454
+
14455
+ // src/components/DatePicker/datePickerStructuralStyles.ts
14456
+ var CALENDAR_HEADER_STRUCTURAL = [
14457
+ "[&_[data-calendar-header]]:flex",
14458
+ "[&_[data-calendar-header]]:items-center",
14459
+ "[&_[data-calendar-header]]:justify-between",
14460
+ "[&_[data-calendar-header]]:px-3",
14461
+ "[&_[data-calendar-header]]:py-2",
14462
+ // Nav group
14463
+ "[&_[data-calendar-nav]]:flex",
14464
+ "[&_[data-calendar-nav]]:items-center",
14465
+ "[&_[data-calendar-nav]]:gap-1"
14466
+ ];
14467
+ var CALENDAR_GRID_STRUCTURAL = [
14468
+ // Table resets
14469
+ "[&_table]:border-collapse",
14470
+ // Center the fixed-width table so 7×48px = 336px is equally inset within 360px
14471
+ "[&_table]:mx-auto",
14472
+ "[&_th]:p-0",
14473
+ "[&_td]:p-0"
14474
+ ];
14475
+ var YEAR_GRID_STRUCTURAL = [
14476
+ "[&_[data-year-grid]]:grid",
14477
+ "[&_[data-year-grid]]:grid-cols-3",
14478
+ "[&_[data-year-grid]]:gap-2",
14479
+ "[&_[data-year-grid]]:px-3",
14480
+ "[&_[data-year-grid]]:py-2",
14481
+ "[&_[data-year-grid]]:max-h-[280px]",
14482
+ "[&_[data-year-grid]]:overflow-y-auto",
14483
+ "[&_[data-year-grid]]:place-items-center"
14484
+ ];
14485
+ var DIVIDER_STRUCTURAL = ["[&_hr[data-divider]]:border-outline-variant"];
14486
+ var ACTION_ROW_STRUCTURAL = [
14487
+ "[&_[data-actions]]:flex",
14488
+ "[&_[data-actions]]:items-center",
14489
+ "[&_[data-actions]]:justify-end",
14490
+ "[&_[data-actions]]:gap-2",
14491
+ "[&_[data-actions]]:px-3",
14492
+ "[&_[data-actions]]:py-2",
14493
+ "[&_[data-actions]]:h-12"
14494
+ ];
14495
+ var DOCKED_LABEL_STRUCTURAL = [
14057
14496
  "[&_[data-label]]:text-body-small",
14058
14497
  "[&_[data-label]]:text-on-surface-variant",
14059
14498
  "[&_[data-label]]:mb-1",
14060
- "[&_[data-label]]:block",
14061
- // ── Field group (outlined text field container) ───────────────────────────
14499
+ "[&_[data-label]]:block"
14500
+ ];
14501
+ var DOCKED_FIELD_STRUCTURAL = [
14062
14502
  "[&_[data-field-group]]:flex",
14063
14503
  "[&_[data-field-group]]:items-center",
14064
14504
  "[&_[data-field-group]]:border",
@@ -14070,15 +14510,16 @@ var CALENDAR_STYLES = [
14070
14510
  "[&_[data-field-group]]:bg-transparent",
14071
14511
  "[&_[data-field-group]:focus-within]:border-primary",
14072
14512
  "[&_[data-field-group]:focus-within]:border-2",
14073
- // ── Date field segments (inline rendering) ────────────────────────────────
14074
14513
  "[&_[data-field]]:flex",
14075
14514
  "[&_[data-field]]:items-center",
14076
14515
  "[&_[data-field]]:flex-1",
14077
14516
  "[&_[data-field]]:text-body-large",
14078
14517
  "[&_[data-field]]:text-on-surface",
14079
14518
  "[&_[data-segment]]:outline-none",
14080
- "[&_[data-segment][data-placeholder]]:text-on-surface-variant",
14081
- // ── Trigger button (calendar icon) ────────────────────────────────────────
14519
+ "[&_[data-segment][data-placeholder]]:text-on-surface-variant"
14520
+ ];
14521
+ var DOCKED_TRIGGER_STRUCTURAL = [
14522
+ "[&_[data-trigger]]:relative",
14082
14523
  "[&_[data-trigger]]:flex",
14083
14524
  "[&_[data-trigger]]:items-center",
14084
14525
  "[&_[data-trigger]]:justify-center",
@@ -14086,178 +14527,109 @@ var CALENDAR_STYLES = [
14086
14527
  "[&_[data-trigger]]:h-10",
14087
14528
  "[&_[data-trigger]]:rounded-full",
14088
14529
  "[&_[data-trigger]]:text-on-surface-variant",
14530
+ "[&_[data-trigger]]:bg-transparent",
14531
+ "[&_[data-trigger]]:border-none",
14532
+ "[&_[data-trigger]]:cursor-pointer",
14089
14533
  "[&_[data-trigger]]:transition-colors",
14090
14534
  "[&_[data-trigger]]:duration-spring-standard-fast-effects",
14091
14535
  "[&_[data-trigger]]:ease-spring-standard-fast-effects",
14092
- "[&_[data-trigger]:hover]:bg-on-surface/8",
14093
- // ── Popover ───────────────────────────────────────────────────────────────
14094
- "[&_[data-popover]]:bg-surface-container-high",
14095
- "[&_[data-popover]]:rounded-3xl",
14096
- "[&_[data-popover]]:mt-1",
14097
- "[&_[data-popover]]:shadow-elevation-2",
14098
- "[&_[data-popover]]:overflow-hidden",
14099
- "[&_[data-popover]]:z-50",
14100
- // ── Calendar header ───────────────────────────────────────────────────────
14101
- "[&_[data-calendar-header]]:flex",
14102
- "[&_[data-calendar-header]]:items-center",
14103
- "[&_[data-calendar-header]]:justify-between",
14104
- "[&_[data-calendar-header]]:px-3",
14105
- "[&_[data-calendar-header]]:py-2",
14106
- // ── Calendar title (month/year label) ─────────────────────────────────────
14107
- "[&_[data-calendar-title]]:flex",
14108
- "[&_[data-calendar-title]]:items-center",
14109
- "[&_[data-calendar-title]]:gap-0.5",
14110
- "[&_[data-calendar-title]]:bg-transparent",
14111
- "[&_[data-calendar-title]]:border-none",
14112
- "[&_[data-calendar-title]]:cursor-pointer",
14113
- "[&_[data-calendar-title]]:rounded-full",
14114
- "[&_[data-calendar-title]]:px-2",
14115
- "[&_[data-calendar-title]]:py-1",
14116
- "[&_[data-calendar-title]]:transition-colors",
14117
- "[&_[data-calendar-title]]:duration-spring-standard-fast-effects",
14118
- "[&_[data-calendar-title]]:ease-spring-standard-fast-effects",
14119
- "[&_[data-calendar-title]:hover]:bg-on-surface/8",
14120
- "[&_[data-calendar-title]_h2]:text-label-large",
14121
- "[&_[data-calendar-title]_h2]:text-on-surface-variant",
14122
- "[&_[data-calendar-title]_h2]:m-0",
14123
- "[&_[data-calendar-title]_svg]:text-on-surface-variant",
14124
- // ── Calendar navigation buttons ───────────────────────────────────────────
14125
- "[&_[data-calendar-nav]]:flex",
14126
- "[&_[data-calendar-nav]]:items-center",
14127
- "[&_[data-calendar-nav]]:gap-1",
14128
- "[&_[data-nav-button]]:w-10",
14129
- "[&_[data-nav-button]]:h-10",
14130
- "[&_[data-nav-button]]:rounded-full",
14131
- "[&_[data-nav-button]]:flex",
14132
- "[&_[data-nav-button]]:items-center",
14133
- "[&_[data-nav-button]]:justify-center",
14134
- "[&_[data-nav-button]]:text-on-surface-variant",
14135
- "[&_[data-nav-button]]:bg-transparent",
14136
- "[&_[data-nav-button]]:border-none",
14137
- "[&_[data-nav-button]]:transition-colors",
14138
- "[&_[data-nav-button]]:duration-spring-standard-fast-effects",
14139
- "[&_[data-nav-button]]:ease-spring-standard-fast-effects",
14140
- "[&_[data-nav-button]:hover]:bg-on-surface/8",
14141
- "[&_[data-nav-button]:focus-visible]:bg-on-surface/10",
14142
- "[&_[data-nav-button]:disabled]:text-on-surface/38",
14143
- "[&_[data-nav-button]:disabled]:cursor-not-allowed",
14144
- // ── Cell base ─────────────────────────────────────────────────────────────
14145
- "[&_td>div]:w-[48px]",
14146
- "[&_td>div]:h-[48px]",
14147
- "[&_td>div]:rounded-full",
14148
- "[&_td>div]:flex",
14149
- "[&_td>div]:items-center",
14150
- "[&_td>div]:justify-center",
14151
- "[&_td>div]:text-body-large",
14152
- "[&_td>div]:text-on-surface",
14153
- "[&_td>div]:relative",
14154
- "[&_td>div]:cursor-pointer",
14155
- "[&_td>div]:select-none",
14156
- "[&_td>div]:transition-colors",
14157
- "[&_td>div]:duration-spring-standard-fast-effects",
14158
- "[&_td>div]:ease-spring-standard-fast-effects",
14159
- // ── Today (not selected) ──────────────────────────────────────────────────
14160
- "[&_td>div[data-today]:not([data-selected])]:text-primary",
14161
- "[&_td>div[data-today]:not([data-selected])]:border",
14162
- "[&_td>div[data-today]:not([data-selected])]:border-primary",
14163
- // ── Selected ──────────────────────────────────────────────────────────────
14164
- "[&_td>div[data-selected]]:bg-primary",
14165
- "[&_td>div[data-selected]]:text-on-primary",
14166
- // ── Range middle ──────────────────────────────────────────────────────────
14167
- "[&_td>div[data-range-middle]]:bg-secondary-container",
14168
- "[&_td>div[data-range-middle]]:text-on-secondary-container",
14169
- "[&_td>div[data-range-middle]]:rounded-none",
14170
- // ── Outside month ─────────────────────────────────────────────────────────
14171
- "[&_td>div[data-outside-month]:not([data-selected])]:text-on-surface-variant",
14172
- // ── Disabled ──────────────────────────────────────────────────────────────
14173
- "[&_td>div[data-disabled]]:text-on-surface/38",
14174
- "[&_td>div[data-disabled]]:cursor-not-allowed",
14175
- // ── Cell hover states ─────────────────────────────────────────────────────
14176
- "[&_td>div:not([data-selected]):not([data-today]):not([data-disabled]):hover]:bg-on-surface/8",
14177
- "[&_td>div[data-today]:not([data-selected]):hover]:bg-primary/8",
14178
- "[&_td>div[data-selected]:hover]:shadow-sm",
14179
- // ── Cell focus-visible states ─────────────────────────────────────────────
14180
- "[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-2",
14181
- "[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-on-surface",
14182
- "[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:bg-on-surface/10",
14183
- "[&_td>div[data-today][data-focus-visible]:not([data-selected])]:bg-primary/10",
14184
- // ── Weekday labels ────────────────────────────────────────────────────────
14185
- "[&_th]:text-body-small",
14186
- "[&_th]:text-on-surface",
14187
- "[&_th]:font-normal",
14188
- "[&_th]:w-[48px]",
14189
- "[&_th]:h-[48px]",
14190
- // ── Year grid ─────────────────────────────────────────────────────────────
14191
- "[&_[data-year-grid]]:grid",
14192
- "[&_[data-year-grid]]:grid-cols-3",
14193
- "[&_[data-year-grid]]:gap-2",
14194
- "[&_[data-year-grid]]:px-3",
14195
- "[&_[data-year-grid]]:py-2",
14196
- "[&_[data-year-grid]]:max-h-[280px]",
14197
- "[&_[data-year-grid]]:overflow-y-auto",
14198
- "[&_[data-year-grid]]:place-items-center",
14199
- "[&_[data-year-item]]:w-[88px]",
14200
- "[&_[data-year-item]]:h-[52px]",
14201
- "[&_[data-year-item]]:rounded-full",
14202
- "[&_[data-year-item]]:flex",
14203
- "[&_[data-year-item]]:items-center",
14204
- "[&_[data-year-item]]:justify-center",
14205
- "[&_[data-year-item]]:text-body-large",
14206
- "[&_[data-year-item]]:text-on-surface-variant",
14207
- "[&_[data-year-item]]:bg-transparent",
14208
- "[&_[data-year-item]]:border-none",
14209
- "[&_[data-year-item]]:cursor-pointer",
14210
- "[&_[data-year-item]]:transition-colors",
14211
- "[&_[data-year-item]]:duration-spring-standard-fast-effects",
14212
- "[&_[data-year-item]]:ease-spring-standard-fast-effects",
14213
- "[&_[data-year-item]:hover]:bg-on-surface/8",
14214
- "[&_[data-year-item][data-selected]]:bg-primary",
14215
- "[&_[data-year-item][data-selected]]:text-on-primary",
14216
- // ── Divider ───────────────────────────────────────────────────────────────
14217
- "[&_hr[data-divider]]:border-outline-variant",
14218
- // ── Action buttons ────────────────────────────────────────────────────────
14219
- "[&_[data-actions]]:flex",
14220
- "[&_[data-actions]]:items-center",
14221
- "[&_[data-actions]]:justify-end",
14222
- "[&_[data-actions]]:gap-2",
14223
- "[&_[data-actions]]:px-3",
14224
- "[&_[data-actions]]:py-2",
14225
- "[&_[data-action]]:text-primary",
14226
- "[&_[data-action]]:text-label-large",
14227
- "[&_[data-action]]:rounded-full",
14228
- "[&_[data-action]]:px-3",
14229
- "[&_[data-action]]:py-2",
14230
- "[&_[data-action]]:min-h-12",
14231
- "[&_[data-action]]:bg-transparent",
14232
- "[&_[data-action]]:border-none",
14233
- "[&_[data-action]]:transition-colors",
14234
- "[&_[data-action]]:duration-spring-standard-fast-effects",
14235
- "[&_[data-action]]:ease-spring-standard-fast-effects",
14236
- "[&_[data-action]:hover]:bg-primary/8",
14237
- "[&_[data-action]:focus-visible]:ring-2",
14238
- "[&_[data-action]:focus-visible]:ring-primary",
14239
- "[&_[data-action]:focus-visible]:bg-primary/10"
14536
+ // Hover: 8% overlay via bg tint (acceptable for structural trigger)
14537
+ "[&_[data-trigger][data-hovered]]:bg-on-surface-variant/8",
14538
+ "[&_[data-trigger][data-focus-visible]]:bg-on-surface-variant/10",
14539
+ "[&_[data-trigger][data-focus-visible]]:outline",
14540
+ "[&_[data-trigger][data-focus-visible]]:outline-2",
14541
+ "[&_[data-trigger][data-focus-visible]]:outline-secondary",
14542
+ "[&_[data-trigger][data-disabled]]:text-on-surface/38",
14543
+ "[&_[data-trigger][data-disabled]]:cursor-not-allowed"
14544
+ ];
14545
+ var MODAL_HEADER_STRUCTURAL = [
14546
+ "[&_[data-modal-header]]:px-6",
14547
+ "[&_[data-modal-header]]:pt-4",
14548
+ "[&_[data-modal-header]]:pb-3",
14549
+ "[&_[data-modal-header]]:flex",
14550
+ "[&_[data-modal-header]]:items-start",
14551
+ "[&_[data-modal-header]]:justify-between",
14552
+ "[&_[data-headline]]:text-label-large",
14553
+ "[&_[data-headline]]:text-on-surface-variant",
14554
+ "[&_[data-headline]]:m-0",
14555
+ "[&_[data-supporting-text]]:text-headline-large",
14556
+ "[&_[data-supporting-text]]:text-on-surface",
14557
+ "[&_[data-supporting-text]]:mt-9",
14558
+ "[&_[data-supporting-text]]:m-0"
14559
+ ];
14560
+ var MODAL_INPUT_SUPPORTING_TEXT_STRUCTURAL = [
14561
+ "[&_[data-supporting-text]]:text-headline-large",
14562
+ "[&_[data-supporting-text]]:text-on-surface",
14563
+ "[&_[data-supporting-text]]:mt-4",
14564
+ "[&_[data-supporting-text]]:m-0"
14565
+ ];
14566
+ var MODAL_INPUT_FIELD_STRUCTURAL = [
14567
+ "[&_[data-date-input-field]]:px-6",
14568
+ "[&_[data-date-input-field]]:py-2",
14569
+ "[&_[data-date-input-field]_[data-field]]:flex",
14570
+ "[&_[data-date-input-field]_[data-field]]:items-center",
14571
+ "[&_[data-date-input-field]_[data-field]]:border",
14572
+ "[&_[data-date-input-field]_[data-field]]:border-outline",
14573
+ "[&_[data-date-input-field]_[data-field]]:rounded-sm",
14574
+ "[&_[data-date-input-field]_[data-field]]:px-4",
14575
+ "[&_[data-date-input-field]_[data-field]]:py-3",
14576
+ "[&_[data-date-input-field]_[data-field]]:text-body-large",
14577
+ "[&_[data-date-input-field]_[data-field]]:text-on-surface",
14578
+ "[&_[data-date-input-field]_[data-segment]]:outline-none",
14579
+ "[&_[data-date-input-field]_[data-segment][data-placeholder]]:text-on-surface-variant",
14580
+ "[&_[data-date-input-field][data-focused]_[data-field]]:border-primary",
14581
+ "[&_[data-date-input-field][data-focused]_[data-field]]:border-2",
14582
+ "[&_[data-date-input-field][data-invalid]_[data-field]]:border-error",
14583
+ "[&_[data-date-input-field][data-invalid]_[data-field]]:border-2",
14584
+ "[&_[data-date-input-field]_[data-label]]:text-body-small",
14585
+ "[&_[data-date-input-field]_[data-label]]:text-on-surface-variant",
14586
+ "[&_[data-date-input-field]_[data-label]]:block",
14587
+ "[&_[data-date-input-field]_[data-label]]:mb-1",
14588
+ "[&_[data-date-input-field]_[data-error-message]]:text-body-small",
14589
+ "[&_[data-date-input-field]_[data-error-message]]:text-error",
14590
+ "[&_[data-date-input-field]_[data-error-message]]:mt-1"
14591
+ ];
14592
+ var SHARED_CALENDAR_STRUCTURAL = [
14593
+ ...CALENDAR_HEADER_STRUCTURAL,
14594
+ ...CALENDAR_GRID_STRUCTURAL,
14595
+ ...YEAR_GRID_STRUCTURAL,
14596
+ ...DIVIDER_STRUCTURAL,
14597
+ ...ACTION_ROW_STRUCTURAL
14598
+ ].join(" ");
14599
+ var MODAL_CONTENT_STRUCTURAL = [
14600
+ ...MODAL_HEADER_STRUCTURAL,
14601
+ ...CALENDAR_HEADER_STRUCTURAL,
14602
+ ...CALENDAR_GRID_STRUCTURAL,
14603
+ ...YEAR_GRID_STRUCTURAL,
14604
+ ...DIVIDER_STRUCTURAL,
14605
+ ...ACTION_ROW_STRUCTURAL
14240
14606
  ].join(" ");
14241
- var DOCKED_MOTION_STYLES = [
14242
- // ── Popover container enter ────────────────────────────────────────────────
14243
- "[&_[data-popover]]:transition-[transform,opacity]",
14244
- "[&_[data-popover]]:duration-short3",
14245
- "[&_[data-popover]]:ease-standard-decelerate",
14246
- // ── Popover container exit ─────────────────────────────────────────────────
14247
- "[&_[data-popover][data-exiting]]:duration-short2",
14248
- "[&_[data-popover][data-exiting]]:ease-standard-accelerate",
14249
- // ── Calendar month slide ───────────────────────────────────────────────────
14250
- "[&_table]:transition-transform",
14251
- "[&_table]:duration-medium1",
14252
- "[&_table]:ease-emphasized-decelerate",
14253
- // ── Cell selection animation (scale + background) ──────────────────────────
14254
- "[&_td>div[data-selected]]:transition-[background-color,transform]",
14255
- "[&_td>div[data-selected]]:duration-short2",
14256
- "[&_td>div[data-selected]]:ease-standard",
14257
- // ── State layer opacity ────────────────────────────────────────────────────
14258
- "[&_td>div::after]:transition-opacity",
14259
- "[&_td>div::after]:duration-short1",
14260
- "[&_td>div::after]:ease-standard"
14607
+ var MODAL_INPUT_CONTENT_STRUCTURAL = [
14608
+ ...MODAL_HEADER_STRUCTURAL,
14609
+ ...MODAL_INPUT_SUPPORTING_TEXT_STRUCTURAL,
14610
+ ...MODAL_INPUT_FIELD_STRUCTURAL,
14611
+ ...DIVIDER_STRUCTURAL,
14612
+ ...ACTION_ROW_STRUCTURAL
14613
+ ].join(" ");
14614
+ var DOCKED_ROOT_STRUCTURAL = [
14615
+ ...DOCKED_LABEL_STRUCTURAL,
14616
+ ...DOCKED_FIELD_STRUCTURAL,
14617
+ ...DOCKED_TRIGGER_STRUCTURAL
14618
+ ].join(" ");
14619
+ var DOCKED_POPOVER_PANEL_STRUCTURAL = SHARED_CALENDAR_STRUCTURAL;
14620
+ var DOCKED_POPOVER_MOTION = [
14621
+ "transition-[transform,opacity]",
14622
+ "duration-short3",
14623
+ "ease-standard-decelerate",
14624
+ "data-[exiting]:duration-short2",
14625
+ "data-[exiting]:ease-standard-accelerate"
14626
+ ].join(" ");
14627
+ var MODAL_DIALOG_MOTION = [
14628
+ "transition-[transform,opacity]",
14629
+ "duration-medium2",
14630
+ "ease-standard-decelerate",
14631
+ "data-[exiting]:duration-medium1",
14632
+ "data-[exiting]:ease-standard-accelerate"
14261
14633
  ].join(" ");
14262
14634
  var DatePickerDockedStyled = React.forwardRef(
14263
14635
  (props, ref) => {
@@ -14270,10 +14642,22 @@ var DatePickerDockedStyled = React.forwardRef(
14270
14642
  ...rest,
14271
14643
  className: cn(
14272
14644
  datePickerContainerVariants({ variant: "docked" }),
14273
- CALENDAR_STYLES,
14274
- !reducedMotion && DOCKED_MOTION_STYLES,
14645
+ DOCKED_ROOT_STRUCTURAL,
14275
14646
  className
14276
- )
14647
+ ),
14648
+ popoverClassName: cn(
14649
+ popoverVariants(),
14650
+ DOCKED_POPOVER_PANEL_STRUCTURAL,
14651
+ !reducedMotion && DOCKED_POPOVER_MOTION
14652
+ ),
14653
+ slots: {
14654
+ CellComponent: StyledCalendarCell,
14655
+ NavButtonComponent: StyledNavButton,
14656
+ TitleComponent: StyledCalendarTitle,
14657
+ YearItemComponent: StyledYearItem,
14658
+ WeekdayComponent: StyledWeekday
14659
+ },
14660
+ ActionButtonComponent: StyledActionButton
14277
14661
  }
14278
14662
  );
14279
14663
  }
@@ -14346,7 +14730,10 @@ var DatePickerModal = React.forwardRef(
14346
14730
  onCancel,
14347
14731
  onConfirm,
14348
14732
  onClear,
14349
- className
14733
+ className,
14734
+ scrimClassName,
14735
+ slots,
14736
+ ActionButtonComponent
14350
14737
  } = props;
14351
14738
  const internalRef = React.useRef(null);
14352
14739
  const ref = forwardedRef ?? internalRef;
@@ -14470,6 +14857,7 @@ var DatePickerModal = React.forwardRef(
14470
14857
  headlineId,
14471
14858
  onClose: handleClose,
14472
14859
  ...className ? { className } : {},
14860
+ ...scrimClassName ? { scrimClassName } : {},
14473
14861
  isOpen: state.isOpen,
14474
14862
  children: [
14475
14863
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -14491,7 +14879,8 @@ var DatePickerModal = React.forwardRef(
14491
14879
  onChange: handleSingleChange,
14492
14880
  ...minValue ? { minValue } : {},
14493
14881
  ...maxValue ? { maxValue } : {},
14494
- ...isDateUnavailable ? { isDateUnavailable } : {}
14882
+ ...isDateUnavailable ? { isDateUnavailable } : {},
14883
+ ...slots ? { slots } : {}
14495
14884
  }
14496
14885
  ) : /* @__PURE__ */ jsxRuntime.jsx(
14497
14886
  CalendarCore,
@@ -14503,7 +14892,8 @@ var DatePickerModal = React.forwardRef(
14503
14892
  onRangeChange: handleRangeChange,
14504
14893
  ...minValue ? { minValue } : {},
14505
14894
  ...maxValue ? { maxValue } : {},
14506
- ...isDateUnavailable ? { isDateUnavailable } : {}
14895
+ ...isDateUnavailable ? { isDateUnavailable } : {},
14896
+ ...slots ? { slots } : {}
14507
14897
  }
14508
14898
  ),
14509
14899
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -14515,7 +14905,8 @@ var DatePickerModal = React.forwardRef(
14515
14905
  showClear,
14516
14906
  onCancel: handleCancel,
14517
14907
  onConfirm: handleConfirm,
14518
- onClear: handleClear
14908
+ onClear: handleClear,
14909
+ ...ActionButtonComponent ? { ButtonComponent: ActionButtonComponent } : {}
14519
14910
  }
14520
14911
  )
14521
14912
  ]
@@ -14533,6 +14924,7 @@ function ModalOverlay({
14533
14924
  headlineId,
14534
14925
  onClose,
14535
14926
  className,
14927
+ scrimClassName,
14536
14928
  isOpen,
14537
14929
  children
14538
14930
  }) {
@@ -14553,7 +14945,7 @@ function ModalOverlay({
14553
14945
  dialogRef
14554
14946
  );
14555
14947
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
14556
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose }),
14948
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose, className: scrimClassName }),
14557
14949
  /* @__PURE__ */ jsxRuntime.jsx(
14558
14950
  "div",
14559
14951
  {
@@ -14571,210 +14963,6 @@ function ModalOverlay({
14571
14963
  ] });
14572
14964
  }
14573
14965
  ModalOverlay.displayName = "ModalOverlay";
14574
- var MODAL_STYLES = [
14575
- // ── Container structure ───────────────────────────────────────────────────
14576
- "[&_[data-modal-dialog]]:bg-surface-container-high",
14577
- "[&_[data-modal-dialog]]:rounded-3xl",
14578
- "[&_[data-modal-dialog]]:overflow-hidden",
14579
- "[&_[data-modal-dialog]]:fixed",
14580
- "[&_[data-modal-dialog]]:top-1/2",
14581
- "[&_[data-modal-dialog]]:left-1/2",
14582
- "[&_[data-modal-dialog]]:-translate-x-1/2",
14583
- "[&_[data-modal-dialog]]:-translate-y-1/2",
14584
- "[&_[data-modal-dialog]]:z-50",
14585
- "[&_[data-modal-dialog]]:w-[360px]",
14586
- "[&_[data-modal-dialog]]:max-h-[90vh]",
14587
- "[&_[data-modal-dialog]]:overflow-y-auto",
14588
- // ── Header ────────────────────────────────────────────────────────────────
14589
- "[&_[data-modal-header]]:px-6",
14590
- "[&_[data-modal-header]]:pt-4",
14591
- "[&_[data-modal-header]]:pb-3",
14592
- "[&_[data-modal-header]]:flex",
14593
- "[&_[data-modal-header]]:items-start",
14594
- "[&_[data-modal-header]]:justify-between",
14595
- "[&_[data-headline]]:text-label-large",
14596
- "[&_[data-headline]]:text-on-surface-variant",
14597
- "[&_[data-headline]]:m-0",
14598
- "[&_[data-supporting-text]]:text-headline-large",
14599
- "[&_[data-supporting-text]]:text-on-surface",
14600
- "[&_[data-supporting-text]]:mt-9",
14601
- "[&_[data-supporting-text]]:m-0",
14602
- "[&_[data-mode-toggle]]:w-12",
14603
- "[&_[data-mode-toggle]]:h-12",
14604
- "[&_[data-mode-toggle]]:rounded-full",
14605
- "[&_[data-mode-toggle]]:flex",
14606
- "[&_[data-mode-toggle]]:items-center",
14607
- "[&_[data-mode-toggle]]:justify-center",
14608
- "[&_[data-mode-toggle]]:text-on-surface-variant",
14609
- "[&_[data-mode-toggle]]:bg-transparent",
14610
- "[&_[data-mode-toggle]]:border-none",
14611
- "[&_[data-mode-toggle]]:self-end",
14612
- "[&_[data-mode-toggle]]:transition-colors",
14613
- "[&_[data-mode-toggle]]:duration-spring-standard-fast-effects",
14614
- "[&_[data-mode-toggle]]:ease-spring-standard-fast-effects",
14615
- "[&_[data-mode-toggle]:hover]:bg-on-surface-variant/8",
14616
- // ── Divider ───────────────────────────────────────────────────────────────
14617
- "[&_hr[data-divider]]:border-outline-variant",
14618
- // ── Calendar header ───────────────────────────────────────────────────────
14619
- "[&_[data-calendar-header]]:flex",
14620
- "[&_[data-calendar-header]]:items-center",
14621
- "[&_[data-calendar-header]]:justify-between",
14622
- "[&_[data-calendar-header]]:px-3",
14623
- "[&_[data-calendar-header]]:py-2",
14624
- "[&_[data-calendar-title]]:flex",
14625
- "[&_[data-calendar-title]]:items-center",
14626
- "[&_[data-calendar-title]]:gap-0.5",
14627
- "[&_[data-calendar-title]]:bg-transparent",
14628
- "[&_[data-calendar-title]]:border-none",
14629
- "[&_[data-calendar-title]]:cursor-pointer",
14630
- "[&_[data-calendar-title]]:rounded-full",
14631
- "[&_[data-calendar-title]]:px-2",
14632
- "[&_[data-calendar-title]]:py-1",
14633
- "[&_[data-calendar-title]]:transition-colors",
14634
- "[&_[data-calendar-title]]:duration-spring-standard-fast-effects",
14635
- "[&_[data-calendar-title]]:ease-spring-standard-fast-effects",
14636
- "[&_[data-calendar-title]:hover]:bg-on-surface/8",
14637
- "[&_[data-calendar-title]_h2]:text-label-large",
14638
- "[&_[data-calendar-title]_h2]:text-on-surface-variant",
14639
- "[&_[data-calendar-title]_h2]:m-0",
14640
- "[&_[data-calendar-title]_svg]:text-on-surface-variant",
14641
- "[&_[data-calendar-nav]]:flex",
14642
- "[&_[data-calendar-nav]]:items-center",
14643
- "[&_[data-calendar-nav]]:gap-1",
14644
- "[&_[data-nav-button]]:w-10",
14645
- "[&_[data-nav-button]]:h-10",
14646
- "[&_[data-nav-button]]:rounded-full",
14647
- "[&_[data-nav-button]]:flex",
14648
- "[&_[data-nav-button]]:items-center",
14649
- "[&_[data-nav-button]]:justify-center",
14650
- "[&_[data-nav-button]]:text-on-surface-variant",
14651
- "[&_[data-nav-button]]:bg-transparent",
14652
- "[&_[data-nav-button]]:border-none",
14653
- "[&_[data-nav-button]]:transition-colors",
14654
- "[&_[data-nav-button]]:duration-spring-standard-fast-effects",
14655
- "[&_[data-nav-button]]:ease-spring-standard-fast-effects",
14656
- "[&_[data-nav-button]:hover]:bg-on-surface/8",
14657
- "[&_[data-nav-button]:focus-visible]:bg-on-surface/10",
14658
- "[&_[data-nav-button]:disabled]:text-on-surface/38",
14659
- "[&_[data-nav-button]:disabled]:cursor-not-allowed",
14660
- // ── Calendar cells ────────────────────────────────────────────────────────
14661
- "[&_td>div]:w-[48px]",
14662
- "[&_td>div]:h-[48px]",
14663
- "[&_td>div]:rounded-full",
14664
- "[&_td>div]:flex",
14665
- "[&_td>div]:items-center",
14666
- "[&_td>div]:justify-center",
14667
- "[&_td>div]:text-body-large",
14668
- "[&_td>div]:text-on-surface",
14669
- "[&_td>div]:relative",
14670
- "[&_td>div]:cursor-pointer",
14671
- "[&_td>div]:select-none",
14672
- "[&_td>div]:transition-colors",
14673
- "[&_td>div]:duration-spring-standard-fast-effects",
14674
- "[&_td>div]:ease-spring-standard-fast-effects",
14675
- "[&_td>div[data-today]:not([data-selected])]:text-primary",
14676
- "[&_td>div[data-today]:not([data-selected])]:border",
14677
- "[&_td>div[data-today]:not([data-selected])]:border-primary",
14678
- "[&_td>div[data-selected]]:bg-primary",
14679
- "[&_td>div[data-selected]]:text-on-primary",
14680
- "[&_td>div[data-range-middle]]:bg-secondary-container",
14681
- "[&_td>div[data-range-middle]]:text-on-secondary-container",
14682
- "[&_td>div[data-range-middle]]:rounded-none",
14683
- "[&_td>div[data-outside-month]:not([data-selected])]:text-on-surface-variant",
14684
- "[&_td>div[data-disabled]]:text-on-surface/38",
14685
- "[&_td>div[data-disabled]]:cursor-not-allowed",
14686
- "[&_td>div:not([data-selected]):not([data-today]):not([data-disabled]):hover]:bg-on-surface/8",
14687
- "[&_td>div[data-today]:not([data-selected]):hover]:bg-primary/8",
14688
- "[&_td>div[data-selected]:hover]:shadow-sm",
14689
- "[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-2",
14690
- "[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-on-surface",
14691
- "[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:bg-on-surface/10",
14692
- "[&_td>div[data-today][data-focus-visible]:not([data-selected])]:bg-primary/10",
14693
- // ── Weekday labels ────────────────────────────────────────────────────────
14694
- "[&_th]:text-body-small",
14695
- "[&_th]:text-on-surface",
14696
- "[&_th]:font-normal",
14697
- "[&_th]:w-[48px]",
14698
- "[&_th]:h-[48px]",
14699
- // ── Year grid ─────────────────────────────────────────────────────────────
14700
- "[&_[data-year-grid]]:grid",
14701
- "[&_[data-year-grid]]:grid-cols-3",
14702
- "[&_[data-year-grid]]:gap-2",
14703
- "[&_[data-year-grid]]:px-3",
14704
- "[&_[data-year-grid]]:py-2",
14705
- "[&_[data-year-grid]]:max-h-[280px]",
14706
- "[&_[data-year-grid]]:overflow-y-auto",
14707
- "[&_[data-year-grid]]:place-items-center",
14708
- "[&_[data-year-item]]:w-[88px]",
14709
- "[&_[data-year-item]]:h-[52px]",
14710
- "[&_[data-year-item]]:rounded-full",
14711
- "[&_[data-year-item]]:flex",
14712
- "[&_[data-year-item]]:items-center",
14713
- "[&_[data-year-item]]:justify-center",
14714
- "[&_[data-year-item]]:text-body-large",
14715
- "[&_[data-year-item]]:text-on-surface-variant",
14716
- "[&_[data-year-item]]:bg-transparent",
14717
- "[&_[data-year-item]]:border-none",
14718
- "[&_[data-year-item]]:cursor-pointer",
14719
- "[&_[data-year-item]]:transition-colors",
14720
- "[&_[data-year-item]]:duration-spring-standard-fast-effects",
14721
- "[&_[data-year-item]]:ease-spring-standard-fast-effects",
14722
- "[&_[data-year-item]:hover]:bg-on-surface/8",
14723
- "[&_[data-year-item][data-selected]]:bg-primary",
14724
- "[&_[data-year-item][data-selected]]:text-on-primary",
14725
- // ── Scrim ─────────────────────────────────────────────────────────────────
14726
- "[&_[data-scrim]]:fixed",
14727
- "[&_[data-scrim]]:inset-0",
14728
- "[&_[data-scrim]]:z-40",
14729
- "[&_[data-scrim]]:bg-scrim",
14730
- "[&_[data-scrim]]:opacity-32",
14731
- "[&_[data-scrim]]:transition-opacity",
14732
- "[&_[data-scrim]]:duration-medium2",
14733
- "[&_[data-scrim]]:ease-standard",
14734
- // ── Action buttons ────────────────────────────────────────────────────────
14735
- "[&_[data-actions]]:flex",
14736
- "[&_[data-actions]]:items-center",
14737
- "[&_[data-actions]]:justify-end",
14738
- "[&_[data-actions]]:gap-2",
14739
- "[&_[data-actions]]:px-3",
14740
- "[&_[data-actions]]:py-2",
14741
- "[&_[data-action]]:text-primary",
14742
- "[&_[data-action]]:text-label-large",
14743
- "[&_[data-action]]:rounded-full",
14744
- "[&_[data-action]]:px-3",
14745
- "[&_[data-action]]:py-2",
14746
- "[&_[data-action]]:min-h-12",
14747
- "[&_[data-action]]:bg-transparent",
14748
- "[&_[data-action]]:border-none",
14749
- "[&_[data-action]]:transition-colors",
14750
- "[&_[data-action]]:duration-spring-standard-fast-effects",
14751
- "[&_[data-action]]:ease-spring-standard-fast-effects",
14752
- "[&_[data-action]:hover]:bg-primary/8",
14753
- "[&_[data-action]:focus-visible]:ring-2",
14754
- "[&_[data-action]:focus-visible]:ring-primary",
14755
- "[&_[data-action]:focus-visible]:bg-primary/10"
14756
- ].join(" ");
14757
- var MODAL_MOTION_STYLES = [
14758
- // ── Modal container enter ──────────────────────────────────────────────────
14759
- "[&_[data-modal-dialog]]:transition-[transform,opacity]",
14760
- "[&_[data-modal-dialog]]:duration-medium2",
14761
- "[&_[data-modal-dialog]]:ease-standard-decelerate",
14762
- // ── Modal container exit ───────────────────────────────────────────────────
14763
- "[&_[data-modal-dialog][data-exiting]]:duration-medium1",
14764
- "[&_[data-modal-dialog][data-exiting]]:ease-standard-accelerate",
14765
- // ── Calendar month slide ───────────────────────────────────────────────────
14766
- "[&_table]:transition-transform",
14767
- "[&_table]:duration-medium1",
14768
- "[&_table]:ease-emphasized-decelerate",
14769
- // ── Cell selection animation (scale + background) ──────────────────────────
14770
- "[&_td>div[data-selected]]:transition-[background-color,transform]",
14771
- "[&_td>div[data-selected]]:duration-short2",
14772
- "[&_td>div[data-selected]]:ease-standard",
14773
- // ── State layer opacity ────────────────────────────────────────────────────
14774
- "[&_td>div::after]:transition-opacity",
14775
- "[&_td>div::after]:duration-short1",
14776
- "[&_td>div::after]:ease-standard"
14777
- ].join(" ");
14778
14966
  var DatePickerModalStyled = React.forwardRef(
14779
14967
  (props, ref) => {
14780
14968
  const { className, ...rest } = props;
@@ -14785,11 +14973,20 @@ var DatePickerModalStyled = React.forwardRef(
14785
14973
  ref,
14786
14974
  ...rest,
14787
14975
  className: cn(
14788
- datePickerContainerVariants({ variant: "modal" }),
14789
- MODAL_STYLES,
14790
- !reducedMotion && MODAL_MOTION_STYLES,
14976
+ modalDialogVariants({ variant: "modal" }),
14977
+ MODAL_CONTENT_STRUCTURAL,
14978
+ !reducedMotion && MODAL_DIALOG_MOTION,
14791
14979
  className
14792
- )
14980
+ ),
14981
+ scrimClassName: cn(scrimVariants2()),
14982
+ slots: {
14983
+ CellComponent: StyledCalendarCell,
14984
+ NavButtonComponent: StyledNavButton,
14985
+ TitleComponent: StyledCalendarTitle,
14986
+ YearItemComponent: StyledYearItem,
14987
+ WeekdayComponent: StyledWeekday
14988
+ },
14989
+ ActionButtonComponent: StyledActionButton
14793
14990
  }
14794
14991
  );
14795
14992
  }
@@ -14936,7 +15133,9 @@ var DatePickerModalInput = React.forwardRef(
14936
15133
  onCancel,
14937
15134
  onConfirm,
14938
15135
  onModeToggle,
14939
- className
15136
+ className,
15137
+ scrimClassName,
15138
+ ActionButtonComponent
14940
15139
  } = props;
14941
15140
  const internalRef = React.useRef(null);
14942
15141
  const ref = forwardedRef ?? internalRef;
@@ -15095,6 +15294,7 @@ var DatePickerModalInput = React.forwardRef(
15095
15294
  headlineId,
15096
15295
  onClose: handleClose,
15097
15296
  ...className ? { className } : {},
15297
+ ...scrimClassName ? { scrimClassName } : {},
15098
15298
  isOpen: state.isOpen,
15099
15299
  children: [
15100
15300
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -15157,7 +15357,8 @@ var DatePickerModalInput = React.forwardRef(
15157
15357
  confirmLabel,
15158
15358
  onCancel: handleCancel,
15159
15359
  onConfirm: handleConfirm,
15160
- isConfirmDisabled: !isFormValid
15360
+ isConfirmDisabled: !isFormValid,
15361
+ ...ActionButtonComponent ? { ButtonComponent: ActionButtonComponent } : {}
15161
15362
  }
15162
15363
  )
15163
15364
  ]
@@ -15175,6 +15376,7 @@ function ModalInputOverlay({
15175
15376
  headlineId,
15176
15377
  onClose,
15177
15378
  className,
15379
+ scrimClassName,
15178
15380
  isOpen,
15179
15381
  children
15180
15382
  }) {
@@ -15195,7 +15397,7 @@ function ModalInputOverlay({
15195
15397
  dialogRef
15196
15398
  );
15197
15399
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15198
- /* @__PURE__ */ jsxRuntime.jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose }),
15400
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose, className: scrimClassName }),
15199
15401
  /* @__PURE__ */ jsxRuntime.jsx(
15200
15402
  "div",
15201
15403
  {
@@ -15213,98 +15415,6 @@ function ModalInputOverlay({
15213
15415
  ] });
15214
15416
  }
15215
15417
  ModalInputOverlay.displayName = "ModalInputOverlay";
15216
- var MODAL_INPUT_STYLES = [
15217
- // ── Container structure ───────────────────────────────────────────────────
15218
- "[&_[data-modal-dialog]]:bg-surface-container-high",
15219
- "[&_[data-modal-dialog]]:rounded-3xl",
15220
- "[&_[data-modal-dialog]]:overflow-hidden",
15221
- "[&_[data-modal-dialog]]:fixed",
15222
- "[&_[data-modal-dialog]]:top-1/2",
15223
- "[&_[data-modal-dialog]]:left-1/2",
15224
- "[&_[data-modal-dialog]]:-translate-x-1/2",
15225
- "[&_[data-modal-dialog]]:-translate-y-1/2",
15226
- "[&_[data-modal-dialog]]:z-50",
15227
- "[&_[data-modal-dialog]]:w-[328px]",
15228
- // ── Header ────────────────────────────────────────────────────────────────
15229
- "[&_[data-modal-header]]:px-6",
15230
- "[&_[data-modal-header]]:pt-4",
15231
- "[&_[data-modal-header]]:pb-3",
15232
- "[&_[data-modal-header]]:flex",
15233
- "[&_[data-modal-header]]:items-start",
15234
- "[&_[data-modal-header]]:justify-between",
15235
- "[&_[data-headline]]:text-label-large",
15236
- "[&_[data-headline]]:text-on-surface-variant",
15237
- "[&_[data-headline]]:m-0",
15238
- "[&_[data-supporting-text]]:text-headline-large",
15239
- "[&_[data-supporting-text]]:text-on-surface",
15240
- "[&_[data-supporting-text]]:mt-4",
15241
- "[&_[data-supporting-text]]:m-0",
15242
- "[&_[data-mode-toggle]]:w-12",
15243
- "[&_[data-mode-toggle]]:h-12",
15244
- "[&_[data-mode-toggle]]:rounded-full",
15245
- "[&_[data-mode-toggle]]:flex",
15246
- "[&_[data-mode-toggle]]:items-center",
15247
- "[&_[data-mode-toggle]]:justify-center",
15248
- "[&_[data-mode-toggle]]:text-on-surface-variant",
15249
- "[&_[data-mode-toggle]]:bg-transparent",
15250
- "[&_[data-mode-toggle]]:border-none",
15251
- "[&_[data-mode-toggle]]:self-end",
15252
- "[&_[data-mode-toggle]]:transition-colors",
15253
- "[&_[data-mode-toggle]]:duration-spring-standard-fast-effects",
15254
- "[&_[data-mode-toggle]]:ease-spring-standard-fast-effects",
15255
- "[&_[data-mode-toggle]:hover]:bg-on-surface-variant/8",
15256
- // ── Divider ───────────────────────────────────────────────────────────────
15257
- "[&_hr[data-divider]]:border-outline-variant",
15258
- // ── Date input fields ─────────────────────────────────────────────────────
15259
- "[&_[data-date-input-field]]:px-6",
15260
- "[&_[data-date-input-field]]:py-2",
15261
- "[&_[data-date-input-field]_[data-field]]:flex",
15262
- "[&_[data-date-input-field]_[data-field]]:items-center",
15263
- "[&_[data-date-input-field]_[data-field]]:border",
15264
- "[&_[data-date-input-field]_[data-field]]:border-outline",
15265
- "[&_[data-date-input-field]_[data-field]]:rounded-sm",
15266
- "[&_[data-date-input-field]_[data-field]]:px-4",
15267
- "[&_[data-date-input-field]_[data-field]]:py-3",
15268
- "[&_[data-date-input-field]_[data-field]]:text-body-large",
15269
- "[&_[data-date-input-field]_[data-field]]:text-on-surface",
15270
- "[&_[data-date-input-field]_[data-segment]]:outline-none",
15271
- "[&_[data-date-input-field]_[data-segment][data-placeholder]]:text-on-surface-variant",
15272
- "[&_[data-date-input-field][data-focused]_[data-field]]:border-primary",
15273
- "[&_[data-date-input-field][data-focused]_[data-field]]:border-2",
15274
- "[&_[data-date-input-field][data-invalid]_[data-field]]:border-error",
15275
- "[&_[data-date-input-field]_[data-label]]:text-body-small",
15276
- "[&_[data-date-input-field]_[data-label]]:text-on-surface-variant",
15277
- "[&_[data-date-input-field]_[data-error-message]]:text-body-small",
15278
- "[&_[data-date-input-field]_[data-error-message]]:text-error",
15279
- "[&_[data-date-input-field]_[data-error-message]]:mt-1",
15280
- // ── Scrim ─────────────────────────────────────────────────────────────────
15281
- "[&_[data-scrim]]:fixed",
15282
- "[&_[data-scrim]]:inset-0",
15283
- "[&_[data-scrim]]:z-40",
15284
- "[&_[data-scrim]]:bg-scrim",
15285
- "[&_[data-scrim]]:opacity-32",
15286
- "[&_[data-scrim]]:transition-opacity",
15287
- "[&_[data-scrim]]:duration-medium2",
15288
- "[&_[data-scrim]]:ease-standard",
15289
- // ── Action buttons ────────────────────────────────────────────────────────
15290
- "[&_[data-actions]]:flex",
15291
- "[&_[data-actions]]:items-center",
15292
- "[&_[data-actions]]:justify-end",
15293
- "[&_[data-actions]]:gap-2",
15294
- "[&_[data-actions]]:px-3",
15295
- "[&_[data-actions]]:py-2",
15296
- "[&_[data-action]]:text-primary",
15297
- "[&_[data-action]]:text-label-large",
15298
- "[&_[data-action]]:rounded-full",
15299
- "[&_[data-action]]:px-3",
15300
- "[&_[data-action]]:py-2",
15301
- "[&_[data-action]]:bg-transparent",
15302
- "[&_[data-action]]:border-none",
15303
- "[&_[data-action]]:transition-colors",
15304
- "[&_[data-action]]:duration-spring-standard-fast-effects",
15305
- "[&_[data-action]]:ease-spring-standard-fast-effects",
15306
- "[&_[data-action]:hover]:bg-primary/8"
15307
- ].join(" ");
15308
15418
  var DatePickerModalInputStyled = React.forwardRef(
15309
15419
  (props, ref) => {
15310
15420
  const { className, ...rest } = props;
@@ -15314,10 +15424,12 @@ var DatePickerModalInputStyled = React.forwardRef(
15314
15424
  ref,
15315
15425
  ...rest,
15316
15426
  className: cn(
15317
- datePickerContainerVariants({ variant: "modal-input" }),
15318
- MODAL_INPUT_STYLES,
15427
+ modalDialogVariants({ variant: "modal-input" }),
15428
+ MODAL_INPUT_CONTENT_STRUCTURAL,
15319
15429
  className
15320
- )
15430
+ ),
15431
+ scrimClassName: cn(scrimVariants2()),
15432
+ ActionButtonComponent: StyledActionButton
15321
15433
  }
15322
15434
  );
15323
15435
  }
@@ -15533,6 +15645,12 @@ exports.SnackbarHeadless = SnackbarHeadless;
15533
15645
  exports.SnackbarProvider = SnackbarProvider;
15534
15646
  exports.SplitButton = SplitButton;
15535
15647
  exports.SplitButtonHeadless = SplitButtonHeadless;
15648
+ exports.StyledActionButton = StyledActionButton;
15649
+ exports.StyledCalendarCell = StyledCalendarCell;
15650
+ exports.StyledCalendarTitle = StyledCalendarTitle;
15651
+ exports.StyledNavButton = StyledNavButton;
15652
+ exports.StyledWeekday = StyledWeekday;
15653
+ exports.StyledYearItem = StyledYearItem;
15536
15654
  exports.Switch = Switch;
15537
15655
  exports.TYPOGRAPHY_ELEMENT_MAP = TYPOGRAPHY_ELEMENT_MAP;
15538
15656
  exports.TYPOGRAPHY_USAGE = TYPOGRAPHY_USAGE;
@@ -15548,6 +15666,10 @@ exports.Tooltip = Tooltip;
15548
15666
  exports.TooltipOverlayHeadless = TooltipOverlayHeadless;
15549
15667
  exports.TooltipTrigger = TooltipTrigger;
15550
15668
  exports.TooltipTriggerHeadless = TooltipTriggerHeadless;
15669
+ exports.actionButtonFocusRingVariants = actionButtonFocusRingVariants;
15670
+ exports.actionButtonStateLayerVariants = actionButtonStateLayerVariants;
15671
+ exports.actionButtonVariants = actionButtonVariants;
15672
+ exports.actionRowVariants = actionRowVariants;
15551
15673
  exports.applyStateLayer = applyStateLayer;
15552
15674
  exports.badgeVariants = badgeVariants2;
15553
15675
  exports.bottomSheetAnimationVariants = bottomSheetAnimationVariants;
@@ -15558,7 +15680,15 @@ exports.bottomSheetVariants = bottomSheetVariants;
15558
15680
  exports.buttonGroupFocusRingVariants = buttonGroupFocusRingVariants;
15559
15681
  exports.buttonGroupRootVariants = buttonGroupRootVariants;
15560
15682
  exports.buttonGroupVariants = buttonGroupVariants;
15683
+ exports.calendarCellFocusRingVariants = calendarCellFocusRingVariants;
15684
+ exports.calendarCellStateLayerVariants = calendarCellStateLayerVariants;
15561
15685
  exports.calendarCellVariants = calendarCellVariants;
15686
+ exports.calendarDividerVariants = calendarDividerVariants;
15687
+ exports.calendarHeaderVariants = calendarHeaderVariants;
15688
+ exports.calendarTitleIconVariants = calendarTitleIconVariants;
15689
+ exports.calendarTitleStateLayerVariants = calendarTitleStateLayerVariants;
15690
+ exports.calendarTitleTextVariants = calendarTitleTextVariants;
15691
+ exports.calendarTitleVariants = calendarTitleVariants;
15562
15692
  exports.cardVariants = cardVariants;
15563
15693
  exports.chipVariants = chipVariants;
15564
15694
  exports.clockDialContainerVariants = clockDialContainerVariants;
@@ -15567,18 +15697,18 @@ exports.clockHandCenterVariants = clockHandCenterVariants;
15567
15697
  exports.clockHandHandleVariants = clockHandHandleVariants;
15568
15698
  exports.clockHandTrackVariants = clockHandTrackVariants;
15569
15699
  exports.cn = cn;
15570
- exports.datePickerActionButtonVariants = datePickerActionButtonVariants;
15571
- exports.datePickerActionVariants = datePickerActionVariants;
15700
+ exports.dateFieldVariants = dateFieldVariants;
15701
+ exports.dateInputErrorVariants = dateInputErrorVariants;
15702
+ exports.dateInputFieldGroupVariants = dateInputFieldGroupVariants;
15703
+ exports.dateInputFieldVariants = dateInputFieldVariants;
15704
+ exports.dateInputLabelVariants = dateInputLabelVariants;
15572
15705
  exports.datePickerContainerVariants = datePickerContainerVariants;
15573
- exports.datePickerDividerVariants = datePickerDividerVariants;
15574
- exports.datePickerHeaderVariants = datePickerHeaderVariants;
15575
- exports.datePickerHeadlineVariants = datePickerHeadlineVariants;
15576
- exports.datePickerNavVariants = datePickerNavVariants;
15577
- exports.datePickerRangeIndicatorVariants = datePickerRangeIndicatorVariants;
15578
- exports.datePickerScrimVariants = datePickerScrimVariants;
15579
- exports.datePickerSupportingTextVariants = datePickerSupportingTextVariants;
15580
- exports.datePickerWeekdayVariants = datePickerWeekdayVariants;
15706
+ exports.dateSegmentPlaceholderVariants = dateSegmentPlaceholderVariants;
15581
15707
  exports.dividerVariants = dividerVariants;
15708
+ exports.dockedFieldGroupVariants = dockedFieldGroupVariants;
15709
+ exports.dockedLabelVariants = dockedLabelVariants;
15710
+ exports.dockedTriggerStateLayerVariants = dockedTriggerStateLayerVariants;
15711
+ exports.dockedTriggerVariants = dockedTriggerVariants;
15582
15712
  exports.fabMenuItemFocusRingVariants = fabMenuItemFocusRingVariants;
15583
15713
  exports.fabMenuItemIconVariants = fabMenuItemIconVariants;
15584
15714
  exports.fabMenuItemLabelVariants = fabMenuItemLabelVariants;
@@ -15596,15 +15726,25 @@ exports.getTypographyClassName = getTypographyClassName;
15596
15726
  exports.getTypographyForElement = getTypographyForElement;
15597
15727
  exports.getTypographyStyle = getTypographyStyle;
15598
15728
  exports.getTypographyToken = getTypographyToken;
15729
+ exports.headlineVariants = headlineVariants;
15599
15730
  exports.hexToRgb = hexToRgb;
15600
15731
  exports.listItemVariants = listItemVariants;
15601
15732
  exports.listVariants = listVariants;
15733
+ exports.modalDialogVariants = modalDialogVariants;
15734
+ exports.modalHeaderVariants = modalHeaderVariants;
15735
+ exports.modeToggleStateLayerVariants = modeToggleStateLayerVariants;
15736
+ exports.modeToggleVariants = modeToggleVariants;
15737
+ exports.navButtonFocusRingVariants = navButtonFocusRingVariants;
15738
+ exports.navButtonStateLayerVariants = navButtonStateLayerVariants;
15739
+ exports.navButtonVariants = navButtonVariants;
15602
15740
  exports.periodSelectorContainerVariants = periodSelectorContainerVariants;
15603
15741
  exports.periodSelectorItemVariants = periodSelectorItemVariants;
15742
+ exports.popoverVariants = popoverVariants;
15604
15743
  exports.pxToRem = pxToRem;
15605
15744
  exports.remToPx = remToPx;
15606
15745
  exports.rgbToHex = rgbToHex;
15607
15746
  exports.richTooltipVariants = richTooltipVariants;
15747
+ exports.scrimVariants = scrimVariants2;
15608
15748
  exports.searchBarVariants = searchBarVariants;
15609
15749
  exports.searchViewHeaderVariants = searchViewHeaderVariants;
15610
15750
  exports.searchViewVariants = searchViewVariants;
@@ -15618,6 +15758,7 @@ exports.splitButtonContainerVariants = splitButtonContainerVariants;
15618
15758
  exports.splitButtonDropdownVariants = splitButtonDropdownVariants;
15619
15759
  exports.splitButtonPrimaryVariants = splitButtonPrimaryVariants;
15620
15760
  exports.splitButtonVariants = splitButtonVariants;
15761
+ exports.supportingTextVariants = supportingTextVariants;
15621
15762
  exports.timeInputFieldVariants = timeInputFieldVariants;
15622
15763
  exports.timePickerActionButtonVariants = timePickerActionButtonVariants;
15623
15764
  exports.timePickerActionRowVariants = timePickerActionRowVariants;
@@ -15636,7 +15777,11 @@ exports.useFABMenuContext = useFABMenuContext;
15636
15777
  exports.useMenuContext = useMenuContext;
15637
15778
  exports.useOptionalButtonGroup = useOptionalButtonGroup;
15638
15779
  exports.useSnackbar = useSnackbar;
15780
+ exports.weekdayVariants = weekdayVariants;
15639
15781
  exports.withOpacity = withOpacity;
15782
+ exports.yearGridVariants = yearGridVariants;
15783
+ exports.yearItemFocusRingVariants = yearItemFocusRingVariants;
15784
+ exports.yearItemStateLayerVariants = yearItemStateLayerVariants;
15640
15785
  exports.yearItemVariants = yearItemVariants;
15641
15786
  //# sourceMappingURL=index.cjs.map
15642
15787
  //# sourceMappingURL=index.cjs.map