@hjmds/design-contracts 0.8.2

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 (353) hide show
  1. package/README.md +208 -0
  2. package/dist/alert-dialog.d.ts +102 -0
  3. package/dist/alert-dialog.d.ts.map +1 -0
  4. package/dist/alert-dialog.js +136 -0
  5. package/dist/alert-dialog.js.map +1 -0
  6. package/dist/base-recipes.d.ts +184 -0
  7. package/dist/base-recipes.d.ts.map +1 -0
  8. package/dist/base-recipes.js +129 -0
  9. package/dist/base-recipes.js.map +1 -0
  10. package/dist/behaviors.d.ts +1254 -0
  11. package/dist/behaviors.d.ts.map +1 -0
  12. package/dist/behaviors.js +972 -0
  13. package/dist/behaviors.js.map +1 -0
  14. package/dist/bottom-navigation-defaults.d.ts +13 -0
  15. package/dist/bottom-navigation-defaults.d.ts.map +1 -0
  16. package/dist/bottom-navigation-defaults.js +10 -0
  17. package/dist/bottom-navigation-defaults.js.map +1 -0
  18. package/dist/bottom-navigation.d.ts +114 -0
  19. package/dist/bottom-navigation.d.ts.map +1 -0
  20. package/dist/bottom-navigation.js +223 -0
  21. package/dist/bottom-navigation.js.map +1 -0
  22. package/dist/breadcrumb.d.ts +97 -0
  23. package/dist/breadcrumb.d.ts.map +1 -0
  24. package/dist/breadcrumb.js +99 -0
  25. package/dist/breadcrumb.js.map +1 -0
  26. package/dist/calendar.d.ts +285 -0
  27. package/dist/calendar.d.ts.map +1 -0
  28. package/dist/calendar.js +297 -0
  29. package/dist/calendar.js.map +1 -0
  30. package/dist/card.d.ts +39 -0
  31. package/dist/card.d.ts.map +1 -0
  32. package/dist/card.js +50 -0
  33. package/dist/card.js.map +1 -0
  34. package/dist/carousel.d.ts +180 -0
  35. package/dist/carousel.d.ts.map +1 -0
  36. package/dist/carousel.js +172 -0
  37. package/dist/carousel.js.map +1 -0
  38. package/dist/catalog.d.ts +7158 -0
  39. package/dist/catalog.d.ts.map +1 -0
  40. package/dist/catalog.js +220 -0
  41. package/dist/catalog.js.map +1 -0
  42. package/dist/collection.d.ts +123 -0
  43. package/dist/collection.d.ts.map +1 -0
  44. package/dist/collection.js +211 -0
  45. package/dist/collection.js.map +1 -0
  46. package/dist/color-references.d.ts +46 -0
  47. package/dist/color-references.d.ts.map +1 -0
  48. package/dist/color-references.js +39 -0
  49. package/dist/color-references.js.map +1 -0
  50. package/dist/colors.d.ts +56 -0
  51. package/dist/colors.d.ts.map +1 -0
  52. package/dist/colors.js +90 -0
  53. package/dist/colors.js.map +1 -0
  54. package/dist/command-palette.d.ts +240 -0
  55. package/dist/command-palette.d.ts.map +1 -0
  56. package/dist/command-palette.js +97 -0
  57. package/dist/command-palette.js.map +1 -0
  58. package/dist/component-contracts.d.ts +137 -0
  59. package/dist/component-contracts.d.ts.map +1 -0
  60. package/dist/component-contracts.js +53 -0
  61. package/dist/component-contracts.js.map +1 -0
  62. package/dist/component-definitions.d.ts +135 -0
  63. package/dist/component-definitions.d.ts.map +1 -0
  64. package/dist/component-definitions.js +142 -0
  65. package/dist/component-definitions.js.map +1 -0
  66. package/dist/component-recipes.d.ts +3583 -0
  67. package/dist/component-recipes.d.ts.map +1 -0
  68. package/dist/component-recipes.js +1503 -0
  69. package/dist/component-recipes.js.map +1 -0
  70. package/dist/component-references.d.ts +416 -0
  71. package/dist/component-references.d.ts.map +1 -0
  72. package/dist/component-references.js +140 -0
  73. package/dist/component-references.js.map +1 -0
  74. package/dist/content-state.d.ts +104 -0
  75. package/dist/content-state.d.ts.map +1 -0
  76. package/dist/content-state.js +116 -0
  77. package/dist/content-state.js.map +1 -0
  78. package/dist/counter-badge-recipe.d.ts +80 -0
  79. package/dist/counter-badge-recipe.d.ts.map +1 -0
  80. package/dist/counter-badge-recipe.js +44 -0
  81. package/dist/counter-badge-recipe.js.map +1 -0
  82. package/dist/counter-badge.d.ts +12 -0
  83. package/dist/counter-badge.d.ts.map +1 -0
  84. package/dist/counter-badge.js +21 -0
  85. package/dist/counter-badge.js.map +1 -0
  86. package/dist/data-table.d.ts +203 -0
  87. package/dist/data-table.d.ts.map +1 -0
  88. package/dist/data-table.js +182 -0
  89. package/dist/data-table.js.map +1 -0
  90. package/dist/date-picker.d.ts +268 -0
  91. package/dist/date-picker.d.ts.map +1 -0
  92. package/dist/date-picker.js +168 -0
  93. package/dist/date-picker.js.map +1 -0
  94. package/dist/description-list.d.ts +68 -0
  95. package/dist/description-list.d.ts.map +1 -0
  96. package/dist/description-list.js +85 -0
  97. package/dist/description-list.js.map +1 -0
  98. package/dist/design-system-provider.d.ts +80 -0
  99. package/dist/design-system-provider.d.ts.map +1 -0
  100. package/dist/design-system-provider.js +147 -0
  101. package/dist/design-system-provider.js.map +1 -0
  102. package/dist/evidence.d.ts +49 -0
  103. package/dist/evidence.d.ts.map +1 -0
  104. package/dist/evidence.js +133 -0
  105. package/dist/evidence.js.map +1 -0
  106. package/dist/file-picker.d.ts +183 -0
  107. package/dist/file-picker.d.ts.map +1 -0
  108. package/dist/file-picker.js +224 -0
  109. package/dist/file-picker.js.map +1 -0
  110. package/dist/floating-action-button.d.ts +143 -0
  111. package/dist/floating-action-button.d.ts.map +1 -0
  112. package/dist/floating-action-button.js +149 -0
  113. package/dist/floating-action-button.js.map +1 -0
  114. package/dist/form.d.ts +143 -0
  115. package/dist/form.d.ts.map +1 -0
  116. package/dist/form.js +206 -0
  117. package/dist/form.js.map +1 -0
  118. package/dist/foundations.d.ts +300 -0
  119. package/dist/foundations.d.ts.map +1 -0
  120. package/dist/foundations.js +238 -0
  121. package/dist/foundations.js.map +1 -0
  122. package/dist/grid.d.ts +75 -0
  123. package/dist/grid.d.ts.map +1 -0
  124. package/dist/grid.js +133 -0
  125. package/dist/grid.js.map +1 -0
  126. package/dist/icon-button-recipe.d.ts +99 -0
  127. package/dist/icon-button-recipe.d.ts.map +1 -0
  128. package/dist/icon-button-recipe.js +53 -0
  129. package/dist/icon-button-recipe.js.map +1 -0
  130. package/dist/icon.d.ts +41 -0
  131. package/dist/icon.d.ts.map +1 -0
  132. package/dist/icon.js +147 -0
  133. package/dist/icon.js.map +1 -0
  134. package/dist/image.d.ts +82 -0
  135. package/dist/image.d.ts.map +1 -0
  136. package/dist/image.js +100 -0
  137. package/dist/image.js.map +1 -0
  138. package/dist/index.d.ts +58 -0
  139. package/dist/index.d.ts.map +1 -0
  140. package/dist/index.js +66 -0
  141. package/dist/index.js.map +1 -0
  142. package/dist/layout.d.ts +118 -0
  143. package/dist/layout.d.ts.map +1 -0
  144. package/dist/layout.js +118 -0
  145. package/dist/layout.js.map +1 -0
  146. package/dist/link.d.ts +57 -0
  147. package/dist/link.d.ts.map +1 -0
  148. package/dist/link.js +142 -0
  149. package/dist/link.js.map +1 -0
  150. package/dist/load-more.d.ts +64 -0
  151. package/dist/load-more.d.ts.map +1 -0
  152. package/dist/load-more.js +124 -0
  153. package/dist/load-more.js.map +1 -0
  154. package/dist/mentions.d.ts +67 -0
  155. package/dist/mentions.d.ts.map +1 -0
  156. package/dist/mentions.js +107 -0
  157. package/dist/mentions.js.map +1 -0
  158. package/dist/number-field.d.ts +208 -0
  159. package/dist/number-field.d.ts.map +1 -0
  160. package/dist/number-field.js +247 -0
  161. package/dist/number-field.js.map +1 -0
  162. package/dist/otp-field.d.ts +152 -0
  163. package/dist/otp-field.d.ts.map +1 -0
  164. package/dist/otp-field.js +117 -0
  165. package/dist/otp-field.js.map +1 -0
  166. package/dist/pagination.d.ts +181 -0
  167. package/dist/pagination.d.ts.map +1 -0
  168. package/dist/pagination.js +226 -0
  169. package/dist/pagination.js.map +1 -0
  170. package/dist/password-field.d.ts +187 -0
  171. package/dist/password-field.d.ts.map +1 -0
  172. package/dist/password-field.js +120 -0
  173. package/dist/password-field.js.map +1 -0
  174. package/dist/popover.d.ts +152 -0
  175. package/dist/popover.d.ts.map +1 -0
  176. package/dist/popover.js +137 -0
  177. package/dist/popover.js.map +1 -0
  178. package/dist/progress-recipe.d.ts +43 -0
  179. package/dist/progress-recipe.d.ts.map +1 -0
  180. package/dist/progress-recipe.js +16 -0
  181. package/dist/progress-recipe.js.map +1 -0
  182. package/dist/recipes.d.ts +31 -0
  183. package/dist/recipes.d.ts.map +1 -0
  184. package/dist/recipes.js +46 -0
  185. package/dist/recipes.js.map +1 -0
  186. package/dist/responsive.d.ts +27 -0
  187. package/dist/responsive.d.ts.map +1 -0
  188. package/dist/responsive.js +66 -0
  189. package/dist/responsive.js.map +1 -0
  190. package/dist/result.d.ts +111 -0
  191. package/dist/result.d.ts.map +1 -0
  192. package/dist/result.js +97 -0
  193. package/dist/result.js.map +1 -0
  194. package/dist/selection-helpers.d.ts +16 -0
  195. package/dist/selection-helpers.d.ts.map +1 -0
  196. package/dist/selection-helpers.js +52 -0
  197. package/dist/selection-helpers.js.map +1 -0
  198. package/dist/semantic-colors.d.ts +275 -0
  199. package/dist/semantic-colors.d.ts.map +1 -0
  200. package/dist/semantic-colors.js +84 -0
  201. package/dist/semantic-colors.js.map +1 -0
  202. package/dist/sheet.d.ts +51 -0
  203. package/dist/sheet.d.ts.map +1 -0
  204. package/dist/sheet.js +69 -0
  205. package/dist/sheet.js.map +1 -0
  206. package/dist/showcase.d.ts +153 -0
  207. package/dist/showcase.d.ts.map +1 -0
  208. package/dist/showcase.js +210 -0
  209. package/dist/showcase.js.map +1 -0
  210. package/dist/side-panel.d.ts +199 -0
  211. package/dist/side-panel.d.ts.map +1 -0
  212. package/dist/side-panel.js +111 -0
  213. package/dist/side-panel.js.map +1 -0
  214. package/dist/slider.d.ts +138 -0
  215. package/dist/slider.d.ts.map +1 -0
  216. package/dist/slider.js +150 -0
  217. package/dist/slider.js.map +1 -0
  218. package/dist/splitter.d.ts +113 -0
  219. package/dist/splitter.d.ts.map +1 -0
  220. package/dist/splitter.js +99 -0
  221. package/dist/splitter.js.map +1 -0
  222. package/dist/statistic.d.ts +41 -0
  223. package/dist/statistic.d.ts.map +1 -0
  224. package/dist/statistic.js +76 -0
  225. package/dist/statistic.js.map +1 -0
  226. package/dist/steps.d.ts +196 -0
  227. package/dist/steps.d.ts.map +1 -0
  228. package/dist/steps.js +160 -0
  229. package/dist/steps.js.map +1 -0
  230. package/dist/tag.d.ts +128 -0
  231. package/dist/tag.d.ts.map +1 -0
  232. package/dist/tag.js +93 -0
  233. package/dist/tag.js.map +1 -0
  234. package/dist/timeline.d.ts +147 -0
  235. package/dist/timeline.d.ts.map +1 -0
  236. package/dist/timeline.js +127 -0
  237. package/dist/timeline.js.map +1 -0
  238. package/dist/toast.d.ts +164 -0
  239. package/dist/toast.d.ts.map +1 -0
  240. package/dist/toast.js +529 -0
  241. package/dist/toast.js.map +1 -0
  242. package/dist/tokens.d.ts +9 -0
  243. package/dist/tokens.d.ts.map +1 -0
  244. package/dist/tokens.js +9 -0
  245. package/dist/tokens.js.map +1 -0
  246. package/dist/tooltip.d.ts +44 -0
  247. package/dist/tooltip.d.ts.map +1 -0
  248. package/dist/tooltip.js +88 -0
  249. package/dist/tooltip.js.map +1 -0
  250. package/dist/tour.d.ts +218 -0
  251. package/dist/tour.d.ts.map +1 -0
  252. package/dist/tour.js +211 -0
  253. package/dist/tour.js.map +1 -0
  254. package/dist/transfer-list.d.ts +207 -0
  255. package/dist/transfer-list.d.ts.map +1 -0
  256. package/dist/transfer-list.js +193 -0
  257. package/dist/transfer-list.js.map +1 -0
  258. package/dist/tree-select.d.ts +78 -0
  259. package/dist/tree-select.d.ts.map +1 -0
  260. package/dist/tree-select.js +132 -0
  261. package/dist/tree-select.js.map +1 -0
  262. package/dist/tree.d.ts +206 -0
  263. package/dist/tree.d.ts.map +1 -0
  264. package/dist/tree.js +223 -0
  265. package/dist/tree.js.map +1 -0
  266. package/dist/upload-item.d.ts +173 -0
  267. package/dist/upload-item.d.ts.map +1 -0
  268. package/dist/upload-item.js +156 -0
  269. package/dist/upload-item.js.map +1 -0
  270. package/dist/version.d.ts +3 -0
  271. package/dist/version.d.ts.map +1 -0
  272. package/dist/version.js +3 -0
  273. package/dist/version.js.map +1 -0
  274. package/docs/affix.md +63 -0
  275. package/docs/anchor.md +59 -0
  276. package/docs/ant-design-coverage.md +119 -0
  277. package/docs/app-provider.md +50 -0
  278. package/docs/app-rn-adoption.md +227 -0
  279. package/docs/architecture.md +320 -0
  280. package/docs/authoring-brief.md +87 -0
  281. package/docs/border-beam.md +66 -0
  282. package/docs/bottom-navigation.md +127 -0
  283. package/docs/breadcrumb.md +82 -0
  284. package/docs/calendar.md +154 -0
  285. package/docs/carousel.md +130 -0
  286. package/docs/cascader.md +93 -0
  287. package/docs/catalog-decision-status.md +306 -0
  288. package/docs/color-picker.md +72 -0
  289. package/docs/command-palette.md +116 -0
  290. package/docs/confirm-popover.md +93 -0
  291. package/docs/consistency-audit.md +383 -0
  292. package/docs/consumer-release-gate.md +90 -0
  293. package/docs/content-state.md +156 -0
  294. package/docs/context-panel.md +88 -0
  295. package/docs/cross-platform-core-normalization.md +118 -0
  296. package/docs/data-table.md +79 -0
  297. package/docs/date-picker.md +84 -0
  298. package/docs/description-list.md +75 -0
  299. package/docs/design-system-provider.md +139 -0
  300. package/docs/dropdown.md +78 -0
  301. package/docs/expansion-roadmap.md +285 -0
  302. package/docs/file-picker.md +59 -0
  303. package/docs/floating-action-button.md +111 -0
  304. package/docs/form.md +134 -0
  305. package/docs/generated/component-maturity.md +103 -0
  306. package/docs/generated/renderer-evidence.json +5597 -0
  307. package/docs/generated/renderer-evidence.md +132 -0
  308. package/docs/generated/showcase-manifest.json +3732 -0
  309. package/docs/icon.md +22 -0
  310. package/docs/identity.md +121 -0
  311. package/docs/image.md +84 -0
  312. package/docs/implementation-0.5.md +85 -0
  313. package/docs/layout-primitives.md +107 -0
  314. package/docs/layout.md +83 -0
  315. package/docs/library-reference-decisions.md +123 -0
  316. package/docs/link.md +67 -0
  317. package/docs/load-more.md +31 -0
  318. package/docs/mentions.md +82 -0
  319. package/docs/migration-0.2.md +108 -0
  320. package/docs/migration-0.3.md +72 -0
  321. package/docs/migration-0.5.md +82 -0
  322. package/docs/migration-0.6.md +197 -0
  323. package/docs/notification.md +54 -0
  324. package/docs/number-field.md +82 -0
  325. package/docs/otp-field.md +103 -0
  326. package/docs/pagination.md +139 -0
  327. package/docs/password-field.md +98 -0
  328. package/docs/popover.md +124 -0
  329. package/docs/promotion-candidates.md +169 -0
  330. package/docs/qr-code.md +69 -0
  331. package/docs/rating.md +58 -0
  332. package/docs/responsive-grid.md +90 -0
  333. package/docs/result.md +96 -0
  334. package/docs/showcase.md +97 -0
  335. package/docs/side-panel.md +71 -0
  336. package/docs/slider.md +79 -0
  337. package/docs/splitter.md +55 -0
  338. package/docs/statistic.md +16 -0
  339. package/docs/steps.md +115 -0
  340. package/docs/tag.md +57 -0
  341. package/docs/time-picker.md +88 -0
  342. package/docs/timeline.md +146 -0
  343. package/docs/toast.md +127 -0
  344. package/docs/tooltip.md +58 -0
  345. package/docs/tour.md +136 -0
  346. package/docs/transfer-list.md +94 -0
  347. package/docs/tree-select.md +101 -0
  348. package/docs/tree.md +123 -0
  349. package/docs/upload-item.md +68 -0
  350. package/docs/utility.md +53 -0
  351. package/docs/virtual-list.md +70 -0
  352. package/docs/watermark.md +58 -0
  353. package/package.json +402 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon-button-recipe.js","sourceRoot":"","sources":["../src/icon-button-recipe.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAGtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,OAAO,EACP,MAAM,GAEP,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAMtD,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,CAAU;IAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IAC7D,KAAK,EAAE;QACL,OAAO,EAAE;YACP,UAAU,EAAE,cAAc,CAAC,MAAM,CAA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AAO;QACL,UAAU,EACR,QAAQ,CAAC,UAAU,KAAK,IAAI;YAC1B,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;QACzD,OAAO,EAAE,qBAAqB,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;QACzD,MAAM,EACJ,QAAQ,CAAC,MAAM,KAAK,IAAI;YACtB,CAAC,CAAC,IAAI;YACN,CAAC,CAAC,qBAAqB,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;KACtD,CAAC;AACJ,CAAC","sourcesContent":["import {\n resolveColorReference,\n type ColorReference,\n type ColorReferencePalette,\n} from \"./color-references.js\";\nimport {\n opacity,\n radius,\n type GlyphSize,\n} from \"./foundations.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type IconButtonSize = \"small\" | \"medium\" | \"large\";\nexport type IconButtonShape = \"rounded\" | \"circle\";\nexport type IconButtonTone = \"primary\" | \"secondary\" | \"ghost\" | \"danger\";\n\nexport const iconButtonRecipe = {\n slots: [\"root\", \"icon\", \"spinner\"] as const,\n defaults: { tone: \"ghost\", size: \"medium\", shape: \"rounded\" },\n tones: {\n primary: {\n background: semanticColors.action.brand.background,\n content: semanticColors.action.brand.content,\n border: null,\n },\n secondary: {\n background: semanticColors.action.neutral.background,\n content: semanticColors.action.neutral.content,\n border: semanticColors.border.default,\n },\n ghost: {\n background: null,\n content: semanticColors.content.secondary,\n border: null,\n },\n danger: {\n background: semanticColors.action.danger.background,\n content: semanticColors.action.danger.content,\n border: null,\n },\n },\n sizes: {\n small: { diameter: 36, hitSlop: 4, glyph: \"sm\" },\n medium: { diameter: 44, hitSlop: 0, glyph: \"md\" },\n large: { diameter: 52, hitSlop: 0, glyph: \"lg\" },\n },\n shapes: { rounded: \"md\", circle: \"full\" },\n states: {\n pressedOpacity: opacity.pressed,\n disabledOpacity: opacity.disabled,\n },\n} as const satisfies {\n slots: readonly string[];\n defaults: {\n tone: IconButtonTone;\n size: IconButtonSize;\n shape: IconButtonShape;\n };\n tones: Record<\n IconButtonTone,\n { background: ColorReference | null; content: ColorReference; border: ColorReference | null }\n >;\n sizes: Record<IconButtonSize, { diameter: number; hitSlop: number; glyph: GlyphSize }>;\n shapes: Record<IconButtonShape, keyof typeof radius>;\n states: { pressedOpacity: number; disabledOpacity: number };\n};\n\nexport type ResolvedIconButtonPresentation = Readonly<{\n background: string | null;\n content: string;\n border: string | null;\n}>;\n\n/** Resolve one recipe tone for non-CSS renderers without a second tone table. */\nexport function resolveIconButtonPresentation(\n tone: IconButtonTone,\n palette: ColorReferencePalette,\n): ResolvedIconButtonPresentation {\n const contract = iconButtonRecipe.tones[tone];\n return {\n background:\n contract.background === null\n ? null\n : resolveColorReference(contract.background, palette),\n content: resolveColorReference(contract.content, palette),\n border:\n contract.border === null\n ? null\n : resolveColorReference(contract.border, palette),\n };\n}\n"]}
