@kanso-labs/kanso-ui 0.45.22 → 0.45.23

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 (247) hide show
  1. package/dist/badge/index.js.map +1 -1
  2. package/dist/button/context.js.map +1 -1
  3. package/dist/button/group.js.map +1 -1
  4. package/dist/button/hooks.js.map +1 -1
  5. package/dist/button/index.d.ts +3 -4
  6. package/dist/button/index.js.map +1 -1
  7. package/dist/button/styles.js.map +1 -1
  8. package/dist/button/toggle.js.map +1 -1
  9. package/dist/calendar/index.js.map +1 -1
  10. package/dist/calendar/styles.js.map +1 -1
  11. package/dist/carousel/arrangement.d.ts +1 -2
  12. package/dist/carousel/arrangement.js.map +1 -1
  13. package/dist/chip/index.js.map +1 -1
  14. package/dist/chip/label.js.map +1 -1
  15. package/dist/chip/styles.js.map +1 -1
  16. package/dist/collection/empty.js.map +1 -1
  17. package/dist/collection/index.js.map +1 -1
  18. package/dist/collection/styles.js.map +1 -1
  19. package/dist/collection/text.js.map +1 -1
  20. package/dist/color-scheme.d.ts +1 -2
  21. package/dist/color-scheme.js.map +1 -1
  22. package/dist/components/app-bar/index.d.ts +1 -2
  23. package/dist/components/app-bar/index.js.map +1 -1
  24. package/dist/components/autocomplete/index.d.ts +1 -2
  25. package/dist/components/autocomplete/index.js.map +1 -1
  26. package/dist/components/avatar/index.d.ts +1 -2
  27. package/dist/components/avatar/index.js.map +1 -1
  28. package/dist/components/badge/index.d.ts +1 -2
  29. package/dist/components/badge/index.js.map +1 -1
  30. package/dist/components/breadcrumbs/index.d.ts +1 -2
  31. package/dist/components/breadcrumbs/index.js.map +1 -1
  32. package/dist/components/button/index.d.ts +1 -2
  33. package/dist/components/button/index.js.map +1 -1
  34. package/dist/components/button-group/index.d.ts +1 -2
  35. package/dist/components/button-group/index.js.map +1 -1
  36. package/dist/components/calendar/index.d.ts +1 -2
  37. package/dist/components/calendar/index.js.map +1 -1
  38. package/dist/components/card/index.d.ts +1 -2
  39. package/dist/components/card/index.js.map +1 -1
  40. package/dist/components/carousel/index.d.ts +1 -2
  41. package/dist/components/carousel/index.js.map +1 -1
  42. package/dist/components/checkbox/index.d.ts +1 -2
  43. package/dist/components/checkbox/index.js.map +1 -1
  44. package/dist/components/checkbox-group/index.d.ts +1 -2
  45. package/dist/components/checkbox-group/index.js.map +1 -1
  46. package/dist/components/chip/index.d.ts +1 -2
  47. package/dist/components/chip/index.js.map +1 -1
  48. package/dist/components/chip-group/index.d.ts +1 -2
  49. package/dist/components/chip-group/index.js.map +1 -1
  50. package/dist/components/code/index.d.ts +1 -2
  51. package/dist/components/code/index.js.map +1 -1
  52. package/dist/components/color-area/index.d.ts +1 -2
  53. package/dist/components/color-area/index.js.map +1 -1
  54. package/dist/components/color-field/index.d.ts +1 -2
  55. package/dist/components/color-field/index.js.map +1 -1
  56. package/dist/components/color-picker/index.d.ts +1 -2
  57. package/dist/components/color-picker/index.js.map +1 -1
  58. package/dist/components/color-slider/index.d.ts +1 -2
  59. package/dist/components/color-slider/index.js.map +1 -1
  60. package/dist/components/color-swatch/index.d.ts +1 -2
  61. package/dist/components/color-swatch/index.js.map +1 -1
  62. package/dist/components/color-swatch-picker/index.d.ts +1 -2
  63. package/dist/components/color-swatch-picker/index.js.map +1 -1
  64. package/dist/components/color-wheel/index.d.ts +1 -2
  65. package/dist/components/color-wheel/index.js.map +1 -1
  66. package/dist/components/combo-box/index.d.ts +1 -2
  67. package/dist/components/combo-box/index.js.map +1 -1
  68. package/dist/components/container/index.d.ts +1 -2
  69. package/dist/components/container/index.js.map +1 -1
  70. package/dist/components/copy-field/index.d.ts +1 -2
  71. package/dist/components/copy-field/index.js.map +1 -1
  72. package/dist/components/currency/index.d.ts +1 -2
  73. package/dist/components/currency/index.js.map +1 -1
  74. package/dist/components/date-field/index.d.ts +1 -2
  75. package/dist/components/date-field/index.js.map +1 -1
  76. package/dist/components/date-picker/index.d.ts +1 -2
  77. package/dist/components/date-picker/index.js.map +1 -1
  78. package/dist/components/date-range-picker/index.d.ts +1 -2
  79. package/dist/components/date-range-picker/index.js.map +1 -1
  80. package/dist/components/dialog/index.d.ts +1 -2
  81. package/dist/components/dialog/index.js.map +1 -1
  82. package/dist/components/disclosure/index.d.ts +1 -2
  83. package/dist/components/disclosure/index.js.map +1 -1
  84. package/dist/components/disclosure-group/index.d.ts +1 -2
  85. package/dist/components/disclosure-group/index.js.map +1 -1
  86. package/dist/components/drop-zone/index.d.ts +1 -2
  87. package/dist/components/drop-zone/index.js.map +1 -1
  88. package/dist/components/drop-zone/styles.js.map +1 -1
  89. package/dist/components/fab/index.d.ts +1 -2
  90. package/dist/components/fab/index.js.map +1 -1
  91. package/dist/components/fab-menu/index.d.ts +1 -2
  92. package/dist/components/fab-menu/index.js.map +1 -1
  93. package/dist/components/feed/index.d.ts +1 -2
  94. package/dist/components/feed/index.js.map +1 -1
  95. package/dist/components/form/index.d.ts +1 -2
  96. package/dist/components/form/index.js.map +1 -1
  97. package/dist/components/icon-button/index.d.ts +1 -2
  98. package/dist/components/icon-button/index.js.map +1 -1
  99. package/dist/components/keycap/index.d.ts +1 -2
  100. package/dist/components/keycap/index.js.map +1 -1
  101. package/dist/components/link/index.d.ts +1 -2
  102. package/dist/components/link/index.js.map +1 -1
  103. package/dist/components/list/index.d.ts +1 -2
  104. package/dist/components/list/index.js.map +1 -1
  105. package/dist/components/list-box/index.d.ts +1 -2
  106. package/dist/components/list-box/index.js.map +1 -1
  107. package/dist/components/list-detail/index.d.ts +1 -2
  108. package/dist/components/list-detail/index.js.map +1 -1
  109. package/dist/components/list-item/index.d.ts +1 -2
  110. package/dist/components/list-item/index.js.map +1 -1
  111. package/dist/components/loading-indicator/index.d.ts +1 -2
  112. package/dist/components/loading-indicator/index.js.map +1 -1
  113. package/dist/components/menu/index.d.ts +1 -2
  114. package/dist/components/menu/index.js.map +1 -1
  115. package/dist/components/meter/index.d.ts +1 -2
  116. package/dist/components/meter/index.js.map +1 -1
  117. package/dist/components/navigation-bar/index.d.ts +1 -2
  118. package/dist/components/navigation-bar/index.js.map +1 -1
  119. package/dist/components/navigation-rail/index.d.ts +1 -2
  120. package/dist/components/navigation-rail/index.js.map +1 -1
  121. package/dist/components/navigation-tree/index.d.ts +1 -2
  122. package/dist/components/navigation-tree/index.js.map +1 -1
  123. package/dist/components/number-field/index.d.ts +1 -2
  124. package/dist/components/number-field/index.js.map +1 -1
  125. package/dist/components/popover/index.d.ts +1 -2
  126. package/dist/components/popover/index.js.map +1 -1
  127. package/dist/components/product-icon/index.d.ts +1 -2
  128. package/dist/components/product-icon/index.js.map +1 -1
  129. package/dist/components/progress-indicator/index.d.ts +1 -2
  130. package/dist/components/progress-indicator/index.js.map +1 -1
  131. package/dist/components/radio-group/index.d.ts +1 -2
  132. package/dist/components/radio-group/index.js.map +1 -1
  133. package/dist/components/range-calendar/index.d.ts +1 -2
  134. package/dist/components/range-calendar/index.js.map +1 -1
  135. package/dist/components/search-field/index.d.ts +1 -2
  136. package/dist/components/search-field/index.js.map +1 -1
  137. package/dist/components/search-view/index.d.ts +1 -2
  138. package/dist/components/search-view/index.js.map +1 -1
  139. package/dist/components/segmented-button/index.d.ts +1 -2
  140. package/dist/components/segmented-button/index.js.map +1 -1
  141. package/dist/components/select/index.d.ts +1 -2
  142. package/dist/components/select/index.js.map +1 -1
  143. package/dist/components/separator/index.d.ts +1 -2
  144. package/dist/components/separator/index.js.map +1 -1
  145. package/dist/components/sheet/index.d.ts +1 -2
  146. package/dist/components/sheet/index.js.map +1 -1
  147. package/dist/components/slider/index.d.ts +1 -2
  148. package/dist/components/slider/index.js.map +1 -1
  149. package/dist/components/snackbar/index.d.ts +1 -2
  150. package/dist/components/snackbar/index.js.map +1 -1
  151. package/dist/components/split-button/index.d.ts +1 -2
  152. package/dist/components/split-button/index.js.map +1 -1
  153. package/dist/components/stack/index.d.ts +1 -2
  154. package/dist/components/stack/index.js.map +1 -1
  155. package/dist/components/supporting-pane/index.d.ts +1 -2
  156. package/dist/components/supporting-pane/index.js.map +1 -1
  157. package/dist/components/switch/index.d.ts +1 -2
  158. package/dist/components/switch/index.js.map +1 -1
  159. package/dist/components/table/index.d.ts +1 -2
  160. package/dist/components/table/index.js.map +1 -1
  161. package/dist/components/tabs/index.d.ts +1 -2
  162. package/dist/components/tabs/index.js.map +1 -1
  163. package/dist/components/tag/index.d.ts +1 -2
  164. package/dist/components/tag/index.js.map +1 -1
  165. package/dist/components/text/index.d.ts +1 -2
  166. package/dist/components/text/index.js.map +1 -1
  167. package/dist/components/text-area/index.d.ts +1 -2
  168. package/dist/components/text-area/index.js.map +1 -1
  169. package/dist/components/text-field/index.d.ts +1 -2
  170. package/dist/components/text-field/index.js.map +1 -1
  171. package/dist/components/time-field/index.d.ts +1 -2
  172. package/dist/components/time-field/index.js.map +1 -1
  173. package/dist/components/time-picker/index.d.ts +1 -2
  174. package/dist/components/time-picker/index.js.map +1 -1
  175. package/dist/components/token-field/index.d.ts +1 -2
  176. package/dist/components/token-field/index.js.map +1 -1
  177. package/dist/components/toolbar/index.d.ts +1 -2
  178. package/dist/components/toolbar/index.js.map +1 -1
  179. package/dist/components/tooltip/index.d.ts +1 -2
  180. package/dist/components/tooltip/index.js.map +1 -1
  181. package/dist/components/tree/index.d.ts +1 -2
  182. package/dist/components/tree/index.js.map +1 -1
  183. package/dist/control/index.js.map +1 -1
  184. package/dist/control/styles.js.map +1 -1
  185. package/dist/drag/hooks.d.ts +1 -2
  186. package/dist/drag/hooks.js.map +1 -1
  187. package/dist/drag/index.js.map +1 -1
  188. package/dist/drag/styles.js.map +1 -1
  189. package/dist/fab/styles.js.map +1 -1
  190. package/dist/field/index.d.ts +3 -4
  191. package/dist/field/index.js.map +1 -1
  192. package/dist/field/press.js.map +1 -1
  193. package/dist/field/root.js.map +1 -1
  194. package/dist/field/styles.js.map +1 -1
  195. package/dist/glyphs/index.js.map +1 -1
  196. package/dist/glyphs/styles.js.map +1 -1
  197. package/dist/hooks/useAppBarScroll.d.ts +1 -2
  198. package/dist/hooks/useAppBarScroll.js.map +1 -1
  199. package/dist/hooks/useBottomEdge.js.map +1 -1
  200. package/dist/hooks/useClippedTitle.js.map +1 -1
  201. package/dist/hooks/useImageLoadingStatus.js.map +1 -1
  202. package/dist/hooks/useRipple.js.map +1 -1
  203. package/dist/hooks/useScrollStop.js.map +1 -1
  204. package/dist/hooks/useToggleGroupDisabled.js.map +1 -1
  205. package/dist/i18n/index.js.map +1 -1
  206. package/dist/i18n/messages.js.map +1 -1
  207. package/dist/indicator/index.js.map +1 -1
  208. package/dist/indicator/styles.d.ts +1 -2
  209. package/dist/indicator/styles.js.map +1 -1
  210. package/dist/kanso-ui-core/defaults-DMH0HWCw.d.ts +1 -2
  211. package/dist/keycap/context.js.map +1 -1
  212. package/dist/layout.d.ts +1 -2
  213. package/dist/layout.js.map +1 -1
  214. package/dist/mark/index.js.map +1 -1
  215. package/dist/mark/initials.js.map +1 -1
  216. package/dist/mark/styles.js.map +1 -1
  217. package/dist/navigation/context.js.map +1 -1
  218. package/dist/navigation/index.d.ts +2 -3
  219. package/dist/navigation/index.js.map +1 -1
  220. package/dist/navigation/styles.js.map +1 -1
  221. package/dist/overlay/index.js.map +1 -1
  222. package/dist/render/aria.js.map +1 -1
  223. package/dist/render/content.js.map +1 -1
  224. package/dist/render/name.d.ts +1 -2
  225. package/dist/render/ref.js.map +1 -1
  226. package/dist/render/useRender.d.ts +1 -2
  227. package/dist/render/useRender.js.map +1 -1
  228. package/dist/row/index.js.map +1 -1
  229. package/dist/row/styles.js.map +1 -1
  230. package/dist/segments/index.js.map +1 -1
  231. package/dist/segments/styles.js.map +1 -1
  232. package/dist/styles/chequer.js.map +1 -1
  233. package/dist/styles/color.js.map +1 -1
  234. package/dist/styles/focus.js.map +1 -1
  235. package/dist/styles/icon-button.js.map +1 -1
  236. package/dist/styles/merge.js.map +1 -1
  237. package/dist/styles/overlay.d.ts +2 -3
  238. package/dist/styles/overlay.js.map +1 -1
  239. package/dist/styles/picker.js.map +1 -1
  240. package/dist/styles/ripple.js.map +1 -1
  241. package/dist/styles/scheme.js.map +1 -1
  242. package/dist/swatch/index.js.map +1 -1
  243. package/dist/theme-scope.d.ts +1 -2
  244. package/dist/theme-scope.js.map +1 -1
  245. package/dist/tokens/design.tokens.stylex.js.map +1 -1
  246. package/dist/tokens/values.js.map +1 -1
  247. package/package.json +15 -15
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","CalendarDateTime","ZonedDateTime","FocusEvent","PointerEvent","ReactElement","ReactNode","RefAttributes","TimeFieldProps","RACTimeFieldProps","Selection","TimeFieldState","TimeValue","getLocalTimeZone","Time","toCalendarDateTime","today","stylex","useCallback","useContext","useId","useRef","useState","Heading","LabelContext","Modal","ModalOverlay","Button","RACButton","DateInput","RACDateInput","DateSegment","RACDateSegment","Dialog","RACDialog","TimeField","RACTimeField","TimeFieldStateContext","ToggleButton","ToggleButtonGroup","useLocale","useSlottedContext","FieldVariant","FieldBox","FieldMessage","FieldSegments","fieldStyles","invalidFrom","useFieldValidationBehavior","ClockGlyph","KeyboardGlyph","useMessages","renderSegment","segmentStyles","mergeStatefulStyles","overlay","picker","triggerClassName","colors","motion","radii","shadows","sizing","spacing","stateLayerOpacity","typography","IconButton","FORCED_COLORS","DIAL","CENTRE","OUTER_RING","INNER_RING","HANDLE","MORNING","AFTERNOON","INVISIBLE","scaleIn","styles","centre","kGNEyG","k1xSpc","kjj79g","kmVPX3","$$css","dialog","periodButton","kWkggS","kMzoRj","kB7OPa","kMwMTN","kkrTdU","kCS8Yb","kzQI83","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kogj98","kjBf7l","kInvED","k3XXqK","kMeerF","periodDivider","kLZC3w","kPef9Z","kEafiO","periodHovered","periodSelected","periodSelectedHovered","ring","selector","kZKoxP","kVAM5u","kaIpWk","ksu8eU","knGrYV","kcqcaj","kzqmXN","selectorHovered","selectorInput","selectorInputFocused","selectorSelected","selectorSelectedHovered","DialLabel","isSelected","key","text","x","y","PeriodState","isFocusVisible","isHovered","Segment","Parameters","NonNullable","SegmentState","isFocused","TimePart","TimePickerMode","TimePickerProps","Omit","T","cancelLabel","className","confirmLabel","container","Element","defaultMode","defaultOpen","description","enterTimeLabel","error","floatingLabel","isOpen","label","leadingIcon","onOpenChange","selectTimeLabel","style","variant","asDateTime","time","boxClassName","isDial","isFollowed","state","props","clockTrigger","isDisabled","onPress","ClockTrigger","t0","$","id","fieldLabel","t1","undefined","t2","Symbol","for","triggerGlyph","t3","dialLabel","turn","radius","polar","fieldName","names","Intl","DisplayNames","field","locale","name","of","charAt","toLocaleUpperCase","slice","initialTime","placeholderValue","held","value","labelsFor","part","twelveHour","steps","Array","from","length","_","step","digits","NumberFormat","minimumIntegerDigits","map","format","minute","hours","DateTimeFormat","hour","hour12","offset","partOf","type","formatToParts","Date","find","String","periodAmClassName","periodClassName","divider","periodPmClassName","angle","Math","PI","sin","cos","TimePicker","t4","isReadOnly","t5","t6","validationBehavior","messages","ownOpen","setOwnOpen","open","t7","next","changeOpen","t8","openModal","T0","t9","t10","root","t11","isRequired","t12","t13","selectTime","t14","t15","input","t16","t17","t18","scrim","t19","cancel","t20","confirm","t21","enterTime","t22","granularity","t23","t24","hourCycle","t25","t26","TimePickerDialog","draft","setDraft","mode","setMode","setPart","headingId","labelContext","boxes","dragging","usesTwelveHours","switchMode","periods","isAfternoon","showsMinutes","shown","handle","box","current","querySelector","HTMLElement","focus","focusBox","event","type_0","target","getAttribute","followFocus","changeDraft","event_0","box_0","currentTarget","getBoundingClientRect","clientX","left","width","clientY","top","height","atan2","distance","hypot","set","round","inner","pick","event_1","pointerType","button","preventDefault","setPointerCapture","pointerId","startPicking","event_2","continuePicking","stopPicking","keys","afternoon","has","choosePeriod","setValue","segment","replaceAll","0","1","renderBox","labels","between","modalDialog","_temp","resolvedOptions","stylex.props","_c","RACButton","props","RACTimeField","RACDateInput","RACDateSegment","RACDialog","Button"],"sources":["../../../src/components/time-picker/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CalendarDateTime, ZonedDateTime } from '@internationalized/date';\nimport type { FocusEvent, PointerEvent, ReactElement, ReactNode, RefAttributes } from 'react';\nimport type { TimeFieldProps as RACTimeFieldProps, Selection, TimeFieldState, TimeValue } from 'react-aria-components';\nimport { getLocalTimeZone, Time, toCalendarDateTime, today } from '@internationalized/date';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useContext, useId, useRef, useState } from 'react';\nimport { Heading, LabelContext, Modal, ModalOverlay, Button as RACButton, DateInput as RACDateInput, DateSegment as RACDateSegment, Dialog as RACDialog, TimeField as RACTimeField, TimeFieldStateContext, ToggleButton, ToggleButtonGroup, useLocale, useSlottedContext } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldMessage, FieldSegments } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { ClockGlyph, KeyboardGlyph } from '../../glyphs';\nimport { useMessages } from '../../i18n';\nimport { renderSegment } from '../../segments';\nimport { segmentStyles } from '../../segments/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay } from '../../styles/overlay';\nimport { picker, triggerClassName } from '../../styles/picker';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport IconButton from '../icon-button';\n\n// The time pickers page's picker: TimeField's segments, with a clock button\n// in the field's trailing slot that opens the page's modal over a scrim. A\n// time is typed into the field or picked in the modal, and the modal's OK is\n// what writes a picked time back.\n//\n// **Modal at every width.** The page has no docked time picker, so unlike\n// DatePicker nothing here changes at a breakpoint: the container is centred\n// over the scrim on a phone and on a desktop alike.\n//\n// **The modal is the page's vertical layout, in both of its variants.** The\n// dial: a label-medium headline on surface variant, then the time selector —\n// an hour and a minute box, 96 by 80dp at the small corner in display-large,\n// on surface container highest and on primary container once selected, with\n// 24dp for the colon between — and beside them the period selector, 52 by\n// 80dp, outlined, its chosen half on tertiary container. Under them, 36dp\n// down, the 256dp dial on surface container highest: labels in body-large,\n// the 48dp handle and 2dp hand in primary, an 8dp centre, and the label under\n// the handle in on primary. The input variant drops the dial and draws the\n// boxes as text fields, 96 by 72dp in display-medium, the focused one on\n// primary container with a 2dp primary outline, each named underneath in\n// body-small, and the period selector at the same 72dp. Both put the\n// keyboard or clock toggle at the actions' start and the text buttons at\n// their end, inside a container on surface container high at the\n// extra-large corner, level 3, with 24dp of padding.\n//\n// **The boxes are a TimeField of their own**, React Aria's, inside the\n// modal: its hour and minute segments drawn as the page's boxes. That makes\n// them spinbuttons with React Aria's arrow keys, typing, digits and names in\n// the reader's locale, and it is the same accessible model in both variants,\n// which differ in how the boxes are drawn rather than in what they are. The\n// day period stays a segment for React Aria's sake but is hidden, and the\n// period selector beside the boxes takes its place, as a radio group of the\n// locale's two words for it. The dial is a pointer affordance over the\n// spinbuttons and is hidden from assistive technology: everything it sets,\n// the boxes set too.\n//\n// **The dial does not mirror.** A clock face is the same in either writing\n// direction, so it is drawn and read in screen coordinates, three o'clock on\n// the right. The row above it follows the field's own order, as TimeField's\n// segments do, so in a right-to-left locale the period selector sits on the\n// left.\n//\n// Twenty-four hours put the day's second half on an inner ring, 12 at its top\n// and 00 at the outer ring's, with no period selector, and whether there is\n// one at all is the reader's locale or `hourCycle`, as it is in TimeField.\n\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The dial's geometry, in the units of its viewBox, which it draws at the\n// page's 256dp: the radius of the outer and inner rings of labels and of the\n// handle that sits on them. The inner ring sits far enough in that a handle on\n// it clears the outer ring's labels.\nconst DIAL = 256;\nconst CENTRE = DIAL / 2;\nconst OUTER_RING = 101;\nconst INNER_RING = 64;\nconst HANDLE = 24;\n\n// The period selector's selection, hoisted so each is one stable array\n// rather than a fresh one per render.\nconst MORNING = ['am'];\nconst AFTERNOON = ['pm'];\n\n// React Aria's literal segments carry the locale's bidirectional marks beside\n// the punctuation, so a literal is drawn only when something else is left.\nconst INVISIBLE = /[\\s؜‎‏‪-‮⁦-⁩]/gu;\nconst scaleIn = \"xnirehn-B\";\nconst styles = {\n centre: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1a7rqcl\",\n $$css: true\n },\n dialog: {\n kmVPX3: \"x1apw6a7\",\n $$css: true\n },\n periodButton: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kogj98: \"x1ghz6dp\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n periodDivider: {\n kLZC3w: \"xrre44y\",\n kPef9Z: \"x13fuv20\",\n kEafiO: \"x178xt8z\",\n $$css: true\n },\n periodHovered: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n periodSelected: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n periodSelectedHovered: {\n kWkggS: \"x5nnyxq x1jzqe4\",\n $$css: true\n },\n ring: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n selector: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"xwzfr38\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xdvaa9\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kB7OPa: \"x9f619\",\n knGrYV: \"xbuiw85\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kMv6JI: \"xjaampf\",\n kGuDYH: \"xuyiek4\",\n kcqcaj: \"xss6m8b\",\n k63SB2: \"x1n2oj23\",\n kzqmXN: \"xszbqgh\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1hxa6v5\",\n kLWn49: \"x1iwmiir\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n selectorHovered: {\n kWkggS: \"xpae8dx\",\n $$css: true\n },\n selectorInput: {\n kZKoxP: \"xfl6q2h\",\n kkrTdU: \"x1ed109x\",\n kMv6JI: \"x1gi70vc\",\n kGuDYH: \"xlzzeuu\",\n k63SB2: \"xh9quta\",\n kb6lSQ: \"x148mp24\",\n kLWn49: \"xs5hucj\",\n $$css: true\n },\n selectorInputFocused: {\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n selectorSelected: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n selectorSelectedHovered: {\n kWkggS: \"xq1oky0 x1jzqe4\",\n $$css: true\n }\n};\n\n// One label on the dial, placed on its ring.\ntype DialLabel = {\n isSelected: boolean;\n key: string;\n text: string;\n x: number;\n y: number;\n};\n\n// The state React Aria hands a half of the period selector's className.\ntype PeriodState = {\n isFocusVisible: boolean;\n isHovered: boolean;\n isSelected: boolean;\n};\n\n// What React Aria hands the input for each part of the time. Taken off the\n// component, for the reason src/segments gives.\ntype Segment = Parameters<NonNullable<Parameters<typeof RACDateInput>[0]['children']>>[0];\n\n// The state React Aria hands a segment's className.\ntype SegmentState = {\n isFocused: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n};\n\n// The parts of a time the dial and the boxes set.\ntype TimePart = 'hour' | 'minute';\n\n/** Which of the time pickers page's two variants the modal shows. */\ntype TimePickerMode = 'dial' | 'input';\ntype TimePickerProps<T extends TimeValue = TimeValue> = Omit<RACTimeFieldProps<T>, 'children' | 'className' | 'style'> & {\n /**\n * What the modal's dismissing action says. Left out, it is the word for\n * it in the I18nProvider's locale — \"Cancel\" in English.\n */\n cancelLabel?: string;\n /** A function may compute the class from the field's render state. */\n className?: RACTimeFieldProps<T>['className'];\n /**\n * What the modal's confirming action says. Left out, it is the word for\n * it in the I18nProvider's locale — \"OK\" in English.\n */\n confirmLabel?: string;\n /**\n * Where to portal the modal and its scrim. Defaults to the container of the\n * `ThemeScope` around it, which keeps the modal on that scope's tokens, or to\n * the end of `<body>` where there is none. A subtree themed through the\n * `themeScope` class has no container of its own, so point this inside it, or\n * the modal renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Which variant the modal opens on: the dial, or the boxes as text fields\n * to type into. The button at the modal's start switches between them.\n * @default 'dial'\n */\n defaultMode?: TimePickerMode;\n /** Whether the modal starts open, when it keeps its own state. */\n defaultOpen?: boolean;\n /** Supporting text under the field. */\n description?: string;\n /**\n * The input variant's headline, which also names the button that switches\n * the dial to it. Left out, it is the I18nProvider's locale's — \"Enter\n * time\" in English.\n */\n enterTimeLabel?: string;\n /**\n * The message shown instead of the description, which also marks the\n * field invalid.\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 floats into the box's top once the field holds a\n * value, rather than sitting above it.\n * @default true\n */\n floatingLabel?: boolean;\n /** Whether the modal is open, when the call site holds the state. */\n isOpen?: boolean;\n /** What the field is for. Always rendered; never a placeholder. */\n label: string;\n /**\n * An icon at the box's leading end, in the page's 24dp size. An icon drawn\n * in `em` takes that size from the slot.\n */\n leadingIcon?: ReactNode;\n /** Called with the modal's new state when it opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The dial's headline, which also names the clock button that opens the\n * modal, followed by the field's label, and the button that switches the\n * input variant back. Left out, it is the I18nProvider's locale's —\n * \"Select time\" in English.\n */\n selectTimeLabel?: string;\n /** A function may compute the style from the field's render state. */\n style?: RACTimeFieldProps<T>['style'];\n /**\n * Which of the text fields page's two boxes to draw.\n * @default 'filled'\n */\n variant?: FieldVariant;\n};\n\n/**\n * A picked time as the field's state takes it, which is always a date and\n * time: React Aria puts a bare time on today and takes the date off again on\n * the way out.\n */\nfunction asDateTime(time: TimeValue): CalendarDateTime | ZonedDateTime {\n return 'day' in time ? time : toCalendarDateTime(today(getLocalTimeZone()), time);\n}\n\n// An hour or a minute box's classes, from React Aria's render state. On the\n// dial the selected box is the one the dial follows; typed into, it is the\n// one with focus, which is what the page's input variant draws as focused.\nfunction boxClassName(isDial: boolean, isFollowed: boolean) {\n return (state: SegmentState) => {\n const isSelected = isDial ? isFollowed : state.isFocused;\n return stylex.props(styles.selector, !isDial && styles.selectorInput, state.isHovered && styles.selectorHovered, isSelected && styles.selectorSelected, isSelected && state.isHovered && styles.selectorSelectedHovered, isDial && state.isFocusVisible && styles.ring, !isDial && state.isFocused && styles.selectorInputFocused).className ?? '';\n };\n}\n\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-jsx-as-prop is after — the same reason DatePicker builds\n// its trigger this way.\nfunction clockTrigger(isDisabled: boolean, isOpen: boolean, label: string, onPress: () => void) {\n return <ClockTrigger isDisabled={isDisabled} isOpen={isOpen} label={label} onPress={onPress} />;\n}\n\n// The clock button in the field's trailing slot. It is named by its own\n// words followed by the field's label, which is how React Aria names\n// DatePicker's calendar button, so two pickers on a form are told apart.\nfunction ClockTrigger({\n isDisabled,\n isOpen,\n label,\n onPress\n}: {\n isDisabled: boolean;\n isOpen: boolean;\n label: string;\n onPress: () => void;\n}) {\n const id = useId();\n const fieldLabel = useSlottedContext(LabelContext);\n return <RACButton aria-expanded={isOpen} aria-haspopup=\"dialog\" aria-label={label} aria-labelledby={fieldLabel?.id === undefined ? undefined : `${id} ${fieldLabel.id}`} className={triggerClassName} id={id} isDisabled={isDisabled} onPress={onPress}>\n <ClockGlyph {...stylex.props(picker.triggerGlyph)} />\n </RACButton>;\n}\n\n/** One label, placed a fraction of a turn round a ring. */\nfunction dialLabel(key: string, text: string, isSelected: boolean, turn: number, radius: number): DialLabel {\n const {\n x,\n y\n } = polar(turn, radius);\n return {\n isSelected,\n key,\n text,\n x,\n y\n };\n}\n\n/** A field's name as the locale writes it, opening with a capital. */\nfunction fieldName(names: Intl.DisplayNames, field: string, locale: string) {\n const name = names.of(field) ?? field;\n return name.charAt(0).toLocaleUpperCase(locale) + name.slice(1);\n}\n\n/**\n * The time the modal opens on: the field's own, else its placeholder, else\n * midnight. A date and time keeps its date, so the field gets back what it\n * holds.\n */\nfunction initialTime(field: null | TimeFieldState, placeholderValue: TimeValue | undefined): TimeValue {\n const held = field?.value;\n if (held !== null && held !== undefined && 'hour' in held) {\n return held;\n }\n return placeholderValue ?? new Time();\n}\n\n/** The labels the dial draws for one part, in the reader's digits. */\nfunction labelsFor(part: TimePart, time: TimeValue, locale: string, twelveHour: boolean): DialLabel[] {\n const steps = Array.from({\n length: 12\n }, (_, step) => step);\n if (part === 'minute') {\n const digits = new Intl.NumberFormat(locale, {\n minimumIntegerDigits: 2\n });\n return steps.map(step => dialLabel(`m${step}`, digits.format(step * 5), time.minute === step * 5, step / 12, OUTER_RING));\n }\n const hours = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: twelveHour\n });\n if (twelveHour) {\n const offset = time.hour >= 12 ? 12 : 0;\n return steps.map(step => dialLabel(`h${step}`, partOf(hours, step + offset, 'hour'), time.hour % 12 === step, step / 12, OUTER_RING));\n }\n return [...steps.map(step => dialLabel(`h${step}`, partOf(hours, step, 'hour'), time.hour === step, step / 12, OUTER_RING)), ...steps.map(step => dialLabel(`h${step + 12}`, partOf(hours, step + 12, 'hour'), time.hour === step + 12, step / 12, INNER_RING))];\n}\n\n/** The part of a formatted time a formatter writes for one hour of the day. */\nfunction partOf(format: Intl.DateTimeFormat, hour: number, type: 'dayPeriod' | 'hour') {\n return format.formatToParts(new Date(2000, 0, 1, hour)).find(part => part.type === type)?.value ?? String(hour);\n}\n\n// The period selector's morning half, with no rule above it.\nfunction periodAmClassName(state: PeriodState) {\n return periodClassName(state, false);\n}\n\n// A half of the period selector, from React Aria's render state. The second\n// half draws the rule between the two.\nfunction periodClassName(state: PeriodState, divider: boolean) {\n return stylex.props(styles.periodButton, divider && styles.periodDivider, state.isHovered && styles.periodHovered, state.isSelected && styles.periodSelected, state.isSelected && state.isHovered && styles.periodSelectedHovered, state.isFocusVisible && styles.ring).className ?? '';\n}\n\n// Its afternoon half, under the rule between the two.\nfunction periodPmClassName(state: PeriodState) {\n return periodClassName(state, true);\n}\n\n/** Where a fraction of a turn clockwise from twelve lands on a ring. */\nfunction polar(turn: number, radius: number) {\n const angle = turn * 2 * Math.PI;\n return {\n x: CENTRE + radius * Math.sin(angle),\n y: CENTRE - radius * Math.cos(angle)\n };\n}\n\n/**\n * A time typed into a field, or picked in a modal behind the clock button\n * at the field's end — on a dial, or typed into the modal's larger boxes.\n * The value is React Aria's — pass `value` with `onChange` to control it,\n * or `defaultValue` — as a `Time` from this package's `./date` subpath.\n *\n * ```tsx\n * import { Time } from '@kanso-labs/kanso-ui/date'\n *\n * <TimePicker defaultValue={new Time(9, 30)} label=\"Label\" />\n * ```\n *\n * The field is `TimeField`'s, so `granularity`, `hourCycle`, `minValue` and\n * `maxValue` behave as they do there. The modal sets hours and minutes and\n * keeps the seconds a value already has; a time it writes back is checked\n * against the bounds as a typed one is. Whether it shows a twelve or\n * twenty-four hour clock is the reader's locale, through React Aria's\n * `I18nProvider`, unless `hourCycle` says otherwise.\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 TimePicker<T extends TimeValue>({\n cancelLabel,\n confirmLabel,\n container,\n defaultMode = 'dial',\n defaultOpen = false,\n description,\n enterTimeLabel,\n error,\n floatingLabel = true,\n isDisabled = false,\n isOpen,\n isReadOnly = false,\n label,\n leadingIcon,\n onOpenChange,\n selectTimeLabel,\n variant = 'filled',\n ...props\n}: RefAttributes<HTMLDivElement> & TimePickerProps<T>) {\n const validationBehavior = useFieldValidationBehavior();\n const messages = useMessages();\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 const openModal = useCallback(() => {\n changeOpen(true);\n }, [changeOpen]);\n return <RACTimeField<T> isDisabled={isDisabled} isInvalid={invalidFrom(error)} isReadOnly={isReadOnly} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <FieldBox floatingLabel={floatingLabel}\n // Always populated, for the reason TimeField's own comment gives.\n isPopulated isRequired={props.isRequired} label={label} leading={leadingIcon}\n // In the chrome's trailing slot, where DatePicker puts its calendar\n // button and for the same reasons.\n trailing={clockTrigger(isDisabled || isReadOnly, open, selectTimeLabel ?? messages.selectTime, openModal)} variant={variant}>\n <FieldSegments>\n <RACDateInput {...stylex.props(segmentStyles.input)}>\n {renderSegment}\n </RACDateInput>\n </FieldSegments>\n </FieldBox>\n <FieldMessage description={description} error={error} />\n <ModalOverlay isDismissable isOpen={open} onOpenChange={changeOpen}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...stylex.props(overlay.scrim, styles.centre)}>\n <Modal className=\"x1n1nwrg x1u6grsq xbhiib0 x16dv9tl xvkjz1l x1w1tqly x19pkqky xx61lck x13rsnn2 x1udv5rz x9f619 x139gbkf xi55695 xmz0i5r x193iq5w xysyzu8\">\n <TimePickerDialog cancelLabel={cancelLabel ?? messages.cancel} confirmLabel={confirmLabel ?? messages.confirm} defaultMode={defaultMode} enterTimeLabel={enterTimeLabel ?? messages.enterTime} fieldLabel={label} granularity={props.granularity === 'hour' ? 'hour' : 'minute'} hourCycle={props.hourCycle} placeholderValue={props.placeholderValue} selectTimeLabel={selectTimeLabel ?? messages.selectTime} />\n </Modal>\n </ModalOverlay>\n </RACTimeField>;\n}\n\n/**\n * The modal's content, mounted each time it opens: the time it was opened\n * with is its draft until OK writes the draft into the field, or the modal\n * closes without it.\n */\nfunction TimePickerDialog({\n cancelLabel,\n confirmLabel,\n defaultMode,\n enterTimeLabel,\n fieldLabel,\n granularity,\n hourCycle,\n placeholderValue,\n selectTimeLabel\n}: {\n cancelLabel: string;\n confirmLabel: string;\n defaultMode: TimePickerMode;\n enterTimeLabel: string;\n fieldLabel: string;\n granularity: 'hour' | 'minute';\n hourCycle: 12 | 24 | undefined;\n placeholderValue: TimeValue | undefined;\n selectTimeLabel: string;\n}) {\n const {\n locale\n } = useLocale();\n // The outer field's state: the modal reads the time from it and writes the\n // picked one back through it, so the field stays the one owner of its\n // value, controlled or not, and its onChange is React Aria's own.\n const field = useContext(TimeFieldStateContext);\n const [draft, setDraft] = useState(() => initialTime(field, placeholderValue));\n const [mode, setMode] = useState(defaultMode);\n const [part, setPart] = useState<TimePart>('hour');\n const headingId = useId();\n const labelContext = useSlottedContext(LabelContext);\n const boxes = useRef<HTMLDivElement>(null);\n const dragging = useRef(false);\n const twelveHour = usesTwelveHours(locale, hourCycle);\n const names = new Intl.DisplayNames(locale, {\n type: 'dateTimeField'\n });\n const periods = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true\n });\n const isAfternoon = draft.hour >= 12;\n const isDial = mode === 'dial';\n const showsMinutes = granularity === 'minute';\n const shown: TimePart = showsMinutes ? part : 'hour';\n const handle = shown === 'minute' ? polar(draft.minute / 60, OUTER_RING) : polar(draft.hour % 12 / 12, !twelveHour && draft.hour >= 12 ? INNER_RING : OUTER_RING);\n const focusBox = useCallback((type: TimePart) => {\n const box = boxes.current?.querySelector(`[data-type=\"${type}\"]`);\n if (box instanceof HTMLElement) {\n box.focus();\n }\n }, []);\n\n // Which box the dial follows, taken from the box that has focus — a press\n // on a box, a Tab into it, or React Aria moving on once an hour is typed.\n const followFocus = useCallback((event: FocusEvent<HTMLDivElement>) => {\n const type = event.target.getAttribute('data-type');\n if (type === 'hour' || type === 'minute') {\n setPart(type);\n }\n }, []);\n const changeDraft = useCallback((next: null | TimeValue) => {\n if (next !== null) {\n setDraft(next);\n }\n }, []);\n const pick = useCallback((event: PointerEvent<SVGSVGElement>) => {\n const box = event.currentTarget.getBoundingClientRect();\n const x = event.clientX - box.left - box.width / 2;\n const y = event.clientY - box.top - box.height / 2;\n const turn = (Math.atan2(x, -y) / (2 * Math.PI) + 1) % 1;\n const distance = Math.hypot(x, y) * DIAL / box.width;\n if (shown === 'minute') {\n setDraft(draft.set({\n minute: Math.round(turn * 60) % 60\n }));\n return;\n }\n const step = Math.round(turn * 12) % 12;\n if (twelveHour) {\n setDraft(draft.set({\n hour: step + (isAfternoon ? 12 : 0)\n }));\n return;\n }\n const inner = distance < (OUTER_RING + INNER_RING) / 2;\n setDraft(draft.set({\n hour: inner ? step + 12 : step\n }));\n }, [draft, isAfternoon, shown, twelveHour]);\n const startPicking = useCallback((event: PointerEvent<SVGSVGElement>) => {\n if (event.pointerType === 'mouse' && event.button !== 0) {\n return;\n }\n // Keeps focus where it is: the dial is not a focus stop, and a press on\n // it would otherwise blur the box it is setting.\n event.preventDefault();\n try {\n event.currentTarget.setPointerCapture(event.pointerId);\n } catch {\n // A pointer the browser is not tracking has no capture to take — a\n // synthetic event in a test, where the moves land on the dial anyway.\n }\n dragging.current = true;\n pick(event);\n }, [pick]);\n const continuePicking = useCallback((event: PointerEvent<SVGSVGElement>) => {\n if (dragging.current) {\n pick(event);\n }\n }, [pick]);\n\n // An hour picked on the dial moves on to the minutes, as the page does.\n const stopPicking = useCallback(() => {\n if (!dragging.current) {\n return;\n }\n dragging.current = false;\n if (shown === 'hour' && showsMinutes) {\n setPart('minute');\n focusBox('minute');\n }\n }, [focusBox, shown, showsMinutes]);\n const switchMode = useCallback(() => {\n setMode(isDial ? 'input' : 'dial');\n focusBox(part);\n }, [focusBox, isDial, part]);\n const choosePeriod = useCallback((keys: Selection) => {\n const afternoon = keys !== 'all' && keys.has('pm');\n if (afternoon !== isAfternoon) {\n setDraft(draft.set({\n hour: draft.hour % 12 + (afternoon ? 12 : 0)\n }));\n }\n }, [draft, isAfternoon]);\n\n // OK writes the draft through the field's state, and its `slot` closes the\n // modal after.\n const confirm = useCallback(() => {\n field?.setValue(asDateTime(draft));\n }, [draft, field]);\n const renderBox = useCallback((segment: Segment): ReactElement => {\n if (segment.type === 'hour' || segment.type === 'minute') {\n return <RACDateSegment className={boxClassName(isDial, shown === segment.type)} segment={segment} />;\n }\n if (segment.type === 'literal' && segment.text.replaceAll(INVISIBLE, '') !== '') {\n return <RACDateSegment {...{\n 0: {\n className: \"x6s0dn4 xwzfr38 x9f619 x139gbkf x3nfvp2 xjaampf xuyiek4 x1n2oj23 xvy4d1p xl56j7k x1iwmiir\"\n },\n 1: {\n className: \"x6s0dn4 x9f619 x139gbkf x3nfvp2 xvy4d1p xl56j7k xfl6q2h x1gi70vc xlzzeuu xh9quta xs5hucj\"\n }\n }[!!!isDial << 0]} segment={segment} />;\n }\n return <RACDateSegment hidden segment={segment} />;\n }, [isDial, shown]);\n const labels = labelsFor(shown, draft, locale, twelveHour);\n const between = shown === 'minute' && draft.minute % 5 !== 0;\n return <RACDialog aria-labelledby={labelContext?.id === undefined ? headingId : `${headingId} ${labelContext.id}`} {...stylex.props(overlay.modalDialog, styles.dialog)}>\n <Heading id={headingId} level={2} className=\"x9f619 x1w5n3ug xp6n8n2 xkucv67 x14hhc5u x12utw95 xvzb9hk x1ghz6dp xieb3on\">\n {isDial ? selectTimeLabel : enterTimeLabel}\n </Heading>\n <div className=\"x1cy8zhl x9f619 x78zum5 x1gka490 xl56j7k\">\n <div onFocus={followFocus} ref={boxes}>\n <RACTimeField aria-label={fieldLabel} granularity={granularity} hideTimeZone hourCycle={hourCycle} onChange={changeDraft} shouldForceLeadingZeros validationBehavior=\"aria\" value={draft}>\n <RACDateInput className=\"x6s0dn4 x9f619 x78zum5 x1t137rt\">\n {renderBox}\n </RACDateInput>\n </RACTimeField>\n {isDial ? null : <div aria-hidden=\"true\" className=\"x9f619 x1w5n3ug x78zum5 x1yicsit x1b35g6e x9d6959 x1665zp3 xwth0xh xybisxh x7suny0\">\n <span className=\"x9f619 xszbqgh\">\n {fieldName(names, 'hour', locale)}\n </span>\n {showsMinutes ? <span className=\"x9f619 xszbqgh\">\n {fieldName(names, 'minute', locale)}\n </span> : null}\n </div>}\n </div>\n {twelveHour ? <ToggleButtonGroup aria-label={names.of('dayPeriod')} disallowEmptySelection onSelectionChange={choosePeriod} orientation=\"vertical\" selectedKeys={isAfternoon ? AFTERNOON : MORNING} selectionMode=\"single\" {...{\n 0: {\n className: \"xwzfr38 x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x9f619 x78zum5 xdt5ytf x2lah0s xvni27 xb3r6kr\"\n },\n 1: {\n className: \"x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x9f619 x78zum5 xdt5ytf x2lah0s xvni27 xb3r6kr xfl6q2h\"\n }\n }[!!!isDial << 0]}>\n <ToggleButton className={periodAmClassName} id=\"am\">\n {partOf(periods, 9, 'dayPeriod')}\n </ToggleButton>\n <ToggleButton className={periodPmClassName} id=\"pm\">\n {partOf(periods, 21, 'dayPeriod')}\n </ToggleButton>\n </ToggleButtonGroup> : null}\n </div>\n {isDial ? <svg aria-hidden=\"true\" data-dial={shown} onPointerCancel={stopPicking} onPointerDown={startPicking} onPointerMove={continuePicking} onPointerUp={stopPicking} viewBox={`0 0 ${DIAL} ${DIAL}`} className=\"xrlp1an x9f619 x1ypdohk x1lliihq x2lah0s x1t9vceh xseo6mj xvueqy4 x5ve5x3 x87ps6o\">\n <circle cx={CENTRE} cy={CENTRE} r={CENTRE - 1} className=\"x1a930ss x1h8bevw xeutv01 x8jos32\" />\n <line x1={CENTRE} x2={handle.x} y1={CENTRE} y2={handle.y} className=\"xrr0osq x1rqz208 x1i9vjva xbabvq0 x8pzrqk\" />\n <circle cx={CENTRE} cy={CENTRE} r={4} className=\"xrr0osq x1rqz208 x1i9vjva xbabvq0 x8pzrqk\" />\n <circle cx={handle.x} cy={handle.y} data-handle=\"\" r={HANDLE} className=\"xrr0osq x1rqz208 x1i9vjva xbabvq0 x8pzrqk\" />\n {between ? <circle cx={handle.x} cy={handle.y} r={2} className=\"xvlh3h9 x1bpb6vw\" /> : null}\n {labels.map(label => <text dominantBaseline=\"central\" key={label.key} textAnchor=\"middle\" x={label.x} y={label.y} {...{\n 0: {\n className: \"xti7fmr xmw301f x16svsjw x1848etk x1c52epr x1qn8t5l\"\n },\n 1: {\n className: \"x16svsjw x1848etk x1c52epr x1qn8t5l xvlh3h9 x1bpb6vw\"\n }\n }[!!label.isSelected << 0]}>\n {label.text}\n </text>)}\n </svg> : null}\n <div className=\"x6s0dn4 x9f619 x78zum5 x126z3so x1qughib x1yhnu8z\">\n <IconButton aria-label={isDial ? enterTimeLabel : selectTimeLabel} onPress={switchMode}>\n {isDial ? <KeyboardGlyph className=\"xlzyvqe x1lliihq x15vhz18\" /> : <ClockGlyph className=\"xlzyvqe x1lliihq x15vhz18\" />}\n </IconButton>\n <div className=\"x78zum5 x126z3so\">\n <Button slot=\"close\" variant=\"text\">\n {cancelLabel}\n </Button>\n <Button onPress={confirm} slot=\"close\" variant=\"text\">\n {confirmLabel}\n </Button>\n </div>\n </div>\n </RACDialog>;\n}\n\n/**\n * Whether the reader's clock has twelve hours. `hourCycle` decides when it\n * is given, as it does for React Aria's segments; otherwise the locale does.\n */\nfunction usesTwelveHours(locale: string, hourCycle: 12 | 24 | undefined) {\n if (hourCycle !== undefined) {\n return hourCycle === 12;\n }\n return new Intl.DateTimeFormat(locale, {\n hour: 'numeric'\n }).resolvedOptions().hour12 ?? false;\n}\nexport type { TimePickerMode, TimePick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EAAA,MAAAS;EAAAT,EAAA,MAAAiE;EAAAjE,EAAA,MAAAmE;EAAAnE,EAAA,OAAAoE;EAAApE,EAAA,OAAA0E;EAAA1E,EAAA,OAAAyF;CAAA,OAAAA,MAAAzF,EAAA;CAAA,OAlEPyF;AAkEO;;;;;AAnOhB,SAAAwF,MAAAnM,OAAA;CAAA,OA2M+B,oBAAA,QAAA;EAAuB,kBAAA;EAAqC,YAAA;EAAY,GAAAA,MAAK3B;EAAO,GAAA2B,MAAK1B;EAAE,GAAM;GAAAuN,GACrH,EAAAxM,WACU,sDACb;GAACyM,GACE,EAAAzM,WACU,uDACb;EACF,EAAE,CAAC,CAACW,MAAK9B,cAAe;EACf8B,UAAAA,MAAK5B;CACD,GATkD4B,MAAK7B,GASvD;AAAA;AAsBnB,SAASqK,gBAAgBnG,QAAgBsF,WAAgC;CACvE,IAAIA,cAAcrG,KAAAA,GAChB,OAAOqG,cAAc;CAEvB,OAAO,IAAIzF,KAAK6B,eAAe1B,QAAQ,EACrC2B,MAAM,UACR,CAAC,CAAC,CAACoI,gBAAgB,CAAC,CAACnI,UAAU;AACjC"}
1
+ {"version":3,"file":"index.js","names":["_c","getLocalTimeZone","Time","toCalendarDateTime","today","stylex","useContext","useId","useRef","useState","LabelContext","RACDialog","RACTimeField","TimeFieldStateContext","useLocale","useSlottedContext","fieldStyles","invalidFrom","useFieldValidationBehavior","useMessages","renderSegment","segmentStyles","mergeStatefulStyles","overlay","picker","triggerClassName","DIAL","CENTRE","OUTER_RING","INNER_RING","HANDLE","MORNING","AFTERNOON","INVISIBLE","styles","centre","kGNEyG","k1xSpc","kjj79g","kmVPX3","$$css","dialog","periodButton","kWkggS","kMzoRj","kB7OPa","kMwMTN","kkrTdU","kCS8Yb","kzQI83","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","kogj98","kjBf7l","kInvED","k3XXqK","kMeerF","periodDivider","kLZC3w","kPef9Z","kEafiO","periodHovered","periodSelected","periodSelectedHovered","ring","selector","kZKoxP","kVAM5u","kaIpWk","ksu8eU","knGrYV","kcqcaj","kzqmXN","selectorHovered","selectorInput","selectorInputFocused","selectorSelected","selectorSelectedHovered","isSelected","key","text","x","y","isFocusVisible","isHovered","isFocused","cancelLabel","className","confirmLabel","container","defaultMode","defaultOpen","description","enterTimeLabel","error","floatingLabel","isOpen","label","leadingIcon","onOpenChange","selectTimeLabel","variant","asDateTime","time","boxClassName","isDial","isFollowed","state","props","clockTrigger","isDisabled","onPress","ClockTrigger","t0","$","id","fieldLabel","t1","undefined","t2","Symbol","for","triggerGlyph","t3","dialLabel","turn","radius","polar","fieldName","names","Intl","DisplayNames","field","locale","name","of","charAt","toLocaleUpperCase","slice","initialTime","placeholderValue","held","value","labelsFor","part","twelveHour","steps","Array","from","length","_","step","digits","NumberFormat","minimumIntegerDigits","map","format","minute","hours","DateTimeFormat","hour","hour12","offset","partOf","type","formatToParts","Date","find","String","periodAmClassName","periodClassName","divider","periodPmClassName","angle","Math","PI","sin","cos","TimePicker","t4","isReadOnly","t5","t6","validationBehavior","messages","ownOpen","setOwnOpen","open","t7","next","changeOpen","t8","openModal","T0","t9","t10","root","t11","isRequired","t12","t13","selectTime","t14","t15","input","t16","t17","t18","scrim","t19","cancel","t20","confirm","t21","enterTime","t22","granularity","t23","t24","hourCycle","t25","t26","TimePickerDialog","draft","setDraft","mode","setMode","setPart","headingId","labelContext","boxes","dragging","usesTwelveHours","switchMode","periods","isAfternoon","showsMinutes","shown","handle","box","current","querySelector","HTMLElement","focus","focusBox","event","type_0","target","getAttribute","followFocus","changeDraft","event_0","box_0","currentTarget","getBoundingClientRect","clientX","left","width","clientY","top","height","atan2","distance","hypot","set","round","inner","pick","event_1","pointerType","button","preventDefault","setPointerCapture","pointerId","startPicking","event_2","continuePicking","stopPicking","keys","afternoon","has","choosePeriod","setValue","segment","replaceAll","0","1","renderBox","labels","between","modalDialog","_temp","resolvedOptions","RACButton","RACTimeField","RACDateInput","RACDateSegment","Button"],"sources":["../../../src/components/time-picker/index.tsx"],"sourcesContent":["'use client';\n\nimport type { CalendarDateTime, ZonedDateTime } from '@internationalized/date';\nimport type { FocusEvent, PointerEvent, ReactElement, ReactNode, RefAttributes } from 'react';\nimport type { TimeFieldProps as RACTimeFieldProps, Selection, TimeFieldState, TimeValue } from 'react-aria-components';\nimport { getLocalTimeZone, Time, toCalendarDateTime, today } from '@internationalized/date';\nimport * as stylex from '@stylexjs/stylex';\nimport { useCallback, useContext, useId, useRef, useState } from 'react';\nimport { Heading, LabelContext, Modal, ModalOverlay, Button as RACButton, DateInput as RACDateInput, DateSegment as RACDateSegment, Dialog as RACDialog, TimeField as RACTimeField, TimeFieldStateContext, ToggleButton, ToggleButtonGroup, useLocale, useSlottedContext } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { FieldBox, FieldMessage, FieldSegments } from '../../field';\nimport { fieldStyles, invalidFrom, useFieldValidationBehavior } from '../../field/root';\nimport { ClockGlyph, KeyboardGlyph } from '../../glyphs';\nimport { useMessages } from '../../i18n';\nimport { renderSegment } from '../../segments';\nimport { segmentStyles } from '../../segments/styles';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay } from '../../styles/overlay';\nimport { picker, triggerClassName } from '../../styles/picker';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, motion, radii, shadows, sizing, spacing, stateLayerOpacity, typography } from '../../tokens/design.tokens.stylex';\nimport Button from '../button';\nimport IconButton from '../icon-button';\n\n// The time pickers page's picker: TimeField's segments, with a clock button\n// in the field's trailing slot that opens the page's modal over a scrim. A\n// time is typed into the field or picked in the modal, and the modal's OK is\n// what writes a picked time back.\n//\n// **Modal at every width.** The page has no docked time picker, so unlike\n// DatePicker nothing here changes at a breakpoint: the container is centred\n// over the scrim on a phone and on a desktop alike.\n//\n// **The modal is the page's vertical layout, in both of its variants.** The\n// dial: a label-medium headline on surface variant, then the time selector —\n// an hour and a minute box, 96 by 80dp at the small corner in display-large,\n// on surface container highest and on primary container once selected, with\n// 24dp for the colon between — and beside them the period selector, 52 by\n// 80dp, outlined, its chosen half on tertiary container. Under them, 36dp\n// down, the 256dp dial on surface container highest: labels in body-large,\n// the 48dp handle and 2dp hand in primary, an 8dp centre, and the label under\n// the handle in on primary. The input variant drops the dial and draws the\n// boxes as text fields, 96 by 72dp in display-medium, the focused one on\n// primary container with a 2dp primary outline, each named underneath in\n// body-small, and the period selector at the same 72dp. Both put the\n// keyboard or clock toggle at the actions' start and the text buttons at\n// their end, inside a container on surface container high at the\n// extra-large corner, level 3, with 24dp of padding.\n//\n// **The boxes are a TimeField of their own**, React Aria's, inside the\n// modal: its hour and minute segments drawn as the page's boxes. That makes\n// them spinbuttons with React Aria's arrow keys, typing, digits and names in\n// the reader's locale, and it is the same accessible model in both variants,\n// which differ in how the boxes are drawn rather than in what they are. The\n// day period stays a segment for React Aria's sake but is hidden, and the\n// period selector beside the boxes takes its place, as a radio group of the\n// locale's two words for it. The dial is a pointer affordance over the\n// spinbuttons and is hidden from assistive technology: everything it sets,\n// the boxes set too.\n//\n// **The dial does not mirror.** A clock face is the same in either writing\n// direction, so it is drawn and read in screen coordinates, three o'clock on\n// the right. The row above it follows the field's own order, as TimeField's\n// segments do, so in a right-to-left locale the period selector sits on the\n// left.\n//\n// Twenty-four hours put the day's second half on an inner ring, 12 at its top\n// and 00 at the outer ring's, with no period selector, and whether there is\n// one at all is the reader's locale or `hourCycle`, as it is in TimeField.\n\nconst FORCED_COLORS = '@media (forced-colors: active)';\n\n// The dial's geometry, in the units of its viewBox, which it draws at the\n// page's 256dp: the radius of the outer and inner rings of labels and of the\n// handle that sits on them. The inner ring sits far enough in that a handle on\n// it clears the outer ring's labels.\nconst DIAL = 256;\nconst CENTRE = DIAL / 2;\nconst OUTER_RING = 101;\nconst INNER_RING = 64;\nconst HANDLE = 24;\n\n// The period selector's selection, hoisted so each is one stable array\n// rather than a fresh one per render.\nconst MORNING = ['am'];\nconst AFTERNOON = ['pm'];\n\n// React Aria's literal segments carry the locale's bidirectional marks beside\n// the punctuation, so a literal is drawn only when something else is left.\nconst INVISIBLE = /[\\s؜‎‏‪-‮⁦-⁩]/gu;\nconst scaleIn = \"xnirehn-B\";\nconst styles = {\n centre: {\n kGNEyG: \"x6s0dn4\",\n k1xSpc: \"x78zum5\",\n kjj79g: \"xl56j7k\",\n kmVPX3: \"x1a7rqcl\",\n $$css: true\n },\n dialog: {\n kmVPX3: \"x1apw6a7\",\n $$css: true\n },\n periodButton: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"xjbqb8w\",\n kMzoRj: \"xc342km\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x78zum5\",\n kCS8Yb: \"x1r8uery\",\n kzQI83: \"x1iyjqo2\",\n kMv6JI: \"x46eyla\",\n kGuDYH: \"x5ehqhr\",\n k63SB2: \"xrf6cl6\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1g135zh\",\n kLWn49: \"x1ggk5va\",\n kogj98: \"x1ghz6dp\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x2ssjo2\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n kmVPX3: \"x1717udv\",\n $$css: true\n },\n periodDivider: {\n kLZC3w: \"xrre44y\",\n kPef9Z: \"x13fuv20\",\n kEafiO: \"x178xt8z\",\n $$css: true\n },\n periodHovered: {\n kWkggS: \"x14noynh\",\n $$css: true\n },\n periodSelected: {\n kWkggS: \"xs6yvni x1jzqe4\",\n kMwMTN: \"x3cbcwg x1k5gbb1\",\n $$css: true\n },\n periodSelectedHovered: {\n kWkggS: \"x5nnyxq x1jzqe4\",\n $$css: true\n },\n ring: {\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n selector: {\n kGNEyG: \"x6s0dn4\",\n kWkggS: \"x1rrhr5q\",\n kZKoxP: \"xwzfr38\",\n kVAM5u: \"x1ylmb6m\",\n kaIpWk: \"x1xdvaa9\",\n ksu8eU: \"xx61lck\",\n kMzoRj: \"xc342km x13rsnn2\",\n kB7OPa: \"x9f619\",\n knGrYV: \"xbuiw85\",\n kMwMTN: \"x139gbkf\",\n kkrTdU: \"x1ypdohk\",\n k1xSpc: \"x3nfvp2\",\n kMv6JI: \"xjaampf\",\n kGuDYH: \"xuyiek4\",\n kcqcaj: \"xss6m8b\",\n k63SB2: \"x1n2oj23\",\n kzqmXN: \"xszbqgh\",\n kjj79g: \"xl56j7k\",\n kb6lSQ: \"x1hxa6v5\",\n kLWn49: \"x1iwmiir\",\n kjBf7l: \"xrgy624\",\n kInvED: \"x1hl8ikr\",\n k3XXqK: \"x1t137rt\",\n kMeerF: \"x1de99jn\",\n $$css: true\n },\n selectorHovered: {\n kWkggS: \"xpae8dx\",\n $$css: true\n },\n selectorInput: {\n kZKoxP: \"xfl6q2h\",\n kkrTdU: \"x1ed109x\",\n kMv6JI: \"x1gi70vc\",\n kGuDYH: \"xlzzeuu\",\n k63SB2: \"xh9quta\",\n kb6lSQ: \"x148mp24\",\n kLWn49: \"xs5hucj\",\n $$css: true\n },\n selectorInputFocused: {\n kInvED: \"x2ssjo2\",\n k3XXqK: \"xaatb59\",\n $$css: true\n },\n selectorSelected: {\n kWkggS: \"xp89om9 x1jzqe4\",\n kMwMTN: \"xscdzaa x1k5gbb1\",\n $$css: true\n },\n selectorSelectedHovered: {\n kWkggS: \"xq1oky0 x1jzqe4\",\n $$css: true\n }\n};\n\n// One label on the dial, placed on its ring.\ntype DialLabel = {\n isSelected: boolean;\n key: string;\n text: string;\n x: number;\n y: number;\n};\n\n// The state React Aria hands a half of the period selector's className.\ntype PeriodState = {\n isFocusVisible: boolean;\n isHovered: boolean;\n isSelected: boolean;\n};\n\n// What React Aria hands the input for each part of the time. Taken off the\n// component, for the reason src/segments gives.\ntype Segment = Parameters<NonNullable<Parameters<typeof RACDateInput>[0]['children']>>[0];\n\n// The state React Aria hands a segment's className.\ntype SegmentState = {\n isFocused: boolean;\n isFocusVisible: boolean;\n isHovered: boolean;\n};\n\n// The parts of a time the dial and the boxes set.\ntype TimePart = 'hour' | 'minute';\n\n/** Which of the time pickers page's two variants the modal shows. */\ntype TimePickerMode = 'dial' | 'input';\ntype TimePickerProps<T extends TimeValue = TimeValue> = Omit<RACTimeFieldProps<T>, 'children' | 'className' | 'style'> & {\n /**\n * What the modal's dismissing action says. Left out, it is the word for\n * it in the I18nProvider's locale — \"Cancel\" in English.\n */\n cancelLabel?: string;\n /** A function may compute the class from the field's render state. */\n className?: RACTimeFieldProps<T>['className'];\n /**\n * What the modal's confirming action says. Left out, it is the word for\n * it in the I18nProvider's locale — \"OK\" in English.\n */\n confirmLabel?: string;\n /**\n * Where to portal the modal and its scrim. Defaults to the container of the\n * `ThemeScope` around it, which keeps the modal on that scope's tokens, or to\n * the end of `<body>` where there is none. A subtree themed through the\n * `themeScope` class has no container of its own, so point this inside it, or\n * the modal renders outside and keeps the page's tokens.\n */\n container?: Element;\n /**\n * Which variant the modal opens on: the dial, or the boxes as text fields\n * to type into. The button at the modal's start switches between them.\n * @default 'dial'\n */\n defaultMode?: TimePickerMode;\n /** Whether the modal starts open, when it keeps its own state. */\n defaultOpen?: boolean;\n /** Supporting text under the field. */\n description?: string;\n /**\n * The input variant's headline, which also names the button that switches\n * the dial to it. Left out, it is the I18nProvider's locale's — \"Enter\n * time\" in English.\n */\n enterTimeLabel?: string;\n /**\n * The message shown instead of the description, which also marks the\n * field invalid.\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 floats into the box's top once the field holds a\n * value, rather than sitting above it.\n * @default true\n */\n floatingLabel?: boolean;\n /** Whether the modal is open, when the call site holds the state. */\n isOpen?: boolean;\n /** What the field is for. Always rendered; never a placeholder. */\n label: string;\n /**\n * An icon at the box's leading end, in the page's 24dp size. An icon drawn\n * in `em` takes that size from the slot.\n */\n leadingIcon?: ReactNode;\n /** Called with the modal's new state when it opens or closes. */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * The dial's headline, which also names the clock button that opens the\n * modal, followed by the field's label, and the button that switches the\n * input variant back. Left out, it is the I18nProvider's locale's —\n * \"Select time\" in English.\n */\n selectTimeLabel?: string;\n /** A function may compute the style from the field's render state. */\n style?: RACTimeFieldProps<T>['style'];\n /**\n * Which of the text fields page's two boxes to draw.\n * @default 'filled'\n */\n variant?: FieldVariant;\n};\n\n/**\n * A picked time as the field's state takes it, which is always a date and\n * time: React Aria puts a bare time on today and takes the date off again on\n * the way out.\n */\nfunction asDateTime(time: TimeValue): CalendarDateTime | ZonedDateTime {\n return 'day' in time ? time : toCalendarDateTime(today(getLocalTimeZone()), time);\n}\n\n// An hour or a minute box's classes, from React Aria's render state. On the\n// dial the selected box is the one the dial follows; typed into, it is the\n// one with focus, which is what the page's input variant draws as focused.\nfunction boxClassName(isDial: boolean, isFollowed: boolean) {\n return (state: SegmentState) => {\n const isSelected = isDial ? isFollowed : state.isFocused;\n return stylex.props(styles.selector, !isDial && styles.selectorInput, state.isHovered && styles.selectorHovered, isSelected && styles.selectorSelected, isSelected && state.isHovered && styles.selectorSelectedHovered, isDial && state.isFocusVisible && styles.ring, !isDial && state.isFocused && styles.selectorInputFocused).className ?? '';\n };\n}\n\n// Built by a call rather than written inline at the prop, which is what\n// react-perf's no-jsx-as-prop is after — the same reason DatePicker builds\n// its trigger this way.\nfunction clockTrigger(isDisabled: boolean, isOpen: boolean, label: string, onPress: () => void) {\n return <ClockTrigger isDisabled={isDisabled} isOpen={isOpen} label={label} onPress={onPress} />;\n}\n\n// The clock button in the field's trailing slot. It is named by its own\n// words followed by the field's label, which is how React Aria names\n// DatePicker's calendar button, so two pickers on a form are told apart.\nfunction ClockTrigger({\n isDisabled,\n isOpen,\n label,\n onPress\n}: {\n isDisabled: boolean;\n isOpen: boolean;\n label: string;\n onPress: () => void;\n}) {\n const id = useId();\n const fieldLabel = useSlottedContext(LabelContext);\n return <RACButton aria-expanded={isOpen} aria-haspopup=\"dialog\" aria-label={label} aria-labelledby={fieldLabel?.id === undefined ? undefined : `${id} ${fieldLabel.id}`} className={triggerClassName} id={id} isDisabled={isDisabled} onPress={onPress}>\n <ClockGlyph {...stylex.props(picker.triggerGlyph)} />\n </RACButton>;\n}\n\n/** One label, placed a fraction of a turn round a ring. */\nfunction dialLabel(key: string, text: string, isSelected: boolean, turn: number, radius: number): DialLabel {\n const {\n x,\n y\n } = polar(turn, radius);\n return {\n isSelected,\n key,\n text,\n x,\n y\n };\n}\n\n/** A field's name as the locale writes it, opening with a capital. */\nfunction fieldName(names: Intl.DisplayNames, field: string, locale: string) {\n const name = names.of(field) ?? field;\n return name.charAt(0).toLocaleUpperCase(locale) + name.slice(1);\n}\n\n/**\n * The time the modal opens on: the field's own, else its placeholder, else\n * midnight. A date and time keeps its date, so the field gets back what it\n * holds.\n */\nfunction initialTime(field: null | TimeFieldState, placeholderValue: TimeValue | undefined): TimeValue {\n const held = field?.value;\n if (held !== null && held !== undefined && 'hour' in held) {\n return held;\n }\n return placeholderValue ?? new Time();\n}\n\n/** The labels the dial draws for one part, in the reader's digits. */\nfunction labelsFor(part: TimePart, time: TimeValue, locale: string, twelveHour: boolean): DialLabel[] {\n const steps = Array.from({\n length: 12\n }, (_, step) => step);\n if (part === 'minute') {\n const digits = new Intl.NumberFormat(locale, {\n minimumIntegerDigits: 2\n });\n return steps.map(step => dialLabel(`m${step}`, digits.format(step * 5), time.minute === step * 5, step / 12, OUTER_RING));\n }\n const hours = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: twelveHour\n });\n if (twelveHour) {\n const offset = time.hour >= 12 ? 12 : 0;\n return steps.map(step => dialLabel(`h${step}`, partOf(hours, step + offset, 'hour'), time.hour % 12 === step, step / 12, OUTER_RING));\n }\n return [...steps.map(step => dialLabel(`h${step}`, partOf(hours, step, 'hour'), time.hour === step, step / 12, OUTER_RING)), ...steps.map(step => dialLabel(`h${step + 12}`, partOf(hours, step + 12, 'hour'), time.hour === step + 12, step / 12, INNER_RING))];\n}\n\n/** The part of a formatted time a formatter writes for one hour of the day. */\nfunction partOf(format: Intl.DateTimeFormat, hour: number, type: 'dayPeriod' | 'hour') {\n return format.formatToParts(new Date(2000, 0, 1, hour)).find(part => part.type === type)?.value ?? String(hour);\n}\n\n// The period selector's morning half, with no rule above it.\nfunction periodAmClassName(state: PeriodState) {\n return periodClassName(state, false);\n}\n\n// A half of the period selector, from React Aria's render state. The second\n// half draws the rule between the two.\nfunction periodClassName(state: PeriodState, divider: boolean) {\n return stylex.props(styles.periodButton, divider && styles.periodDivider, state.isHovered && styles.periodHovered, state.isSelected && styles.periodSelected, state.isSelected && state.isHovered && styles.periodSelectedHovered, state.isFocusVisible && styles.ring).className ?? '';\n}\n\n// Its afternoon half, under the rule between the two.\nfunction periodPmClassName(state: PeriodState) {\n return periodClassName(state, true);\n}\n\n/** Where a fraction of a turn clockwise from twelve lands on a ring. */\nfunction polar(turn: number, radius: number) {\n const angle = turn * 2 * Math.PI;\n return {\n x: CENTRE + radius * Math.sin(angle),\n y: CENTRE - radius * Math.cos(angle)\n };\n}\n\n/**\n * A time typed into a field, or picked in a modal behind the clock button\n * at the field's end — on a dial, or typed into the modal's larger boxes.\n * The value is React Aria's — pass `value` with `onChange` to control it,\n * or `defaultValue` — as a `Time` from this package's `./date` subpath.\n *\n * ```tsx\n * import { Time } from '@kanso-labs/kanso-ui/date'\n *\n * <TimePicker defaultValue={new Time(9, 30)} label=\"Label\" />\n * ```\n *\n * The field is `TimeField`'s, so `granularity`, `hourCycle`, `minValue` and\n * `maxValue` behave as they do there. The modal sets hours and minutes and\n * keeps the seconds a value already has; a time it writes back is checked\n * against the bounds as a typed one is. Whether it shows a twelve or\n * twenty-four hour clock is the reader's locale, through React Aria's\n * `I18nProvider`, unless `hourCycle` says otherwise.\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 TimePicker<T extends TimeValue>({\n cancelLabel,\n confirmLabel,\n container,\n defaultMode = 'dial',\n defaultOpen = false,\n description,\n enterTimeLabel,\n error,\n floatingLabel = true,\n isDisabled = false,\n isOpen,\n isReadOnly = false,\n label,\n leadingIcon,\n onOpenChange,\n selectTimeLabel,\n variant = 'filled',\n ...props\n}: RefAttributes<HTMLDivElement> & TimePickerProps<T>) {\n const validationBehavior = useFieldValidationBehavior();\n const messages = useMessages();\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 const openModal = useCallback(() => {\n changeOpen(true);\n }, [changeOpen]);\n return <RACTimeField<T> isDisabled={isDisabled} isInvalid={invalidFrom(error)} isReadOnly={isReadOnly} validationBehavior={validationBehavior} {...props} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <FieldBox floatingLabel={floatingLabel}\n // Always populated, for the reason TimeField's own comment gives.\n isPopulated isRequired={props.isRequired} label={label} leading={leadingIcon}\n // In the chrome's trailing slot, where DatePicker puts its calendar\n // button and for the same reasons.\n trailing={clockTrigger(isDisabled || isReadOnly, open, selectTimeLabel ?? messages.selectTime, openModal)} variant={variant}>\n <FieldSegments>\n <RACDateInput {...stylex.props(segmentStyles.input)}>\n {renderSegment}\n </RACDateInput>\n </FieldSegments>\n </FieldBox>\n <FieldMessage description={description} error={error} />\n <ModalOverlay isDismissable isOpen={open} onOpenChange={changeOpen}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...stylex.props(overlay.scrim, styles.centre)}>\n <Modal className=\"x1n1nwrg x1u6grsq xbhiib0 x16dv9tl xvkjz1l x1w1tqly x19pkqky xx61lck x13rsnn2 x1udv5rz x9f619 x139gbkf xi55695 xmz0i5r x193iq5w xysyzu8\">\n <TimePickerDialog cancelLabel={cancelLabel ?? messages.cancel} confirmLabel={confirmLabel ?? messages.confirm} defaultMode={defaultMode} enterTimeLabel={enterTimeLabel ?? messages.enterTime} fieldLabel={label} granularity={props.granularity === 'hour' ? 'hour' : 'minute'} hourCycle={props.hourCycle} placeholderValue={props.placeholderValue} selectTimeLabel={selectTimeLabel ?? messages.selectTime} />\n </Modal>\n </ModalOverlay>\n </RACTimeField>;\n}\n\n/**\n * The modal's content, mounted each time it opens: the time it was opened\n * with is its draft until OK writes the draft into the field, or the modal\n * closes without it.\n */\nfunction TimePickerDialog({\n cancelLabel,\n confirmLabel,\n defaultMode,\n enterTimeLabel,\n fieldLabel,\n granularity,\n hourCycle,\n placeholderValue,\n selectTimeLabel\n}: {\n cancelLabel: string;\n confirmLabel: string;\n defaultMode: TimePickerMode;\n enterTimeLabel: string;\n fieldLabel: string;\n granularity: 'hour' | 'minute';\n hourCycle: 12 | 24 | undefined;\n placeholderValue: TimeValue | undefined;\n selectTimeLabel: string;\n}) {\n const {\n locale\n } = useLocale();\n // The outer field's state: the modal reads the time from it and writes the\n // picked one back through it, so the field stays the one owner of its\n // value, controlled or not, and its onChange is React Aria's own.\n const field = useContext(TimeFieldStateContext);\n const [draft, setDraft] = useState(() => initialTime(field, placeholderValue));\n const [mode, setMode] = useState(defaultMode);\n const [part, setPart] = useState<TimePart>('hour');\n const headingId = useId();\n const labelContext = useSlottedContext(LabelContext);\n const boxes = useRef<HTMLDivElement>(null);\n const dragging = useRef(false);\n const twelveHour = usesTwelveHours(locale, hourCycle);\n const names = new Intl.DisplayNames(locale, {\n type: 'dateTimeField'\n });\n const periods = new Intl.DateTimeFormat(locale, {\n hour: 'numeric',\n hour12: true\n });\n const isAfternoon = draft.hour >= 12;\n const isDial = mode === 'dial';\n const showsMinutes = granularity === 'minute';\n const shown: TimePart = showsMinutes ? part : 'hour';\n const handle = shown === 'minute' ? polar(draft.minute / 60, OUTER_RING) : polar(draft.hour % 12 / 12, !twelveHour && draft.hour >= 12 ? INNER_RING : OUTER_RING);\n const focusBox = useCallback((type: TimePart) => {\n const box = boxes.current?.querySelector(`[data-type=\"${type}\"]`);\n if (box instanceof HTMLElement) {\n box.focus();\n }\n }, []);\n\n // Which box the dial follows, taken from the box that has focus — a press\n // on a box, a Tab into it, or React Aria moving on once an hour is typed.\n const followFocus = useCallback((event: FocusEvent<HTMLDivElement>) => {\n const type = event.target.getAttribute('data-type');\n if (type === 'hour' || type === 'minute') {\n setPart(type);\n }\n }, []);\n const changeDraft = useCallback((next: null | TimeValue) => {\n if (next !== null) {\n setDraft(next);\n }\n }, []);\n const pick = useCallback((event: PointerEvent<SVGSVGElement>) => {\n const box = event.currentTarget.getBoundingClientRect();\n const x = event.clientX - box.left - box.width / 2;\n const y = event.clientY - box.top - box.height / 2;\n const turn = (Math.atan2(x, -y) / (2 * Math.PI) + 1) % 1;\n const distance = Math.hypot(x, y) * DIAL / box.width;\n if (shown === 'minute') {\n setDraft(draft.set({\n minute: Math.round(turn * 60) % 60\n }));\n return;\n }\n const step = Math.round(turn * 12) % 12;\n if (twelveHour) {\n setDraft(draft.set({\n hour: step + (isAfternoon ? 12 : 0)\n }));\n return;\n }\n const inner = distance < (OUTER_RING + INNER_RING) / 2;\n setDraft(draft.set({\n hour: inner ? step + 12 : step\n }));\n }, [draft, isAfternoon, shown, twelveHour]);\n const startPicking = useCallback((event: PointerEvent<SVGSVGElement>) => {\n if (event.pointerType === 'mouse' && event.button !== 0) {\n return;\n }\n // Keeps focus where it is: the dial is not a focus stop, and a press on\n // it would otherwise blur the box it is setting.\n event.preventDefault();\n try {\n event.currentTarget.setPointerCapture(event.pointerId);\n } catch {\n // A pointer the browser is not tracking has no capture to take — a\n // synthetic event in a test, where the moves land on the dial anyway.\n }\n dragging.current = true;\n pick(event);\n }, [pick]);\n const continuePicking = useCallback((event: PointerEvent<SVGSVGElement>) => {\n if (dragging.current) {\n pick(event);\n }\n }, [pick]);\n\n // An hour picked on the dial moves on to the minutes, as the page does.\n const stopPicking = useCallback(() => {\n if (!dragging.current) {\n return;\n }\n dragging.current = false;\n if (shown === 'hour' && showsMinutes) {\n setPart('minute');\n focusBox('minute');\n }\n }, [focusBox, shown, showsMinutes]);\n const switchMode = useCallback(() => {\n setMode(isDial ? 'input' : 'dial');\n focusBox(part);\n }, [focusBox, isDial, part]);\n const choosePeriod = useCallback((keys: Selection) => {\n const afternoon = keys !== 'all' && keys.has('pm');\n if (afternoon !== isAfternoon) {\n setDraft(draft.set({\n hour: draft.hour % 12 + (afternoon ? 12 : 0)\n }));\n }\n }, [draft, isAfternoon]);\n\n // OK writes the draft through the field's state, and its `slot` closes the\n // modal after.\n const confirm = useCallback(() => {\n field?.setValue(asDateTime(draft));\n }, [draft, field]);\n const renderBox = useCallback((segment: Segment): ReactElement => {\n if (segment.type === 'hour' || segment.type === 'minute') {\n return <RACDateSegment className={boxClassName(isDial, shown === segment.type)} segment={segment} />;\n }\n if (segment.type === 'literal' && segment.text.replaceAll(INVISIBLE, '') !== '') {\n return <RACDateSegment {...{\n 0: {\n className: \"x6s0dn4 xwzfr38 x9f619 x139gbkf x3nfvp2 xjaampf xuyiek4 x1n2oj23 xvy4d1p xl56j7k x1iwmiir\"\n },\n 1: {\n className: \"x6s0dn4 x9f619 x139gbkf x3nfvp2 xvy4d1p xl56j7k xfl6q2h x1gi70vc xlzzeuu xh9quta xs5hucj\"\n }\n }[!!!isDial << 0]} segment={segment} />;\n }\n return <RACDateSegment hidden segment={segment} />;\n }, [isDial, shown]);\n const labels = labelsFor(shown, draft, locale, twelveHour);\n const between = shown === 'minute' && draft.minute % 5 !== 0;\n return <RACDialog aria-labelledby={labelContext?.id === undefined ? headingId : `${headingId} ${labelContext.id}`} {...stylex.props(overlay.modalDialog, styles.dialog)}>\n <Heading id={headingId} level={2} className=\"x9f619 x1w5n3ug xp6n8n2 xkucv67 x14hhc5u x12utw95 xvzb9hk x1ghz6dp xieb3on\">\n {isDial ? selectTimeLabel : enterTimeLabel}\n </Heading>\n <div className=\"x1cy8zhl x9f619 x78zum5 x1gka490 xl56j7k\">\n <div onFocus={followFocus} ref={boxes}>\n <RACTimeField aria-label={fieldLabel} granularity={granularity} hideTimeZone hourCycle={hourCycle} onChange={changeDraft} shouldForceLeadingZeros validationBehavior=\"aria\" value={draft}>\n <RACDateInput className=\"x6s0dn4 x9f619 x78zum5 x1t137rt\">\n {renderBox}\n </RACDateInput>\n </RACTimeField>\n {isDial ? null : <div aria-hidden=\"true\" className=\"x9f619 x1w5n3ug x78zum5 x1yicsit x1b35g6e x9d6959 x1665zp3 xwth0xh xybisxh x7suny0\">\n <span className=\"x9f619 xszbqgh\">\n {fieldName(names, 'hour', locale)}\n </span>\n {showsMinutes ? <span className=\"x9f619 xszbqgh\">\n {fieldName(names, 'minute', locale)}\n </span> : null}\n </div>}\n </div>\n {twelveHour ? <ToggleButtonGroup aria-label={names.of('dayPeriod')} disallowEmptySelection onSelectionChange={choosePeriod} orientation=\"vertical\" selectedKeys={isAfternoon ? AFTERNOON : MORNING} selectionMode=\"single\" {...{\n 0: {\n className: \"xwzfr38 x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x9f619 x78zum5 xdt5ytf x2lah0s xvni27 xb3r6kr\"\n },\n 1: {\n className: \"x1fwvt7v x1xdvaa9 x1y0btm7 xmkeg23 x9f619 x78zum5 xdt5ytf x2lah0s xvni27 xb3r6kr xfl6q2h\"\n }\n }[!!!isDial << 0]}>\n <ToggleButton className={periodAmClassName} id=\"am\">\n {partOf(periods, 9, 'dayPeriod')}\n </ToggleButton>\n <ToggleButton className={periodPmClassName} id=\"pm\">\n {partOf(periods, 21, 'dayPeriod')}\n </ToggleButton>\n </ToggleButtonGroup> : null}\n </div>\n {isDial ? <svg aria-hidden=\"true\" data-dial={shown} onPointerCancel={stopPicking} onPointerDown={startPicking} onPointerMove={continuePicking} onPointerUp={stopPicking} viewBox={`0 0 ${DIAL} ${DIAL}`} className=\"xrlp1an x9f619 x1ypdohk x1lliihq x2lah0s x1t9vceh xseo6mj xvueqy4 x5ve5x3 x87ps6o\">\n <circle cx={CENTRE} cy={CENTRE} r={CENTRE - 1} className=\"x1a930ss x1h8bevw xeutv01 x8jos32\" />\n <line x1={CENTRE} x2={handle.x} y1={CENTRE} y2={handle.y} className=\"xrr0osq x1rqz208 x1i9vjva xbabvq0 x8pzrqk\" />\n <circle cx={CENTRE} cy={CENTRE} r={4} className=\"xrr0osq x1rqz208 x1i9vjva xbabvq0 x8pzrqk\" />\n <circle cx={handle.x} cy={handle.y} data-handle=\"\" r={HANDLE} className=\"xrr0osq x1rqz208 x1i9vjva xbabvq0 x8pzrqk\" />\n {between ? <circle cx={handle.x} cy={handle.y} r={2} className=\"xvlh3h9 x1bpb6vw\" /> : null}\n {labels.map(label => <text dominantBaseline=\"central\" key={label.key} textAnchor=\"middle\" x={label.x} y={label.y} {...{\n 0: {\n className: \"xti7fmr xmw301f x16svsjw x1848etk x1c52epr x1qn8t5l\"\n },\n 1: {\n className: \"x16svsjw x1848etk x1c52epr x1qn8t5l xvlh3h9 x1bpb6vw\"\n }\n }[!!label.isSelected << 0]}>\n {label.text}\n </text>)}\n </svg> : null}\n <div className=\"x6s0dn4 x9f619 x78zum5 x126z3so x1qughib x1yhnu8z\">\n <IconButton aria-label={isDial ? enterTimeLabel : selectTimeLabel} onPress={switchMode}>\n {isDial ? <KeyboardGlyph className=\"xlzyvqe x1lliihq x15vhz18\" /> : <ClockGlyph className=\"xlzyvqe x1lliihq x15vhz18\" />}\n </IconButton>\n <div className=\"x78zum5 x126z3so\">\n <Button slot=\"close\" variant=\"text\">\n {cancelLabel}\n </Button>\n <Button onPress={confirm} slot=\"close\" variant=\"text\">\n {confirmLabel}\n </Button>\n </div>\n </div>\n </RACDialog>;\n}\n\n/**\n * Whether the reader's clock has twelve hours. `hourCycle` decides when it\n * is given, as it does for React Aria's segments; otherwise the locale does.\n */\nfunction usesTwelveHours(locale: string, hourCycle: 12 | 24 | undefined) {\n if (hourCycle !== undefined) {\n return hourCycle === 12;\n }\n return new Intl.DateTimeFormat(locale, {\n hour: 'numeric'\n }).resolved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xF,EAAA,MAAAS;EAAAT,EAAA,MAAAiE;EAAAjE,EAAA,MAAAmE;EAAAnE,EAAA,OAAAoE;EAAApE,EAAA,OAAA0E;EAAA1E,EAAA,OAAAyF;CAAA,OAAAA,MAAAzF,EAAA;CAAA,OAlEPyF;AAkEO;;;;;AAnOhB,SAAAwF,MAAAlM,OAAA;CAAA,OA2M+B,oBAAA,QAAA;EAAuB,kBAAA;EAAqC,YAAA;EAAY,GAAAA,MAAKhB;EAAO,GAAAgB,MAAKf;EAAE,GAAM;GAAA2M,GACrH,EAAAtM,WACU,sDACb;GAACuM,GACE,EAAAvM,WACU,uDACb;EACF,EAAE,CAAC,CAACU,MAAKnB,cAAe;EACfmB,UAAAA,MAAKjB;CACD,GATkDiB,MAAKlB,GASvD;AAAA;AAsBnB,SAASyJ,gBAAgBnG,QAAgBsF,WAAgC;CACvE,IAAIA,cAAcrG,KAAAA,GAChB,OAAOqG,cAAc;CAEvB,OAAO,IAAIzF,KAAK6B,eAAe1B,QAAQ,EACrC2B,MAAM,UACR,CAAC,CAAC,CAACoI,gBAAgB,CAAC,CAACnI,UAAU;AACjC"}
@@ -81,5 +81,4 @@ type TokenSegment = Parameters<TokenInputProps['children']>[0];
81
81
  * which is the element a layout positions.
82
82
  */
83
83
  declare function TokenField$1<T extends TokenFieldValue = TokenFieldValue>({ description, error, floatingLabel, label, leadingIcon, renderToken, trailingIcon, variant, ...props }: RefAttributes<HTMLDivElement> & TokenFieldProps$1<T>): import("react").JSX.Element;
84
- export { type TokenFieldProps$1 as TokenFieldProps, type TokenSegment, TokenField$1 as default };
85
- //# sourceMappingURL=index.d.ts.map
84
+ export { type TokenFieldProps$1 as TokenFieldProps, type TokenSegment, TokenField$1 as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","TokenFieldProps","RACTokenFieldProps","TokenInputProps","RACTokenInputProps","TokenRenderProps","stylex","useId","useLayoutEffect","useRef","useState","Token","RACToken","TokenField","RACTokenField","TokenInput","RACTokenInput","TokenFieldValue","FieldVariant","chipLabel","chipStyles","FieldBox","FieldMessage","fieldStyles","invalidFrom","focus","mergeStatefulStyles","colors","typography","TOKEN_LINE","styles","token","kXLuUW","$$css","className","T","description","error","floatingLabel","label","leadingIcon","renderToken","segment","TokenSegment","style","trailingIcon","variant","Omit","Parameters","changeHandler","setHeld","value","onChange","isPopulated","undefined","segments","some","text","length","tokenClassName","isSelected","props","base","ring","selected","unselected","tokenContent","t0","$","t1","t2","held","defaultValue","populated","errorId","t3","invalid","describedBy","filter","Boolean","join","area","t4","t5","current","setAttribute","removeAttribute","T0","t6","t7","root","t8","isDisabled","t9","t10","Symbol","for","0","1","t11","t12","t13","t14","t15","t16","stylex.props","RACToken","TokenField","_c","props","RACTokenField","RACTokenInput"],"sources":["../../../src/components/token-field/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { TokenFieldProps as RACTokenFieldProps, TokenInputProps as RACTokenInputProps, TokenRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useId, useLayoutEffect, useRef, useState } from 'react';\nimport { Token as RACToken, TokenField as RACTokenField, TokenInput as RACTokenInput, TokenFieldValue } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { chipLabel } from '../../chip';\nimport { chipStyles } from '../../chip/styles';\nimport { FieldBox, FieldMessage } from '../../field';\nimport { fieldStyles, invalidFrom } from '../../field/root';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, typography } from '../../tokens/design.tokens.stylex';\n\n// The chips page's input chips inside a text field: a field whose value is\n// text with pills in it — a tag input, a mention field, a structured search\n// box. The box, label, supporting line and error are the field chrome in\n// `src/field`, shared with every other field; the pill is the chip module's\n// in `src/chip`, shared with Chip and ChipGroup. What is here is React Aria's\n// `TokenField` around them.\n//\n// The value is React Aria's `TokenFieldValue`, a list of text and token\n// segments rather than a string, and this component does not wrap it. What\n// counts as a token is the whole question a token field exists to answer — a\n// hash tag, an @ mention, a chosen contact — and a wrapper would be a second\n// place to decide it. The class is re-exported from the package so a call\n// site can subclass it and override `tokenize`.\n//\n// Three things are worth knowing.\n//\n// **The editable area is not an input.** React Aria draws a contenteditable\n// element, since a token cannot live inside an `<input>`. So the box is drawn\n// `multiline` and grows with what it holds, and the chrome is told whether it\n// is populated rather than reading an input's value — a token field is the\n// third control the chrome cannot ask, after a select and a picker.\n//\n// **The box's whole height is the editable area.** A press anywhere in the\n// box has to put the caret in the text, so the box is not covered by a press\n// target the way Select's is; React Aria's own element fills the control's\n// place and takes the press.\n//\n// **A token is drawn by the call site, or by this.** `renderToken` takes a\n// segment and returns what the pill holds; without it the pill holds the\n// segment's own text. Either way the pill is the page's, so a token here and\n// a chip elsewhere cannot drift.\n\n// A token's pill is 32dp tall inside a body line of 24, so the control's\n// line makes room for it or the pills overlap once the value wraps. Stated\n// once because the control's floor and its line have to agree, and the\n// clearance under the label is measured from it.\nconst TOKEN_LINE = '32px';\nconst styles = {\n token: {\n kXLuUW: \"xxymvpz\",\n $$css: true\n }\n};\ntype TokenFieldProps<T extends TokenFieldValue = TokenFieldValue> = {\n /** A function may compute the class from the field's render state. */\n className?: RACTokenFieldProps<T>['className'];\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 and the red underline both\n * 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 something. `false` keeps it small at the top in\n * every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * What the field is for. Required rather than optional: a field with no\n * label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * 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 * What each token holds. Given a segment, return what to draw inside its\n * pill; without it the pill holds the segment's own text.\n */\n renderToken?: (segment: TokenSegment) => ReactNode;\n /** A function may compute the style from the field's render state. */\n style?: RACTokenFieldProps<T>['style'];\n /**\n * An icon at the end of the box, after the value: the page's 24dp trailing\n * icon, in the muted role and the error role once the field has an error.\n * An icon drawn in `em` takes that size from the slot.\n */\n trailingIcon?: 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<RACTokenFieldProps<T>, 'children' | 'className' | 'style'>;\n\n// One token, as React Aria hands it to the editable area's render function.\n// Taken from that prop rather than imported, since the type lives in\n// `react-stately`, which this package does not depend on directly.\ntype TokenSegment = Parameters<RACTokenInputProps['children']>[0];\n\n// Keeps the mirrored copy in step and then hands the change on to the call\n// site. Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its input.\nfunction changeHandler<T extends TokenFieldValue>(setHeld: (value: T) => void, onChange: ((value: T) => void) | undefined) {\n return (value: T) => {\n setHeld(value);\n onChange?.(value);\n };\n}\n\n// Whether the field holds anything, for the floating label. A token field's\n// editable area is a contenteditable element rather than an input, so the\n// chrome cannot read a value off it and is told instead.\nfunction isPopulated(value: TokenFieldValue | undefined) {\n if (value === undefined) {\n return undefined;\n }\n return value.segments.some(segment => segment.text.length > 0);\n}\n\n// What each token draws. Built by a call rather than written inline at the\n// prop, which is what react-perf's no-new-function-as-prop is after; the\n// React Compiler memoises the result on its input.\n// A token is the chip it looks like: unselected at rest, and the selected\n// chip — Material's selected input chip — once the selection covers it. A\n// click selects the whole token, since React Aria gives it\n// `user-select: all`, and so does the keyboard's selection running across\n// it; either way it is the token Backspace removes next, and this is what\n// says so.\nfunction tokenClassName({\n isSelected\n}: TokenRenderProps) {\n return stylex.props(chipStyles.base, focus.ring, isSelected ? chipStyles.selected : chipStyles.unselected, styles.token).className ?? '';\n}\nfunction tokenContent(renderToken: TokenFieldProps['renderToken']) {\n return (segment: TokenSegment) => <RACToken className={tokenClassName}>\n {chipLabel(renderToken === undefined ? segment.text : renderToken(segment))}\n </RACToken>;\n}\n\n/**\n * A labelled field whose value is text with inline tokens — a tag input, a\n * mention field, a structured search box. Its value is React Aria's\n * `TokenFieldValue`: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own.\n *\n * ```tsx\n * const [value, setValue] = useState(new TokenFieldValue([]))\n *\n * <TokenField label=\"Label\" onChange={setValue} value={value} />\n * ```\n *\n * What counts as a token is the call site's: subclass `TokenFieldValue` and\n * override `tokenize`, which the package re-exports for that. `renderToken`\n * decides what each pill holds; without it, the segment's own text.\n *\n * The box, label, supporting line and error are the field chrome in\n * `src/field`, and the pill is the chip module's, shared with Chip and\n * ChipGroup.\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 TokenField<T extends TokenFieldValue = TokenFieldValue>({\n description,\n error,\n floatingLabel = true,\n label,\n leadingIcon,\n renderToken,\n trailingIcon,\n variant = 'filled',\n ...props\n}: RefAttributes<HTMLDivElement> & TokenFieldProps<T>) {\n // A copy of what the field holds, kept only so the label can float from\n // it. React Aria's token field reports `isDisabled` and `isReadOnly`\n // through its render props and not its value, and it hands its state down\n // a context of its own that nothing outside the module can read — so an\n // uncontrolled field has no other way to say what it is holding now.\n //\n // This mirrors rather than controls: `defaultValue` still goes through, so\n // React Aria keeps owning the value and the editing it does with it. A\n // controlled field is read straight off the prop, which already moves.\n const [held, setHeld] = useState(props.defaultValue);\n const populated = isPopulated(props.value ?? held);\n\n // The error, said to a screen reader. React Aria's token field wires up a\n // description slot and no error one, so it generates no error id and its\n // editable area is never told the message exists. The field names the\n // message itself and adds it to the area's `aria-describedby`, which React\n // Aria merges with the description's id and with any the call site passed.\n //\n // `aria-invalid` cannot take the same road: the token input filters it out\n // of the props it is given, so it is written onto the area once React Aria\n // has drawn it, and taken off again when the error goes.\n const errorId = useId();\n const invalid = invalidFrom(error) === true;\n const describedBy = [props['aria-describedby'], invalid ? errorId : undefined].filter(Boolean).join(' ') || undefined;\n const area = useRef<HTMLDivElement>(null);\n useLayoutEffect(() => {\n if (invalid) {\n area.current?.setAttribute('aria-invalid', 'true');\n } else {\n area.current?.removeAttribute('aria-invalid');\n }\n }, [invalid]);\n return <RACTokenField<T> {...props} aria-describedby={describedBy} onChange={changeHandler(setHeld, props.onChange)} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <FieldBox floatingLabel={floatingLabel}\n // React Aria's `TextField` hands its group the field's disabled and\n // invalid state through context; its `TokenField` does not, so the\n // box is told outright or its label and its underline never turn.\n isDisabled={props.isDisabled} isInvalid={invalidFrom(error)} isPopulated={populated} label={label} leading={leadingIcon} multiline trailing={trailingIcon} variant={variant}>\n <RACTokenInput<T> ref={area} {...{\n 0: {\n className: \"x9f619 x139gbkf x1lliihq x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xcgk4ki x21xpn4 x1t137rt x126k92a\"\n },\n 1: {\n className: \"x9f619 x139gbkf x1lliihq x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xcgk4ki x1t137rt x126k92a xhm3zzy xczxdwi\"\n }\n }[!!(variant === 'filled') << 0]}>\n {tokenContent(renderToken)}\n </RACTokenInput>\n </FieldBox>\n <FieldMessage description={description} error={error} errorId={errorId} />\n </RACTokenField>;\n}\nexport type { TokenFieldProps, TokenSegment };\nexport default TokenField;"],"mappings":";;;;;;;;;;;;;AAsDA,MAAMiC,SAAS,EACbC,OAAO;CACLC,QAAQ;CACRC,OAAO;AACT,EACF;AAkEA,SAASgB,cAAyCC,SAA6BE,UAA4C;CACzH,QAAQD,UAAa;EACnBD,QAAQC,KAAK;EACbC,WAAWD,KAAK;CAClB;AACF;AAKA,SAASE,YAAYF,OAAoC;CACvD,IAAIA,UAAUG,KAAAA,GACZ;CAEF,OAAOH,MAAMI,SAAS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;GAAc,GAAQ3C;GAAyBgB,oBAAAA;GAAuB,UAAAW;GAAsC,GAAMC;GAAlH,UAAA,CACHa,KAgBAC,GAjBiB;;EAkBHnC,EAAA,MAAAmB;EAAAnB,EAAA,MAAAS;EAAAT,EAAA,MAAAP;EAAAO,EAAA,MAAAkC;EAAAlC,EAAA,MAAAmC;EAAAnC,EAAA,MAAAoB;EAAApB,EAAA,MAAAqB;EAAArB,EAAA,MAAAoC;CAAA,OAAAA,MAAApC,EAAA;CAAA,OAlBXoC;AAkBW"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","useId","useLayoutEffect","useRef","useState","TokenField","RACTokenField","chipLabel","chipStyles","fieldStyles","invalidFrom","focus","mergeStatefulStyles","styles","token","kXLuUW","$$css","className","description","error","floatingLabel","label","leadingIcon","renderToken","segment","trailingIcon","variant","changeHandler","setHeld","value","onChange","isPopulated","undefined","segments","some","text","length","tokenClassName","isSelected","props","base","ring","selected","unselected","tokenContent","t0","$","t1","t2","held","defaultValue","populated","errorId","t3","invalid","describedBy","filter","Boolean","join","area","t4","t5","current","setAttribute","removeAttribute","T0","t6","t7","root","t8","isDisabled","t9","t10","Symbol","for","0","1","t11","t12","t13","t14","t15","t16","RACToken","RACTokenInput"],"sources":["../../../src/components/token-field/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { TokenFieldProps as RACTokenFieldProps, TokenInputProps as RACTokenInputProps, TokenRenderProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useId, useLayoutEffect, useRef, useState } from 'react';\nimport { Token as RACToken, TokenField as RACTokenField, TokenInput as RACTokenInput, TokenFieldValue } from 'react-aria-components';\nimport type { FieldVariant } from '../../field';\nimport { chipLabel } from '../../chip';\nimport { chipStyles } from '../../chip/styles';\nimport { FieldBox, FieldMessage } from '../../field';\nimport { fieldStyles, invalidFrom } from '../../field/root';\nimport { focus } from '../../styles/focus';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, typography } from '../../tokens/design.tokens.stylex';\n\n// The chips page's input chips inside a text field: a field whose value is\n// text with pills in it — a tag input, a mention field, a structured search\n// box. The box, label, supporting line and error are the field chrome in\n// `src/field`, shared with every other field; the pill is the chip module's\n// in `src/chip`, shared with Chip and ChipGroup. What is here is React Aria's\n// `TokenField` around them.\n//\n// The value is React Aria's `TokenFieldValue`, a list of text and token\n// segments rather than a string, and this component does not wrap it. What\n// counts as a token is the whole question a token field exists to answer — a\n// hash tag, an @ mention, a chosen contact — and a wrapper would be a second\n// place to decide it. The class is re-exported from the package so a call\n// site can subclass it and override `tokenize`.\n//\n// Three things are worth knowing.\n//\n// **The editable area is not an input.** React Aria draws a contenteditable\n// element, since a token cannot live inside an `<input>`. So the box is drawn\n// `multiline` and grows with what it holds, and the chrome is told whether it\n// is populated rather than reading an input's value — a token field is the\n// third control the chrome cannot ask, after a select and a picker.\n//\n// **The box's whole height is the editable area.** A press anywhere in the\n// box has to put the caret in the text, so the box is not covered by a press\n// target the way Select's is; React Aria's own element fills the control's\n// place and takes the press.\n//\n// **A token is drawn by the call site, or by this.** `renderToken` takes a\n// segment and returns what the pill holds; without it the pill holds the\n// segment's own text. Either way the pill is the page's, so a token here and\n// a chip elsewhere cannot drift.\n\n// A token's pill is 32dp tall inside a body line of 24, so the control's\n// line makes room for it or the pills overlap once the value wraps. Stated\n// once because the control's floor and its line have to agree, and the\n// clearance under the label is measured from it.\nconst TOKEN_LINE = '32px';\nconst styles = {\n token: {\n kXLuUW: \"xxymvpz\",\n $$css: true\n }\n};\ntype TokenFieldProps<T extends TokenFieldValue = TokenFieldValue> = {\n /** A function may compute the class from the field's render state. */\n className?: RACTokenFieldProps<T>['className'];\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 and the red underline both\n * 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 something. `false` keeps it small at the top in\n * every state.\n * @default true\n */\n floatingLabel?: boolean;\n /**\n * What the field is for. Required rather than optional: a field with no\n * label is a box a screen reader cannot name.\n */\n label: string;\n /**\n * 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 * What each token holds. Given a segment, return what to draw inside its\n * pill; without it the pill holds the segment's own text.\n */\n renderToken?: (segment: TokenSegment) => ReactNode;\n /** A function may compute the style from the field's render state. */\n style?: RACTokenFieldProps<T>['style'];\n /**\n * An icon at the end of the box, after the value: the page's 24dp trailing\n * icon, in the muted role and the error role once the field has an error.\n * An icon drawn in `em` takes that size from the slot.\n */\n trailingIcon?: 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<RACTokenFieldProps<T>, 'children' | 'className' | 'style'>;\n\n// One token, as React Aria hands it to the editable area's render function.\n// Taken from that prop rather than imported, since the type lives in\n// `react-stately`, which this package does not depend on directly.\ntype TokenSegment = Parameters<RACTokenInputProps['children']>[0];\n\n// Keeps the mirrored copy in step and then hands the change on to the call\n// site. Built by a call rather than written inline at the prop, which is what\n// react-perf's no-new-function-as-prop is after; the React Compiler memoises\n// the result on its input.\nfunction changeHandler<T extends TokenFieldValue>(setHeld: (value: T) => void, onChange: ((value: T) => void) | undefined) {\n return (value: T) => {\n setHeld(value);\n onChange?.(value);\n };\n}\n\n// Whether the field holds anything, for the floating label. A token field's\n// editable area is a contenteditable element rather than an input, so the\n// chrome cannot read a value off it and is told instead.\nfunction isPopulated(value: TokenFieldValue | undefined) {\n if (value === undefined) {\n return undefined;\n }\n return value.segments.some(segment => segment.text.length > 0);\n}\n\n// What each token draws. Built by a call rather than written inline at the\n// prop, which is what react-perf's no-new-function-as-prop is after; the\n// React Compiler memoises the result on its input.\n// A token is the chip it looks like: unselected at rest, and the selected\n// chip — Material's selected input chip — once the selection covers it. A\n// click selects the whole token, since React Aria gives it\n// `user-select: all`, and so does the keyboard's selection running across\n// it; either way it is the token Backspace removes next, and this is what\n// says so.\nfunction tokenClassName({\n isSelected\n}: TokenRenderProps) {\n return stylex.props(chipStyles.base, focus.ring, isSelected ? chipStyles.selected : chipStyles.unselected, styles.token).className ?? '';\n}\nfunction tokenContent(renderToken: TokenFieldProps['renderToken']) {\n return (segment: TokenSegment) => <RACToken className={tokenClassName}>\n {chipLabel(renderToken === undefined ? segment.text : renderToken(segment))}\n </RACToken>;\n}\n\n/**\n * A labelled field whose value is text with inline tokens — a tag input, a\n * mention field, a structured search box. Its value is React Aria's\n * `TokenFieldValue`: pass `value` with `onChange` to control it, or\n * `defaultValue` to let it keep its own.\n *\n * ```tsx\n * const [value, setValue] = useState(new TokenFieldValue([]))\n *\n * <TokenField label=\"Label\" onChange={setValue} value={value} />\n * ```\n *\n * What counts as a token is the call site's: subclass `TokenFieldValue` and\n * override `tokenize`, which the package re-exports for that. `renderToken`\n * decides what each pill holds; without it, the segment's own text.\n *\n * The box, label, supporting line and error are the field chrome in\n * `src/field`, and the pill is the chip module's, shared with Chip and\n * ChipGroup.\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 TokenField<T extends TokenFieldValue = TokenFieldValue>({\n description,\n error,\n floatingLabel = true,\n label,\n leadingIcon,\n renderToken,\n trailingIcon,\n variant = 'filled',\n ...props\n}: RefAttributes<HTMLDivElement> & TokenFieldProps<T>) {\n // A copy of what the field holds, kept only so the label can float from\n // it. React Aria's token field reports `isDisabled` and `isReadOnly`\n // through its render props and not its value, and it hands its state down\n // a context of its own that nothing outside the module can read — so an\n // uncontrolled field has no other way to say what it is holding now.\n //\n // This mirrors rather than controls: `defaultValue` still goes through, so\n // React Aria keeps owning the value and the editing it does with it. A\n // controlled field is read straight off the prop, which already moves.\n const [held, setHeld] = useState(props.defaultValue);\n const populated = isPopulated(props.value ?? held);\n\n // The error, said to a screen reader. React Aria's token field wires up a\n // description slot and no error one, so it generates no error id and its\n // editable area is never told the message exists. The field names the\n // message itself and adds it to the area's `aria-describedby`, which React\n // Aria merges with the description's id and with any the call site passed.\n //\n // `aria-invalid` cannot take the same road: the token input filters it out\n // of the props it is given, so it is written onto the area once React Aria\n // has drawn it, and taken off again when the error goes.\n const errorId = useId();\n const invalid = invalidFrom(error) === true;\n const describedBy = [props['aria-describedby'], invalid ? errorId : undefined].filter(Boolean).join(' ') || undefined;\n const area = useRef<HTMLDivElement>(null);\n useLayoutEffect(() => {\n if (invalid) {\n area.current?.setAttribute('aria-invalid', 'true');\n } else {\n area.current?.removeAttribute('aria-invalid');\n }\n }, [invalid]);\n return <RACTokenField<T> {...props} aria-describedby={describedBy} onChange={changeHandler(setHeld, props.onChange)} {...mergeStatefulStyles(stylex.props(fieldStyles.root), props)}>\n <FieldBox floatingLabel={floatingLabel}\n // React Aria's `TextField` hands its group the field's disabled and\n // invalid state through context; its `TokenField` does not, so the\n // box is told outright or its label and its underline never turn.\n isDisabled={props.isDisabled} isInvalid={invalidFrom(error)} isPopulated={populated} label={label} leading={leadingIcon} multiline trailing={trailingIcon} variant={variant}>\n <RACTokenInput<T> ref={area} {...{\n 0: {\n className: \"x9f619 x139gbkf x1lliihq x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xcgk4ki x21xpn4 x1t137rt x126k92a\"\n },\n 1: {\n className: \"x9f619 x139gbkf x1lliihq x16svsjw x1848etk x1c52epr xh8yej3 x1qn8t5l xcgk4ki x1t137rt x126k92a xhm3zzy xczxdwi\"\n }\n }[!!(variant === 'filled') << 0]}>\n {tokenContent(renderToken)}\n </RACTokenInput>\n </FieldBox>\n <FieldMessage description={description} error={error} errorId={errorId} />\n </RACTokenField>;\n}\nexport type { TokenFieldProps, TokenSegment };\nexport default TokenField;"],"mappings":";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2B,EAAA,MAAAM;EAAAN,EAAA,MAAAmC;CAAA,OAAAA,MAAAnC,EAAA;CAAA,IAAAoC;CAAA,IAAApC,EAAA,QAAAmB,MAAAnB,EAAA,QAAAS,eAAAT,EAAA,QAAAP,WAAAO,EAAA,QAAAkC,OAAAlC,EAAA,QAAAmC,OAAAnC,EAAA,QAAAoB,MAAApB,EAAA,QAAAqB,IAAA;EAjBvEe,MAAA,qBAAC,IAAD;GAAc,GAAQ3C;GAAyBgB,oBAAAA;GAAuB,UAAAW;GAAsC,GAAMC;GAAlH,UAAA,CACHa,KAgBAC,GAjBiB;;EAkBHnC,EAAA,MAAAmB;EAAAnB,EAAA,MAAAS;EAAAT,EAAA,MAAAP;EAAAO,EAAA,MAAAkC;EAAAlC,EAAA,MAAAmC;EAAAnC,EAAA,MAAAoB;EAAApB,EAAA,MAAAqB;EAAArB,EAAA,MAAAoC;CAAA,OAAAA,MAAApC,EAAA;CAAA,OAlBXoC;AAkBW"}
@@ -47,5 +47,4 @@ type ToolbarTone = 'neutral' | 'vibrant';
47
47
  * the element a layout positions.
48
48
  */
49
49
  declare function Toolbar$1({ orientation, tone, ...props }: RefAttributes<HTMLDivElement> & ToolbarProps$1): import("react").JSX.Element;
50
- export { type ToolbarProps$1 as ToolbarProps, type ToolbarTone, Toolbar$1 as default };
51
- //# sourceMappingURL=index.d.ts.map
50
+ export { type ToolbarProps$1 as ToolbarProps, type ToolbarTone, Toolbar$1 as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","ToolbarProps","RACToolbarProps","SeparatorProps","stylex","useMemo","Toolbar","RACToolbar","SeparatorContext","mergeStatefulStyles","colors","radii","spacing","styles","base","kGNEyG","kaIpWk","kB7OPa","kMwMTN","k1xSpc","kOIVth","kjj79g","k3XXqK","$$css","horizontal","kXwgrk","kAzted","k8WAf4","kg3NbH","neutral","kWkggS","vertical","k7Eaqz","vibrant","Omit","children","className","style","tone","ToolbarTone","t0","$","T0","T1","t1","t2","t3","t4","orientation","t5","t6","props","undefined","t7","t8","separator","Toolbar","_c","props","RACToolbar","stylex.props"],"sources":["../../../src/components/toolbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ToolbarProps as RACToolbarProps, SeparatorProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useMemo } from 'react';\nimport { Toolbar as RACToolbar, SeparatorContext } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing } from '../../tokens/design.tokens.stylex';\n\n// The toolbars page's container: a row of frequently used controls, on a\n// surface of its own, with the arrow keys moving between them rather than\n// Tab. The page calls it \"a container with configurable slots\", so nothing\n// here says what goes in one — an icon button, a button, a field or a rule\n// are all the call site's to place.\n//\n// The measurements are the page's, stated there in words: 64dp tall,\n// centred, 8dp between items and 16dp of padding outside them. The two\n// colour schemes are its own too — standard on surface container, vibrant on\n// primary container — and both put the muted content role on what they hold.\n// `tone` spells the standard one `neutral` rather than by the page's name,\n// since that is the word every `tone` in the library uses for its neutral\n// role.\n//\n// Two things are this component's own.\n//\n// **A rule inside it runs across the row, not along it.** React Aria's\n// `Toolbar` sets its orientation on itself and nowhere else, so a\n// `Separator` written among the controls would draw the way it does anywhere\n// else — along the row, where it is invisible. This provides React Aria's\n// separator context with the perpendicular orientation, and `Separator`\n// reads it, so a rule between two controls is correct without the call site\n// saying which way it runs. The context reaches the bar's own controls and\n// stops at an overlay opened from one: React context crosses the portal a\n// popover, sheet or dialog renders through, so their content parts clear it\n// — see `src/overlay` — and a rule inside one runs across the overlay as it\n// does anywhere else.\n//\n// **Arrow-key navigation is React Aria's and is not wrapped.** The arrows\n// move between the controls, and — worth knowing, since the pattern usually\n// implies otherwise — React Aria leaves every control tabbable rather than\n// giving the bar a roving tabindex, so Tab still steps through them one by\n// one. What the bar adds is the toolbar role, which tells a screen reader\n// the controls belong together, and a second way to move between them.\n//\n// One departure, and it is about the shape. The page gives the container's\n// corner as a token its widget draws rather than writes, so there is no\n// value to read: what it states in words is the height, the alignment and\n// the padding, and nothing else. The fully rounded corner here, and the\n// inline box that goes with it, are the library's own choice for a bar that\n// floats over a page rather than docking to its edge — a docked one spans\n// its container and squares its corner, both from the call site.\n\nconst styles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x3nfvp2\",\n kOIVth: \"x126z3so\",\n kjj79g: \"xl56j7k\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n horizontal: {\n kXwgrk: \"x1q0g3np\",\n kAzted: \"x8nclml\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n neutral: {\n kWkggS: \"x1mjdul6\",\n $$css: true\n },\n vertical: {\n kXwgrk: \"xdt5ytf\",\n k7Eaqz: \"x4m7ku4\",\n k8WAf4: \"xp6hjv6\",\n kg3NbH: \"xn60lsn\",\n $$css: true\n },\n vibrant: {\n kWkggS: \"xp89om9\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n }\n};\ntype ToolbarProps = Omit<RACToolbarProps, 'children' | 'className' | 'style'> & {\n /** The controls, and any rule between them. */\n children?: ReactNode;\n /** A function may compute the class from the toolbar's render state. */\n className?: RACToolbarProps['className'];\n /** A function may compute the style from the toolbar's render state. */\n style?: RACToolbarProps['style'];\n /**\n * Which of the page's two colour schemes the bar takes. `neutral` is the\n * page's standard scheme, the surface container it draws by default;\n * `vibrant` moves it to primary container, for a bar meant to carry the\n * page's accent.\n * @default 'neutral'\n */\n tone?: ToolbarTone;\n};\ntype ToolbarTone = 'neutral' | 'vibrant';\n\n/**\n * A container for a set of controls, announced as a toolbar so a screen\n * reader reads them as one group, with the arrow keys moving between them.\n * Tab still steps through each control: React Aria's toolbar adds the arrows\n * rather than replacing what Tab does.\n *\n * ```tsx\n * <Toolbar aria-label=\"Label\">\n * <IconButton aria-label=\"First item\">\n * <FirstIcon />\n * </IconButton>\n * <Separator />\n * <IconButton aria-label=\"Second item\">\n * <SecondIcon />\n * </IconButton>\n * </Toolbar>\n * ```\n *\n * Name it with `aria-label` or `aria-labelledby` — nothing here labels it for\n * you, and a toolbar with no name is a group a screen reader cannot announce.\n *\n * `orientation` is React Aria's, and it decides both which arrows move and\n * which way the bar runs. A `Separator` among its controls draws across that\n * direction without being told; one inside an overlay opened from the bar\n * draws as it would anywhere else.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n */\nfunction Toolbar({\n orientation = 'horizontal',\n tone = 'neutral',\n ...props\n}: RefAttributes<HTMLDivElement> & ToolbarProps) {\n // The rule runs across the toolbar rather than along it. Memoised because\n // a fresh object here would be a new context value on every render, which\n // is what react-perf's no-new-object-as-prop is after.\n const separator = useMemo<SeparatorProps>(() => ({\n orientation: orientation === 'horizontal' ? 'vertical' : 'horizontal'\n }), [orientation]);\n return <SeparatorContext value={separator}>\n <RACToolbar orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(styles.base, styles[orientation], styles[tone]), props)} />\n </SeparatorContext>;\n}\nexport type { ToolbarProps, ToolbarTone };\nexport default Toolbar;"],"mappings":";;;;;;;;AAsDA,MAAMgB,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAM,SAAS;EACPC,QAAQ;EACRP,OAAO;CACT;CACAQ,UAAU;EACRN,QAAQ;EACRO,QAAQ;EACRL,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAU,SAAS;EACPH,QAAQ;EACRZ,QAAQ;EACRK,OAAO;CACT;AACF;;;;;;;;;;;;;;;;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C;EAAAD,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAE,MAAAF,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,IAAA;EAD9IC,KAAA,oBAAC,IAAD;GAAyBK,OAAAA;GAC5BN,UAAAA;EADoB,CAAA;EAEHR,EAAA,MAAAE;EAAAF,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAFdS;AAEc"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","Toolbar","RACToolbar","SeparatorContext","mergeStatefulStyles","styles","base","kGNEyG","kaIpWk","kB7OPa","kMwMTN","k1xSpc","kOIVth","kjj79g","k3XXqK","$$css","horizontal","kXwgrk","kAzted","k8WAf4","kg3NbH","neutral","kWkggS","vertical","k7Eaqz","vibrant","tone","t0","$","T0","T1","t1","t2","t3","t4","orientation","t5","t6","props","undefined","t7","t8","separator"],"sources":["../../../src/components/toolbar/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ToolbarProps as RACToolbarProps, SeparatorProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { useMemo } from 'react';\nimport { Toolbar as RACToolbar, SeparatorContext } from 'react-aria-components';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing } from '../../tokens/design.tokens.stylex';\n\n// The toolbars page's container: a row of frequently used controls, on a\n// surface of its own, with the arrow keys moving between them rather than\n// Tab. The page calls it \"a container with configurable slots\", so nothing\n// here says what goes in one — an icon button, a button, a field or a rule\n// are all the call site's to place.\n//\n// The measurements are the page's, stated there in words: 64dp tall,\n// centred, 8dp between items and 16dp of padding outside them. The two\n// colour schemes are its own too — standard on surface container, vibrant on\n// primary container — and both put the muted content role on what they hold.\n// `tone` spells the standard one `neutral` rather than by the page's name,\n// since that is the word every `tone` in the library uses for its neutral\n// role.\n//\n// Two things are this component's own.\n//\n// **A rule inside it runs across the row, not along it.** React Aria's\n// `Toolbar` sets its orientation on itself and nowhere else, so a\n// `Separator` written among the controls would draw the way it does anywhere\n// else — along the row, where it is invisible. This provides React Aria's\n// separator context with the perpendicular orientation, and `Separator`\n// reads it, so a rule between two controls is correct without the call site\n// saying which way it runs. The context reaches the bar's own controls and\n// stops at an overlay opened from one: React context crosses the portal a\n// popover, sheet or dialog renders through, so their content parts clear it\n// — see `src/overlay` — and a rule inside one runs across the overlay as it\n// does anywhere else.\n//\n// **Arrow-key navigation is React Aria's and is not wrapped.** The arrows\n// move between the controls, and — worth knowing, since the pattern usually\n// implies otherwise — React Aria leaves every control tabbable rather than\n// giving the bar a roving tabindex, so Tab still steps through them one by\n// one. What the bar adds is the toolbar role, which tells a screen reader\n// the controls belong together, and a second way to move between them.\n//\n// One departure, and it is about the shape. The page gives the container's\n// corner as a token its widget draws rather than writes, so there is no\n// value to read: what it states in words is the height, the alignment and\n// the padding, and nothing else. The fully rounded corner here, and the\n// inline box that goes with it, are the library's own choice for a bar that\n// floats over a page rather than docking to its edge — a docked one spans\n// its container and squares its corner, both from the call site.\n\nconst styles = {\n base: {\n kGNEyG: \"x6s0dn4\",\n kaIpWk: \"x1dkaolv\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1w5n3ug\",\n k1xSpc: \"x3nfvp2\",\n kOIVth: \"x126z3so\",\n kjj79g: \"xl56j7k\",\n k3XXqK: \"x1t137rt\",\n $$css: true\n },\n horizontal: {\n kXwgrk: \"x1q0g3np\",\n kAzted: \"x8nclml\",\n k8WAf4: \"x1cmllll\",\n kg3NbH: \"x790zyz\",\n $$css: true\n },\n neutral: {\n kWkggS: \"x1mjdul6\",\n $$css: true\n },\n vertical: {\n kXwgrk: \"xdt5ytf\",\n k7Eaqz: \"x4m7ku4\",\n k8WAf4: \"xp6hjv6\",\n kg3NbH: \"xn60lsn\",\n $$css: true\n },\n vibrant: {\n kWkggS: \"xp89om9\",\n kMwMTN: \"xscdzaa\",\n $$css: true\n }\n};\ntype ToolbarProps = Omit<RACToolbarProps, 'children' | 'className' | 'style'> & {\n /** The controls, and any rule between them. */\n children?: ReactNode;\n /** A function may compute the class from the toolbar's render state. */\n className?: RACToolbarProps['className'];\n /** A function may compute the style from the toolbar's render state. */\n style?: RACToolbarProps['style'];\n /**\n * Which of the page's two colour schemes the bar takes. `neutral` is the\n * page's standard scheme, the surface container it draws by default;\n * `vibrant` moves it to primary container, for a bar meant to carry the\n * page's accent.\n * @default 'neutral'\n */\n tone?: ToolbarTone;\n};\ntype ToolbarTone = 'neutral' | 'vibrant';\n\n/**\n * A container for a set of controls, announced as a toolbar so a screen\n * reader reads them as one group, with the arrow keys moving between them.\n * Tab still steps through each control: React Aria's toolbar adds the arrows\n * rather than replacing what Tab does.\n *\n * ```tsx\n * <Toolbar aria-label=\"Label\">\n * <IconButton aria-label=\"First item\">\n * <FirstIcon />\n * </IconButton>\n * <Separator />\n * <IconButton aria-label=\"Second item\">\n * <SecondIcon />\n * </IconButton>\n * </Toolbar>\n * ```\n *\n * Name it with `aria-label` or `aria-labelledby` — nothing here labels it for\n * you, and a toolbar with no name is a group a screen reader cannot announce.\n *\n * `orientation` is React Aria's, and it decides both which arrows move and\n * which way the bar runs. A `Separator` among its controls draws across that\n * direction without being told; one inside an overlay opened from the bar\n * draws as it would anywhere else.\n *\n * The call site's `className` and `style` land on the container, which is\n * the element a layout positions.\n */\nfunction Toolbar({\n orientation = 'horizontal',\n tone = 'neutral',\n ...props\n}: RefAttributes<HTMLDivElement> & ToolbarProps) {\n // The rule runs across the toolbar rather than along it. Memoised because\n // a fresh object here would be a new context value on every render, which\n // is what react-perf's no-new-object-as-prop is after.\n const separator = useMemo<SeparatorProps>(() => ({\n orientation: orientation === 'horizontal' ? 'vertical' : 'horizontal'\n }), [orientation]);\n return <SeparatorContext value={separator}>\n <RACToolbar orientation={orientation} {...props} {...mergeStatefulStyles(stylex.props(styles.base, styles[orientation], styles[tone]), props)} />\n </SeparatorContext>;\n}\nexport type { ToolbarProps, ToolbarTone };\nexport default Toolbar;"],"mappings":";;;;;;;;AAsDA,MAAMM,SAAS;CACbC,MAAM;EACJC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,OAAO;CACT;CACAC,YAAY;EACVC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAM,SAAS;EACPC,QAAQ;EACRP,OAAO;CACT;CACAQ,UAAU;EACRN,QAAQ;EACRO,QAAQ;EACRL,QAAQ;EACRC,QAAQ;EACRL,OAAO;CACT;CACAU,SAAS;EACPH,QAAQ;EACRZ,QAAQ;EACRK,OAAO;CACT;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgDA,SAAAd,UAAA0B,IAAA;CAAA,MAAAC,IAAA7B,EAAA,EAAA;CAAA,IAAA8B;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAN,EAAA,OAAAD,IAAA;EAAiB,MAAA,EAAAQ,aAAAC,IAAAV,MAAAW,IAAA,GAAAC,YAAAX;EACf,MAAAQ,cAAAC,OAAAG,KAAAA,IAAA,eAAAH;EACA,MAAAV,OAAAW,OAAAE,KAAAA,IAAA,YAAAF;EAOe,MAAAG,KAAAL,gBAAgB,eAAhB,aAAA;EAAwD,IAAAM;EAAA,IAAAb,EAAA,OAAAY,IAAA;GADtBC,KAAA,EAAAN,aAClCK,GACf;GAACZ,EAAA,KAAAY;GAAAZ,EAAA,KAAAa;EAAA,OAAAA,KAAAb,EAAA;EAFD,MAAAc,YAAiDD;EAGzCX,KAAA3B;EAAwBuC,KAAAA;EAC3Bb,KAAA3B;EAAwBiC,KAAAA;EAAiBG,KAAAA;EAAWL,KAAA7B,oBAAoBJ,MAAaK,OAAMC,MAAOD,OAAO8B,cAAc9B,OAAOqB,KAAK,GAAGY,OAAK;EAACV,EAAA,KAAAD;EAAAC,EAAA,KAAAC;EAAAD,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAA;EAAAL,KAAAD,EAAA;EAAAE,KAAAF,EAAA;EAAAG,KAAAH,EAAA;EAAAI,KAAAJ,EAAA;EAAAK,KAAAL,EAAA;EAAAM,KAAAN,EAAA;CAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAC,MAAAD,EAAA,QAAAG,MAAAH,EAAA,QAAAI,MAAAJ,EAAA,QAAAK,IAAA;EAA7IG,KAAA,oBAAC,IAAD;GAAyBD,aAAAA;GAAW,GAAMG;GAAK,GAAML;EAAwF,CAAA;EAAIL,EAAA,KAAAC;EAAAD,EAAA,MAAAG;EAAAH,EAAA,MAAAI;EAAAJ,EAAA,MAAAK;EAAAL,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,QAAAE,MAAAF,EAAA,QAAAM,MAAAN,EAAA,QAAAQ,IAAA;EAD9IC,KAAA,oBAAC,IAAD;GAAyBK,OAAAA;GAC5BN,UAAAA;EADoB,CAAA;EAEHR,EAAA,MAAAE;EAAAF,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAFdS;AAEc"}
@@ -58,5 +58,4 @@ type TooltipSide = OverlaySide;
58
58
  * The call site's `className` and `style` land on the tooltip itself.
