@kanso-labs/kanso-ui 0.40.4 → 0.40.6

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.
Files changed (98) hide show
  1. package/dist/button/hooks.js +37 -1
  2. package/dist/button/hooks.js.map +1 -1
  3. package/dist/button/index.d.ts +57 -1
  4. package/dist/button/index.js +153 -96
  5. package/dist/button/index.js.map +1 -1
  6. package/dist/button/toggle.js +17 -0
  7. package/dist/button/toggle.js.map +1 -0
  8. package/dist/calendar/index.js +69 -58
  9. package/dist/calendar/index.js.map +1 -1
  10. package/dist/calendar/styles.js +29 -6
  11. package/dist/calendar/styles.js.map +1 -1
  12. package/dist/chip/index.js +3 -4
  13. package/dist/chip/index.js.map +1 -1
  14. package/dist/chip/styles.js +2 -6
  15. package/dist/chip/styles.js.map +1 -1
  16. package/dist/collection/empty.js +7 -0
  17. package/dist/collection/empty.js.map +1 -0
  18. package/dist/collection/index.js +125 -2
  19. package/dist/collection/index.js.map +1 -1
  20. package/dist/collection/styles.js +14 -0
  21. package/dist/collection/styles.js.map +1 -1
  22. package/dist/components/app-bar/index.d.ts +26 -23
  23. package/dist/components/app-bar/index.js +89 -72
  24. package/dist/components/app-bar/index.js.map +1 -1
  25. package/dist/components/autocomplete/index.d.ts +6 -4
  26. package/dist/components/autocomplete/index.js +23 -14
  27. package/dist/components/autocomplete/index.js.map +1 -1
  28. package/dist/components/button/index.d.ts +15 -35
  29. package/dist/components/button/index.js +102 -74
  30. package/dist/components/button/index.js.map +1 -1
  31. package/dist/components/calendar/index.d.ts +9 -3
  32. package/dist/components/calendar/index.js +51 -42
  33. package/dist/components/calendar/index.js.map +1 -1
  34. package/dist/components/card/index.js +43 -27
  35. package/dist/components/card/index.js.map +1 -1
  36. package/dist/components/carousel/index.js +1 -1
  37. package/dist/components/checkbox/index.d.ts +9 -0
  38. package/dist/components/checkbox/index.js +47 -35
  39. package/dist/components/checkbox/index.js.map +1 -1
  40. package/dist/components/checkbox-group/index.js +1 -1
  41. package/dist/components/chip/index.d.ts +9 -4
  42. package/dist/components/chip/index.js.map +1 -1
  43. package/dist/components/chip-group/index.js +51 -37
  44. package/dist/components/chip-group/index.js.map +1 -1
  45. package/dist/components/copy-field/index.d.ts +28 -6
  46. package/dist/components/copy-field/index.js +140 -54
  47. package/dist/components/copy-field/index.js.map +1 -1
  48. package/dist/components/currency/index.d.ts +6 -2
  49. package/dist/components/currency/index.js +74 -46
  50. package/dist/components/currency/index.js.map +1 -1
  51. package/dist/components/disclosure/index.js +1 -1
  52. package/dist/components/icon-button/index.d.ts +6 -31
  53. package/dist/components/icon-button/index.js +64 -52
  54. package/dist/components/icon-button/index.js.map +1 -1
  55. package/dist/components/index.d.ts +2 -1
  56. package/dist/components/list/index.js +2 -2
  57. package/dist/components/list-box/index.d.ts +14 -2
  58. package/dist/components/list-box/index.js +16 -8
  59. package/dist/components/list-box/index.js.map +1 -1
  60. package/dist/components/list-item/index.js +1 -1
  61. package/dist/components/menu/index.d.ts +14 -1
  62. package/dist/components/menu/index.js +32 -17
  63. package/dist/components/menu/index.js.map +1 -1
  64. package/dist/components/navigation-tree/index.js +2 -2
  65. package/dist/components/radio-group/index.d.ts +4 -0
  66. package/dist/components/radio-group/index.js +2 -2
  67. package/dist/components/radio-group/index.js.map +1 -1
  68. package/dist/components/range-calendar/index.d.ts +9 -3
  69. package/dist/components/range-calendar/index.js +51 -42
  70. package/dist/components/range-calendar/index.js.map +1 -1
  71. package/dist/components/search-view/index.js +1 -1
  72. package/dist/components/segmented-button/index.d.ts +5 -4
  73. package/dist/components/segmented-button/index.js +3 -3
  74. package/dist/components/segmented-button/index.js.map +1 -1
  75. package/dist/components/split-button/index.d.ts +1 -1
  76. package/dist/components/split-button/index.js.map +1 -1
  77. package/dist/components/switch/index.d.ts +9 -2
  78. package/dist/components/switch/index.js +2 -2
  79. package/dist/components/switch/index.js.map +1 -1
  80. package/dist/components/table/index.js +3 -3
  81. package/dist/components/time-picker/index.js +1 -1
  82. package/dist/components/tree/index.js +2 -2
  83. package/dist/control/index.js +55 -17
  84. package/dist/control/index.js.map +1 -1
  85. package/dist/field/index.js +59 -51
  86. package/dist/field/index.js.map +1 -1
  87. package/dist/hooks/useAppBarScroll.d.ts +52 -0
  88. package/dist/hooks/useAppBarScroll.js +75 -0
  89. package/dist/hooks/useAppBarScroll.js.map +1 -0
  90. package/dist/i18n/index.js +2 -0
  91. package/dist/i18n/index.js.map +1 -1
  92. package/dist/i18n/messages.js +68 -0
  93. package/dist/i18n/messages.js.map +1 -1
  94. package/dist/index.d.ts +2 -1
  95. package/dist/index.js +3 -2
  96. package/dist/render/name.d.ts +22 -0
  97. package/dist/styles.css +83 -24
  98. package/package.json +4 -4
@@ -4,21 +4,27 @@ import { focus } from "../styles/focus.js";
4
4
  import { iconButton } from "../styles/icon-button.js";
5
5
  import { calendarStyles, dateLayers, menuLayers } from "./styles.js";
6
6
  import { c } from "react/compiler-runtime";
