@ada-cx/lovelace 1.19.0 → 1.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (174) hide show
  1. package/dist/components/AgentMessage/AgentMessage.js.map +1 -1
  2. package/dist/components/AttachmentChip/AttachmentChip.css.js +1 -1
  3. package/dist/components/AttachmentChip/AttachmentChip.js.map +1 -1
  4. package/dist/components/Avatar/Avatar.css.js +1 -1
  5. package/dist/components/Avatar/Avatar.js.map +1 -1
  6. package/dist/components/Avatar/AvatarPlaceholder.js.map +1 -1
  7. package/dist/components/Banner/Banner.css.js +1 -1
  8. package/dist/components/Banner/Banner.js.map +1 -1
  9. package/dist/components/Banner/BannerContainer.js.map +1 -1
  10. package/dist/components/Banner/BannerContainerSlide.js.map +1 -1
  11. package/dist/components/BubbleOverlay/BubbleOverlay.js.map +1 -1
  12. package/dist/components/Button/Button.css.js +1 -1
  13. package/dist/components/Button/Button.js.map +1 -1
  14. package/dist/components/Card/Card.js.map +1 -1
  15. package/dist/components/Card/CardActions.js.map +1 -1
  16. package/dist/components/Card/CardBody.js.map +1 -1
  17. package/dist/components/Card/CardDescription.js.map +1 -1
  18. package/dist/components/Card/CardMedia.js.map +1 -1
  19. package/dist/components/Card/CardRoot.js.map +1 -1
  20. package/dist/components/Card/CardTitle.js.map +1 -1
  21. package/dist/components/Carousel/Carousel.js +60 -60
  22. package/dist/components/Carousel/Carousel.js.map +1 -1
  23. package/dist/components/Carousel/CarouselItem.js.map +1 -1
  24. package/dist/components/Checkbox/Checkbox.css.js +1 -1
  25. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  26. package/dist/components/Checkbox/CheckboxGroup.js.map +1 -1
  27. package/dist/components/Checkbox/CheckboxIndicator.js.map +1 -1
  28. package/dist/components/Chip/Chip.css.js +1 -1
  29. package/dist/components/Chip/Chip.js.map +1 -1
  30. package/dist/components/Dialog/Dialog.css.js +1 -1
  31. package/dist/components/Dialog/Dialog.js.map +1 -1
  32. package/dist/components/Dialog/DialogActions.js.map +1 -1
  33. package/dist/components/Dialog/DialogBody.js.map +1 -1
  34. package/dist/components/Dialog/DialogContent.js.map +1 -1
  35. package/dist/components/Dialog/DialogIcon.js.map +1 -1
  36. package/dist/components/Dialog/DialogRoot.js.map +1 -1
  37. package/dist/components/Dialog/DialogTitle.js.map +1 -1
  38. package/dist/components/DialogOverlay/DialogOverlay.js.map +1 -1
  39. package/dist/components/Divider/Divider.css.js +1 -1
  40. package/dist/components/Divider/Divider.js.map +1 -1
  41. package/dist/components/DropZone/DropZone.js.map +1 -1
  42. package/dist/components/FullscreenOverlay/FullscreenOverlay.js.map +1 -1
  43. package/dist/components/Header/Header.js.map +1 -1
  44. package/dist/components/Header/HeaderRoot.js.map +1 -1
  45. package/dist/components/Header/HeaderTitle.js.map +1 -1
  46. package/dist/components/Icon/Icon.js.map +1 -1
  47. package/dist/components/Icon/icons/AdaLogo.js.map +1 -1
  48. package/dist/components/Icon/icons/ArrowDown.js.map +1 -1
  49. package/dist/components/Icon/icons/ArrowLeft.js.map +1 -1
  50. package/dist/components/Icon/icons/ArrowNortheast.js.map +1 -1
  51. package/dist/components/Icon/icons/ArrowNorthwest.js.map +1 -1
  52. package/dist/components/Icon/icons/ArrowRight.js.map +1 -1
  53. package/dist/components/Icon/icons/ArrowUp.js.map +1 -1
  54. package/dist/components/Icon/icons/Bell.js.map +1 -1
  55. package/dist/components/Icon/icons/BellSlash.js.map +1 -1
  56. package/dist/components/Icon/icons/Checkmark.js.map +1 -1
  57. package/dist/components/Icon/icons/CheckmarkCircle.js.map +1 -1
  58. package/dist/components/Icon/icons/ChevronLeft.js.map +1 -1
  59. package/dist/components/Icon/icons/ChevronRight.js.map +1 -1
  60. package/dist/components/Icon/icons/CloudUpload.js.map +1 -1
  61. package/dist/components/Icon/icons/Document.js.map +1 -1
  62. package/dist/components/Icon/icons/Download.js.map +1 -1
  63. package/dist/components/Icon/icons/Ellipses.js.map +1 -1
  64. package/dist/components/Icon/icons/Email.js.map +1 -1
  65. package/dist/components/Icon/icons/ExclamationSync.js.map +1 -1
  66. package/dist/components/Icon/icons/ExclamationTriangle.js.map +1 -1
  67. package/dist/components/Icon/icons/Eye.js.map +1 -1
  68. package/dist/components/Icon/icons/EyeSlash.js.map +1 -1
  69. package/dist/components/Icon/icons/Glyph.js.map +1 -1
  70. package/dist/components/Icon/icons/Language.js.map +1 -1
  71. package/dist/components/Icon/icons/MediaSlash.js.map +1 -1
  72. package/dist/components/Icon/icons/MessagingFill.js.map +1 -1
  73. package/dist/components/Icon/icons/Minimize.js.map +1 -1
  74. package/dist/components/Icon/icons/Mute.js.map +1 -1
  75. package/dist/components/Icon/icons/Paperclip.js.map +1 -1
  76. package/dist/components/Icon/icons/PersonFill.js.map +1 -1
  77. package/dist/components/Icon/icons/PlayFill.js.map +1 -1
  78. package/dist/components/Icon/icons/Send.js.map +1 -1
  79. package/dist/components/Icon/icons/StarBadgeFill.js.map +1 -1
  80. package/dist/components/Icon/icons/ThumbsDown.js.map +1 -1
  81. package/dist/components/Icon/icons/ThumbsUp.js.map +1 -1
  82. package/dist/components/Icon/icons/Volume.js.map +1 -1
  83. package/dist/components/Icon/icons/Waveform.d.ts +2 -0
  84. package/dist/components/Icon/icons/Waveform.js +20 -0
  85. package/dist/components/Icon/icons/Waveform.js.map +1 -0
  86. package/dist/components/Icon/icons/Xmark.js.map +1 -1
  87. package/dist/components/Icon/icons/XmarkCircle.js.map +1 -1
  88. package/dist/components/Icon/icons/index.d.ts +1 -0
  89. package/dist/components/IconButton/IconButton.css.js +1 -1
  90. package/dist/components/IconButton/IconButton.js.map +1 -1
  91. package/dist/components/Image/Image.js.map +1 -1
  92. package/dist/components/Input/Input.context.js.map +1 -1
  93. package/dist/components/Input/Input.css.d.ts +12 -1
  94. package/dist/components/Input/Input.css.js +10 -2
  95. package/dist/components/Input/Input.css.js.map +1 -1
  96. package/dist/components/Input/Input.js.map +1 -1
  97. package/dist/components/Input/InputAttachments.js.map +1 -1
  98. package/dist/components/Input/InputButton.d.ts +3 -1
  99. package/dist/components/Input/InputButton.js +7 -6
  100. package/dist/components/Input/InputButton.js.map +1 -1
  101. package/dist/components/Input/InputControl.js.map +1 -1
  102. package/dist/components/Input/InputField.js.map +1 -1
  103. package/dist/components/Input/InputHelperText.js.map +1 -1
  104. package/dist/components/Input/InputLabel.js.map +1 -1
  105. package/dist/components/Input/InputRoot.js.map +1 -1
  106. package/dist/components/Input/InputTextArea.js.map +1 -1
  107. package/dist/components/Link/Link.css.js +1 -1
  108. package/dist/components/Link/Link.js.map +1 -1
  109. package/dist/components/MenuItem/Menu.js.map +1 -1
  110. package/dist/components/MenuItem/MenuItem.js.map +1 -1
  111. package/dist/components/MenuItem/MenuItemCheckbox.js.map +1 -1
  112. package/dist/components/MenuItem/MenuItemLabel.js.map +1 -1
  113. package/dist/components/MenuItem/MenuItemRadio.js.map +1 -1
  114. package/dist/components/MenuItem/MenuItemRoot.js.map +1 -1
  115. package/dist/components/MenuItem/MenuItemToggle.js.map +1 -1
  116. package/dist/components/MessageError/MessageError.js.map +1 -1
  117. package/dist/components/MessageProse/MessageProse.js.map +1 -1
  118. package/dist/components/MessageRow/MessageRow.context.js.map +1 -1
  119. package/dist/components/MessageRow/MessageRow.css.js +1 -1
  120. package/dist/components/MessageRow/MessageRow.js.map +1 -1
  121. package/dist/components/MessageRow/MessageRowContent.js.map +1 -1
  122. package/dist/components/MessageRow/MessageRowRoot.js.map +1 -1
  123. package/dist/components/PictureMessage/PictureMessage.css.js +1 -1
  124. package/dist/components/PictureMessage/PictureMessage.js.map +1 -1
  125. package/dist/components/PillButton/PillButton.css.js +1 -1
  126. package/dist/components/PillButton/PillButton.js.map +1 -1
  127. package/dist/components/ProactiveMessage/ProactiveMessage.js.map +1 -1
  128. package/dist/components/Radio/Radio.css.js +1 -1
  129. package/dist/components/Radio/Radio.js.map +1 -1
  130. package/dist/components/Radio/RadioGroup.js.map +1 -1
  131. package/dist/components/Radio/RadioIndicator.js.map +1 -1
  132. package/dist/components/ScrollMarker/ScrollMarker.css.js +1 -1
  133. package/dist/components/ScrollMarker/ScrollMarker.js.map +1 -1
  134. package/dist/components/Sheet/Sheet.js.map +1 -1
  135. package/dist/components/Sheet/SheetActions.js.map +1 -1
  136. package/dist/components/Sheet/SheetBackButton.js.map +1 -1
  137. package/dist/components/Sheet/SheetBody.js.map +1 -1
  138. package/dist/components/Sheet/SheetCloseButton.js.map +1 -1
  139. package/dist/components/Sheet/SheetHeader.js.map +1 -1
  140. package/dist/components/Sheet/SheetRoot.js.map +1 -1
  141. package/dist/components/Sheet/SheetTitle.js.map +1 -1
  142. package/dist/components/SheetOverlay/SheetOverlay.js.map +1 -1
  143. package/dist/components/Spinner/Spinner.css.js +1 -1
  144. package/dist/components/Spinner/Spinner.js.map +1 -1
  145. package/dist/components/SurveyRating/SurveyRating.js.map +1 -1
  146. package/dist/components/SurveySelect/SurveySelect.js.map +1 -1
  147. package/dist/components/Text/Text.css.js +1 -1
  148. package/dist/components/Text/Text.js.map +1 -1
  149. package/dist/components/ThinkingShimmer/ThinkingShimmer.js.map +1 -1
  150. package/dist/components/Toast/Toast.css.js +1 -1
  151. package/dist/components/Toast/Toast.js.map +1 -1
  152. package/dist/components/Toast/ToastContainer.js.map +1 -1
  153. package/dist/components/Toast/index.js +4 -4
  154. package/dist/components/Toggle/Toggle.js.map +1 -1
  155. package/dist/components/Toggle/ToggleIndicator.js.map +1 -1
  156. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  157. package/dist/components/TypingIndicator/TypingIndicator.js.map +1 -1
  158. package/dist/components/UserMessage/UserMessage.js.map +1 -1
  159. package/dist/components/VideoMessage/VideoMessage.css.js +1 -1
  160. package/dist/components/VideoMessage/VideoMessage.js.map +1 -1
  161. package/dist/hooks/overlayRegistry.js.map +1 -1
  162. package/dist/hooks/usePrefersReducedMotion.js.map +1 -1
  163. package/dist/hooks/useSubmitOnEnter.js.map +1 -1
  164. package/dist/index.js +54 -53
  165. package/dist/runtime/LovelaceProvider.js +6 -6
  166. package/dist/runtime/LovelaceProvider.js.map +1 -1
  167. package/dist/runtime/branding.js.map +1 -1
  168. package/dist/style.css +1 -1
  169. package/dist/tokens/tokens.js.map +1 -1
  170. package/dist/utils/animation.js.map +1 -1
  171. package/dist/utils/cx.js.map +1 -1
  172. package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js +1 -1
  173. package/dist/vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js.map +1 -1
  174. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AgentMessage.js","names":[],"sources":["../../../src/components/AgentMessage/AgentMessage.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { MessageProse } from \"../MessageProse/index.js\";\nimport { agentMessageBody } from \"./AgentMessage.css.js\";\n\nexport interface AgentMessageProps {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The agent's message content. Block content (lists, tables) is allowed. */\n\tchildren?: ReactNode;\n}\n\n/**\n * A single chat message from the agent: the message body, with the text\n * direction detected from its own content.\n *\n * Row layout is the transcript's, not this component's — an avatar, a sender\n * attribution, a reaction bar or a retry control are siblings the transcript\n * places beside this body, so they align with the text rather than the avatar\n * gutter and stay outside the body's direction detection. `UserMessage` draws\n * the same boundary.\n *\n * Carries `data-slot=\"message-body\"` from the shared body it composes, for a\n * transcript that needs to find it. Prefer styling this component directly over\n * a descendant selector against that attribute.\n *\n * Announcing new messages is likewise the transcript's responsibility — wrap\n * the message list in a single persistent live region (e.g. `role=\"log\"`)\n * rather than giving each message its own, since a per-message live region\n * mounted already-populated is not reliably announced.\n */\nexport function AgentMessage({\n\tclassName,\n\tchildren,\n\t...rest\n}: AgentMessageProps) {\n\treturn (\n\t\t<MessageProse {...rest} className={cx(agentMessageBody, className)}>\n\t\t\t{children}\n\t\t</MessageProse>\n\t);\n}\n"],"mappings":";;;;;AAgCA,SAAgB,EAAa,EAC5B,cACA,aACA,GAAG,KACkB;AACrB,QACC,kBAAC,GAAD;EAAc,GAAI;EAAM,WAAW,EAAG,GAAkB,EAAU;EAChE;EACa,CAAA"}
1
+ {"version":3,"file":"AgentMessage.js","names":[],"sources":["../../../src/components/AgentMessage/AgentMessage.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { MessageProse } from \"../MessageProse/index.js\";\nimport { agentMessageBody } from \"./AgentMessage.css.js\";\n\nexport interface AgentMessageProps {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The agent's message content. Block content (lists, tables) is allowed. */\n\tchildren?: ReactNode;\n}\n\n/**\n * A single chat message from the agent: the message body, with the text\n * direction detected from its own content.\n *\n * Row layout is the transcript's, not this component's — an avatar, a sender\n * attribution, a reaction bar or a retry control are siblings the transcript\n * places beside this body, so they align with the text rather than the avatar\n * gutter and stay outside the body's direction detection. `UserMessage` draws\n * the same boundary.\n *\n * Carries `data-slot=\"message-body\"` from the shared body it composes, for a\n * transcript that needs to find it. Prefer styling this component directly over\n * a descendant selector against that attribute.\n *\n * Announcing new messages is likewise the transcript's responsibility — wrap\n * the message list in a single persistent live region (e.g. `role=\"log\"`)\n * rather than giving each message its own, since a per-message live region\n * mounted already-populated is not reliably announced.\n */\nexport function AgentMessage({\n\tclassName,\n\tchildren,\n\t...rest\n}: AgentMessageProps) {\n\treturn (\n\t\t<MessageProse {...rest} className={cx(agentMessageBody, className)}>\n\t\t\t{children}\n\t\t</MessageProse>\n\t);\n}\n"],"mappings":";;;;;AAgCA,SAAgB,EAAa,EAC5B,cACA,aACA,GAAG,KACkB;CACrB,OACC,kBAAC,GAAD;EAAc,GAAI;EAAM,WAAW,EAAG,GAAkB,CAAS;EAC/D;CACY,CAAA;AAEhB"}
@@ -1,5 +1,5 @@
1
1
  /* empty css */
2
- import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
+ import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
3
3
  //#region src/components/AttachmentChip/AttachmentChip.css.ts
