@kanso-labs/kanso-ui 0.45.34 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/dist/button/index.js +13 -9
  2. package/dist/button/index.js.map +1 -1
  3. package/dist/calendar/styles.js +12 -7
  4. package/dist/calendar/styles.js.map +1 -1
  5. package/dist/chip/styles.js +1 -0
  6. package/dist/chip/styles.js.map +1 -1
  7. package/dist/collection/styles.js +1 -1
  8. package/dist/collection/styles.js.map +1 -1
  9. package/dist/components/breadcrumbs/index.js +4 -1
  10. package/dist/components/breadcrumbs/index.js.map +1 -1
  11. package/dist/components/button-group/index.d.ts +16 -3
  12. package/dist/components/button-group/index.js +53 -86
  13. package/dist/components/button-group/index.js.map +1 -1
  14. package/dist/components/calendar/index.d.ts +3 -3
  15. package/dist/components/calendar/index.js.map +1 -1
  16. package/dist/components/card/index.js +5 -1
  17. package/dist/components/card/index.js.map +1 -1
  18. package/dist/components/carousel/index.js +162 -105
  19. package/dist/components/carousel/index.js.map +1 -1
  20. package/dist/components/chip/index.d.ts +38 -15
  21. package/dist/components/chip/index.js +104 -8
  22. package/dist/components/chip/index.js.map +1 -1
  23. package/dist/components/color-area/index.d.ts +5 -3
  24. package/dist/components/color-area/index.js +5 -3
  25. package/dist/components/color-area/index.js.map +1 -1
  26. package/dist/components/color-picker/index.js +6 -3
  27. package/dist/components/color-picker/index.js.map +1 -1
  28. package/dist/components/color-swatch-picker/index.js +24 -9
  29. package/dist/components/color-swatch-picker/index.js.map +1 -1
  30. package/dist/components/combo-box/index.d.ts +11 -3
  31. package/dist/components/combo-box/index.js +66 -62
  32. package/dist/components/combo-box/index.js.map +1 -1
  33. package/dist/components/copy-field/index.js +1 -0
  34. package/dist/components/copy-field/index.js.map +1 -1
  35. package/dist/components/date-picker/index.d.ts +22 -3
  36. package/dist/components/date-picker/index.js +234 -45
  37. package/dist/components/date-picker/index.js.map +1 -1
  38. package/dist/components/date-range-picker/index.d.ts +3 -1
  39. package/dist/components/date-range-picker/index.js +6 -4
  40. package/dist/components/date-range-picker/index.js.map +1 -1
  41. package/dist/components/disclosure/index.d.ts +4 -3
  42. package/dist/components/disclosure/index.js +159 -101
  43. package/dist/components/disclosure/index.js.map +1 -1
  44. package/dist/components/fab/index.d.ts +3 -1
  45. package/dist/components/fab/index.js +25 -12
  46. package/dist/components/fab/index.js.map +1 -1
  47. package/dist/components/fab-menu/index.js +1 -1
  48. package/dist/components/fab-menu/index.js.map +1 -1
  49. package/dist/components/icon-button/index.js.map +1 -1
  50. package/dist/components/index.d.ts +2 -2
  51. package/dist/components/menu/index.js +1 -1
  52. package/dist/components/menu/index.js.map +1 -1
  53. package/dist/components/navigation-rail/index.js +4 -4
  54. package/dist/components/navigation-rail/index.js.map +1 -1
  55. package/dist/components/navigation-tree/index.js +16 -13
  56. package/dist/components/navigation-tree/index.js.map +1 -1
  57. package/dist/components/popover/index.js +35 -33
  58. package/dist/components/popover/index.js.map +1 -1
  59. package/dist/components/range-calendar/index.js +41 -7
  60. package/dist/components/range-calendar/index.js.map +1 -1
  61. package/dist/components/segmented-button/index.d.ts +3 -2
  62. package/dist/components/segmented-button/index.js +46 -95
  63. package/dist/components/segmented-button/index.js.map +1 -1
  64. package/dist/components/select/index.js +5 -2
  65. package/dist/components/select/index.js.map +1 -1
  66. package/dist/components/slider/index.js +42 -10
  67. package/dist/components/slider/index.js.map +1 -1
  68. package/dist/components/time-picker/index.js +2 -0
  69. package/dist/components/time-picker/index.js.map +1 -1
  70. package/dist/components/token-field/index.js +89 -66
  71. package/dist/components/token-field/index.js.map +1 -1
  72. package/dist/components/toolbar/index.d.ts +4 -0
  73. package/dist/components/toolbar/index.js +16 -5
  74. package/dist/components/toolbar/index.js.map +1 -1
  75. package/dist/components/tree/index.js +1 -1
  76. package/dist/components/tree/index.js.map +1 -1
  77. package/dist/fab/styles.js +12 -0
  78. package/dist/fab/styles.js.map +1 -1
  79. package/dist/field/styles.js +2 -2
  80. package/dist/field/styles.js.map +1 -1
  81. package/dist/hooks/useDockedMonths.js +36 -0
  82. package/dist/hooks/useDockedMonths.js.map +1 -0
  83. package/dist/i18n/index.js +1 -0
  84. package/dist/i18n/index.js.map +1 -1
  85. package/dist/i18n/messages.js +34 -0
  86. package/dist/i18n/messages.js.map +1 -1
  87. package/dist/index.d.ts +2 -2
  88. package/dist/navigation/index.js +5 -5
  89. package/dist/navigation/index.js.map +1 -1
  90. package/dist/navigation/styles.js +4 -0
  91. package/dist/navigation/styles.js.map +1 -1
  92. package/dist/row/context.js +6 -0
  93. package/dist/row/context.js.map +1 -0
  94. package/dist/row/index.js +77 -66
  95. package/dist/row/index.js.map +1 -1
  96. package/dist/row/styles.js +15 -0
  97. package/dist/row/styles.js.map +1 -1
  98. package/dist/segments/index.js +2 -1
  99. package/dist/segments/index.js.map +1 -1
  100. package/dist/segments/styles.js +4 -0
  101. package/dist/segments/styles.js.map +1 -1
  102. package/dist/styles/chequer.js +1 -0
  103. package/dist/styles/chequer.js.map +1 -1
  104. package/dist/styles/focus.js.map +1 -1
  105. package/dist/styles.css +158 -35
  106. package/dist/toggle-group/index.js +133 -0
  107. package/dist/toggle-group/index.js.map +1 -0
  108. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useState","RACMenuItem","textOf","fabIconSizes","fabSizes","fabStyles","fabTones","useRipple","focus","mergeStatefulStyles","styles","closeButton","kZKoxP","kaIpWk","kzqmXN","$$css","closeIcon","kGuDYH","item","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kMv6JI","k63SB2","kOIVth","kb6lSQ","kLWn49","kAzted","k7Eaqz","k3XXqK","kVQacm","kg3NbH","kVAEAm","khDVqt","itemDisabled","kWkggS","kMwMTN","itemFocused","kjBf7l","kInvED","kMeerF","trigger","kIyJzY","k1ekBW","kAMwcw","ToneContext","children","className","icon","style","container","defaultOpen","isOpen","onAction","onOpenChange","size","tone","FabMenu","t0","$","label","t1","ref","t2","t3","undefined","ownOpen","setOwnOpen","open","t4","next","changeOpen","t5","triggerClasses","t6","props","t7","t8","t9","t10","t11","t12","t13","FabMenuItem","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","ripple","T0","handlers","itemClasses","md","surface","state","tonal","isHovered","hovered","isFocused","focused","isFocusVisible","isPressed","pressed","isDisabled","base","ring","filled","disabled","Item","RACMenu","RACPopover","RACMenuTrigger"],"sources":["../../../src/components/fab-menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, Key, MenuItemRenderProps, MenuItemProps as RACMenuItemProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, Popover as RACPopover, Text } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { FabSize, FabTone } from '../fab';\nimport { ButtonBase } from '../../button';\nimport { textOf } from '../../collection/text';\nimport { fabIconSizes, fabSizes, fabStyles, fabTones } from '../../fab/styles';\nimport { CloseGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The FAB menu page's menu: a FAB that opens two to six related actions\n// floating above it, in place of a speed dial. Open, the FAB becomes the\n// menu's close button — the pages' 56dp circle in the tone itself, with a\n// 20dp close mark — and the actions stand in a column 8dp above it, lined up\n// on its trailing edge, each a 56dp pill on the tone's container pair with\n// 24dp at either end, a 24dp icon 8dp before a title-medium label, 4dp apart\n// and raised on the level 3 shadow. The values are the page's, read from\n// Material Design's own FAB menu tokens. The three tones are the page's three\n// colour sets: the close button takes the tone and the actions its\n// container, so the two contrast as the page draws them.\n//\n// The FAB is the menu's own rather than a child the call site places, as\n// Menu's trigger is, because what it draws depends on whether the menu is\n// open, and the menu is what knows. Closed, it is Fab at any of its sizes,\n// with Fab's styles; it shrinks to the close button's 56dp as the menu opens,\n// keeping the corner its layout anchors it by, and its corner rounds and its\n// colour deepens over the same medium duration. A reader who asks for\n// reduced motion gets the change at once.\n//\n// React Aria's `MenuTrigger`, `Menu` and `MenuItem` supply the behaviour: the\n// FAB's `aria-expanded`, the arrow keys between the actions, Escape and an\n// outside press to close, and focus returned to the FAB. The surface is\n// React Aria's `Popover` with nothing drawn on it, since each action is a\n// container of its own; it arrives over the overlay module's short duration,\n// as every popup does, and leaves at once, for the reason that module\n// gives.\n//\n// Under forced colours the shadows go and the containers are painted over,\n// so the FAB and each action are drawn as a 1px `ButtonText` rule.\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)';\n\n// The actions rise into place from just below where they settle.\nconst riseIn = \"x1uknk9t-B\";\nconst styles = {\n closeButton: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"x16rqkct\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n closeIcon: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n item: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k7Eaqz: \"x13ijof9\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xb3r6kr\",\n kg3NbH: \"xg0ps1x\",\n kVAEAm: \"x1n2onr6\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n itemDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n itemFocused: {\n kjBf7l: \"x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n trigger: {\n kIyJzY: \"xioksi3 x12w9bfk\",\n k1ekBW: \"x104ni8d\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n }\n};\n\n// What a tone draws its actions in: the container pair, as the close button\n// takes the tone itself.\nconst ToneContext = createContext<FabTone>('primary');\ntype FabMenuItemProps = Omit<RACMenuItemProps, 'children' | 'className' | 'style'> & {\n /** The action's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the action's render state. */\n className?: ClassNameOrFunction<MenuItemRenderProps>;\n /** An icon before the label, at the page's 24px. */\n icon?: ReactNode;\n /** A function may compute the style from the action's render state. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n};\ntype FabMenuProps = {\n /**\n * What the FAB does, in words: an icon alone has no name, and the menu\n * takes its name from the FAB that opens it.\n */\n 'aria-label': string;\n /** The actions, as `FabMenu.Item`s — the page asks for two to six. */\n children: ReactNode;\n /**\n * A function may compute the class from the FAB's render state. It lands\n * on the FAB, which is what a layout positions.\n */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Where the actions are portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or they render outside and keep the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** The FAB's icon while the menu is closed. */\n icon: ReactNode;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an action's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The FAB's size while the menu is closed, as Fab's: `md` 56px, `lg` 80px\n * or `xl` 96px. Open, it is the close button's 56px whatever it was.\n * @default 'md'\n */\n size?: FabSize;\n /** A function may compute the style from the FAB's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * The page's three colour sets: the close button takes the tone and the\n * actions its container pair.\n * @default 'primary'\n */\n tone?: FabTone;\n} & RefAttributes<HTMLButtonElement>;\n\n/**\n * A FAB that opens a column of related actions above it, and closes them\n * again. The actions are `FabMenu.Item`s.\n *\n * ```tsx\n * <FabMenu aria-label=\"Label\" icon={<PlusIcon />}>\n * <FabMenu.Item icon={<FirstIcon />} id=\"first\">\n * First item\n * </FabMenu.Item>\n * <FabMenu.Item icon={<SecondIcon />} id=\"second\">\n * Second item\n * </FabMenu.Item>\n * </FabMenu>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the FAB.\n */\nfunction FabMenu({\n 'aria-label': label,\n children,\n className,\n container,\n defaultOpen = false,\n icon,\n isOpen,\n onAction,\n onOpenChange,\n ref,\n size = 'md',\n style,\n tone = 'primary'\n}: FabMenuProps) {\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n return <ToneContext value={tone}>\n <RACMenuTrigger isOpen={open} onOpenChange={changeOpen}>\n <ButtonBase aria-label={label} classes={triggerClasses(open, size, tone)} className={className} ref={ref} style={style}>\n <span {...stylex.props(fabStyles.icon, open ? styles.closeIcon : fabIconSizes[size])}>\n {open ? <CloseGlyph className=\"xlzyvqe x15vhz18\" /> : icon}\n </span>\n </ButtonBase>\n <RACPopover offset={8} placement=\"top end\"\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} className=\"xvhm28k x1u6grsq xhpbw76 x16dv9tl x9f619 x1t137rt\">\n <RACMenu onAction={onAction} className=\"xuk3077 x9f619 x78zum5 xdt5ytf xzoy561 x1t137rt\">\n {children}\n </RACMenu>\n </RACPopover>\n </RACMenuTrigger>\n </ToneContext>;\n}\n\n/**\n * One action: a pill holding an icon and a label, on the menu's tone.\n * Choosing it closes the menu.\n */\nfunction FabMenuItem({\n children,\n icon,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n textValue,\n ...props\n}: FabMenuItemProps & RefAttributes<HTMLDivElement>) {\n const tone = useContext(ToneContext);\n // The press ripple Menu's items draw — see MenuItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(tone), props)}>\n {icon === undefined ? null : <span {...stylex.props(fabStyles.icon, fabIconSizes.md)}>{icon}</span>}\n <Text slot=\"label\">{children}</Text>\n {ripple.surface}\n </RACMenuItem>;\n}\n\n// An action's classes, from React Aria's render state: the tone's container\n// pair, and the layers over it. Built by a call rather than written inline at\n// the prop, which is what react-perf's no-new-function-as-prop is after.\nfunction itemClasses(tone: FabTone) {\n return (state: MenuItemRenderProps) => stylex.props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);\n}\n\n// The FAB's classes: Fab's own while the menu is closed, the close button's\n// while it is open. A press layer is drawn only while closed — React Aria\n// reports the FAB pressed for as long as its menu is open.\nfunction triggerClasses(isOpen: boolean, size: FabSize, tone: FabTone) {\n return (state: ButtonState) => stylex.props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, !isOpen && state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);\n}\nFabMenu.Item = FabMenuItem;\nexport type { FabMenuItemProps, FabMenuProps };\nexport { FabMenuItem };\nexport default FabMenu;"],"mappings":";;;;;;;;;;;;;;AAyDA,MAAMc,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRF,OAAO;CACT;CACAG,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;CACAwB,cAAc;EACZC,QAAQ;EACRpB,QAAQ;EACRG,QAAQ;EACRkB,QAAQ;EACRhB,QAAQ;EACRV,OAAO;CACT;CACA2B,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRV,QAAQ;EACRW,QAAQ;EACR9B,OAAO;CACT;CACA+B,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRlC,OAAO;CACT;AACF;AAIA,MAAMmC,cAAcpD,cAAuB,SAAS;;;;;;;;;;;;;;;;;;AA6EpD,SAAAgE,QAAAC,IAAA;CAAA,MAAAC,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MAAA+B,OAAAK;EAAApC,EAAA,MAAAI;EAAAJ,EAAA,MAAAU;EAAAV,EAAA,MAAAa;EAAAb,EAAA,MAAAe;EAAAf,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAJTiB;AAIS;AAMlB,SAASiB,YAAYrC,MAAe;CAClC,QAAQwC,UAA+BxG,MAAaa,OAAOQ,MAAMZ,SAASgG,MAAMzC,OAAOwC,MAAME,aAAalG,UAAUmG,SAASH,MAAMI,aAAapG,UAAUqG,SAASL,MAAMM,kBAAkBjG,OAAOgC,aAAa2D,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAcpG,OAAO6B,YAAY;AAC9R;AAKA,SAASuC,eAAerB,QAAiBG,MAAeC,MAAe;CACrE,QAAQwC,UAAuBxG,MAAaQ,UAAU0G,MAAMvG,MAAMwG,MAAMtG,OAAOoC,SAASW,SAASnD,SAAS2G,OAAOpD,QAAQvD,SAASgG,MAAMzC,OAAOJ,SAAS/C,OAAOC,cAAcP,SAASwD,OAAOyC,MAAME,aAAalG,UAAUmG,SAASH,MAAMM,kBAAkBtG,UAAUqG,SAAS,CAACjD,UAAU4C,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAczG,UAAU6G,QAAQ;AACvW;AACApD,QAAQqD,OAAO3B"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useState","RACMenuItem","textOf","fabIconSizes","fabSizes","fabStyles","fabTones","useRipple","focus","mergeStatefulStyles","styles","closeButton","kZKoxP","kaIpWk","kzqmXN","$$css","closeIcon","kGuDYH","item","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kMv6JI","k63SB2","kOIVth","kb6lSQ","kLWn49","kAzted","k7Eaqz","k3XXqK","kVQacm","kg3NbH","kVAEAm","khDVqt","itemDisabled","kWkggS","kMwMTN","itemFocused","kjBf7l","kInvED","kMeerF","trigger","kIyJzY","k1ekBW","kAMwcw","ToneContext","children","className","icon","style","container","defaultOpen","isOpen","onAction","onOpenChange","size","tone","FabMenu","t0","$","label","t1","ref","t2","t3","undefined","ownOpen","setOwnOpen","open","t4","next","changeOpen","t5","triggerClasses","t6","props","t7","t8","t9","t10","t11","t12","t13","FabMenuItem","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","ripple","T0","handlers","itemClasses","md","surface","state","tonal","isHovered","hovered","isFocused","focused","isFocusVisible","isPressed","pressed","isDisabled","base","ring","filled","disabled","Item","RACMenu","RACPopover","RACMenuTrigger"],"sources":["../../../src/components/fab-menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, Key, MenuItemRenderProps, MenuItemProps as RACMenuItemProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, Popover as RACPopover, Text } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { FabSize, FabTone } from '../fab';\nimport { ButtonBase } from '../../button';\nimport { textOf } from '../../collection/text';\nimport { fabIconSizes, fabSizes, fabStyles, fabTones } from '../../fab/styles';\nimport { CloseGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The FAB menu page's menu: a FAB that opens two to six related actions\n// floating above it, in place of a speed dial. Open, the FAB becomes the\n// menu's close button — the pages' 56dp circle in the tone itself, with a\n// 20dp close mark — and the actions stand in a column 8dp above it, lined up\n// on its trailing edge, each a 56dp pill on the tone's container pair with\n// 24dp at either end, a 24dp icon 8dp before a title-medium label, 4dp apart\n// and raised on the level 3 shadow. The values are the page's, read from\n// Material Design's own FAB menu tokens. The three tones are the page's three\n// colour sets: the close button takes the tone and the actions its\n// container, so the two contrast as the page draws them.\n//\n// The FAB is the menu's own rather than a child the call site places, as\n// Menu's trigger is, because what it draws depends on whether the menu is\n// open, and the menu is what knows. Closed, it is Fab at any of its sizes,\n// with Fab's styles; it shrinks to the close button's 56dp as the menu opens,\n// keeping the corner its layout anchors it by, and its corner rounds and its\n// colour deepens over the same medium duration. A reader who asks for\n// reduced motion gets the change at once.\n//\n// React Aria's `MenuTrigger`, `Menu` and `MenuItem` supply the behaviour: the\n// FAB's `aria-expanded`, the arrow keys between the actions, Escape and an\n// outside press to close, and focus returned to the FAB. The surface is\n// React Aria's `Popover` with nothing drawn on it, since each action is a\n// container of its own; it arrives over the overlay module's short duration,\n// as every popup does, and leaves at once, for the reason that module\n// gives.\n//\n// Under forced colours the shadows go and the containers are painted over,\n// so the FAB and each action are drawn as a 1px `ButtonText` rule.\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)';\n\n// The actions rise into place from just below where they settle.\nconst riseIn = \"x1uknk9t-B\";\nconst styles = {\n closeButton: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"x16rqkct\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n closeIcon: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n item: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k7Eaqz: \"x13ijof9\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xb3r6kr\",\n kg3NbH: \"xg0ps1x\",\n kVAEAm: \"x1n2onr6\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n itemDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n itemFocused: {\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n trigger: {\n kIyJzY: \"xioksi3 x12w9bfk\",\n k1ekBW: \"x104ni8d\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n }\n};\n\n// What a tone draws its actions in: the container pair, as the close button\n// takes the tone itself.\nconst ToneContext = createContext<FabTone>('primary');\ntype FabMenuItemProps = Omit<RACMenuItemProps, 'children' | 'className' | 'style'> & {\n /** The action's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the action's render state. */\n className?: ClassNameOrFunction<MenuItemRenderProps>;\n /** An icon before the label, at the page's 24px. */\n icon?: ReactNode;\n /** A function may compute the style from the action's render state. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n};\ntype FabMenuProps = {\n /**\n * What the FAB does, in words: an icon alone has no name, and the menu\n * takes its name from the FAB that opens it.\n */\n 'aria-label': string;\n /** The actions, as `FabMenu.Item`s — the page asks for two to six. */\n children: ReactNode;\n /**\n * A function may compute the class from the FAB's render state. It lands\n * on the FAB, which is what a layout positions.\n */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Where the actions are portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or they render outside and keep the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** The FAB's icon while the menu is closed. */\n icon: ReactNode;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an action's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The FAB's size while the menu is closed, as Fab's: `md` 56px, `lg` 80px\n * or `xl` 96px. Open, it is the close button's 56px whatever it was.\n * @default 'md'\n */\n size?: FabSize;\n /** A function may compute the style from the FAB's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * The page's three colour sets: the close button takes the tone and the\n * actions its container pair.\n * @default 'primary'\n */\n tone?: FabTone;\n} & RefAttributes<HTMLButtonElement>;\n\n/**\n * A FAB that opens a column of related actions above it, and closes them\n * again. The actions are `FabMenu.Item`s.\n *\n * ```tsx\n * <FabMenu aria-label=\"Label\" icon={<PlusIcon />}>\n * <FabMenu.Item icon={<FirstIcon />} id=\"first\">\n * First item\n * </FabMenu.Item>\n * <FabMenu.Item icon={<SecondIcon />} id=\"second\">\n * Second item\n * </FabMenu.Item>\n * </FabMenu>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the FAB.\n */\nfunction FabMenu({\n 'aria-label': label,\n children,\n className,\n container,\n defaultOpen = false,\n icon,\n isOpen,\n onAction,\n onOpenChange,\n ref,\n size = 'md',\n style,\n tone = 'primary'\n}: FabMenuProps) {\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n return <ToneContext value={tone}>\n <RACMenuTrigger isOpen={open} onOpenChange={changeOpen}>\n <ButtonBase aria-label={label} classes={triggerClasses(open, size, tone)} className={className} ref={ref} style={style}>\n <span {...stylex.props(fabStyles.icon, open ? styles.closeIcon : fabIconSizes[size])}>\n {open ? <CloseGlyph className=\"xlzyvqe x15vhz18\" /> : icon}\n </span>\n </ButtonBase>\n <RACPopover offset={8} placement=\"top end\"\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} className=\"xvhm28k x1u6grsq xhpbw76 x16dv9tl x9f619 x1t137rt\">\n <RACMenu onAction={onAction} className=\"xuk3077 x9f619 x78zum5 xdt5ytf xzoy561 x1t137rt\">\n {children}\n </RACMenu>\n </RACPopover>\n </RACMenuTrigger>\n </ToneContext>;\n}\n\n/**\n * One action: a pill holding an icon and a label, on the menu's tone.\n * Choosing it closes the menu.\n */\nfunction FabMenuItem({\n children,\n icon,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n textValue,\n ...props\n}: FabMenuItemProps & RefAttributes<HTMLDivElement>) {\n const tone = useContext(ToneContext);\n // The press ripple Menu's items draw — see MenuItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(tone), props)}>\n {icon === undefined ? null : <span {...stylex.props(fabStyles.icon, fabIconSizes.md)}>{icon}</span>}\n <Text slot=\"label\">{children}</Text>\n {ripple.surface}\n </RACMenuItem>;\n}\n\n// An action's classes, from React Aria's render state: the tone's container\n// pair, and the layers over it. Built by a call rather than written inline at\n// the prop, which is what react-perf's no-new-function-as-prop is after.\nfunction itemClasses(tone: FabTone) {\n return (state: MenuItemRenderProps) => stylex.props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);\n}\n\n// The FAB's classes: Fab's own while the menu is closed, the close button's\n// while it is open. A press layer is drawn only while closed — React Aria\n// reports the FAB pressed for as long as its menu is open.\nfunction triggerClasses(isOpen: boolean, size: FabSize, tone: FabTone) {\n return (state: ButtonState) => stylex.props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, !isOpen && state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);\n}\nFabMenu.Item = FabMenuItem;\nexport type { FabMenuItemProps, FabMenuProps };\nexport { FabMenuItem };\nexport default FabMenu;"],"mappings":";;;;;;;;;;;;;;AAyDA,MAAMc,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRF,OAAO;CACT;CACAG,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,QAAQ;EACRW,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRvB,OAAO;CACT;CACAwB,cAAc;EACZC,QAAQ;EACRpB,QAAQ;EACRG,QAAQ;EACRkB,QAAQ;EACRhB,QAAQ;EACRV,OAAO;CACT;CACA2B,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRV,QAAQ;EACRW,QAAQ;EACR9B,OAAO;CACT;CACA+B,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRlC,OAAO;CACT;AACF;AAIA,MAAMmC,cAAcpD,cAAuB,SAAS;;;;;;;;;;;;;;;;;;AA6Ep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,EAAA,MAAA+B,OAAAE;EAAAjC,EAAA,MAAA+B,OAAAK;EAAApC,EAAA,MAAAI;EAAAJ,EAAA,MAAAU;EAAAV,EAAA,MAAAa;EAAAb,EAAA,MAAAe;EAAAf,EAAA,MAAAiB;CAAA,OAAAA,KAAAjB,EAAA;CAAA,OAJTiB;AAIS;AAMlB,SAASiB,YAAYrC,MAAe;CAClC,QAAQwC,UAA+BxG,MAAaa,OAAOQ,MAAMZ,SAASgG,MAAMzC,OAAOwC,MAAME,aAAalG,UAAUmG,SAASH,MAAMI,aAAapG,UAAUqG,SAASL,MAAMM,kBAAkBjG,OAAOgC,aAAa2D,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAcpG,OAAO6B,YAAY;AAC9R;AAKA,SAASuC,eAAerB,QAAiBG,MAAeC,MAAe;CACrE,QAAQwC,UAAuBxG,MAAaQ,UAAU0G,MAAMvG,MAAMwG,MAAMtG,OAAOoC,SAASW,SAASnD,SAAS2G,OAAOpD,QAAQvD,SAASgG,MAAMzC,OAAOJ,SAAS/C,OAAOC,cAAcP,SAASwD,OAAOyC,MAAME,aAAalG,UAAUmG,SAASH,MAAMM,kBAAkBtG,UAAUqG,SAAS,CAACjD,UAAU4C,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAczG,UAAU6G,QAAQ;AACvW;AACApD,QAAQqD,OAAO3B"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","useContext","ToggleGroupStateContext","ButtonBase","ButtonGroupItemContext","groupPressHandlers","useSelection","pressThen","focus","sizing","styles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","kVAEAm","kybGjl","kIyJzY","k1ekBW","kAMwcw","$$css","disabled","filled","kWkggS","kMwMTN","filledDisabled","filledToggle","filledToggleSelected","lg","kZKoxP","kGuDYH","kzqmXN","md","kgeoSG","kFcpXp","kEoFBp","outlined","outlinedDisabled","outlinedToggleSelected","outlinedToggleSelectedDisabled","pending","standard","standardDisabled","standardToggleSelected","standardToggleSelectedDisabled","tonal","tonalDisabled","tonalToggleSelected","xl","xs","xxl","hovered","focused","pressed","outlineWidths","EDGES","controlLg","controlSm","controlXl","controlXs","controlXxl","_temp","shifted","width","value","val","undefined","roundShapes","kaIpWk","selectedShapes","toggleStyles","selected","unselected","toggleContainers","disabledStyles","selectedDisabledStyles","pendingLabel","size","variant","groupStyles","group","state","shift","IconButton","t0","$","defaultSelected","href","isPending","isSelected","onChange","rel","ownSize","target","t1","props","inSelectingGroup","press","onPressStart","onPressEnd","t2","selection","t3","toggleStyleProps","isToggle","T0","iconButtonClasses","t4","t5","onPress","toggle","t6","ring","isHovered","isFocusVisible","isPressed","isDisabled","container"],"sources":["../../../src/components/icon-button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, DOMRenderFunction, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext } from 'react';\nimport { ToggleGroupStateContext } from 'react-aria-components';\nimport type { ButtonClassesState, ButtonDOMProps, ButtonForm, ButtonState } from '../../button';\nimport type { ButtonGroupItem } from '../../button/context';\nimport { ButtonBase, ToggleButtonBase } from '../../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { groupPressHandlers } from '../../button/group';\nimport { useSelection } from '../../button/hooks';\nimport { pressThen } from '../../button/toggle';\nimport { focus } from '../../styles/focus';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, sizing, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\n\n// Each variant composites an 'on-color' over its own container at the\n// interaction state's opacity, rather than swapping in a separate hover\n// color. The pairs are the icon buttons spec page's: filled on primary,\n// tonal on secondary container, outlined with an outline variant border and\n// an on-surface-variant icon, standard on surface variant over nothing.\n// calc(<opacity> * 100%) turns the token's unitless 0-1 ratio into the\n// percentage color-mix() takes. Inlined at each property rather than factored\n// into a helper: @stylexjs/babel-plugin only statically recognizes\n// expressions written directly as property values.\n//\n// **The outlined rule is faint on purpose.** Outline variant sits at about\n// 1.6:1 against the surface in the light theme and 2:1 in the dark, under the\n// 3:1 WCAG asks of a boundary that identifies a control. The rule is not that\n// boundary: the icon identifies the button, in on-surface-variant at about\n// 9:1, and the rule only shows how far the button reaches. Button's outlined\n// variant draws its rule in the same role for the same reason.\n//\n// Disabled is a style of its own per variant rather than a `:disabled`\n// branch inside each property, for the reason Button's comment gives: given\n// `href` this renders as a link, which React Aria turns into a <span> while\n// disabled, and neither matches the pseudo-class. Applied last from the\n// render state, the disabled styles replace each property whole, hover and\n// pressed branches included.\n//\n// **The outlined border thickens with the size, and the widths are Button's\n// rather than this page's.** The icon buttons page keeps them in a size token\n// set its widget will not open to a script, and the two components already\n// share their five heights on purpose — a 96dp icon button beside a 96dp\n// outlined button with a different border weight would read as a mistake.\n//\n// **A toggle is the same button reporting a state.** Given `isSelected`,\n// `defaultSelected` or `onChange` it is React Aria's `ToggleButton` instead\n// of its `Button`, which announces the state through `aria-pressed` rather\n// than a role of its own — every variant and size still applies. The page\n// gives each style a second pair of colour roles for it, and they are not\n// the plain button's: a filled toggle rests on surface container with an\n// on-surface-variant icon and takes primary once chosen, a tonal one rests\n// on secondary container and takes secondary, and a standard one is\n// transparent throughout with the icon going from on-surface-variant to\n// primary, and an outlined one swaps its border for the inverse surface\n// pair. So a chosen filled toggle looks like a plain filled button, and an\n// unchosen one does not.\n//\n// A toggle is never a link and never pending. React Aria's `ToggleButton`\n// takes neither, and neither means anything for a control whose whole job is\n// to report which of two states it is in.\n//\n// The corner softens from a circle to a rounded square while pressed, which\n// is the shape morph the icon buttons spec page gives this control, at the\n// pressed corner its size token set names: 8 for the two small sizes, 12 at\n// medium, 16 at the two large. Each size carries its own pressed radius, since\n// StyleX replaces the property whole. The transitioned properties take two\n// curves — the container, icon and rule colours the standard one, the corner\n// and a group's change of width the emphasized one — so the timing functions\n// are a matching comma list rather than one value. All of them move at once\n// for a reader who asks for reduced motion.\n//\n// A chosen toggle rests at that same pressed corner, which is the page's\n// shape morph: a toggle icon button moves from round while unchosen to\n// square once chosen. The square shape's own corner sits in a token set the\n// page keeps behind its size menu, but the page also says both shapes press\n// to the same radius — so the size's pressed corner is the value it already\n// assigns to that size, used here at rest rather than invented.\n//\n// The circle is half the button's edge as a length, not the pill token's\n// 9999px. The browser draws a corner no larger than half the box but eases\n// the value as written, so from 9999px a press spent all but the last frame\n// or two of its 150ms above the 20dp a medium button can show: the corner\n// held round and then jumped. Nor is it 50%, which a standard ButtonGroup\n// would stretch into an ellipse as it narrows the buttons beside a pressed\n// one, where a length still draws their ends round.\n//\n// **Under forced colours a container is drawn as a rule, and a chosen toggle\n// as the mode's own chosen pair.** That mode paints author backgrounds in a\n// system colour and forces the icon's, which left a filled or tonal icon\n// button as an icon with nothing round it and a chosen toggle the same as an\n// unchosen one. `base` draws a 1px `ButtonText` border there, as Button's\n// does. Outlined keeps its own rule, and standard stays without one, as the\n// page draws it. A chosen toggle of any style is filled `Highlight` with its\n// icon in `HighlightText`. A disabled button's icon and edge are `GrayText`,\n// for the reason Button's comment gives: the browser greys a disabled\n// `<button>` there, but not the `<span>` a disabled link is.\n//\n// **A disabled toggle keeps an edge for its corner to show on.** Disabled,\n// every variant takes one grey, so the corner it rests at is what tells a\n// chosen toggle from an unchosen one, and a corner shows only where\n// something is drawn round it. Filled and tonal keep their disabled\n// container, and an unchosen outlined toggle its disabled rule. A chosen\n// outlined toggle trades its rule for a container, which the disabled style\n// cleared, so it takes on-surface at the disabled-container opacity, where\n// Material Design's own tokens give that state a faint on-surface container\n// too. A chosen standard\n// toggle takes the same faint container over nothing. That departs from the\n// page, which draws a standard toggle with no container in any state, and\n// it is the one way the two states of a disabled standard toggle differ at\n// all. Under forced colours, which paint both containers over, the chosen\n// outlined toggle keeps its `GrayText` rule and the chosen standard one\n// draws one, in place of the rule its variant otherwise goes without.\n//\n// What every button does past its own styles — the ripple, the link and\n// toggle forms, the pending ring, a parent's disabled state — is\n// `src/button`'s, shared with Button.\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)';\n\n/**\n * The press area the page requires of its two smallest sizes. A literal\n * rather than `sizing.controlMd`, which holds the same number: that is a step\n * of the control scale, and a consumer resizing their medium controls should\n * not shrink a target the page states as a floor.\n */\nconst TARGET_SIZE = '48px';\nconst styles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x1n2onr6\",\n kybGjl: \"x1hl2dhg\",\n kIyJzY: \"x1pvxwa0 x12w9bfk\",\n k1ekBW: \"x1ss3tkz\",\n kAMwcw: \"xcviomn\",\n $$css: true\n },\n disabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n filled: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n filledDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1mjdul6\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n $$css: true\n },\n lg: {\n kZKoxP: \"xs1ryiz\",\n kGuDYH: \"x1pvqxga\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n md: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x1q69gdh\",\n kEoFBp: \"x1hmns74\",\n kZKoxP: \"x1rv7mn0\",\n kGuDYH: \"x1pvqxga\",\n kzqmXN: \"x1eujcsb\",\n $$css: true\n },\n outlined: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x133yhug\",\n ksu8eU: \"x1y0btm7\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n outlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3 xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1c5gpgi x1jzqe4\",\n kVAM5u: \"x9r1u3d x1n2ykn\",\n kMwMTN: \"x1girmi0 x1k5gbb1\",\n $$css: true\n },\n outlinedToggleSelectedDisabled: {\n kWkggS: \"xepofeg\",\n $$css: true\n },\n pending: {\n kkrTdU: \"x19v85br\",\n $$css: true\n },\n standard: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kMwMTN: \"x11wi6qo\",\n $$css: true\n },\n standardDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"xjbqb8w x1jzqe4\",\n kMzoRj: \"xc342km\",\n kMwMTN: \"x1mxwv8y x1k5gbb1\",\n $$css: true\n },\n standardToggleSelectedDisabled: {\n kWkggS: \"x19v6zzp\",\n kVAM5u: \"xmnqt3w\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x15dekr4\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n tonalDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x167r6xl x1jzqe4\",\n kMwMTN: \"x1lba3jz x1k5gbb1\",\n $$css: true\n },\n xl: {\n kZKoxP: \"x1xaimp3\",\n kGuDYH: \"x1s3cmhv\",\n kzqmXN: \"xszbqgh\",\n $$css: true\n },\n xs: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x1n6cgzf\",\n kEoFBp: \"x1hmns74\",\n kZKoxP: \"xig8zya\",\n kGuDYH: \"xwsyq91\",\n kzqmXN: \"x11ts1a5\",\n $$css: true\n },\n xxl: {\n kZKoxP: \"x173yhrv\",\n kGuDYH: \"x1tgwohi\",\n kzqmXN: \"xz1kjiq\",\n $$css: true\n }\n};\n\n// The hover, focus and pressed layers, one style per container, applied from\n// React Aria's render state rather than from `:hover`, `:focus-visible` and\n// `:active`, for Button's reasons — see its header: a hover layer stayed on\n// after a tap, and no pressed layer or corner showed for a press made from\n// the keyboard. In the order they are applied, so where two hold the later\n// wins, as the page draws one layer at a time: focus over hover, and a press\n// over both. A chosen toggle's layer keeps its forced-colours `Highlight`,\n// since a later style replaces the property whole.\nconst hovered = {\n filled: {\n kWkggS: \"xo1ct44\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"xtxe0ya\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1hxzsxp x1jzqe4\",\n $$css: true\n },\n standard: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"x659ado x1jzqe4\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12r95rf x1jzqe4\",\n $$css: true\n }\n};\nconst focused = {\n filled: {\n kWkggS: \"xhodiby\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1ppcb1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xhodiby x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x19p5drm\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"xn4e5mw x1jzqe4\",\n $$css: true\n },\n standard: {\n kWkggS: \"x19p5drm\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"x1sog3nf x1jzqe4\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x16tkg7c x1jzqe4\",\n $$css: true\n }\n};\nconst pressed = {\n filled: {\n kWkggS: \"x7b25lv\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1qdfkg1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x167cdfs x1jzqe4\",\n $$css: true\n },\n standard: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"x1dvjsmr x1jzqe4\",\n $$css: true\n },\n tonal: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12o6fnv x1jzqe4\",\n $$css: true\n }\n};\n\n// The outlined border thickens with the size, as Button's does: 1dp up to M,\n// 2dp at XL, 3dp at XXL. A style per size rather than a value in the size\n// style, since a border on a filled button would draw in the icon's colour.\nconst outlineWidths = {\n lg: {\n kMzoRj: \"xmkeg23\",\n $$css: true\n },\n md: {\n kMzoRj: \"xmkeg23\",\n $$css: true\n },\n xl: {\n kMzoRj: \"xdh2fpr\",\n $$css: true\n },\n xs: {\n kMzoRj: \"xmkeg23\",\n $$css: true\n },\n xxl: {\n kMzoRj: \"x9r2w2z\",\n $$css: true\n }\n};\n\n// Each size's edge again, for the one place it is read at runtime: a standard\n// ButtonGroup widening a pressed button by adding to it. The size styles\n// above write the same values.\nconst EDGES = {\n lg: sizing.controlLg,\n md: sizing.controlSm,\n xl: sizing.controlXl,\n xs: sizing.controlXs,\n xxl: sizing.controlXxl\n};\n\n// The width a standard group sets while it widens or narrows the button.\nconst _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nconst shifted = {\n width: (value: string) => [_temp, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(value)\n }]\n};\n\n// The circle each size rests at: half its edge, written as a length rather\n// than as the pill token's 9999px or as 50% — see the header. `min()` leaves\n// the pill token in charge below that, so a scheme that sets\n// `--kui-radius-pill` small still draws its icon buttons at that corner.\n// Applied after the size's style, and again for a disabled button, which\n// keeps its circle whether or not a press is still held.\nconst roundShapes = {\n lg: {\n kaIpWk: \"x1j5kmnq\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1y5wlyh\",\n $$css: true\n },\n xl: {\n kaIpWk: \"x39tcx0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"xcslhsm\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xjy9rn5\",\n $$css: true\n }\n};\n\n// The corner each size presses to, which is the page's round-to-square\n// morph, and the corner a chosen toggle rests at. A style per size rather than\n// a value inside each size style, since StyleX replaces the property whole:\n// it comes after the size's circle while pressed, and after a disabled\n// button's circle too for a chosen toggle, which keeps its corner disabled.\nconst selectedShapes = {\n lg: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n }\n};\n\n// Which container a toggle draws, chosen and not. Two of the six are the\n// plain button's own styles: an unchosen tonal or standard toggle is the\n// tonal or standard button. A chosen filled toggle takes the filled button's\n// colours from a style of its own, which adds the forced-colours pair.\nconst toggleStyles = {\n filled: {\n selected: styles.filledToggleSelected,\n unselected: styles.filledToggle\n },\n outlined: {\n selected: styles.outlinedToggleSelected,\n unselected: styles.outlined\n },\n standard: {\n selected: styles.standardToggleSelected,\n unselected: styles.standard\n },\n tonal: {\n selected: styles.tonalToggleSelected,\n unselected: styles.tonal\n }\n};\n\n// The same containers by name, for the layers above.\nconst toggleContainers = {\n filled: {\n selected: 'filledToggleSelected',\n unselected: 'filledToggle'\n },\n outlined: {\n selected: 'outlinedToggleSelected',\n unselected: 'outlined'\n },\n standard: {\n selected: 'standardToggleSelected',\n unselected: 'standard'\n },\n tonal: {\n selected: 'tonalToggleSelected',\n unselected: 'tonal'\n }\n} as const;\nconst disabledStyles = {\n filled: styles.filledDisabled,\n outlined: styles.outlinedDisabled,\n standard: styles.standardDisabled,\n tonal: styles.tonalDisabled\n};\n\n// What a chosen toggle adds once disabled, over its variant's disabled style,\n// so its corner keeps an edge to show on — see the header. Filled and tonal\n// add nothing, since their disabled container already is one.\nconst selectedDisabledStyles = {\n filled: null,\n outlined: styles.outlinedToggleSelectedDisabled,\n standard: styles.standardToggleSelectedDisabled,\n tonal: null\n};\ntype IconButtonProps = {\n /**\n * What the button does, in words. Required rather than optional: an icon\n * on its own has no accessible name, so without this the control announces\n * nothing at all.\n *\n * `undefined` is for a button inside a React Aria component that names it\n * itself — a search field's clear button, a number field's steppers. React\n * Aria takes a prop over its context, so a name written here would replace\n * the one it gives in the reader's locale, and undefined leaves that stand.\n */\n 'aria-label': string | undefined;\n children?: ReactNode;\n /** A function may compute the class from the button's render state. */\n className?: ClassNameOrFunction<IconButtonState>;\n /**\n * Disables the press ripple. The hover and pressed state layers are\n * unaffected.\n * @default false\n */\n disableRipple?: boolean;\n /**\n * The name of the ring shown while the button is pending, for a screen\n * reader. The label it replaces is hidden while it shows. Left out, it is\n * the word for it in the I18nProvider's locale — \"Loading\" in English.\n */\n pendingLabel?: string;\n /**\n * The element to render, given the props it would have carried. React\n * Aria's own form: it has to return the element the component would have\n * rendered itself.\n */\n render?: DOMRenderFunction<'button', IconButtonState>;\n /**\n * Control size: `xs` 32px, `md` 40px, `lg` 56px, `xl` 96px, `xxl` 136px —\n * the icon buttons spec page's XS to XL, and the same heights `Button`\n * uses, so the two line up beside each other in a row. The icon is 20px,\n * 24px, 24px, 32px and 40px in turn.\n * @default 'md'\n */\n size?: IconButtonSize;\n /** A function may compute the style from the button's render state. */\n style?: StyleOrFunction<IconButtonState>;\n /**\n * `standard` is transparent and tints what it sits on; `outlined` is\n * transparent with a rule around it; `filled` and `tonal` carry a container\n * of their own.\n * @default 'standard'\n */\n variant?: IconButtonVariant;\n} & ButtonForm & Omit<ButtonDOMProps, 'aria-label' | 'render'>;\ntype IconButtonSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl';\n\n// The render state a call site's `className`, `style` or `render` function is\n// handed: the one every button shares, whose `isSelected` only the toggle\n// form fills in — see `ButtonState` in src/button.\ntype IconButtonState = ButtonState;\ntype IconButtonVariant = 'filled' | 'outlined' | 'standard' | 'tonal';\n\n// What a group lays over the button: its own styles for the button's state,\n// last so a connected group's corners hold whatever the button's own shape\n// would be, and the standard group's widening or narrowing as extra width.\nfunction groupStyles(group: ButtonGroupItem | null, size: IconButtonSize, state: ButtonState) {\n if (group === null) {\n return null;\n }\n return [group.styles?.(state), group.shift !== 0 && shifted.width(`calc(${EDGES[size]} + ${group.shift}px)`)];\n}\n\n/**\n * A button that is an icon, at five control heights. Given `href` it is a\n * link with the same appearance. Every `aria-*` prop is forwarded to the\n * element; React Aria alone would keep only the labelling ones.\n *\n * Given `isSelected`, `defaultSelected` or `onChange` it is a toggle, which\n * reports its state through `aria-pressed` and draws the page's second pair\n * of colour roles for its variant. The three forms are exclusive, so a toggle\n * given `href` does not compile. A toggle may be pending, for a state saved\n * somewhere slow: the ring replaces its icon and a press changes nothing\n * until it clears.\n *\n * ```tsx\n * <IconButton aria-label=\"Label\" defaultSelected variant=\"tonal\">\n * <StarIcon />\n * </IconButton>\n * ```\n *\n * An icon shows a sighted reader no words, so one whose meaning is not plain\n * from its shape goes inside a `Tooltip` that repeats its `aria-label`,\n * shown while a pointer rests on it or it holds focus. The tooltip repeats\n * the name rather than giving it: touch never shows one, so `aria-label` is\n * still what names the button.\n *\n * ```tsx\n * <Tooltip label=\"Search\">\n * <IconButton aria-label=\"Search\">\n * <SearchIcon />\n * </IconButton>\n * </Tooltip>\n * ```\n */\nfunction IconButton({\n defaultSelected,\n href,\n isPending,\n isSelected,\n onChange,\n pendingLabel,\n rel,\n size: ownSize,\n target,\n variant = 'standard',\n ...props\n}: IconButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>) {\n // A ButtonGroup around the button hands it a size, its shape at the\n // group's inner edges and the press interaction, as it does Button's; see\n // src/button/context.ts. A size named here still wins.\n const group = useContext(ButtonGroupItemContext);\n const size = ownSize ?? group?.size ?? 'md';\n const inSelectingGroup = useContext(ToggleGroupStateContext) !== null;\n const press = groupPressHandlers(group, props.onPressStart, props.onPressEnd);\n const selection = useSelection({\n defaultSelected,\n isSelected,\n onChange\n });\n\n // A selecting ButtonGroup around it makes it React Aria's ToggleButton, to\n // take part in the group's selection. Whether a button sits in one does\n // not change from one render to the next.\n if (inSelectingGroup) {\n return <ToggleButtonBase {...props} {...press} classes={toggleStyleProps(size, variant, group)} isPending={isPending} />;\n }\n\n // The three props that make this a toggle on its own. Read together rather\n // than behind a `toggle` word of its own, the way `href` already turns the\n // button into a link: a button given none of them has no state to report,\n // and one given any of them has nothing else it could mean. Either way it\n // is the same component underneath, so a toggle whose `isSelected` is\n // still loading stays the same element when the value arrives, and keeps\n // focus.\n const isToggle = defaultSelected !== undefined || isSelected !== undefined || onChange !== undefined;\n return <ButtonBase {...props} {...press} classes={isToggle ? toggleStyleProps(size, variant, group) : iconButtonClasses(size, variant, group)} href={href} isPending={isPending} isSelected={isToggle ? selection.selected : undefined} onPress={isToggle ? pressThen(props.onPress, selection.toggle) : props.onPress} pendingLabel={pendingLabel} rel={rel} target={target} />;\n}\n\n// The plain button's classes, from React Aria's render state — see the hover\n// and pressed layers above for why that and not the pseudo-classes. Built by\n// a call rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result on\n// its inputs.\nfunction iconButtonClasses(size: IconButtonSize, variant: IconButtonVariant, group: ButtonGroupItem | null) {\n return (state: ButtonClassesState) => stylex.props(styles.base, focus.ring, styles[variant], styles[size], roundShapes[size], variant === 'outlined' && outlineWidths[size], state.isHovered && hovered[variant], state.isFocusVisible && focused[variant], state.isPressed && pressed[variant], state.isPressed && selectedShapes[size], state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && roundShapes[size], state.isDisabled && disabledStyles[variant], groupStyles(group, size, state));\n}\n\n// A toggle's styles, from React Aria's render state. The chosen shape is\n// applied after the disabled styles so it survives them: which of the two\n// states a disabled toggle is in should still be readable, and the disabled\n// style otherwise forces the circle back. A chosen toggle's disabled edge\n// comes after them for the same reason.\nfunction toggleStyleProps(size: IconButtonSize, variant: IconButtonVariant, group: ButtonGroupItem | null) {\n return (state: ButtonClassesState) => {\n const container = toggleContainers[variant][state.isSelected === true ? 'selected' : 'unselected'];\n return stylex.props(styles.base, focus.ring, state.isSelected === true ? toggleStyles[variant].selected : toggleStyles[variant].unselected, styles[size], roundShapes[size],\n // A chosen outlined toggle has a container rather than a rule, so the\n // width goes on only while it is unchosen.\n variant === 'outlined' && state.isSelected !== true && outlineWidths[size], state.isHovered && hovered[container], state.isFocusVisible && focused[container], state.isPressed && pressed[container], state.isPressed && selectedShapes[size], state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && roundShapes[size], state.isDisabled && disabledStyles[variant], state.isDisabled && state.isSelected === true && selectedDisabledStyles[variant], state.isSelected === true && selectedShapes[size], groupStyles(group, size, state));\n };\n}\nexport type { IconButtonProps, IconButtonSize, IconButtonState, IconButtonVariant };\nexport default IconButton;"],"mappings":";;;;;;;;;;;;;;AAsIA,MAAMW,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAA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G,MAAMmC,cAAcnC,MAAMQ,eAAe,QAAQd,uBAAuBG,UAAUG,MAAMQ,eAAe,QAAQpB,eAAeQ,OAAOE,YAAYC,OAAOH,MAAMI,KAAK,CAAC;CAC1jB;AACF"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useContext","ToggleGroupStateContext","ButtonBase","ButtonGroupItemContext","groupPressHandlers","useSelection","pressThen","focus","sizing","styles","base","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kB7OPa","kkrTdU","k1xSpc","kmuXW","kjj79g","kmVPX3","kVAEAm","kybGjl","kIyJzY","k1ekBW","kAMwcw","$$css","disabled","filled","kWkggS","kMwMTN","filledDisabled","filledToggle","filledToggleSelected","lg","kZKoxP","kGuDYH","kzqmXN","md","kgeoSG","kFcpXp","kEoFBp","outlined","outlinedDisabled","outlinedToggleSelected","outlinedToggleSelectedDisabled","pending","standard","standardDisabled","standardToggleSelected","standardToggleSelectedDisabled","tonal","tonalDisabled","tonalToggleSelected","xl","xs","xxl","hovered","focused","pressed","outlineWidths","EDGES","controlLg","controlSm","controlXl","controlXs","controlXxl","_temp","shifted","width","value","val","undefined","roundShapes","kaIpWk","selectedShapes","toggleStyles","selected","unselected","toggleContainers","disabledStyles","selectedDisabledStyles","pendingLabel","size","variant","groupStyles","group","state","shift","IconButton","t0","$","defaultSelected","href","isPending","isSelected","onChange","rel","ownSize","target","t1","props","inSelectingGroup","press","onPressStart","onPressEnd","t2","selection","t3","toggleStyleProps","isToggle","T0","iconButtonClasses","t4","t5","onPress","toggle","t6","ring","isHovered","isFocusVisible","isPressed","isDisabled","container"],"sources":["../../../src/components/icon-button/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, DOMRenderFunction, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext } from 'react';\nimport { ToggleGroupStateContext } from 'react-aria-components';\nimport type { ButtonClassesState, ButtonDOMProps, ButtonForm, ButtonState } from '../../button';\nimport type { ButtonGroupItem } from '../../button/context';\nimport { ButtonBase, ToggleButtonBase } from '../../button';\nimport { ButtonGroupItemContext } from '../../button/context';\nimport { groupPressHandlers } from '../../button/group';\nimport { useSelection } from '../../button/hooks';\nimport { pressThen } from '../../button/toggle';\nimport { focus } from '../../styles/focus';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, sizing, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\n\n// Each variant composites an 'on-color' over its own container at the\n// interaction state's opacity, rather than swapping in a separate hover\n// color. The pairs are the icon buttons spec page's: filled on primary,\n// tonal on secondary container, outlined with an outline variant border and\n// an on-surface-variant icon, standard on surface variant over nothing.\n// calc(<opacity> * 100%) turns the token's unitless 0-1 ratio into the\n// percentage color-mix() takes. Inlined at each property rather than factored\n// into a helper: @stylexjs/babel-plugin only statically recognizes\n// expressions written directly as property values.\n//\n// **The outlined rule is faint on purpose.** Outline variant sits at about\n// 1.6:1 against the surface in the light theme and 2:1 in the dark, under the\n// 3:1 WCAG asks of a boundary that identifies a control. The rule is not that\n// boundary: the icon identifies the button, in on-surface-variant at about\n// 9:1, and the rule only shows how far the button reaches. Button's outlined\n// variant draws its rule in the same role for the same reason.\n//\n// Disabled is a style of its own per variant rather than a `:disabled`\n// branch inside each property, for the reason Button's comment gives: given\n// `href` this renders as a link, which React Aria turns into a <span> while\n// disabled, and neither matches the pseudo-class. Applied last from the\n// render state, the disabled styles replace each property whole, hover and\n// pressed branches included.\n//\n// **The outlined border thickens with the size, and the widths are Button's\n// rather than this page's.** The icon buttons page keeps them in a size token\n// set its widget will not open to a script, and the two components already\n// share their five heights on purpose — a 96dp icon button beside a 96dp\n// outlined button with a different border weight would read as a mistake.\n//\n// **A toggle is the same button reporting a state.** Given `isSelected`,\n// `defaultSelected` or `onChange` it is React Aria's `ToggleButton` instead\n// of its `Button`, which announces the state through `aria-pressed` rather\n// than a role of its own — every variant and size still applies. The page\n// gives each style a second pair of colour roles for it, and they are not\n// the plain button's: a filled toggle rests on surface container with an\n// on-surface-variant icon and takes primary once chosen, a tonal one rests\n// on secondary container and takes secondary, and a standard one is\n// transparent throughout with the icon going from on-surface-variant to\n// primary, and an outlined one swaps its border for the inverse surface\n// pair. So a chosen filled toggle looks like a plain filled button, and an\n// unchosen one does not.\n//\n// A toggle is never a link. React Aria's `ToggleButton` takes no `href`, and\n// a link goes somewhere rather than reporting which of two states it is in.\n// A toggle may be pending, though, for a state saved somewhere slow — a\n// favourite, a mute. On its own it is the plain button given `aria-pressed`,\n// so it goes pending as that button does: the ring takes the icon's place,\n// the element is `aria-busy` and `aria-disabled`, and a press changes nothing\n// until `isPending` clears. Inside a selecting ButtonGroup it is React Aria's\n// `ToggleButton`, which has no pending state, so there `isPending` only keeps\n// the ripple off.\n//\n// The corner softens from a circle to a rounded square while pressed, which\n// is the shape morph the icon buttons spec page gives this control, at the\n// pressed corner its size token set names: 8 for the two small sizes, 12 at\n// medium, 16 at the two large. Each size carries its own pressed radius, since\n// StyleX replaces the property whole. The transitioned properties take two\n// curves — the container, icon and rule colours the standard one, the corner\n// and a group's change of width the emphasized one — so the timing functions\n// are a matching comma list rather than one value. All of them move at once\n// for a reader who asks for reduced motion.\n//\n// A chosen toggle rests at that same pressed corner, which is the page's\n// shape morph: a toggle icon button moves from round while unchosen to\n// square once chosen. The square shape's own corner sits in a token set the\n// page keeps behind its size menu, but the page also says both shapes press\n// to the same radius — so the size's pressed corner is the value it already\n// assigns to that size, used here at rest rather than invented.\n//\n// The circle is half the button's edge as a length, not the pill token's\n// 9999px. The browser draws a corner no larger than half the box but eases\n// the value as written, so from 9999px a press spent all but the last frame\n// or two of its 150ms above the 20dp a medium button can show: the corner\n// held round and then jumped. Nor is it 50%, which a standard ButtonGroup\n// would stretch into an ellipse as it narrows the buttons beside a pressed\n// one, where a length still draws their ends round.\n//\n// **Under forced colours a container is drawn as a rule, and a chosen toggle\n// as the mode's own chosen pair.** That mode paints author backgrounds in a\n// system colour and forces the icon's, which left a filled or tonal icon\n// button as an icon with nothing round it and a chosen toggle the same as an\n// unchosen one. `base` draws a 1px `ButtonText` border there, as Button's\n// does. Outlined keeps its own rule, and standard stays without one, as the\n// page draws it. A chosen toggle of any style is filled `Highlight` with its\n// icon in `HighlightText`. A disabled button's icon and edge are `GrayText`,\n// for the reason Button's comment gives: the browser greys a disabled\n// `<button>` there, but not the `<span>` a disabled link is.\n//\n// **A disabled toggle keeps an edge for its corner to show on.** Disabled,\n// every variant takes one grey, so the corner it rests at is what tells a\n// chosen toggle from an unchosen one, and a corner shows only where\n// something is drawn round it. Filled and tonal keep their disabled\n// container, and an unchosen outlined toggle its disabled rule. A chosen\n// outlined toggle trades its rule for a container, which the disabled style\n// cleared, so it takes on-surface at the disabled-container opacity, where\n// Material Design's own tokens give that state a faint on-surface container\n// too. A chosen standard\n// toggle takes the same faint container over nothing. That departs from the\n// page, which draws a standard toggle with no container in any state, and\n// it is the one way the two states of a disabled standard toggle differ at\n// all. Under forced colours, which paint both containers over, the chosen\n// outlined toggle keeps its `GrayText` rule and the chosen standard one\n// draws one, in place of the rule its variant otherwise goes without.\n//\n// What every button does past its own styles — the ripple, the link and\n// toggle forms, the pending ring, a parent's disabled state — is\n// `src/button`'s, shared with Button.\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)';\n\n/**\n * The press area the page requires of its two smallest sizes. A literal\n * rather than `sizing.controlMd`, which holds the same number: that is a step\n * of the control scale, and a consumer resizing their medium controls should\n * not shrink a target the page states as a floor.\n */\nconst TARGET_SIZE = '48px';\nconst styles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kmuXW: \"x2lah0s\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n kVAEAm: \"x1n2onr6\",\n kybGjl: \"x1hl2dhg\",\n kIyJzY: \"x1pvxwa0 x12w9bfk\",\n k1ekBW: \"x1ss3tkz\",\n kAMwcw: \"xcviomn\",\n $$css: true\n },\n disabled: {\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n filled: {\n kWkggS: \"xnety89\",\n kMwMTN: \"xwjo7ld\",\n $$css: true\n },\n filledDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1mjdul6\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xnety89 x1jzqe4\",\n kMwMTN: \"xwjo7ld x1k5gbb1\",\n $$css: true\n },\n lg: {\n kZKoxP: \"xs1ryiz\",\n kGuDYH: \"x1pvqxga\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n md: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x1q69gdh\",\n kEoFBp: \"x1hmns74\",\n kZKoxP: \"x1rv7mn0\",\n kGuDYH: \"x1pvqxga\",\n kzqmXN: \"x1eujcsb\",\n $$css: true\n },\n outlined: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"x133yhug\",\n ksu8eU: \"x1y0btm7\",\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n },\n outlinedDisabled: {\n kWkggS: \"xjbqb8w\",\n kVAM5u: \"xrh88j3 xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1c5gpgi x1jzqe4\",\n kVAM5u: \"x9r1u3d x1n2ykn\",\n kMwMTN: \"x1girmi0 x1k5gbb1\",\n $$css: true\n },\n outlinedToggleSelectedDisabled: {\n kWkggS: \"xepofeg\",\n $$css: true\n },\n pending: {\n kkrTdU: \"x19v85br\",\n $$css: true\n },\n standard: {\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kMwMTN: \"x11wi6qo\",\n $$css: true\n },\n standardDisabled: {\n kWkggS: \"xjbqb8w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"xjbqb8w x1jzqe4\",\n kMzoRj: \"xc342km\",\n kMwMTN: \"x1mxwv8y x1k5gbb1\",\n $$css: true\n },\n standardToggleSelectedDisabled: {\n kWkggS: \"x19v6zzp\",\n kVAM5u: \"xmnqt3w\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x15dekr4\",\n kMwMTN: \"x1sawysd\",\n $$css: true\n },\n tonalDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x167r6xl x1jzqe4\",\n kMwMTN: \"x1lba3jz x1k5gbb1\",\n $$css: true\n },\n xl: {\n kZKoxP: \"x1xaimp3\",\n kGuDYH: \"x1s3cmhv\",\n kzqmXN: \"xszbqgh\",\n $$css: true\n },\n xs: {\n kgeoSG: \"x1cpjm7i\",\n kFcpXp: \"x1n6cgzf\",\n kEoFBp: \"x1hmns74\",\n kZKoxP: \"xig8zya\",\n kGuDYH: \"xwsyq91\",\n kzqmXN: \"x11ts1a5\",\n $$css: true\n },\n xxl: {\n kZKoxP: \"x173yhrv\",\n kGuDYH: \"x1tgwohi\",\n kzqmXN: \"xz1kjiq\",\n $$css: true\n }\n};\n\n// The hover, focus and pressed layers, one style per container, applied from\n// React Aria's render state rather than from `:hover`, `:focus-visible` and\n// `:active`, for Button's reasons — see its header: a hover layer stayed on\n// after a tap, and no pressed layer or corner showed for a press made from\n// the keyboard. In the order they are applied, so where two hold the later\n// wins, as the page draws one layer at a time: focus over hover, and a press\n// over both. A chosen toggle's layer keeps its forced-colours `Highlight`,\n// since a later style replaces the property whole.\nconst hovered = {\n filled: {\n kWkggS: \"xo1ct44\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"xtxe0ya\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xo1ct44 x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x1hxzsxp x1jzqe4\",\n $$css: true\n },\n standard: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"x659ado x1jzqe4\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1fctxn6\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12r95rf x1jzqe4\",\n $$css: true\n }\n};\nconst focused = {\n filled: {\n kWkggS: \"xhodiby\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1ppcb1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"xhodiby x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x19p5drm\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"xn4e5mw x1jzqe4\",\n $$css: true\n },\n standard: {\n kWkggS: \"x19p5drm\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"x1sog3nf x1jzqe4\",\n $$css: true\n },\n tonal: {\n kWkggS: \"x1s5x49g\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x16tkg7c x1jzqe4\",\n $$css: true\n }\n};\nconst pressed = {\n filled: {\n kWkggS: \"x7b25lv\",\n $$css: true\n },\n filledToggle: {\n kWkggS: \"x1qdfkg1\",\n $$css: true\n },\n filledToggleSelected: {\n kWkggS: \"x7b25lv x1jzqe4\",\n $$css: true\n },\n outlined: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n outlinedToggleSelected: {\n kWkggS: \"x167cdfs x1jzqe4\",\n $$css: true\n },\n standard: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n standardToggleSelected: {\n kWkggS: \"x1dvjsmr x1jzqe4\",\n $$css: true\n },\n tonal: {\n kWkggS: \"xzpauq9\",\n $$css: true\n },\n tonalToggleSelected: {\n kWkggS: \"x12o6fnv x1jzqe4\",\n $$css: true\n }\n};\n\n// The outlined border thickens with the size, as Button's does: 1dp up to M,\n// 2dp at XL, 3dp at XXL. A style per size rather than a value in the size\n// style, since a border on a filled button would draw in the icon's colour.\nconst outlineWidths = {\n lg: {\n kMzoRj: \"xmkeg23\",\n $$css: true\n },\n md: {\n kMzoRj: \"xmkeg23\",\n $$css: true\n },\n xl: {\n kMzoRj: \"xdh2fpr\",\n $$css: true\n },\n xs: {\n kMzoRj: \"xmkeg23\",\n $$css: true\n },\n xxl: {\n kMzoRj: \"x9r2w2z\",\n $$css: true\n }\n};\n\n// Each size's edge again, for the one place it is read at runtime: a standard\n// ButtonGroup widening a pressed button by adding to it. The size styles\n// above write the same values.\nconst EDGES = {\n lg: sizing.controlLg,\n md: sizing.controlSm,\n xl: sizing.controlXl,\n xs: sizing.controlXs,\n xxl: sizing.controlXxl\n};\n\n// The width a standard group sets while it widens or narrows the button.\nconst _temp = {\n kzqmXN: \"x1uyokj7\",\n \"$$css\": true\n};\nconst shifted = {\n width: (value: string) => [_temp, {\n \"--x-inlineSize\": (val => typeof val === \"number\" ? val + \"px\" : val != null ? val : undefined)(value)\n }]\n};\n\n// The circle each size rests at: half its edge, written as a length rather\n// than as the pill token's 9999px or as 50% — see the header. `min()` leaves\n// the pill token in charge below that, so a scheme that sets\n// `--kui-radius-pill` small still draws its icon buttons at that corner.\n// Applied after the size's style, and again for a disabled button, which\n// keeps its circle whether or not a press is still held.\nconst roundShapes = {\n lg: {\n kaIpWk: \"x1j5kmnq\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1y5wlyh\",\n $$css: true\n },\n xl: {\n kaIpWk: \"x39tcx0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"xcslhsm\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xjy9rn5\",\n $$css: true\n }\n};\n\n// The corner each size presses to, which is the page's round-to-square\n// morph, and the corner a chosen toggle rests at. A style per size rather than\n// a value inside each size style, since StyleX replaces the property whole:\n// it comes after the size's circle while pressed, and after a disabled\n// button's circle too for a chosen toggle, which keeps its corner disabled.\nconst selectedShapes = {\n lg: {\n kaIpWk: \"x62ce2h\",\n $$css: true\n },\n md: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n },\n xs: {\n kaIpWk: \"x1xdvaa9\",\n $$css: true\n },\n xxl: {\n kaIpWk: \"xhpdng0\",\n $$css: true\n }\n};\n\n// Which container a toggle draws, chosen and not. Two of the six are the\n// plain button's own styles: an unchosen tonal or standard toggle is the\n// tonal or standard button. A chosen filled toggle takes the filled button's\n// colours from a style of its own, which adds the forced-colours pair.\nconst toggleStyles = {\n filled: {\n selected: styles.filledToggleSelected,\n unselected: styles.filledToggle\n },\n outlined: {\n selected: styles.outlinedToggleSelected,\n unselected: styles.outlined\n },\n standard: {\n selected: styles.standardToggleSelected,\n unselected: styles.standard\n },\n tonal: {\n selected: styles.tonalToggleSelected,\n unselected: styles.tonal\n }\n};\n\n// The same containers by name, for the layers above.\nconst toggleContainers = {\n filled: {\n selected: 'filledToggleSelected',\n unselected: 'filledToggle'\n },\n outlined: {\n selected: 'outlinedToggleSelected',\n unselected: 'outlined'\n },\n standard: {\n selected: 'standardToggleSelected',\n unselected: 'standard'\n },\n tonal: {\n selected: 'tonalToggleSelected',\n unselected: 'tonal'\n }\n} as const;\nconst disabledStyles = {\n filled: styles.filledDisabled,\n outlined: styles.outlinedDisabled,\n standard: styles.standardDisabled,\n tonal: styles.tonalDisabled\n};\n\n// What a chosen toggle adds once disabled, over its variant's disabled style,\n// so its corner keeps an edge to show on — see the header. Filled and tonal\n// add nothing, since their disabled container already is one.\nconst selectedDisabledStyles = {\n filled: null,\n outlined: styles.outlinedToggleSelectedDisabled,\n standard: styles.standardToggleSelectedDisabled,\n tonal: null\n};\ntype IconButtonProps = {\n /**\n * What the button does, in words. Required rather than optional: an icon\n * on its own has no accessible name, so without this the control announces\n * nothing at all.\n *\n * `undefined` is for a button inside a React Aria component that names it\n * itself — a search field's clear button, a number field's steppers. React\n * Aria takes a prop over its context, so a name written here would replace\n * the one it gives in the reader's locale, and undefined leaves that stand.\n */\n 'aria-label': string | undefined;\n children?: ReactNode;\n /** A function may compute the class from the button's render state. */\n className?: ClassNameOrFunction<IconButtonState>;\n /**\n * Disables the press ripple. The hover and pressed state layers are\n * unaffected.\n * @default false\n */\n disableRipple?: boolean;\n /**\n * The name of the ring shown while the button is pending, for a screen\n * reader. The label it replaces is hidden while it shows. Left out, it is\n * the word for it in the I18nProvider's locale — \"Loading\" in English.\n */\n pendingLabel?: string;\n /**\n * The element to render, given the props it would have carried. React\n * Aria's own form: it has to return the element the component would have\n * rendered itself.\n */\n render?: DOMRenderFunction<'button', IconButtonState>;\n /**\n * Control size: `xs` 32px, `md` 40px, `lg` 56px, `xl` 96px, `xxl` 136px —\n * the icon buttons spec page's XS to XL, and the same heights `Button`\n * uses, so the two line up beside each other in a row. The icon is 20px,\n * 24px, 24px, 32px and 40px in turn.\n * @default 'md'\n */\n size?: IconButtonSize;\n /** A function may compute the style from the button's render state. */\n style?: StyleOrFunction<IconButtonState>;\n /**\n * `standard` is transparent and tints what it sits on; `outlined` is\n * transparent with a rule around it; `filled` and `tonal` carry a container\n * of their own.\n * @default 'standard'\n */\n variant?: IconButtonVariant;\n} & ButtonForm & Omit<ButtonDOMProps, 'aria-label' | 'render'>;\ntype IconButtonSize = 'lg' | 'md' | 'xl' | 'xs' | 'xxl';\n\n// The render state a call site's `className`, `style` or `render` function is\n// handed: the one every button shares, whose `isSelected` only the toggle\n// form fills in — see `ButtonState` in src/button.\ntype IconButtonState = ButtonState;\ntype IconButtonVariant = 'filled' | 'outlined' | 'standard' | 'tonal';\n\n// What a group lays over the button: its own styles for the button's state,\n// last so a connected group's corners hold whatever the button's own shape\n// would be, and the standard group's widening or narrowing as extra width.\nfunction groupStyles(group: ButtonGroupItem | null, size: IconButtonSize, state: ButtonState) {\n if (group === null) {\n return null;\n }\n return [group.styles?.(state), group.shift !== 0 && shifted.width(`calc(${EDGES[size]} + ${group.shift}px)`)];\n}\n\n/**\n * A button that is an icon, at five control heights. Given `href` it is a\n * link with the same appearance. Every `aria-*` prop is forwarded to the\n * element; React Aria alone would keep only the labelling ones.\n *\n * Given `isSelected`, `defaultSelected` or `onChange` it is a toggle, which\n * reports its state through `aria-pressed` and draws the page's second pair\n * of colour roles for its variant. The three forms are exclusive, so a toggle\n * given `href` does not compile. A toggle may be pending, for a state saved\n * somewhere slow: the ring replaces its icon and a press changes nothing\n * until it clears.\n *\n * ```tsx\n * <IconButton aria-label=\"Label\" defaultSelected variant=\"tonal\">\n * <StarIcon />\n * </IconButton>\n * ```\n *\n * An icon shows a sighted reader no words, so one whose meaning is not plain\n * from its shape goes inside a `Tooltip` that repeats its `aria-label`,\n * shown while a pointer rests on it or it holds focus. The tooltip repeats\n * the name rather than giving it: touch never shows one, so `aria-label` is\n * still what names the button.\n *\n * ```tsx\n * <Tooltip label=\"Search\">\n * <IconButton aria-label=\"Search\">\n * <SearchIcon />\n * </IconButton>\n * </Tooltip>\n * ```\n */\nfunction IconButton({\n defaultSelected,\n href,\n isPending,\n isSelected,\n onChange,\n pendingLabel,\n rel,\n size: ownSize,\n target,\n variant = 'standard',\n ...props\n}: IconButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>) {\n // A ButtonGroup around the button hands it a size, its shape at the\n // group's inner edges and the press interaction, as it does Button's; see\n // src/button/context.ts. A size named here still wins.\n const group = useContext(ButtonGroupItemContext);\n const size = ownSize ?? group?.size ?? 'md';\n const inSelectingGroup = useContext(ToggleGroupStateContext) !== null;\n const press = groupPressHandlers(group, props.onPressStart, props.onPressEnd);\n const selection = useSelection({\n defaultSelected,\n isSelected,\n onChange\n });\n\n // A selecting ButtonGroup around it makes it React Aria's ToggleButton, to\n // take part in the group's selection. Whether a button sits in one does\n // not change from one render to the next.\n if (inSelectingGroup) {\n return <ToggleButtonBase {...props} {...press} classes={toggleStyleProps(size, variant, group)} isPending={isPending} />;\n }\n\n // The three props that make this a toggle on its own. Read together rather\n // than behind a `toggle` word of its own, the way `href` already turns the\n // button into a link: a button given none of them has no state to report,\n // and one given any of them has nothing else it could mean. Either way it\n // is the same component underneath, so a toggle whose `isSelected` is\n // still loading stays the same element when the value arrives, and keeps\n // focus.\n const isToggle = defaultSelected !== undefined || isSelected !== undefined || onChange !== undefined;\n return <ButtonBase {...props} {...press} classes={isToggle ? toggleStyleProps(size, variant, group) : iconButtonClasses(size, variant, group)} href={href} isPending={isPending} isSelected={isToggle ? selection.selected : undefined} onPress={isToggle ? pressThen(props.onPress, selection.toggle) : props.onPress} pendingLabel={pendingLabel} rel={rel} target={target} />;\n}\n\n// The plain button's classes, from React Aria's render state — see the hover\n// and pressed layers above for why that and not the pseudo-classes. Built by\n// a call rather than written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after; the React Compiler memoises the result on\n// its inputs.\nfunction iconButtonClasses(size: IconButtonSize, variant: IconButtonVariant, group: ButtonGroupItem | null) {\n return (state: ButtonClassesState) => stylex.props(styles.base, focus.ring, styles[variant], styles[size], roundShapes[size], variant === 'outlined' && outlineWidths[size], state.isHovered && hovered[variant], state.isFocusVisible && focused[variant], state.isPressed && pressed[variant], state.isPressed && selectedShapes[size], state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && roundShapes[size], state.isDisabled && disabledStyles[variant], groupStyles(group, size, state));\n}\n\n// A toggle's styles, from React Aria's render state. The chosen shape is\n// applied after the disabled styles so it survives them: which of the two\n// states a disabled toggle is in should still be readable, and the disabled\n// style otherwise forces the circle back. A chosen toggle's disabled edge\n// comes after them for the same reason.\nfunction toggleStyleProps(size: IconButtonSize, variant: IconButtonVariant, group: ButtonGroupItem | null) {\n return (state: ButtonClassesState) => {\n const container = toggleContainers[variant][state.isSelected === true ? 'selected' : 'unselected'];\n return stylex.props(styles.base, focus.ring, state.isSelected === true ? toggleStyles[variant].selected : toggleStyles[variant].unselected, styles[size], roundShapes[size],\n // A chosen outlined toggle has a container rather than a rule, so the\n // width goes on only while it is unchosen.\n variant === 'outlined' && state.isSelected !== true && outlineWidths[size], state.isHovered && hovered[container], state.isFocusVisible && focused[container], state.isPressed && pressed[container], state.isPressed && selectedShapes[size], state.isPending === true && styles.pending, state.isDisabled && styles.disabled, state.isDisabled && roundShapes[size], state.isDisabled && disabledStyles[variant], state.isDisabled && state.isSelected === true && selectedDisabledStyles[variant], state.isSelected === true && selectedShapes[size], groupStyles(group, size, state));\n };\n}\nexport type { IconButtonProps, IconButtonSize, IconButtonState, IconButtonVariant };\nexport default IconButton;"],"mappings":";;;;;;;;;;;;;;AA4IA,MAAMW,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRX,QAAQ;EACRU,OAAO;CACT;CACAE,QAAQ;EACNC,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAK,gBAAgB;EACdF,QAAQ;EACRjB,QAAQ;EACRkB,QAAQ;EACRJ,OAAO;CACT;CACAM,cAAc;EACZH,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAO,sBAAsB;EACpBJ,QAAQ;EACRC,QAAQ;EACRJ,OAAO;CACT;CACAQ,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;C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,MAAMmC,cAAcjD,YAAYU,OAAOI,MAAMmC,cAAc1C,eAAeI,UAAUC,YAAYC,OAAOH,MAAMI,KAAK,CAAC;AAChhB;AAOA,SAASsB,iBAAiB1B,MAAsBC,SAA4BE,OAA+B;CACzG,QAAQC,UAA8B;EACpC,MAAMoC,YAAY5C,iBAAiBK,QAAQ,CAACG,MAAMQ,eAAe,OAAO,aAAa;EACrF,OAAOhG,MAAaU,OAAOC,MAAMH,MAAM+G,MAAM/B,MAAMQ,eAAe,OAAOnB,aAAaQ,QAAQ,CAACP,WAAWD,aAAaQ,QAAQ,CAACN,YAAYrE,OAAO0E,OAAOV,YAAYU,OAGtKC,YAAY,cAAcG,MAAMQ,eAAe,QAAQnC,cAAcuB,OAAOI,MAAMgC,aAAa9D,QAAQkE,YAAYpC,MAAMiC,kBAAkB9D,QAAQiE,YAAYpC,MAAMkC,aAAa9D,QAAQgE,YAAYpC,MAAMkC,aAAa9C,eAAeQ,OAAOI,MAAMO,cAAc,QAAQrF,OAAOqC,SAASyC,MAAMmC,cAAcjH,OAAOkB,UAAU4D,MAAMmC,cAAcjD,YAAYU,OAAOI,MAAMmC,cAAc1C,eAAeI,UAAUG,MAAMmC,cAAcnC,MAAMQ,eAAe,QAAQd,uBAAuBG,UAAUG,MAAMQ,eAAe,QAAQpB,eAAeQ,OAAOE,YAAYC,OAAOH,MAAMI,KAAK,CAAC;CAC1jB;AACF"}
@@ -13,7 +13,7 @@ import { CarouselLayout } from "../carousel/arrangement.js";
13
13
  import Carousel, { CarouselItem, CarouselItemProps, CarouselItemRenderProps, CarouselProps } from "./carousel/index.js";
14
14
  import Checkbox, { CheckboxProps } from "./checkbox/index.js";
15
15
  import CheckboxGroup, { CheckboxGroupProps } from "./checkbox-group/index.js";
16
- import Chip, { ChipActionProps, ChipFilterProps, ChipProps, ChipVariant } from "./chip/index.js";
16
+ import Chip, { ChipActionProps, ChipDropdownProps, ChipFilterProps, ChipProps, ChipVariant } from "./chip/index.js";
17
17
  import ChipGroup, { ChipGroupChip, ChipGroupChipProps, ChipGroupProps } from "./chip-group/index.js";
18
18
  import Code, { CodeProps } from "./code/index.js";
19
19
  import ColorArea, { ColorAreaProps } from "./color-area/index.js";
@@ -82,4 +82,4 @@ import TokenField, { TokenFieldProps, TokenSegment } from "./token-field/index.j
82
82
  import Toolbar, { ToolbarProps, ToolbarTone } from "./toolbar/index.js";
83
83
  import Tooltip, { TooltipAlign, TooltipProps, TooltipSide } from "./tooltip/index.js";
84
84
  import Tree, { TreeItem, TreeItemProps, TreeLoadMore, TreeLoadMoreProps, TreeProps, TreeSection, TreeSectionProps } from "./tree/index.js";
85
- export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumbs, BreadcrumbsItem, type BreadcrumbsItemProps, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, type CardVariant, Carousel, CarouselItem, type CarouselItemProps, type CarouselItemRenderProps, type CarouselLayout, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipActionProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, Code, type CodeProps, ColorArea, type ColorAreaProps, ColorField, type ColorFieldProps, ColorPicker, type ColorPickerProps, ColorSlider, type ColorSliderProps, ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem, type ColorSwatchPickerItemProps, type ColorSwatchPickerProps, type ColorSwatchProps, ColorWheel, type ColorWheelProps, ComboBox, type ComboBoxProps, type ComboBoxSelectionMode, Container, type ContainerProps, CopyField, type CopyFieldProps, Currency, type CurrencyDisplay, type CurrencyNotation, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, DateField, type DateFieldProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, DialogBody, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, DisclosureGroup, type DisclosureGroupProps, DisclosureHeader, type DisclosureHeaderProps, DisclosurePanel, type DisclosurePanelProps, type DisclosureProps, DropZone, type DropZoneProps, Fab, FabMenu, FabMenuItem, type FabMenuItemProps, type FabMenuProps, type FabProps, type FabSize, type FabTone, type FabVariant, Feed, type FeedProps, type FieldVariant, FileTrigger, type FileTriggerProps, Form, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Keycap, type KeycapProps, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListBox, ListBoxItem, type ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps, ListBoxSection, type ListBoxSectionProps, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, LoadingIndicator, type LoadingIndicatorProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationItemProps as NavigationBarItemProps, type NavigationBarProps, NavigationRail, NavigationRailItem, type NavigationItemProps as NavigationRailItemProps, type NavigationRailProps, NavigationTree, NavigationTreeItem, type NavigationTreeItemProps, type NavigationTreeProps, NavigationTreeSection, type NavigationTreeSectionProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RangeCalendar, type RangeCalendarProps, SearchField, type SearchFieldProps, SearchView, SearchViewContent, type SearchViewContentProps, type SearchViewProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, Select, type SelectProps, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, SheetHeader, type SheetProps, SheetTitle, type SheetTitleProps, Slider, type SliderProps, type SliderSize, Snackbar, type SnackbarAction, type SnackbarMessage, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, type ToastRegionRenderProps as SnackbarRegionRenderProps, SplitButton, SplitButtonAction, type SplitButtonActionProps, SplitButtonMenu, type SplitButtonMenuProps, type SplitButtonProps, type SplitButtonVariant, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, SupportingPane, type SupportingPaneProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadMore, type TableLoadMoreProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsLayout, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, TabsPanels, type TabsPanelsProps, type TabsProps, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagProps, type TagTone, type TagVariant, Text, TextArea, type TextAreaProps, TextField, type TextFieldProps, type TextProps, TimeField, type TimeFieldProps, TimePicker, type TimePickerMode, type TimePickerProps, TokenField, type TokenFieldProps, type TokenSegment, Toolbar, type ToolbarProps, type ToolbarTone, Tooltip, type TooltipAlign, type TooltipProps, type TooltipSide, Tree, TreeItem, type TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps, TreeSection, type TreeSectionProps, useAppBarScroll };
85
+ export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Badge, type BadgeProps, Breadcrumbs, BreadcrumbsItem, type BreadcrumbsItemProps, type BreadcrumbsProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonGroupVariant, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, type CardVariant, Carousel, CarouselItem, type CarouselItemProps, type CarouselItemRenderProps, type CarouselLayout, type CarouselProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, Chip, type ChipActionProps, type ChipDropdownProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, Code, type CodeProps, ColorArea, type ColorAreaProps, ColorField, type ColorFieldProps, ColorPicker, type ColorPickerProps, ColorSlider, type ColorSliderProps, ColorSwatch, ColorSwatchPicker, ColorSwatchPickerItem, type ColorSwatchPickerItemProps, type ColorSwatchPickerProps, type ColorSwatchProps, ColorWheel, type ColorWheelProps, ComboBox, type ComboBoxProps, type ComboBoxSelectionMode, Container, type ContainerProps, CopyField, type CopyFieldProps, Currency, type CurrencyDisplay, type CurrencyNotation, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, DateField, type DateFieldProps, DatePicker, type DatePickerProps, DateRangePicker, type DateRangePickerProps, Dialog, DialogBody, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogProps, DialogTitle, type DialogTitleProps, Disclosure, DisclosureGroup, type DisclosureGroupProps, DisclosureHeader, type DisclosureHeaderProps, DisclosurePanel, type DisclosurePanelProps, type DisclosureProps, DropZone, type DropZoneProps, Fab, FabMenu, FabMenuItem, type FabMenuItemProps, type FabMenuProps, type FabProps, type FabSize, type FabTone, type FabVariant, Feed, type FeedProps, type FieldVariant, FileTrigger, type FileTriggerProps, Form, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, Keycap, type KeycapProps, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListBox, ListBoxItem, type ListBoxItemProps, ListBoxLoadMore, type ListBoxLoadMoreProps, type ListBoxProps, ListBoxSection, type ListBoxSectionProps, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, LoadingIndicator, type LoadingIndicatorProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationItemProps as NavigationBarItemProps, type NavigationBarProps, NavigationRail, NavigationRailItem, type NavigationItemProps as NavigationRailItemProps, type NavigationRailProps, NavigationTree, NavigationTreeItem, type NavigationTreeItemProps, type NavigationTreeProps, NavigationTreeSection, type NavigationTreeSectionProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RangeCalendar, type RangeCalendarProps, SearchField, type SearchFieldProps, SearchView, SearchViewContent, type SearchViewContentProps, type SearchViewProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, Select, type SelectProps, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, SheetHeader, type SheetProps, SheetTitle, type SheetTitleProps, Slider, type SliderProps, type SliderSize, Snackbar, type SnackbarAction, type SnackbarMessage, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, type ToastRegionRenderProps as SnackbarRegionRenderProps, SplitButton, SplitButtonAction, type SplitButtonActionProps, SplitButtonMenu, type SplitButtonMenuProps, type SplitButtonProps, type SplitButtonVariant, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, SupportingPane, type SupportingPaneProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableColumn, type TableColumnProps, TableFooter, type TableFooterProps, TableHeader, type TableHeaderProps, TableLoadMore, type TableLoadMoreProps, type TableProps, TableRow, type TableRowProps, Tabs, type TabsLayout, TabsList, type TabsListProps, TabsPanel, type TabsPanelProps, TabsPanels, type TabsPanelsProps, type TabsProps, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagProps, type TagTone, type TagVariant, Text, TextArea, type TextAreaProps, TextField, type TextFieldProps, type TextProps, TimeField, type TimeFieldProps, TimePicker, type TimePickerMode, type TimePickerProps, TokenField, type TokenFieldProps, type TokenSegment, Toolbar, type ToolbarProps, type ToolbarTone, Tooltip, type TooltipAlign, type TooltipProps, type TooltipSide, Tree, TreeItem, type TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps, TreeSection, type TreeSectionProps, useAppBarScroll };
@@ -51,7 +51,7 @@ function itemContent(children, leading, shortcut, trailing, ripple) {
51
51
  };
