@kanso-labs/kanso-ui 0.45.20 → 0.45.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calendar/index.js +119 -11
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/styles.js +19 -1
- package/dist/calendar/styles.js.map +1 -1
- package/dist/components/app-bar/index.d.ts +8 -2
- package/dist/components/app-bar/index.js +123 -73
- package/dist/components/app-bar/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +3 -3
- package/dist/components/calendar/index.js +8 -19
- package/dist/components/calendar/index.js.map +1 -1
- package/dist/components/carousel/index.d.ts +22 -3
- package/dist/components/carousel/index.js +26 -14
- package/dist/components/carousel/index.js.map +1 -1
- package/dist/components/chip-group/index.js +3 -0
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/color-picker/index.js +64 -46
- package/dist/components/color-picker/index.js.map +1 -1
- package/dist/components/color-swatch/index.js +20 -16
- package/dist/components/color-swatch/index.js.map +1 -1
- package/dist/components/copy-field/index.js +1 -0
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/date-range-picker/index.js +165 -81
- package/dist/components/date-range-picker/index.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/popover/index.js +14 -4
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/range-calendar/index.js +53 -80
- package/dist/components/range-calendar/index.js.map +1 -1
- package/dist/components/segmented-button/index.js +261 -145
- package/dist/components/segmented-button/index.js.map +1 -1
- package/dist/components/sheet/index.js +149 -82
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/table/index.js +251 -123
- package/dist/components/table/index.js.map +1 -1
- package/dist/hooks/useRipple.js +3 -2
- package/dist/hooks/useRipple.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/segments/index.js +2 -1
- package/dist/segments/index.js.map +1 -1
- package/dist/segments/styles.js +5 -1
- package/dist/segments/styles.js.map +1 -1
- package/dist/styles/focus.js.map +1 -1
- package/dist/styles.css +40 -8
- package/dist/swatch/index.js +19 -0
- package/dist/swatch/index.js.map +1 -0
- package/package.json +3 -3
package/dist/calendar/index.js
CHANGED
|
@@ -2,12 +2,14 @@ import { props } from "../node_modules/@stylexjs/stylex/lib/es/stylex.js";
|
|
|
2
2
|
import { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from "../glyphs/index.js";
|
|
3
3
|
import { focus } from "../styles/focus.js";
|
|
4
4
|
import { iconButton } from "../styles/icon-button.js";
|
|
5
|
+
import { monthOffsets } from "./months.js";
|
|
5
6
|
import { calendarStyles, dateLayers, menuLayers } from "./styles.js";
|
|
6
7
|
import { c } from "react/compiler-runtime";
|
|
7
8
|
import { useContext, useId, useRef, useState } from "react";
|
|
8
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
-
import { Button, ButtonContext, CalendarGridHeader, CalendarHeaderCell, CalendarMonthPicker, CalendarStateContext, CalendarYearPicker, Heading, ListBox, ListBoxItem, RangeCalendarStateContext } from "react-aria-components";
|
|
10
|
+
import { Button, ButtonContext, CalendarGrid, CalendarGridBody, CalendarGridHeader, CalendarHeaderCell, CalendarMonthPicker, CalendarStateContext, CalendarYearPicker, Heading, ListBox, ListBoxItem, RangeCalendarStateContext } from "react-aria-components";
|
|
10
11
|
import { endOfMonth, startOfMonth } from "@internationalized/date";
|
|
12
|
+
import { useDateFormatter } from "react-aria";
|
|
11
13
|
// src/calendar/index.tsx
|
|
12
14
|
const LISTED_YEARS = 201;
|
|
13
15
|
/**
|
|
@@ -350,6 +352,75 @@ function CalendarMenus(t0) {
|
|
|
350
352
|
return t22;
|
|
351
353
|
}
|
|
352
354
|
/**
|
|
355
|
+
* The month grids, one per visible month, each with the weekday row over
|
|
356
|
+
* its dates. React Aria positions each grid from its own offset, so
|
|
357
|
+
* `visibleDuration` of more than one draws the months side by side rather
|
|
358
|
+
* than one grid that scrolls between them, and stacks them below the
|
|
359
|
+
* expanded breakpoint. Stacked, each month is named over its grid by
|
|
360
|
+
* `MonthCaption`, since the heading above them all names the range as a
|
|
361
|
+
* whole; see `monthCaption` in ./styles.ts.
|
|
362
|
+
*
|
|
363
|
+
* The date's cell is the one thing the two calendars draw differently, so it
|
|
364
|
+
* is the child.
|
|
365
|
+
*/
|
|
366
|
+
function _temp3(entry_0) {
|
|
367
|
+
return entry_0.id;
|
|
368
|
+
}
|
|
369
|
+
function _temp2(current_0) {
|
|
370
|
+
return current_0 === "year" ? null : "year";
|
|
371
|
+
}
|
|
372
|
+
function _temp(current) {
|
|
373
|
+
return current === "month" ? null : "month";
|
|
374
|
+
}
|
|
375
|
+
function CalendarMonths(t0) {
|
|
376
|
+
const $ = c(12);
|
|
377
|
+
const { children, months } = t0;
|
|
378
|
+
let t1;
|
|
379
|
+
let t2;
|
|
380
|
+
if ($[0] !== children || $[1] !== months) {
|
|
381
|
+
const offsets = monthOffsets(months);
|
|
382
|
+
const isStackable = offsets.length > 1;
|
|
383
|
+
if ($[4] !== isStackable) {
|
|
384
|
+
t1 = props(calendarStyles.months, isStackable && calendarStyles.monthsStacked);
|
|
385
|
+
$[4] = isStackable;
|
|
386
|
+
$[5] = t1;
|
|
387
|
+
} else t1 = $[5];
|
|
388
|
+
let t3;
|
|
389
|
+
if ($[6] !== children || $[7] !== isStackable) {
|
|
390
|
+
t3 = (offset) => /* @__PURE__ */ jsxs("div", {
|
|
391
|
+
...props(calendarStyles.month),
|
|
392
|
+
children: [isStackable ? /* @__PURE__ */ jsx(MonthCaption, { offset }) : null, /* @__PURE__ */ jsxs(CalendarGrid, {
|
|
393
|
+
offset,
|
|
394
|
+
...props(calendarStyles.grid),
|
|
395
|
+
children: [/* @__PURE__ */ jsx(CalendarGridHeader$1, {}), /* @__PURE__ */ jsx(CalendarGridBody, { children })]
|
|
396
|
+
})]
|
|
397
|
+
}, offset.months);
|
|
398
|
+
$[6] = children;
|
|
399
|
+
$[7] = isStackable;
|
|
400
|
+
$[8] = t3;
|
|
401
|
+
} else t3 = $[8];
|
|
402
|
+
t2 = offsets.map(t3);
|
|
403
|
+
$[0] = children;
|
|
404
|
+
$[1] = months;
|
|
405
|
+
$[2] = t1;
|
|
406
|
+
$[3] = t2;
|
|
407
|
+
} else {
|
|
408
|
+
t1 = $[2];
|
|
409
|
+
t2 = $[3];
|
|
410
|
+
}
|
|
411
|
+
let t3;
|
|
412
|
+
if ($[9] !== t1 || $[10] !== t2) {
|
|
413
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
414
|
+
...t1,
|
|
415
|
+
children: t2
|
|
416
|
+
});
|
|
417
|
+
$[9] = t1;
|
|
418
|
+
$[10] = t2;
|
|
419
|
+
$[11] = t3;
|
|
420
|
+
} else t3 = $[11];
|
|
421
|
+
return t3;
|
|
422
|
+
}
|
|
423
|
+
/**
|
|
353
424
|
* Scrolls an open list so its checked entry sits in the middle, as the page
|
|
354
425
|
* draws it, with the entries either side of it in view. React Aria scrolls
|
|
355
426
|
* the entry it focuses only as far as the nearest edge, which left the year
|
|
@@ -365,15 +436,6 @@ function CalendarMenus(t0) {
|
|
|
365
436
|
* list — React Aria renders its entries once out of the document to collect
|
|
366
437
|
* them — finds no list and does nothing.
|
|
367
438
|
*/
|
|
368
|
-
function _temp3(entry_0) {
|
|
369
|
-
return entry_0.id;
|
|
370
|
-
}
|
|
371
|
-
function _temp2(current_0) {
|
|
372
|
-
return current_0 === "year" ? null : "year";
|
|
373
|
-
}
|
|
374
|
-
function _temp(current) {
|
|
375
|
-
return current === "month" ? null : "month";
|
|
376
|
-
}
|
|
377
439
|
function centreInList(check) {
|
|
378
440
|
const entry = check?.closest("[role=\"option\"]");
|
|
379
441
|
const list = check?.closest("[role=\"listbox\"]");
|
|
@@ -577,6 +639,52 @@ function MenuList(t0) {
|
|
|
577
639
|
} else t6 = $[12];
|
|
578
640
|
return t6;
|
|
579
641
|
}
|
|
580
|
-
|
|
642
|
+
/**
|
|
643
|
+
* The name of the month a grid shows, over the grid, for a calendar drawing
|
|
644
|
+
* more than one. It is formatted as React Aria names the grid itself — the
|
|
645
|
+
* month in full and the year, in the calendar system and time zone the
|
|
646
|
+
* calendar runs in, with the era where a Gregorian date falls before the
|
|
647
|
+
* common one — so the two say the same thing.
|
|
648
|
+
*
|
|
649
|
+
* Hidden from assistive technology, which hears the same name already: React
|
|
650
|
+
* Aria labels every grid with the calendar's name and its own month.
|
|
651
|
+
*/
|
|
652
|
+
function MonthCaption(t0) {
|
|
653
|
+
const $ = c(4);
|
|
654
|
+
const { offset } = t0;
|
|
655
|
+
const single = useContext(CalendarStateContext);
|
|
656
|
+
const range = useContext(RangeCalendarStateContext);
|
|
657
|
+
const state = single ?? range;
|
|
658
|
+
const start = state?.visibleRange.start.add(offset);
|
|
659
|
+
const formatter = useDateFormatter({
|
|
660
|
+
calendar: start?.calendar.identifier,
|
|
661
|
+
era: start?.calendar.identifier === "gregory" && start.era === "BC" ? "short" : void 0,
|
|
662
|
+
month: "long",
|
|
663
|
+
timeZone: state?.timeZone,
|
|
664
|
+
year: "numeric"
|
|
665
|
+
});
|
|
666
|
+
if (state == null || start == null) return null;
|
|
667
|
+
const month = start.calendar.getFormattableMonth?.(start) ?? start;
|
|
668
|
+
const t1 = true;
|
|
669
|
+
let t2;
|
|
670
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
671
|
+
t2 = props(calendarStyles.monthCaption);
|
|
672
|
+
$[0] = t2;
|
|
673
|
+
} else t2 = $[0];
|
|
674
|
+
const t3 = formatter.format(month.toDate(state.timeZone));
|
|
675
|
+
let t4;
|
|
676
|
+
if ($[1] !== t2 || $[2] !== t3) {
|
|
677
|
+
t4 = /* @__PURE__ */ jsx("div", {
|
|
678
|
+
"aria-hidden": t1,
|
|
679
|
+
...t2,
|
|
680
|
+
children: t3
|
|
681
|
+
});
|
|
682
|
+
$[1] = t2;
|
|
683
|
+
$[2] = t3;
|
|
684
|
+
$[3] = t4;
|
|
685
|
+
} else t4 = $[3];
|
|
686
|
+
return t4;
|
|
687
|
+
}
|
|
688
|
+
export { CalendarFrame, CalendarMonths };
|
|
581
689
|
|
|
582
690
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CalendarDate","ReactElement","ReactNode","Ref","Key","Selection","endOfMonth","startOfMonth","stylex","useCallback","useContext","useId","useMemo","useRef","useState","ButtonContext","CalendarStateContext","Button","RACButton","CalendarGridHeader","RACCalendarGridHeader","CalendarHeaderCell","RACCalendarHeaderCell","CalendarMonthPicker","RACCalendarMonthPicker","CalendarYearPicker","RACCalendarYearPicker","Heading","RACHeading","ListBox","RACListBox","ListBoxItem","RACListBoxItem","RangeCalendarStateContext","ArrowDropDownGlyph","CheckGlyph","ChevronEndGlyph","focus","iconButton","calendarStyles","dateLayers","menuLayers","MenuEntry","date","formatted","id","MenuPicker","items","onChange","key","value","OpenMenu","LISTED_YEARS","CalendarFrame","t0","$","_c","children","months","showMonthYearMenus","t1","Symbol","for","t2","single","range","isDisabled","disabledHeaderCell","calendarHeaderCell","CalendarHeader","props","header","chevronClassName","chevronGlyph","chevronGlyphPrevious","heading","t3","day","headerCell","CalendarMenus","state","open","setOpen","listId","monthButton","yearButton","button","requestAnimationFrame","current","close","_temp","toggleMonth","_temp2","toggleYear","t4","picker","filter","entry","maxValue","compare","minValue","map","_temp3","outsideBounds","t5","t6","headerGroup","t7","t8","chevronClassNameWhile","t9","t10","t11","picker_0","t12","t13","t14","t15","t16","t17","picker_1","t18","t19","t20","picker_2","t21","picker_3","t22","entry_0","current_0","centreInList","check","SVGSVGElement","closest","list","HTMLElement","scrollTop","getBoundingClientRect","top","clientHeight","offsetHeight","isHovered","isPressed","isHidden","chrome","chevron","ring","chromeHovered","chromePressed","chromeDisabled","chevronHidden","className","isListOpen","headerCellDisabled","MenuButton","controls","isExpanded","onPress","ref","valueId","nameId","find","shown","undefined","menuArrow","menuArrowExpanded","menuButtonClassName","menuButton","menuEntry","menuItemClassName","menuEntryContent","label","isSelected","menuCheck","isFocusVisible","menuItem","menuItemSelected","selectedHovered","plainHovered","selectedPressed","plainPressed","menuItemFocused","menuItemDisabled","MenuList","disabledKeys","onClose","selected","keys","choose","menuList","_c","CalendarGridHeader","RACCalendarGridHeader","stylex.props","RACButton","RACHeading","RACCalendarMonthPicker","RACCalendarYearPicker","RACCalendarHeaderCell","RACListBoxItem","RACListBox"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { CalendarDate } from '@internationalized/date';\nimport type { ReactElement, ReactNode, Ref } from 'react';\nimport type { Key, Selection } from 'react-aria-components';\nimport { endOfMonth, startOfMonth } from '@internationalized/date';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useContext, useId, useMemo, useRef, useState } from 'react';\nimport { ButtonContext, CalendarStateContext, Button as RACButton, CalendarGridHeader as RACCalendarGridHeader, CalendarHeaderCell as RACCalendarHeaderCell, CalendarMonthPicker as RACCalendarMonthPicker, CalendarYearPicker as RACCalendarYearPicker, Heading as RACHeading, ListBox as RACListBox, ListBoxItem as RACListBoxItem, RangeCalendarStateContext } from 'react-aria-components';\nimport { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from '../glyphs';\nimport { focus } from '../styles/focus';\nimport { iconButton } from '../styles/icon-button';\nimport { calendarStyles, dateLayers, menuLayers } from './styles';\n\n// The parts Calendar and RangeCalendar both render: the row that moves the\n// month, the weekday header, and the offsets that put more than one month\n// side by side. Apart from either component so the two cannot drift, and\n// outside `src/components` for the reason ./styles.ts gives.\n\n/** One entry of React Aria's month or year picker, as either lists it. */\ntype MenuEntry = {\n date: CalendarDate;\n formatted: string;\n id: number;\n};\n\n/** What React Aria's month and year pickers hand the element they render. */\ntype MenuPicker = {\n 'aria-label': string;\n items: MenuEntry[];\n onChange: (key: Key | null) => void;\n value: Key;\n};\ntype OpenMenu = 'month' | 'year';\n\n// How many years the open year list holds: a century either side of the year\n// shown, and that year. Material Design's own list scrolls a whole range of\n// years rather than a window that moves with each choice, and Compose's\n// default range is two centuries. Bounds cut it short where they fall inside.\nconst LISTED_YEARS = 201;\n\n/**\n * What a calendar draws above its months, and the months themselves. With\n * `showMonthYearMenus` the header is the date pickers page's docked one —\n * the month and the year as menu buttons — and while either is open its list\n * takes the months' place.\n *\n * The menus are for one visible month. They name and pick the first month\n * alone, so a second grid beside it would have no visible month or year of\n * its own; with more than one month the header is the plain one, whose\n * heading names the whole range, both years included where it spans two.\n */\nfunction CalendarFrame({\n children,\n months,\n showMonthYearMenus\n}: {\n children: ReactNode;\n /** How many months the calendar shows side by side. */\n months: number;\n showMonthYearMenus: boolean;\n}): ReactElement {\n if (showMonthYearMenus && months <= 1) {\n return <CalendarMenus>{children}</CalendarMenus>;\n }\n return <>\n <CalendarHeader />\n {children}\n </>;\n}\n\n/**\n * The weekday row, faded with the rest of a calendar that is disabled. The\n * state comes from React Aria's context rather than a prop, so the two\n * calendars draw it the same way without either passing anything down.\n *\n * The narrow letters are for the eye alone. React Aria hides the row from\n * assistive technology, since every date's name opens with its weekday in\n * full, so a letter that two days share is never read out.\n */\nfunction CalendarGridHeader(): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const isDisabled = (single ?? range)?.isDisabled ?? false;\n return <RACCalendarGridHeader>\n {isDisabled ? disabledHeaderCell : calendarHeaderCell}\n </RACCalendarGridHeader>;\n}\n\n/**\n * The two chevrons with the month between them. React Aria wires\n * `slot=\"previous\"` and `slot=\"next\"` on its own `Button`, and `IconButton`\n * renders React Aria's `Button` too — so nesting one inside a slot would put\n * two buttons where the date pickers page draws one. The chevrons take the\n * icon buttons page's 40dp square and its state layer instead.\n *\n * A plain element rather than a `<header>`: a header is a banner landmark,\n * landmarks may not nest, and React Aria puts a calendar in\n * `role=\"application\"` — axe fails the page on it.\n *\n * React Aria hides the heading between the chevrons from assistive\n * technology. The one a reader reaches is React Aria's own, out of sight,\n * naming the calendar's label with the month, so a calendar adds one heading\n * to the page's outline rather than two.\n */\nfunction CalendarHeader(): ReactElement {\n return <div {...stylex.props(calendarStyles.header)}>\n <RACButton className={chevronClassName} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACHeading {...stylex.props(calendarStyles.heading)} />\n <RACButton className={chevronClassName} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>;\n}\n\n/** The weekday row, in the type the page gives both it and the dates. */\nfunction calendarHeaderCell(day: string): ReactElement {\n return headerCell(day, false);\n}\n\n/**\n * The docked header: the month's menu button between the chevrons that step\n * it, and the year's menu button at the end. A press opens the button's list\n * in the months' place, where the page draws it, rather than in a popover over\n * them; a calendar inside a picker is already in one. While a list is open\n * the chevrons are hidden and the other menu is disabled, as the page draws\n * them, and choosing an entry — or pressing the one already checked, or\n * Escape — closes the list and puts focus back on its button.\n *\n * The lists are React Aria's month and year pickers, rendered twice: the\n * header names the month short, as the page's button does, and the list in\n * full. The year list runs a century either side of the year shown — React\n * Aria's own default is ten, which took several passes through the list to\n * reach a date of birth — and `minValue` and `maxValue` cut it short, which\n * React Aria does itself. A month with no day inside them is disabled here.\n */\nfunction CalendarMenus({\n children\n}: {\n children: ReactNode;\n}): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const state = single ?? range;\n const [open, setOpen] = useState<null | OpenMenu>(null);\n const listId = useId();\n const monthButton = useRef<HTMLButtonElement>(null);\n const yearButton = useRef<HTMLButtonElement>(null);\n\n // A frame after the choice, and focus back on the button before the list\n // goes, rather than lost with it. The key that chose still has a keypress\n // to deliver: React Aria leaves Enter's default alone on a Mac, and with\n // focus already moved the keypress pressed the menu button and opened the\n // list again. A frame later it has landed on the list instead, as the\n // click after a pointer's choice has.\n const close = useCallback(() => {\n const button = open === 'month' ? monthButton : yearButton;\n requestAnimationFrame(() => {\n button.current?.focus();\n setOpen(null);\n });\n }, [open]);\n const toggleMonth = useCallback(() => {\n setOpen(current => current === 'month' ? null : 'month');\n }, []);\n const toggleYear = useCallback(() => {\n setOpen(current => current === 'year' ? null : 'year');\n }, []);\n const isDisabled = state?.isDisabled ?? false;\n const outsideBounds = (picker: MenuPicker) => picker.items.filter(entry => state?.maxValue != null && startOfMonth(entry.date).compare(state.maxValue) > 0 || state?.minValue != null && endOfMonth(entry.date).compare(state.minValue) < 0).map(entry => entry.id);\n return <>\n <div {...stylex.props(calendarStyles.header)}>\n <div {...stylex.props(calendarStyles.headerGroup)}>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACCalendarMonthPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'year'} isExpanded={open === 'month'} onPress={toggleMonth} picker={picker} ref={monthButton} />}\n </RACCalendarMonthPicker>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>\n <RACCalendarYearPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'month'} isExpanded={open === 'year'} onPress={toggleYear} picker={picker} ref={yearButton} />}\n </RACCalendarYearPicker>\n </div>\n {open === null ? children : null}\n {open === 'month' ? <RACCalendarMonthPicker format=\"long\">\n {picker => <MenuList disabledKeys={outsideBounds(picker)} id={listId} onClose={close} picker={picker} />}\n </RACCalendarMonthPicker> : null}\n {open === 'year' ? <RACCalendarYearPicker visibleYears={LISTED_YEARS}>\n {picker => <MenuList id={listId} onClose={close} picker={picker} />}\n </RACCalendarYearPicker> : null}\n </>;\n}\n\n/**\n * Scrolls an open list so its checked entry sits in the middle, as the page\n * draws it, with the entries either side of it in view. React Aria scrolls\n * the entry it focuses only as far as the nearest edge, which left the year\n * shown at the bottom with every later year out of sight; with it already\n * centred, that scroll has nothing to do.\n *\n * A ref on the checked entry's check rather than an effect on the list,\n * because React Aria builds its entries in a render of its own, after the\n * list's effects have run: the ref is called as the entry is attached,\n * before the first paint, so the list never draws a frame at its top and\n * then jumps. The list's own scroll alone moves, where `scrollIntoView` would\n * move the page around it too. A check rendered anywhere but an attached\n * list — React Aria renders its entries once out of the document to collect\n * them — finds no list and does nothing.\n */\nfunction centreInList(check: null | SVGSVGElement) {\n const entry = check?.closest('[role=\"option\"]');\n const list = check?.closest('[role=\"listbox\"]');\n if (!(entry instanceof HTMLElement) || !(list instanceof HTMLElement)) {\n return;\n }\n list.scrollTop += entry.getBoundingClientRect().top - list.getBoundingClientRect().top - (list.clientHeight - entry.offsetHeight) / 2;\n}\n\n// A chevron's classes, from React Aria's own render state. React Aria\n// disables one when the month it would move to is outside `minValue` and\n// `maxValue`, or the whole calendar is disabled, and a press on it then does\n// nothing — so it takes the shared fade, which drops the state layer too.\nfunction chevronClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}, isHidden = false) {\n return stylex.props(iconButton.chrome, calendarStyles.chevron, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled, isHidden && calendarStyles.chevronHidden).className ?? '';\n}\n\n// The same, hidden while a month or year list is open.\nfunction chevronClassNameWhile(isListOpen: boolean) {\n return (state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => chevronClassName(state, isListOpen);\n}\n\n// A weekday in a disabled calendar, at the fade its dates take.\nfunction disabledHeaderCell(day: string): ReactElement {\n return headerCell(day, true);\n}\nfunction headerCell(day: string, isDisabled: boolean): ReactElement {\n return <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell, isDisabled && calendarStyles.headerCellDisabled)}>\n {day}\n </RACCalendarHeaderCell>;\n}\n\n/**\n * The month or the year as the page's menu button, opening its list. Named\n * by what it shows and then by what it is — \"Sep month\" — which keeps the\n * visible text the start of the name, so a reader who says what they see\n * reaches it.\n *\n * Outside React Aria's button context, which a calendar fills with its\n * `previous` and `next` slots alone: a button with no slot inside it is an\n * error, and these are not either chevron.\n */\nfunction MenuButton({\n controls,\n isDisabled,\n isExpanded,\n onPress,\n picker,\n ref\n}: {\n controls: string;\n isDisabled: boolean;\n isExpanded: boolean;\n onPress: () => void;\n picker: MenuPicker;\n ref: Ref<HTMLButtonElement>;\n}): ReactElement {\n const valueId = useId();\n const nameId = useId();\n const shown = picker.items.find(entry => entry.id === picker.value);\n return <ButtonContext value={null}>\n <RACButton aria-controls={isExpanded ? controls : undefined} aria-expanded={isExpanded} aria-haspopup=\"listbox\" aria-labelledby={`${valueId} ${nameId}`} className={menuButtonClassName} isDisabled={isDisabled} onPress={onPress} ref={ref}>\n <span id={valueId}>{shown?.formatted}</span>\n <span hidden id={nameId}>\n {picker['aria-label']}\n </span>\n <ArrowDropDownGlyph {...stylex.props(calendarStyles.menuArrow, isExpanded && calendarStyles.menuArrowExpanded)} />\n </RACButton>\n </ButtonContext>;\n}\n\n// A menu button's classes, from React Aria's render state, with the icon\n// buttons' state layers and fade — see `menuButton`.\nfunction menuButtonClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}) {\n return stylex.props(calendarStyles.menuButton, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled).className ?? '';\n}\n\n// One row of an open list: the check where the row is the one shown, the\n// room it takes where it is not, then the month or the year. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after.\nfunction menuEntry(entry: MenuEntry): ReactElement {\n return <RACListBoxItem className={menuItemClassName} id={entry.id} textValue={entry.formatted}>\n {menuEntryContent(entry.formatted)}\n </RACListBoxItem>;\n}\nfunction menuEntryContent(label: string) {\n return ({\n isSelected\n }: {\n isSelected: boolean;\n }) => <>\n {isSelected ? <CheckGlyph ref={centreInList} {...stylex.props(calendarStyles.menuCheck)} /> : <span {...stylex.props(calendarStyles.menuCheck)} />}\n {label}\n </>;\n}\n\n// A row's classes, from React Aria's render state. The layers come after the\n// checked row's surface variant, written for whichever ground the row has,\n// and the fade last, which StyleX lets drop them by replacing a property\n// whole.\nfunction menuItemClassName(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n}) {\n return stylex.props(calendarStyles.menuItem, state.isSelected && calendarStyles.menuItemSelected, state.isHovered && (state.isSelected ? menuLayers.selectedHovered : dateLayers.plainHovered), state.isPressed && (state.isSelected ? menuLayers.selectedPressed : dateLayers.plainPressed), state.isFocusVisible && calendarStyles.menuItemFocused, state.isDisabled && calendarStyles.menuItemDisabled).className ?? '';\n}\n\n/**\n * An open month or year list, in the months' place. React Aria's list box,\n * with the entry the calendar shows selected and focused when it opens.\n *\n * Choosing closes it, and so does pressing the checked entry or Escape. A\n * single selection that may empty is what tells those apart: choosing\n * replaces the selection, while the checked entry toggles it off and Escape\n * clears it — and the clearing is what stops Escape there rather than letting\n * it close a picker's dialog around the calendar.\n */\nfunction MenuList({\n disabledKeys,\n id,\n onClose,\n picker\n}: {\n disabledKeys?: Key[];\n id: string;\n onClose: () => void;\n picker: MenuPicker;\n}): ReactElement {\n const selected = useMemo(() => [picker.value], [picker.value]);\n const choose = useCallback((keys: Selection) => {\n // The one entry a single selection holds after a choice, and none\n // after the checked entry is pressed again or Escape clears it.\n if (keys !== 'all') {\n for (const key of keys) {\n picker.onChange(key);\n }\n }\n onClose();\n }, [onClose, picker]);\n return <RACListBox aria-label={picker['aria-label']}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a list opened from its button takes focus, as a select's does\n autoFocus disabledKeys={disabledKeys} id={id} items={picker.items} onSelectionChange={choose} selectedKeys={selected} selectionMode=\"single\"\n // On the release rather than the press, so the pointer is done with the\n // list before it closes: chosen on the press, the release landed on\n // whatever the closing list uncovered beneath it.\n shouldSelectOnPressUp {...stylex.props(calendarStyles.menuList)}>\n {menuEntry}\n </RACListBox>;\n}\nexport { CalendarFrame, C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AAA,KAAAV;EAAAU,EAAA,KAAAwC,OAAAhD;EAAAQ,EAAA,MAAAmI;EAAAnI,EAAA,MAAAqB;EAAArB,EAAA,MAAAkD;CAAA,OAAAA,KAAAlD,EAAA;CAAA,OARRkD;AAQQ"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CalendarDate","ReactElement","ReactNode","Ref","Key","Selection","endOfMonth","startOfMonth","stylex","useCallback","useContext","useId","useMemo","useRef","useState","useDateFormatter","ButtonContext","CalendarStateContext","Button","RACButton","CalendarGrid","RACCalendarGrid","CalendarGridBody","RACCalendarGridBody","CalendarGridHeader","RACCalendarGridHeader","CalendarHeaderCell","RACCalendarHeaderCell","CalendarMonthPicker","RACCalendarMonthPicker","CalendarYearPicker","RACCalendarYearPicker","Heading","RACHeading","ListBox","RACListBox","ListBoxItem","RACListBoxItem","RangeCalendarStateContext","ArrowDropDownGlyph","CheckGlyph","ChevronEndGlyph","focus","iconButton","monthOffsets","calendarStyles","dateLayers","menuLayers","MenuEntry","date","formatted","id","MenuPicker","items","onChange","key","value","OpenMenu","LISTED_YEARS","CalendarFrame","t0","$","_c","children","months","showMonthYearMenus","t1","Symbol","for","t2","single","range","isDisabled","disabledHeaderCell","calendarHeaderCell","CalendarHeader","props","header","chevronClassName","chevronGlyph","chevronGlyphPrevious","heading","t3","day","headerCell","CalendarMenus","state","open","setOpen","listId","monthButton","yearButton","button","requestAnimationFrame","current","close","_temp","toggleMonth","_temp2","toggleYear","t4","picker","filter","entry","maxValue","compare","minValue","map","_temp3","outsideBounds","t5","t6","headerGroup","t7","t8","chevronClassNameWhile","t9","t10","t11","picker_0","t12","t13","t14","t15","t16","t17","picker_1","t18","t19","t20","picker_2","t21","picker_3","t22","entry_0","current_0","CalendarMonths","offsets","isStackable","length","monthsStacked","offset","month","grid","centreInList","check","SVGSVGElement","closest","list","HTMLElement","scrollTop","getBoundingClientRect","top","clientHeight","offsetHeight","isHovered","isPressed","isHidden","chrome","chevron","ring","chromeHovered","chromePressed","chromeDisabled","chevronHidden","className","isListOpen","headerCellDisabled","MenuButton","controls","isExpanded","onPress","ref","valueId","nameId","find","shown","undefined","menuArrow","menuArrowExpanded","menuButtonClassName","menuButton","menuEntry","menuItemClassName","menuEntryContent","label","isSelected","menuCheck","isFocusVisible","menuItem","menuItemSelected","selectedHovered","plainHovered","selectedPressed","plainPressed","menuItemFocused","menuItemDisabled","MenuList","disabledKeys","onClose","selected","keys","choose","menuList","MonthCaption","start","visibleRange","add","formatter","calendar","identifier","era","timeZone","year","getFormattableMonth","monthCaption","format","toDate","_c","CalendarGridHeader","RACCalendarGridHeader","stylex.props","RACButton","RACHeading","RACCalendarMonthPicker","RACCalendarYearPicker","RACCalendarGrid","RACCalendarGridBody","RACCalendarHeaderCell","RACListBoxItem","RACListBox"],"sources":["../../src/calendar/index.tsx"],"sourcesContent":["import type { CalendarDate } from '@internationalized/date';\nimport type { ReactElement, ReactNode, Ref } from 'react';\nimport type { Key, Selection } from 'react-aria-components';\nimport { endOfMonth, startOfMonth } from '@internationalized/date';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useContext, useId, useMemo, useRef, useState } from 'react';\nimport { useDateFormatter } from 'react-aria';\nimport { ButtonContext, CalendarStateContext, Button as RACButton, CalendarGrid as RACCalendarGrid, CalendarGridBody as RACCalendarGridBody, CalendarGridHeader as RACCalendarGridHeader, CalendarHeaderCell as RACCalendarHeaderCell, CalendarMonthPicker as RACCalendarMonthPicker, CalendarYearPicker as RACCalendarYearPicker, Heading as RACHeading, ListBox as RACListBox, ListBoxItem as RACListBoxItem, RangeCalendarStateContext } from 'react-aria-components';\nimport { ArrowDropDownGlyph, CheckGlyph, ChevronEndGlyph } from '../glyphs';\nimport { focus } from '../styles/focus';\nimport { iconButton } from '../styles/icon-button';\nimport { monthOffsets } from './months';\nimport { calendarStyles, dateLayers, menuLayers } from './styles';\n\n// The parts Calendar and RangeCalendar both render: the row that moves the\n// month, the months themselves with their weekday header, and the name each\n// month takes while more than one stack. Apart from either component so the two cannot drift, and\n// outside `src/components` for the reason ./styles.ts gives.\n\n/** One entry of React Aria's month or year picker, as either lists it. */\ntype MenuEntry = {\n date: CalendarDate;\n formatted: string;\n id: number;\n};\n\n/** What React Aria's month and year pickers hand the element they render. */\ntype MenuPicker = {\n 'aria-label': string;\n items: MenuEntry[];\n onChange: (key: Key | null) => void;\n value: Key;\n};\ntype OpenMenu = 'month' | 'year';\n\n// How many years the open year list holds: a century either side of the year\n// shown, and that year. Material Design's own list scrolls a whole range of\n// years rather than a window that moves with each choice, and Compose's\n// default range is two centuries. Bounds cut it short where they fall inside.\nconst LISTED_YEARS = 201;\n\n/**\n * What a calendar draws above its months, and the months themselves. With\n * `showMonthYearMenus` the header is the date pickers page's docked one —\n * the month and the year as menu buttons — and while either is open its list\n * takes the months' place.\n *\n * The menus are for one visible month. They name and pick the first month\n * alone, so a second grid beside it would have no visible month or year of\n * its own; with more than one month the header is the plain one, whose\n * heading names the whole range, both years included where it spans two.\n */\nfunction CalendarFrame({\n children,\n months,\n showMonthYearMenus\n}: {\n children: ReactNode;\n /** How many months the calendar shows side by side. */\n months: number;\n showMonthYearMenus: boolean;\n}): ReactElement {\n if (showMonthYearMenus && months <= 1) {\n return <CalendarMenus>{children}</CalendarMenus>;\n }\n return <>\n <CalendarHeader />\n {children}\n </>;\n}\n\n/**\n * The weekday row, faded with the rest of a calendar that is disabled. The\n * state comes from React Aria's context rather than a prop, so the two\n * calendars draw it the same way without either passing anything down.\n *\n * The narrow letters are for the eye alone. React Aria hides the row from\n * assistive technology, since every date's name opens with its weekday in\n * full, so a letter that two days share is never read out.\n */\nfunction CalendarGridHeader(): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const isDisabled = (single ?? range)?.isDisabled ?? false;\n return <RACCalendarGridHeader>\n {isDisabled ? disabledHeaderCell : calendarHeaderCell}\n </RACCalendarGridHeader>;\n}\n\n/**\n * The two chevrons with the month between them. React Aria wires\n * `slot=\"previous\"` and `slot=\"next\"` on its own `Button`, and `IconButton`\n * renders React Aria's `Button` too — so nesting one inside a slot would put\n * two buttons where the date pickers page draws one. The chevrons take the\n * icon buttons page's 40dp square and its state layer instead.\n *\n * A plain element rather than a `<header>`: a header is a banner landmark,\n * landmarks may not nest, and React Aria puts a calendar in\n * `role=\"application\"` — axe fails the page on it.\n *\n * React Aria hides the heading between the chevrons from assistive\n * technology. The one a reader reaches is React Aria's own, out of sight,\n * naming the calendar's label with the month, so a calendar adds one heading\n * to the page's outline rather than two.\n */\nfunction CalendarHeader(): ReactElement {\n return <div {...stylex.props(calendarStyles.header)}>\n <RACButton className={chevronClassName} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACHeading {...stylex.props(calendarStyles.heading)} />\n <RACButton className={chevronClassName} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>;\n}\n\n/** The weekday row, in the type the page gives both it and the dates. */\nfunction calendarHeaderCell(day: string): ReactElement {\n return headerCell(day, false);\n}\n\n/**\n * The docked header: the month's menu button between the chevrons that step\n * it, and the year's menu button at the end. A press opens the button's list\n * in the months' place, where the page draws it, rather than in a popover over\n * them; a calendar inside a picker is already in one. While a list is open\n * the chevrons are hidden and the other menu is disabled, as the page draws\n * them, and choosing an entry — or pressing the one already checked, or\n * Escape — closes the list and puts focus back on its button.\n *\n * The lists are React Aria's month and year pickers, rendered twice: the\n * header names the month short, as the page's button does, and the list in\n * full. The year list runs a century either side of the year shown — React\n * Aria's own default is ten, which took several passes through the list to\n * reach a date of birth — and `minValue` and `maxValue` cut it short, which\n * React Aria does itself. A month with no day inside them is disabled here.\n */\nfunction CalendarMenus({\n children\n}: {\n children: ReactNode;\n}): ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const state = single ?? range;\n const [open, setOpen] = useState<null | OpenMenu>(null);\n const listId = useId();\n const monthButton = useRef<HTMLButtonElement>(null);\n const yearButton = useRef<HTMLButtonElement>(null);\n\n // A frame after the choice, and focus back on the button before the list\n // goes, rather than lost with it. The key that chose still has a keypress\n // to deliver: React Aria leaves Enter's default alone on a Mac, and with\n // focus already moved the keypress pressed the menu button and opened the\n // list again. A frame later it has landed on the list instead, as the\n // click after a pointer's choice has.\n const close = useCallback(() => {\n const button = open === 'month' ? monthButton : yearButton;\n requestAnimationFrame(() => {\n button.current?.focus();\n setOpen(null);\n });\n }, [open]);\n const toggleMonth = useCallback(() => {\n setOpen(current => current === 'month' ? null : 'month');\n }, []);\n const toggleYear = useCallback(() => {\n setOpen(current => current === 'year' ? null : 'year');\n }, []);\n const isDisabled = state?.isDisabled ?? false;\n const outsideBounds = (picker: MenuPicker) => picker.items.filter(entry => state?.maxValue != null && startOfMonth(entry.date).compare(state.maxValue) > 0 || state?.minValue != null && endOfMonth(entry.date).compare(state.minValue) < 0).map(entry => entry.id);\n return <>\n <div {...stylex.props(calendarStyles.header)}>\n <div {...stylex.props(calendarStyles.headerGroup)}>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"previous\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph, calendarStyles.chevronGlyphPrevious)} />\n </RACButton>\n <RACCalendarMonthPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'year'} isExpanded={open === 'month'} onPress={toggleMonth} picker={picker} ref={monthButton} />}\n </RACCalendarMonthPicker>\n <RACButton className={chevronClassNameWhile(open !== null)} slot=\"next\">\n <ChevronEndGlyph {...stylex.props(calendarStyles.chevronGlyph)} />\n </RACButton>\n </div>\n <RACCalendarYearPicker>\n {picker => <MenuButton controls={listId} isDisabled={isDisabled || open === 'month'} isExpanded={open === 'year'} onPress={toggleYear} picker={picker} ref={yearButton} />}\n </RACCalendarYearPicker>\n </div>\n {open === null ? children : null}\n {open === 'month' ? <RACCalendarMonthPicker format=\"long\">\n {picker => <MenuList disabledKeys={outsideBounds(picker)} id={listId} onClose={close} picker={picker} />}\n </RACCalendarMonthPicker> : null}\n {open === 'year' ? <RACCalendarYearPicker visibleYears={LISTED_YEARS}>\n {picker => <MenuList id={listId} onClose={close} picker={picker} />}\n </RACCalendarYearPicker> : null}\n </>;\n}\n\n/**\n * The month grids, one per visible month, each with the weekday row over\n * its dates. React Aria positions each grid from its own offset, so\n * `visibleDuration` of more than one draws the months side by side rather\n * than one grid that scrolls between them, and stacks them below the\n * expanded breakpoint. Stacked, each month is named over its grid by\n * `MonthCaption`, since the heading above them all names the range as a\n * whole; see `monthCaption` in ./styles.ts.\n *\n * The date's cell is the one thing the two calendars draw differently, so it\n * is the child.\n */\nfunction CalendarMonths({\n children,\n months\n}: {\n /** The cell each date of every month renders in. */\n children: (date: CalendarDate) => ReactElement;\n /** How many months the calendar shows. */\n months: number;\n}): ReactElement {\n const offsets = monthOffsets(months);\n const isStackable = offsets.length > 1;\n return <div {...stylex.props(calendarStyles.months, isStackable && calendarStyles.monthsStacked)}>\n {offsets.map(offset => <div key={offset.months} {...stylex.props(calendarStyles.month)}>\n {isStackable ? <MonthCaption offset={offset} /> : null}\n <RACCalendarGrid offset={offset} {...stylex.props(calendarStyles.grid)}>\n <CalendarGridHeader />\n <RACCalendarGridBody>{children}</RACCalendarGridBody>\n </RACCalendarGrid>\n </div>)}\n </div>;\n}\n\n/**\n * Scrolls an open list so its checked entry sits in the middle, as the page\n * draws it, with the entries either side of it in view. React Aria scrolls\n * the entry it focuses only as far as the nearest edge, which left the year\n * shown at the bottom with every later year out of sight; with it already\n * centred, that scroll has nothing to do.\n *\n * A ref on the checked entry's check rather than an effect on the list,\n * because React Aria builds its entries in a render of its own, after the\n * list's effects have run: the ref is called as the entry is attached,\n * before the first paint, so the list never draws a frame at its top and\n * then jumps. The list's own scroll alone moves, where `scrollIntoView` would\n * move the page around it too. A check rendered anywhere but an attached\n * list — React Aria renders its entries once out of the document to collect\n * them — finds no list and does nothing.\n */\nfunction centreInList(check: null | SVGSVGElement) {\n const entry = check?.closest('[role=\"option\"]');\n const list = check?.closest('[role=\"listbox\"]');\n if (!(entry instanceof HTMLElement) || !(list instanceof HTMLElement)) {\n return;\n }\n list.scrollTop += entry.getBoundingClientRect().top - list.getBoundingClientRect().top - (list.clientHeight - entry.offsetHeight) / 2;\n}\n\n// A chevron's classes, from React Aria's own render state. React Aria\n// disables one when the month it would move to is outside `minValue` and\n// `maxValue`, or the whole calendar is disabled, and a press on it then does\n// nothing — so it takes the shared fade, which drops the state layer too.\nfunction chevronClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}, isHidden = false) {\n return stylex.props(iconButton.chrome, calendarStyles.chevron, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled, isHidden && calendarStyles.chevronHidden).className ?? '';\n}\n\n// The same, hidden while a month or year list is open.\nfunction chevronClassNameWhile(isListOpen: boolean) {\n return (state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n }) => chevronClassName(state, isListOpen);\n}\n\n// A weekday in a disabled calendar, at the fade its dates take.\nfunction disabledHeaderCell(day: string): ReactElement {\n return headerCell(day, true);\n}\nfunction headerCell(day: string, isDisabled: boolean): ReactElement {\n return <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell, isDisabled && calendarStyles.headerCellDisabled)}>\n {day}\n </RACCalendarHeaderCell>;\n}\n\n/**\n * The month or the year as the page's menu button, opening its list. Named\n * by what it shows and then by what it is — \"Sep month\" — which keeps the\n * visible text the start of the name, so a reader who says what they see\n * reaches it.\n *\n * Outside React Aria's button context, which a calendar fills with its\n * `previous` and `next` slots alone: a button with no slot inside it is an\n * error, and these are not either chevron.\n */\nfunction MenuButton({\n controls,\n isDisabled,\n isExpanded,\n onPress,\n picker,\n ref\n}: {\n controls: string;\n isDisabled: boolean;\n isExpanded: boolean;\n onPress: () => void;\n picker: MenuPicker;\n ref: Ref<HTMLButtonElement>;\n}): ReactElement {\n const valueId = useId();\n const nameId = useId();\n const shown = picker.items.find(entry => entry.id === picker.value);\n return <ButtonContext value={null}>\n <RACButton aria-controls={isExpanded ? controls : undefined} aria-expanded={isExpanded} aria-haspopup=\"listbox\" aria-labelledby={`${valueId} ${nameId}`} className={menuButtonClassName} isDisabled={isDisabled} onPress={onPress} ref={ref}>\n <span id={valueId}>{shown?.formatted}</span>\n <span hidden id={nameId}>\n {picker['aria-label']}\n </span>\n <ArrowDropDownGlyph {...stylex.props(calendarStyles.menuArrow, isExpanded && calendarStyles.menuArrowExpanded)} />\n </RACButton>\n </ButtonContext>;\n}\n\n// A menu button's classes, from React Aria's render state, with the icon\n// buttons' state layers and fade — see `menuButton`.\nfunction menuButtonClassName(state: {\n isDisabled: boolean;\n isHovered: boolean;\n isPressed: boolean;\n}) {\n return stylex.props(calendarStyles.menuButton, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled).className ?? '';\n}\n\n// One row of an open list: the check where the row is the one shown, the\n// room it takes where it is not, then the month or the year. Built by a call\n// rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after.\nfunction menuEntry(entry: MenuEntry): ReactElement {\n return <RACListBoxItem className={menuItemClassName} id={entry.id} textValue={entry.formatted}>\n {menuEntryContent(entry.formatted)}\n </RACListBoxItem>;\n}\nfunction menuEntryContent(label: string) {\n return ({\n isSelected\n }: {\n isSelected: boolean;\n }) => <>\n {isSelected ? <CheckGlyph ref={centreInList} {...stylex.props(calendarStyles.menuCheck)} /> : <span {...stylex.props(calendarStyles.menuCheck)} />}\n {label}\n </>;\n}\n\n// A row's classes, from React Aria's render state. The layers come after the\n// checked row's surface variant, written for whichever ground the row has,\n// and the fade last, which StyleX lets drop them by replacing a property\n// whole.\nfunction menuItemClassName(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n}) {\n return stylex.props(calendarStyles.menuItem, state.isSelected && calendarStyles.menuItemSelected, state.isHovered && (state.isSelected ? menuLayers.selectedHovered : dateLayers.plainHovered), state.isPressed && (state.isSelected ? menuLayers.selectedPressed : dateLayers.plainPressed), state.isFocusVisible && calendarStyles.menuItemFocused, state.isDisabled && calendarStyles.menuItemDisabled).className ?? '';\n}\n\n/**\n * An open month or year list, in the months' place. React Aria's list box,\n * with the entry the calendar shows selected and focused when it opens.\n *\n * Choosing closes it, and so does pressing the checked entry or Escape. A\n * single selection that may empty is what tells those apart: choosing\n * replaces the selection, while the checked entry toggles it off and Escape\n * clears it — and the clearing is what stops Escape there rather than letting\n * it close a picker's dialog around the calendar.\n */\nfunction MenuList({\n disabledKeys,\n id,\n onClose,\n picker\n}: {\n disabledKeys?: Key[];\n id: string;\n onClose: () => void;\n picker: MenuPicker;\n}): ReactElement {\n const selected = useMemo(() => [picker.value], [picker.value]);\n const choose = useCallback((keys: Selection) => {\n // The one entry a single selection holds after a choice, and none\n // after the checked entry is pressed again or Escape clears it.\n if (keys !== 'all') {\n for (const key of keys) {\n picker.onChange(key);\n }\n }\n onClose();\n }, [onClose, picker]);\n return <RACListBox aria-label={picker['aria-label']}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a list opened from its button takes focus, as a select's does\n autoFocus disabledKeys={disabledKeys} id={id} items={picker.items} onSelectionChange={choose} selectedKeys={selected} selectionMode=\"single\"\n // On the release rather than the press, so the pointer is done with the\n // list before it closes: chosen on the press, the release landed on\n // whatever the closing list uncovered beneath it.\n shouldSelectOnPressUp {...stylex.props(calendarStyles.menuList)}>\n {menuEntry}\n </RACListBox>;\n}\n\n/**\n * The name of the month a grid shows, over the grid, for a calendar drawing\n * more than one. It is formatted as React Aria names the grid itself — the\n * month in full and the year, in the calendar system and time zone the\n * calendar runs in, with the era where a Gregorian date falls before the\n * common one — so the two say the same thing.\n *\n * Hidden from assistive technology, which hears the same name already: React\n * Aria labels every grid with the calendar's name and its own month.\n */\nfunction MonthCaption({\n offset\n}: {\n offset: {\n months: number;\n };\n}): null | ReactElement {\n const single = useContext(CalendarStateContext);\n const range = useContext(RangeCalendarStateContext);\n const state = single ?? range;\n const start = state?.visibleRange.start.add(offset);\n const formatter = useDateFormatter({\n calendar: start?.calendar.identifier,\n era: start?.calendar.identifier === 'gregory' && start.era === 'BC' ? 'short' : undefined,\n month: 'long',\n timeZone: state?.timeZone,\n year: 'numeric'\n });\n if (state == null || start == null) {\n return null;\n }\n const month = start.calendar.getFormattableMonth?.(start) ?? start;\n return <div aria-hidden {...stylex.props(calendarStyles.monthCaption)}>\n {formatter.format(month.toDate(state.timeZone))}\n </div>;\n}\nexport { CalendarFrame, CalendarMonths };"],"mappings":";;;;;;;;;;;;;AAuCA,MAAM0D,eAAe;;;;;;;;;;;;AAarB,SAAAC,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAuB,MAAA,EAAAC,UAAAC,QAAAC,uBAAAL;CAUrB,IAAIK,sBAAsBD,UAAU,GAAC;EAAA,IAAAE;EAAA,IAAAL,EAAA,OAAAE,UAAA;GAC5BG,KAAA,oBAAC,eAAD,EAAgBH,SAAF,CAAA;GAA2BF,EAAA,KAAAE;GAAAF,EAAA,KAAAK;EAAA,OAAAA,KAAAL,EAAA;EAAA,OAAzCK;CAAyC;CACjD,IAAAA;CAAA,IAAAL,EAAA,OAAAM,OAAAC,IAAA,2BAAA,GAAA;EAEGF,KAAA,oBAAC,gBAAD,CAAe,CAAA;EAAGL,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAE,UAAA;EADfM,KAAA,qBAAA,YAAA,EAAA,UAAA,CACHH,IACCH,QAAQ,EAAA,CAAA;EACRF,EAAA,KAAAE;EAAAF,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAHEQ;AAGF;;;;;;;;;;AAYP,SAAA7C,uBAAA;CAAA,MAAAqC,IAAAC,EAAA,CAAA;CACE,MAAAQ,S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I/H,SAAS,QAAQuH,SAAS,MAAI,OACzB;CAET,MAAA/D,QAAc+D,MAAKI,SAASK,sBAAuBT,KAAc,KAAnDA;CACF,MAAA3I,KAAA;CAAW,IAAAG;CAAA,IAAAR,EAAA,OAAAM,OAAAC,IAAA,2BAAA,GAAA;EAAKC,KAAA7D,MAAaqC,eAAc0K,YAAa;EAAC1J,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAChE,MAAAqB,KAAA8H,UAASQ,OAAQ1E,MAAK2E,OAAQnI,MAAK8H,QAAS,CAAC;CAAC,IAAAhH;CAAA,IAAAvC,EAAA,OAAAQ,MAAAR,EAAA,OAAAqB,IAAA;EAD5CkB,KAAA,oBAAA,OAAA;GAAK,eAAAlC;GAAW,GAAKG;GACvBa,UAAAA;EACG,CAAA;EAAArB,EAAA,KAAAQ;EAAAR,EAAA,KAAAqB;EAAArB,EAAA,KAAAuC;CAAA,OAAAA,KAAAvC,EAAA;CAAA,OAFDuC;AAEC"}
|
package/dist/calendar/styles.js
CHANGED
|
@@ -253,15 +253,33 @@ const calendarStyles = {
|
|
|
253
253
|
ks0D6T: "x193iq5w",
|
|
254
254
|
$$css: true
|
|
255
255
|
},
|
|
256
|
+
monthCaption: {
|
|
257
|
+
kGNEyG: "xpqajaz",
|
|
258
|
+
kZKoxP: "xsdox4t",
|
|
259
|
+
kB7OPa: "x9f619",
|
|
260
|
+
kMwMTN: "x1w5n3ug",
|
|
261
|
+
k1xSpc: "x1s85apg x1dstske",
|
|
262
|
+
kMv6JI: "xrgwony",
|
|
263
|
+
kGuDYH: "x12s497w",
|
|
264
|
+
k63SB2: "x1szcwkt",
|
|
265
|
+
kb6lSQ: "xo803ec",
|
|
266
|
+
kLWn49: "xyl1r0q",
|
|
267
|
+
kGO01o: "xqf7pud",
|
|
268
|
+
kg3NbH: "x18fpw6u",
|
|
269
|
+
$$css: true
|
|
270
|
+
},
|
|
256
271
|
months: {
|
|
257
272
|
kGNEyG: "x7a106z",
|
|
258
273
|
k1xSpc: "x78zum5 x1yrkhk",
|
|
259
274
|
kOIVth: "xj2l1yv",
|
|
260
|
-
kJBjZk: "x17udjhq",
|
|
261
275
|
kumcoG: "x1kji8p3",
|
|
262
276
|
kAzted: "x8chfrn",
|
|
263
277
|
$$css: true
|
|
264
278
|
},
|
|
279
|
+
monthsStacked: {
|
|
280
|
+
kAzted: "x8chfrn x1e8x83n",
|
|
281
|
+
$$css: true
|
|
282
|
+
},
|
|
265
283
|
root: {
|
|
266
284
|
kWkggS: "xvkjz1l",
|
|
267
285
|
kaIpWk: "xhpdng0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["stylex","colors","media","radii","sizing","spacing","stateLayerOpacity","typography","ROW_BLOCK_SIZE","DATE_SIZE","DATE_ROOM","WEEK_INLINE_SIZE","TARGET_REACH","WEEKS_HELD","FORCED_COLORS","calendarStyles","cell","kgeoSG","kFcpXp","kEoFBp","kGNEyG","kWkggS","kZKoxP","kaIpWk","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kMv6JI","kGuDYH","k63SB2","kzqmXN","kjj79g","kb6lSQ","kLWn49","kqGvvJ","kUOVxO","kVAEAm","$$css","cellDisabled","kVAM5u","kAXs8y","cellInRange","kjBf7l","cellInvalid","cellRangeEnd","kT0f0o","kfmiAY","cellRangeStart","kVL7Gh","krdFHd","cellReadOnly","cellSelected","cellSelectedDisabled","cellToday","ksu8eU","kMzoRj","cellUnavailable","kMnn75","chevron","chevronGlyph","k3aq6I","chevronGlyphPrevious","chevronHidden","k33iCy","grid","kLvRdT","kheTzg","kPzzVL","header","kOIVth","kAzted","headerCell","headerCellDisabled","headerGroup","heading","kogj98","k9WMMc","menuArrow","kmuXW","menuArrowExpanded","menuButton","kGOzcv","kpsdNU","kg3NbH","menuCheck","menuItem","k3XXqK","menuItemDisabled","menuItemFocused","kInvED","kMeerF","menuItemSelected","menuList","kLZC3w","kPef9Z","kEafiO","kORKVm","month","ks0D6T","months","kJBjZk","kumcoG","root","kXwgrk","k7Eaqz","kmVPX3","dateLayers","inRangeHovered","inRangePressed","invalidHovered","invalidPressed","plainHovered","plainPressed","selectedHovered","selectedPressed","menuLayers"],"sources":["../../src/calendar/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, radii, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The styles Calendar and RangeCalendar both draw. Apart from either\n// component so the two cannot drift, and outside `src/components` because a\n// directory there is a public component with stories, a barrel entry and a\n// `styling.test.tsx` case — which shared styles are none of.\n//\n// The values are the date pickers page's docked calendar, named in\n// `src/components/calendar/index.tsx` along with the departures from it. What\n// is only a range's — the band between the two ends — takes its colours from\n// the modal date picker's range-selection tokens instead, since the docked\n// token set stops at the selected date; see `cellInRange`.\n//\n// Under forced colours a selected date and a range's band are fills, which\n// that mode paints in a system colour, so a calendar showed no selection and\n// no range there, only today's outline. Both take `Highlight` with\n// `HighlightText` over it, the pair the mode gives whatever is chosen, which\n// draws a range as one run from its first day to its last.\n//\n// They take the pair with `forced-color-adjust: none`. Left to adjust, the\n// mode lays a `Canvas` backplate behind every run of text, and a date in\n// `HighlightText` on that backplate is a blank box. With it off nothing is\n// forced on those cells, so they name a system colour for everything they\n// draw — the fill, the date, today's outline and the focus ring. A day ruled\n// out or disabled names none, so it hands itself back to the mode, apart from\n// the date a disabled calendar holds, which takes `GrayText` as its fill in\n// the same way; see `cellSelectedDisabled`.\n\n// One row of the grid. The weekday row and every week of dates are the same\n// 48dp, the page's date container and Compose's own row, so `headerCell`, the\n// room around each date and the room `months` reserves all follow this one\n// number — a row resized without the reservation following it would put the\n// calendar's height back on its month.\nconst ROW_BLOCK_SIZE = '48px';\n\n// The date's state layer: the 40dp circle a selected date fills and a hover\n// tints, inside the 48dp row and column it sits in.\nconst DATE_SIZE = '40px';\n\n// The room either side of a date's circle, which is the difference between\n// the two: the circle sits in the middle of its 48dp square.\nconst DATE_ROOM = `calc((${ROW_BLOCK_SIZE} - ${DATE_SIZE}) / 2)`;\n\n// A whole column: the page's 48dp date container, seven to a week. The grid\n// is at most seven of them and narrows with its container below that.\nconst WEEK_INLINE_SIZE = `calc(${ROW_BLOCK_SIZE} * 7)`;\n\n// What every press target in the calendar reaches to: the page's 48dp, for\n// controls drawn at 40.\nconst TARGET_REACH = `calc((${DATE_SIZE} - ${ROW_BLOCK_SIZE}) / 2)`;\n\n// The weeks the grid holds room for, which is the most any month occupies: a\n// 31-day month beginning on the last day of a week runs one day, then four\n// whole weeks, then two days. February 2026 is the other end at four. Holding\n// six draws every month in the box the longest one fills.\nconst WEEKS_HELD = 6;\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst calendarStyles = {\n cell: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x15kbrqr\",\n kEoFBp: \"x1hmns74\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x16fbrrb\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"x100vrsf\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kqGvvJ: \"x8yh5r3\",\n kUOVxO: \"xvueqy4\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n cellDisabled: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x1pojj9x\",\n kMwMTN: \"x9w6zvh\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n cellInRange: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kVAM5u: \"x1uajy3w x1n2ykn\",\n kaIpWk: \"x2u8bby\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n kzqmXN: \"xh8yej3\",\n kUOVxO: \"xrxpjvj\",\n kjBf7l: \"xrgy624 x3teovq\",\n $$css: true\n },\n cellInvalid: {\n kWkggS: \"x1skwi6t x1jzqe4\",\n kVAM5u: \"xpdgbdc x1n2ykn\",\n kMwMTN: \"x16elhoc x1k5gbb1\",\n $$css: true\n },\n cellRangeEnd: {\n kT0f0o: \"x187kppt\",\n kfmiAY: \"x1fpsnkq\",\n $$css: true\n },\n cellRangeStart: {\n kVL7Gh: \"x17kgqx\",\n krdFHd: \"x1uni95s\",\n $$css: true\n },\n cellReadOnly: {\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n cellSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kVAM5u: \"x1uajy3w x1n2ykn\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n kjBf7l: \"xrgy624 x3teovq\",\n $$css: true\n },\n cellSelectedDisabled: {\n kWkggS: \"x19v6zzp x1o55y2u\",\n kVAM5u: \"x9r1u3d xmnqt3w\",\n kMwMTN: \"x9w6zvh x1a46atw\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n cellToday: {\n kVAM5u: \"x1uajy3w\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n cellUnavailable: {\n kWkggS: \"xjbqb8w\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n kMnn75: \"x5lhwog\",\n $$css: true\n },\n chevron: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x15kbrqr\",\n kEoFBp: \"x1hmns74\",\n kUOVxO: \"x34s64n\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n chevronGlyph: {\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n k3aq6I: \"x19axjrm x1c071of\",\n $$css: true\n },\n chevronGlyphPrevious: {\n k3aq6I: \"xdg80k9 xpk2tj9\",\n $$css: true\n },\n chevronHidden: {\n k33iCy: \"xlshs6z\",\n $$css: true\n },\n grid: {\n kLvRdT: \"x1vathgz\",\n kheTzg: \"x1gukg7c\",\n kzqmXN: \"xh8yej3\",\n kPzzVL: \"x140o2bo\",\n $$css: true\n },\n header: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kjj79g: \"x1qughib\",\n kAzted: \"x1ba4aug\",\n $$css: true\n },\n headerCell: {\n kZKoxP: \"xsdox4t\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n $$css: true\n },\n headerCellDisabled: {\n kMwMTN: \"x9w6zvh\",\n $$css: true\n },\n headerGroup: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n $$css: true\n },\n heading: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kogj98: \"x1ghz6dp\",\n k9WMMc: \"x2b8uid\",\n $$css: true\n },\n menuArrow: {\n kZKoxP: \"xmix8c7\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n menuArrowExpanded: {\n k3aq6I: \"x19jd1h0\",\n $$css: true\n },\n menuButton: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"x1sk10ar\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1rv7mn0\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"xzoy561\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kg3NbH: \"xn60lsn\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n menuCheck: {\n kZKoxP: \"xxk0z11\",\n kMwMTN: \"x139gbkf\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xvy4d1p\",\n $$css: true\n },\n menuItem: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xbg5kjn\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kOIVth: \"xxj4525\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n menuItemDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x9w6zvh\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n menuItemFocused: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n menuItemSelected: {\n kWkggS: \"xkrgufg\",\n $$css: true\n },\n menuList: {\n kZKoxP: \"xmmrubu\",\n kLZC3w: \"x12smttz\",\n kPef9Z: \"x13fuv20\",\n kEafiO: \"x178xt8z\",\n kB7OPa: \"x9f619\",\n kUOVxO: \"xnx04jz\",\n k3XXqK: \"x1t137rt\",\n kORKVm: \"x1odjw0f\",\n $$css: true\n },\n month: {\n kB7OPa: \"x9f619\",\n kzqmXN: \"x1url4ad\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n months: {\n kGNEyG: \"x7a106z\",\n k1xSpc: \"x78zum5 x1yrkhk\",\n kOIVth: \"xj2l1yv\",\n kJBjZk: \"x17udjhq\",\n kumcoG: \"x1kji8p3\",\n kAzted: \"x8chfrn\",\n $$css: true\n },\n root: {\n kWkggS: \"xvkjz1l\",\n kaIpWk: \"xhpdng0\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x1gka490\",\n kzqmXN: \"xeq5yr9\",\n ks0D6T: \"x193iq5w\",\n k7Eaqz: \"xjrddbv\",\n kmVPX3: \"xa36j16\",\n $$css: true\n }\n};\n\n// A date's hover and pressed layers, one pair per ground it sits on: nothing,\n// the range band, the selected circle, and the invalid one. From React Aria's\n// render state rather than `:hover` and `:active`, for Button's reasons — see\n// its header: a hover layer stayed on after a tap, and no pressed layer\n// showed for a press made from the keyboard.\n// Each layer is written whole for its ground because StyleX replaces a\n// property whole, and the band and the circles keep their forced-colours\n// `Highlight` under the layer.\nconst dateLayers = {\n inRangeHovered: {\n kWkggS: \"x3zumxv x1jzqe4\",\n $$css: true\n },\n inRangePressed: {\n kWkggS: \"x1as5h4c x1jzqe4\",\n $$css: true\n },\n invalidHovered: {\n kWkggS: \"xbw18ef x1jzqe4\",\n $$css: true\n },\n invalidPressed: {\n kWkggS: \"xld5jmv x1jzqe4\",\n $$css: true\n },\n plainHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n plainPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n selectedHovered: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n selectedPressed: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n }\n};\n\n// A list row's hover and pressed layers over the checked row's surface\n// variant. Over nothing a row takes a date's own pair, `dateLayers.plain*`,\n// since the page gives both the same on-surface layer.\nconst menuLayers = {\n selectedHovered: {\n kWkggS: \"xgw93rf\",\n $$css: true\n },\n selectedPressed: {\n kWkggS: \"x113d7pk\",\n $$css: true\n }\n};\nexport { calendarStyles, dateLayers, menuLayers };"],"mappings":";AAgEA,MAAMe,iBAAiB;CACrBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,cAAc;EACZlB,QAAQ;EACRmB,QAAQ;EACRf,QAAQ;EACRC,QAAQ;EACRe,QAAQ;EACRH,OAAO;CACT;CACAI,aAAa;EACXrB,QAAQ;EACRmB,QAAQ;EACRjB,QAAQ;EACRE,QAAQ;EACRgB,QAAQ;EACRV,QAAQ;EACRK,QAAQ;EACRO,QAAQ;EACRL,OAAO;CACT;CACAM,aAAa;EACXvB,QAAQ;EACRmB,QAAQ;EACRf,QAAQ;EACRa,OAAO;CACT;CACAO,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;CACAU,gBAAgB;EACdC,QAAQ;EACRC,QAAQ;EACRZ,OAAO;CACT;CACAa,cAAc;EACZzB,QAAQ;EACRY,OAAO;CACT;CACAc,cAAc;EACZ/B,QAAQ;EACRmB,QAAQ;EACRf,QAAQ;EACRgB,QAAQ;EACRE,QAAQ;EACRL,OAAO;CACT;CACAe,sBAAsB;EACpBhC,QAAQ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,QAAQ;EACRlC,QAAQ;EACRvC,QAAQ;EACRoE,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRpE,OAAO;CACT;AACF;AAUA,MAAMqE,aAAa;CACjBC,gBAAgB;EACdvF,QAAQ;EACRiB,OAAO;CACT;CACAuE,gBAAgB;EACdxF,QAAQ;EACRiB,OAAO;CACT;CACAwE,gBAAgB;EACdzF,QAAQ;EACRiB,OAAO;CACT;CACAyE,gBAAgB;EACd1F,QAAQ;EACRiB,OAAO;CACT;CACA0E,cAAc;EACZ3F,QAAQ;EACRiB,OAAO;CACT;CACA2E,cAAc;EACZ5F,QAAQ;EACRiB,OAAO;CACT;CACA4E,iBAAiB;EACf7F,QAAQ;EACRiB,OAAO;CACT;CACA6E,iBAAiB;EACf9F,QAAQ;EACRiB,OAAO;CACT;AACF;AAKA,MAAM8E,aAAa;CACjBF,iBAAiB;EACf7F,QAAQ;EACRiB,OAAO;CACT;CACA6E,iBAAiB;EACf9F,QAAQ;EACRiB,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"styles.js","names":["stylex","colors","media","radii","sizing","spacing","stateLayerOpacity","typography","ROW_BLOCK_SIZE","DATE_SIZE","DATE_ROOM","WEEK_INLINE_SIZE","TARGET_REACH","WEEKS_HELD","MONTH_BLOCK_SIZE","FORCED_COLORS","calendarStyles","cell","kgeoSG","kFcpXp","kEoFBp","kGNEyG","kWkggS","kZKoxP","kaIpWk","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kMv6JI","kGuDYH","k63SB2","kzqmXN","kjj79g","kb6lSQ","kLWn49","kqGvvJ","kUOVxO","kVAEAm","$$css","cellDisabled","kVAM5u","kAXs8y","cellInRange","kjBf7l","cellInvalid","cellRangeEnd","kT0f0o","kfmiAY","cellRangeStart","kVL7Gh","krdFHd","cellReadOnly","cellSelected","cellSelectedDisabled","cellToday","ksu8eU","kMzoRj","cellUnavailable","kMnn75","chevron","chevronGlyph","k3aq6I","chevronGlyphPrevious","chevronHidden","k33iCy","grid","kLvRdT","kheTzg","kPzzVL","header","kOIVth","kAzted","headerCell","headerCellDisabled","headerGroup","heading","kogj98","k9WMMc","menuArrow","kmuXW","menuArrowExpanded","menuButton","kGOzcv","kpsdNU","kg3NbH","menuCheck","menuItem","k3XXqK","menuItemDisabled","menuItemFocused","kInvED","kMeerF","menuItemSelected","menuList","kLZC3w","kPef9Z","kEafiO","kORKVm","month","ks0D6T","monthCaption","kGO01o","months","kumcoG","monthsStacked","root","kXwgrk","k7Eaqz","kmVPX3","dateLayers","inRangeHovered","inRangePressed","invalidHovered","invalidPressed","plainHovered","plainPressed","selectedHovered","selectedPressed","menuLayers"],"sources":["../../src/calendar/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../tokens/design.tokens.stylex';\nimport { colors, media, radii, sizing, spacing, stateLayerOpacity, typography } from '../tokens/design.tokens.stylex';\n\n// The styles Calendar and RangeCalendar both draw. Apart from either\n// component so the two cannot drift, and outside `src/components` because a\n// directory there is a public component with stories, a barrel entry and a\n// `styling.test.tsx` case — which shared styles are none of.\n//\n// The values are the date pickers page's docked calendar, named in\n// `src/components/calendar/index.tsx` along with the departures from it. What\n// is only a range's — the band between the two ends — takes its colours from\n// the modal date picker's range-selection tokens instead, since the docked\n// token set stops at the selected date; see `cellInRange`.\n//\n// Under forced colours a selected date and a range's band are fills, which\n// that mode paints in a system colour, so a calendar showed no selection and\n// no range there, only today's outline. Both take `Highlight` with\n// `HighlightText` over it, the pair the mode gives whatever is chosen, which\n// draws a range as one run from its first day to its last.\n//\n// They take the pair with `forced-color-adjust: none`. Left to adjust, the\n// mode lays a `Canvas` backplate behind every run of text, and a date in\n// `HighlightText` on that backplate is a blank box. With it off nothing is\n// forced on those cells, so they name a system colour for everything they\n// draw — the fill, the date, today's outline and the focus ring. A day ruled\n// out or disabled names none, so it hands itself back to the mode, apart from\n// the date a disabled calendar holds, which takes `GrayText` as its fill in\n// the same way; see `cellSelectedDisabled`.\n\n// One row of the grid. The weekday row and every week of dates are the same\n// 48dp, the page's date container and Compose's own row, so `headerCell`, the\n// room around each date and the room `months` reserves all follow this one\n// number — a row resized without the reservation following it would put the\n// calendar's height back on its month.\nconst ROW_BLOCK_SIZE = '48px';\n\n// The date's state layer: the 40dp circle a selected date fills and a hover\n// tints, inside the 48dp row and column it sits in.\nconst DATE_SIZE = '40px';\n\n// The room either side of a date's circle, which is the difference between\n// the two: the circle sits in the middle of its 48dp square.\nconst DATE_ROOM = `calc((${ROW_BLOCK_SIZE} - ${DATE_SIZE}) / 2)`;\n\n// A whole column: the page's 48dp date container, seven to a week. The grid\n// is at most seven of them and narrows with its container below that.\nconst WEEK_INLINE_SIZE = `calc(${ROW_BLOCK_SIZE} * 7)`;\n\n// What every press target in the calendar reaches to: the page's 48dp, for\n// controls drawn at 40.\nconst TARGET_REACH = `calc((${DATE_SIZE} - ${ROW_BLOCK_SIZE}) / 2)`;\n\n// The weeks the grid holds room for, which is the most any month occupies: a\n// 31-day month beginning on the last day of a week runs one day, then four\n// whole weeks, then two days. February 2026 is the other end at four. Holding\n// six draws every month in the box the longest one fills.\nconst WEEKS_HELD = 6;\n\n// The room one month is held at, the weekday row and the six weeks, which\n// the open month or year list takes too.\nconst MONTH_BLOCK_SIZE = `calc(${ROW_BLOCK_SIZE} * ${WEEKS_HELD} + ${ROW_BLOCK_SIZE})`;\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst calendarStyles = {\n cell: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x15kbrqr\",\n kEoFBp: \"x1hmns74\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1vqgdyp\",\n kaIpWk: \"x16fbrrb\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kzqmXN: \"x100vrsf\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n kqGvvJ: \"x8yh5r3\",\n kUOVxO: \"xvueqy4\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n cellDisabled: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x1pojj9x\",\n kMwMTN: \"x9w6zvh\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n $$css: true\n },\n cellInRange: {\n kWkggS: \"x15dekr4 x1jzqe4\",\n kVAM5u: \"x1uajy3w x1n2ykn\",\n kaIpWk: \"x2u8bby\",\n kMwMTN: \"x1sawysd x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n kzqmXN: \"xh8yej3\",\n kUOVxO: \"xrxpjvj\",\n kjBf7l: \"xrgy624 x3teovq\",\n $$css: true\n },\n cellInvalid: {\n kWkggS: \"x1skwi6t x1jzqe4\",\n kVAM5u: \"xpdgbdc x1n2ykn\",\n kMwMTN: \"x16elhoc x1k5gbb1\",\n $$css: true\n },\n cellRangeEnd: {\n kT0f0o: \"x187kppt\",\n kfmiAY: \"x1fpsnkq\",\n $$css: true\n },\n cellRangeStart: {\n kVL7Gh: \"x17kgqx\",\n krdFHd: \"x1uni95s\",\n $$css: true\n },\n cellReadOnly: {\n kkrTdU: \"xt0e3qv\",\n $$css: true\n },\n cellSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kVAM5u: \"x1uajy3w x1n2ykn\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n kAXs8y: \"x1g12otp\",\n kjBf7l: \"xrgy624 x3teovq\",\n $$css: true\n },\n cellSelectedDisabled: {\n kWkggS: \"x19v6zzp x1o55y2u\",\n kVAM5u: \"x9r1u3d xmnqt3w\",\n kMwMTN: \"x9w6zvh x1a46atw\",\n kAXs8y: \"x1g12otp\",\n $$css: true\n },\n cellToday: {\n kVAM5u: \"x1uajy3w\",\n ksu8eU: \"x1y0btm7\",\n kMzoRj: \"xmkeg23\",\n kMwMTN: \"x1mxwv8y\",\n $$css: true\n },\n cellUnavailable: {\n kWkggS: \"xjbqb8w\",\n kkrTdU: \"x1h6gzvc\",\n kAXs8y: \"xr5dkdi\",\n kMnn75: \"x5lhwog\",\n $$css: true\n },\n chevron: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x15kbrqr\",\n kEoFBp: \"x1hmns74\",\n kUOVxO: \"x34s64n\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n chevronGlyph: {\n kZKoxP: \"xxk0z11\",\n kzqmXN: \"xvy4d1p\",\n k3aq6I: \"x19axjrm x1c071of\",\n $$css: true\n },\n chevronGlyphPrevious: {\n k3aq6I: \"xdg80k9 xpk2tj9\",\n $$css: true\n },\n chevronHidden: {\n k33iCy: \"xlshs6z\",\n $$css: true\n },\n grid: {\n kLvRdT: \"x1vathgz\",\n kheTzg: \"x1gukg7c\",\n kzqmXN: \"xh8yej3\",\n kPzzVL: \"x140o2bo\",\n $$css: true\n },\n header: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kOIVth: \"x126z3so\",\n kjj79g: \"x1qughib\",\n kAzted: \"x1ba4aug\",\n $$css: true\n },\n headerCell: {\n kZKoxP: \"xsdox4t\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n $$css: true\n },\n headerCellDisabled: {\n kMwMTN: \"x9w6zvh\",\n $$css: true\n },\n headerGroup: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n $$css: true\n },\n heading: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kogj98: \"x1ghz6dp\",\n k9WMMc: \"x2b8uid\",\n $$css: true\n },\n menuArrow: {\n kZKoxP: \"xmix8c7\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"x1xp8n7a\",\n $$css: true\n },\n menuArrowExpanded: {\n k3aq6I: \"x19jd1h0\",\n $$css: true\n },\n menuButton: {\n kgeoSG: \"x1cpjm7i\",\n kGOzcv: \"x1sk10ar\",\n kpsdNU: \"xm4btww\",\n kEoFBp: \"x1hmns74\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1rv7mn0\",\n kaIpWk: \"x1dkaolv\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kmuXW: \"x2lah0s\",\n kMv6JI: \"xkknnkr\",\n kGuDYH: \"x14zspaw\",\n k63SB2: \"x1v9cpvo\",\n kOIVth: \"xzoy561\",\n kb6lSQ: \"x155f00i\",\n kLWn49: \"x1lz68p4\",\n kg3NbH: \"xn60lsn\",\n kVAEAm: \"x1n2onr6\",\n $$css: true\n },\n menuCheck: {\n kZKoxP: \"xxk0z11\",\n kMwMTN: \"x139gbkf\",\n kmuXW: \"x2lah0s\",\n kzqmXN: \"xvy4d1p\",\n $$css: true\n },\n menuItem: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xbg5kjn\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kOIVth: \"xxj4525\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\n k3XXqK: \"x1t137rt\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n menuItemDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x9w6zvh\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n menuItemFocused: {\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n menuItemSelected: {\n kWkggS: \"xkrgufg\",\n $$css: true\n },\n menuList: {\n kZKoxP: \"xmmrubu\",\n kLZC3w: \"x12smttz\",\n kPef9Z: \"x13fuv20\",\n kEafiO: \"x178xt8z\",\n kB7OPa: \"x9f619\",\n kUOVxO: \"xnx04jz\",\n k3XXqK: \"x1t137rt\",\n kORKVm: \"x1odjw0f\",\n $$css: true\n },\n month: {\n kB7OPa: \"x9f619\",\n kzqmXN: \"x1url4ad\",\n ks0D6T: \"x193iq5w\",\n $$css: true\n },\n monthCaption: {\n kGNEyG: \"xpqajaz\",\n kZKoxP: \"xsdox4t\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x1s85apg x1dstske\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kGO01o: \"xqf7pud\",\n kg3NbH: \"x18fpw6u\",\n $$css: true\n },\n months: {\n kGNEyG: \"x7a106z\",\n k1xSpc: \"x78zum5 x1yrkhk\",\n kOIVth: \"xj2l1yv\",\n kumcoG: \"x1kji8p3\",\n kAzted: \"x8chfrn\",\n $$css: true\n },\n monthsStacked: {\n kAzted: \"x8chfrn x1e8x83n\",\n $$css: true\n },\n root: {\n kWkggS: \"xvkjz1l\",\n kaIpWk: \"xhpdng0\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x1gka490\",\n kzqmXN: \"xeq5yr9\",\n ks0D6T: \"x193iq5w\",\n k7Eaqz: \"xjrddbv\",\n kmVPX3: \"xa36j16\",\n $$css: true\n }\n};\n\n// A date's hover and pressed layers, one pair per ground it sits on: nothing,\n// the range band, the selected circle, and the invalid one. From React Aria's\n// render state rather than `:hover` and `:active`, for Button's reasons — see\n// its header: a hover layer stayed on after a tap, and no pressed layer\n// showed for a press made from the keyboard.\n// Each layer is written whole for its ground because StyleX replaces a\n// property whole, and the band and the circles keep their forced-colours\n// `Highlight` under the layer.\nconst dateLayers = {\n inRangeHovered: {\n kWkggS: \"x3zumxv x1jzqe4\",\n $$css: true\n },\n inRangePressed: {\n kWkggS: \"x1as5h4c x1jzqe4\",\n $$css: true\n },\n invalidHovered: {\n kWkggS: \"xbw18ef x1jzqe4\",\n $$css: true\n },\n invalidPressed: {\n kWkggS: \"xld5jmv x1jzqe4\",\n $$css: true\n },\n plainHovered: {\n kWkggS: \"x1b18xnh\",\n $$css: true\n },\n plainPressed: {\n kWkggS: \"xjeeohs\",\n $$css: true\n },\n selectedHovered: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n selectedPressed: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n }\n};\n\n// A list row's hover and pressed layers over the checked row's surface\n// variant. Over nothing a row takes a date's own pair, `dateLayers.plain*`,\n// since the page gives both the same on-surface layer.\nconst menuLayers = {\n selectedHovered: {\n kWkggS: \"xgw93rf\",\n $$css: true\n },\n selectedPressed: {\n kWkggS: \"x113d7pk\",\n $$css: true\n }\n};\nexport { calendarStyles, dateLayers, menuLayers };"],"mappings":";AAoEA,MAAMgB,iBAAiB;CACrBC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,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,OAAO;CACT;CACA2E,gBAAgB;EACd5F,QAAQ;EACRiB,OAAO;CACT;CACA4E,cAAc;EACZ7F,QAAQ;EACRiB,OAAO;CACT;CACA6E,cAAc;EACZ9F,QAAQ;EACRiB,OAAO;CACT;CACA8E,iBAAiB;EACf/F,QAAQ;EACRiB,OAAO;CACT;CACA+E,iBAAiB;EACfhG,QAAQ;EACRiB,OAAO;CACT;AACF;AAKA,MAAMgF,aAAa;CACjBF,iBAAiB;EACf/F,QAAQ;EACRiB,OAAO;CACT;CACA+E,iBAAiB;EACfhG,QAAQ;EACRiB,OAAO;CACT;AACF"}
|
|
@@ -7,7 +7,9 @@ type AppBarProps = Omit<RenderComponentProps<'header'>, 'children'> & {
|
|
|
7
7
|
* the text on the bar rather than between the slots, so a bar with a
|
|
8
8
|
* leading icon and no actions still has its headline in the middle. The
|
|
9
9
|
* text moves off the middle only as far as a slot wider than the other
|
|
10
|
-
* needs, rather than running under it.
|
|
10
|
+
* needs, rather than running under it. Beside the slots, which is `sm` and
|
|
11
|
+
* a collapsed flexible bar, each line of centred text takes one line and
|
|
12
|
+
* is cut short with an ellipsis rather than wrapping.
|
|
11
13
|
* @default 'start'
|
|
12
14
|
*/
|
|
13
15
|
align?: 'center' | 'start';
|
|
@@ -78,7 +80,11 @@ type AppBarProps = Omit<RenderComponentProps<'header'>, 'children'> & {
|
|
|
78
80
|
* @default 1
|
|
79
81
|
*/
|
|
80
82
|
headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
81
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* The page's title. Wraps rather than truncating, and grows the bar with
|
|
85
|
+
* it, except beside the slots of a centred bar, where it takes one line and
|
|
86
|
+
* is cut short with an ellipsis — see `align`.
|
|
87
|
+
*/
|
|
82
88
|
headline?: ReactNode;
|
|
83
89
|
/**
|
|
84
90
|
* Usually a back or menu icon button. Sits before the text, and a standard
|