@kanso-labs/kanso-ui 0.43.7 → 0.44.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 (158) hide show
  1. package/README.md +1 -0
  2. package/dist/calendar/index.js +34 -10
  3. package/dist/calendar/index.js.map +1 -1
  4. package/dist/calendar/styles.js +30 -0
  5. package/dist/calendar/styles.js.map +1 -1
  6. package/dist/chip/index.js +27 -18
  7. package/dist/chip/index.js.map +1 -1
  8. package/dist/chip/label.js +32 -0
  9. package/dist/chip/label.js.map +1 -0
  10. package/dist/chip/styles.js +32 -2
  11. package/dist/chip/styles.js.map +1 -1
  12. package/dist/collection/text.js +24 -3
  13. package/dist/collection/text.js.map +1 -1
  14. package/dist/components/button/index.js.map +1 -1
  15. package/dist/components/calendar/index.d.ts +8 -1
  16. package/dist/components/calendar/index.js +129 -73
  17. package/dist/components/calendar/index.js.map +1 -1
  18. package/dist/components/checkbox/index.js +29 -30
  19. package/dist/components/checkbox/index.js.map +1 -1
  20. package/dist/components/checkbox-group/index.js +4 -2
  21. package/dist/components/checkbox-group/index.js.map +1 -1
  22. package/dist/components/chip/index.js +1 -1
  23. package/dist/components/chip/index.js.map +1 -1
  24. package/dist/components/chip-group/index.d.ts +35 -5
  25. package/dist/components/chip-group/index.js +137 -97
  26. package/dist/components/chip-group/index.js.map +1 -1
  27. package/dist/components/copy-field/index.js +1 -1
  28. package/dist/components/copy-field/index.js.map +1 -1
  29. package/dist/components/currency/index.d.ts +64 -6
  30. package/dist/components/currency/index.js +117 -40
  31. package/dist/components/currency/index.js.map +1 -1
  32. package/dist/components/date-picker/index.js +1 -1
  33. package/dist/components/dialog/index.d.ts +3 -1
  34. package/dist/components/dialog/index.js +121 -81
  35. package/dist/components/dialog/index.js.map +1 -1
  36. package/dist/components/disclosure-group/index.js +1 -1
  37. package/dist/components/disclosure-group/index.js.map +1 -1
  38. package/dist/components/icon-button/index.js +18 -1
  39. package/dist/components/icon-button/index.js.map +1 -1
  40. package/dist/components/index.d.ts +2 -2
  41. package/dist/components/keycap/index.d.ts +3 -0
  42. package/dist/components/keycap/index.js +30 -44
  43. package/dist/components/keycap/index.js.map +1 -1
  44. package/dist/components/list/index.d.ts +16 -2
  45. package/dist/components/list/index.js +124 -69
  46. package/dist/components/list/index.js.map +1 -1
  47. package/dist/components/list-detail/index.d.ts +11 -3
  48. package/dist/components/list-detail/index.js +13 -6
  49. package/dist/components/list-detail/index.js.map +1 -1
  50. package/dist/components/list-item/index.d.ts +16 -1
  51. package/dist/components/list-item/index.js.map +1 -1
  52. package/dist/components/menu/index.d.ts +6 -2
  53. package/dist/components/menu/index.js +22 -15
  54. package/dist/components/menu/index.js.map +1 -1
  55. package/dist/components/meter/index.d.ts +4 -1
  56. package/dist/components/meter/index.js +6 -0
  57. package/dist/components/meter/index.js.map +1 -1
  58. package/dist/components/navigation-bar/index.d.ts +14 -4
  59. package/dist/components/navigation-bar/index.js +77 -50
  60. package/dist/components/navigation-bar/index.js.map +1 -1
  61. package/dist/components/navigation-rail/index.d.ts +3 -2
  62. package/dist/components/navigation-rail/index.js +59 -52
  63. package/dist/components/navigation-rail/index.js.map +1 -1
  64. package/dist/components/navigation-tree/index.js +4 -1
  65. package/dist/components/navigation-tree/index.js.map +1 -1
  66. package/dist/components/number-field/index.d.ts +3 -2
  67. package/dist/components/number-field/index.js +91 -115
  68. package/dist/components/number-field/index.js.map +1 -1
  69. package/dist/components/popover/index.d.ts +3 -1
  70. package/dist/components/popover/index.js +102 -100
  71. package/dist/components/popover/index.js.map +1 -1
  72. package/dist/components/progress-indicator/index.d.ts +4 -2
  73. package/dist/components/progress-indicator/index.js +4 -3
  74. package/dist/components/progress-indicator/index.js.map +1 -1
  75. package/dist/components/radio-group/index.js +34 -24
  76. package/dist/components/radio-group/index.js.map +1 -1
  77. package/dist/components/search-field/index.d.ts +11 -1
  78. package/dist/components/search-field/index.js +32 -28
  79. package/dist/components/search-field/index.js.map +1 -1
  80. package/dist/components/segmented-button/index.d.ts +9 -2
  81. package/dist/components/segmented-button/index.js +1 -1
  82. package/dist/components/segmented-button/index.js.map +1 -1
  83. package/dist/components/separator/index.d.ts +19 -7
  84. package/dist/components/separator/index.js +36 -13
  85. package/dist/components/separator/index.js.map +1 -1
  86. package/dist/components/sheet/index.js +72 -61
  87. package/dist/components/sheet/index.js.map +1 -1
  88. package/dist/components/snackbar/index.d.ts +4 -1
  89. package/dist/components/snackbar/index.js +140 -55
  90. package/dist/components/snackbar/index.js.map +1 -1
  91. package/dist/components/stack/index.d.ts +6 -3
  92. package/dist/components/stack/index.js +48 -31
  93. package/dist/components/stack/index.js.map +1 -1
  94. package/dist/components/switch/index.d.ts +16 -6
  95. package/dist/components/switch/index.js +115 -62
  96. package/dist/components/switch/index.js.map +1 -1
  97. package/dist/components/text-area/index.d.ts +10 -1
  98. package/dist/components/text-area/index.js +21 -19
  99. package/dist/components/text-area/index.js.map +1 -1
  100. package/dist/components/text-field/index.d.ts +16 -2
  101. package/dist/components/text-field/index.js +49 -43
  102. package/dist/components/text-field/index.js.map +1 -1
  103. package/dist/components/time-picker/index.js +42 -38
  104. package/dist/components/time-picker/index.js.map +1 -1
  105. package/dist/components/tooltip/index.d.ts +3 -1
  106. package/dist/components/tooltip/index.js.map +1 -1
  107. package/dist/components/tree/index.d.ts +15 -3
  108. package/dist/components/tree/index.js +41 -28
  109. package/dist/components/tree/index.js.map +1 -1
  110. package/dist/control/index.js +26 -23
  111. package/dist/control/index.js.map +1 -1
  112. package/dist/control/styles.js +8 -1
  113. package/dist/control/styles.js.map +1 -1
  114. package/dist/field/index.js +149 -131
  115. package/dist/field/index.js.map +1 -1
  116. package/dist/field/styles.js +14 -1
  117. package/dist/field/styles.js.map +1 -1
  118. package/dist/glyphs/index.js +37 -1
  119. package/dist/glyphs/index.js.map +1 -1
  120. package/dist/hooks/useClippedTitle.js +44 -0
  121. package/dist/hooks/useClippedTitle.js.map +1 -0
  122. package/dist/hooks/useRipple.js +6 -5
  123. package/dist/hooks/useRipple.js.map +1 -1
  124. package/dist/hooks/useScrollStop.js +133 -0
  125. package/dist/hooks/useScrollStop.js.map +1 -0
  126. package/dist/i18n/index.js +1 -0
  127. package/dist/i18n/index.js.map +1 -1
  128. package/dist/i18n/messages.js +34 -0
  129. package/dist/i18n/messages.js.map +1 -1
  130. package/dist/index.d.ts +2 -2
  131. package/dist/indicator/index.js +18 -16
  132. package/dist/indicator/index.js.map +1 -1
  133. package/dist/indicator/styles.js +3 -0
  134. package/dist/indicator/styles.js.map +1 -1
  135. package/dist/keycap/context.js +7 -0
  136. package/dist/keycap/context.js.map +1 -0
  137. package/dist/navigation/index.d.ts +16 -2
  138. package/dist/navigation/index.js +145 -44
  139. package/dist/navigation/index.js.map +1 -1
  140. package/dist/navigation/styles.js +79 -16
  141. package/dist/navigation/styles.js.map +1 -1
  142. package/dist/overlay/modal.js +7 -0
  143. package/dist/overlay/modal.js.map +1 -0
  144. package/dist/row/index.js +92 -89
  145. package/dist/row/index.js.map +1 -1
  146. package/dist/row/styles.js +24 -1
  147. package/dist/row/styles.js.map +1 -1
  148. package/dist/styles/overlay.d.ts +6 -2
  149. package/dist/styles/overlay.js +9 -1
  150. package/dist/styles/overlay.js.map +1 -1
  151. package/dist/styles.css +177 -20
  152. package/dist/theme-scope.d.ts +5 -1
  153. package/dist/theme-scope.js +100 -51
  154. package/dist/theme-scope.js.map +1 -1
  155. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  156. package/package.json +21 -20
  157. package/dist/hooks/useScrollable.js +0 -69
  158. package/dist/hooks/useScrollable.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","ReactNode","Ref","RefAttributes","ButtonRenderProps","NumberFieldProps","RACNumberFieldProps","stylex","Button","RACButton","NumberField","RACNumberField","FieldVariant","FieldBox","FieldInput","FieldMessage","fieldStyles","invalidFrom","useFieldValidationBehavior","MinusGlyph","PlusGlyph","mergeStatefulStyles","colors","motion","radii","sizing","spacing","stateLayerOpacity","typography","IconButton","BOX_HALF","sm","bodySmallLineHeight","bodyLargeLineHeight","BOX_OUTLINED_HALF","lg","STEPPER_REACH","controlXs","STACKED_INSET","INLINE_INSET","md","styles","stepper","k6CgDc","kGNEyG","kWkggS","kZKoxP","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kzqmXN","kjj79g","kjBf7l","kInvED","k3XXqK","kMeerF","kmVPX3","kIyJzY","k1ekBW","kAMwcw","$$css","stepperBottomOutlined","kT0f0o","stepperDisabled","stepperFocused","stepperHovered","stepperOutlined","stepperPressed","stepperTop","kfmiAY","decrementLabel","description","error","floatingLabel","incrementLabel","inputRef","HTMLInputElement","isWheelDisabled","label","numeric","steppers","variant","Omit","t0","$","t1","isDisabled","t2","t3","t4","t5","t6","props","undefined","inline","validationBehavior","T0","t7","t8","root","t9","t10","Symbol","for","0","className","1","t11","t12","t13","2","3","t14","t15","t16","t17","t18","isRequired","t19","t20","StackedStepper","children","outlined","slot","stepperStyles","top","state","isHovered","isPressed","isFocusVisible","NumberField","_c","props","RACNumberField","stylex.props","RACButton"],"sources":["../../../src/components/number-field/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, Ref, RefAttributes } from 'react';\nimport type { ButtonRenderProps, NumberFieldProps as RACNumberFieldProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, NumberField as RACNumberField } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldInput, FieldMessage } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { MinusGlyph, PlusGlyph } from '../../glyphs';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport IconButton from '../icon-button';\n\n// The text fields page's field, holding a number: the same box, floating\n// label, underline and message as TextField, with the value in the mono\n// face and tabular figures by default, since a number is what those are\n// for, and two steppers at the trailing end.\n//\n// The steppers come in two layouts. Stacked, the plus over the minus, they\n// are a column flush with the box's top, end and bottom, each half of the\n// box's 56dp and 32dp wide, drawn here since the smallest icon button is\n// 32dp and two of those do not fit; the glyph is the icon buttons page's\n// 20dp for that size, and the hover, pressed, focus and disabled treatments\n// are the standard icon button's. Side by side, they are extra-small icon\n// buttons, the page's trailing icons in the library's own control, 12dp\n// from the end where the page puts a field's icons — the box's 16dp of\n// padding less the 4dp they pull back.\n//\n// **The stacked pair is the one control here that does not reach the 48dp\n// target**, and it is the layout rather than an oversight. Every other small\n// control in the library draws that target out of flow, over whatever sits\n// beside it — src/control/styles.ts carries the decision. These two have only\n// each other beside them: the column is 56dp tall in total, so two 48dp\n// targets inside it would overlap across most of their height, and the half\n// of a press that landed in the overlap would go to whichever box was\n// uppermost rather than to the glyph under the finger. Incrementing when a\n// reader meant to decrement is worse than a target that is short, so the\n// stacked layout keeps its 32 by 28 and the reader who needs the larger one\n// has `steppers=\"horizontal\"`, where each is an extra-small icon button and\n// gets the target from there — with the gap that keeps those two targets off\n// each other, which is the room the column has none of.\n//\n// React Aria's `NumberField` is the root and the box is its `Group`, which\n// is what names the box and the two steppers as one control; the steppers\n// are its increment and decrement buttons through context, disabled at the\n// ends of the range and kept out of the tab order, and the formatting is its\n// `formatOptions`.\n// Half the box, spelled from the same tokens the box derives its height\n// from rather than as the 28 that half of 56 comes to. A theme with a longer\n// body line makes the box taller — `Editorial` in src/theming/themes.ts does\n// — and a stated half leaves the pair short of the bottom edge they are\n// flush with.\n//\n// Written here rather than imported from src/field/styles.ts, which spells\n// the same two expressions: the StyleX compiler resolves a constant across\n// files only out of a `.stylex.ts` module, the same reason that file gives\n// for re-declaring the forced-colours query. The two have to move together.\nconst BOX_HALF = `calc((2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight}) / 2)`;\nconst BOX_OUTLINED_HALF = `calc((2 * ${spacing.lg} + ${typography.bodyLargeLineHeight}) / 2)`;\n\n// How much of the end of the box's column the steppers take, with the 8dp\n// between them and the input, which the label stops short of — FieldBox's\n// `endInset`. Without it the label ran the column's width, under the\n// steppers, and a long one was cut short beneath them. Each is the input's\n// own end, so the label ends where the value does.\n//\n// Stacked, the 32dp column less the 16dp of the box's padding it reaches\n// into; side by side, the two extra-small buttons and the 8dp between them,\n// less the 4dp they reach into the padding.\n// How far a side-by-side stepper reaches past the control's line above and\n// below it: a negative margin, half the difference between the two.\nconst STEPPER_REACH = `calc((${typography.bodyLargeLineHeight} - ${sizing.controlXs}) / 2)`;\nconst STACKED_INSET = `calc(32px - ${spacing.lg} + ${spacing.sm})`;\nconst INLINE_INSET = `calc(2 * ${sizing.controlXs} + ${spacing.sm} + ${spacing.md} - ${spacing.lg} + ${spacing.sm})`;\nconst styles = {\n stepper: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1viytl0\",\n kaIpWk: \"x2u8bby\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"x1td3qas\",\n kjj79g: \"xl56j7k\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n stepperBottomOutlined: {\n kT0f0o: \"x4gcak0\",\n $$css: true\n },\n stepperDisabled: {\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n stepperFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n stepperHovered: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n stepperOutlined: {\n kZKoxP: \"x1o675yb\",\n $$css: true\n },\n stepperPressed: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n stepperTop: {\n kfmiAY: \"xirz1nw\",\n $$css: true\n }\n};\ntype NumberFieldProps = {\n /**\n * The name of the stepper that lowers the value, for a screen reader. Left\n * out, React Aria names it in the reader's locale, followed by the field's\n * own label — \"Decrease Quantity\" in English.\n */\n decrementLabel?: string;\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n description?: string;\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state — the message, the red underline, and\n * `aria-invalid` all follow from it.\n *\n * Outside a `Form` the message line arrives with the message, so the\n * field grows when this does and moves what is under it. A `Form` holds\n * that space from the start; so does a permanent `description`.\n */\n error?: string;\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or holds a value, as the text fields page draws it.\n * `false` keeps it small at the top in every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * The name of the stepper that raises the value, for a screen reader. Left\n * out, React Aria names it in the reader's locale, followed by the field's\n * own label — \"Increase Quantity\" in English.\n */\n incrementLabel?: string;\n /**\n * A ref to the field's own `<input>`, which is the element a call site moves\n * focus to — after a server's error, say. `ref` is the field as a whole.\n */\n inputRef?: Ref<HTMLInputElement>;\n /**\n * Whether the mouse wheel and a trackpad's scroll leave the value alone.\n * React Aria steps a focused number field's value with the wheel, so a\n * reader scrolling a long form past a field they had left focused changed\n * its value instead of moving the page. Stepping from the wheel is the\n * call site's to ask for, with `false`.\n * @default true\n */\n isWheelDisabled?: boolean;\n /**\n * What the field is for. Required rather than optional: a field with no\n * label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * Renders the value in the mono face with tabular figures, for amounts and\n * other numbers meant to be compared down a column. On by default, since a\n * number field holds nothing else.\n * @default true\n */\n numeric?: boolean;\n /**\n * How the two steppers sit at the end of the box: stacked, the plus over\n * the minus, flush with the box's edge, or side by side as extra-small\n * icon buttons.\n * @default 'vertical'\n */\n steppers?: 'horizontal' | 'vertical';\n /**\n * The filled box, or the outlined one: no fill, an outline that thickens\n * and takes the primary role while focused, and the label cutting it once\n * it floats — the text fields page's two fields.\n * @default 'filled'\n */\n variant?: FieldVariant;\n} & Omit<RACNumberFieldProps, 'children' | 'isInvalid' | 'isWheelDisabled' | 'validationBehavior'>;\n\n/**\n * A labelled number input with steppers. Its value is React Aria's: pass\n * `value` with `onChange` to control it, or `defaultValue` to let it keep\n * its own — and `onChange` is handed the number, `NaN` while the field is\n * empty. `minValue`, `maxValue` and `step` shape it, and `formatOptions`\n * says how it reads, in the locale the page is in: a currency, a percentage,\n * a unit. Arrow keys step the value, and Page Up and Page Down by ten steps.\n * The mouse wheel scrolls the page past it rather than stepping it, unless\n * `isWheelDisabled` is `false`.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions. The box, label, input and message\n * are the field chrome in `src/field`, shared with every other field.\n */\nfunction NumberField({\n decrementLabel,\n description,\n error,\n floatingLabel = true,\n incrementLabel,\n inputRef,\n isDisabled = false,\n isWheelDisabled = true,\n label,\n numeric = true,\n steppers = 'vertical',\n variant = 'filled',\n ...props\n}: NumberFieldProps & RefAttributes<HTMLDivElement>) {\n const inline = steppers === 'horizontal';\n const validationBehavior = useFieldValidationBehavior();\n return <RACNumberField isDisabled={isDisabled} isInvalid={invalidFrom(error)} isWheelDisabled={isWheelDisabled} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <FieldBox endInset={inline ? INLINE_INSET : STACKED_INSET} floatingLabel={floatingLabel} isRequired={props.isRequired} label={label} variant={variant}>\n <div {...{\n 0: {\n className: \"x1cy8zhl x9f619 x78zum5 x126z3so\"\n },\n 1: {\n className: \"x9f619 x78zum5 x126z3so x6s0dn4\"\n }\n }[!!inline << 0]}>\n <FieldInput numeric={numeric} ref={inputRef} />\n <div {...{\n 0: {\n className: \"x9f619 x78zum5 xdt5ytf x2lah0s x1motrhk xk4mfur\"\n },\n 2: {\n className: \"x9f619 x78zum5 x2lah0s x1q0g3np x126z3so x1jblbm6 x6rec7h x1tn5xpv\"\n },\n 1: {\n className: \"x9f619 x78zum5 xdt5ytf x2lah0s xk4mfur x17v9ssf\"\n },\n 3: {\n className: \"x9f619 x78zum5 x2lah0s x1q0g3np x126z3so x1jblbm6 x1tn5xpv x17v9ssf\"\n }\n }[!!inline << 1 | !!(!inline && variant === 'outlined') << 0]}>\n {inline ? <>\n <IconButton aria-label={decrementLabel} size=\"xs\" slot=\"decrement\">\n <MinusGlyph className=\"xlzyvqe x1lliihq x15vhz18\" />\n </IconButton>\n <IconButton aria-label={incrementLabel} size=\"xs\" slot=\"increment\">\n <PlusGlyph className=\"xlzyvqe x1lliihq x15vhz18\" />\n </IconButton>\n </> : <>\n <StackedStepper label={incrementLabel} outlined={variant === 'outlined'} slot=\"increment\">\n <PlusGlyph className=\"x1qx5ct2 x1lliihq xw4jnvo\" />\n </StackedStepper>\n <StackedStepper label={decrementLabel} outlined={variant === 'outlined'} slot=\"decrement\">\n <MinusGlyph className=\"x1qx5ct2 x1lliihq xw4jnvo\" />\n </StackedStepper>\n </>}\n </div>\n </div>\n </FieldBox>\n <FieldMessage description={description} error={error} />\n </RACNumberField>;\n}\nfunction StackedStepper({\n children,\n label,\n outlined,\n slot\n}: {\n children: ReactNode;\n label: string | undefined;\n outlined: boolean;\n slot: 'decrement' | 'increment';\n}) {\n return <RACButton aria-label={label} slot={slot} {...mergeStatefulStyles(stepperStyles(slot === 'increment', outlined), {})}>\n {children}\n </RACButton>;\n}\n\n// A stacked stepper: React Aria's button with the slot the field's context\n// looks for, drawn from its render state. Built by a call rather than\n// written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after.\nfunction stepperStyles(top: boolean, outlined: boolean) {\n return (state: ButtonRenderProps) => stylex.props(styles.stepper, outlined && styles.stepperOutlined, top && styles.stepperTop, !top && outlined && styles.stepperBottomOutlined, state.isHovered && !state.isDisabled && styles.stepperHovered, state.isPressed && !state.isDisabled && styles.stepperPressed, state.isFocusVisible && styles.stepperFocused, state.isDisabled && styles.stepperDisabled);\n}\nexport type { NumberFieldProps };\nexport default NumberField;"],"mappings":";;;;;;;;;;;;AA2DiB,GAAa2B,QAAQK,KAAQH,WAAWI,sBAAyBJ,WAAWK;AACnE,GAAaP,QAAQS,KAAQP,WAAWK;AAa5C,GAASL,WAAWK,sBAAyBR,OAAOY;AAC1E,MAAMC,gBAAgB,eAAeZ,QAAQS,GAAE,KAAMT,QAAQK,GAAE;AAC/D,MAAMQ,eAAe,YAAYd,OAAOY,UAAS,KAAMX,QAAQK,GAAE,KAAML,QAAQc,GAAE,KAAMd,QAAQS,GAAE,KAAMT,QAAQK,GAAE;AACjH,MAAMU,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,uBAAuB;EACrBC,QAAQ;EACRF,OAAO;CACT;CACAG,iBAAiB;EACfhB,QAAQ;EACRC,QAAQ;EACRY,OAAO;CACT;CACAI,gBAAgB;EACdV,QAAQ;EACRM,OAAO;CACT;CACAK,gBAAgB;EACdvB,QAAQ;EACRkB,OAAO;CACT;CACAM,iBAAiB;EACfvB,QAAQ;EACRiB,OAAO;CACT;CACAO,gBAAgB;EACdzB,QAAQ;EACRkB,OAAO;CACT;CACAQ,YAAY;EACVC,QAAQ;EACRT,OAAO;CACT;AACF;;;;;;;;;;;;;;;AA4FA,SAAArD,cAAA4E,IAAA;CAAA,MAAAC,IAAAvF,EAAA,EAAA;CAAqB,MAAA,EAAAyE,gBAAAC,aAAAC,OAAAC,eAAAY,IAAAX,gBAAAC,UAAAW,YA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AAA,KAAAH,EAAA;CAAA,OAFPG;AAEO;AAOhB,SAASqC,cAAcC,KAAcH,UAAmB;CACtD,QAAQI,UAA6B1H,MAAakC,OAAOC,SAASmF,YAAYpF,OAAO4B,iBAAiB2D,OAAOvF,OAAO8B,YAAY,CAACyD,OAAOH,YAAYpF,OAAOuB,uBAAuBiE,MAAMC,aAAa,CAACD,MAAMxC,cAAchD,OAAO2B,gBAAgB6D,MAAME,aAAa,CAACF,MAAMxC,cAAchD,OAAO6B,gBAAgB2D,MAAMG,kBAAkB3F,OAAO0B,gBAAgB8D,MAAMxC,cAAchD,OAAOyB,eAAe;AAC3Y"}
