@namroodinc/liquid-editorial 0.11.0 → 0.13.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 (260) hide show
  1. package/README.md +44 -20
  2. package/UPGRADING.md +322 -0
  3. package/dist/chunks/{Avatar-DPnrvkwd.cjs → Avatar-BY0dAItT.cjs} +2 -2
  4. package/dist/chunks/{Avatar-DPnrvkwd.cjs.map → Avatar-BY0dAItT.cjs.map} +1 -1
  5. package/dist/chunks/{Avatar-BK8IdL5W.js → Avatar-UjhjcHh5.js} +2 -2
  6. package/dist/chunks/{Avatar-BK8IdL5W.js.map → Avatar-UjhjcHh5.js.map} +1 -1
  7. package/dist/chunks/{Board-Cnyqrc-R.js → Board-BCS7sDXg.js} +13 -5
  8. package/dist/chunks/{Board-Cnyqrc-R.js.map → Board-BCS7sDXg.js.map} +1 -1
  9. package/dist/chunks/{Board-DFuJt2Oh.cjs → Board-CNVy8gHI.cjs} +2 -2
  10. package/dist/chunks/Board-CNVy8gHI.cjs.map +1 -0
  11. package/dist/chunks/CollectionView-CIJdNwcq.cjs +2 -0
  12. package/dist/chunks/CollectionView-CIJdNwcq.cjs.map +1 -0
  13. package/dist/chunks/{CollectionView-Vj84E26b.js → CollectionView-JRNdXHti.js} +5 -5
  14. package/dist/chunks/CollectionView-JRNdXHti.js.map +1 -0
  15. package/dist/chunks/{ColourField-DkO8tjeB.js → ColourField-BTj9NHgI.js} +147 -153
  16. package/dist/chunks/ColourField-BTj9NHgI.js.map +1 -0
  17. package/dist/chunks/ColourField-DuoVeXjG.cjs +2 -0
  18. package/dist/chunks/ColourField-DuoVeXjG.cjs.map +1 -0
  19. package/dist/chunks/DatePicker-BYpGsfL4.cjs +2 -0
  20. package/dist/chunks/DatePicker-BYpGsfL4.cjs.map +1 -0
  21. package/dist/chunks/{DatePicker-B8tllGYy.js → DatePicker-Cb5WspIC.js} +22 -22
  22. package/dist/chunks/DatePicker-Cb5WspIC.js.map +1 -0
  23. package/dist/chunks/{Drawer-DTtgAZO2.js → Drawer-Ck5XKT_V.js} +4 -4
  24. package/dist/chunks/Drawer-Ck5XKT_V.js.map +1 -0
  25. package/dist/chunks/Drawer-DdIH9jpe.cjs +2 -0
  26. package/dist/chunks/Drawer-DdIH9jpe.cjs.map +1 -0
  27. package/dist/chunks/EntryPicker-CCCoJxbd.cjs +2 -0
  28. package/dist/chunks/EntryPicker-CCCoJxbd.cjs.map +1 -0
  29. package/dist/chunks/{EntryPicker-KxHZzZsh.js → EntryPicker-DLCP4S-q.js} +4 -4
  30. package/dist/chunks/EntryPicker-DLCP4S-q.js.map +1 -0
  31. package/dist/chunks/{FormEditor-BJcAIVcL.cjs → FormEditor-ArvjKtJJ.cjs} +2 -2
  32. package/dist/chunks/{FormEditor-BJcAIVcL.cjs.map → FormEditor-ArvjKtJJ.cjs.map} +1 -1
  33. package/dist/chunks/{FormEditor-CdLqPaKK.js → FormEditor-DnNBv9Xf.js} +16 -16
  34. package/dist/chunks/{FormEditor-CdLqPaKK.js.map → FormEditor-DnNBv9Xf.js.map} +1 -1
  35. package/dist/chunks/{Message-CyLq9ef-.js → Message-C73sJfdo.js} +4 -8
  36. package/dist/chunks/{Message-CyLq9ef-.js.map → Message-C73sJfdo.js.map} +1 -1
  37. package/dist/chunks/{Message-D3b8HDhm.cjs → Message-CIKSTXp8.cjs} +2 -2
  38. package/dist/chunks/{Message-D3b8HDhm.cjs.map → Message-CIKSTXp8.cjs.map} +1 -1
  39. package/dist/chunks/RichTextEditor--kMao88d.cjs +2 -0
  40. package/dist/chunks/RichTextEditor--kMao88d.cjs.map +1 -0
  41. package/dist/chunks/{RichTextEditor-DmNM63Wg.js → RichTextEditor-CvbboqJY.js} +397 -380
  42. package/dist/chunks/RichTextEditor-CvbboqJY.js.map +1 -0
  43. package/dist/chunks/{dialogLabel-D18maX-p.js → dialogLabel-DT7rCr3_.js} +19 -19
  44. package/dist/chunks/{dialogLabel-D18maX-p.js.map → dialogLabel-DT7rCr3_.js.map} +1 -1
  45. package/dist/chunks/{dialogLabel-2HRYMHbF.cjs → dialogLabel-_-MTckE_.cjs} +2 -2
  46. package/dist/chunks/{dialogLabel-2HRYMHbF.cjs.map → dialogLabel-_-MTckE_.cjs.map} +1 -1
  47. package/dist/chunks/overlayLayer-iGhuAByk.cjs +2 -0
  48. package/dist/chunks/overlayLayer-iGhuAByk.cjs.map +1 -0
  49. package/dist/chunks/{overlayLayer-IuoPVwTO.js → overlayLayer-lU4iWSjO.js} +32 -28
  50. package/dist/chunks/overlayLayer-lU4iWSjO.js.map +1 -0
  51. package/dist/chunks/{group-7Z_xRlQx.js → style-7Z_xRlQx.js} +1 -1
  52. package/dist/chunks/{group-7Z_xRlQx.js.map → style-7Z_xRlQx.js.map} +1 -1
  53. package/dist/chunks/{group-nulIa2_8.cjs → style-nulIa2_8.cjs} +1 -1
  54. package/dist/chunks/{group-nulIa2_8.cjs.map → style-nulIa2_8.cjs.map} +1 -1
  55. package/dist/chunks/use-picker-session-Bue5MJHQ.cjs +2 -0
  56. package/dist/chunks/use-picker-session-Bue5MJHQ.cjs.map +1 -0
  57. package/dist/chunks/{use-picker-session-BDEWL2jK.js → use-picker-session-DUO4G8Cs.js} +4 -4
  58. package/dist/chunks/use-picker-session-DUO4G8Cs.js.map +1 -0
  59. package/dist/chunks/{useTooltip-BXAvQwt4.cjs → useTooltip-C7ON4nkV.cjs} +2 -2
  60. package/dist/chunks/{useTooltip-BXAvQwt4.cjs.map → useTooltip-C7ON4nkV.cjs.map} +1 -1
  61. package/dist/chunks/{useTooltip-BrC7FdeH.js → useTooltip-DnJEFBLg.js} +2 -2
  62. package/dist/chunks/{useTooltip-BrC7FdeH.js.map → useTooltip-DnJEFBLg.js.map} +1 -1
  63. package/dist/components/AppShell/index.cjs +1 -1
  64. package/dist/components/AppShell/index.js +1 -1
  65. package/dist/components/AssetCard/index.cjs +1 -1
  66. package/dist/components/AssetCard/index.cjs.map +1 -1
  67. package/dist/components/AssetCard/index.d.cts.map +1 -1
  68. package/dist/components/AssetCard/index.d.ts.map +1 -1
  69. package/dist/components/AssetCard/index.js +16 -16
  70. package/dist/components/AssetCard/index.js.map +1 -1
  71. package/dist/components/AssetCard/style.css +47 -46
  72. package/dist/components/AssetGrid/index.cjs +1 -1
  73. package/dist/components/AssetGrid/index.cjs.map +1 -1
  74. package/dist/components/AssetGrid/index.d.cts +0 -2
  75. package/dist/components/AssetGrid/index.d.cts.map +1 -1
  76. package/dist/components/AssetGrid/index.d.ts +0 -2
  77. package/dist/components/AssetGrid/index.d.ts.map +1 -1
  78. package/dist/components/AssetGrid/index.js +15 -15
  79. package/dist/components/AssetGrid/index.js.map +1 -1
  80. package/dist/components/Avatar/index.cjs +1 -1
  81. package/dist/components/Avatar/index.js +1 -1
  82. package/dist/components/Avatar/style.css +26 -5
  83. package/dist/components/Badge/index.cjs +1 -1
  84. package/dist/components/Badge/index.cjs.map +1 -1
  85. package/dist/components/Badge/index.d.cts +2 -3
  86. package/dist/components/Badge/index.d.cts.map +1 -1
  87. package/dist/components/Badge/index.d.ts +2 -3
  88. package/dist/components/Badge/index.d.ts.map +1 -1
  89. package/dist/components/Badge/index.js +1 -1
  90. package/dist/components/Badge/index.js.map +1 -1
  91. package/dist/components/Badge/style.css +29 -35
  92. package/dist/components/Banner/index.cjs +1 -1
  93. package/dist/components/Banner/index.js +1 -1
  94. package/dist/components/Board/index.cjs +1 -1
  95. package/dist/components/Board/index.js +1 -1
  96. package/dist/components/Board/style.css +37 -16
  97. package/dist/components/Button/style.css +17 -12
  98. package/dist/components/ButtonGroup/index.cjs.map +1 -1
  99. package/dist/components/ButtonGroup/index.d.cts +1 -1
  100. package/dist/components/ButtonGroup/index.d.ts +1 -1
  101. package/dist/components/ButtonGroup/index.js.map +1 -1
  102. package/dist/components/ButtonGroup/style.css +4 -20
  103. package/dist/components/Choice/index.cjs +1 -1
  104. package/dist/components/Choice/index.cjs.map +1 -1
  105. package/dist/components/Choice/index.js +3 -3
  106. package/dist/components/Choice/index.js.map +1 -1
  107. package/dist/components/Choice/style.css +34 -22
  108. package/dist/components/CollectionView/index.cjs +1 -1
  109. package/dist/components/CollectionView/index.js +1 -1
  110. package/dist/components/CollectionView/style.css +8 -11
  111. package/dist/components/ColourField/index.cjs +1 -1
  112. package/dist/components/ColourField/index.d.cts.map +1 -1
  113. package/dist/components/ColourField/index.d.ts.map +1 -1
  114. package/dist/components/ColourField/index.js +1 -1
  115. package/dist/components/ColourField/style.css +31 -20
  116. package/dist/components/DatePicker/index.cjs +1 -1
  117. package/dist/components/DatePicker/index.js +1 -1
  118. package/dist/components/DatePicker/style.css +10 -3
  119. package/dist/components/Drawer/index.cjs +1 -1
  120. package/dist/components/Drawer/index.js +1 -1
  121. package/dist/components/Drawer/style.css +10 -23
  122. package/dist/components/EditLayout/index.cjs +1 -1
  123. package/dist/components/EditLayout/index.cjs.map +1 -1
  124. package/dist/components/EditLayout/index.js +4 -4
  125. package/dist/components/EditLayout/index.js.map +1 -1
  126. package/dist/components/EditLayout/style.css +5 -6
  127. package/dist/components/EntryPicker/index.cjs +1 -1
  128. package/dist/components/EntryPicker/index.js +1 -1
  129. package/dist/components/EntryPicker/style.css +46 -20
  130. package/dist/components/Field/style.css +6 -5
  131. package/dist/components/FormEditor/README.md +28 -19
  132. package/dist/components/FormEditor/index.cjs +1 -1
  133. package/dist/components/FormEditor/index.js +1 -1
  134. package/dist/components/FormEditor/style.css +1 -0
  135. package/dist/components/ImageCropper/style.css +20 -20
  136. package/dist/components/LimitReading/style.css +1 -1
  137. package/dist/components/Menu/index.cjs +1 -1
  138. package/dist/components/Menu/index.js +1 -1
  139. package/dist/components/Menu/style.css +3 -3
  140. package/dist/components/Modal/index.cjs +1 -1
  141. package/dist/components/Modal/index.cjs.map +1 -1
  142. package/dist/components/Modal/index.js +3 -3
  143. package/dist/components/Modal/index.js.map +1 -1
  144. package/dist/components/Modal/style.css +6 -6
  145. package/dist/components/Popover/index.cjs +1 -1
  146. package/dist/components/Popover/index.cjs.map +1 -1
  147. package/dist/components/Popover/index.d.cts.map +1 -1
  148. package/dist/components/Popover/index.d.ts.map +1 -1
  149. package/dist/components/Popover/index.js +58 -55
  150. package/dist/components/Popover/index.js.map +1 -1
  151. package/dist/components/Popover/style.css +2 -2
  152. package/dist/components/RichTextEditor/index.cjs +1 -1
  153. package/dist/components/RichTextEditor/index.d.cts.map +1 -1
  154. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  155. package/dist/components/RichTextEditor/index.js +1 -1
  156. package/dist/components/RichTextEditor/storyblock-view.d.cts.map +1 -1
  157. package/dist/components/RichTextEditor/storyblock-view.d.ts.map +1 -1
  158. package/dist/components/RichTextEditor/style.css +123 -75
  159. package/dist/components/Select/index.cjs +1 -1
  160. package/dist/components/Select/index.js +1 -1
  161. package/dist/components/SelectionCard/index.cjs +1 -1
  162. package/dist/components/SelectionCard/index.cjs.map +1 -1
  163. package/dist/components/SelectionCard/index.d.cts.map +1 -1
  164. package/dist/components/SelectionCard/index.d.ts.map +1 -1
  165. package/dist/components/SelectionCard/index.js +7 -3
  166. package/dist/components/SelectionCard/index.js.map +1 -1
  167. package/dist/components/SelectionCard/style.css +30 -48
  168. package/dist/components/SideNav/index.cjs +1 -1
  169. package/dist/components/SideNav/index.cjs.map +1 -1
  170. package/dist/components/SideNav/index.d.cts +3 -3
  171. package/dist/components/SideNav/index.d.ts +3 -3
  172. package/dist/components/SideNav/index.js +15 -3
  173. package/dist/components/SideNav/index.js.map +1 -1
  174. package/dist/components/SideNav/style.css +19 -13
  175. package/dist/components/Skeleton/style.css +1 -1
  176. package/dist/components/Slider/style.css +19 -32
  177. package/dist/components/SortableList/index.cjs +1 -1
  178. package/dist/components/SortableList/index.cjs.map +1 -1
  179. package/dist/components/SortableList/index.js +6 -2
  180. package/dist/components/SortableList/index.js.map +1 -1
  181. package/dist/components/SortableList/style.css +20 -5
  182. package/dist/components/Stepper/style.css +8 -9
  183. package/dist/components/SubNav/index.cjs.map +1 -1
  184. package/dist/components/SubNav/index.d.cts +2 -2
  185. package/dist/components/SubNav/index.d.ts +2 -2
  186. package/dist/components/SubNav/index.js.map +1 -1
  187. package/dist/components/SubNav/style.css +3 -8
  188. package/dist/components/Switch/index.cjs +1 -1
  189. package/dist/components/Switch/index.cjs.map +1 -1
  190. package/dist/components/Switch/index.d.cts.map +1 -1
  191. package/dist/components/Switch/index.d.ts.map +1 -1
  192. package/dist/components/Switch/index.js +3 -2
  193. package/dist/components/Switch/index.js.map +1 -1
  194. package/dist/components/Switch/style.css +26 -6
  195. package/dist/components/Table/index.cjs +1 -1
  196. package/dist/components/Table/index.cjs.map +1 -1
  197. package/dist/components/Table/index.js +2 -2
  198. package/dist/components/Table/index.js.map +1 -1
  199. package/dist/components/Table/style.css +34 -22
  200. package/dist/components/TagsInput/index.cjs +1 -1
  201. package/dist/components/TagsInput/index.cjs.map +1 -1
  202. package/dist/components/TagsInput/index.js +1 -1
  203. package/dist/components/TagsInput/index.js.map +1 -1
  204. package/dist/components/TagsInput/style.css +12 -5
  205. package/dist/components/Time/index.cjs +1 -1
  206. package/dist/components/Time/index.js +1 -1
  207. package/dist/components/Time/style.css +1 -1
  208. package/dist/components/Toast/index.cjs +1 -1
  209. package/dist/components/Toast/index.js +1 -1
  210. package/dist/components/Toast/style.css +1 -1
  211. package/dist/components/TopNav/index.cjs +1 -1
  212. package/dist/components/TopNav/index.cjs.map +1 -1
  213. package/dist/components/TopNav/index.d.cts +4 -4
  214. package/dist/components/TopNav/index.d.ts +4 -4
  215. package/dist/components/TopNav/index.js +5 -1
  216. package/dist/components/TopNav/index.js.map +1 -1
  217. package/dist/components/TopNav/style.css +6 -9
  218. package/dist/elements.css +2 -2
  219. package/dist/index.cjs +1 -1
  220. package/dist/index.d.cts +2 -2
  221. package/dist/index.d.cts.map +1 -1
  222. package/dist/index.d.ts +2 -2
  223. package/dist/index.d.ts.map +1 -1
  224. package/dist/index.js +44 -44
  225. package/dist/internal/dialogFocus.d.cts +2 -0
  226. package/dist/internal/dialogFocus.d.cts.map +1 -1
  227. package/dist/internal/dialogFocus.d.ts +2 -0
  228. package/dist/internal/dialogFocus.d.ts.map +1 -1
  229. package/dist/message.css +13 -17
  230. package/dist/tokens.css +112 -280
  231. package/package.json +1 -1
  232. package/dist/chunks/Board-DFuJt2Oh.cjs.map +0 -1
  233. package/dist/chunks/CollectionView-BNYx29b1.cjs +0 -2
  234. package/dist/chunks/CollectionView-BNYx29b1.cjs.map +0 -1
  235. package/dist/chunks/CollectionView-Vj84E26b.js.map +0 -1
  236. package/dist/chunks/ColourField--rS9KDpq.cjs +0 -2
  237. package/dist/chunks/ColourField--rS9KDpq.cjs.map +0 -1
  238. package/dist/chunks/ColourField-DkO8tjeB.js.map +0 -1
  239. package/dist/chunks/DatePicker-B8tllGYy.js.map +0 -1
  240. package/dist/chunks/DatePicker-OiqjoO-f.cjs +0 -2
  241. package/dist/chunks/DatePicker-OiqjoO-f.cjs.map +0 -1
  242. package/dist/chunks/Drawer-BDX9_qHA.cjs +0 -2
  243. package/dist/chunks/Drawer-BDX9_qHA.cjs.map +0 -1
  244. package/dist/chunks/Drawer-DTtgAZO2.js.map +0 -1
  245. package/dist/chunks/EntryPicker-BI_7g2Wg.cjs +0 -2
  246. package/dist/chunks/EntryPicker-BI_7g2Wg.cjs.map +0 -1
  247. package/dist/chunks/EntryPicker-KxHZzZsh.js.map +0 -1
  248. package/dist/chunks/RichTextEditor-BXyhSeJd.cjs +0 -2
  249. package/dist/chunks/RichTextEditor-BXyhSeJd.cjs.map +0 -1
  250. package/dist/chunks/RichTextEditor-DmNM63Wg.js.map +0 -1
  251. package/dist/chunks/overlayLayer-IuoPVwTO.js.map +0 -1
  252. package/dist/chunks/overlayLayer-seJG-EFn.cjs +0 -2
  253. package/dist/chunks/overlayLayer-seJG-EFn.cjs.map +0 -1
  254. package/dist/chunks/use-picker-session-BDEWL2jK.js.map +0 -1
  255. package/dist/chunks/use-picker-session-C4FGinLN.cjs +0 -2
  256. package/dist/chunks/use-picker-session-C4FGinLN.cjs.map +0 -1
  257. package/dist/components/ColourField/focus.d.cts +0 -3
  258. package/dist/components/ColourField/focus.d.cts.map +0 -1
  259. package/dist/components/ColourField/focus.d.ts +0 -3
  260. package/dist/components/ColourField/focus.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Fragment","Icon","Fragment$1","Placeholder","icon","label","AssetImage","status","setStatus","useState","ratio","setRatio","adopt","useCallback","image","imageRef","alt","Skeleton","event","isHandler","key","warnedLinkAndSelect","useLinkAndSelectWarning","isConflicting","ThumbnailLink","anchorProps","selectedId","useId","props","isPending","describedBy","isSelected","href","tabIndex","name","className","ThumbnailAction","linkProps","onSelect","Button","AssetCard","forwardRef","rest","fit","src","actions","meta","description","footer","AssetCardSkeleton","delay","index"],"sources":["../../../src/components/AssetCard/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useState,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport type { IconName } from \"../Icon/icons\";\nimport { Skeleton } from \"../Skeleton\";\nimport \"./style.css\";\n\nexport interface AssetCardProps extends Omit<HTMLAttributes<HTMLDivElement>, \"onSelect\" | \"title\"> {\n /** File name or crop label, displayed in full. */\n name: string;\n /** Thumbnail source. Omit to display the fallback icon. */\n src?: string;\n /** Alternative text for the preview; empty when the image is decorative. */\n alt?: string;\n /** Fallback for assets without a thumbnail, such as videos and PDFs. */\n icon?: IconName;\n /** Fill the frame, or show the complete image on an inset preview stage. */\n fit?: \"cover\" | \"contain\";\n /** Dimensions, size, ratio, or other metadata below the name. */\n meta?: ReactNode;\n /** Supporting content below the metadata, such as a source file name. */\n description?: ReactNode;\n /** Paint the selection fill and rail without changing the card's size. */\n isSelected?: boolean;\n /** Show an uploading overlay and disable the thumbnail action. */\n isPending?: boolean;\n /** Makes the thumbnail a selection toggle, independent of overlay and footer controls. */\n onSelect?: () => void;\n /**\n * Makes the thumbnail a link, independent of overlay and footer controls.\n * Replaces `onSelect`, which is then never called (development builds warn);\n * put selection on an `actions` control instead. While `isPending`, the link\n * has no `href`, is `aria-disabled`, leaves the tab order, and drops every\n * `on*` handler.\n */\n linkProps?: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, \"children\"> & { href: string };\n /** Badges, buttons, or menus pinned across the top of the thumbnail. */\n actions?: ReactNode;\n /** Actions or content below the card's text. */\n footer?: ReactNode;\n}\n\nfunction Placeholder({ icon, label }: { icon: IconName; label?: string }) {\n return (\n <span className=\"ds-asset-card__placeholder ds-asset-tile__placeholder\">\n <Icon\n name={icon}\n size={24}\n aria-label={label}\n />\n </span>\n );\n}\n\n/** Remount for each source so failed and loaded states cannot leak to another image. */\nfunction AssetImage({ src, alt }: { src: string; alt: string }) {\n const [status, setStatus] = useState<\"loading\" | \"loaded\" | \"failed\">(\"loading\");\n // The picture's own shape lets a contained preview fill the stage exactly.\n const [ratio, setRatio] = useState<number>();\n const adopt = useCallback((image: HTMLImageElement) => {\n setStatus(\"loaded\");\n if (image.naturalWidth && image.naturalHeight) {\n setRatio(image.naturalWidth / image.naturalHeight);\n }\n }, []);\n // A cached image can finish before onLoad is attached. Only success is read\n // here: an SVG without intrinsic size and a deferred lazy image also report\n // a zero naturalWidth, so failure is left to the error event.\n const imageRef = useCallback(\n (image: HTMLImageElement | null) => {\n if (!image?.complete) {\n return;\n }\n if (image.naturalWidth > 0) {\n adopt(image);\n } else {\n image.decode().then(\n () => adopt(image),\n () => {},\n );\n }\n },\n [adopt],\n );\n\n if (status === \"failed\") {\n return (\n <Placeholder\n icon=\"alert-triangle\"\n label={alt ? `${alt} (preview unavailable)` : \"Preview unavailable\"}\n />\n );\n }\n\n return (\n <>\n {status === \"loading\" && (\n <Skeleton\n shape=\"block\"\n className=\"ds-asset-card__thumb-skeleton ds-asset-tile__thumb-skeleton\"\n />\n )}\n <img\n ref={imageRef}\n src={src}\n alt={alt}\n loading=\"lazy\"\n data-loaded={status === \"loaded\" || undefined}\n style={ratio ? ({ \"--asset-ratio\": ratio } as CSSProperties) : undefined}\n onLoad={(event) => adopt(event.currentTarget)}\n onError={() => setStatus(\"failed\")}\n />\n </>\n );\n}\n\ntype ThumbnailActionProps = Pick<\n AssetCardProps,\n \"name\" | \"linkProps\" | \"onSelect\" | \"isPending\" | \"isSelected\"\n>;\n\n/** Event handler props, such as `onClick`, `onPointerDown` or a router's `onMouseEnter`. */\nconst isHandler = (key: string) => /^on[A-Z]/.test(key);\n\nlet warnedLinkAndSelect = false;\n\n/** Development-only: `onSelect` is unreachable once the thumbnail is a link. */\nfunction useLinkAndSelectWarning(isConflicting: boolean) {\n useEffect(() => {\n if (isConflicting && !warnedLinkAndSelect && process.env.NODE_ENV !== \"production\") {\n warnedLinkAndSelect = true;\n console.warn(\n \"AssetCard: `linkProps` replaces `onSelect`, so the thumbnail navigates and `onSelect` \" +\n \"is never called. Pass one of them, and put selection on an `actions` control.\",\n );\n }\n }, [isConflicting]);\n}\n\n/**\n * A link has no pressed state, so selection is its description. While pending\n * it matches a disabled Button: no `href`, no tab stop, and no handlers, with\n * an explicit role so its name and disabled state still reach assistive tech.\n */\nfunction ThumbnailLink({\n name,\n linkProps: { href, tabIndex, className, ...anchorProps },\n isPending,\n isSelected,\n}: Omit<ThumbnailActionProps, \"linkProps\" | \"onSelect\"> & {\n linkProps: NonNullable<AssetCardProps[\"linkProps\"]>;\n}) {\n const selectedId = useId();\n const props = isPending\n ? Object.fromEntries(Object.entries(anchorProps).filter(([key]) => !isHandler(key)))\n : anchorProps;\n const describedBy = [anchorProps[\"aria-describedby\"], isSelected && selectedId]\n .filter(Boolean)\n .join(\" \");\n return (\n <>\n <a\n {...props}\n href={isPending ? undefined : href}\n tabIndex={isPending ? undefined : tabIndex}\n role={isPending ? \"link\" : anchorProps.role}\n aria-label={anchorProps[\"aria-label\"] ?? name}\n aria-disabled={isPending || anchorProps[\"aria-disabled\"]}\n aria-describedby={describedBy || undefined}\n className={[\n \"ds-asset-card__hit ds-asset-tile__hit ds-asset-card__link ds-asset-tile__link\",\n className,\n ]\n .filter(Boolean)\n .join(\" \")}\n />\n {isSelected ? (\n <span\n id={selectedId}\n hidden\n >\n Selected\n </span>\n ) : null}\n </>\n );\n}\n\nfunction ThumbnailAction({ linkProps, onSelect, ...props }: ThumbnailActionProps) {\n const { name, isPending, isSelected } = props;\n useLinkAndSelectWarning(Boolean(linkProps && onSelect));\n if (linkProps) {\n return (\n <ThumbnailLink\n {...props}\n linkProps={linkProps}\n />\n );\n }\n return onSelect ? (\n <Button\n variant=\"simple\"\n className=\"ds-asset-card__hit ds-asset-tile__hit\"\n aria-pressed={isSelected}\n aria-label={name}\n isDisabled={isPending}\n onClick={onSelect}\n />\n ) : null;\n}\n\n/** Shared presentation for assets, source files, and crop variants. */\nexport const AssetCard = forwardRef<HTMLDivElement, AssetCardProps>(function AssetCard(\n {\n name,\n src,\n alt = \"\",\n icon = \"image\",\n fit = \"cover\",\n meta,\n description,\n isSelected = false,\n isPending = false,\n onSelect,\n linkProps,\n actions,\n footer,\n className,\n ...rest\n },\n ref,\n) {\n return (\n <div\n ref={ref}\n className={[\"ds-asset-card\", \"ds-asset-tile\", className].filter(Boolean).join(\" \")}\n data-fit={fit}\n data-selected={isSelected || undefined}\n data-pending={isPending || undefined}\n {...rest}\n >\n <div className=\"ds-asset-card__thumb ds-asset-tile__thumb\">\n {src ? (\n <AssetImage\n key={src}\n src={src}\n alt={alt}\n />\n ) : (\n <Placeholder icon={icon} />\n )}\n {isPending && (\n <span\n className=\"ds-asset-card__pending ds-asset-tile__pending\"\n role=\"status\"\n >\n <Icon\n name=\"spinner\"\n size={20}\n className=\"ds-asset-card__spinner ds-asset-tile__spinner ds-icon--spin\"\n />\n <span className=\"ds-asset-card__pending-label ds-asset-tile__pending-label\">\n Uploading\n </span>\n </span>\n )}\n {/* Slots render only for truthy content, so `count && …` never leaves a stray 0. */}\n {actions ? (\n <div className=\"ds-asset-card__actions ds-asset-tile__actions\">{actions}</div>\n ) : null}\n <ThumbnailAction\n name={name}\n linkProps={linkProps}\n onSelect={onSelect}\n isPending={isPending}\n isSelected={isSelected}\n />\n </div>\n <div className=\"ds-asset-card__text ds-asset-tile__text\">\n <span className=\"ds-asset-card__name ds-asset-tile__name\">{name}</span>\n {meta ? <div className=\"ds-asset-card__meta ds-asset-tile__meta\">{meta}</div> : null}\n {description ? <div className=\"ds-asset-card__description\">{description}</div> : null}\n </div>\n {footer ? <div className=\"ds-asset-card__footer\">{footer}</div> : null}\n </div>\n );\n});\n\nexport interface AssetCardSkeletonProps {\n /** Position in the collection, used for the skeleton stagger. */\n index?: number;\n /** Reserve the description line, for cards that pass `description`. */\n description?: boolean;\n /** Reserve a footer row the height of a small Button, for cards that pass `footer`. */\n footer?: boolean;\n}\n\n/** A loading card. Match its slots to the real cards so nothing moves when they arrive. */\nexport function AssetCardSkeleton({\n index = 0,\n description = false,\n footer = false,\n}: AssetCardSkeletonProps) {\n const delay = { animationDelay: `calc(var(--skeleton-stagger) * ${index})` };\n return (\n <div\n className=\"ds-asset-card ds-asset-tile\"\n data-loading=\"true\"\n aria-hidden=\"true\"\n >\n <Skeleton\n shape=\"block\"\n className=\"ds-asset-card__thumb ds-asset-tile__thumb\"\n style={delay}\n />\n <div className=\"ds-asset-card__text ds-asset-tile__text\">\n <Skeleton\n shape=\"text\"\n width=\"80%\"\n style={delay}\n />\n <Skeleton\n shape=\"text\"\n width=\"45%\"\n style={delay}\n />\n {description && (\n <Skeleton\n shape=\"text\"\n width=\"65%\"\n style={delay}\n />\n )}\n </div>\n {footer && (\n <div className=\"ds-asset-card__footer\">\n <Skeleton\n shape=\"block\"\n width=\"45%\"\n style={{ ...delay, blockSize: \"var(--field-height-sm)\" }}\n />\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAoDA,SAASG,EAAY,EAAE,SAAM,YAA6C;CACxE,OACE,kBAAC,QAAD;EAAM,WAAU;EACd,UAAA,k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D;IAAK,WAAU;IAAf,UAAA;KACE,kBAACjC,GAAD;MACE,OAAM;MACN,OAAM;MACN,OAAOiC;KACR,CAAA;KACD,kBAACjC,GAAD;MACE,OAAM;MACN,OAAM;MACN,OAAOiC;KACR,CAAA;KACAH,KACC,kBAAC9B,GAAD;MACE,OAAM;MACN,OAAM;MACN,OAAOiC;KACR,CAAA;IAEA;;GACJF,KACC,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC/B,GAAD;KACE,OAAM;KACN,OAAM;KACN,OAAO;MAAE,GAAGiC;MAAO,WAAW;KAAyB;IACxD,CAAA;GACE,CAAA;EAEJ;;AAET"}
