@sovereignsquad/gds-core 6.10.0 → 6.12.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 (490) hide show
  1. package/dist/AISearchCard.js +97 -0
  2. package/dist/AISearchCard.mjs +73 -0
  3. package/dist/AccentPanel.js +94 -0
  4. package/dist/AccentPanel.mjs +69 -0
  5. package/dist/AccessRecoveryPanel.js +164 -0
  6. package/dist/AccessRecoveryPanel.mjs +140 -0
  7. package/dist/AccessSummary.js +57 -0
  8. package/dist/AccessSummary.mjs +33 -0
  9. package/dist/AccessibilityEvidence.js +131 -0
  10. package/dist/AccessibilityEvidence.mjs +104 -0
  11. package/dist/ActionBar.js +84 -0
  12. package/dist/ActionBar.mjs +60 -0
  13. package/dist/AdvancedDataTable.client.js +204 -0
  14. package/dist/AdvancedDataTable.client.mjs +180 -0
  15. package/dist/ArticleShell.js +43 -0
  16. package/dist/ArticleShell.mjs +19 -0
  17. package/dist/AsyncSurface.js +156 -0
  18. package/dist/AsyncSurface.mjs +132 -0
  19. package/dist/AuthShell.js +72 -0
  20. package/dist/AuthShell.mjs +48 -0
  21. package/dist/BottomTabBar.js +152 -0
  22. package/dist/BottomTabBar.mjs +128 -0
  23. package/dist/BottomTabBar.shared.js +31 -0
  24. package/dist/BottomTabBar.shared.mjs +6 -0
  25. package/dist/BoundedPreviewSurface.js +54 -0
  26. package/dist/BoundedPreviewSurface.mjs +30 -0
  27. package/dist/BrowseSelection.client.js +50 -0
  28. package/dist/BrowseSelection.client.mjs +26 -0
  29. package/dist/BrowseSurface.js +151 -0
  30. package/dist/BrowseSurface.mjs +127 -0
  31. package/dist/CardContracts.js +97 -0
  32. package/dist/CardContracts.mjs +68 -0
  33. package/dist/ChartTokenPanel.js +102 -0
  34. package/dist/ChartTokenPanel.mjs +78 -0
  35. package/dist/ChatSurface.js +217 -0
  36. package/dist/ChatSurface.mjs +190 -0
  37. package/dist/ChoiceChip.js +257 -0
  38. package/dist/ChoiceChip.mjs +230 -0
  39. package/dist/CommandPalette.client.js +129 -0
  40. package/dist/CommandPalette.client.mjs +103 -0
  41. package/dist/ConfirmDialog.js +65 -0
  42. package/dist/ConfirmDialog.mjs +41 -0
  43. package/dist/ConsumerDashboardGrid.js +35 -0
  44. package/dist/ConsumerDashboardGrid.mjs +11 -0
  45. package/dist/ConsumerSection.js +38 -0
  46. package/dist/ConsumerSection.mjs +14 -0
  47. package/dist/CreatorTheme.js +146 -0
  48. package/dist/CreatorTheme.mjs +120 -0
  49. package/dist/CtaButtonGroup.js +38 -0
  50. package/dist/CtaButtonGroup.mjs +14 -0
  51. package/dist/DataToolbar.js +63 -0
  52. package/dist/DataToolbar.mjs +39 -0
  53. package/dist/DetailFactsTable.js +134 -0
  54. package/dist/DetailFactsTable.mjs +110 -0
  55. package/dist/DetailFactsTable.shared.js +41 -0
  56. package/dist/DetailFactsTable.shared.mjs +16 -0
  57. package/dist/DetailProfileShell.js +52 -0
  58. package/dist/DetailProfileShell.mjs +28 -0
  59. package/dist/DiscoveryShell.js +189 -0
  60. package/dist/DiscoveryShell.mjs +164 -0
  61. package/dist/DocsCodeBlock.js +67 -0
  62. package/dist/DocsCodeBlock.mjs +43 -0
  63. package/dist/DocsCodeDisclosure.js +74 -0
  64. package/dist/DocsCodeDisclosure.mjs +50 -0
  65. package/dist/DocsPageShell.js +55 -0
  66. package/dist/DocsPageShell.mjs +31 -0
  67. package/dist/DocsShell.js +205 -0
  68. package/dist/DocsShell.mjs +180 -0
  69. package/dist/EditorialCard.js +140 -0
  70. package/dist/EditorialCard.mjs +116 -0
  71. package/dist/EditorialHero.js +247 -0
  72. package/dist/EditorialHero.mjs +223 -0
  73. package/dist/EmptyState.js +37 -0
  74. package/dist/EmptyState.mjs +13 -0
  75. package/dist/EvidencePanel.js +85 -0
  76. package/dist/EvidencePanel.mjs +61 -0
  77. package/dist/FeatureBand.js +90 -0
  78. package/dist/FeatureBand.mjs +66 -0
  79. package/dist/FeedbackRuntime.client.js +264 -0
  80. package/dist/FeedbackRuntime.client.mjs +237 -0
  81. package/dist/FilterDrawer.js +67 -0
  82. package/dist/FilterDrawer.mjs +43 -0
  83. package/dist/FitScoreChip.js +72 -0
  84. package/dist/FitScoreChip.mjs +48 -0
  85. package/dist/FoodMenuSection.js +79 -0
  86. package/dist/FoodMenuSection.mjs +55 -0
  87. package/dist/FormField.js +37 -0
  88. package/dist/FormField.mjs +13 -0
  89. package/dist/GameBoardTile.js +63 -0
  90. package/dist/GameBoardTile.mjs +39 -0
  91. package/dist/GdsAccentContrastMatrix.js +102 -0
  92. package/dist/GdsAccentContrastMatrix.mjs +85 -0
  93. package/dist/GdsAccessGate.js +226 -0
  94. package/dist/GdsAccessGate.mjs +204 -0
  95. package/dist/GdsAccessGateRuntime.js +236 -0
  96. package/dist/GdsAccessGateRuntime.mjs +203 -0
  97. package/dist/GdsAccessibilitySystemReference.js +78 -0
  98. package/dist/GdsAccessibilitySystemReference.mjs +54 -0
  99. package/dist/GdsAssetManager.client.js +208 -0
  100. package/dist/GdsAssetManager.client.mjs +180 -0
  101. package/dist/GdsBadge.js +115 -0
  102. package/dist/GdsBadge.mjs +91 -0
  103. package/dist/GdsBadge.shared-D2Cs4eos.d.mts +35 -0
  104. package/dist/GdsBadge.shared-D2Cs4eos.d.ts +35 -0
  105. package/dist/GdsBadge.shared.js +42 -0
  106. package/dist/GdsBadge.shared.mjs +16 -0
  107. package/dist/GdsBadgeStack.js +58 -0
  108. package/dist/GdsBadgeStack.mjs +33 -0
  109. package/dist/GdsBreadcrumbs.js +42 -0
  110. package/dist/GdsBreadcrumbs.mjs +18 -0
  111. package/dist/GdsBulkActionBar.js +73 -0
  112. package/dist/GdsBulkActionBar.mjs +49 -0
  113. package/dist/GdsButtonFeedbackReference.js +289 -0
  114. package/dist/GdsButtonFeedbackReference.mjs +273 -0
  115. package/dist/GdsChart.js +169 -0
  116. package/dist/GdsChart.mjs +145 -0
  117. package/dist/GdsChart.shared.js +247 -0
  118. package/dist/GdsChart.shared.mjs +215 -0
  119. package/dist/GdsColorSystemReference.js +116 -0
  120. package/dist/GdsColorSystemReference.mjs +100 -0
  121. package/dist/GdsCompareButton.js +79 -0
  122. package/dist/GdsCompareButton.mjs +55 -0
  123. package/dist/GdsContentDesign.js +371 -0
  124. package/dist/GdsContentDesign.mjs +339 -0
  125. package/dist/GdsCountBadge.js +70 -0
  126. package/dist/GdsCountBadge.mjs +46 -0
  127. package/dist/GdsDataTable.client.js +412 -0
  128. package/dist/GdsDataTable.client.mjs +385 -0
  129. package/dist/GdsDateInput.client.js +116 -0
  130. package/dist/GdsDateInput.client.mjs +90 -0
  131. package/dist/GdsDensity.js +46 -0
  132. package/dist/GdsDensity.mjs +20 -0
  133. package/dist/GdsDensitySpacingSystemReference.js +70 -0
  134. package/dist/GdsDensitySpacingSystemReference.mjs +52 -0
  135. package/dist/GdsDesignHandoff.js +250 -0
  136. package/dist/GdsDesignHandoff.mjs +222 -0
  137. package/dist/GdsDesignRuleProfilePanel.js +80 -0
  138. package/dist/GdsDesignRuleProfilePanel.mjs +61 -0
  139. package/dist/GdsForm.client.js +303 -0
  140. package/dist/GdsForm.client.mjs +271 -0
  141. package/dist/GdsFormControls.js +193 -0
  142. package/dist/GdsFormControls.mjs +166 -0
  143. package/dist/GdsGeneratedAvatar.js +86 -0
  144. package/dist/GdsGeneratedAvatar.mjs +65 -0
  145. package/dist/GdsGeneratedAvatar.shared.js +34 -0
  146. package/dist/GdsGeneratedAvatar.shared.mjs +10 -0
  147. package/dist/GdsGeneratedHero.js +277 -0
  148. package/dist/GdsGeneratedHero.mjs +256 -0
  149. package/dist/GdsGeneratedMark.js +90 -0
  150. package/dist/GdsGeneratedMark.mjs +66 -0
  151. package/dist/GdsGeneratedThumbnail.js +301 -0
  152. package/dist/GdsGeneratedThumbnail.mjs +280 -0
  153. package/dist/GdsI18nRuntime.js +83 -0
  154. package/dist/GdsI18nRuntime.mjs +52 -0
  155. package/dist/GdsI18nRuntime.shared.js +232 -0
  156. package/dist/GdsI18nRuntime.shared.mjs +198 -0
  157. package/dist/GdsIconBadge.js +60 -0
  158. package/dist/GdsIconBadge.mjs +36 -0
  159. package/dist/GdsIconSystemReference.js +128 -0
  160. package/dist/GdsIconSystemReference.mjs +104 -0
  161. package/dist/GdsInlineLink.js +42 -0
  162. package/dist/{chunk-W5O2JSVK.mjs → GdsInlineLink.mjs} +1 -3
  163. package/dist/GdsLogoLockup.js +131 -0
  164. package/dist/GdsLogoLockup.mjs +107 -0
  165. package/dist/GdsMap.client.js +395 -0
  166. package/dist/GdsMap.client.mjs +358 -0
  167. package/dist/GdsMapBasemapWash.js +51 -0
  168. package/dist/GdsMapBasemapWash.mjs +25 -0
  169. package/dist/GdsMapFilterRail.js +84 -0
  170. package/dist/GdsMapFilterRail.mjs +60 -0
  171. package/dist/GdsMapPinBadge.js +95 -0
  172. package/dist/{chunk-NTNVQZJU.mjs → GdsMapPinBadge.mjs} +12 -30
  173. package/dist/GdsMapPinBadge.shared.js +43 -0
  174. package/dist/GdsMapPinBadge.shared.mjs +14 -0
  175. package/dist/GdsMapPinPreviewCard.js +134 -0
  176. package/dist/GdsMapPinPreviewCard.mjs +110 -0
  177. package/dist/GdsMessageThread.js +92 -0
  178. package/dist/GdsMessageThread.mjs +68 -0
  179. package/dist/GdsMeter.js +46 -0
  180. package/dist/GdsMeter.mjs +22 -0
  181. package/dist/GdsMotionSystemReference.js +124 -0
  182. package/dist/GdsMotionSystemReference.mjs +106 -0
  183. package/dist/GdsNotificationBell.js +78 -0
  184. package/dist/GdsNotificationBell.mjs +54 -0
  185. package/dist/GdsPageTemplateFrame.js +178 -0
  186. package/dist/GdsPageTemplateFrame.mjs +150 -0
  187. package/dist/GdsPageTemplates.client.js +129 -0
  188. package/dist/GdsPageTemplates.client.mjs +104 -0
  189. package/dist/GdsPageTemplates.js +279 -0
  190. package/dist/GdsPageTemplates.mjs +247 -0
  191. package/dist/GdsPageTemplates.shared.js +331 -0
  192. package/dist/GdsPageTemplates.shared.mjs +303 -0
  193. package/dist/GdsPictogramSystemReference.js +288 -0
  194. package/dist/GdsPictogramSystemReference.mjs +264 -0
  195. package/dist/GdsPinSystemReference.js +164 -0
  196. package/dist/GdsPinSystemReference.mjs +147 -0
  197. package/dist/GdsPrimitives.js +84 -0
  198. package/dist/GdsPrimitives.mjs +62 -0
  199. package/dist/GdsRatingDisplay.js +61 -0
  200. package/dist/GdsRatingDisplay.mjs +37 -0
  201. package/dist/GdsReleaseNotes.client.js +126 -0
  202. package/dist/GdsReleaseNotes.client.mjs +102 -0
  203. package/dist/GdsRemovableTag.js +61 -0
  204. package/dist/GdsRemovableTag.mjs +37 -0
  205. package/dist/GdsResourceManager.client.js +280 -0
  206. package/dist/GdsResourceManager.client.mjs +254 -0
  207. package/dist/GdsRichTextEditor.client.js +146 -0
  208. package/dist/GdsRichTextEditor.client.mjs +112 -0
  209. package/dist/GdsSavedIndicator.js +62 -0
  210. package/dist/GdsSavedIndicator.mjs +38 -0
  211. package/dist/GdsSchemaForm.client.js +679 -0
  212. package/dist/GdsSchemaForm.client.mjs +650 -0
  213. package/dist/GdsShapeElevationSystemReference.js +140 -0
  214. package/dist/GdsShapeElevationSystemReference.mjs +125 -0
  215. package/dist/GdsShapeScope.js +44 -0
  216. package/dist/GdsShapeScope.mjs +19 -0
  217. package/dist/GdsTableScrollContainer.js +46 -0
  218. package/dist/GdsTableScrollContainer.mjs +22 -0
  219. package/dist/GdsThreadList.js +118 -0
  220. package/dist/GdsThreadList.mjs +94 -0
  221. package/dist/GdsTour.client.js +399 -0
  222. package/dist/GdsTour.client.mjs +380 -0
  223. package/dist/GdsTreeView.js +194 -0
  224. package/dist/GdsTreeView.mjs +170 -0
  225. package/dist/GdsTypographySystemReference.js +77 -0
  226. package/dist/GdsTypographySystemReference.mjs +57 -0
  227. package/dist/GdsViewToggle.js +48 -0
  228. package/dist/GdsViewToggle.mjs +24 -0
  229. package/dist/GdsViewportFrame.js +61 -0
  230. package/dist/GdsViewportFrame.mjs +37 -0
  231. package/dist/HeroSearchPanel.client.js +135 -0
  232. package/dist/HeroSearchPanel.client.mjs +109 -0
  233. package/dist/KanbanBoard.client.js +400 -0
  234. package/dist/KanbanBoard.client.mjs +382 -0
  235. package/dist/LayoutBlocks.js +331 -0
  236. package/dist/LayoutBlocks.mjs +301 -0
  237. package/dist/LayoutPrimitives.js +501 -0
  238. package/dist/LayoutPrimitives.mjs +465 -0
  239. package/dist/LayoutTemplatePreview.client.js +172 -0
  240. package/dist/LayoutTemplatePreview.client.mjs +151 -0
  241. package/dist/ListingCard.js +397 -0
  242. package/dist/ListingCard.mjs +373 -0
  243. package/dist/ListingCard.shared.js +49 -0
  244. package/dist/ListingCard.shared.mjs +18 -0
  245. package/dist/ListingPrimitives.js +116 -0
  246. package/dist/ListingPrimitives.mjs +89 -0
  247. package/dist/ListingState.client.js +98 -0
  248. package/dist/ListingState.client.mjs +72 -0
  249. package/dist/MapPanel.js +93 -0
  250. package/dist/MapPanel.mjs +69 -0
  251. package/dist/MaturityCapabilities.js +211 -0
  252. package/dist/MaturityCapabilities.mjs +184 -0
  253. package/dist/MeaningBadge.js +65 -0
  254. package/dist/MeaningBadge.mjs +41 -0
  255. package/dist/MediaCard.js +61 -0
  256. package/dist/MediaCard.mjs +37 -0
  257. package/dist/MediaField.js +117 -0
  258. package/dist/MediaField.mjs +93 -0
  259. package/dist/MediaPreviewCard.js +90 -0
  260. package/dist/MediaPreviewCard.mjs +66 -0
  261. package/dist/MediaWithFallback.js +112 -0
  262. package/dist/MediaWithFallback.mjs +88 -0
  263. package/dist/MetricCard.js +60 -0
  264. package/dist/MetricCard.mjs +36 -0
  265. package/dist/Notifications.client.js +301 -0
  266. package/dist/Notifications.client.mjs +273 -0
  267. package/dist/Notifications.js +220 -0
  268. package/dist/Notifications.mjs +194 -0
  269. package/dist/Notifications.shared.js +52 -0
  270. package/dist/Notifications.shared.mjs +26 -0
  271. package/dist/NumberStepper.js +124 -0
  272. package/dist/NumberStepper.mjs +100 -0
  273. package/dist/OverlayManager.client.js +300 -0
  274. package/dist/OverlayManager.client.mjs +270 -0
  275. package/dist/OwnedContrastSurface.js +83 -0
  276. package/dist/OwnedContrastSurface.mjs +58 -0
  277. package/dist/PageHeader.js +48 -0
  278. package/dist/PageHeader.mjs +24 -0
  279. package/dist/{PartnerDiscovery-pdJmaKwq.d.ts → PartnerDiscovery-BUwzROQc.d.mts} +37 -35
  280. package/dist/{PartnerDiscovery-Dy3YnO02.d.mts → PartnerDiscovery-DmIj5bAw.d.ts} +37 -35
  281. package/dist/PartnerDiscovery.js +629 -0
  282. package/dist/{chunk-PCG34VRY.mjs → PartnerDiscovery.mjs} +19 -106
  283. package/dist/PartnerDiscovery.shared.js +116 -0
  284. package/dist/PartnerDiscovery.shared.mjs +84 -0
  285. package/dist/PeriodSelector.js +69 -0
  286. package/dist/PeriodSelector.mjs +45 -0
  287. package/dist/PlaceholderPanel.js +59 -0
  288. package/dist/PlaceholderPanel.mjs +35 -0
  289. package/dist/PlaybackControls.client.js +91 -0
  290. package/dist/PlaybackControls.client.mjs +65 -0
  291. package/dist/PlaybackSurface.js +107 -0
  292. package/dist/PlaybackSurface.mjs +83 -0
  293. package/dist/ProductCard.js +75 -0
  294. package/dist/ProductCard.mjs +51 -0
  295. package/dist/ProgressCard.js +58 -0
  296. package/dist/ProgressCard.mjs +34 -0
  297. package/dist/ProviderCTA.js +104 -0
  298. package/dist/ProviderCTA.mjs +80 -0
  299. package/dist/ProviderIdentityButtons.js +221 -0
  300. package/dist/ProviderIdentityButtons.mjs +192 -0
  301. package/dist/PublicBrandFooter.js +70 -0
  302. package/dist/PublicBrandFooter.mjs +46 -0
  303. package/dist/PublicCaptureFlow.js +125 -0
  304. package/dist/PublicCaptureFlow.mjs +95 -0
  305. package/dist/PublicFlowShell.js +128 -0
  306. package/dist/PublicFlowShell.mjs +104 -0
  307. package/dist/PublicFoodCard.js +153 -0
  308. package/dist/PublicFoodCard.mjs +129 -0
  309. package/dist/PublicNav.js +51 -0
  310. package/dist/PublicNav.mjs +27 -0
  311. package/dist/PublicProductCard.js +145 -0
  312. package/dist/PublicProductCard.mjs +121 -0
  313. package/dist/PublicShell.js +168 -0
  314. package/dist/PublicShell.mjs +144 -0
  315. package/dist/PublicSiteFooter.js +35 -0
  316. package/dist/PublicSiteFooter.mjs +11 -0
  317. package/dist/{QuickStartCard-BqbYrKRY.d.ts → QuickStartCard-CYKhDjvS.d.ts} +805 -161
  318. package/dist/{QuickStartCard-lE9kMqH8.d.mts → QuickStartCard-DT2GgJrP.d.mts} +805 -161
  319. package/dist/QuickStartCard.js +85 -0
  320. package/dist/QuickStartCard.mjs +60 -0
  321. package/dist/ReferenceLinkGrid.js +66 -0
  322. package/dist/ReferenceLinkGrid.mjs +42 -0
  323. package/dist/ReferenceLocaleNotice.js +32 -0
  324. package/dist/ReferenceLocaleNotice.mjs +8 -0
  325. package/dist/ReferenceSection.js +58 -0
  326. package/dist/ReferenceSection.mjs +34 -0
  327. package/dist/ReferenceThemeExplorer.copy.js +1209 -0
  328. package/dist/ReferenceThemeExplorer.copy.mjs +1184 -0
  329. package/dist/ReferenceThemeExplorer.js +801 -0
  330. package/dist/ReferenceThemeExplorer.mjs +802 -0
  331. package/dist/ReportingSection.js +72 -0
  332. package/dist/ReportingSection.mjs +48 -0
  333. package/dist/SafeStyles.js +303 -0
  334. package/dist/SafeStyles.mjs +274 -0
  335. package/dist/SearchableSelect.js +195 -0
  336. package/dist/SearchableSelect.mjs +171 -0
  337. package/dist/SectionPanel.js +96 -0
  338. package/dist/SectionPanel.mjs +72 -0
  339. package/dist/SemanticButton.js +326 -0
  340. package/dist/SemanticButton.mjs +296 -0
  341. package/dist/SemanticCharts.js +120 -0
  342. package/dist/SemanticCharts.mjs +77 -0
  343. package/dist/ShareButtonGroup.js +117 -0
  344. package/dist/ShareButtonGroup.mjs +93 -0
  345. package/dist/SidebarNav.js +92 -0
  346. package/dist/SidebarNav.mjs +66 -0
  347. package/dist/SimpleDataTable.js +59 -0
  348. package/dist/SimpleDataTable.mjs +35 -0
  349. package/dist/SocialAuthButtons.js +71 -0
  350. package/dist/SocialAuthButtons.mjs +49 -0
  351. package/dist/StateBlock.js +118 -0
  352. package/dist/StateBlock.mjs +95 -0
  353. package/dist/StatsSection.js +63 -0
  354. package/dist/StatsSection.mjs +39 -0
  355. package/dist/StatusBadge.js +94 -0
  356. package/dist/StatusBadge.mjs +68 -0
  357. package/dist/StyleUtilities.js +123 -0
  358. package/dist/StyleUtilities.mjs +91 -0
  359. package/dist/SurfacePresentation.js +63 -0
  360. package/dist/SurfacePresentation.mjs +38 -0
  361. package/dist/TaskPatterns.js +206 -0
  362. package/dist/TaskPatterns.mjs +180 -0
  363. package/dist/Telemetry.client.js +273 -0
  364. package/dist/Telemetry.client.mjs +243 -0
  365. package/dist/ThemeToggle.js +53 -0
  366. package/dist/{chunk-ZFGYQSNR.mjs → ThemeToggle.mjs} +3 -7
  367. package/dist/TrustLayer.client.js +184 -0
  368. package/dist/TrustLayer.client.mjs +158 -0
  369. package/dist/TrustLayer.js +94 -0
  370. package/dist/TrustLayer.mjs +68 -0
  371. package/dist/TrustLayer.shared.js +37 -0
  372. package/dist/TrustLayer.shared.mjs +13 -0
  373. package/dist/Typography.js +68 -0
  374. package/dist/Typography.mjs +37 -0
  375. package/dist/UploadDropzone.js +144 -0
  376. package/dist/UploadDropzone.mjs +120 -0
  377. package/dist/badge-shapes.js +75 -0
  378. package/dist/badge-shapes.mjs +44 -0
  379. package/dist/breakpoints.js +34 -0
  380. package/dist/breakpoints.mjs +10 -0
  381. package/dist/category-registry.js +33 -0
  382. package/dist/category-registry.mjs +9 -0
  383. package/dist/chart-colors.js +73 -0
  384. package/dist/chart-colors.mjs +44 -0
  385. package/dist/chart-primitives.js +169 -0
  386. package/dist/chart-primitives.mjs +144 -0
  387. package/dist/client.d.mts +3 -3
  388. package/dist/client.d.ts +3 -3
  389. package/dist/client.js +378 -23797
  390. package/dist/client.mjs +161 -959
  391. package/dist/dom-phrase-translation.js +130 -0
  392. package/dist/dom-phrase-translation.mjs +104 -0
  393. package/dist/generated-art-engine.js +119 -0
  394. package/dist/generated-art-engine.mjs +93 -0
  395. package/dist/generated-art-svg.js +263 -0
  396. package/dist/generated-art-svg.mjs +238 -0
  397. package/dist/generated-brand-badge.js +160 -0
  398. package/dist/generated-brand-badge.mjs +136 -0
  399. package/dist/generated-design-rule-coverage.js +54 -0
  400. package/dist/generated-design-rule-coverage.mjs +30 -0
  401. package/dist/icons.js +371 -0
  402. package/dist/{chunk-J66ITCXC.mjs → icons.mjs} +22 -15
  403. package/dist/index.d.mts +13 -12
  404. package/dist/index.d.ts +13 -12
  405. package/dist/index.js +448 -26709
  406. package/dist/index.mjs +192 -3008
  407. package/dist/locales/ar.js +477 -0
  408. package/dist/{chunk-7NNKXZFF.mjs → locales/ar.mjs} +3 -5
  409. package/dist/locales/de.js +477 -0
  410. package/dist/{chunk-TVGDH5O5.mjs → locales/de.mjs} +1 -3
  411. package/dist/locales/en.js +477 -0
  412. package/dist/{chunk-D65VHUXK.mjs → locales/en.mjs} +1 -3
  413. package/dist/locales/es.js +477 -0
  414. package/dist/{chunk-J4TSXITU.mjs → locales/es.mjs} +1 -3
  415. package/dist/locales/fr.js +477 -0
  416. package/dist/{chunk-Z6XXK57E.mjs → locales/fr.mjs} +1 -3
  417. package/dist/locales/he.js +477 -0
  418. package/dist/{chunk-YASVRGKJ.mjs → locales/he.mjs} +2 -4
  419. package/dist/locales/hu.js +477 -0
  420. package/dist/{chunk-CWMDWMYL.mjs → locales/hu.mjs} +1 -3
  421. package/dist/locales/index.js +83 -0
  422. package/dist/locales/index.mjs +45 -0
  423. package/dist/locales/it.js +477 -0
  424. package/dist/{chunk-V5WUGRFL.mjs → locales/it.mjs} +2 -4
  425. package/dist/locales/ja.js +477 -0
  426. package/dist/{chunk-XL7MGQJ4.mjs → locales/ja.mjs} +2 -4
  427. package/dist/locales/ko.js +477 -0
  428. package/dist/{chunk-PLJT4I7B.mjs → locales/ko.mjs} +1 -3
  429. package/dist/locales/lazy/all.js +23 -5449
  430. package/dist/locales/lazy/all.mjs +12 -39
  431. package/dist/locales/lazy/ar.js +3 -919
  432. package/dist/locales/lazy/ar.mjs +2 -9
  433. package/dist/locales/lazy/de.js +3 -919
  434. package/dist/locales/lazy/de.mjs +2 -9
  435. package/dist/locales/lazy/es.js +3 -919
  436. package/dist/locales/lazy/es.mjs +2 -9
  437. package/dist/locales/lazy/fr.js +3 -919
  438. package/dist/locales/lazy/fr.mjs +2 -9
  439. package/dist/locales/lazy/he.js +3 -919
  440. package/dist/locales/lazy/he.mjs +2 -9
  441. package/dist/locales/lazy/hu.js +3 -919
  442. package/dist/locales/lazy/hu.mjs +2 -9
  443. package/dist/locales/lazy/index.js +3 -477
  444. package/dist/locales/lazy/index.mjs +1 -5
  445. package/dist/locales/lazy/it.js +3 -919
  446. package/dist/locales/lazy/it.mjs +2 -9
  447. package/dist/locales/lazy/ja.js +3 -919
  448. package/dist/locales/lazy/ja.mjs +2 -9
  449. package/dist/locales/lazy/ko.js +3 -919
  450. package/dist/locales/lazy/ko.mjs +2 -9
  451. package/dist/locales/lazy/registry.js +47 -0
  452. package/dist/{chunk-TD3JPMMO.mjs → locales/lazy/registry.mjs} +6 -11
  453. package/dist/locales/lazy/ru.js +3 -919
  454. package/dist/locales/lazy/ru.mjs +2 -9
  455. package/dist/locales/lazy/zh.js +3 -919
  456. package/dist/locales/lazy/zh.mjs +2 -9
  457. package/dist/locales/ru.js +477 -0
  458. package/dist/{chunk-RBXAJJB2.mjs → locales/ru.mjs} +1 -3
  459. package/dist/locales/zh.js +477 -0
  460. package/dist/{chunk-V6SP5O4D.mjs → locales/zh.mjs} +1 -3
  461. package/dist/map-tile-policy.js +55 -0
  462. package/dist/map-tile-policy.mjs +29 -0
  463. package/dist/map.d.mts +1 -3
  464. package/dist/map.d.ts +1 -3
  465. package/dist/map.js +6 -749
  466. package/dist/map.mjs +2 -389
  467. package/dist/pictograms.js +112 -0
  468. package/dist/pictograms.mjs +88 -0
  469. package/dist/pictograms.shared.js +262 -0
  470. package/dist/pictograms.shared.mjs +226 -0
  471. package/dist/reference-theme-explorer.js +3 -10401
  472. package/dist/reference-theme-explorer.mjs +1 -2008
  473. package/dist/rich-text-editor.js +3 -450
  474. package/dist/rich-text-editor.mjs +1 -115
  475. package/dist/server.d.mts +6 -5
  476. package/dist/server.d.ts +6 -5
  477. package/dist/server.js +304 -18097
  478. package/dist/server.mjs +120 -1122
  479. package/dist/useGdsDomPhraseTranslation.client.js +49 -0
  480. package/dist/useGdsDomPhraseTranslation.client.mjs +25 -0
  481. package/dist/vocabulary.js +166 -0
  482. package/dist/vocabulary.mjs +137 -0
  483. package/package.json +5 -5
  484. package/dist/GdsBadge-j_kQnIL0.d.mts +0 -417
  485. package/dist/GdsBadge-j_kQnIL0.d.ts +0 -417
  486. package/dist/chunk-LTNPECWV.mjs +0 -6676
  487. package/dist/chunk-MO5TLIIB.mjs +0 -8311
  488. package/dist/chunk-PJR3OJJD.mjs +0 -2468
  489. package/dist/chunk-SPPTDVJC.mjs +0 -211
  490. package/dist/chunk-SV3VL3GG.mjs +0 -246