1
+ {"version":3,"file":"index.js","names":["c","_c","ReactNode","Ref","RefAttributes","ButtonRenderProps","NumberFieldProps","RACNumberFieldProps","stylex","Button","RACButton","NumberField","RACNumberField","FieldVariant","FieldBox","FieldInput","FieldMessage","fieldStyles","invalidFrom","useFieldValidationBehavior","MinusGlyph","PlusGlyph","mergeStatefulStyles","colors","motion","radii","sizing","spacing","stateLayerOpacity","typography","IconButton","BOX_HALF","sm","bodySmallLineHeight","bodyLargeLineHeight","BOX_OUTLINED_HALF","lg","STEPPER_REACH","controlXs","STACKED_INSET","INLINE_INSET","md","END_INSETS","horizontal","none","undefined","vertical","const","styles","stepper","k6CgDc","kGNEyG","kWkggS","kZKoxP","kaIpWk","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kzqmXN","kjj79g","kjBf7l","kInvED","k3XXqK","kMeerF","kmVPX3","kIyJzY","k1ekBW","kAMwcw","$$css","stepperBottomOutlined","kT0f0o","stepperDisabled","stepperFocused","stepperHovered","stepperOutlined","stepperPressed","stepperTop","kfmiAY","decrementLabel","description","error","floatingLabel","incrementLabel","inputRef","HTMLInputElement","isWheelDisabled","label","numeric","steppers","variant","Omit","t0","$","t1","isDisabled","t2","t3","t4","t5","t6","props","inline","validationBehavior","T0","t7","t8","root","t9","t10","0","className","1","2","3","t11","isRequired","t12","t13","StackedStepper","children","outlined","slot","stepperStyles","top","state","isHovered","isPressed","isFocusVisible","NumberField","_c","props","RACNumberField","stylex.props","RACButton"],"sources":["../../../src/components/number-field/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, Ref, RefAttributes } from 'react';\nimport type { ButtonRenderProps, NumberFieldProps as RACNumberFieldProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Button as RACButton, NumberField as RACNumberField } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldInput, FieldMessage } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { MinusGlyph, PlusGlyph } from '../../glyphs';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport IconButton from '../icon-button';\n\n// The text fields page's field, holding a number: the same box, floating\n// label, underline and message as TextField, with the value in the mono\n// face and tabular figures by default, since a number is what those are\n// for, and two steppers at the trailing end.\n//\n// The steppers come in two layouts. Stacked, the plus over the minus, they\n// are a column flush with the box's top, end and bottom, each half of the\n// box's 56dp and 32dp wide, drawn here since the smallest icon button is\n// 32dp and two of those do not fit; the glyph is the icon buttons page's\n// 20dp for that size, and the hover, pressed, focus and disabled treatments\n// are the standard icon button's. Side by side, they are extra-small icon\n// buttons, the page's trailing icons in the library's own control, 12dp\n// from the end where the page puts a field's icons — the box's 16dp of\n// padding less the 4dp they pull back.\n//\n// **The stacked pair is the one control here that does not reach the 48dp\n// target**, and it is the layout rather than an oversight. Every other small\n// control in the library draws that target out of flow, over whatever sits\n// beside it — src/control/styles.ts carries the decision. These two have only\n// each other beside them: the column is 56dp tall in total, so two 48dp\n// targets inside it would overlap across most of their height, and the half\n// of a press that landed in the overlap would go to whichever box was\n// uppermost rather than to the glyph under the finger. Incrementing when a\n// reader meant to decrement is worse than a target that is short, so the\n// stacked layout keeps its 32 by 28 and the reader who needs the larger one\n// has `steppers=\"horizontal\"`, where each is an extra-small icon button and\n// gets the target from there — with the gap that keeps those two targets off\n// each other, which is the room the column has none of.\n//\n// A value that is typed rather than stepped — an amount, a year, an\n// identifier — can leave the steppers out with `steppers=\"none\"`. The box is\n// then a text field's, the input running to the box's own end padding, and\n// the arrow keys and Page Up and Page Down still step the value.\n//\n// React Aria's `NumberField` is the root and the box is its `Group`, which\n// is what names the box and the two steppers as one control; the steppers\n// are its increment and decrement buttons through context, disabled at the\n// ends of the range and kept out of the tab order, and the formatting is its\n// `formatOptions`.\n// Half the box, spelled from the same tokens the box derives its height\n// from rather than as the 28 that half of 56 comes to. A theme with a longer\n// body line makes the box taller — `Editorial` in src/theming/themes.ts does\n// — and a stated half leaves the pair short of the bottom edge they are\n// flush with.\n//\n// Written here rather than imported from src/field/styles.ts, which spells\n// the same two expressions: the StyleX compiler resolves a constant across\n// files only out of a `.stylex.ts` module, the same reason that file gives\n// for re-declaring the forced-colours query. The two have to move together.\nconst BOX_HALF = `calc((2 * ${spacing.sm} + ${typography.bodySmallLineHeight} + ${typography.bodyLargeLineHeight}) / 2)`;\nconst BOX_OUTLINED_HALF = `calc((2 * ${spacing.lg} + ${typography.bodyLargeLineHeight}) / 2)`;\n\n// How much of the end of the box's column the steppers take, with the 8dp\n// between them and the input, which the label stops short of — FieldBox's\n// `endInset`. Without it the label ran the column's width, under the\n// steppers, and a long one was cut short beneath them. Each is the input's\n// own end, so the label ends where the value does.\n//\n// Stacked, the 32dp column less the 16dp of the box's padding it reaches\n// into; side by side, the two extra-small buttons and the 8dp between them,\n// less the 4dp they reach into the padding.\n// How far a side-by-side stepper reaches past the control's line above and\n// below it: a negative margin, half the difference between the two.\nconst STEPPER_REACH = `calc((${typography.bodyLargeLineHeight} - ${sizing.controlXs}) / 2)`;\nconst STACKED_INSET = `calc(32px - ${spacing.lg} + ${spacing.sm})`;\nconst INLINE_INSET = `calc(2 * ${sizing.controlXs} + ${spacing.sm} + ${spacing.md} - ${spacing.lg} + ${spacing.sm})`;\n\n// Each layout's inset, keyed by the prop. With no steppers there is nothing\n// for the label to stop short of, so the box's own default holds.\nconst END_INSETS = {\n horizontal: INLINE_INSET,\n none: undefined,\n vertical: STACKED_INSET\n} as const;\nconst styles = {\n stepper: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"x1viytl0\",\n kaIpWk: \"x2u8bby\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kzqmXN: \"x1td3qas\",\n kjj79g: \"xl56j7k\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n kIyJzY: \"x1qno0dh\",\n k1ekBW: \"xs2xxs2\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n stepperBottomOutlined: {\n kT0f0o: \"x4gcak0\",\n $$css: true\n },\n stepperDisabled: {\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n stepperFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n stepperHovered: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n stepperOutlined: {\n kZKoxP: \"x1o675yb\",\n $$css: true\n },\n stepperPressed: {\n kWkggS: \"x123fei2\",\n $$css: true\n },\n stepperTop: {\n kfmiAY: \"xirz1nw\",\n $$css: true\n }\n};\ntype NumberFieldProps = {\n /**\n * The name of the stepper that lowers the value, for a screen reader. Left\n * out, React Aria names it in the reader's locale, followed by the field's\n * own label — \"Decrease Quantity\" in English.\n */\n decrementLabel?: string;\n /**\n * A hint shown under the field. Replaced by `error` when there is one, so\n * the two never stack.\n */\n description?: string;\n /**\n * The problem with the current value, in words. Its presence is what puts\n * the field in its error state — the message, the red underline, and\n * `aria-invalid` all follow from it.\n *\n * Outside a `Form` the message line arrives with the message, so the\n * field grows when this does and moves what is under it. A `Form` holds\n * that space from the start; so does a permanent `description`.\n */\n error?: string;\n /**\n * Whether the label sits in the empty box and floats to the top once the\n * field is focused or holds a value, as the text fields page draws it.\n * `false` keeps it small at the top in every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * The name of the stepper that raises the value, for a screen reader. Left\n * out, React Aria names it in the reader's locale, followed by the field's\n * own label — \"Increase Quantity\" in English.\n */\n incrementLabel?: string;\n /**\n * A ref to the field's own `<input>`, which is the element a call site moves\n * focus to — after a server's error, say. `ref` is the field as a whole.\n */\n inputRef?: Ref<HTMLInputElement>;\n /**\n * Whether the mouse wheel and a trackpad's scroll leave the value alone.\n * React Aria steps a focused number field's value with the wheel, so a\n * reader scrolling a long form past a field they had left focused changed\n * its value instead of moving the page. Stepping from the wheel is the\n * call site's to ask for, with `false`.\n * @default true\n */\n isWheelDisabled?: boolean;\n /**\n * What the field is for. Required rather than optional: a field with no\n * label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * Renders the value in the mono face with tabular figures, for amounts and\n * other numbers meant to be compared down a column. On by default, since a\n * number field holds nothing else.\n * @default true\n */\n numeric?: boolean;\n /**\n * How the two steppers sit at the end of the box: stacked, the plus over\n * the minus, flush with the box's edge, or side by side as extra-small\n * icon buttons. `'none'` draws neither, for a value that is typed rather\n * than stepped; the keyboard still steps it.\n * @default 'vertical'\n */\n steppers?: 'horizontal' | 'none' | 'vertical';\n /**\n * The filled box, or the outlined one: no fill, an outline that thickens\n * and takes the primary role while focused, and the label cutting it once\n * it floats — the text fields page's two fields.\n * @default 'filled'\n */\n variant?: FieldVariant;\n} & Omit<RACNumberFieldProps, 'children' | 'isInvalid' | 'isWheelDisabled' | 'validationBehavior'>;\n\n/**\n * A labelled number input with steppers. Its value is React Aria's: pass\n * `value` with `onChange` to control it, or `defaultValue` to let it keep\n * its own — and `onChange` is handed the number, `NaN` while the field is\n * empty. `minValue`, `maxValue` and `step` shape it, and `formatOptions`\n * says how it reads, in the locale the page is in: a currency, a percentage,\n * a unit. Arrow keys step the value, and Page Up and Page Down by ten steps.\n * The mouse wheel scrolls the page past it rather than stepping it, unless\n * `isWheelDisabled` is `false`.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions. The box, label, input and message\n * are the field chrome in `src/field`, shared with every other field.\n */\nfunction NumberField({\n decrementLabel,\n description,\n error,\n floatingLabel = true,\n incrementLabel,\n inputRef,\n isDisabled = false,\n isWheelDisabled = true,\n label,\n numeric = true,\n steppers = 'vertical',\n variant = 'filled',\n ...props\n}: NumberFieldProps & RefAttributes<HTMLDivElement>) {\n const inline = steppers === 'horizontal';\n const validationBehavior = useFieldValidationBehavior();\n return <RACNumberField isDisabled={isDisabled} isInvalid={invalidFrom(error)} isWheelDisabled={isWheelDisabled} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <FieldBox endInset={END_INSETS[steppers]} floatingLabel={floatingLabel} isRequired={props.isRequired} label={label} variant={variant}>\n {steppers === 'none' ? <FieldInput numeric={numeric} ref={inputRef} /> : <div {...{\n 0: {\n className: \"x1cy8zhl x9f619 x78zum5 x126z3so\"\n },\n 1: {\n className: \"x9f619 x78zum5 x126z3so x6s0dn4\"\n }\n }[!!inline << 0]}>\n <FieldInput numeric={numeric} ref={inputRef} />\n <div {...{\n 0: {\n className: \"x9f619 x78zum5 xdt5ytf x2lah0s x1motrhk xk4mfur\"\n },\n 2: {\n className: \"x9f619 x78zum5 x2lah0s x1q0g3np x126z3so x1jblbm6 x6rec7h x1tn5xpv\"\n },\n 1: {\n className: \"x9f619 x78zum5 xdt5ytf x2lah0s xk4mfur x17v9ssf\"\n },\n 3: {\n className: \"x9f619 x78zum5 x2lah0s x1q0g3np x126z3so x1jblbm6 x1tn5xpv x17v9ssf\"\n }\n }[!!inline << 1 | !!(!inline && variant === 'outlined') << 0]}>\n {inline ? <>\n <IconButton aria-label={decrementLabel} size=\"xs\" slot=\"decrement\">\n <MinusGlyph className=\"xlzyvqe x1lliihq x15vhz18\" />\n </IconButton>\n <IconButton aria-label={incrementLabel} size=\"xs\" slot=\"increment\">\n <PlusGlyph className=\"xlzyvqe x1lliihq x15vhz18\" />\n </IconButton>\n </> : <>\n <StackedStepper label={incrementLabel} outlined={variant === 'outlined'} slot=\"increment\">\n <PlusGlyph className=\"x1qx5ct2 x1lliihq xw4jnvo\" />\n </StackedStepper>\n <StackedStepper label={decrementLabel} outlined={variant === 'outlined'} slot=\"decrement\">\n <MinusGlyph className=\"x1qx5ct2 x1lliihq xw4jnvo\" />\n </StackedStepper>\n </>}\n </div>\n </div>}\n </FieldBox>\n <FieldMessage description={description} error={error} />\n </RACNumberField>;\n}\nfunction StackedStepper({\n children,\n label,\n outlined,\n slot\n}: {\n children: ReactNode;\n label: string | undefined;\n outlined: boolean;\n slot: 'decrement' | 'increment';\n}) {\n return <RACButton aria-label={label} slot={slot} {...mergeStatefulStyles(stepperStyles(slot === 'increment', outlined), {})}>\n {children}\n </RACButton>;\n}\n\n// A stacked stepper: React Aria's button with the slot the field's context\n// looks for, drawn from its render state. Built by a call rather than\n// written inline at the prop, which is what react-perf's\n// no-new-function-as-prop is after.\nfunction stepperStyles(top: boolean, outlined: boolean) {\n return (state: ButtonRenderProps) => stylex.props(styles.stepper, outlined && styles.stepperOutlined, top && styles.stepperTop, !top && outlined && styles.stepperBottomOutlined, state.isHovered && !state.isDisabled && styles.stepperHovered, state.isPressed && !state.isDisabled && styles.stepperPressed, state.isFocusVisible && styles.stepperFocused, state.isDisabled && styles.stepperDisabled);\n}\nexport type { NumberFieldProps };\nexport default NumberField;"],"mappings":";;;;;;;;;;;;AAgEiB,GAAa2B,QAAQK,KAAQH,WAAWI,sBAAyBJ,WAAWK;AACnE,GAAaP,QAAQS,KAAQP,WAAWK;AAa5C,GAASL,WAAWK,sBAAyBR,OAAOY;AAC1E,MAAMC,gBAAgB,eAAeZ,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EAAA;CAAA,IAAAG;CAAA,IAAAH,EAAA,OAAA2B,YAAA3B,EAAA,OAAAN,SAAAM,EAAA,OAAA6B,QAAA7B,EAAA,OAAAC,IAAA;EAApHE,KAAA,oBAACsC,QAAD;GAAuB/C,cAAAA;GAAamC;GAAI,GAAM5B;GAChD0B;EADY,CAAA;EAEH3B,EAAA,KAAA2B;EAAA3B,EAAA,KAAAN;EAAAM,EAAA,KAAA6B;EAAA7B,EAAA,KAAAC;EAAAD,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAFPG;AAEO;AAOhB,SAAS2B,cAAcC,KAAcH,UAAmB;CACtD,QAAQI,UAA6BtH,MAAawC,OAAOC,SAASyE,YAAY1E,OAAO4B,iBAAiBiD,OAAO7E,OAAO8B,YAAY,CAAC+C,OAAOH,YAAY1E,OAAOuB,uBAAuBuD,MAAMC,aAAa,CAACD,MAAM9B,cAAchD,OAAO2B,gBAAgBmD,MAAME,aAAa,CAACF,MAAM9B,cAAchD,OAAO6B,gBAAgBiD,MAAMG,kBAAkBjF,OAAO0B,gBAAgBoD,MAAM9B,cAAchD,OAAOyB,eAAe;AAC3Y"}
@@ -107,7 +107,9 @@ type PopoverContentProps = Omit<DialogProps, 'children' | 'className' | 'style'>
107
107
  container?: Element;
