@kanso-labs/kanso-ui 0.47.5 → 0.48.1

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 (194) hide show
  1. package/dist/button/hooks.js +38 -4
  2. package/dist/button/hooks.js.map +1 -1
  3. package/dist/button/index.js +80 -67
  4. package/dist/button/index.js.map +1 -1
  5. package/dist/calendar/index.js +5 -5
  6. package/dist/calendar/styles.js +5 -5
  7. package/dist/calendar/styles.js.map +1 -1
  8. package/dist/chip/label.js +1 -1
  9. package/dist/chip/styles.js +1 -1
  10. package/dist/chip/styles.js.map +1 -1
  11. package/dist/collection/context.js +6 -0
  12. package/dist/collection/context.js.map +1 -0
  13. package/dist/collection/index.js +2 -2
  14. package/dist/collection/styles.js +29 -6
  15. package/dist/collection/styles.js.map +1 -1
  16. package/dist/components/app-bar/index.d.ts +1 -1
  17. package/dist/components/app-bar/index.js +2 -2
  18. package/dist/components/autocomplete/index.js +2 -2
  19. package/dist/components/avatar/index.d.ts +1 -1
  20. package/dist/components/avatar/index.js +1 -1
  21. package/dist/components/badge/index.js +3 -3
  22. package/dist/components/breadcrumbs/index.js +2 -2
  23. package/dist/components/button/index.d.ts +1 -1
  24. package/dist/components/button/index.js +3 -3
  25. package/dist/components/button/index.js.map +1 -1
  26. package/dist/components/button-group/index.d.ts +1 -1
  27. package/dist/components/button-group/index.js +3 -3
  28. package/dist/components/calendar/index.js +11 -4
  29. package/dist/components/calendar/index.js.map +1 -1
  30. package/dist/components/card/index.js +2 -2
  31. package/dist/components/carousel/index.d.ts +1 -1
  32. package/dist/components/carousel/index.js +2 -2
  33. package/dist/components/checkbox/index.js +13 -10
  34. package/dist/components/checkbox/index.js.map +1 -1
  35. package/dist/components/checkbox-group/index.js +4 -3
  36. package/dist/components/checkbox-group/index.js.map +1 -1
  37. package/dist/components/chip/index.js +2 -2
  38. package/dist/components/chip-group/index.js +72 -69
  39. package/dist/components/chip-group/index.js.map +1 -1
  40. package/dist/components/code/index.js +1 -1
  41. package/dist/components/color-area/index.js +2 -2
  42. package/dist/components/color-field/index.d.ts +1 -1
  43. package/dist/components/color-field/index.js +2 -2
  44. package/dist/components/color-picker/index.js +2 -2
  45. package/dist/components/color-slider/index.js +3 -3
  46. package/dist/components/color-swatch/index.js +3 -3
  47. package/dist/components/color-swatch-picker/index.js +3 -2
  48. package/dist/components/color-swatch-picker/index.js.map +1 -1
  49. package/dist/components/color-wheel/index.js +2 -2
  50. package/dist/components/combo-box/index.d.ts +1 -1
  51. package/dist/components/combo-box/index.js +8 -4
  52. package/dist/components/combo-box/index.js.map +1 -1
  53. package/dist/components/container/index.js +1 -1
  54. package/dist/components/copy-field/index.js +2 -2
  55. package/dist/components/currency/index.js +3 -3
  56. package/dist/components/date-field/index.d.ts +1 -1
  57. package/dist/components/date-field/index.js +2 -2
  58. package/dist/components/date-picker/index.d.ts +2 -2
  59. package/dist/components/date-picker/index.js +5 -5
  60. package/dist/components/date-range-picker/index.d.ts +2 -2
  61. package/dist/components/date-range-picker/index.js +3 -3
  62. package/dist/components/dialog/index.js +4 -4
  63. package/dist/components/disclosure/index.js +3 -3
  64. package/dist/components/disclosure-group/index.js +3 -3
  65. package/dist/components/drop-zone/index.js +2 -2
  66. package/dist/components/drop-zone/styles.js +11 -11
  67. package/dist/components/drop-zone/styles.js.map +1 -1
  68. package/dist/components/fab/index.d.ts +1 -1
  69. package/dist/components/fab/index.js +1 -1
  70. package/dist/components/fab-menu/index.d.ts +2 -2
  71. package/dist/components/fab-menu/index.js +6 -6
  72. package/dist/components/fab-menu/index.js.map +1 -1
  73. package/dist/components/feed/index.js +1 -1
  74. package/dist/components/form/index.js +2 -2
  75. package/dist/components/icon-button/index.d.ts +1 -1
  76. package/dist/components/icon-button/index.js +3 -3
  77. package/dist/components/icon-button/index.js.map +1 -1
  78. package/dist/components/keycap/index.js +2 -2
  79. package/dist/components/link/index.js +2 -2
  80. package/dist/components/list/index.js +61 -14
  81. package/dist/components/list/index.js.map +1 -1
  82. package/dist/components/list-box/index.js +84 -105
  83. package/dist/components/list-box/index.js.map +1 -1
  84. package/dist/components/list-detail/index.d.ts +1 -1
  85. package/dist/components/list-detail/index.js +1 -1
  86. package/dist/components/list-item/index.js +1 -1
  87. package/dist/components/loading-indicator/index.js +2 -2
  88. package/dist/components/menu/index.d.ts +2 -2
  89. package/dist/components/menu/index.js +3 -3
  90. package/dist/components/meter/index.d.ts +1 -1
  91. package/dist/components/meter/index.js +2 -2
  92. package/dist/components/navigation-bar/index.d.ts +1 -1
  93. package/dist/components/navigation-bar/index.js +2 -2
  94. package/dist/components/navigation-rail/index.d.ts +1 -1
  95. package/dist/components/navigation-rail/index.js +6 -6
  96. package/dist/components/navigation-rail/index.js.map +1 -1
  97. package/dist/components/navigation-tree/index.js +2 -2
  98. package/dist/components/number-field/index.d.ts +1 -1
  99. package/dist/components/number-field/index.js +5 -5
  100. package/dist/components/number-field/index.js.map +1 -1
  101. package/dist/components/popover/index.d.ts +1 -1
  102. package/dist/components/popover/index.js +7 -7
  103. package/dist/components/popover/index.js.map +1 -1
  104. package/dist/components/product-icon/index.d.ts +1 -1
  105. package/dist/components/product-icon/index.js +1 -1
  106. package/dist/components/progress-indicator/index.d.ts +1 -1
  107. package/dist/components/progress-indicator/index.js +2 -2
  108. package/dist/components/radio-group/index.js +14 -13
  109. package/dist/components/radio-group/index.js.map +1 -1
  110. package/dist/components/range-calendar/index.js +3 -3
  111. package/dist/components/search-field/index.js +6 -6
  112. package/dist/components/search-field/index.js.map +1 -1
  113. package/dist/components/search-view/index.d.ts +1 -1
  114. package/dist/components/search-view/index.js +2 -2
  115. package/dist/components/segmented-button/index.d.ts +1 -1
  116. package/dist/components/segmented-button/index.js +3 -3
  117. package/dist/components/select/index.d.ts +1 -1
  118. package/dist/components/select/index.js +8 -4
  119. package/dist/components/select/index.js.map +1 -1
  120. package/dist/components/separator/index.js +3 -3
  121. package/dist/components/sheet/index.js +4 -4
  122. package/dist/components/sheet/index.js.map +1 -1
  123. package/dist/components/slider/index.js +4 -4
  124. package/dist/components/slider/index.js.map +1 -1
  125. package/dist/components/snackbar/index.js +6 -6
  126. package/dist/components/snackbar/index.js.map +1 -1
  127. package/dist/components/split-button/index.d.ts +1 -1
  128. package/dist/components/split-button/index.js +56 -44
  129. package/dist/components/split-button/index.js.map +1 -1
  130. package/dist/components/stack/index.js +2 -2
  131. package/dist/components/supporting-pane/index.d.ts +1 -1
  132. package/dist/components/supporting-pane/index.js +1 -1
  133. package/dist/components/switch/index.d.ts +1 -1
  134. package/dist/components/switch/index.js +3 -3
  135. package/dist/components/table/index.js +61 -48
  136. package/dist/components/table/index.js.map +1 -1
  137. package/dist/components/tabs/index.js +84 -33
  138. package/dist/components/tabs/index.js.map +1 -1
  139. package/dist/components/tag/index.js +1 -1
  140. package/dist/components/text/index.js +1 -1
  141. package/dist/components/text-area/index.d.ts +1 -1
  142. package/dist/components/text-area/index.js +2 -2
  143. package/dist/components/text-field/index.d.ts +1 -1
  144. package/dist/components/text-field/index.js +2 -2
  145. package/dist/components/time-field/index.d.ts +1 -1
  146. package/dist/components/time-field/index.js +2 -2
  147. package/dist/components/time-picker/index.d.ts +1 -1
  148. package/dist/components/time-picker/index.js +9 -9
  149. package/dist/components/time-picker/index.js.map +1 -1
  150. package/dist/components/token-field/index.d.ts +1 -1
  151. package/dist/components/token-field/index.js +3 -3
  152. package/dist/components/toolbar/index.js +3 -3
  153. package/dist/components/tooltip/index.d.ts +1 -1
  154. package/dist/components/tooltip/index.js +2 -2
  155. package/dist/components/tree/index.js +81 -24
  156. package/dist/components/tree/index.js.map +1 -1
  157. package/dist/control/index.js +2 -2
  158. package/dist/drag/hooks.js +2 -2
  159. package/dist/drag/index.js +2 -2
  160. package/dist/field/index.js +106 -107
  161. package/dist/field/index.js.map +1 -1
  162. package/dist/field/styles.js +1 -1
  163. package/dist/field/styles.js.map +1 -1
  164. package/dist/glyphs/index.js +1 -1
  165. package/dist/hooks/useClippedTitle.js +1 -1
  166. package/dist/hooks/useEnlargedText.js +1 -1
  167. package/dist/hooks/useRipple.js +2 -2
  168. package/dist/hooks/useScrollEdges.js +73 -0
  169. package/dist/hooks/useScrollEdges.js.map +1 -0
  170. package/dist/i18n/index.js +2 -2
  171. package/dist/index.js +1 -1
  172. package/dist/indicator/index.js +2 -2
  173. package/dist/mark/index.js +2 -2
  174. package/dist/navigation/index.js +3 -3
  175. package/dist/navigation/styles.js +5 -5
  176. package/dist/navigation/styles.js.map +1 -1
  177. package/dist/overlay/index.js +1 -1
  178. package/dist/render/useRender.js +1 -1
  179. package/dist/row/index.js +2 -2
  180. package/dist/row/styles.js +7 -7
  181. package/dist/row/styles.js.map +1 -1
  182. package/dist/segments/index.js +1 -1
  183. package/dist/segments/literal.js +3 -3
  184. package/dist/styles/color.js +16 -16
  185. package/dist/styles/color.js.map +1 -1
  186. package/dist/styles/focus.js +4 -4
  187. package/dist/styles/focus.js.map +1 -1
  188. package/dist/styles/overlay.js +3 -3
  189. package/dist/styles/overlay.js.map +1 -1
  190. package/dist/styles/scroll-fade.js +33 -0
  191. package/dist/styles/scroll-fade.js.map +1 -0
  192. package/dist/styles.css +61 -20
  193. package/dist/theme-scope.js +4 -4
  194. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","useContext","useRef","ComboBoxStateContext","ComboBox","RACComboBox","fieldStyles","invalidFrom","useFieldValidationBehavior","focus","mergeStatefulStyles","overlay","popupOrigin","TOGGLE","styles","list","kWkggS","kaIpWk","kzqmXN","kskxy","ks0D6T","k7Eaqz","kORKVm","$$css","toggle","kGNEyG","kZKoxP","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kjj79g","kmVPX3","allowsEmptyCollection","container","description","error","floatingLabel","inputRef","label","leadingIcon","options","variant","ChosenValues","$","t0","Symbol","for","t1","t2","isDisabled","t3","t4","props","undefined","validationBehavior","boxRef","T0","t5","t6","root","t7","t8","isRequired","t9","selectionMode","t10","t11","t12","t13","listClassName","t14","ComboBoxBox","isInvalid","multiple","state","selectedItems","length","ComboToggle","ring","0","className","1","isOpen","popup","placement","RACComboBoxValue","ListBox","RACPopover","RACButton"],"sources":["../../../src/components/combo-box/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode, Ref, RefAttributes, RefObject } from 'react';\nimport type { PopoverRenderProps, ComboBoxProps as RACComboBoxProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useRef } from 'react';\nimport { ComboBoxStateContext, Button as RACButton, ComboBox as RACComboBox, ComboBoxValue as RACComboBoxValue, Popover as RACPopover } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldInput, FieldMessage, FieldValue } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { ChevronEndGlyph } from '../../glyphs';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing } from '../../tokens/design.tokens.stylex';\nimport ListBox from '../list-box';\n\n// The text fields page's autocomplete text field: a text field that filters a\n// list as it is typed. Everything above the list is the field chrome in\n// `src/field` — the same box, label, supporting line and error treatment\n// every other field draws — and the list is ListBox on the shared overlay\n// surface, positioned and sized against the box exactly as Select's is.\n//\n// It is Select's shape with two differences.\n//\n// The control is a real input, so the box is not a press target — typing has\n// to reach the input — and only the chevron at the end opens the list. That\n// is what the page draws too: an autocomplete text field is a text field,\n// with a button on it.\n//\n// And the field is an element tree rather than a function of React Aria's\n// render state, which every other component here writes. React Aria builds a\n// combo box's collection by walking its children for options, and a function\n// is opaque to that walk: with one, the collection is empty until the list\n// has been opened, so a `defaultSelectedKey` resolves to no text and the\n// field starts blank. What needed the render state — whether the list is\n// open — reads the combo box's own state from context instead.\n//\n// Two more things are this component's own.\n//\n// **Filtering is React Aria's, and stays theirs.** `defaultFilter` takes a\n// predicate, and the package re-exports `useFilter` for a locale-aware one;\n// `items` with `useAsyncList` is how a list that is fetched rather than\n// listed gets in. None of that is wrapped, because a combo box's whole job\n// is which options it shows and a wrapper would be a second place to decide\n// it.\n//\n// **A value that is not in the list is allowed or refused, not corrected.**\n// `allowsCustomValue` is React Aria's, and with it off the input reverts to\n// the last chosen option on blur rather than keeping text that means nothing.\n//\n// **A search that matches nothing keeps the list open, saying so.** React\n// Aria closes a list its filter has emptied unless `allowsEmptyCollection`\n// says otherwise, and with it closed the field held its text with no list\n// and no word about why — a list that broke and one with no matches looked\n// the same. So the default here is `true`, and the ListBox inside draws the\n// empty state every ListBox does, a muted \"No results\" row in the\n// I18nProvider's locale, as it does under an Autocomplete. `false` is the\n// call site's for a field that would rather close.\n//\n// Choosing more than one is `selectionMode=\"multiple\"`, which draws the\n// chosen options before the input on its line, through React Aria's\n// `ComboBoxValue`, with the label floated over them. For a field that draws\n// each of them as a removable chip, the coverage plan has TokenField.\n\n// Hoisted so it is not a new element on every render, which is what\n// react-perf's jsx-no-jsx-as-prop is after.\nconst TOGGLE = <ComboToggle />;\nconst styles = {\n list: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n kzqmXN: \"xlvufjm\",\n kskxy: \"xedcshv\",\n ks0D6T: \"x1x1rfll\",\n k7Eaqz: \"xeuugli\",\n kORKVm: \"x1odjw0f\",\n $$css: true\n },\n toggle: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xxk0z11\",\n kaIpWk: \"x16fbrrb\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kzqmXN: \"xvy4d1p\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\ntype ComboBoxProps<T extends object = object, M extends ComboBoxSelectionMode = 'single'> = {\n /**\n * Whether the list stays open when a search leaves nothing in it, showing\n * the ListBox's \"No results\" row, rather than closing.\n * @default true\n */\n allowsEmptyCollection?: boolean;\n /**\n * Where to portal the list. Defaults to the container of the `ThemeScope`\n * around it, which keeps the list 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 list\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\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. `false` keeps it small at the top in\n * every state.\n * @default true\n */\n floatingLabel?: boolean;\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 * What the field is for. Required rather than optional: a combo box with\n * no label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * An icon at the start of the box, before the label and the value: the\n * page's 24dp leading icon, in the muted role. An icon drawn in `em` takes\n * that size from the slot.\n */\n leadingIcon?: ReactNode;\n /**\n * The options. `ListBox.Item` for each, and `ListBox.Section` to group\n * them — the list inside is a ListBox, and takes everything one does. With\n * `items` or `defaultItems`, a function from an item to its option, which\n * React Aria calls for each item the list shows.\n */\n options?: ((item: T) => ReactElement) | ReactNode;\n /**\n * The filled box, or the outlined one, as the text fields page draws them.\n * @default 'filled'\n */\n variant?: FieldVariant;\n} & Omit<RACComboBoxProps<T, M>, 'allowsEmptyCollection' | 'children' | 'defaultSelectedKey' | 'isInvalid' | 'onSelectionChange' | 'selectedKey' | 'validationBehavior'>;\n\n// React Aria's combo box takes its own two-value selection mode rather than\n// the collection-wide one, which also has `none`; that type is local to its\n// module, so the two values are named again here.\ntype ComboBoxSelectionMode = 'multiple' | 'single';\n\n/**\n * The chosen options, drawn before the input on its line when more than one\n * may be chosen. The chrome's `FieldValue` is the styled element and React\n * Aria's `ComboBoxValue` sits inside it, as it does in Select.\n */\nfunction ChosenValues() {\n return <FieldValue>\n <RACComboBoxValue className=\"xb3r6kr xlyipyv xuxw1ft\" />\n </FieldValue>;\n}\n\n/**\n * A labelled text field that filters a list as it is typed. Its value is\n * React Aria's: pass `value` with `onChange` to control which option is\n * chosen, `inputValue` with `onInputChange` to control the text, or the\n * `default` forms of either to let it keep its own. React Aria's older\n * `selectedKey` names are deprecated and are left out of this component's\n * props rather than passed through.\n *\n * ```tsx\n * <ComboBox\n * label=\"Label\"\n * options={\n * <>\n * <ListBox.Item id=\"first\">First item</ListBox.Item>\n * <ListBox.Item id=\"second\">Second item</ListBox.Item>\n * </>\n * }\n * />\n * ```\n *\n * Filtering is React Aria's: `defaultFilter` takes a predicate, `useFilter`\n * is re-exported for a locale-aware one, and `items` with `useAsyncList`\n * feeds a list that is fetched rather than listed. `allowsCustomValue` lets\n * the field keep text that matches nothing. A search that matches nothing\n * keeps the list open on a \"No results\" row; `allowsEmptyCollection={false}`\n * closes it instead.\n *\n * The box, label, input, supporting line and error are the field chrome in\n * `src/field`, shared with every other field; the list is ListBox on the\n * overlay surface every anchored panel here draws.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions.\n */\nfunction ComboBox<T extends object = object, M extends ComboBoxSelectionMode = 'single'>({\n allowsEmptyCollection = true,\n container,\n description,\n error,\n floatingLabel = true,\n inputRef,\n isDisabled = false,\n label,\n leadingIcon,\n options,\n variant = 'filled',\n ...props\n}: ComboBoxProps<T, M> & RefAttributes<HTMLDivElement>) {\n const validationBehavior = useFieldValidationBehavior();\n // What the list is anchored to and takes its width from: the box, not the\n // button inside it, which is a 24dp icon.\n const boxRef = useRef<HTMLDivElement>(null);\n return <RACComboBox<T, M> allowsEmptyCollection={allowsEmptyCollection} isDisabled={isDisabled} isInvalid={invalidFrom(error)} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <ComboBoxBox boxRef={boxRef} floatingLabel={floatingLabel} inputRef={inputRef} isDisabled={isDisabled} isInvalid={invalidFrom(error)} isRequired={props.isRequired ?? false} label={label} leadingIcon={leadingIcon} multiple={props.selectionMode === 'multiple'} variant={variant} />\n <FieldMessage description={description} error={error} />\n <RACPopover className={listClassName} triggerRef={boxRef}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container}>\n <ListBox<T>>{options}</ListBox>\n </RACPopover>\n </RACComboBox>;\n}\n\n/**\n * The box and what it holds. Its own component so it can read React Aria's\n * state for what is chosen: with more than one option allowed, the input is\n * empty while options are chosen, so it cannot be what says the field holds\n * something. The box is told instead, and the label floats over the chosen\n * options rather than resting on them. Otherwise the box reads the input, as\n * it does for one option, which is what floats the label on typed text.\n */\nfunction ComboBoxBox({\n boxRef,\n floatingLabel,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n leadingIcon,\n multiple,\n variant\n}: {\n boxRef: RefObject<HTMLDivElement | null>;\n floatingLabel: boolean;\n inputRef: Ref<HTMLInputElement> | undefined;\n isDisabled: boolean;\n isInvalid: boolean | undefined;\n isRequired: boolean;\n label: string;\n leadingIcon: ReactNode;\n multiple: boolean;\n variant: FieldVariant;\n}) {\n const state = useContext(ComboBoxStateContext);\n const chosen = multiple && (state?.selectedItems.length ?? 0) > 0;\n return <FieldBox floatingLabel={floatingLabel}\n // React Aria's `TextField` hands its group the field's disabled and\n // invalid state through context; its `ComboBox` does not, so the box\n // is told outright or its label and its underline never turn.\n isDisabled={isDisabled} isInvalid={isInvalid} isPopulated={chosen ? true : undefined} isRequired={isRequired} label={label} leading={leadingIcon} ref={boxRef} trailing={TOGGLE} variant={variant}>\n {multiple ? <span className=\"xpr5407 xrvj5dj xuptkxw\">\n <ChosenValues />\n <FieldInput ref={inputRef} />\n </span> : <FieldInput ref={inputRef} />}\n </FieldBox>;\n}\n\n/**\n * The button that opens the list. It takes its press behaviour from the\n * combo box around it through React Aria's button context, and reads whether\n * the list is open from the combo box's state rather than from a render prop\n * — the whole field cannot be a render function, since React Aria builds its\n * collection by walking the children and a function is opaque to that walk.\n */\nfunction ComboToggle() {\n const state = useContext(ComboBoxStateContext);\n return <RACButton {...stylex.props(styles.toggle, focus.ring)}>\n <ChevronEndGlyph {...{\n 0: {\n className: \"x12w9bfk xxk0z11 xvy4d1p x1iffjtl xkzkux9 x11xpdln xpc4ca7\"\n },\n 1: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xkzkux9 x11xpdln xpc4ca7 x9tu13d\"\n }\n }[!!(state?.isOpen === true) << 0]} />\n </RACButton>;\n}\n\n// The list's classes, from React Aria's render state: it grows from the\n// edge it is anchored by, as every anchored overlay does, so a list that\n// opens above the field grows upward.\nfunction listClassName(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.list, popupOrigin(state.placement)).className ?? '';\n}\nexport type { ComboBoxProps, ComboBoxSelectionMode };\nexport default ComboBox;"],"mappings":";;;;;;;;;;;;;;AAoEA,MAAMc,SAAS,oBAAC,aAAD,CAAY,CAAA;AAC3B,MAAMC,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNC,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRV,OAAO;CACT;AACF;;;;;;AA8EA,SAAAqB,eAAA;CAAA,MAAAC,IAAA9C,EAAA,CAAA;CAAA,IAAA+C;CAAA,IAAAD,EAAA,OAAAE,OA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AAC,EAAE2B,OAAKQ,WAAa,SAAS;CAAE,IAAAhC;CAAA,IAAAP,EAAA,OAAAK,IAAA;EAR7BE,KAAA,oBAACsC,QAAD;GAAU,GAAK5C;GAClB,UAAA,oBAAC,iBAAD,EAAgB,GAAKI,GAOW,CAAA;EARnB,CAAA;EASHL,EAAA,KAAAK;EAAAL,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OATPO;AASO;AAMhB,SAASmB,cAAcK,OAA2B;CAChD,OAAO5E,MAAaW,QAAQ0E,OAAOvE,OAAOC,MAAMH,YAAYgE,MAAMU,SAAS,CAAC,CAAC,CAACJ,aAAa;AAC7F"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useContext","useRef","ComboBoxStateContext","ComboBox","RACComboBox","fieldStyles","invalidFrom","useFieldValidationBehavior","focus","mergeStatefulStyles","overlay","popupOrigin","TOGGLE","styles","list","kWkggS","kaIpWk","kzqmXN","kskxy","ks0D6T","k7Eaqz","kORKVm","$$css","toggle","kGNEyG","kZKoxP","kMzoRj","kB7OPa","kMwMTN","kkrTdU","k1xSpc","kjj79g","kmVPX3","allowsEmptyCollection","container","description","error","floatingLabel","inputRef","label","leadingIcon","options","variant","ChosenValues","$","t0","Symbol","for","t1","t2","isDisabled","t3","t4","props","undefined","validationBehavior","boxRef","T0","t5","t6","root","t7","t8","isRequired","t9","selectionMode","t10","t11","t12","t13","listClassName","t14","ComboBoxBox","isInvalid","multiple","state","selectedItems","length","ComboToggle","ring","0","className","1","isOpen","popup","placement","RACComboBoxValue","ListBox","RACPopover","RACButton"],"sources":["../../../src/components/combo-box/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactElement, ReactNode, Ref, RefAttributes, RefObject } from 'react';\nimport type { PopoverRenderProps, ComboBoxProps as RACComboBoxProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useContext, useRef } from 'react';\nimport { ComboBoxStateContext, Button as RACButton, ComboBox as RACComboBox, ComboBoxValue as RACComboBoxValue, Popover as RACPopover } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { OptionRowContext } from '../../collection/context';\nimport { FieldBox, FieldInput, FieldMessage, FieldValue } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { ChevronEndGlyph } from '../../glyphs';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing } from '../../tokens/design.tokens.stylex';\nimport ListBox from '../list-box';\n\n// The text fields page's autocomplete text field: a text field that filters a\n// list as it is typed. Everything above the list is the field chrome in\n// `src/field` — the same box, label, supporting line and error treatment\n// every other field draws — and the list is ListBox on the shared overlay\n// surface, positioned and sized against the box exactly as Select's is, and\n// drawn as Select's is: its options are the menus page's rows, through\n// `OptionRowContext`.\n//\n// It is Select's shape with two differences.\n//\n// The control is a real input, so the box is not a press target — typing has\n// to reach the input — and only the chevron at the end opens the list. That\n// is what the page draws too: an autocomplete text field is a text field,\n// with a button on it.\n//\n// And the field is an element tree rather than a function of React Aria's\n// render state, which every other component here writes. React Aria builds a\n// combo box's collection by walking its children for options, and a function\n// is opaque to that walk: with one, the collection is empty until the list\n// has been opened, so a `defaultSelectedKey` resolves to no text and the\n// field starts blank. What needed the render state — whether the list is\n// open — reads the combo box's own state from context instead.\n//\n// Two more things are this component's own.\n//\n// **Filtering is React Aria's, and stays theirs.** `defaultFilter` takes a\n// predicate, and the package re-exports `useFilter` for a locale-aware one;\n// `items` with `useAsyncList` is how a list that is fetched rather than\n// listed gets in. None of that is wrapped, because a combo box's whole job\n// is which options it shows and a wrapper would be a second place to decide\n// it.\n//\n// **A value that is not in the list is allowed or refused, not corrected.**\n// `allowsCustomValue` is React Aria's, and with it off the input reverts to\n// the last chosen option on blur rather than keeping text that means nothing.\n//\n// **A search that matches nothing keeps the list open, saying so.** React\n// Aria closes a list its filter has emptied unless `allowsEmptyCollection`\n// says otherwise, and with it closed the field held its text with no list\n// and no word about why — a list that broke and one with no matches looked\n// the same. So the default here is `true`, and the ListBox inside draws the\n// empty state every ListBox does, a muted \"No results\" row in the\n// I18nProvider's locale, as it does under an Autocomplete. `false` is the\n// call site's for a field that would rather close.\n//\n// Choosing more than one is `selectionMode=\"multiple\"`, which draws the\n// chosen options before the input on its line, through React Aria's\n// `ComboBoxValue`, with the label floated over them. For a field that draws\n// each of them as a removable chip, the coverage plan has TokenField.\n\n// Hoisted so it is not a new element on every render, which is what\n// react-perf's jsx-no-jsx-as-prop is after.\nconst TOGGLE = <ComboToggle />;\nconst styles = {\n list: {\n kWkggS: \"x1vnz5z6\",\n kaIpWk: \"x1tfhd1\",\n kzqmXN: \"xlvufjm\",\n kskxy: \"xedcshv\",\n ks0D6T: \"x1x1rfll\",\n k7Eaqz: \"xeuugli\",\n kORKVm: \"x1odjw0f\",\n $$css: true\n },\n toggle: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kZKoxP: \"xxk0z11\",\n kaIpWk: \"x16fbrrb\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1heor9g\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kzqmXN: \"xvy4d1p\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1717udv\",\n $$css: true\n }\n};\ntype ComboBoxProps<T extends object = object, M extends ComboBoxSelectionMode = 'single'> = {\n /**\n * Whether the list stays open when a search leaves nothing in it, showing\n * the ListBox's \"No results\" row, rather than closing.\n * @default true\n */\n allowsEmptyCollection?: boolean;\n /**\n * Where to portal the list. Defaults to the container of the `ThemeScope`\n * around it, which keeps the list 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 list\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\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. `false` keeps it small at the top in\n * every state.\n * @default true\n */\n floatingLabel?: boolean;\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 * What the field is for. Required rather than optional: a combo box with\n * no label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * An icon at the start of the box, before the label and the value: the\n * page's 24dp leading icon, in the muted role. An icon drawn in `em` takes\n * that size from the slot.\n */\n leadingIcon?: ReactNode;\n /**\n * The options. `ListBox.Item` for each, and `ListBox.Section` to group\n * them — the list inside is a ListBox, and takes everything one does. With\n * `items` or `defaultItems`, a function from an item to its option, which\n * React Aria calls for each item the list shows.\n */\n options?: ((item: T) => ReactElement) | ReactNode;\n /**\n * The filled box, or the outlined one, as the text fields page draws them.\n * @default 'filled'\n */\n variant?: FieldVariant;\n} & Omit<RACComboBoxProps<T, M>, 'allowsEmptyCollection' | 'children' | 'defaultSelectedKey' | 'isInvalid' | 'onSelectionChange' | 'selectedKey' | 'validationBehavior'>;\n\n// React Aria's combo box takes its own two-value selection mode rather than\n// the collection-wide one, which also has `none`; that type is local to its\n// module, so the two values are named again here.\ntype ComboBoxSelectionMode = 'multiple' | 'single';\n\n/**\n * The chosen options, drawn before the input on its line when more than one\n * may be chosen. The chrome's `FieldValue` is the styled element and React\n * Aria's `ComboBoxValue` sits inside it, as it does in Select.\n */\nfunction ChosenValues() {\n return <FieldValue>\n <RACComboBoxValue className=\"xb3r6kr xlyipyv xuxw1ft\" />\n </FieldValue>;\n}\n\n/**\n * A labelled text field that filters a list as it is typed. Its value is\n * React Aria's: pass `value` with `onChange` to control which option is\n * chosen, `inputValue` with `onInputChange` to control the text, or the\n * `default` forms of either to let it keep its own. React Aria's older\n * `selectedKey` names are deprecated and are left out of this component's\n * props rather than passed through.\n *\n * ```tsx\n * <ComboBox\n * label=\"Label\"\n * options={\n * <>\n * <ListBox.Item id=\"first\">First item</ListBox.Item>\n * <ListBox.Item id=\"second\">Second item</ListBox.Item>\n * </>\n * }\n * />\n * ```\n *\n * Filtering is React Aria's: `defaultFilter` takes a predicate, `useFilter`\n * is re-exported for a locale-aware one, and `items` with `useAsyncList`\n * feeds a list that is fetched rather than listed. `allowsCustomValue` lets\n * the field keep text that matches nothing. A search that matches nothing\n * keeps the list open on a \"No results\" row; `allowsEmptyCollection={false}`\n * closes it instead.\n *\n * The box, label, input, supporting line and error are the field chrome in\n * `src/field`, shared with every other field; the list is ListBox on the\n * overlay surface every anchored panel here draws.\n *\n * The call site's `className` and `style` land on the field as a whole,\n * which is the element a layout positions.\n */\nfunction ComboBox<T extends object = object, M extends ComboBoxSelectionMode = 'single'>({\n allowsEmptyCollection = true,\n container,\n description,\n error,\n floatingLabel = true,\n inputRef,\n isDisabled = false,\n label,\n leadingIcon,\n options,\n variant = 'filled',\n ...props\n}: ComboBoxProps<T, M> & RefAttributes<HTMLDivElement>) {\n const validationBehavior = useFieldValidationBehavior();\n // What the list is anchored to and takes its width from: the box, not the\n // button inside it, which is a 24dp icon.\n const boxRef = useRef<HTMLDivElement>(null);\n return <RACComboBox<T, M> allowsEmptyCollection={allowsEmptyCollection} isDisabled={isDisabled} isInvalid={invalidFrom(error)} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <ComboBoxBox boxRef={boxRef} floatingLabel={floatingLabel} inputRef={inputRef} isDisabled={isDisabled} isInvalid={invalidFrom(error)} isRequired={props.isRequired ?? false} label={label} leadingIcon={leadingIcon} multiple={props.selectionMode === 'multiple'} variant={variant} />\n <FieldMessage description={description} error={error} />\n <RACPopover className={listClassName} triggerRef={boxRef}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container}>\n <OptionRowContext value=\"menu\">\n <ListBox<T>>{options}</ListBox>\n </OptionRowContext>\n </RACPopover>\n </RACComboBox>;\n}\n\n/**\n * The box and what it holds. Its own component so it can read React Aria's\n * state for what is chosen: with more than one option allowed, the input is\n * empty while options are chosen, so it cannot be what says the field holds\n * something. The box is told instead, and the label floats over the chosen\n * options rather than resting on them. Otherwise the box reads the input, as\n * it does for one option, which is what floats the label on typed text.\n */\nfunction ComboBoxBox({\n boxRef,\n floatingLabel,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n leadingIcon,\n multiple,\n variant\n}: {\n boxRef: RefObject<HTMLDivElement | null>;\n floatingLabel: boolean;\n inputRef: Ref<HTMLInputElement> | undefined;\n isDisabled: boolean;\n isInvalid: boolean | undefined;\n isRequired: boolean;\n label: string;\n leadingIcon: ReactNode;\n multiple: boolean;\n variant: FieldVariant;\n}) {\n const state = useContext(ComboBoxStateContext);\n const chosen = multiple && (state?.selectedItems.length ?? 0) > 0;\n return <FieldBox floatingLabel={floatingLabel}\n // React Aria's `TextField` hands its group the field's disabled and\n // invalid state through context; its `ComboBox` does not, so the box\n // is told outright or its label and its underline never turn.\n isDisabled={isDisabled} isInvalid={isInvalid} isPopulated={chosen ? true : undefined} isRequired={isRequired} label={label} leading={leadingIcon} ref={boxRef} trailing={TOGGLE} variant={variant}>\n {multiple ? <span className=\"xpr5407 xrvj5dj xuptkxw\">\n <ChosenValues />\n <FieldInput ref={inputRef} />\n </span> : <FieldInput ref={inputRef} />}\n </FieldBox>;\n}\n\n/**\n * The button that opens the list. It takes its press behaviour from the\n * combo box around it through React Aria's button context, and reads whether\n * the list is open from the combo box's state rather than from a render prop\n * — the whole field cannot be a render function, since React Aria builds its\n * collection by walking the children and a function is opaque to that walk.\n */\nfunction ComboToggle() {\n const state = useContext(ComboBoxStateContext);\n return <RACButton {...stylex.props(styles.toggle, focus.ring)}>\n <ChevronEndGlyph {...{\n 0: {\n className: \"x12w9bfk xxk0z11 xvy4d1p x1iffjtl xkzkux9 x11xpdln xpc4ca7\"\n },\n 1: {\n className: \"x12w9bfk xxk0z11 xvy4d1p xkzkux9 x11xpdln xpc4ca7 x9tu13d\"\n }\n }[!!(state?.isOpen === true) << 0]} />\n </RACButton>;\n}\n\n// The list's classes, from React Aria's render state: it grows from the\n// edge it is anchored by, as every anchored overlay does, so a list that\n// opens above the field grows upward.\nfunction listClassName(state: PopoverRenderProps) {\n return stylex.props(overlay.popup, styles.list, popupOrigin(state.placement)).className ?? '';\n}\nexport type { ComboBoxProps, ComboBoxSelectionMode };\nexport default ComboBox;"],"mappings":";;;;;;;;;;;;;;;AAuEA,MAAMc,SAAS,oBAAC,aAAD,CAAY,CAAA;AAC3B,MAAMC,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;EACPC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,QAAQ;EACNC,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRT,QAAQ;EACRU,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRb,QAAQ;EACRc,QAAQ;EACRC,QAAQ;EACRV,OAAO;CACT;AACF;;;;;;AA8EA,SAAAqB,eAAA;CAAA,MAAAC,IAAA9C,EAAA,CAAA;CAAA,IAAA+C;CAAA,IAAAD,EAAA,OAAAE,OAAAC,IAAA,2BAAA,GAAA;EACSF,KAAA,oBAAC,YAAD,EAAA,UACH,oBAACyC,eAAD,EAA4B,WAAA,0BAAyB,CAAA,EADvC,CAAA;EAEH1C,EAAA,KAAAC;CAAA,OAAAA,KAAAD,EAAA;CAAA,OAFRC;AAEQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCjB,SAAA1C,SA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,EAAA,KAAAK;EAAAL,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,OATPO;AASO;AAMhB,SAASmB,cAAcK,OAA2B;CAChD,OAAO5E,MAAaW,QAAQ0E,OAAOvE,OAAOC,MAAMH,YAAYgE,MAAMU,SAAS,CAAC,CAAC,CAACJ,aAAa;AAC7F"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