59
59
  */
60
60
  declare function Tooltip$1({ align, alignOffset, children, className, container, label, ref, side, sideOffset, style, ...props }: RefAttributes<HTMLDivElement> & TooltipProps): import("react").JSX.Element;
61
- export { type TooltipAlign, type TooltipProps, type TooltipSide, Tooltip$1 as default };
62
- //# sourceMappingURL=index.d.ts.map
61
+ export { type TooltipAlign, type TooltipProps, type TooltipSide, Tooltip$1 as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["c","_c","ReactNode","RefAttributes","ClassNameOrFunction","StyleOrFunction","TooltipRenderProps","TooltipTriggerComponentProps","stylex","Tooltip","RACTooltip","TooltipTrigger","OverlayAlign","OverlaySide","mergeStatefulStyles","overlay","placementOf","popupOrigin","colors","radii","spacing","typography","styles","container","kWkggS","kaIpWk","kGVxlE","kB7OPa","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","ks0D6T","kAzted","k8WAf4","kg3NbH","$$css","DEFAULT_SIDE_OFFSET","TooltipAlign","TooltipProps","align","alignOffset","children","className","Element","label","side","TooltipSide","sideOffset","style","Omit","t0","$","props","ref","t1","t2","t3","undefined","t4","t5","_temp","t6","t7","state","popup","placement","Tooltip","_c","RACTooltip","stylex.props"],"sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, StyleOrFunction, TooltipRenderProps, TooltipTriggerComponentProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Tooltip as RACTooltip, TooltipTrigger } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// The tooltips page's plain tooltip: a 24dp container on inverse surface\n// with 8dp of padding, holding one line of supporting text in inverse on\n// surface at 12 over 16, which is the body-small role. The page names a\n// shape token for the container without giving its value, so the container\n// takes the smallest corner the library has — a 24dp box has room for no\n// more.\n//\n// The rich tooltip on the same page is a hover-triggered `Popover`, which is\n// where its subhead, supporting text and buttons already live; this one is\n// text and nothing else, which is why it takes its label as a string rather\n// than as parts.\n//\n// The entry is the overlay module's, shared with every anchored surface, and\n// so is the origin it grows from — the tooltip comes out of the thing it\n// describes. The surface itself is not: a tooltip inverts the page's colours\n// where a popover sits on a container role, so it draws its own, and it lies\n// flat. The plain tooltip's tokens give a container colour, a shape and the\n// text roles and no elevation, so the popup's shadow is taken off; it is the\n// rich tooltip that sits at level 2. The popup's forced-colours border\n// stays, since that mode paints the fill in the page's own colour.\nconst styles = {\n container: {\n kWkggS: \"x1c5gpgi\",\n kaIpWk: \"x1tfhd1\",\n kGVxlE: \"x1gnnqk1\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1girmi0\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n ks0D6T: \"x10u2fgw\",\n kAzted: \"xjwf9q1\",\n k8WAf4: \"xmqoko8\",\n kg3NbH: \"xn60lsn\",\n $$css: true\n }\n};\n\n// The gap between the anchor and the tooltip. A number rather than a token,\n// because React Aria computes the position in JavaScript and so cannot read\n// a custom property — the same one place `Popover` spells a step out.\nconst DEFAULT_SIDE_OFFSET = 8;\n\n// The overlay module's, since which side a surface opens on is the same\n// question for every anchored overlay, and `Popover` and `Menu` ask it\n// there too. Aliased rather than re-declared so the names a call site\n// imports stay this component's.\ntype TooltipAlign = OverlayAlign;\ntype TooltipProps = {\n /**\n * Where the tooltip sits along the side it opens on.\n * @default 'center'\n */\n align?: TooltipAlign;\n /** Shifts the tooltip along that side, in pixels. */\n alignOffset?: number;\n /**\n * The element the tooltip describes, and nothing else. It has to be able\n * to take focus, since a tooltip a keyboard cannot reach is one most\n * people never see — wrap anything that cannot in `Focusable`, which this\n * package re-exports.\n */\n children?: ReactNode;\n /** A function may compute the class from the tooltip's render state. */\n className?: ClassNameOrFunction<TooltipRenderProps>;\n /**\n * Where to portal the tooltip. Defaults to the container of the `ThemeScope`\n * around it, which keeps the tooltip 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 tooltip\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /** What the tooltip says. Text, since the page's plain tooltip is text. */\n label: ReactNode;\n /**\n * Which side of the element the tooltip opens on. It flips to the opposite\n * side on its own when there is no room. `start` and `end` follow the\n * writing direction, so `end` is the right in English and the left in\n * Arabic; `left` and `right` stay put in either.\n * @default 'top'\n */\n side?: TooltipSide;\n /** The gap between the element and the tooltip, in pixels. */\n sideOffset?: number;\n /** A function may compute the style from the tooltip's render state. */\n style?: StyleOrFunction<TooltipRenderProps>;\n} & Omit<TooltipTriggerComponentProps, 'children'>;\ntype TooltipSide = OverlaySide;\n\n/**\n * A label for the element it wraps, shown while that element is hovered or\n * focused — the tooltips page's plain tooltip. Its open state is React\n * Aria's: pass `isOpen` with `onOpenChange` to control it, `defaultOpen` to\n * let it keep its own, and `delay` and `closeDelay` for how long a pointer\n * has to rest before it appears and after it leaves.\n *\n * A tooltip is not a place to put anything a person has to read or reach:\n * it is skipped by touch entirely and dismissed by Escape, so what it says\n * has to be a repeat of what the element already means. Anything with a\n * button in it, or worth reading twice, is a `Popover`.\n *\n * The call site's `className` and `style` land on the tooltip itself.\n */\nfunction Tooltip({\n align = 'center',\n alignOffset,\n children,\n className,\n container,\n label,\n ref,\n side = 'top',\n sideOffset = DEFAULT_SIDE_OFFSET,\n style,\n ...props\n}: RefAttributes<HTMLDivElement> & TooltipProps) {\n return <TooltipTrigger {...props}>\n {children}\n <RACTooltip crossOffset={alignOffset} offset={sideOffset} placement={placementOf(side, align)}\n // The trigger renders no element of its own, so the ref lands on\n // the surface, as the call site's class and style do.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles((state: TooltipRenderProps) => stylex.props(overlay.popup, styles.container, popupOrigin(state.placement)), {\n className,\n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AApB,UAAA,CACFX,UACDoB,EAFkB;;EAaHV,EAAA,MAAAV;EAAAU,EAAA,MAAAC;EAAAD,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAbZW;AAaY;AA1BrB,SAAAF,MAAAG,OAAA;CAAA,OAoBgG1D,MAAaO,QAAOoD,OAAQ7C,OAAMC,WAAYN,YAAYiD,MAAKE,SAAU,CAAC;AAAC"}
1
+ {"version":3,"file":"index.js","names":["_c","stylex","Tooltip","mergeStatefulStyles","overlay","placementOf","popupOrigin","styles","container","kWkggS","kaIpWk","kGVxlE","kB7OPa","kMwMTN","kMv6JI","kGuDYH","k63SB2","kb6lSQ","kLWn49","ks0D6T","kAzted","k8WAf4","kg3NbH","$$css","DEFAULT_SIDE_OFFSET","align","alignOffset","children","className","label","side","sideOffset","style","t0","$","props","ref","t1","t2","t3","undefined","t4","t5","_temp","t6","t7","state","popup","placement","RACTooltip"],"sources":["../../../src/components/tooltip/index.tsx"],"sourcesContent":["'use client';\n\nimport type { ReactNode, RefAttributes } from 'react';\nimport type { ClassNameOrFunction, StyleOrFunction, TooltipRenderProps, TooltipTriggerComponentProps } from 'react-aria-components';\nimport * as stylex from '@stylexjs/stylex';\nimport { Tooltip as RACTooltip, TooltipTrigger } from 'react-aria-components';\nimport type { OverlayAlign, OverlaySide } from '../../styles/overlay';\nimport { mergeStatefulStyles } from '../../styles/merge';\nimport { overlay, placementOf, popupOrigin } from '../../styles/overlay';\nimport '../../tokens/design.tokens.stylex';\nimport { colors, radii, spacing, typography } from '../../tokens/design.tokens.stylex';\n\n// The tooltips page's plain tooltip: a 24dp container on inverse surface\n// with 8dp of padding, holding one line of supporting text in inverse on\n// surface at 12 over 16, which is the body-small role. The page names a\n// shape token for the container without giving its value, so the container\n// takes the smallest corner the library has — a 24dp box has room for no\n// more.\n//\n// The rich tooltip on the same page is a hover-triggered `Popover`, which is\n// where its subhead, supporting text and buttons already live; this one is\n// text and nothing else, which is why it takes its label as a string rather\n// than as parts.\n//\n// The entry is the overlay module's, shared with every anchored surface, and\n// so is the origin it grows from — the tooltip comes out of the thing it\n// describes. The surface itself is not: a tooltip inverts the page's colours\n// where a popover sits on a container role, so it draws its own, and it lies\n// flat. The plain tooltip's tokens give a container colour, a shape and the\n// text roles and no elevation, so the popup's shadow is taken off; it is the\n// rich tooltip that sits at level 2. The popup's forced-colours border\n// stays, since that mode paints the fill in the page's own colour.\nconst styles = {\n container: {\n kWkggS: \"x1c5gpgi\",\n kaIpWk: \"x1tfhd1\",\n kGVxlE: \"x1gnnqk1\",\n kB7OPa: \"x9f619\",\n kMwMTN: \"x1girmi0\",\n kMv6JI: \"x1yicsit\",\n kGuDYH: \"x1b35g6e\",\n k63SB2: \"x9d6959\",\n kb6lSQ: \"xwth0xh\",\n kLWn49: \"xybisxh\",\n ks0D6T: \"x10u2fgw\",\n kAzted: \"xjwf9q1\",\n k8WAf4: \"xmqoko8\",\n kg3NbH: \"xn60lsn\",\n $$css: true\n }\n};\n\n// The gap between the anchor and the tooltip. A number rather than a token,\n// because React Aria computes the position in JavaScript and so cannot read\n// a custom property — the same one place `Popover` spells a step out.\nconst DEFAULT_SIDE_OFFSET = 8;\n\n// The overlay module's, since which side a surface opens on is the same\n// question for every anchored overlay, and `Popover` and `Menu` ask it\n// there too. Aliased rather than re-declared so the names a call site\n// imports stay this component's.\ntype TooltipAlign = OverlayAlign;\ntype TooltipProps = {\n /**\n * Where the tooltip sits along the side it opens on.\n * @default 'center'\n */\n align?: TooltipAlign;\n /** Shifts the tooltip along that side, in pixels. */\n alignOffset?: number;\n /**\n * The element the tooltip describes, and nothing else. It has to be able\n * to take focus, since a tooltip a keyboard cannot reach is one most\n * people never see — wrap anything that cannot in `Focusable`, which this\n * package re-exports.\n */\n children?: ReactNode;\n /** A function may compute the class from the tooltip's render state. */\n className?: ClassNameOrFunction<TooltipRenderProps>;\n /**\n * Where to portal the tooltip. Defaults to the container of the `ThemeScope`\n * around it, which keeps the tooltip 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 tooltip\n * renders outside and keeps the page's tokens.\n */\n container?: Element;\n /** What the tooltip says. Text, since the page's plain tooltip is text. */\n label: ReactNode;\n /**\n * Which side of the element the tooltip opens on. It flips to the opposite\n * side on its own when there is no room. `start` and `end` follow the\n * writing direction, so `end` is the right in English and the left in\n * Arabic; `left` and `right` stay put in either.\n * @default 'top'\n */\n side?: TooltipSide;\n /** The gap between the element and the tooltip, in pixels. */\n sideOffset?: number;\n /** A function may compute the style from the tooltip's render state. */\n style?: StyleOrFunction<TooltipRenderProps>;\n} & Omit<TooltipTriggerComponentProps, 'children'>;\ntype TooltipSide = OverlaySide;\n\n/**\n * A label for the element it wraps, shown while that element is hovered or\n * focused — the tooltips page's plain tooltip. Its open state is React\n * Aria's: pass `isOpen` with `onOpenChange` to control it, `defaultOpen` to\n * let it keep its own, and `delay` and `closeDelay` for how long a pointer\n * has to rest before it appears and after it leaves.\n *\n * A tooltip is not a place to put anything a person has to read or reach:\n * it is skipped by touch entirely and dismissed by Escape, so what it says\n * has to be a repeat of what the element already means. Anything with a\n * button in it, or worth reading twice, is a `Popover`.\n *\n * The call site's `className` and `style` land on the tooltip itself.\n */\nfunction Tooltip({\n align = 'center',\n alignOffset,\n children,\n className,\n container,\n label,\n ref,\n side = 'top',\n sideOffset = DEFAULT_SIDE_OFFSET,\n style,\n ...props\n}: RefAttributes<HTMLDivElement> & TooltipProps) {\n return <TooltipTrigger {...props}>\n {children}\n <RACTooltip crossOffset={alignOffset} offset={sideOffset} placement={placementOf(side, align)}\n // The trigger renders no element of its own, so the ref lands on\n // the surface, as the call site's class and style do.\n ref={ref}\n // oxlint-disable-next-line typescript/no-deprecated -- its replacement, UNSAFE_PortalProvider, is not exported by react-aria-components\n UNSTABLE_portalContainer={container} {...mergeStatefulStyles((state: TooltipRenderProps) => stylex.props(overlay.popup, styles.container, popupOrigin(state.placement)), {\n className,\n style\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,UAAA,CACFR,UACDiB,EAFkB;;EAaHV,EAAA,MAAAP;EAAAO,EAAA,MAAAC;EAAAD,EAAA,MAAAU;EAAAV,EAAA,MAAAW;CAAA,OAAAA,KAAAX,EAAA;CAAA,OAbZW;AAaY;AA1BrB,SAAAF,MAAAG,OAAA;CAAA,OAoBgG7C,MAAaG,QAAO2C,OAAQxC,OAAMC,WAAYF,YAAYwC,MAAKE,SAAU,CAAC;AAAC"}
@@ -120,5 +120,4 @@ declare function TreeLoadMore({ label, ...props }: RefAttributes<HTMLDivElement>
120
120
  * A named group of rows, with its heading above them.
121
121
  */
122
122
  declare function TreeSection$1<T extends object = object>({ children, header, ...props }: TreeSectionProps<T>): import("react").JSX.Element;
123
- export { TreeItem$1 as TreeItem, type TreeItemProps$1 as TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps$1 as TreeProps, TreeSection$1 as TreeSection, type TreeSectionProps, Tree$1 as default };
124
- //# sourceMappingURL=index.d.ts.map
123
+ export { TreeItem$1 as TreeItem, type TreeItemProps$1 as TreeItemProps, TreeLoadMore, type TreeLoadMoreProps, type TreeProps$1 as TreeProps, TreeSection$1 as TreeSection, type TreeSectionProps, Tree$1 as default };