108
108
  /**
109
109
  * Which side of the trigger the panel opens on. It flips to the opposite
110
- * side when there is no room.
110
+ * side when there is no room. `start` and `end` follow the writing
111
+ * direction, so `end` is the right in English and the left in Arabic;
112
+ * `left` and `right` stay put in either.
111
113
  * @default 'bottom'
112
114
  */
113
115
  side?: PopoverSide;
@@ -56,10 +56,7 @@ const PopoverContext$1 = createContext({
56
56
  modal: false,
57
57
  size: "md"
58
58
  });
59
- const DescriptionContext = createContext({
60
- id: "",
61
- register: () => () => {}
62
- });
59
+ const DescriptionContext = createContext(() => () => {});
63
60
  const TitleContext = createContext(() => () => {});
64
61
  const TEXT_SLOTS = { slots: {
65
62
  [DEFAULT_SLOT]: {},
@@ -379,7 +376,7 @@ function Popover$1(t0) {
379
376
  * than being clipped by it.
380
377
  */
381
378
  function PopoverContent(t0) {
382
- const $ = c(58);
379
+ const $ = c(57);
383
380
  let alignOffset;
384
381
  let children;
385
382
  let className;
@@ -509,149 +506,154 @@ function PopoverContent(t0) {
509
506
  $[27] = t13;
510
507
  } else t13 = $[27];
511
508
  useInteractOutside(t13);
512
- const descriptionId = useId();
513
- const [described, setDescribed] = useState(false);
514
509
  let t14;
515
510
  if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
516
- t14 = () => {
517
- setDescribed(true);
518
- return () => {
519
- setDescribed(false);
520
- };
521
- };
511
+ t14 = [];
522
512
  $[28] = t14;
523
513
  } else t14 = $[28];
524
- const register = t14;
514
+ const [descriptions, setDescriptions] = useState(t14);
525
515
  let t15;
526
- if ($[29] !== descriptionId) {
527
- t15 = {
528
- id: descriptionId,
529
- register
516
+ if ($[29] === Symbol.for("react.memo_cache_sentinel")) {
517
+ t15 = (id) => {
518
+ setDescriptions((ids) => [...ids, id]);
519
+ return () => {
520
+ setDescriptions((ids_0) => {
521
+ const at = ids_0.indexOf(id);
522
+ return at === -1 ? ids_0 : [...ids_0.slice(0, at), ...ids_0.slice(at + 1)];
523
+ });
524
+ };
530
525
  };
531
- $[29] = descriptionId;
532
- $[30] = t15;
533
- } else t15 = $[30];
534
- const description = t15;
535
- const t16 = !modal;
536
- let t17;
537
- if ($[31] !== align || $[32] !== side) {
538
- t17 = placementOf(side, align);
539
- $[31] = align;
540
- $[32] = side;
541
- $[33] = t17;
542
- } else t17 = $[33];
543
- const t18 = modal ? void 0 : isOutsideTrigger;
544
- let t19;
545
- if ($[34] !== size) {
546
- t19 = (render) => props(overlay.popup, styles.content, styles[size], popupOrigin(render.placement));
547
- $[34] = size;
548
- $[35] = t19;
549
- } else t19 = $[35];
526
+ $[29] = t15;
527
+ } else t15 = $[29];
528
+ const registerDescription = t15;
529
+ let t16;
530
+ if ($[30] !== descriptions) {
531
+ t16 = descriptions.length > 0 ? [...new Set(descriptions)].join(" ") : void 0;
532
+ $[30] = descriptions;
533
+ $[31] = t16;
534
+ } else t16 = $[31];
535
+ const describedBy = t16;
536
+ const t17 = !modal;
537
+ let t18;
538
+ if ($[32] !== align || $[33] !== side) {
539
+ t18 = placementOf(side, align);
540
+ $[32] = align;
541
+ $[33] = side;
542
+ $[34] = t18;
543
+ } else t18 = $[34];
544
+ const t19 = modal ? void 0 : isOutsideTrigger;
550
545
  let t20;
551
- if ($[36] !== className || $[37] !== style || $[38] !== t19) {
552
- t20 = mergeStatefulStyles(t19, {
546
+ if ($[35] !== size) {
547
+ t20 = (render) => props(overlay.popup, styles.content, styles[size], popupOrigin(render.placement));
548
+ $[35] = size;
549
+ $[36] = t20;
550
+ } else t20 = $[36];
551
+ let t21;
552
+ if ($[37] !== className || $[38] !== style || $[39] !== t20) {
553
+ t21 = mergeStatefulStyles(t20, {
553
554
  className,
554
555
  style
555
556
  });
556
- $[36] = className;
557
- $[37] = style;
558
- $[38] = t19;
557
+ $[37] = className;
558
+ $[38] = style;
559
559
  $[39] = t20;
560
- } else t20 = $[39];
561
- let t21;
562
- if ($[40] !== children || $[41] !== described || $[42] !== description || $[43] !== descriptionId || $[44] !== modal || $[45] !== props$1) {
563
- t21 = modal ? /* @__PURE__ */ jsx(Dialog, {
564
- "aria-describedby": described ? descriptionId : void 0,
560
+ $[40] = t21;
561
+ } else t21 = $[40];
562
+ let t22;
563
+ if ($[41] !== children || $[42] !== describedBy || $[43] !== modal || $[44] !== props$1) {
564
+ t22 = modal ? /* @__PURE__ */ jsx(Dialog, {
565
+ "aria-describedby": describedBy,
565
566
  ...props$1,
566
567
  ...props(overlay.popupDialog, focus.ring),
567
568
  children: /* @__PURE__ */ jsx(DescriptionContext, {
568
- value: description,
569
+ value: registerDescription,
569
570
  children
570
571
  })
571
572
  }) : /* @__PURE__ */ jsx(PanelDialog, {
572
- "aria-describedby": described ? descriptionId : void 0,
573
+ "aria-describedby": describedBy,
573
574
  onPressWithin: markPressWithin,
574
575
  ...props$1,
575
576
  children: /* @__PURE__ */ jsx(DescriptionContext, {
576
- value: description,
577
+ value: registerDescription,
577
578
  children
578
579
  })
579
580
  });
580
- $[40] = children;
581
- $[41] = described;
582
- $[42] = description;
583
- $[43] = descriptionId;
584
- $[44] = modal;
585
- $[45] = props$1;
586
- $[46] = t21;
587
- } else t21 = $[46];
588
- let t22;
589
- if ($[47] !== alignOffset || $[48] !== container || $[49] !== merged || $[50] !== sideOffset || $[51] !== t16 || $[52] !== t17 || $[53] !== t18 || $[54] !== t20 || $[55] !== t21 || $[56] !== triggerRef) {
590
- t22 = /* @__PURE__ */ jsx(OverlayScope, { children: /* @__PURE__ */ jsx(Popover, {
581
+ $[41] = children;
582
+ $[42] = describedBy;
583
+ $[43] = modal;
584
+ $[44] = props$1;
585
+ $[45] = t22;
586
+ } else t22 = $[45];
587
+ let t23;
588
+ if ($[46] !== alignOffset || $[47] !== container || $[48] !== merged || $[49] !== sideOffset || $[50] !== t17 || $[51] !== t18 || $[52] !== t19 || $[53] !== t21 || $[54] !== t22 || $[55] !== triggerRef) {
589
+ t23 = /* @__PURE__ */ jsx(OverlayScope, { children: /* @__PURE__ */ jsx(Popover, {
591
590
  crossOffset: alignOffset,
592
- isNonModal: t16,
591
+ isNonModal: t17,
593
592
  offset: sideOffset,
594
- placement: t17,
593
+ placement: t18,
595
594
  ref: merged,
596
- shouldCloseOnInteractOutside: t18,
595
+ shouldCloseOnInteractOutside: t19,
597
596
  triggerRef,
598
597
  UNSTABLE_portalContainer: container,
599
- ...t20,
600
- children: t21
598
+ ...t21,
599
+ children: t22
601
600
  }) });
602
- $[47] = alignOffset;
603
- $[48] = container;
604
- $[49] = merged;
605
- $[50] = sideOffset;
606
- $[51] = t16;
607
- $[52] = t17;
608
- $[53] = t18;
609
- $[54] = t20;
610
- $[55] = t21;
611
- $[56] = triggerRef;
612
- $[57] = t22;
613
- } else t22 = $[57];
614
- return t22;
601
+ $[46] = alignOffset;
602
+ $[47] = container;
603
+ $[48] = merged;
604
+ $[49] = sideOffset;
605
+ $[50] = t17;
606
+ $[51] = t18;
607
+ $[52] = t19;
608
+ $[53] = t21;
609
+ $[54] = t22;
610
+ $[55] = triggerRef;
611
+ $[56] = t23;
612
+ } else t23 = $[56];
613
+ return t23;
615
614
  }
616
615
  /**
617
616
  * Supporting copy under the title. The panel's `aria-describedby` points at
618
617
  * it — see DescriptionContext for why that is this component's doing.
619
618
  */
620
619
  function PopoverDescription(props) {
621
- const $ = c(9);
622
- const { id, register } = useContext(DescriptionContext);
620
+ const $ = c(10);
621
+ const register = useContext(DescriptionContext);
622
+ const generated = useId();
623
+ const id = props.id ?? generated;
623
624
  let t0;
624
625
  let t1;
625
- if ($[0] !== register) {
626
- t0 = () => register();
627
- t1 = [register];
628
- $[0] = register;
629
- $[1] = t0;
630
- $[2] = t1;
626
+ if ($[0] !== id || $[1] !== register) {
627
+ t0 = () => register(id);
628
+ t1 = [id, register];
629
+ $[0] = id;
630
+ $[1] = register;
631
+ $[2] = t0;
632
+ $[3] = t1;
631
633
  } else {
632
- t0 = $[1];
633
- t1 = $[2];
634
+ t0 = $[2];
635
+ t1 = $[3];
634
636
  }
635
637
  useEffect(t0, t1);
636
638
  let t2;
637
- if ($[3] !== props) {
639
+ if ($[4] !== props) {
638
640
  t2 = mergeStyles({ className: "x9f619 x1w5n3ug xpo2rfv x193rfdd x1hews6w xn43zvd xv61bfh x1ghz6dp" }, props);
639
- $[3] = props;
640
- $[4] = t2;
641
- } else t2 = $[4];
641
+ $[4] = props;
642
+ $[5] = t2;
643
+ } else t2 = $[5];
642
644
  let t3;
643
- if ($[5] !== id || $[6] !== props || $[7] !== t2) {
645
+ if ($[6] !== id || $[7] !== props || $[8] !== t2) {
644
646
  t3 = /* @__PURE__ */ jsx(Text, {
645
- id,
646
647
  slot: "description",
647
648
  ...props,
649
+ id,
648
650
  ...t2
649
651
  });
650
- $[5] = id;
651
- $[6] = props;
652
- $[7] = t2;
653
- $[8] = t3;
654
- } else t3 = $[8];
652
+ $[6] = id;
653
+ $[7] = props;
654
+ $[8] = t2;
655
+ $[9] = t3;
656
+ } else t3 = $[9];
655
657
  return t3;
656
658
  }
657
659
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","RefObject","ClassNameOrFunction","DialogProps","DialogTriggerProps","HeadingProps","PopoverRenderProps","StyleOrFunction","TextProps","stylex","createContext","useCallback","useContext","useEffect","useId","useMemo","useRef","useState","useInteractOutside","ButtonContext","DEFAULT_SLOT","Dialog","DialogContext","DialogTrigger","Heading","HeadingContext","OverlayTriggerStateContext","PreviewTrigger","Popover","RACPopover","PopoverContext","RACPopoverContext","Text","TextContext","useSlottedContext","OverlayAlign","OverlaySide","OverlayScope","mergeRefs","focus","mergeStatefulStyles","mergeStyles","overlay","placementOf","popupOrigin","colors","spacing","typography","DEFAULT_SIDE_OFFSET","styles","content","kGO01o","kLKAdn","kg3NbH","$$css","description","kB7OPa","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kogj98","md","ks0D6T","sm","title","DEFAULT_HOVER_DELAY","DEFAULT_HOVER_CLOSE_DELAY","PopoverAlign","PopoverSide","PopoverSize","modal","size","DescriptionContext","id","register","TitleContext","TEXT_SLOTS","slots","PopoverProps","Omit","children","closeDelay","delay","trigger","PopoverTrigger","PanelDialog","t0","$","labelledBy","onPressWithin","props","slot","t1","t2","t3","t4","render","_render","t5","t6","ref","state","triggerOf","pressed","undefined","titleId","titled","setTitled","Symbol","for","registerTitle","level","headings","onPress","close","t7","t8","buttons","t10","t9","element","current","contains","document","activeElement","preventScroll","t11","t12","t13","t14","popupDialog","ring","t15","t16","t17","t18","context","PopoverContent","alignOffset","className","container","style","triggerRef","align","side","sideOffset","handed","panel","merged","pressedWithin","markPressWithin","own","triggers","fromTrigger","isOutsideTrigger","isOpen","event","target","Element","isDisabled","onInteractOutside","onInteractOutsideStart","descriptionId","described","setDescribed","t19","popup","placement","t20","t21","t22","PopoverDescription","PopoverTitle","Content","Description","Title","PopoverContentProps","PopoverDescriptionProps","PopoverTitleProps","PopoverContext","_c","props","stylex.props","Popover","RACPopoverContext","RACPopover"],"sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes, RefObject } from 'react';\nimport type { ClassNameOrFunction, DialogProps, DialogTriggerProps, HeadingProps, PopoverRenderProps, StyleOrFunction, TextProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from 'react';\nimport { useInteractOutside } from 'react-aria';\nimport { ButtonContext, DEFAULT_SLOT, Dialog, DialogContext, DialogTrigger, Heading, HeadingContext, OverlayTriggerStateContext, PreviewTrigger, Popover as RACPopover, PopoverContext as RACPopoverContext, Text, TextContext, useSlottedContext } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { OverlayScope } from '../../overlay';\nimport { mergeRefs } from '../../render/ref';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// The gap between the anchor and the panel, matching `spacing.sm`'s default.\n// A number rather than the token, because React Aria computes the position in\n// JavaScript and so cannot read a CSS custom property — this is the one place\n// in the component where a step of the spacing scale is spelled out. React\n// Aria's own default is 8 as well, but the value is this component's decision\n// rather than an inherited one.\nconst DEFAULT_SIDE_OFFSET = 8;\n\n// The surface, its entry and the dialog's focus ring are the overlay module's,\n// shared with every anchored overlay; what is here is Popover's own — its\n// inset, its two widths, and the type of its title and description.\n//\n// Popover has no page of its own, so the inset and the type follow the rich\n// tooltip, the nearest thing the Material Design pages draw: a plain rounded\n// panel offset from its anchor, with no caret drawn between the two, holding\n// a subhead over supporting text.\n//\n// React Aria's popover is two elements — the positioned panel and the dialog\n// inside it — so the styles are split the same way: the surface, `content`\n// and a size on the panel, the dialog style on the element that carries the\n// role.\nconst styles = {\n content: {\n kGO01o: \"xqf7pud\",\n kLKAdn: \"x6gmt8y\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n description: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kogj98: \"x1ghz6dp\",\n $$css: true\n },\n md: {\n ks0D6T: \"x10u2fgw\",\n $$css: true\n },\n sm: {\n ks0D6T: \"xjjheoa\",\n $$css: true\n },\n title: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kogj98: \"x1ghz6dp\",\n $$css: true\n }\n};\n\n// How long a pointer rests on the trigger before a hovered popover opens,\n// and how long it has to leave before it closes. React Aria's own defaults,\n// spelled out because they are the whole feel of a hover trigger and worth\n// finding in the component rather than in a changelog.\nconst DEFAULT_HOVER_DELAY = 600;\nconst DEFAULT_HOVER_CLOSE_DELAY = 200;\n\n// The overlay module's, since which side a surface opens on is the same\n// question for every anchored overlay. Aliased rather than re-declared so\n// the names a call site imports stay this component's.\ntype PopoverAlign = OverlayAlign;\ntype PopoverSide = OverlaySide;\ntype PopoverSize = 'md' | 'sm';\n\n// `size` and `modal` are declared on the root, where a reader expects to set\n// the shape of the whole popover, but it is `Popover.Content` that has to\n// apply them. Through context rather than making the call site repeat them —\n// the same arrangement Sheet uses, and worth keeping identical between the\n// two panels a consumer is most likely to reach for in the same afternoon.\nconst PopoverContext = createContext<{\n modal: boolean;\n size: PopoverSize;\n}>({\n modal: false,\n size: 'md'\n});\n\n// React Aria points a dialog's `aria-describedby` at its description slot\n// only for an alert dialog, on the grounds that an ordinary dialog's content\n// is read anyway. A popover's description names what the panel is for, so it\n// is pointed at here: the content hands the description an id, and the\n// description reports that it is mounted, since an `aria-describedby` with\n// nothing at the other end is an invalid reference rather than a harmless one.\nconst DescriptionContext = createContext<{\n id: string;\n register: () => () => void;\n}>({\n id: '',\n register: () => () => {}\n});\n\n// The same for the title, which the non-modal panel names itself by — see\n// PanelDialog. React Aria's own Dialog finds its title by looking for it;\n// the panel here is told it is there.\nconst TitleContext = createContext<() => () => void>(() => () => {});\n\n// The text slot the description fills, with the default beside it so a\n// plain `Text` still renders. Hoisted, since it never changes.\nconst TEXT_SLOTS = {\n slots: {\n [DEFAULT_SLOT]: {},\n description: {}\n }\n};\ntype PopoverProps = Omit<DialogTriggerProps, 'children'> & {\n children?: ReactNode;\n /**\n * How long the pointer has to leave a hovered popover before it closes, in\n * milliseconds. Ignored by a pressed one.\n * @default 200\n */\n closeDelay?: number;\n /**\n * How long the pointer has to rest on the trigger before a hovered popover\n * opens, in milliseconds. Ignored by a pressed one.\n * @default 600\n */\n delay?: number;\n /**\n * Blocks the page behind the panel while it is open, as a dialog would.\n * Off by default: a popover leaves the page interactive, which is the\n * difference from `Sheet`.\n * @default false\n */\n modal?: boolean;\n /**\n * Panel width: `sm` caps at 240px, `md` at 320px. Either way the panel is\n * only as wide as its contents, and never wider than the viewport.\n * @default 'md'\n */\n size?: PopoverSize;\n /**\n * What opens the panel: a press, or a pointer resting on the trigger.\n * `hover` is the tooltips page's rich tooltip — it opens on hover, focus\n * or a long press, and stays open while the pointer is inside it, so the\n * panel's own buttons and links can be reached.\n * @default 'press'\n */\n trigger?: PopoverTrigger;\n};\ntype PopoverTrigger = 'hover' | 'press';\n\n/**\n * The element that carries the dialog role in a non-modal popover: what\n * React Aria's `Dialog` gives a modal one — the role, the name from the\n * title, the description, and the close slot — without the two things that\n * make `Dialog` a modal's.\n *\n * `Dialog` moves focus into itself as it mounts, whatever opened it, and\n * holds focus inside the overlay until it closes. A hover popover therefore\n * took focus from wherever the reader was typing the moment a pointer\n * rested on its trigger, and Tab in an open popover went round its own\n * controls forever, though the page behind a non-modal popover is meant to\n * stay in reach. Here a pressed popover still takes focus as it opens, since\n * a press asked for the panel, but a hovered one leaves it where it is, and\n * Tab past the panel's last control carries on from the trigger in the\n * page. React Aria's popover sees a dialog inside it and so adds no role or\n * focus handling of its own.\n */\nfunction PanelDialog({\n 'aria-labelledby': labelledBy,\n children,\n id,\n onPressWithin,\n // React Aria's render prop is the one part of a dialog's props this\n // element cannot honour, being an element of its own rather than React\n // Aria's; left out rather than spread onto the DOM.\n render: _render,\n slot,\n ...props\n}: Omit<PopoverContentProps, 'align' | 'alignOffset' | 'className' | 'container' | 'side' | 'sideOffset' | 'style' | 'triggerRef'> & {\n /**\n * Called when a press starts anywhere inside the panel in React's tree,\n * which takes in what an overlay opened from the panel draws elsewhere in\n * the document — see `PopoverContent`.\n */\n onPressWithin: () => void;\n}) {\n const ref = useRef<HTMLElement>(null);\n const state = useContext(OverlayTriggerStateContext);\n // What the trigger hands its overlay: the id the trigger's\n // `aria-controls` points at, and the trigger itself as the name of a\n // panel with no title. A hover trigger hands nothing, and is a hover\n // trigger for exactly that reason.\n const trigger = triggerOf(useContext(DialogContext));\n const pressed = trigger !== undefined;\n const titleId = useId();\n const [titled, setTitled] = useState(false);\n const registerTitle = useCallback(() => {\n setTitled(true);\n return () => {\n setTitled(false);\n };\n }, []);\n const headings = useMemo(() => ({\n slots: {\n [DEFAULT_SLOT]: {},\n title: {\n id: titleId,\n level: 2\n }\n }\n }), [titleId]);\n const buttons = useMemo(() => ({\n slots: {\n close: {\n onPress: () => {\n state?.close();\n }\n },\n [DEFAULT_SLOT]: {}\n }\n }), [state]);\n useEffect(() => {\n const element = ref.current;\n if (pressed && element !== null && !element.contains(document.activeElement)) {\n element.focus({\n preventScroll: true\n });\n }\n }, [pressed]);\n return (\n // A section with the role, as React Aria's own dialog is: a `<dialog>`\n // element brings the browser's own positioning, border, padding and top\n // layer, all of which the panel around it already decides.\n <section {...props} aria-labelledby={labelledBy ?? (titled ? titleId : trigger?.labelledBy)} id={id ?? trigger?.id} onPointerDownCapture={onPressWithin} ref={ref}\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- a `<dialog>` element would bring the browser's own positioning and top layer, which the panel around it already decides\n role=\"dialog\" slot={slot ?? undefined} tabIndex={-1} {...stylex.props(overlay.popupDialog, focus.ring)}>\n <HeadingContext value={headings}>\n <TextContext value={TEXT_SLOTS}>\n <ButtonContext value={buttons}>\n <TitleContext value={registerTitle}>{children}</TitleContext>\n </ButtonContext>\n </TextContext>\n </HeadingContext>\n </section>\n );\n}\n\n// React Aria names a placement by the side and, along it, the end the panel\n// is aligned to — `bottom start`, or `left top` on the sides where the axis\n// runs the other way.\n/**\n * A panel anchored to the control that opened it. Open state is React Aria's:\n * pass `isOpen` with `onOpenChange` to control it, or `defaultOpen` to let it\n * keep its own.\n *\n * Non-modal by design — the page behind stays scrollable and clickable, which\n * is the difference from `Sheet`. Pass `modal` to change that. Escape, a press\n * anywhere outside the panel and a button given `slot=\"close\"` close it, and\n * a press on its trigger toggles it. Inside a dialog, a press on the scrim\n * closes the popover first and the dialog on the next, as a menu does.\n *\n * Composed rather than configured by props, because a popover's contents are\n * arbitrary — the parts are `Popover.Content`, `Popover.Title`, and\n * `Popover.Description`. A `Button` or `IconButton` placed directly inside\n * `Popover` opens it, and one given `slot=\"close\"` inside the content closes\n * it; neither needs a part of its own.\n */\nfunction Popover({\n children,\n closeDelay = DEFAULT_HOVER_CLOSE_DELAY,\n delay = DEFAULT_HOVER_DELAY,\n modal = false,\n size = 'md',\n trigger = 'press',\n ...props\n}: PopoverProps) {\n // A hovered popover is React Aria's preview trigger, which is a different\n // element around the same parts rather than a mode of the pressed one: it\n // opens from hover, focus or a long press, and it is always non-modal,\n // since a panel that blocked the page while the pointer merely rested on\n // something would be a trap. `modal` is ignored there rather than\n // refused, so the content draws the non-modal panel whatever it says.\n const context = useMemo(() => ({\n modal: modal && trigger !== 'hover',\n size\n }), [modal, size, trigger]);\n if (trigger === 'hover') {\n return <PopoverContext value={context}>\n <PreviewTrigger closeDelay={closeDelay} delay={delay} {...props}>\n {children}\n </PreviewTrigger>\n </PopoverContext>;\n }\n return <PopoverContext value={context}>\n <DialogTrigger {...props}>{children}</DialogTrigger>\n </PopoverContext>;\n}\n\n/**\n * The panel itself. Everything the popover shows goes in here; the trigger\n * stays outside it, since the trigger lives in the page while this is\n * portalled out to the end of the body.\n *\n * Placement is React Aria's anchor positioning, so the panel flips to the\n * opposite side and shifts along the edge of the viewport on its own rather\n * than being clipped by it.\n */\nfunction PopoverContent({\n align = 'center',\n alignOffset,\n children,\n className,\n container,\n ref,\n side = 'bottom',\n sideOffset = DEFAULT_SIDE_OFFSET,\n style,\n triggerRef,\n ...props\n}: PopoverContentProps & RefAttributes<HTMLElement>) {\n const {\n modal,\n size\n } = useContext(PopoverContext);\n const state = useContext(OverlayTriggerStateContext);\n // The trigger React Aria hands its popover, for a content part given no\n // `triggerRef` of its own.\n const handed = useSlottedContext(RACPopoverContext)?.triggerRef;\n\n // A non-modal popover is one React Aria closes on blur alone: a press on\n // blank page left it open, and a press on its own trigger closed it as\n // focus left the panel and opened it again on the same press. Here a\n // press anywhere outside the panel closes it, and a press on the trigger\n // is left to the trigger, which toggles it.\n //\n // What an overlay opened from inside the panel draws — a select's list, a\n // menu — is portalled elsewhere in the document, so a press there is\n // outside the panel's element though it is within the panel's tree. React\n // carries the press up that tree, and the panel marks it as within before\n // the press ends; the outside press is read on its end, so the mark is\n // there to read. Each press outside clears it as it starts.\n const panel = useRef<HTMLElement>(null);\n const merged = useMemo(() => mergeRefs(panel, ref ?? undefined), [ref]);\n const pressedWithin = useRef(false);\n const markPressWithin = useCallback(() => {\n pressedWithin.current = true;\n }, []);\n // The two refs the trigger may come through, kept where a callback can\n // read them at the moment of a press rather than as dependencies, which a\n // ref is not.\n const triggers = useRef({\n handed,\n own: triggerRef\n });\n useEffect(() => {\n triggers.current = {\n handed,\n own: triggerRef\n };\n });\n const isOutsideTrigger = useCallback((element: Element) => {\n const {\n handed: fromTrigger,\n own\n } = triggers.current;\n const trigger = own?.current ?? fromTrigger?.current;\n return !(trigger?.contains(element) ?? false);\n }, []);\n useInteractOutside({\n isDisabled: modal || state === null || !state.isOpen,\n onInteractOutside: event => {\n if (pressedWithin.current) {\n pressedWithin.current = false;\n return;\n }\n if (event.target instanceof Element && !isOutsideTrigger(event.target)) {\n return;\n }\n state?.close();\n },\n onInteractOutsideStart: () => {\n pressedWithin.current = false;\n },\n ref: panel\n });\n const descriptionId = useId();\n const [described, setDescribed] = useState(false);\n const register = useCallback(() => {\n setDescribed(true);\n return () => {\n setDescribed(false);\n };\n }, []);\n const description = useMemo(() => ({\n id: descriptionId,\n register\n }), [descriptionId, register]);\n return <OverlayScope>\n <RACPopover crossOffset={alignOffset} isNonModal={!modal} offset={sideOffset} placement={placementOf(side, align)}\n // The surface, where the call site's class and style land, rather than\n // the dialog inside it, which takes the rest of the props.\n ref={merged}\n // Focus leaving for the trigger closes nothing: the trigger's own\n // press toggles the panel, and closing it first reopened it.\n shouldCloseOnInteractOutside={modal ? undefined : isOutsideTrigger} triggerRef={triggerRef}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles((render: PopoverRenderProps) => stylex.props(overlay.popup, styles.content, styles[size], popupOrigin(render.placement)), {\n className,\n style\n })}>\n {modal ? <Dialog aria-describedby={described ? descriptionId : undefined} {...props} {...stylex.props(overlay.popupDialog, focus.ring)}>\n <DescriptionContext value={description}>\n {children}\n </DescriptionContext>\n </Dialog> : <PanelDialog aria-describedby={described ? descriptionId : undefined} onPressWithin={markPressWithin} {...props}>\n <DescriptionContext value={description}>\n {children}\n </DescriptionContext>\n </PanelDialog>}\n </RACPopover>\n </OverlayScope>;\n}\n\n/**\n * Supporting copy under the title. The panel's `aria-describedby` points at\n * it — see DescriptionContext for why that is this component's doing.\n */\nfunction PopoverDescription(props: PopoverDescriptionProps & RefAttributes<HTMLElement>) {\n const {\n id,\n register\n } = useContext(DescriptionContext);\n useEffect(() => register(), [register]);\n return <Text id={id} slot=\"description\" {...props} {...mergeStyles({\n className: \"x9f619 x1w5n3ug xpo2rfv x193rfdd x1hews6w xn43zvd xv61bfh x1ghz6dp\"\n }, props)} />;\n}\n\n/**\n * Names the popover. Rendered through React Aria's title slot, which is what\n * points the panel's `aria-labelledby` at it — a popover without one announces\n * itself unnamed.\n */\nfunction PopoverTitle(props: PopoverTitleProps & RefAttributes<HTMLHeadingElement>) {\n const register = useContext(TitleContext);\n useEffect(() => register(), [register]);\n return <Heading slot=\"title\" {...props} {...mergeStyles({\n className: \"x9f619 x1w5n3ug xrgwony x12s497w x1szcwkt xo803ec xyl1r0q x1ghz6dp\"\n }, props)} />;\n}\n\n/**\n * What a pressed trigger hands the overlay it opens: the id its\n * `aria-controls` points at, and its own id to name a panel with no title.\n * Read field by field, since the context's type also admits a slotted\n * value; a hover trigger hands nothing.\n */\nfunction triggerOf(context: unknown) {\n if (typeof context !== 'object' || context === null || 'slots' in context) {\n return undefined;\n }\n return {\n id: 'id' in context && typeof context.id === 'string' ? context.id : undefined,\n labelledBy: 'aria-labelledby' in context && typeof context['aria-labelledby'] === 'string' ? context['aria-labelledby'] : undefined\n };\n}\nPopover.Content = PopoverContent;\nPopover.Description = PopoverDescription;\nPopover.Title = PopoverTitle;\n\n// The dialog's own props, plus the four that place the panel and its\n// styling. Those belong to the positioned panel rather than to the dialog,\n// but a call site has no reason to know there are two elements — `className`\n// and `style` reach the panel, which is the one worth restyling, and\n// everything else lands on the dialog.\ntype PopoverContentProps = Omit<DialogProps, 'children' | 'className' | 'style'> & {\n /**\n * Where the panel sits along the side it opens on.\n * @default 'center'\n */\n align?: PopoverAlign;\n /** Moves the panel along that side, in pixels. */\n alignOffset?: number;\n children?: ReactNode;\n /** A function may compute the class from the panel's render state. */\n className?: ClassNameOrFunction<PopoverRenderProps>;\n /**\n * Where to portal the panel. Defaults to the container of the `ThemeScope`\n * around it, which keeps the popover on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the popover\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Which side of the trigger the panel opens on. It flips to the opposite\n * side when there is no room.\n * @default 'bottom'\n */\n side?: PopoverSide;\n /**\n * The gap between the trigger and the panel, in pixels.\n * @default 8\n */\n sideOffset?: number;\n /** A function may compute the style from the panel's render state. */\n style?: StyleOrFunction<PopoverRenderProps>;\n /**\n * An element to anchor the panel to other than the trigger that opened it.\n */\n triggerRef?: RefObject<Element | null>;\n};\ntype PopoverDescriptionProps = TextProps;\ntype PopoverTitleProps = HeadingProps;\nexport type { PopoverAlign, PopoverContentProps, PopoverDescriptionProps, PopoverProps, PopoverSide, PopoverSize, PopoverTitleProps, PopoverTrigger };\nexport { PopoverContent, PopoverDescription, PopoverTitle };\nexport default Popover;"],"mappings":";;;;;;;;;;;;;AAuBA,MAAMmD,sBAAsB;AAe5B,MAAMC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;CACAU,IAAI;EACFC,QAAQ;EACRX,OAAO;CACT;CACAY,IAAI;EACFD,QAAQ;EACRX,OAAO;CACT;CACAa,OAAO;EACLX,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;AACF;AAMA,MAAMc,sBAAsB;AAC5B,MAAMC,4BAA4B;AAclC,MAAMvC,mBAAiBpB,cAGpB;CACD+D,OAAO;CACPC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cAAcH;AACtBlJ,UAAQsJ,QAAQH"}
1
+ {"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","RefObject","ClassNameOrFunction","DialogProps","DialogTriggerProps","HeadingProps","PopoverRenderProps","StyleOrFunction","TextProps","stylex","createContext","useCallback","useContext","useEffect","useId","useMemo","useRef","useState","useInteractOutside","ButtonContext","DEFAULT_SLOT","Dialog","DialogContext","DialogTrigger","Heading","HeadingContext","OverlayTriggerStateContext","PreviewTrigger","Popover","RACPopover","PopoverContext","RACPopoverContext","Text","TextContext","useSlottedContext","OverlayAlign","OverlaySide","OverlayScope","mergeRefs","focus","mergeStatefulStyles","mergeStyles","overlay","placementOf","popupOrigin","colors","spacing","typography","DEFAULT_SIDE_OFFSET","styles","content","kGO01o","kLKAdn","kg3NbH","$$css","description","kB7OPa","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kogj98","md","ks0D6T","sm","title","DEFAULT_HOVER_DELAY","DEFAULT_HOVER_CLOSE_DELAY","PopoverAlign","PopoverSide","PopoverSize","modal","size","DescriptionContext","id","TitleContext","TEXT_SLOTS","slots","PopoverProps","Omit","children","closeDelay","delay","trigger","PopoverTrigger","PanelDialog","t0","$","labelledBy","onPressWithin","props","slot","t1","t2","t3","t4","render","_render","t5","t6","ref","state","triggerOf","pressed","undefined","titleId","titled","setTitled","Symbol","for","registerTitle","level","headings","onPress","close","t7","t8","buttons","t10","t9","element","current","contains","document","activeElement","preventScroll","t11","t12","t13","t14","popupDialog","ring","t15","t16","t17","t18","context","PopoverContent","alignOffset","className","container","style","triggerRef","align","side","sideOffset","handed","panel","merged","pressedWithin","markPressWithin","own","triggers","fromTrigger","isOutsideTrigger","isOpen","event","target","Element","isDisabled","onInteractOutside","onInteractOutsideStart","descriptions","setDescriptions","ids","ids_0","at","indexOf","slice","registerDescription","length","Set","join","describedBy","t19","t20","popup","placement","t21","t22","t23","PopoverDescription","register","generated","PopoverTitle","Content","Description","Title","PopoverContentProps","PopoverDescriptionProps","PopoverTitleProps","PopoverContext","_c","props","stylex.props","Popover","RACPopoverContext","RACPopover"],"sources":["../../../src/components/popover/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes, RefObject } from 'react';\nimport type { ClassNameOrFunction, DialogProps, DialogTriggerProps, HeadingProps, PopoverRenderProps, StyleOrFunction, TextProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from 'react';\nimport { useInteractOutside } from 'react-aria';\nimport { ButtonContext, DEFAULT_SLOT, Dialog, DialogContext, DialogTrigger, Heading, HeadingContext, OverlayTriggerStateContext, PreviewTrigger, Popover as RACPopover, PopoverContext as RACPopoverContext, Text, TextContext, useSlottedContext } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { OverlayScope } from '../../overlay';\nimport { mergeRefs } from '../../render/ref';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles, mergeStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// The gap between the anchor and the panel, matching `spacing.sm`'s default.\n// A number rather than the token, because React Aria computes the position in\n// JavaScript and so cannot read a CSS custom property — this is the one place\n// in the component where a step of the spacing scale is spelled out. React\n// Aria's own default is 8 as well, but the value is this component's decision\n// rather than an inherited one.\nconst DEFAULT_SIDE_OFFSET = 8;\n\n// The surface, its entry and the dialog's focus ring are the overlay module's,\n// shared with every anchored overlay; what is here is Popover's own — its\n// inset, its two widths, and the type of its title and description.\n//\n// Popover has no page of its own, so the inset and the type follow the rich\n// tooltip, the nearest thing the Material Design pages draw: a plain rounded\n// panel offset from its anchor, with no caret drawn between the two, holding\n// a subhead over supporting text.\n//\n// React Aria's popover is two elements — the positioned panel and the dialog\n// inside it — so the styles are split the same way: the surface, `content`\n// and a size on the panel, the dialog style on the element that carries the\n// role.\nconst styles = {\n content: {\n kGO01o: \"xqf7pud\",\n kLKAdn: \"x6gmt8y\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n description: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kogj98: \"x1ghz6dp\",\n $$css: true\n },\n md: {\n ks0D6T: \"x10u2fgw\",\n $$css: true\n },\n sm: {\n ks0D6T: \"xjjheoa\",\n $$css: true\n },\n title: {\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xrgwony\",\n kGuDYH: \"x12s497w\",\n k63SB2: \"x1szcwkt\",\n kb6lSQ: \"xo803ec\",\n kLWn49: \"xyl1r0q\",\n kogj98: \"x1ghz6dp\",\n $$css: true\n }\n};\n\n// How long a pointer rests on the trigger before a hovered popover opens,\n// and how long it has to leave before it closes. React Aria's own defaults,\n// spelled out because they are the whole feel of a hover trigger and worth\n// finding in the component rather than in a changelog.\nconst DEFAULT_HOVER_DELAY = 600;\nconst DEFAULT_HOVER_CLOSE_DELAY = 200;\n\n// The overlay module's, since which side a surface opens on is the same\n// question for every anchored overlay. Aliased rather than re-declared so\n// the names a call site imports stay this component's.\ntype PopoverAlign = OverlayAlign;\ntype PopoverSide = OverlaySide;\ntype PopoverSize = 'md' | 'sm';\n\n// `size` and `modal` are declared on the root, where a reader expects to set\n// the shape of the whole popover, but it is `Popover.Content` that has to\n// apply them. Through context rather than making the call site repeat them —\n// the same arrangement Sheet uses, and worth keeping identical between the\n// two panels a consumer is most likely to reach for in the same afternoon.\nconst PopoverContext = createContext<{\n modal: boolean;\n size: PopoverSize;\n}>({\n modal: false,\n size: 'md'\n});\n\n// React Aria points a dialog's `aria-describedby` at its description slot\n// only for an alert dialog, on the grounds that an ordinary dialog's content\n// is read anyway. A popover's description names what the panel is for, so it\n// is pointed at here: each description reports the id it renders while it is\n// mounted, and the dialog follows those ids, since an `aria-describedby` with\n// nothing at the other end is an invalid reference rather than a harmless one.\n// The id is the one the element carries, a call site's own included, and each\n// description has one of its own, so a second description adds its id rather\n// than sharing the first's, and unmounting either leaves the other.\nconst DescriptionContext = createContext<(id: string) => () => void>(() => () => {});\n\n// The same for the title, which the non-modal panel names itself by — see\n// PanelDialog. React Aria's own Dialog finds its title by looking for it;\n// the panel here is told it is there.\nconst TitleContext = createContext<() => () => void>(() => () => {});\n\n// The text slot the description fills, with the default beside it so a\n// plain `Text` still renders. Hoisted, since it never changes.\nconst TEXT_SLOTS = {\n slots: {\n [DEFAULT_SLOT]: {},\n description: {}\n }\n};\ntype PopoverProps = Omit<DialogTriggerProps, 'children'> & {\n children?: ReactNode;\n /**\n * How long the pointer has to leave a hovered popover before it closes, in\n * milliseconds. Ignored by a pressed one.\n * @default 200\n */\n closeDelay?: number;\n /**\n * How long the pointer has to rest on the trigger before a hovered popover\n * opens, in milliseconds. Ignored by a pressed one.\n * @default 600\n */\n delay?: number;\n /**\n * Blocks the page behind the panel while it is open, as a dialog would.\n * Off by default: a popover leaves the page interactive, which is the\n * difference from `Sheet`.\n * @default false\n */\n modal?: boolean;\n /**\n * Panel width: `sm` caps at 240px, `md` at 320px. Either way the panel is\n * only as wide as its contents, and never wider than the viewport.\n * @default 'md'\n */\n size?: PopoverSize;\n /**\n * What opens the panel: a press, or a pointer resting on the trigger.\n * `hover` is the tooltips page's rich tooltip — it opens on hover, focus\n * or a long press, and stays open while the pointer is inside it, so the\n * panel's own buttons and links can be reached.\n * @default 'press'\n */\n trigger?: PopoverTrigger;\n};\ntype PopoverTrigger = 'hover' | 'press';\n\n/**\n * The element that carries the dialog role in a non-modal popover: what\n * React Aria's `Dialog` gives a modal one — the role, the name from the\n * title, the description, and the close slot — without the two things that\n * make `Dialog` a modal's.\n *\n * `Dialog` moves focus into itself as it mounts, whatever opened it, and\n * holds focus inside the overlay until it closes. A hover popover therefore\n * took focus from wherever the reader was typing the moment a pointer\n * rested on its trigger, and Tab in an open popover went round its own\n * controls forever, though the page behind a non-modal popover is meant to\n * stay in reach. Here a pressed popover still takes focus as it opens, since\n * a press asked for the panel, but a hovered one leaves it where it is, and\n * Tab past the panel's last control carries on from the trigger in the\n * page. React Aria's popover sees a dialog inside it and so adds no role or\n * focus handling of its own.\n */\nfunction PanelDialog({\n 'aria-labelledby': labelledBy,\n children,\n id,\n onPressWithin,\n // React Aria's render prop is the one part of a dialog's props this\n // element cannot honour, being an element of its own rather than React\n // Aria's; left out rather than spread onto the DOM.\n render: _render,\n slot,\n ...props\n}: Omit<PopoverContentProps, 'align' | 'alignOffset' | 'className' | 'container' | 'side' | 'sideOffset' | 'style' | 'triggerRef'> & {\n /**\n * Called when a press starts anywhere inside the panel in React's tree,\n * which takes in what an overlay opened from the panel draws elsewhere in\n * the document — see `PopoverContent`.\n */\n onPressWithin: () => void;\n}) {\n const ref = useRef<HTMLElement>(null);\n const state = useContext(OverlayTriggerStateContext);\n // What the trigger hands its overlay: the id the trigger's\n // `aria-controls` points at, and the trigger itself as the name of a\n // panel with no title. A hover trigger hands nothing, and is a hover\n // trigger for exactly that reason.\n const trigger = triggerOf(useContext(DialogContext));\n const pressed = trigger !== undefined;\n const titleId = useId();\n const [titled, setTitled] = useState(false);\n const registerTitle = useCallback(() => {\n setTitled(true);\n return () => {\n setTitled(false);\n };\n }, []);\n const headings = useMemo(() => ({\n slots: {\n [DEFAULT_SLOT]: {},\n title: {\n id: titleId,\n level: 2\n }\n }\n }), [titleId]);\n const buttons = useMemo(() => ({\n slots: {\n close: {\n onPress: () => {\n state?.close();\n }\n },\n [DEFAULT_SLOT]: {}\n }\n }), [state]);\n useEffect(() => {\n const element = ref.current;\n if (pressed && element !== null && !element.contains(document.activeElement)) {\n element.focus({\n preventScroll: true\n });\n }\n }, [pressed]);\n return (\n // A section with the role, as React Aria's own dialog is: a `<dialog>`\n // element brings the browser's own positioning, border, padding and top\n // layer, all of which the panel around it already decides.\n <section {...props} aria-labelledby={labelledBy ?? (titled ? titleId : trigger?.labelledBy)} id={id ?? trigger?.id} onPointerDownCapture={onPressWithin} ref={ref}\n // oxlint-disable-next-line jsx-a11y/prefer-tag-over-role -- a `<dialog>` element would bring the browser's own positioning and top layer, which the panel around it already decides\n role=\"dialog\" slot={slot ?? undefined} tabIndex={-1} {...stylex.props(overlay.popupDialog, focus.ring)}>\n <HeadingContext value={headings}>\n <TextContext value={TEXT_SLOTS}>\n <ButtonContext value={buttons}>\n <TitleContext value={registerTitle}>{children}</TitleContext>\n </ButtonContext>\n </TextContext>\n </HeadingContext>\n </section>\n );\n}\n\n// React Aria names a placement by the side and, along it, the end the panel\n// is aligned to — `bottom start`, or `left top` on the sides where the axis\n// runs the other way.\n/**\n * A panel anchored to the control that opened it. Open state is React Aria's:\n * pass `isOpen` with `onOpenChange` to control it, or `defaultOpen` to let it\n * keep its own.\n *\n * Non-modal by design — the page behind stays scrollable and clickable, which\n * is the difference from `Sheet`. Pass `modal` to change that. Escape, a press\n * anywhere outside the panel and a button given `slot=\"close\"` close it, and\n * a press on its trigger toggles it. Inside a dialog, a press on the scrim\n * closes the popover first and the dialog on the next, as a menu does.\n *\n * Composed rather than configured by props, because a popover's contents are\n * arbitrary — the parts are `Popover.Content`, `Popover.Title`, and\n * `Popover.Description`. A `Button` or `IconButton` placed directly inside\n * `Popover` opens it, and one given `slot=\"close\"` inside the content closes\n * it; neither needs a part of its own.\n */\nfunction Popover({\n children,\n closeDelay = DEFAULT_HOVER_CLOSE_DELAY,\n delay = DEFAULT_HOVER_DELAY,\n modal = false,\n size = 'md',\n trigger = 'press',\n ...props\n}: PopoverProps) {\n // A hovered popover is React Aria's preview trigger, which is a different\n // element around the same parts rather than a mode of the pressed one: it\n // opens from hover, focus or a long press, and it is always non-modal,\n // since a panel that blocked the page while the pointer merely rested on\n // something would be a trap. `modal` is ignored there rather than\n // refused, so the content draws the non-modal panel whatever it says.\n const context = useMemo(() => ({\n modal: modal && trigger !== 'hover',\n size\n }), [modal, size, trigger]);\n if (trigger === 'hover') {\n return <PopoverContext value={context}>\n <PreviewTrigger closeDelay={closeDelay} delay={delay} {...props}>\n {children}\n </PreviewTrigger>\n </PopoverContext>;\n }\n return <PopoverContext value={context}>\n <DialogTrigger {...props}>{children}</DialogTrigger>\n </PopoverContext>;\n}\n\n/**\n * The panel itself. Everything the popover shows goes in here; the trigger\n * stays outside it, since the trigger lives in the page while this is\n * portalled out to the end of the body.\n *\n * Placement is React Aria's anchor positioning, so the panel flips to the\n * opposite side and shifts along the edge of the viewport on its own rather\n * than being clipped by it.\n */\nfunction PopoverContent({\n align = 'center',\n alignOffset,\n children,\n className,\n container,\n ref,\n side = 'bottom',\n sideOffset = DEFAULT_SIDE_OFFSET,\n style,\n triggerRef,\n ...props\n}: PopoverContentProps & RefAttributes<HTMLElement>) {\n const {\n modal,\n size\n } = useContext(PopoverContext);\n const state = useContext(OverlayTriggerStateContext);\n // The trigger React Aria hands its popover, for a content part given no\n // `triggerRef` of its own.\n const handed = useSlottedContext(RACPopoverContext)?.triggerRef;\n\n // A non-modal popover is one React Aria closes on blur alone: a press on\n // blank page left it open, and a press on its own trigger closed it as\n // focus left the panel and opened it again on the same press. Here a\n // press anywhere outside the panel closes it, and a press on the trigger\n // is left to the trigger, which toggles it.\n //\n // What an overlay opened from inside the panel draws — a select's list, a\n // menu — is portalled elsewhere in the document, so a press there is\n // outside the panel's element though it is within the panel's tree. React\n // carries the press up that tree, and the panel marks it as within before\n // the press ends; the outside press is read on its end, so the mark is\n // there to read. Each press outside clears it as it starts.\n const panel = useRef<HTMLElement>(null);\n const merged = useMemo(() => mergeRefs(panel, ref ?? undefined), [ref]);\n const pressedWithin = useRef(false);\n const markPressWithin = useCallback(() => {\n pressedWithin.current = true;\n }, []);\n // The two refs the trigger may come through, kept where a callback can\n // read them at the moment of a press rather than as dependencies, which a\n // ref is not.\n const triggers = useRef({\n handed,\n own: triggerRef\n });\n useEffect(() => {\n triggers.current = {\n handed,\n own: triggerRef\n };\n });\n const isOutsideTrigger = useCallback((element: Element) => {\n const {\n handed: fromTrigger,\n own\n } = triggers.current;\n const trigger = own?.current ?? fromTrigger?.current;\n return !(trigger?.contains(element) ?? false);\n }, []);\n useInteractOutside({\n isDisabled: modal || state === null || !state.isOpen,\n onInteractOutside: event => {\n if (pressedWithin.current) {\n pressedWithin.current = false;\n return;\n }\n if (event.target instanceof Element && !isOutsideTrigger(event.target)) {\n return;\n }\n state?.close();\n },\n onInteractOutsideStart: () => {\n pressedWithin.current = false;\n },\n ref: panel\n });\n\n // The ids of the descriptions mounted in the panel, one entry per\n // description, in the order they mounted.\n const [descriptions, setDescriptions] = useState<readonly string[]>([]);\n const registerDescription = useCallback((id: string) => {\n setDescriptions(ids => [...ids, id]);\n return () => {\n setDescriptions(ids => {\n const at = ids.indexOf(id);\n return at === -1 ? ids : [...ids.slice(0, at), ...ids.slice(at + 1)];\n });\n };\n }, []);\n const describedBy = descriptions.length > 0 ? [...new Set(descriptions)].join(' ') : undefined;\n return <OverlayScope>\n <RACPopover crossOffset={alignOffset} isNonModal={!modal} offset={sideOffset} placement={placementOf(side, align)}\n // The surface, where the call site's class and style land, rather than\n // the dialog inside it, which takes the rest of the props.\n ref={merged}\n // Focus leaving for the trigger closes nothing: the trigger's own\n // press toggles the panel, and closing it first reopened it.\n shouldCloseOnInteractOutside={modal ? undefined : isOutsideTrigger} triggerRef={triggerRef}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles((render: PopoverRenderProps) => stylex.props(overlay.popup, styles.content, styles[size], popupOrigin(render.placement)), {\n className,\n style\n })}>\n {modal ? <Dialog aria-describedby={describedBy} {...props} {...stylex.props(overlay.popupDialog, focus.ring)}>\n <DescriptionContext value={registerDescription}>\n {children}\n </DescriptionContext>\n </Dialog> : <PanelDialog aria-describedby={describedBy} onPressWithin={markPressWithin} {...props}>\n <DescriptionContext value={registerDescription}>\n {children}\n </DescriptionContext>\n </PanelDialog>}\n </RACPopover>\n </OverlayScope>;\n}\n\n/**\n * Supporting copy under the title. The panel's `aria-describedby` points at\n * it — see DescriptionContext for why that is this component's doing.\n */\nfunction PopoverDescription(props: PopoverDescriptionProps & RefAttributes<HTMLElement>) {\n const register = useContext(DescriptionContext);\n const generated = useId();\n const id = props.id ?? generated;\n useEffect(() => register(id), [id, register]);\n return <Text slot=\"description\" {...props} id={id} {...mergeStyles({\n className: \"x9f619 x1w5n3ug xpo2rfv x193rfdd x1hews6w xn43zvd xv61bfh x1ghz6dp\"\n }, props)} />;\n}\n\n/**\n * Names the popover. Rendered through React Aria's title slot, which is what\n * points the panel's `aria-labelledby` at it — a popover without one announces\n * itself unnamed.\n */\nfunction PopoverTitle(props: PopoverTitleProps & RefAttributes<HTMLHeadingElement>) {\n const register = useContext(TitleContext);\n useEffect(() => register(), [register]);\n return <Heading slot=\"title\" {...props} {...mergeStyles({\n className: \"x9f619 x1w5n3ug xrgwony x12s497w x1szcwkt xo803ec xyl1r0q x1ghz6dp\"\n }, props)} />;\n}\n\n/**\n * What a pressed trigger hands the overlay it opens: the id its\n * `aria-controls` points at, and its own id to name a panel with no title.\n * Read field by field, since the context's type also admits a slotted\n * value; a hover trigger hands nothing.\n */\nfunction triggerOf(context: unknown) {\n if (typeof context !== 'object' || context === null || 'slots' in context) {\n return undefined;\n }\n return {\n id: 'id' in context && typeof context.id === 'string' ? context.id : undefined,\n labelledBy: 'aria-labelledby' in context && typeof context['aria-labelledby'] === 'string' ? context['aria-labelledby'] : undefined\n };\n}\nPopover.Content = PopoverContent;\nPopover.Description = PopoverDescription;\nPopover.Title = PopoverTitle;\n\n// The dialog's own props, plus the four that place the panel and its\n// styling. Those belong to the positioned panel rather than to the dialog,\n// but a call site has no reason to know there are two elements — `className`\n// and `style` reach the panel, which is the one worth restyling, and\n// everything else lands on the dialog.\ntype PopoverContentProps = Omit<DialogProps, 'children' | 'className' | 'style'> & {\n /**\n * Where the panel sits along the side it opens on.\n * @default 'center'\n */\n align?: PopoverAlign;\n /** Moves the panel along that side, in pixels. */\n alignOffset?: number;\n children?: ReactNode;\n /** A function may compute the class from the panel's render state. */\n className?: ClassNameOrFunction<PopoverRenderProps>;\n /**\n * Where to portal the panel. Defaults to the container of the `ThemeScope`\n * around it, which keeps the popover on that scope's tokens, or to the end of\n * `<body>` where there is none. A subtree themed through the `themeScope`\n * class has no container of its own, so point this inside it, or the popover\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Which side of the trigger the panel opens on. It flips to the opposite\n * side when there is no room. `start` and `end` follow the writing\n * direction, so `end` is the right in English and the left in Arabic;\n * `left` and `right` stay put in either.\n * @default 'bottom'\n */\n side?: PopoverSide;\n /**\n * The gap between the trigger and the panel, in pixels.\n * @default 8\n */\n sideOffset?: number;\n /** A function may compute the style from the panel's render state. */\n style?: StyleOrFunction<PopoverRenderProps>;\n /**\n * An element to anchor the panel to other than the trigger that opened it.\n */\n triggerRef?: RefObject<Element | null>;\n};\ntype PopoverDescriptionProps = TextProps;\ntype PopoverTitleProps = HeadingProps;\nexport type { PopoverAlign, PopoverContentProps, PopoverDescriptionProps, PopoverProps, PopoverSide, PopoverSize, PopoverTitleProps, PopoverTrigger };\nexport { PopoverContent, PopoverDescription, PopoverTitle };\nexport default Popover;"],"mappings":";;;;;;;;;;;;;AAuBA,MAAMmD,sBAAsB;AAe5B,MAAMC,SAAS;CACbC,SAAS;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRT,OAAO;CACT;CACAU,IAAI;EACFC,QAAQ;EACRX,OAAO;CACT;CACAY,IAAI;EACFD,QAAQ;EACRX,OAAO;CACT;CACAa,OAAO;E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N,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAG,SAAAH,EAAA,OAAAM,IAAA;EAFFC,KAAA,oBAAC,SAAD;GAAc,MAAA;GAAO,GAAKJ;GAAK,GAAMG;EAEnC,CAAA;EAAIN,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OAFNO;AAEM;;;;;;;AASf,SAASQ,UAAUkC,SAAkB;CACnC,IAAI,OAAOA,YAAY,YAAYA,YAAY,QAAQ,WAAWA,SAChE;CAEF,OAAO;EACL9D,IAAI,QAAQ8D,WAAW,OAAOA,QAAQ9D,OAAO,WAAW8D,QAAQ9D,KAAK8B,KAAAA;EACrEhB,YAAY,qBAAqBgD,WAAW,OAAOA,QAAQ,uBAAuB,WAAWA,QAAQ,qBAAqBhC,KAAAA;CAC5H;AACF;AACA9E,UAAQ+J,UAAUhD;AAClB/G,UAAQgK,cAAcL;AACtB3J,UAAQiK,QAAQH"}
@@ -37,8 +37,10 @@ type ProgressIndicatorProps = {
37
37
  */
38
38
  shape?: ProgressIndicatorShape;
39
39
  /**
40
- * Whether the value is shown beside the label. Ignored while the indicator
41
- * is indeterminate, which has no value to show.
40
+ * Whether the value is shown at the end of the label's row. Ignored while
41
+ * the indicator is indeterminate, which has no value to show. On a ring
42
+ * the row sits above it, and the indicator is as wide as the wider of the
43
+ * two.
42
44
  * @default false
43
45
  */
44
46
  showValue?: boolean;