3
4
  import { useRender } from "../../render/useRender.js";
4
5
  import { mergeStyles } from "../../styles/merge.js";
5
- import { c } from "react/compiler-runtime";
6
6
  // src/components/container/index.tsx
7
7
  const DEFAULT_MAX_INLINE_SIZE = "960px";
8
8
  const _temp = {
@@ -1,9 +1,9 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { useEffect, useId, useRef, useState } from "react";
2
4
  import { useMessages } from "../../i18n/index.js";
3
5
  import { mergeStyles } from "../../styles/merge.js";
4
6
  import Button from "../button/index.js";
5
- import { c } from "react/compiler-runtime";
6
- import { useEffect, useId, useRef, useState } from "react";
7
7
  import { jsx, jsxs } from "react/jsx-runtime";
8
8
  // src/components/copy-field/index.tsx
9
9
  const COPIED_RESET_MS = 2e3;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { isRTL } from "react-aria";
5
+ import { useLocale } from "react-aria-components";
3
6
  import { useRender } from "../../render/useRender.js";
4
7
  import { mergeStyles } from "../../styles/merge.js";
5
- import { c } from "react/compiler-runtime";
6
- import { useLocale } from "react-aria-components";
7
- import { isRTL } from "react-aria";
8
8
  // src/components/currency/index.tsx
9
9
  const styles = { base: {
10
10
  kB7OPa: "x9f619",
@@ -1,6 +1,6 @@
1
- import { FieldVariant } from "../../field/index.js";
2
1
  import { ReactNode, RefAttributes } from "react";
3
2
  import { DateFieldProps as DateFieldProps$1, DateValue } from "react-aria-components";
3
+ import { FieldVariant } from "../../field/index.js";
4
4
  type DateFieldProps<T extends DateValue = DateValue> = Omit<DateFieldProps$1<T>, 'children' | 'className' | 'style'> & {
5
5
  /** A function may compute the class from the field's render state. */
6
6
  className?: DateFieldProps$1<T>['className'];
@@ -1,13 +1,13 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { DateField as DateField$1, DateInput } from "react-aria-components";
3
5
  import { FieldBox, FieldMessage, FieldSegments } from "../../field/index.js";
4
6
  import { fieldStyles, invalidFrom, useFieldValidationBehavior } from "../../field/root.js";
5
7
  import { renderSegment } from "../../segments/index.js";
6
8
  import { segmentStyles } from "../../segments/styles.js";
7
9
  import { mergeStatefulStyles } from "../../styles/merge.js";
8
- import { c } from "react/compiler-runtime";
9
10
  import { jsx, jsxs } from "react/jsx-runtime";
10
- import { DateField as DateField$1, DateInput } from "react-aria-components";
11
11
  // src/components/date-field/index.tsx
12
12
  /**
13
13
  * A date typed rather than picked: one segment per part, each its own focus
@@ -1,7 +1,7 @@
1
- import { FieldVariant } from "../../field/index.js";
1
+ import { DateDuration } from "@internationalized/date";
2
2
  import { ReactNode, RefAttributes } from "react";
3
3
  import { DatePickerProps as DatePickerProps$1, DateValue } from "react-aria-components";
4
- import { DateDuration } from "@internationalized/date";
4
+ import { FieldVariant } from "../../field/index.js";
5
5
  type DatePickerProps<T extends DateValue = DateValue> = Omit<DatePickerProps$1<T>, 'children' | 'className' | 'style'> & {
6
6
  /**
7
7
  * What the modal's dismissing action says. Left out, it is the word for
@@ -1,5 +1,10 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { toCalendarDate } from "@internationalized/date";
2
4
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
5
+ import { useContext, useRef, useState } from "react";
6
+ import { useDateFormatter } from "react-aria";
7
+ import { Button, CalendarContext, DateInput, DatePicker as DatePicker$1, DatePickerStateContext, Dialog, Group, Popover, useSlottedContext } from "react-aria-components";
3
8
  import { FieldBox, FieldMessage, FieldSegments } from "../../field/index.js";
4
9
  import { fieldStyles, invalidFrom, useFieldValidationBehavior } from "../../field/root.js";
5
10
  import { CalendarGlyph } from "../../glyphs/index.js";
@@ -13,12 +18,7 @@ import { overlay } from "../../styles/overlay.js";
13
18
  import { datePopoverClassName, picker, triggerClassName } from "../../styles/picker.js";
14
19
  import Button$1 from "../button/index.js";
15
20
  import Calendar$1 from "../calendar/index.js";
16
- import { c } from "react/compiler-runtime";
17
- import { useContext, useRef, useState } from "react";
18
21
  import { jsx, jsxs } from "react/jsx-runtime";
19
- import { Button, CalendarContext, DateInput, DatePicker as DatePicker$1, DatePickerStateContext, Dialog, Group, Popover, useSlottedContext } from "react-aria-components";
20
- import { toCalendarDate } from "@internationalized/date";
21
- import { useDateFormatter } from "react-aria";
22
22
  // src/components/date-picker/index.tsx
23
23
  function calendarTrigger(triggerLabel) {
24
24
  return /* @__PURE__ */ jsx(Button, {
@@ -1,7 +1,7 @@
1
- import { FieldVariant } from "../../field/index.js";
1
+ import { DateDuration } from "@internationalized/date";
2
2
  import { ReactNode, RefAttributes } from "react";
3
3
  import { DateRangePickerProps as DateRangePickerProps$1, DateValue } from "react-aria-components";
4
- import { DateDuration } from "@internationalized/date";
4
+ import { FieldVariant } from "../../field/index.js";
5
5
  type DateRangePickerProps<T extends DateValue = DateValue> = Omit<DateRangePickerProps$1<T>, 'children' | 'className' | 'style'> & {
6
6
  /** A function may compute the class from the picker's render state. */
7
7
  className?: DateRangePickerProps$1<T>['className'];
@@ -1,5 +1,8 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { useLayoutEffect, useState } from "react";
5
+ import { Button, DateInput, DateRangePicker as DateRangePicker$1, Dialog, Group, Popover } from "react-aria-components";
3
6
  import { FieldBox, FieldMessage, FieldSegments } from "../../field/index.js";
4
7
  import { fieldStyles, invalidFrom, useFieldValidationBehavior } from "../../field/root.js";
5
8
  import { CalendarGlyph } from "../../glyphs/index.js";
@@ -11,10 +14,7 @@ import { mergeStatefulStyles } from "../../styles/merge.js";
11
14
  import { overlay } from "../../styles/overlay.js";
12
15
  import { datePopoverClassName, picker, triggerClassName } from "../../styles/picker.js";
13
16
  import RangeCalendar$1 from "../range-calendar/index.js";
14
- import { c } from "react/compiler-runtime";
15
- import { useLayoutEffect, useState } from "react";
16
17
  import { jsx, jsxs } from "react/jsx-runtime";
17
- import { Button, DateInput, DateRangePicker as DateRangePicker$1, Dialog, Group, Popover } from "react-aria-components";
18
18
  // src/components/date-range-picker/index.tsx
19
19
  const styles = { groupWrapped: {
20
20
  kwnvtZ: "x1a02dak",
@@ -1,5 +1,9 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { createContext, useContext, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
5
+ import { Dialog as Dialog$1, DialogTrigger, Heading, HeadingContext, Modal, ModalOverlay, useSlottedContext } from "react-aria-components";
6
+ import { createPortal } from "react-dom";
3
7
  import { useHoldBottomEdge } from "../../hooks/useBottomEdge.js";
4
8
  import { useScrollStop } from "../../hooks/useScrollStop.js";
5
9
  import { OverlayScope } from "../../overlay/index.js";
@@ -7,11 +11,7 @@ import { mergeRefs } from "../../render/ref.js";
7
11
  import { mergeStatefulStyles, mergeStyles } from "../../styles/merge.js";
8
12
  import { overlay } from "../../styles/overlay.js";
9
13
  import { sizing, typography } from "../../tokens/design.tokens.stylex.js";
10
- import { c } from "react/compiler-runtime";
11
- import { createContext, useContext, useId, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
12
14
  import { jsx, jsxs } from "react/jsx-runtime";
13
- import { Dialog as Dialog$1, DialogTrigger, Heading, HeadingContext, Modal, ModalOverlay, useSlottedContext } from "react-aria-components";
14
- import { createPortal } from "react-dom";
15
15
  // src/components/dialog/index.tsx
16
16
  `${sizing.controlSm}${typography.headlineSmallLineHeight}`;
17
17
  const FULL_SCREEN = "(width < 600px)";
@@ -1,15 +1,15 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
5
+ import { Button, Disclosure as Disclosure$1, DisclosurePanel as DisclosurePanel$1, DisclosureStateContext, Heading } from "react-aria-components";
3
6
  import { ChevronEndGlyph } from "../../glyphs/index.js";
4
7
  import { useRipple } from "../../hooks/useRipple.js";
5
8
  import { RowContent } from "../../row/index.js";
6
9
  import { rowStyles } from "../../row/styles.js";
7
10
  import { mergeStatefulStyles } from "../../styles/merge.js";
8
11
  import { spacing } from "../../tokens/design.tokens.stylex.js";
9
- import { c } from "react/compiler-runtime";
10
- import { createContext, useContext, useLayoutEffect, useRef, useState } from "react";
11
12
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
12
- import { Button, Disclosure as Disclosure$1, DisclosurePanel as DisclosurePanel$1, DisclosureStateContext, Heading } from "react-aria-components";
13
13
  // src/components/disclosure/index.tsx
14
14
  const LeadingSlotContext = createContext(null);
15
15
  const insetStyles = { inner: (paddingInlineStart) => [paddingInlineStart !== void 0 && {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { mergeStatefulStyles } from "../../styles/merge.js";
3
- import Separator$1 from "../separator/index.js";
4
2
  import { c } from "react/compiler-runtime";
5
3
  import { Children, Fragment, isValidElement } from "react";
6
- import { jsx, jsxs } from "react/jsx-runtime";
7
4
  import { DisclosureGroup as DisclosureGroup$1 } from "react-aria-components";
5
+ import { mergeStatefulStyles } from "../../styles/merge.js";
6
+ import Separator$1 from "../separator/index.js";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
8
  // src/components/disclosure-group/index.tsx
9
9
  /**
10
10
  * A stack of `Disclosure` sections that agree about what is open. Which are
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { DropZone as DropZone$1, FileTrigger as FileTrigger$1 } from "react-aria-components";
3
5
  import { mergeStatefulStyles } from "../../styles/merge.js";
4
6
  import { dropZoneStyles, rootStyles } from "./styles.js";
5
- import { c } from "react/compiler-runtime";
6
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
- import { DropZone as DropZone$1, FileTrigger as FileTrigger$1 } from "react-aria-components";
8
8
  // src/components/drop-zone/index.tsx
9
9
  function content(children, label, isDisabled) {
10
10
  return /* @__PURE__ */ jsxs(Fragment, { children: [label === void 0 ? null : /* @__PURE__ */ jsx("p", {
@@ -30,10 +30,10 @@ const dropZoneStyles = {
30
30
  kOIVth: "x1gka490",
31
31
  kjj79g: "xl56j7k",
32
32
  kAzted: "x1db3i3o",
33
- kjBf7l: "xrgy624",
34
- kInvED: "x2ssjo2",
33
+ kjBf7l: "xat36cu",
34
+ kInvED: "x1v57pqu",
35
35
  k3XXqK: "x1t137rt",
36
- kMeerF: "x1de99jn",
36
+ kMeerF: "x1s780dp",
37
37
  kmVPX3: "x1apw6a7",
38
38
  kIyJzY: "xkzkux9",
39
39
  k1ekBW: "xts7igz",
@@ -61,14 +61,14 @@ const dropZoneStyles = {
61
61
  };
62
62
  function rootStyles(state) {
63
63
  return {
64
- 0: { className: "x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7" },
65
- 4: { className: "x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59" },
66
- 2: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xp89om9 x1uajy3w x1y0btm7 xscdzaa" },
67
- 6: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 xp89om9 x1uajy3w x1y0btm7 xscdzaa" },
68
- 1: { className: "x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" },
69
- 5: { className: "x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" },
70
- 3: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" },
71
- 7: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" }
64
+ 0: { className: "x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7" },
65
+ 4: { className: "x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59" },
66
+ 2: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xp89om9 x1uajy3w x1y0btm7 xscdzaa" },
67
+ 6: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 xp89om9 x1uajy3w x1y0btm7 xscdzaa" },
68
+ 1: { className: "x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" },
69
+ 5: { className: "x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" },
70
+ 3: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" },
71
+ 7: { className: "x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc" }
72
72
  }[!!state.isFocusVisible << 2 | !!state.isDropTarget << 1 | !!state.isDisabled << 0];
73
73
  }
74
74
  export { dropZoneStyles, rootStyles };
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["dropZoneStyles","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kogj98","k9WMMc","$$css","labelDisabled","root","k6CgDc","kGNEyG","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kB7OPa","k1xSpc","kXwgrk","kOIVth","kjj79g","kAzted","kjBf7l","kInvED","k3XXqK","kMeerF","kmVPX3","kIyJzY","k1ekBW","kAMwcw","rootDisabled","kkrTdU","rootFocused","rootOver","rootStyles","state","isDisabled","isDropTarget","isFocusVisible","className"],"sources":["../../../src/components/drop-zone/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// Apart from ./index.tsx so that file exports components alone, which is what\n// keeps fast refresh working for it — the same arrangement `src/row` uses.\n// `rootStyles` is here for a second reason: index.test.tsx applies it\n// directly, because React Aria enters `isDropTarget` only inside a real drag\n// session that a synthetic DragEvent does not start.\n\nconst dropZoneStyles = {\n label: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kogj98: \"x1ghz6dp\",\n k9WMMc: \"x2b8uid\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n root: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x14s9m32\",\n kVAM5u: \"x133yhug\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xbsl7fq\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x1gka490\",\n kjj79g: \"xl56j7k\",\n kAzted: \"x1db3i3o\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1apw6a7\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xts7igz\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n rootDisabled: {\n kWkggS: \"x14s9m32\",\n kVAM5u: \"x9wqfse\",\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n rootFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n rootOver: {\n kWkggS: \"xp89om9\",\n kVAM5u: \"x1uajy3w\",\n ksu8eU: \"x1y0btm7\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n }\n};\n\n// The target's own classes, from React Aria's render state. `disabled` is\n// applied last so it wins over the other two, and StyleX replaces a property\n// whole, so it takes their fill and their rule with it.\nfunction rootStyles(state: {\n isDisabled: boolean;\n isDropTarget: boolean;\n isFocusVisible: boolean;\n}) {\n return {\n 0: {\n className: \"x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7\"\n },\n 4: {\n className: \"x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59\"\n },\n 2: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xp89om9 x1uajy3w x1y0btm7 xscdzaa\"\n },\n 6: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 xp89om9 x1uajy3w x1y0btm7 xscdzaa\"\n },\n 1: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n },\n 5: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n },\n 3: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1t137rt x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n },\n 7: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xrgy624 x2ssjo2 x1de99jn x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n }\n }[!!state.isFocusVisible << 2 | !!state.isDropTarget << 1 | !!state.isDisabled << 0];\n}\nexport { dropZoneStyles, rootStyles };"],"mappings":";AAUA,MAAMA,iBAAiB;CACrBC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,eAAe;EACbT,QAAQ;EACRQ,OAAO;CACT;CACAE,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRlB,QAAQ;EACRmB,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;EACRvB,OAAO;CACT;CACAwB,cAAc;EACZnB,QAAQ;EACRC,QAAQ;EACRd,QAAQ;EACRiC,QAAQ;EACRzB,OAAO;CACT;CACA0B,aAAa;EACXR,QAAQ;EACRlB,OAAO;CACT;CACA2B,UAAU;EACRtB,QAAQ;EACRC,QAAQ;EACRE,QAAQ;EACRhB,QAAQ;EACRQ,OAAO;CACT;AACF;AAKA,SAAS4B,WAAWC,OAIjB;CACD,OAAO;EACL,GAAG,EACDI,WAAW,0LACb;EACA,GAAG,EACDA,WAAW,yLACb;EACA,GAAG,EACDA,WAAW,yLACb;EACA,GAAG,EACDA,WAAW,wLACb;EACA,GAAG,EACDA,WAAW,kMACb;EACA,GAAG,EACDA,WAAW,iMACb;EACA,GAAG,EACDA,WAAW,mMACb;EACA,GAAG,EACDA,WAAW,kMACb;CACF,EAAE,CAAC,CAACJ,MAAMG,kBAAkB,IAAI,CAAC,CAACH,MAAME,gBAAgB,IAAI,CAAC,CAACF,MAAMC,cAAc;AACpF"}
1
+ {"version":3,"file":"styles.js","names":["dropZoneStyles","label","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kogj98","k9WMMc","$$css","labelDisabled","root","k6CgDc","kGNEyG","kWkggS","kVAM5u","kaIpWk","ksu8eU","kMzoRj","kB7OPa","k1xSpc","kXwgrk","kOIVth","kjj79g","kAzted","kjBf7l","kInvED","k3XXqK","kMeerF","kmVPX3","kIyJzY","k1ekBW","kAMwcw","rootDisabled","kkrTdU","rootFocused","rootOver","rootStyles","state","isDisabled","isDropTarget","isFocusVisible","className"],"sources":["../../../src/components/drop-zone/styles.ts"],"sourcesContent":["import * as stylex from '@stylexjs/stylex';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// Apart from ./index.tsx so that file exports components alone, which is what\n// keeps fast refresh working for it — the same arrangement `src/row` uses.\n// `rootStyles` is here for a second reason: index.test.tsx applies it\n// directly, because React Aria enters `isDropTarget` only inside a real drag\n// session that a synthetic DragEvent does not start.\n\nconst dropZoneStyles = {\n label: {\n kMwMTN: \"x1w5n3ug\",\n kMv6JI: \"xpo2rfv\",\n kGuDYH: \"x193rfdd\",\n k63SB2: \"x1hews6w\",\n kb6lSQ: \"xn43zvd\",\n kLWn49: \"xv61bfh\",\n kogj98: \"x1ghz6dp\",\n k9WMMc: \"x2b8uid\",\n $$css: true\n },\n labelDisabled: {\n kMwMTN: \"x1xj74d8\",\n $$css: true\n },\n root: {\n k6CgDc: \"x12w9bfk\",\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x14s9m32\",\n kVAM5u: \"x133yhug\",\n kaIpWk: \"x62ce2h\",\n ksu8eU: \"xbsl7fq\",\n kMzoRj: \"xmkeg23\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x139gbkf\",\n k1xSpc: \"x78zum5\",\n kXwgrk: \"xdt5ytf\",\n kOIVth: \"x1gka490\",\n kjj79g: \"xl56j7k\",\n kAzted: \"x1db3i3o\",\n kjBf7l: \"xat36cu\",\n kInvED: \"x1v57pqu\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1s780dp\",\n kmVPX3: \"x1apw6a7\",\n kIyJzY: \"xkzkux9\",\n k1ekBW: \"xts7igz\",\n kAMwcw: \"xpc4ca7\",\n $$css: true\n },\n rootDisabled: {\n kWkggS: \"x14s9m32\",\n kVAM5u: \"x9wqfse\",\n kMwMTN: \"x1xj74d8\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n rootFocused: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n rootOver: {\n kWkggS: \"xp89om9\",\n kVAM5u: \"x1uajy3w\",\n ksu8eU: \"x1y0btm7\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n }\n};\n\n// The target's own classes, from React Aria's render state. `disabled` is\n// applied last so it wins over the other two, and StyleX replaces a property\n// whole, so it takes their fill and their rule with it.\nfunction rootStyles(state: {\n isDisabled: boolean;\n isDropTarget: boolean;\n isFocusVisible: boolean;\n}) {\n return {\n 0: {\n className: \"x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7\"\n },\n 4: {\n className: \"x12w9bfk x6s0dn4 x14s9m32 x133yhug x62ce2h xbsl7fq xmkeg23 x9f619 x139gbkf x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59\"\n },\n 2: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xp89om9 x1uajy3w x1y0btm7 xscdzaa\"\n },\n 6: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 xp89om9 x1uajy3w x1y0btm7 xscdzaa\"\n },\n 1: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n },\n 5: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xbsl7fq xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n },\n 3: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1t137rt x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n },\n 7: {\n className: \"x12w9bfk x6s0dn4 x62ce2h xmkeg23 x9f619 x78zum5 xdt5ytf x1gka490 xl56j7k x1db3i3o xat36cu x1v57pqu x1s780dp x1apw6a7 xkzkux9 xts7igz xpc4ca7 xaatb59 x1y0btm7 x14s9m32 x9wqfse x1xj74d8 x1h6gzvc\"\n }\n }[!!state.isFocusVisible << 2 | !!state.isDropTarget << 1 | !!state.isDisabled << 0];\n}\nexport { dropZoneStyles, rootStyles };"],"mappings":";AAUA,MAAMA,iBAAiB;CACrBC,OAAO;EACLC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,eAAe;EACbT,QAAQ;EACRQ,OAAO;CACT;CACAE,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRlB,QAAQ;EACRmB,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;EACRvB,OAAO;CACT;CACAwB,cAAc;EACZnB,QAAQ;EACRC,QAAQ;EACRd,QAAQ;EACRiC,QAAQ;EACRzB,OAAO;CACT;CACA0B,aAAa;EACXR,QAAQ;EACRlB,OAAO;CACT;CACA2B,UAAU;EACRtB,QAAQ;EACRC,QAAQ;EACRE,QAAQ;EACRhB,QAAQ;EACRQ,OAAO;CACT;AACF;AAKA,SAAS4B,WAAWC,OAIjB;CACD,OAAO;EACL,GAAG,EACDI,WAAW,2LACb;EACA,GAAG,EACDA,WAAW,0LACb;EACA,GAAG,EACDA,WAAW,0LACb;EACA,GAAG,EACDA,WAAW,yLACb;EACA,GAAG,EACDA,WAAW,mMACb;EACA,GAAG,EACDA,WAAW,kMACb;EACA,GAAG,EACDA,WAAW,oMACb;EACA,GAAG,EACDA,WAAW,mMACb;CACF,EAAE,CAAC,CAACJ,MAAMG,kBAAkB,IAAI,CAAC,CAACH,MAAME,gBAAgB,IAAI,CAAC,CAACF,MAAMC,cAAc;AACpF"}
@@ -1,6 +1,6 @@
1
- import { ButtonDOMProps, ButtonState } from "../../button/index.js";
2
1
  import { ReactNode, RefAttributes } from "react";
3
2
  import { ClassNameOrFunction, StyleOrFunction } from "react-aria-components";
3
+ import { ButtonDOMProps, ButtonState } from "../../button/index.js";
4
4
  type FabProps = {
5
5
  /**
6
6
  * What the FAB does, in words. A FAB without a `label` is an icon alone,
@@ -1,10 +1,10 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
3
4
  import { ButtonBase } from "../../button/index.js";
4
5
  import { extendedFabSizes, fabIconSizes, fabSizes, fabStyles, fabTones } from "../../fab/styles.js";
5
6
  import { useClippedTitle } from "../../hooks/useClippedTitle.js";
6
7
  import { focus } from "../../styles/focus.js";
7
- import { c } from "react/compiler-runtime";
8
8
  import { jsx, jsxs } from "react/jsx-runtime";
9
9
  // src/components/fab/index.tsx
10
10
  /**
@@ -1,7 +1,7 @@
1
- import { ButtonState } from "../../button/index.js";
2
- import { FabSize, FabTone } from "../fab/index.js";
3
1
  import { ReactNode, RefAttributes } from "react";
4
2
  import { ClassNameOrFunction, Key, MenuItemProps, MenuItemRenderProps, StyleOrFunction } from "react-aria-components";
3
+ import { ButtonState } from "../../button/index.js";
4
+ import { FabSize, FabTone } from "../fab/index.js";
5
5
  type FabMenuItemProps = Omit<MenuItemProps, 'children' | 'className' | 'style'> & {
6
6
  /** The action's name, drawn as its label. */
7
7
  children: ReactNode;
@@ -1,5 +1,8 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
4
+ import { createContext, useContext, useState } from "react";
5
+ import { Menu, MenuItem, MenuTrigger, Popover, Text } from "react-aria-components";
3
6
  import { ButtonBase } from "../../button/index.js";
4
7
  import { textOf } from "../../collection/text.js";
5
8
  import { fabIconSizes, fabSizes, fabStyles, fabTones } from "../../fab/styles.js";
@@ -7,10 +10,7 @@ import { CloseGlyph } from "../../glyphs/index.js";
7
10
  import { useRipple } from "../../hooks/useRipple.js";
8
11
  import { focus } from "../../styles/focus.js";
9
12
  import { mergeStatefulStyles } from "../../styles/merge.js";
10
- import { c } from "react/compiler-runtime";
11
- import { createContext, useContext, useState } from "react";
12
13
  import { jsx, jsxs } from "react/jsx-runtime";
13
- import { Menu, MenuItem, MenuTrigger, Popover, Text } from "react-aria-components";
14
14
  // src/components/fab-menu/index.tsx
15
15
  const styles = {
16
16
  closeButton: {
@@ -57,10 +57,10 @@ const styles = {
57
57
  $$css: true
58
58
  },
59
59
  itemFocused: {
60
- kjBf7l: "xrgy624 x1x84bn5",
60
+ kjBf7l: "xat36cu x1x84bn5",
61
61
  kInvED: "x1hl8ikr",
62
62
  k3XXqK: "xaatb59",
63
- kMeerF: "x1de99jn",
63
+ kMeerF: "x1s780dp",
64
64
  $$css: true
65
65
  },
66
66
  trigger: {
@@ -288,7 +288,7 @@ function itemClasses(tone) {
288
288
  return (state) => props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);
289
289
  }
290
290
  function triggerClasses(isOpen, size, tone) {
291
- return (state) => props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, !isOpen && state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);
291
+ return (state) => props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);
292
292
  }
293
293
  FabMenu.Item = FabMenuItem;
294
294
  export { FabMenuItem, FabMenu as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useState","RACMenuItem","textOf","fabIconSizes","fabSizes","fabStyles","fabTones","useRipple","focus","mergeStatefulStyles","styles","closeButton","kZKoxP","kaIpWk","kzqmXN","$$css","closeIcon","kGuDYH","item","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kMv6JI","k63SB2","kOIVth","kb6lSQ","kLWn49","kAzted","k7Eaqz","k3XXqK","kVQacm","kg3NbH","kVAEAm","khDVqt","itemDisabled","kWkggS","kMwMTN","itemFocused","kjBf7l","kInvED","kMeerF","trigger","kIyJzY","k1ekBW","kAMwcw","ToneContext","children","className","icon","style","container","defaultOpen","isOpen","onAction","onOpenChange","size","tone","FabMenu","t0","$","label","t1","ref","t2","t3","undefined","ownOpen","setOwnOpen","open","t4","next","changeOpen","t5","triggerClasses","t6","props","t7","t8","t9","t10","t11","t12","t13","FabMenuItem","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","ripple","T0","handlers","itemClasses","md","surface","state","tonal","isHovered","hovered","isFocused","focused","isFocusVisible","isPressed","pressed","isDisabled","base","ring","filled","disabled","Item","RACMenu","RACPopover","RACMenuTrigger"],"sources":["../../../src/components/fab-menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, Key, MenuItemRenderProps, MenuItemProps as RACMenuItemProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, Popover as RACPopover, Text } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { FabSize, FabTone } from '../fab';\nimport { ButtonBase } from '../../button';\nimport { textOf } from '../../collection/text';\nimport { fabIconSizes, fabSizes, fabStyles, fabTones } from '../../fab/styles';\nimport { CloseGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The FAB menu page's menu: a FAB that opens two to six related actions\n// floating above it, in place of a speed dial. Open, the FAB becomes the\n// menu's close button — the pages' 56dp circle in the tone itself, with a\n// 20dp close mark — and the actions stand in a column 8dp above it, lined up\n// on its trailing edge, each a 56dp pill on the tone's container pair with\n// 24dp at either end, a 24dp icon 8dp before a title-medium label, 4dp apart\n// and raised on the level 3 shadow. The values are the page's, read from\n// Material Design's own FAB menu tokens. The three tones are the page's three\n// colour sets: the close button takes the tone and the actions its\n// container, so the two contrast as the page draws them.\n//\n// The FAB is the menu's own rather than a child the call site places, as\n// Menu's trigger is, because what it draws depends on whether the menu is\n// open, and the menu is what knows. Closed, it is Fab at any of its sizes,\n// with Fab's styles; it shrinks to the close button's 56dp as the menu opens,\n// keeping the corner its layout anchors it by, and its corner rounds and its\n// colour deepens over the same medium duration. A reader who asks for\n// reduced motion gets the change at once.\n//\n// React Aria's `MenuTrigger`, `Menu` and `MenuItem` supply the behaviour: the\n// FAB's `aria-expanded`, the arrow keys between the actions, Escape and an\n// outside press to close, and focus returned to the FAB. The surface is\n// React Aria's `Popover` with nothing drawn on it, since each action is a\n// container of its own; it arrives over the overlay module's short duration,\n// as every popup does, and leaves at once, for the reason that module\n// gives.\n//\n// Under forced colours the shadows go and the containers are painted over,\n// so the FAB and each action are drawn as a 1px `ButtonText` rule.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The actions rise into place from just below where they settle.\nconst riseIn = \"x1uknk9t-B\";\nconst styles = {\n closeButton: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"x16rqkct\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n closeIcon: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n item: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k7Eaqz: \"x13ijof9\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xb3r6kr\",\n kg3NbH: \"xg0ps1x\",\n kVAEAm: \"x1n2onr6\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n itemDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n itemFocused: {\n kjBf7l: \"xrgy624 x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n trigger: {\n kIyJzY: \"xioksi3 x12w9bfk\",\n k1ekBW: \"x104ni8d\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n }\n};\n\n// What a tone draws its actions in: the container pair, as the close button\n// takes the tone itself.\nconst ToneContext = createContext<FabTone>('primary');\ntype FabMenuItemProps = Omit<RACMenuItemProps, 'children' | 'className' | 'style'> & {\n /** The action's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the action's render state. */\n className?: ClassNameOrFunction<MenuItemRenderProps>;\n /** An icon before the label, at the page's 24px. */\n icon?: ReactNode;\n /** A function may compute the style from the action's render state. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n};\ntype FabMenuProps = {\n /**\n * What the FAB does, in words: an icon alone has no name, and the menu\n * takes its name from the FAB that opens it.\n */\n 'aria-label': string;\n /** The actions, as `FabMenu.Item`s — the page asks for two to six. */\n children: ReactNode;\n /**\n * A function may compute the class from the FAB's render state. It lands\n * on the FAB, which is what a layout positions.\n */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Where the actions are portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or they render outside and keep the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** The FAB's icon while the menu is closed. */\n icon: ReactNode;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an action's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The FAB's size while the menu is closed, as Fab's: `md` 56px, `lg` 80px\n * or `xl` 96px. Open, it is the close button's 56px whatever it was.\n * @default 'md'\n */\n size?: FabSize;\n /** A function may compute the style from the FAB's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * The page's three colour sets: the close button takes the tone and the\n * actions its container pair.\n * @default 'primary'\n */\n tone?: FabTone;\n} & RefAttributes<HTMLButtonElement>;\n\n/**\n * A FAB that opens a column of related actions above it, and closes them\n * again. The actions are `FabMenu.Item`s.\n *\n * ```tsx\n * <FabMenu aria-label=\"Label\" icon={<PlusIcon />}>\n * <FabMenu.Item icon={<FirstIcon />} id=\"first\">\n * First item\n * </FabMenu.Item>\n * <FabMenu.Item icon={<SecondIcon />} id=\"second\">\n * Second item\n * </FabMenu.Item>\n * </FabMenu>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the FAB.\n */\nfunction FabMenu({\n 'aria-label': label,\n children,\n className,\n container,\n defaultOpen = false,\n icon,\n isOpen,\n onAction,\n onOpenChange,\n ref,\n size = 'md',\n style,\n tone = 'primary'\n}: FabMenuProps) {\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n return <ToneContext value={tone}>\n <RACMenuTrigger isOpen={open} onOpenChange={changeOpen}>\n <ButtonBase aria-label={label} classes={triggerClasses(open, size, tone)} className={className} ref={ref} style={style}>\n <span {...stylex.props(fabStyles.icon, open ? styles.closeIcon : fabIconSizes[size])}>\n {open ? <CloseGlyph className=\"xlzyvqe x15vhz18\" /> : icon}\n </span>\n </ButtonBase>\n <RACPopover offset={8} placement=\"top end\"\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} className=\"xvhm28k x1u6grsq xhpbw76 x16dv9tl x9f619 x1t137rt\">\n <RACMenu onAction={onAction} className=\"xuk3077 x9f619 x78zum5 xdt5ytf xzoy561 x1t137rt\">\n {children}\n </RACMenu>\n </RACPopover>\n </RACMenuTrigger>\n </ToneContext>;\n}\n\n/**\n * One action: a pill holding an icon and a label, on the menu's tone.\n * Choosing it closes the menu.\n */\nfunction FabMenuItem({\n children,\n icon,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n textValue,\n ...props\n}: FabMenuItemProps & RefAttributes<HTMLDivElement>) {\n const tone = useContext(ToneContext);\n // The press ripple Menu's items draw — see MenuItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(tone), props)}>\n {icon === undefined ? null : <span {...stylex.props(fabStyles.icon, fabIconSizes.md)}>{icon}</span>}\n <Text slot=\"label\">{children}</Text>\n {ripple.surface}\n </RACMenuItem>;\n}\n\n// An action's classes, from React Aria's render state: the tone's container\n// pair, and the layers over it. Built by a call rather than written inline at\n// the prop, which is what react-perf's no-new-function-as-prop is after.\nfunction itemClasses(tone: FabTone) {\n return (state: MenuItemRenderProps) => stylex.props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);\n}\n\n// The FAB's classes: Fab's own while the menu is closed, the close button's\n// while it is open. A press layer is drawn only while closed — React Aria\n// reports the FAB pressed for as long as its menu is open.\nfunction triggerClasses(isOpen: boolean, size: FabSize, tone: FabTone) {\n return (state: ButtonState) => stylex.props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, !isOpen && state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);\n}\nFabMenu.Item = FabMenuItem;\nexport type { FabMenuItemProps, FabMenuProps };\nexport { FabMenuItem };\nexport default FabMenu;"],"mappings":";;;;;;;;;;;;;;AAyDA,MAAMc,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRF,OAAO;CACT;CACAG,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRV,QAAQ;EACRW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AAU4C,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAczG,UAAU6G,QAAQ;AACvW;AACApD,QAAQqD,OAAO3B"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","createContext","useContext","useState","RACMenuItem","textOf","fabIconSizes","fabSizes","fabStyles","fabTones","useRipple","focus","mergeStatefulStyles","styles","closeButton","kZKoxP","kaIpWk","kzqmXN","$$css","closeIcon","kGuDYH","item","kGNEyG","kVAM5u","ksu8eU","kMzoRj","kGVxlE","kB7OPa","kkrTdU","k1xSpc","kMv6JI","k63SB2","kOIVth","kb6lSQ","kLWn49","kAzted","k7Eaqz","k3XXqK","kVQacm","kg3NbH","kVAEAm","khDVqt","itemDisabled","kWkggS","kMwMTN","itemFocused","kjBf7l","kInvED","kMeerF","trigger","kIyJzY","k1ekBW","kAMwcw","ToneContext","children","className","icon","style","container","defaultOpen","isOpen","onAction","onOpenChange","size","tone","FabMenu","t0","$","label","t1","ref","t2","t3","undefined","ownOpen","setOwnOpen","open","t4","next","changeOpen","t5","triggerClasses","t6","props","t7","t8","t9","t10","t11","t12","t13","FabMenuItem","onContextMenu","onPointerCancel","onPointerDown","onPointerLeave","onPointerUp","textValue","ripple","T0","handlers","itemClasses","md","surface","state","tonal","isHovered","hovered","isFocused","focused","isFocusVisible","isPressed","pressed","isDisabled","base","ring","filled","disabled","Item","RACMenu","RACPopover","RACMenuTrigger"],"sources":["../../../src/components/fab-menu/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, Key, MenuItemRenderProps, MenuItemProps as RACMenuItemProps, StyleOrFunction } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { createContext, useCallback, useContext, useState } from 'react';\nimport { Menu as RACMenu, MenuItem as RACMenuItem, MenuTrigger as RACMenuTrigger, Popover as RACPopover, Text } from 'react-aria-components';\nimport type { ButtonState } from '../../button';\nimport type { FabSize, FabTone } from '../fab';\nimport { ButtonBase } from '../../button';\nimport { textOf } from '../../collection/text';\nimport { fabIconSizes, fabSizes, fabStyles, fabTones } from '../../fab/styles';\nimport { CloseGlyph } from '../../glyphs';\nimport { useRipple } from '../../hooks/useRipple';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\n\n// The FAB menu page's menu: a FAB that opens two to six related actions\n// floating above it, in place of a speed dial. Open, the FAB becomes the\n// menu's close button — the pages' 56dp circle in the tone itself, with a\n// 20dp close mark — and the actions stand in a column 8dp above it, lined up\n// on its trailing edge, each a 56dp pill on the tone's container pair with\n// 24dp at either end, a 24dp icon 8dp before a title-medium label, 4dp apart\n// and raised on the level 3 shadow. The values are the page's, read from\n// Material Design's own FAB menu tokens. The three tones are the page's three\n// colour sets: the close button takes the tone and the actions its\n// container, so the two contrast as the page draws them.\n//\n// The FAB is the menu's own rather than a child the call site places, as\n// Menu's trigger is, because what it draws depends on whether the menu is\n// open, and the menu is what knows. Closed, it is Fab at any of its sizes,\n// with Fab's styles; it shrinks to the close button's 56dp as the menu opens,\n// keeping the corner its layout anchors it by, and its corner rounds and its\n// colour deepens over the same medium duration. A reader who asks for\n// reduced motion gets the change at once.\n//\n// React Aria's `MenuTrigger`, `Menu` and `MenuItem` supply the behaviour: the\n// FAB's `aria-expanded`, the arrow keys between the actions, Escape and an\n// outside press to close, and focus returned to the FAB. The surface is\n// React Aria's `Popover` with nothing drawn on it, since each action is a\n// container of its own; it arrives over the overlay module's short duration,\n// as every popup does, and leaves at once, for the reason that module\n// gives.\n//\n// Under forced colours the shadows go and the containers are painted over,\n// so the FAB and each action are drawn as a 1px `ButtonText` rule.\n\n// Windows High Contrast and the rest of the forced-colours modes. Spelled\n// here rather than imported, for the reason src/field/styles.ts records: the\n// StyleX compiler resolves a constant across files only out of a `.stylex.ts`\n// module, and the generated one holds design tokens rather than queries.\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The actions rise into place from just below where they settle.\nconst riseIn = \"x1uknk9t-B\";\nconst styles = {\n closeButton: {\n kZKoxP: \"xs1ryiz\",\n kaIpWk: \"x16rqkct\",\n kzqmXN: \"x1fh0d6s\",\n $$css: true\n },\n closeIcon: {\n kGuDYH: \"xwsyq91\",\n $$css: true\n },\n item: {\n kGNEyG: \"x6s0dn4\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1dkaolv\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kGVxlE: \"x1udv5rz\",\n kB7OPa: \"x9f619\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kOIVth: \"x126z3so\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kAzted: \"xdovgog\",\n k7Eaqz: \"x13ijof9\",\n k3XXqK: \"x1t137rt\",\n kVQacm: \"xb3r6kr\",\n kg3NbH: \"xg0ps1x\",\n kVAEAm: \"x1n2onr6\",\n khDVqt: \"xuxw1ft\",\n $$css: true\n },\n itemDisabled: {\n kWkggS: \"xepofeg\",\n kVAM5u: \"xmnqt3w\",\n kGVxlE: \"x1gnnqk1\",\n kMwMTN: \"x1xj74d8 x1bhcspo\",\n kkrTdU: \"x1h6gzvc\",\n $$css: true\n },\n itemFocused: {\n kjBf7l: \"xat36cu x1x84bn5\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"xaatb59\",\n kMeerF: \"x1s780dp\",\n $$css: true\n },\n trigger: {\n kIyJzY: \"xioksi3 x12w9bfk\",\n k1ekBW: \"x104ni8d\",\n kAMwcw: \"x1seskgd\",\n $$css: true\n }\n};\n\n// What a tone draws its actions in: the container pair, as the close button\n// takes the tone itself.\nconst ToneContext = createContext<FabTone>('primary');\ntype FabMenuItemProps = Omit<RACMenuItemProps, 'children' | 'className' | 'style'> & {\n /** The action's name, drawn as its label. */\n children: ReactNode;\n /** A function may compute the class from the action's render state. */\n className?: ClassNameOrFunction<MenuItemRenderProps>;\n /** An icon before the label, at the page's 24px. */\n icon?: ReactNode;\n /** A function may compute the style from the action's render state. */\n style?: StyleOrFunction<MenuItemRenderProps>;\n};\ntype FabMenuProps = {\n /**\n * What the FAB does, in words: an icon alone has no name, and the menu\n * takes its name from the FAB that opens it.\n */\n 'aria-label': string;\n /** The actions, as `FabMenu.Item`s — the page asks for two to six. */\n children: ReactNode;\n /**\n * A function may compute the class from the FAB's render state. It lands\n * on the FAB, which is what a layout positions.\n */\n className?: ClassNameOrFunction<ButtonState>;\n /**\n * Where the actions are portalled to. Defaults to the container of the\n * `ThemeScope` around it, or to the end of `<body>` where there is none. A\n * subtree themed through the `themeScope` class has no container of its own,\n * so point this inside it, or they render outside and keep the page's tokens.\n */\n container?: Element;\n /**\n * Whether the menu starts open, when it keeps its own state.\n * @default false\n */\n defaultOpen?: boolean;\n /** The FAB's icon while the menu is closed. */\n icon: ReactNode;\n /** Whether the menu is open, when the call site holds the state. */\n isOpen?: boolean;\n /** Called with an action's `id` when it is chosen. */\n onAction?: (key: Key) => void;\n /** Called when the menu opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The FAB's size while the menu is closed, as Fab's: `md` 56px, `lg` 80px\n * or `xl` 96px. Open, it is the close button's 56px whatever it was.\n * @default 'md'\n */\n size?: FabSize;\n /** A function may compute the style from the FAB's render state. */\n style?: StyleOrFunction<ButtonState>;\n /**\n * The page's three colour sets: the close button takes the tone and the\n * actions its container pair.\n * @default 'primary'\n */\n tone?: FabTone;\n} & RefAttributes<HTMLButtonElement>;\n\n/**\n * A FAB that opens a column of related actions above it, and closes them\n * again. The actions are `FabMenu.Item`s.\n *\n * ```tsx\n * <FabMenu aria-label=\"Label\" icon={<PlusIcon />}>\n * <FabMenu.Item icon={<FirstIcon />} id=\"first\">\n * First item\n * </FabMenu.Item>\n * <FabMenu.Item icon={<SecondIcon />} id=\"second\">\n * Second item\n * </FabMenu.Item>\n * </FabMenu>\n * ```\n *\n * The call site's `className`, `style` and `ref` land on the FAB.\n */\nfunction FabMenu({\n 'aria-label': label,\n children,\n className,\n container,\n defaultOpen = false,\n icon,\n isOpen,\n onAction,\n onOpenChange,\n ref,\n size = 'md',\n style,\n tone = 'primary'\n}: FabMenuProps) {\n const [ownOpen, setOwnOpen] = useState(defaultOpen);\n const open = isOpen ?? ownOpen;\n const changeOpen = useCallback((next: boolean) => {\n if (isOpen === undefined) {\n setOwnOpen(next);\n }\n onOpenChange?.(next);\n }, [isOpen, onOpenChange]);\n return <ToneContext value={tone}>\n <RACMenuTrigger isOpen={open} onOpenChange={changeOpen}>\n <ButtonBase aria-label={label} classes={triggerClasses(open, size, tone)} className={className} ref={ref} style={style}>\n <span {...stylex.props(fabStyles.icon, open ? styles.closeIcon : fabIconSizes[size])}>\n {open ? <CloseGlyph className=\"xlzyvqe x15vhz18\" /> : icon}\n </span>\n </ButtonBase>\n <RACPopover offset={8} placement=\"top end\"\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} className=\"xvhm28k x1u6grsq xhpbw76 x16dv9tl x9f619 x1t137rt\">\n <RACMenu onAction={onAction} className=\"xuk3077 x9f619 x78zum5 xdt5ytf xzoy561 x1t137rt\">\n {children}\n </RACMenu>\n </RACPopover>\n </RACMenuTrigger>\n </ToneContext>;\n}\n\n/**\n * One action: a pill holding an icon and a label, on the menu's tone.\n * Choosing it closes the menu.\n */\nfunction FabMenuItem({\n children,\n icon,\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp,\n textValue,\n ...props\n}: FabMenuItemProps & RefAttributes<HTMLDivElement>) {\n const tone = useContext(ToneContext);\n // The press ripple Menu's items draw — see MenuItem there.\n const ripple = useRipple<HTMLDivElement>(true, {\n onContextMenu,\n onPointerCancel,\n onPointerDown,\n onPointerLeave,\n onPointerUp\n }, true);\n return <RACMenuItem textValue={textValue ?? textOf(children)} {...ripple.handlers} {...props} {...mergeStatefulStyles(itemClasses(tone), props)}>\n {icon === undefined ? null : <span {...stylex.props(fabStyles.icon, fabIconSizes.md)}>{icon}</span>}\n <Text slot=\"label\">{children}</Text>\n {ripple.surface}\n </RACMenuItem>;\n}\n\n// An action's classes, from React Aria's render state: the tone's container\n// pair, and the layers over it. Built by a call rather than written inline at\n// the prop, which is what react-perf's no-new-function-as-prop is after.\nfunction itemClasses(tone: FabTone) {\n return (state: MenuItemRenderProps) => stylex.props(styles.item, fabTones.tonal[tone], state.isHovered && fabStyles.hovered, state.isFocused && fabStyles.focused, state.isFocusVisible && styles.itemFocused, state.isPressed && fabStyles.pressed, state.isDisabled && styles.itemDisabled);\n}\n\n// The FAB's classes: Fab's own while the menu is closed, the close button's\n// while it is open. The press layer is a press's alone: React Aria reports\n// the FAB pressed for as long as its menu is open, and ButtonBase hands these\n// classes `isPressed` only while the FAB is actually being pressed.\nfunction triggerClasses(isOpen: boolean, size: FabSize, tone: FabTone) {\n return (state: ButtonState) => stylex.props(fabStyles.base, focus.ring, styles.trigger, isOpen ? fabTones.filled[tone] : fabTones.tonal[tone], isOpen ? styles.closeButton : fabSizes[size], state.isHovered && fabStyles.hovered, state.isFocusVisible && fabStyles.focused, state.isPressed && fabStyles.pressed, state.isDisabled && fabStyles.disabled);\n}\nFabMenu.Item = FabMenuItem;\nexport type { FabMenuItemProps, FabMenuProps };\nexport { FabMenuItem };\nexport default FabMenu;"],"mappings":";;;;;;;;;;;;;;AAyDA,MAAMc,SAAS;CACbC,aAAa;EACXC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,WAAW;EACTC,QAAQ;EACRF,OAAO;CACT;CACAG,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRP,QAAQ;EACRQ,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EAC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MAAME,aAAalG,UAAUmG,SAASH,MAAMM,kBAAkBtG,UAAUqG,SAASL,MAAMO,aAAavG,UAAUwG,SAASR,MAAMS,cAAczG,UAAU6G,QAAQ;AAC5V;AACApD,QAAQqD,OAAO3B"}
@@ -1,8 +1,8 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
2
3
  import { props } from "../../node_modules/@stylexjs/stylex/lib/es/stylex.js";
3
4
  import { useRender } from "../../render/useRender.js";
4
5
  import { mergeStyles } from "../../styles/merge.js";
5
- import { c } from "react/compiler-runtime";
6
6
  // src/components/feed/index.tsx
7
7
  const DEFAULT_MIN_ITEM_WIDTH = "180px";
8
8
  const _temp = {
@@ -1,9 +1,9 @@
1
1
  "use client";
2
+ import { c } from "react/compiler-runtime";
3
+ import { Form as Form$1 } from "react-aria-components";
2
4
  import { FIELD_VALIDATION_BEHAVIOR } from "../../field/root.js";
3
5
  import { mergeStyles } from "../../styles/merge.js";
4
- import { c } from "react/compiler-runtime";
5
6
  import { jsx } from "react/jsx-runtime";
6
- import { Form as Form$1 } from "react-aria-components";
7
7
  // src/components/form/index.tsx
8
8
  /**
9
9
  * A form: the fields inside it and what they are told about validation. Pass