@@ -0,0 +1,465 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ import { Box } from "@mantine/core";
4
+ const breakpointPixels = {
5
+ xs: 480,
6
+ sm: 640,
7
+ md: 768,
8
+ lg: 1024,
9
+ xl: 1280
10
+ };
11
+ const GdsMantineBox = Box;
12
+ const spacingTokenMap = {
13
+ none: "0",
14
+ xs: "var(--mantine-spacing-xs)",
15
+ sm: "var(--mantine-spacing-sm)",
16
+ md: "var(--mantine-spacing-md)",
17
+ lg: "var(--mantine-spacing-lg)",
18
+ xl: "var(--mantine-spacing-xl)",
19
+ "2xl": "calc(var(--mantine-spacing-xl) * 1.5)"
20
+ };
21
+ const sizeTokenMap = {
22
+ none: "0",
23
+ xs: "var(--mantine-spacing-xs)",
24
+ sm: "var(--mantine-spacing-sm)",
25
+ md: "var(--mantine-spacing-md)",
26
+ lg: "var(--mantine-spacing-lg)",
27
+ xl: "var(--mantine-spacing-xl)",
28
+ "2xl": "calc(var(--mantine-spacing-xl) * 1.5)",
29
+ aside: "18rem",
30
+ content: "42rem",
31
+ narrow: "56rem",
32
+ page: "72rem",
33
+ wide: "88rem",
34
+ full: "100%"
35
+ };
36
+ const alignMap = {
37
+ start: "flex-start",
38
+ center: "center",
39
+ end: "flex-end",
40
+ stretch: "stretch",
41
+ baseline: "baseline"
42
+ };
43
+ const justifyMap = {
44
+ start: "flex-start",
45
+ center: "center",
46
+ end: "flex-end",
47
+ between: "space-between",
48
+ around: "space-around",
49
+ evenly: "space-evenly"
50
+ };
51
+ const wrapMap = {
52
+ wrap: "wrap",
53
+ nowrap: "nowrap",
54
+ reverse: "wrap-reverse"
55
+ };
56
+ function isResponsiveRecord(value) {
57
+ return Boolean(value && typeof value === "object" && !Array.isArray(value));
58
+ }
59
+ function normalizeGdsResponsiveValue(value) {
60
+ if (value === void 0) {
61
+ return { breakpoints: {} };
62
+ }
63
+ if (!isResponsiveRecord(value)) {
64
+ return { base: value, breakpoints: {} };
65
+ }
66
+ const { base, xs, sm, md, lg, xl } = value;
67
+ return { base, breakpoints: { xs, sm, md, lg, xl } };
68
+ }
69
+ function resolveSpacing(value) {
70
+ if (value === void 0) return void 0;
71
+ if (value === 0) return "0";
72
+ return spacingTokenMap[value];
73
+ }
74
+ function resolveSize(value) {
75
+ if (value === void 0) return void 0;
76
+ return sizeTokenMap[value];
77
+ }
78
+ function hashLayoutSignature(input) {
79
+ let hash = 0;
80
+ for (let index = 0; index < input.length; index += 1) {
81
+ hash = (hash << 5) - hash + input.charCodeAt(index) | 0;
82
+ }
83
+ return `gds-layout-${Math.abs(hash).toString(36)}`;
84
+ }
85
+ function hasBreakpoints(value) {
86
+ return Object.values(normalizeGdsResponsiveValue(value).breakpoints).some((entry) => entry !== void 0);
87
+ }
88
+ function responsiveCss(className, property, value, resolver, fallback) {
89
+ if (!hasBreakpoints(value)) return "";
90
+ const normalized = normalizeGdsResponsiveValue(value);
91
+ const base = normalized.base ?? fallback;
92
+ const resolvedBase = base === void 0 ? void 0 : resolver(base);
93
+ const baseRule = resolvedBase === void 0 ? "" : `.${className}{${property}:${resolvedBase};}`;
94
+ const rules = Object.entries(normalized.breakpoints).filter((entry) => entry[1] !== void 0).map(([breakpoint, nextValue]) => {
95
+ const resolved = resolver(nextValue);
96
+ return resolved === void 0 ? "" : `@media (min-width: ${breakpointPixels[breakpoint]}px){.${className}{${property}:${resolved};}}`;
97
+ }).filter(Boolean);
98
+ return baseRule + rules.join("");
99
+ }
100
+ function baseValue(value, fallback) {
101
+ const normalized = normalizeGdsResponsiveValue(value);
102
+ return normalized.base ?? fallback;
103
+ }
104
+ function composeResponsiveClass(signature) {
105
+ return hashLayoutSignature(JSON.stringify(signature));
106
+ }
107
+ function renderResponsiveStyle(css) {
108
+ return css ? /* @__PURE__ */ jsx("style", { "data-gds-layout": true, children: css }) : null;
109
+ }
110
+ function resolveGdsLayoutStyle({
111
+ display = "block",
112
+ gap,
113
+ padding,
114
+ margin,
115
+ align,
116
+ justify,
117
+ overflow,
118
+ minWidth,
119
+ maxWidth,
120
+ style
121
+ }) {
122
+ return {
123
+ boxSizing: "border-box",
124
+ display: baseValue(display, "block"),
125
+ gap: resolveSpacing(baseValue(gap, "none")),
126
+ padding: resolveSpacing(baseValue(padding, "none")),
127
+ margin: resolveSpacing(baseValue(margin, "none")),
128
+ alignItems: alignMap[baseValue(align, "stretch")],
129
+ justifyContent: justifyMap[baseValue(justify, "start")],
130
+ overflow,
131
+ minWidth: minWidth === "zero" ? 0 : minWidth === "content" ? "max-content" : void 0,
132
+ maxWidth: resolveSize(baseValue(maxWidth, "full")),
133
+ ...style
134
+ };
135
+ }
136
+ function sharedResponsiveCss(className, props) {
137
+ return [
138
+ responsiveCss(className, "display", props.display, (value) => String(value), "block"),
139
+ responsiveCss(className, "gap", props.gap, resolveSpacing, "none"),
140
+ responsiveCss(className, "padding", props.padding, resolveSpacing, "none"),
141
+ responsiveCss(className, "margin", props.margin, resolveSpacing, "none"),
142
+ responsiveCss(className, "align-items", props.align, (value) => alignMap[value], "stretch"),
143
+ responsiveCss(className, "justify-content", props.justify, (value) => justifyMap[value], "start"),
144
+ responsiveCss(className, "max-width", props.maxWidth, resolveSize, "full")
145
+ ].join("");
146
+ }
147
+ function withoutResponsiveInline(computed, explicit, entries) {
148
+ const next = { ...computed };
149
+ for (const [value, key] of entries) {
150
+ if (hasBreakpoints(value) && !(explicit && key in explicit)) delete next[key];
151
+ }
152
+ return next;
153
+ }
154
+ function joinClassNames(...classNames) {
155
+ return classNames.filter(Boolean).join(" ") || void 0;
156
+ }
157
+ const GdsBox = forwardRef(function GdsBox2({
158
+ children,
159
+ className,
160
+ component = "div",
161
+ display = "block",
162
+ gap,
163
+ padding,
164
+ margin,
165
+ align,
166
+ justify,
167
+ overflow,
168
+ minWidth = "zero",
169
+ maxWidth,
170
+ style,
171
+ ...props
172
+ }, ref) {
173
+ const generatedClassName = composeResponsiveClass({ display, gap, padding, margin, align, justify, maxWidth });
174
+ const css = sharedResponsiveCss(generatedClassName, { display, gap, padding, margin, align, justify, maxWidth });
175
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
176
+ renderResponsiveStyle(css),
177
+ /* @__PURE__ */ jsx(
178
+ GdsMantineBox,
179
+ {
180
+ ref,
181
+ component,
182
+ className: joinClassNames(generatedClassName, className),
183
+ style: withoutResponsiveInline(
184
+ resolveGdsLayoutStyle({ display, gap, padding, margin, align, justify, overflow, minWidth, maxWidth, style }),
185
+ style,
186
+ [[display, "display"], [gap, "gap"], [padding, "padding"], [margin, "margin"], [align, "alignItems"], [justify, "justifyContent"], [maxWidth, "maxWidth"]]
187
+ ),
188
+ ...props,
189
+ children
190
+ }
191
+ )
192
+ ] });
193
+ });
194
+ const GdsStack = forwardRef(function GdsStack2({
195
+ reverse = false,
196
+ gap = "md",
197
+ align = "stretch",
198
+ component = "div",
199
+ style,
200
+ ...props
201
+ }, ref) {
202
+ return /* @__PURE__ */ jsx(
203
+ GdsBox,
204
+ {
205
+ ref,
206
+ component,
207
+ display: "flex",
208
+ gap,
209
+ align,
210
+ style: { flexDirection: reverse ? "column-reverse" : "column", ...style },
211
+ ...props
212
+ }
213
+ );
214
+ });
215
+ const GdsInline = forwardRef(function GdsInline2({
216
+ gap = "sm",
217
+ align = "center",
218
+ justify = "start",
219
+ wrap = "wrap",
220
+ component = "div",
221
+ className,
222
+ style,
223
+ ...props
224
+ }, ref) {
225
+ const generatedClassName = composeResponsiveClass({ wrap });
226
+ const css = responsiveCss(generatedClassName, "flex-wrap", wrap, (value) => wrapMap[value], "wrap");
227
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
228
+ renderResponsiveStyle(css),
229
+ /* @__PURE__ */ jsx(
230
+ GdsBox,
231
+ {
232
+ ref,
233
+ component,
234
+ display: "flex",
235
+ gap,
236
+ align,
237
+ justify,
238
+ className: joinClassNames(generatedClassName, className),
239
+ style: { flexWrap: hasBreakpoints(wrap) ? void 0 : wrapMap[baseValue(wrap, "wrap")], minWidth: 0, ...style },
240
+ ...props
241
+ }
242
+ )
243
+ ] });
244
+ });
245
+ const GdsCluster = forwardRef(function GdsCluster2({
246
+ align = "center",
247
+ justify = "between",
248
+ gap = "sm",
249
+ ...props
250
+ }, ref) {
251
+ return /* @__PURE__ */ jsx(GdsInline, { ref, align, justify, gap, ...props });
252
+ });
253
+ function resolveGridColumns(columns, minColumnWidth) {
254
+ if (typeof columns === "number") {
255
+ return `repeat(${columns}, minmax(0, 1fr))`;
256
+ }
257
+ if (columns === "auto-fill" || columns === "auto-fit") {
258
+ return `repeat(${columns}, minmax(min(100%, ${resolveSize(minColumnWidth)}), 1fr))`;
259
+ }
260
+ return "repeat(1, minmax(0, 1fr))";
261
+ }
262
+ const GdsGrid = forwardRef(function GdsGrid2({
263
+ columns = { base: 1, md: 2 },
264
+ minColumnWidth = "content",
265
+ gap = "md",
266
+ component = "div",
267
+ className,
268
+ style,
269
+ ...props
270
+ }, ref) {
271
+ const generatedClassName = composeResponsiveClass({ columns, minColumnWidth });
272
+ const css = responsiveCss(generatedClassName, "grid-template-columns", columns, (value) => resolveGridColumns(value, minColumnWidth), 1);
273
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
274
+ renderResponsiveStyle(css),
275
+ /* @__PURE__ */ jsx(
276
+ GdsBox,
277
+ {
278
+ ref,
279
+ component,
280
+ display: "grid",
281
+ gap,
282
+ className: joinClassNames(generatedClassName, className),
283
+ style: { gridTemplateColumns: hasBreakpoints(columns) ? void 0 : resolveGridColumns(baseValue(columns, 1), minColumnWidth), minWidth: 0, ...style },
284
+ ...props
285
+ }
286
+ )
287
+ ] });
288
+ });
289
+ const GdsColumnGrid = forwardRef(function GdsColumnGrid2({
290
+ columns = 12,
291
+ gap = "md",
292
+ component = "div",
293
+ className,
294
+ style,
295
+ ...props
296
+ }, ref) {
297
+ const generatedClassName = composeResponsiveClass({ columns, type: "column-grid" });
298
+ const css = responsiveCss(generatedClassName, "grid-template-columns", columns, (value) => `repeat(${value}, minmax(0, 1fr))`, 12);
299
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
300
+ renderResponsiveStyle(css),
301
+ /* @__PURE__ */ jsx(
302
+ GdsBox,
303
+ {
304
+ ref,
305
+ component,
306
+ display: "grid",
307
+ gap,
308
+ className: joinClassNames(generatedClassName, className),
309
+ style: { gridTemplateColumns: hasBreakpoints(columns) ? void 0 : `repeat(${baseValue(columns, 12)}, minmax(0, 1fr))`, minWidth: 0, ...style },
310
+ ...props
311
+ }
312
+ )
313
+ ] });
314
+ });
315
+ const GdsColumnGridItem = forwardRef(function GdsColumnGridItem2({
316
+ span,
317
+ start,
318
+ component = "div",
319
+ className,
320
+ style,
321
+ ...props
322
+ }, ref) {
323
+ const generatedClassName = composeResponsiveClass({ span, start, type: "column-grid-item" });
324
+ const css = [
325
+ responsiveCss(generatedClassName, "grid-column-start", start, (value) => value),
326
+ responsiveCss(generatedClassName, "grid-column-end", span, (value) => `span ${value}`)
327
+ ].join("");
328
+ const baseSpan = normalizeGdsResponsiveValue(span).base;
329
+ const baseStart = normalizeGdsResponsiveValue(start).base;
330
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
331
+ renderResponsiveStyle(css),
332
+ /* @__PURE__ */ jsx(
333
+ GdsBox,
334
+ {
335
+ ref,
336
+ component,
337
+ className: joinClassNames(generatedClassName, className),
338
+ style: {
339
+ gridColumnStart: hasBreakpoints(start) ? void 0 : baseStart,
340
+ gridColumnEnd: hasBreakpoints(span) || baseSpan === void 0 ? void 0 : `span ${baseSpan}`,
341
+ minWidth: 0,
342
+ ...style
343
+ },
344
+ ...props
345
+ }
346
+ )
347
+ ] });
348
+ });
349
+ function splitTemplate(ratio) {
350
+ const [start, end] = ratio.split(":").map(Number);
351
+ return `minmax(0, ${start}fr) minmax(0, ${end}fr)`;
352
+ }
353
+ const GdsSplit = forwardRef(function GdsSplit2({
354
+ ratio = "1:1",
355
+ collapseBelow = "md",
356
+ gap = "lg",
357
+ className,
358
+ style,
359
+ ...props
360
+ }, ref) {
361
+ const generatedClassName = composeResponsiveClass({ ratio, collapseBelow, type: "split" });
362
+ const css = `.${generatedClassName}{grid-template-columns:minmax(0, 1fr);}@media (min-width: ${breakpointPixels[collapseBelow]}px){.${generatedClassName}{grid-template-columns:${splitTemplate(ratio)};}}`;
363
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
364
+ renderResponsiveStyle(css),
365
+ /* @__PURE__ */ jsx(
366
+ GdsBox,
367
+ {
368
+ ref,
369
+ display: "grid",
370
+ gap,
371
+ className: joinClassNames(generatedClassName, className),
372
+ style: { alignItems: "start", ...style },
373
+ ...props
374
+ }
375
+ )
376
+ ] });
377
+ });
378
+ const GdsSidebar = forwardRef(function GdsSidebar2({
379
+ side = "start",
380
+ sidebarWidth = "content",
381
+ collapseBelow = "md",
382
+ gap = "lg",
383
+ className,
384
+ style,
385
+ ...props
386
+ }, ref) {
387
+ const generatedClassName = composeResponsiveClass({ side, sidebarWidth, collapseBelow, type: "sidebar" });
388
+ const sidebarTrack = `minmax(min(100%, ${resolveSize(sidebarWidth)}), ${resolveSize(sidebarWidth)})`;
389
+ const template = side === "start" ? `${sidebarTrack} minmax(0, 1fr)` : `minmax(0, 1fr) ${sidebarTrack}`;
390
+ const css = `.${generatedClassName}{grid-template-columns:minmax(0, 1fr);}@media (min-width: ${breakpointPixels[collapseBelow]}px){.${generatedClassName}{grid-template-columns:${template};}}`;
391
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
392
+ renderResponsiveStyle(css),
393
+ /* @__PURE__ */ jsx(
394
+ GdsBox,
395
+ {
396
+ ref,
397
+ display: "grid",
398
+ gap,
399
+ className: joinClassNames(generatedClassName, className),
400
+ style: { alignItems: "start", ...style },
401
+ ...props
402
+ }
403
+ )
404
+ ] });
405
+ });
406
+ const GdsBleed = forwardRef(function GdsBleed2({
407
+ bleed = "md",
408
+ className,
409
+ style,
410
+ ...props
411
+ }, ref) {
412
+ const generatedClassName = composeResponsiveClass({ bleed, type: "bleed" });
413
+ const css = responsiveCss(generatedClassName, "margin-inline", bleed, (value) => {
414
+ const resolved = resolveSpacing(value);
415
+ return resolved ? `calc(${resolved} * -1)` : void 0;
416
+ }, "md");
417
+ const baseBleed = resolveSpacing(baseValue(bleed, "md"));
418
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
419
+ renderResponsiveStyle(css),
420
+ /* @__PURE__ */ jsx(
421
+ GdsBox,
422
+ {
423
+ ref,
424
+ className: joinClassNames(generatedClassName, className),
425
+ style: { marginInline: !hasBreakpoints(bleed) && baseBleed ? `calc(${baseBleed} * -1)` : void 0, ...style },
426
+ ...props
427
+ }
428
+ )
429
+ ] });
430
+ });
431
+ const GdsContainer = forwardRef(function GdsContainer2({
432
+ size = "page",
433
+ center = true,
434
+ padding = { base: "md", md: "lg" },
435
+ className,
436
+ style,
437
+ ...props
438
+ }, ref) {
439
+ return /* @__PURE__ */ jsx(
440
+ GdsBox,
441
+ {
442
+ ref,
443
+ maxWidth: size,
444
+ padding,
445
+ className,
446
+ style: { width: "100%", marginInline: center ? "auto" : void 0, ...style },
447
+ ...props
448
+ }
449
+ );
450
+ });
451
+ export {
452
+ GdsBleed,
453
+ GdsBox,
454
+ GdsCluster,
455
+ GdsColumnGrid,
456
+ GdsColumnGridItem,
457
+ GdsContainer,
458
+ GdsGrid,
459
+ GdsInline,
460
+ GdsSidebar,
461
+ GdsSplit,
462
+ GdsStack,
463
+ normalizeGdsResponsiveValue,
464
+ resolveGdsLayoutStyle
465
+ };
@@ -0,0 +1,172 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var LayoutTemplatePreview_client_exports = {};
21
+ __export(LayoutTemplatePreview_client_exports, {
22
+ GdsLayoutTemplatePreview: () => GdsLayoutTemplatePreview
23
+ });
24
+ module.exports = __toCommonJS(LayoutTemplatePreview_client_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_gds_theme = require("@sovereignsquad/gds-theme");
27
+ var import_react = require("react");
28
+ var import_core = require("@mantine/core");
29
+ var import_SectionPanel = require("./SectionPanel");
30
+ var import_StateBlock = require("./StateBlock");
31
+ var import_LayoutBlocks = require("./LayoutBlocks");
32
+ function templateText(template) {
33
+ return JSON.stringify(template.schema, null, 2);
34
+ }
35
+ function parseSchema(schemaText) {
36
+ return JSON.parse(schemaText);
37
+ }
38
+ function GdsLayoutTemplatePreview({
39
+ templates = (0, import_LayoutBlocks.getGdsLayoutTemplates)(),
40
+ initialTemplateId,
41
+ title: titleProp,
42
+ description: descriptionProp
43
+ }) {
44
+ const { t } = (0, import_gds_theme.useGdsTranslation)();
45
+ const title = titleProp ?? t("gds.layoutTemplatePreview.title", "Template cookbook");
46
+ const description = descriptionProp ?? t("gds.layoutTemplatePreview.description", "Pick a template, edit JSON, then apply to preview live diagnostics and rendered layout.");
47
+ const initialTemplate = templates.find((template) => template.id === initialTemplateId) ?? templates[0];
48
+ const initialText = initialTemplate ? templateText(initialTemplate) : '{\n "version": "1",\n "blocks": []\n}';
49
+ const [selectedTemplateId, setSelectedTemplateId] = (0, import_react.useState)(initialTemplate?.id ?? "");
50
+ const [schemaText, setSchemaText] = (0, import_react.useState)(initialText);
51
+ const [appliedSchemaText, setAppliedSchemaText] = (0, import_react.useState)(initialText);
52
+ const [editorError, setEditorError] = (0, import_react.useState)("");
53
+ const [copyState, setCopyState] = (0, import_react.useState)("idle");
54
+ const selectedTemplate = templates.find((template) => template.id === selectedTemplateId);
55
+ const renderedTemplate = (0, import_react.useMemo)(() => {
56
+ try {
57
+ return (0, import_LayoutBlocks.renderGdsLayoutWithDiagnostics)(parseSchema(appliedSchemaText));
58
+ } catch {
59
+ return {
60
+ issues: [{ blockId: "schema", message: "Unable to parse schema JSON. Make sure the payload is valid JSON." }],
61
+ node: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
62
+ import_StateBlock.StateBlock,
63
+ {
64
+ variant: "error",
65
+ title: "Schema parser error",
66
+ description: "The current editor JSON is not valid. Fix the braces, quotes, and commas before applying."
67
+ }
68
+ )
69
+ };
70
+ }
71
+ }, [appliedSchemaText]);
72
+ const handleTemplateChange = (nextTemplateId) => {
73
+ const nextTemplate = templates.find((template) => template.id === nextTemplateId);
74
+ if (!nextTemplate) {
75
+ return;
76
+ }
77
+ const nextText = templateText(nextTemplate);
78
+ setSelectedTemplateId(nextTemplate.id);
79
+ setSchemaText(nextText);
80
+ setAppliedSchemaText(nextText);
81
+ setEditorError("");
82
+ setCopyState("idle");
83
+ };
84
+ const applySchema = () => {
85
+ try {
86
+ parseSchema(schemaText);
87
+ setAppliedSchemaText(schemaText);
88
+ setEditorError("");
89
+ setCopyState("idle");
90
+ } catch (error) {
91
+ setEditorError(error instanceof Error ? error.message : "Invalid JSON payload");
92
+ }
93
+ };
94
+ const resetTemplate = () => {
95
+ handleTemplateChange(selectedTemplateId);
96
+ };
97
+ const copySchema = async () => {
98
+ if (typeof navigator === "undefined" || !navigator.clipboard) {
99
+ setCopyState("error");
100
+ return;
101
+ }
102
+ try {
103
+ await navigator.clipboard.writeText(appliedSchemaText);
104
+ setCopyState("success");
105
+ } catch {
106
+ setCopyState("error");
107
+ }
108
+ };
109
+ const issueCount = renderedTemplate.issues.length;
110
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SectionPanel.SectionPanel, { title, description, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Stack, { gap: "md", children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
112
+ import_core.NativeSelect,
113
+ {
114
+ label: "Template preset",
115
+ "aria-label": "Template preset",
116
+ value: selectedTemplateId,
117
+ onChange: (event) => handleTemplateChange(event.currentTarget.value),
118
+ data: templates.map((template) => ({ value: template.id, label: template.title }))
119
+ }
120
+ ),
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
122
+ import_core.Textarea,
123
+ {
124
+ label: "Current template summary",
125
+ value: selectedTemplate ? `${selectedTemplate.description}
126
+ Use case: ${selectedTemplate.useCase}` : "",
127
+ readOnly: true,
128
+ autosize: true,
129
+ minRows: 2
130
+ }
131
+ ),
132
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
133
+ import_core.Textarea,
134
+ {
135
+ label: "Layout schema JSON",
136
+ "aria-label": "Layout schema JSON",
137
+ value: schemaText,
138
+ minRows: 16,
139
+ autosize: true,
140
+ onChange: (event) => setSchemaText(event.currentTarget.value)
141
+ }
142
+ ),
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Group, { gap: "sm", children: [
144
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Button, { type: "button", onClick: applySchema, children: "Apply schema" }),
145
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Button, { type: "button", variant: "default", onClick: resetTemplate, children: "Reset to template" }),
146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Button, { type: "button", variant: "light", onClick: () => void copySchema(), children: "Copy schema" })
147
+ ] }),
148
+ editorError ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_StateBlock.StateBlock, { variant: "error", title: "Invalid JSON", description: editorError }) : null,
149
+ copyState === "success" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Alert, { color: "green", children: "Schema copied to clipboard." }) : null,
150
+ copyState === "error" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Alert, { color: "yellow", children: "Clipboard copy is unavailable in this browser context." }) : null,
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_core.Text, { "aria-live": "polite", children: [
152
+ "Diagnostic result: ",
153
+ issueCount === 0 ? "no issues" : `${issueCount} issue${issueCount === 1 ? "" : "s"}`
154
+ ] }),
155
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
156
+ import_SectionPanel.SectionPanel,
157
+ {
158
+ title: `Schema render preview (${selectedTemplate?.schema.version ?? "1"})`,
159
+ description: "Rendered output is produced from the current applied schema.",
160
+ children: renderedTemplate.node
161
+ }
162
+ ),
163
+ issueCount ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_SectionPanel.SectionPanel, { title: "Schema issues", description: "Fix these payload issues before using the template in production code.", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_core.Stack, { component: "ul", gap: 4, children: renderedTemplate.issues.map((issue, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { children: [
164
+ issue.blockId ? `${issue.blockId}: ` : "",
165
+ issue.message
166
+ ] }, `${issue.blockId ?? "schema"}-${index}`)) }) }) : null
167
+ ] }) });
168
+ }
169
+ // Annotate the CommonJS export names for ESM import in node:
170
+ 0 && (module.exports = {
171
+ GdsLayoutTemplatePreview
172
+ });