@kanso-labs/kanso-ui 0.45.34 → 0.47.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 (129) 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/label.js +1 -0
  6. package/dist/chip/label.js.map +1 -1
  7. package/dist/chip/styles.js +2 -0
  8. package/dist/chip/styles.js.map +1 -1
  9. package/dist/collection/styles.js +1 -1
  10. package/dist/collection/styles.js.map +1 -1
  11. package/dist/components/breadcrumbs/index.js +4 -1
  12. package/dist/components/breadcrumbs/index.js.map +1 -1
  13. package/dist/components/button-group/index.d.ts +16 -3
  14. package/dist/components/button-group/index.js +53 -86
  15. package/dist/components/button-group/index.js.map +1 -1
  16. package/dist/components/calendar/index.d.ts +3 -3
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/card/index.js +5 -1
  19. package/dist/components/card/index.js.map +1 -1
  20. package/dist/components/carousel/index.js +162 -105
  21. package/dist/components/carousel/index.js.map +1 -1
  22. package/dist/components/chip/index.d.ts +38 -15
  23. package/dist/components/chip/index.js +104 -8
  24. package/dist/components/chip/index.js.map +1 -1
  25. package/dist/components/code/index.js +32 -26
  26. package/dist/components/code/index.js.map +1 -1
  27. package/dist/components/color-area/index.d.ts +5 -3
  28. package/dist/components/color-area/index.js +5 -3
  29. package/dist/components/color-area/index.js.map +1 -1
  30. package/dist/components/color-picker/index.js +6 -3
  31. package/dist/components/color-picker/index.js.map +1 -1
  32. package/dist/components/color-swatch/index.js +1 -1
  33. package/dist/components/color-swatch/index.js.map +1 -1
  34. package/dist/components/color-swatch-picker/index.js +24 -9
  35. package/dist/components/color-swatch-picker/index.js.map +1 -1
  36. package/dist/components/combo-box/index.d.ts +11 -3
  37. package/dist/components/combo-box/index.js +66 -62
  38. package/dist/components/combo-box/index.js.map +1 -1
  39. package/dist/components/copy-field/index.js +1 -0
  40. package/dist/components/copy-field/index.js.map +1 -1
  41. package/dist/components/date-picker/index.d.ts +22 -3
  42. package/dist/components/date-picker/index.js +234 -45
  43. package/dist/components/date-picker/index.js.map +1 -1
  44. package/dist/components/date-range-picker/index.d.ts +3 -1
  45. package/dist/components/date-range-picker/index.js +6 -4
  46. package/dist/components/date-range-picker/index.js.map +1 -1
  47. package/dist/components/disclosure/index.d.ts +4 -3
  48. package/dist/components/disclosure/index.js +159 -101
  49. package/dist/components/disclosure/index.js.map +1 -1
  50. package/dist/components/fab/index.d.ts +3 -1
  51. package/dist/components/fab/index.js +25 -12
  52. package/dist/components/fab/index.js.map +1 -1
  53. package/dist/components/fab-menu/index.js +1 -1
  54. package/dist/components/fab-menu/index.js.map +1 -1
  55. package/dist/components/icon-button/index.js +3 -3
  56. package/dist/components/icon-button/index.js.map +1 -1
  57. package/dist/components/index.d.ts +3 -3
  58. package/dist/components/link/index.js +2 -2
  59. package/dist/components/link/index.js.map +1 -1
  60. package/dist/components/menu/index.js +5 -2
  61. package/dist/components/menu/index.js.map +1 -1
  62. package/dist/components/navigation-bar/index.js.map +1 -1
  63. package/dist/components/navigation-rail/index.js +4 -4
  64. package/dist/components/navigation-rail/index.js.map +1 -1
  65. package/dist/components/navigation-tree/index.js +16 -13
  66. package/dist/components/navigation-tree/index.js.map +1 -1
  67. package/dist/components/popover/index.js +35 -33
  68. package/dist/components/popover/index.js.map +1 -1
  69. package/dist/components/progress-indicator/index.js +258 -172
  70. package/dist/components/progress-indicator/index.js.map +1 -1
  71. package/dist/components/range-calendar/index.js +41 -7
  72. package/dist/components/range-calendar/index.js.map +1 -1
  73. package/dist/components/search-view/index.js +1 -1
  74. package/dist/components/search-view/index.js.map +1 -1
  75. package/dist/components/segmented-button/index.d.ts +3 -2
  76. package/dist/components/segmented-button/index.js +46 -95
  77. package/dist/components/segmented-button/index.js.map +1 -1
  78. package/dist/components/select/index.js +5 -2
  79. package/dist/components/select/index.js.map +1 -1
  80. package/dist/components/slider/index.js +42 -10
  81. package/dist/components/slider/index.js.map +1 -1
  82. package/dist/components/table/index.d.ts +26 -5
  83. package/dist/components/table/index.js +93 -75
  84. package/dist/components/table/index.js.map +1 -1
  85. package/dist/components/tag/index.js +1 -0
  86. package/dist/components/tag/index.js.map +1 -1
  87. package/dist/components/time-picker/index.js +37 -5
  88. package/dist/components/time-picker/index.js.map +1 -1
  89. package/dist/components/token-field/index.js +89 -66
  90. package/dist/components/token-field/index.js.map +1 -1
  91. package/dist/components/toolbar/index.d.ts +8 -3
  92. package/dist/components/toolbar/index.js +123 -43
  93. package/dist/components/toolbar/index.js.map +1 -1
  94. package/dist/components/tree/index.js +1 -1
  95. package/dist/components/tree/index.js.map +1 -1
  96. package/dist/fab/styles.js +12 -0
  97. package/dist/fab/styles.js.map +1 -1
  98. package/dist/field/styles.js +2 -2
  99. package/dist/field/styles.js.map +1 -1
  100. package/dist/hooks/useDockedMonths.js +36 -0
  101. package/dist/hooks/useDockedMonths.js.map +1 -0
  102. package/dist/i18n/index.js +1 -0
  103. package/dist/i18n/index.js.map +1 -1
  104. package/dist/i18n/messages.js +34 -0
  105. package/dist/i18n/messages.js.map +1 -1
  106. package/dist/index.d.ts +3 -3
  107. package/dist/navigation/index.js +5 -5
  108. package/dist/navigation/index.js.map +1 -1
  109. package/dist/navigation/styles.js +5 -1
  110. package/dist/navigation/styles.js.map +1 -1
  111. package/dist/row/context.js +6 -0
  112. package/dist/row/context.js.map +1 -0
  113. package/dist/row/index.js +77 -66
  114. package/dist/row/index.js.map +1 -1
  115. package/dist/row/styles.js +15 -0
  116. package/dist/row/styles.js.map +1 -1
  117. package/dist/segments/index.js +2 -5
  118. package/dist/segments/index.js.map +1 -1
  119. package/dist/segments/literal.js +66 -0
  120. package/dist/segments/literal.js.map +1 -0
  121. package/dist/segments/styles.js +8 -0
  122. package/dist/segments/styles.js.map +1 -1
  123. package/dist/styles/chequer.js +1 -0
  124. package/dist/styles/chequer.js.map +1 -1
  125. package/dist/styles/focus.js.map +1 -1
  126. package/dist/styles.css +509 -69
  127. package/dist/toggle-group/index.js +133 -0
  128. package/dist/toggle-group/index.js.map +1 -0
  129. package/package.json +3 -3