7
- import { useContext, useEffect, useId, useRef, useState } from "react";
7
+ import { useContext, useId, useRef, useState } from "react";
8
8
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
9
9
  import { Button, ButtonContext, CalendarGridHeader, CalendarHeaderCell, CalendarMonthPicker, CalendarStateContext, CalendarYearPicker, Heading, ListBox, ListBoxItem, RangeCalendarStateContext } from "react-aria-components";
10
10
  import { endOfMonth, startOfMonth } from "@internationalized/date";
11
11
  //#region src/calendar/index.tsx
12
+ const LISTED_YEARS = 201;
12
13
  /**
13
14
  * What a calendar draws above its months, and the months themselves. With
14
15
  * `showMonthYearMenus` the header is the date pickers page's docked one —
15
16
  * the month and the year as menu buttons — and while either is open its list
16
17
  * takes the months' place.
18
+ *
19
+ * The menus are for one visible month. They name and pick the first month
20
+ * alone, so a second grid beside it would have no visible month or year of
21
+ * its own; with more than one month the header is the plain one, whose
22
+ * heading names the whole range, both years included where it spans two.
17
23
  */
18
24
  function CalendarFrame(t0) {
19
25
  const $ = c(5);
20
- const { children, showMonthYearMenus } = t0;
21
- if (showMonthYearMenus) {
26
+ const { children, months, showMonthYearMenus } = t0;
27
+ if (showMonthYearMenus && months <= 1) {
22
28
  let t1;
23
29
  if ($[0] !== children) {
24
30
  t1 = /* @__PURE__ */ jsx(CalendarMenus, { children });
@@ -117,9 +123,10 @@ function calendarHeaderCell(day) {
117
123
  *
118
124
  * The lists are React Aria's month and year pickers, rendered twice: the
119
125
  * header names the month short, as the page's button does, and the list in
120
- * full. The year list holds the years `minValue` and `maxValue` allow and no
121
- * others, which React Aria bounds itself; a month with no day inside them is
122
- * disabled here.
126
+ * full. The year list runs a century either side of the year shown — React
127
+ * Aria's own default is ten, which took several passes through the list to
128
+ * reach a date of birth — and `minValue` and `maxValue` cut it short, which
129
+ * React Aria does itself. A month with no day inside them is disabled here.
123
130
  */
124
131
  function CalendarMenus(t0) {
125
132
  const $ = c(47);
@@ -298,11 +305,14 @@ function CalendarMenus(t0) {
298
305
  } else t20 = $[37];
299
306
  let t21;
300
307
  if ($[38] !== close || $[39] !== listId || $[40] !== open) {
301
- t21 = open === "year" ? /* @__PURE__ */ jsx(CalendarYearPicker, { children: (picker_3) => /* @__PURE__ */ jsx(MenuList, {
302
- id: listId,
303
- onClose: close,
304
- picker: picker_3
305
- }) }) : null;
308
+ t21 = open === "year" ? /* @__PURE__ */ jsx(CalendarYearPicker, {
309
+ visibleYears: LISTED_YEARS,
310
+ children: (picker_3) => /* @__PURE__ */ jsx(MenuList, {
311
+ id: listId,
312
+ onClose: close,
313
+ picker: picker_3
314
+ })
315
+ }) : null;
306
316
  $[38] = close;
307
317
  $[39] = listId;
308
318
  $[40] = open;
@@ -324,6 +334,22 @@ function CalendarMenus(t0) {
324
334
  } else t22 = $[46];
325
335
  return t22;
326
336
  }
337
+ /**
338
+ * Scrolls an open list so its checked entry sits in the middle, as the page
339
+ * draws it, with the entries either side of it in view. React Aria scrolls
340
+ * the entry it focuses only as far as the nearest edge, which left the year
341
+ * shown at the bottom with every later year out of sight; with it already
342
+ * centred, that scroll has nothing to do.
343
+ *
344
+ * A ref on the checked entry's check rather than an effect on the list,
345
+ * because React Aria builds its entries in a render of its own, after the
346
+ * list's effects have run: the ref is called as the entry is attached,
347
+ * before the first paint, so the list never draws a frame at its top and
348
+ * then jumps. The list's own scroll alone moves, where `scrollIntoView` would
349
+ * move the page around it too. A check rendered anywhere but an attached
350
+ * list — React Aria renders its entries once out of the document to collect
351
+ * them — finds no list and does nothing.
352
+ */
327
353
  function _temp3(entry_0) {
328
354
  return entry_0.id;
329
355
  }
@@ -333,6 +359,12 @@ function _temp2(current_0) {
333
359
  function _temp(current) {
334
360
  return current === "month" ? null : "month";
335
361
  }
362
+ function centreInList(check) {
363
+ const entry = check?.closest("[role=\"option\"]");
364
+ const list = check?.closest("[role=\"listbox\"]");
365
+ if (!(entry instanceof HTMLElement) || !(list instanceof HTMLElement)) return;
366
+ list.scrollTop += entry.getBoundingClientRect().top - list.getBoundingClientRect().top - (list.clientHeight - entry.offsetHeight) / 2;
367
+ }
336
368
  function chevronClassName(state, isHidden = false) {
337
369
  return props(iconButton.chrome, calendarStyles.chevron, focus.ring, state.isHovered && iconButton.chromeHovered, state.isPressed && iconButton.chromePressed, state.isDisabled && iconButton.chromeDisabled, isHidden && calendarStyles.chevronHidden).className ?? "";
338
370
  }
@@ -450,7 +482,10 @@ function menuEntry(entry) {
450
482
  });
451
483
  }
452
484
  function menuEntryContent(label) {
453
- return ({ isSelected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [isSelected ? /* @__PURE__ */ jsx(CheckGlyph, { ...props(calendarStyles.menuCheck) }) : /* @__PURE__ */ jsx("span", { ...props(calendarStyles.menuCheck) }), label] });
485
+ return ({ isSelected }) => /* @__PURE__ */ jsxs(Fragment$1, { children: [isSelected ? /* @__PURE__ */ jsx(CheckGlyph, {
486
+ ref: centreInList,
487
+ ...props(calendarStyles.menuCheck)
488
+ }) : /* @__PURE__ */ jsx("span", { ...props(calendarStyles.menuCheck) }), label] });
454
489
  }
455
490
  function menuItemClassName(state) {
456
491
  return 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 ?? "";
@@ -466,9 +501,8 @@ function menuItemClassName(state) {
466
501
  * it close a picker's dialog around the calendar.
467
502
  */
468
503
  function MenuList(t0) {
469
- const $ = c(15);
504
+ const $ = c(13);
470
505
  const { disabledKeys, id, onClose, picker } = t0;
471
- const list = useRef(null);
472
506
  let t1;
473
507
  if ($[0] !== picker.value) {
474
508
  t1 = [picker.value];
@@ -487,60 +521,37 @@ function MenuList(t0) {
487
521
  $[4] = t2;
488
522
  } else t2 = $[4];
489
523
  const choose = t2;
490
- let t3;
491
- let t4;
524
+ const t3 = picker["aria-label"];
525
+ const t4 = picker.items;
526
+ let t5;
492
527
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
493
- t3 = () => {
494
- const frame = requestAnimationFrame(() => {
495
- const element = list.current;
496
- const checked = element?.querySelector("[aria-selected=\"true\"]");
497
- if (element == null || !(checked instanceof HTMLElement)) return;
498
- element.scrollTop = element.scrollTop + (checked.getBoundingClientRect().top - element.getBoundingClientRect().top - (element.clientHeight - checked.offsetHeight) / 2);
499
- });
500
- return () => {
501
- cancelAnimationFrame(frame);
502
- };
503
- };
504
- t4 = [];
505
- $[5] = t3;
506
- $[6] = t4;
507
- } else {
508
- t3 = $[5];
509
- t4 = $[6];
510
- }
511
- useEffect(t3, t4);
512
- const t5 = picker["aria-label"];
513
- const t6 = picker.items;
514
- let t7;
515
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
516
- t7 = props(calendarStyles.menuList);
517
- $[7] = t7;
518
- } else t7 = $[7];
519
- let t8;
520
- if ($[8] !== choose || $[9] !== disabledKeys || $[10] !== id || $[11] !== picker.items || $[12] !== selected || $[13] !== t5) {
521
- t8 = /* @__PURE__ */ jsx(ListBox, {
522
- "aria-label": t5,
528
+ t5 = props(calendarStyles.menuList);
529
+ $[5] = t5;
530
+ } else t5 = $[5];
531
+ let t6;
532
+ if ($[6] !== choose || $[7] !== disabledKeys || $[8] !== id || $[9] !== picker.items || $[10] !== selected || $[11] !== t3) {
533
+ t6 = /* @__PURE__ */ jsx(ListBox, {
534
+ "aria-label": t3,
523
535
  autoFocus: true,
524
536
  disabledKeys,
525
537
  id,
526
- items: t6,
538
+ items: t4,
527
539
  onSelectionChange: choose,
528
- ref: list,
529
540
  selectedKeys: selected,
530
541
  selectionMode: "single",
531
542
  shouldSelectOnPressUp: true,
532
- ...t7,
543
+ ...t5,
533
544
  children: menuEntry
534
545
  });
535
- $[8] = choose;
536
- $[9] = disabledKeys;
537
- $[10] = id;
538
- $[11] = picker.items;
539
- $[12] = selected;
540
- $[13] = t5;
541
- $[14] = t8;
542
- } else t8 = $[14];
543
- return t8;
546
+ $[6] = choose;
547
+ $[7] = disabledKeys;
548
+ $[8] = id;
549
+ $[9] = picker.items;
550
+ $[10] = selected;
551
+ $[11] = t3;
552
+ $[12] = t6;
553
+ } else t6 = $[12];
554
+ return t6;
544
555
  }
545
556
  //#endregion
546
557
  export { CalendarFrame, CalendarGridHeader$1 as CalendarGridHeader };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["CalendarDate","ReactElement","ReactNode","Ref","Key","Selection","endOfMonth","startOfMonth","stylex","useCallback","useContext","useEffect","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","CalendarFrame","t0","$","_c","children","showMonthYearMenus","t1","Symbol","for","t2","calendarHeaderCell","CalendarHeader","props","header","chevronClassName","chevronGlyph","chevronGlyphPrevious","heading","t3","day","headerCell","CalendarMenus","single","range","state","open","setOpen","listId","monthButton","yearButton","button","requestAnimationFrame","current","close","_temp","toggleMonth","_temp2","toggleYear","isDisabled","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","isHovered","isPressed","isHidden","chrome","chevron","ring","chromeHovered","chromePressed","chromeDisabled","chevronHidden","className","isListOpen","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","list","selected","keys","choose","frame","element","checked","querySelector","HTMLElement","scrollTop","getBoundingClientRect","top","clientHeight","offsetHeight","cancelAnimationFrame","menuList","_c","CalendarGridHeader","RACCalendarGridHeader","stylex.props","RACButton","RACHeading","RACCalendarHeaderCell","RACCalendarMonthPicker","RACCalendarYearPicker","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, useEffect, 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/**\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 */\nfunction CalendarFrame({\n children,\n showMonthYearMenus\n}: {\n children: ReactNode;\n showMonthYearMenus: boolean;\n}): ReactElement {\n if (showMonthYearMenus) {\n return <CalendarMenus>{children}</CalendarMenus>;\n }\n return <>\n <CalendarHeader />\n {children}\n </>;\n}\nfunction CalendarGridHeader(): ReactElement {\n return <RACCalendarGridHeader>{calendarHeaderCell}</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 */\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 <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell)}>\n {day}\n </RACCalendarHeaderCell>;\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 holds the years `minValue` and `maxValue` allow and no\n * others, which React Aria bounds itself; a month with no day inside them is\n * 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>\n {picker => <MenuList id={listId} onClose={close} picker={picker} />}\n </RACCalendarYearPicker> : null}\n </>;\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/**\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 {...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 list = useRef<HTMLDivElement>(null);\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\n // The checked entry opens in the middle of the list, as the page draws it,\n // with the entries either side of it in view. React Aria scrolls the entry\n // it focuses only as far as the nearest edge, which left the year shown at\n // the bottom with every later year out of sight. A frame after opening,\n // since React Aria renders its entries a render after the list mounts and\n // scrolls once it has; and the list's own scroll alone moves, where\n // `scrollIntoView` would move the page around it too.\n useEffect(() => {\n const frame = requestAnimationFrame(() => {\n const element = list.current;\n const checked = element?.querySelector('[aria-selected=\"true\"]');\n if (element == null || !(checked instanceof HTMLElement)) {\n return;\n }\n element.scrollTop += checked.getBoundingClientRect().top - element.getBoundingClientRect().top - (element.clientHeight - checked.offsetHeight) / 2;\n });\n return () => {\n cancelAnimationFrame(frame);\n };\n }, []);\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} ref={list} 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, CalendarGridHeader };"],"mappings":";;;;;;;;;;;;;;;;;AAuCA,SAAAqD,cAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAuB,MAAA,EAAAC,UAAAC,uBAAAJ;CAOrB,IAAII,oBAAkB;EAAA,IAAAC;EAAA,IAAAJ,EAAA,OAAAE,UAAA;GACbE,KAAA,oBAAC,eAAD,EAAgBF,SAAF,CAAA;GAA2BF,EAAA,KAAAE;GAAAF,EAAA,KAAAI;EAAA,OAAAA,KAAAJ,EAAA;EAAA,OAAz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A,CAAA;EAAErC,EAAA,KAAAgB;EAAAhB,EAAA,KAAAqC;CAAA,OAAA;EAAArB,KAAAhB,EAAA;EAAAqC,KAAArC,EAAA;CAAA;CAZL5C,UAAU4D,IAYPqB,EAAE;CAC0B,MAAAU,KAAAT,OAAO;CAEe,MAAAU,KAAAV,OAAM7C;CAAM,IAAAyD;CAAA,IAAAlD,EAAA,OAAAK,OAAAC,IAAA,2BAAA,GAAA;EAIvC4C,KAAAjG,MAAagC,eAAcmJ,QAAS;EAACpI,EAAA,KAAAkD;CAAA,OAAAA,KAAAlD,EAAA;CAAA,IAAAmD;CAAA,IAAAnD,EAAA,OAAAwH,UAAAxH,EAAA,OAAAmH,gBAAAnH,EAAA,QAAAT,MAAAS,EAAA,QAAAsC,OAAA7C,SAAAO,EAAA,QAAAsH,YAAAtH,EAAA,QAAA+C,IAAA;EANxDI,KAAA,oBAAC4F,SAAD;GAAwB,cAAAhG;GAE/B,WAAA;GAAwBoE;GAAkB5H;GAAW,OAAAyD;GAAiCwE,mBAAAA;GAAaH,KAAAA;GAAoBC,cAAAA;GAAwB,eAAA;GAI/I,uBAAA;GAAqB,GAAKpE;GACrBiD,UAAAA;EAPa,CAAA;EAQHnG,EAAA,KAAAwH;EAAAxH,EAAA,KAAAmH;EAAAnH,EAAA,MAAAT;EAAAS,EAAA,MAAAsC,OAAA7C;EAAAO,EAAA,MAAAsH;EAAAtH,EAAA,MAAA+C;EAAA/C,EAAA,MAAAmD;CAAA,OAAAA,KAAAnD,EAAA;CAAA,OARRmD;AAQQ"}
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","calendarHeaderCell","CalendarHeader","props","header","chevronClassName","chevronGlyph","chevronGlyphPrevious","heading","t3","day","headerCell","CalendarMenus","single","range","state","open","setOpen","listId","monthButton","yearButton","button","requestAnimationFrame","current","close","_temp","toggleMonth","_temp2","toggleYear","isDisabled","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","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","RACCalendarHeaderCell","RACCalendarMonthPicker","RACCalendarYearPicker","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}\nfunction CalendarGridHeader(): ReactElement {\n return <RACCalendarGridHeader>{calendarHeaderCell}</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 */\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 <RACCalendarHeaderCell {...stylex.props(calendarStyles.headerCell)}>\n {day}\n </RACCalendarHeaderCell>;\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/**\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, CalendarGridHeader };"],"mappings":";;;;;;;;;;;AAqCA,MAAMoD,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;AAEP,SAAA5C,uBAAA;CAAA,MAAAoC,IAAAC,EAAA,CAAA;CAAA,IAAAF;CAAA,IAAAC,EAAA,OAAAM,OAAAC,IAAA,2BAAA,GAAA;EACSR,KAAA,oBAACwI,oBAAD,EAAA,UAAwB9H,mBAAF,CAAA;EAA6CT,EAAA,KAAAD;CAAA,OAAAA,KAAAC,E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,MAAAiI;EAAAjI,EAAA,MAAAiB;EAAAjB,EAAA,MAAAiD;CAAA,OAAAA,KAAAjD,EAAA;CAAA,OARRiD;AAQQ"}
@@ -1,6 +1,9 @@
1
1
  //#region src/calendar/styles.ts
2
2
  const calendarStyles = {
3
3
  cell: {
4
+ kgeoSG: "x1cpjm7i",
5
+ kFcpXp: "x15kbrqr",
6
+ kEoFBp: "x1hmns74",
4
7
  kGNEyG: "x6s0dn4",
5
8
  kWkggS: "xjbqb8w",
6
9
  kZKoxP: "x1vqgdyp",
@@ -16,7 +19,9 @@ const calendarStyles = {
16
19
  kjj79g: "xl56j7k",
17
20
  kb6lSQ: "x1qn8t5l",
18
21
  kLWn49: "xh7dzej",
19
- kUOVxO: "x34s64n",
22
+ kqGvvJ: "x8yh5r3",
23
+ kUOVxO: "xvueqy4",
24
+ kVAEAm: "x1n2onr6",
20
25
  $$css: true
21
26
  },
22
27
  cellDisabled: {
@@ -70,7 +75,11 @@ const calendarStyles = {
70
75
  $$css: true
71
76
  },
72
77
  chevron: {
78
+ kgeoSG: "x1cpjm7i",
79
+ kFcpXp: "x15kbrqr",
80
+ kEoFBp: "x1hmns74",
73
81
  kUOVxO: "x34s64n",
82
+ kVAEAm: "x1n2onr6",
74
83
  $$css: true
75
84
  },
76
85
  chevronGlyph: {
@@ -91,6 +100,7 @@ const calendarStyles = {
91
100
  kLvRdT: "x1vathgz",
92
101
  kheTzg: "x1gukg7c",
93
102
  kzqmXN: "xh8yej3",
103
+ kPzzVL: "x140o2bo",
94
104
  $$css: true
95
105
  },
96
106
  header: {
@@ -102,7 +112,7 @@ const calendarStyles = {
102
112
  $$css: true
103
113
  },
104
114
  headerCell: {
105
- kZKoxP: "x1vqgdyp",
115
+ kZKoxP: "xsdox4t",
106
116
  kMwMTN: "x139gbkf",
107
117
  kMv6JI: "x16svsjw",
108
118
  kGuDYH: "x1848etk",
@@ -138,6 +148,10 @@ const calendarStyles = {
138
148
  $$css: true
139
149
  },
140
150
  menuButton: {
151
+ kgeoSG: "x1cpjm7i",
152
+ kGOzcv: "x1sk10ar",
153
+ kpsdNU: "xm4btww",
154
+ kEoFBp: "x1hmns74",
141
155
  kGNEyG: "x6s0dn4",
142
156
  kWkggS: "xjbqb8w",
143
157
  kZKoxP: "x1rv7mn0",
@@ -155,6 +169,7 @@ const calendarStyles = {
155
169
  kb6lSQ: "x155f00i",
156
170
  kLWn49: "x1lz68p4",
157
171
  kg3NbH: "xn60lsn",
172
+ kVAEAm: "x1n2onr6",
158
173
  $$css: true
159
174
  },
160
175
  menuCheck: {
@@ -200,7 +215,7 @@ const calendarStyles = {
200
215
  $$css: true
201
216
  },
202
217
  menuList: {
203
- kZKoxP: "x1mj9p22",
218
+ kZKoxP: "xmmrubu",
204
219
  kLZC3w: "x12smttz",
205
220
  kPef9Z: "x13fuv20",
206
221
  kEafiO: "x178xt8z",
@@ -210,12 +225,19 @@ const calendarStyles = {
210
225
  kORKVm: "x1odjw0f",
211
226
  $$css: true
212
227
  },
228
+ month: {
229
+ kB7OPa: "x9f619",
230
+ kzqmXN: "x1url4ad",
231
+ ks0D6T: "x193iq5w",
232
+ $$css: true
233
+ },
213
234
  months: {
214
235
  kGNEyG: "x7a106z",
215
236
  k1xSpc: "x78zum5 x1yrkhk",
216
237
  kOIVth: "xj2l1yv",
217
- kJBjZk: "x12n7ir1",
218
- kAzted: "x1fivsg2",
238
+ kJBjZk: "x17udjhq",
239
+ kumcoG: "x1kji8p3",
240
+ kAzted: "x8chfrn",
219
241
  $$css: true
220
242
  },
221
243
  root: {
@@ -227,7 +249,8 @@ const calendarStyles = {
227
249
  kXwgrk: "xdt5ytf",
228
250
  kOIVth: "x1gka490",
229
251
  kzqmXN: "xeq5yr9",
230
- k7Eaqz: "x1gvwcb",
252
+ ks0D6T: "x193iq5w",
253
+ k7Eaqz: "xjrddbv",
231
254
  kmVPX3: "xa36j16",
232
255
  $$css: true
233
256
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["stylex","colors","media","radii","sizing","spacing","stateLayerOpacity","typography","ROW_BLOCK_SIZE","WEEKS_HELD","FORCED_COLORS","calendarStyles","cell","kGNEyG","kWkggS","kZKoxP","kaIpWk","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kMv6JI","kGuDYH","k63SB2","kzqmXN","kjj79g","kb6lSQ","kLWn49","kUOVxO","$$css","cellDisabled","kAXs8y","cellInRange","kVAM5u","kjBf7l","cellRangeEnd","kT0f0o","kfmiAY","cellRangeStart","kVL7Gh","krdFHd","cellSelected","cellToday","ksu8eU","kMzoRj","cellUnavailable","kMnn75","chevron","chevronGlyph","k3aq6I","chevronGlyphPrevious","chevronHidden","k33iCy","grid","kLvRdT","kheTzg","header","kOIVth","kAzted","headerCell","headerGroup","heading","kogj98","k9WMMc","menuArrow","kmuXW","menuArrowExpanded","menuButton","kg3NbH","menuCheck","menuItem","k3XXqK","menuItemDisabled","menuItemFocused","kInvED","kMeerF","menuItemSelected","menuList","kLZC3w","kPef9Z","kEafiO","kORKVm","months","kJBjZk","root","kXwgrk","k7Eaqz","kmVPX3","dateLayers","inRangeHovered","inRangePressed","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.\n\n// One row of the grid. The weekday row and every week of dates are the same\n// 40dp, so `cell`, `headerCell` and the room `months` reserves are all this\n// one number — a date resized without the reservation following it would put\n// the calendar's height back on its month.\nconst ROW_BLOCK_SIZE = '40px';\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 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 kUOVxO: \"x34s64n\",\n $$css: true\n },\n cellDisabled: {\n kWkggS: \"xjbqb8w\",\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 cellRangeEnd: {\n kT0f0o: \"x187kppt\",\n kfmiAY: \"x1fpsnkq\",\n $$css: true\n },\n cellRangeStart: {\n kVL7Gh: \"x17kgqx\",\n krdFHd: \"x1uni95s\",\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 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 kUOVxO: \"x34s64n\",\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 $$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: \"x1vqgdyp\",\n kMwMTN: \"x139gbkf\",\n kMv6JI: \"x16svsjw\",\n kGuDYH: \"x1848etk\",\n k63SB2: \"x1c52epr\",\n kb6lSQ: \"x1qn8t5l\",\n kLWn49: \"xh7dzej\",\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 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 $$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: \"x1mj9p22\",\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 months: {\n kGNEyG: \"x7a106z\",\n k1xSpc: \"x78zum5 x1yrkhk\",\n kOIVth: \"xj2l1yv\",\n kJBjZk: \"x12n7ir1\",\n kAzted: \"x1fivsg2\",\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 k7Eaqz: \"x1gvwcb\",\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, and the selected circle. From React Aria's render state rather than `:hover` and `:active`, for Button's\n// reasons — see its header: a hover layer stayed on after a tap, and no\n// pressed layer 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 circle 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 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":";AA6CA,MAAMW,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,OAAO;CACT;CACAC,cAAc;EACZhB,QAAQ;EACRI,QAAQ;EACRC,QAAQ;EACRY,QAAQ;EACRF,OAAO;CACT;CACAG,aAAa;EACXlB,QAAQ;EACRmB,QAAQ;EACRjB,QAAQ;EACRE,QAAQ;EACRa,QAAQ;EACRP,QAAQ;EACRI,QAAQ;EACRM,QAAQ;EACRL,OAAO;CACT;CACAM,cAAc;EACZC,QAAQ;EACRC,QAAQ;EACRR,OAAO;CACT;CACAS,gBAAgB;EACdC,QAAQ;EACRC,QAAQ;E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QAAQ;EACRe,OAAO;CACT;CACA+D,cAAc;EACZ9E,QAAQ;EACRe,OAAO;CACT;CACAgE,iBAAiB;EACf/E,QAAQ;EACRe,OAAO;CACT;CACAiE,iBAAiB;EACfhF,QAAQ;EACRe,OAAO;CACT;AACF;AAKA,MAAMkE,aAAa;CACjBF,iBAAiB;EACf/E,QAAQ;EACRe,OAAO;CACT;CACAiE,iBAAiB;EACfhF,QAAQ;EACRe,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","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","kAXs8y","cellInRange","kVAM5u","kjBf7l","cellRangeEnd","kT0f0o","kfmiAY","cellRangeStart","kVL7Gh","krdFHd","cellSelected","cellToday","ksu8eU","kMzoRj","cellUnavailable","kMnn75","chevron","chevronGlyph","k3aq6I","chevronGlyphPrevious","chevronHidden","k33iCy","grid","kLvRdT","kheTzg","kPzzVL","header","kOIVth","kAzted","headerCell","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","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.\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 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 cellRangeEnd: {\n kT0f0o: \"x187kppt\",\n kfmiAY: \"x1fpsnkq\",\n $$css: true\n },\n cellRangeStart: {\n kVL7Gh: \"x17kgqx\",\n krdFHd: \"x1uni95s\",\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 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 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, and the selected circle. From React Aria's render state rather than `:hover` and `:active`, for Button's\n// reasons — see its header: a hover layer stayed on after a tap, and no\n// pressed layer 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 circle 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 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":";AA8DA,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;EACRI,QAAQ;EACRC,QAAQ;EACRc,QAAQ;EACRF,OAAO;CACT;CACAG,aAAa;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QAAQ;EACRzD,OAAO;CACT;CACA0D,QAAQ;EACN5E,QAAQ;EACRO,QAAQ;EACRwC,QAAQ;EACR8B,QAAQ;EACRC,QAAQ;EACR9B,QAAQ;EACR9B,OAAO;CACT;CACA6D,MAAM;EACJ9E,QAAQ;EACRE,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRE,QAAQ;EACRyE,QAAQ;EACRjC,QAAQ;EACRpC,QAAQ;EACRgE,QAAQ;EACRM,QAAQ;EACRC,QAAQ;EACRhE,OAAO;CACT;AACF;AASA,MAAMiE,aAAa;CACjBC,gBAAgB;EACdnF,QAAQ;EACRiB,OAAO;CACT;CACAmE,gBAAgB;EACdpF,QAAQ;EACRiB,OAAO;CACT;CACAoE,cAAc;EACZrF,QAAQ;EACRiB,OAAO;CACT;CACAqE,cAAc;EACZtF,QAAQ;EACRiB,OAAO;CACT;CACAsE,iBAAiB;EACfvF,QAAQ;EACRiB,OAAO;CACT;CACAuE,iBAAiB;EACfxF,QAAQ;EACRiB,OAAO;CACT;AACF;AAKA,MAAMwE,aAAa;CACjBF,iBAAiB;EACfvF,QAAQ;EACRiB,OAAO;CACT;CACAuE,iBAAiB;EACfxF,QAAQ;EACRiB,OAAO;CACT;AACF"}
@@ -78,13 +78,12 @@ const CONTAINERS = {
78
78
  *
79
79
  * `elevated` raises the chip off the page on a container of its own, and
80
80
  * `kind` names which of the page's chips it is, which decides the label's
81
- * role. `inGroup` is a ChipGroup's chip, whose touch target reaches only
82
- * halfway across the gap to the next row; see `targetInGroup` in `./styles`.
81
+ * role.
83
82
  */
84
- function chipPropsFor(state, { elevated = false, inGroup = false, kind = "filter" } = {}) {
83
+ function chipPropsFor(state, { elevated = false, kind = "filter" } = {}) {
85
84
  const roles = CONTAINERS[containerOf(state.isSelected, elevated)];
86
85
  const raised = elevated && !state.isDisabled;
87
- return props(chipStyles.base, chipStyles.target, inGroup && chipStyles.targetInGroup, focus.ring, state.isSelected ? chipStyles.selected : chipStyles.unselected, elevated && !state.isSelected && chipStyles.elevated, kind === "assist" && chipStyles.assist, raised && chipStyles.raised, state.isHovered && roles.hovered, raised && state.isHovered && chipStyles.raisedHovered, state.isFocusVisible && roles.focused, state.isPressed && roles.pressed, state.isDisabled && chipStyles.disabled, state.isDisabled && roles.disabled);
86
+ return props(chipStyles.base, chipStyles.target, focus.ring, state.isSelected ? chipStyles.selected : chipStyles.unselected, elevated && !state.isSelected && chipStyles.elevated, kind === "assist" && chipStyles.assist, raised && chipStyles.raised, state.isHovered && roles.hovered, raised && state.isHovered && chipStyles.raisedHovered, state.isFocusVisible && roles.focused, state.isPressed && roles.pressed, state.isDisabled && chipStyles.disabled, state.isDisabled && roles.disabled);
88
87
  }
89
88
  /**
90
89
  * The close target's class, from its button's own render state, so its
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["ReactNode","stylex","CheckGlyph","focus","chipLayers","chipStyles","chipGlyph","state","isDisabled","isSelected","icon","props","glyph","glyphSvg","undefined","chipLabel","children","label","CONTAINERS","elevated","disabled","elevatedDisabled","focused","elevatedFocused","hovered","elevatedHovered","pressed","elevatedPressed","selected","disabledSelected","selectedFocused","selectedHovered","selectedPressed","unselected","disabledUnselected","unselectedFocused","unselectedHovered","unselectedPressed","ChipKind","chipPropsFor","isFocusVisible","isHovered","isPressed","inGroup","kind","roles","containerOf","raised","base","target","targetInGroup","ring","assist","raisedHovered","chipRemoveClassName","remove","removeHovered","removePressed","className","stylex.props"],"sources":["../../src/chip/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { CheckGlyph } from '../glyphs';\nimport { focus } from '../styles/focus';\nimport { chipLayers, chipStyles } from './styles';\n\n/**\n * What a chip draws before its label: the check while it is selected, its own\n * icon while it is not, and nothing for an unselected chip with no icon.\n * Returns a node rather than letting the type be inferred, since `ReactNode`\n * is a union that includes a promise and an inferred one has to be `async`.\n *\n * The check takes the icon's place rather than joining it, as the chips page\n * draws a filter chip and as a segmented button's segments do. So a chip with\n * an icon keeps its width when it is chosen, where one without grows by the\n * slot.\n *\n * Shared rather than written at each of the two call sites: Chip and\n * ChipGroup's chip draw the same pill from `./styles`, and a check written\n * twice is the drift that module exists to stop. Not a component of the\n * library's own and not exported from the package; see `src/row` for the\n * same arrangement around a list's row.\n */\nfunction chipGlyph(state: {\n isDisabled: boolean;\n isSelected: boolean;\n}, icon?: ReactNode): ReactNode {\n if (state.isSelected) {\n return <span {...stylex.props(chipStyles.glyph)}>\n <CheckGlyph {...stylex.props(chipStyles.glyphSvg)} />\n </span>;\n }\n if (icon === undefined || icon === null) {\n return null;\n }\n return <span {...stylex.props(chipStyles.glyph, !state.isDisabled && chipStyles.icon)}>\n {icon}\n </span>;\n}\n\n/**\n * The label a chip draws, in a span of its own so it can be cut short with an\n * ellipsis rather than wrapped out of the pill; see the header of `./styles`.\n * Shared for the reason `chipGlyph` is, by all three components that draw the\n * pill.\n */\nfunction chipLabel(children: ReactNode): ReactNode {\n return <span {...stylex.props(chipStyles.label)}>{children}</span>;\n}\n\n// The three containers a chip can be on, with the layers and the disabled\n// treatment each takes. A table rather than a branch per state, so the\n// containers cannot differ in which states they answer.\nconst CONTAINERS = {\n elevated: {\n disabled: chipStyles.elevatedDisabled,\n focused: chipLayers.elevatedFocused,\n hovered: chipLayers.elevatedHovered,\n pressed: chipLayers.elevatedPressed\n },\n selected: {\n disabled: chipStyles.disabledSelected,\n focused: chipLayers.selectedFocused,\n hovered: chipLayers.selectedHovered,\n pressed: chipLayers.selectedPressed\n },\n unselected: {\n disabled: chipStyles.disabledUnselected,\n focused: chipLayers.unselectedFocused,\n hovered: chipLayers.unselectedHovered,\n pressed: chipLayers.unselectedPressed\n }\n};\n\n/** Which of the page's chips a pill is drawn as. */\ntype ChipKind = 'assist' | 'filter' | 'suggestion';\n\n/**\n * The pill's styles in the render state React Aria hands a chip's\n * `className`, for Chip's two buttons and ChipGroup's tag alike. StyleX\n * cannot target `[data-selected]` on the element it is styling, so the\n * container is chosen here rather than in CSS — which is also why an\n * uncontrolled chip styles itself without keeping a copy of its state.\n *\n * Shared for the reason `chipGlyph` is: the order is the precedence. The\n * hover, focus and pressed layers come from the render state over the\n * container — focus over hover, and a press over both — and disabled comes\n * last so it wins over all of them, since StyleX replaces a property whole.\n *\n * `elevated` raises the chip off the page on a container of its own, and\n * `kind` names which of the page's chips it is, which decides the label's\n * role. `inGroup` is a ChipGroup's chip, whose touch target reaches only\n * halfway across the gap to the next row; see `targetInGroup` in `./styles`.\n */\nfunction chipPropsFor(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n}, {\n elevated = false,\n inGroup = false,\n kind = 'filter'\n}: {\n elevated?: boolean;\n inGroup?: boolean;\n kind?: ChipKind;\n} = {}) {\n const roles = CONTAINERS[containerOf(state.isSelected, elevated)];\n const raised = elevated && !state.isDisabled;\n return stylex.props(chipStyles.base, chipStyles.target, inGroup && chipStyles.targetInGroup, focus.ring, state.isSelected ? chipStyles.selected : chipStyles.unselected, elevated && !state.isSelected && chipStyles.elevated, kind === 'assist' && chipStyles.assist, raised && chipStyles.raised, state.isHovered && roles.hovered, raised && state.isHovered && chipStyles.raisedHovered, state.isFocusVisible && roles.focused, state.isPressed && roles.pressed, state.isDisabled && chipStyles.disabled, state.isDisabled && roles.disabled);\n}\n\n/**\n * The close target's class, from its button's own render state, so its\n * hover and pressed layers follow React Aria's report rather than `:hover`\n * and `:active` — see `chipLayers`. A function, which React Aria's\n * `className` takes alongside a string.\n */\nfunction chipRemoveClassName(state: {\n isHovered: boolean;\n isPressed: boolean;\n}) {\n return stylex.props(chipStyles.remove, state.isHovered && chipLayers.removeHovered, state.isPressed && chipLayers.removePressed).className ?? '';\n}\n\n// Which container a chip is on: the secondary container while selected,\n// elevated or not, and otherwise the elevated one or the outline.\nfunction containerOf(isSelected: boolean, elevated: boolean) {\n if (isSelected) {\n return 'selected';\n }\n return elevated ? 'elevated' : 'unselected';\n}\nexport type { ChipKind };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aAAaJ,WAAWuB,WAAWvB,WAAW4B,YAAYd,YAAY,CAACZ,MAAME,cAAcJ,WAAWc,UAAUyB,SAAS,YAAYvC,WAAW+C,QAAQL,UAAU1C,WAAW0C,QAAQxC,MAAMkC,aAAaI,MAAMrB,SAASuB,UAAUxC,MAAMkC,aAAapC,WAAWgD,eAAe9C,MAAMiC,kBAAkBK,MAAMvB,SAASf,MAAMmC,aAAaG,MAAMnB,SAASnB,MAAMC,cAAcH,WAAWe,UAAUb,MAAMC,cAAcqC,MAAMzB,QAAQ;AACnhB;;;;;;;AAQA,SAASkC,oBAAoB/C,OAG1B;CACD,OAAON,MAAaI,WAAWkD,QAAQhD,MAAMkC,aAAarC,WAAWoD,eAAejD,MAAMmC,aAAatC,WAAWqD,aAAa,CAAC,CAACC,aAAa;AAChJ;AAIA,SAASZ,YAAYrC,YAAqBU,UAAmB;CAC3D,IAAIV,YACF,OAAO;CAET,OAAOU,WAAW,aAAa;AACjC"}
1
+ {"version":3,"file":"index.js","names":["ReactNode","stylex","CheckGlyph","focus","chipLayers","chipStyles","chipGlyph","state","isDisabled","isSelected","icon","props","glyph","glyphSvg","undefined","chipLabel","children","label","CONTAINERS","elevated","disabled","elevatedDisabled","focused","elevatedFocused","hovered","elevatedHovered","pressed","elevatedPressed","selected","disabledSelected","selectedFocused","selectedHovered","selectedPressed","unselected","disabledUnselected","unselectedFocused","unselectedHovered","unselectedPressed","ChipKind","chipPropsFor","isFocusVisible","isHovered","isPressed","kind","roles","containerOf","raised","base","target","ring","assist","raisedHovered","chipRemoveClassName","remove","removeHovered","removePressed","className","stylex.props"],"sources":["../../src/chip/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport * as stylex from '@stylexjs/stylex';\nimport { CheckGlyph } from '../glyphs';\nimport { focus } from '../styles/focus';\nimport { chipLayers, chipStyles } from './styles';\n\n/**\n * What a chip draws before its label: the check while it is selected, its own\n * icon while it is not, and nothing for an unselected chip with no icon.\n * Returns a node rather than letting the type be inferred, since `ReactNode`\n * is a union that includes a promise and an inferred one has to be `async`.\n *\n * The check takes the icon's place rather than joining it, as the chips page\n * draws a filter chip and as a segmented button's segments do. So a chip with\n * an icon keeps its width when it is chosen, where one without grows by the\n * slot.\n *\n * Shared rather than written at each of the two call sites: Chip and\n * ChipGroup's chip draw the same pill from `./styles`, and a check written\n * twice is the drift that module exists to stop. Not a component of the\n * library's own and not exported from the package; see `src/row` for the\n * same arrangement around a list's row.\n */\nfunction chipGlyph(state: {\n isDisabled: boolean;\n isSelected: boolean;\n}, icon?: ReactNode): ReactNode {\n if (state.isSelected) {\n return <span {...stylex.props(chipStyles.glyph)}>\n <CheckGlyph {...stylex.props(chipStyles.glyphSvg)} />\n </span>;\n }\n if (icon === undefined || icon === null) {\n return null;\n }\n return <span {...stylex.props(chipStyles.glyph, !state.isDisabled && chipStyles.icon)}>\n {icon}\n </span>;\n}\n\n/**\n * The label a chip draws, in a span of its own so it can be cut short with an\n * ellipsis rather than wrapped out of the pill; see the header of `./styles`.\n * Shared for the reason `chipGlyph` is, by all three components that draw the\n * pill.\n */\nfunction chipLabel(children: ReactNode): ReactNode {\n return <span {...stylex.props(chipStyles.label)}>{children}</span>;\n}\n\n// The three containers a chip can be on, with the layers and the disabled\n// treatment each takes. A table rather than a branch per state, so the\n// containers cannot differ in which states they answer.\nconst CONTAINERS = {\n elevated: {\n disabled: chipStyles.elevatedDisabled,\n focused: chipLayers.elevatedFocused,\n hovered: chipLayers.elevatedHovered,\n pressed: chipLayers.elevatedPressed\n },\n selected: {\n disabled: chipStyles.disabledSelected,\n focused: chipLayers.selectedFocused,\n hovered: chipLayers.selectedHovered,\n pressed: chipLayers.selectedPressed\n },\n unselected: {\n disabled: chipStyles.disabledUnselected,\n focused: chipLayers.unselectedFocused,\n hovered: chipLayers.unselectedHovered,\n pressed: chipLayers.unselectedPressed\n }\n};\n\n/** Which of the page's chips a pill is drawn as. */\ntype ChipKind = 'assist' | 'filter' | 'suggestion';\n\n/**\n * The pill's styles in the render state React Aria hands a chip's\n * `className`, for Chip's two buttons and ChipGroup's tag alike. StyleX\n * cannot target `[data-selected]` on the element it is styling, so the\n * container is chosen here rather than in CSS — which is also why an\n * uncontrolled chip styles itself without keeping a copy of its state.\n *\n * Shared for the reason `chipGlyph` is: the order is the precedence. The\n * hover, focus and pressed layers come from the render state over the\n * container — focus over hover, and a press over both — and disabled comes\n * last so it wins over all of them, since StyleX replaces a property whole.\n *\n * `elevated` raises the chip off the page on a container of its own, and\n * `kind` names which of the page's chips it is, which decides the label's\n * role.\n */\nfunction chipPropsFor(state: {\n isDisabled: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n isPressed: boolean;\n isSelected: boolean;\n}, {\n elevated = false,\n kind = 'filter'\n}: {\n elevated?: boolean;\n kind?: ChipKind;\n} = {}) {\n const roles = CONTAINERS[containerOf(state.isSelected, elevated)];\n const raised = elevated && !state.isDisabled;\n return stylex.props(chipStyles.base, chipStyles.target, focus.ring, state.isSelected ? chipStyles.selected : chipStyles.unselected, elevated && !state.isSelected && chipStyles.elevated, kind === 'assist' && chipStyles.assist, raised && chipStyles.raised, state.isHovered && roles.hovered, raised && state.isHovered && chipStyles.raisedHovered, state.isFocusVisible && roles.focused, state.isPressed && roles.pressed, state.isDisabled && chipStyles.disabled, state.isDisabled && roles.disabled);\n}\n\n/**\n * The close target's class, from its button's own render state, so its\n * hover and pressed layers follow React Aria's report rather than `:hover`\n * and `:active` — see `chipLayers`. A function, which React Aria's\n * `className` takes alongside a string.\n */\nfunction chipRemoveClassName(state: {\n isHovered: boolean;\n isPressed: boolean;\n}) {\n return stylex.props(chipStyles.remove, state.isHovered && chipLayers.removeHovered, state.isPressed && chipLayers.removePressed).className ?? '';\n}\n\n// Which container a chip is on: the secondary container while selected,\n// elevated or not, and otherwise the elevated one or the outline.\nfunction containerOf(isSelected: boolean, elevated: boolean) {\n if (isSelected) {\n return 'selected';\n }\n return elevated ? 'elevated' : 'unselected';\n}\nexport type { ChipKind };\nexport { chipGlyph,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