52
52
  }
53
53
  function itemStyles(state) {
54
- return props(rowStyles.base, rowStyles.menu, state.isSelected && rowStyles.selectedMenu, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isPressed && rowStyles.pressed, state.isDisabled && rowStyles.disabled);
54
+ return props(rowStyles.base, rowStyles.menu, state.isSelected && rowStyles.selectedMenu, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isFocusVisible && state.isSelected && rowStyles.focusVisibleSelected, state.isPressed && rowStyles.pressed, state.isDisabled && rowStyles.disabled);
55
55
  }
56
56
  /**
57
57
  * A list of actions opened from a control. Open state is React Aria's: pass
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","useContext","useEffect","useRef","AutocompleteStateContext","Menu","MenuItem","RACMenuItem","RACMenuLoadMoreItem","MenuSection","textOf","useRipple","rowStyles","supportingTone","mergeStatefulStyles","mergeStyles","overlay","placementOf","popupOrigin","Separator","styles","content","kWkggS","kaIpWk","ks0D6T","k7Eaqz","k3XXqK","k8WAf4","$$css","shortcut","kMwMTN","align","alignOffset","className","container","search","side","sideOffset","style","children","leading","trailing","label","header","emptyState","itemContent","ripple","state","check","isSelected","undefined","hasLeading","isDisabled","trailingOf","itemStyles","props","base","menu","selectedMenu","isHovered","hovered","isFocusVisible","focusVisible","isPressed","pressed","disabled","t0","$","t1","MenuContent","ref","t2","surfaceStyles","t3","t4","t5","t6","SEARCH_CONTROL","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","T0","handlers","surface","MenuLoadMore","MenuSeparator","MenuSubmenu","SearchSlot","autocomplete","latest","current","Symbol","for","querySelector","focus","setInputValue","popup","placement","hasSubmenu","Content","Item","LoadMore","Section","Submenu","RACMenuTrigger","RACMenu","RACPopover","RACMenuSection","Separator","RACSubmenuTrigger"],"sources":["../../../src/components/menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentProps, ReactElement, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, MenuItemRenderProps, PopoverRenderProps, MenuItemProps as RACMenuItemProps, MenuLoadMoreItemProps as RACMenuLoadMoreItemProps, MenuProps as RACMenuProps, MenuSectionProps as RACMenuSectionProps, MenuTriggerProps as RACMenuTriggerProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useEffect, useRef } from 'react';\nimport { AutocompleteStateContext, Header, Keyboard, Menu as RACMenu, MenuItem as RACMenuItem, MenuLoadMoreItem as RACMenuLoadMoreItem, MenuSection as RACMenuSection, MenuTrigger as RACMenuTrigger, Popover as RACPopover, SubmenuTrigger as RACSubmenuTrigger, Text } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { CollectionEmpty, CollectionLoadMore, CollectionStatus } from '../../collection';\nimport { textOf } from '../../collection/text';\nimport { CheckGlyph, ChevronEndGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { KeycapToneContext } from '../../keycap/context';\nimport { RowContent } from '../../row';\nimport { rowStyles, supportingTone } from '../../row/styles';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, spacing, typography } from '../../tokens/design.tokens.stylex';\nimport Separator from '../separator';\n\n// The menus page's menu: a surface between 112 and 280 wide with a 4dp\n// corner and 8dp above and below its items, holding rows of the row module's\n// menu variant — 48dp tall, a label-large label, tertiary container when\n// selected, with a check beside the label. The container alone sits as close\n// as 1.1:1 to the surface, so the check is what carries the selection for a\n// reader who cannot tell the two apart. The surface itself is the overlay module's, shared with Popover\n// and Sheet, with the two things the menus page decides differently applied\n// over it: the corner, which is the extra-small step rather than the\n// medium one every other overlay takes, and the container colour, which is\n// the Expressive column's surface container low rather than the baseline's\n// surface container.\n//\n// Six parts, because everything a menu holds takes arbitrary content:\n// `Menu.Content`, `Menu.Item`, `Menu.Section`, `Menu.Separator`,\n// `Menu.Submenu` and `Menu.LoadMore`. A `Button` or `IconButton` placed\n// directly inside `Menu` is the trigger, wired through React Aria's context\n// rather than a part of ours — the same arrangement Sheet and Popover use.\n//\n// Four things are worth knowing about how this maps onto React Aria.\n//\n// **The item's styles are a function of its render state.** StyleX cannot\n// target `[data-selected]` on the element it is styling, so selection,\n// disabled and the rest are read from the state React Aria hands the\n// `className` function, wrapped in `mergeStatefulStyles` so a call site's own\n// `className` survives.\n//\n// **A shortcut goes through React Aria's `Keyboard` slot**, and the label\n// through its `Text` slot. The second is what makes the first work: React\n// Aria points the item's `aria-labelledby` at the labelled text, so a screen\n// reader reads the label alone and announces the keystroke separately. Left\n// as plain content, the item's name is its whole text and the shortcut is\n// read as part of what the item does. The keycap itself is the library's.\n// The shortcut's colour follows the item's state as the supporting line's\n// does, through the same `supportingTone`, and a selected or disabled item\n// hands a keycap inside it the `inherit` tone, so the keycap follows too.\n//\n// **A submenu's arrow is drawn from render state, not from a prop.** React\n// Aria reports `hasSubmenu` on the item inside a `SubmenuTrigger`, so an item\n// that opens one gets the chevron without the call site saying so twice. The\n// glyph carries no direction of its own, so the style mirrors it under a\n// right-to-left writing mode.\n//\n// **A menu's children are a collection**, so anything that is not an item is\n// dropped: React Aria walks them looking for items and finds a search input\n// no place to be. `Menu.Content` therefore takes a `search` slot, drawn on\n// the surface above the items — which is also what puts the bar and the\n// items inside one `Autocomplete` when the menu is filtered.\n//\n// **A separator needs no slot from the call site.** React Aria's menu\n// provides the separator context, which is what `Menu.Separator` picks up —\n// that is why Separator moved onto React Aria in Phase 0. What is added here\n// is the menus page's 8dp either side of the rule.\n\nconst MENU_MIN = '112px';\nconst MENU_MAX = '280px';\nconst styles = {\n content: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n ks0D6T: \"x1jkqq1h\",\n k7Eaqz: \"x1c7vg25\",\n k3XXqK: \"x1t137rt\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n },\n shortcut: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\ntype MenuAlign = OverlayAlign;\ntype MenuContentProps<T extends object = object> = {\n /**\n * Where the menu lines up along that side. Left out, a menu lines up with\n * the start of its trigger, and a submenu with the top of the item that\n * opens it.\n */\n align?: MenuAlign;\n /** Moves the menu along that side, in pixels. */\n alignOffset?: number;\n /**\n * Lands on the surface, which is the element a layout positions. A\n * function may compute the class from the surface's render state.\n */\n className?: ClassNameOrFunction<PopoverRenderProps>;\n /**\n * Where to portal the menu. Defaults to the container of the `ThemeScope`\n * around it, which keeps the menu on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the menu\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * What the menu shows when nothing is in it — after a search that matched\n * nothing, usually. Left out, it is a muted row saying \"No results\" in the\n * I18nProvider's locale, which the surface also announces, so the menu\n * keeps a row's height rather than shrinking to its search bar. One of the\n * call site's own replaces the announcement as well as the row.\n */\n renderEmptyState?: RACMenuProps<T>['renderEmptyState'];\n /**\n * Content drawn on the surface above the items — a search bar that filters\n * them, usually. It goes here rather than among the children because a\n * menu's children are a collection: React Aria walks them for items and\n * drops anything else, so an input written beside them disappears.\n *\n * To filter with it, wrap this whole part in `Autocomplete`, which puts\n * the bar and the items inside one wrapper. The bar takes focus as the\n * menu opens, however it was opened, so typing filters straight away,\n * and its query is cleared as the menu closes, so a reopened menu shows\n * every item.\n */\n search?: ReactNode;\n /**\n * Which side of the trigger the menu opens on. Left out, a menu opens below\n * its trigger and a submenu at the inline end of the item that opens it,\n * where the item's chevron points — the places React Aria gives each.\n * Given `align` alone, the side is `bottom`. `start` and `end` follow the\n * writing direction, as a submenu does; `left` and `right` stay put in\n * either.\n */\n side?: MenuSide;\n /**\n * How far the menu sits from the trigger, in pixels. Left out, React Aria's:\n * 8, or 0 for a menu opened with `trigger=\"contextMenu\"`.\n */\n sideOffset?: number;\n /** Lands on the surface, as `className` does. */\n style?: StyleOrFunction<PopoverRenderProps>;\n} & Omit<RACMenuProps<T>, 'className' | 'renderEmptyState' | 'style'>;\ntype MenuItemProps<T extends object = object> = {\n /** The item's label — what it does. */\n children?: ReactNode;\n /** A function may compute the class from the item's render state. */\n className?: RACMenuItemProps<T>['className'];\n /** Content before the label, usually an icon. */\n leading?: ReactNode;\n /**\n * The keystroke that runs the item, at the end of the row. Pass a `Keycap`\n * to draw it as one; a string is set as plain text in the muted role. Either\n * goes through React Aria's keyboard slot, so a screen reader announces it\n * apart from the label rather than reading the two as one name. It takes\n * the item's colour while the item is selected or disabled, and so does a\n * `Keycap` inside it, its rule included.\n */\n shortcut?: ReactNode;\n /** A function may compute the style from the item's render state. */\n style?: RACMenuItemProps<T>['style'];\n /** Content after the label, before the shortcut. */\n trailing?: ReactNode;\n} & Omit<RACMenuItemProps<T>, 'children' | 'className' | 'style'>;\ntype MenuLoadMoreProps = Omit<RACMenuLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\n\n// `children` is optional here where React Aria makes it required, so the\n// type reads the way Sheet's and Popover's do: a root that composes rather\n// than one that has to be handed something. Sheet does the same for the same\n// reason.\ntype MenuProps = Omit<RACMenuTriggerProps, 'children'> & {\n /** The trigger, then the `Menu.Content` it opens. */\n children?: ReactNode;\n};\ntype MenuSectionProps<T extends object = object> = Omit<RACMenuSectionProps<T>, 'children'> & {\n /**\n * The items in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\ntype MenuSeparatorProps = Omit<ComponentProps<typeof Separator>, 'orientation'>;\ntype MenuSide = OverlaySide;\ntype MenuSubmenuProps = {\n /**\n * The item that opens the submenu, then the `Menu.Content` it opens.\n * Exactly those two, in that order. The count is the type's to enforce;\n * the order is not, since every JSX element has the same type.\n */\n children: [trigger: ReactElement, content: ReactElement];\n /**\n * How long the pointer rests on the item before the submenu opens, in\n * milliseconds.\n * @default 200\n */\n delay?: number;\n};\n\n// The default empty state, at module scope so every menu hands React Aria\n// the same function.\nfunction emptyState() {\n return <CollectionEmpty variant=\"menu\" />;\n}\n\n// What the item draws, from React Aria's render state. 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; the React Compiler memoises the result\n// on its inputs.\n//\n// The render state decides three things: the chevron, which an item inside a\n// SubmenuTrigger gets without the call site asking twice, the check on a\n// selected item, and the supporting line's colour, which the row module takes\n// from whether the row is selected or disabled.\n//\n// The check takes the leading slot where the item has leading content, in\n// place of it, and comes at the end of the row where it has none. Either way\n// the label stays where it was, so choosing an item moves nothing in the\n// menu. Hidden from the tree, since React Aria's `aria-checked` already says\n// the item is chosen.\nfunction itemContent(children: ReactNode, leading: ReactNode, shortcut: ReactNode, trailing: ReactNode, ripple: ReactNode) {\n return (state: MenuItemRenderProps) => {\n const check = state.isSelected ? <CheckGlyph className=\"xxk0z11 x9f619 x2lah0s xvy4d1p\" /> : undefined;\n const hasLeading = leading !== undefined && leading !== null;\n return <>\n <RowContent isDisabled={state.isDisabled} isSelected={state.isSelected} leading={hasLeading ? check ?? leading : undefined} trailing={trailingOf(state, shortcut, trailing, hasLeading ? undefined : check)} variant=\"menu\">\n <Text slot=\"label\">{children}</Text>\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n };\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so an\n// item's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled item, so nothing has to outrank them.\n// No overline, and so no three-line row: the menus page gives one item\n// height and one line of text. `List.Item` and `ListBox.Item` take the prop\n// because the lists page is what they draw, and this row is 48dp rather than\n// that page's 56. A label longer than the surface's 280dp still wraps, and\n// breaks inside a word that is wider than that, rather than running out of\n// the surface and under the shortcut — the shared row's rule, which nothing\n// here truncates.\nfunction itemStyles(state: MenuItemRenderProps) {\n return stylex.props(rowStyles.base, rowStyles.menu, state.isSelected && rowStyles.selectedMenu, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isPressed && rowStyles.pressed, state.isDisabled && rowStyles.disabled);\n}\n\n/**\n * A list of actions opened from a control. Open state is React Aria's: pass\n * `isOpen` with `onOpenChange` to control it, or `defaultOpen` to let it keep\n * its own.\n *\n * A `Button` or `IconButton` placed directly inside opens it; everything the\n * menu shows goes in `Menu.Content`, since the trigger lives in the page\n * while the menu is portalled out to the end of the body.\n *\n * ```tsx\n * <Menu>\n * <Button>Open</Button>\n * <Menu.Content>\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </Menu.Content>\n * </Menu>\n * ```\n *\n * The trigger's text names the menu, so the button is where a label goes.\n */\nfunction Menu({\n children,\n ...props\n}: MenuProps) {\n return <RACMenuTrigger {...props}>{children}</RACMenuTrigger>;\n}\n\n/**\n * The menu itself, and the surface it is drawn on. React Aria names it after\n * the control that opened it, so `aria-label` here is ignored — name the\n * trigger instead.\n *\n * The call site's `className` and `style` land on the surface, which is the\n * element a layout positions.\n *\n * The placement and the offsets are passed on only where the call site gives\n * them. React Aria hands the popover a placement of its own through context —\n * below the trigger for a menu, at the item's inline end for a submenu — and\n * a prop set here replaces it, so a default written here opened every\n * submenu below its item, over the rest of the menu it came from.\n *\n * A menu with nothing in it shows a muted \"No results\" row in place of its\n * items, and says so through a status on the surface, which is what a search\n * that matches nothing leaves; pass `renderEmptyState` to draw something\n * else.\n */\nfunction MenuContent<T extends object = object>({\n align,\n alignOffset,\n className,\n container,\n ref,\n search,\n side,\n sideOffset,\n style,\n ...props\n}: MenuContentProps<T> & RefAttributes<HTMLElement>) {\n return <RACPopover crossOffset={alignOffset} offset={sideOffset} placement={side === undefined && align === undefined ? undefined : placementOf(side ?? 'bottom', align ?? 'start')}\n // The surface, where the call site's class and style land, rather than\n // the menu inside it, which takes the rest of the props.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles(surfaceStyles, {\n className,\n style\n })}>\n <CollectionStatus>\n {search === undefined ? null : <SearchSlot>{search}</SearchSlot>}\n <RACMenu<T> renderEmptyState={emptyState} {...props} className=\"x9f619 x78zum5 xdt5ytf x1t137rt\" />\n </CollectionStatus>\n </RACPopover>;\n}\n\n// What a press on the search slot focuses: its field's own control.\nconst SEARCH_CONTROL = 'input, textarea, [contenteditable=\"true\"]';\n\n/**\n * One action. Its slots are the row's: `leading` before the label, the label\n * as children, and `trailing` after it, with `shortcut` at the end. An item\n * that opens a submenu draws the chevron itself.\n */\nfunction MenuItem<T extends object = object>({\n children,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n shortcut,\n textValue,\n trailing,\n ...props\n}: MenuItemProps<T> & RefAttributes<HTMLDivElement>) {\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemStyles, props)}>\n {itemContent(children, leading, shortcut, trailing, ripple.surface)}\n </RACMenuItem>;\n}\n\n/**\n * The row shown while more items are being fetched. React Aria calls\n * `onLoadMore` when it comes into view, and draws it only while `isLoading`.\n */\nfunction MenuLoadMore({\n label,\n ...props\n}: MenuLoadMoreProps & RefAttributes<HTMLDivElement>) {\n return <RACMenuLoadMoreItem {...props} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x78zum5 xl56j7k x1ddmzdj\"\n }, props)}>\n <CollectionLoadMore diameter=\"20px\" label={label} />\n </RACMenuLoadMoreItem>;\n}\n\n/**\n * A named group of items. `header` names it, and is what a screen reader\n * reads before the items inside.\n */\nfunction MenuSection<T extends object = object>({\n children,\n header,\n ...props\n}: MenuSectionProps<T> & RefAttributes<HTMLElement>) {\n return <RACMenuSection {...props}>\n {header === undefined ? null : <Header className=\"x9f619 x1w5n3ug xrgwony x12s497w x1szcwkt xo803ec xyl1r0q xw3mh6e x6gmt8y x790zyz\">{header}</Header>}\n {children}\n </RACMenuSection>;\n}\n\n/**\n * A rule between groups of items. It takes its role from the menu around it,\n * so it needs no slot from the call site.\n */\nfunction MenuSeparator(props: MenuSeparatorProps) {\n return <Separator {...props} {...mergeStyles({\n className: \"xwpi13i\"\n }, props)} />;\n}\n\n/**\n * An item that opens a menu of its own. Takes exactly two children: the\n * `Menu.Item` that opens it, then the `Menu.Content` it opens.\n */\nfunction MenuSubmenu(props: MenuSubmenuProps) {\n return <RACSubmenuTrigger {...props} />;\n}\n\n/**\n * The search bar above a menu's items, mounted only while the menu is open.\n *\n * Its field takes focus as it mounts. React Aria's popover otherwise took\n * focus itself whenever a pointer opened the menu, so typing went nowhere\n * and only a keyboard's Enter happened to land in the field. Mounted before\n * the items, so the popover finds focus already inside it and leaves it.\n *\n * The query is cleared as it unmounts. The `Autocomplete` that filters the\n * items wraps this whole part and outlives the popover, so its query did\n * too: a menu filtered, used and reopened came back filtered.\n */\nfunction SearchSlot({\n children\n}: {\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const autocomplete = useContext(AutocompleteStateContext);\n // The latest state, for the cleanup below to clear: the state object is a\n // new one on every render, and the effect that mounts the bar runs once.\n const latest = useRef(autocomplete);\n useEffect(() => {\n latest.current = autocomplete;\n });\n useEffect(() => {\n ref.current?.querySelector<HTMLElement>(SEARCH_CONTROL)?.focus();\n return () => {\n latest.current?.setInputValue('');\n };\n }, []);\n return <div ref={ref} className=\"x9f619 xqf7pud xn60lsn\">\n {children}\n </div>;\n}\n\n// The surface grows from the edge it is anchored by, which is what makes it\n// read as coming out of the trigger. Built by a call rather than written\n// inline at the prop, which is what react-perf's no-new-function-as-prop is\n// after.\nfunction surfaceStyles(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.content, popupOrigin(state.placement));\n}\n\n/** What sits after the label: the call site's content, then the shortcut or\n * the submenu's chevron. */\nfunction trailingOf(state: MenuItemRenderProps, shortcut: ReactNode, trailing: ReactNode, check: ReactNode) {\n if (state.hasSubmenu) {\n return <>\n {trailing}\n <ChevronEndGlyph className=\"x1qx5ct2 xw4jnvo x19axjrm x1c071of\" />\n </>;\n }\n if (shortcut === undefined && trailing === undefined && check === undefined) {\n return undefined;\n }\n return <>\n {trailing}\n {shortcut === undefined ? null : <Keyboard {...stylex.props(styles.shortcut, supportingTone('menu', state))}>\n <KeycapToneContext value={state.isDisabled || state.isSelected ? 'inherit' : 'neutral'}>\n {shortcut}\n </KeycapToneContext>\n </Keyboard>}\n {check}\n </>;\n}\nMenu.Content = MenuContent;\nMenu.Item = MenuItem;\nMenu.LoadMore = MenuLoadMore;\nMenu.Section = MenuSection;\nMenu.Separator = MenuSeparator;\nMenu.Submenu = MenuSubmenu;\nexport type { MenuAlign, MenuContentProps, MenuItemProps, MenuLoadMoreProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuSide, MenuSubmenuProps };\nexport { MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu };\nexport default Menu;"],"mappings":";;;;;;;;;;;;;;;;;AA4EA,MAAMqB,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRC,QAAQ;EACRF,OAAO;CACT;AACF;AAqIA,SAASgB,aAAa;CACpB,OAAO,oBAAC,iBAAD,EAAiB,SAAQ,OAAM,CAAA;AACxC;AAiBA,SAASC,YAAYN,UAAqBC,SAAoBX,UAAqBY,UAAqBK,QAAmB;CACzH,QAAQC,UAA+B;EACrC,MAAMC,QAAQD,MAAME,aAAa,oBAAC,YAAD,EAAY,WAAU,iCAAgC,CAAA,IAAMC,KAAAA;EAC7F,MAAMC,aAAaX,YAAYU,KAAAA,KAAaV,YAAY;EACxD,OAAO,qBAAA,YAAA,EAAA,UAAA,CACH,oBAAC,YAAD;GAAY,YAAYO,MAAMK;GAAY,YAAYL,MAAME;GAAY,SAASE,aAAaH,SAASR,UAAUU,KAAAA;GAAW,UAAUG,WAAWN,OAAOlB,UAAUY,UAAUU,aAAaD,KAAAA,IAAYF,KAAK;GAAG,SAAQ;GACnN,UAAA,oBAAC,MAAD;IAAM,MAAK;IAAST;GAAe,CAAA;EACzB,CAAA,G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OAAA5B,UAAA;EACCmC,KAAA,oBAAA,OAAA;GAAUJ;GAAe,WAAA;GAC3B/B;EACG,CAAA;EAAA4B,EAAA,KAAA5B;EAAA4B,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAFDO;AAEC;AAOV,SAASF,cAAczB,OAA2B;CAChD,OAAO/C,MAAagB,QAAQmF,OAAO/E,OAAOC,SAASH,YAAY6B,MAAMqD,SAAS,CAAC;AACjF;;;AAIA,SAAS/C,WAAWN,OAA4BlB,UAAqBY,UAAqBO,OAAkB;CAC1G,IAAID,MAAMsD,YACR,OAAO,qBAAA,YAAA,EAAA,UAAA,CACF5D,UACD,oBAAC,iBAAD,EAAiB,WAAU,qCAAoC,CAAA,CACjE,EAAA,CAAA;CAEJ,IAAIZ,aAAaqB,KAAAA,KAAaT,aAAaS,KAAAA,KAAaF,UAAUE,KAAAA,GAChE;CAEF,OAAO,qBAAA,YAAA,EAAA,UAAA;EACFT;EACAZ,aAAaqB,KAAAA,IAAY,OAAO,oBAAC,UAAD;GAAU,GAAIlD,MAAaoB,OAAOS,UAAUhB,eAAe,QAAQkC,KAAK,CAAC;GACtG,UAAA,oBAAC,mBAAD;IAAmB,OAAOA,MAAMK,cAAcL,MAAME,aAAa,YAAY;IAC1EpB,UAAAA;GACgB,CAAA;EACX,CAAA;EACXmB;CACH,EAAA,CAAA;AACJ;AACA3C,KAAKiG,UAAUjC;AACfhE,KAAKkG,OAAOjG;AACZD,KAAKmG,WAAWjB;AAChBlF,KAAKoG,UAAUhG;AACfJ,KAAKc,YAAYqE;AACjBnF,KAAKqG,UAAUjB"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useContext","useEffect","useRef","AutocompleteStateContext","Menu","MenuItem","RACMenuItem","RACMenuLoadMoreItem","MenuSection","textOf","useRipple","rowStyles","supportingTone","mergeStatefulStyles","mergeStyles","overlay","placementOf","popupOrigin","Separator","styles","content","kWkggS","kaIpWk","ks0D6T","k7Eaqz","k3XXqK","k8WAf4","$$css","shortcut","kMwMTN","align","alignOffset","className","container","search","side","sideOffset","style","children","leading","trailing","label","header","emptyState","itemContent","ripple","state","check","isSelected","undefined","hasLeading","isDisabled","trailingOf","itemStyles","props","base","menu","selectedMenu","isHovered","hovered","isFocusVisible","focusVisible","focusVisibleSelected","isPressed","pressed","disabled","t0","$","t1","MenuContent","ref","t2","surfaceStyles","t3","t4","t5","t6","SEARCH_CONTROL","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","T0","handlers","surface","MenuLoadMore","MenuSeparator","MenuSubmenu","SearchSlot","autocomplete","latest","current","Symbol","for","querySelector","focus","setInputValue","popup","placement","hasSubmenu","Content","Item","LoadMore","Section","Submenu","RACMenuTrigger","RACMenu","RACPopover","RACMenuSection","Separator","RACSubmenuTrigger"],"sources":["../../../src/components/menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ComponentProps, ReactElement, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, MenuItemRenderProps, PopoverRenderProps, MenuItemProps as RACMenuItemProps, MenuLoadMoreItemProps as RACMenuLoadMoreItemProps, MenuProps as RACMenuProps, MenuSectionProps as RACMenuSectionProps, MenuTriggerProps as RACMenuTriggerProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useEffect, useRef } from 'react';\nimport { AutocompleteStateContext, Header, Keyboard, Menu as RACMenu, MenuItem as RACMenuItem, MenuLoadMoreItem as RACMenuLoadMoreItem, MenuSection as RACMenuSection, MenuTrigger as RACMenuTrigger, Popover as RACPopover, SubmenuTrigger as RACSubmenuTrigger, Text } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { CollectionEmpty, CollectionLoadMore, CollectionStatus } from '../../collection';\nimport { textOf } from '../../collection/text';\nimport { CheckGlyph, ChevronEndGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { KeycapToneContext } from '../../keycap/context';\nimport { RowContent } from '../../row';\nimport { rowStyles, supportingTone } from '../../row/styles';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, sizing, spacing, typography } from '../../tokens/design.tokens.stylex';\nimport Separator from '../separator';\n\n// The menus page's menu: a surface between 112 and 280 wide with a 4dp\n// corner and 8dp above and below its items, holding rows of the row module's\n// menu variant — 48dp tall, a label-large label, tertiary container when\n// selected, with a check beside the label. The container alone sits as close\n// as 1.1:1 to the surface, so the check is what carries the selection for a\n// reader who cannot tell the two apart. The surface itself is the overlay module's, shared with Popover\n// and Sheet, with the two things the menus page decides differently applied\n// over it: the corner, which is the extra-small step rather than the\n// medium one every other overlay takes, and the container colour, which is\n// the Expressive column's surface container low rather than the baseline's\n// surface container.\n//\n// Six parts, because everything a menu holds takes arbitrary content:\n// `Menu.Content`, `Menu.Item`, `Menu.Section`, `Menu.Separator`,\n// `Menu.Submenu` and `Menu.LoadMore`. A `Button` or `IconButton` placed\n// directly inside `Menu` is the trigger, wired through React Aria's context\n// rather than a part of ours — the same arrangement Sheet and Popover use.\n//\n// Four things are worth knowing about how this maps onto React Aria.\n//\n// **The item's styles are a function of its render state.** StyleX cannot\n// target `[data-selected]` on the element it is styling, so selection,\n// disabled and the rest are read from the state React Aria hands the\n// `className` function, wrapped in `mergeStatefulStyles` so a call site's own\n// `className` survives.\n//\n// **A shortcut goes through React Aria's `Keyboard` slot**, and the label\n// through its `Text` slot. The second is what makes the first work: React\n// Aria points the item's `aria-labelledby` at the labelled text, so a screen\n// reader reads the label alone and announces the keystroke separately. Left\n// as plain content, the item's name is its whole text and the shortcut is\n// read as part of what the item does. The keycap itself is the library's.\n// The shortcut's colour follows the item's state as the supporting line's\n// does, through the same `supportingTone`, and a selected or disabled item\n// hands a keycap inside it the `inherit` tone, so the keycap follows too.\n//\n// **A submenu's arrow is drawn from render state, not from a prop.** React\n// Aria reports `hasSubmenu` on the item inside a `SubmenuTrigger`, so an item\n// that opens one gets the chevron without the call site saying so twice. The\n// glyph carries no direction of its own, so the style mirrors it under a\n// right-to-left writing mode.\n//\n// **A menu's children are a collection**, so anything that is not an item is\n// dropped: React Aria walks them looking for items and finds a search input\n// no place to be. `Menu.Content` therefore takes a `search` slot, drawn on\n// the surface above the items — which is also what puts the bar and the\n// items inside one `Autocomplete` when the menu is filtered.\n//\n// **A separator needs no slot from the call site.** React Aria's menu\n// provides the separator context, which is what `Menu.Separator` picks up —\n// that is why Separator moved onto React Aria in Phase 0. What is added here\n// is the menus page's 8dp either side of the rule.\n\nconst MENU_MIN = '112px';\nconst MENU_MAX = '280px';\nconst styles = {\n content: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n ks0D6T: \"x1jkqq1h\",\n k7Eaqz: \"x1c7vg25\",\n k3XXqK: \"x1t137rt\",\n k8WAf4: \"x1cmllll\",\n $$css: true\n },\n shortcut: {\n kMwMTN: \"x1w5n3ug\",\n $$css: true\n }\n};\ntype MenuAlign = OverlayAlign;\ntype MenuContentProps<T extends object = object> = {\n /**\n * Where the menu lines up along that side. Left out, a menu lines up with\n * the start of its trigger, and a submenu with the top of the item that\n * opens it.\n */\n align?: MenuAlign;\n /** Moves the menu along that side, in pixels. */\n alignOffset?: number;\n /**\n * Lands on the surface, which is the element a layout positions. A\n * function may compute the class from the surface's render state.\n */\n className?: ClassNameOrFunction<PopoverRenderProps>;\n /**\n * Where to portal the menu. Defaults to the container of the `ThemeScope`\n * around it, which keeps the menu on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the menu\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * What the menu shows when nothing is in it — after a search that matched\n * nothing, usually. Left out, it is a muted row saying \"No results\" in the\n * I18nProvider's locale, which the surface also announces, so the menu\n * keeps a row's height rather than shrinking to its search bar. One of the\n * call site's own replaces the announcement as well as the row.\n */\n renderEmptyState?: RACMenuProps<T>['renderEmptyState'];\n /**\n * Content drawn on the surface above the items — a search bar that filters\n * them, usually. It goes here rather than among the children because a\n * menu's children are a collection: React Aria walks them for items and\n * drops anything else, so an input written beside them disappears.\n *\n * To filter with it, wrap this whole part in `Autocomplete`, which puts\n * the bar and the items inside one wrapper. The bar takes focus as the\n * menu opens, however it was opened, so typing filters straight away,\n * and its query is cleared as the menu closes, so a reopened menu shows\n * every item.\n */\n search?: ReactNode;\n /**\n * Which side of the trigger the menu opens on. Left out, a menu opens below\n * its trigger and a submenu at the inline end of the item that opens it,\n * where the item's chevron points — the places React Aria gives each.\n * Given `align` alone, the side is `bottom`. `start` and `end` follow the\n * writing direction, as a submenu does; `left` and `right` stay put in\n * either.\n */\n side?: MenuSide;\n /**\n * How far the menu sits from the trigger, in pixels. Left out, React Aria's:\n * 8, or 0 for a menu opened with `trigger=\"contextMenu\"`.\n */\n sideOffset?: number;\n /** Lands on the surface, as `className` does. */\n style?: StyleOrFunction<PopoverRenderProps>;\n} & Omit<RACMenuProps<T>, 'className' | 'renderEmptyState' | 'style'>;\ntype MenuItemProps<T extends object = object> = {\n /** The item's label — what it does. */\n children?: ReactNode;\n /** A function may compute the class from the item's render state. */\n className?: RACMenuItemProps<T>['className'];\n /** Content before the label, usually an icon. */\n leading?: ReactNode;\n /**\n * The keystroke that runs the item, at the end of the row. Pass a `Keycap`\n * to draw it as one; a string is set as plain text in the muted role. Either\n * goes through React Aria's keyboard slot, so a screen reader announces it\n * apart from the label rather than reading the two as one name. It takes\n * the item's colour while the item is selected or disabled, and so does a\n * `Keycap` inside it, its rule included.\n */\n shortcut?: ReactNode;\n /** A function may compute the style from the item's render state. */\n style?: RACMenuItemProps<T>['style'];\n /** Content after the label, before the shortcut. */\n trailing?: ReactNode;\n} & Omit<RACMenuItemProps<T>, 'children' | 'className' | 'style'>;\ntype MenuLoadMoreProps = Omit<RACMenuLoadMoreItemProps, 'children'> & {\n /**\n * What the row says while it is loading. Read by a screen reader; the ring\n * itself carries no text.\n * Left out, it is the word for it in the I18nProvider's locale — \"Loading\n * more\" in English.\n */\n label?: string;\n};\n\n// `children` is optional here where React Aria makes it required, so the\n// type reads the way Sheet's and Popover's do: a root that composes rather\n// than one that has to be handed something. Sheet does the same for the same\n// reason.\ntype MenuProps = Omit<RACMenuTriggerProps, 'children'> & {\n /** The trigger, then the `Menu.Content` it opens. */\n children?: ReactNode;\n};\ntype MenuSectionProps<T extends object = object> = Omit<RACMenuSectionProps<T>, 'children'> & {\n /**\n * The items in the section. A section built from data puts React Aria's\n * `Collection` in here rather than a render function, since the header is\n * an element beside them.\n */\n children?: ReactNode;\n /**\n * The section's heading, rendered through React Aria's header so the\n * section is named by it. A section without one is a group with no name.\n */\n header?: ReactNode;\n};\ntype MenuSeparatorProps = Omit<ComponentProps<typeof Separator>, 'orientation'>;\ntype MenuSide = OverlaySide;\ntype MenuSubmenuProps = {\n /**\n * The item that opens the submenu, then the `Menu.Content` it opens.\n * Exactly those two, in that order. The count is the type's to enforce;\n * the order is not, since every JSX element has the same type.\n */\n children: [trigger: ReactElement, content: ReactElement];\n /**\n * How long the pointer rests on the item before the submenu opens, in\n * milliseconds.\n * @default 200\n */\n delay?: number;\n};\n\n// The default empty state, at module scope so every menu hands React Aria\n// the same function.\nfunction emptyState() {\n return <CollectionEmpty variant=\"menu\" />;\n}\n\n// What the item draws, from React Aria's render state. 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; the React Compiler memoises the result\n// on its inputs.\n//\n// The render state decides three things: the chevron, which an item inside a\n// SubmenuTrigger gets without the call site asking twice, the check on a\n// selected item, and the supporting line's colour, which the row module takes\n// from whether the row is selected or disabled.\n//\n// The check takes the leading slot where the item has leading content, in\n// place of it, and comes at the end of the row where it has none. Either way\n// the label stays where it was, so choosing an item moves nothing in the\n// menu. Hidden from the tree, since React Aria's `aria-checked` already says\n// the item is chosen.\nfunction itemContent(children: ReactNode, leading: ReactNode, shortcut: ReactNode, trailing: ReactNode, ripple: ReactNode) {\n return (state: MenuItemRenderProps) => {\n const check = state.isSelected ? <CheckGlyph className=\"xxk0z11 x9f619 x2lah0s xvy4d1p\" /> : undefined;\n const hasLeading = leading !== undefined && leading !== null;\n return <>\n <RowContent isDisabled={state.isDisabled} isSelected={state.isSelected} leading={hasLeading ? check ?? leading : undefined} trailing={trailingOf(state, shortcut, trailing, hasLeading ? undefined : check)} variant=\"menu\">\n <Text slot=\"label\">{children}</Text>\n </RowContent>\n {state.isDisabled ? null : ripple}\n </>;\n };\n}\n\n// StyleX cannot target `[data-selected]` on the element it is styling, so an\n// item's state comes from the render state React Aria hands its className.\n// The order matters: `disabled` is applied last so its ground and colour\n// win over the selected container's. The state layers come from the render\n// state as well — see `focusVisible` in src/row/styles.ts — and React Aria\n// reports none of them on a disabled item, so nothing has to outrank them.\n// No overline, and so no three-line row: the menus page gives one item\n// height and one line of text. `List.Item` and `ListBox.Item` take the prop\n// because the lists page is what they draw, and this row is 48dp rather than\n// that page's 56. A label longer than the surface's 280dp still wraps, and\n// breaks inside a word that is wider than that, rather than running out of\n// the surface and under the shortcut — the shared row's rule, which nothing\n// here truncates.\nfunction itemStyles(state: MenuItemRenderProps) {\n return stylex.props(rowStyles.base, rowStyles.menu, state.isSelected && rowStyles.selectedMenu, state.isHovered && rowStyles.hovered, state.isFocusVisible && rowStyles.focusVisible, state.isFocusVisible && state.isSelected && rowStyles.focusVisibleSelected, state.isPressed && rowStyles.pressed, state.isDisabled && rowStyles.disabled);\n}\n\n/**\n * A list of actions opened from a control. Open state is React Aria's: pass\n * `isOpen` with `onOpenChange` to control it, or `defaultOpen` to let it keep\n * its own.\n *\n * A `Button` or `IconButton` placed directly inside opens it; everything the\n * menu shows goes in `Menu.Content`, since the trigger lives in the page\n * while the menu is portalled out to the end of the body.\n *\n * ```tsx\n * <Menu>\n * <Button>Open</Button>\n * <Menu.Content>\n * <Menu.Item id=\"first\">First item</Menu.Item>\n * </Menu.Content>\n * </Menu>\n * ```\n *\n * The trigger's text names the menu, so the button is where a label goes.\n */\nfunction Menu({\n children,\n ...props\n}: MenuProps) {\n return <RACMenuTrigger {...props}>{children}</RACMenuTrigger>;\n}\n\n/**\n * The menu itself, and the surface it is drawn on. React Aria names it after\n * the control that opened it, so `aria-label` here is ignored — name the\n * trigger instead.\n *\n * The call site's `className` and `style` land on the surface, which is the\n * element a layout positions.\n *\n * The placement and the offsets are passed on only where the call site gives\n * them. React Aria hands the popover a placement of its own through context —\n * below the trigger for a menu, at the item's inline end for a submenu — and\n * a prop set here replaces it, so a default written here opened every\n * submenu below its item, over the rest of the menu it came from.\n *\n * A menu with nothing in it shows a muted \"No results\" row in place of its\n * items, and says so through a status on the surface, which is what a search\n * that matches nothing leaves; pass `renderEmptyState` to draw something\n * else.\n */\nfunction MenuContent<T extends object = object>({\n align,\n alignOffset,\n className,\n container,\n ref,\n search,\n side,\n sideOffset,\n style,\n ...props\n}: MenuContentProps<T> & RefAttributes<HTMLElement>) {\n return <RACPopover crossOffset={alignOffset} offset={sideOffset} placement={side === undefined && align === undefined ? undefined : placementOf(side ?? 'bottom', align ?? 'start')}\n // The surface, where the call site's class and style land, rather than\n // the menu inside it, which takes the rest of the props.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles(surfaceStyles, {\n className,\n style\n })}>\n <CollectionStatus>\n {search === undefined ? null : <SearchSlot>{search}</SearchSlot>}\n <RACMenu<T> renderEmptyState={emptyState} {...props} className=\"x9f619 x78zum5 xdt5ytf x1t137rt\" />\n </CollectionStatus>\n </RACPopover>;\n}\n\n// What a press on the search slot focuses: its field's own control.\nconst SEARCH_CONTROL = 'input, textarea, [contenteditable=\"true\"]';\n\n/**\n * One action. Its slots are the row's: `leading` before the label, the label\n * as children, and `trailing` after it, with `shortcut` at the end. An item\n * that opens a submenu draws the chevron itself.\n */\nfunction MenuItem<T extends object = object>({\n children,\n leading,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n shortcut,\n textValue,\n trailing,\n ...props\n}: MenuItemProps<T> & RefAttributes<HTMLDivElement>) {\n // The press ripple List's rows draw — see ListItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemStyles, props)}>\n {itemContent(children, leading, shortcut, trailing, ripple.surface)}\n </RACMenuItem>;\n}\n\n/**\n * The row shown while more items are being fetched. React Aria calls\n * `onLoadMore` when it comes into view, and draws it only while `isLoading`.\n */\nfunction MenuLoadMore({\n label,\n ...props\n}: MenuLoadMoreProps & RefAttributes<HTMLDivElement>) {\n return <RACMenuLoadMoreItem {...props} {...mergeStyles({\n className: \"x6s0dn4 x9f619 x78zum5 xl56j7k x1ddmzdj\"\n }, props)}>\n <CollectionLoadMore diameter=\"20px\" label={label} />\n </RACMenuLoadMoreItem>;\n}\n\n/**\n * A named group of items. `header` names it, and is what a screen reader\n * reads before the items inside.\n */\nfunction MenuSection<T extends object = object>({\n children,\n header,\n ...props\n}: MenuSectionProps<T> & RefAttributes<HTMLElement>) {\n return <RACMenuSection {...props}>\n {header === undefined ? null : <Header className=\"x9f619 x1w5n3ug xrgwony x12s497w x1szcwkt xo803ec xyl1r0q xw3mh6e x6gmt8y x790zyz\">{header}</Header>}\n {children}\n </RACMenuSection>;\n}\n\n/**\n * A rule between groups of items. It takes its role from the menu around it,\n * so it needs no slot from the call site.\n */\nfunction MenuSeparator(props: MenuSeparatorProps) {\n return <Separator {...props} {...mergeStyles({\n className: \"xwpi13i\"\n }, props)} />;\n}\n\n/**\n * An item that opens a menu of its own. Takes exactly two children: the\n * `Menu.Item` that opens it, then the `Menu.Content` it opens.\n */\nfunction MenuSubmenu(props: MenuSubmenuProps) {\n return <RACSubmenuTrigger {...props} />;\n}\n\n/**\n * The search bar above a menu's items, mounted only while the menu is open.\n *\n * Its field takes focus as it mounts. React Aria's popover otherwise took\n * focus itself whenever a pointer opened the menu, so typing went nowhere\n * and only a keyboard's Enter happened to land in the field. Mounted before\n * the items, so the popover finds focus already inside it and leaves it.\n *\n * The query is cleared as it unmounts. The `Autocomplete` that filters the\n * items wraps this whole part and outlives the popover, so its query did\n * too: a menu filtered, used and reopened came back filtered.\n */\nfunction SearchSlot({\n children\n}: {\n children: ReactNode;\n}) {\n const ref = useRef<HTMLDivElement>(null);\n const autocomplete = useContext(AutocompleteStateContext);\n // The latest state, for the cleanup below to clear: the state object is a\n // new one on every render, and the effect that mounts the bar runs once.\n const latest = useRef(autocomplete);\n useEffect(() => {\n latest.current = autocomplete;\n });\n useEffect(() => {\n ref.current?.querySelector<HTMLElement>(SEARCH_CONTROL)?.focus();\n return () => {\n latest.current?.setInputValue('');\n };\n }, []);\n return <div ref={ref} className=\"x9f619 xqf7pud xn60lsn\">\n {children}\n </div>;\n}\n\n// The surface grows from the edge it is anchored by, which is what makes it\n// read as coming out of the trigger. Built by a call rather than written\n// inline at the prop, which is what react-perf's no-new-function-as-prop is\n// after.\nfunction surfaceStyles(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.content, popupOrigin(state.placement));\n}\n\n/** What sits after the label: the call site's content, then the shortcut or\n * the submenu's chevron. */\nfunction trailingOf(state: MenuItemRenderProps, shortcut: ReactNode, trailing: ReactNode, check: ReactNode) {\n if (state.hasSubmenu) {\n return <>\n {trailing}\n <ChevronEndGlyph className=\"x1qx5ct2 xw4jnvo x19axjrm x1c071of\" />\n </>;\n }\n if (shortcut === undefined && trailing === undefined && check === undefined) {\n return undefined;\n }\n return <>\n {trailing}\n {shortcut === undefined ? null : <Keyboard {...stylex.props(styles.shortcut, supportingTone('menu', state))}>\n <KeycapToneContext value={state.isDisabled || state.isSelected ? 'inherit' : 'neutral'}>\n {shortcut}\n </KeycapToneContext>\n </Keyboard>}\n {check}\n </>;\n}\nMenu.Content = MenuContent;\nMenu.Item = MenuItem;\nMenu.LoadMore = MenuLoadMore;\nMenu.Section = MenuSection;\nMenu.Separator = MenuSeparator;\nMenu.Submenu = MenuSubmenu;\nexport type { MenuAlign, MenuContentProps, MenuItemProps, MenuLoadMoreProps, MenuProps, MenuSectionProps, MenuSeparatorProps, MenuSide, MenuSubmenuProps };\nexport { MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu };\nexport default Menu;"],"mappings":";;;;;;;;;;;;;;;;;AA4EA,MAAMqB,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRC,QAAQ;EACRF,OAAO;CACT;AACF;AAqIA,SAASgB,aAAa;CACpB,OAAO,oBAAC,iBAAD,EAAiB,SAAQ,OAAM,CAAA;AACxC;AAiBA,SAASC,YAAYN,UAAqBC,SAAoBX,UAAqBY,UAAqBK,QAAmB;CACzH,QAAQC,UAA+B;EACrC,MAAMC,QAAQD,MAAME,aAAa,oBAAC,YAAD,EAAY,WAAU,iCAAgC,CAAA,IAAMC,KAAAA;EAC7F,MAAMC,aAAaX,YAAYU,KAAAA,KAAaV,YAAY;EACxD,OAAO,qBAAA,YAAA,EAAA,UAAA,CACH,oBAAC,YAAD;GAAY,YAAYO,MAAMK;GAAY,YAAYL,MAAME;GAAY,SAASE,aAAaH,SAASR,UAAUU,KAAAA;GAAW,UAAUG,WAAWN,OAAOlB,UAAUY,UAAUU,aAAaD,KAAAA,IAAYF,KAAK;GAAG,SAAQ;GACnN,UAAA,oBAAC,MAAD;IAAM,MAAK;IAAST;GAAe,CAAA;EACzB,CAAA,GACXQ,MAAMK,aAAa,OAAON,MAC7B,EAAA,CAAA;CACJ;AACF;AAeA,SAASQ,WAAWP,OAA4B;CAC9C,OAAO/C,MAAaY,UAAU4C,MAAM5C,UAAU6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EAAA6B,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAFDO;AAEC;AAOV,SAASF,cAAc1B,OAA2B;CAChD,OAAO/C,MAAagB,QAAQoF,OAAOhF,OAAOC,SAASH,YAAY6B,MAAMsD,SAAS,CAAC;AACjF;;;AAIA,SAAShD,WAAWN,OAA4BlB,UAAqBY,UAAqBO,OAAkB;CAC1G,IAAID,MAAMuD,YACR,OAAO,qBAAA,YAAA,EAAA,UAAA,CACF7D,UACD,oBAAC,iBAAD,EAAiB,WAAU,qCAAoC,CAAA,CACjE,EAAA,CAAA;CAEJ,IAAIZ,aAAaqB,KAAAA,KAAaT,aAAaS,KAAAA,KAAaF,UAAUE,KAAAA,GAChE;CAEF,OAAO,qBAAA,YAAA,EAAA,UAAA;EACFT;EACAZ,aAAaqB,KAAAA,IAAY,OAAO,oBAAC,UAAD;GAAU,GAAIlD,MAAaoB,OAAOS,UAAUhB,eAAe,QAAQkC,KAAK,CAAC;GACtG,UAAA,oBAAC,mBAAD;IAAmB,OAAOA,MAAMK,cAAcL,MAAME,aAAa,YAAY;IAC1EpB,UAAAA;GACgB,CAAA;EACX,CAAA;EACXmB;CACH,EAAA,CAAA;AACJ;AACA3C,KAAKkG,UAAUjC;AACfjE,KAAKmG,OAAOlG;AACZD,KAAKoG,WAAWjB;AAChBnF,KAAKqG,UAAUjG;AACfJ,KAAKc,YAAYsE;AACjBpF,KAAKsG,UAAUjB"}
@@ -16,12 +16,12 @@ const styles = { destinations: {
16
16
  kXwgrk: "xdt5ytf",
17
17
  kzQI83: "x1iyjqo2",
18
18
  kmuXW: "xs83m0k",
19
- kqGvvJ: "x1fh6m6z",
20
- kUOVxO: "xfll3lq",
19
+ kqGvvJ: "x1k49i25 x1n2n1b5",
20
+ kUOVxO: "xr6ywxm x1g55pzu",
21
21
  kAzted: "x2lwn1j",
22
22
  kORKVm: "x1odjw0f",
23
- k8WAf4: "x12ulsxz",
24
- kg3NbH: "xfn1xvj",
23
+ k8WAf4: "x12ulsxz xf989l1",
24
+ kg3NbH: "xfn1xvj x1rsxkid",
25
25
  $$css: true
26
26
  } };
27
27
  /**