@@ -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,QA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AAOyC,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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AOJ,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"}
@@ -182,7 +182,7 @@ const hovered = {
182
182
  $$css: true
183
183
  },
184
184
  standard: {
185
- kWkggS: "x14noynh",
185
+ kWkggS: "x13tbf8x",
186
186
  $$css: true
187
187
  },
188
188
  standardToggleSelected: {
@@ -220,7 +220,7 @@ const focused = {
220
220
  $$css: true
221
221
  },
222
222
  standard: {
223
- kWkggS: "x19p5drm",
223
+ kWkggS: "xxrhsgr",
224
224
  $$css: true
225
225
  },
226
226
  standardToggleSelected: {
@@ -258,7 +258,7 @@ const pressed = {
258
258
  $$css: true
259
259
  },
260
260
  standard: {
261
- kWkggS: "x123fei2",
261
+ kWkggS: "x10d0pty",
262
262
  $$css: true
263
263
  },
264
264
  standardToggleSelected: {
@@ -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,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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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: \"x13tbf8x\",\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: \"xxrhsgr\",\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: \"x10d0pty\",\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;CACAY,IAAI;EACFC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRN,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRX,OAAO;CACT;CACAgB,UAAU;EACRb,QAAQ;EACRjB,QAAQ;EACRC,QAAQ;EACRiB,QAAQ;EACRJ,OAAO;CACT;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C,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";
@@ -70,7 +70,7 @@ import SplitButton, { SplitButtonAction, SplitButtonActionProps, SplitButtonMenu
70
70
  import Stack, { StackAlign, StackGap, StackJustify, StackProps } from "./stack/index.js";
71
71
  import SupportingPane, { SupportingPaneProps } from "./supporting-pane/index.js";
72
72
  import Switch, { SwitchProps } from "./switch/index.js";
73
- import Table, { TableBody, TableBodyProps, TableCell, TableCellProps, TableColumn, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableLoadMore, TableLoadMoreProps, TableProps, TableRow, TableRowProps } from "./table/index.js";
73
+ import Table, { TableAlign, TableBody, TableBodyProps, TableCell, TableCellProps, TableColumn, TableColumnProps, TableFooter, TableFooterProps, TableHeader, TableHeaderProps, TableLoadMore, TableLoadMoreProps, TableProps, TableRow, TableRowProps } from "./table/index.js";
74
74
  import Tabs, { TabsLayout, TabsList, TabsListProps, TabsPanel, TabsPanelProps, TabsPanels, TabsPanelsProps, TabsProps, TabsTab, TabsTabProps, TabsVariant } from "./tabs/index.js";
75
75
  import Tag, { TagProps, TagTone, TagVariant } from "./tag/index.js";
76
76
  import Text, { TextProps } from "./text/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, type TableAlign, 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 };
@@ -22,9 +22,9 @@ const styles = {
22
22
  $$css: true
23
23
  },
24
24
  disabled: {
25
- kMwMTN: "x1xj74d8",
25
+ kMwMTN: "x1xj74d8 x1bhcspo",
26
26
  kkrTdU: "x1h6gzvc",
27
- k1TLXF: "x1g6epwz",
27
+ k1TLXF: "x1g6epwz x14onrci",
28
28
  $$css: true
29
29
  }
30
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","Link","RACLink","ariaAttributesOf","linkRenderer","focus","mergeStatefulStyles","styles","base","k6CgDc","kaIpWk","kB7OPa","kkrTdU","kHjlTd","kNySMw","kcSHmL","kIyJzY","k1ekBW","kAMwcw","$$css","disabled","kMwMTN","k1TLXF","tones","inherit","primary","underlines","always","kMnn75","hover","none","hovered","tone","underline","t0","$","T0","t1","t2","t3","onKeyDown","onKeyUp","render","t4","t5","props","undefined","element","aria","t6","state","ring","isHovered","isDisabled"],"sources":["../../../src/components/link/index.tsx"],"sourcesContent":["'use client';\n\nimport type { AriaAttributes, DOMAttributes, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, LinkRenderProps, LinkProps as RACLinkProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Link as RACLink } from 'react-aria-components';\nimport { ariaAttributesOf, linkRenderer } from '../../render/aria';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\n\n// No Material Design page draws an inline link. The nearest component is the\n// text button, whose label is the same primary role on no container, and this\n// takes that, with the disabled treatment every page gives content: on\n// surface at the disabled-content opacity. What belongs to a control standing\n// on its own is left out — the button's height, padding, type and state\n// layer. A link takes its size and face from the sentence it sits in, and\n// says it can be followed with its underline instead, which is this\n// component's own: a 1px rule in 70% of the primary role, or in the outline\n// role under `inherit`, turning fully primary on hover.\n//\n// 70% is the least that keeps the rule at 3:1 against the surface in every\n// scheme the library is shown in — Nordic, the closest, comes to 3.15:1. The\n// rule is what separates a link from its sentence, since the primary role\n// sits as close as 1.3:1 to body text in the dark theme, and at the 45% it\n// was drawn in before it measured 2:1 on the light surface.\n//\n// Hover is React Aria's render state rather than `:hover`, as Button's and\n// Tabs' are. A tap leaves a touch screen's emulated pointer over what was\n// tapped, so `:hover` kept a tapped link lit until the next tap, and React\n// Aria ignores that pointer; it also never reports a disabled link hovered.\n\nconst styles = {\n base: {\n k6CgDc: \"x12w9bfk\",\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kHjlTd: \"xj0a0fe\",\n kNySMw: \"xyi4chj\",\n kcSHmL: \"x1ohr1zr\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xz1df8t\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n disabled: {\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n k1TLXF: \"x1g6epwz\",\n $$css: true\n }\n};\nconst tones = {\n inherit: {\n kMwMTN: \"x1heor9g\",\n k1TLXF: \"x1dbr5dg\",\n $$css: true\n },\n primary: {\n kMwMTN: \"x1mxwv8y\",\n k1TLXF: \"x1q3xnwu\",\n $$css: true\n }\n};\nconst underlines = {\n always: {\n kMnn75: \"xujl8zx\",\n $$css: true\n },\n hover: {\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n none: {\n kMnn75: \"xkrqix3\",\n $$css: true\n }\n};\n\n// Under a pointer, from the render state — see the comment at the top. Either\n// tone turns its text and its rule fully primary, and a rule held back until\n// hover is drawn.\nconst hovered = {\n tone: {\n kMwMTN: \"x1mxwv8y\",\n k1TLXF: \"xv4vikv\",\n $$css: true\n },\n underline: {\n kMnn75: \"xujl8zx\",\n $$css: true\n }\n};\n\n// React Aria types the global DOM events against the element it renders, and\n// a handler written for an <a> does not type-check against the <span> it\n// renders while disabled. The keys are retyped against HTMLElement here, as\n// Button's are, so one set of props serves both forms; the events React Aria\n// defines itself (press, hover, focus) keep its types, since it hands those\n// its own event objects.\ntype GlobalEventKey = Exclude<keyof DOMAttributes<HTMLElement> & keyof RACLinkProps, 'onBlur' | 'onClick' | 'onFocus'>;\ntype LinkDOMProps = Omit<RACLinkProps, 'children' | 'className' | 'style' | GlobalEventKey> & Pick<DOMAttributes<HTMLElement>, GlobalEventKey>;\ntype LinkProps = {\n children?: ReactNode;\n /** A function may compute the class from the link's render state. */\n className?: ClassNameOrFunction<LinkRenderProps>;\n /** A function may compute the style from the link's render state. */\n style?: StyleOrFunction<LinkRenderProps>;\n /**\n * Which colour role to render in. `primary` marks the link out from the\n * text around it; `inherit` takes the surrounding colour and leans on the\n * underline alone, for a link in a place already understood to be links —\n * a footer, a breadcrumb, a nav.\n * @default 'primary'\n */\n tone?: LinkTone;\n /**\n * When to draw the rule. Leave it at `always` in prose: without it, colour\n * is the only thing separating the link from the sentence, which some\n * readers cannot see. `hover` and `none` are for links whose position\n * already announces them, such as a row of footer links.\n * @default 'always'\n */\n underline?: LinkUnderline;\n} & AriaAttributes & LinkDOMProps;\ntype LinkTone = 'inherit' | 'primary';\ntype LinkUnderline = 'always' | 'hover' | 'none';\n\n/**\n * A navigational link. It renders an `<a>` and sets no type of its own, so it\n * takes the size and face of the text it sits in. Without `href`, or while\n * disabled, it is a span announced as a link instead, since a disabled\n * anchor is no link at all.\n *\n * ```tsx\n * <Link href=\"#first\">Label</Link>\n * ```\n *\n * Behaviour is React Aria's: `onPress` fires for pointer, touch and keyboard\n * alike, a `RouterProvider` above it turns a navigation into a client-side\n * one, and a `Breadcrumbs` or `Menu` around it reaches it through context.\n * `render` is React Aria's function form, handed the anchor's props to spread\n * onto an element of its own. Every `aria-*` prop is forwarded to the element;\n * React Aria alone would keep only the labelling ones.\n */\nfunction Link({\n onKeyDown,\n onKeyUp,\n render,\n tone = 'primary',\n underline = 'always',\n ...props\n}: LinkProps & RefAttributes<HTMLAnchorElement>) {\n const element = {\n aria: ariaAttributesOf(props),\n onKeyDown,\n onKeyUp\n };\n return <RACLink render={linkRenderer(element, render)} {...props} {...mergeStatefulStyles((state: LinkRenderProps) => stylex.props(styles.base, focus.ring, tones[tone], underlines[underline], state.isHovered && hovered.tone, state.isHovered && underline === 'hover' && hovered.underline, state.isDisabled && styles.disabled), props)} />;\n}\nexport type { LinkDOMProps, LinkProps, LinkTone, LinkUnderline };\nexport default Link;"],"mappings":";;;;;;;;;AAiCA,MAAMQ,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,UAAU;EACRC,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRH,OAAO;CACT;AACF;AACA,MAAMI,QAAQ;CACZC,SAAS;EACPH,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAM,SAAS;EACPJ,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;AACF;AACA,MAAMO,aAAa;CACjBC,QAAQ;EACNC,QAAQ;EACRT,OAAO;CACT;CACAU,OAAO;EACLD,QAAQ;EACRT,OAAO;CACT;CACAW,MAAM;EACJF,QAAQ;EACRT,OAAO;CACT;AACF;AAKA,MAAMY,UAAU;CACdC,MAAM;EACJX,QAAQ;EACRC,QAAQ;EACRH,OAAO;CACT;CACAc,WAAW;EACTL,QAAQ;EACRT,OAAO;CACT;AACF;;;;;;;;;;;;;;;;;;AAqDA,SAAAlB,KAAAiC,IAAA;CAAA,MAAAC,IAAApC,EAAA,EAAA;CAAA,IAAAqC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAJ,EAAA,OAAAD,IAAA;EAAc,MAAA,EAAAM,WAAAC,SAAAC,QAAAV,MAAAW,IAAAV,WAAAW,IAAA,GAAAC,YAAAX;EAIZ,MAAAF,OAAAW,OAAAG,KAAAA,IAAA,YAAAH;E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Wk","kB7OPa","kkrTdU","kHjlTd","kNySMw","kcSHmL","kIyJzY","k1ekBW","kAMwcw","$$css","disabled","kMwMTN","k1TLXF","tones","inherit","primary","underlines","always","kMnn75","hover","none","hovered","tone","underline","t0","$","T0","t1","t2","t3","onKeyDown","onKeyUp","render","t4","t5","props","undefined","element","aria","t6","state","ring","isHovered","isDisabled"],"sources":["../../../src/components/link/index.tsx"],"sourcesContent":["'use client';\n\nimport type { AriaAttributes, DOMAttributes, ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, LinkRenderProps, LinkProps as RACLinkProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Link as RACLink } from 'react-aria-components';\nimport { ariaAttributesOf, linkRenderer } from '../../render/aria';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, stateLayerOpacity } from '../../tokens/design.tokens.stylex';\n\n// No Material Design page draws an inline link. The nearest component is the\n// text button, whose label is the same primary role on no container, and this\n// takes that, with the disabled treatment every page gives content: on\n// surface at the disabled-content opacity. What belongs to a control standing\n// on its own is left out — the button's height, padding, type and state\n// layer. A link takes its size and face from the sentence it sits in, and\n// says it can be followed with its underline instead, which is this\n// component's own: a 1px rule in 70% of the primary role, or in the outline\n// role under `inherit`, turning fully primary on hover.\n//\n// 70% is the least that keeps the rule at 3:1 against the surface in every\n// scheme the library is shown in — Nordic, the closest, comes to 3.15:1. The\n// rule is what separates a link from its sentence, since the primary role\n// sits as close as 1.3:1 to body text in the dark theme, and at the 45% it\n// was drawn in before it measured 2:1 on the light surface.\n//\n// Hover is React Aria's render state rather than `:hover`, as Button's and\n// Tabs' are. A tap leaves a touch screen's emulated pointer over what was\n// tapped, so `:hover` kept a tapped link lit until the next tap, and React\n// Aria ignores that pointer; it also never reports a disabled link hovered.\n\n// Windows High Contrast and the rest of the forced-colours modes.\nconst FORCED_COLORS = '@media (forced-colors: active)';\nconst styles = {\n base: {\n k6CgDc: \"x12w9bfk\",\n kaIpWk: \"x1tfhd1\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n kHjlTd: \"xj0a0fe\",\n kNySMw: \"xyi4chj\",\n kcSHmL: \"x1ohr1zr\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xz1df8t\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n disabled: {\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n k1TLXF: \"x1g6epwz x14onrci\",\n $$css: true\n }\n};\nconst tones = {\n inherit: {\n kMwMTN: \"x1heor9g\",\n k1TLXF: \"x1dbr5dg\",\n $$css: true\n },\n primary: {\n kMwMTN: \"x1mxwv8y\",\n k1TLXF: \"x1q3xnwu\",\n $$css: true\n }\n};\nconst underlines = {\n always: {\n kMnn75: \"xujl8zx\",\n $$css: true\n },\n hover: {\n kMnn75: \"xkrqix3\",\n $$css: true\n },\n none: {\n kMnn75: \"xkrqix3\",\n $$css: true\n }\n};\n\n// Under a pointer, from the render state — see the comment at the top. Either\n// tone turns its text and its rule fully primary, and a rule held back until\n// hover is drawn.\nconst hovered = {\n tone: {\n kMwMTN: \"x1mxwv8y\",\n k1TLXF: \"xv4vikv\",\n $$css: true\n },\n underline: {\n kMnn75: \"xujl8zx\",\n $$css: true\n }\n};\n\n// React Aria types the global DOM events against the element it renders, and\n// a handler written for an <a> does not type-check against the <span> it\n// renders while disabled. The keys are retyped against HTMLElement here, as\n// Button's are, so one set of props serves both forms; the events React Aria\n// defines itself (press, hover, focus) keep its types, since it hands those\n// its own event objects.\ntype GlobalEventKey = Exclude<keyof DOMAttributes<HTMLElement> & keyof RACLinkProps, 'onBlur' | 'onClick' | 'onFocus'>;\ntype LinkDOMProps = Omit<RACLinkProps, 'children' | 'className' | 'style' | GlobalEventKey> & Pick<DOMAttributes<HTMLElement>, GlobalEventKey>;\ntype LinkProps = {\n children?: ReactNode;\n /** A function may compute the class from the link's render state. */\n className?: ClassNameOrFunction<LinkRenderProps>;\n /** A function may compute the style from the link's render state. */\n style?: StyleOrFunction<LinkRenderProps>;\n /**\n * Which colour role to render in. `primary` marks the link out from the\n * text around it; `inherit` takes the surrounding colour and leans on the\n * underline alone, for a link in a place already understood to be links —\n * a footer, a breadcrumb, a nav.\n * @default 'primary'\n */\n tone?: LinkTone;\n /**\n * When to draw the rule. Leave it at `always` in prose: without it, colour\n * is the only thing separating the link from the sentence, which some\n * readers cannot see. `hover` and `none` are for links whose position\n * already announces them, such as a row of footer links.\n * @default 'always'\n */\n underline?: LinkUnderline;\n} & AriaAttributes & LinkDOMProps;\ntype LinkTone = 'inherit' | 'primary';\ntype LinkUnderline = 'always' | 'hover' | 'none';\n\n/**\n * A navigational link. It renders an `<a>` and sets no type of its own, so it\n * takes the size and face of the text it sits in. Without `href`, or while\n * disabled, it is a span announced as a link instead, since a disabled\n * anchor is no link at all.\n *\n * ```tsx\n * <Link href=\"#first\">Label</Link>\n * ```\n *\n * Behaviour is React Aria's: `onPress` fires for pointer, touch and keyboard\n * alike, a `RouterProvider` above it turns a navigation into a client-side\n * one, and a `Breadcrumbs` or `Menu` around it reaches it through context.\n * `render` is React Aria's function form, handed the anchor's props to spread\n * onto an element of its own. Every `aria-*` prop is forwarded to the element;\n * React Aria alone would keep only the labelling ones.\n */\nfunction Link({\n onKeyDown,\n onKeyUp,\n render,\n tone = 'primary',\n underline = 'always',\n ...props\n}: LinkProps & RefAttributes<HTMLAnchorElement>) {\n const element = {\n aria: ariaAttributesOf(props),\n onKeyDown,\n onKeyUp\n };\n return <RACLink render={linkRenderer(element, render)} {...props} {...mergeStatefulStyles((state: LinkRenderProps) => stylex.props(styles.base, focus.ring, tones[tone], underlines[underline], state.isHovered && hovered.tone, state.isHovered && underline === 'hover' && hovered.underline, state.isDisabled && styles.disabled), props)} />;\n}\nexport type { LinkDOMProps, LinkProps, LinkTone, LinkUnderline };\nexport default Link;"],"mappings":";;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A0BgB,MAAAC,UAA4BlD,MAAaO,OAAMC,MAAOH,MAAK8C,MAAO5B,MAAMS,OAAON,WAAWO,YAAYiB,MAAKE,aAAcrB,QAAOC,MAAOkB,MAAKE,aAAcnB,cAAc,WAAWF,QAAOE,WAAYiB,MAAKG,cAAe9C,OAAMa,QAAS;GAACe,EAAA,KAAAH;GAAAG,EAAA,KAAAF;GAAAE,EAAA,KAAAc;EAAA,OAAAA,KAAAd,EAAA;EAA9PI,KAAAjC,oBAAoB2C,IAA4OJ,OAAK;EAACV,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;CAAA,OAAA;EAAAH,KAAAD,EAAA;EAAAE,KAAAF,EAAA;EAAAG,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;CAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAC,MAAAD,EAAA,OAAAE,MAAAF,EAAA,QAAAG,MAAAH,EAAA,QAAAI,IAAA;EAArUI,KAAA,oBAAC,IAAD;GAAiB,QAAAN;GAA6B,GAAMQ;GAAK,GAAMN;EAAsQ,CAAA;EAAIJ,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAAzUQ;AAAyU"}
@@ -35,8 +35,11 @@ function emptyState() {
35
35
  }
36
36
  function itemContent(children, leading, shortcut, trailing, ripple) {
37
37
  return (state) => {
38
- const check = state.isSelected ? /* @__PURE__ */ jsx(CheckGlyph, { className: "xxk0z11 x9f619 x2lah0s xvy4d1p" }) : void 0;
39
38
  const hasLeading = leading !== void 0 && leading !== null;
39
+ const check = state.isSelected ? /* @__PURE__ */ jsx(CheckGlyph, { className: "xxk0z11 x9f619 x2lah0s xvy4d1p" }) : hasLeading || state.selectionMode === "none" ? void 0 : /* @__PURE__ */ jsx("span", {
40
+ "aria-hidden": true,
41
+ className: "xxk0z11 x9f619 x2lah0s xvy4d1p"
42
+ });
40
43
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RowContent, {
41
44
  isDisabled: state.isDisabled,
42
45
  isSelected: state.isSelected,
@@ -51,7 +54,7 @@ function itemContent(children, leading, shortcut, trailing, ripple) {
51
54
  };
52
55
  }
53
56
  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);
57
+ 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
58
  }
56
59
  /**
57
60
  * A list of actions opened from a control. Open state is React Aria's: pass