1
+ {"version":3,"file":"index.js","names":["_Fragment","Icon","Fragment$1","Placeholder","icon","label","AssetImage","status","setStatus","useState","ratio","setRatio","adopt","useCallback","image","imageRef","alt","Skeleton","event","isHandler","key","warnedLinkAndSelect","useLinkAndSelectWarning","isConflicting","ThumbnailLink","anchorProps","selectedId","useId","props","isPending","describedBy","isSelected","href","tabIndex","name","className","ThumbnailAction","linkProps","onSelect","Button","AssetCard","forwardRef","rest","fit","src","actions","meta","description","footer","AssetCardSkeleton","delay","index"],"sources":["../../../src/components/AssetCard/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useEffect,\n useId,\n useState,\n type AnchorHTMLAttributes,\n type CSSProperties,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport type { IconName } from \"../Icon/icons\";\nimport { Skeleton } from \"../Skeleton\";\nimport \"./style.css\";\n\nexport interface AssetCardProps extends Omit<HTMLAttributes<HTMLDivElement>, \"onSelect\" | \"title\"> {\n /** File name or crop label, displayed in full. */\n name: string;\n /** Thumbnail source. Omit to display the fallback icon. */\n src?: string;\n /** Alternative text for the preview; empty when the image is decorative. */\n alt?: string;\n /** Fallback for assets without a thumbnail, such as videos and PDFs. */\n icon?: IconName;\n /** Fill the frame, or show the complete image on an inset preview stage. */\n fit?: \"cover\" | \"contain\";\n /** Dimensions, size, ratio, or other metadata below the name. */\n meta?: ReactNode;\n /** Supporting content below the metadata, such as a source file name. */\n description?: ReactNode;\n /** Paint the selection fill and rail without changing the card's size. */\n isSelected?: boolean;\n /** Show an uploading overlay and disable the thumbnail action. */\n isPending?: boolean;\n /** Makes the thumbnail a selection toggle, independent of overlay and footer controls. */\n onSelect?: () => void;\n /**\n * Makes the thumbnail a link, independent of overlay and footer controls.\n * Replaces `onSelect`, which is then never called (development builds warn);\n * put selection on an `actions` control instead. While `isPending`, the link\n * has no `href`, is `aria-disabled`, leaves the tab order, and drops every\n * `on*` handler.\n */\n linkProps?: Omit<AnchorHTMLAttributes<HTMLAnchorElement>, \"children\"> & { href: string };\n /** Badges, buttons, or menus pinned across the top of the thumbnail. */\n actions?: ReactNode;\n /** Actions or content below the card's text. */\n footer?: ReactNode;\n}\n\nfunction Placeholder({ icon, label }: { icon: IconName; label?: string }) {\n return (\n <span className=\"ds-asset-card__placeholder\">\n <Icon\n name={icon}\n size={24}\n aria-label={label}\n />\n </span>\n );\n}\n\n/** Remount for each source so failed and loaded states cannot leak to another image. */\nfunction AssetImage({ src, alt }: { src: string; alt: string }) {\n const [status, setStatus] = useState<\"loading\" | \"loaded\" | \"failed\">(\"loading\");\n // The picture's own shape lets a contained preview fill the stage exactly.\n const [ratio, setRatio] = useState<number>();\n const adopt = useCallback((image: HTMLImageElement) => {\n setStatus(\"loaded\");\n if (image.naturalWidth && image.naturalHeight) {\n setRatio(image.naturalWidth / image.naturalHeight);\n }\n }, []);\n // A cached image can finish before onLoad is attached. Only success is read\n // here: an SVG without intrinsic size and a deferred lazy image also report\n // a zero naturalWidth, so failure is left to the error event.\n const imageRef = useCallback(\n (image: HTMLImageElement | null) => {\n if (!image?.complete) {\n return;\n }\n if (image.naturalWidth > 0) {\n adopt(image);\n } else {\n image.decode().then(\n () => adopt(image),\n () => {},\n );\n }\n },\n [adopt],\n );\n\n if (status === \"failed\") {\n return (\n <Placeholder\n icon=\"alert-triangle\"\n label={alt ? `${alt} (preview unavailable)` : \"Preview unavailable\"}\n />\n );\n }\n\n return (\n <>\n {status === \"loading\" && (\n <Skeleton\n shape=\"block\"\n className=\"ds-asset-card__thumb-skeleton\"\n />\n )}\n <img\n ref={imageRef}\n src={src}\n alt={alt}\n loading=\"lazy\"\n data-loaded={status === \"loaded\" || undefined}\n style={ratio ? ({ \"--asset-ratio\": ratio } as CSSProperties) : undefined}\n onLoad={(event) => adopt(event.currentTarget)}\n onError={() => setStatus(\"failed\")}\n />\n </>\n );\n}\n\ntype ThumbnailActionProps = Pick<\n AssetCardProps,\n \"name\" | \"linkProps\" | \"onSelect\" | \"isPending\" | \"isSelected\"\n>;\n\n/** Event handler props, such as `onClick`, `onPointerDown` or a router's `onMouseEnter`. */\nconst isHandler = (key: string) => /^on[A-Z]/.test(key);\n\nlet warnedLinkAndSelect = false;\n\n/** Development-only: `onSelect` is unreachable once the thumbnail is a link. */\nfunction useLinkAndSelectWarning(isConflicting: boolean) {\n useEffect(() => {\n if (isConflicting && !warnedLinkAndSelect && process.env.NODE_ENV !== \"production\") {\n warnedLinkAndSelect = true;\n console.warn(\n \"AssetCard: `linkProps` replaces `onSelect`, so the thumbnail navigates and `onSelect` \" +\n \"is never called. Pass one of them, and put selection on an `actions` control.\",\n );\n }\n }, [isConflicting]);\n}\n\n/**\n * A link has no pressed state, so selection is its description. While pending\n * it matches a disabled Button: no `href`, no tab stop, and no handlers, with\n * an explicit role so its name and disabled state still reach assistive tech.\n */\nfunction ThumbnailLink({\n name,\n linkProps: { href, tabIndex, className, ...anchorProps },\n isPending,\n isSelected,\n}: Omit<ThumbnailActionProps, \"linkProps\" | \"onSelect\"> & {\n linkProps: NonNullable<AssetCardProps[\"linkProps\"]>;\n}) {\n const selectedId = useId();\n const props = isPending\n ? Object.fromEntries(Object.entries(anchorProps).filter(([key]) => !isHandler(key)))\n : anchorProps;\n const describedBy = [anchorProps[\"aria-describedby\"], isSelected && selectedId]\n .filter(Boolean)\n .join(\" \");\n return (\n <>\n <a\n {...props}\n href={isPending ? undefined : href}\n tabIndex={isPending ? undefined : tabIndex}\n role={isPending ? \"link\" : anchorProps.role}\n aria-label={anchorProps[\"aria-label\"] ?? name}\n aria-disabled={isPending || anchorProps[\"aria-disabled\"]}\n aria-describedby={describedBy || undefined}\n className={[\"ds-asset-card__hit ds-asset-card__link\", className].filter(Boolean).join(\" \")}\n />\n {isSelected ? (\n <span\n id={selectedId}\n hidden\n >\n Selected\n </span>\n ) : null}\n </>\n );\n}\n\nfunction ThumbnailAction({ linkProps, onSelect, ...props }: ThumbnailActionProps) {\n const { name, isPending, isSelected } = props;\n useLinkAndSelectWarning(Boolean(linkProps && onSelect));\n if (linkProps) {\n return (\n <ThumbnailLink\n {...props}\n linkProps={linkProps}\n />\n );\n }\n return onSelect ? (\n <Button\n variant=\"simple\"\n className=\"ds-asset-card__hit\"\n aria-pressed={isSelected}\n aria-label={name}\n isDisabled={isPending}\n onClick={onSelect}\n />\n ) : null;\n}\n\n/** Shared presentation for assets, source files, and crop variants. */\nexport const AssetCard = forwardRef<HTMLDivElement, AssetCardProps>(function AssetCard(\n {\n name,\n src,\n alt = \"\",\n icon = \"image\",\n fit = \"cover\",\n meta,\n description,\n isSelected = false,\n isPending = false,\n onSelect,\n linkProps,\n actions,\n footer,\n className,\n ...rest\n },\n ref,\n) {\n return (\n <div\n ref={ref}\n className={[\"ds-asset-card\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n data-fit={fit}\n data-selected={isSelected || undefined}\n data-pending={isPending || undefined}\n {...rest}\n >\n <div className=\"ds-asset-card__thumb\">\n {src ? (\n <AssetImage\n key={src}\n src={src}\n alt={alt}\n />\n ) : (\n <Placeholder icon={icon} />\n )}\n {isPending && (\n <span\n className=\"ds-asset-card__pending\"\n role=\"status\"\n >\n <Icon\n name=\"spinner\"\n size={20}\n className=\"ds-asset-card__spinner ds-icon--spin\"\n />\n <span className=\"ds-asset-card__pending-label\">Uploading</span>\n </span>\n )}\n {/* Slots render only for truthy content, so `count && …` never leaves a stray 0. */}\n {actions ? <div className=\"ds-asset-card__actions\">{actions}</div> : null}\n <ThumbnailAction\n name={name}\n linkProps={linkProps}\n onSelect={onSelect}\n isPending={isPending}\n isSelected={isSelected}\n />\n </div>\n <div className=\"ds-asset-card__text\">\n <span className=\"ds-asset-card__name\">{name}</span>\n {meta ? <div className=\"ds-asset-card__meta\">{meta}</div> : null}\n {description ? <div className=\"ds-asset-card__description\">{description}</div> : null}\n </div>\n {footer ? <div className=\"ds-asset-card__footer\">{footer}</div> : null}\n </div>\n );\n});\n\nexport interface AssetCardSkeletonProps {\n /** Position in the collection, used for the skeleton stagger. */\n index?: number;\n /** Reserve the description line, for cards that pass `description`. */\n description?: boolean;\n /** Reserve a footer row the height of a small Button, for cards that pass `footer`. */\n footer?: boolean;\n}\n\n/** A loading card. Match its slots to the real cards so nothing moves when they arrive. */\nexport function AssetCardSkeleton({\n index = 0,\n description = false,\n footer = false,\n}: AssetCardSkeletonProps) {\n const delay = { animationDelay: `calc(var(--skeleton-stagger) * ${index})` };\n return (\n <div\n className=\"ds-asset-card ds-field-surface\"\n data-loading=\"true\"\n aria-hidden=\"true\"\n >\n <Skeleton\n shape=\"block\"\n className=\"ds-asset-card__thumb\"\n style={delay}\n />\n <div className=\"ds-asset-card__text\">\n <Skeleton\n shape=\"text\"\n width=\"80%\"\n style={delay}\n />\n <Skeleton\n shape=\"text\"\n width=\"45%\"\n style={delay}\n />\n {description && (\n <Skeleton\n shape=\"text\"\n width=\"65%\"\n style={delay}\n />\n )}\n </div>\n {footer && (\n <div className=\"ds-asset-card__footer\">\n <Skeleton\n shape=\"block\"\n width=\"45%\"\n style={{ ...delay, blockSize: \"var(--field-height-sm)\" }}\n />\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;AAoDA,SAASG,EAAY,EAAE,SAAM,YAA6C;CACxE,OACE,kBAAC,QAAD;EAAM,WAAU;EACd,UAAA,kBAACF,GAAD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;IAAK,WAAU;IAAf,UAAA;KACE,kBAACjC,GAAD;MACE,OAAM;MACN,OAAM;MACN,OAAOiC;KACR,CAAA;KACD,kBAACjC,GAAD;MACE,OAAM;MACN,OAAM;MACN,OAAOiC;KACR,CAAA;KACAH,KACC,kBAAC9B,GAAD;MACE,OAAM;MACN,OAAM;MACN,OAAOiC;KACR,CAAA;IAEA;;GACJF,KACC,kBAAC,OAAD;IAAK,WAAU;IACb,UAAA,kBAAC/B,GAAD;KACE,OAAM;KACN,OAAM;KACN,OAAO;MAAE,GAAGiC;MAAO,WAAW;KAAyB;IACxD,CAAA;GACE,CAAA;EAEJ;;AAET"}
@@ -1,39 +1,48 @@
1
1
  @layer components {
2
- /* Rules that predate AssetCard also match the AssetTile class hooks, so
3
- * hand-written tile markup keeps its styling. */
4
- :is(.ds-asset-card, .ds-asset-tile) {
2
+ .ds-asset-card {
5
3
  position: relative;
6
4
  min-inline-size: 0;
7
5
  display: flex;
8
6
  flex-direction: column;
9
7
  gap: var(--space-3);
10
8
  padding: var(--space-3);
11
- background: var(--color-surface);
12
- border: var(--control-border-width) solid var(--control-border-color);
9
+ background: var(--field-bg);
10
+ border: 0;
13
11
  border-radius: var(--radius-md);
14
12
 
15
13
  /* The rail exists on every tile, so selecting one never shifts the grid. */
16
- box-shadow: inset var(--rail-width) 0 0 0 transparent;
14
+ box-shadow: inset calc(var(--rail-width) * var(--rail-direction)) 0 0 0 transparent;
17
15
  transition:
18
16
  background-color var(--duration-fast) var(--ease-standard),
19
17
  box-shadow var(--duration-fast) var(--ease-standard);
18
+
19
+ /* Surface on the canvas, the alternate row fill in TableFrame, Modal
20
+ * and Drawer, so an unselected tile keeps its shape in every host. */
21
+ --field-bg: var(--fill-card);
22
+
23
+ padding-inline-start: calc(var(--space-3) + var(--rail-width));
20
24
  }
21
25
 
22
26
  /* Loading placeholders are not interactive, so they never take the hover fill. */
23
- :is(.ds-asset-card, .ds-asset-tile):hover:not([data-pending], [data-loading]) {
27
+ .ds-asset-card:hover:not([data-pending], [data-loading]) {
28
+ --field-paint: var(--field-hover);
29
+
24
30
  background: var(--field-hover);
25
31
  }
26
32
 
27
- :is(.ds-asset-card, .ds-asset-tile)[data-selected] {
28
- background: var(--color-primary-soft);
29
- box-shadow: inset var(--rail-width) 0 0 0 var(--rail-color);
33
+ .ds-asset-card[data-selected] {
34
+ background: var(--field-bg);
35
+ box-shadow: inset calc(var(--rail-width) * var(--rail-direction)) 0 0 0 var(--rail-color);
36
+
37
+ --field-bg: var(--color-primary-soft);
38
+ --button-active-bg: var(--color-primary-soft-pressed);
30
39
  }
31
40
 
32
- :is(.ds-asset-card, .ds-asset-tile)[data-pending] {
41
+ .ds-asset-card[data-pending] {
33
42
  opacity: 0.7;
34
43
  }
35
44
 
36
- :is(.ds-asset-card__thumb, .ds-asset-tile__thumb) {
45
+ .ds-asset-card__thumb {
37
46
  position: relative;
38
47
  aspect-ratio: var(--asset-thumb-aspect);
39
48
  overflow: hidden;
@@ -45,26 +54,21 @@
45
54
 
46
55
  /* A loading card's thumbnail is a block Skeleton; keep the frame's shape
47
56
  * rather than the Skeleton's fixed block height. */
48
- :is(.ds-asset-card, .ds-asset-tile)
49
- > :is(.ds-asset-card__thumb, .ds-asset-tile__thumb).ds-skeleton {
57
+ .ds-asset-card > .ds-asset-card__thumb.ds-skeleton {
50
58
  block-size: auto;
51
59
  }
52
60
 
53
61
  /* Placeholder lines fill the line boxes of the text they stand in for. */
54
- :is(.ds-asset-card, .ds-asset-tile)[data-loading]
55
- :is(.ds-asset-card__text, .ds-asset-tile__text)
56
- > .ds-skeleton {
62
+ .ds-asset-card[data-loading] .ds-asset-card__text > .ds-skeleton {
57
63
  block-size: calc(var(--font-size-xs) * var(--line-height-body));
58
64
  }
59
65
 
60
- :is(.ds-asset-card, .ds-asset-tile)[data-loading]
61
- :is(.ds-asset-card__text, .ds-asset-tile__text)
62
- > .ds-skeleton:first-child {
66
+ .ds-asset-card[data-loading] .ds-asset-card__text > .ds-skeleton:first-child {
63
67
  block-size: calc(var(--font-size-sm) * var(--line-height-body));
64
68
  }
65
69
 
66
70
  /* Direct children only, so images inside overlay actions keep their own styling. */
67
- :is(.ds-asset-card__thumb, .ds-asset-tile__thumb) > img {
71
+ .ds-asset-card__thumb > img {
68
72
  position: absolute;
69
73
  inset: 0;
70
74
  inline-size: 100%;
@@ -74,24 +78,24 @@
74
78
  transition: opacity var(--duration-base) var(--ease-standard);
75
79
  }
76
80
 
77
- :is(.ds-asset-card__thumb, .ds-asset-tile__thumb) > img[data-loaded] {
81
+ .ds-asset-card__thumb > img[data-loaded] {
78
82
  opacity: 1;
79
83
  }
80
84
 
81
- :is(.ds-asset-card__thumb-skeleton, .ds-asset-tile__thumb-skeleton) {
85
+ .ds-asset-card__thumb-skeleton {
82
86
  position: absolute;
83
87
  inset: 0;
84
88
  block-size: 100%;
85
89
  border-radius: 0;
86
90
  }
87
91
 
88
- :is(.ds-asset-card__placeholder, .ds-asset-tile__placeholder) {
92
+ .ds-asset-card__placeholder {
89
93
  display: grid;
90
94
  place-content: center;
91
95
  color: var(--color-text-muted);
92
96
  }
93
97
 
94
- :is(.ds-asset-card__pending, .ds-asset-tile__pending) {
98
+ .ds-asset-card__pending {
95
99
  position: absolute;
96
100
  inset: 0;
97
101
  display: flex;
@@ -105,7 +109,7 @@
105
109
  font-weight: var(--font-weight-bold);
106
110
  }
107
111
 
108
- :is(.ds-asset-card__actions, .ds-asset-tile__actions) {
112
+ .ds-asset-card__actions {
109
113
  position: absolute;
110
114
  inset-block-start: var(--space-2);
111
115
  inset-inline: var(--space-2);
@@ -117,63 +121,62 @@
117
121
  pointer-events: none;
118
122
  }
119
123
 
120
- :is(.ds-asset-card__actions, .ds-asset-tile__actions) > * {
124
+ .ds-asset-card__actions > * {
121
125
  pointer-events: auto;
122
126
  }
123
127
 
124
128
  /* The whole thumbnail is the selection or link target; the name stays
125
129
  * readable text underneath rather than being swallowed by the control. */
126
- :is(.ds-asset-card, .ds-asset-tile) :is(.ds-asset-card__hit, .ds-asset-tile__hit) {
130
+ .ds-asset-card .ds-asset-card__hit {
127
131
  position: absolute;
128
132
  inset: 0;
129
133
  }
130
134
 
131
- :is(.ds-asset-card, .ds-asset-tile) :is(.ds-asset-card__hit, .ds-asset-tile__hit):focus-visible {
135
+ .ds-asset-card .ds-asset-card__hit:focus-visible {
132
136
  outline-offset: -2px;
133
137
  }
134
138
 
135
139
  /* Button sizes and pads itself; the hit area spans the frame instead. */
136
- :is(.ds-asset-card, .ds-asset-tile) :is(.ds-asset-card__hit, .ds-asset-tile__hit).ds-button {
140
+ .ds-asset-card .ds-asset-card__hit.ds-button {
137
141
  inline-size: 100%;
138
142
  height: 100%;
139
143
  padding: 0;
140
144
  }
141
145
 
142
146
  /* The link takes Button's focus ring and disabled cursor, not its fills. */
143
- :is(.ds-asset-card__link, .ds-asset-tile__link) {
147
+ .ds-asset-card__link {
144
148
  border-radius: inherit;
145
149
  }
146
150
 
147
- :is(.ds-asset-card__link, .ds-asset-tile__link):focus-visible {
148
- outline: var(--control-border-width) solid var(--color-focus);
151
+ .ds-asset-card__link:focus-visible {
152
+ outline: var(--focus-width) solid var(--color-focus);
149
153
  }
150
154
 
151
- :is(.ds-asset-card__link, .ds-asset-tile__link)[aria-disabled="true"] {
155
+ .ds-asset-card__link[aria-disabled="true"] {
152
156
  cursor: not-allowed;
153
157
  }
154
158
 
155
159
  /* Selection reads on the tile, so Button's hover and pressed fills never
156
160
  * paint over the thumbnail. */
157
- :is(.ds-asset-card, .ds-asset-tile)
158
- :is(.ds-asset-card__hit, .ds-asset-tile__hit).ds-button:is(:hover, :active):not(:disabled) {
161
+ .ds-asset-card .ds-asset-card__hit.ds-button:is(:hover, :active):not(:disabled) {
159
162
  background: transparent;
160
163
  }
161
164
 
162
- :is(.ds-asset-card__text, .ds-asset-tile__text) {
165
+ .ds-asset-card__text {
163
166
  display: flex;
164
167
  flex-direction: column;
165
168
  gap: var(--space-1);
166
169
  min-inline-size: 0;
167
170
  }
168
171
 
169
- :is(.ds-asset-card__name, .ds-asset-tile__name) {
172
+ .ds-asset-card__name {
170
173
  font-size: var(--font-size-sm);
171
174
  font-weight: var(--font-weight-bold);
172
175
  line-height: var(--line-height-body);
173
176
  overflow-wrap: anywhere;
174
177
  }
175
178
 
176
- :is(.ds-asset-card__meta, .ds-asset-tile__meta) {
179
+ .ds-asset-card__meta {
177
180
  font-family: var(--font-mono);
178
181
  font-size: var(--font-size-xs);
179
182
  line-height: var(--line-height-body);
@@ -207,25 +210,23 @@
207
210
  * largest size that fits inside the inset stage, scaling small renditions up.
208
211
  * Equal logical insets with auto margins centre it in either direction. */
209
212
  .ds-asset-card[data-fit="contain"] .ds-asset-card__thumb > img {
210
- /* Sizing the content box lets the outline wrap the picture without a sliver. */
211
- box-sizing: content-box;
212
213
  inset: var(--space-3);
213
214
  margin: auto;
214
215
  inline-size: min(
215
- 100% - 2 * (var(--space-3) + var(--control-border-width)),
216
- (100% / (var(--asset-thumb-aspect)) - 2 * (var(--space-3) + var(--control-border-width))) *
216
+ 100% - 2 * var(--space-3),
217
+ (100% / (var(--asset-thumb-aspect)) - 2 * var(--space-3)) *
217
218
  (var(--asset-ratio, var(--asset-thumb-aspect)))
218
219
  );
219
220
  block-size: auto;
220
221
  aspect-ratio: var(--asset-ratio, var(--asset-thumb-aspect));
221
222
  object-fit: contain;
222
- border: var(--control-border-width) solid var(--color-text);
223
+ border: 0;
223
224
  box-shadow: var(--shadow-md);
224
225
  }
225
226
 
226
227
  @media (prefers-reduced-motion: reduce) {
227
- :is(.ds-asset-card, .ds-asset-tile),
228
- :is(.ds-asset-card__thumb, .ds-asset-tile__thumb) > img {
228
+ .ds-asset-card,
229
+ .ds-asset-card__thumb > img {
229
230
  transition: none;
230
231
  }
231
232
  }
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-CD3oeiNA.cjs"),t=require("../Grid/index.cjs"),n=require("../AssetCard/index.cjs");let r=require("react"),i=require("react/jsx-runtime");function a(...e){return e.filter(Boolean).join(` `)}var o=(0,r.forwardRef)(function({isLoading:e=!1,loadingCount:r=8,loadingCard:o,className:s,children:c,...l},u){return(0,i.jsx)(t.Grid,{ref:u,columns:`auto`,gap:`md`,minColumnWidth:`var(--asset-tile-min-width)`,className:a(`ds-asset-grid`,s),"aria-busy":e||void 0,...l,children:e?Array.from({length:r},(e,t)=>(0,i.jsx)(n.AssetCardSkeleton,{...o,index:t},t)):c})});function s({title:t,description:n,action:r}){return(0,i.jsxs)(`div`,{className:`ds-asset-empty`,children:[(0,i.jsx)(e.t,{name:`image`,size:24}),(0,i.jsx)(`span`,{className:`ds-asset-empty__title`,children:t}),n&&(0,i.jsx)(`span`,{className:`ds-asset-empty__description`,children:n}),r]})}exports.AssetGrid=o,exports.AssetGridEmpty=s,exports.AssetTile=n.AssetCard,exports.AssetTileSkeleton=n.AssetCardSkeleton;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Icon-CD3oeiNA.cjs"),t=require("../Grid/index.cjs"),n=require("../AssetCard/index.cjs");let r=require("react"),i=require("react/jsx-runtime");function a(...e){return e.filter(Boolean).join(` `)}var o=(0,r.forwardRef)(function({isLoading:e=!1,loadingCount:r=8,loadingCard:o,className:s,children:c,...l},u){return(0,i.jsx)(t.Grid,{ref:u,columns:`auto`,gap:`md`,minColumnWidth:`var(--asset-tile-min-width)`,className:a(`ds-asset-grid`,s),"aria-busy":e||void 0,...l,children:e?Array.from({length:r},(e,t)=>(0,i.jsx)(n.AssetCardSkeleton,{...o,index:t},t)):c})});function s({title:t,description:n,action:r}){return(0,i.jsxs)(`div`,{className:`ds-asset-empty`,children:[(0,i.jsx)(e.t,{name:`image`,size:24}),(0,i.jsx)(`span`,{className:`ds-asset-empty__title`,children:t}),n&&(0,i.jsx)(`span`,{className:`ds-asset-empty__description`,children:n}),r]})}exports.AssetGrid=o,exports.AssetGridEmpty=s;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["forwardRef","Grid","AssetCardSkeleton","Icon","require_Icon","require_components_Grid_index","require_components_AssetCard_index","react","react_jsx_runtime","cx","parts","AssetGrid","rest","className","isLoading","loadingCount","loadingCard","i","children","AssetGridEmpty","title","description","action"],"sources":["../../../src/components/AssetGrid/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Grid } from \"../Grid\";\nimport { Icon } from \"../Icon\";\nimport { AssetCardSkeleton, type AssetCardSkeletonProps } from \"../AssetCard\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Renders placeholder tiles instead of children. The grid keeps its\n * geometry, so nothing moves when the real assets arrive.\n */\n isLoading?: boolean;\n /** How many placeholder tiles to show while loading. */\n loadingCount?: number;\n /** Slots each placeholder reserves; match the cards that replace them. */\n loadingCard?: Omit<AssetCardSkeletonProps, \"index\">;\n children?: ReactNode;\n}\n\n/**\n * The media library surface: an auto-filling grid of asset tiles. Sits inside\n * a `TableFrame` when it is the page's collection, bare inside a drawer.\n */\nexport const AssetGrid = forwardRef<HTMLDivElement, AssetGridProps>(function AssetGrid(\n { isLoading = false, loadingCount = 8, loadingCard, className, children, ...rest },\n ref,\n) {\n return (\n <Grid\n ref={ref}\n columns=\"auto\"\n gap=\"md\"\n minColumnWidth=\"var(--asset-tile-min-width)\"\n className={cx(\"ds-asset-grid\", className)}\n aria-busy={isLoading || undefined}\n {...rest}\n >\n {isLoading\n ? Array.from({ length: loadingCount }, (_, i) => (\n <AssetCardSkeleton\n key={i}\n {...loadingCard}\n index={i}\n />\n ))\n : children}\n </Grid>\n );\n});\n\n// Existing entry points remain aliases to the shared card implementation.\nexport { AssetCard as AssetTile, AssetCardSkeleton as AssetTileSkeleton } from \"../AssetCard\";\nexport type {\n AssetCardProps as AssetTileProps,\n AssetCardSkeletonProps as AssetTileSkeletonProps,\n} from \"../AssetCard\";\n\nexport interface AssetGridEmptyProps {\n title: string;\n description?: ReactNode;\n action?: ReactNode;\n}\n\n/** Nothing in the library yet — one action, the one that fills it. */\nexport function AssetGridEmpty({ title, description, action }: AssetGridEmptyProps) {\n return (\n <div className=\"ds-asset-empty\">\n <Icon\n name=\"image\"\n size={24}\n />\n <span className=\"ds-asset-empty__title\">{title}</span>\n {description && <span className=\"ds-asset-empty__description\">{description}</span>}\n {action}\n </div>\n );\n}\n"],"mappings":"A,8OAMA,SAASS,EAAG,GAAGC,EAAuC,CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,CACvC,CAmBA,IAAaC,GAAA,EAAYX,EAAAA,WAAAA,CAA2C,SAClE,CAAE,YAAY,GAAO,eAAe,EAAG,cAAa,YAAW,WAAU,GAAGY,GAC5E,EACA,CACA,OACE,EAAAJ,EAAA,IAAA,CAACP,EAAAA,KAAD,CACO,MACL,QAAQ,OACR,IAAI,KACJ,eAAe,8BACf,UAAWQ,EAAG,gBAAiBI,CAAS,EACxC,YAAWC,GAAa,IAAA,GACxB,GAAIF,EAEH,SAAAE,EACG,MAAM,KAAK,CAAE,OAAQC,CAAa,GAAI,EAAG,KACvC,EAAAP,EAAA,IAAA,CAACN,EAAAA,kBAAD,CAEE,GAAIc,EACJ,MAAOC,CACR,EAHMA,CAGN,CACF,EACDC,CACA,CAAA,CAEV,CAAC,EAgBD,SAAgBC,EAAe,CAAE,QAAO,cAAa,UAA+B,CAClF,OACE,EAAAX,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,iBAAf,SAAA,EACE,EAAAA,EAAA,IAAA,CAACL,EAAAA,EAAD,CACE,KAAK,QACL,KAAM,EACP,CAAA,GACD,EAAAK,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,wBAAyB,SAAAY,CAAY,CAAA,EACpDC,IAAe,EAAAb,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,8BAA+B,SAAAa,CAAkB,CAAA,EAChFC,CACE,C,EAET,C"}
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","Grid","AssetCardSkeleton","Icon","require_Icon","require_components_Grid_index","require_components_AssetCard_index","react","react_jsx_runtime","cx","parts","AssetGrid","rest","className","isLoading","loadingCount","loadingCard","i","children","AssetGridEmpty","title","description","action"],"sources":["../../../src/components/AssetGrid/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Grid } from \"../Grid\";\nimport { Icon } from \"../Icon\";\nimport { AssetCardSkeleton, type AssetCardSkeletonProps } from \"../AssetCard\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Renders placeholder tiles instead of children. The grid keeps its\n * geometry, so nothing moves when the real assets arrive.\n */\n isLoading?: boolean;\n /** How many placeholder tiles to show while loading. */\n loadingCount?: number;\n /** Slots each placeholder reserves; match the cards that replace them. */\n loadingCard?: Omit<AssetCardSkeletonProps, \"index\">;\n children?: ReactNode;\n}\n\n/**\n * The media library surface: an auto-filling grid of asset tiles. Sits inside\n * a `TableFrame` when it is the page's collection, bare inside a drawer.\n */\nexport const AssetGrid = forwardRef<HTMLDivElement, AssetGridProps>(function AssetGrid(\n { isLoading = false, loadingCount = 8, loadingCard, className, children, ...rest },\n ref,\n) {\n return (\n <Grid\n ref={ref}\n columns=\"auto\"\n gap=\"md\"\n minColumnWidth=\"var(--asset-tile-min-width)\"\n className={cx(\"ds-asset-grid\", className)}\n aria-busy={isLoading || undefined}\n {...rest}\n >\n {isLoading\n ? Array.from({ length: loadingCount }, (_, i) => (\n <AssetCardSkeleton\n key={i}\n {...loadingCard}\n index={i}\n />\n ))\n : children}\n </Grid>\n );\n});\n\nexport interface AssetGridEmptyProps {\n title: string;\n description?: ReactNode;\n action?: ReactNode;\n}\n\n/** Nothing in the library yet — one action, the one that fills it. */\nexport function AssetGridEmpty({ title, description, action }: AssetGridEmptyProps) {\n return (\n <div className=\"ds-asset-empty\">\n <Icon\n name=\"image\"\n size={24}\n />\n <span className=\"ds-asset-empty__title\">{title}</span>\n {description && <span className=\"ds-asset-empty__description\">{description}</span>}\n {action}\n </div>\n );\n}\n"],"mappings":"A,8OAMA,SAASS,EAAG,GAAGC,EAAuC,CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,CACvC,CAmBA,IAAaC,GAAA,EAAYX,EAAAA,WAAAA,CAA2C,SAClE,CAAE,YAAY,GAAO,eAAe,EAAG,cAAa,YAAW,WAAU,GAAGY,GAC5E,EACA,CACA,OACE,EAAAJ,EAAA,IAAA,CAACP,EAAAA,KAAD,CACO,MACL,QAAQ,OACR,IAAI,KACJ,eAAe,8BACf,UAAWQ,EAAG,gBAAiBI,CAAS,EACxC,YAAWC,GAAa,IAAA,GACxB,GAAIF,EAEH,SAAAE,EACG,MAAM,KAAK,CAAE,OAAQC,CAAa,GAAI,EAAG,KACvC,EAAAP,EAAA,IAAA,CAACN,EAAAA,kBAAD,CAEE,GAAIc,EACJ,MAAOC,CACR,EAHMA,CAGN,CACF,EACDC,CACA,CAAA,CAEV,CAAC,EASD,SAAgBC,EAAe,CAAE,QAAO,cAAa,UAA+B,CAClF,OACE,EAAAX,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,iBAAf,SAAA,EACE,EAAAA,EAAA,IAAA,CAACL,EAAAA,EAAD,CACE,KAAK,QACL,KAAM,EACP,CAAA,GACD,EAAAK,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,wBAAyB,SAAAY,CAAY,CAAA,EACpDC,IAAe,EAAAb,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,8BAA+B,SAAAa,CAAkB,CAAA,EAChFC,CACE,C,EAET,C"}
@@ -17,8 +17,6 @@ export interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {
17
17
  * a `TableFrame` when it is the page's collection, bare inside a drawer.
18
18
  */
19
19
  export declare const AssetGrid: import("react").ForwardRefExoticComponent<AssetGridProps & import("react").RefAttributes<HTMLDivElement>>;
20
- export { AssetCard as AssetTile, AssetCardSkeleton as AssetTileSkeleton } from "../AssetCard/index.cjs";
21
- export type { AssetCardProps as AssetTileProps, AssetCardSkeletonProps as AssetTileSkeletonProps, } from "../AssetCard/index.cjs";
22
20
  export interface AssetGridEmptyProps {
23
21
  title: string;
24
22
  description?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AssetGrid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,aAAa,CAAC;AAMrB,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,2GAyBpB,CAAC;AAGH,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC9F,YAAY,EACV,cAAc,IAAI,cAAc,EAChC,sBAAsB,IAAI,sBAAsB,GACjD,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BAYjF"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/AssetGrid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,aAAa,CAAC;AAMrB,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,2GAyBpB,CAAC;AAEH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BAYjF"}
@@ -17,8 +17,6 @@ export interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {
17
17
  * a `TableFrame` when it is the page's collection, bare inside a drawer.
18
18
  */
19
19
  export declare const AssetGrid: import("react").ForwardRefExoticComponent<AssetGridProps & import("react").RefAttributes<HTMLDivElement>>;
20
- export { AssetCard as AssetTile, AssetCardSkeleton as AssetTileSkeleton } from "../AssetCard/index.js";
21
- export type { AssetCardProps as AssetTileProps, AssetCardSkeletonProps as AssetTileSkeletonProps, } from "../AssetCard/index.js";
22
20
  export interface AssetGridEmptyProps {
23
21
  title: string;
24
22
  description?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AssetGrid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,aAAa,CAAC;AAMrB,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,2GAyBpB,CAAC;AAGH,OAAO,EAAE,SAAS,IAAI,SAAS,EAAE,iBAAiB,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC9F,YAAY,EACV,cAAc,IAAI,cAAc,EAChC,sBAAsB,IAAI,sBAAsB,GACjD,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BAYjF"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AssetGrid/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC9E,OAAO,aAAa,CAAC;AAMrB,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,cAAc,CAAC;IACpE;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,IAAI,CAAC,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,SAAS,2GAyBpB,CAAC;AAEH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,mBAAmB,+BAYjF"}
@@ -1,40 +1,40 @@
1
1
  import { t as e } from "../../chunks/Icon-CYXOo0Kt.js";
2
2
  import { Grid as t } from "../Grid/index.js";
3
- import { AssetCard as n, AssetCardSkeleton as r } from "../AssetCard/index.js";
4
- import { forwardRef as i } from "react";
5
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
3
+ import { AssetCardSkeleton as n } from "../AssetCard/index.js";
4
+ import { forwardRef as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
6
  //#region src/components/AssetGrid/index.tsx
7
- function s(...e) {
7
+ function o(...e) {
8
8
  return e.filter(Boolean).join(" ");
9
9
  }
10
- var c = i(function({ isLoading: e = !1, loadingCount: n = 8, loadingCard: i, className: o, children: c, ...l }, u) {
11
- return /* @__PURE__ */ a(t, {
10
+ var s = r(function({ isLoading: e = !1, loadingCount: r = 8, loadingCard: a, className: s, children: c, ...l }, u) {
11
+ return /* @__PURE__ */ i(t, {
12
12
  ref: u,
13
13
  columns: "auto",
14
14
  gap: "md",
15
15
  minColumnWidth: "var(--asset-tile-min-width)",
16
- className: s("ds-asset-grid", o),
16
+ className: o("ds-asset-grid", s),
17
17
  "aria-busy": e || void 0,
18
18
  ...l,
19
- children: e ? Array.from({ length: n }, (e, t) => /* @__PURE__ */ a(r, {
20
- ...i,
19
+ children: e ? Array.from({ length: r }, (e, t) => /* @__PURE__ */ i(n, {
20
+ ...a,
21
21
  index: t
22
22
  }, t)) : c
23
23
  });
24
24
  });
25
- function l({ title: t, description: n, action: r }) {
26
- return /* @__PURE__ */ o("div", {
25
+ function c({ title: t, description: n, action: r }) {
26
+ return /* @__PURE__ */ a("div", {
27
27
  className: "ds-asset-empty",
28
28
  children: [
29
- /* @__PURE__ */ a(e, {
29
+ /* @__PURE__ */ i(e, {
30
30
  name: "image",
31
31
  size: 24
32
32
  }),
33
- /* @__PURE__ */ a("span", {
33
+ /* @__PURE__ */ i("span", {
34
34
  className: "ds-asset-empty__title",
35
35
  children: t
36
36
  }),
37
- n && /* @__PURE__ */ a("span", {
37
+ n && /* @__PURE__ */ i("span", {
38
38
  className: "ds-asset-empty__description",
39
39
  children: n
40
40
  }),
@@ -43,6 +43,6 @@ function l({ title: t, description: n, action: r }) {
43
43
  });
44
44
  }
45
45
  //#endregion
46
- export { c as AssetGrid, l as AssetGridEmpty, n as AssetTile, r as AssetTileSkeleton };
46
+ export { s as AssetGrid, c as AssetGridEmpty };
47
47
 
48
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["Icon","cx","parts","AssetGrid","forwardRef","rest","Grid","className","isLoading","loadingCount","AssetCardSkeleton","loadingCard","i","children","AssetGridEmpty","title","description","action","AssetCard"],"sources":["../../../src/components/AssetGrid/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Grid } from \"../Grid\";\nimport { Icon } from \"../Icon\";\nimport { AssetCardSkeleton, type AssetCardSkeletonProps } from \"../AssetCard\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Renders placeholder tiles instead of children. The grid keeps its\n * geometry, so nothing moves when the real assets arrive.\n */\n isLoading?: boolean;\n /** How many placeholder tiles to show while loading. */\n loadingCount?: number;\n /** Slots each placeholder reserves; match the cards that replace them. */\n loadingCard?: Omit<AssetCardSkeletonProps, \"index\">;\n children?: ReactNode;\n}\n\n/**\n * The media library surface: an auto-filling grid of asset tiles. Sits inside\n * a `TableFrame` when it is the page's collection, bare inside a drawer.\n */\nexport const AssetGrid = forwardRef<HTMLDivElement, AssetGridProps>(function AssetGrid(\n { isLoading = false, loadingCount = 8, loadingCard, className, children, ...rest },\n ref,\n) {\n return (\n <Grid\n ref={ref}\n columns=\"auto\"\n gap=\"md\"\n minColumnWidth=\"var(--asset-tile-min-width)\"\n className={cx(\"ds-asset-grid\", className)}\n aria-busy={isLoading || undefined}\n {...rest}\n >\n {isLoading\n ? Array.from({ length: loadingCount }, (_, i) => (\n <AssetCardSkeleton\n key={i}\n {...loadingCard}\n index={i}\n />\n ))\n : children}\n </Grid>\n );\n});\n\n// Existing entry points remain aliases to the shared card implementation.\nexport { AssetCard as AssetTile, AssetCardSkeleton as AssetTileSkeleton } from \"../AssetCard\";\nexport type {\n AssetCardProps as AssetTileProps,\n AssetCardSkeletonProps as AssetTileSkeletonProps,\n} from \"../AssetCard\";\n\nexport interface AssetGridEmptyProps {\n title: string;\n description?: ReactNode;\n action?: ReactNode;\n}\n\n/** Nothing in the library yet — one action, the one that fills it. */\nexport function AssetGridEmpty({ title, description, action }: AssetGridEmptyProps) {\n return (\n <div className=\"ds-asset-empty\">\n <Icon\n name=\"image\"\n size={24}\n />\n <span className=\"ds-asset-empty__title\">{title}</span>\n {description && <span className=\"ds-asset-empty__description\">{description}</span>}\n {action}\n </div>\n );\n}\n"],"mappings":";;;;;;AAMA,SAASC,EAAG,GAAGC,GAAuC;CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAmBA,IAAaC,IAAYC,EAA2C,SAClE,EAAE,eAAY,IAAO,kBAAe,GAAG,gBAAa,cAAW,aAAU,GAAGC,KAC5E,GACA;CACA,OACE,kBAACC,GAAD;EACO;EACL,SAAQ;EACR,KAAI;EACJ,gBAAe;EACf,WAAWL,EAAG,iBAAiBM,CAAS;EACxC,aAAWC,KAAa,KAAA;EACxB,GAAIH;EAEH,UAAAG,IACG,MAAM,KAAK,EAAE,QAAQC,EAAa,IAAI,GAAG,MACvC,kBAACC,GAAD;GAEE,GAAIC;GACJ,OAAOC;EACR,GAHMA,CAGN,CACF,IACDC;CACA,CAAA;AAEV,CAAC;AAgBD,SAAgBC,EAAe,EAAE,UAAO,gBAAa,aAA+B;CAClF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAACd,GAAD;IACE,MAAK;IACL,MAAM;GACP,CAAA;GACD,kBAAC,QAAD;IAAM,WAAU;IAAyB,UAAAe;GAAY,CAAA;GACpDC,KAAe,kBAAC,QAAD;IAAM,WAAU;IAA+B,UAAAA;GAAkB,CAAA;GAChFC;EACE;;AAET"}
1
+ {"version":3,"file":"index.js","names":["Icon","cx","parts","AssetGrid","forwardRef","rest","Grid","className","isLoading","loadingCount","AssetCardSkeleton","loadingCard","i","children","AssetGridEmpty","title","description","action"],"sources":["../../../src/components/AssetGrid/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Grid } from \"../Grid\";\nimport { Icon } from \"../Icon\";\nimport { AssetCardSkeleton, type AssetCardSkeletonProps } from \"../AssetCard\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Renders placeholder tiles instead of children. The grid keeps its\n * geometry, so nothing moves when the real assets arrive.\n */\n isLoading?: boolean;\n /** How many placeholder tiles to show while loading. */\n loadingCount?: number;\n /** Slots each placeholder reserves; match the cards that replace them. */\n loadingCard?: Omit<AssetCardSkeletonProps, \"index\">;\n children?: ReactNode;\n}\n\n/**\n * The media library surface: an auto-filling grid of asset tiles. Sits inside\n * a `TableFrame` when it is the page's collection, bare inside a drawer.\n */\nexport const AssetGrid = forwardRef<HTMLDivElement, AssetGridProps>(function AssetGrid(\n { isLoading = false, loadingCount = 8, loadingCard, className, children, ...rest },\n ref,\n) {\n return (\n <Grid\n ref={ref}\n columns=\"auto\"\n gap=\"md\"\n minColumnWidth=\"var(--asset-tile-min-width)\"\n className={cx(\"ds-asset-grid\", className)}\n aria-busy={isLoading || undefined}\n {...rest}\n >\n {isLoading\n ? Array.from({ length: loadingCount }, (_, i) => (\n <AssetCardSkeleton\n key={i}\n {...loadingCard}\n index={i}\n />\n ))\n : children}\n </Grid>\n );\n});\n\nexport interface AssetGridEmptyProps {\n title: string;\n description?: ReactNode;\n action?: ReactNode;\n}\n\n/** Nothing in the library yet — one action, the one that fills it. */\nexport function AssetGridEmpty({ title, description, action }: AssetGridEmptyProps) {\n return (\n <div className=\"ds-asset-empty\">\n <Icon\n name=\"image\"\n size={24}\n />\n <span className=\"ds-asset-empty__title\">{title}</span>\n {description && <span className=\"ds-asset-empty__description\">{description}</span>}\n {action}\n </div>\n );\n}\n"],"mappings":";;;;;;AAMA,SAASC,EAAG,GAAGC,GAAuC;CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAmBA,IAAaC,IAAYC,EAA2C,SAClE,EAAE,eAAY,IAAO,kBAAe,GAAG,gBAAa,cAAW,aAAU,GAAGC,KAC5E,GACA;CACA,OACE,kBAACC,GAAD;EACO;EACL,SAAQ;EACR,KAAI;EACJ,gBAAe;EACf,WAAWL,EAAG,iBAAiBM,CAAS;EACxC,aAAWC,KAAa,KAAA;EACxB,GAAIH;EAEH,UAAAG,IACG,MAAM,KAAK,EAAE,QAAQC,EAAa,IAAI,GAAG,MACvC,kBAACC,GAAD;GAEE,GAAIC;GACJ,OAAOC;EACR,GAHMA,CAGN,CACF,IACDC;CACA,CAAA;AAEV,CAAC;AASD,SAAgBC,EAAe,EAAE,UAAO,gBAAa,aAA+B;CAClF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAACd,GAAD;IACE,MAAK;IACL,MAAM;GACP,CAAA;GACD,kBAAC,QAAD;IAAM,WAAU;IAAyB,UAAAe;GAAY,CAAA;GACpDC,KAAe,kBAAC,QAAD;IAAM,WAAU;IAA+B,UAAAA;GAAkB,CAAA;GAChFC;EACE;;AAET"}
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Avatar-DPnrvkwd.cjs");exports.Avatar=e.t,exports.AvatarGroup=e.n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Avatar-BY0dAItT.cjs");exports.Avatar=e.t,exports.AvatarGroup=e.n;
@@ -1 +1 @@
1
- export { t as Avatar, n as AvatarGroup } from "../../chunks/Avatar-BK8IdL5W.js";
1
+ export { t as Avatar, n as AvatarGroup } from "../../chunks/Avatar-UjhjcHh5.js";
@@ -18,7 +18,9 @@
18
18
  align-items: center;
19
19
  justify-content: center;
20
20
  border-radius: 50%;
21
- background: var(--color-surface-subtle);
21
+
22
+ /* Initials step from the local ground, as neutral badges do. */
23
+ background: var(--fill-control);
22
24
  user-select: none;
23
25
  }
24
26
 
@@ -43,7 +45,7 @@
43
45
  overflow: hidden;
44
46
  background: var(--avatar-background, transparent);
45
47
  color: var(--avatar-foreground, var(--color-text));
46
- border: var(--control-border-width) solid var(--control-border-color);
48
+ border: 0;
47
49
  border-radius: 50%;
48
50
  font-size: var(--avatar-font-size);
49
51
  font-weight: var(--font-weight-bold);
@@ -73,7 +75,7 @@
73
75
  .ds-avatar:focus-visible,
74
76
  .ds-avatar > a.ds-avatar__control:focus-visible,
75
77
  .ds-avatar-group__count:focus-visible {
76
- outline: var(--control-border-width) solid var(--color-focus);
78
+ outline: var(--focus-width) solid var(--color-focus);
77
79
  outline-offset: 2px;
78
80
  }
79
81
 
@@ -82,8 +84,23 @@
82
84
  align-items: center;
83
85
  }
84
86
 
87
+ /* Each later avatar is cut away 2px beyond the one overlapping it. The
88
+ * gap is transparent, so it shows whatever is painted behind the group,
89
+ * including a hovered or selected row. */
85
90
  .ds-avatar-group .ds-avatar + .ds-avatar {
91
+ --avatar-cut-x: calc(var(--space-2) - var(--avatar-size) / 2);
92
+ --avatar-cut: calc(var(--avatar-size) / 2 + 2px);
93
+
86
94
  margin-inline-start: calc(-1 * var(--space-2));
95
+ mask: radial-gradient(
96
+ circle at var(--avatar-cut-x) 50%,
97
+ transparent calc(var(--avatar-cut) - 0.5px),
98
+ rgb(0 0 0) var(--avatar-cut)
99
+ );
100
+ }
101
+
102
+ .ds-avatar-group .ds-avatar + .ds-avatar:dir(rtl) {
103
+ --avatar-cut-x: calc(100% - var(--space-2) + var(--avatar-size) / 2);
87
104
  }
88
105
 
89
106
  .ds-avatar-group .ds-avatar:nth-child(1) {
@@ -98,19 +115,23 @@
98
115
  z-index: 1;
99
116
  }
100
117
 
118
+ /* A focused avatar rises above its neighbour, uncut, so the mask never
119
+ * clips its focus ring. */
101
120
  .ds-avatar-group .ds-avatar:focus-within {
102
121
  z-index: 4;
122
+ mask: none;
103
123
  }
104
124
 
105
125
  .ds-avatar-group__count {
106
126
  flex: none;
107
127
  margin-inline-start: var(--space-2);
108
- padding: 2px var(--space-2);
109
- border: var(--badge-border-width) solid var(--color-text-muted);
128
+ padding: 4px 10px;
129
+ border: 0;
110
130
  border-radius: var(--radius-pill);
111
131
  color: var(--color-text-muted);
112
132
  font-size: var(--font-size-xs);
113
133
  font-weight: var(--font-weight-bold);
134
+ background: var(--fill-control);
114
135
  }
115
136
 
116
137
  .ds-avatar-tooltip {
@@ -1,2 +1,2 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({shape:e=`tag`,size:n=`md`,tone:r,appearance:i=`outline`,isCountExact:a=!1,className:o,children:s,...c},l){if(e===`count`&&!a){let e=Number(s);if(!Number.isNaN(e)){if(e===0)return null;s=e>99?`99+`:String(e)}}return(0,t.jsxs)(`span`,{ref:l,"data-shape":e,"data-size":n,"data-appearance":i,"data-tone":e===`status`?r:void 0,className:[`ds-badge`,o].filter(Boolean).join(` `),...c,children:[e===`status`&&(0,t.jsx)(`span`,{className:`ds-badge__dot`,"aria-hidden":`true`}),s]})});exports.Badge=n;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({shape:e=`tag`,size:n=`md`,tone:r,appearance:i=`soft`,isCountExact:a=!1,className:o,children:s,...c},l){if(e===`count`&&!a){let e=Number(s);if(!Number.isNaN(e)){if(e===0)return null;s=e>99?`99+`:String(e)}}return(0,t.jsxs)(`span`,{ref:l,"data-shape":e,"data-size":n,"data-appearance":i,"data-tone":e===`status`?r:void 0,className:[`ds-badge`,o].filter(Boolean).join(` `),...c,children:[e===`status`&&(0,t.jsx)(`span`,{className:`ds-badge__dot`,"aria-hidden":`true`}),s]})});exports.Badge=n;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","Badge","rest","shape","isCountExact","value","children","size","appearance","tone","className"],"sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type BadgeShape = \"status\" | \"tag\" | \"count\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * How much ink the badge spends.\n * - `outline` — the tone as a 2px stroke on the surface. The quiet default.\n * - `soft` — the tone's soft fill behind tone-coloured text. For dense tables.\n * - `solid` — the tone as a full fill. Reserve it for the one state a row is\n * really about; a table of solid badges reads as noise.\n */\nexport type BadgeAppearance = \"outline\" | \"soft\" | \"solid\";\n\n/** Six publication states, and no seventh without a decision record. */\nexport type StatusTone =\n \"draft\" | \"scheduled\" | \"published\" | \"changed\" | \"unpublished\" | \"archived\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n shape?: BadgeShape;\n /** `md` keeps the standard size; `sm` condenses labels for dense layouts. */\n size?: BadgeSize;\n /** Required on `status`, forbidden on `tag` and `count`. */\n tone?: StatusTone;\n appearance?: BadgeAppearance;\n /** Show count values in full, including zero. Other count badges keep their compact defaults. */\n isCountExact?: boolean;\n children?: ReactNode;\n}\n\n/**\n * A small, non-interactive label attached to something else. Never a button,\n * never a filter. Status tones are reserved for publication state.\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n shape = \"tag\",\n size = \"md\",\n tone,\n appearance = \"outline\",\n isCountExact = false,\n className,\n children,\n ...rest\n },\n ref,\n) {\n if (shape === \"count\" && !isCountExact) {\n const value = Number(children);\n if (!Number.isNaN(value)) {\n if (value === 0) {\n return null;\n }\n children = value > 99 ? \"99+\" : String(value);\n }\n }\n\n return (\n <span\n ref={ref}\n data-shape={shape}\n data-size={size}\n data-appearance={appearance}\n data-tone={shape === \"status\" ? tone : undefined}\n className={[\"ds-badge\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {shape === \"status\" && (\n <span\n className=\"ds-badge__dot\"\n aria-hidden=\"true\"\n />\n )}\n {children}\n </span>\n );\n});\n"],"mappings":"A,yHAmCA,IAAaG,GAAA,EAAQH,EAAAA,WAAAA,CAAwC,SAC3D,CACE,QAAQ,MACR,OAAO,KACP,OACA,aAAa,UACb,eAAe,GACf,YACA,WACA,GAAGI,GAEL,EACA,CACA,GAAIC,IAAU,SAAW,CAACC,EAAc,CACtC,IAAMC,EAAQ,OAAOC,CAAQ,EAC7B,GAAI,CAAC,OAAO,MAAMD,CAAK,EAAG,CACxB,GAAIA,IAAU,EACZ,OAAO,KAET,EAAWA,EAAQ,GAAK,MAAQ,OAAOA,CAAK,CAC9C,CACF,CAEA,OACE,EAAAL,EAAA,KAAA,CAAC,OAAD,CACO,MACL,aAAYG,EACZ,YAAWI,EACX,kBAAiBC,EACjB,YAAWL,IAAU,SAAWM,EAAO,IAAA,GACvC,UAAW,CAAC,WAAYC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAC3D,GAAIR,EAPN,SAAA,CASGC,IAAU,WACT,EAAAH,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,gBACV,cAAY,MACb,CAAA,EAEFM,CACG,C,EAEV,CAAC,E"}
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","Badge","rest","shape","isCountExact","value","children","size","appearance","tone","className"],"sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type BadgeShape = \"status\" | \"tag\" | \"count\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * How much ink the badge spends.\n * - `soft` — the tone's soft fill behind tone-coloured text. The default.\n * - `solid` — the tone as a full fill. Reserve it for the one state a row is\n * really about; a table of solid badges reads as noise.\n */\nexport type BadgeAppearance = \"soft\" | \"solid\";\n\n/** Six publication states, and no seventh without a decision record. */\nexport type StatusTone =\n \"draft\" | \"scheduled\" | \"published\" | \"changed\" | \"unpublished\" | \"archived\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n shape?: BadgeShape;\n /** `md` keeps the standard size; `sm` condenses labels for dense layouts. */\n size?: BadgeSize;\n /** Required on `status`, forbidden on `tag` and `count`. */\n tone?: StatusTone;\n appearance?: BadgeAppearance;\n /** Show count values in full, including zero. Other count badges keep their compact defaults. */\n isCountExact?: boolean;\n children?: ReactNode;\n}\n\n/**\n * A small, non-interactive label attached to something else. Never a button,\n * never a filter. Status tones are reserved for publication state.\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n shape = \"tag\",\n size = \"md\",\n tone,\n appearance = \"soft\",\n isCountExact = false,\n className,\n children,\n ...rest\n },\n ref,\n) {\n if (shape === \"count\" && !isCountExact) {\n const value = Number(children);\n if (!Number.isNaN(value)) {\n if (value === 0) {\n return null;\n }\n children = value > 99 ? \"99+\" : String(value);\n }\n }\n\n return (\n <span\n ref={ref}\n data-shape={shape}\n data-size={size}\n data-appearance={appearance}\n data-tone={shape === \"status\" ? tone : undefined}\n className={[\"ds-badge\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {shape === \"status\" && (\n <span\n className=\"ds-badge__dot\"\n aria-hidden=\"true\"\n />\n )}\n {children}\n </span>\n );\n});\n"],"mappings":"A,yHAkCA,IAAaG,GAAA,EAAQH,EAAAA,WAAAA,CAAwC,SAC3D,CACE,QAAQ,MACR,OAAO,KACP,OACA,aAAa,OACb,eAAe,GACf,YACA,WACA,GAAGI,GAEL,EACA,CACA,GAAIC,IAAU,SAAW,CAACC,EAAc,CACtC,IAAMC,EAAQ,OAAOC,CAAQ,EAC7B,GAAI,CAAC,OAAO,MAAMD,CAAK,EAAG,CACxB,GAAIA,IAAU,EACZ,OAAO,KAET,EAAWA,EAAQ,GAAK,MAAQ,OAAOA,CAAK,CAC9C,CACF,CAEA,OACE,EAAAL,EAAA,KAAA,CAAC,OAAD,CACO,MACL,aAAYG,EACZ,YAAWI,EACX,kBAAiBC,EACjB,YAAWL,IAAU,SAAWM,EAAO,IAAA,GACvC,UAAW,CAAC,WAAYC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAC3D,GAAIR,EAPN,SAAA,CASGC,IAAU,WACT,EAAAH,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,gBACV,cAAY,MACb,CAAA,EAEFM,CACG,C,EAEV,CAAC,E"}
@@ -3,12 +3,11 @@ export type BadgeShape = "status" | "tag" | "count";
3
3
  export type BadgeSize = "sm" | "md" | "lg";
4
4
  /**
5
5
  * How much ink the badge spends.
6
- * - `outline` — the tone as a 2px stroke on the surface. The quiet default.
7
- * - `soft` — the tone's soft fill behind tone-coloured text. For dense tables.
6
+ * - `soft` — the tone's soft fill behind tone-coloured text. The default.
8
7
  * - `solid` — the tone as a full fill. Reserve it for the one state a row is
9
8
  * really about; a table of solid badges reads as noise.
10
9
  */
11
- export type BadgeAppearance = "outline" | "soft" | "solid";
10
+ export type BadgeAppearance = "soft" | "solid";
12
11
  /** Six publication states, and no seventh without a decision record. */
13
12
  export type StatusTone = "draft" | "scheduled" | "published" | "changed" | "unpublished" | "archived";
14
13
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,wEAAwE;AACxE,MAAM,MAAM,UAAU,GACpB,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,wGA0ChB,CAAC"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,wEAAwE;AACxE,MAAM,MAAM,UAAU,GACpB,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,wGA0ChB,CAAC"}
@@ -3,12 +3,11 @@ export type BadgeShape = "status" | "tag" | "count";
3
3
  export type BadgeSize = "sm" | "md" | "lg";
4
4
  /**
5
5
  * How much ink the badge spends.
6
- * - `outline` — the tone as a 2px stroke on the surface. The quiet default.
7
- * - `soft` — the tone's soft fill behind tone-coloured text. For dense tables.
6
+ * - `soft` — the tone's soft fill behind tone-coloured text. The default.
8
7
  * - `solid` — the tone as a full fill. Reserve it for the one state a row is
9
8
  * really about; a table of solid badges reads as noise.
10
9
  */
11
- export type BadgeAppearance = "outline" | "soft" | "solid";
10
+ export type BadgeAppearance = "soft" | "solid";
12
11
  /** Six publication states, and no seventh without a decision record. */
13
12
  export type StatusTone = "draft" | "scheduled" | "published" | "changed" | "unpublished" | "archived";
14
13
  export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {