@tinybigui/react 0.12.0 → 0.13.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/README.md +10 -10
- package/dist/index.cjs +950 -844
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +560 -73
- package/dist/index.d.ts +560 -73
- package/dist/index.js +909 -836
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { argbFromHex, hexFromArgb } from '@material/material-color-utilities';
|
|
|
5
5
|
import React, { forwardRef, useRef, createContext, useState, useCallback, useId, useMemo, useEffect, useContext, useLayoutEffect, Children, isValidElement, cloneElement } from 'react';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { useButton, useHover, useFocusRing, mergeProps as mergeProps$1, useTextField, useCheckbox, VisuallyHidden, useSwitch, useRadioGroup, useRadio, useTabList, useTab, useTabPanel, FocusScope, usePreventScroll, useDialog, useOverlay, useLink, useSeparator, useProgressBar, useToggleButton, useListBox, useOption, useSearchField, useSlider, useDatePicker, useLocale, useDateField, useSliderThumb, useRangeCalendar, useCalendar, usePopover, DismissButton, useDateSegment, useCalendarGrid, useCalendarCell, useTooltipTrigger, useTooltip, useOverlayPosition } from 'react-aria';
|
|
8
|
+
import { useButton, useHover, useFocusRing, mergeProps as mergeProps$1, useTextField, useCheckbox, VisuallyHidden, useSwitch, useRadioGroup, useRadio, useTabList, useTab, useTabPanel, FocusScope, usePreventScroll, useDialog, useOverlay, useLink, useSeparator, useProgressBar, useToggleButton, useListBox, useOption, useSearchField, useSlider, useDatePicker, useLocale, useDateField, useSliderThumb, useRangeCalendar, useCalendar, usePopover, DismissButton, usePress, useDateSegment, useCalendarGrid, useCalendarCell, useTooltipTrigger, useTooltip, useOverlayPosition } from 'react-aria';
|
|
9
9
|
import { mergeProps, filterDOMProps } from '@react-aria/utils';
|
|
10
10
|
import { useToggleState, useRadioGroupState, useTabListState, Item, useOverlayTriggerState, useListState, useSearchFieldState, useMenuTriggerState, useSliderState, useDatePickerState, useDateFieldState, useRangeCalendarState, useCalendarState, useTooltipTriggerState } from 'react-stately';
|
|
11
11
|
import { MenuItem as MenuItem$1, Menu as Menu$1, MenuTrigger as MenuTrigger$1, Popover, MenuSection as MenuSection$1, Separator, Header, useSlottedContext, ButtonContext } from 'react-aria-components';
|
|
@@ -13199,10 +13199,17 @@ function mapToInputProps(props) {
|
|
|
13199
13199
|
const { orientation: _orientation, minuteStep: _minuteStep, ...inputProps } = props;
|
|
13200
13200
|
return inputProps;
|
|
13201
13201
|
}
|
|
13202
|
-
function CalendarCell({
|
|
13202
|
+
function CalendarCell({
|
|
13203
|
+
date,
|
|
13204
|
+
state,
|
|
13205
|
+
className,
|
|
13206
|
+
children
|
|
13207
|
+
}) {
|
|
13203
13208
|
const ref = useRef(null);
|
|
13204
13209
|
const { cellProps, buttonProps, isSelected, isDisabled, isUnavailable, formattedDate } = useCalendarCell({ date }, state, ref);
|
|
13205
|
-
const { focusProps, isFocusVisible
|
|
13210
|
+
const { focusProps, isFocusVisible } = useFocusRing();
|
|
13211
|
+
const { hoverProps, isHovered } = useHover({ isDisabled: isDisabled || isUnavailable });
|
|
13212
|
+
const { pressProps, isPressed } = usePress({ isDisabled: isDisabled || isUnavailable });
|
|
13206
13213
|
const isCurrentDay = isSameDay(date, today(getLocalTimeZone()));
|
|
13207
13214
|
const isOutsideMonth = date.month !== state.visibleRange.start.month || date.year !== state.visibleRange.start.year;
|
|
13208
13215
|
let isRangeStart = false;
|
|
@@ -13214,28 +13221,38 @@ function CalendarCell({ date, state }) {
|
|
|
13214
13221
|
isRangeEnd = isSameDay(date, range.end);
|
|
13215
13222
|
isRangeMiddle = date.compare(range.start) > 0 && date.compare(range.end) < 0;
|
|
13216
13223
|
}
|
|
13217
|
-
return /* @__PURE__ */ jsx("td", { ...cellProps, children: /* @__PURE__ */
|
|
13224
|
+
return /* @__PURE__ */ jsx("td", { ...cellProps, children: /* @__PURE__ */ jsxs(
|
|
13218
13225
|
"div",
|
|
13219
13226
|
{
|
|
13220
|
-
...mergeProps$1(buttonProps, focusProps),
|
|
13227
|
+
...mergeProps$1(buttonProps, focusProps, hoverProps, pressProps),
|
|
13221
13228
|
ref,
|
|
13229
|
+
className,
|
|
13222
13230
|
"aria-current": isCurrentDay ? "date" : void 0,
|
|
13223
|
-
"data-selected": isSelected
|
|
13224
|
-
"data-today": isCurrentDay
|
|
13225
|
-
"data-outside-month": isOutsideMonth
|
|
13226
|
-
"data-range-start": isRangeStart
|
|
13227
|
-
"data-range-end": isRangeEnd
|
|
13228
|
-
"data-range-middle": isRangeMiddle
|
|
13229
|
-
"data-disabled": isDisabled
|
|
13230
|
-
"data-unavailable": isUnavailable
|
|
13231
|
-
"data-
|
|
13232
|
-
"data-
|
|
13233
|
-
|
|
13231
|
+
"data-selected": isSelected ? "" : void 0,
|
|
13232
|
+
"data-today": isCurrentDay ? "" : void 0,
|
|
13233
|
+
"data-outside-month": isOutsideMonth ? "" : void 0,
|
|
13234
|
+
"data-range-start": isRangeStart ? "" : void 0,
|
|
13235
|
+
"data-range-end": isRangeEnd ? "" : void 0,
|
|
13236
|
+
"data-range-middle": isRangeMiddle ? "" : void 0,
|
|
13237
|
+
"data-disabled": isDisabled ? "" : void 0,
|
|
13238
|
+
"data-unavailable": isUnavailable ? "" : void 0,
|
|
13239
|
+
"data-focus-visible": isFocusVisible ? "" : void 0,
|
|
13240
|
+
"data-hovered": isHovered ? "" : void 0,
|
|
13241
|
+
"data-pressed": isPressed ? "" : void 0,
|
|
13242
|
+
children: [
|
|
13243
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none relative z-10", children: formattedDate }),
|
|
13244
|
+
children
|
|
13245
|
+
]
|
|
13234
13246
|
}
|
|
13235
13247
|
) });
|
|
13236
13248
|
}
|
|
13237
13249
|
CalendarCell.displayName = "CalendarCell";
|
|
13238
|
-
function CalendarGrid({
|
|
13250
|
+
function CalendarGrid({
|
|
13251
|
+
state,
|
|
13252
|
+
firstDayOfWeek,
|
|
13253
|
+
CellComponent = CalendarCell,
|
|
13254
|
+
WeekdayComponent
|
|
13255
|
+
}) {
|
|
13239
13256
|
const { locale } = useLocale();
|
|
13240
13257
|
const gridOptions = firstDayOfWeek ? { firstDayOfWeek } : {};
|
|
13241
13258
|
const { gridProps, headerProps, weekDays } = useCalendarGrid(gridOptions, state);
|
|
@@ -13245,9 +13262,11 @@ function CalendarGrid({ state, firstDayOfWeek }) {
|
|
|
13245
13262
|
firstDayOfWeek ?? void 0
|
|
13246
13263
|
);
|
|
13247
13264
|
return /* @__PURE__ */ jsxs("table", { ...gridProps, children: [
|
|
13248
|
-
/* @__PURE__ */ jsx("thead", { ...headerProps, "aria-hidden": void 0, children: /* @__PURE__ */ jsx("tr", { children: weekDays.map(
|
|
13265
|
+
/* @__PURE__ */ jsx("thead", { ...headerProps, "aria-hidden": void 0, children: /* @__PURE__ */ jsx("tr", { children: weekDays.map(
|
|
13266
|
+
(day, index) => WeekdayComponent ? /* @__PURE__ */ jsx("th", { role: "columnheader", children: /* @__PURE__ */ jsx(WeekdayComponent, { label: day }) }, index) : /* @__PURE__ */ jsx("th", { role: "columnheader", children: day }, index)
|
|
13267
|
+
) }) }),
|
|
13249
13268
|
/* @__PURE__ */ jsx("tbody", { children: [...new Array(weeksInMonth).keys()].map((weekIndex) => /* @__PURE__ */ jsx("tr", { children: state.getDatesInWeek(weekIndex).map(
|
|
13250
|
-
(date, i) => date ? /* @__PURE__ */ jsx(
|
|
13269
|
+
(date, i) => date ? /* @__PURE__ */ jsx(CellComponent, { state, date }, i) : /* @__PURE__ */ jsx("td", {}, i)
|
|
13251
13270
|
) }, weekIndex)) })
|
|
13252
13271
|
] });
|
|
13253
13272
|
}
|
|
@@ -13278,12 +13297,32 @@ function ChevronRightIcon() {
|
|
|
13278
13297
|
function DropdownArrowIcon() {
|
|
13279
13298
|
return /* @__PURE__ */ jsx("svg", { width: "18", height: "18", viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx("path", { d: "M7 10l5 5 5-5z" }) });
|
|
13280
13299
|
}
|
|
13300
|
+
function DefaultTitle({ title, onClick, showDropdownIndicator }) {
|
|
13301
|
+
if (onClick) {
|
|
13302
|
+
return /* @__PURE__ */ jsxs(
|
|
13303
|
+
"button",
|
|
13304
|
+
{
|
|
13305
|
+
type: "button",
|
|
13306
|
+
onClick,
|
|
13307
|
+
"data-calendar-title": true,
|
|
13308
|
+
"aria-label": `${title}, click to select year`,
|
|
13309
|
+
children: [
|
|
13310
|
+
/* @__PURE__ */ jsx("h2", { "aria-live": "polite", children: title }),
|
|
13311
|
+
showDropdownIndicator && /* @__PURE__ */ jsx(DropdownArrowIcon, {})
|
|
13312
|
+
]
|
|
13313
|
+
}
|
|
13314
|
+
);
|
|
13315
|
+
}
|
|
13316
|
+
return /* @__PURE__ */ jsx("div", { "data-calendar-title": true, children: /* @__PURE__ */ jsx("h2", { "aria-live": "polite", children: title }) });
|
|
13317
|
+
}
|
|
13281
13318
|
function CalendarHeader({
|
|
13282
13319
|
title,
|
|
13283
13320
|
prevButtonProps,
|
|
13284
13321
|
nextButtonProps,
|
|
13285
13322
|
onTitleClick,
|
|
13286
|
-
showDropdownIndicator = false
|
|
13323
|
+
showDropdownIndicator = false,
|
|
13324
|
+
NavButtonComponent = NavigationButton,
|
|
13325
|
+
TitleComponent = DefaultTitle
|
|
13287
13326
|
}) {
|
|
13288
13327
|
const enhancedPrevProps = {
|
|
13289
13328
|
...prevButtonProps,
|
|
@@ -13294,22 +13333,17 @@ function CalendarHeader({
|
|
|
13294
13333
|
"aria-label": "Next month"
|
|
13295
13334
|
};
|
|
13296
13335
|
return /* @__PURE__ */ jsxs("div", { "data-calendar-header": true, children: [
|
|
13297
|
-
|
|
13298
|
-
|
|
13336
|
+
/* @__PURE__ */ jsx(
|
|
13337
|
+
TitleComponent,
|
|
13299
13338
|
{
|
|
13300
|
-
|
|
13339
|
+
title,
|
|
13301
13340
|
onClick: onTitleClick,
|
|
13302
|
-
|
|
13303
|
-
"aria-label": `${title}, click to select year`,
|
|
13304
|
-
children: [
|
|
13305
|
-
/* @__PURE__ */ jsx("h2", { "aria-live": "polite", children: title }),
|
|
13306
|
-
showDropdownIndicator && /* @__PURE__ */ jsx(DropdownArrowIcon, {})
|
|
13307
|
-
]
|
|
13341
|
+
showDropdownIndicator
|
|
13308
13342
|
}
|
|
13309
|
-
)
|
|
13343
|
+
),
|
|
13310
13344
|
/* @__PURE__ */ jsxs("div", { "data-calendar-nav": true, children: [
|
|
13311
|
-
/* @__PURE__ */ jsx(
|
|
13312
|
-
/* @__PURE__ */ jsx(
|
|
13345
|
+
/* @__PURE__ */ jsx(NavButtonComponent, { ...enhancedPrevProps, children: /* @__PURE__ */ jsx(ChevronLeftIcon, {}) }),
|
|
13346
|
+
/* @__PURE__ */ jsx(NavButtonComponent, { ...enhancedNextProps, children: /* @__PURE__ */ jsx(ChevronRightIcon, {}) })
|
|
13313
13347
|
] })
|
|
13314
13348
|
] });
|
|
13315
13349
|
}
|
|
@@ -13328,7 +13362,8 @@ function YearGrid({
|
|
|
13328
13362
|
selectedYear,
|
|
13329
13363
|
onYearSelect,
|
|
13330
13364
|
minYear,
|
|
13331
|
-
maxYear
|
|
13365
|
+
maxYear,
|
|
13366
|
+
YearItemComponent
|
|
13332
13367
|
}) {
|
|
13333
13368
|
const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
|
|
13334
13369
|
const startYear = minYear ?? currentYear - YEAR_RANGE_OFFSET;
|
|
@@ -13354,6 +13389,17 @@ function YearGrid({
|
|
|
13354
13389
|
},
|
|
13355
13390
|
children: years.map((year) => {
|
|
13356
13391
|
const isSelected = year === selectedYear;
|
|
13392
|
+
if (YearItemComponent) {
|
|
13393
|
+
return /* @__PURE__ */ jsx(
|
|
13394
|
+
YearItemComponent,
|
|
13395
|
+
{
|
|
13396
|
+
year,
|
|
13397
|
+
isSelected,
|
|
13398
|
+
onSelect: onYearSelect
|
|
13399
|
+
},
|
|
13400
|
+
year
|
|
13401
|
+
);
|
|
13402
|
+
}
|
|
13357
13403
|
return /* @__PURE__ */ jsx(
|
|
13358
13404
|
"button",
|
|
13359
13405
|
{
|
|
@@ -13361,7 +13407,7 @@ function YearGrid({
|
|
|
13361
13407
|
role: "gridcell",
|
|
13362
13408
|
"aria-selected": isSelected,
|
|
13363
13409
|
"data-year-item": true,
|
|
13364
|
-
"data-selected": isSelected
|
|
13410
|
+
"data-selected": isSelected ? "" : void 0,
|
|
13365
13411
|
ref: isSelected ? selectedRef : void 0,
|
|
13366
13412
|
onClick: () => onYearSelect(year),
|
|
13367
13413
|
children: year
|
|
@@ -13417,6 +13463,7 @@ function SingleCalendarInner({ calendarRef, ...props }) {
|
|
|
13417
13463
|
setCurrentView("day");
|
|
13418
13464
|
props.onViewChange?.("day");
|
|
13419
13465
|
};
|
|
13466
|
+
const slots = props.slots ?? {};
|
|
13420
13467
|
return /* @__PURE__ */ jsxs("div", { ...calendarProps, ref: calendarRef, className: props.className, "data-view": currentView, children: [
|
|
13421
13468
|
/* @__PURE__ */ jsx(
|
|
13422
13469
|
CalendarHeader,
|
|
@@ -13425,14 +13472,25 @@ function SingleCalendarInner({ calendarRef, ...props }) {
|
|
|
13425
13472
|
prevButtonProps: currentView === "day" ? prevButtonProps : { isDisabled: true },
|
|
13426
13473
|
nextButtonProps: currentView === "day" ? nextButtonProps : { isDisabled: true },
|
|
13427
13474
|
onTitleClick: handleTitleClick,
|
|
13428
|
-
showDropdownIndicator: true
|
|
13475
|
+
showDropdownIndicator: true,
|
|
13476
|
+
...slots.NavButtonComponent ? { NavButtonComponent: slots.NavButtonComponent } : {},
|
|
13477
|
+
...slots.TitleComponent ? { TitleComponent: slots.TitleComponent } : {}
|
|
13429
13478
|
}
|
|
13430
13479
|
),
|
|
13431
|
-
currentView === "day" ? /* @__PURE__ */ jsx(
|
|
13480
|
+
currentView === "day" ? /* @__PURE__ */ jsx(
|
|
13481
|
+
CalendarGrid,
|
|
13482
|
+
{
|
|
13483
|
+
state,
|
|
13484
|
+
firstDayOfWeek: firstDay,
|
|
13485
|
+
...slots.CellComponent ? { CellComponent: slots.CellComponent } : {},
|
|
13486
|
+
...slots.WeekdayComponent ? { WeekdayComponent: slots.WeekdayComponent } : {}
|
|
13487
|
+
}
|
|
13488
|
+
) : /* @__PURE__ */ jsx(
|
|
13432
13489
|
YearGrid,
|
|
13433
13490
|
{
|
|
13434
13491
|
selectedYear: state.focusedDate.year,
|
|
13435
13492
|
onYearSelect: handleYearSelect,
|
|
13493
|
+
...slots.YearItemComponent ? { YearItemComponent: slots.YearItemComponent } : {},
|
|
13436
13494
|
...props.minValue ? { minYear: props.minValue.year } : {},
|
|
13437
13495
|
...props.maxValue ? { maxYear: props.maxValue.year } : {}
|
|
13438
13496
|
}
|
|
@@ -13492,6 +13550,7 @@ function RangeCalendarInner({ calendarRef, ...props }) {
|
|
|
13492
13550
|
setCurrentView("day");
|
|
13493
13551
|
props.onViewChange?.("day");
|
|
13494
13552
|
};
|
|
13553
|
+
const slots = props.slots ?? {};
|
|
13495
13554
|
return /* @__PURE__ */ jsxs("div", { ...calendarProps, ref: calendarRef, className: props.className, "data-view": currentView, children: [
|
|
13496
13555
|
/* @__PURE__ */ jsx(
|
|
13497
13556
|
CalendarHeader,
|
|
@@ -13500,14 +13559,25 @@ function RangeCalendarInner({ calendarRef, ...props }) {
|
|
|
13500
13559
|
prevButtonProps: currentView === "day" ? prevButtonProps : { isDisabled: true },
|
|
13501
13560
|
nextButtonProps: currentView === "day" ? nextButtonProps : { isDisabled: true },
|
|
13502
13561
|
onTitleClick: handleTitleClick,
|
|
13503
|
-
showDropdownIndicator: true
|
|
13562
|
+
showDropdownIndicator: true,
|
|
13563
|
+
...slots.NavButtonComponent ? { NavButtonComponent: slots.NavButtonComponent } : {},
|
|
13564
|
+
...slots.TitleComponent ? { TitleComponent: slots.TitleComponent } : {}
|
|
13504
13565
|
}
|
|
13505
13566
|
),
|
|
13506
|
-
currentView === "day" ? /* @__PURE__ */ jsx(
|
|
13567
|
+
currentView === "day" ? /* @__PURE__ */ jsx(
|
|
13568
|
+
CalendarGrid,
|
|
13569
|
+
{
|
|
13570
|
+
state,
|
|
13571
|
+
firstDayOfWeek: firstDay,
|
|
13572
|
+
...slots.CellComponent ? { CellComponent: slots.CellComponent } : {},
|
|
13573
|
+
...slots.WeekdayComponent ? { WeekdayComponent: slots.WeekdayComponent } : {}
|
|
13574
|
+
}
|
|
13575
|
+
) : /* @__PURE__ */ jsx(
|
|
13507
13576
|
YearGrid,
|
|
13508
13577
|
{
|
|
13509
13578
|
selectedYear: state.focusedDate.year,
|
|
13510
13579
|
onYearSelect: handleYearSelect,
|
|
13580
|
+
...slots.YearItemComponent ? { YearItemComponent: slots.YearItemComponent } : {},
|
|
13511
13581
|
...props.minValue ? { minYear: props.minValue.year } : {},
|
|
13512
13582
|
...props.maxValue ? { maxYear: props.maxValue.year } : {}
|
|
13513
13583
|
}
|
|
@@ -13525,6 +13595,24 @@ var CalendarCore = forwardRef((props, forwardedRef) => {
|
|
|
13525
13595
|
return /* @__PURE__ */ jsx(SingleCalendarInner, { ...rest, calendarRef: ref }, "single");
|
|
13526
13596
|
});
|
|
13527
13597
|
CalendarCore.displayName = "CalendarCore";
|
|
13598
|
+
function HeadlessActionButton({
|
|
13599
|
+
label,
|
|
13600
|
+
"aria-label": ariaLabel,
|
|
13601
|
+
onPress,
|
|
13602
|
+
isDisabled,
|
|
13603
|
+
"data-action": dataAction
|
|
13604
|
+
}) {
|
|
13605
|
+
const ref = useRef(null);
|
|
13606
|
+
const { buttonProps } = useButton(
|
|
13607
|
+
{
|
|
13608
|
+
"aria-label": ariaLabel ?? label,
|
|
13609
|
+
isDisabled: isDisabled ?? false,
|
|
13610
|
+
...onPress ? { onPress } : {}
|
|
13611
|
+
},
|
|
13612
|
+
ref
|
|
13613
|
+
);
|
|
13614
|
+
return /* @__PURE__ */ jsx("button", { ...buttonProps, ref, type: "button", "data-action": dataAction, children: label });
|
|
13615
|
+
}
|
|
13528
13616
|
function DatePickerActions({
|
|
13529
13617
|
cancelLabel = "Cancel",
|
|
13530
13618
|
confirmLabel = "OK",
|
|
@@ -13534,37 +13622,38 @@ function DatePickerActions({
|
|
|
13534
13622
|
onCancel,
|
|
13535
13623
|
onConfirm,
|
|
13536
13624
|
onClear,
|
|
13537
|
-
className
|
|
13625
|
+
className,
|
|
13626
|
+
ButtonComponent = HeadlessActionButton
|
|
13538
13627
|
}) {
|
|
13539
|
-
const clearRef = useRef(null);
|
|
13540
|
-
const cancelRef = useRef(null);
|
|
13541
|
-
const confirmRef = useRef(null);
|
|
13542
|
-
const { buttonProps: clearButtonProps } = useButton(
|
|
13543
|
-
{
|
|
13544
|
-
"aria-label": clearLabel,
|
|
13545
|
-
...onClear ? { onPress: onClear } : {}
|
|
13546
|
-
},
|
|
13547
|
-
clearRef
|
|
13548
|
-
);
|
|
13549
|
-
const { buttonProps: cancelButtonProps } = useButton(
|
|
13550
|
-
{
|
|
13551
|
-
"aria-label": cancelLabel,
|
|
13552
|
-
...onCancel ? { onPress: onCancel } : {}
|
|
13553
|
-
},
|
|
13554
|
-
cancelRef
|
|
13555
|
-
);
|
|
13556
|
-
const { buttonProps: confirmButtonProps } = useButton(
|
|
13557
|
-
{
|
|
13558
|
-
"aria-label": confirmLabel,
|
|
13559
|
-
isDisabled: isConfirmDisabled,
|
|
13560
|
-
...onConfirm ? { onPress: onConfirm } : {}
|
|
13561
|
-
},
|
|
13562
|
-
confirmRef
|
|
13563
|
-
);
|
|
13564
13628
|
return /* @__PURE__ */ jsxs("div", { className, "data-actions": true, children: [
|
|
13565
|
-
showClear && /* @__PURE__ */ jsx(
|
|
13566
|
-
|
|
13567
|
-
|
|
13629
|
+
showClear && /* @__PURE__ */ jsx(
|
|
13630
|
+
ButtonComponent,
|
|
13631
|
+
{
|
|
13632
|
+
label: clearLabel,
|
|
13633
|
+
"aria-label": clearLabel,
|
|
13634
|
+
onPress: onClear,
|
|
13635
|
+
"data-action": "clear"
|
|
13636
|
+
}
|
|
13637
|
+
),
|
|
13638
|
+
/* @__PURE__ */ jsx(
|
|
13639
|
+
ButtonComponent,
|
|
13640
|
+
{
|
|
13641
|
+
label: cancelLabel,
|
|
13642
|
+
"aria-label": cancelLabel,
|
|
13643
|
+
onPress: onCancel,
|
|
13644
|
+
"data-action": "cancel"
|
|
13645
|
+
}
|
|
13646
|
+
),
|
|
13647
|
+
/* @__PURE__ */ jsx(
|
|
13648
|
+
ButtonComponent,
|
|
13649
|
+
{
|
|
13650
|
+
label: confirmLabel,
|
|
13651
|
+
"aria-label": confirmLabel,
|
|
13652
|
+
onPress: onConfirm,
|
|
13653
|
+
isDisabled: isConfirmDisabled,
|
|
13654
|
+
"data-action": "confirm"
|
|
13655
|
+
}
|
|
13656
|
+
)
|
|
13568
13657
|
] });
|
|
13569
13658
|
}
|
|
13570
13659
|
DatePickerActions.displayName = "DatePickerActions";
|
|
@@ -13603,21 +13692,26 @@ function CalendarTriggerIcon() {
|
|
|
13603
13692
|
}
|
|
13604
13693
|
function PopoverContent({
|
|
13605
13694
|
popoverRef,
|
|
13606
|
-
|
|
13695
|
+
anchorRef,
|
|
13607
13696
|
state,
|
|
13608
13697
|
dialogProps,
|
|
13609
13698
|
calendarProps,
|
|
13610
13699
|
cancelLabel,
|
|
13611
13700
|
confirmLabel,
|
|
13612
13701
|
onCancel,
|
|
13613
|
-
onConfirm
|
|
13702
|
+
onConfirm,
|
|
13703
|
+
slots,
|
|
13704
|
+
ActionButtonComponent,
|
|
13705
|
+
popoverClassName
|
|
13614
13706
|
}) {
|
|
13615
13707
|
const { popoverProps } = usePopover(
|
|
13616
13708
|
{
|
|
13617
13709
|
popoverRef,
|
|
13618
|
-
triggerRef,
|
|
13710
|
+
triggerRef: anchorRef,
|
|
13619
13711
|
placement: "bottom start",
|
|
13620
|
-
offset: 4
|
|
13712
|
+
offset: 4,
|
|
13713
|
+
shouldFlip: true,
|
|
13714
|
+
containerPadding: 12
|
|
13621
13715
|
},
|
|
13622
13716
|
state
|
|
13623
13717
|
);
|
|
@@ -13631,7 +13725,10 @@ function PopoverContent({
|
|
|
13631
13725
|
document.addEventListener("keydown", handleKeyDown);
|
|
13632
13726
|
return () => document.removeEventListener("keydown", handleKeyDown);
|
|
13633
13727
|
}, [state]);
|
|
13634
|
-
|
|
13728
|
+
if (typeof document === "undefined") {
|
|
13729
|
+
return null;
|
|
13730
|
+
}
|
|
13731
|
+
const content = /* @__PURE__ */ jsxs("div", { ...popoverProps, ref: popoverRef, "data-popover": true, className: cn(popoverClassName), children: [
|
|
13635
13732
|
/* @__PURE__ */ jsx(DismissButton, { onDismiss: () => state.close() }),
|
|
13636
13733
|
/* @__PURE__ */ jsxs("div", { ...dialogProps, role: "dialog", children: [
|
|
13637
13734
|
/* @__PURE__ */ jsx(
|
|
@@ -13646,7 +13743,8 @@ function PopoverContent({
|
|
|
13646
13743
|
...calendarProps.isReadOnly ? { isReadOnly: calendarProps.isReadOnly } : {},
|
|
13647
13744
|
...calendarProps.isDateUnavailable ? { isDateUnavailable: calendarProps.isDateUnavailable } : {}
|
|
13648
13745
|
},
|
|
13649
|
-
"aria-label": calendarProps["aria-label"] ?? "Calendar"
|
|
13746
|
+
"aria-label": calendarProps["aria-label"] ?? "Calendar",
|
|
13747
|
+
...slots ? { slots } : {}
|
|
13650
13748
|
}
|
|
13651
13749
|
),
|
|
13652
13750
|
/* @__PURE__ */ jsx(
|
|
@@ -13655,12 +13753,14 @@ function PopoverContent({
|
|
|
13655
13753
|
cancelLabel,
|
|
13656
13754
|
confirmLabel,
|
|
13657
13755
|
onCancel,
|
|
13658
|
-
onConfirm
|
|
13756
|
+
onConfirm,
|
|
13757
|
+
...ActionButtonComponent !== void 0 ? { ButtonComponent: ActionButtonComponent } : {}
|
|
13659
13758
|
}
|
|
13660
13759
|
)
|
|
13661
13760
|
] }),
|
|
13662
13761
|
/* @__PURE__ */ jsx(DismissButton, { onDismiss: () => state.close() })
|
|
13663
13762
|
] });
|
|
13763
|
+
return createPortal(content, document.body);
|
|
13664
13764
|
}
|
|
13665
13765
|
var DatePickerDocked = forwardRef(
|
|
13666
13766
|
(props, forwardedRef) => {
|
|
@@ -13670,11 +13770,15 @@ var DatePickerDocked = forwardRef(
|
|
|
13670
13770
|
onCancel,
|
|
13671
13771
|
onConfirm,
|
|
13672
13772
|
className,
|
|
13773
|
+
popoverClassName,
|
|
13774
|
+
slots,
|
|
13775
|
+
ActionButtonComponent,
|
|
13673
13776
|
...datePickerProps
|
|
13674
13777
|
} = props;
|
|
13675
13778
|
const internalRef = useRef(null);
|
|
13676
13779
|
const ref = forwardedRef ?? internalRef;
|
|
13677
13780
|
const triggerRef = useRef(null);
|
|
13781
|
+
const groupRef = useRef(null);
|
|
13678
13782
|
const popoverRef = useRef(null);
|
|
13679
13783
|
const stateProps = {
|
|
13680
13784
|
...datePickerProps.value !== void 0 ? { value: datePickerProps.value } : {},
|
|
@@ -13705,7 +13809,14 @@ var DatePickerDocked = forwardRef(
|
|
|
13705
13809
|
dialogProps,
|
|
13706
13810
|
calendarProps
|
|
13707
13811
|
} = useDatePicker(stateProps, state, ref);
|
|
13708
|
-
const { buttonProps: iconButtonProps } = useButton(
|
|
13812
|
+
const { buttonProps: iconButtonProps, isPressed: isTriggerPressed } = useButton(
|
|
13813
|
+
triggerButtonAriaProps,
|
|
13814
|
+
triggerRef
|
|
13815
|
+
);
|
|
13816
|
+
const { isFocusVisible: isTriggerFocusVisible, focusProps: triggerFocusProps } = useFocusRing();
|
|
13817
|
+
const { isHovered: isTriggerHovered, hoverProps: triggerHoverProps } = useHover({
|
|
13818
|
+
isDisabled: datePickerProps.isDisabled ?? false
|
|
13819
|
+
});
|
|
13709
13820
|
const valueBeforeOpenRef = useRef(null);
|
|
13710
13821
|
useEffect(() => {
|
|
13711
13822
|
if (state.isOpen) {
|
|
@@ -13734,26 +13845,44 @@ var DatePickerDocked = forwardRef(
|
|
|
13734
13845
|
ref,
|
|
13735
13846
|
className,
|
|
13736
13847
|
"data-variant": "docked",
|
|
13737
|
-
"data-open": state.isOpen
|
|
13738
|
-
"data-disabled": datePickerProps.isDisabled
|
|
13848
|
+
"data-open": state.isOpen ? "" : void 0,
|
|
13849
|
+
"data-disabled": datePickerProps.isDisabled ? "" : void 0,
|
|
13739
13850
|
children: [
|
|
13740
13851
|
datePickerProps.label && /* @__PURE__ */ jsx("label", { ...labelProps, "data-label": true, children: datePickerProps.label }),
|
|
13741
|
-
/* @__PURE__ */ jsxs("div", { ...groupProps, "data-field-group": true, children: [
|
|
13852
|
+
/* @__PURE__ */ jsxs("div", { ...groupProps, ref: groupRef, "data-field-group": true, children: [
|
|
13742
13853
|
/* @__PURE__ */ jsx(PickerDateField, { fieldProps }),
|
|
13743
|
-
/* @__PURE__ */ jsx(
|
|
13854
|
+
/* @__PURE__ */ jsx(
|
|
13855
|
+
"button",
|
|
13856
|
+
{
|
|
13857
|
+
...mergeProps$1(iconButtonProps, triggerFocusProps, triggerHoverProps),
|
|
13858
|
+
ref: triggerRef,
|
|
13859
|
+
type: "button",
|
|
13860
|
+
"data-trigger": true,
|
|
13861
|
+
...getInteractionDataAttributes({
|
|
13862
|
+
isHovered: isTriggerHovered,
|
|
13863
|
+
isFocusVisible: isTriggerFocusVisible,
|
|
13864
|
+
isPressed: isTriggerPressed,
|
|
13865
|
+
isDisabled: datePickerProps.isDisabled ?? false
|
|
13866
|
+
}),
|
|
13867
|
+
children: /* @__PURE__ */ jsx(CalendarTriggerIcon, {})
|
|
13868
|
+
}
|
|
13869
|
+
)
|
|
13744
13870
|
] }),
|
|
13745
13871
|
state.isOpen && /* @__PURE__ */ jsx(
|
|
13746
13872
|
PopoverContent,
|
|
13747
13873
|
{
|
|
13748
13874
|
popoverRef,
|
|
13749
|
-
|
|
13875
|
+
anchorRef: groupRef,
|
|
13750
13876
|
state,
|
|
13751
13877
|
dialogProps,
|
|
13752
13878
|
calendarProps,
|
|
13753
13879
|
cancelLabel,
|
|
13754
13880
|
confirmLabel,
|
|
13755
13881
|
onCancel: handleCancel,
|
|
13756
|
-
onConfirm: handleConfirm
|
|
13882
|
+
onConfirm: handleConfirm,
|
|
13883
|
+
...slots !== void 0 ? { slots } : {},
|
|
13884
|
+
...ActionButtonComponent !== void 0 ? { ActionButtonComponent } : {},
|
|
13885
|
+
...popoverClassName !== void 0 ? { popoverClassName } : {}
|
|
13757
13886
|
}
|
|
13758
13887
|
)
|
|
13759
13888
|
]
|
|
@@ -13762,298 +13891,570 @@ var DatePickerDocked = forwardRef(
|
|
|
13762
13891
|
}
|
|
13763
13892
|
);
|
|
13764
13893
|
DatePickerDocked.displayName = "DatePickerDocked";
|
|
13765
|
-
var datePickerContainerVariants = cva(
|
|
13894
|
+
var datePickerContainerVariants = cva("", {
|
|
13895
|
+
variants: {
|
|
13896
|
+
variant: {
|
|
13897
|
+
docked: "w-[360px]",
|
|
13898
|
+
// NOTE: measurement-derived (360dp fixed width); permitted exception
|
|
13899
|
+
modal: [
|
|
13900
|
+
"bg-surface-container-high",
|
|
13901
|
+
"rounded-3xl",
|
|
13902
|
+
"overflow-hidden",
|
|
13903
|
+
"w-[360px]"
|
|
13904
|
+
// NOTE: measurement-derived (360dp fixed width); permitted exception
|
|
13905
|
+
],
|
|
13906
|
+
"modal-input": [
|
|
13907
|
+
"bg-surface-container-high",
|
|
13908
|
+
"rounded-3xl",
|
|
13909
|
+
"overflow-hidden",
|
|
13910
|
+
"w-[328px]"
|
|
13911
|
+
// NOTE: measurement-derived (328dp); permitted exception
|
|
13912
|
+
]
|
|
13913
|
+
}
|
|
13914
|
+
},
|
|
13915
|
+
defaultVariants: {
|
|
13916
|
+
variant: "docked"
|
|
13917
|
+
}
|
|
13918
|
+
});
|
|
13919
|
+
var calendarCellVariants = cva([
|
|
13920
|
+
// Layout — 48dp circle touch target
|
|
13921
|
+
"relative flex items-center justify-center",
|
|
13922
|
+
"w-[48px] h-[48px]",
|
|
13923
|
+
// NOTE: measurement-derived (48dp touch target); permitted exception
|
|
13924
|
+
"rounded-full",
|
|
13925
|
+
"select-none cursor-pointer",
|
|
13926
|
+
"overflow-hidden",
|
|
13927
|
+
// clips state layer to circle
|
|
13928
|
+
// Typography
|
|
13929
|
+
"text-body-large",
|
|
13930
|
+
// Base text color
|
|
13931
|
+
"text-on-surface",
|
|
13932
|
+
// Effects transition for color changes (not spatial — no overshoot)
|
|
13933
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
13934
|
+
// Remove default focus outline — handled via calendarCellFocusRingVariants
|
|
13935
|
+
"focus-visible:outline-none",
|
|
13936
|
+
// Carries group scope for child slots
|
|
13937
|
+
"group/calendar-cell",
|
|
13938
|
+
// ── Today (unselected) ────────────────────────────────────────────────────
|
|
13939
|
+
"data-[today]:not([data-selected]):text-primary",
|
|
13940
|
+
"data-[today]:not([data-selected]):border data-[today]:not([data-selected]):border-primary",
|
|
13941
|
+
// ── Selected ──────────────────────────────────────────────────────────────
|
|
13942
|
+
"data-[selected]:bg-primary data-[selected]:text-on-primary",
|
|
13943
|
+
// ── Range start/end: half-pill shape (right-flat for start, left-flat for end) ──
|
|
13944
|
+
"data-[range-start]:rounded-r-none",
|
|
13945
|
+
"data-[range-end]:rounded-l-none",
|
|
13946
|
+
// ── Range middle ──────────────────────────────────────────────────────────
|
|
13947
|
+
"data-[range-middle]:bg-secondary-container",
|
|
13948
|
+
"data-[range-middle]:text-on-secondary-container",
|
|
13949
|
+
"data-[range-middle]:rounded-none",
|
|
13950
|
+
// ── Outside month ─────────────────────────────────────────────────────────
|
|
13951
|
+
"data-[outside-month]:not([data-selected]):text-on-surface-variant",
|
|
13952
|
+
// ── Disabled ──────────────────────────────────────────────────────────────
|
|
13953
|
+
"data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed",
|
|
13954
|
+
// ── Unavailable ───────────────────────────────────────────────────────────
|
|
13955
|
+
"data-[unavailable]:text-on-surface/38 data-[unavailable]:line-through"
|
|
13956
|
+
]);
|
|
13957
|
+
var calendarCellStateLayerVariants = cva([
|
|
13958
|
+
"pointer-events-none absolute inset-0 rounded-[inherit] opacity-0",
|
|
13959
|
+
// Base state-layer color (unselected)
|
|
13960
|
+
"bg-on-surface",
|
|
13961
|
+
// Effects transition — spring standard fast (no spatial overshoot)
|
|
13962
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
13963
|
+
// Selected → state layer color switches to on-primary
|
|
13964
|
+
"group-data-[selected]/calendar-cell:bg-on-primary",
|
|
13965
|
+
// Range middle → state layer color switches to on-secondary-container
|
|
13966
|
+
"group-data-[range-middle]/calendar-cell:bg-on-secondary-container",
|
|
13967
|
+
// Interaction opacities (MD3: hover 8%, focus/pressed 10%)
|
|
13968
|
+
"group-data-[hovered]/calendar-cell:opacity-8",
|
|
13969
|
+
"group-data-[focus-visible]/calendar-cell:opacity-10",
|
|
13970
|
+
"group-data-[pressed]/calendar-cell:opacity-10",
|
|
13971
|
+
// No state layer for disabled/unavailable
|
|
13972
|
+
"group-data-[disabled]/calendar-cell:hidden",
|
|
13973
|
+
"group-data-[unavailable]/calendar-cell:hidden"
|
|
13974
|
+
]);
|
|
13975
|
+
var calendarCellFocusRingVariants = cva([
|
|
13976
|
+
"pointer-events-none absolute inset-0 rounded-full",
|
|
13977
|
+
"outline outline-2 outline-offset-0 outline-secondary",
|
|
13978
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
13979
|
+
"opacity-0",
|
|
13980
|
+
"group-data-[focus-visible]/calendar-cell:opacity-100"
|
|
13981
|
+
]);
|
|
13982
|
+
var calendarHeaderVariants = cva([
|
|
13983
|
+
"flex items-center justify-between",
|
|
13984
|
+
"px-3 py-2"
|
|
13985
|
+
// NOTE: measurement-derived padding; permitted exception
|
|
13986
|
+
]);
|
|
13987
|
+
var navButtonVariants = cva([
|
|
13988
|
+
// Layout
|
|
13989
|
+
"relative flex items-center justify-center",
|
|
13990
|
+
"w-10 h-10 rounded-full",
|
|
13991
|
+
// NOTE: 40dp; permitted exception
|
|
13992
|
+
// Typography
|
|
13993
|
+
"text-on-surface-variant",
|
|
13994
|
+
// Reset
|
|
13995
|
+
"bg-transparent border-none cursor-pointer",
|
|
13996
|
+
"overflow-hidden",
|
|
13997
|
+
// Focus outline removed — ring handled by navButtonFocusRingVariants
|
|
13998
|
+
"focus-visible:outline-none",
|
|
13999
|
+
// Effects transition
|
|
14000
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14001
|
+
// Disabled — self-targeting
|
|
14002
|
+
"data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none",
|
|
14003
|
+
// Carries group scope
|
|
14004
|
+
"group/nav-button"
|
|
14005
|
+
]);
|
|
14006
|
+
var navButtonStateLayerVariants = cva([
|
|
14007
|
+
"pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
14008
|
+
"bg-on-surface-variant",
|
|
14009
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14010
|
+
"group-data-[hovered]/nav-button:opacity-8",
|
|
14011
|
+
"group-data-[focus-visible]/nav-button:opacity-10",
|
|
14012
|
+
"group-data-[pressed]/nav-button:opacity-10",
|
|
14013
|
+
"group-data-[disabled]/nav-button:hidden"
|
|
14014
|
+
]);
|
|
14015
|
+
var navButtonFocusRingVariants = cva([
|
|
14016
|
+
"pointer-events-none absolute inset-0 rounded-full",
|
|
14017
|
+
"outline outline-2 outline-offset-0 outline-secondary",
|
|
14018
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14019
|
+
"opacity-0",
|
|
14020
|
+
"group-data-[focus-visible]/nav-button:opacity-100"
|
|
14021
|
+
]);
|
|
14022
|
+
var calendarTitleVariants = cva([
|
|
14023
|
+
"relative flex items-center gap-0.5",
|
|
14024
|
+
"bg-transparent border-none cursor-pointer",
|
|
14025
|
+
"rounded-full px-2 py-1",
|
|
14026
|
+
"overflow-hidden",
|
|
14027
|
+
"focus-visible:outline-none",
|
|
14028
|
+
// Effects transition
|
|
14029
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14030
|
+
// Group scope
|
|
14031
|
+
"group/calendar-title"
|
|
14032
|
+
]);
|
|
14033
|
+
var calendarTitleTextVariants = cva([
|
|
14034
|
+
"text-label-large text-on-surface-variant m-0 pointer-events-none"
|
|
14035
|
+
]);
|
|
14036
|
+
var calendarTitleIconVariants = cva(["text-on-surface-variant pointer-events-none"]);
|
|
14037
|
+
var calendarTitleStateLayerVariants = cva([
|
|
14038
|
+
"pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
14039
|
+
"bg-on-surface-variant",
|
|
14040
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14041
|
+
"group-data-[hovered]/calendar-title:opacity-8",
|
|
14042
|
+
"group-data-[focus-visible]/calendar-title:opacity-10",
|
|
14043
|
+
"group-data-[pressed]/calendar-title:opacity-10"
|
|
14044
|
+
]);
|
|
14045
|
+
var yearGridVariants = cva([
|
|
14046
|
+
"grid grid-cols-3 gap-2",
|
|
14047
|
+
"px-3 py-2",
|
|
14048
|
+
"max-h-[280px] overflow-y-auto",
|
|
14049
|
+
// NOTE: measurement-derived max height; permitted exception
|
|
14050
|
+
"place-items-center"
|
|
14051
|
+
]);
|
|
14052
|
+
var yearItemVariants = cva([
|
|
14053
|
+
// Layout
|
|
14054
|
+
"relative flex items-center justify-center",
|
|
14055
|
+
"w-[88px] h-[52px]",
|
|
14056
|
+
// NOTE: measurement-derived (88dp×52dp); permitted exception
|
|
14057
|
+
"rounded-full",
|
|
14058
|
+
"cursor-pointer select-none",
|
|
14059
|
+
"overflow-hidden",
|
|
14060
|
+
// Typography
|
|
14061
|
+
"text-body-large",
|
|
14062
|
+
// Reset
|
|
14063
|
+
"bg-transparent border-none",
|
|
14064
|
+
// Focus outline removed — ring handled by yearItemFocusRingVariants
|
|
14065
|
+
"focus-visible:outline-none",
|
|
14066
|
+
// Effects transition
|
|
14067
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14068
|
+
// Group scope
|
|
14069
|
+
"group/year-item",
|
|
14070
|
+
// ── Unselected (base) ─────────────────────────────────────────────────────
|
|
14071
|
+
"text-on-surface-variant",
|
|
14072
|
+
// ── Selected ──────────────────────────────────────────────────────────────
|
|
14073
|
+
"data-[selected]:bg-primary data-[selected]:text-on-primary",
|
|
14074
|
+
// ── Disabled ──────────────────────────────────────────────────────────────
|
|
14075
|
+
"data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none"
|
|
14076
|
+
]);
|
|
14077
|
+
var yearItemStateLayerVariants = cva([
|
|
14078
|
+
"pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
14079
|
+
"bg-on-surface-variant",
|
|
14080
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14081
|
+
// Selected → state layer switches color
|
|
14082
|
+
"group-data-[selected]/year-item:bg-on-primary",
|
|
14083
|
+
// Interaction opacities
|
|
14084
|
+
"group-data-[hovered]/year-item:opacity-8",
|
|
14085
|
+
"group-data-[focus-visible]/year-item:opacity-10",
|
|
14086
|
+
"group-data-[pressed]/year-item:opacity-10",
|
|
14087
|
+
"group-data-[disabled]/year-item:hidden"
|
|
14088
|
+
]);
|
|
14089
|
+
var yearItemFocusRingVariants = cva([
|
|
14090
|
+
"pointer-events-none absolute inset-0 rounded-full",
|
|
14091
|
+
"outline outline-2 outline-offset-0 outline-secondary",
|
|
14092
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14093
|
+
"opacity-0",
|
|
14094
|
+
"group-data-[focus-visible]/year-item:opacity-100"
|
|
14095
|
+
]);
|
|
14096
|
+
var weekdayVariants = cva([
|
|
14097
|
+
"text-body-small text-on-surface-variant font-normal",
|
|
14098
|
+
"w-[48px] h-[48px]",
|
|
14099
|
+
// NOTE: measurement-derived; permitted exception
|
|
14100
|
+
"flex items-center justify-center",
|
|
14101
|
+
"select-none"
|
|
14102
|
+
]);
|
|
14103
|
+
var calendarDividerVariants = cva(["border-t border-outline-variant w-full"]);
|
|
14104
|
+
var actionRowVariants = cva([
|
|
14105
|
+
"flex items-center justify-end gap-2",
|
|
14106
|
+
"px-3 py-2",
|
|
14107
|
+
"h-12"
|
|
14108
|
+
// NOTE: measurement-derived (48dp action row height); permitted exception
|
|
14109
|
+
]);
|
|
14110
|
+
var actionButtonVariants = cva([
|
|
14111
|
+
// Layout
|
|
14112
|
+
"relative flex items-center justify-center",
|
|
14113
|
+
"rounded-full px-3 py-2 min-h-[48px]",
|
|
14114
|
+
// NOTE: 48dp min touch; permitted exception
|
|
14115
|
+
// Typography + color
|
|
14116
|
+
"text-label-large text-primary",
|
|
14117
|
+
// Reset
|
|
14118
|
+
"bg-transparent border-none cursor-pointer",
|
|
14119
|
+
"overflow-hidden",
|
|
14120
|
+
"focus-visible:outline-none",
|
|
14121
|
+
// Effects transition
|
|
14122
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14123
|
+
// Group scope
|
|
14124
|
+
"group/action-button",
|
|
14125
|
+
// Disabled
|
|
14126
|
+
"data-[disabled]:text-on-surface/38 data-[disabled]:cursor-not-allowed data-[disabled]:pointer-events-none"
|
|
14127
|
+
]);
|
|
14128
|
+
var actionButtonStateLayerVariants = cva([
|
|
14129
|
+
"pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
14130
|
+
"bg-primary",
|
|
14131
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14132
|
+
"group-data-[hovered]/action-button:opacity-8",
|
|
14133
|
+
"group-data-[focus-visible]/action-button:opacity-10",
|
|
14134
|
+
"group-data-[pressed]/action-button:opacity-10",
|
|
14135
|
+
"group-data-[disabled]/action-button:hidden"
|
|
14136
|
+
]);
|
|
14137
|
+
var actionButtonFocusRingVariants = cva([
|
|
14138
|
+
"pointer-events-none absolute inset-0 rounded-full",
|
|
14139
|
+
"outline outline-2 outline-offset-0 outline-primary",
|
|
14140
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14141
|
+
"opacity-0",
|
|
14142
|
+
"group-data-[focus-visible]/action-button:opacity-100"
|
|
14143
|
+
]);
|
|
14144
|
+
var modalDialogVariants = cva(
|
|
13766
14145
|
[
|
|
13767
|
-
"bg-surface-container-high",
|
|
13768
|
-
"
|
|
13769
|
-
|
|
13770
|
-
"overflow-
|
|
14146
|
+
"bg-surface-container-high rounded-3xl overflow-hidden",
|
|
14147
|
+
"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
14148
|
+
"z-50",
|
|
14149
|
+
"max-h-[90vh] overflow-y-auto"
|
|
13771
14150
|
],
|
|
13772
14151
|
{
|
|
13773
14152
|
variants: {
|
|
13774
14153
|
variant: {
|
|
13775
|
-
docked: "w-[360px]",
|
|
13776
|
-
// NOTE: measurement-derived value from MD3 spec (360dp fixed width); permitted exception
|
|
13777
14154
|
modal: "w-[360px]",
|
|
13778
|
-
// NOTE: measurement-derived
|
|
14155
|
+
// NOTE: measurement-derived; permitted exception
|
|
13779
14156
|
"modal-input": "w-[328px]"
|
|
13780
|
-
// NOTE: measurement-derived
|
|
13781
|
-
}
|
|
13782
|
-
},
|
|
13783
|
-
defaultVariants: {
|
|
13784
|
-
variant: "docked"
|
|
13785
|
-
}
|
|
13786
|
-
}
|
|
13787
|
-
);
|
|
13788
|
-
var calendarCellVariants = cva(
|
|
13789
|
-
[
|
|
13790
|
-
"w-[48px]",
|
|
13791
|
-
// NOTE: measurement-derived (48dp touch target); permitted exception
|
|
13792
|
-
"h-[48px]",
|
|
13793
|
-
// NOTE: measurement-derived (48dp); permitted exception
|
|
13794
|
-
"rounded-full",
|
|
13795
|
-
// shape.full = circle
|
|
13796
|
-
"flex",
|
|
13797
|
-
"items-center",
|
|
13798
|
-
"justify-center",
|
|
13799
|
-
"text-body-large",
|
|
13800
|
-
"relative",
|
|
13801
|
-
"cursor-pointer",
|
|
13802
|
-
"select-none",
|
|
13803
|
-
"transition-colors",
|
|
13804
|
-
"duration-spring-standard-fast-effects",
|
|
13805
|
-
"ease-spring-standard-fast-effects"
|
|
13806
|
-
],
|
|
13807
|
-
{
|
|
13808
|
-
variants: {
|
|
13809
|
-
cellType: {
|
|
13810
|
-
default: "text-on-surface",
|
|
13811
|
-
today: "text-primary border border-primary",
|
|
13812
|
-
selected: "bg-primary text-on-primary",
|
|
13813
|
-
"selected-range-middle": "bg-secondary-container text-on-secondary-container rounded-none",
|
|
13814
|
-
"outside-month": "text-on-surface-variant",
|
|
13815
|
-
disabled: "text-on-surface/38 cursor-not-allowed"
|
|
13816
|
-
},
|
|
13817
|
-
state: {
|
|
13818
|
-
enabled: "",
|
|
13819
|
-
hovered: "",
|
|
13820
|
-
focused: "",
|
|
13821
|
-
pressed: ""
|
|
14157
|
+
// NOTE: measurement-derived; permitted exception
|
|
13822
14158
|
}
|
|
13823
14159
|
},
|
|
13824
|
-
compoundVariants: [
|
|
13825
|
-
// Default cell states
|
|
13826
|
-
{
|
|
13827
|
-
cellType: "default",
|
|
13828
|
-
state: "hovered",
|
|
13829
|
-
className: "bg-on-surface/8"
|
|
13830
|
-
},
|
|
13831
|
-
{
|
|
13832
|
-
cellType: "default",
|
|
13833
|
-
state: "focused",
|
|
13834
|
-
className: "bg-on-surface/10 ring-2 ring-on-surface"
|
|
13835
|
-
},
|
|
13836
|
-
{
|
|
13837
|
-
cellType: "default",
|
|
13838
|
-
state: "pressed",
|
|
13839
|
-
className: "bg-on-surface/10"
|
|
13840
|
-
},
|
|
13841
|
-
// Today cell states
|
|
13842
|
-
{
|
|
13843
|
-
cellType: "today",
|
|
13844
|
-
state: "hovered",
|
|
13845
|
-
className: "bg-primary/8"
|
|
13846
|
-
},
|
|
13847
|
-
{
|
|
13848
|
-
cellType: "today",
|
|
13849
|
-
state: "focused",
|
|
13850
|
-
className: "bg-primary/10"
|
|
13851
|
-
},
|
|
13852
|
-
{
|
|
13853
|
-
cellType: "today",
|
|
13854
|
-
state: "pressed",
|
|
13855
|
-
className: "bg-primary/10"
|
|
13856
|
-
},
|
|
13857
|
-
// Selected cell states
|
|
13858
|
-
{
|
|
13859
|
-
cellType: "selected",
|
|
13860
|
-
state: "hovered",
|
|
13861
|
-
className: "bg-primary shadow-sm"
|
|
13862
|
-
},
|
|
13863
|
-
{
|
|
13864
|
-
cellType: "selected",
|
|
13865
|
-
state: "focused",
|
|
13866
|
-
className: "bg-primary shadow-sm"
|
|
13867
|
-
},
|
|
13868
|
-
{
|
|
13869
|
-
cellType: "selected",
|
|
13870
|
-
state: "pressed",
|
|
13871
|
-
className: "bg-primary shadow-sm"
|
|
13872
|
-
},
|
|
13873
|
-
// Range middle states
|
|
13874
|
-
{
|
|
13875
|
-
cellType: "selected-range-middle",
|
|
13876
|
-
state: "hovered",
|
|
13877
|
-
className: "bg-secondary-container/80"
|
|
13878
|
-
},
|
|
13879
|
-
{
|
|
13880
|
-
cellType: "selected-range-middle",
|
|
13881
|
-
state: "focused",
|
|
13882
|
-
className: "bg-secondary-container/80"
|
|
13883
|
-
}
|
|
13884
|
-
],
|
|
13885
14160
|
defaultVariants: {
|
|
13886
|
-
|
|
13887
|
-
state: "enabled"
|
|
14161
|
+
variant: "modal"
|
|
13888
14162
|
}
|
|
13889
14163
|
}
|
|
13890
14164
|
);
|
|
13891
|
-
var
|
|
13892
|
-
|
|
14165
|
+
var modalHeaderVariants = cva([
|
|
14166
|
+
"flex items-start justify-between",
|
|
14167
|
+
"px-6 pt-4 pb-3"
|
|
13893
14168
|
// NOTE: measurement-derived padding; permitted exception
|
|
13894
|
-
|
|
13895
|
-
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
13907
|
-
|
|
13908
|
-
|
|
13909
|
-
|
|
13910
|
-
|
|
13911
|
-
|
|
13912
|
-
|
|
13913
|
-
|
|
13914
|
-
|
|
13915
|
-
|
|
13916
|
-
|
|
13917
|
-
|
|
13918
|
-
|
|
14169
|
+
]);
|
|
14170
|
+
var headlineVariants = cva(["text-label-large text-on-surface-variant m-0"]);
|
|
14171
|
+
var supportingTextVariants = cva([
|
|
14172
|
+
"text-headline-large text-on-surface mt-9 m-0"
|
|
14173
|
+
// NOTE: measurement-derived mt; permitted exception
|
|
14174
|
+
]);
|
|
14175
|
+
var modeToggleVariants = cva([
|
|
14176
|
+
"relative flex items-center justify-center",
|
|
14177
|
+
"w-12 h-12 rounded-full",
|
|
14178
|
+
// NOTE: 48dp; permitted exception
|
|
14179
|
+
"text-on-surface-variant",
|
|
14180
|
+
"bg-transparent border-none cursor-pointer self-end",
|
|
14181
|
+
"overflow-hidden",
|
|
14182
|
+
"focus-visible:outline-none",
|
|
14183
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14184
|
+
"group/mode-toggle"
|
|
14185
|
+
]);
|
|
14186
|
+
var modeToggleStateLayerVariants = cva([
|
|
14187
|
+
"pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
14188
|
+
"bg-on-surface-variant",
|
|
14189
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14190
|
+
"group-data-[hovered]/mode-toggle:opacity-8",
|
|
14191
|
+
"group-data-[focus-visible]/mode-toggle:opacity-10",
|
|
14192
|
+
"group-data-[pressed]/mode-toggle:opacity-10"
|
|
14193
|
+
]);
|
|
14194
|
+
var scrimVariants2 = cva([
|
|
14195
|
+
"fixed inset-0 z-40",
|
|
14196
|
+
"bg-scrim opacity-32",
|
|
14197
|
+
"transition-opacity duration-medium2 ease-standard"
|
|
14198
|
+
]);
|
|
14199
|
+
var dateInputFieldVariants = cva(["px-6 py-2"]);
|
|
14200
|
+
var dateInputFieldGroupVariants = cva([
|
|
14201
|
+
"flex items-center",
|
|
14202
|
+
"border border-outline rounded-sm",
|
|
14203
|
+
"px-4 py-3",
|
|
14204
|
+
// NOTE: measurement-derived; permitted exception
|
|
14205
|
+
"text-body-large text-on-surface",
|
|
14206
|
+
// Focus state (data-focused on parent wrapper)
|
|
14207
|
+
"peer-data-[focused]:border-2 peer-data-[focused]:border-primary",
|
|
14208
|
+
// Invalid state
|
|
14209
|
+
"peer-data-[invalid]:border-error peer-data-[invalid]:border-2"
|
|
14210
|
+
]);
|
|
14211
|
+
var dateInputLabelVariants = cva(["text-body-small text-on-surface-variant block mb-1"]);
|
|
14212
|
+
var dateInputErrorVariants = cva(["text-body-small text-error mt-1"]);
|
|
14213
|
+
var dockedFieldGroupVariants = cva([
|
|
14214
|
+
"flex items-center",
|
|
14215
|
+
"border border-outline rounded",
|
|
14216
|
+
"h-14",
|
|
14217
|
+
// NOTE: measurement-derived (56dp); permitted exception
|
|
14218
|
+
"px-3 gap-2",
|
|
14219
|
+
"bg-transparent",
|
|
14220
|
+
// Focus-within: promote to primary 2dp border
|
|
14221
|
+
"focus-within:border-primary focus-within:border-2"
|
|
14222
|
+
]);
|
|
14223
|
+
var dockedTriggerVariants = cva([
|
|
14224
|
+
"relative flex items-center justify-center",
|
|
14225
|
+
"w-10 h-10 rounded-full",
|
|
14226
|
+
// NOTE: 40dp; permitted exception
|
|
14227
|
+
"text-on-surface-variant",
|
|
14228
|
+
"bg-transparent border-none cursor-pointer",
|
|
14229
|
+
"overflow-hidden",
|
|
14230
|
+
"focus-visible:outline-none",
|
|
14231
|
+
"transition-colors duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14232
|
+
"group/docked-trigger"
|
|
14233
|
+
]);
|
|
14234
|
+
var dockedTriggerStateLayerVariants = cva([
|
|
14235
|
+
"pointer-events-none absolute inset-0 rounded-full opacity-0",
|
|
14236
|
+
"bg-on-surface-variant",
|
|
14237
|
+
"transition-opacity duration-spring-standard-fast-effects ease-spring-standard-fast-effects",
|
|
14238
|
+
"group-data-[hovered]/docked-trigger:opacity-8",
|
|
14239
|
+
"group-data-[focus-visible]/docked-trigger:opacity-10",
|
|
14240
|
+
"group-data-[pressed]/docked-trigger:opacity-10"
|
|
14241
|
+
]);
|
|
14242
|
+
var popoverVariants = cva([
|
|
14243
|
+
"bg-surface-container-high rounded-3xl",
|
|
14244
|
+
"shadow-elevation-2 overflow-hidden",
|
|
14245
|
+
"z-50 w-[360px]"
|
|
14246
|
+
]);
|
|
14247
|
+
var dockedLabelVariants = cva(["text-body-small text-on-surface-variant block mb-1"]);
|
|
14248
|
+
var dateFieldVariants = cva([
|
|
14249
|
+
"flex items-center flex-1",
|
|
14250
|
+
"text-body-large text-on-surface"
|
|
14251
|
+
]);
|
|
14252
|
+
var dateSegmentPlaceholderVariants = cva(["text-on-surface-variant"]);
|
|
14253
|
+
function StyledCalendarCell({ date, state }) {
|
|
14254
|
+
return /* @__PURE__ */ jsxs(CalendarCell, { date, state, className: cn(calendarCellVariants()), children: [
|
|
14255
|
+
/* @__PURE__ */ jsx("span", { className: cn(calendarCellStateLayerVariants()), "aria-hidden": "true" }),
|
|
14256
|
+
/* @__PURE__ */ jsx("span", { className: cn(calendarCellFocusRingVariants()), "aria-hidden": "true" })
|
|
14257
|
+
] });
|
|
14258
|
+
}
|
|
14259
|
+
StyledCalendarCell.displayName = "StyledCalendarCell";
|
|
14260
|
+
function StyledNavButton({
|
|
14261
|
+
children,
|
|
14262
|
+
isDisabled,
|
|
14263
|
+
onPress,
|
|
14264
|
+
"aria-label": ariaLabel
|
|
14265
|
+
}) {
|
|
14266
|
+
const ref = useRef(null);
|
|
14267
|
+
const { buttonProps, isPressed } = useButton(
|
|
14268
|
+
{
|
|
14269
|
+
isDisabled: isDisabled ?? false,
|
|
14270
|
+
...onPress ? { onPress } : {},
|
|
14271
|
+
...ariaLabel ? { "aria-label": ariaLabel } : {}
|
|
13919
14272
|
},
|
|
13920
|
-
|
|
13921
|
-
|
|
14273
|
+
ref
|
|
14274
|
+
);
|
|
14275
|
+
const { isFocusVisible, focusProps } = useFocusRing();
|
|
14276
|
+
const { isHovered, hoverProps } = useHover({ isDisabled: isDisabled ?? false });
|
|
14277
|
+
return /* @__PURE__ */ jsxs(
|
|
14278
|
+
"button",
|
|
14279
|
+
{
|
|
14280
|
+
...mergeProps$1(buttonProps, focusProps, hoverProps),
|
|
14281
|
+
ref,
|
|
14282
|
+
type: "button",
|
|
14283
|
+
className: cn(navButtonVariants()),
|
|
14284
|
+
...getInteractionDataAttributes({
|
|
14285
|
+
isHovered,
|
|
14286
|
+
isFocusVisible,
|
|
14287
|
+
isPressed,
|
|
14288
|
+
isDisabled: isDisabled ?? false
|
|
14289
|
+
}),
|
|
14290
|
+
children: [
|
|
14291
|
+
/* @__PURE__ */ jsx("span", { className: cn(navButtonStateLayerVariants()), "aria-hidden": "true" }),
|
|
14292
|
+
/* @__PURE__ */ jsx("span", { className: cn(navButtonFocusRingVariants()), "aria-hidden": "true" }),
|
|
14293
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none relative z-10 flex items-center justify-center", children })
|
|
14294
|
+
]
|
|
13922
14295
|
}
|
|
13923
|
-
|
|
13924
|
-
|
|
13925
|
-
|
|
13926
|
-
|
|
13927
|
-
|
|
13928
|
-
|
|
13929
|
-
|
|
13930
|
-
|
|
13931
|
-
|
|
13932
|
-
|
|
13933
|
-
|
|
13934
|
-
|
|
13935
|
-
|
|
13936
|
-
|
|
13937
|
-
|
|
13938
|
-
"transition-colors",
|
|
13939
|
-
"duration-spring-standard-fast-effects",
|
|
13940
|
-
"ease-spring-standard-fast-effects"
|
|
13941
|
-
],
|
|
13942
|
-
{
|
|
13943
|
-
variants: {
|
|
13944
|
-
selected: {
|
|
13945
|
-
true: "bg-primary text-on-primary",
|
|
13946
|
-
false: "text-on-surface-variant"
|
|
13947
|
-
},
|
|
13948
|
-
state: {
|
|
13949
|
-
enabled: "",
|
|
13950
|
-
hovered: "",
|
|
13951
|
-
focused: "",
|
|
13952
|
-
pressed: "",
|
|
13953
|
-
disabled: "text-on-surface/38 cursor-not-allowed"
|
|
13954
|
-
}
|
|
13955
|
-
},
|
|
13956
|
-
compoundVariants: [
|
|
13957
|
-
{
|
|
13958
|
-
selected: false,
|
|
13959
|
-
state: "hovered",
|
|
13960
|
-
className: "bg-on-surface-variant/8"
|
|
13961
|
-
},
|
|
13962
|
-
{
|
|
13963
|
-
selected: false,
|
|
13964
|
-
state: "focused",
|
|
13965
|
-
className: "bg-on-surface-variant/10"
|
|
13966
|
-
},
|
|
13967
|
-
{
|
|
13968
|
-
selected: true,
|
|
13969
|
-
state: "hovered",
|
|
13970
|
-
className: "bg-primary/90"
|
|
13971
|
-
},
|
|
14296
|
+
);
|
|
14297
|
+
}
|
|
14298
|
+
StyledNavButton.displayName = "StyledNavButton";
|
|
14299
|
+
function StyledCalendarTitle({
|
|
14300
|
+
title,
|
|
14301
|
+
onClick,
|
|
14302
|
+
showDropdownIndicator
|
|
14303
|
+
}) {
|
|
14304
|
+
const ref = useRef(null);
|
|
14305
|
+
const { isFocusVisible, focusProps } = useFocusRing();
|
|
14306
|
+
const { isHovered, hoverProps } = useHover({});
|
|
14307
|
+
const { pressProps, isPressed } = usePress({});
|
|
14308
|
+
if (onClick) {
|
|
14309
|
+
return /* @__PURE__ */ jsxs(
|
|
14310
|
+
"button",
|
|
13972
14311
|
{
|
|
13973
|
-
|
|
13974
|
-
|
|
13975
|
-
|
|
14312
|
+
...mergeProps$1(focusProps, hoverProps, pressProps),
|
|
14313
|
+
ref,
|
|
14314
|
+
type: "button",
|
|
14315
|
+
className: cn(calendarTitleVariants()),
|
|
14316
|
+
"aria-label": `${title}, click to select year`,
|
|
14317
|
+
onClick,
|
|
14318
|
+
...getInteractionDataAttributes({ isHovered, isFocusVisible, isPressed }),
|
|
14319
|
+
children: [
|
|
14320
|
+
/* @__PURE__ */ jsx("span", { className: cn(calendarTitleStateLayerVariants()), "aria-hidden": "true" }),
|
|
14321
|
+
/* @__PURE__ */ jsx("h2", { "aria-live": "polite", className: cn(calendarTitleTextVariants()), children: title }),
|
|
14322
|
+
showDropdownIndicator && /* @__PURE__ */ jsx("span", { className: cn(calendarTitleIconVariants()), children: /* @__PURE__ */ jsx(DropdownArrowIcon, {}) })
|
|
14323
|
+
]
|
|
13976
14324
|
}
|
|
13977
|
-
|
|
13978
|
-
defaultVariants: {
|
|
13979
|
-
selected: false,
|
|
13980
|
-
state: "enabled"
|
|
13981
|
-
}
|
|
14325
|
+
);
|
|
13982
14326
|
}
|
|
13983
|
-
);
|
|
13984
|
-
|
|
13985
|
-
|
|
13986
|
-
|
|
13987
|
-
|
|
13988
|
-
|
|
13989
|
-
|
|
13990
|
-
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
|
|
13994
|
-
|
|
13995
|
-
|
|
13996
|
-
|
|
13997
|
-
|
|
13998
|
-
|
|
13999
|
-
|
|
14000
|
-
|
|
14001
|
-
|
|
14002
|
-
|
|
14003
|
-
|
|
14004
|
-
|
|
14005
|
-
|
|
14006
|
-
|
|
14007
|
-
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
|
|
14013
|
-
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
|
|
14017
|
-
|
|
14018
|
-
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
"
|
|
14023
|
-
|
|
14024
|
-
|
|
14025
|
-
|
|
14026
|
-
|
|
14027
|
-
|
|
14028
|
-
|
|
14029
|
-
|
|
14327
|
+
return /* @__PURE__ */ jsx("div", { className: cn(calendarTitleVariants(), "cursor-default"), children: /* @__PURE__ */ jsx("h2", { "aria-live": "polite", className: cn(calendarTitleTextVariants()), children: title }) });
|
|
14328
|
+
}
|
|
14329
|
+
StyledCalendarTitle.displayName = "StyledCalendarTitle";
|
|
14330
|
+
calendarHeaderVariants();
|
|
14331
|
+
function StyledYearItem({
|
|
14332
|
+
year,
|
|
14333
|
+
isSelected,
|
|
14334
|
+
onSelect
|
|
14335
|
+
}) {
|
|
14336
|
+
const ref = useRef(null);
|
|
14337
|
+
const { isFocusVisible, focusProps } = useFocusRing();
|
|
14338
|
+
const { isHovered, hoverProps } = useHover({});
|
|
14339
|
+
const { pressProps, isPressed } = usePress({});
|
|
14340
|
+
return /* @__PURE__ */ jsxs(
|
|
14341
|
+
"button",
|
|
14342
|
+
{
|
|
14343
|
+
...mergeProps$1(focusProps, hoverProps, pressProps),
|
|
14344
|
+
ref,
|
|
14345
|
+
type: "button",
|
|
14346
|
+
role: "gridcell",
|
|
14347
|
+
"aria-selected": isSelected,
|
|
14348
|
+
className: cn(yearItemVariants()),
|
|
14349
|
+
onClick: () => onSelect(year),
|
|
14350
|
+
...getInteractionDataAttributes({
|
|
14351
|
+
isHovered,
|
|
14352
|
+
isFocusVisible,
|
|
14353
|
+
isPressed,
|
|
14354
|
+
isSelected
|
|
14355
|
+
}),
|
|
14356
|
+
children: [
|
|
14357
|
+
/* @__PURE__ */ jsx("span", { className: cn(yearItemStateLayerVariants()), "aria-hidden": "true" }),
|
|
14358
|
+
/* @__PURE__ */ jsx("span", { className: cn(yearItemFocusRingVariants()), "aria-hidden": "true" }),
|
|
14359
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none relative z-10", children: year })
|
|
14360
|
+
]
|
|
14361
|
+
}
|
|
14362
|
+
);
|
|
14363
|
+
}
|
|
14364
|
+
StyledYearItem.displayName = "StyledYearItem";
|
|
14365
|
+
function StyledWeekday({ label }) {
|
|
14366
|
+
return /* @__PURE__ */ jsx("span", { className: cn(weekdayVariants()), children: label });
|
|
14367
|
+
}
|
|
14368
|
+
StyledWeekday.displayName = "StyledWeekday";
|
|
14369
|
+
function StyledActionButton({
|
|
14370
|
+
label,
|
|
14371
|
+
"aria-label": ariaLabel,
|
|
14372
|
+
onPress,
|
|
14373
|
+
isDisabled,
|
|
14374
|
+
"data-action": dataAction
|
|
14375
|
+
}) {
|
|
14376
|
+
const ref = useRef(null);
|
|
14377
|
+
const { buttonProps, isPressed } = useButton(
|
|
14378
|
+
{
|
|
14379
|
+
"aria-label": ariaLabel ?? label,
|
|
14380
|
+
isDisabled: isDisabled ?? false,
|
|
14381
|
+
...onPress ? { onPress } : {}
|
|
14382
|
+
},
|
|
14383
|
+
ref
|
|
14384
|
+
);
|
|
14385
|
+
const { isFocusVisible, focusProps } = useFocusRing();
|
|
14386
|
+
const { isHovered, hoverProps } = useHover({ isDisabled: isDisabled ?? false });
|
|
14387
|
+
return /* @__PURE__ */ jsxs(
|
|
14388
|
+
"button",
|
|
14389
|
+
{
|
|
14390
|
+
...mergeProps$1(buttonProps, focusProps, hoverProps),
|
|
14391
|
+
ref,
|
|
14392
|
+
type: "button",
|
|
14393
|
+
"data-action": dataAction,
|
|
14394
|
+
className: cn(actionButtonVariants()),
|
|
14395
|
+
...getInteractionDataAttributes({
|
|
14396
|
+
isHovered,
|
|
14397
|
+
isFocusVisible,
|
|
14398
|
+
isPressed,
|
|
14399
|
+
isDisabled: isDisabled ?? false
|
|
14400
|
+
}),
|
|
14401
|
+
children: [
|
|
14402
|
+
/* @__PURE__ */ jsx("span", { className: cn(actionButtonStateLayerVariants()), "aria-hidden": "true" }),
|
|
14403
|
+
/* @__PURE__ */ jsx("span", { className: cn(actionButtonFocusRingVariants()), "aria-hidden": "true" }),
|
|
14404
|
+
/* @__PURE__ */ jsx("span", { className: "pointer-events-none relative z-10", children: label })
|
|
14405
|
+
]
|
|
14030
14406
|
}
|
|
14031
|
-
|
|
14032
|
-
|
|
14033
|
-
|
|
14034
|
-
|
|
14035
|
-
|
|
14036
|
-
var
|
|
14037
|
-
"
|
|
14038
|
-
"
|
|
14039
|
-
]
|
|
14040
|
-
|
|
14041
|
-
"
|
|
14042
|
-
|
|
14043
|
-
"
|
|
14044
|
-
"
|
|
14045
|
-
"
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
]
|
|
14050
|
-
|
|
14051
|
-
|
|
14407
|
+
);
|
|
14408
|
+
}
|
|
14409
|
+
StyledActionButton.displayName = "StyledActionButton";
|
|
14410
|
+
|
|
14411
|
+
// src/components/DatePicker/datePickerStructuralStyles.ts
|
|
14412
|
+
var CALENDAR_HEADER_STRUCTURAL = [
|
|
14413
|
+
"[&_[data-calendar-header]]:flex",
|
|
14414
|
+
"[&_[data-calendar-header]]:items-center",
|
|
14415
|
+
"[&_[data-calendar-header]]:justify-between",
|
|
14416
|
+
"[&_[data-calendar-header]]:px-3",
|
|
14417
|
+
"[&_[data-calendar-header]]:py-2",
|
|
14418
|
+
// Nav group
|
|
14419
|
+
"[&_[data-calendar-nav]]:flex",
|
|
14420
|
+
"[&_[data-calendar-nav]]:items-center",
|
|
14421
|
+
"[&_[data-calendar-nav]]:gap-1"
|
|
14422
|
+
];
|
|
14423
|
+
var CALENDAR_GRID_STRUCTURAL = [
|
|
14424
|
+
// Table resets
|
|
14425
|
+
"[&_table]:border-collapse",
|
|
14426
|
+
// Center the fixed-width table so 7×48px = 336px is equally inset within 360px
|
|
14427
|
+
"[&_table]:mx-auto",
|
|
14428
|
+
"[&_th]:p-0",
|
|
14429
|
+
"[&_td]:p-0"
|
|
14430
|
+
];
|
|
14431
|
+
var YEAR_GRID_STRUCTURAL = [
|
|
14432
|
+
"[&_[data-year-grid]]:grid",
|
|
14433
|
+
"[&_[data-year-grid]]:grid-cols-3",
|
|
14434
|
+
"[&_[data-year-grid]]:gap-2",
|
|
14435
|
+
"[&_[data-year-grid]]:px-3",
|
|
14436
|
+
"[&_[data-year-grid]]:py-2",
|
|
14437
|
+
"[&_[data-year-grid]]:max-h-[280px]",
|
|
14438
|
+
"[&_[data-year-grid]]:overflow-y-auto",
|
|
14439
|
+
"[&_[data-year-grid]]:place-items-center"
|
|
14440
|
+
];
|
|
14441
|
+
var DIVIDER_STRUCTURAL = ["[&_hr[data-divider]]:border-outline-variant"];
|
|
14442
|
+
var ACTION_ROW_STRUCTURAL = [
|
|
14443
|
+
"[&_[data-actions]]:flex",
|
|
14444
|
+
"[&_[data-actions]]:items-center",
|
|
14445
|
+
"[&_[data-actions]]:justify-end",
|
|
14446
|
+
"[&_[data-actions]]:gap-2",
|
|
14447
|
+
"[&_[data-actions]]:px-3",
|
|
14448
|
+
"[&_[data-actions]]:py-2",
|
|
14449
|
+
"[&_[data-actions]]:h-12"
|
|
14450
|
+
];
|
|
14451
|
+
var DOCKED_LABEL_STRUCTURAL = [
|
|
14052
14452
|
"[&_[data-label]]:text-body-small",
|
|
14053
14453
|
"[&_[data-label]]:text-on-surface-variant",
|
|
14054
14454
|
"[&_[data-label]]:mb-1",
|
|
14055
|
-
"[&_[data-label]]:block"
|
|
14056
|
-
|
|
14455
|
+
"[&_[data-label]]:block"
|
|
14456
|
+
];
|
|
14457
|
+
var DOCKED_FIELD_STRUCTURAL = [
|
|
14057
14458
|
"[&_[data-field-group]]:flex",
|
|
14058
14459
|
"[&_[data-field-group]]:items-center",
|
|
14059
14460
|
"[&_[data-field-group]]:border",
|
|
@@ -14065,15 +14466,16 @@ var CALENDAR_STYLES = [
|
|
|
14065
14466
|
"[&_[data-field-group]]:bg-transparent",
|
|
14066
14467
|
"[&_[data-field-group]:focus-within]:border-primary",
|
|
14067
14468
|
"[&_[data-field-group]:focus-within]:border-2",
|
|
14068
|
-
// ── Date field segments (inline rendering) ────────────────────────────────
|
|
14069
14469
|
"[&_[data-field]]:flex",
|
|
14070
14470
|
"[&_[data-field]]:items-center",
|
|
14071
14471
|
"[&_[data-field]]:flex-1",
|
|
14072
14472
|
"[&_[data-field]]:text-body-large",
|
|
14073
14473
|
"[&_[data-field]]:text-on-surface",
|
|
14074
14474
|
"[&_[data-segment]]:outline-none",
|
|
14075
|
-
"[&_[data-segment][data-placeholder]]:text-on-surface-variant"
|
|
14076
|
-
|
|
14475
|
+
"[&_[data-segment][data-placeholder]]:text-on-surface-variant"
|
|
14476
|
+
];
|
|
14477
|
+
var DOCKED_TRIGGER_STRUCTURAL = [
|
|
14478
|
+
"[&_[data-trigger]]:relative",
|
|
14077
14479
|
"[&_[data-trigger]]:flex",
|
|
14078
14480
|
"[&_[data-trigger]]:items-center",
|
|
14079
14481
|
"[&_[data-trigger]]:justify-center",
|
|
@@ -14081,178 +14483,109 @@ var CALENDAR_STYLES = [
|
|
|
14081
14483
|
"[&_[data-trigger]]:h-10",
|
|
14082
14484
|
"[&_[data-trigger]]:rounded-full",
|
|
14083
14485
|
"[&_[data-trigger]]:text-on-surface-variant",
|
|
14486
|
+
"[&_[data-trigger]]:bg-transparent",
|
|
14487
|
+
"[&_[data-trigger]]:border-none",
|
|
14488
|
+
"[&_[data-trigger]]:cursor-pointer",
|
|
14084
14489
|
"[&_[data-trigger]]:transition-colors",
|
|
14085
14490
|
"[&_[data-trigger]]:duration-spring-standard-fast-effects",
|
|
14086
14491
|
"[&_[data-trigger]]:ease-spring-standard-fast-effects",
|
|
14087
|
-
|
|
14088
|
-
|
|
14089
|
-
"[&_[data-
|
|
14090
|
-
"[&_[data-
|
|
14091
|
-
"[&_[data-
|
|
14092
|
-
"[&_[data-
|
|
14093
|
-
"[&_[data-
|
|
14094
|
-
"[&_[data-
|
|
14095
|
-
|
|
14096
|
-
|
|
14097
|
-
"[&_[data-
|
|
14098
|
-
"[&_[data-
|
|
14099
|
-
"[&_[data-
|
|
14100
|
-
"[&_[data-
|
|
14101
|
-
|
|
14102
|
-
"[&_[data-
|
|
14103
|
-
"[&_[data-
|
|
14104
|
-
"[&_[data-
|
|
14105
|
-
"[&_[data-
|
|
14106
|
-
"[&_[data-
|
|
14107
|
-
"[&_[data-
|
|
14108
|
-
"[&_[data-
|
|
14109
|
-
"[&_[data-
|
|
14110
|
-
|
|
14111
|
-
|
|
14112
|
-
"[&_[data-
|
|
14113
|
-
"[&_[data-
|
|
14114
|
-
"[&_[data-
|
|
14115
|
-
"[&_[data-
|
|
14116
|
-
|
|
14117
|
-
|
|
14118
|
-
"[&_[data-
|
|
14119
|
-
|
|
14120
|
-
"[&_[data-
|
|
14121
|
-
"[&_[data-
|
|
14122
|
-
"[&_[data-
|
|
14123
|
-
"[&_[data-
|
|
14124
|
-
"[&_[data-
|
|
14125
|
-
"[&_[data-
|
|
14126
|
-
"[&_[data-
|
|
14127
|
-
"[&_[data-
|
|
14128
|
-
"[&_[data-
|
|
14129
|
-
"[&_[data-
|
|
14130
|
-
"[&_[data-
|
|
14131
|
-
"[&_[data-
|
|
14132
|
-
"[&_[data-
|
|
14133
|
-
"[&_[data-
|
|
14134
|
-
"[&_[data-
|
|
14135
|
-
"[&_[data-
|
|
14136
|
-
"[&_[data-
|
|
14137
|
-
"[&_[data-
|
|
14138
|
-
"[&_[data-
|
|
14139
|
-
|
|
14140
|
-
"[&
|
|
14141
|
-
"[&
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14145
|
-
|
|
14146
|
-
|
|
14147
|
-
|
|
14148
|
-
|
|
14149
|
-
|
|
14150
|
-
|
|
14151
|
-
|
|
14152
|
-
|
|
14153
|
-
|
|
14154
|
-
|
|
14155
|
-
|
|
14156
|
-
|
|
14157
|
-
"[&_td>div[data-today]:not([data-selected])]:border-primary",
|
|
14158
|
-
// ── Selected ──────────────────────────────────────────────────────────────
|
|
14159
|
-
"[&_td>div[data-selected]]:bg-primary",
|
|
14160
|
-
"[&_td>div[data-selected]]:text-on-primary",
|
|
14161
|
-
// ── Range middle ──────────────────────────────────────────────────────────
|
|
14162
|
-
"[&_td>div[data-range-middle]]:bg-secondary-container",
|
|
14163
|
-
"[&_td>div[data-range-middle]]:text-on-secondary-container",
|
|
14164
|
-
"[&_td>div[data-range-middle]]:rounded-none",
|
|
14165
|
-
// ── Outside month ─────────────────────────────────────────────────────────
|
|
14166
|
-
"[&_td>div[data-outside-month]:not([data-selected])]:text-on-surface-variant",
|
|
14167
|
-
// ── Disabled ──────────────────────────────────────────────────────────────
|
|
14168
|
-
"[&_td>div[data-disabled]]:text-on-surface/38",
|
|
14169
|
-
"[&_td>div[data-disabled]]:cursor-not-allowed",
|
|
14170
|
-
// ── Cell hover states ─────────────────────────────────────────────────────
|
|
14171
|
-
"[&_td>div:not([data-selected]):not([data-today]):not([data-disabled]):hover]:bg-on-surface/8",
|
|
14172
|
-
"[&_td>div[data-today]:not([data-selected]):hover]:bg-primary/8",
|
|
14173
|
-
"[&_td>div[data-selected]:hover]:shadow-sm",
|
|
14174
|
-
// ── Cell focus-visible states ─────────────────────────────────────────────
|
|
14175
|
-
"[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-2",
|
|
14176
|
-
"[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-on-surface",
|
|
14177
|
-
"[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:bg-on-surface/10",
|
|
14178
|
-
"[&_td>div[data-today][data-focus-visible]:not([data-selected])]:bg-primary/10",
|
|
14179
|
-
// ── Weekday labels ────────────────────────────────────────────────────────
|
|
14180
|
-
"[&_th]:text-body-small",
|
|
14181
|
-
"[&_th]:text-on-surface",
|
|
14182
|
-
"[&_th]:font-normal",
|
|
14183
|
-
"[&_th]:w-[48px]",
|
|
14184
|
-
"[&_th]:h-[48px]",
|
|
14185
|
-
// ── Year grid ─────────────────────────────────────────────────────────────
|
|
14186
|
-
"[&_[data-year-grid]]:grid",
|
|
14187
|
-
"[&_[data-year-grid]]:grid-cols-3",
|
|
14188
|
-
"[&_[data-year-grid]]:gap-2",
|
|
14189
|
-
"[&_[data-year-grid]]:px-3",
|
|
14190
|
-
"[&_[data-year-grid]]:py-2",
|
|
14191
|
-
"[&_[data-year-grid]]:max-h-[280px]",
|
|
14192
|
-
"[&_[data-year-grid]]:overflow-y-auto",
|
|
14193
|
-
"[&_[data-year-grid]]:place-items-center",
|
|
14194
|
-
"[&_[data-year-item]]:w-[88px]",
|
|
14195
|
-
"[&_[data-year-item]]:h-[52px]",
|
|
14196
|
-
"[&_[data-year-item]]:rounded-full",
|
|
14197
|
-
"[&_[data-year-item]]:flex",
|
|
14198
|
-
"[&_[data-year-item]]:items-center",
|
|
14199
|
-
"[&_[data-year-item]]:justify-center",
|
|
14200
|
-
"[&_[data-year-item]]:text-body-large",
|
|
14201
|
-
"[&_[data-year-item]]:text-on-surface-variant",
|
|
14202
|
-
"[&_[data-year-item]]:bg-transparent",
|
|
14203
|
-
"[&_[data-year-item]]:border-none",
|
|
14204
|
-
"[&_[data-year-item]]:cursor-pointer",
|
|
14205
|
-
"[&_[data-year-item]]:transition-colors",
|
|
14206
|
-
"[&_[data-year-item]]:duration-spring-standard-fast-effects",
|
|
14207
|
-
"[&_[data-year-item]]:ease-spring-standard-fast-effects",
|
|
14208
|
-
"[&_[data-year-item]:hover]:bg-on-surface/8",
|
|
14209
|
-
"[&_[data-year-item][data-selected]]:bg-primary",
|
|
14210
|
-
"[&_[data-year-item][data-selected]]:text-on-primary",
|
|
14211
|
-
// ── Divider ───────────────────────────────────────────────────────────────
|
|
14212
|
-
"[&_hr[data-divider]]:border-outline-variant",
|
|
14213
|
-
// ── Action buttons ────────────────────────────────────────────────────────
|
|
14214
|
-
"[&_[data-actions]]:flex",
|
|
14215
|
-
"[&_[data-actions]]:items-center",
|
|
14216
|
-
"[&_[data-actions]]:justify-end",
|
|
14217
|
-
"[&_[data-actions]]:gap-2",
|
|
14218
|
-
"[&_[data-actions]]:px-3",
|
|
14219
|
-
"[&_[data-actions]]:py-2",
|
|
14220
|
-
"[&_[data-action]]:text-primary",
|
|
14221
|
-
"[&_[data-action]]:text-label-large",
|
|
14222
|
-
"[&_[data-action]]:rounded-full",
|
|
14223
|
-
"[&_[data-action]]:px-3",
|
|
14224
|
-
"[&_[data-action]]:py-2",
|
|
14225
|
-
"[&_[data-action]]:min-h-12",
|
|
14226
|
-
"[&_[data-action]]:bg-transparent",
|
|
14227
|
-
"[&_[data-action]]:border-none",
|
|
14228
|
-
"[&_[data-action]]:transition-colors",
|
|
14229
|
-
"[&_[data-action]]:duration-spring-standard-fast-effects",
|
|
14230
|
-
"[&_[data-action]]:ease-spring-standard-fast-effects",
|
|
14231
|
-
"[&_[data-action]:hover]:bg-primary/8",
|
|
14232
|
-
"[&_[data-action]:focus-visible]:ring-2",
|
|
14233
|
-
"[&_[data-action]:focus-visible]:ring-primary",
|
|
14234
|
-
"[&_[data-action]:focus-visible]:bg-primary/10"
|
|
14492
|
+
// Hover: 8% overlay via bg tint (acceptable for structural trigger)
|
|
14493
|
+
"[&_[data-trigger][data-hovered]]:bg-on-surface-variant/8",
|
|
14494
|
+
"[&_[data-trigger][data-focus-visible]]:bg-on-surface-variant/10",
|
|
14495
|
+
"[&_[data-trigger][data-focus-visible]]:outline",
|
|
14496
|
+
"[&_[data-trigger][data-focus-visible]]:outline-2",
|
|
14497
|
+
"[&_[data-trigger][data-focus-visible]]:outline-secondary",
|
|
14498
|
+
"[&_[data-trigger][data-disabled]]:text-on-surface/38",
|
|
14499
|
+
"[&_[data-trigger][data-disabled]]:cursor-not-allowed"
|
|
14500
|
+
];
|
|
14501
|
+
var MODAL_HEADER_STRUCTURAL = [
|
|
14502
|
+
"[&_[data-modal-header]]:px-6",
|
|
14503
|
+
"[&_[data-modal-header]]:pt-4",
|
|
14504
|
+
"[&_[data-modal-header]]:pb-3",
|
|
14505
|
+
"[&_[data-modal-header]]:flex",
|
|
14506
|
+
"[&_[data-modal-header]]:items-start",
|
|
14507
|
+
"[&_[data-modal-header]]:justify-between",
|
|
14508
|
+
"[&_[data-headline]]:text-label-large",
|
|
14509
|
+
"[&_[data-headline]]:text-on-surface-variant",
|
|
14510
|
+
"[&_[data-headline]]:m-0",
|
|
14511
|
+
"[&_[data-supporting-text]]:text-headline-large",
|
|
14512
|
+
"[&_[data-supporting-text]]:text-on-surface",
|
|
14513
|
+
"[&_[data-supporting-text]]:mt-9",
|
|
14514
|
+
"[&_[data-supporting-text]]:m-0"
|
|
14515
|
+
];
|
|
14516
|
+
var MODAL_INPUT_SUPPORTING_TEXT_STRUCTURAL = [
|
|
14517
|
+
"[&_[data-supporting-text]]:text-headline-large",
|
|
14518
|
+
"[&_[data-supporting-text]]:text-on-surface",
|
|
14519
|
+
"[&_[data-supporting-text]]:mt-4",
|
|
14520
|
+
"[&_[data-supporting-text]]:m-0"
|
|
14521
|
+
];
|
|
14522
|
+
var MODAL_INPUT_FIELD_STRUCTURAL = [
|
|
14523
|
+
"[&_[data-date-input-field]]:px-6",
|
|
14524
|
+
"[&_[data-date-input-field]]:py-2",
|
|
14525
|
+
"[&_[data-date-input-field]_[data-field]]:flex",
|
|
14526
|
+
"[&_[data-date-input-field]_[data-field]]:items-center",
|
|
14527
|
+
"[&_[data-date-input-field]_[data-field]]:border",
|
|
14528
|
+
"[&_[data-date-input-field]_[data-field]]:border-outline",
|
|
14529
|
+
"[&_[data-date-input-field]_[data-field]]:rounded-sm",
|
|
14530
|
+
"[&_[data-date-input-field]_[data-field]]:px-4",
|
|
14531
|
+
"[&_[data-date-input-field]_[data-field]]:py-3",
|
|
14532
|
+
"[&_[data-date-input-field]_[data-field]]:text-body-large",
|
|
14533
|
+
"[&_[data-date-input-field]_[data-field]]:text-on-surface",
|
|
14534
|
+
"[&_[data-date-input-field]_[data-segment]]:outline-none",
|
|
14535
|
+
"[&_[data-date-input-field]_[data-segment][data-placeholder]]:text-on-surface-variant",
|
|
14536
|
+
"[&_[data-date-input-field][data-focused]_[data-field]]:border-primary",
|
|
14537
|
+
"[&_[data-date-input-field][data-focused]_[data-field]]:border-2",
|
|
14538
|
+
"[&_[data-date-input-field][data-invalid]_[data-field]]:border-error",
|
|
14539
|
+
"[&_[data-date-input-field][data-invalid]_[data-field]]:border-2",
|
|
14540
|
+
"[&_[data-date-input-field]_[data-label]]:text-body-small",
|
|
14541
|
+
"[&_[data-date-input-field]_[data-label]]:text-on-surface-variant",
|
|
14542
|
+
"[&_[data-date-input-field]_[data-label]]:block",
|
|
14543
|
+
"[&_[data-date-input-field]_[data-label]]:mb-1",
|
|
14544
|
+
"[&_[data-date-input-field]_[data-error-message]]:text-body-small",
|
|
14545
|
+
"[&_[data-date-input-field]_[data-error-message]]:text-error",
|
|
14546
|
+
"[&_[data-date-input-field]_[data-error-message]]:mt-1"
|
|
14547
|
+
];
|
|
14548
|
+
var SHARED_CALENDAR_STRUCTURAL = [
|
|
14549
|
+
...CALENDAR_HEADER_STRUCTURAL,
|
|
14550
|
+
...CALENDAR_GRID_STRUCTURAL,
|
|
14551
|
+
...YEAR_GRID_STRUCTURAL,
|
|
14552
|
+
...DIVIDER_STRUCTURAL,
|
|
14553
|
+
...ACTION_ROW_STRUCTURAL
|
|
14554
|
+
].join(" ");
|
|
14555
|
+
var MODAL_CONTENT_STRUCTURAL = [
|
|
14556
|
+
...MODAL_HEADER_STRUCTURAL,
|
|
14557
|
+
...CALENDAR_HEADER_STRUCTURAL,
|
|
14558
|
+
...CALENDAR_GRID_STRUCTURAL,
|
|
14559
|
+
...YEAR_GRID_STRUCTURAL,
|
|
14560
|
+
...DIVIDER_STRUCTURAL,
|
|
14561
|
+
...ACTION_ROW_STRUCTURAL
|
|
14235
14562
|
].join(" ");
|
|
14236
|
-
var
|
|
14237
|
-
|
|
14238
|
-
|
|
14239
|
-
|
|
14240
|
-
|
|
14241
|
-
|
|
14242
|
-
|
|
14243
|
-
|
|
14244
|
-
|
|
14245
|
-
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
|
|
14250
|
-
"[
|
|
14251
|
-
"
|
|
14252
|
-
|
|
14253
|
-
"[
|
|
14254
|
-
"[
|
|
14255
|
-
|
|
14563
|
+
var MODAL_INPUT_CONTENT_STRUCTURAL = [
|
|
14564
|
+
...MODAL_HEADER_STRUCTURAL,
|
|
14565
|
+
...MODAL_INPUT_SUPPORTING_TEXT_STRUCTURAL,
|
|
14566
|
+
...MODAL_INPUT_FIELD_STRUCTURAL,
|
|
14567
|
+
...DIVIDER_STRUCTURAL,
|
|
14568
|
+
...ACTION_ROW_STRUCTURAL
|
|
14569
|
+
].join(" ");
|
|
14570
|
+
var DOCKED_ROOT_STRUCTURAL = [
|
|
14571
|
+
...DOCKED_LABEL_STRUCTURAL,
|
|
14572
|
+
...DOCKED_FIELD_STRUCTURAL,
|
|
14573
|
+
...DOCKED_TRIGGER_STRUCTURAL
|
|
14574
|
+
].join(" ");
|
|
14575
|
+
var DOCKED_POPOVER_PANEL_STRUCTURAL = SHARED_CALENDAR_STRUCTURAL;
|
|
14576
|
+
var DOCKED_POPOVER_MOTION = [
|
|
14577
|
+
"transition-[transform,opacity]",
|
|
14578
|
+
"duration-short3",
|
|
14579
|
+
"ease-standard-decelerate",
|
|
14580
|
+
"data-[exiting]:duration-short2",
|
|
14581
|
+
"data-[exiting]:ease-standard-accelerate"
|
|
14582
|
+
].join(" ");
|
|
14583
|
+
var MODAL_DIALOG_MOTION = [
|
|
14584
|
+
"transition-[transform,opacity]",
|
|
14585
|
+
"duration-medium2",
|
|
14586
|
+
"ease-standard-decelerate",
|
|
14587
|
+
"data-[exiting]:duration-medium1",
|
|
14588
|
+
"data-[exiting]:ease-standard-accelerate"
|
|
14256
14589
|
].join(" ");
|
|
14257
14590
|
var DatePickerDockedStyled = forwardRef(
|
|
14258
14591
|
(props, ref) => {
|
|
@@ -14265,10 +14598,22 @@ var DatePickerDockedStyled = forwardRef(
|
|
|
14265
14598
|
...rest,
|
|
14266
14599
|
className: cn(
|
|
14267
14600
|
datePickerContainerVariants({ variant: "docked" }),
|
|
14268
|
-
|
|
14269
|
-
!reducedMotion && DOCKED_MOTION_STYLES,
|
|
14601
|
+
DOCKED_ROOT_STRUCTURAL,
|
|
14270
14602
|
className
|
|
14271
|
-
)
|
|
14603
|
+
),
|
|
14604
|
+
popoverClassName: cn(
|
|
14605
|
+
popoverVariants(),
|
|
14606
|
+
DOCKED_POPOVER_PANEL_STRUCTURAL,
|
|
14607
|
+
!reducedMotion && DOCKED_POPOVER_MOTION
|
|
14608
|
+
),
|
|
14609
|
+
slots: {
|
|
14610
|
+
CellComponent: StyledCalendarCell,
|
|
14611
|
+
NavButtonComponent: StyledNavButton,
|
|
14612
|
+
TitleComponent: StyledCalendarTitle,
|
|
14613
|
+
YearItemComponent: StyledYearItem,
|
|
14614
|
+
WeekdayComponent: StyledWeekday
|
|
14615
|
+
},
|
|
14616
|
+
ActionButtonComponent: StyledActionButton
|
|
14272
14617
|
}
|
|
14273
14618
|
);
|
|
14274
14619
|
}
|
|
@@ -14341,7 +14686,10 @@ var DatePickerModal = forwardRef(
|
|
|
14341
14686
|
onCancel,
|
|
14342
14687
|
onConfirm,
|
|
14343
14688
|
onClear,
|
|
14344
|
-
className
|
|
14689
|
+
className,
|
|
14690
|
+
scrimClassName,
|
|
14691
|
+
slots,
|
|
14692
|
+
ActionButtonComponent
|
|
14345
14693
|
} = props;
|
|
14346
14694
|
const internalRef = useRef(null);
|
|
14347
14695
|
const ref = forwardedRef ?? internalRef;
|
|
@@ -14465,6 +14813,7 @@ var DatePickerModal = forwardRef(
|
|
|
14465
14813
|
headlineId,
|
|
14466
14814
|
onClose: handleClose,
|
|
14467
14815
|
...className ? { className } : {},
|
|
14816
|
+
...scrimClassName ? { scrimClassName } : {},
|
|
14468
14817
|
isOpen: state.isOpen,
|
|
14469
14818
|
children: [
|
|
14470
14819
|
/* @__PURE__ */ jsx(
|
|
@@ -14486,7 +14835,8 @@ var DatePickerModal = forwardRef(
|
|
|
14486
14835
|
onChange: handleSingleChange,
|
|
14487
14836
|
...minValue ? { minValue } : {},
|
|
14488
14837
|
...maxValue ? { maxValue } : {},
|
|
14489
|
-
...isDateUnavailable ? { isDateUnavailable } : {}
|
|
14838
|
+
...isDateUnavailable ? { isDateUnavailable } : {},
|
|
14839
|
+
...slots ? { slots } : {}
|
|
14490
14840
|
}
|
|
14491
14841
|
) : /* @__PURE__ */ jsx(
|
|
14492
14842
|
CalendarCore,
|
|
@@ -14498,7 +14848,8 @@ var DatePickerModal = forwardRef(
|
|
|
14498
14848
|
onRangeChange: handleRangeChange,
|
|
14499
14849
|
...minValue ? { minValue } : {},
|
|
14500
14850
|
...maxValue ? { maxValue } : {},
|
|
14501
|
-
...isDateUnavailable ? { isDateUnavailable } : {}
|
|
14851
|
+
...isDateUnavailable ? { isDateUnavailable } : {},
|
|
14852
|
+
...slots ? { slots } : {}
|
|
14502
14853
|
}
|
|
14503
14854
|
),
|
|
14504
14855
|
/* @__PURE__ */ jsx(
|
|
@@ -14510,7 +14861,8 @@ var DatePickerModal = forwardRef(
|
|
|
14510
14861
|
showClear,
|
|
14511
14862
|
onCancel: handleCancel,
|
|
14512
14863
|
onConfirm: handleConfirm,
|
|
14513
|
-
onClear: handleClear
|
|
14864
|
+
onClear: handleClear,
|
|
14865
|
+
...ActionButtonComponent ? { ButtonComponent: ActionButtonComponent } : {}
|
|
14514
14866
|
}
|
|
14515
14867
|
)
|
|
14516
14868
|
]
|
|
@@ -14528,6 +14880,7 @@ function ModalOverlay({
|
|
|
14528
14880
|
headlineId,
|
|
14529
14881
|
onClose,
|
|
14530
14882
|
className,
|
|
14883
|
+
scrimClassName,
|
|
14531
14884
|
isOpen,
|
|
14532
14885
|
children
|
|
14533
14886
|
}) {
|
|
@@ -14548,7 +14901,7 @@ function ModalOverlay({
|
|
|
14548
14901
|
dialogRef
|
|
14549
14902
|
);
|
|
14550
14903
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14551
|
-
/* @__PURE__ */ jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose }),
|
|
14904
|
+
/* @__PURE__ */ jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose, className: scrimClassName }),
|
|
14552
14905
|
/* @__PURE__ */ jsx(
|
|
14553
14906
|
"div",
|
|
14554
14907
|
{
|
|
@@ -14566,210 +14919,6 @@ function ModalOverlay({
|
|
|
14566
14919
|
] });
|
|
14567
14920
|
}
|
|
14568
14921
|
ModalOverlay.displayName = "ModalOverlay";
|
|
14569
|
-
var MODAL_STYLES = [
|
|
14570
|
-
// ── Container structure ───────────────────────────────────────────────────
|
|
14571
|
-
"[&_[data-modal-dialog]]:bg-surface-container-high",
|
|
14572
|
-
"[&_[data-modal-dialog]]:rounded-3xl",
|
|
14573
|
-
"[&_[data-modal-dialog]]:overflow-hidden",
|
|
14574
|
-
"[&_[data-modal-dialog]]:fixed",
|
|
14575
|
-
"[&_[data-modal-dialog]]:top-1/2",
|
|
14576
|
-
"[&_[data-modal-dialog]]:left-1/2",
|
|
14577
|
-
"[&_[data-modal-dialog]]:-translate-x-1/2",
|
|
14578
|
-
"[&_[data-modal-dialog]]:-translate-y-1/2",
|
|
14579
|
-
"[&_[data-modal-dialog]]:z-50",
|
|
14580
|
-
"[&_[data-modal-dialog]]:w-[360px]",
|
|
14581
|
-
"[&_[data-modal-dialog]]:max-h-[90vh]",
|
|
14582
|
-
"[&_[data-modal-dialog]]:overflow-y-auto",
|
|
14583
|
-
// ── Header ────────────────────────────────────────────────────────────────
|
|
14584
|
-
"[&_[data-modal-header]]:px-6",
|
|
14585
|
-
"[&_[data-modal-header]]:pt-4",
|
|
14586
|
-
"[&_[data-modal-header]]:pb-3",
|
|
14587
|
-
"[&_[data-modal-header]]:flex",
|
|
14588
|
-
"[&_[data-modal-header]]:items-start",
|
|
14589
|
-
"[&_[data-modal-header]]:justify-between",
|
|
14590
|
-
"[&_[data-headline]]:text-label-large",
|
|
14591
|
-
"[&_[data-headline]]:text-on-surface-variant",
|
|
14592
|
-
"[&_[data-headline]]:m-0",
|
|
14593
|
-
"[&_[data-supporting-text]]:text-headline-large",
|
|
14594
|
-
"[&_[data-supporting-text]]:text-on-surface",
|
|
14595
|
-
"[&_[data-supporting-text]]:mt-9",
|
|
14596
|
-
"[&_[data-supporting-text]]:m-0",
|
|
14597
|
-
"[&_[data-mode-toggle]]:w-12",
|
|
14598
|
-
"[&_[data-mode-toggle]]:h-12",
|
|
14599
|
-
"[&_[data-mode-toggle]]:rounded-full",
|
|
14600
|
-
"[&_[data-mode-toggle]]:flex",
|
|
14601
|
-
"[&_[data-mode-toggle]]:items-center",
|
|
14602
|
-
"[&_[data-mode-toggle]]:justify-center",
|
|
14603
|
-
"[&_[data-mode-toggle]]:text-on-surface-variant",
|
|
14604
|
-
"[&_[data-mode-toggle]]:bg-transparent",
|
|
14605
|
-
"[&_[data-mode-toggle]]:border-none",
|
|
14606
|
-
"[&_[data-mode-toggle]]:self-end",
|
|
14607
|
-
"[&_[data-mode-toggle]]:transition-colors",
|
|
14608
|
-
"[&_[data-mode-toggle]]:duration-spring-standard-fast-effects",
|
|
14609
|
-
"[&_[data-mode-toggle]]:ease-spring-standard-fast-effects",
|
|
14610
|
-
"[&_[data-mode-toggle]:hover]:bg-on-surface-variant/8",
|
|
14611
|
-
// ── Divider ───────────────────────────────────────────────────────────────
|
|
14612
|
-
"[&_hr[data-divider]]:border-outline-variant",
|
|
14613
|
-
// ── Calendar header ───────────────────────────────────────────────────────
|
|
14614
|
-
"[&_[data-calendar-header]]:flex",
|
|
14615
|
-
"[&_[data-calendar-header]]:items-center",
|
|
14616
|
-
"[&_[data-calendar-header]]:justify-between",
|
|
14617
|
-
"[&_[data-calendar-header]]:px-3",
|
|
14618
|
-
"[&_[data-calendar-header]]:py-2",
|
|
14619
|
-
"[&_[data-calendar-title]]:flex",
|
|
14620
|
-
"[&_[data-calendar-title]]:items-center",
|
|
14621
|
-
"[&_[data-calendar-title]]:gap-0.5",
|
|
14622
|
-
"[&_[data-calendar-title]]:bg-transparent",
|
|
14623
|
-
"[&_[data-calendar-title]]:border-none",
|
|
14624
|
-
"[&_[data-calendar-title]]:cursor-pointer",
|
|
14625
|
-
"[&_[data-calendar-title]]:rounded-full",
|
|
14626
|
-
"[&_[data-calendar-title]]:px-2",
|
|
14627
|
-
"[&_[data-calendar-title]]:py-1",
|
|
14628
|
-
"[&_[data-calendar-title]]:transition-colors",
|
|
14629
|
-
"[&_[data-calendar-title]]:duration-spring-standard-fast-effects",
|
|
14630
|
-
"[&_[data-calendar-title]]:ease-spring-standard-fast-effects",
|
|
14631
|
-
"[&_[data-calendar-title]:hover]:bg-on-surface/8",
|
|
14632
|
-
"[&_[data-calendar-title]_h2]:text-label-large",
|
|
14633
|
-
"[&_[data-calendar-title]_h2]:text-on-surface-variant",
|
|
14634
|
-
"[&_[data-calendar-title]_h2]:m-0",
|
|
14635
|
-
"[&_[data-calendar-title]_svg]:text-on-surface-variant",
|
|
14636
|
-
"[&_[data-calendar-nav]]:flex",
|
|
14637
|
-
"[&_[data-calendar-nav]]:items-center",
|
|
14638
|
-
"[&_[data-calendar-nav]]:gap-1",
|
|
14639
|
-
"[&_[data-nav-button]]:w-10",
|
|
14640
|
-
"[&_[data-nav-button]]:h-10",
|
|
14641
|
-
"[&_[data-nav-button]]:rounded-full",
|
|
14642
|
-
"[&_[data-nav-button]]:flex",
|
|
14643
|
-
"[&_[data-nav-button]]:items-center",
|
|
14644
|
-
"[&_[data-nav-button]]:justify-center",
|
|
14645
|
-
"[&_[data-nav-button]]:text-on-surface-variant",
|
|
14646
|
-
"[&_[data-nav-button]]:bg-transparent",
|
|
14647
|
-
"[&_[data-nav-button]]:border-none",
|
|
14648
|
-
"[&_[data-nav-button]]:transition-colors",
|
|
14649
|
-
"[&_[data-nav-button]]:duration-spring-standard-fast-effects",
|
|
14650
|
-
"[&_[data-nav-button]]:ease-spring-standard-fast-effects",
|
|
14651
|
-
"[&_[data-nav-button]:hover]:bg-on-surface/8",
|
|
14652
|
-
"[&_[data-nav-button]:focus-visible]:bg-on-surface/10",
|
|
14653
|
-
"[&_[data-nav-button]:disabled]:text-on-surface/38",
|
|
14654
|
-
"[&_[data-nav-button]:disabled]:cursor-not-allowed",
|
|
14655
|
-
// ── Calendar cells ────────────────────────────────────────────────────────
|
|
14656
|
-
"[&_td>div]:w-[48px]",
|
|
14657
|
-
"[&_td>div]:h-[48px]",
|
|
14658
|
-
"[&_td>div]:rounded-full",
|
|
14659
|
-
"[&_td>div]:flex",
|
|
14660
|
-
"[&_td>div]:items-center",
|
|
14661
|
-
"[&_td>div]:justify-center",
|
|
14662
|
-
"[&_td>div]:text-body-large",
|
|
14663
|
-
"[&_td>div]:text-on-surface",
|
|
14664
|
-
"[&_td>div]:relative",
|
|
14665
|
-
"[&_td>div]:cursor-pointer",
|
|
14666
|
-
"[&_td>div]:select-none",
|
|
14667
|
-
"[&_td>div]:transition-colors",
|
|
14668
|
-
"[&_td>div]:duration-spring-standard-fast-effects",
|
|
14669
|
-
"[&_td>div]:ease-spring-standard-fast-effects",
|
|
14670
|
-
"[&_td>div[data-today]:not([data-selected])]:text-primary",
|
|
14671
|
-
"[&_td>div[data-today]:not([data-selected])]:border",
|
|
14672
|
-
"[&_td>div[data-today]:not([data-selected])]:border-primary",
|
|
14673
|
-
"[&_td>div[data-selected]]:bg-primary",
|
|
14674
|
-
"[&_td>div[data-selected]]:text-on-primary",
|
|
14675
|
-
"[&_td>div[data-range-middle]]:bg-secondary-container",
|
|
14676
|
-
"[&_td>div[data-range-middle]]:text-on-secondary-container",
|
|
14677
|
-
"[&_td>div[data-range-middle]]:rounded-none",
|
|
14678
|
-
"[&_td>div[data-outside-month]:not([data-selected])]:text-on-surface-variant",
|
|
14679
|
-
"[&_td>div[data-disabled]]:text-on-surface/38",
|
|
14680
|
-
"[&_td>div[data-disabled]]:cursor-not-allowed",
|
|
14681
|
-
"[&_td>div:not([data-selected]):not([data-today]):not([data-disabled]):hover]:bg-on-surface/8",
|
|
14682
|
-
"[&_td>div[data-today]:not([data-selected]):hover]:bg-primary/8",
|
|
14683
|
-
"[&_td>div[data-selected]:hover]:shadow-sm",
|
|
14684
|
-
"[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-2",
|
|
14685
|
-
"[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:ring-on-surface",
|
|
14686
|
-
"[&_td>div[data-focus-visible]:not([data-selected]):not([data-today])]:bg-on-surface/10",
|
|
14687
|
-
"[&_td>div[data-today][data-focus-visible]:not([data-selected])]:bg-primary/10",
|
|
14688
|
-
// ── Weekday labels ────────────────────────────────────────────────────────
|
|
14689
|
-
"[&_th]:text-body-small",
|
|
14690
|
-
"[&_th]:text-on-surface",
|
|
14691
|
-
"[&_th]:font-normal",
|
|
14692
|
-
"[&_th]:w-[48px]",
|
|
14693
|
-
"[&_th]:h-[48px]",
|
|
14694
|
-
// ── Year grid ─────────────────────────────────────────────────────────────
|
|
14695
|
-
"[&_[data-year-grid]]:grid",
|
|
14696
|
-
"[&_[data-year-grid]]:grid-cols-3",
|
|
14697
|
-
"[&_[data-year-grid]]:gap-2",
|
|
14698
|
-
"[&_[data-year-grid]]:px-3",
|
|
14699
|
-
"[&_[data-year-grid]]:py-2",
|
|
14700
|
-
"[&_[data-year-grid]]:max-h-[280px]",
|
|
14701
|
-
"[&_[data-year-grid]]:overflow-y-auto",
|
|
14702
|
-
"[&_[data-year-grid]]:place-items-center",
|
|
14703
|
-
"[&_[data-year-item]]:w-[88px]",
|
|
14704
|
-
"[&_[data-year-item]]:h-[52px]",
|
|
14705
|
-
"[&_[data-year-item]]:rounded-full",
|
|
14706
|
-
"[&_[data-year-item]]:flex",
|
|
14707
|
-
"[&_[data-year-item]]:items-center",
|
|
14708
|
-
"[&_[data-year-item]]:justify-center",
|
|
14709
|
-
"[&_[data-year-item]]:text-body-large",
|
|
14710
|
-
"[&_[data-year-item]]:text-on-surface-variant",
|
|
14711
|
-
"[&_[data-year-item]]:bg-transparent",
|
|
14712
|
-
"[&_[data-year-item]]:border-none",
|
|
14713
|
-
"[&_[data-year-item]]:cursor-pointer",
|
|
14714
|
-
"[&_[data-year-item]]:transition-colors",
|
|
14715
|
-
"[&_[data-year-item]]:duration-spring-standard-fast-effects",
|
|
14716
|
-
"[&_[data-year-item]]:ease-spring-standard-fast-effects",
|
|
14717
|
-
"[&_[data-year-item]:hover]:bg-on-surface/8",
|
|
14718
|
-
"[&_[data-year-item][data-selected]]:bg-primary",
|
|
14719
|
-
"[&_[data-year-item][data-selected]]:text-on-primary",
|
|
14720
|
-
// ── Scrim ─────────────────────────────────────────────────────────────────
|
|
14721
|
-
"[&_[data-scrim]]:fixed",
|
|
14722
|
-
"[&_[data-scrim]]:inset-0",
|
|
14723
|
-
"[&_[data-scrim]]:z-40",
|
|
14724
|
-
"[&_[data-scrim]]:bg-scrim",
|
|
14725
|
-
"[&_[data-scrim]]:opacity-32",
|
|
14726
|
-
"[&_[data-scrim]]:transition-opacity",
|
|
14727
|
-
"[&_[data-scrim]]:duration-medium2",
|
|
14728
|
-
"[&_[data-scrim]]:ease-standard",
|
|
14729
|
-
// ── Action buttons ────────────────────────────────────────────────────────
|
|
14730
|
-
"[&_[data-actions]]:flex",
|
|
14731
|
-
"[&_[data-actions]]:items-center",
|
|
14732
|
-
"[&_[data-actions]]:justify-end",
|
|
14733
|
-
"[&_[data-actions]]:gap-2",
|
|
14734
|
-
"[&_[data-actions]]:px-3",
|
|
14735
|
-
"[&_[data-actions]]:py-2",
|
|
14736
|
-
"[&_[data-action]]:text-primary",
|
|
14737
|
-
"[&_[data-action]]:text-label-large",
|
|
14738
|
-
"[&_[data-action]]:rounded-full",
|
|
14739
|
-
"[&_[data-action]]:px-3",
|
|
14740
|
-
"[&_[data-action]]:py-2",
|
|
14741
|
-
"[&_[data-action]]:min-h-12",
|
|
14742
|
-
"[&_[data-action]]:bg-transparent",
|
|
14743
|
-
"[&_[data-action]]:border-none",
|
|
14744
|
-
"[&_[data-action]]:transition-colors",
|
|
14745
|
-
"[&_[data-action]]:duration-spring-standard-fast-effects",
|
|
14746
|
-
"[&_[data-action]]:ease-spring-standard-fast-effects",
|
|
14747
|
-
"[&_[data-action]:hover]:bg-primary/8",
|
|
14748
|
-
"[&_[data-action]:focus-visible]:ring-2",
|
|
14749
|
-
"[&_[data-action]:focus-visible]:ring-primary",
|
|
14750
|
-
"[&_[data-action]:focus-visible]:bg-primary/10"
|
|
14751
|
-
].join(" ");
|
|
14752
|
-
var MODAL_MOTION_STYLES = [
|
|
14753
|
-
// ── Modal container enter ──────────────────────────────────────────────────
|
|
14754
|
-
"[&_[data-modal-dialog]]:transition-[transform,opacity]",
|
|
14755
|
-
"[&_[data-modal-dialog]]:duration-medium2",
|
|
14756
|
-
"[&_[data-modal-dialog]]:ease-standard-decelerate",
|
|
14757
|
-
// ── Modal container exit ───────────────────────────────────────────────────
|
|
14758
|
-
"[&_[data-modal-dialog][data-exiting]]:duration-medium1",
|
|
14759
|
-
"[&_[data-modal-dialog][data-exiting]]:ease-standard-accelerate",
|
|
14760
|
-
// ── Calendar month slide ───────────────────────────────────────────────────
|
|
14761
|
-
"[&_table]:transition-transform",
|
|
14762
|
-
"[&_table]:duration-medium1",
|
|
14763
|
-
"[&_table]:ease-emphasized-decelerate",
|
|
14764
|
-
// ── Cell selection animation (scale + background) ──────────────────────────
|
|
14765
|
-
"[&_td>div[data-selected]]:transition-[background-color,transform]",
|
|
14766
|
-
"[&_td>div[data-selected]]:duration-short2",
|
|
14767
|
-
"[&_td>div[data-selected]]:ease-standard",
|
|
14768
|
-
// ── State layer opacity ────────────────────────────────────────────────────
|
|
14769
|
-
"[&_td>div::after]:transition-opacity",
|
|
14770
|
-
"[&_td>div::after]:duration-short1",
|
|
14771
|
-
"[&_td>div::after]:ease-standard"
|
|
14772
|
-
].join(" ");
|
|
14773
14922
|
var DatePickerModalStyled = forwardRef(
|
|
14774
14923
|
(props, ref) => {
|
|
14775
14924
|
const { className, ...rest } = props;
|
|
@@ -14780,11 +14929,20 @@ var DatePickerModalStyled = forwardRef(
|
|
|
14780
14929
|
ref,
|
|
14781
14930
|
...rest,
|
|
14782
14931
|
className: cn(
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
!reducedMotion &&
|
|
14932
|
+
modalDialogVariants({ variant: "modal" }),
|
|
14933
|
+
MODAL_CONTENT_STRUCTURAL,
|
|
14934
|
+
!reducedMotion && MODAL_DIALOG_MOTION,
|
|
14786
14935
|
className
|
|
14787
|
-
)
|
|
14936
|
+
),
|
|
14937
|
+
scrimClassName: cn(scrimVariants2()),
|
|
14938
|
+
slots: {
|
|
14939
|
+
CellComponent: StyledCalendarCell,
|
|
14940
|
+
NavButtonComponent: StyledNavButton,
|
|
14941
|
+
TitleComponent: StyledCalendarTitle,
|
|
14942
|
+
YearItemComponent: StyledYearItem,
|
|
14943
|
+
WeekdayComponent: StyledWeekday
|
|
14944
|
+
},
|
|
14945
|
+
ActionButtonComponent: StyledActionButton
|
|
14788
14946
|
}
|
|
14789
14947
|
);
|
|
14790
14948
|
}
|
|
@@ -14931,7 +15089,9 @@ var DatePickerModalInput = forwardRef(
|
|
|
14931
15089
|
onCancel,
|
|
14932
15090
|
onConfirm,
|
|
14933
15091
|
onModeToggle,
|
|
14934
|
-
className
|
|
15092
|
+
className,
|
|
15093
|
+
scrimClassName,
|
|
15094
|
+
ActionButtonComponent
|
|
14935
15095
|
} = props;
|
|
14936
15096
|
const internalRef = useRef(null);
|
|
14937
15097
|
const ref = forwardedRef ?? internalRef;
|
|
@@ -15090,6 +15250,7 @@ var DatePickerModalInput = forwardRef(
|
|
|
15090
15250
|
headlineId,
|
|
15091
15251
|
onClose: handleClose,
|
|
15092
15252
|
...className ? { className } : {},
|
|
15253
|
+
...scrimClassName ? { scrimClassName } : {},
|
|
15093
15254
|
isOpen: state.isOpen,
|
|
15094
15255
|
children: [
|
|
15095
15256
|
/* @__PURE__ */ jsx(
|
|
@@ -15152,7 +15313,8 @@ var DatePickerModalInput = forwardRef(
|
|
|
15152
15313
|
confirmLabel,
|
|
15153
15314
|
onCancel: handleCancel,
|
|
15154
15315
|
onConfirm: handleConfirm,
|
|
15155
|
-
isConfirmDisabled: !isFormValid
|
|
15316
|
+
isConfirmDisabled: !isFormValid,
|
|
15317
|
+
...ActionButtonComponent ? { ButtonComponent: ActionButtonComponent } : {}
|
|
15156
15318
|
}
|
|
15157
15319
|
)
|
|
15158
15320
|
]
|
|
@@ -15170,6 +15332,7 @@ function ModalInputOverlay({
|
|
|
15170
15332
|
headlineId,
|
|
15171
15333
|
onClose,
|
|
15172
15334
|
className,
|
|
15335
|
+
scrimClassName,
|
|
15173
15336
|
isOpen,
|
|
15174
15337
|
children
|
|
15175
15338
|
}) {
|
|
@@ -15190,7 +15353,7 @@ function ModalInputOverlay({
|
|
|
15190
15353
|
dialogRef
|
|
15191
15354
|
);
|
|
15192
15355
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
15193
|
-
/* @__PURE__ */ jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose }),
|
|
15356
|
+
/* @__PURE__ */ jsx("div", { "data-scrim": true, "aria-hidden": "true", onClick: onClose, className: scrimClassName }),
|
|
15194
15357
|
/* @__PURE__ */ jsx(
|
|
15195
15358
|
"div",
|
|
15196
15359
|
{
|
|
@@ -15208,98 +15371,6 @@ function ModalInputOverlay({
|
|
|
15208
15371
|
] });
|
|
15209
15372
|
}
|
|
15210
15373
|
ModalInputOverlay.displayName = "ModalInputOverlay";
|
|
15211
|
-
var MODAL_INPUT_STYLES = [
|
|
15212
|
-
// ── Container structure ───────────────────────────────────────────────────
|
|
15213
|
-
"[&_[data-modal-dialog]]:bg-surface-container-high",
|
|
15214
|
-
"[&_[data-modal-dialog]]:rounded-3xl",
|
|
15215
|
-
"[&_[data-modal-dialog]]:overflow-hidden",
|
|
15216
|
-
"[&_[data-modal-dialog]]:fixed",
|
|
15217
|
-
"[&_[data-modal-dialog]]:top-1/2",
|
|
15218
|
-
"[&_[data-modal-dialog]]:left-1/2",
|
|
15219
|
-
"[&_[data-modal-dialog]]:-translate-x-1/2",
|
|
15220
|
-
"[&_[data-modal-dialog]]:-translate-y-1/2",
|
|
15221
|
-
"[&_[data-modal-dialog]]:z-50",
|
|
15222
|
-
"[&_[data-modal-dialog]]:w-[328px]",
|
|
15223
|
-
// ── Header ────────────────────────────────────────────────────────────────
|
|
15224
|
-
"[&_[data-modal-header]]:px-6",
|
|
15225
|
-
"[&_[data-modal-header]]:pt-4",
|
|
15226
|
-
"[&_[data-modal-header]]:pb-3",
|
|
15227
|
-
"[&_[data-modal-header]]:flex",
|
|
15228
|
-
"[&_[data-modal-header]]:items-start",
|
|
15229
|
-
"[&_[data-modal-header]]:justify-between",
|
|
15230
|
-
"[&_[data-headline]]:text-label-large",
|
|
15231
|
-
"[&_[data-headline]]:text-on-surface-variant",
|
|
15232
|
-
"[&_[data-headline]]:m-0",
|
|
15233
|
-
"[&_[data-supporting-text]]:text-headline-large",
|
|
15234
|
-
"[&_[data-supporting-text]]:text-on-surface",
|
|
15235
|
-
"[&_[data-supporting-text]]:mt-4",
|
|
15236
|
-
"[&_[data-supporting-text]]:m-0",
|
|
15237
|
-
"[&_[data-mode-toggle]]:w-12",
|
|
15238
|
-
"[&_[data-mode-toggle]]:h-12",
|
|
15239
|
-
"[&_[data-mode-toggle]]:rounded-full",
|
|
15240
|
-
"[&_[data-mode-toggle]]:flex",
|
|
15241
|
-
"[&_[data-mode-toggle]]:items-center",
|
|
15242
|
-
"[&_[data-mode-toggle]]:justify-center",
|
|
15243
|
-
"[&_[data-mode-toggle]]:text-on-surface-variant",
|
|
15244
|
-
"[&_[data-mode-toggle]]:bg-transparent",
|
|
15245
|
-
"[&_[data-mode-toggle]]:border-none",
|
|
15246
|
-
"[&_[data-mode-toggle]]:self-end",
|
|
15247
|
-
"[&_[data-mode-toggle]]:transition-colors",
|
|
15248
|
-
"[&_[data-mode-toggle]]:duration-spring-standard-fast-effects",
|
|
15249
|
-
"[&_[data-mode-toggle]]:ease-spring-standard-fast-effects",
|
|
15250
|
-
"[&_[data-mode-toggle]:hover]:bg-on-surface-variant/8",
|
|
15251
|
-
// ── Divider ───────────────────────────────────────────────────────────────
|
|
15252
|
-
"[&_hr[data-divider]]:border-outline-variant",
|
|
15253
|
-
// ── Date input fields ─────────────────────────────────────────────────────
|
|
15254
|
-
"[&_[data-date-input-field]]:px-6",
|
|
15255
|
-
"[&_[data-date-input-field]]:py-2",
|
|
15256
|
-
"[&_[data-date-input-field]_[data-field]]:flex",
|
|
15257
|
-
"[&_[data-date-input-field]_[data-field]]:items-center",
|
|
15258
|
-
"[&_[data-date-input-field]_[data-field]]:border",
|
|
15259
|
-
"[&_[data-date-input-field]_[data-field]]:border-outline",
|
|
15260
|
-
"[&_[data-date-input-field]_[data-field]]:rounded-sm",
|
|
15261
|
-
"[&_[data-date-input-field]_[data-field]]:px-4",
|
|
15262
|
-
"[&_[data-date-input-field]_[data-field]]:py-3",
|
|
15263
|
-
"[&_[data-date-input-field]_[data-field]]:text-body-large",
|
|
15264
|
-
"[&_[data-date-input-field]_[data-field]]:text-on-surface",
|
|
15265
|
-
"[&_[data-date-input-field]_[data-segment]]:outline-none",
|
|
15266
|
-
"[&_[data-date-input-field]_[data-segment][data-placeholder]]:text-on-surface-variant",
|
|
15267
|
-
"[&_[data-date-input-field][data-focused]_[data-field]]:border-primary",
|
|
15268
|
-
"[&_[data-date-input-field][data-focused]_[data-field]]:border-2",
|
|
15269
|
-
"[&_[data-date-input-field][data-invalid]_[data-field]]:border-error",
|
|
15270
|
-
"[&_[data-date-input-field]_[data-label]]:text-body-small",
|
|
15271
|
-
"[&_[data-date-input-field]_[data-label]]:text-on-surface-variant",
|
|
15272
|
-
"[&_[data-date-input-field]_[data-error-message]]:text-body-small",
|
|
15273
|
-
"[&_[data-date-input-field]_[data-error-message]]:text-error",
|
|
15274
|
-
"[&_[data-date-input-field]_[data-error-message]]:mt-1",
|
|
15275
|
-
// ── Scrim ─────────────────────────────────────────────────────────────────
|
|
15276
|
-
"[&_[data-scrim]]:fixed",
|
|
15277
|
-
"[&_[data-scrim]]:inset-0",
|
|
15278
|
-
"[&_[data-scrim]]:z-40",
|
|
15279
|
-
"[&_[data-scrim]]:bg-scrim",
|
|
15280
|
-
"[&_[data-scrim]]:opacity-32",
|
|
15281
|
-
"[&_[data-scrim]]:transition-opacity",
|
|
15282
|
-
"[&_[data-scrim]]:duration-medium2",
|
|
15283
|
-
"[&_[data-scrim]]:ease-standard",
|
|
15284
|
-
// ── Action buttons ────────────────────────────────────────────────────────
|
|
15285
|
-
"[&_[data-actions]]:flex",
|
|
15286
|
-
"[&_[data-actions]]:items-center",
|
|
15287
|
-
"[&_[data-actions]]:justify-end",
|
|
15288
|
-
"[&_[data-actions]]:gap-2",
|
|
15289
|
-
"[&_[data-actions]]:px-3",
|
|
15290
|
-
"[&_[data-actions]]:py-2",
|
|
15291
|
-
"[&_[data-action]]:text-primary",
|
|
15292
|
-
"[&_[data-action]]:text-label-large",
|
|
15293
|
-
"[&_[data-action]]:rounded-full",
|
|
15294
|
-
"[&_[data-action]]:px-3",
|
|
15295
|
-
"[&_[data-action]]:py-2",
|
|
15296
|
-
"[&_[data-action]]:bg-transparent",
|
|
15297
|
-
"[&_[data-action]]:border-none",
|
|
15298
|
-
"[&_[data-action]]:transition-colors",
|
|
15299
|
-
"[&_[data-action]]:duration-spring-standard-fast-effects",
|
|
15300
|
-
"[&_[data-action]]:ease-spring-standard-fast-effects",
|
|
15301
|
-
"[&_[data-action]:hover]:bg-primary/8"
|
|
15302
|
-
].join(" ");
|
|
15303
15374
|
var DatePickerModalInputStyled = forwardRef(
|
|
15304
15375
|
(props, ref) => {
|
|
15305
15376
|
const { className, ...rest } = props;
|
|
@@ -15309,10 +15380,12 @@ var DatePickerModalInputStyled = forwardRef(
|
|
|
15309
15380
|
ref,
|
|
15310
15381
|
...rest,
|
|
15311
15382
|
className: cn(
|
|
15312
|
-
|
|
15313
|
-
|
|
15383
|
+
modalDialogVariants({ variant: "modal-input" }),
|
|
15384
|
+
MODAL_INPUT_CONTENT_STRUCTURAL,
|
|
15314
15385
|
className
|
|
15315
|
-
)
|
|
15386
|
+
),
|
|
15387
|
+
scrimClassName: cn(scrimVariants2()),
|
|
15388
|
+
ActionButtonComponent: StyledActionButton
|
|
15316
15389
|
}
|
|
15317
15390
|
);
|
|
15318
15391
|
}
|
|
@@ -15423,6 +15496,6 @@ var DateField = forwardRef((props, forwardedRef) => {
|
|
|
15423
15496
|
});
|
|
15424
15497
|
DateField.displayName = "DateField";
|
|
15425
15498
|
|
|
15426
|
-
export { AppBar, AppBarHeadless, Badge, BadgeContent, BadgeHeadless, BottomSheet, BottomSheetContext, BottomSheetHandle, BottomSheetHeadless, Button, ButtonGroup, ButtonGroupContext, ButtonGroupHeadless, CalendarCore, Card, CardActions, CardContent, CardHeader, CardHeadless, CardMedia, Checkbox, Chip, ChipHeadless, ChipSet, DateField, DatePicker, DatePickerDocked, DatePickerModal, DatePickerModalInput, Dialog, DialogActions, DialogContent, DialogContext, DialogHeadless, DialogHeadline, Divider, DividerHeadless, Drawer, DrawerIconOnlyContext, DrawerItem, DrawerSection, FAB, FABHeadless, FABMenu, FABMenuContext, FABMenuHeadless, FABMenuItem, HeadlessDrawer, HeadlessDrawerItem, HeadlessMenu, HeadlessMenuDivider, HeadlessMenuItem, HeadlessMenuSection, HeadlessMenuTrigger, HeadlessNavigationBar, HeadlessNavigationBarItem, HeadlessTab, HeadlessTabList, HeadlessTabPanel, IconButton, IconButtonHeadless, List, ListHeadless, ListItem, ListItemHeadless, ListItemLeading, ListItemText, ListItemTrailing, Menu, MenuContext, MenuDivider, MenuItem, MenuSection, MenuTrigger, NavigationBar, NavigationBarItem, Progress, ProgressHeadless, Radio, RadioGroup, RadioGroupHeadless, RadioHeadless, RichTooltip, STATE_LAYER_OPACITY, Search, SearchBar, SearchBarHeadless, SearchView, SearchViewHeadless, Slider, SliderHeadless, Snackbar, SnackbarContext, SnackbarHeadless, SnackbarProvider, SplitButton, SplitButtonHeadless, Switch, TYPOGRAPHY_ELEMENT_MAP, TYPOGRAPHY_USAGE, Tab, TabList, TabPanel, Tabs, TextField, TimePicker, TimePickerDial, TimePickerInput, Tooltip, TooltipOverlayHeadless, TooltipTrigger, TooltipTriggerHeadless, applyStateLayer, badgeVariants2 as badgeVariants, bottomSheetAnimationVariants, bottomSheetHandlePillVariants, bottomSheetHandleWrapperVariants, bottomSheetScrimVariants, bottomSheetVariants, buttonGroupFocusRingVariants, buttonGroupRootVariants, buttonGroupVariants, calendarCellVariants, cardVariants, chipVariants, clockDialContainerVariants, clockDialNumberVariants, clockHandCenterVariants, clockHandHandleVariants, clockHandTrackVariants, cn,
|
|
15499
|
+
export { AppBar, AppBarHeadless, Badge, BadgeContent, BadgeHeadless, BottomSheet, BottomSheetContext, BottomSheetHandle, BottomSheetHeadless, Button, ButtonGroup, ButtonGroupContext, ButtonGroupHeadless, CalendarCore, Card, CardActions, CardContent, CardHeader, CardHeadless, CardMedia, Checkbox, Chip, ChipHeadless, ChipSet, DateField, DatePicker, DatePickerDocked, DatePickerModal, DatePickerModalInput, Dialog, DialogActions, DialogContent, DialogContext, DialogHeadless, DialogHeadline, Divider, DividerHeadless, Drawer, DrawerIconOnlyContext, DrawerItem, DrawerSection, FAB, FABHeadless, FABMenu, FABMenuContext, FABMenuHeadless, FABMenuItem, HeadlessDrawer, HeadlessDrawerItem, HeadlessMenu, HeadlessMenuDivider, HeadlessMenuItem, HeadlessMenuSection, HeadlessMenuTrigger, HeadlessNavigationBar, HeadlessNavigationBarItem, HeadlessTab, HeadlessTabList, HeadlessTabPanel, IconButton, IconButtonHeadless, List, ListHeadless, ListItem, ListItemHeadless, ListItemLeading, ListItemText, ListItemTrailing, Menu, MenuContext, MenuDivider, MenuItem, MenuSection, MenuTrigger, NavigationBar, NavigationBarItem, Progress, ProgressHeadless, Radio, RadioGroup, RadioGroupHeadless, RadioHeadless, RichTooltip, STATE_LAYER_OPACITY, Search, SearchBar, SearchBarHeadless, SearchView, SearchViewHeadless, Slider, SliderHeadless, Snackbar, SnackbarContext, SnackbarHeadless, SnackbarProvider, SplitButton, SplitButtonHeadless, StyledActionButton, StyledCalendarCell, StyledCalendarTitle, StyledNavButton, StyledWeekday, StyledYearItem, Switch, TYPOGRAPHY_ELEMENT_MAP, TYPOGRAPHY_USAGE, Tab, TabList, TabPanel, Tabs, TextField, TimePicker, TimePickerDial, TimePickerInput, Tooltip, TooltipOverlayHeadless, TooltipTrigger, TooltipTriggerHeadless, actionButtonFocusRingVariants, actionButtonStateLayerVariants, actionButtonVariants, actionRowVariants, applyStateLayer, badgeVariants2 as badgeVariants, bottomSheetAnimationVariants, bottomSheetHandlePillVariants, bottomSheetHandleWrapperVariants, bottomSheetScrimVariants, bottomSheetVariants, buttonGroupFocusRingVariants, buttonGroupRootVariants, buttonGroupVariants, calendarCellFocusRingVariants, calendarCellStateLayerVariants, calendarCellVariants, calendarDividerVariants, calendarHeaderVariants, calendarTitleIconVariants, calendarTitleStateLayerVariants, calendarTitleTextVariants, calendarTitleVariants, cardVariants, chipVariants, clockDialContainerVariants, clockDialNumberVariants, clockHandCenterVariants, clockHandHandleVariants, clockHandTrackVariants, cn, dateFieldVariants, dateInputErrorVariants, dateInputFieldGroupVariants, dateInputFieldVariants, dateInputLabelVariants, datePickerContainerVariants, dateSegmentPlaceholderVariants, dividerVariants, dockedFieldGroupVariants, dockedLabelVariants, dockedTriggerStateLayerVariants, dockedTriggerVariants, fabMenuItemFocusRingVariants, fabMenuItemIconVariants, fabMenuItemLabelVariants, fabMenuItemStateLayerVariants, fabMenuItemVariants, fabMenuListVariants, fabMenuVariants, generateMD3Theme, getColorValue, getConnectedRadiusClasses, getFontFamily, getMD3Color, getResponsiveTypography, getTypographyClassName, getTypographyForElement, getTypographyStyle, getTypographyToken, headlineVariants, hexToRgb, listItemVariants, listVariants, modalDialogVariants, modalHeaderVariants, modeToggleStateLayerVariants, modeToggleVariants, navButtonFocusRingVariants, navButtonStateLayerVariants, navButtonVariants, periodSelectorContainerVariants, periodSelectorItemVariants, popoverVariants, pxToRem, remToPx, rgbToHex, richTooltipVariants, scrimVariants2 as scrimVariants, searchBarVariants, searchViewHeaderVariants, searchViewVariants, sliderActiveTrackVariants, sliderContainerVariants, sliderHandleStateLayerVariants, sliderHandleVariants, sliderInactiveTrackVariants, sliderTrackLayoutVariants, splitButtonContainerVariants, splitButtonDropdownVariants, splitButtonPrimaryVariants, splitButtonVariants, supportingTextVariants, timeInputFieldVariants, timePickerActionButtonVariants, timePickerActionRowVariants, timePickerContainerVariants, timePickerHeadlineVariants, timePickerModeToggleVariants, timeSelectorContainerVariants, timeSeparatorVariants, tooltipVariants, truncateText, useBottomSheetContext, useBottomSheetDrag, useButtonGroup, useDialogContext, useFABMenuContext, useMenuContext, useOptionalButtonGroup, useSnackbar, weekdayVariants, withOpacity, yearGridVariants, yearItemFocusRingVariants, yearItemStateLayerVariants, yearItemVariants };
|
|
15427
15500
|
//# sourceMappingURL=index.js.map
|
|
15428
15501
|
//# sourceMappingURL=index.js.map
|