4
4
  var t = e({
5
5
  defaultClassName: "_1chqu661 _1chqu660",
@@ -1 +1 @@
1
- {"version":3,"file":"AttachmentChip.js","names":[],"sources":["../../../src/components/AttachmentChip/AttachmentChip.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tattachmentChipLabel,\n\tattachmentChipMedia,\n\tattachmentChipRoot,\n\tattachmentChipThumbnail,\n} from \"./AttachmentChip.css.js\";\n\nexport interface AttachmentChipProps {\n\t/** Filename, or a summary such as \"3 attachments\". */\n\tlabel: string;\n\t/**\n\t * Thumbnail source, rendered as given. Validate it first — and use\n\t * `onImageError` to retire one that fails, since a broken image is worse\n\t * than the stand-in.\n\t */\n\tthumbnailUrl?: string | null;\n\t/** Shown in the media box when there is no thumbnail: an icon, or a spinner. */\n\tmedia?: ReactNode;\n\t/**\n\t * Marks the whole chip busy, for an upload that has not settled. Surfaces as\n\t * `data-busy` on both roots and as `aria-busy` on the container root only —\n\t * React Aria filters `aria-busy` out of `Button`'s DOM props, so a pressable\n\t * chip cannot carry it and its caller should announce the state in a live\n\t * region instead.\n\t */\n\tisBusy?: boolean;\n\t/** Fires when `thumbnailUrl` fails to load. */\n\tonImageError?: () => void;\n\t/**\n\t * Makes the chip itself the control. Use it for a summary that opens\n\t * something; leave it off when `action` is the only control, so the chip does\n\t * not become a focus stop wrapping another button.\n\t */\n\tonPress?: () => void;\n\t/** Trailing control — typically a remove `IconButton`. Ignored with `onPress`. */\n\taction?: ReactNode;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\t/**\n\t * The `div` root only. With `onPress` the root is a RAC `Button`, whose\n\t * element type disagrees, and widening this to a union would stop an\n\t * existing `RefObject<HTMLDivElement>` type-checking — so it is dropped\n\t * there rather than forwarded. A pressable chip needs no ref today: RAC's\n\t * modal restores focus to its trigger on dismiss.\n\t */\n\tref?: Ref<HTMLDivElement>;\n\tid?: string;\n\t/**\n\t * Deliberately the only passthrough besides `id` and the two ARIA props\n\t * below: the two roots are a `div` and a RAC `Button`, whose event-handler\n\t * types disagree, so a blanket `HTMLAttributes` spread cannot type-check\n\t * against both.\n\t */\n\t\"data-testid\"?: string;\n\t/**\n\t * What pressing the chip opens. `onPress` only makes it a button; without\n\t * this a chip that opens the attachments sheet reads as \"3 attachments,\n\t * button\" with no hint that a dialog follows. Ignored without `onPress`.\n\t */\n\t\"aria-haspopup\"?: \"dialog\" | \"menu\" | \"listbox\" | \"true\";\n\t/** Whether what `aria-haspopup` names is currently open. */\n\t\"aria-expanded\"?: boolean;\n}\n\n/**\n * A staged or attached file inside the composer field: a thumbnail (or a\n * stand-in), its name, and one control.\n *\n * Two shapes, and they are mutually exclusive by construction. With `action` the\n * chip is a plain container and the trailing button is the only control — one\n * file, removable. With `onPress` the chip itself is the control and the\n * trailing slot is dropped, because a summary standing for several files has\n * nowhere sensible to put a single remove. Passing both would nest a button\n * inside a button, which is invalid and unreachable by keyboard.\n */\nexport function AttachmentChip({\n\tlabel,\n\tthumbnailUrl,\n\tmedia,\n\tisBusy,\n\tonImageError,\n\tonPress,\n\taction,\n\tclassName,\n\tstyle,\n\tref,\n\tid,\n\t\"aria-haspopup\": ariaHasPopup,\n\t\"aria-expanded\": ariaExpanded,\n\t\"data-testid\": testId,\n}: AttachmentChipProps) {\n\tconst content = (\n\t\t<>\n\t\t\t{/* Decorative: the label beside it is the accessible text, so alt text\n\t\t\t of the filename would read it twice. */}\n\t\t\t<span className={attachmentChipMedia} aria-hidden=\"true\">\n\t\t\t\t{thumbnailUrl ? (\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName={attachmentChipThumbnail}\n\t\t\t\t\t\tsrc={thumbnailUrl}\n\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\tonError={onImageError}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\tmedia\n\t\t\t\t)}\n\t\t\t</span>\n\t\t\t<span className={attachmentChipLabel} dir=\"auto\" title={label}>\n\t\t\t\t{label}\n\t\t\t</span>\n\t\t\t{!onPress && action}\n\t\t</>\n\t);\n\n\tif (onPress) {\n\t\treturn (\n\t\t\t<AriaButton\n\t\t\t\tid={id}\n\t\t\t\tdata-testid={testId}\n\t\t\t\taria-label={label}\n\t\t\t\taria-haspopup={ariaHasPopup}\n\t\t\t\taria-expanded={ariaExpanded}\n\t\t\t\tdata-busy={isBusy || undefined}\n\t\t\t\tclassName={cx(attachmentChipRoot({ interactive: true }), className)}\n\t\t\t\tstyle={style}\n\t\t\t\tonPress={onPress}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</AriaButton>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tdata-testid={testId}\n\t\t\tref={ref}\n\t\t\taria-busy={isBusy || undefined}\n\t\t\tdata-busy={isBusy || undefined}\n\t\t\tclassName={cx(attachmentChipRoot({ interactive: false }), className)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{content}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AA8EA,SAAgB,EAAe,EAC9B,UACA,iBACA,UACA,WACA,iBACA,YACA,WACA,cACA,UACA,QACA,OACA,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,KACQ;CACvB,IAAM,IACL,kBAAA,GAAA,EAAA,UAAA;EAGC,kBAAC,QAAD;GAAM,WAAW;GAAqB,eAAY;aAChD,IACA,kBAAC,OAAD;IACC,WAAW;IACX,KAAK;IACL,KAAI;IACJ,SAAS;IACR,CAAA,GAEF;GAEK,CAAA;EACP,kBAAC,QAAD;GAAM,WAAW;GAAqB,KAAI;GAAO,OAAO;aACtD;GACK,CAAA;EACN,CAAC,KAAW;EACX,EAAA,CAAA;AAqBJ,QAlBI,IAEF,kBAAC,GAAD;EACK;EACJ,eAAa;EACb,cAAY;EACZ,iBAAe;EACf,iBAAe;EACf,aAAW,KAAU,KAAA;EACrB,WAAW,EAAG,EAAmB,EAAE,aAAa,IAAM,CAAC,EAAE,EAAU;EAC5D;EACE;YAER;EACW,CAAA,GAKd,kBAAC,OAAD;EACK;EACJ,eAAa;EACR;EACL,aAAW,KAAU,KAAA;EACrB,aAAW,KAAU,KAAA;EACrB,WAAW,EAAG,EAAmB,EAAE,aAAa,IAAO,CAAC,EAAE,EAAU;EAC7D;YAEN;EACI,CAAA"}
1
+ {"version":3,"file":"AttachmentChip.js","names":[],"sources":["../../../src/components/AttachmentChip/AttachmentChip.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tattachmentChipLabel,\n\tattachmentChipMedia,\n\tattachmentChipRoot,\n\tattachmentChipThumbnail,\n} from \"./AttachmentChip.css.js\";\n\nexport interface AttachmentChipProps {\n\t/** Filename, or a summary such as \"3 attachments\". */\n\tlabel: string;\n\t/**\n\t * Thumbnail source, rendered as given. Validate it first — and use\n\t * `onImageError` to retire one that fails, since a broken image is worse\n\t * than the stand-in.\n\t */\n\tthumbnailUrl?: string | null;\n\t/** Shown in the media box when there is no thumbnail: an icon, or a spinner. */\n\tmedia?: ReactNode;\n\t/**\n\t * Marks the whole chip busy, for an upload that has not settled. Surfaces as\n\t * `data-busy` on both roots and as `aria-busy` on the container root only —\n\t * React Aria filters `aria-busy` out of `Button`'s DOM props, so a pressable\n\t * chip cannot carry it and its caller should announce the state in a live\n\t * region instead.\n\t */\n\tisBusy?: boolean;\n\t/** Fires when `thumbnailUrl` fails to load. */\n\tonImageError?: () => void;\n\t/**\n\t * Makes the chip itself the control. Use it for a summary that opens\n\t * something; leave it off when `action` is the only control, so the chip does\n\t * not become a focus stop wrapping another button.\n\t */\n\tonPress?: () => void;\n\t/** Trailing control — typically a remove `IconButton`. Ignored with `onPress`. */\n\taction?: ReactNode;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\t/**\n\t * The `div` root only. With `onPress` the root is a RAC `Button`, whose\n\t * element type disagrees, and widening this to a union would stop an\n\t * existing `RefObject<HTMLDivElement>` type-checking — so it is dropped\n\t * there rather than forwarded. A pressable chip needs no ref today: RAC's\n\t * modal restores focus to its trigger on dismiss.\n\t */\n\tref?: Ref<HTMLDivElement>;\n\tid?: string;\n\t/**\n\t * Deliberately the only passthrough besides `id` and the two ARIA props\n\t * below: the two roots are a `div` and a RAC `Button`, whose event-handler\n\t * types disagree, so a blanket `HTMLAttributes` spread cannot type-check\n\t * against both.\n\t */\n\t\"data-testid\"?: string;\n\t/**\n\t * What pressing the chip opens. `onPress` only makes it a button; without\n\t * this a chip that opens the attachments sheet reads as \"3 attachments,\n\t * button\" with no hint that a dialog follows. Ignored without `onPress`.\n\t */\n\t\"aria-haspopup\"?: \"dialog\" | \"menu\" | \"listbox\" | \"true\";\n\t/** Whether what `aria-haspopup` names is currently open. */\n\t\"aria-expanded\"?: boolean;\n}\n\n/**\n * A staged or attached file inside the composer field: a thumbnail (or a\n * stand-in), its name, and one control.\n *\n * Two shapes, and they are mutually exclusive by construction. With `action` the\n * chip is a plain container and the trailing button is the only control — one\n * file, removable. With `onPress` the chip itself is the control and the\n * trailing slot is dropped, because a summary standing for several files has\n * nowhere sensible to put a single remove. Passing both would nest a button\n * inside a button, which is invalid and unreachable by keyboard.\n */\nexport function AttachmentChip({\n\tlabel,\n\tthumbnailUrl,\n\tmedia,\n\tisBusy,\n\tonImageError,\n\tonPress,\n\taction,\n\tclassName,\n\tstyle,\n\tref,\n\tid,\n\t\"aria-haspopup\": ariaHasPopup,\n\t\"aria-expanded\": ariaExpanded,\n\t\"data-testid\": testId,\n}: AttachmentChipProps) {\n\tconst content = (\n\t\t<>\n\t\t\t{/* Decorative: the label beside it is the accessible text, so alt text\n\t\t\t of the filename would read it twice. */}\n\t\t\t<span className={attachmentChipMedia} aria-hidden=\"true\">\n\t\t\t\t{thumbnailUrl ? (\n\t\t\t\t\t<img\n\t\t\t\t\t\tclassName={attachmentChipThumbnail}\n\t\t\t\t\t\tsrc={thumbnailUrl}\n\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\tonError={onImageError}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\tmedia\n\t\t\t\t)}\n\t\t\t</span>\n\t\t\t<span className={attachmentChipLabel} dir=\"auto\" title={label}>\n\t\t\t\t{label}\n\t\t\t</span>\n\t\t\t{!onPress && action}\n\t\t</>\n\t);\n\n\tif (onPress) {\n\t\treturn (\n\t\t\t<AriaButton\n\t\t\t\tid={id}\n\t\t\t\tdata-testid={testId}\n\t\t\t\taria-label={label}\n\t\t\t\taria-haspopup={ariaHasPopup}\n\t\t\t\taria-expanded={ariaExpanded}\n\t\t\t\tdata-busy={isBusy || undefined}\n\t\t\t\tclassName={cx(attachmentChipRoot({ interactive: true }), className)}\n\t\t\t\tstyle={style}\n\t\t\t\tonPress={onPress}\n\t\t\t>\n\t\t\t\t{content}\n\t\t\t</AriaButton>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tid={id}\n\t\t\tdata-testid={testId}\n\t\t\tref={ref}\n\t\t\taria-busy={isBusy || undefined}\n\t\t\tdata-busy={isBusy || undefined}\n\t\t\tclassName={cx(attachmentChipRoot({ interactive: false }), className)}\n\t\t\tstyle={style}\n\t\t>\n\t\t\t{content}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AA8EA,SAAgB,EAAe,EAC9B,UACA,iBACA,UACA,WACA,iBACA,YACA,WACA,cACA,UACA,QACA,OACA,iBAAiB,GACjB,iBAAiB,GACjB,eAAe,KACQ;CACvB,IAAM,IACL,kBAAA,GAAA,EAAA,UAAA;EAGC,kBAAC,QAAD;GAAM,WAAW;GAAqB,eAAY;aAChD,IACA,kBAAC,OAAD;IACC,WAAW;IACX,KAAK;IACL,KAAI;IACJ,SAAS;GACT,CAAA,IAED;EAEI,CAAA;EACN,kBAAC,QAAD;GAAM,WAAW;GAAqB,KAAI;GAAO,OAAO;aACtD;EACI,CAAA;EACL,CAAC,KAAW;CACZ,EAAA,CAAA;CAqBH,OAlBI,IAEF,kBAAC,GAAD;EACK;EACJ,eAAa;EACb,cAAY;EACZ,iBAAe;EACf,iBAAe;EACf,aAAW,KAAU,KAAA;EACrB,WAAW,EAAG,EAAmB,EAAE,aAAa,GAAK,CAAC,GAAG,CAAS;EAC3D;EACE;YAER;CACU,CAAA,IAKb,kBAAC,OAAD;EACK;EACJ,eAAa;EACR;EACL,aAAW,KAAU,KAAA;EACrB,aAAW,KAAU,KAAA;EACrB,WAAW,EAAG,EAAmB,EAAE,aAAa,GAAM,CAAC,GAAG,CAAS;EAC5D;YAEN;CACG,CAAA;AAEP"}
@@ -1,4 +1,4 @@
1
- import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
1
+ import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
2
  /* empty css */
3
3
  //#region src/components/Avatar/Avatar.css.ts
4
4
  var t = e({
@@ -1 +1 @@
1
- {"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { avatarRoot } from \"./Avatar.css.js\";\nimport { AvatarPlaceholder } from \"./AvatarPlaceholder.js\";\n\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\ninterface AvatarBaseProps\n\textends Omit<HTMLAttributes<HTMLSpanElement>, \"aria-hidden\"> {\n\tsize?: AvatarSize;\n\t/**\n\t * When false, render a same-footprint, `aria-hidden` spacer instead of the\n\t * bubble — e.g. to align grouped rows under the first row's avatar. The\n\t * reserved gap shares the bubble's size source, so it can never drift.\n\t */\n\tshowAvatar?: boolean;\n\t/** Initials text, an `<Icon>`, or an `<Image>`. */\n\tchildren?: ReactNode;\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * The accessible name is the consumer's to supply: pass `label` to name the\n * avatar, or `aria-hidden` to mark it decorative. The design system does not\n * assume a default name — an avatar's meaning (which bot, which agent) lives\n * with the consumer, not here.\n */\nexport type AvatarProps = AvatarBaseProps &\n\t(\n\t\t| { label: string; \"aria-hidden\"?: never }\n\t\t| { label?: never; \"aria-hidden\": true }\n\t);\n\n/**\n * A circular avatar bubble. The content — initials, icon, or image — is\n * composed as children; Avatar styles each by its `data-slot`. It is bubble\n * only: the name layout is composed by the consumer. With `showAvatar={false}`\n * it collapses to an invisible, same-footprint spacer.\n */\nexport function Avatar({\n\tlabel,\n\tsize = \"sm\",\n\tshowAvatar = true,\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: AvatarProps) {\n\tif (!showAvatar) {\n\t\treturn (\n\t\t\t<AvatarPlaceholder\n\t\t\t\t{...rest}\n\t\t\t\tref={ref}\n\t\t\t\tsize={size}\n\t\t\t\tclassName={className}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<span\n\t\t\t{...rest}\n\t\t\tref={ref}\n\t\t\tdata-slot=\"avatar\"\n\t\t\tdata-size={size}\n\t\t\trole=\"img\"\n\t\t\taria-label={label}\n\t\t\tclassName={cx(avatarRoot({ size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;AAuCA,SAAgB,EAAO,EACtB,UACA,UAAO,MACP,gBAAa,IACb,cACA,aACA,QACA,GAAG,KACY;AAYf,QAXK,IAYJ,kBAAC,QAAD;EACC,GAAI;EACC;EACL,aAAU;EACV,aAAW;EACX,MAAK;EACL,cAAY;EACZ,WAAW,EAAG,EAAW,EAAE,SAAM,CAAC,EAAE,EAAU;EAE7C;EACK,CAAA,GApBN,kBAAC,GAAD;EACC,GAAI;EACC;EACC;EACK;EACV,CAAA"}
1
+ {"version":3,"file":"Avatar.js","names":[],"sources":["../../../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { avatarRoot } from \"./Avatar.css.js\";\nimport { AvatarPlaceholder } from \"./AvatarPlaceholder.js\";\n\nexport type AvatarSize = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\ninterface AvatarBaseProps\n\textends Omit<HTMLAttributes<HTMLSpanElement>, \"aria-hidden\"> {\n\tsize?: AvatarSize;\n\t/**\n\t * When false, render a same-footprint, `aria-hidden` spacer instead of the\n\t * bubble — e.g. to align grouped rows under the first row's avatar. The\n\t * reserved gap shares the bubble's size source, so it can never drift.\n\t */\n\tshowAvatar?: boolean;\n\t/** Initials text, an `<Icon>`, or an `<Image>`. */\n\tchildren?: ReactNode;\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * The accessible name is the consumer's to supply: pass `label` to name the\n * avatar, or `aria-hidden` to mark it decorative. The design system does not\n * assume a default name — an avatar's meaning (which bot, which agent) lives\n * with the consumer, not here.\n */\nexport type AvatarProps = AvatarBaseProps &\n\t(\n\t\t| { label: string; \"aria-hidden\"?: never }\n\t\t| { label?: never; \"aria-hidden\": true }\n\t);\n\n/**\n * A circular avatar bubble. The content — initials, icon, or image — is\n * composed as children; Avatar styles each by its `data-slot`. It is bubble\n * only: the name layout is composed by the consumer. With `showAvatar={false}`\n * it collapses to an invisible, same-footprint spacer.\n */\nexport function Avatar({\n\tlabel,\n\tsize = \"sm\",\n\tshowAvatar = true,\n\tclassName,\n\tchildren,\n\tref,\n\t...rest\n}: AvatarProps) {\n\tif (!showAvatar) {\n\t\treturn (\n\t\t\t<AvatarPlaceholder\n\t\t\t\t{...rest}\n\t\t\t\tref={ref}\n\t\t\t\tsize={size}\n\t\t\t\tclassName={className}\n\t\t\t/>\n\t\t);\n\t}\n\n\treturn (\n\t\t<span\n\t\t\t{...rest}\n\t\t\tref={ref}\n\t\t\tdata-slot=\"avatar\"\n\t\t\tdata-size={size}\n\t\t\trole=\"img\"\n\t\t\taria-label={label}\n\t\t\tclassName={cx(avatarRoot({ size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;;AAuCA,SAAgB,EAAO,EACtB,UACA,UAAO,MACP,gBAAa,IACb,cACA,aACA,QACA,GAAG,KACY;CAYf,OAXK,IAYJ,kBAAC,QAAD;EACC,GAAI;EACC;EACL,aAAU;EACV,aAAW;EACX,MAAK;EACL,cAAY;EACZ,WAAW,EAAG,EAAW,EAAE,QAAK,CAAC,GAAG,CAAS;EAE5C;CACI,CAAA,IApBL,kBAAC,GAAD;EACC,GAAI;EACC;EACC;EACK;CACX,CAAA;AAiBJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarPlaceholder.js","names":[],"sources":["../../../src/components/Avatar/AvatarPlaceholder.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { avatarPlaceholder } from \"./Avatar.css.js\";\nimport type { AvatarSize } from \"./Avatar.js\";\n\nexport interface AvatarPlaceholderProps\n\textends HTMLAttributes<HTMLSpanElement> {\n\tsize?: AvatarSize;\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * An empty, `aria-hidden` box with the exact footprint of an `Avatar` of the\n * same `size`. Reserves an avatar's space where one is never shown — e.g.\n * aligning a row under sibling rows' avatars — so the gap can never drift from\n * the avatar's real dimensions. For the conditional case, prefer\n * `<Avatar showAvatar={false}>`, which delegates here.\n */\nexport function AvatarPlaceholder({\n\tsize = \"sm\",\n\tclassName,\n\tref,\n\t...rest\n}: AvatarPlaceholderProps) {\n\treturn (\n\t\t<span\n\t\t\t{...rest}\n\t\t\tref={ref}\n\t\t\taria-hidden=\"true\"\n\t\t\tdata-slot=\"avatar-placeholder\"\n\t\t\tdata-size={size}\n\t\t\tclassName={cx(avatarPlaceholder({ size }), className)}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;AAkBA,SAAgB,EAAkB,EACjC,UAAO,MACP,cACA,QACA,GAAG,KACuB;AAC1B,QACC,kBAAC,QAAD;EACC,GAAI;EACC;EACL,eAAY;EACZ,aAAU;EACV,aAAW;EACX,WAAW,EAAG,EAAkB,EAAE,SAAM,CAAC,EAAE,EAAU;EACpD,CAAA"}
1
+ {"version":3,"file":"AvatarPlaceholder.js","names":[],"sources":["../../../src/components/Avatar/AvatarPlaceholder.tsx"],"sourcesContent":["import type { HTMLAttributes, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { avatarPlaceholder } from \"./Avatar.css.js\";\nimport type { AvatarSize } from \"./Avatar.js\";\n\nexport interface AvatarPlaceholderProps\n\textends HTMLAttributes<HTMLSpanElement> {\n\tsize?: AvatarSize;\n\tref?: Ref<HTMLSpanElement>;\n}\n\n/**\n * An empty, `aria-hidden` box with the exact footprint of an `Avatar` of the\n * same `size`. Reserves an avatar's space where one is never shown — e.g.\n * aligning a row under sibling rows' avatars — so the gap can never drift from\n * the avatar's real dimensions. For the conditional case, prefer\n * `<Avatar showAvatar={false}>`, which delegates here.\n */\nexport function AvatarPlaceholder({\n\tsize = \"sm\",\n\tclassName,\n\tref,\n\t...rest\n}: AvatarPlaceholderProps) {\n\treturn (\n\t\t<span\n\t\t\t{...rest}\n\t\t\tref={ref}\n\t\t\taria-hidden=\"true\"\n\t\t\tdata-slot=\"avatar-placeholder\"\n\t\t\tdata-size={size}\n\t\t\tclassName={cx(avatarPlaceholder({ size }), className)}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;AAkBA,SAAgB,EAAkB,EACjC,UAAO,MACP,cACA,QACA,GAAG,KACuB;CAC1B,OACC,kBAAC,QAAD;EACC,GAAI;EACC;EACL,eAAY;EACZ,aAAU;EACV,aAAW;EACX,WAAW,EAAG,EAAkB,EAAE,QAAK,CAAC,GAAG,CAAS;CACpD,CAAA;AAEH"}
@@ -1,4 +1,4 @@
1
- import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
1
+ import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
2
  /* empty css */
3
3
  //#region src/components/Banner/Banner.css.ts
4
4
  var t = e({
@@ -1 +1 @@
1
- {"version":3,"file":"Banner.js","names":[],"sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tCheckmark,\n\tExclamationTriangle,\n\tXmarkCircle,\n} from \"../Icon/icons/index.js\";\nimport { bannerMessage, bannerRoot } from \"./Banner.css.js\";\n\nexport type BannerStatus = \"success\" | \"warning\" | \"error\";\n\nconst STATUS_ICON = {\n\tsuccess: Checkmark,\n\twarning: ExclamationTriangle,\n\terror: XmarkCircle,\n} as const;\n\nexport interface BannerProps {\n\t/**\n\t * The outcome being reported. It selects the background and content color\n\t * pair, and the urgency `BannerContainer` announces it with. Bind it to the\n\t * result of the action, not the UI.\n\t */\n\tstatus?: BannerStatus;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/**\n\t * The message to display. A status icon is rendered automatically, so the\n\t * status is conveyed without color perception; for screen-reader users the\n\t * icon is decorative, so include the status in the copy when the message\n\t * alone wouldn't make the outcome clear.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * The full-width status-tinted strip for a lasting condition. The message stays\n * while the condition holds, rather than the floating card `Toast` paints for a\n * passing event. The two differ on purpose: a strip reads as part of the page, a\n * card as passing through.\n *\n * It carries no control, because only the condition behind it takes it down.\n *\n * Purely presentational: it owns no live region, so rendering it standalone\n * announces nothing. Put it in a `BannerContainer`, which owns the announcement\n * and the motion.\n */\nexport function Banner({\n\tstatus = \"success\",\n\tclassName,\n\tchildren,\n\t...rest\n}: BannerProps) {\n\tconst StatusIcon = STATUS_ICON[status];\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tdata-status={status}\n\t\t\tclassName={cx(bannerRoot({ status }), className)}\n\t\t>\n\t\t\t<StatusIcon />\n\t\t\t<span className={bannerMessage}>{children}</span>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAWA,IAAM,IAAc;CACnB,SAAS;CACT,SAAS;CACT,OAAO;CACP;AAiCD,SAAgB,EAAO,EACtB,YAAS,WACT,cACA,aACA,GAAG,KACY;CACf,IAAM,IAAa,EAAY;AAC/B,QACC,kBAAC,OAAD;EACC,GAAI;EACJ,eAAa;EACb,WAAW,EAAG,EAAW,EAAE,WAAQ,CAAC,EAAE,EAAU;YAHjD,CAKC,kBAAC,GAAD,EAAc,CAAA,EACd,kBAAC,QAAD;GAAM,WAAW;GAAgB;GAAgB,CAAA,CAC5C"}
1
+ {"version":3,"file":"Banner.js","names":[],"sources":["../../../src/components/Banner/Banner.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport {\n\tCheckmark,\n\tExclamationTriangle,\n\tXmarkCircle,\n} from \"../Icon/icons/index.js\";\nimport { bannerMessage, bannerRoot } from \"./Banner.css.js\";\n\nexport type BannerStatus = \"success\" | \"warning\" | \"error\";\n\nconst STATUS_ICON = {\n\tsuccess: Checkmark,\n\twarning: ExclamationTriangle,\n\terror: XmarkCircle,\n} as const;\n\nexport interface BannerProps {\n\t/**\n\t * The outcome being reported. It selects the background and content color\n\t * pair, and the urgency `BannerContainer` announces it with. Bind it to the\n\t * result of the action, not the UI.\n\t */\n\tstatus?: BannerStatus;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/**\n\t * The message to display. A status icon is rendered automatically, so the\n\t * status is conveyed without color perception; for screen-reader users the\n\t * icon is decorative, so include the status in the copy when the message\n\t * alone wouldn't make the outcome clear.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * The full-width status-tinted strip for a lasting condition. The message stays\n * while the condition holds, rather than the floating card `Toast` paints for a\n * passing event. The two differ on purpose: a strip reads as part of the page, a\n * card as passing through.\n *\n * It carries no control, because only the condition behind it takes it down.\n *\n * Purely presentational: it owns no live region, so rendering it standalone\n * announces nothing. Put it in a `BannerContainer`, which owns the announcement\n * and the motion.\n */\nexport function Banner({\n\tstatus = \"success\",\n\tclassName,\n\tchildren,\n\t...rest\n}: BannerProps) {\n\tconst StatusIcon = STATUS_ICON[status];\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tdata-status={status}\n\t\t\tclassName={cx(bannerRoot({ status }), className)}\n\t\t>\n\t\t\t<StatusIcon />\n\t\t\t<span className={bannerMessage}>{children}</span>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;AAWA,IAAM,IAAc;CACnB,SAAS;CACT,SAAS;CACT,OAAO;AACR;AAiCA,SAAgB,EAAO,EACtB,YAAS,WACT,cACA,aACA,GAAG,KACY;CACf,IAAM,IAAa,EAAY;CAC/B,OACC,kBAAC,OAAD;EACC,GAAI;EACJ,eAAa;EACb,WAAW,EAAG,EAAW,EAAE,UAAO,CAAC,GAAG,CAAS;YAHhD,CAKC,kBAAC,GAAD,CAAa,CAAA,GACb,kBAAC,QAAD;GAAM,WAAW;GAAgB;EAAe,CAAA,CAC5C;;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"BannerContainer.js","names":[],"sources":["../../../src/components/Banner/BannerContainer.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement, Ref } from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { bannerContainer } from \"./Banner.css.js\";\nimport type { BannerProps } from \"./Banner.js\";\nimport { BannerContainerSlide } from \"./BannerContainerSlide.js\";\n\nexport interface BannerContainerProps {\n\t/**\n\t * The `Banner` for the condition that currently holds, or null when none\n\t * does. Pick the one to show before handing it over: the container holds a\n\t * single banner, and on a narrow surface a second one buries the content\n\t * behind it.\n\t */\n\tchildren: ReactElement<BannerProps> | null;\n\t/**\n\t * Identifies the condition on screen. Change it whenever the reader should\n\t * hear the banner again: the same condition happening a second time with the\n\t * same wording, a different condition taking the slot, or a change of status.\n\t * A change hides the region for a frame and reveals it, which is what makes\n\t * wording the reader has already heard read out again. Leaving it alone still\n\t * replaces the text, and the live region reports that change on its own.\n\t */\n\toccurrence?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n}\n\n/** Why the live region is hidden for a frame, or `none` while it is not. */\ntype Reveal = \"none\" | \"arrival\" | \"swap\";\n\n/**\n * Announces and animates one `Banner`.\n *\n * It owns the live region, so the region is mounted and empty before any banner\n * arrives. A live region that mounts with its text already in place is never\n * announced. Urgency follows the banner's status: `error` interrupts as an\n * assertive `alert`, anything else waits its turn as a polite `status`.\n *\n * Mount it for as long as the surface exists and drive it with `children`. It\n * clips its own banner's travel, so the consumer needs no `overflow` rule.\n */\nexport function BannerContainer({\n\tchildren,\n\toccurrence,\n\tclassName,\n\tstyle,\n\tref,\n}: BannerContainerProps) {\n\tconst isPresent = children !== null;\n\n\t// Derive during render rather than in an effect. An effect runs after the\n\t// commit that already dropped the banner, so its exit animation would be\n\t// missed. The previous values are state rather than refs because React can\n\t// discard a render, which would keep a ref write but drop the update beside\n\t// it.\n\tconst [held, setHeld] = useState(children);\n\tconst [isShowing, setIsShowing] = useState(isPresent);\n\tconst [reveal, setReveal] = useState<Reveal>(isPresent ? \"arrival\" : \"none\");\n\tconst [lastOccurrence, setLastOccurrence] = useState(occurrence);\n\n\tconst wasShowing = isShowing;\n\tif (isPresent && held !== children) {\n\t\tsetHeld(children);\n\t}\n\tif (isPresent && !isShowing) {\n\t\tsetIsShowing(true);\n\t}\n\tif (lastOccurrence !== occurrence) {\n\t\tsetLastOccurrence(occurrence);\n\t\t// A banner arriving into an empty region is already a mutation the reader\n\t\t// hears, so only one replacing another has to be re-announced.\n\t\tif (isPresent && wasShowing) {\n\t\t\tsetReveal(\"swap\");\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (reveal === \"none\") {\n\t\t\treturn;\n\t\t}\n\t\t// Two frames: the first is the one the hidden state paints in, and clearing\n\t\t// the flag before that paint leaves the fade with nothing to run from.\n\t\tlet secondFrame = 0;\n\t\tconst frame = requestAnimationFrame(() => {\n\t\t\tsecondFrame = requestAnimationFrame(() => setReveal(\"none\"));\n\t\t});\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(frame);\n\t\t\tcancelAnimationFrame(secondFrame);\n\t\t};\n\t}, [reveal]);\n\n\tconst handleExited = useCallback(() => setIsShowing(false), []);\n\n\t// Read off the banner on screen rather than the last one held. A region that\n\t// keeps a role with nothing in it reports a condition that has cleared, and it\n\t// answers to a consumer looking for whichever banner does hold.\n\tconst isError = isShowing && held?.props.status === \"error\";\n\tconst politeRole = isShowing ? \"status\" : undefined;\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={cx(bannerContainer, className)}\n\t\t\tstyle={style}\n\t\t\trole={isError ? \"alert\" : politeRole}\n\t\t\taria-live={isError ? \"assertive\" : \"polite\"}\n\t\t\taria-atomic=\"true\"\n\t\t\taria-hidden={reveal === \"none\" ? undefined : \"true\"}\n\t\t>\n\t\t\t{isShowing && (\n\t\t\t\t<BannerContainerSlide\n\t\t\t\t\tisPresent={isPresent}\n\t\t\t\t\tisSwapping={reveal === \"swap\"}\n\t\t\t\t\tonExited={handleExited}\n\t\t\t\t>\n\t\t\t\t\t{held}\n\t\t\t\t</BannerContainerSlide>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AA2CA,SAAgB,EAAgB,EAC/B,aACA,eACA,cACA,UACA,UACwB;CACxB,IAAM,IAAY,MAAa,MAOzB,CAAC,GAAM,KAAW,EAAS,EAAS,EACpC,CAAC,GAAW,KAAgB,EAAS,EAAU,EAC/C,CAAC,GAAQ,KAAa,EAAiB,IAAY,YAAY,OAAO,EACtE,CAAC,GAAgB,KAAqB,EAAS,EAAW,EAE1D,IAAa;AAgBnB,CAfI,KAAa,MAAS,KACzB,EAAQ,EAAS,EAEd,KAAa,CAAC,KACjB,EAAa,GAAK,EAEf,MAAmB,MACtB,EAAkB,EAAW,EAGzB,KAAa,KAChB,EAAU,OAAO,GAInB,QAAgB;AACf,MAAI,MAAW,OACd;EAID,IAAI,IAAc,GACZ,IAAQ,4BAA4B;AACzC,OAAc,4BAA4B,EAAU,OAAO,CAAC;IAC3D;AACF,eAAa;AAEZ,GADA,qBAAqB,EAAM,EAC3B,qBAAqB,EAAY;;IAEhC,CAAC,EAAO,CAAC;CAEZ,IAAM,IAAe,QAAkB,EAAa,GAAM,EAAE,EAAE,CAAC,EAKzD,IAAU,KAAa,GAAM,MAAM,WAAW,SAC9C,IAAa,IAAY,WAAW,KAAA;AAE1C,QACC,kBAAC,OAAD;EACM;EACL,WAAW,EAAG,GAAiB,EAAU;EAClC;EACP,MAAM,IAAU,UAAU;EAC1B,aAAW,IAAU,cAAc;EACnC,eAAY;EACZ,eAAa,MAAW,SAAS,KAAA,IAAY;YAE5C,KACA,kBAAC,GAAD;GACY;GACX,YAAY,MAAW;GACvB,UAAU;aAET;GACqB,CAAA;EAEnB,CAAA"}
1
+ {"version":3,"file":"BannerContainer.js","names":[],"sources":["../../../src/components/Banner/BannerContainer.tsx"],"sourcesContent":["import type { CSSProperties, ReactElement, Ref } from \"react\";\nimport { useCallback, useEffect, useState } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { bannerContainer } from \"./Banner.css.js\";\nimport type { BannerProps } from \"./Banner.js\";\nimport { BannerContainerSlide } from \"./BannerContainerSlide.js\";\n\nexport interface BannerContainerProps {\n\t/**\n\t * The `Banner` for the condition that currently holds, or null when none\n\t * does. Pick the one to show before handing it over: the container holds a\n\t * single banner, and on a narrow surface a second one buries the content\n\t * behind it.\n\t */\n\tchildren: ReactElement<BannerProps> | null;\n\t/**\n\t * Identifies the condition on screen. Change it whenever the reader should\n\t * hear the banner again: the same condition happening a second time with the\n\t * same wording, a different condition taking the slot, or a change of status.\n\t * A change hides the region for a frame and reveals it, which is what makes\n\t * wording the reader has already heard read out again. Leaving it alone still\n\t * replaces the text, and the live region reports that change on its own.\n\t */\n\toccurrence?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n}\n\n/** Why the live region is hidden for a frame, or `none` while it is not. */\ntype Reveal = \"none\" | \"arrival\" | \"swap\";\n\n/**\n * Announces and animates one `Banner`.\n *\n * It owns the live region, so the region is mounted and empty before any banner\n * arrives. A live region that mounts with its text already in place is never\n * announced. Urgency follows the banner's status: `error` interrupts as an\n * assertive `alert`, anything else waits its turn as a polite `status`.\n *\n * Mount it for as long as the surface exists and drive it with `children`. It\n * clips its own banner's travel, so the consumer needs no `overflow` rule.\n */\nexport function BannerContainer({\n\tchildren,\n\toccurrence,\n\tclassName,\n\tstyle,\n\tref,\n}: BannerContainerProps) {\n\tconst isPresent = children !== null;\n\n\t// Derive during render rather than in an effect. An effect runs after the\n\t// commit that already dropped the banner, so its exit animation would be\n\t// missed. The previous values are state rather than refs because React can\n\t// discard a render, which would keep a ref write but drop the update beside\n\t// it.\n\tconst [held, setHeld] = useState(children);\n\tconst [isShowing, setIsShowing] = useState(isPresent);\n\tconst [reveal, setReveal] = useState<Reveal>(isPresent ? \"arrival\" : \"none\");\n\tconst [lastOccurrence, setLastOccurrence] = useState(occurrence);\n\n\tconst wasShowing = isShowing;\n\tif (isPresent && held !== children) {\n\t\tsetHeld(children);\n\t}\n\tif (isPresent && !isShowing) {\n\t\tsetIsShowing(true);\n\t}\n\tif (lastOccurrence !== occurrence) {\n\t\tsetLastOccurrence(occurrence);\n\t\t// A banner arriving into an empty region is already a mutation the reader\n\t\t// hears, so only one replacing another has to be re-announced.\n\t\tif (isPresent && wasShowing) {\n\t\t\tsetReveal(\"swap\");\n\t\t}\n\t}\n\n\tuseEffect(() => {\n\t\tif (reveal === \"none\") {\n\t\t\treturn;\n\t\t}\n\t\t// Two frames: the first is the one the hidden state paints in, and clearing\n\t\t// the flag before that paint leaves the fade with nothing to run from.\n\t\tlet secondFrame = 0;\n\t\tconst frame = requestAnimationFrame(() => {\n\t\t\tsecondFrame = requestAnimationFrame(() => setReveal(\"none\"));\n\t\t});\n\t\treturn () => {\n\t\t\tcancelAnimationFrame(frame);\n\t\t\tcancelAnimationFrame(secondFrame);\n\t\t};\n\t}, [reveal]);\n\n\tconst handleExited = useCallback(() => setIsShowing(false), []);\n\n\t// Read off the banner on screen rather than the last one held. A region that\n\t// keeps a role with nothing in it reports a condition that has cleared, and it\n\t// answers to a consumer looking for whichever banner does hold.\n\tconst isError = isShowing && held?.props.status === \"error\";\n\tconst politeRole = isShowing ? \"status\" : undefined;\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={cx(bannerContainer, className)}\n\t\t\tstyle={style}\n\t\t\trole={isError ? \"alert\" : politeRole}\n\t\t\taria-live={isError ? \"assertive\" : \"polite\"}\n\t\t\taria-atomic=\"true\"\n\t\t\taria-hidden={reveal === \"none\" ? undefined : \"true\"}\n\t\t>\n\t\t\t{isShowing && (\n\t\t\t\t<BannerContainerSlide\n\t\t\t\t\tisPresent={isPresent}\n\t\t\t\t\tisSwapping={reveal === \"swap\"}\n\t\t\t\t\tonExited={handleExited}\n\t\t\t\t>\n\t\t\t\t\t{held}\n\t\t\t\t</BannerContainerSlide>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AA2CA,SAAgB,EAAgB,EAC/B,aACA,eACA,cACA,UACA,UACwB;CACxB,IAAM,IAAY,MAAa,MAOzB,CAAC,GAAM,KAAW,EAAS,CAAQ,GACnC,CAAC,GAAW,KAAgB,EAAS,CAAS,GAC9C,CAAC,GAAQ,KAAa,EAAiB,IAAY,YAAY,MAAM,GACrE,CAAC,GAAgB,KAAqB,EAAS,CAAU,GAEzD,IAAa;CAgBnB,AAfI,KAAa,MAAS,KACzB,EAAQ,CAAQ,GAEb,KAAa,CAAC,KACjB,EAAa,EAAI,GAEd,MAAmB,MACtB,EAAkB,CAAU,GAGxB,KAAa,KAChB,EAAU,MAAM,IAIlB,QAAgB;EACf,IAAI,MAAW,QACd;EAID,IAAI,IAAc,GACZ,IAAQ,4BAA4B;GACzC,IAAc,4BAA4B,EAAU,MAAM,CAAC;EAC5D,CAAC;EACD,aAAa;GAEZ,AADA,qBAAqB,CAAK,GAC1B,qBAAqB,CAAW;EACjC;CACD,GAAG,CAAC,CAAM,CAAC;CAEX,IAAM,IAAe,QAAkB,EAAa,EAAK,GAAG,CAAC,CAAC,GAKxD,IAAU,KAAa,GAAM,MAAM,WAAW,SAC9C,IAAa,IAAY,WAAW,KAAA;CAE1C,OACC,kBAAC,OAAD;EACM;EACL,WAAW,EAAG,GAAiB,CAAS;EACjC;EACP,MAAM,IAAU,UAAU;EAC1B,aAAW,IAAU,cAAc;EACnC,eAAY;EACZ,eAAa,MAAW,SAAS,KAAA,IAAY;YAE5C,KACA,kBAAC,GAAD;GACY;GACX,YAAY,MAAW;GACvB,UAAU;aAET;EACoB,CAAA;CAEnB,CAAA;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"BannerContainerSlide.js","names":[],"sources":["../../../src/components/Banner/BannerContainerSlide.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { useEnterAnimation, useExitAnimation } from \"../../utils/animation.js\";\nimport { bannerContainerSlide } from \"./Banner.css.js\";\n\nexport interface BannerContainerSlideProps {\n\t/** False once the condition clears, which starts the exit animation. */\n\tisPresent: boolean;\n\t/** Whether the banner on screen is being replaced by another. */\n\tisSwapping: boolean;\n\t/** Runs when the exit animation finishes and the banner can be unmounted. */\n\tonExited: () => void;\n\tchildren: ReactNode;\n}\n\n/**\n * Carries the banner's motion. Mounted for as long as a banner is on screen, so\n * the enter animation runs on each arrival rather than once per container.\n */\nexport function BannerContainerSlide({\n\tisPresent,\n\tisSwapping,\n\tonExited,\n\tchildren,\n}: BannerContainerSlideProps) {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst isEntering = useEnterAnimation(ref);\n\tconst isExiting = useExitAnimation(ref, isPresent);\n\n\tuseEffect(() => {\n\t\tif (!isPresent && !isExiting) {\n\t\t\tonExited();\n\t\t}\n\t}, [isPresent, isExiting, onExited]);\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={bannerContainerSlide}\n\t\t\tdata-entering={isEntering || undefined}\n\t\t\tdata-exiting={isExiting || undefined}\n\t\t\tdata-swapping={isSwapping || undefined}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAqB,EACpC,cACA,eACA,aACA,eAC6B;CAC7B,IAAM,IAAM,EAAuB,KAAK,EAClC,IAAa,EAAkB,EAAI,EACnC,IAAY,EAAiB,GAAK,EAAU;AAQlD,QANA,QAAgB;AACf,EAAI,CAAC,KAAa,CAAC,KAClB,GAAU;IAET;EAAC;EAAW;EAAW;EAAS,CAAC,EAGnC,kBAAC,OAAD;EACM;EACL,WAAW;EACX,iBAAe,KAAc,KAAA;EAC7B,gBAAc,KAAa,KAAA;EAC3B,iBAAe,KAAc,KAAA;EAE5B;EACI,CAAA"}
1
+ {"version":3,"file":"BannerContainerSlide.js","names":[],"sources":["../../../src/components/Banner/BannerContainerSlide.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useEffect, useRef } from \"react\";\nimport { useEnterAnimation, useExitAnimation } from \"../../utils/animation.js\";\nimport { bannerContainerSlide } from \"./Banner.css.js\";\n\nexport interface BannerContainerSlideProps {\n\t/** False once the condition clears, which starts the exit animation. */\n\tisPresent: boolean;\n\t/** Whether the banner on screen is being replaced by another. */\n\tisSwapping: boolean;\n\t/** Runs when the exit animation finishes and the banner can be unmounted. */\n\tonExited: () => void;\n\tchildren: ReactNode;\n}\n\n/**\n * Carries the banner's motion. Mounted for as long as a banner is on screen, so\n * the enter animation runs on each arrival rather than once per container.\n */\nexport function BannerContainerSlide({\n\tisPresent,\n\tisSwapping,\n\tonExited,\n\tchildren,\n}: BannerContainerSlideProps) {\n\tconst ref = useRef<HTMLDivElement>(null);\n\tconst isEntering = useEnterAnimation(ref);\n\tconst isExiting = useExitAnimation(ref, isPresent);\n\n\tuseEffect(() => {\n\t\tif (!isPresent && !isExiting) {\n\t\t\tonExited();\n\t\t}\n\t}, [isPresent, isExiting, onExited]);\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={bannerContainerSlide}\n\t\t\tdata-entering={isEntering || undefined}\n\t\t\tdata-exiting={isExiting || undefined}\n\t\t\tdata-swapping={isSwapping || undefined}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AAmBA,SAAgB,EAAqB,EACpC,cACA,eACA,aACA,eAC6B;CAC7B,IAAM,IAAM,EAAuB,IAAI,GACjC,IAAa,EAAkB,CAAG,GAClC,IAAY,EAAiB,GAAK,CAAS;CAQjD,OANA,QAAgB;EACf,AAAI,CAAC,KAAa,CAAC,KAClB,EAAS;CAEX,GAAG;EAAC;EAAW;EAAW;CAAQ,CAAC,GAGlC,kBAAC,OAAD;EACM;EACL,WAAW;EACX,iBAAe,KAAc,KAAA;EAC7B,gBAAc,KAAa,KAAA;EAC3B,iBAAe,KAAc,KAAA;EAE5B;CACG,CAAA;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"BubbleOverlay.js","names":[],"sources":["../../../src/components/BubbleOverlay/BubbleOverlay.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport {\n\tDialog as AriaDialog,\n\tModal,\n\tModalOverlay,\n} from \"react-aria-components\";\nimport { OverlayRegistration } from \"../../hooks/overlayRegistry.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { bubbleDialog, bubbleModal, bubbleScrim } from \"./BubbleOverlay.css.js\";\n\nexport interface BubbleOverlayProps {\n\t/** Whether the bubble is open. */\n\tisOpen: boolean;\n\t/** Called with the next open state on dismiss (outside tap, Escape) or programmatic close. */\n\tonOpenChange: (isOpen: boolean) => void;\n\t/** Dismiss on outside tap. Escape always cancels (RAC default). Defaults to `true`. */\n\tisDismissable?: boolean;\n\t/** Accessible name fallback when the child has no `Sheet.Title`. */\n\t\"aria-label\"?: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\n/**\n * Non-dimming, near-bottom popover presentation. A compact card centered\n * horizontally near the bottom edge, with a **transparent** backdrop — the chat\n * behind it stays visible. It is still modal (focus-trap + dismiss on outside tap\n * / Escape), matching legacy chat's non-dimming anytime-survey bubble. For a\n * dimming bottom sheet use `SheetOverlay`.\n *\n * Give the dialog an accessible name via a `Sheet.Title` or the\n * `aria-label` prop.\n */\nexport function BubbleOverlay({\n\tisOpen,\n\tonOpenChange,\n\tisDismissable = true,\n\t\"aria-label\": ariaLabel,\n\tclassName,\n\tchildren,\n}: BubbleOverlayProps) {\n\t// Stated, not inherited: this renders through a portal, so its direction must\n\t// not depend on where the portal lands. See the portalled-surface scenario\n\t// under the RTL requirement in openspec/specs/accessibility/spec.md.\n\tconst { direction } = useLocale();\n\n\treturn (\n\t\t<ModalOverlay\n\t\t\tisOpen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tisDismissable={isDismissable}\n\t\t\tclassName={bubbleScrim}\n\t\t\tdir={direction}\n\t\t>\n\t\t\t<OverlayRegistration />\n\t\t\t<Modal className={bubbleModal}>\n\t\t\t\t<AriaDialog\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\tclassName={cx(bubbleDialog, className)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</AriaDialog>\n\t\t\t</Modal>\n\t\t</ModalOverlay>\n\t);\n}\n"],"mappings":";;;;;;;AAkCA,SAAgB,EAAc,EAC7B,WACA,iBACA,mBAAgB,IAChB,cAAc,GACd,cACA,eACsB;CAItB,IAAM,EAAE,iBAAc,GAAW;AAEjC,QACC,kBAAC,GAAD;EACS;EACM;EACC;EACf,WAAW;EACX,KAAK;YALN,CAOC,kBAAC,GAAD,EAAuB,CAAA,EACvB,kBAAC,GAAD;GAAO,WAAW;aACjB,kBAAC,GAAD;IACC,cAAY;IACZ,WAAW,EAAG,GAAc,EAAU;IAErC;IACW,CAAA;GACN,CAAA,CACM"}
1
+ {"version":3,"file":"BubbleOverlay.js","names":[],"sources":["../../../src/components/BubbleOverlay/BubbleOverlay.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { useLocale } from \"react-aria\";\nimport {\n\tDialog as AriaDialog,\n\tModal,\n\tModalOverlay,\n} from \"react-aria-components\";\nimport { OverlayRegistration } from \"../../hooks/overlayRegistry.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { bubbleDialog, bubbleModal, bubbleScrim } from \"./BubbleOverlay.css.js\";\n\nexport interface BubbleOverlayProps {\n\t/** Whether the bubble is open. */\n\tisOpen: boolean;\n\t/** Called with the next open state on dismiss (outside tap, Escape) or programmatic close. */\n\tonOpenChange: (isOpen: boolean) => void;\n\t/** Dismiss on outside tap. Escape always cancels (RAC default). Defaults to `true`. */\n\tisDismissable?: boolean;\n\t/** Accessible name fallback when the child has no `Sheet.Title`. */\n\t\"aria-label\"?: string;\n\tclassName?: string;\n\tchildren: ReactNode;\n}\n\n/**\n * Non-dimming, near-bottom popover presentation. A compact card centered\n * horizontally near the bottom edge, with a **transparent** backdrop — the chat\n * behind it stays visible. It is still modal (focus-trap + dismiss on outside tap\n * / Escape), matching legacy chat's non-dimming anytime-survey bubble. For a\n * dimming bottom sheet use `SheetOverlay`.\n *\n * Give the dialog an accessible name via a `Sheet.Title` or the\n * `aria-label` prop.\n */\nexport function BubbleOverlay({\n\tisOpen,\n\tonOpenChange,\n\tisDismissable = true,\n\t\"aria-label\": ariaLabel,\n\tclassName,\n\tchildren,\n}: BubbleOverlayProps) {\n\t// Stated, not inherited: this renders through a portal, so its direction must\n\t// not depend on where the portal lands. See the portalled-surface scenario\n\t// under the RTL requirement in openspec/specs/accessibility/spec.md.\n\tconst { direction } = useLocale();\n\n\treturn (\n\t\t<ModalOverlay\n\t\t\tisOpen={isOpen}\n\t\t\tonOpenChange={onOpenChange}\n\t\t\tisDismissable={isDismissable}\n\t\t\tclassName={bubbleScrim}\n\t\t\tdir={direction}\n\t\t>\n\t\t\t<OverlayRegistration />\n\t\t\t<Modal className={bubbleModal}>\n\t\t\t\t<AriaDialog\n\t\t\t\t\taria-label={ariaLabel}\n\t\t\t\t\tclassName={cx(bubbleDialog, className)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</AriaDialog>\n\t\t\t</Modal>\n\t\t</ModalOverlay>\n\t);\n}\n"],"mappings":";;;;;;;AAkCA,SAAgB,EAAc,EAC7B,WACA,iBACA,mBAAgB,IAChB,cAAc,GACd,cACA,eACsB;CAItB,IAAM,EAAE,iBAAc,EAAU;CAEhC,OACC,kBAAC,GAAD;EACS;EACM;EACC;EACf,WAAW;EACX,KAAK;YALN,CAOC,kBAAC,GAAD,CAAsB,CAAA,GACtB,kBAAC,GAAD;GAAO,WAAW;aACjB,kBAAC,GAAD;IACC,cAAY;IACZ,WAAW,EAAG,GAAc,CAAS;IAEpC;GACU,CAAA;EACN,CAAA,CACM;;AAEhB"}
@@ -1,4 +1,4 @@
1
- import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
1
+ import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
2
  /* empty css */
3
3
  //#region src/components/Button/Button.css.ts
4
4
  var t = e({
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { ButtonProps as AriaButtonProps } from \"react-aria-components\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { buttonRoot } from \"./Button.css.js\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"tertiary\";\nexport type ButtonSize = \"md\" | \"sm\";\n\ntype ButtonIntent = ButtonVariant | `${ButtonVariant}-destructive`;\n\nexport interface ButtonProps\n\textends Omit<AriaButtonProps, \"children\" | \"className\" | \"style\"> {\n\tvariant?: ButtonVariant;\n\tsize?: ButtonSize;\n\tdestructive?: boolean;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLButtonElement>;\n\tchildren?: ReactNode;\n}\n\nexport function Button({\n\tvariant = \"primary\",\n\tsize = \"md\",\n\tdestructive = false,\n\tclassName,\n\tchildren,\n\t...rest\n}: ButtonProps) {\n\tconst intent: ButtonIntent = destructive ? `${variant}-destructive` : variant;\n\treturn (\n\t\t<AriaButton\n\t\t\t{...rest}\n\t\t\tdata-slot=\"button\"\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tdata-destructive={destructive || undefined}\n\t\t\tclassName={cx(buttonRoot({ intent, size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</AriaButton>\n\t);\n}\n"],"mappings":";;;;;AAsBA,SAAgB,EAAO,EACtB,aAAU,WACV,UAAO,MACP,iBAAc,IACd,cACA,aACA,GAAG,KACY;CACf,IAAM,IAAuB,IAAc,GAAG,EAAQ,gBAAgB;AACtE,QACC,kBAAC,GAAD;EACC,GAAI;EACJ,aAAU;EACV,gBAAc;EACd,aAAW;EACX,oBAAkB,KAAe,KAAA;EACjC,WAAW,EAAG,EAAW;GAAE;GAAQ;GAAM,CAAC,EAAE,EAAU;EAErD;EACW,CAAA"}
1
+ {"version":3,"file":"Button.js","names":[],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { ButtonProps as AriaButtonProps } from \"react-aria-components\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { buttonRoot } from \"./Button.css.js\";\n\nexport type ButtonVariant = \"primary\" | \"secondary\" | \"tertiary\";\nexport type ButtonSize = \"md\" | \"sm\";\n\ntype ButtonIntent = ButtonVariant | `${ButtonVariant}-destructive`;\n\nexport interface ButtonProps\n\textends Omit<AriaButtonProps, \"children\" | \"className\" | \"style\"> {\n\tvariant?: ButtonVariant;\n\tsize?: ButtonSize;\n\tdestructive?: boolean;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLButtonElement>;\n\tchildren?: ReactNode;\n}\n\nexport function Button({\n\tvariant = \"primary\",\n\tsize = \"md\",\n\tdestructive = false,\n\tclassName,\n\tchildren,\n\t...rest\n}: ButtonProps) {\n\tconst intent: ButtonIntent = destructive ? `${variant}-destructive` : variant;\n\treturn (\n\t\t<AriaButton\n\t\t\t{...rest}\n\t\t\tdata-slot=\"button\"\n\t\t\tdata-variant={variant}\n\t\t\tdata-size={size}\n\t\t\tdata-destructive={destructive || undefined}\n\t\t\tclassName={cx(buttonRoot({ intent, size }), className)}\n\t\t>\n\t\t\t{children}\n\t\t</AriaButton>\n\t);\n}\n"],"mappings":";;;;;AAsBA,SAAgB,EAAO,EACtB,aAAU,WACV,UAAO,MACP,iBAAc,IACd,cACA,aACA,GAAG,KACY;CACf,IAAM,IAAuB,IAAc,GAAG,EAAQ,gBAAgB;CACtE,OACC,kBAAC,GAAD;EACC,GAAI;EACJ,aAAU;EACV,gBAAc;EACd,aAAW;EACX,oBAAkB,KAAe,KAAA;EACjC,WAAW,EAAG,EAAW;GAAE;GAAQ;EAAK,CAAC,GAAG,CAAS;EAEpD;CACU,CAAA;AAEd"}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import { CardActions } from \"./CardActions.js\";\nimport { CardBody } from \"./CardBody.js\";\nimport { CardDescription } from \"./CardDescription.js\";\nimport { CardMedia } from \"./CardMedia.js\";\nimport { CardRoot } from \"./CardRoot.js\";\nimport { CardTitle } from \"./CardTitle.js\";\n\nexport type { CardProps } from \"./CardRoot.js\";\n\nexport const Card = Object.assign(CardRoot, {\n\tMedia: CardMedia,\n\tBody: CardBody,\n\tTitle: CardTitle,\n\tDescription: CardDescription,\n\tActions: CardActions,\n});\n"],"mappings":";;;;;;;AASA,IAAa,IAAO,OAAO,OAAO,GAAU;CAC3C,OAAO;CACP,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;CACT,CAAC"}
1
+ {"version":3,"file":"Card.js","names":[],"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import { CardActions } from \"./CardActions.js\";\nimport { CardBody } from \"./CardBody.js\";\nimport { CardDescription } from \"./CardDescription.js\";\nimport { CardMedia } from \"./CardMedia.js\";\nimport { CardRoot } from \"./CardRoot.js\";\nimport { CardTitle } from \"./CardTitle.js\";\n\nexport type { CardProps } from \"./CardRoot.js\";\n\nexport const Card = Object.assign(CardRoot, {\n\tMedia: CardMedia,\n\tBody: CardBody,\n\tTitle: CardTitle,\n\tDescription: CardDescription,\n\tActions: CardActions,\n});\n"],"mappings":";;;;;;;AASA,IAAa,IAAO,OAAO,OAAO,GAAU;CAC3C,OAAO;CACP,MAAM;CACN,OAAO;CACP,aAAa;CACb,SAAS;AACV,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardActions.js","names":[],"sources":["../../../src/components/Card/CardActions.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardActions } from \"./Card.css.js\";\n\nexport interface CardActionsProps {\n\t/** Buttons, each stretched to the card's width. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\nexport function CardActions({ children, className }: CardActionsProps) {\n\treturn <div className={cx(cardActions, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAY,EAAE,aAAU,gBAA+B;AACtE,QAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAa,EAAU;EAAG;EAAe,CAAA"}
1
+ {"version":3,"file":"CardActions.js","names":[],"sources":["../../../src/components/Card/CardActions.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardActions } from \"./Card.css.js\";\n\nexport interface CardActionsProps {\n\t/** Buttons, each stretched to the card's width. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\nexport function CardActions({ children, className }: CardActionsProps) {\n\treturn <div className={cx(cardActions, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAY,EAAE,aAAU,gBAA+B;CACtE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAa,CAAS;EAAI;CAAc,CAAA;AACnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardBody.js","names":[],"sources":["../../../src/components/Card/CardBody.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardBody } from \"./Card.css.js\";\n\nexport interface CardBodyProps {\n\t/** The `Card.Title` and `Card.Description`. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\nexport function CardBody({ children, className }: CardBodyProps) {\n\treturn <div className={cx(cardBody, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAS,EAAE,aAAU,gBAA4B;AAChE,QAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAU,EAAU;EAAG;EAAe,CAAA"}
1
+ {"version":3,"file":"CardBody.js","names":[],"sources":["../../../src/components/Card/CardBody.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardBody } from \"./Card.css.js\";\n\nexport interface CardBodyProps {\n\t/** The `Card.Title` and `Card.Description`. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\nexport function CardBody({ children, className }: CardBodyProps) {\n\treturn <div className={cx(cardBody, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAUA,SAAgB,EAAS,EAAE,aAAU,gBAA4B;CAChE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAU,CAAS;EAAI;CAAc,CAAA;AAChE"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardDescription.js","names":[],"sources":["../../../src/components/Card/CardDescription.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardDescription } from \"./Card.css.js\";\n\nexport interface CardDescriptionProps {\n\tchildren?: ReactNode;\n\t/** Lets the card's button describe itself with the description. */\n\tid?: string;\n\tclassName?: string;\n}\n\n/** Up to three lines. Longer text ends in an ellipsis. */\nexport function CardDescription({\n\tchildren,\n\tid,\n\tclassName,\n}: CardDescriptionProps) {\n\treturn (\n\t\t<div id={id} className={cx(cardDescription, className)}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAgB,EAC/B,aACA,OACA,gBACwB;AACxB,QACC,kBAAC,OAAD;EAAS;EAAI,WAAW,EAAG,GAAiB,EAAU;EACpD;EACI,CAAA"}
1
+ {"version":3,"file":"CardDescription.js","names":[],"sources":["../../../src/components/Card/CardDescription.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardDescription } from \"./Card.css.js\";\n\nexport interface CardDescriptionProps {\n\tchildren?: ReactNode;\n\t/** Lets the card's button describe itself with the description. */\n\tid?: string;\n\tclassName?: string;\n}\n\n/** Up to three lines. Longer text ends in an ellipsis. */\nexport function CardDescription({\n\tchildren,\n\tid,\n\tclassName,\n}: CardDescriptionProps) {\n\treturn (\n\t\t<div id={id} className={cx(cardDescription, className)}>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAgB,EAC/B,aACA,OACA,gBACwB;CACxB,OACC,kBAAC,OAAD;EAAS;EAAI,WAAW,EAAG,GAAiB,CAAS;EACnD;CACG,CAAA;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardMedia.js","names":[],"sources":["../../../src/components/Card/CardMedia.tsx"],"sourcesContent":["import { cx } from \"../../utils/cx.js\";\nimport { MediaSlash } from \"../Icon/icons/MediaSlash.js\";\nimport type { ImageLoadingStatus } from \"../Image/index.js\";\nimport { Image } from \"../Image/index.js\";\nimport { cardMedia, cardMediaImage } from \"./Card.css.js\";\n\nexport interface CardMediaProps {\n\tsrc: string | null | undefined;\n\t/**\n\t * Alt text. Pass `\"\"` when the card's title already says what the image\n\t * shows, so a screen reader does not read it twice.\n\t */\n\talt: string;\n\tonLoadingStatusChange?: (status: ImageLoadingStatus) => void;\n\tclassName?: string;\n}\n\n/**\n * The card's image at 16:9, cropped to fill. A missing or failed image shows a\n * muted media-slash box. The box is decorative, so the card's name stays its\n * text.\n */\nexport function CardMedia({\n\tsrc,\n\talt,\n\tonLoadingStatusChange,\n\tclassName,\n}: CardMediaProps) {\n\tconst placeholder = <MediaSlash data-testid=\"card-media-placeholder\" />;\n\n\treturn (\n\t\t<div className={cx(cardMedia, className)}>\n\t\t\t<Image\n\t\t\t\tclassName={cardMediaImage}\n\t\t\t\tsrc={src}\n\t\t\t\talt={alt}\n\t\t\t\tfallback={placeholder}\n\t\t\t\tonLoadingStatusChange={onLoadingStatusChange}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAsBA,SAAgB,EAAU,EACzB,QACA,QACA,0BACA,gBACkB;CAClB,IAAM,IAAc,kBAAC,GAAD,EAAY,eAAY,0BAA2B,CAAA;AAEvE,QACC,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAW,EAAU;YACvC,kBAAC,GAAD;GACC,WAAW;GACN;GACA;GACL,UAAU;GACa;GACtB,CAAA;EACG,CAAA"}
1
+ {"version":3,"file":"CardMedia.js","names":[],"sources":["../../../src/components/Card/CardMedia.tsx"],"sourcesContent":["import { cx } from \"../../utils/cx.js\";\nimport { MediaSlash } from \"../Icon/icons/MediaSlash.js\";\nimport type { ImageLoadingStatus } from \"../Image/index.js\";\nimport { Image } from \"../Image/index.js\";\nimport { cardMedia, cardMediaImage } from \"./Card.css.js\";\n\nexport interface CardMediaProps {\n\tsrc: string | null | undefined;\n\t/**\n\t * Alt text. Pass `\"\"` when the card's title already says what the image\n\t * shows, so a screen reader does not read it twice.\n\t */\n\talt: string;\n\tonLoadingStatusChange?: (status: ImageLoadingStatus) => void;\n\tclassName?: string;\n}\n\n/**\n * The card's image at 16:9, cropped to fill. A missing or failed image shows a\n * muted media-slash box. The box is decorative, so the card's name stays its\n * text.\n */\nexport function CardMedia({\n\tsrc,\n\talt,\n\tonLoadingStatusChange,\n\tclassName,\n}: CardMediaProps) {\n\tconst placeholder = <MediaSlash data-testid=\"card-media-placeholder\" />;\n\n\treturn (\n\t\t<div className={cx(cardMedia, className)}>\n\t\t\t<Image\n\t\t\t\tclassName={cardMediaImage}\n\t\t\t\tsrc={src}\n\t\t\t\talt={alt}\n\t\t\t\tfallback={placeholder}\n\t\t\t\tonLoadingStatusChange={onLoadingStatusChange}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;AAsBA,SAAgB,EAAU,EACzB,QACA,QACA,0BACA,gBACkB;CAClB,IAAM,IAAc,kBAAC,GAAD,EAAY,eAAY,yBAA0B,CAAA;CAEtE,OACC,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAW,CAAS;YACtC,kBAAC,GAAD;GACC,WAAW;GACN;GACA;GACL,UAAU;GACa;EACvB,CAAA;CACG,CAAA;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardRoot.js","names":[],"sources":["../../../src/components/Card/CardRoot.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardPressable, cardRoot } from \"./Card.css.js\";\n\nexport interface CardProps {\n\tchildren?: ReactNode;\n\t/**\n\t * Makes the whole card one button. Leave it out when the card holds its\n\t * own buttons in `Card.Actions`: a button inside a button is invalid.\n\t */\n\tonPress?: () => void;\n\t/** Disables the pressable card. Has no effect without `onPress`. */\n\tisDisabled?: boolean;\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\t\"aria-describedby\"?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLElement>;\n}\n\n/**\n * A surface with an optional image, a title, a description and actions. With\n * `onPress`, the whole card is the button and its text is the button's name.\n */\nexport function CardRoot({\n\tchildren,\n\tonPress,\n\tisDisabled,\n\tclassName,\n\tref,\n\t...rest\n}: CardProps) {\n\tif (onPress) {\n\t\treturn (\n\t\t\t<AriaButton\n\t\t\t\t{...rest}\n\t\t\t\tref={ref as Ref<HTMLButtonElement>}\n\t\t\t\tdata-pressable=\"true\"\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t\tonPress={onPress}\n\t\t\t\tclassName={cx(cardRoot, cardPressable, className)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</AriaButton>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tref={ref as Ref<HTMLDivElement>}\n\t\t\tclassName={cx(cardRoot, className)}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AA0BA,SAAgB,EAAS,EACxB,aACA,YACA,eACA,cACA,QACA,GAAG,KACU;AAgBb,QAfI,IAEF,kBAAC,GAAD;EACC,GAAI;EACC;EACL,kBAAe;EACH;EACH;EACT,WAAW,EAAG,GAAU,GAAe,EAAU;EAEhD;EACW,CAAA,GAKd,kBAAC,OAAD;EACC,GAAI;EACC;EACL,WAAW,EAAG,GAAU,EAAU;EAEjC;EACI,CAAA"}
1
+ {"version":3,"file":"CardRoot.js","names":[],"sources":["../../../src/components/Card/CardRoot.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport { Button as AriaButton } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardPressable, cardRoot } from \"./Card.css.js\";\n\nexport interface CardProps {\n\tchildren?: ReactNode;\n\t/**\n\t * Makes the whole card one button. Leave it out when the card holds its\n\t * own buttons in `Card.Actions`: a button inside a button is invalid.\n\t */\n\tonPress?: () => void;\n\t/** Disables the pressable card. Has no effect without `onPress`. */\n\tisDisabled?: boolean;\n\t\"aria-label\"?: string;\n\t\"aria-labelledby\"?: string;\n\t\"aria-describedby\"?: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLElement>;\n}\n\n/**\n * A surface with an optional image, a title, a description and actions. With\n * `onPress`, the whole card is the button and its text is the button's name.\n */\nexport function CardRoot({\n\tchildren,\n\tonPress,\n\tisDisabled,\n\tclassName,\n\tref,\n\t...rest\n}: CardProps) {\n\tif (onPress) {\n\t\treturn (\n\t\t\t<AriaButton\n\t\t\t\t{...rest}\n\t\t\t\tref={ref as Ref<HTMLButtonElement>}\n\t\t\t\tdata-pressable=\"true\"\n\t\t\t\tisDisabled={isDisabled}\n\t\t\t\tonPress={onPress}\n\t\t\t\tclassName={cx(cardRoot, cardPressable, className)}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</AriaButton>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\t{...rest}\n\t\t\tref={ref as Ref<HTMLDivElement>}\n\t\t\tclassName={cx(cardRoot, className)}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;AA0BA,SAAgB,EAAS,EACxB,aACA,YACA,eACA,cACA,QACA,GAAG,KACU;CAgBb,OAfI,IAEF,kBAAC,GAAD;EACC,GAAI;EACC;EACL,kBAAe;EACH;EACH;EACT,WAAW,EAAG,GAAU,GAAe,CAAS;EAE/C;CACU,CAAA,IAKb,kBAAC,OAAD;EACC,GAAI;EACC;EACL,WAAW,EAAG,GAAU,CAAS;EAEhC;CACG,CAAA;AAEP"}
@@ -1 +1 @@
1
- {"version":3,"file":"CardTitle.js","names":[],"sources":["../../../src/components/Card/CardTitle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardTitle } from \"./Card.css.js\";\n\nexport interface CardTitleProps {\n\tchildren?: ReactNode;\n\t/** Lets a button or the pressable card name itself with the title. */\n\tid?: string;\n\tclassName?: string;\n}\n\n/** One line. A longer title ends in an ellipsis. */\nexport function CardTitle({ children, id, className }: CardTitleProps) {\n\treturn (\n\t\t<span id={id} className={cx(cardTitle, className)}>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAU,EAAE,aAAU,OAAI,gBAA6B;AACtE,QACC,kBAAC,QAAD;EAAU;EAAI,WAAW,EAAG,GAAW,EAAU;EAC/C;EACK,CAAA"}
1
+ {"version":3,"file":"CardTitle.js","names":[],"sources":["../../../src/components/Card/CardTitle.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { cardTitle } from \"./Card.css.js\";\n\nexport interface CardTitleProps {\n\tchildren?: ReactNode;\n\t/** Lets a button or the pressable card name itself with the title. */\n\tid?: string;\n\tclassName?: string;\n}\n\n/** One line. A longer title ends in an ellipsis. */\nexport function CardTitle({ children, id, className }: CardTitleProps) {\n\treturn (\n\t\t<span id={id} className={cx(cardTitle, className)}>\n\t\t\t{children}\n\t\t</span>\n\t);\n}\n"],"mappings":";;;;AAYA,SAAgB,EAAU,EAAE,aAAU,OAAI,gBAA6B;CACtE,OACC,kBAAC,QAAD;EAAU;EAAI,WAAW,EAAG,GAAW,CAAS;EAC9C;CACI,CAAA;AAER"}
@@ -6,104 +6,104 @@ import { IconButton as i } from "../IconButton/IconButton.js";
6
6
  import { carouselRoot as a, carouselTrack as o } from "./Carousel.css.js";
7
7
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  import { Group as l, useLocale as u } from "react-aria-components";
9
- import { Children as d, useEffect as f, useRef as p, useState as m } from "react";
9
+ import { Children as d, isValidElement as f, useEffect as p, useRef as m, useState as h } from "react";
10
10
  //#region src/components/Carousel/Carousel.tsx
11
- function h(e) {
11
+ function g(e) {
12
12
  return Array.from(e.children);
13
13
  }
14
- function g(e, t, n, r, i) {
14
+ function _(e, t, n, r, i) {
15
15
  let a = e.getBoundingClientRect(), o = t.getBoundingClientRect(), s = getComputedStyle(e), c = Number.parseFloat(s.scrollPaddingInlineStart) || 0, l = Number.parseFloat(s.scrollPaddingInlineEnd) || 0, u = () => o.left - a.left - (i ? l : c), d = () => o.right - a.right + (i ? c : l);
16
16
  return n === 0 ? i ? d() : u() : n === r - 1 ? i ? u() : d() : (o.left + o.right) / 2 - (a.left + a.right) / 2;
17
17
  }
18
- function _(e, t) {
18
+ function v(e, t) {
19
19
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
20
20
  return r.left >= n.left - 1 && r.right <= n.right + 1;
21
21
  }
22
- function v(e, t) {
23
- let n = h(e), r = e.scrollWidth - e.clientWidth;
22
+ function y(e, t) {
23
+ let n = g(e), r = e.scrollWidth - e.clientWidth;
24
24
  if (n.length > 0 && r > 0 && Math.abs(e.scrollLeft) >= r - 1) return n.length - 1;
25
25
  let i = 0, a = Infinity;
26
26
  return n.forEach((r, o) => {
27
- let s = Math.abs(g(e, r, o, n.length, t));
27
+ let s = Math.abs(_(e, r, o, n.length, t));
28
28
  s < a && (i = o, a = s);
29
29
  }), i;
30
30
  }
31
- function y(e) {
32
- return typeof CSS > "u" || typeof CSS.supports != "function" || !CSS.supports("selector(:focus-visible)") ? !0 : e.matches(":focus-visible");
31
+ function b(e) {
32
+ return typeof CSS > "u" || typeof CSS.supports != "function" || !CSS.supports("selector(:focus-visible)") || e.matches(":focus-visible");
33
33
  }
34
- var b = 600;
35
- function x({ children: x, label: S, previousLabel: C, nextLabel: w, className: T, style: E }) {
36
- let D = p(null), [O, k] = m(0), A = p(null), j = p(null), [M, N] = m(!1), { direction: P } = u(), F = P === "rtl", I = d.toArray(x).length, L = () => {
37
- j.current !== null && (clearTimeout(j.current), j.current = null);
38
- }, R = () => {
39
- L(), A.current = null;
40
- }, z = () => {
41
- let e = D.current;
42
- A.current !== null && (R(), e && k(v(e, F)));
43
- }, B = () => {
44
- L(), j.current = setTimeout(z, b);
45
- }, V = p(z);
46
- V.current = z, f(() => {
47
- let e = D.current;
34
+ var x = 600;
35
+ function S({ children: S, label: C, previousLabel: w, nextLabel: T, className: E, style: D }) {
36
+ let O = m(null), [k, A] = h(0), j = m(null), M = m(null), [N, P] = h(!1), { direction: F } = u(), I = F === "rtl", L = d.toArray(S), R = L.length, z = L.map((e) => f(e) ? String(e.key) : "").join("|"), B = () => {
37
+ M.current !== null && (clearTimeout(M.current), M.current = null);
38
+ }, V = () => {
39
+ B(), j.current = null;
40
+ }, H = () => {
41
+ let e = O.current;
42
+ j.current !== null && (V(), e && A(y(e, I)));
43
+ }, U = () => {
44
+ B(), M.current = setTimeout(H, x);
45
+ }, W = m(H);
46
+ W.current = H, p(() => {
47
+ let e = O.current;
48
48
  if (!e) return;
49
- let t = () => V.current();
49
+ let t = () => W.current();
50
50
  return e.addEventListener("scrollend", t), () => {
51
- e.removeEventListener("scrollend", t), j.current !== null && clearTimeout(j.current);
51
+ e.removeEventListener("scrollend", t), M.current !== null && clearTimeout(M.current);
52
52
  };
53
- }, []), f(() => {
54
- let e = D.current;
53
+ }, []), p(() => {
54
+ let e = O.current;
55
55
  if (!e) return;
56
- let t = () => N(e.scrollWidth > e.clientWidth);
56
+ let t = () => P(e.scrollWidth > e.clientWidth);
57
57
  if (t(), typeof ResizeObserver > "u") return;
58
58
  let n = new ResizeObserver(t);
59
59
  n.observe(e);
60
- for (let t of h(e)) n.observe(t);
60
+ for (let t of g(e)) n.observe(t);
61
61
  return () => n.disconnect();
62
- }, [I]);
63
- let H = O > 0, U = O < I - 1, W = (e) => {
64
- let t = D.current, n = t ? h(t)[e] : void 0;
62
+ }, [z]);
63
+ let G = Math.min(k, Math.max(R - 1, 0)), K = G > 0, q = G < R - 1, J = (e) => {
64
+ let t = O.current, n = t ? g(t)[e] : void 0;
65
65
  if (!t || !n) return;
66
- let i = t.scrollLeft + g(t, n, e, h(t).length, F);
66
+ let i = t.scrollLeft + _(t, n, e, g(t).length, I);
67
67
  typeof t.scrollTo == "function" ? t.scrollTo({
68
68
  left: i,
69
69
  behavior: r() ? "instant" : "smooth"
70
- }) : t.scrollLeft = i, A.current = e, k(e);
70
+ }) : t.scrollLeft = i, j.current = e, A(e);
71
71
  };
72
72
  return /* @__PURE__ */ c("div", {
73
- className: e(a, T),
74
- style: E,
73
+ className: e(a, E),
74
+ style: D,
75
75
  children: [/* @__PURE__ */ s(l, {
76
- ref: D,
77
- "aria-label": S,
76
+ ref: O,
77
+ "aria-label": C,
78
78
  className: o,
79
- onPointerDown: R,
80
- onTouchStart: R,
81
- onWheel: R,
79
+ onPointerDown: V,
80
+ onTouchStart: V,
81
+ onWheel: V,
82
82
  onFocus: (e) => {
83
- let t = e.currentTarget, n = h(t).findIndex((t) => t.contains(e.target)), r = h(t)[n];
84
- r && y(e.target) && !_(t, r) && W(n);
83
+ let t = e.currentTarget, n = g(t).findIndex((t) => t.contains(e.target)), r = g(t)[n];
84
+ r && b(e.target) && !v(t, r) && J(n);
85
85
  },
86
86
  onScroll: (e) => {
87
- let t = v(e.currentTarget, F);
88
- if (A.current !== null) {
89
- t === A.current ? R() : B();
87
+ let t = y(e.currentTarget, I);
88
+ if (j.current !== null) {
89
+ t === j.current ? V() : U();
90
90
  return;
91
91
  }
92
- k(t);
92
+ A(t);
93
93
  },
94
- children: x
95
- }), I > 1 && M && /* @__PURE__ */ c("div", {
94
+ children: S
95
+ }), R > 1 && N && /* @__PURE__ */ c("div", {
96
96
  className: "_1vler2p3",
97
97
  children: [
98
98
  /* @__PURE__ */ s(i, {
99
- label: C,
99
+ label: w,
100
100
  variant: "tertiary",
101
101
  size: "xs",
102
- "aria-disabled": !H || void 0,
102
+ "aria-disabled": !K || void 0,
103
103
  onPress: () => {
104
- H && W(O - 1);
104
+ K && J(G - 1);
105
105
  },
106
- children: s(F ? n : t, {})
106
+ children: s(I ? n : t, {})
107
107
  }),
108
108
  /* @__PURE__ */ c("div", {
109
109
  "aria-hidden": "true",
@@ -112,30 +112,30 @@ function x({ children: x, label: S, previousLabel: C, nextLabel: w, className: T
112
112
  children: [
113
113
  /* @__PURE__ */ s("span", {
114
114
  className: "_1vler2p5",
115
- children: O + 1
115
+ children: G + 1
116
116
  }),
117
117
  /* @__PURE__ */ s("span", { children: "/" }),
118
118
  /* @__PURE__ */ s("span", {
119
119
  className: "_1vler2p5",
120
- children: I
120
+ children: R
121
121
  })
122
122
  ]
123
123
  }),
124
124
  /* @__PURE__ */ s(i, {
125
- label: w,
125
+ label: T,
126
126
  variant: "tertiary",
127
127
  size: "xs",
128
- "aria-disabled": !U || void 0,
128
+ "aria-disabled": !q || void 0,
129
129
  onPress: () => {
130
- U && W(O + 1);
130
+ q && J(G + 1);
131
131
  },
132
- children: s(F ? t : n, {})
132
+ children: s(I ? t : n, {})
133
133
  })
134
134
  ]
135
135
  })]
136
136
  });
137
137
  }
138
138
  //#endregion
139
- export { x as Carousel };
139
+ export { S as Carousel };
140
140
 
141
141
  //# sourceMappingURL=Carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from \"react\";\nimport { Children, useEffect, useRef, useState } from \"react\";\nimport { Group, useLocale } from \"react-aria-components\";\nimport { readPrefersReducedMotion } from \"../../hooks/usePrefersReducedMotion.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { ChevronLeft } from \"../Icon/icons/ChevronLeft.js\";\nimport { ChevronRight } from \"../Icon/icons/ChevronRight.js\";\nimport { IconButton } from \"../IconButton/index.js\";\nimport {\n\tcarouselCounter,\n\tcarouselCounterNumber,\n\tcarouselFooter,\n\tcarouselRoot,\n\tcarouselTrack,\n} from \"./Carousel.css.js\";\n\nexport interface CarouselProps {\n\t/** The slides, each a `CarouselItem`. */\n\tchildren?: ReactNode;\n\t/** Accessible name of the group of slides. */\n\tlabel: string;\n\t/** Accessible name of the previous-slide button. */\n\tpreviousLabel: string;\n\t/** Accessible name of the next-slide button. */\n\tnextLabel: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n}\n\nfunction itemsOf(track: HTMLElement): HTMLElement[] {\n\treturn Array.from(track.children) as HTMLElement[];\n}\n\n/** How far the track must scroll for `item` to sit where it snaps: the first\n * item at the start edge, the last at the end edge and any other in the\n * middle. Physical pixels, so it adds to `scrollLeft` in either direction. */\nfunction offsetToSnap(\n\ttrack: HTMLElement,\n\titem: HTMLElement,\n\tindex: number,\n\tcount: number,\n\tisRtl: boolean,\n): number {\n\tconst trackRect = track.getBoundingClientRect();\n\tconst itemRect = item.getBoundingClientRect();\n\tconst style = getComputedStyle(track);\n\tconst paddingStart = Number.parseFloat(style.scrollPaddingInlineStart) || 0;\n\tconst paddingEnd = Number.parseFloat(style.scrollPaddingInlineEnd) || 0;\n\tconst left = () =>\n\t\titemRect.left - trackRect.left - (isRtl ? paddingEnd : paddingStart);\n\tconst right = () =>\n\t\titemRect.right - trackRect.right + (isRtl ? paddingStart : paddingEnd);\n\n\tif (index === 0) {\n\t\treturn isRtl ? right() : left();\n\t}\n\tif (index === count - 1) {\n\t\treturn isRtl ? left() : right();\n\t}\n\treturn (\n\t\t(itemRect.left + itemRect.right) / 2 -\n\t\t(trackRect.left + trackRect.right) / 2\n\t);\n}\n\nfunction isFullyVisible(track: HTMLElement, item: HTMLElement): boolean {\n\tconst trackRect = track.getBoundingClientRect();\n\tconst itemRect = item.getBoundingClientRect();\n\treturn (\n\t\titemRect.left >= trackRect.left - 1 && itemRect.right <= trackRect.right + 1\n\t);\n}\n\nfunction currentIndexOf(track: HTMLElement, isRtl: boolean): number {\n\tconst items = itemsOf(track);\n\t// A track short enough that the last item meets the end edge before it is\n\t// the closest snap point still has to count the end of its range as the last\n\t// item.\n\tconst maxScroll = track.scrollWidth - track.clientWidth;\n\tif (\n\t\titems.length > 0 &&\n\t\tmaxScroll > 0 &&\n\t\tMath.abs(track.scrollLeft) >= maxScroll - 1\n\t) {\n\t\treturn items.length - 1;\n\t}\n\tlet closest = 0;\n\tlet closestDistance = Number.POSITIVE_INFINITY;\n\titems.forEach((item, index) => {\n\t\tconst distance = Math.abs(\n\t\t\toffsetToSnap(track, item, index, items.length, isRtl),\n\t\t);\n\t\tif (distance < closestDistance) {\n\t\t\tclosest = index;\n\t\t\tclosestDistance = distance;\n\t\t}\n\t});\n\treturn closest;\n}\n\n// React Aria focuses a pressable card on pointerdown. A scroll at that moment\n// moves the card from under the finger and cancels the press, so only keyboard\n// focus scrolls. Where `:focus-visible` is not supported, as in jsdom, every\n// focus scrolls.\nfunction isKeyboardFocus(element: Element): boolean {\n\tif (\n\t\ttypeof CSS === \"undefined\" ||\n\t\ttypeof CSS.supports !== \"function\" ||\n\t\t!CSS.supports(\"selector(:focus-visible)\")\n\t) {\n\t\treturn true;\n\t}\n\treturn element.matches(\":focus-visible\");\n}\n\n// Safari before 18.2 has no `scrollend`, so a quiet period after the last\n// scroll event also counts as the end of a button scroll.\nconst SCROLL_SETTLE_MS = 600;\n\n/**\n * A row of slides that scrolls sideways and snaps to each slide. When the\n * slides overflow, a footer shows the previous and next buttons and the\n * position as \"1 / 3\". Keyboard focus on a partly hidden slide scrolls it in.\n */\nexport function Carousel({\n\tchildren,\n\tlabel,\n\tpreviousLabel,\n\tnextLabel,\n\tclassName,\n\tstyle,\n}: CarouselProps) {\n\tconst trackRef = useRef<HTMLDivElement>(null);\n\tconst [currentIndex, setCurrentIndex] = useState(0);\n\t// A button scroll animates past the slides in between. Until it lands, the\n\t// track position names one of those as current, and a second press would\n\t// start from it instead of from the slide the first press asked for.\n\tconst targetIndexRef = useRef<number | null>(null);\n\tconst settleTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst [overflows, setOverflows] = useState(false);\n\tconst { direction } = useLocale();\n\tconst isRtl = direction === \"rtl\";\n\tconst count = Children.toArray(children).length;\n\n\tconst clearSettleTimer = () => {\n\t\tif (settleTimerRef.current !== null) {\n\t\t\tclearTimeout(settleTimerRef.current);\n\t\t\tsettleTimerRef.current = null;\n\t\t}\n\t};\n\tconst releaseTarget = () => {\n\t\tclearSettleTimer();\n\t\ttargetIndexRef.current = null;\n\t};\n\t// The track cannot always align the target slide, for example when the\n\t// slides after it fit beside it. The scroll then stops short of the target,\n\t// so the lock ends with the scroll and the counter takes the real position.\n\tconst settleTarget = () => {\n\t\tconst track = trackRef.current;\n\t\tif (targetIndexRef.current === null) {\n\t\t\treturn;\n\t\t}\n\t\treleaseTarget();\n\t\tif (track) {\n\t\t\tsetCurrentIndex(currentIndexOf(track, isRtl));\n\t\t}\n\t};\n\tconst scheduleSettle = () => {\n\t\tclearSettleTimer();\n\t\tsettleTimerRef.current = setTimeout(settleTarget, SCROLL_SETTLE_MS);\n\t};\n\tconst settleTargetRef = useRef(settleTarget);\n\tsettleTargetRef.current = settleTarget;\n\n\tuseEffect(() => {\n\t\tconst track = trackRef.current;\n\t\tif (!track) {\n\t\t\treturn;\n\t\t}\n\t\tconst onScrollEnd = () => settleTargetRef.current();\n\t\ttrack.addEventListener(\"scrollend\", onScrollEnd);\n\t\treturn () => {\n\t\t\ttrack.removeEventListener(\"scrollend\", onScrollEnd);\n\t\t\tif (settleTimerRef.current !== null) {\n\t\t\t\tclearTimeout(settleTimerRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: count isn't read here, but a new set of slides must be measured again.\n\tuseEffect(() => {\n\t\tconst track = trackRef.current;\n\t\tif (!track) {\n\t\t\treturn;\n\t\t}\n\t\tconst measure = () => setOverflows(track.scrollWidth > track.clientWidth);\n\t\tmeasure();\n\t\t// Absent in jsdom, so the measurement above has to stand on its own.\n\t\tif (typeof ResizeObserver === \"undefined\") {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new ResizeObserver(measure);\n\t\tobserver.observe(track);\n\t\tfor (const item of itemsOf(track)) {\n\t\t\tobserver.observe(item);\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [count]);\n\n\tconst hasPrevious = currentIndex > 0;\n\tconst hasNext = currentIndex < count - 1;\n\n\tconst scrollToItem = (index: number) => {\n\t\tconst track = trackRef.current;\n\t\tconst item = track ? itemsOf(track)[index] : undefined;\n\t\tif (!track || !item) {\n\t\t\treturn;\n\t\t}\n\t\tconst left =\n\t\t\ttrack.scrollLeft +\n\t\t\toffsetToSnap(track, item, index, itemsOf(track).length, isRtl);\n\t\tif (typeof track.scrollTo === \"function\") {\n\t\t\ttrack.scrollTo({\n\t\t\t\tleft,\n\t\t\t\tbehavior: readPrefersReducedMotion() ? \"instant\" : \"smooth\",\n\t\t\t});\n\t\t} else {\n\t\t\ttrack.scrollLeft = left;\n\t\t}\n\t\ttargetIndexRef.current = index;\n\t\tsetCurrentIndex(index);\n\t};\n\n\treturn (\n\t\t<div className={cx(carouselRoot, className)} style={style}>\n\t\t\t<Group\n\t\t\t\tref={trackRef}\n\t\t\t\taria-label={label}\n\t\t\t\tclassName={carouselTrack}\n\t\t\t\tonPointerDown={releaseTarget}\n\t\t\t\tonTouchStart={releaseTarget}\n\t\t\t\tonWheel={releaseTarget}\n\t\t\t\tonFocus={(event) => {\n\t\t\t\t\tconst track = event.currentTarget;\n\t\t\t\t\tconst index = itemsOf(track).findIndex((item) =>\n\t\t\t\t\t\titem.contains(event.target),\n\t\t\t\t\t);\n\t\t\t\t\tconst item = itemsOf(track)[index];\n\t\t\t\t\tif (\n\t\t\t\t\t\titem &&\n\t\t\t\t\t\tisKeyboardFocus(event.target) &&\n\t\t\t\t\t\t!isFullyVisible(track, item)\n\t\t\t\t\t) {\n\t\t\t\t\t\tscrollToItem(index);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonScroll={(event) => {\n\t\t\t\t\tconst index = currentIndexOf(event.currentTarget, isRtl);\n\t\t\t\t\tif (targetIndexRef.current !== null) {\n\t\t\t\t\t\tif (index === targetIndexRef.current) {\n\t\t\t\t\t\t\treleaseTarget();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscheduleSettle();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetCurrentIndex(index);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Group>\n\t\t\t{count > 1 && overflows && (\n\t\t\t\t<div className={carouselFooter}>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tlabel={previousLabel}\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t// aria-disabled keeps the button focusable at the end, so focus\n\t\t\t\t\t\t// does not jump away after the last press.\n\t\t\t\t\t\taria-disabled={!hasPrevious || undefined}\n\t\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\t\tif (hasPrevious) {\n\t\t\t\t\t\t\t\tscrollToItem(currentIndex - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isRtl ? <ChevronRight /> : <ChevronLeft />}\n\t\t\t\t\t</IconButton>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tdata-testid=\"carousel-position\"\n\t\t\t\t\t\tclassName={carouselCounter}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className={carouselCounterNumber}>{currentIndex + 1}</span>\n\t\t\t\t\t\t<span>/</span>\n\t\t\t\t\t\t<span className={carouselCounterNumber}>{count}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tlabel={nextLabel}\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\taria-disabled={!hasNext || undefined}\n\t\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\t\tif (hasNext) {\n\t\t\t\t\t\t\t\tscrollToItem(currentIndex + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isRtl ? <ChevronLeft /> : <ChevronRight />}\n\t\t\t\t\t</IconButton>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"Carousel.js","names":[],"sources":["../../../src/components/Carousel/Carousel.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from \"react\";\nimport { Children, isValidElement, useEffect, useRef, useState } from \"react\";\nimport { Group, useLocale } from \"react-aria-components\";\nimport { readPrefersReducedMotion } from \"../../hooks/usePrefersReducedMotion.js\";\nimport { cx } from \"../../utils/cx.js\";\nimport { ChevronLeft } from \"../Icon/icons/ChevronLeft.js\";\nimport { ChevronRight } from \"../Icon/icons/ChevronRight.js\";\nimport { IconButton } from \"../IconButton/index.js\";\nimport {\n\tcarouselCounter,\n\tcarouselCounterNumber,\n\tcarouselFooter,\n\tcarouselRoot,\n\tcarouselTrack,\n} from \"./Carousel.css.js\";\n\nexport interface CarouselProps {\n\t/** The slides, each a `CarouselItem`. */\n\tchildren?: ReactNode;\n\t/** Accessible name of the group of slides. */\n\tlabel: string;\n\t/** Accessible name of the previous-slide button. */\n\tpreviousLabel: string;\n\t/** Accessible name of the next-slide button. */\n\tnextLabel: string;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n}\n\nfunction itemsOf(track: HTMLElement): HTMLElement[] {\n\treturn Array.from(track.children) as HTMLElement[];\n}\n\n/** How far the track must scroll for `item` to sit where it snaps: the first\n * item at the start edge, the last at the end edge and any other in the\n * middle. Physical pixels, so it adds to `scrollLeft` in either direction. */\nfunction offsetToSnap(\n\ttrack: HTMLElement,\n\titem: HTMLElement,\n\tindex: number,\n\tcount: number,\n\tisRtl: boolean,\n): number {\n\tconst trackRect = track.getBoundingClientRect();\n\tconst itemRect = item.getBoundingClientRect();\n\tconst style = getComputedStyle(track);\n\tconst paddingStart = Number.parseFloat(style.scrollPaddingInlineStart) || 0;\n\tconst paddingEnd = Number.parseFloat(style.scrollPaddingInlineEnd) || 0;\n\tconst left = () =>\n\t\titemRect.left - trackRect.left - (isRtl ? paddingEnd : paddingStart);\n\tconst right = () =>\n\t\titemRect.right - trackRect.right + (isRtl ? paddingStart : paddingEnd);\n\n\tif (index === 0) {\n\t\treturn isRtl ? right() : left();\n\t}\n\tif (index === count - 1) {\n\t\treturn isRtl ? left() : right();\n\t}\n\treturn (\n\t\t(itemRect.left + itemRect.right) / 2 -\n\t\t(trackRect.left + trackRect.right) / 2\n\t);\n}\n\nfunction isFullyVisible(track: HTMLElement, item: HTMLElement): boolean {\n\tconst trackRect = track.getBoundingClientRect();\n\tconst itemRect = item.getBoundingClientRect();\n\treturn (\n\t\titemRect.left >= trackRect.left - 1 && itemRect.right <= trackRect.right + 1\n\t);\n}\n\nfunction currentIndexOf(track: HTMLElement, isRtl: boolean): number {\n\tconst items = itemsOf(track);\n\t// A track short enough that the last item meets the end edge before it is\n\t// the closest snap point still has to count the end of its range as the last\n\t// item.\n\tconst maxScroll = track.scrollWidth - track.clientWidth;\n\tif (\n\t\titems.length > 0 &&\n\t\tmaxScroll > 0 &&\n\t\tMath.abs(track.scrollLeft) >= maxScroll - 1\n\t) {\n\t\treturn items.length - 1;\n\t}\n\tlet closest = 0;\n\tlet closestDistance = Number.POSITIVE_INFINITY;\n\titems.forEach((item, index) => {\n\t\tconst distance = Math.abs(\n\t\t\toffsetToSnap(track, item, index, items.length, isRtl),\n\t\t);\n\t\tif (distance < closestDistance) {\n\t\t\tclosest = index;\n\t\t\tclosestDistance = distance;\n\t\t}\n\t});\n\treturn closest;\n}\n\n// React Aria focuses a pressable card on pointerdown. A scroll at that moment\n// moves the card from under the finger and cancels the press, so only keyboard\n// focus scrolls. Where `:focus-visible` is not supported, as in jsdom, every\n// focus scrolls.\nfunction isKeyboardFocus(element: Element): boolean {\n\tif (\n\t\ttypeof CSS === \"undefined\" ||\n\t\ttypeof CSS.supports !== \"function\" ||\n\t\t!CSS.supports(\"selector(:focus-visible)\")\n\t) {\n\t\treturn true;\n\t}\n\treturn element.matches(\":focus-visible\");\n}\n\n// Safari before 18.2 has no `scrollend`, so a quiet period after the last\n// scroll event also counts as the end of a button scroll.\nconst SCROLL_SETTLE_MS = 600;\n\n/**\n * A row of slides that scrolls sideways and snaps to each slide. When the\n * slides overflow, a footer shows the previous and next buttons and the\n * position as \"1 / 3\". Keyboard focus on a partly hidden slide scrolls it in.\n */\nexport function Carousel({\n\tchildren,\n\tlabel,\n\tpreviousLabel,\n\tnextLabel,\n\tclassName,\n\tstyle,\n}: CarouselProps) {\n\tconst trackRef = useRef<HTMLDivElement>(null);\n\tconst [currentIndex, setCurrentIndex] = useState(0);\n\t// A button scroll animates past the slides in between. Until it lands, the\n\t// track position names one of those as current, and a second press would\n\t// start from it instead of from the slide the first press asked for.\n\tconst targetIndexRef = useRef<number | null>(null);\n\tconst settleTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\tconst [overflows, setOverflows] = useState(false);\n\tconst { direction } = useLocale();\n\tconst isRtl = direction === \"rtl\";\n\tconst slides = Children.toArray(children);\n\tconst count = slides.length;\n\tconst slideKeys = slides\n\t\t.map((slide) => (isValidElement(slide) ? String(slide.key) : \"\"))\n\t\t.join(\"|\");\n\n\tconst clearSettleTimer = () => {\n\t\tif (settleTimerRef.current !== null) {\n\t\t\tclearTimeout(settleTimerRef.current);\n\t\t\tsettleTimerRef.current = null;\n\t\t}\n\t};\n\tconst releaseTarget = () => {\n\t\tclearSettleTimer();\n\t\ttargetIndexRef.current = null;\n\t};\n\t// The track cannot always align the target slide, for example when the\n\t// slides after it fit beside it. The scroll then stops short of the target,\n\t// so the lock ends with the scroll and the counter takes the real position.\n\tconst settleTarget = () => {\n\t\tconst track = trackRef.current;\n\t\tif (targetIndexRef.current === null) {\n\t\t\treturn;\n\t\t}\n\t\treleaseTarget();\n\t\tif (track) {\n\t\t\tsetCurrentIndex(currentIndexOf(track, isRtl));\n\t\t}\n\t};\n\tconst scheduleSettle = () => {\n\t\tclearSettleTimer();\n\t\tsettleTimerRef.current = setTimeout(settleTarget, SCROLL_SETTLE_MS);\n\t};\n\tconst settleTargetRef = useRef(settleTarget);\n\tsettleTargetRef.current = settleTarget;\n\n\tuseEffect(() => {\n\t\tconst track = trackRef.current;\n\t\tif (!track) {\n\t\t\treturn;\n\t\t}\n\t\tconst onScrollEnd = () => settleTargetRef.current();\n\t\ttrack.addEventListener(\"scrollend\", onScrollEnd);\n\t\treturn () => {\n\t\t\ttrack.removeEventListener(\"scrollend\", onScrollEnd);\n\t\t\tif (settleTimerRef.current !== null) {\n\t\t\t\tclearTimeout(settleTimerRef.current);\n\t\t\t}\n\t\t};\n\t}, []);\n\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: slideKeys isn't read here, but a new set of slides, even one of the same length, must be measured and observed again.\n\tuseEffect(() => {\n\t\tconst track = trackRef.current;\n\t\tif (!track) {\n\t\t\treturn;\n\t\t}\n\t\tconst measure = () => setOverflows(track.scrollWidth > track.clientWidth);\n\t\tmeasure();\n\t\t// Absent in jsdom, so the measurement above has to stand on its own.\n\t\tif (typeof ResizeObserver === \"undefined\") {\n\t\t\treturn;\n\t\t}\n\t\tconst observer = new ResizeObserver(measure);\n\t\tobserver.observe(track);\n\t\tfor (const item of itemsOf(track)) {\n\t\t\tobserver.observe(item);\n\t\t}\n\t\treturn () => observer.disconnect();\n\t}, [slideKeys]);\n\n\t// A new set of slides can be shorter than the position the track was at.\n\tconst shownIndex = Math.min(currentIndex, Math.max(count - 1, 0));\n\tconst hasPrevious = shownIndex > 0;\n\tconst hasNext = shownIndex < count - 1;\n\n\tconst scrollToItem = (index: number) => {\n\t\tconst track = trackRef.current;\n\t\tconst item = track ? itemsOf(track)[index] : undefined;\n\t\tif (!track || !item) {\n\t\t\treturn;\n\t\t}\n\t\tconst left =\n\t\t\ttrack.scrollLeft +\n\t\t\toffsetToSnap(track, item, index, itemsOf(track).length, isRtl);\n\t\tif (typeof track.scrollTo === \"function\") {\n\t\t\ttrack.scrollTo({\n\t\t\t\tleft,\n\t\t\t\tbehavior: readPrefersReducedMotion() ? \"instant\" : \"smooth\",\n\t\t\t});\n\t\t} else {\n\t\t\ttrack.scrollLeft = left;\n\t\t}\n\t\ttargetIndexRef.current = index;\n\t\tsetCurrentIndex(index);\n\t};\n\n\treturn (\n\t\t<div className={cx(carouselRoot, className)} style={style}>\n\t\t\t<Group\n\t\t\t\tref={trackRef}\n\t\t\t\taria-label={label}\n\t\t\t\tclassName={carouselTrack}\n\t\t\t\tonPointerDown={releaseTarget}\n\t\t\t\tonTouchStart={releaseTarget}\n\t\t\t\tonWheel={releaseTarget}\n\t\t\t\tonFocus={(event) => {\n\t\t\t\t\tconst track = event.currentTarget;\n\t\t\t\t\tconst index = itemsOf(track).findIndex((item) =>\n\t\t\t\t\t\titem.contains(event.target),\n\t\t\t\t\t);\n\t\t\t\t\tconst item = itemsOf(track)[index];\n\t\t\t\t\tif (\n\t\t\t\t\t\titem &&\n\t\t\t\t\t\tisKeyboardFocus(event.target) &&\n\t\t\t\t\t\t!isFullyVisible(track, item)\n\t\t\t\t\t) {\n\t\t\t\t\t\tscrollToItem(index);\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tonScroll={(event) => {\n\t\t\t\t\tconst index = currentIndexOf(event.currentTarget, isRtl);\n\t\t\t\t\tif (targetIndexRef.current !== null) {\n\t\t\t\t\t\tif (index === targetIndexRef.current) {\n\t\t\t\t\t\t\treleaseTarget();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tscheduleSettle();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tsetCurrentIndex(index);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Group>\n\t\t\t{count > 1 && overflows && (\n\t\t\t\t<div className={carouselFooter}>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tlabel={previousLabel}\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\t// aria-disabled keeps the button focusable at the end, so focus\n\t\t\t\t\t\t// does not jump away after the last press.\n\t\t\t\t\t\taria-disabled={!hasPrevious || undefined}\n\t\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\t\tif (hasPrevious) {\n\t\t\t\t\t\t\t\tscrollToItem(shownIndex - 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isRtl ? <ChevronRight /> : <ChevronLeft />}\n\t\t\t\t\t</IconButton>\n\t\t\t\t\t<div\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tdata-testid=\"carousel-position\"\n\t\t\t\t\t\tclassName={carouselCounter}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className={carouselCounterNumber}>{shownIndex + 1}</span>\n\t\t\t\t\t\t<span>/</span>\n\t\t\t\t\t\t<span className={carouselCounterNumber}>{count}</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<IconButton\n\t\t\t\t\t\tlabel={nextLabel}\n\t\t\t\t\t\tvariant=\"tertiary\"\n\t\t\t\t\t\tsize=\"xs\"\n\t\t\t\t\t\taria-disabled={!hasNext || undefined}\n\t\t\t\t\t\tonPress={() => {\n\t\t\t\t\t\t\tif (hasNext) {\n\t\t\t\t\t\t\t\tscrollToItem(shownIndex + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{isRtl ? <ChevronLeft /> : <ChevronRight />}\n\t\t\t\t\t</IconButton>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":"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"}
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselItem.js","names":[],"sources":["../../../src/components/Carousel/CarouselItem.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { carouselItem } from \"./Carousel.css.js\";\n\nexport interface CarouselItemProps {\n\t/** One slide, usually a `Card`. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** One slide. Each item snaps to the start of the track. */\nexport function CarouselItem({ children, className }: CarouselItemProps) {\n\treturn <div className={cx(carouselItem, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAa,EAAE,aAAU,gBAAgC;AACxE,QAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAc,EAAU;EAAG;EAAe,CAAA"}
1
+ {"version":3,"file":"CarouselItem.js","names":[],"sources":["../../../src/components/Carousel/CarouselItem.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx.js\";\nimport { carouselItem } from \"./Carousel.css.js\";\n\nexport interface CarouselItemProps {\n\t/** One slide, usually a `Card`. */\n\tchildren?: ReactNode;\n\tclassName?: string;\n}\n\n/** One slide. Each item snaps to the start of the track. */\nexport function CarouselItem({ children, className }: CarouselItemProps) {\n\treturn <div className={cx(carouselItem, className)}>{children}</div>;\n}\n"],"mappings":";;;;AAWA,SAAgB,EAAa,EAAE,aAAU,gBAAgC;CACxE,OAAO,kBAAC,OAAD;EAAK,WAAW,EAAG,GAAc,CAAS;EAAI;CAAc,CAAA;AACpE"}
@@ -1,4 +1,4 @@
1
- import { createRuntimeFn as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
1
+ import { c as e } from "../../vendor/@vanilla-extract/recipes/dist/createRuntimeFn-62c9670f.esm.js";
2
2
  /* empty css */
3
3
  //#region src/components/Checkbox/Checkbox.css.ts
4
4
  var t = "s7h2sn0", n = e({
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.js","names":[],"sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxProps as AriaCheckboxProps } from \"react-aria-components\";\nimport { Checkbox as AriaCheckbox } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxRoot } from \"./Checkbox.css.js\";\nimport { CheckboxIndicator } from \"./CheckboxIndicator.js\";\n\nexport type CheckboxVariant = \"inline\" | \"row\";\n\nexport interface CheckboxProps\n\textends Omit<AriaCheckboxProps, \"children\" | \"className\" | \"style\"> {\n\t/**\n\t * `inline` (default) sits the box beside its label at content width. `row`\n\t * renders the 40px selectable row Figma draws for a menu item — use it for a\n\t * `CheckboxGroup` presented as a list of options.\n\t */\n\tvariant?: CheckboxVariant;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLLabelElement>;\n\t/**\n\t * Inline label. Omit for a standalone box — then pass `aria-label`\n\t * (or `aria-labelledby`) so the control has an accessible name.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * Selection control with an optional inline label. Use to select any number of\n * options, or as a single on/off toggle; for one choice among mutually exclusive\n * options use Radio.\n *\n * Selection is `isSelected`/`defaultSelected`/`onChange` (React Aria); `isIndeterminate`\n * renders the mixed state. Interaction states (hover/focus/pressed/disabled) and RTL\n * are handled by RAC `data-*` and ambient `dir` — not props.\n */\nexport function Checkbox({\n\tvariant = \"inline\",\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxProps) {\n\treturn (\n\t\t<AriaCheckbox\n\t\t\t{...rest}\n\t\t\tclassName={cx(checkboxRoot({ variant }), className)}\n\t\t>\n\t\t\t<CheckboxIndicator hasStateLayer={variant === \"inline\"} />\n\t\t\t{children != null && typeof children !== \"boolean\" && (\n\t\t\t\t<span data-slot=\"label\">{children}</span>\n\t\t\t)}\n\t\t</AriaCheckbox>\n\t);\n}\n"],"mappings":";;;;;;AAoCA,SAAgB,EAAS,EACxB,aAAU,UACV,cACA,aACA,GAAG,KACc;AACjB,QACC,kBAAC,GAAD;EACC,GAAI;EACJ,WAAW,EAAG,EAAa,EAAE,YAAS,CAAC,EAAE,EAAU;YAFpD,CAIC,kBAAC,GAAD,EAAmB,eAAe,MAAY,UAAY,CAAA,EACzD,KAAY,QAAQ,OAAO,KAAa,aACxC,kBAAC,QAAD;GAAM,aAAU;GAAS;GAAgB,CAAA,CAE5B"}
1
+ {"version":3,"file":"Checkbox.js","names":[],"sources":["../../../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxProps as AriaCheckboxProps } from \"react-aria-components\";\nimport { Checkbox as AriaCheckbox } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxRoot } from \"./Checkbox.css.js\";\nimport { CheckboxIndicator } from \"./CheckboxIndicator.js\";\n\nexport type CheckboxVariant = \"inline\" | \"row\";\n\nexport interface CheckboxProps\n\textends Omit<AriaCheckboxProps, \"children\" | \"className\" | \"style\"> {\n\t/**\n\t * `inline` (default) sits the box beside its label at content width. `row`\n\t * renders the 40px selectable row Figma draws for a menu item — use it for a\n\t * `CheckboxGroup` presented as a list of options.\n\t */\n\tvariant?: CheckboxVariant;\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLLabelElement>;\n\t/**\n\t * Inline label. Omit for a standalone box — then pass `aria-label`\n\t * (or `aria-labelledby`) so the control has an accessible name.\n\t */\n\tchildren?: ReactNode;\n}\n\n/**\n * Selection control with an optional inline label. Use to select any number of\n * options, or as a single on/off toggle; for one choice among mutually exclusive\n * options use Radio.\n *\n * Selection is `isSelected`/`defaultSelected`/`onChange` (React Aria); `isIndeterminate`\n * renders the mixed state. Interaction states (hover/focus/pressed/disabled) and RTL\n * are handled by RAC `data-*` and ambient `dir` — not props.\n */\nexport function Checkbox({\n\tvariant = \"inline\",\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxProps) {\n\treturn (\n\t\t<AriaCheckbox\n\t\t\t{...rest}\n\t\t\tclassName={cx(checkboxRoot({ variant }), className)}\n\t\t>\n\t\t\t<CheckboxIndicator hasStateLayer={variant === \"inline\"} />\n\t\t\t{children != null && typeof children !== \"boolean\" && (\n\t\t\t\t<span data-slot=\"label\">{children}</span>\n\t\t\t)}\n\t\t</AriaCheckbox>\n\t);\n}\n"],"mappings":";;;;;;AAoCA,SAAgB,EAAS,EACxB,aAAU,UACV,cACA,aACA,GAAG,KACc;CACjB,OACC,kBAAC,GAAD;EACC,GAAI;EACJ,WAAW,EAAG,EAAa,EAAE,WAAQ,CAAC,GAAG,CAAS;YAFnD,CAIC,kBAAC,GAAD,EAAmB,eAAe,MAAY,SAAW,CAAA,GACxD,KAAY,QAAQ,OAAO,KAAa,aACxC,kBAAC,QAAD;GAAM,aAAU;GAAS;EAAe,CAAA,CAE5B;;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CheckboxGroup.js","names":[],"sources":["../../../src/components/Checkbox/CheckboxGroup.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxGroupProps as AriaCheckboxGroupProps } from \"react-aria-components\";\nimport { CheckboxGroup as AriaCheckboxGroup } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxGroup } from \"./Checkbox.css.js\";\n\nexport interface CheckboxGroupProps\n\textends Omit<AriaCheckboxGroupProps, \"className\" | \"style\" | \"children\"> {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The `Checkbox` options for this group. */\n\tchildren: ReactNode;\n}\n\n/**\n * Multi-select group: any number of child `Checkbox` options may be selected.\n * Owns the selected values (`value`/`onChange`) and the group's accessible\n * name — supply `aria-label` or `aria-labelledby`.\n */\nexport function CheckboxGroup({\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxGroupProps) {\n\treturn (\n\t\t<AriaCheckboxGroup {...rest} className={cx(checkboxGroup, className)}>\n\t\t\t{children}\n\t\t</AriaCheckboxGroup>\n\t);\n}\n"],"mappings":";;;;;AAoBA,SAAgB,EAAc,EAC7B,cACA,aACA,GAAG,KACmB;AACtB,QACC,kBAAC,GAAD;EAAmB,GAAI;EAAM,WAAW,EAAG,GAAe,EAAU;EAClE;EACkB,CAAA"}
1
+ {"version":3,"file":"CheckboxGroup.js","names":[],"sources":["../../../src/components/Checkbox/CheckboxGroup.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode, Ref } from \"react\";\nimport type { CheckboxGroupProps as AriaCheckboxGroupProps } from \"react-aria-components\";\nimport { CheckboxGroup as AriaCheckboxGroup } from \"react-aria-components\";\nimport { cx } from \"../../utils/cx.js\";\nimport { checkboxGroup } from \"./Checkbox.css.js\";\n\nexport interface CheckboxGroupProps\n\textends Omit<AriaCheckboxGroupProps, \"className\" | \"style\" | \"children\"> {\n\tclassName?: string;\n\tstyle?: CSSProperties;\n\tref?: Ref<HTMLDivElement>;\n\t/** The `Checkbox` options for this group. */\n\tchildren: ReactNode;\n}\n\n/**\n * Multi-select group: any number of child `Checkbox` options may be selected.\n * Owns the selected values (`value`/`onChange`) and the group's accessible\n * name — supply `aria-label` or `aria-labelledby`.\n */\nexport function CheckboxGroup({\n\tclassName,\n\tchildren,\n\t...rest\n}: CheckboxGroupProps) {\n\treturn (\n\t\t<AriaCheckboxGroup {...rest} className={cx(checkboxGroup, className)}>\n\t\t\t{children}\n\t\t</AriaCheckboxGroup>\n\t);\n}\n"],"mappings":";;;;;AAoBA,SAAgB,EAAc,EAC7B,cACA,aACA,GAAG,KACmB;CACtB,OACC,kBAAC,GAAD;EAAmB,GAAI;EAAM,WAAW,EAAG,GAAe,CAAS;EACjE;CACiB,CAAA;AAErB"}