package/dist/icon.d.ts ADDED
@@ -0,0 +1,41 @@
1
+ import type { GlyphSize } from "./foundations.js";
2
+ import type { IconTone, IconWeight } from "./component-recipes.js";
3
+ import type { DesignSystemDirection } from "./design-system-provider.js";
4
+ /**
5
+ * Shared semantic names. Renderers map these roles to their tree-shakeable SVG
6
+ * or native glyph component instead of leaking a third-party icon name into a
7
+ * product screen.
8
+ */
9
+ export declare const semanticIconNames: readonly ["add", "ai", "alert", "back", "calendar", "check", "chevronDown", "chevronEnd", "chevronStart", "chevronUp", "close", "compare", "copy", "delete", "download", "edit", "error", "favorite", "filter", "forward", "help", "home", "info", "lock", "menu", "more", "notifications", "pause", "play", "refresh", "search", "settings", "share", "success", "trendDown", "trendFlat", "trendUp", "upload", "user", "users", "visibility", "visibilityOff", "warning"];
10
+ export type SemanticIconName = (typeof semanticIconNames)[number];
11
+ export type IconDirection = DesignSystemDirection;
12
+ export type IconDirectionality = "fixed" | "mirror-in-rtl";
13
+ export type IconTransform = "none" | "mirror-inline";
14
+ type IconAppearance = Readonly<{
15
+ size?: GlyphSize;
16
+ weight?: IconWeight;
17
+ directionality?: IconDirectionality;
18
+ }>;
19
+ export type DecorativeIconDescriptor<Name extends string = SemanticIconName> = IconAppearance & Readonly<{
20
+ name: Name;
21
+ tone?: IconTone;
22
+ decorative?: true;
23
+ accessibilityLabel?: never;
24
+ }>;
25
+ export type InformativeIconDescriptor<Name extends string = SemanticIconName> = IconAppearance & Readonly<{
26
+ name: Name;
27
+ /** Decorative is intentionally excluded because informative marks need contrast. */
28
+ tone?: Exclude<IconTone, "decorative">;
29
+ decorative: false;
30
+ accessibilityLabel: string;
31
+ }>;
32
+ export type IconDescriptor<Name extends string = SemanticIconName> = DecorativeIconDescriptor<Name> | InformativeIconDescriptor<Name>;
33
+ export type ResolvedIconDescriptor<Name extends string = SemanticIconName> = (Required<Omit<DecorativeIconDescriptor<Name>, "accessibilityLabel">> & Readonly<{
34
+ accessibilityLabel?: never;
35
+ }>) | Required<InformativeIconDescriptor<Name>>;
36
+ export declare function getIconDirectionality(name: string): IconDirectionality;
37
+ export declare function getIconTransform(directionality: IconDirectionality, direction: IconDirection): IconTransform;
38
+ export declare function validateIconDescriptor<Name extends string>(descriptor: IconDescriptor<Name>): void;
39
+ export declare function resolveIconDescriptor<Name extends string>(descriptor: IconDescriptor<Name>): ResolvedIconDescriptor<Name>;
40
+ export {};
41
+ //# sourceMappingURL=icon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../src/icon.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAEzE;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,6cA4CpB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,iBAAiB,CA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,KAAK,CAAA;CAAE,CAAC,CAAC,GAC3C,QAAQ,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,CAAC;AAE9C,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,kBAAkB,CAEtE;AAED,wBAAgB,gBAAgB,CAC9B,cAAc,EAAE,kBAAkB,EAClC,SAAS,EAAE,aAAa,GACvB,aAAa,CAUf;AAgBD,wBAAgB,sBAAsB,CAAC,IAAI,SAAS,MAAM,EACxD,UAAU,EAAE,cAAc,CAAC,IAAI,CAAC,GAC/B,IAAI,CAkDN;AAED,wBAAgB,qBAAqB,CAAC,IAAI,SAAS,MAAM,EACvD,UAAU,EAAE,cAAc,CAAC,IAAI,CAAC,GAC/B,sBAAsB,CAAC,IAAI,CAAC,CAqB9B"}
package/dist/icon.js ADDED
@@ -0,0 +1,147 @@
1
+ /**
2
+ * Shared semantic names. Renderers map these roles to their tree-shakeable SVG
3
+ * or native glyph component instead of leaking a third-party icon name into a
4
+ * product screen.
5
+ */
6
+ export const semanticIconNames = [
7
+ "add",
8
+ "ai",
9
+ "alert",
10
+ "back",
11
+ "calendar",
12
+ "check",
13
+ "chevronDown",
14
+ "chevronEnd",
15
+ "chevronStart",
16
+ "chevronUp",
17
+ "close",
18
+ "compare",
19
+ "copy",
20
+ "delete",
21
+ "download",
22
+ "edit",
23
+ "error",
24
+ "favorite",
25
+ "filter",
26
+ "forward",
27
+ "help",
28
+ "home",
29
+ "info",
30
+ "lock",
31
+ "menu",
32
+ "more",
33
+ "notifications",
34
+ "pause",
35
+ "play",
36
+ "refresh",
37
+ "search",
38
+ "settings",
39
+ "share",
40
+ "success",
41
+ "trendDown",
42
+ "trendFlat",
43
+ "trendUp",
44
+ "upload",
45
+ "user",
46
+ "users",
47
+ "visibility",
48
+ "visibilityOff",
49
+ "warning",
50
+ ];
51
+ const logicalIconNames = new Set([
52
+ "back",
53
+ "chevronEnd",
54
+ "chevronStart",
55
+ "forward",
56
+ ]);
57
+ export function getIconDirectionality(name) {
58
+ return logicalIconNames.has(name) ? "mirror-in-rtl" : "fixed";
59
+ }
60
+ export function getIconTransform(directionality, direction) {
61
+ if (directionality !== "fixed" && directionality !== "mirror-in-rtl") {
62
+ throw new TypeError(`Unsupported Icon directionality: ${String(directionality)}`);
63
+ }
64
+ if (direction !== "ltr" && direction !== "rtl") {
65
+ throw new TypeError(`Unsupported Icon direction: ${String(direction)}`);
66
+ }
67
+ return directionality === "mirror-in-rtl" && direction === "rtl"
68
+ ? "mirror-inline"
69
+ : "none";
70
+ }
71
+ const sizes = new Set(["xs", "sm", "md", "lg", "xl", "xxl", "xxxl"]);
72
+ const tones = new Set([
73
+ "primary",
74
+ "secondary",
75
+ "decorative",
76
+ "brand",
77
+ "info",
78
+ "success",
79
+ "warning",
80
+ "danger",
81
+ "inverse",
82
+ ]);
83
+ const weights = new Set(["regular", "strong"]);
84
+ export function validateIconDescriptor(descriptor) {
85
+ const runtimeName = descriptor.name;
86
+ const runtimeTone = descriptor.tone;
87
+ const runtimeDecorative = descriptor.decorative;
88
+ const runtimeLabel = descriptor.accessibilityLabel;
89
+ if (typeof runtimeName !== "string" || runtimeName.trim().length === 0) {
90
+ throw new TypeError("Icon name must not be empty");
91
+ }
92
+ if (runtimeName !== runtimeName.trim()) {
93
+ throw new TypeError("Icon name must not start or end with whitespace");
94
+ }
95
+ if (descriptor.size !== undefined && !sizes.has(descriptor.size)) {
96
+ throw new TypeError(`Unsupported Icon size: ${String(descriptor.size)}`);
97
+ }
98
+ if (runtimeTone !== undefined && !tones.has(runtimeTone)) {
99
+ throw new TypeError(`Unsupported Icon tone: ${String(runtimeTone)}`);
100
+ }
101
+ if (descriptor.weight !== undefined && !weights.has(descriptor.weight)) {
102
+ throw new TypeError(`Unsupported Icon weight: ${String(descriptor.weight)}`);
103
+ }
104
+ if (descriptor.directionality !== undefined &&
105
+ descriptor.directionality !== "fixed" &&
106
+ descriptor.directionality !== "mirror-in-rtl") {
107
+ throw new TypeError(`Unsupported Icon directionality: ${String(descriptor.directionality)}`);
108
+ }
109
+ if (runtimeDecorative !== undefined &&
110
+ runtimeDecorative !== true &&
111
+ runtimeDecorative !== false) {
112
+ throw new TypeError("Icon decorative must be a boolean when provided");
113
+ }
114
+ if (runtimeDecorative === false) {
115
+ if (typeof runtimeLabel !== "string" || runtimeLabel.trim().length === 0) {
116
+ throw new TypeError("Informative Icon accessibilityLabel must not be empty");
117
+ }
118
+ if (runtimeTone === "decorative") {
119
+ throw new TypeError("Informative Icon cannot use the decorative tone");
120
+ }
121
+ }
122
+ else if (runtimeLabel !== undefined) {
123
+ throw new TypeError("Decorative Icon must not provide accessibilityLabel");
124
+ }
125
+ }
126
+ export function resolveIconDescriptor(descriptor) {
127
+ validateIconDescriptor(descriptor);
128
+ const common = {
129
+ name: descriptor.name,
130
+ size: descriptor.size ?? "md",
131
+ tone: descriptor.tone ?? "secondary",
132
+ weight: descriptor.weight ?? "regular",
133
+ directionality: descriptor.directionality ?? getIconDirectionality(descriptor.name),
134
+ };
135
+ if (descriptor.decorative === false) {
136
+ return {
137
+ ...common,
138
+ decorative: false,
139
+ accessibilityLabel: descriptor.accessibilityLabel,
140
+ };
141
+ }
142
+ return {
143
+ ...common,
144
+ decorative: true,
145
+ };
146
+ }
147
+ //# sourceMappingURL=icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../src/icon.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,KAAK;IACL,IAAI;IACJ,OAAO;IACP,MAAM;IACN,UAAU;IACV,OAAO;IACP,aAAa;IACb,YAAY;IACZ,cAAc;IACd,WAAW;IACX,OAAO;IACP,SAAS;IACT,MAAM;IACN,QAAQ;IACR,UAAU;IACV,MAAM;IACN,OAAO;IACP,UAAU;IACV,QAAQ;IACR,SAAS;IACT,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,e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AI,UAAU,CAAC,UAAU,KAAK,KAAK,EAAE,CAAC;QACpC,OAAO;YACL,GAAG,MAAM;YACT,UAAU,EAAE,KAAK;YACjB,kBAAkB,EAAE,UAAU,CAAC,kBAAkB;SAClB,CAAC;IACpC,CAAC;IACD,OAAO;QACL,GAAG,MAAM;QACT,UAAU,EAAE,IAAI;KACe,CAAC;AACpC,CAAC","sourcesContent":["import type { GlyphSize } from \"./foundations.js\";\nimport type { IconTone, IconWeight } from \"./component-recipes.js\";\nimport type { DesignSystemDirection } from \"./design-system-provider.js\";\n\n/**\n * Shared semantic names. Renderers map these roles to their tree-shakeable SVG\n * or native glyph component instead of leaking a third-party icon name into a\n * product screen.\n */\nexport const semanticIconNames = [\n \"add\",\n \"ai\",\n \"alert\",\n \"back\",\n \"calendar\",\n \"check\",\n \"chevronDown\",\n \"chevronEnd\",\n \"chevronStart\",\n \"chevronUp\",\n \"close\",\n \"compare\",\n \"copy\",\n \"delete\",\n \"download\",\n \"edit\",\n \"error\",\n \"favorite\",\n \"filter\",\n \"forward\",\n \"help\",\n \"home\",\n \"info\",\n \"lock\",\n \"menu\",\n \"more\",\n \"notifications\",\n \"pause\",\n \"play\",\n \"refresh\",\n \"search\",\n \"settings\",\n \"share\",\n \"success\",\n \"trendDown\",\n \"trendFlat\",\n \"trendUp\",\n \"upload\",\n \"user\",\n \"users\",\n \"visibility\",\n \"visibilityOff\",\n \"warning\",\n] as const;\n\nexport type SemanticIconName = (typeof semanticIconNames)[number];\nexport type IconDirection = DesignSystemDirection;\nexport type IconDirectionality = \"fixed\" | \"mirror-in-rtl\";\nexport type IconTransform = \"none\" | \"mirror-inline\";\n\nconst logicalIconNames = new Set<string>([\n \"back\",\n \"chevronEnd\",\n \"chevronStart\",\n \"forward\",\n]);\n\ntype IconAppearance = Readonly<{\n size?: GlyphSize;\n weight?: IconWeight;\n directionality?: IconDirectionality;\n}>;\n\nexport type DecorativeIconDescriptor<Name extends string = SemanticIconName> =\n IconAppearance &\n Readonly<{\n name: Name;\n tone?: IconTone;\n decorative?: true;\n accessibilityLabel?: never;\n }>;\n\nexport type InformativeIconDescriptor<Name extends string = SemanticIconName> =\n IconAppearance &\n Readonly<{\n name: Name;\n /** Decorative is intentionally excluded because informative marks need contrast. */\n tone?: Exclude<IconTone, \"decorative\">;\n decorative: false;\n accessibilityLabel: string;\n }>;\n\nexport type IconDescriptor<Name extends string = SemanticIconName> =\n | DecorativeIconDescriptor<Name>\n | InformativeIconDescriptor<Name>;\n\nexport type ResolvedIconDescriptor<Name extends string = SemanticIconName> =\n | (Required<Omit<DecorativeIconDescriptor<Name>, \"accessibilityLabel\">> &\n Readonly<{ accessibilityLabel?: never }>)\n | Required<InformativeIconDescriptor<Name>>;\n\nexport function getIconDirectionality(name: string): IconDirectionality {\n return logicalIconNames.has(name) ? \"mirror-in-rtl\" : \"fixed\";\n}\n\nexport function getIconTransform(\n directionality: IconDirectionality,\n direction: IconDirection,\n): IconTransform {\n if (directionality !== \"fixed\" && directionality !== \"mirror-in-rtl\") {\n throw new TypeError(`Unsupported Icon directionality: ${String(directionality)}`);\n }\n if (direction !== \"ltr\" && direction !== \"rtl\") {\n throw new TypeError(`Unsupported Icon direction: ${String(direction)}`);\n }\n return directionality === \"mirror-in-rtl\" && direction === \"rtl\"\n ? \"mirror-inline\"\n : \"none\";\n}\n\nconst sizes = new Set<GlyphSize>([\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\", \"xxxl\"]);\nconst tones = new Set<IconTone>([\n \"primary\",\n \"secondary\",\n \"decorative\",\n \"brand\",\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"inverse\",\n]);\nconst weights = new Set<IconWeight>([\"regular\", \"strong\"]);\n\nexport function validateIconDescriptor<Name extends string>(\n descriptor: IconDescriptor<Name>,\n): void {\n const runtimeName = (descriptor as Readonly<{ name?: unknown }>).name;\n const runtimeTone = (descriptor as Readonly<{ tone?: unknown }>).tone;\n const runtimeDecorative = (\n descriptor as Readonly<{ decorative?: unknown }>\n ).decorative;\n const runtimeLabel = (\n descriptor as Readonly<{ accessibilityLabel?: unknown }>\n ).accessibilityLabel;\n if (typeof runtimeName !== \"string\" || runtimeName.trim().length === 0) {\n throw new TypeError(\"Icon name must not be empty\");\n }\n if (runtimeName !== runtimeName.trim()) {\n throw new TypeError(\"Icon name must not start or end with whitespace\");\n }\n if (descriptor.size !== undefined && !sizes.has(descriptor.size)) {\n throw new TypeError(`Unsupported Icon size: ${String(descriptor.size)}`);\n }\n if (runtimeTone !== undefined && !tones.has(runtimeTone as IconTone)) {\n throw new TypeError(`Unsupported Icon tone: ${String(runtimeTone)}`);\n }\n if (descriptor.weight !== undefined && !weights.has(descriptor.weight)) {\n throw new TypeError(`Unsupported Icon weight: ${String(descriptor.weight)}`);\n }\n if (\n descriptor.directionality !== undefined &&\n descriptor.directionality !== \"fixed\" &&\n descriptor.directionality !== \"mirror-in-rtl\"\n ) {\n throw new TypeError(\n `Unsupported Icon directionality: ${String(descriptor.directionality)}`,\n );\n }\n if (\n runtimeDecorative !== undefined &&\n runtimeDecorative !== true &&\n runtimeDecorative !== false\n ) {\n throw new TypeError(\"Icon decorative must be a boolean when provided\");\n }\n if (runtimeDecorative === false) {\n if (typeof runtimeLabel !== \"string\" || runtimeLabel.trim().length === 0) {\n throw new TypeError(\"Informative Icon accessibilityLabel must not be empty\");\n }\n if (runtimeTone === \"decorative\") {\n throw new TypeError(\"Informative Icon cannot use the decorative tone\");\n }\n } else if (runtimeLabel !== undefined) {\n throw new TypeError(\"Decorative Icon must not provide accessibilityLabel\");\n }\n}\n\nexport function resolveIconDescriptor<Name extends string>(\n descriptor: IconDescriptor<Name>,\n): ResolvedIconDescriptor<Name> {\n validateIconDescriptor(descriptor);\n const common = {\n name: descriptor.name,\n size: descriptor.size ?? \"md\",\n tone: descriptor.tone ?? \"secondary\",\n weight: descriptor.weight ?? \"regular\",\n directionality:\n descriptor.directionality ?? getIconDirectionality(descriptor.name),\n } as const;\n if (descriptor.decorative === false) {\n return {\n ...common,\n decorative: false,\n accessibilityLabel: descriptor.accessibilityLabel,\n } as ResolvedIconDescriptor<Name>;\n }\n return {\n ...common,\n decorative: true,\n } as ResolvedIconDescriptor<Name>;\n}\n"]}
@@ -0,0 +1,82 @@
1
+ export type ImageFit = "cover" | "contain" | "fill";
2
+ export type ImageLoadStatus = "idle" | "loading" | "loaded" | "error";
3
+ export declare const imageDefaults: {
4
+ readonly fit: "cover";
5
+ };
6
+ type ImageAppearance = Readonly<{
7
+ src: string;
8
+ /** Intrinsic dimensions reserve layout space before the asset loads. */
9
+ width: number;
10
+ height: number;
11
+ fit?: ImageFit;
12
+ }>;
13
+ /**
14
+ * Same shape as Icon's decorative/informative split: a picture that only
15
+ * repeats a caption or label already visible nearby stays decorative, and
16
+ * only a self-sufficient picture requires localized alt copy.
17
+ */
18
+ export type DecorativeImageDescriptor = ImageAppearance & Readonly<{
19
+ decorative?: true;
20
+ accessibilityLabel?: never;
21
+ }>;
22
+ export type InformativeImageDescriptor = ImageAppearance & Readonly<{
23
+ decorative: false;
24
+ accessibilityLabel: string;
25
+ }>;
26
+ export type ImageDescriptor = DecorativeImageDescriptor | InformativeImageDescriptor;
27
+ export type ResolvedImageDescriptor = (Required<Omit<DecorativeImageDescriptor, "accessibilityLabel">> & Readonly<{
28
+ accessibilityLabel?: never;
29
+ }>) | Required<InformativeImageDescriptor>;
30
+ export declare function validateImageDescriptor(descriptor: ImageDescriptor): void;
31
+ export declare function resolveImageDescriptor(descriptor: ImageDescriptor): ResolvedImageDescriptor;
32
+ /**
33
+ * Reserves layout space ahead of load so a slow asset never shifts
34
+ * surrounding content — the same problem `width`/`height` solve for
35
+ * `next/image`, translated without a bundler dependency.
36
+ */
37
+ export declare function resolveImageAspectRatio(width: number, height: number): number;
38
+ /**
39
+ * The fallback node on `error` always carries the resolved
40
+ * `accessibilityLabel`, never a generic "broken image" string. An
41
+ * informative picture's meaning does not disappear because the asset
42
+ * failed to load; only its visual form changes.
43
+ */
44
+ export declare function resolveImageFallbackAccessibilityLabel(descriptor: ResolvedImageDescriptor): string | undefined;
45
+ /**
46
+ * Web `object-fit` and RN `resizeMode` diverge only in the `fill` case;
47
+ * `fills` is the platform-neutral name and `nativeResizeModes` is the one
48
+ * translation renderers need, kept here instead of re-derived per product.
49
+ */
50
+ export declare const nativeResizeModes: {
51
+ readonly cover: "cover";
52
+ readonly contain: "contain";
53
+ readonly fill: "stretch";
54
+ };
55
+ export declare const imageRecipe: {
56
+ readonly slots: readonly ["root", "image", "placeholder", "fallbackIcon"];
57
+ readonly defaults: {
58
+ readonly fit: "cover";
59
+ };
60
+ readonly fits: readonly ImageFit[];
61
+ readonly placeholder: {
62
+ readonly background: Readonly<{
63
+ source: "theme";
64
+ key: "surfaceAlt";
65
+ alpha?: number;
66
+ }>;
67
+ };
68
+ readonly fallback: {
69
+ readonly background: Readonly<{
70
+ source: "theme";
71
+ key: "surfaceAlt";
72
+ alpha?: number;
73
+ }>;
74
+ readonly icon: {
75
+ readonly name: "error";
76
+ readonly tone: "secondary";
77
+ };
78
+ };
79
+ readonly radius: "md";
80
+ };
81
+ export {};
82
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../src/image.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACpD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtE,eAAO,MAAM,aAAa;;CAEsB,CAAC;AAEjD,KAAK,eAAe,GAAG,QAAQ,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;IACZ,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,QAAQ,CAAC;CAChB,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,yBAAyB,GAAG,eAAe,GACrD,QAAQ,CAAC;IAAE,UAAU,CAAC,EAAE,IAAI,CAAC;IAAC,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC;AAE9D,MAAM,MAAM,0BAA0B,GAAG,eAAe,GACtD,QAAQ,CAAC;IAAE,UAAU,EAAE,KAAK,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE9D,MAAM,MAAM,eAAe,GACvB,yBAAyB,GACzB,0BAA0B,CAAC;AAE/B,MAAM,MAAM,uBAAuB,GAC/B,CAAC,QAAQ,CAAC,IAAI,CAAC,yBAAyB,EAAE,oBAAoB,CAAC,CAAC,GAC9D,QAAQ,CAAC;IAAE,kBAAkB,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC,GAC3C,QAAQ,CAAC,0BAA0B,CAAC,CAAC;AAgBzC,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CA6BzE;AAED,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,eAAe,GAC1B,uBAAuB,CAgBzB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAI7E;AAED;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,UAAU,EAAE,uBAAuB,GAClC,MAAM,GAAG,SAAS,CAEpB;AAKD;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;CAIe,CAAC;AAE9C,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;CAYd,CAAC"}
package/dist/image.js ADDED
@@ -0,0 +1,100 @@
1
+ import { semanticColors } from "./semantic-colors.js";
2
+ export const imageDefaults = {
3
+ fit: "cover",
4
+ };
5
+ const fits = ["cover", "contain", "fill"];
6
+ function assertCopy(value, field) {
7
+ if (value.trim().length === 0) {
8
+ throw new TypeError(`Image ${field} must not be empty`);
9
+ }
10
+ }
11
+ function assertDimension(value, field) {
12
+ if (!Number.isFinite(value) || value <= 0) {
13
+ throw new RangeError(`Image ${field} must be a positive finite number`);
14
+ }
15
+ }
16
+ export function validateImageDescriptor(descriptor) {
17
+ assertCopy(descriptor.src, "src");
18
+ assertDimension(descriptor.width, "width");
19
+ assertDimension(descriptor.height, "height");
20
+ if (descriptor.fit !== undefined && !fits.includes(descriptor.fit)) {
21
+ throw new TypeError(`Unsupported Image fit: ${String(descriptor.fit)}`);
22
+ }
23
+ const runtimeDecorative = descriptor.decorative;
24
+ const runtimeLabel = descriptor.accessibilityLabel;
25
+ if (runtimeDecorative !== undefined &&
26
+ runtimeDecorative !== true &&
27
+ runtimeDecorative !== false) {
28
+ throw new TypeError("Image decorative must be a boolean when provided");
29
+ }
30
+ if (runtimeDecorative === false) {
31
+ if (typeof runtimeLabel !== "string" || runtimeLabel.trim().length === 0) {
32
+ throw new TypeError("Informative Image accessibilityLabel must not be empty");
33
+ }
34
+ }
35
+ else if (runtimeLabel !== undefined) {
36
+ throw new TypeError("Decorative Image must not provide accessibilityLabel");
37
+ }
38
+ }
39
+ export function resolveImageDescriptor(descriptor) {
40
+ validateImageDescriptor(descriptor);
41
+ const common = {
42
+ src: descriptor.src,
43
+ width: descriptor.width,
44
+ height: descriptor.height,
45
+ fit: descriptor.fit ?? imageDefaults.fit,
46
+ };
47
+ if (descriptor.decorative === false) {
48
+ return {
49
+ ...common,
50
+ decorative: false,
51
+ accessibilityLabel: descriptor.accessibilityLabel,
52
+ };
53
+ }
54
+ return { ...common, decorative: true };
55
+ }
56
+ /**
57
+ * Reserves layout space ahead of load so a slow asset never shifts
58
+ * surrounding content — the same problem `width`/`height` solve for
59
+ * `next/image`, translated without a bundler dependency.
60
+ */
61
+ export function resolveImageAspectRatio(width, height) {
62
+ assertDimension(width, "width");
63
+ assertDimension(height, "height");
64
+ return width / height;
65
+ }
66
+ /**
67
+ * The fallback node on `error` always carries the resolved
68
+ * `accessibilityLabel`, never a generic "broken image" string. An
69
+ * informative picture's meaning does not disappear because the asset
70
+ * failed to load; only its visual form changes.
71
+ */
72
+ export function resolveImageFallbackAccessibilityLabel(descriptor) {
73
+ return descriptor.decorative ? undefined : descriptor.accessibilityLabel;
74
+ }
75
+ const errorIconName = "error";
76
+ const fallbackIconTone = "secondary";
77
+ /**
78
+ * Web `object-fit` and RN `resizeMode` diverge only in the `fill` case;
79
+ * `fills` is the platform-neutral name and `nativeResizeModes` is the one
80
+ * translation renderers need, kept here instead of re-derived per product.
81
+ */
82
+ export const nativeResizeModes = {
83
+ cover: "cover",
84
+ contain: "contain",
85
+ fill: "stretch",
86
+ };
87
+ export const imageRecipe = {
88
+ slots: ["root", "image", "placeholder", "fallbackIcon"],
89
+ defaults: imageDefaults,
90
+ fits,
91
+ placeholder: {
92
+ background: semanticColors.surface.sunken,
93
+ },
94
+ fallback: {
95
+ background: semanticColors.surface.sunken,
96
+ icon: { name: errorIconName, tone: fallbackIconTone },
97
+ },
98
+ radius: "md",
99
+ };
100
+ //# sourceMappingURL=image.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.js","sourceRoot":"","sources":["../src/image.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,OAAO;CACkC,CAAC;AA8BjD,MAAM,IAAI,GAAwB,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;AAE/D,SAAS,UAAU,CAAC,KAAa,EAAE,KAAa;IAC9C,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,SAAS,CAAC,SAAS,KAAK,oBAAoB,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,KAAa,EAAE,KAAa;IACnD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAA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AAM;KAC1C;IACD,QAAQ,EAAE;QACR,UAAU,EAAE,cAAc,CAAC,OAAO,CAAC,MAAM;QACzC,IAAI,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE;KACtD;IACD,MAAM,EAAE,IAAI;CACJ,CAAC","sourcesContent":["import type { SemanticIconName } from \"./icon.js\";\nimport type { IconTone } from \"./component-recipes.js\";\nimport { semanticColors } from \"./semantic-colors.js\";\n\nexport type ImageFit = \"cover\" | \"contain\" | \"fill\";\nexport type ImageLoadStatus = \"idle\" | \"loading\" | \"loaded\" | \"error\";\n\nexport const imageDefaults = {\n fit: \"cover\",\n} as const satisfies Readonly<{ fit: ImageFit }>;\n\ntype ImageAppearance = Readonly<{\n src: string;\n /** Intrinsic dimensions reserve layout space before the asset loads. */\n width: number;\n height: number;\n fit?: ImageFit;\n}>;\n\n/**\n * Same shape as Icon's decorative/informative split: a picture that only\n * repeats a caption or label already visible nearby stays decorative, and\n * only a self-sufficient picture requires localized alt copy.\n */\nexport type DecorativeImageDescriptor = ImageAppearance &\n Readonly<{ decorative?: true; accessibilityLabel?: never }>;\n\nexport type InformativeImageDescriptor = ImageAppearance &\n Readonly<{ decorative: false; accessibilityLabel: string }>;\n\nexport type ImageDescriptor =\n | DecorativeImageDescriptor\n | InformativeImageDescriptor;\n\nexport type ResolvedImageDescriptor =\n | (Required<Omit<DecorativeImageDescriptor, \"accessibilityLabel\">> &\n Readonly<{ accessibilityLabel?: never }>)\n | Required<InformativeImageDescriptor>;\n\nconst fits: readonly ImageFit[] = [\"cover\", \"contain\", \"fill\"];\n\nfunction assertCopy(value: string, field: string): void {\n if (value.trim().length === 0) {\n throw new TypeError(`Image ${field} must not be empty`);\n }\n}\n\nfunction assertDimension(value: number, field: string): void {\n if (!Number.isFinite(value) || value <= 0) {\n throw new RangeError(`Image ${field} must be a positive finite number`);\n }\n}\n\nexport function validateImageDescriptor(descriptor: ImageDescriptor): void {\n assertCopy(descriptor.src, \"src\");\n assertDimension(descriptor.width, \"width\");\n assertDimension(descriptor.height, \"height\");\n if (descriptor.fit !== undefined && !fits.includes(descriptor.fit)) {\n throw new TypeError(`Unsupported Image fit: ${String(descriptor.fit)}`);\n }\n const runtimeDecorative = (\n descriptor as Readonly<{ decorative?: unknown }>\n ).decorative;\n const runtimeLabel = (\n descriptor as Readonly<{ accessibilityLabel?: unknown }>\n ).accessibilityLabel;\n if (\n runtimeDecorative !== undefined &&\n runtimeDecorative !== true &&\n runtimeDecorative !== false\n ) {\n throw new TypeError(\"Image decorative must be a boolean when provided\");\n }\n if (runtimeDecorative === false) {\n if (typeof runtimeLabel !== \"string\" || runtimeLabel.trim().length === 0) {\n throw new TypeError(\n \"Informative Image accessibilityLabel must not be empty\",\n );\n }\n } else if (runtimeLabel !== undefined) {\n throw new TypeError(\"Decorative Image must not provide accessibilityLabel\");\n }\n}\n\nexport function resolveImageDescriptor(\n descriptor: ImageDescriptor,\n): ResolvedImageDescriptor {\n validateImageDescriptor(descriptor);\n const common = {\n src: descriptor.src,\n width: descriptor.width,\n height: descriptor.height,\n fit: descriptor.fit ?? imageDefaults.fit,\n } as const;\n if (descriptor.decorative === false) {\n return {\n ...common,\n decorative: false,\n accessibilityLabel: descriptor.accessibilityLabel,\n } as ResolvedImageDescriptor;\n }\n return { ...common, decorative: true } as ResolvedImageDescriptor;\n}\n\n/**\n * Reserves layout space ahead of load so a slow asset never shifts\n * surrounding content — the same problem `width`/`height` solve for\n * `next/image`, translated without a bundler dependency.\n */\nexport function resolveImageAspectRatio(width: number, height: number): number {\n assertDimension(width, \"width\");\n assertDimension(height, \"height\");\n return width / height;\n}\n\n/**\n * The fallback node on `error` always carries the resolved\n * `accessibilityLabel`, never a generic \"broken image\" string. An\n * informative picture's meaning does not disappear because the asset\n * failed to load; only its visual form changes.\n */\nexport function resolveImageFallbackAccessibilityLabel(\n descriptor: ResolvedImageDescriptor,\n): string | undefined {\n return descriptor.decorative ? undefined : descriptor.accessibilityLabel;\n}\n\nconst errorIconName: SemanticIconName = \"error\";\nconst fallbackIconTone: IconTone = \"secondary\";\n\n/**\n * Web `object-fit` and RN `resizeMode` diverge only in the `fill` case;\n * `fills` is the platform-neutral name and `nativeResizeModes` is the one\n * translation renderers need, kept here instead of re-derived per product.\n */\nexport const nativeResizeModes = {\n cover: \"cover\",\n contain: \"contain\",\n fill: \"stretch\",\n} as const satisfies Record<ImageFit, string>;\n\nexport const imageRecipe = {\n slots: [\"root\", \"image\", \"placeholder\", \"fallbackIcon\"] as const,\n defaults: imageDefaults,\n fits,\n placeholder: {\n background: semanticColors.surface.sunken,\n },\n fallback: {\n background: semanticColors.surface.sunken,\n icon: { name: errorIconName, tone: fallbackIconTone },\n },\n radius: \"md\",\n} as const;\n"]}
@@ -0,0 +1,58 @@
1
+ export { getIconDirectionality, getIconTransform, resolveIconDescriptor, semanticIconNames, validateIconDescriptor, type DecorativeIconDescriptor, type IconDescriptor, type IconDirection, type IconDirectionality, type IconTransform, type InformativeIconDescriptor, type ResolvedIconDescriptor, type SemanticIconName, } from "./icon.js";
2
+ export { resolveLinkDescriptor, validateLinkDescriptor, validateLinkDestination, type ExternalLinkDestination, type InternalLinkDestination, type LinkDescriptor, type LinkDestination, type LinkIconDescriptor, type ResolvedLinkDescriptor, type ResolvedLinkIconDescriptor, } from "./link.js";
3
+ export { bottomNavigationBehaviorDefaults, resolveBottomNavigationActivation, resolveBottomNavigationConfiguration, resolveBottomNavigationDescriptor, resolveBottomNavigationItem, validateBottomNavigationConfiguration, validateBottomNavigationDescriptor, type BottomNavigationActivation, type BottomNavigationConfiguration, type BottomNavigationCounterBadge, type BottomNavigationDescriptor, type BottomNavigationDirection, type BottomNavigationIconDescriptor, type BottomNavigationItemDescriptor, type BottomNavigationKeyboardBehavior, type ResolvedBottomNavigationCounterBadge, type ResolvedBottomNavigationConfiguration, type ResolvedBottomNavigationDescriptor, type ResolvedBottomNavigationIconDescriptor, type ResolvedBottomNavigationItemDescriptor, } from "./bottom-navigation.js";
4
+ export { resolveTooltipDescriptor, tooltipBehaviorDefaults, tooltipDescriptorDefaults, validateTooltipDescriptor, validateTooltipOpenState, type ControlledTooltipOpenState, type ResolvedTooltipDescriptor, type TooltipAlign, type TooltipDescriptor, type TooltipOpenChangeDetails, type TooltipOpenChangeReason, type TooltipOpenState, type TooltipPlacement, type UncontrolledTooltipOpenState, } from "./tooltip.js";
5
+ export { alertDialogBehaviorDefaults, canDismissAlertDialog, createAlertDialogSession, getAlertDialogInitialFocus, validateAlertDialogRequest, type AlertDialogAsyncState, type AlertDialogCancelReason, type AlertDialogConfirmAction, type AlertDialogDismissReason, type AlertDialogInitialFocus, type AlertDialogMode, type AlertDialogOpenChangeReason, type AlertDialogOpenState, type AlertDialogPhase, type AlertDialogRequest, type AlertDialogResult, type AlertDialogSession, } from "./alert-dialog.js";
6
+ export { canDismissSheet, createSheetLifecycle, sheetBehaviorDefaults, type SheetDismissPolicy, type SheetDismissReason, type SheetLifecycle, type SheetOpenChangeDetails, type SheetOpenState, } from "./sheet.js";
7
+ export { createToastSession, createToastStore, resolveToastAnnouncement, resolveToastDescriptor, resolveToastDuration, toastBehaviorDefaults, validateToastDescriptor, type ResolvedToastActionDescriptor, type ResolvedToastDescriptor, type ToastActionDescriptor, type ToastAnnouncement, type ToastAnnouncementPriority, type ToastDescriptor, type ToastDismissReason, type ToastDuplicatePolicy, type ToastId, type ToastOverflowPolicy, type ToastPauseReason, type ToastPhase, type ToastPublishOptions, type ToastPublishResult, type ToastSession, type ToastSessionSnapshot, type ToastStore, type ToastStoreOptions, type ToastStoreSnapshot, type ToastTimerSnapshot, type ToastTimerStatus, type ToastTimerUpdatePolicy, } from "./toast.js";
8
+ export { resolveStatisticDescriptor, statisticDefaults, statisticTrendMarks, validateStatisticDescriptor, validateStatisticGroup, type ResolvedStatisticDescriptor, type ResolvedStatisticTrendDescriptor, type StatisticDescriptor, type StatisticGroupDescriptor, type StatisticTrendDescriptor, type StatisticTrendDirection, type StatisticTrendTone, } from "./statistic.js";
9
+ export { canRequestLoadMore, createLoadMoreController, loadMoreBehaviorDefaults, validateLoadMoreDescriptor, validateLoadMoreLabels, validateLoadMoreState, type LoadMoreCompleteState, type LoadMoreController, type LoadMoreControllerOptions, type LoadMoreControllerSnapshot, type LoadMoreDescriptor, type LoadMoreErrorState, type LoadMoreLabels, type LoadMoreLoadingState, type LoadMoreMode, type LoadMoreReadyState, type LoadMoreRequest, type LoadMoreRequestHandler, type LoadMoreRequestOutcome, type LoadMoreRequestReason, type LoadMoreState, } from "./load-more.js";
10
+ export { collectionValidationDefaults, flattenCollectionItems, getCollectionNavigationIntent, getCollectionNavigationTarget, getCollectionTypeaheadMatch, isComboboxResultCurrent, reconcileSelectSelection, resolveComboboxSelectedItem, resolveCollectionItem, resolveSelectSelectedItem, validateCollection, type CollectionNavigationIntent, type CollectionSource, type SelectCollectionSectionDescriptor, type SelectCollectionSource, type CollectionTypeaheadOptions, type CollectionValidationOptions, type ComboboxCollectionState, type ComboboxState, type ReconcileSelectOptions, type SelectCollectionState, type SelectConfiguration, type SelectLabel, type SelectOpenChangeReason, type SelectOpenState, type SelectState, } from "./collection.js";
11
+ export { ACCENTS, THEMES, accentFill, accentTint, brandGradient, isThemePreference, onAccentFill, onBrandGradient, withAlpha, type AccentTone, type ResolvedTheme, type ThemeColors, type ThemePreference, } from "./colors.js";
12
+ export { backdrop, breakpoint, control, easing, fontFamily, fontWeight, glyph, heading, layer, layout, letterSpacing, motion, motionPreset, numeric, opacity, overlay, radius, scrim, shadow, spacing, spring, stateLayer, stroke, typography, type BackdropReference, type FontFamily, type FontWeight, type FontWeightValue, type GlyphSize, type HeadingLevel, type LetterSpacing, type NumericVariant, type ReducedMotionBehavior, type TextVariant, } from "./foundations.js";
13
+ export { resolveResponsiveValue, resolveWindowClass, validateResponsiveValue, windowClassOrder, type ResponsiveValue, type WindowClass, } from "./responsive.js";
14
+ export { gridDefaults, gridGaps, gridRecipe, resolveGridLayout, validateGridDescriptor, type GridDescriptor, type GridGap, type GridGapToken, type ResolveGridLayoutOptions, type ResolvedGridLayout, } from "./grid.js";
15
+ export { accordionRecipe, alertDialogRecipe, avatarRecipe, badgeRecipe, bottomNavigationRecipe, bottomCtaRecipe, buttonRecipe, cardRecipe, chipRecipe, comboboxRecipe, counterBadgeRecipe, dialogRecipe, dividerRecipe, emptyStateRecipe, fieldRecipe, formatCounterBadgeCount, iconButtonRecipe, iconRecipe, linkRecipe, listRecipe, listRowRecipe, loadMoreRecipe, menuRecipe, noticeRecipe, progressRecipe, searchFieldRecipe, selectRecipe, selectionGroupRecipe, sectionRecipe, segmentedControlRecipe, selectionControlRecipe, sheetRecipe, skeletonRecipe, spinnerRecipe, surfaceDefaults, surfaceGeometry, stackRecipe, statisticRecipe, surfaceRecipe, switchRecipe, tabsRecipe, textRecipe, toastRecipe, tooltipRecipe, topBarRecipe, type AccordionDensity, type AlertDialogTone, type AvatarShape, type AvatarSize, type BadgeSize, type BadgeTone, type BadgeVariant, type BottomNavigationDensity, type BottomNavigationDistribution, type BottomNavigationPresentation, type ButtonSize, type ButtonTone, type CardHeadingLevel, type ChipSize, type SelectDensity, type SelectSize, type CounterBadgeSize, type CounterBadgeTone, type CounterBadgeVariant, type DialogSize, type FieldShape, type FieldVariant, type IconButtonShape, type IconButtonSize, type IconTone, type IconWeight, type LinkTone, type LinkVariant, type LoadMoreDensity, type ListRowDensity, type MenuDensity, type MenuItemTone, type NoticeTone, type ProgressSize, type ProgressTone, type SearchFieldSize, type SegmentedControlSize, type SelectionControlKind, type SelectionControlPresentation, type SelectionControlSize, type SelectionGroupOrientation, type SelectionGroupPresentation, type SpinnerSize, type SpinnerTone, type StackAlign, type StackAxis, type StackGap, type StackJustify, type StatisticDensity, type StatisticPresentation, type SurfaceTone, type SurfacePadding, type SurfaceRadius, type SwitchSize, type TabSize, type TabsLayout, type TabsOverflow, type TextEmphasis, type TextTone, type ToastPlacement, type ToastTone, type ToastToneMark, } from "./recipes.js";
16
+ export { accentColor, resolveColorReference, solidAccentColor, themeColor, type AccentColorReference, type AccentFillReference, type ColorReference, type ColorReferencePalette, type ThemeColorReference, } from "./color-references.js";
17
+ export { componentCatalog, getComponentSurfaceStatus, recipeRegistry, summarizeComponentRoadmap, type ComponentCatalogEntry, type ComponentCategory, type ComponentName, type ComponentPlatform, type ComponentRoadmap, type ComponentRoadmapState, type ComponentSurface, type ComponentSurfaceMaturity, type ComponentSurfaceStatus, type ComponentStatus, type RecipeName, } from "./catalog.js";
18
+ export { designSystemVersion } from "./version.js";
19
+ export { antDesignReferenceComponents, antDesignReferenceSystem, getAntDesignReferencesFor, summarizeAntDesignCoverage, type AntDesignCategory, type AntDesignComponentName, type AntDesignReferenceComponent, type ReferenceCoverageSummary, type ReferenceRelationship, } from "./component-references.js";
20
+ export { componentDefinitions, componentIds, getComponentDefinition, type ComponentDefinition, type ComponentId, type ComponentKind, } from "./component-definitions.js";
21
+ export { semanticColors } from "./semantic-colors.js";
22
+ export { behaviorRegistry, checkboxBehaviorDefaults, comboboxBehaviorDefaults, getCheckboxNextState, getRadioNavigationTarget, getSelectionNavigationIntent, getTabNavigationIntent, getTabNavigationTarget, reconcileCheckboxSelection, reconcileRadioSelection, radioGroupBehaviorDefaults, resolveInitialRadioValue, resolveControlAccessibleName, resolveRadioTabStop, resolveInitialTabValue, selectionGroupBehaviorDefaults, selectBehaviorDefaults, tabsBehaviorDefaults, toggleCheckboxSelection, validateCheckboxSelection, validateRadioSelection, validateSelectionItems, type AsyncCollectionState, type AvailabilityState, type BehaviorContract, type BehaviorName, type BehaviorStateAxis, type CollectionItemDescriptor, type CollectionItemTone, type CollectionKey, type CollectionSectionDescriptor, type MenuItemDescriptor, type MenuSectionDescriptor, type CollectionSelectionModel, type ComboboxCommitReason, type ComboboxFiltering, type ComboboxInput, type ControlledComboboxInput, type ControlledSelectSelection, type ControlledCheckboxGroupSelection, type ControlledCheckboxState, type ControlledRadioGroupSelection, type ContentState, type ControlledTabsSelection, type InteractionState, type MixedCheckboxActivation, type MultipleSelectionModel, type NativeAccessibilityState, type NoSelectionModel, type SingleSelectionModel, type SelectItemDescriptor, type SelectSelection, type CheckboxGroupSelection, type CheckboxSelection, type CheckboxState, type RadioGroupSelection, type SelectionDirection, type SelectionGroupLabel, type SelectionItemDescriptor, type SelectionNavigationIntent, type SelectionOrientation, type TabDescriptor, type TabNavigationIntent, type TabsActivationMode, type TabsDirection, type TabsMountPolicy, type TabsOrientation, type TabsPanelMode, type TabsSelection, type UncontrolledTabsSelection, type UncontrolledComboboxInput, type UncontrolledSelectSelection, type UncontrolledCheckboxGroupSelection, type UncontrolledCheckboxState, type UncontrolledRadioGroupSelection, type ValidationState, type ValueState, type WebKeyboardKey, } from "./behaviors.js";
23
+ export { collectionItemContract, fieldFrameContract, floatingSurfaceContract, focusIndicatorContract, formSupportContract, } from "./component-contracts.js";
24
+ export { assertShowcaseCoverage, createShowcaseCoverage, createShowcaseManifest, getRequiredShowcaseScenarios, getRequiredShowcaseEvidence, getRequiredShowcaseSurfaces, getShowcaseEnvironmentInput, getShowcaseStoryId, showcaseEnvironmentMatrix, showcaseManifest, showcaseScenarios, summarizeShowcaseMaturity, type ShowcaseComponentEntry, type ShowcaseCoverageEntry, type ShowcaseDirection, type ShowcaseEnvironment, type ShowcaseEvidenceEntry, type ShowcaseEvidenceRequirement, type ShowcaseMotionPreference, type ShowcaseScenario, type ShowcaseScenarioId, type ShowcaseSurface, type ShowcaseTextScale, type ShowcaseTheme, } from "./showcase.js";
25
+ export { assertShowcaseStoryIds, compareShowcaseStoryIds, createDesignSystemEvidence, createDesignSystemEvidenceCoverage, defineDesignSystemEvidence, designSystemEvidenceSchemaVersion, getShowcaseStoryIdsForSurface, toShowcaseEvidenceEntries, type DesignSystemEvidenceItem, type DesignSystemEvidenceManifest, type DesignSystemEvidenceSource, type DesignSystemEvidenceSourceKind, type ShowcaseStoryIdComparison, } from "./evidence.js";
26
+ export * from "./breadcrumb.js";
27
+ export * from "./calendar.js";
28
+ export * from "./carousel.js";
29
+ export * from "./command-palette.js";
30
+ export * from "./design-system-provider.js";
31
+ export * from "./floating-action-button.js";
32
+ export * from "./content-state.js";
33
+ export * from "./data-table.js";
34
+ export * from "./mentions.js";
35
+ export * from "./transfer-list.js";
36
+ export * from "./tour.js";
37
+ export * from "./layout.js";
38
+ export * from "./otp-field.js";
39
+ export * from "./password-field.js";
40
+ export * from "./splitter.js";
41
+ export * from "./tree-select.js";
42
+ export * from "./date-picker.js";
43
+ export * from "./side-panel.js";
44
+ export * from "./file-picker.js";
45
+ export * from "./pagination.js";
46
+ export * from "./popover.js";
47
+ export * from "./upload-item.js";
48
+ export * from "./timeline.js";
49
+ export * from "./tree.js";
50
+ export * from "./steps.js";
51
+ export * from "./number-field.js";
52
+ export * from "./slider.js";
53
+ export * from "./form.js";
54
+ export * from "./tag.js";
55
+ export * from "./description-list.js";
56
+ export * from "./result.js";
57
+ export * from "./image.js";
58
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,yBAAyB,EAC9B,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,0BAA0B,GAChC,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,gCAAgC,EAChC,iCAAiC,EACjC,oCAAoC,EACpC,iCAAiC,EACjC,2BAA2B,E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AAiB,EACtB,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,EAC1B,kCAAkC,EAClC,0BAA0B,EAC1B,iCAAiC,EACjC,6BAA6B,EAC7B,yBAAyB,EACzB,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EACjC,KAAK,0BAA0B,EAC/B,KAAK,8BAA8B,EACnC,KAAK,yBAAyB,GAC/B,MAAM,eAAe,CAAC;AAUvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,uBAAuB,CAAC;AACtC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,66 @@
1
+ export { getIconDirectionality, getIconTransform, resolveIconDescriptor, semanticIconNames, validateIconDescriptor, } from "./icon.js";
2
+ export { resolveLinkDescriptor, validateLinkDescriptor, validateLinkDestination, } from "./link.js";
3
+ export { bottomNavigationBehaviorDefaults, resolveBottomNavigationActivation, resolveBottomNavigationConfiguration, resolveBottomNavigationDescriptor, resolveBottomNavigationItem, validateBottomNavigationConfiguration, validateBottomNavigationDescriptor, } from "./bottom-navigation.js";
4
+ export { resolveTooltipDescriptor, tooltipBehaviorDefaults, tooltipDescriptorDefaults, validateTooltipDescriptor, validateTooltipOpenState, } from "./tooltip.js";
5
+ export { alertDialogBehaviorDefaults, canDismissAlertDialog, createAlertDialogSession, getAlertDialogInitialFocus, validateAlertDialogRequest, } from "./alert-dialog.js";
6
+ export { canDismissSheet, createSheetLifecycle, sheetBehaviorDefaults, } from "./sheet.js";
7
+ export { createToastSession, createToastStore, resolveToastAnnouncement, resolveToastDescriptor, resolveToastDuration, toastBehaviorDefaults, validateToastDescriptor, } from "./toast.js";
8
+ export { resolveStatisticDescriptor, statisticDefaults, statisticTrendMarks, validateStatisticDescriptor, validateStatisticGroup, } from "./statistic.js";
9
+ export { canRequestLoadMore, createLoadMoreController, loadMoreBehaviorDefaults, validateLoadMoreDescriptor, validateLoadMoreLabels, validateLoadMoreState, } from "./load-more.js";
10
+ export { collectionValidationDefaults, flattenCollectionItems, getCollectionNavigationIntent, getCollectionNavigationTarget, getCollectionTypeaheadMatch, isComboboxResultCurrent, reconcileSelectSelection, resolveComboboxSelectedItem, resolveCollectionItem, resolveSelectSelectedItem, validateCollection, } from "./collection.js";
11
+ export { ACCENTS, THEMES, accentFill, accentTint, brandGradient, isThemePreference, onAccentFill, onBrandGradient, withAlpha, } from "./colors.js";
12
+ export { backdrop, breakpoint, control, easing, fontFamily, fontWeight, glyph, heading, layer, layout, letterSpacing, motion, motionPreset, numeric, opacity, overlay, radius, scrim, shadow, spacing, spring, stateLayer, stroke, typography, } from "./foundations.js";
13
+ export { resolveResponsiveValue, resolveWindowClass, validateResponsiveValue, windowClassOrder, } from "./responsive.js";
14
+ export { gridDefaults, gridGaps, gridRecipe, resolveGridLayout, validateGridDescriptor, } from "./grid.js";
15
+ export { accordionRecipe, alertDialogRecipe, avatarRecipe, badgeRecipe, bottomNavigationRecipe, bottomCtaRecipe, buttonRecipe, cardRecipe, chipRecipe, comboboxRecipe, counterBadgeRecipe, dialogRecipe, dividerRecipe, emptyStateRecipe, fieldRecipe, formatCounterBadgeCount, iconButtonRecipe, iconRecipe, linkRecipe, listRecipe, listRowRecipe, loadMoreRecipe, menuRecipe, noticeRecipe, progressRecipe, searchFieldRecipe, selectRecipe, selectionGroupRecipe, sectionRecipe, segmentedControlRecipe, selectionControlRecipe, sheetRecipe, skeletonRecipe, spinnerRecipe, surfaceDefaults, surfaceGeometry, stackRecipe, statisticRecipe, surfaceRecipe, switchRecipe, tabsRecipe, textRecipe, toastRecipe, tooltipRecipe, topBarRecipe, } from "./recipes.js";
16
+ export { accentColor, resolveColorReference, solidAccentColor, themeColor, } from "./color-references.js";
17
+ export { componentCatalog, getComponentSurfaceStatus, recipeRegistry, summarizeComponentRoadmap, } from "./catalog.js";
18
+ export { designSystemVersion } from "./version.js";
19
+ export { antDesignReferenceComponents, antDesignReferenceSystem, getAntDesignReferencesFor, summarizeAntDesignCoverage, } from "./component-references.js";
20
+ export { componentDefinitions, componentIds, getComponentDefinition, } from "./component-definitions.js";
21
+ export { semanticColors } from "./semantic-colors.js";
22
+ export { behaviorRegistry, checkboxBehaviorDefaults, comboboxBehaviorDefaults, getCheckboxNextState, getRadioNavigationTarget, getSelectionNavigationIntent, getTabNavigationIntent, getTabNavigationTarget, reconcileCheckboxSelection, reconcileRadioSelection, radioGroupBehaviorDefaults, resolveInitialRadioValue, resolveControlAccessibleName, resolveRadioTabStop, resolveInitialTabValue, selectionGroupBehaviorDefaults, selectBehaviorDefaults, tabsBehaviorDefaults, toggleCheckboxSelection, validateCheckboxSelection, validateRadioSelection, validateSelectionItems, } from "./behaviors.js";
23
+ export { collectionItemContract, fieldFrameContract, floatingSurfaceContract, focusIndicatorContract, formSupportContract, } from "./component-contracts.js";
24
+ export { assertShowcaseCoverage, createShowcaseCoverage, createShowcaseManifest, getRequiredShowcaseScenarios, getRequiredShowcaseEvidence, getRequiredShowcaseSurfaces, getShowcaseEnvironmentInput, getShowcaseStoryId, showcaseEnvironmentMatrix, showcaseManifest, showcaseScenarios, summarizeShowcaseMaturity, } from "./showcase.js";
25
+ export { assertShowcaseStoryIds, compareShowcaseStoryIds, createDesignSystemEvidence, createDesignSystemEvidenceCoverage, defineDesignSystemEvidence, designSystemEvidenceSchemaVersion, getShowcaseStoryIdsForSurface, toShowcaseEvidenceEntries, } from "./evidence.js";
26
+ /*
27
+ Batch 2 — 계약과 recipe가 준비된 컴포넌트.
28
+
29
+ catalog의 status는 여전히 `planned`다. 로드맵의 maturity gate가 `planned → beta` 승격에
30
+ **실제 제품 vertical slice 한 번**을 요구하므로, 계약이 준비된 것과 검증된 것을 섞지
31
+ 않는다. 여기 있는 심볼은 제품이 renderer를 붙일 수 있다는 뜻이고, 붙여서 검증되면
32
+ 그때 리드가 catalog를 올린다.
33
+ */
34
+ export * from "./breadcrumb.js";
35
+ export * from "./calendar.js";
36
+ export * from "./carousel.js";
37
+ export * from "./command-palette.js";
38
+ export * from "./design-system-provider.js";
39
+ export * from "./floating-action-button.js";
40
+ export * from "./content-state.js";
41
+ export * from "./data-table.js";
42
+ export * from "./mentions.js";
43
+ export * from "./transfer-list.js";
44
+ export * from "./tour.js";
45
+ export * from "./layout.js";
46
+ export * from "./otp-field.js";
47
+ export * from "./password-field.js";
48
+ export * from "./splitter.js";
49
+ export * from "./tree-select.js";
50
+ export * from "./date-picker.js";
51
+ export * from "./side-panel.js";
52
+ export * from "./file-picker.js";
53
+ export * from "./pagination.js";
54
+ export * from "./popover.js";
55
+ export * from "./upload-item.js";
56
+ export * from "./timeline.js";
57
+ export * from "./tree.js";
58
+ export * from "./steps.js";
59
+ export * from "./number-field.js";
60
+ export * from "./slider.js";
61
+ export * from "./form.js";
62
+ export * from "./tag.js";
63
+ export * from "./description-list.js";
64
+ export * from "./result.js";
65
+ export * from "./image.js";
66
+ //# sourceMappingURL=index.js.map