@sovereignsquad/gds-core 3.9.0 → 6.9.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.
- package/README.md +33 -0
- package/dist/GdsBadge-DqTdnomt.d.mts +417 -0
- package/dist/GdsBadge-DqTdnomt.d.ts +417 -0
- package/dist/PartnerDiscovery-As_-JKtb.d.ts +732 -0
- package/dist/PartnerDiscovery-Bwxixtka.d.mts +732 -0
- package/dist/QuickStartCard-Bgjdfs_t.d.ts +20798 -0
- package/dist/QuickStartCard-DnZMDjzb.d.mts +20798 -0
- package/dist/chunk-3B5MK2PG.mjs +6349 -0
- package/dist/{chunk-TQ7ZYMEA.mjs → chunk-5G3XZWSW.mjs} +4916 -6400
- package/dist/chunk-5GH7XD7X.mjs +430 -0
- package/dist/chunk-6WDH57MJ.mjs +430 -0
- package/dist/chunk-A32PWTD2.mjs +430 -0
- package/dist/chunk-BD5XQH5Z.mjs +430 -0
- package/dist/chunk-DBJE4TRO.mjs +430 -0
- package/dist/chunk-EQ7Y2PUI.mjs +1842 -0
- package/dist/chunk-F76YTG3S.mjs +430 -0
- package/dist/chunk-HJVDKPVW.mjs +245 -0
- package/dist/chunk-IMT3UTOT.mjs +430 -0
- package/dist/chunk-J66ITCXC.mjs +473 -0
- package/dist/chunk-KEYBUMOR.mjs +430 -0
- package/dist/chunk-KLFTBWEG.mjs +430 -0
- package/dist/chunk-KNP35WAB.mjs +27 -0
- package/dist/chunk-LERXSJHD.mjs +430 -0
- package/dist/chunk-MKEWYVTJ.mjs +430 -0
- package/dist/chunk-NTNVQZJU.mjs +89 -0
- package/dist/chunk-OH5HH4G3.mjs +430 -0
- package/dist/chunk-SPPTDVJC.mjs +211 -0
- package/dist/chunk-W5O2JSVK.mjs +20 -0
- package/dist/{chunk-BUC7QXRO.mjs → chunk-WI24JME4.mjs} +13 -5
- package/dist/chunk-ZFGYQSNR.mjs +33 -0
- package/dist/client.d.mts +1616 -64
- package/dist/client.d.ts +1616 -64
- package/dist/client.js +13417 -6683
- package/dist/client.mjs +303 -60
- package/dist/en-D9CWSH3F.d.mts +428 -0
- package/dist/en-D9CWSH3F.d.ts +428 -0
- package/dist/index.d.mts +632 -5
- package/dist/index.d.ts +632 -5
- package/dist/index.js +22423 -13558
- package/dist/index.mjs +2198 -61
- package/dist/locales/lazy/all.d.mts +2 -0
- package/dist/locales/lazy/all.d.ts +2 -0
- package/dist/locales/lazy/all.js +5150 -0
- package/dist/locales/lazy/all.mjs +50 -0
- package/dist/locales/lazy/ar.d.mts +2 -0
- package/dist/locales/lazy/ar.d.ts +2 -0
- package/dist/locales/lazy/ar.js +870 -0
- package/dist/locales/lazy/ar.mjs +10 -0
- package/dist/locales/lazy/de.d.mts +2 -0
- package/dist/locales/lazy/de.d.ts +2 -0
- package/dist/locales/lazy/de.js +870 -0
- package/dist/locales/lazy/de.mjs +10 -0
- package/dist/locales/lazy/es.d.mts +2 -0
- package/dist/locales/lazy/es.d.ts +2 -0
- package/dist/locales/lazy/es.js +870 -0
- package/dist/locales/lazy/es.mjs +10 -0
- package/dist/locales/lazy/fr.d.mts +2 -0
- package/dist/locales/lazy/fr.d.ts +2 -0
- package/dist/locales/lazy/fr.js +870 -0
- package/dist/locales/lazy/fr.mjs +10 -0
- package/dist/locales/lazy/he.d.mts +2 -0
- package/dist/locales/lazy/he.d.ts +2 -0
- package/dist/locales/lazy/he.js +870 -0
- package/dist/locales/lazy/he.mjs +10 -0
- package/dist/locales/lazy/hu.d.mts +2 -0
- package/dist/locales/lazy/hu.d.ts +2 -0
- package/dist/locales/lazy/hu.js +870 -0
- package/dist/locales/lazy/hu.mjs +10 -0
- package/dist/locales/lazy/index.d.mts +25 -0
- package/dist/locales/lazy/index.d.ts +25 -0
- package/dist/locales/lazy/index.js +479 -0
- package/dist/locales/lazy/index.mjs +9 -0
- package/dist/locales/lazy/it.d.mts +2 -0
- package/dist/locales/lazy/it.d.ts +2 -0
- package/dist/locales/lazy/it.js +870 -0
- package/dist/locales/lazy/it.mjs +10 -0
- package/dist/locales/lazy/ja.d.mts +2 -0
- package/dist/locales/lazy/ja.d.ts +2 -0
- package/dist/locales/lazy/ja.js +870 -0
- package/dist/locales/lazy/ja.mjs +10 -0
- package/dist/locales/lazy/ko.d.mts +2 -0
- package/dist/locales/lazy/ko.d.ts +2 -0
- package/dist/locales/lazy/ko.js +870 -0
- package/dist/locales/lazy/ko.mjs +10 -0
- package/dist/locales/lazy/ru.d.mts +2 -0
- package/dist/locales/lazy/ru.d.ts +2 -0
- package/dist/locales/lazy/ru.js +870 -0
- package/dist/locales/lazy/ru.mjs +10 -0
- package/dist/locales/lazy/zh.d.mts +2 -0
- package/dist/locales/lazy/zh.d.ts +2 -0
- package/dist/locales/lazy/zh.js +870 -0
- package/dist/locales/lazy/zh.mjs +10 -0
- package/dist/map.css +658 -0
- package/dist/map.d.mts +118 -0
- package/dist/map.d.ts +118 -0
- package/dist/map.js +778 -0
- package/dist/map.mjs +395 -0
- package/dist/reference-theme-explorer.d.mts +34 -0
- package/dist/reference-theme-explorer.d.ts +34 -0
- package/dist/reference-theme-explorer.js +9488 -0
- package/dist/reference-theme-explorer.mjs +1988 -0
- package/dist/rich-text-editor.d.mts +32 -0
- package/dist/rich-text-editor.d.ts +32 -0
- package/dist/rich-text-editor.js +469 -0
- package/dist/rich-text-editor.mjs +115 -0
- package/dist/server.d.mts +112 -248
- package/dist/server.d.ts +112 -248
- package/dist/server.js +8461 -1889
- package/dist/server.mjs +598 -57
- package/package.json +110 -10
- package/dist/AISearchCard-Bbnsd-yl.d.mts +0 -7786
- package/dist/AISearchCard-Bbnsd-yl.d.ts +0 -7786
- package/dist/chunk-5AJJNRZF.mjs +0 -5847
package/dist/client.d.mts
CHANGED
|
@@ -1,31 +1,46 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as AISearchCard, a as AISearchCardProps, b as AccentPanel, c as AccentPanelProps, d as AccentPanelVariant, e as AccentTone, f as AccessSummary, g as AccessSummaryProps, h as ActionBar, i as ActionBarAction, j as ActionBarIconAction, k as ActionBarProps, l as ActiveFilterChips, m as ActiveFilterChipsProps, n as ArticleShell, o as ArticleShellProps, p as AsyncSurface, q as AsyncSurfaceProps, r as AsyncSurfaceState, s as AuthShell, t as AuthShellProps, B as BOTTOM_TAB_HEIGHT, u as BOTTOM_TAB_MAX_ITEMS, v as BannerNotice, w as BannerNoticeProps, x as BodyText, y as BottomTabBar, z as BottomTabBarProps, C as BoundedPreviewSurface, D as BoundedPreviewSurfaceProps, E as BreadcrumbItem, F as BrowseSurface, G as BrowseSurfaceFilterChip, H as BrowseSurfaceProps, I as BrowseSurfaceScopeOption, J as BulkActionsBar, K as BulkActionsBarProps, L as CardTitle, M as ChartLegendItem, N as ChartTokenPanel, O as ChartTokenPanelProps, P as ChartTokenPanelState, Q as ChatInput, R as ChatMessage, S as ChatMessageModel, T as ChatRole, U as ChatThread, V as ChatThreadProps, W as ChoiceChip, X as ChoiceChipProps, Y as ClippedFlexChild, Z as ComboboxOption, _ as ConsumerDashboardGrid, $ as ConsumerDashboardGridProps, a0 as ConsumerSection, a1 as ConsumerSectionProps, a2 as CountBadge, a3 as CountBadgeProps, a4 as CreatorCssPolicy, a5 as CreatorCssSeverity, a6 as CreatorCssValidationIssue, a7 as CreatorThemeBoundary, a8 as CreatorThemeBoundaryProps, a9 as CreatorThemeDiagnostics, aa as CtaButtonGroup, ab as CtaButtonGroupProps, ac as DataToolbar, ad as DataToolbarFilterChip, ae as DataToolbarProps, af as DetailProfileShell, ag as DetailProfileShellProps, ah as DocsPageShell, ai as DocsPageShellProps, aj as EditorialCard, ak as EditorialCardProps, al as EditorialCardVariant, am as EditorialHero, an as EditorialHeroAction, ao as EditorialHeroMetaItem, ap as EditorialHeroProps, aq as EmptyState, ar as EmptyStateProps, as as EvidencePanel, at as EvidencePanelProps, au as EvidencePanelState, av as FeatureBand, aw as FeatureBandItem, ax as FeatureBandProps, ay as FilterChipGroup, az as FilterDrawer, aA as FilterDrawerMode, aB as FilterDrawerProps, aC as FitScoreChip, aD as FitScoreChipProps, aE as FitScoreDimension, aF as FloatingActionPlacement, aG as FloatingActionPlacementProps, aH as FoodCardAvailabilityState, aI as FoodCardMarker, aJ as FoodCardMediaRatio, aK as FoodCardMetadata, aL as FoodMenuCategory, aM as FoodMenuItem, aN as FoodMenuSection, aO as FoodMenuSectionProps, aP as FormField, aQ as FormFieldProps, aR as GdsAccessAdapter, aS as GdsAccessAdapterOptions, aT as GdsAccessEntitlement, aV as GdsAccessGateActionKind, aY as GdsAccessGateReason, aZ as GdsAccessGateState, a_ as GdsAccessSession, a$ as GdsAccessibilityEvidence, b0 as GdsAccessibilityEvidenceState, b1 as GdsAccessibilityEvidenceSummary, b2 as GdsAccessibilityEvidenceValidationResult, b3 as GdsAdminDashboardTemplate, b4 as GdsAdminDashboardTemplateProps, b5 as GdsAnalyticsTemplate, b6 as GdsAnalyticsTemplateProps, b7 as GdsAreaChart, b8 as GdsAtBrowserStatus, b9 as GdsBarChart, ba as GdsBenchmarkBarChart, bb as GdsBleed, bc as GdsBleedProps, bd as GdsBlockRenderer, be as GdsBorderRole, bf as GdsBox, bg as GdsBoxProps, bh as GdsBoxWithChildrenProps, bi as GdsBubbleChartConfig, bj as GdsCalendarHeatmapChart, bk as GdsCardContractOptions, bl as GdsCardDensity, bm as GdsCardInteractiveMode, bn as GdsCardResolvedContract, bo as GdsCardSize, bp as GdsCardVariant, bq as GdsCartesianChartConfig, br as GdsChart, bs as GdsChartAxis, bt as GdsChartBaseConfig, bu as GdsChartConfig, bv as GdsChartDatum, bw as GdsChartLegend, bx as GdsChartLegendItem, by as GdsChartProps, bz as GdsChartRendererAdapter, bA as GdsChartRendererContext, bB as GdsChartSetAType, bC as GdsChartSetBType, bD as GdsChartTooltip, bE as GdsChartType, bF as GdsChartTypeDefinition, bG as GdsChartValidationResult, bH as GdsCluster, bI as GdsClusterProps, bJ as GdsContainer, bK as GdsContainerProps, bL as GdsContentPattern, bM as GdsContentPatternCatalog, bN as GdsContentPatternId, bO as GdsCopyTemplate, bP as GdsCrudEditorTemplate, bQ as GdsCrudEditorTemplateProps, bR as GdsDesignComponentMap, bS as GdsDesignHandoffCatalog, bT as GdsDesignHandoffReport, bU as GdsDesignTokenMap, bV as GdsDirectionBoundary, bW as GdsDivergingBarChart, bX as GdsEmptyStateTemplate, bY as GdsEmptyStateTemplateProps, bZ as GdsErrorPageTemplate, b_ as GdsErrorPageTemplateProps, b$ as GdsFormatOptions, c0 as GdsFormattedCurrency, c1 as GdsFormattedCurrencyProps, c2 as GdsFormattedDate, c3 as GdsFormattedDateProps, c4 as GdsFormattedNumber, c5 as GdsFormattedNumberProps, c6 as GdsFunnelChartConfig, c7 as GdsGaugeChart, c8 as GdsGrid, c9 as GdsGridProps, ca as GdsHandoffStatus, cb as GdsHeatmapChartConfig, cc as GdsHistogramChart, cd as GdsI18nRuntimeEvent, ce as GdsI18nRuntimeEventType, cf as GdsIcon, cg as GdsIconA11yMode, ch as GdsIconCategory, ci as GdsIconKey, cj as GdsIconMetadata, ck as GdsIconName, cl as GdsIconProps, cm as GdsIconTone, cn as GdsIcons, co as GdsInline, cp as GdsInlineProps, cq as GdsKeyboardBehavior, cr as GdsKnownLimitation, cs as GdsLayoutAlign, ct as GdsLayoutBreakpoint, cu as GdsLayoutJustify, cv as GdsLayoutOverflow, cw as GdsLayoutPrimitiveBaseProps, cx as GdsLayoutSize, cz as GdsLayoutToken, cA as GdsLayoutWrap, cB as GdsLineChart, cC as GdsLocale, cD as GdsLocaleText, cE as GdsLocaleTextProps, cF as GdsLongitudinalChart, cG as GdsMaturityCapability, cH as GdsMaturityCapabilityArea, cI as GdsMaturityCapabilityStatus, cJ as GdsMaturityRadarChart, cK as GdsMediaFit, cL as GdsMediaFrame, cM as GdsMediaFrameProps, cN as GdsMessageSeverity, cO as GdsMissingKeyTracker, cP as GdsNotificationAction, cR as GdsNotificationAuditEventType, cS as GdsNotificationDedupePolicy, cT as GdsNotificationLivePolicy, cV as GdsNotificationPersistence, cX as GdsNotificationRetryPolicy, cY as GdsNotificationSeverity, cZ as GdsNotificationStatus, c_ as GdsOverflowFrame, c$ as GdsOverflowFrameProps, d0 as GdsOverflowPolicy, d1 as GdsOwnedContrastPropsInput, d2 as GdsOwnedContrastRole, d3 as GdsOwnedContrastTokens, d4 as GdsPageTemplateAction, d5 as GdsPageTemplateBaseProps, d6 as GdsPageTemplateCatalog, d7 as GdsPageTemplateConfig, d8 as GdsPageTemplateId, d9 as GdsPageTemplateSection, da as GdsPageTemplateState, db as GdsPageTemplateTelemetryEvent, dc as GdsPageTemplateTelemetryEventName, dd as GdsPartToWholeChartConfig, de as GdsPatternTelemetryEvent, df as GdsPlaceholderContract, dg as GdsPlural, dh as GdsPluralMessage, di as GdsPluralProps, dj as GdsPropAnnotation, dk as GdsPublicEventTemplate, dl as GdsPublicEventTemplateProps, dm as GdsRadarChart, dn as GdsRadarChartConfig, dp as GdsRadiusToken, dq as GdsRatingScale, dr as GdsRatingScaleProps, ds as GdsRelativeTime, dt as GdsRelativeTimeProps, du as GdsResourceManagerTemplate, dv as GdsResourceManagerTemplateProps, dw as GdsResponsiveChartFrame, dx as GdsResponsiveResolution, dy as GdsResponsiveValue, dz as GdsResponsiveVisibility, dA as GdsResponsiveVisibilityProps, dB as GdsSafeBox, dC as GdsSafeBoxProps, dD as GdsSafeStyleProps, dE as GdsScatterChartConfig, dF as GdsScreenReaderNote, dG as GdsSegmentedControl, dH as GdsSegmentedControlOption, dI as GdsSegmentedControlProps, dJ as GdsSelectionGroupProps, dK as GdsSelectionOption, dL as GdsSemanticBackground, dM as GdsSeriesTone, dN as GdsSettingsGroup, dO as GdsSettingsTemplate, dP as GdsSettingsTemplateProps, dQ as GdsSidebar, dR as GdsSidebarProps, dS as GdsSlider, dT as GdsSliderProps, dU as GdsSlopeChart, dV as GdsSparkline, dW as GdsSplit, dX as GdsSplitProps, dY as GdsStack, dZ as GdsStackProps, d_ as GdsStackedBarChart, d$ as GdsStyleContract, e0 as GdsSymmetryChart, e1 as GdsTaskPattern, e2 as GdsTaskState, e3 as GdsTaskStep, e4 as GdsTextExpansionFixture, e5 as GdsTextRoleProps, e6 as GdsTitleRoleProps, e7 as GdsTreemapChartConfig, e8 as GdsTypographyProps, e9 as GdsVisibilityValue, ea as GdsVocabulary, ec as GdsWcagMapping, ed as GdsWizardStep, ee as GdsWizardStepper, ef as GdsWizardStepperProps, eg as InlineAlert, eh as InlineAlertProps, ei as InlineEmphasis, ej as InlineText, ek as LabelTag, el as LabelTagProps, em as LabelTagTone, en as LabelText, eo as LayeredSurfaceSlot, ep as LayeredSurfaceSlotProps, eq as LayoutBlock, er as LayoutBlockType, es as LayoutRenderResult, et as LayoutSchema, eu as LayoutValidationIssue, ev as ListItemSection, ew as ListingCard, ex as ListingCardAffordance, ey as ListingCardMediaRatio, ez as ListingCardProps, eA as ListingFilterChip, eB as ListingMetadataRow, eC as MAX_LISTING_CARD_ACTIONS, eD as MapPanel, eE as MapPanelProps, eF as MeaningBadge, eG as MeaningBadgeProps, eH as MeaningVariant, eI as MediaCard, eJ as MediaCardAction, eK as MediaCardProps, eL as MediaField, eM as MediaFieldProps, eN as MediaFieldState, eQ as MediaPreviewCard, eR as MediaPreviewCardProps, eS as MediaPreviewMetadata, eT as MediaPreviewState, eU as MediaWithFallback, eV as MediaWithFallbackProps, eW as MetadataText, eX as MetricCard, eY as MetricCardProps, eZ as MissingDataPrompt, e_ as MissingDataPromptProps, e$ as MonospaceInputFrame, f0 as NotificationCenterView, f1 as NumberStepper, f2 as NumberStepperProps, f3 as NumericCell, f4 as OverflowContainer, f5 as OverflowContainerProps, f6 as PROVIDER_IDENTITY_REGISTRY, f7 as PageHeader, f8 as PageHeaderEyebrowVariant, f9 as PageHeaderProps, fa as PageTitle, fb as PeriodSelector, fc as PeriodSelectorOption, fd as PeriodSelectorProps, fe as PillBar, ff as PlaceholderPanel, fg as PlaceholderPanelProps, fh as PlaybackSurface, fi as PlaybackSurfaceProps, fj as PlaybackSurfaceState, fk as ProductCard, fl as ProductCardAction, fm as ProductCardMetaItem, fn as ProductCardProps, fo as ProgressCard, fp as ProgressCardProps, fq as ProviderIdentity, fr as ProviderIdentityButton, fs as ProviderIdentityButtonGroup, ft as ProviderIdentityButtonGroupProps, fu as ProviderIdentityButtonProps, fv as ProviderIdentityVariant, fw as PublicBrandFooter, fx as PublicBrandFooterClassNames, fy as PublicBrandFooterLayoutVariant, fz as PublicBrandFooterProps, fB as PublicFlowActionPriority, fC as PublicFlowShell, fD as PublicFlowShellProps, fE as PublicFlowStage, fF as PublicFlowStageStatus, fG as PublicFoodCard, fH as PublicFoodCardProps, fI as PublicNav, fJ as PublicNavItem, fK as PublicNavProps, fL as PublicProductCard, fM as PublicProductCardHelperKind, fN as PublicProductCardMetaItem, fO as PublicProductCardProps, fP as PublicProductCardState, fQ as PublicShell, fR as PublicShellBottomTabOptions, fS as PublicShellClassNames, fT as PublicShellHeaderVariant, fU as PublicShellMobileNavigationMode, fV as PublicShellProps, fW as PublicSiteFooter, fX as PublicSiteFooterProps, fY as ReferenceLinkGrid, fZ as ReferenceLinkGridItem, f_ as ReferenceLinkGridProps, f$ as ReferenceLocaleNotice, g0 as ReferenceLocaleNoticeProps, g1 as ReferenceSection, g2 as ReferenceSectionProps, g3 as ReportingSection, g4 as ReportingSectionProps, g5 as ReportingSectionState, g6 as ResultSummary, g7 as ResultSummaryProps, g8 as SearchableSelect, g9 as SearchableSelectProps, ga as SectionPanel, gb as SectionPanelProps, gc as SectionPanelTone, gd as SectionTitle, gf as SemanticActionDefinition, gh as SemanticChartFrame, gi as SemanticChartFrameProps, gj as SemanticChartProps, gk as SemanticInset, gl as SimpleDataTable, gm as SimpleDataTableProps, gn as SimpleTableColumn, go as SocialAuthButtons, gp as SocialAuthButtonsProps, gq as SocialAuthProviderId, gr as SocialAuthProviderOption, gs as SoftChipGroup, gt as SortMenu, gu as SortMenuProps, gv as SortOption, gw as StateBlock, gx as StateBlockProps, gy as StateBlockVariant, gz as StatsSection, gA as StatsSectionProps, gB as StatusBadge, gC as StatusBadgeProps, gD as StatusVariant, gE as StreamingIndicator, gF as SurfaceContentAlign, gG as SurfaceContentJustify, gH as SurfacePresentation, gI as SurfacePresentationProps, gJ as VisuallyHidden, gK as VocabularyResolver, gL as ar, gM as compareGdsLocaleString, gN as createGdsAccessAdapter, gO as createGdsAccessGateEvent, gP as createGdsAccessibilityEvidenceIndex, gQ as createGdsContentExpansionReport, gR as createGdsMissingKeyTracker, gS as createGdsNotificationAuditEvent, gT as createGdsNotificationId, gU as createGdsOwnedContrastTokens, gV as createGdsPageTemplateEvent, gW as createGdsStyleContract, gX as createGdsTextExpansionFixture, gY as createGdsVocabularyPack, gZ as de, g_ as en, g$ as es, h0 as formatGdsCurrency, h1 as formatGdsDate, h2 as formatGdsNumber, h3 as formatGdsPlural, h4 as formatGdsRelativeTime, h5 as fr, h6 as gdsCardDensityPaddingMap, h7 as gdsCardGapMap, h8 as gdsCardMediaRatioMap, h9 as gdsCardSizePaddingMap, ha as gdsCardTitleOrderMap, hb as gdsChartSetATypeRegistry, hc as gdsChartSetBTypeRegistry, hd as gdsChartTypeRegistry, he as gdsDefaultChartLegend, hf as gdsIconRegistry, hg as gdsIconToneColor, hh as gdsLocales, hi as gdsSeriesPalette, hj as gdsStyle, hk as generateGdsDesignHandoffReport, hl as getGdsAccessGateActionPriority, hm as getGdsAccessGateReasons, hn as getGdsAccessGateStates, ho as getGdsAccessibilityEvidence, hp as getGdsAccessibilityEvidenceSummary, hq as getGdsBlockTypes, hr as getGdsContentPattern, hs as getGdsContentPatterns, ht as getGdsCopyTemplate, hu as getGdsCopyTemplates, hv as getGdsDesignComponentMappings, hw as getGdsDesignTokenMappings, hx as getGdsIconKeys, hy as getGdsIconMetadata, hz as getGdsIconToneColor, hA as getGdsLayoutTemplate, hB as getGdsLayoutTemplates, hC as getGdsMaturityCapabilities, hD as getGdsMaturityCapability, hE as getGdsMaturitySummary, hF as getGdsMessages, hG as getGdsNotificationLivePolicy, hH as getGdsOwnedContrastProps, hI as getGdsPageTemplate, hJ as getGdsPageTemplates, hK as getGdsRecommendedMaturityCapabilities, hL as getGdsSeriesColor, hM as getGdsTaskPattern, hN as getGdsTaskPatterns, hO as getProviderIdentityLabel, hP as getProviderIdentityPolicy, hQ as getSemanticActionConfig, hR as getSemanticActionLabel, hS as getSupportedProviderIdentityIds, hT as he, hU as hu, hV as isGdsChartSetAType, hW as isGdsChartSetBType, hX as isGdsIconKey, hY as isPresentationMode, hZ as it, h_ as mergeGdsVocabularyPacks, h$ as normalizeGdsResponsiveValue, i0 as redactGdsAccessGateMetadata, i1 as registerGdsBlock, i2 as renderGdsCopyTemplate, i3 as renderGdsLayout, i4 as renderGdsLayoutWithDiagnostics, i5 as resolveAccentPanelStyles, i6 as resolveGdsAccessAdapterState, i7 as resolveGdsAccessState, i8 as resolveGdsCardContract, i9 as resolveGdsLayoutStyle, ia as resolveGdsLocale, ib as resolveGdsMessage, ic as resolveSemanticActionConfig, id as resolveSurfacePresentationStyles, ie as ru, ig as sortGdsAccessGateActions, ih as sortGdsLocaleStrings, ii as useGdsDirection, ij as validateCreatorCss, ik as validateGdsAccessGateContract, il as validateGdsAccessibilityEvidence, im as validateGdsChartData, io as validateGdsContentPatterns, ip as validateGdsCopyTemplate, iq as validateGdsDesignHandoffMappings, ir as validateGdsLayout, is as validateGdsPageTemplates, it as validateGdsTaskPatterns } from './AISearchCard-Bbnsd-yl.mjs';
|
|
1
|
+
import { hk as SemanticAction, hm as SemanticActionId, f9 as GdsVocabularyPack, bS as GdsCardContractOptions, bV as GdsCardResolvedContract, fP as MediaFit, fQ as MediaPreviewAspectRatio, bi as GdsAccessGateContract, bg as GdsAccessGateAction, bj as GdsAccessGateEvent, dE as GdsNotificationPolicy, dw as GdsNotificationAuditEvent, dC as GdsNotificationMessage, d6 as GdsLayoutTemplate, gE as PublicFlowAction, dP as GdsPageTemplateBaseProps } from './QuickStartCard-DnZMDjzb.mjs';
|
|
2
|
+
export { A as AISearchCard, a as AISearchCardProps, b as AccentPanel, c as AccentPanelProps, d as AccentPanelVariant, e as AccentTone, f as AccessSummary, g as AccessSummaryProps, jJ as ActionBar, jK as ActionBarAction, jL as ActionBarIconAction, jM as ActionBarProps, h as ActiveFilterChips, i as ActiveFilterChipsProps, j as ArticleShell, k as ArticleShellProps, l as AsyncSurface, m as AsyncSurfaceProps, n as AsyncSurfaceState, o as AuthShell, p as AuthShellProps, B as BOTTOM_TAB_HEIGHT, q as BOTTOM_TAB_MAX_ITEMS, r as BannerNotice, s as BannerNoticeProps, t as BodyText, u as BottomTabBar, v as BottomTabBarProps, w as BoundedPreviewSurface, x as BoundedPreviewSurfaceProps, y as BreadcrumbItem, z as BrowseSurface, C as BrowseSurfaceFilterChip, D as BrowseSurfaceProps, E as BrowseSurfaceScopeOption, F as BulkActionsBar, G as BulkActionsBarProps, H as CardTitle, I as ChartLegendItem, J as ChartTokenPanel, K as ChartTokenPanelProps, L as ChartTokenPanelState, M as ChatInput, N as ChatMessage, O as ChatMessageModel, P as ChatRole, Q as ChatThread, R as ChatThreadProps, S as ChoiceChip, T as ChoiceChipProps, U as ClippedFlexChild, V as ComboboxOption, W as ConsumerDashboardGrid, X as ConsumerDashboardGridProps, Y as ConsumerSection, Z as ConsumerSectionProps, _ as CountBadge, $ as CountBadgeProps, a0 as CreatorCssPolicy, a1 as CreatorCssSeverity, a2 as CreatorCssValidationIssue, a3 as CreatorThemeBoundary, a4 as CreatorThemeBoundaryProps, a5 as CreatorThemeDiagnostics, a6 as CtaButtonGroup, a7 as CtaButtonGroupProps, a8 as DataToolbar, a9 as DataToolbarFilterChip, aa as DataToolbarProps, ab as DetailFact, ac as DetailFactsTable, ad as DetailFactsTableProps, ae as DetailProfileShell, af as DetailProfileShellProps, ag as DocsPageShell, ah as DocsPageShellProps, ai as EditorialCard, aj as EditorialCardProps, ak as EditorialCardVariant, al as EditorialHero, am as EditorialHeroAction, an as EditorialHeroMetaItem, ao as EditorialHeroProps, ap as EmptyState, aq as EmptyStateProps, ar as EvidencePanel, as as EvidencePanelProps, at as EvidencePanelState, au as FeatureBand, av as FeatureBandItem, aw as FeatureBandProps, ax as FilterChipGroup, ay as FilterDrawer, az as FilterDrawerMode, aA as FilterDrawerProps, aB as FitScoreChip, aC as FitScoreChipProps, aD as FitScoreDimension, aE as FloatingActionPlacement, aF as FloatingActionPlacementProps, aG as FoodCardAvailabilityState, aH as FoodCardMarker, aI as FoodCardMediaRatio, aJ as FoodCardMetadata, aK as FoodMenuCategory, aL as FoodMenuItem, aM as FoodMenuSection, aN as FoodMenuSectionProps, aO as FormField, aP as FormFieldProps, aQ as GDS_CHART_SERIES_COLORS, aR as GDS_CHART_SERIES_SLOTS, aS as GDS_DETAIL_FACTS_LABEL_COLUMN_PX, aT as GDS_DETAIL_FACT_IDS, aU as GDS_LISTING_PICK_BADGE_FONT_SIZE_PX, aV as GDS_LISTING_PICK_BADGE_ICON_PX, aW as GDS_LISTING_PICK_BADGE_INSET_PX, aX as GDS_LISTING_PICK_BADGE_LINE_HEIGHT_PX, aY as GDS_LISTING_PICK_BADGE_PADDING_BLOCK_PX, aZ as GDS_LISTING_PICK_BADGE_PADDING_INLINE_PX, a_ as GDS_LISTING_TILE_SIZE_PX, a$ as GDS_PICTOGRAM_BASE_STROKE, b0 as GDS_PICTOGRAM_DISABLED_OPACITY, b1 as GDS_PICTOGRAM_GRID, b2 as GDS_PICTOGRAM_HERO_LAYERS, b3 as GDS_PICTOGRAM_SCALE_PX, b4 as GDS_PICTOGRAM_STROKE_BY_SCALE, b5 as GDS_PICTOGRAM_TREATMENT_SCALE, b6 as GDS_PIN_APPROXIMATE_DASH, b7 as GDS_PIN_EMOJI_SCALE, b8 as GDS_PIN_EMPHASIS_STROKE, b9 as GDS_PIN_HEAD_CENTER_OFFSET, ba as GDS_PIN_ICON_SCALE, bb as GDS_PIN_SELECTED_SCALE, bc as GDS_QUICK_START_ICON_BOX_PX, bd as GdsAccessAdapter, be as GdsAccessAdapterOptions, bf as GdsAccessEntitlement, bh as GdsAccessGateActionKind, bk as GdsAccessGateReason, bl as GdsAccessGateState, bm as GdsAccessSession, bn as GdsAccessibilityEvidence, bo as GdsAccessibilityEvidenceState, bp as GdsAccessibilityEvidenceSummary, bq as GdsAccessibilityEvidenceValidationResult, br as GdsActivityPictogramKey, bs as GdsAdminDashboardTemplate, bt as GdsAdminDashboardTemplateProps, bu as GdsAnalyticsTemplate, bv as GdsAnalyticsTemplateProps, bw as GdsAreaChart, bx as GdsAtBrowserStatus, by as GdsBadgeStack, bz as GdsBadgeStackCorner, bA as GdsBadgeStackLayer, bB as GdsBadgeStackLayerProps, bC as GdsBadgeStackProps, bD as GdsBarChart, bE as GdsBenchmarkBarChart, bF as GdsBleed, bG as GdsBleedProps, bH as GdsBlockRenderer, bI as GdsBorderRole, bJ as GdsBox, bK as GdsBoxProps, bL as GdsBoxWithChildrenProps, bM as GdsBreadcrumbItem, bN as GdsBreadcrumbs, bO as GdsBreadcrumbsProps, bP as GdsBubbleChartConfig, bQ as GdsCalendarHeatmapChart, bR as GdsCandlestickChartConfig, bT as GdsCardDensity, bU as GdsCardInteractiveMode, bW as GdsCardSize, bX as GdsCardVariant, bY as GdsCartesianChartConfig, bZ as GdsChart, b_ as GdsChartAxis, b$ as GdsChartBaseConfig, c0 as GdsChartConfig, c1 as GdsChartDatum, c2 as GdsChartLegend, c3 as GdsChartLegendItem, c4 as GdsChartProps, c5 as GdsChartRendererAdapter, c6 as GdsChartRendererContext, c7 as GdsChartSetAType, c8 as GdsChartSetBType, c9 as GdsChartSetCType, ca as GdsChartTooltip, cb as GdsChartType, cc as GdsChartTypeDefinition, cd as GdsChartValidationResult, ce as GdsCluster, cf as GdsClusterProps, cg as GdsColumnGrid, ch as GdsColumnGridItem, ci as GdsColumnGridItemProps, cj as GdsColumnGridProps, ck as GdsCompareButton, cl as GdsCompareButtonProps, cm as GdsContainer, cn as GdsContainerProps, co as GdsContentPattern, cp as GdsContentPatternCatalog, cq as GdsContentPatternId, cr as GdsCopyTemplate, cs as GdsCountBadge, ct as GdsCountBadgeProps, cu as GdsCountBadgeTone, cv as GdsCrudEditorTemplate, cw as GdsCrudEditorTemplateProps, cx as GdsDesignComponentMap, cy as GdsDesignHandoffCatalog, cz as GdsDesignHandoffReport, cA as GdsDesignTokenMap, cB as GdsDetailFactId, cC as GdsDirectionBoundary, cD as GdsDivergingBarChart, cE as GdsEmptyStateTemplate, cF as GdsEmptyStateTemplateProps, cG as GdsErrorPageTemplate, cH as GdsErrorPageTemplateProps, cI as GdsFormatOptions, cJ as GdsFormattedCurrency, cK as GdsFormattedCurrencyProps, cL as GdsFormattedDate, cM as GdsFormattedDateProps, cN as GdsFormattedNumber, cO as GdsFormattedNumberProps, cP as GdsFunnelChartConfig, cQ as GdsGaugeChart, cR as GdsGrid, cS as GdsGridProps, cT as GdsHandoffStatus, cU as GdsHeatmapChartConfig, cV as GdsHistogramChart, cW as GdsI18nRuntimeEvent, cX as GdsI18nRuntimeEventType, cY as GdsInline, cZ as GdsInlineProps, c_ as GdsKeyboardBehavior, c$ as GdsKnownLimitation, d0 as GdsLayoutAlign, d1 as GdsLayoutBreakpoint, d2 as GdsLayoutJustify, d3 as GdsLayoutOverflow, d4 as GdsLayoutPrimitiveBaseProps, d5 as GdsLayoutSize, d7 as GdsLayoutToken, d8 as GdsLayoutWrap, d9 as GdsLineChart, da as GdsLocale, db as GdsLocaleText, dc as GdsLocaleTextProps, dd as GdsLogoLockup, de as GdsLogoLockupProps, df as GdsLongitudinalChart, dg as GdsMapPinBadge, dh as GdsMapPinBadgeProps, di as GdsMapPinState, dj as GdsMaturityCapability, dk as GdsMaturityCapabilityArea, dl as GdsMaturityCapabilityStatus, dm as GdsMaturityRadarChart, dn as GdsMediaFit, dp as GdsMediaFrame, dq as GdsMediaFrameProps, dr as GdsMessageSeverity, ds as GdsMeter, dt as GdsMeterProps, du as GdsMissingKeyTracker, dv as GdsNotificationAction, dx as GdsNotificationAuditEventType, dy as GdsNotificationBell, dz as GdsNotificationBellProps, dA as GdsNotificationDedupePolicy, dB as GdsNotificationLivePolicy, dD as GdsNotificationPersistence, dF as GdsNotificationRetryPolicy, dG as GdsNotificationSeverity, dH as GdsNotificationStatus, dI as GdsOverflowFrame, dJ as GdsOverflowFrameProps, dK as GdsOverflowPolicy, dL as GdsOwnedContrastPropsInput, dM as GdsOwnedContrastRole, dN as GdsOwnedContrastTokens, dO as GdsPageTemplateAction, dQ as GdsPageTemplateCatalog, dR as GdsPageTemplateConfig, dS as GdsPageTemplateGuidance, dT as GdsPageTemplateId, dU as GdsPageTemplateSection, dV as GdsPageTemplateState, dW as GdsPageTemplateTelemetryEvent, dX as GdsPageTemplateTelemetryEventName, dY as GdsPartToWholeChartConfig, dZ as GdsPatternTelemetryEvent, d_ as GdsPictogram, d$ as GdsPictogramDefinition, e0 as GdsPictogramFamily, e1 as GdsPictogramHeroLayer, e2 as GdsPictogramProps, e3 as GdsPictogramScale, e4 as GdsPictogramState, e5 as GdsPictogramTreatment, e6 as GdsPictogramUsageRule, e7 as GdsPlaceholderContract, e8 as GdsPlural, e9 as GdsPluralMessage, ea as GdsPluralProps, eb as GdsPropAnnotation, ec as GdsPublicEventTemplate, ed as GdsPublicEventTemplateProps, ee as GdsRadarChart, ef as GdsRadarChartConfig, eg as GdsRadiusToken, eh as GdsRatingDisplay, ei as GdsRatingDisplayProps, ej as GdsRatingScale, ek as GdsRatingScaleProps, el as GdsRelativeTime, em as GdsRelativeTimeProps, en as GdsRemovableTag, eo as GdsRemovableTagProps, ep as GdsRemovableTagTone, eq as GdsResourceManagerTemplate, er as GdsResourceManagerTemplateProps, es as GdsResponsiveChartFrame, et as GdsResponsiveResolution, eu as GdsResponsiveValue, ev as GdsResponsiveVisibility, ew as GdsResponsiveVisibilityProps, ex as GdsSafeBox, ey as GdsSafeBoxProps, ez as GdsSafeStyleProps, eA as GdsSankeyChartConfig, eB as GdsScatterChartConfig, eC as GdsScreenReaderNote, eD as GdsSegmentedControl, eE as GdsSegmentedControlOption, eF as GdsSegmentedControlProps, eG as GdsSelectionGroupProps, eH as GdsSelectionOption, eI as GdsSemanticBackground, eJ as GdsSeriesTone, eK as GdsSettingsGroup, eL as GdsSettingsTemplate, eM as GdsSettingsTemplateProps, eN as GdsSidebar, eO as GdsSidebarProps, eP as GdsSlider, eQ as GdsSliderProps, eR as GdsSlopeChart, eS as GdsSparkline, eT as GdsSplit, eU as GdsSplitProps, eV as GdsStack, eW as GdsStackProps, eX as GdsStackedBarChart, eY as GdsStyleContract, eZ as GdsSymmetryChart, e_ as GdsTaskPattern, e$ as GdsTaskState, f0 as GdsTaskStep, f1 as GdsTextExpansionFixture, f2 as GdsTextRoleProps, f3 as GdsTitleRoleProps, f4 as GdsTreemapChartConfig, f5 as GdsTrustLabel, f6 as GdsTypographyProps, f7 as GdsVisibilityValue, f8 as GdsVocabulary, fa as GdsWcagMapping, fb as GdsWizardStep, fc as GdsWizardStepper, fd as GdsWizardStepperProps, fe as InlineAlert, ff as InlineAlertProps, fg as InlineEmphasis, fh as InlineText, fi as LabelTag, fj as LabelTagProps, fk as LabelTagTone, fl as LabelText, fm as LastCheckedLabel, fn as LastCheckedLabelProps, fo as LayeredSurfaceSlot, fp as LayeredSurfaceSlotProps, fq as LayoutBlock, fr as LayoutBlockType, fs as LayoutRenderResult, ft as LayoutSchema, fu as LayoutValidationIssue, fv as ListItemSection, fw as ListingCard, fx as ListingCardAffordance, fy as ListingCardMediaRatio, fz as ListingCardPickBadge, fA as ListingCardProps, fB as ListingFilterChip, fC as ListingMetadataRow, fD as MAX_LISTING_CARD_ACTIONS, fE as MapPanel, fF as MapPanelProps, fG as MeaningBadge, fH as MeaningBadgeProps, fI as MeaningVariant, fJ as MediaCard, fK as MediaCardAction, fL as MediaCardProps, fM as MediaField, fN as MediaFieldProps, fO as MediaFieldState, fR as MediaPreviewCard, fS as MediaPreviewCardProps, fT as MediaPreviewMetadata, fU as MediaPreviewState, fV as MediaWithFallback, fW as MediaWithFallbackProps, fX as MetadataText, fY as MetricCard, fZ as MetricCardProps, f_ as MissingDataPrompt, f$ as MissingDataPromptProps, g0 as MonospaceInputFrame, g1 as NotificationCenterView, g2 as NumberStepper, g3 as NumberStepperProps, g4 as NumericCell, g5 as OverflowContainer, g6 as OverflowContainerProps, g7 as PROVIDER_IDENTITY_REGISTRY, g8 as PageHeader, g9 as PageHeaderEyebrowVariant, ga as PageHeaderProps, gb as PageTitle, gc as PeriodSelector, gd as PeriodSelectorOption, ge as PeriodSelectorProps, gf as PillBar, gg as PlaceholderPanel, gh as PlaceholderPanelProps, gi as PlaybackSurface, gj as PlaybackSurfaceProps, gk as PlaybackSurfaceState, gl as PriceEstimateLabel, gm as PriceEstimateLabelProps, gn as PriceEstimateStatus, go as ProductCard, gp as ProductCardAction, gq as ProductCardMetaItem, gr as ProductCardProps, gs as ProgressCard, gt as ProgressCardProps, gu as ProviderIdentity, gv as ProviderIdentityButton, gw as ProviderIdentityButtonGroup, gx as ProviderIdentityButtonGroupProps, gy as ProviderIdentityButtonProps, gz as ProviderIdentityVariant, gA as PublicBrandFooter, gB as PublicBrandFooterClassNames, gC as PublicBrandFooterLayoutVariant, gD as PublicBrandFooterProps, gF as PublicFlowActionPriority, gG as PublicFlowShell, gH as PublicFlowShellProps, gI as PublicFlowStage, gJ as PublicFlowStageStatus, gK as PublicFoodCard, gL as PublicFoodCardProps, gM as PublicNav, gN as PublicNavItem, gO as PublicNavProps, gP as PublicProductCard, gQ as PublicProductCardHelperKind, gR as PublicProductCardMetaItem, gS as PublicProductCardProps, gT as PublicProductCardState, gU as PublicShell, gV as PublicShellBottomTabOptions, gW as PublicShellClassNames, gX as PublicShellHeaderVariant, gY as PublicShellMobileNavigationMode, gZ as PublicShellProps, g_ as PublicSiteFooter, g$ as PublicSiteFooterProps, h0 as QuickStartCard, h1 as QuickStartCardProps, h2 as ReferenceLinkGrid, h3 as ReferenceLinkGridItem, h4 as ReferenceLinkGridProps, h5 as ReferenceLocaleNotice, h6 as ReferenceLocaleNoticeProps, h7 as ReferenceSection, h8 as ReferenceSectionProps, h9 as ReportingSection, ha as ReportingSectionProps, hb as ReportingSectionState, hc as ResultSummary, hd as ResultSummaryProps, he as SearchableSelect, hf as SearchableSelectProps, hg as SectionPanel, hh as SectionPanelProps, hi as SectionPanelTone, hj as SectionTitle, hl as SemanticActionDefinition, hn as SemanticChartFrame, ho as SemanticChartFrameProps, hp as SemanticChartProps, hq as SemanticInset, hr as SimpleDataTable, hs as SimpleDataTableProps, ht as SimpleTableColumn, hu as SocialAuthButtons, hv as SocialAuthButtonsProps, hw as SocialAuthProviderId, hx as SocialAuthProviderOption, hy as SoftChipGroup, hz as SortMenu, hA as SortMenuProps, hB as SortOption, hC as StateBlock, hD as StateBlockProps, hE as StateBlockVariant, hF as StatsSection, hG as StatsSectionProps, hH as StatusBadge, hI as StatusBadgeProps, hJ as StatusVariant, hK as StreamingIndicator, hL as SurfaceContentAlign, hM as SurfaceContentJustify, hN as SurfacePresentation, hO as SurfacePresentationProps, hP as TRUST_BADGE_DEFINITIONS, hQ as TrustBadge, hR as TrustBadgeProps, hS as VisuallyHidden, hT as VocabularyResolver, hU as ar, hV as compareGdsLocaleString, hW as createGdsAccessAdapter, hX as createGdsAccessGateEvent, hY as createGdsAccessibilityEvidenceIndex, hZ as createGdsContentExpansionReport, h_ as createGdsMissingKeyTracker, h$ as createGdsNotificationAuditEvent, i0 as createGdsNotificationId, i1 as createGdsOwnedContrastTokens, i2 as createGdsPageTemplateEvent, i3 as createGdsPictogramFamily, i4 as createGdsStyleContract, i5 as createGdsTextExpansionFixture, i6 as createGdsVocabularyPack, i7 as de, i8 as es, i9 as formatGdsCurrency, ia as formatGdsDate, ib as formatGdsNumber, ic as formatGdsPlural, id as formatGdsRelativeTime, ie as fr, ig as gdsActivityPictograms, ih as gdsCardDensityPaddingMap, ii as gdsCardGapMap, ij as gdsCardMediaRatioMap, ik as gdsCardSizePaddingMap, il as gdsCardTitleOrderMap, im as gdsChartSetATypeRegistry, io as gdsChartSetBTypeRegistry, ip as gdsChartSetCTypeRegistry, iq as gdsChartTypeRegistry, ir as gdsDefaultChartLegend, is as gdsLocales, it as gdsPictogramUsageRules, iu as gdsSeriesPalette, iv as gdsStyle, iw as generateGdsDesignHandoffReport, ix as getGdsAccessGateActionPriority, iy as getGdsAccessGateReasons, iz as getGdsAccessGateStates, iA as getGdsAccessibilityEvidence, iB as getGdsAccessibilityEvidenceSummary, iC as getGdsActivityPictogramKeys, iD as getGdsBlockTypes, iE as getGdsChartSeriesColor, iF as getGdsContentPattern, iG as getGdsContentPatterns, iH as getGdsCopyTemplate, iI as getGdsCopyTemplates, iJ as getGdsDesignComponentMappings, iK as getGdsDesignTokenMappings, iL as getGdsLayoutTemplate, iM as getGdsLayoutTemplates, iN as getGdsMaturityCapabilities, iO as getGdsMaturityCapability, iP as getGdsMaturitySummary, iQ as getGdsMessages, iR as getGdsNotificationLivePolicy, iS as getGdsOwnedContrastProps, iT as getGdsPageTemplate, iU as getGdsPageTemplates, iV as getGdsRecommendedMaturityCapabilities, iW as getGdsSeriesColor, iX as getGdsTaskPattern, iY as getGdsTaskPatterns, iZ as getProviderIdentityLabel, i_ as getProviderIdentityPolicy, i$ as getSemanticActionConfig, j0 as getSemanticActionLabel, j1 as getSupportedProviderIdentityIds, j2 as he, j3 as hu, j4 as isGdsActivityPictogramKey, j5 as isGdsChartSetAType, j6 as isGdsChartSetBType, j7 as isGdsChartSetCType, j8 as isPresentationMode, j9 as it, ja, jb as ko, jc as mergeGdsVocabularyPacks, jd as normalizeGdsResponsiveValue, je as redactGdsAccessGateMetadata, jf as registerGdsBlock, jg as renderGdsCopyTemplate, jh as renderGdsLayout, ji as renderGdsLayoutWithDiagnostics, jj as resolveAccentPanelStyles, jk as resolveGdsAccessAdapterState, jl as resolveGdsAccessState, jm as resolveGdsActivityPictogramLabel, jn as resolveGdsCardContract, jo as resolveGdsChartTokenColor, jp as resolveGdsLayoutStyle, jq as resolveGdsLocale, jr as resolveGdsMessage, js as resolveSemanticActionConfig, jt as resolveSurfacePresentationStyles, ju as ru, jv as sortGdsAccessGateActions, jw as sortGdsLocaleStrings, jx as useGdsDirection, jy as validateCreatorCss, jz as validateGdsAccessGateContract, jA as validateGdsAccessibilityEvidence, jB as validateGdsChartData, jC as validateGdsContentPatterns, jD as validateGdsCopyTemplate, jE as validateGdsDesignHandoffMappings, jF as validateGdsLayout, jG as validateGdsPageTemplates, jH as validateGdsTaskPatterns, jI as zh } from './QuickStartCard-DnZMDjzb.mjs';
|
|
3
3
|
import * as _mantine_core from '@mantine/core';
|
|
4
|
-
import {
|
|
4
|
+
import { ButtonProps, MantineColor, BoxProps, MantineSpacing, MantineBreakpoint, NativeSelectProps, NavLinkProps, ModalProps, DrawerProps } from '@mantine/core';
|
|
5
5
|
export { Accordion, AccordionProps, ActionIcon, ActionIconProps, Anchor, AnchorProps, Badge, BadgeProps, Box, BoxProps, Button, ButtonProps, Center, CenterProps, Checkbox, CheckboxProps, Container, ContainerProps, Group, GroupProps, Loader, LoaderProps, Modal, ModalProps, MultiSelect, MultiSelectProps, NumberInput, NumberInputProps, PasswordInput, PasswordInputProps, Progress, ProgressProps, Radio, RadioProps, ScrollArea, ScrollAreaProps, Select, SelectProps, SimpleGrid, SimpleGridProps, Slider, SliderProps, Stack, StackProps, Switch, SwitchProps, Table, TableProps, Tabs, TabsProps, TextInput, TextInputProps, Textarea, TextareaProps, ThemeIcon, ThemeIconProps, Tooltip, TooltipProps } from '@mantine/core';
|
|
6
6
|
import * as react from 'react';
|
|
7
|
-
import react__default, { ReactNode } from 'react';
|
|
8
|
-
|
|
7
|
+
import react__default, { ReactNode, CSSProperties, RefObject, ComponentPropsWithoutRef } from 'react';
|
|
8
|
+
export { c as GDS_PIN_SILHOUETTE_PATH, d as GdsBadge, a as GdsBadgeAccentName, G as GdsBadgeAccentShade, e as GdsBadgeProps, f as GdsBadgeShapeCircle, g as GdsBadgeShapeHexagon, h as GdsBadgeShapeName, i as GdsBadgeShapePin, j as GdsBadgeShapeRosette, k as GdsBadgeShapeShield, l as GdsBadgeShapeSquircle, m as GdsBadgeShapes, n as GdsBadgeTone, o as GdsIcon, p as GdsIconA11yMode, q as GdsIconCategory, b as GdsIconKey, r as GdsIconMetadata, s as GdsIconName, t as GdsIconProps, u as GdsIconTone, v as GdsIcons, w as gdsBadgeAccentColors, x as gdsBadgeAccentShades, y as gdsIconRegistry, z as gdsIconToneColor, A as getGdsIconKeys, B as getGdsIconMetadata, C as getGdsIconToneColor, D as isGdsIconKey } from './GdsBadge-DqTdnomt.mjs';
|
|
9
|
+
import { GdsDensityMode, GdsShapeProfile } from '@sovereignsquad/gds-theme';
|
|
10
|
+
export { GdsDensityMode } from '@sovereignsquad/gds-theme';
|
|
11
|
+
export { e as en } from './en-D9CWSH3F.mjs';
|
|
9
12
|
import '@tabler/icons-react';
|
|
10
13
|
|
|
14
|
+
/** Props for `ConfirmDialog`. */
|
|
11
15
|
interface ConfirmDialogProps {
|
|
12
16
|
opened: boolean;
|
|
13
17
|
onClose: () => void;
|
|
14
18
|
onConfirm: () => void;
|
|
15
19
|
title: string;
|
|
16
20
|
children: ReactNode;
|
|
21
|
+
/** Semantic action id for the confirm button; defaults to `confirm`. */
|
|
17
22
|
confirmAction?: SemanticAction;
|
|
23
|
+
/** Semantic action id for the cancel button; defaults to `cancel`. */
|
|
18
24
|
cancelAction?: SemanticAction;
|
|
25
|
+
/** Styles the confirm button as destructive (red); defaults to true. */
|
|
19
26
|
isDanger?: boolean;
|
|
27
|
+
/** Shows the confirm button in a loading state and disables cancel; defaults to false. */
|
|
20
28
|
loading?: boolean;
|
|
29
|
+
/** Visible label of the confirm button, e.g. "Delete project"; defaults to the `confirmAction` vocabulary label. */
|
|
30
|
+
confirmLabel?: ReactNode;
|
|
31
|
+
/** Visible label of the cancel button; defaults to the `cancelAction` vocabulary label. */
|
|
32
|
+
cancelLabel?: ReactNode;
|
|
21
33
|
}
|
|
22
34
|
/**
|
|
23
35
|
* Standardized destructive/confirmation dialog.
|
|
24
36
|
*/
|
|
25
|
-
declare function ConfirmDialog({ opened, onClose, onConfirm, title, children, confirmAction, cancelAction, isDanger, loading, }: ConfirmDialogProps): react.JSX.Element;
|
|
37
|
+
declare function ConfirmDialog({ opened, onClose, onConfirm, title, children, confirmAction, cancelAction, isDanger, loading, confirmLabel, cancelLabel, }: ConfirmDialogProps): react.JSX.Element;
|
|
26
38
|
|
|
39
|
+
/** Props for the `ThemeToggle` component. */
|
|
27
40
|
interface ThemeToggleProps {
|
|
41
|
+
/** Icon button size. Defaults to `xl` (44px — GDS's own touch-target floor, GDS_MIN_TARGET_PX). */
|
|
28
42
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
43
|
+
/** Called with the newly selected scheme after each toggle. */
|
|
29
44
|
onColorSchemeChange?: (nextScheme: 'light' | 'dark') => void;
|
|
30
45
|
}
|
|
31
46
|
/**
|
|
@@ -34,39 +49,82 @@ interface ThemeToggleProps {
|
|
|
34
49
|
*/
|
|
35
50
|
declare function ThemeToggle({ size, onColorSchemeChange }: ThemeToggleProps): react.JSX.Element;
|
|
36
51
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
/**
|
|
53
|
+
* How long a transient success/error feedback treatment stays on the button before it reverts
|
|
54
|
+
* to its resting label. Exported so documentation surfaces read the real value rather than
|
|
55
|
+
* restating it (Rule 14) -- a change here changes both the behaviour and the page.
|
|
56
|
+
*/
|
|
57
|
+
declare const GDS_BUTTON_FEEDBACK_DURATION_MS = 2000;
|
|
58
|
+
/**
|
|
59
|
+
* Minimum label typography for the `gradient` brand intent (issue 700). White label text on
|
|
60
|
+
* the reserved Scout AI gradient fill (issue 697) clears only the WCAG non-text threshold
|
|
61
|
+
* (3:1) -- the `ai-accent-text-contrast` accessibility-floor rule measures and reports this
|
|
62
|
+
* every run -- never the 4.5:1 normal-text floor, so the gradient intent's label is held at or
|
|
63
|
+
* above this size and weight as a hard component invariant rather than relying on a preset to
|
|
64
|
+
* compensate.
|
|
65
|
+
*/
|
|
66
|
+
declare const GDS_BUTTON_GRADIENT_TEXT_FLOOR: {
|
|
67
|
+
readonly fontSizePx: 14;
|
|
68
|
+
readonly fontWeight: 600;
|
|
69
|
+
};
|
|
70
|
+
/** Outline stroke width for the `outline-accent` brand intent, in px (issue 700). */
|
|
71
|
+
declare const GDS_BUTTON_OUTLINE_ACCENT_STROKE_PX = 1.5;
|
|
72
|
+
/** Props for `SemanticButton`; extends Mantine `ButtonProps` and the native button attributes. */
|
|
73
|
+
interface SemanticButtonProps extends Omit<ButtonProps, 'children'>, Omit<react__default.ComponentPropsWithoutRef<'button'>, keyof ButtonProps | 'leftSection' | 'children'> {
|
|
74
|
+
/** Governed semantic action id whose label and icon are resolved from the vocabulary. */
|
|
55
75
|
action: SemanticActionId;
|
|
56
|
-
|
|
76
|
+
/**
|
|
77
|
+
* Applies a brand color treatment; the `disabled` variant also disables the button.
|
|
78
|
+
* `outline-accent` (transparent fill, accent stroke and label) and `gradient` (the reserved
|
|
79
|
+
* Scout AI gradient fill, issue 697, over a solid primary-chain fallback where a preset
|
|
80
|
+
* declares no `ai` lane) are issue 700: their full hover/pressed/disabled state axis lives in
|
|
81
|
+
* `packages/gds-theme/styles.css`, keyed on the `data-gds-brand-button` attribute this
|
|
82
|
+
* component emits, because a stylesheet `:hover`/`:active` rule cannot override an inline
|
|
83
|
+
* style. Never combine either with a destructive action -- style those through the existing
|
|
84
|
+
* `danger` vocabulary intent instead.
|
|
85
|
+
*/
|
|
86
|
+
brandVariant?: 'primary' | 'secondary' | 'accent' | 'disabled' | 'outline-accent' | 'gradient';
|
|
57
87
|
loading?: boolean;
|
|
88
|
+
/** Triggers a transient success/error feedback treatment (icon, color, label) for ~2s. */
|
|
58
89
|
feedbackState?: 'success' | 'error' | null;
|
|
90
|
+
/** Overrides the label shown during a feedback state. */
|
|
59
91
|
feedbackText?: string;
|
|
92
|
+
/** Renders the untranslated label on first paint to avoid a hydration mismatch, then upgrades; defaults to true. */
|
|
60
93
|
prerenderLabelOnly?: boolean;
|
|
94
|
+
/** Additional vocabulary packs consulted when resolving the action's label and icon. */
|
|
61
95
|
vocabularyPacks?: GdsVocabularyPack[];
|
|
96
|
+
/**
|
|
97
|
+
* Overrides the rendered label with an arbitrary node instead of the vocabulary-resolved
|
|
98
|
+
* string -- the vocabulary system is string-only by design (it exists to keep a label
|
|
99
|
+
* translated and consistent everywhere the same `action` appears), so a caller that genuinely
|
|
100
|
+
* needs non-string content (e.g. a caller-supplied `ReactNode` label prop of its own) sets this
|
|
101
|
+
* rather than reimplementing button chrome locally. The icon, `feedbackState`, and
|
|
102
|
+
* `prerenderLabelOnly` behavior are unaffected -- only the text content changes.
|
|
103
|
+
*/
|
|
104
|
+
label?: react__default.ReactNode;
|
|
105
|
+
/** Not supported: the text comes from `action`, or from `label`. Children would be discarded. */
|
|
106
|
+
children?: never;
|
|
62
107
|
}
|
|
63
|
-
|
|
108
|
+
/**
|
|
109
|
+
* Button whose label is resolved from a governed semantic `action` id (via the GDS
|
|
110
|
+
* vocabulary) rather than a hardcoded string, so the same action reads and
|
|
111
|
+
* localizes consistently everywhere it appears. Supports brand variants, a
|
|
112
|
+
* `loading` busy state, and transient success/error feedback. Use it for any
|
|
113
|
+
* action tied to a known semantic verb; fall back to Mantine's raw `Button` only
|
|
114
|
+
* for one-off actions with no vocabulary entry.
|
|
115
|
+
*/
|
|
116
|
+
declare function SemanticButton({ action, brandVariant, loading, feedbackState, feedbackText, prerenderLabelOnly, vocabularyPacks, label: labelOverride, ...props }: SemanticButtonProps): react__default.JSX.Element;
|
|
64
117
|
|
|
118
|
+
/** Props for {@link GameBoardTile}. */
|
|
65
119
|
interface GameBoardTileProps {
|
|
120
|
+
/** Content shown on the tile's revealed face. */
|
|
66
121
|
face: ReactNode;
|
|
122
|
+
/** Whether the tile is currently face-up. */
|
|
67
123
|
revealed: boolean;
|
|
124
|
+
/** Whether the tile has been matched (dimmed, no highlight). */
|
|
68
125
|
matched: boolean;
|
|
69
126
|
disabled: boolean;
|
|
127
|
+
/** Called when the tile is pressed. */
|
|
70
128
|
onPress: () => void;
|
|
71
129
|
/** Mantine color token for revealed (non-matched) highlight, e.g. `violet.5` or product primary. */
|
|
72
130
|
highlightColor?: MantineColor;
|
|
@@ -77,18 +135,271 @@ interface GameBoardTileProps {
|
|
|
77
135
|
*/
|
|
78
136
|
declare function GameBoardTile({ face, revealed, matched, disabled, onPress, highlightColor, }: GameBoardTileProps): react.JSX.Element;
|
|
79
137
|
|
|
138
|
+
/** Props for {@link GdsDensityProvider}. */
|
|
139
|
+
interface GdsDensityProviderProps {
|
|
140
|
+
/** Ambient density mode applied to the subtree. */
|
|
141
|
+
density: GdsDensityMode;
|
|
142
|
+
children: ReactNode;
|
|
143
|
+
}
|
|
144
|
+
/** Sets the ambient density mode read by `useGdsDensity()` for its descendants. */
|
|
145
|
+
declare function GdsDensityProvider({ density, children }: GdsDensityProviderProps): react.JSX.Element;
|
|
146
|
+
/** Reads the ambient density mode set by the nearest `GdsDensityProvider` (defaults to `'comfortable'` outside one). */
|
|
147
|
+
declare function useGdsDensity(): GdsDensityMode;
|
|
148
|
+
/**
|
|
149
|
+
* Density-aware wrapper around `resolveGdsCardContract`: falls back to the
|
|
150
|
+
* ambient `useGdsDensity()` value when `density` isn't explicitly passed,
|
|
151
|
+
* instead of `resolveGdsCardContract`'s own hardcoded `'comfortable'` default.
|
|
152
|
+
* Existing direct callers of `resolveGdsCardContract` are unaffected.
|
|
153
|
+
*/
|
|
154
|
+
declare function useGdsCardContract(options?: GdsCardContractOptions): GdsCardResolvedContract;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The `--gds-radius-<role>` declarations a {@link GdsShapeScope} sets for a profile: only the
|
|
158
|
+
* profile's own entries, each pointing at a step token (`var(--gds-radius-sm)`) so it follows
|
|
159
|
+
* the active theme's scale. Every other role, and every role under `default`, stays the theme's.
|
|
160
|
+
*/
|
|
161
|
+
declare function getGdsShapeScopeStyle(profile: GdsShapeProfile): Record<string, string>;
|
|
162
|
+
/** Props for {@link GdsShapeScope}. */
|
|
163
|
+
interface GdsShapeScopeProps extends Omit<BoxProps, 'style'> {
|
|
164
|
+
/** Shape profile for the subtree: `operations` (tight), `workspace` (soft) or `default` (the theme's own roles). */
|
|
165
|
+
profile: GdsShapeProfile;
|
|
166
|
+
style?: CSSProperties;
|
|
167
|
+
children?: ReactNode;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Applies a shape profile to a subtree by setting the radius-role variables on its own
|
|
171
|
+
* element, never on the document root. GDS components inside (Card, Paper, Button, TextInput,
|
|
172
|
+
* Badge, Chip) read those roles. Modals and drawers render in a portal outside the subtree:
|
|
173
|
+
* give them `withinPortal={false}` or spread {@link getGdsShapeScopeStyle} into their `styles`.
|
|
174
|
+
*/
|
|
175
|
+
declare function GdsShapeScope({ profile, style, children, ...others }: GdsShapeScopeProps): react.JSX.Element;
|
|
176
|
+
|
|
177
|
+
/** One node of a {@link GdsTreeView}. */
|
|
178
|
+
interface GdsTreeNode {
|
|
179
|
+
/** Unique, stable id; used for expanded and selected state. */
|
|
180
|
+
id: string;
|
|
181
|
+
/** Visible label; also the type-ahead match text. */
|
|
182
|
+
label: string;
|
|
183
|
+
/** Decorative leading icon. */
|
|
184
|
+
icon?: ReactNode;
|
|
185
|
+
/** Loaded children. Leave undefined and set `hasChildren` to load them on first expand. */
|
|
186
|
+
children?: GdsTreeNode[];
|
|
187
|
+
/** The node has children that `loadChildren` fetches on first expand. */
|
|
188
|
+
hasChildren?: boolean;
|
|
189
|
+
}
|
|
190
|
+
/** Props for {@link GdsTreeView}. */
|
|
191
|
+
interface GdsTreeViewProps {
|
|
192
|
+
/** Top-level nodes. */
|
|
193
|
+
nodes: GdsTreeNode[];
|
|
194
|
+
/** Accessible name of the tree. */
|
|
195
|
+
ariaLabel: string;
|
|
196
|
+
/** Expanded node ids (controlled). */
|
|
197
|
+
expandedIds?: string[];
|
|
198
|
+
/** Initially expanded node ids when uncontrolled. */
|
|
199
|
+
defaultExpandedIds?: string[];
|
|
200
|
+
/** Called with the new expanded ids when a node expands or collapses. */
|
|
201
|
+
onExpandedChange?: (ids: string[]) => void;
|
|
202
|
+
/** Selected node id (controlled). */
|
|
203
|
+
selectedId?: string | null;
|
|
204
|
+
/** Initially selected node id when uncontrolled. */
|
|
205
|
+
defaultSelectedId?: string | null;
|
|
206
|
+
/** Called when a node is selected by click, Enter or Space. */
|
|
207
|
+
onSelect?: (id: string, node: GdsTreeNode) => void;
|
|
208
|
+
/** Loads the children of a node with `hasChildren` and no `children`. */
|
|
209
|
+
loadChildren?: (node: GdsTreeNode) => Promise<GdsTreeNode[]>;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Hierarchical list following the WAI-ARIA tree pattern: `role="tree"`/`treeitem` with
|
|
213
|
+
* `aria-level`, `aria-expanded` and `aria-selected`, one tab stop (roving tabindex), and
|
|
214
|
+
* Up/Down, Left/Right, Home/End, Enter/Space and first-character type-ahead. Children can be
|
|
215
|
+
* loaded on first expand through `loadChildren`, with loading and error states. Levels indent by
|
|
216
|
+
* `--gds-space-md`; the selected item paints the navigation active roles.
|
|
217
|
+
*/
|
|
218
|
+
declare function GdsTreeView({ nodes, ariaLabel, expandedIds, defaultExpandedIds, onExpandedChange, selectedId, defaultSelectedId, onSelect, loadChildren, }: GdsTreeViewProps): react.JSX.Element;
|
|
219
|
+
|
|
220
|
+
/** One action in a {@link GdsBulkActionBar}. */
|
|
221
|
+
interface GdsBulkAction {
|
|
222
|
+
/** Semantic action id; supplies the default label and icon. */
|
|
223
|
+
action: SemanticActionId;
|
|
224
|
+
/** Runs the action on the current selection. */
|
|
225
|
+
onClick: () => void;
|
|
226
|
+
/** Explicit label; overrides the vocabulary label. */
|
|
227
|
+
label?: string;
|
|
228
|
+
/** Disables the action button. */
|
|
229
|
+
disabled?: boolean;
|
|
230
|
+
}
|
|
231
|
+
/** Props for {@link GdsBulkActionBar}. */
|
|
232
|
+
interface GdsBulkActionBarProps {
|
|
233
|
+
/** Number of selected items. The bar renders only when it is above zero. */
|
|
234
|
+
selectedCount: number;
|
|
235
|
+
/** Actions offered for the selection, in order. */
|
|
236
|
+
actions: GdsBulkAction[];
|
|
237
|
+
/** Clears the selection; the bar hides when the count returns to zero. */
|
|
238
|
+
onClearSelection: () => void;
|
|
239
|
+
/** Vocabulary packs consulted to resolve action labels and icons. */
|
|
240
|
+
vocabularyPacks?: GdsVocabularyPack[];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Toolbar for actions on a selection (rows in a table, items in a grid). It appears when
|
|
244
|
+
* `selectedCount` is above zero, states the count, offers the actions and a clear-selection
|
|
245
|
+
* control, and announces count changes through a polite live region that stays mounted so the
|
|
246
|
+
* change to zero is announced too. Painted on `--gds-bg-raised` inside a `--gds-border-strong`
|
|
247
|
+
* boundary.
|
|
248
|
+
*/
|
|
249
|
+
declare function GdsBulkActionBar({ selectedCount, actions, onClearSelection, vocabularyPacks }: GdsBulkActionBarProps): react.JSX.Element;
|
|
250
|
+
|
|
251
|
+
/** One conversation in a {@link GdsThreadList}. */
|
|
252
|
+
interface GdsThreadListItem {
|
|
253
|
+
/** Unique, stable id. */
|
|
254
|
+
id: string;
|
|
255
|
+
/** Conversation title, usually the other participants' names. */
|
|
256
|
+
title: string;
|
|
257
|
+
/** One-line preview of the latest message. */
|
|
258
|
+
preview?: string;
|
|
259
|
+
/** Time of the latest message, formatted for the active locale. */
|
|
260
|
+
timestamp?: Date | number | string;
|
|
261
|
+
/** The thread has messages the user has not read. */
|
|
262
|
+
unread?: boolean;
|
|
263
|
+
/** Name used for the avatar initials and alt text; defaults to `title`. */
|
|
264
|
+
avatarName?: string;
|
|
265
|
+
/** Avatar image URL. */
|
|
266
|
+
avatarSrc?: string;
|
|
267
|
+
}
|
|
268
|
+
/** Props for {@link GdsThreadList}. */
|
|
269
|
+
interface GdsThreadListProps {
|
|
270
|
+
/** Threads, newest first. */
|
|
271
|
+
threads: GdsThreadListItem[];
|
|
272
|
+
/** Accessible name of the list. */
|
|
273
|
+
ariaLabel: string;
|
|
274
|
+
/** Id of the open thread; marked with `aria-current`. */
|
|
275
|
+
selectedId?: string | null;
|
|
276
|
+
/** Called when a thread is chosen. */
|
|
277
|
+
onSelect?: (id: string) => void;
|
|
278
|
+
/** Shows the loading state instead of the list. */
|
|
279
|
+
loading?: boolean;
|
|
280
|
+
/** Error message; shows the error state instead of the list. */
|
|
281
|
+
error?: string;
|
|
282
|
+
/** Retry action shown in the error state. */
|
|
283
|
+
onRetry?: () => void;
|
|
284
|
+
/** More threads can be loaded; shows the load-more control. */
|
|
285
|
+
hasMore?: boolean;
|
|
286
|
+
/** Loads the next page of threads. */
|
|
287
|
+
onLoadMore?: () => void;
|
|
288
|
+
/** A page is loading; disables the load-more control. */
|
|
289
|
+
loadingMore?: boolean;
|
|
290
|
+
/** Empty-state heading; defaults to the `gds.threadList.emptyTitle` message. */
|
|
291
|
+
emptyTitle?: string;
|
|
292
|
+
/** Heading level of the loading, error and empty state titles; defaults to 4. Set it to fit the surrounding outline. */
|
|
293
|
+
stateTitleOrder?: 2 | 3 | 4 | 5 | 6;
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Scrollable list of conversations for an inbox. Each thread is a button in a list item with
|
|
297
|
+
* the title, a one-line preview, a locale-formatted timestamp and an avatar. The open thread
|
|
298
|
+
* carries `aria-current="true"`. Unread threads are bold, show a dot and include a visually
|
|
299
|
+
* hidden "Unread" label, so the state does not depend on colour. Loading, error (with retry),
|
|
300
|
+
* empty and load-more states are built in.
|
|
301
|
+
*/
|
|
302
|
+
declare function GdsThreadList({ threads, ariaLabel, selectedId, onSelect, loading, error, onRetry, hasMore, onLoadMore, loadingMore, emptyTitle, stateTitleOrder, }: GdsThreadListProps): react.JSX.Element;
|
|
303
|
+
|
|
304
|
+
/** One message in a {@link GdsMessageThread}. */
|
|
305
|
+
interface GdsThreadMessage {
|
|
306
|
+
/** Unique, stable id. */
|
|
307
|
+
id: string;
|
|
308
|
+
/** Id of the person who sent it; compared with `selfId`. */
|
|
309
|
+
senderId: string;
|
|
310
|
+
/** Sender's display name. */
|
|
311
|
+
senderName: string;
|
|
312
|
+
/** Sender's avatar image URL; initials are used without it. */
|
|
313
|
+
senderAvatarSrc?: string;
|
|
314
|
+
/** Message content. */
|
|
315
|
+
content: ReactNode;
|
|
316
|
+
/** When the message was sent. */
|
|
317
|
+
createdAt: Date | number | string;
|
|
318
|
+
}
|
|
319
|
+
/** Props for {@link GdsMessageThread}. */
|
|
320
|
+
interface GdsMessageThreadProps {
|
|
321
|
+
/** Messages, oldest first. */
|
|
322
|
+
messages: GdsThreadMessage[];
|
|
323
|
+
/** Id of the current user; their messages are the `self` side. */
|
|
324
|
+
selfId: string;
|
|
325
|
+
/** Accessible name of the conversation. */
|
|
326
|
+
ariaLabel: string;
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Conversation between people, as a `role="log"` region. The current user's messages align to
|
|
330
|
+
* the end on `--gds-message-self-bg`; other people's align to the start on
|
|
331
|
+
* `--gds-message-other-bg` with the sender's name and avatar. Consecutive messages from one
|
|
332
|
+
* sender share one header. A separator with the locale-formatted date starts each day. Every
|
|
333
|
+
* message carries the sender and time for assistive technology. For user and assistant chat
|
|
334
|
+
* use `ChatThread`, which this does not change.
|
|
335
|
+
*/
|
|
336
|
+
declare function GdsMessageThread({ messages, selfId, ariaLabel }: GdsMessageThreadProps): react.JSX.Element;
|
|
337
|
+
|
|
338
|
+
/** A collection layout a user can switch between. */
|
|
339
|
+
type GdsCollectionView = 'table' | 'grid';
|
|
340
|
+
/** Props for {@link GdsViewToggle}. */
|
|
341
|
+
interface GdsViewToggleProps {
|
|
342
|
+
/** The current layout. */
|
|
343
|
+
value: GdsCollectionView;
|
|
344
|
+
/** Called with the layout the user picks. */
|
|
345
|
+
onChange: (view: GdsCollectionView) => void;
|
|
346
|
+
/** Accessible name; defaults to the `gds.dataView.toggleLabel` message ("Layout"). */
|
|
347
|
+
ariaLabel?: string;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Labelled table/grid layout switch for a collection of items, as a segmented control with
|
|
351
|
+
* text labels (`gds.dataView.table`, `gds.dataView.grid`). `ResponsiveDataView` and the
|
|
352
|
+
* asset-manager page template use it.
|
|
353
|
+
*/
|
|
354
|
+
declare function GdsViewToggle({ value, onChange, ariaLabel }: GdsViewToggleProps): react.JSX.Element;
|
|
355
|
+
|
|
356
|
+
/** Props for {@link ProviderCTA}. */
|
|
357
|
+
interface ProviderCTAProps {
|
|
358
|
+
/** Panel headline. Defaults to the localized claim headline. */
|
|
359
|
+
headline?: ReactNode;
|
|
360
|
+
/** Panel body copy. Defaults to the localized claim body copy. */
|
|
361
|
+
body?: ReactNode;
|
|
362
|
+
/** Primary action's label. Defaults to the localized claim action label. */
|
|
363
|
+
actionLabel?: ReactNode;
|
|
364
|
+
/** Fires when the primary action is activated. */
|
|
365
|
+
onAction: () => void;
|
|
366
|
+
/** Ghost secondary action's label; the button renders only when this is given. */
|
|
367
|
+
secondaryLabel?: ReactNode;
|
|
368
|
+
/** Fires when the secondary action is activated. A no-op if `secondaryLabel` is given without this. */
|
|
369
|
+
onSecondary?: () => void;
|
|
370
|
+
}
|
|
371
|
+
/**
|
|
372
|
+
* Governed provider-claim panel: a calm, factual card prompting "are you the
|
|
373
|
+
* provider?" with a headline, body copy, and a primary + optional ghost action
|
|
374
|
+
* pair, both rendered through the governed button lane (`SemanticButton`) so
|
|
375
|
+
* their hover/press/focus treatment is never reimplemented locally. Fires only
|
|
376
|
+
* the callbacks it is given — it never navigates, fetches, or mutates data
|
|
377
|
+
* itself, and carries no claim workflow of its own. Every default is a
|
|
378
|
+
* localized value from the gds-core locale packs.
|
|
379
|
+
*/
|
|
380
|
+
declare function ProviderCTA({ headline, body, actionLabel, onAction, secondaryLabel, onSecondary, }: ProviderCTAProps): react.JSX.Element;
|
|
381
|
+
|
|
382
|
+
/** Serializable query state for a listing surface: search, sort, active filters, pagination, and row selection. */
|
|
80
383
|
interface ListingQueryState {
|
|
81
384
|
search: string;
|
|
82
385
|
sort: string;
|
|
83
386
|
filters: string[];
|
|
84
387
|
page: number;
|
|
85
388
|
pageSize: number;
|
|
389
|
+
/** Ids of currently selected rows. */
|
|
86
390
|
selection: string[];
|
|
87
391
|
}
|
|
392
|
+
/** Initial defaults for a listing's query state. */
|
|
88
393
|
interface ListingStateConfig {
|
|
394
|
+
/** Initial sort; defaults to `'newest'`. */
|
|
89
395
|
defaultSort?: string;
|
|
396
|
+
/** Initial page size; defaults to 25. */
|
|
90
397
|
defaultPageSize?: number;
|
|
91
398
|
}
|
|
399
|
+
/**
|
|
400
|
+
* Reducer actions for {@link ListingQueryState}. Search/sort/filter/page-size
|
|
401
|
+
* changes reset to page 1 and clear the selection; `reset-query` restores defaults.
|
|
402
|
+
*/
|
|
92
403
|
type ListingAction = {
|
|
93
404
|
type: 'set-search';
|
|
94
405
|
value: string;
|
|
@@ -114,17 +425,75 @@ type ListingAction = {
|
|
|
114
425
|
} | {
|
|
115
426
|
type: 'reset-query';
|
|
116
427
|
};
|
|
428
|
+
/** Context value exposed by {@link ListingProvider}: the current query state and its dispatch. */
|
|
117
429
|
interface ListingStateValue {
|
|
118
430
|
state: ListingQueryState;
|
|
119
431
|
dispatch: (action: ListingAction) => void;
|
|
120
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Reducer for {@link ListingQueryState}. Search/sort/filter/page-size changes reset
|
|
435
|
+
* the page to 1 and clear the selection; page numbers are clamped to at least 1;
|
|
436
|
+
* filter and selection toggles add/remove the value; `reset-query` restores the
|
|
437
|
+
* initial state while preserving the current sort and page size.
|
|
438
|
+
*/
|
|
121
439
|
declare function listingQueryReducer(state: ListingQueryState, action: ListingAction): ListingQueryState;
|
|
440
|
+
/** Provides {@link ListingQueryState} and its dispatch to descendants via context, seeded from `config`. */
|
|
122
441
|
declare function ListingProvider({ children, config, }: {
|
|
123
442
|
children: ReactNode;
|
|
124
443
|
config?: ListingStateConfig;
|
|
125
444
|
}): react.JSX.Element;
|
|
445
|
+
/** Returns the nearest {@link ListingStateValue}; throws when used outside a {@link ListingProvider}. */
|
|
126
446
|
declare function useListingState(): ListingStateValue;
|
|
127
447
|
|
|
448
|
+
/** Options for {@link useGdsBrowseSelection}. */
|
|
449
|
+
interface GdsBrowseSelectionOptions {
|
|
450
|
+
/** Uncontrolled initial selection. Ignored once `selectedId` is supplied (controlled mode). */
|
|
451
|
+
defaultSelectedId?: string | null;
|
|
452
|
+
/**
|
|
453
|
+
* Controlled selection. Once supplied (including `null`), the hook mirrors this value instead
|
|
454
|
+
* of managing its own state, and every transition reports through `onChange` rather than
|
|
455
|
+
* mutating internally.
|
|
456
|
+
*/
|
|
457
|
+
selectedId?: string | null;
|
|
458
|
+
/** Fires whenever the selection changes, in both controlled and uncontrolled mode. */
|
|
459
|
+
onChange?: (selectedId: string | null) => void;
|
|
460
|
+
}
|
|
461
|
+
/** Return value of {@link useGdsBrowseSelection}: the current selection plus its transitions. */
|
|
462
|
+
interface GdsBrowseSelection {
|
|
463
|
+
/** The currently selected id, or `null` when nothing is selected. */
|
|
464
|
+
selectedId: string | null;
|
|
465
|
+
/** True when `id` is the current selection. */
|
|
466
|
+
isSelected: (id: string) => boolean;
|
|
467
|
+
/** Selects `id` outright, replacing any prior selection. */
|
|
468
|
+
select: (id: string) => void;
|
|
469
|
+
/** Selects `id`, or clears the selection when `id` is already selected. */
|
|
470
|
+
toggle: (id: string) => void;
|
|
471
|
+
/** Clears the selection. */
|
|
472
|
+
clear: () => void;
|
|
473
|
+
}
|
|
474
|
+
/**
|
|
475
|
+
* Single-selection state shareable between a `ListingCard` list and a set of `GdsMapPinBadge`
|
|
476
|
+
* pins in a browse surface: one id drives both the selected card's ring treatment (`selected`
|
|
477
|
+
* prop) and the matching pin's `state="selected"` — the "selected card = selected pin" behavior
|
|
478
|
+
* a browse split view needs, without every consumer reinventing the sync (issue 701).
|
|
479
|
+
*
|
|
480
|
+
* Works uncontrolled (internal state, the default) or controlled (mirrors `selectedId`, calling
|
|
481
|
+
* `onChange` instead of self-managing — controlled mode never mutates internal state). `select`
|
|
482
|
+
* accepts any id, including one not present in the rendered list; `toggle` selects, or clears
|
|
483
|
+
* when the id is already current; `clear` always clears. A pure client-side state mechanism — no
|
|
484
|
+
* timers, no async, no persistence — SSR-safe by the `.client.ts` convention (excluded from the
|
|
485
|
+
* package's server barrel).
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* ```tsx
|
|
489
|
+
* const browse = useGdsBrowseSelection();
|
|
490
|
+
* <ListingCard title="Riverside Field" selected={browse.isSelected('riverside')} onSurfaceActivate={() => browse.toggle('riverside')} />
|
|
491
|
+
* <GdsMapPinBadge accent="forest" icon="Location" label="Riverside Field" state={browse.isSelected('riverside') ? 'selected' : 'idle'} />
|
|
492
|
+
* ```
|
|
493
|
+
*/
|
|
494
|
+
declare function useGdsBrowseSelection(options?: GdsBrowseSelectionOptions): GdsBrowseSelection;
|
|
495
|
+
|
|
496
|
+
/** Sidebar open/close state plus imperative controls returned by `useDiscoveryShellState`. */
|
|
128
497
|
interface DiscoveryShellState {
|
|
129
498
|
opened: boolean;
|
|
130
499
|
open: () => void;
|
|
@@ -132,83 +501,168 @@ interface DiscoveryShellState {
|
|
|
132
501
|
toggle: () => void;
|
|
133
502
|
setOpened: (next: boolean) => void;
|
|
134
503
|
}
|
|
504
|
+
/** Options for `useDiscoveryShellState`. */
|
|
135
505
|
interface UseDiscoveryShellStateOptions {
|
|
506
|
+
/** Initial open state before any stored value is read; defaults to false. */
|
|
136
507
|
defaultSidebarOpen?: boolean;
|
|
508
|
+
/** localStorage key used to persist and restore the sidebar open state. */
|
|
137
509
|
sidebarStorageKey?: string;
|
|
510
|
+
/** Called whenever the open state changes. */
|
|
138
511
|
onSidebarOpenedChange?: (opened: boolean) => void;
|
|
139
512
|
}
|
|
513
|
+
/**
|
|
514
|
+
* Manages sidebar open/close state for `DiscoveryShell`, optionally persisting it
|
|
515
|
+
* to `localStorage` under `sidebarStorageKey` and notifying `onSidebarOpenedChange`.
|
|
516
|
+
*/
|
|
140
517
|
declare function useDiscoveryShellState({ defaultSidebarOpen, sidebarStorageKey, onSidebarOpenedChange, }?: UseDiscoveryShellStateOptions): DiscoveryShellState;
|
|
518
|
+
/** Props for `DiscoveryShell`. */
|
|
141
519
|
interface DiscoveryShellProps {
|
|
142
520
|
header?: ReactNode;
|
|
143
521
|
sidebar: ReactNode;
|
|
144
522
|
footer?: ReactNode;
|
|
145
523
|
children: ReactNode;
|
|
524
|
+
/** Accessible label for the mobile navigation toggle; defaults to "Toggle navigation". */
|
|
146
525
|
mobileNavigationLabel?: string;
|
|
526
|
+
/** Hides this shell's own mobile navigation burger — for a caller (e.g. `DocsShell` in `inline-collapse` mode) that renders its own mobile toggle instead, so the two don't both render side by side. Defaults to false. */
|
|
527
|
+
hideMobileNavigationToggle?: boolean;
|
|
147
528
|
defaultSidebarOpen?: boolean;
|
|
148
529
|
sidebarStorageKey?: string;
|
|
530
|
+
/** Controlled sidebar open state; when set, the shell defers to the caller instead of its own state. */
|
|
149
531
|
sidebarOpened?: boolean;
|
|
150
532
|
onSidebarOpenedChange?: (opened: boolean) => void;
|
|
533
|
+
/** Keeps the sidebar sticky within the viewport; defaults to true. */
|
|
151
534
|
stickySidebar?: boolean;
|
|
535
|
+
/** Allows collapsing the sidebar on desktop via a burger; defaults to false. */
|
|
152
536
|
desktopCollapsible?: boolean;
|
|
537
|
+
/** Accessible label for the desktop sidebar toggle; defaults to "Toggle sidebar". */
|
|
153
538
|
desktopNavigationLabel?: string;
|
|
539
|
+
/** Sidebar width; defaults to `var(--gds-layout-sidebar-width, 280px)`. */
|
|
154
540
|
sidebarWidth?: number | string;
|
|
541
|
+
/** Header height; defaults to `var(--gds-layout-header-height, 60px)`. */
|
|
155
542
|
headerHeight?: number | string;
|
|
543
|
+
/** Main-content padding; defaults to "md". */
|
|
156
544
|
shellPadding?: MantineSpacing | number;
|
|
545
|
+
/** Breakpoint at which the sidebar collapses into the mobile drawer; defaults to "sm". */
|
|
157
546
|
collapseBreakpoint?: MantineBreakpoint;
|
|
547
|
+
/** Closes the mobile drawer when a nav item is activated; defaults to true. */
|
|
158
548
|
closeMobileNavigationOnItemSelect?: boolean;
|
|
159
549
|
}
|
|
160
550
|
/**
|
|
161
551
|
* DiscoveryShell is the canonical sidebar-first application shell for GDS.
|
|
162
552
|
* It owns the responsive header, sidebar, and main-content layout contract.
|
|
163
553
|
*/
|
|
164
|
-
declare function DiscoveryShell({ header, sidebar, footer, children, mobileNavigationLabel, defaultSidebarOpen, sidebarStorageKey, sidebarOpened, onSidebarOpenedChange, stickySidebar, desktopCollapsible, desktopNavigationLabel, sidebarWidth, headerHeight, shellPadding, collapseBreakpoint, closeMobileNavigationOnItemSelect, }: DiscoveryShellProps): react.JSX.Element;
|
|
554
|
+
declare function DiscoveryShell({ header, sidebar, footer, children, mobileNavigationLabel: mobileNavigationLabelProp, hideMobileNavigationToggle, defaultSidebarOpen, sidebarStorageKey, sidebarOpened, onSidebarOpenedChange, stickySidebar, desktopCollapsible, desktopNavigationLabel: desktopNavigationLabelProp, sidebarWidth, headerHeight, shellPadding, collapseBreakpoint, closeMobileNavigationOnItemSelect, }: DiscoveryShellProps): react.JSX.Element;
|
|
165
555
|
|
|
556
|
+
/** Props for {@link DocsShell}. */
|
|
166
557
|
interface DocsShellProps {
|
|
167
558
|
brand: ReactNode;
|
|
559
|
+
/** Main navigation shown in the sidebar under a "Primary" heading. */
|
|
168
560
|
primaryNavigation?: ReactNode;
|
|
561
|
+
/** Secondary navigation shown in the sidebar under a "More" heading. */
|
|
169
562
|
secondaryNavigation?: ReactNode;
|
|
563
|
+
/** Contextual text shown next to the brand on wider viewports. */
|
|
170
564
|
headerContext?: ReactNode;
|
|
171
565
|
actions?: ReactNode;
|
|
566
|
+
/** Navigation surfaced on small viewports. */
|
|
172
567
|
mobileNavigation?: ReactNode;
|
|
568
|
+
/** Whether mobile navigation collapses inline under the header or opens in a drawer. Defaults to `'drawer'`. */
|
|
173
569
|
mobileNavigationMode?: 'inline-collapse' | 'drawer';
|
|
174
570
|
footer?: ReactNode;
|
|
175
571
|
children: ReactNode;
|
|
572
|
+
/** Content container width; `'full'` spans the viewport. Defaults to `'full'`. */
|
|
176
573
|
contentWidth?: number | 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
177
574
|
}
|
|
575
|
+
/** A single option in a {@link DocsHeaderActionSelect}. */
|
|
178
576
|
interface DocsHeaderActionSelectOption {
|
|
179
577
|
value: string;
|
|
180
578
|
label: string;
|
|
181
579
|
}
|
|
580
|
+
/** Props for {@link DocsHeaderActionSelect}. */
|
|
182
581
|
interface DocsHeaderActionSelectProps extends Omit<NativeSelectProps, 'data' | 'onChange'> {
|
|
582
|
+
/** Accessible label for the select (rendered as `aria-label`). */
|
|
183
583
|
label: string;
|
|
184
584
|
options: DocsHeaderActionSelectOption[];
|
|
585
|
+
/** Called with the selected option's value. */
|
|
185
586
|
onChange: (value: string) => void;
|
|
186
587
|
}
|
|
588
|
+
/** Compact, width-clamped native select for the docs header action row (e.g. version/language pickers). */
|
|
187
589
|
declare function DocsHeaderActionSelect({ label, options, value, onChange, ...props }: DocsHeaderActionSelectProps): react.JSX.Element;
|
|
590
|
+
/**
|
|
591
|
+
* Documentation app shell built on {@link DiscoveryShell}: a brand/context header
|
|
592
|
+
* with actions, a primary/secondary sidebar, optional inline-collapse or drawer
|
|
593
|
+
* mobile navigation, and a width-constrained content container.
|
|
594
|
+
*/
|
|
188
595
|
declare function DocsShell({ brand, primaryNavigation, secondaryNavigation, headerContext, actions, mobileNavigation, mobileNavigationMode, footer, children, contentWidth, }: DocsShellProps): react.JSX.Element;
|
|
189
596
|
|
|
597
|
+
/** Props for {@link SidebarNav}, the `<nav>` container. */
|
|
190
598
|
interface SidebarNavProps {
|
|
191
599
|
children: ReactNode;
|
|
600
|
+
/**
|
|
601
|
+
* Accessible label for the nav landmark; defaults to the `gds.sidebarNav.ariaLabel` phrase
|
|
602
|
+
* ("Primary navigation"). Give each `SidebarNav` on a page a distinct label, for example when a
|
|
603
|
+
* shell renders one in `primaryNavigation` and another in `secondaryNavigation`.
|
|
604
|
+
*/
|
|
192
605
|
ariaLabel?: string;
|
|
606
|
+
/** Vertical gap between sections; defaults to `'md'`. */
|
|
193
607
|
gap?: string | number;
|
|
194
608
|
}
|
|
609
|
+
/** Props for {@link SidebarNavSection}, a labeled group of nav items. */
|
|
195
610
|
interface SidebarNavSectionProps {
|
|
611
|
+
/** Optional group heading. */
|
|
196
612
|
label?: ReactNode;
|
|
197
613
|
children: ReactNode;
|
|
614
|
+
/** When true, pushes the section to the bottom of the sidebar (via `margin-top: auto`). */
|
|
198
615
|
pushToBottom?: boolean;
|
|
199
616
|
}
|
|
617
|
+
/** Props for {@link SidebarNavItem}; extends Mantine `NavLinkProps` but owns `label`/`leftSection`/`description`. */
|
|
200
618
|
interface SidebarNavItemProps extends Omit<NavLinkProps, 'label' | 'leftSection' | 'description'> {
|
|
619
|
+
/** Semantic action id; supplies a default label and icon from the vocabulary. */
|
|
201
620
|
action?: SemanticActionId;
|
|
621
|
+
/** Explicit label; overrides the label derived from `action`. */
|
|
202
622
|
label?: ReactNode;
|
|
203
623
|
description?: ReactNode;
|
|
624
|
+
/** Content rendered in the item's right section. */
|
|
204
625
|
badge?: ReactNode;
|
|
626
|
+
/** Explicit leading icon; overrides the icon derived from `action`. */
|
|
205
627
|
icon?: ReactNode;
|
|
206
628
|
'aria-label'?: string;
|
|
207
629
|
'aria-current'?: 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false';
|
|
630
|
+
/** Vocabulary packs consulted to resolve `action` labels and icons. */
|
|
208
631
|
vocabularyPacks?: GdsVocabularyPack[];
|
|
632
|
+
/**
|
|
633
|
+
* Nested items. An item with children is a disclosure: it renders as `<button type="button">`
|
|
634
|
+
* with `aria-expanded`, toggles on click, Enter and Space, and indents its children by
|
|
635
|
+
* `--gds-space-md`. Use `opened`/`onChange` to control it, or `defaultOpened`.
|
|
636
|
+
*/
|
|
637
|
+
children?: ReactNode;
|
|
209
638
|
}
|
|
210
|
-
|
|
639
|
+
/**
|
|
640
|
+
* Full-height sidebar navigation landmark that stacks its sections inside a labeled `<nav>`. This
|
|
641
|
+
* is the content shell navigation slots expect (`primaryNavigation` and `secondaryNavigation` on
|
|
642
|
+
* `DocsShell` and the `gds-admin` `AppShell`). Inside a shell sidebar it is a second, labelled
|
|
643
|
+
* `<nav>` within the shell's unlabelled navbar `<nav>`.
|
|
644
|
+
*/
|
|
645
|
+
declare function SidebarNav({ children, ariaLabel: ariaLabelProp, gap }: SidebarNavProps): react.JSX.Element;
|
|
646
|
+
/** Groups sidebar items under an optional heading; `pushToBottom` anchors the group to the bottom of the sidebar. */
|
|
211
647
|
declare function SidebarNavSection({ label, children, pushToBottom }: SidebarNavSectionProps): react.JSX.Element;
|
|
648
|
+
/**
|
|
649
|
+
* Polymorphic sidebar nav item built on Mantine `NavLink`. Resolves its label and
|
|
650
|
+
* leading icon from a semantic `action` (via the vocabulary/translation) unless
|
|
651
|
+
* overridden, mirrors the active state into `aria-current="page"`, and renders any
|
|
652
|
+
* `badge` in the right section. Renders as an `<a>` by default.
|
|
653
|
+
*
|
|
654
|
+
* Pick the element by what the item does. A routed item passes `href` (or `component={Link}`
|
|
655
|
+
* with `href`). An item that switches in-memory view state passes `component="button"` and
|
|
656
|
+
* `onClick`, and renders `<button type="button">`. `active` sets `aria-current="page"` on both.
|
|
657
|
+
* An item with only `onClick` renders an `<a>` without `href`, which is not in the tab order and
|
|
658
|
+
* exposes no link or button role; `data-gds-nav-close` does not make it reachable.
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```tsx
|
|
662
|
+
* <SidebarNavItem href="/records" label="Records" active={pathname === '/records'} />
|
|
663
|
+
* <SidebarNavItem component="button" label="Map" active={view === 'map'} onClick={() => setView('map')} />
|
|
664
|
+
* ```
|
|
665
|
+
*/
|
|
212
666
|
declare const SidebarNavItem: (<C = "a">(props: _mantine_core.PolymorphicComponentProps<C, SidebarNavItemProps>) => React.ReactElement) & Omit<react.FunctionComponent<(SidebarNavItemProps & {
|
|
213
667
|
component?: any;
|
|
214
668
|
} & Omit<Omit<any, "ref">, "component" | keyof SidebarNavItemProps> & {
|
|
@@ -219,105 +673,169 @@ declare const SidebarNavItem: (<C = "a">(props: _mantine_core.PolymorphicCompone
|
|
|
219
673
|
renderRoot?: (props: Record<string, any>) => any;
|
|
220
674
|
})>, never> & Record<string, never>;
|
|
221
675
|
|
|
676
|
+
/** Props for {@link DocsCodeBlock}. */
|
|
222
677
|
interface DocsCodeBlockProps {
|
|
223
678
|
code: string;
|
|
224
679
|
language?: string;
|
|
225
680
|
title?: string;
|
|
681
|
+
/** Show the copy-to-clipboard button; defaults to on. */
|
|
226
682
|
withCopy?: boolean;
|
|
227
683
|
}
|
|
684
|
+
/** Renders a code block in a bordered panel with an optional title, language label, and copy-to-clipboard action. */
|
|
228
685
|
declare function DocsCodeBlock({ code, language, title, withCopy }: DocsCodeBlockProps): react.JSX.Element;
|
|
229
686
|
|
|
687
|
+
/** A share destination: the Web Share API (`native`), clipboard (`copy`), or a specific network. */
|
|
230
688
|
type ShareChannel = 'native' | 'copy' | 'mail' | 'message' | 'x' | 'facebook' | 'linkedin' | 'whatsapp' | 'telegram';
|
|
689
|
+
/** Props for {@link ShareButtonGroup}. */
|
|
231
690
|
interface ShareButtonGroupProps {
|
|
691
|
+
/** URL to share. */
|
|
232
692
|
url: string;
|
|
233
693
|
title?: string;
|
|
234
694
|
text?: string;
|
|
695
|
+
/** Channels to render, in order. Defaults to `['native', 'copy', 'mail']`. */
|
|
235
696
|
channels?: ShareChannel[];
|
|
697
|
+
/** Render icon-only action buttons instead of labelled buttons. */
|
|
236
698
|
compact?: boolean;
|
|
699
|
+
/** Heading above the buttons. Defaults to `'Share this'`. */
|
|
237
700
|
label?: ReactNode;
|
|
238
701
|
description?: ReactNode;
|
|
239
702
|
}
|
|
240
|
-
|
|
703
|
+
/**
|
|
704
|
+
* Governed share affordance rendering a chosen set of {@link ShareChannel}s.
|
|
705
|
+
* `native` uses the Web Share API (falling back to copy), `copy` writes the URL
|
|
706
|
+
* to the clipboard, and network channels open pre-encoded share intents, each
|
|
707
|
+
* with a transient confirmation message.
|
|
708
|
+
*/
|
|
709
|
+
declare function ShareButtonGroup({ url, title, text, channels, compact, label: labelProp, description, }: ShareButtonGroupProps): react.JSX.Element;
|
|
241
710
|
|
|
711
|
+
/** Visual/interaction state of an `UploadDropzone`. */
|
|
242
712
|
type UploadDropzoneState = 'idle' | 'drag-active' | 'selected' | 'upload-pending' | 'upload-failed' | 'unsupported-type' | 'too-large' | 'removed' | 'readonly';
|
|
713
|
+
/** Props for `UploadDropzone`. */
|
|
243
714
|
interface UploadDropzoneProps {
|
|
244
715
|
title: string;
|
|
245
716
|
description?: string;
|
|
717
|
+
/** Called with the chosen files on drop or file-picker selection. */
|
|
246
718
|
onFilesSelected?: (files: File[]) => void;
|
|
719
|
+
/** `accept` attribute forwarded to the underlying file input. */
|
|
247
720
|
accept?: string;
|
|
721
|
+
/** Badge summarizing the accepted file types. */
|
|
248
722
|
acceptedTypesLabel?: string;
|
|
723
|
+
/** Badge summarizing the maximum file size. */
|
|
249
724
|
maxSizeLabel?: string;
|
|
725
|
+
/** Allows selecting multiple files; defaults to true. */
|
|
250
726
|
multiple?: boolean;
|
|
727
|
+
/** Label for the choose-files button; defaults to "Choose files". */
|
|
251
728
|
actionLabel?: string;
|
|
729
|
+
/** Layout density; `panel` (default) or condensed `inline`. */
|
|
252
730
|
mode?: 'panel' | 'inline';
|
|
731
|
+
/** Controlled dropzone state; defaults to `idle`. */
|
|
253
732
|
state?: UploadDropzoneState;
|
|
733
|
+
/** Names of already-selected files, listed below the prompt. */
|
|
254
734
|
selectedFiles?: string[];
|
|
735
|
+
/** Error message shown in the alert region. */
|
|
255
736
|
error?: string;
|
|
737
|
+
/** Policy or help text shown near the actions. */
|
|
256
738
|
policyText?: string;
|
|
739
|
+
/** Upload progress (0–100), shown while in the `upload-pending` state. */
|
|
257
740
|
progressValue?: number;
|
|
741
|
+
/** `id` applied to the file input. */
|
|
258
742
|
inputId?: string;
|
|
743
|
+
/** `aria-describedby` applied to the file input. */
|
|
259
744
|
describedBy?: string;
|
|
745
|
+
/** Forces the invalid/error styling regardless of `state`. */
|
|
260
746
|
invalid?: boolean;
|
|
747
|
+
/** Marks the file input as required. */
|
|
261
748
|
required?: boolean;
|
|
749
|
+
/** Retry control shown alongside the choose-files button. */
|
|
262
750
|
retryAction?: ReactNode;
|
|
751
|
+
/** Remove control shown alongside the choose-files button. */
|
|
263
752
|
removeAction?: ReactNode;
|
|
753
|
+
/** Renders a non-interactive, disabled dropzone; defaults to false. */
|
|
264
754
|
readonly?: boolean;
|
|
265
755
|
}
|
|
266
|
-
|
|
756
|
+
/**
|
|
757
|
+
* Accessible drag-and-drop upload zone with governed states (idle, drag-active,
|
|
758
|
+
* selected, upload-pending with a progress bar, and error variants), an
|
|
759
|
+
* accepted-types / max-size summary, and optional retry/remove actions. Forwards
|
|
760
|
+
* selected files via `onFilesSelected`; file transport is owned by the caller.
|
|
761
|
+
*/
|
|
762
|
+
declare function UploadDropzone({ title, description, onFilesSelected, accept, acceptedTypesLabel, maxSizeLabel, multiple, actionLabel: actionLabelProp, mode, state, selectedFiles, error, policyText, progressValue, inputId, describedBy, invalid, required, retryAction, removeAction, readonly, }: UploadDropzoneProps): react.JSX.Element;
|
|
267
763
|
|
|
764
|
+
/** How an asset's media is fitted in previews: the underlying `MediaFit` values plus `'crop'`. */
|
|
268
765
|
type GdsAssetDisplayMode = MediaFit | 'crop';
|
|
766
|
+
/** Lifecycle state of an asset as it moves through validation, upload, and metadata capture. */
|
|
269
767
|
type GdsAssetStatus = 'empty' | 'validating' | 'uploading' | 'processing' | 'ready' | 'failed' | 'retrying' | 'metadata-incomplete';
|
|
768
|
+
/** A managed media asset with its source, metadata, and current lifecycle status. */
|
|
270
769
|
interface GdsAsset {
|
|
271
770
|
id: string;
|
|
272
771
|
url?: string;
|
|
273
772
|
thumbnailUrl?: string;
|
|
274
773
|
fileName: string;
|
|
275
774
|
mimeType: string;
|
|
775
|
+
/** Size in bytes. */
|
|
276
776
|
size: number;
|
|
777
|
+
/** Alternative text; required before publish when the alt-text policy demands it. */
|
|
277
778
|
alt?: string;
|
|
278
779
|
caption?: string;
|
|
279
780
|
status: GdsAssetStatus;
|
|
280
781
|
displayMode?: GdsAssetDisplayMode;
|
|
281
782
|
}
|
|
783
|
+
/** Policy for which accessibility metadata must be present before an asset is `ready`. */
|
|
282
784
|
interface GdsAltTextPolicy {
|
|
785
|
+
/** Require non-empty alt text before the asset is considered complete. */
|
|
283
786
|
requireAlt?: boolean;
|
|
787
|
+
/** Require a non-empty caption before the asset is considered complete. */
|
|
284
788
|
requireCaption?: boolean;
|
|
285
789
|
}
|
|
790
|
+
/** Validation policy for accepted file types and size, extending the alt-text requirements. */
|
|
286
791
|
interface GdsAssetValidationPolicy extends GdsAltTextPolicy {
|
|
792
|
+
/** Allowed MIME types; when set, other types fail validation. */
|
|
287
793
|
acceptedTypes?: string[];
|
|
794
|
+
/** Maximum file size in bytes. */
|
|
288
795
|
maxSizeBytes?: number;
|
|
289
796
|
}
|
|
797
|
+
/** A single upload request handed to a {@link GdsAssetAdapter}. */
|
|
290
798
|
interface GdsAssetUploadRequest {
|
|
291
799
|
file: File;
|
|
800
|
+
/** Abort signal wired to the queue's per-upload timeout. */
|
|
292
801
|
signal?: AbortSignal;
|
|
802
|
+
/** Progress callback (0–100) the adapter should call as bytes upload. */
|
|
293
803
|
onProgress?: (progress: number) => void;
|
|
294
804
|
}
|
|
805
|
+
/** Pluggable transport for uploading, removing, and thumbnailing assets. */
|
|
295
806
|
interface GdsAssetAdapter {
|
|
296
807
|
upload: (request: GdsAssetUploadRequest) => Promise<GdsAsset>;
|
|
297
808
|
remove?: (assetId: string) => Promise<void> | void;
|
|
298
809
|
thumbnail?: (asset: GdsAsset) => Promise<string> | string;
|
|
299
810
|
}
|
|
811
|
+
/** One entry in the upload queue, tracking its file, resolved asset, progress, and error. */
|
|
300
812
|
interface GdsAssetQueueItem {
|
|
301
813
|
id: string;
|
|
302
814
|
fileName: string;
|
|
303
815
|
file?: File;
|
|
304
816
|
asset?: GdsAsset;
|
|
305
817
|
status: GdsAssetStatus;
|
|
818
|
+
/** Upload progress, 0–100. */
|
|
306
819
|
progress: number;
|
|
307
820
|
error?: string;
|
|
308
821
|
}
|
|
822
|
+
/** A metadata-only queue event emitted for observability (never carries file contents). */
|
|
309
823
|
interface GdsAssetEvent {
|
|
310
824
|
type: 'asset_selected' | 'validation_failed' | 'upload_started' | 'upload_failed' | 'upload_retry' | 'metadata_saved';
|
|
311
825
|
timestamp: number;
|
|
826
|
+
/** Always `'metadata-only'` — a marker that no file bytes are included. */
|
|
312
827
|
privacy: 'metadata-only';
|
|
313
828
|
message?: string;
|
|
314
829
|
}
|
|
830
|
+
/** Configuration for {@link useGdsAssetUploadQueue}. */
|
|
315
831
|
interface UseGdsAssetUploadQueueConfig {
|
|
316
832
|
adapter: GdsAssetAdapter;
|
|
317
833
|
policy?: GdsAssetValidationPolicy;
|
|
318
834
|
onEvent?: (event: GdsAssetEvent) => void;
|
|
835
|
+
/** Per-upload abort timeout in ms. Defaults to 10000. */
|
|
319
836
|
timeoutMs?: number;
|
|
320
837
|
}
|
|
838
|
+
/** Imperative controller returned by {@link useGdsAssetUploadQueue}. */
|
|
321
839
|
interface GdsAssetUploadQueueController {
|
|
322
840
|
items: GdsAssetQueueItem[];
|
|
323
841
|
selectFiles: (files: File[]) => Promise<void>;
|
|
@@ -325,18 +843,23 @@ interface GdsAssetUploadQueueController {
|
|
|
325
843
|
remove: (itemId: string) => Promise<void>;
|
|
326
844
|
saveMetadata: (itemId: string, metadata: Pick<GdsAsset, 'alt' | 'caption' | 'displayMode'>) => void;
|
|
327
845
|
}
|
|
846
|
+
/** Props for {@link GdsAssetPreviewCard}. */
|
|
328
847
|
interface GdsAssetPreviewCardProps {
|
|
329
848
|
asset: GdsAsset;
|
|
330
849
|
aspectRatio?: MediaPreviewAspectRatio;
|
|
331
850
|
actions?: ReactNode;
|
|
332
851
|
}
|
|
852
|
+
/** Props for {@link GdsAssetManager}, combining the upload-queue config with presentation options. */
|
|
333
853
|
interface GdsAssetManagerProps extends UseGdsAssetUploadQueueConfig {
|
|
334
854
|
title: string;
|
|
335
855
|
description?: string;
|
|
856
|
+
/** Allow selecting more than one file. Defaults to `true`. */
|
|
336
857
|
multiple?: boolean;
|
|
337
858
|
displayMode?: GdsAssetDisplayMode;
|
|
338
859
|
}
|
|
860
|
+
/** Creates a default in-browser {@link GdsAssetAdapter} that uploads via `URL.createObjectURL` and leaves metadata incomplete. */
|
|
339
861
|
declare function createGdsAssetAdapter(): GdsAssetAdapter;
|
|
862
|
+
/** Validates a file against the accepted-types and max-size policy, returning `{ valid, message? }`. */
|
|
340
863
|
declare function validateGdsAsset(file: File, policy?: GdsAssetValidationPolicy): {
|
|
341
864
|
valid: boolean;
|
|
342
865
|
message: string;
|
|
@@ -344,56 +867,185 @@ declare function validateGdsAsset(file: File, policy?: GdsAssetValidationPolicy)
|
|
|
344
867
|
valid: boolean;
|
|
345
868
|
message?: undefined;
|
|
346
869
|
};
|
|
870
|
+
/**
|
|
871
|
+
* Governed upload-queue hook: validates selected files, uploads them through the
|
|
872
|
+
* adapter with a per-item timeout, tracks progress/retry/removal, and enforces
|
|
873
|
+
* the alt-text/caption policy before an item reaches `ready`.
|
|
874
|
+
*/
|
|
347
875
|
declare function useGdsAssetUploadQueue({ adapter, policy, onEvent, timeoutMs, }: UseGdsAssetUploadQueueConfig): GdsAssetUploadQueueController;
|
|
876
|
+
/** Renders a single asset as a governed {@link MediaPreviewCard}, mapping status to the card's state and showing type/size metadata. */
|
|
348
877
|
declare function GdsAssetPreviewCard({ asset, aspectRatio }: GdsAssetPreviewCardProps): react.JSX.Element;
|
|
878
|
+
/**
|
|
879
|
+
* End-to-end governed asset manager: a dropzone wired to {@link useGdsAssetUploadQueue},
|
|
880
|
+
* per-item previews, retry controls, and inline alt-text/caption editing that gates
|
|
881
|
+
* publish until the metadata policy is satisfied.
|
|
882
|
+
*/
|
|
349
883
|
declare function GdsAssetManager({ title, description, adapter, policy, onEvent, timeoutMs, multiple, displayMode, }: GdsAssetManagerProps): react.JSX.Element;
|
|
350
884
|
|
|
885
|
+
/** Access failure the panel helps the user recover from. */
|
|
351
886
|
type AccessRecoveryState = 'unauthenticated' | 'expired-session' | 'timeout' | 'forbidden' | 'missing' | 'unavailable';
|
|
887
|
+
/** A recovery action button rendered in the panel. */
|
|
352
888
|
interface AccessRecoveryAction {
|
|
889
|
+
/** Semantic action id resolving to a governed label/icon. */
|
|
353
890
|
action: SemanticAction;
|
|
354
891
|
onClick?: () => void;
|
|
355
892
|
loading?: boolean;
|
|
356
893
|
disabled?: boolean;
|
|
357
894
|
color?: string;
|
|
895
|
+
/** Button variant; the primary action defaults to "filled", others to "default". */
|
|
358
896
|
variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default';
|
|
359
897
|
}
|
|
898
|
+
/** Props for {@link AccessRecoveryPanel}. */
|
|
360
899
|
interface AccessRecoveryPanelProps {
|
|
900
|
+
/** Access failure to render; selects default copy and recovery actions. */
|
|
361
901
|
state: AccessRecoveryState;
|
|
902
|
+
/** Overrides the localized default title for the state. */
|
|
362
903
|
title?: string;
|
|
904
|
+
/** Overrides the localized default description for the state. */
|
|
363
905
|
description?: ReactNode;
|
|
906
|
+
/** Explicit primary action, overriding the state's default. `null` removes it. */
|
|
364
907
|
primaryAction?: AccessRecoveryAction | null;
|
|
908
|
+
/** Explicit secondary action, overriding the state's default. `null` removes it. */
|
|
365
909
|
secondaryAction?: AccessRecoveryAction | null;
|
|
910
|
+
/** Explicit tertiary action, overriding the state's default. `null` removes it. */
|
|
366
911
|
tertiaryAction?: AccessRecoveryAction | null;
|
|
912
|
+
/** Wires the default retry action where the state supports it. */
|
|
367
913
|
onRetry?: () => void;
|
|
914
|
+
/** Wires the default sign-in action where the state supports it. */
|
|
368
915
|
onSignIn?: () => void;
|
|
916
|
+
/** Wires the default back action where the state supports it. */
|
|
369
917
|
onBack?: () => void;
|
|
918
|
+
/** Optional support/contact action placed in a remaining slot. */
|
|
370
919
|
supportAction?: AccessRecoveryAction | null;
|
|
920
|
+
/** Renders the underlying StateBlock in compact form. */
|
|
371
921
|
compact?: boolean;
|
|
372
922
|
}
|
|
923
|
+
/**
|
|
924
|
+
* Governed access-recovery panel: renders a StateBlock with localized title and
|
|
925
|
+
* description plus default primary/secondary/tertiary recovery actions tailored to
|
|
926
|
+
* each access-failure state. Any action can be overridden or removed per prop.
|
|
927
|
+
*/
|
|
373
928
|
declare function AccessRecoveryPanel({ state, title, description, primaryAction, secondaryAction, tertiaryAction, onRetry, onSignIn, onBack, supportAction, compact, }: AccessRecoveryPanelProps): react.JSX.Element;
|
|
374
929
|
|
|
930
|
+
/** Props for `GdsAccessGate`, extending the access-gate contract with the rendered content and handlers. */
|
|
375
931
|
interface GdsAccessGateProps extends GdsAccessGateContract {
|
|
932
|
+
/** Public teaser/preview shown regardless of access state. */
|
|
376
933
|
preview: ReactNode;
|
|
934
|
+
/** Content revealed once unlocked; a function form is only evaluated when it is actually rendered. */
|
|
377
935
|
protectedContent: ReactNode | (() => ReactNode);
|
|
936
|
+
/** Placeholder shown in place of protected content while locked; defaults to a skeleton. */
|
|
378
937
|
lockedPlaceholder?: ReactNode;
|
|
938
|
+
/** Extra metadata attached to emitted events. */
|
|
379
939
|
metadata?: Record<string, unknown>;
|
|
940
|
+
/** Called when a recovery action is chosen. */
|
|
380
941
|
onAction?: (action: GdsAccessGateAction) => void | Promise<void>;
|
|
942
|
+
/** Receives access-gate lifecycle events (view, denied, unlocked, timeout, error, action). */
|
|
381
943
|
onEvent?: (event: GdsAccessGateEvent) => void;
|
|
382
944
|
}
|
|
383
|
-
|
|
945
|
+
/**
|
|
946
|
+
* Renders a public teaser/preview and gates the protected content behind an access
|
|
947
|
+
* `state` (`locked`, `permission-denied`, `expired`, `unlocked`, …), showing
|
|
948
|
+
* governed sign-in/subscribe/request-access/retry recovery actions and — per
|
|
949
|
+
* `protectedContentPolicy` — never evaluating the protected subtree while locked.
|
|
950
|
+
* Use it for paywalls, auth walls, and entitlement gates: drive `state`/`reason`
|
|
951
|
+
* from your own auth/entitlement runtime and handle choices via `onAction`/`onEvent`.
|
|
952
|
+
*/
|
|
953
|
+
declare function GdsAccessGate({ id, state, reason, title, description, actions, entitlementLabel, teaserLabel: teaserLabelProp, protectedContentPolicy, preview, protectedContent, lockedPlaceholder, metadata, onAction, onEvent, }: GdsAccessGateProps): react.JSX.Element;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Shared, GDS-owned prop surface for the date/time input family — deliberately
|
|
957
|
+
* NOT `extends`-ing any `@mantine/dates` prop type. Structurally reusing a
|
|
958
|
+
* vendor prop type in a public interface leaks it into GDS's public `.d.ts`
|
|
959
|
+
* surface (`scripts/verify-public-types-boundary.mjs`'s gate exists exactly
|
|
960
|
+
* to catch this), which defeats the point of wrapping `@mantine/dates` behind
|
|
961
|
+
* a GDS contract in the first place (see DEPENDENCY_GOVERNANCE.md's Primitive
|
|
962
|
+
* engine class).
|
|
963
|
+
*/
|
|
964
|
+
interface GdsDateInputBaseProps {
|
|
965
|
+
label?: ReactNode;
|
|
966
|
+
description?: ReactNode;
|
|
967
|
+
placeholder?: string;
|
|
968
|
+
disabled?: boolean;
|
|
969
|
+
required?: boolean;
|
|
970
|
+
error?: ReactNode;
|
|
971
|
+
id?: string;
|
|
972
|
+
name?: string;
|
|
973
|
+
minDate?: Date | string;
|
|
974
|
+
maxDate?: Date | string;
|
|
975
|
+
/** Dayjs format string for the displayed value (Mantine's own default is `'MMMM D, YYYY'`). */
|
|
976
|
+
valueFormat?: string;
|
|
977
|
+
className?: string;
|
|
978
|
+
style?: CSSProperties;
|
|
979
|
+
'aria-label'?: string;
|
|
980
|
+
'aria-describedby'?: string;
|
|
981
|
+
'aria-invalid'?: boolean;
|
|
982
|
+
}
|
|
983
|
+
/** Props for {@link GdsDateInput}: a single date `value` (`Date` or ISO string) and a `Date | null` change handler. */
|
|
984
|
+
interface GdsDateInputProps extends GdsDateInputBaseProps {
|
|
985
|
+
/** Selected date as a `Date` or ISO (`yyyy-mm-dd`) string. */
|
|
986
|
+
value?: Date | string | null;
|
|
987
|
+
/** Called with the selected date, or `null` when cleared. */
|
|
988
|
+
onChange?: (value: Date | null) => void;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* Governed single-date input wrapping the date engine behind a GDS-owned prop
|
|
992
|
+
* surface. Accepts a `Date` or ISO (`yyyy-mm-dd`) string as `value` and emits a
|
|
993
|
+
* `Date | null`, with clearable UX and optional `minDate`/`maxDate` bounds
|
|
994
|
+
* (validated in development). Use it for any single calendar-date field; use
|
|
995
|
+
* {@link GdsDateTimeInput} when a time-of-day is also needed, or
|
|
996
|
+
* {@link GdsDateRangeInput} for a start/end range.
|
|
997
|
+
*/
|
|
998
|
+
declare function GdsDateInput({ value, onChange, minDate, maxDate, ...rest }: GdsDateInputProps): react.JSX.Element;
|
|
999
|
+
/** Props for {@link GdsDateTimeInput}: a single date-and-time `value` (`Date` or ISO string) and a `Date | null` change handler. */
|
|
1000
|
+
interface GdsDateTimeInputProps extends GdsDateInputBaseProps {
|
|
1001
|
+
/** Selected moment as a `Date` or ISO string. */
|
|
1002
|
+
value?: Date | string | null;
|
|
1003
|
+
/** Called with the selected moment, or `null` when cleared. */
|
|
1004
|
+
onChange?: (value: Date | null) => void;
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Governed date-and-time input: like {@link GdsDateInput} but captures a
|
|
1008
|
+
* time-of-day alongside the calendar date, wrapping the date engine behind the
|
|
1009
|
+
* same GDS-owned `Date | string` value / `Date | null` change contract. Use it
|
|
1010
|
+
* when the moment matters (appointments, deadlines with a time), not just the day.
|
|
1011
|
+
*/
|
|
1012
|
+
declare function GdsDateTimeInput({ value, onChange, minDate, maxDate, ...rest }: GdsDateTimeInputProps): react.JSX.Element;
|
|
1013
|
+
/** A `[start, end]` date-range tuple; either end may be `null` while the range is incomplete. */
|
|
1014
|
+
type GdsDateRangeValue = [Date | null, Date | null];
|
|
1015
|
+
/** Props for {@link GdsDateRangeInput}: a `[start, end]` range `value` and a matching change handler. */
|
|
1016
|
+
interface GdsDateRangeInputProps extends GdsDateInputBaseProps {
|
|
1017
|
+
/** Selected `[start, end]` range. */
|
|
1018
|
+
value?: GdsDateRangeValue;
|
|
1019
|
+
/** Called with the updated `[start, end]` range. */
|
|
1020
|
+
onChange?: (value: GdsDateRangeValue) => void;
|
|
1021
|
+
}
|
|
1022
|
+
/**
|
|
1023
|
+
* Governed start/end date-range input built on the same GDS-owned surface as
|
|
1024
|
+
* {@link GdsDateInput}. Its `value` and `onChange` use a `[start, end]` tuple of
|
|
1025
|
+
* `Date | null`. Use it for period pickers — coverage windows, report ranges,
|
|
1026
|
+
* booking spans — instead of wiring two separate single-date inputs.
|
|
1027
|
+
*/
|
|
1028
|
+
declare function GdsDateRangeInput({ value, onChange, minDate, maxDate, ...rest }: GdsDateRangeInputProps): react.JSX.Element;
|
|
384
1029
|
|
|
1030
|
+
/** Severity of a validation issue; `blocking` prevents submit, `warning`/`info` do not. */
|
|
385
1031
|
type ValidationSeverity = 'blocking' | 'warning' | 'info';
|
|
1032
|
+
/** A single field-level validation issue. */
|
|
386
1033
|
interface ValidationIssue {
|
|
387
1034
|
field: string;
|
|
388
1035
|
message: string;
|
|
389
1036
|
severity: ValidationSeverity;
|
|
390
1037
|
}
|
|
1038
|
+
/** Lifecycle state of a form submission, from `idle` through validation, autosave, and success/error. */
|
|
391
1039
|
type SubmitState = 'idle' | 'validating' | 'autosaving' | 'saved' | 'submitting' | 'optimistic' | 'success' | 'error' | 'restored';
|
|
1040
|
+
/** Per-field state tracked by the form reducer. */
|
|
392
1041
|
interface FieldState {
|
|
393
1042
|
value: unknown;
|
|
1043
|
+
/** Whether the field has been focused/blurred by the user. */
|
|
394
1044
|
touched: boolean;
|
|
1045
|
+
/** Whether the field's value has changed from its initial value. */
|
|
395
1046
|
dirty: boolean;
|
|
396
1047
|
}
|
|
1048
|
+
/** Complete immutable snapshot of a form: all field states, current issues, and submit status. */
|
|
397
1049
|
interface FormSnapshot {
|
|
398
1050
|
fields: Record<string, FieldState>;
|
|
399
1051
|
issues: ValidationIssue[];
|
|
@@ -418,6 +1070,7 @@ type GdsFormAction = {
|
|
|
418
1070
|
type: 'reset';
|
|
419
1071
|
values?: Record<string, unknown>;
|
|
420
1072
|
};
|
|
1073
|
+
/** Pure reducer that advances a `FormSnapshot`: setting/touching fields, replacing issues, updating submit state, or resetting to new values. */
|
|
421
1074
|
declare function gdsFormReducer(state: FormSnapshot, action: GdsFormAction): FormSnapshot;
|
|
422
1075
|
type SyncValidator = (snapshot: FormSnapshot) => ValidationIssue[];
|
|
423
1076
|
type AsyncValidator = (snapshot: FormSnapshot) => Promise<ValidationIssue[]>;
|
|
@@ -428,26 +1081,36 @@ interface UseGdsFormConfig<TValues extends Record<string, unknown>> {
|
|
|
428
1081
|
validateAsync?: AsyncValidator;
|
|
429
1082
|
onSubmit: SubmitHandler<TValues>;
|
|
430
1083
|
}
|
|
1084
|
+
/** Pluggable draft persistence for form orchestration: load, save, and clear draft values. */
|
|
431
1085
|
interface GdsDraftAdapter<TValues extends Record<string, unknown>> {
|
|
432
1086
|
load: () => Promise<TValues | null> | TValues | null;
|
|
433
1087
|
save: (values: TValues) => Promise<void> | void;
|
|
434
1088
|
clear: () => Promise<void> | void;
|
|
435
1089
|
}
|
|
1090
|
+
/** A server-side validation error, optionally tied to a specific field. */
|
|
436
1091
|
interface GdsFormServerError {
|
|
437
1092
|
field?: string;
|
|
438
1093
|
message: string;
|
|
439
1094
|
}
|
|
1095
|
+
/** Metadata-only telemetry event emitted over the orchestrated form lifecycle. */
|
|
440
1096
|
interface GdsFormOrchestrationEvent {
|
|
441
1097
|
type: 'dirty_changed' | 'validation_failed' | 'autosave_succeeded' | 'submit_failed' | 'retry_succeeded' | 'draft_restored';
|
|
442
1098
|
status: SubmitState;
|
|
443
1099
|
timestamp: number;
|
|
1100
|
+
/** Always `'metadata-only'` — events never carry field values. */
|
|
444
1101
|
privacy: 'metadata-only';
|
|
445
1102
|
}
|
|
1103
|
+
/** Configuration for `useGdsFormOrchestration`, extending the base form config with drafts, autosave, optimistic submit, server-error mapping, and telemetry. */
|
|
446
1104
|
interface UseGdsFormOrchestrationConfig<TValues extends Record<string, unknown>> extends UseGdsFormConfig<TValues> {
|
|
1105
|
+
/** Adapter enabling draft load/save/clear (draft restore requires this). */
|
|
447
1106
|
draftAdapter?: GdsDraftAdapter<TValues>;
|
|
1107
|
+
/** Autosave the draft before each submit. Defaults to `false`. */
|
|
448
1108
|
autosave?: boolean;
|
|
1109
|
+
/** Enter the `optimistic` state instead of `submitting` while the submit is in flight. Defaults to `false`. */
|
|
449
1110
|
optimisticSubmit?: boolean;
|
|
1111
|
+
/** Maps a thrown submit error into field-level server errors. */
|
|
450
1112
|
mapServerErrors?: (error: unknown) => GdsFormServerError[];
|
|
1113
|
+
/** Receives lifecycle telemetry events. */
|
|
451
1114
|
onEvent?: (event: GdsFormOrchestrationEvent) => void;
|
|
452
1115
|
}
|
|
453
1116
|
interface GdsFormController<TValues extends Record<string, unknown>> {
|
|
@@ -460,37 +1123,76 @@ interface GdsFormController<TValues extends Record<string, unknown>> {
|
|
|
460
1123
|
discardDraft?: () => Promise<void>;
|
|
461
1124
|
autosaveDraft?: () => Promise<boolean>;
|
|
462
1125
|
}
|
|
1126
|
+
/** Builds a `GdsDraftAdapter` backed by a Web Storage store (defaults to `localStorage`), JSON-serializing values under `storageKey` and treating parse failures as no draft. */
|
|
463
1127
|
declare function createGdsDraftAdapter<TValues extends Record<string, unknown>>(storageKey: string, storage?: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>): GdsDraftAdapter<TValues>;
|
|
1128
|
+
/**
|
|
1129
|
+
* Headless controller for a governed form: it holds the field snapshot, runs
|
|
1130
|
+
* synchronous then (only if clean) asynchronous validation on submit, and tracks
|
|
1131
|
+
* the submit lifecycle (`validating` → `submitting` → `success`/`error`). Use it
|
|
1132
|
+
* for a self-contained form where you render the fields yourself and just need
|
|
1133
|
+
* value state, ordered validation, and submit/retry wiring. For draft autosave,
|
|
1134
|
+
* optimistic submit, server-error mapping, or telemetry, use
|
|
1135
|
+
* {@link useGdsFormOrchestration} instead.
|
|
1136
|
+
*/
|
|
464
1137
|
declare function useGdsForm<TValues extends Record<string, unknown>>({ initialValues, validate, validateAsync, onSubmit, }: UseGdsFormConfig<TValues>): GdsFormController<TValues>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Extended form controller that layers product-grade orchestration on top of
|
|
1140
|
+
* {@link useGdsForm}: optional draft persistence and autosave (via a
|
|
1141
|
+
* `draftAdapter`), optimistic submit, server-error mapping, and lifecycle
|
|
1142
|
+
* telemetry through `onEvent`. Reach for this when a form must survive reloads,
|
|
1143
|
+
* report analytics, or reconcile server-side validation errors; use the lighter
|
|
1144
|
+
* {@link useGdsForm} when it does not.
|
|
1145
|
+
*/
|
|
465
1146
|
declare function useGdsFormOrchestration<TValues extends Record<string, unknown>>({ initialValues, validate, validateAsync, onSubmit, draftAdapter, autosave, optimisticSubmit, mapServerErrors, onEvent, }: UseGdsFormOrchestrationConfig<TValues>): GdsFormController<TValues>;
|
|
1147
|
+
/** Context provider that exposes a form `snapshot` to descendant field/summary components (`FormErrorSummary`, `ValidatedFieldMessage`). */
|
|
466
1148
|
declare function GdsFormProvider({ snapshot, children }: {
|
|
467
1149
|
snapshot: FormSnapshot;
|
|
468
1150
|
children: ReactNode;
|
|
469
1151
|
}): react.JSX.Element;
|
|
1152
|
+
/** Returns the current `FormSnapshot` from the nearest `GdsFormProvider`; throws if used outside one. */
|
|
470
1153
|
declare function useGdsFormSnapshot(): FormSnapshot;
|
|
471
|
-
|
|
1154
|
+
/** Renders a red `Alert` listing the snapshot's blocking issues as in-page anchor links to each field; renders nothing when there are none. */
|
|
1155
|
+
declare function FormErrorSummary({ title: titleProp }: {
|
|
472
1156
|
title?: ReactNode;
|
|
473
1157
|
}): react.JSX.Element | null;
|
|
1158
|
+
/** Alias of {@link FormErrorSummary}. */
|
|
474
1159
|
declare const GdsValidationSummary: typeof FormErrorSummary;
|
|
1160
|
+
/** Renders the first blocking issue for `field` as an error message (id `${field}-error`, for `aria-describedby`); renders nothing when the field is valid. */
|
|
475
1161
|
declare function ValidatedFieldMessage({ field }: {
|
|
476
1162
|
field: string;
|
|
477
1163
|
}): react.JSX.Element | null;
|
|
478
1164
|
|
|
479
|
-
|
|
1165
|
+
/** Every field type the schema-form engine can render, plus the `hidden`/`conditional`/`unsupported` control markers. */
|
|
1166
|
+
type GdsSchemaFieldType = 'text' | 'email' | 'url' | 'password' | 'number' | 'boolean' | 'select' | 'checkbox-group' | 'repeatable' | 'textarea' | 'date' | 'hidden' | 'conditional' | 'file-upload' | 'unsupported';
|
|
1167
|
+
/** A single choice for a `select` or `checkbox-group` field. */
|
|
480
1168
|
interface GdsFieldOption {
|
|
481
1169
|
label: string;
|
|
482
1170
|
value: string;
|
|
483
1171
|
}
|
|
1172
|
+
/** Declarative description of one form field — its type, labels, validation bounds, and any upload/repeatable/conditional metadata. Produced by the schema adapters and consumed by the renderers. */
|
|
484
1173
|
interface GdsFieldDescriptor {
|
|
485
1174
|
name: string;
|
|
486
1175
|
type: GdsSchemaFieldType;
|
|
487
1176
|
label: string;
|
|
488
1177
|
description?: string;
|
|
1178
|
+
/** Translation key used to localize this field's label and messages. */
|
|
489
1179
|
i18nKey: string;
|
|
490
1180
|
required?: boolean;
|
|
491
1181
|
hidden?: boolean;
|
|
1182
|
+
/** Expression that gates whether the field renders (makes the field `conditional`). */
|
|
492
1183
|
condition?: string;
|
|
1184
|
+
/** Choices for `select` and `checkbox-group` fields. */
|
|
493
1185
|
options?: GdsFieldOption[];
|
|
1186
|
+
/** Sub-fields of a `repeatable` row group. Each row is an object keyed by these fields' names. */
|
|
1187
|
+
fields?: GdsFieldDescriptor[];
|
|
1188
|
+
/** Minimum rows for a `repeatable` field (also its initial row count when no `defaultValue`). */
|
|
1189
|
+
minRows?: number;
|
|
1190
|
+
/** Maximum rows for a `repeatable` field. */
|
|
1191
|
+
maxRows?: number;
|
|
1192
|
+
/** Accessible/visible label for a `repeatable` field's add-row button (default "Add row"). */
|
|
1193
|
+
addRowLabel?: string;
|
|
1194
|
+
/** Accessible/visible label for a `repeatable` field's remove-row button (default "Remove"). */
|
|
1195
|
+
removeRowLabel?: string;
|
|
494
1196
|
defaultValue?: unknown;
|
|
495
1197
|
minLength?: number;
|
|
496
1198
|
maxLength?: number;
|
|
@@ -507,17 +1209,20 @@ interface GdsFieldDescriptor {
|
|
|
507
1209
|
uploadProgress?: number;
|
|
508
1210
|
unsupportedReason?: string;
|
|
509
1211
|
}
|
|
1212
|
+
/** A complete declarative form: an id, optional title/description, and its ordered field descriptors. */
|
|
510
1213
|
interface GdsFormSchema {
|
|
511
1214
|
id: string;
|
|
512
1215
|
title?: string;
|
|
513
1216
|
description?: string;
|
|
514
1217
|
fields: GdsFieldDescriptor[];
|
|
515
1218
|
}
|
|
1219
|
+
/** Output of a schema adapter: the generated form schema (when parseable), plus any validation issues and telemetry events. */
|
|
516
1220
|
interface GdsSchemaAdapterResult {
|
|
517
1221
|
schema?: GdsFormSchema;
|
|
518
1222
|
issues: ValidationIssue[];
|
|
519
1223
|
events: GdsSchemaFormEvent[];
|
|
520
1224
|
}
|
|
1225
|
+
/** Metadata an upload adapter returns for a stored file (id, name, url, size, type, plus arbitrary extra fields). */
|
|
521
1226
|
interface GdsSchemaUploadResult {
|
|
522
1227
|
[key: string]: unknown;
|
|
523
1228
|
id?: string;
|
|
@@ -527,21 +1232,25 @@ interface GdsSchemaUploadResult {
|
|
|
527
1232
|
type?: string;
|
|
528
1233
|
metadata?: Record<string, unknown>;
|
|
529
1234
|
}
|
|
1235
|
+
/** Arguments passed to an upload adapter's `upload`: the field, its selected files, an abort `signal`, and a progress callback. */
|
|
530
1236
|
interface GdsSchemaUploadRequest {
|
|
531
1237
|
field: GdsFieldDescriptor;
|
|
532
1238
|
files: File[];
|
|
533
1239
|
signal: AbortSignal;
|
|
534
1240
|
onProgress: (progress: number) => void;
|
|
535
1241
|
}
|
|
1242
|
+
/** Arguments passed to an upload adapter's `remove`: the field, its already-uploaded values, and an abort `signal`. */
|
|
536
1243
|
interface GdsSchemaUploadRemoveRequest {
|
|
537
1244
|
field: GdsFieldDescriptor;
|
|
538
1245
|
value: GdsSchemaUploadResult[];
|
|
539
1246
|
signal: AbortSignal;
|
|
540
1247
|
}
|
|
1248
|
+
/** Consumer-owned adapter that performs the file uploads (and optional removals) for `file-upload` fields. */
|
|
541
1249
|
interface GdsSchemaUploadAdapter {
|
|
542
1250
|
upload: (request: GdsSchemaUploadRequest) => Promise<GdsSchemaUploadResult | GdsSchemaUploadResult[]>;
|
|
543
1251
|
remove?: (request: GdsSchemaUploadRemoveRequest) => Promise<void>;
|
|
544
1252
|
}
|
|
1253
|
+
/** Metadata-only telemetry event emitted during schema parsing, submission, and the upload lifecycle. */
|
|
545
1254
|
interface GdsSchemaFormEvent {
|
|
546
1255
|
type: 'schema_parse_failed' | 'unsupported_field' | 'generated_submit_failed' | 'upload_started' | 'upload_progress' | 'upload_succeeded' | 'upload_failed' | 'upload_cancelled' | 'upload_removed' | 'upload_retry_requested';
|
|
547
1256
|
field?: string;
|
|
@@ -549,7 +1258,9 @@ interface GdsSchemaFormEvent {
|
|
|
549
1258
|
privacy: 'metadata-only';
|
|
550
1259
|
message?: string;
|
|
551
1260
|
}
|
|
1261
|
+
/** Renders a single field's control from its {@link GdsFieldRendererContext}. */
|
|
552
1262
|
type GdsFieldRenderer = (context: GdsFieldRendererContext) => ReactNode;
|
|
1263
|
+
/** Context handed to a field renderer: the descriptor, its current `value`, a `setValue` setter, the `describedBy` id, and validity. */
|
|
553
1264
|
interface GdsFieldRendererContext {
|
|
554
1265
|
field: GdsFieldDescriptor;
|
|
555
1266
|
value: unknown;
|
|
@@ -557,31 +1268,42 @@ interface GdsFieldRendererContext {
|
|
|
557
1268
|
describedBy: string;
|
|
558
1269
|
invalid: boolean;
|
|
559
1270
|
}
|
|
1271
|
+
/** Map of field renderers keyed by field type or field name; a name key overrides the type key. */
|
|
560
1272
|
type GdsFieldRendererMap = Partial<Record<GdsSchemaFieldType | string, GdsFieldRenderer>>;
|
|
1273
|
+
/** Options for {@link createGdsFormFromSchema}: which adapter to run and an optional id and (OpenAPI) schema name. */
|
|
561
1274
|
interface CreateGdsFormFromSchemaOptions {
|
|
562
1275
|
adapter: 'json-schema' | 'openapi' | 'zod';
|
|
563
1276
|
id?: string;
|
|
564
1277
|
schemaName?: string;
|
|
565
1278
|
}
|
|
1279
|
+
/** Props for {@link GdsSchemaForm}. */
|
|
566
1280
|
interface GdsSchemaFormProps<TValues extends Record<string, unknown> = Record<string, unknown>> {
|
|
567
1281
|
schema: GdsFormSchema;
|
|
1282
|
+
/** Called with the collected typed values once validation passes. */
|
|
568
1283
|
onSubmit: (values: TValues) => Promise<void> | void;
|
|
1284
|
+
/** Per-type or per-name renderer overrides for individual fields. */
|
|
569
1285
|
renderers?: GdsFieldRendererMap;
|
|
1286
|
+
/** Adapter used to upload the files of any `file-upload` field. */
|
|
570
1287
|
uploadAdapter?: GdsSchemaUploadAdapter;
|
|
571
1288
|
onEvent?: (event: GdsSchemaFormEvent | GdsFormOrchestrationEvent) => void;
|
|
572
1289
|
submitLabel?: string;
|
|
573
1290
|
}
|
|
1291
|
+
/** Converts a JSON Schema object into a {@link GdsFormSchema}, mapping each property to a field descriptor and flagging unsupported shapes as issues. */
|
|
574
1292
|
declare function jsonSchemaToGdsFormSchema(schema: Record<string, unknown>, options?: {
|
|
575
1293
|
id?: string;
|
|
576
1294
|
}): GdsSchemaAdapterResult;
|
|
1295
|
+
/** Converts an OpenAPI document — a requestBody schema or a named `components.schemas` entry — into a {@link GdsFormSchema}. */
|
|
577
1296
|
declare function openApiToGdsFormSchema(document: Record<string, any>, options?: {
|
|
578
1297
|
id?: string;
|
|
579
1298
|
schemaName?: string;
|
|
580
1299
|
}): GdsSchemaAdapterResult;
|
|
1300
|
+
/** Converts a Zod object schema into a {@link GdsFormSchema} by reading its shape and required keys. */
|
|
581
1301
|
declare function zodToGdsFormSchema(zodSchema: unknown, options?: {
|
|
582
1302
|
id?: string;
|
|
583
1303
|
}): GdsSchemaAdapterResult;
|
|
1304
|
+
/** Adapter entry point: builds a {@link GdsFormSchema} from a JSON Schema, OpenAPI document, or Zod schema per `options.adapter`. */
|
|
584
1305
|
declare function createGdsFormFromSchema(source: unknown, options: CreateGdsFormFromSchemaOptions): GdsSchemaAdapterResult;
|
|
1306
|
+
/** Props for {@link FileUploadField}. */
|
|
585
1307
|
interface FileUploadFieldProps {
|
|
586
1308
|
id: string;
|
|
587
1309
|
label: string;
|
|
@@ -602,51 +1324,97 @@ interface FileUploadFieldProps {
|
|
|
602
1324
|
onUploadEvent?: (event: GdsSchemaFormEvent) => void;
|
|
603
1325
|
onChange?: (value: File[] | GdsSchemaUploadResult[]) => void;
|
|
604
1326
|
}
|
|
1327
|
+
/**
|
|
1328
|
+
* File-upload control for schema forms: wraps {@link UploadDropzone} and, when an
|
|
1329
|
+
* `uploadAdapter` is supplied, drives the upload lifecycle — progress, retry,
|
|
1330
|
+
* cancel, and remove — with abort handling and metadata-only event emission.
|
|
1331
|
+
*/
|
|
605
1332
|
declare function FileUploadField({ id, label, field, value, describedBy, invalid, required, accept, multiple, maxFileSizeBytes, maxFileSizeLabel, actionLabel, policyText, state, progressValue, uploadAdapter, onUploadEvent, onChange, }: FileUploadFieldProps): react.JSX.Element;
|
|
606
|
-
|
|
1333
|
+
/**
|
|
1334
|
+
* Renders a complete, validated form from a declarative `GdsFormSchema` instead
|
|
1335
|
+
* of hand-written inputs: each field's `type` maps to the governed control, with
|
|
1336
|
+
* required/length/pattern validation, submitting/error states, and optional file
|
|
1337
|
+
* upload built in. Use it for create/edit forms; generate the schema from JSON
|
|
1338
|
+
* Schema, OpenAPI, or Zod via `createGdsFormFromSchema` when you already have one.
|
|
1339
|
+
*/
|
|
1340
|
+
declare function GdsSchemaForm<TValues extends Record<string, unknown> = Record<string, unknown>>({ schema, onSubmit, renderers, uploadAdapter, onEvent, submitLabel: submitLabelProp, }: GdsSchemaFormProps<TValues>): react.JSX.Element;
|
|
607
1341
|
|
|
1342
|
+
/** Row spacing density for the advanced data table. */
|
|
608
1343
|
type AdvancedTableDensity = 'compact' | 'comfortable';
|
|
1344
|
+
/** Sort direction for a table column. */
|
|
609
1345
|
type AdvancedSortDirection = 'asc' | 'desc';
|
|
1346
|
+
/** Definition of a single advanced-table column. */
|
|
610
1347
|
interface AdvancedTableColumn<T extends Record<string, unknown>> {
|
|
1348
|
+
/** Row property key used to read the cell value and as the column identity. */
|
|
611
1349
|
key: string;
|
|
612
1350
|
label: string;
|
|
1351
|
+
/** Enables the sortable header button for this column. */
|
|
613
1352
|
sortable?: boolean;
|
|
614
1353
|
width?: number | string;
|
|
1354
|
+
/** Custom cell renderer; defaults to the stringified row value. */
|
|
615
1355
|
render?: (row: T) => ReactNode;
|
|
1356
|
+
/** Extracts the value used for sorting; defaults to the stringified row value. */
|
|
616
1357
|
sortAccessor?: (row: T) => string | number;
|
|
617
1358
|
}
|
|
1359
|
+
/** Props for the `AdvancedDataTable` component. Selection and sort are uncontrolled unless the matching value/change props are supplied. */
|
|
618
1360
|
interface AdvancedDataTableProps<T extends Record<string, unknown>> {
|
|
619
1361
|
rows: T[];
|
|
620
1362
|
columns: AdvancedTableColumn<T>[];
|
|
1363
|
+
/** Derives a stable id for each row. */
|
|
621
1364
|
rowId: (row: T, index: number) => string;
|
|
622
1365
|
loading?: boolean;
|
|
1366
|
+
/** Error message; when set, an error state block is shown instead of the table. */
|
|
623
1367
|
error?: string | null;
|
|
1368
|
+
/** Row density. Uncontrolled default is `comfortable`. */
|
|
624
1369
|
density?: AdvancedTableDensity;
|
|
1370
|
+
/** Keep the header visible while scrolling. Defaults to `true`. */
|
|
625
1371
|
stickyHeader?: boolean;
|
|
1372
|
+
/** Top offset for the sticky header, in pixels. Defaults to `0`. */
|
|
626
1373
|
stickyHeaderOffset?: number;
|
|
1374
|
+
/** Controlled selected row ids; provide with `onSelectedRowIdsChange`. */
|
|
627
1375
|
selectedRowIds?: string[];
|
|
628
1376
|
onSelectedRowIdsChange?: (ids: string[]) => void;
|
|
1377
|
+
/** Controlled sort column key; provide with `onSortChange`. */
|
|
629
1378
|
sortBy?: string;
|
|
630
1379
|
sortDirection?: AdvancedSortDirection;
|
|
631
1380
|
onSortChange?: (columnKey: string, direction: AdvancedSortDirection) => void;
|
|
1381
|
+
/** Small-screen fallback: render the first rows as stacked cards, or `none`. Defaults to `stacked-cards`. */
|
|
632
1382
|
responsiveFallback?: 'stacked-cards' | 'none';
|
|
633
1383
|
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Governed enterprise data grid with sortable columns, row and select-all
|
|
1386
|
+
* selection, adjustable density, and a sticky header. Selection and sort work
|
|
1387
|
+
* uncontrolled, or become controlled when the matching value/change props are
|
|
1388
|
+
* passed. Renders error, loading, and empty state blocks in place of the table.
|
|
1389
|
+
*/
|
|
634
1390
|
declare function AdvancedDataTable<T extends Record<string, unknown>>({ rows, columns, rowId, loading, error, density: densityProp, stickyHeader, stickyHeaderOffset, selectedRowIds, onSelectedRowIdsChange, sortBy: sortByProp, sortDirection: sortDirectionProp, onSortChange, responsiveFallback, }: AdvancedDataTableProps<T>): react.JSX.Element;
|
|
635
1391
|
|
|
1392
|
+
/** Sort direction for a data-table column. */
|
|
636
1393
|
type GdsTableSortDirection = 'asc' | 'desc';
|
|
1394
|
+
/** Lifecycle status of the data table's load and interactions. */
|
|
637
1395
|
type GdsTableStatus = 'idle' | 'loading' | 'refreshing' | 'ready' | 'empty' | 'filtered-empty' | 'error' | 'partial' | 'exporting';
|
|
1396
|
+
/** Column definition for {@link GdsDataTable}. */
|
|
638
1397
|
interface GdsTableColumn<T extends Record<string, unknown>> {
|
|
1398
|
+
/** Row property this column reads. */
|
|
639
1399
|
key: keyof T & string;
|
|
640
1400
|
label: string;
|
|
1401
|
+
/** Enables the sortable header button for this column. */
|
|
641
1402
|
sortable?: boolean;
|
|
1403
|
+
/** Whether the column participates in search/filter matching. Defaults to true. */
|
|
642
1404
|
filterable?: boolean;
|
|
1405
|
+
/** Hides the column from rendering while keeping it in the data set. */
|
|
643
1406
|
hidden?: boolean;
|
|
644
1407
|
width?: number | string;
|
|
1408
|
+
/** Marks cells as containing focusable controls, enabling Enter/F2/Escape cell interaction. */
|
|
645
1409
|
interactive?: boolean;
|
|
1410
|
+
/** Custom cell renderer; falls back to the stringified cell value. */
|
|
646
1411
|
render?: (row: T) => ReactNode;
|
|
1412
|
+
/** Derives the sort/search value for a row, overriding the raw `key` value. */
|
|
647
1413
|
accessor?: (row: T) => string | number | boolean | null | undefined;
|
|
1414
|
+
/** Ordering hint (lower first) for which fields surface in the mobile card fallback. */
|
|
648
1415
|
mobilePriority?: number;
|
|
649
1416
|
}
|
|
1417
|
+
/** Current query state (paging, search, sort, and filters) driving a data-table load. */
|
|
650
1418
|
interface GdsTableQuery {
|
|
651
1419
|
page: number;
|
|
652
1420
|
pageSize: number;
|
|
@@ -655,36 +1423,51 @@ interface GdsTableQuery {
|
|
|
655
1423
|
sortDirection: GdsTableSortDirection;
|
|
656
1424
|
filters: Record<string, string>;
|
|
657
1425
|
}
|
|
1426
|
+
/** Result returned by a data adapter's load: the page of rows plus the total row count. */
|
|
658
1427
|
interface GdsTableLoadResult<T extends Record<string, unknown>> {
|
|
659
1428
|
rows: T[];
|
|
660
1429
|
total: number;
|
|
1430
|
+
/** Marks the result as incomplete (e.g. capped/partial data), surfacing the `partial` status. */
|
|
661
1431
|
partial?: boolean;
|
|
662
1432
|
}
|
|
1433
|
+
/** Data source for a table, resolving a query into rows in local or remote mode. */
|
|
663
1434
|
interface GdsTableDataAdapter<T extends Record<string, unknown>> {
|
|
664
1435
|
mode: 'local' | 'remote';
|
|
1436
|
+
/** Resolves the query into a page of rows; receives an abort signal for cancellation/timeout. */
|
|
665
1437
|
load: (query: GdsTableQuery, signal?: AbortSignal) => Promise<GdsTableLoadResult<T>>;
|
|
666
1438
|
}
|
|
1439
|
+
/** Payload passed to an export handler: the active query, selected row ids, and current rows. */
|
|
667
1440
|
interface GdsExportRequest<T extends Record<string, unknown>> {
|
|
668
1441
|
query: GdsTableQuery;
|
|
669
1442
|
selectedRowIds: string[];
|
|
670
1443
|
rows: T[];
|
|
671
1444
|
}
|
|
1445
|
+
/** Metadata-only telemetry event for table load/filter/sort/selection/export activity. */
|
|
672
1446
|
interface GdsTableEvent {
|
|
673
1447
|
type: 'load_started' | 'load_failed' | 'filter_changed' | 'sort_changed' | 'selection_changed' | 'export_requested';
|
|
674
1448
|
timestamp: number;
|
|
675
1449
|
privacy: 'metadata-only';
|
|
676
1450
|
message?: string;
|
|
677
1451
|
}
|
|
1452
|
+
/** Configuration for {@link useGdsDataTable} and {@link GdsDataTable}. */
|
|
678
1453
|
interface UseGdsDataTableConfig<T extends Record<string, unknown>> {
|
|
679
1454
|
columns: GdsTableColumn<T>[];
|
|
1455
|
+
/** Returns a stable unique id for a row, used for selection and keys. */
|
|
680
1456
|
rowId: (row: T, index: number) => string;
|
|
1457
|
+
/** Data source that resolves queries into rows. */
|
|
681
1458
|
adapter: GdsTableDataAdapter<T>;
|
|
1459
|
+
/** Seed values merged into the default query on first load. */
|
|
682
1460
|
initialQuery?: Partial<GdsTableQuery>;
|
|
1461
|
+
/** Receives metadata-only table telemetry events. */
|
|
683
1462
|
onEvent?: (event: GdsTableEvent) => void;
|
|
1463
|
+
/** Handles an export request; receives the active query, rows, and selection. */
|
|
684
1464
|
onExport?: (request: GdsExportRequest<T>) => Promise<void> | void;
|
|
1465
|
+
/** Load timeout in milliseconds before the request is aborted. Defaults to 8000. */
|
|
685
1466
|
timeoutMs?: number;
|
|
1467
|
+
/** Caps how many loaded rows are rendered, virtualizing the visible window. */
|
|
686
1468
|
virtualizedRowLimit?: number;
|
|
687
1469
|
}
|
|
1470
|
+
/** Imperative controller returned by {@link useGdsDataTable}: current state plus query, selection, and export actions. */
|
|
688
1471
|
interface GdsDataTableController<T extends Record<string, unknown>> {
|
|
689
1472
|
query: GdsTableQuery;
|
|
690
1473
|
status: GdsTableStatus;
|
|
@@ -704,20 +1487,43 @@ interface GdsDataTableController<T extends Record<string, unknown>> {
|
|
|
704
1487
|
retry: () => void;
|
|
705
1488
|
exportRows: () => Promise<void>;
|
|
706
1489
|
}
|
|
1490
|
+
/** Props for {@link GdsDataTable}, extending {@link UseGdsDataTableConfig}. */
|
|
707
1491
|
interface GdsDataTableProps<T extends Record<string, unknown>> extends UseGdsDataTableConfig<T> {
|
|
1492
|
+
/** Accessible table caption and heading text. Defaults to "Data table". */
|
|
708
1493
|
caption?: string;
|
|
1494
|
+
/** Optional summary line rendered under the caption. */
|
|
709
1495
|
summary?: ReactNode;
|
|
1496
|
+
/** Label for the export button. Defaults to "Export". */
|
|
710
1497
|
exportLabel?: string;
|
|
1498
|
+
/** Label for the retry button shown in the error state. Defaults to "Retry". */
|
|
711
1499
|
retryLabel?: string;
|
|
1500
|
+
/** Renders the mobile card fallback beneath the table. Defaults to true. */
|
|
712
1501
|
mobileCards?: boolean;
|
|
713
1502
|
}
|
|
1503
|
+
/** Builds a local (in-memory) data adapter that filters, sorts, and paginates the given rows client-side. */
|
|
714
1504
|
declare function createGdsTableAdapter<T extends Record<string, unknown>>(rows: T[], columns: GdsTableColumn<T>[]): GdsTableDataAdapter<T>;
|
|
1505
|
+
/** Serializes a table query into a stable URL query string, with filter keys sorted for determinism. */
|
|
715
1506
|
declare function serializeGdsTableQuery(query: GdsTableQuery): string;
|
|
1507
|
+
/**
|
|
1508
|
+
* Hook implementing the data-table controller: loads through the adapter with
|
|
1509
|
+
* timeout/abort handling and manages query, rows, selection, status, retry, and
|
|
1510
|
+
* export. Powers {@link GdsDataTable} and can drive custom table UIs.
|
|
1511
|
+
*/
|
|
716
1512
|
declare function useGdsDataTable<T extends Record<string, unknown>>({ rowId, adapter, initialQuery, onEvent, onExport, timeoutMs, virtualizedRowLimit, }: UseGdsDataTableConfig<T>): GdsDataTableController<T>;
|
|
717
|
-
|
|
1513
|
+
/**
|
|
1514
|
+
* Full-featured governed data table: search, sort, filter, paginate, select, and
|
|
1515
|
+
* export over a `GdsTableDataAdapter` (local or remote), with an accessible table
|
|
1516
|
+
* structure, a mobile card fallback, and loading/empty/error states. Use it for
|
|
1517
|
+
* rich interactive grids; use {@link SimpleDataTable} for a static read-only
|
|
1518
|
+
* table, or `AdminDataTable` for a lighter sortable admin table.
|
|
1519
|
+
*/
|
|
1520
|
+
declare function GdsDataTable<T extends Record<string, unknown>>({ columns, rowId, adapter, initialQuery, onEvent, onExport, timeoutMs, virtualizedRowLimit, caption: captionProp, summary, exportLabel: exportLabelProp, retryLabel: retryLabelProp, mobileCards, }: GdsDataTableProps<T>): react.JSX.Element;
|
|
718
1521
|
|
|
1522
|
+
/** The governed set of CRUD/lifecycle actions a resource manager can run. */
|
|
719
1523
|
type GdsResourceActionId = 'view' | 'create' | 'edit' | 'delete' | 'activate' | 'archive' | 'copy-preview';
|
|
1524
|
+
/** Async state of the resource workflow, covering list/detail loading, editing/saving, per-action progress, and error/permission/stale outcomes. */
|
|
720
1525
|
type GdsResourceWorkflowState = 'loading-list' | 'empty' | 'ready' | 'detail-loading' | 'editing' | 'saving' | 'deleting' | 'activating' | 'permission-denied' | 'stale-data' | 'error';
|
|
1526
|
+
/** Minimal shape every managed resource must satisfy; extra fields are allowed via the index signature. */
|
|
721
1527
|
interface GdsResourceRecord {
|
|
722
1528
|
id: string;
|
|
723
1529
|
title: string;
|
|
@@ -725,90 +1531,151 @@ interface GdsResourceRecord {
|
|
|
725
1531
|
updatedAt?: string;
|
|
726
1532
|
[key: string]: unknown;
|
|
727
1533
|
}
|
|
1534
|
+
/** Whether a given action is allowed on the current resource, with a reason when denied. */
|
|
728
1535
|
interface GdsResourcePermission {
|
|
729
1536
|
action: GdsResourceActionId;
|
|
730
1537
|
allowed: boolean;
|
|
1538
|
+
/** Explanation shown when `allowed` is false. */
|
|
731
1539
|
reason?: string;
|
|
732
1540
|
}
|
|
1541
|
+
/** Outcome of a run action: the affected resource, a staleness flag, and any copied text (for copy-preview). */
|
|
733
1542
|
interface GdsResourceActionResult<T extends GdsResourceRecord> {
|
|
734
1543
|
resource?: T;
|
|
735
1544
|
stale?: boolean;
|
|
736
1545
|
copiedText?: string;
|
|
737
1546
|
}
|
|
1547
|
+
/** Host-supplied backend for a resource manager: `list` is required; each optional mutation/permission hook enables the matching action. */
|
|
738
1548
|
interface GdsResourceAdapter<T extends GdsResourceRecord> {
|
|
1549
|
+
/** Loads all resources. */
|
|
739
1550
|
list: (signal?: AbortSignal) => Promise<T[]>;
|
|
1551
|
+
/** Loads one resource by id for the detail pane. */
|
|
740
1552
|
detail?: (id: string, signal?: AbortSignal) => Promise<T | null>;
|
|
741
1553
|
create?: (values: Partial<T>, idempotencyKey?: string) => Promise<T>;
|
|
742
1554
|
update?: (id: string, values: Partial<T>, idempotencyKey?: string) => Promise<T>;
|
|
743
1555
|
delete?: (id: string, idempotencyKey?: string) => Promise<void>;
|
|
744
1556
|
activate?: (id: string, idempotencyKey?: string) => Promise<T>;
|
|
745
1557
|
archive?: (id: string, idempotencyKey?: string) => Promise<T>;
|
|
1558
|
+
/** Returns a shareable preview URL/text for a resource. */
|
|
746
1559
|
copyPreview?: (id: string) => Promise<string>;
|
|
1560
|
+
/** Returns the permission set for a resource (`null` when none is selected). */
|
|
747
1561
|
getPermissions?: (resource: T | null) => GdsResourcePermission[];
|
|
748
1562
|
}
|
|
1563
|
+
/** Metadata-only lifecycle event emitted as the workflow runs; never carries resource contents. */
|
|
749
1564
|
interface GdsResourceManagerEvent {
|
|
750
1565
|
type: 'resource_loaded' | 'action_started' | 'action_failed' | 'action_completed' | 'permission_denied';
|
|
751
1566
|
action?: GdsResourceActionId;
|
|
752
1567
|
timestamp: number;
|
|
1568
|
+
/** Always `'metadata-only'` — a reminder that no payload data is included. */
|
|
753
1569
|
privacy: 'metadata-only';
|
|
754
1570
|
message?: string;
|
|
755
1571
|
}
|
|
1572
|
+
/** Configuration for {@link useGdsResourceManager}. */
|
|
756
1573
|
interface UseGdsResourceManagerConfig<T extends GdsResourceRecord> {
|
|
757
1574
|
adapter: GdsResourceAdapter<T>;
|
|
758
1575
|
onEvent?: (event: GdsResourceManagerEvent) => void;
|
|
1576
|
+
/** Abort budget (ms) for the initial list load; defaults to 8000. */
|
|
759
1577
|
timeoutMs?: number;
|
|
1578
|
+
/** Confirmation gate required before destructive actions (delete/archive). */
|
|
760
1579
|
confirmAction?: (action: GdsResourceActionId, resource: T | null) => Promise<boolean> | boolean;
|
|
761
1580
|
}
|
|
1581
|
+
/** Imperative controller returned by {@link useGdsResourceManager}: current data and state plus the methods that drive the workflow. */
|
|
762
1582
|
interface GdsResourceManagerController<T extends GdsResourceRecord> {
|
|
763
1583
|
resources: T[];
|
|
764
1584
|
selectedResource: T | null;
|
|
765
1585
|
state: GdsResourceWorkflowState;
|
|
766
1586
|
error?: string;
|
|
767
1587
|
permissions: GdsResourcePermission[];
|
|
1588
|
+
/** Reloads the resource list. */
|
|
768
1589
|
loadList: () => void;
|
|
1590
|
+
/** Loads and selects a resource for the detail pane. */
|
|
769
1591
|
openDetail: (id: string) => Promise<T | null>;
|
|
1592
|
+
/** Clears the current selection. */
|
|
770
1593
|
closeDetail: () => void;
|
|
1594
|
+
/** Resolves whether an action is currently allowed. */
|
|
771
1595
|
canRunAction: (action: GdsResourceActionId, resource?: T | null) => GdsResourcePermission;
|
|
1596
|
+
/** Runs an action through permission, confirmation, and state handling. */
|
|
772
1597
|
runAction: (action: GdsResourceActionId, resource: T | null, values?: Partial<T>) => Promise<GdsResourceActionResult<T> | null>;
|
|
773
1598
|
}
|
|
1599
|
+
/** Props for {@link GdsResourceManager}: the manager config plus the list/detail presentation. */
|
|
774
1600
|
interface GdsResourceManagerProps<T extends GdsResourceRecord> extends UseGdsResourceManagerConfig<T> {
|
|
775
1601
|
title: string;
|
|
776
1602
|
description?: ReactNode;
|
|
1603
|
+
/** Table columns; defaults to title/status/updated when omitted. */
|
|
777
1604
|
columns?: GdsTableColumn<T>[];
|
|
1605
|
+
/** Copy shown when the list is empty. */
|
|
778
1606
|
emptyLabel?: string;
|
|
1607
|
+
/** Custom renderer for the selected resource's detail pane. */
|
|
779
1608
|
renderDetail?: (resource: T, controller: GdsResourceManagerController<T>) => ReactNode;
|
|
780
1609
|
}
|
|
1610
|
+
/**
|
|
1611
|
+
* Builds an in-memory {@link GdsResourceAdapter} over a seed array — supporting
|
|
1612
|
+
* list/detail/create/update/delete/activate/archive/copy-preview against local
|
|
1613
|
+
* state — for demos, tests, and prototyping.
|
|
1614
|
+
*/
|
|
781
1615
|
declare function createGdsResourceAdapter<T extends GdsResourceRecord>(initialResources: T[]): GdsResourceAdapter<T>;
|
|
1616
|
+
/**
|
|
1617
|
+
* Hook implementing the resource workflow: loads the list on mount (with an abort
|
|
1618
|
+
* timeout), tracks the selection and {@link GdsResourceWorkflowState}, resolves
|
|
1619
|
+
* permissions from the adapter, and runs actions through permission and
|
|
1620
|
+
* confirmation gates — exposing everything via a {@link GdsResourceManagerController}.
|
|
1621
|
+
*/
|
|
782
1622
|
declare function useGdsResourceManager<T extends GdsResourceRecord>({ adapter, onEvent, timeoutMs, confirmAction, }: UseGdsResourceManagerConfig<T>): GdsResourceManagerController<T>;
|
|
783
|
-
|
|
1623
|
+
/**
|
|
1624
|
+
* Full CRUD list/detail surface driven entirely by a typed `GdsResourceAdapter`.
|
|
1625
|
+
* It renders the resource list, an optional detail pane (`renderDetail`), the
|
|
1626
|
+
* governed action set gated by the adapter's `getPermissions`, and every async
|
|
1627
|
+
* state (loading/empty/error/permission) from the adapter's responses. Use it as
|
|
1628
|
+
* the backbone of an admin resource screen so create/read/update/delete,
|
|
1629
|
+
* permissions, and state handling all flow from one adapter contract. See
|
|
1630
|
+
* `docs/TUTORIAL_CRUD_ADMIN_SCREEN.md` for a worked example.
|
|
1631
|
+
*/
|
|
1632
|
+
declare function GdsResourceManager<T extends GdsResourceRecord>({ title, description, adapter, columns, emptyLabel: emptyLabelProp, renderDetail, onEvent, timeoutMs, confirmAction, }: GdsResourceManagerProps<T>): react.JSX.Element;
|
|
784
1633
|
|
|
1634
|
+
/** Governed overlay surface kinds. */
|
|
785
1635
|
type GdsOverlayType = 'modal' | 'dialog' | 'drawer' | 'sheet' | 'popover' | 'command';
|
|
1636
|
+
/** Overlay kind tracked by the manager, including the non-focus-trapping tooltip. */
|
|
786
1637
|
type OverlayKind = GdsOverlayType | 'tooltip';
|
|
1638
|
+
/** Why an overlay close was requested. */
|
|
787
1639
|
type OverlayCloseReason = 'escape' | 'backdrop' | 'outside-click' | 'programmatic' | 'action' | 'route-change';
|
|
1640
|
+
/** Lifecycle status of an overlay within the manager's stack. */
|
|
788
1641
|
type GdsOverlayStatus = 'opening' | 'open' | 'nested' | 'closing' | 'blocked-close' | 'route-recovery' | 'mobile-fullscreen';
|
|
1642
|
+
/** How an overlay reacts to a route change: close, preserve, or recover. */
|
|
789
1643
|
type GdsOverlayRoutePolicy = 'close' | 'preserve' | 'recover';
|
|
1644
|
+
/** Metadata-only overlay lifecycle event names. */
|
|
790
1645
|
type GdsOverlayEventType = 'overlay_opened' | 'overlay_closed' | 'escape_close' | 'blocked_close' | 'route_recovered';
|
|
1646
|
+
/** Per-overlay behavior policy: close triggers, nesting, route handling, and focus return. */
|
|
791
1647
|
interface GdsOverlayPolicy {
|
|
1648
|
+
/** Whether Escape closes the overlay. Defaults to true. */
|
|
792
1649
|
closeOnEscape?: boolean;
|
|
1650
|
+
/** Whether a backdrop / outside click closes the overlay. Defaults to true. */
|
|
793
1651
|
closeOnOutsideClick?: boolean;
|
|
1652
|
+
/** Whether this overlay may stack on top of an existing one instead of replacing it. Defaults to false. */
|
|
794
1653
|
allowNested?: boolean;
|
|
1654
|
+
/** Behavior on route change. Defaults to `close`. */
|
|
795
1655
|
routeChange?: GdsOverlayRoutePolicy;
|
|
1656
|
+
/** Renders the surface full-screen on mobile. Defaults to false. */
|
|
796
1657
|
mobileFullscreen?: boolean;
|
|
1658
|
+
/** Whether to return focus to the invoker when the overlay closes. Defaults to true. */
|
|
797
1659
|
returnFocus?: boolean;
|
|
798
1660
|
}
|
|
1661
|
+
/** Describes an overlay when it registers with the manager. */
|
|
799
1662
|
interface OverlayDescriptor {
|
|
1663
|
+
/** Stable unique overlay id. */
|
|
800
1664
|
id: string;
|
|
801
1665
|
kind: OverlayKind;
|
|
802
1666
|
title?: ReactNode;
|
|
803
1667
|
description?: ReactNode;
|
|
1668
|
+
/** DOM id of the element that opened the overlay, used to restore focus on close. */
|
|
804
1669
|
invokerId?: string;
|
|
805
1670
|
policy?: GdsOverlayPolicy;
|
|
806
1671
|
status?: GdsOverlayStatus;
|
|
807
1672
|
}
|
|
1673
|
+
/** An overlay descriptor augmented with stack bookkeeping (open timestamp and resolved status). */
|
|
808
1674
|
interface GdsOverlayStackItem extends OverlayDescriptor {
|
|
809
1675
|
openedAt: number;
|
|
810
1676
|
status: GdsOverlayStatus;
|
|
811
1677
|
}
|
|
1678
|
+
/** Metadata-only event emitted for overlay lifecycle changes; carries no user content. */
|
|
812
1679
|
interface GdsOverlayEvent {
|
|
813
1680
|
type: GdsOverlayEventType;
|
|
814
1681
|
id: string;
|
|
@@ -828,14 +1695,25 @@ interface OverlayManagerValue {
|
|
|
828
1695
|
getOverlay: (id: string) => GdsOverlayStackItem | undefined;
|
|
829
1696
|
requestClose: (id: string, reason: OverlayCloseReason) => OverlayCloseReason | null;
|
|
830
1697
|
}
|
|
1698
|
+
/** Props for {@link OverlayManagerProvider}. */
|
|
831
1699
|
interface OverlayManagerProviderProps {
|
|
832
1700
|
children: ReactNode;
|
|
1701
|
+
/** Baseline policy merged under each overlay's own policy. */
|
|
833
1702
|
defaultPolicy?: GdsOverlayPolicy;
|
|
1703
|
+
/** When true, opening any overlay replaces the current stack (no nesting). Defaults to false. */
|
|
834
1704
|
singleOverlayMode?: boolean;
|
|
1705
|
+
/** Changing this value signals a route change, triggering each overlay's route policy. */
|
|
835
1706
|
routeKey?: string | number;
|
|
1707
|
+
/** Receives metadata-only overlay lifecycle events. */
|
|
836
1708
|
onOverlayEvent?: (event: GdsOverlayEvent) => void;
|
|
837
1709
|
}
|
|
1710
|
+
/**
|
|
1711
|
+
* Context provider owning the overlay stack: registration, nesting vs. single-overlay
|
|
1712
|
+
* replacement, focus return, route-change handling, and metadata-only event emission.
|
|
1713
|
+
* Wrap the app (or a subtree) so GDS overlay surfaces can coordinate.
|
|
1714
|
+
*/
|
|
838
1715
|
declare function OverlayManagerProvider({ children, defaultPolicy, singleOverlayMode, routeKey, onOverlayEvent, }: OverlayManagerProviderProps): react.JSX.Element;
|
|
1716
|
+
/** Returns the overlay manager context; throws if used outside an {@link OverlayManagerProvider}. */
|
|
839
1717
|
declare function useOverlayManager(): OverlayManagerValue;
|
|
840
1718
|
interface GdsOverlaySurfaceBaseProps {
|
|
841
1719
|
id: string;
|
|
@@ -848,58 +1726,144 @@ interface GdsOverlaySurfaceBaseProps {
|
|
|
848
1726
|
policy?: GdsOverlayPolicy;
|
|
849
1727
|
onBlockedClose?: (reason: OverlayCloseReason) => void;
|
|
850
1728
|
}
|
|
1729
|
+
/** Props for {@link GdsModal}: the governed overlay base props plus Mantine `Modal` props the manager does not control. */
|
|
851
1730
|
type GdsModalProps = GdsOverlaySurfaceBaseProps & Omit<ModalProps, 'opened' | 'onClose' | 'title' | 'children' | 'trapFocus'>;
|
|
1731
|
+
/** Props for {@link GdsDrawer}: the governed overlay base props plus Mantine `Drawer` props the manager does not control. */
|
|
852
1732
|
type GdsDrawerProps = GdsOverlaySurfaceBaseProps & Omit<DrawerProps, 'opened' | 'onClose' | 'title' | 'children' | 'trapFocus'>;
|
|
1733
|
+
/** Alias of {@link GdsModalProps} for the dialog surface. */
|
|
853
1734
|
type GdsDialogProps = GdsModalProps;
|
|
1735
|
+
/** Alias of {@link GdsDrawerProps} for the side-panel surface. */
|
|
854
1736
|
type GdsSidePanelProps = GdsDrawerProps;
|
|
1737
|
+
/** Alias of {@link GdsDrawerProps} for the bottom-sheet surface. */
|
|
855
1738
|
type GdsSheetProps = GdsDrawerProps;
|
|
1739
|
+
/** Governed modal surface that registers with the overlay manager, traps focus, and honors its close policy. */
|
|
856
1740
|
declare function GdsModal({ id, opened, onClose, title, description, children, invokerId, policy, onBlockedClose, ...modalProps }: GdsModalProps): react.JSX.Element;
|
|
1741
|
+
/** Governed drawer surface that registers with the overlay manager, traps focus, and honors its close policy. */
|
|
857
1742
|
declare function GdsDrawer({ id, opened, onClose, title, description, children, invokerId, policy, onBlockedClose, ...drawerProps }: GdsDrawerProps): react.JSX.Element;
|
|
1743
|
+
/** Bottom-anchored, mobile-fullscreen {@link GdsDrawer} variant. */
|
|
858
1744
|
declare function GdsSheet(props: GdsSheetProps): react.JSX.Element;
|
|
1745
|
+
/** Semantic alias of {@link GdsModal} for dialog use cases. */
|
|
859
1746
|
declare function GdsDialog(props: GdsDialogProps): react.JSX.Element;
|
|
1747
|
+
/** Right-anchored (by default) {@link GdsDrawer} variant for side panels. */
|
|
860
1748
|
declare function GdsSidePanel(props: GdsSidePanelProps): react.JSX.Element;
|
|
861
1749
|
|
|
1750
|
+
interface GdsNotificationContextValue {
|
|
1751
|
+
notifications: GdsNotificationMessage[];
|
|
1752
|
+
notify: (message: GdsNotificationMessage, policy?: GdsNotificationPolicy) => string;
|
|
1753
|
+
updateNotification: (id: string, patch: Partial<GdsNotificationMessage>) => void;
|
|
1754
|
+
dismissNotification: (id: string) => void;
|
|
1755
|
+
runAction: (id: string, actionId: string) => void;
|
|
1756
|
+
runRetry: (id: string) => Promise<void>;
|
|
1757
|
+
dismiss: (id: string) => void;
|
|
1758
|
+
clear: () => void;
|
|
1759
|
+
}
|
|
1760
|
+
/** Props for {@link GdsNotificationProvider}. */
|
|
1761
|
+
interface GdsNotificationProviderProps {
|
|
1762
|
+
children: ReactNode;
|
|
1763
|
+
/** Suppress the visible list; notifications become announcement-only for assistive tech. */
|
|
1764
|
+
disabled?: boolean;
|
|
1765
|
+
/** Default policy (persistence, live region, auto-close, dedupe) applied to each notification. */
|
|
1766
|
+
defaultPolicy?: GdsNotificationPolicy;
|
|
1767
|
+
/** Receives every notification lifecycle audit event. */
|
|
1768
|
+
onAuditEvent?: (event: GdsNotificationAuditEvent) => void;
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* Context provider and controller for GDS notifications: exposes {@link useGdsNotifications}
|
|
1772
|
+
* to notify, update, and dismiss, and handles dedupe, auto-close timers, retry with
|
|
1773
|
+
* attempt limits, and audit events, mirroring announcements into an accessible live region.
|
|
1774
|
+
*/
|
|
1775
|
+
declare function GdsNotificationProvider({ children, disabled, defaultPolicy, onAuditEvent, }: GdsNotificationProviderProps): react.JSX.Element;
|
|
1776
|
+
/** Hook to access the notification controller; throws if used outside a {@link GdsNotificationProvider}. */
|
|
1777
|
+
declare function useGdsNotifications(): GdsNotificationContextValue;
|
|
1778
|
+
/** Renders the current notifications from context as a dismissible, retryable list with a clear-all control. */
|
|
1779
|
+
declare function NotificationCenter({ title: titleProp, emptyMessage: emptyMessageProp, }: {
|
|
1780
|
+
title?: ReactNode;
|
|
1781
|
+
emptyMessage?: ReactNode;
|
|
1782
|
+
}): react.JSX.Element;
|
|
1783
|
+
/** Alias for {@link NotificationCenter}. */
|
|
1784
|
+
declare const GdsNotificationCenter: typeof NotificationCenter;
|
|
1785
|
+
/** Props for {@link GdsToastViewport}. */
|
|
1786
|
+
interface GdsToastViewportProps {
|
|
1787
|
+
/** Corner the stack is anchored to. Logical, so `end` is the left edge in right-to-left layouts. Defaults to `bottom-end`. */
|
|
1788
|
+
position?: 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
|
|
1789
|
+
/** Most toasts shown at once; older ones are counted in a summary line. Defaults to 3. */
|
|
1790
|
+
maxVisible?: number;
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Visible stack of the active notifications from {@link GdsNotificationProvider}, fixed to a
|
|
1794
|
+
* viewport corner above overlays (`gdsZIndexToken.max`) and clear of device safe areas. Items are
|
|
1795
|
+
* not live regions: the provider already announces each notification once. Each toast offers its
|
|
1796
|
+
* actions, retry and dismiss. `GdsToastProvider` renders one unless `viewport={false}`.
|
|
1797
|
+
*/
|
|
1798
|
+
declare function GdsToastViewport({ position, maxVisible }: GdsToastViewportProps): react.JSX.Element | null;
|
|
1799
|
+
|
|
1800
|
+
/** Description of a confirmation prompt shown by `useGdsConfirm().confirm`. */
|
|
862
1801
|
interface ConfirmRequest {
|
|
863
1802
|
id?: string;
|
|
864
1803
|
title: string;
|
|
865
1804
|
message: ReactNode;
|
|
1805
|
+
/** Name of the target being acted on, shown in bold above the message. */
|
|
866
1806
|
targetName?: string;
|
|
1807
|
+
/** Consequence text rendered beneath the message. */
|
|
867
1808
|
consequence?: ReactNode;
|
|
1809
|
+
/** Semantic action id for the confirm button; defaults to `confirm` (or `delete` when `danger`). */
|
|
868
1810
|
confirmAction?: SemanticAction;
|
|
1811
|
+
/** Semantic action id for the cancel button; defaults to `cancel`. */
|
|
869
1812
|
cancelAction?: SemanticAction;
|
|
1813
|
+
/** Styles the dialog as destructive (red confirm button). */
|
|
870
1814
|
danger?: boolean;
|
|
871
1815
|
}
|
|
1816
|
+
/** Imperative confirmation API provided by `GdsConfirmProvider` and read via `useGdsConfirm`. */
|
|
872
1817
|
interface GdsConfirmApi {
|
|
1818
|
+
/** Opens a yes/no confirmation and resolves to whether the user confirmed. */
|
|
873
1819
|
confirm: (request: ConfirmRequest) => Promise<boolean>;
|
|
1820
|
+
/** Opens a pre-marked destructive confirmation that requires a target name. */
|
|
874
1821
|
confirmDestructive: (request: ConfirmRequest & {
|
|
875
1822
|
targetName: string;
|
|
876
1823
|
}) => Promise<boolean>;
|
|
1824
|
+
/** Runs a full destructive-action flow (validate, execute, optional undo) and resolves with the result. */
|
|
877
1825
|
confirmAction: <TPayload = unknown>(request: GdsConfirmationRequest<TPayload>) => Promise<GdsDestructiveActionResult<TPayload>>;
|
|
878
1826
|
}
|
|
1827
|
+
/** Relative risk of a confirmed action, used to derive default danger styling and event metadata. */
|
|
879
1828
|
type GdsRiskLevel = 'low' | 'medium' | 'high' | 'critical';
|
|
1829
|
+
/** Lifecycle status of a destructive-action confirmation. */
|
|
880
1830
|
type GdsConfirmationStatus = 'idle' | 'open' | 'validating' | 'executing' | 'succeeded' | 'failed' | 'undoable' | 'cancelled';
|
|
1831
|
+
/** Telemetry event types emitted over a confirmation's lifecycle. */
|
|
881
1832
|
type GdsConfirmationEventType = 'opened' | 'cancelled' | 'confirmed' | 'failed' | 'retry' | 'undo_started' | 'undo_completed';
|
|
1833
|
+
/** Undo policy for a confirmed action, exposing a time-boxed undo affordance. */
|
|
882
1834
|
interface GdsUndoPolicy<TPayload = unknown> {
|
|
1835
|
+
/** How long, in milliseconds, undo stays available after the action succeeds. */
|
|
883
1836
|
windowMs: number;
|
|
1837
|
+
/** Label for the undo button; defaults to "Undo". */
|
|
884
1838
|
label?: string;
|
|
1839
|
+
/** Invoked when the user triggers undo within the window. */
|
|
885
1840
|
onUndo: (payload: TPayload) => void | Promise<void>;
|
|
886
1841
|
}
|
|
1842
|
+
/** A destructive-action request carrying a payload plus optional validation, execution, timeout, retry, and undo behavior. */
|
|
887
1843
|
interface GdsConfirmationRequest<TPayload = unknown> extends ConfirmRequest {
|
|
888
1844
|
payload: TPayload;
|
|
889
1845
|
riskLevel?: GdsRiskLevel;
|
|
1846
|
+
/** Preview node rendered inside the dialog body. */
|
|
890
1847
|
preview?: ReactNode;
|
|
1848
|
+
/** Pre-execution check; return `true` to proceed, or a string/false to abort with a message. */
|
|
891
1849
|
validateTarget?: (payload: TPayload) => boolean | string | Promise<boolean | string>;
|
|
1850
|
+
/** Performs the action once confirmed and validated. */
|
|
892
1851
|
execute?: (payload: TPayload) => void | Promise<void>;
|
|
1852
|
+
/** Milliseconds before `execute` is treated as timed out; defaults to the provider's timeout. */
|
|
893
1853
|
timeoutMs?: number;
|
|
1854
|
+
/** Allows re-running the action from the failed state. */
|
|
894
1855
|
retryable?: boolean;
|
|
895
1856
|
undo?: GdsUndoPolicy<TPayload>;
|
|
896
1857
|
}
|
|
1858
|
+
/** Result returned by `confirmAction`, reporting the final status and any undo window. */
|
|
897
1859
|
interface GdsDestructiveActionResult<TPayload = unknown> {
|
|
898
1860
|
status: GdsConfirmationStatus;
|
|
899
1861
|
payload?: TPayload;
|
|
900
1862
|
error?: string;
|
|
1863
|
+
/** Epoch-ms deadline until which undo remains available, when the action is undoable. */
|
|
901
1864
|
undoUntil?: number;
|
|
902
1865
|
}
|
|
1866
|
+
/** Metadata-only telemetry event describing a confirmation lifecycle transition. */
|
|
903
1867
|
interface GdsConfirmationEvent {
|
|
904
1868
|
type: GdsConfirmationEventType;
|
|
905
1869
|
id: string;
|
|
@@ -908,153 +1872,329 @@ interface GdsConfirmationEvent {
|
|
|
908
1872
|
timestamp: number;
|
|
909
1873
|
privacy: 'metadata-only';
|
|
910
1874
|
}
|
|
1875
|
+
/** Props for `GdsConfirmProvider`. */
|
|
911
1876
|
interface GdsConfirmProviderProps {
|
|
912
1877
|
children: ReactNode;
|
|
1878
|
+
/** Default execute timeout in ms applied when a request omits `timeoutMs`. Defaults to 10000. */
|
|
913
1879
|
defaultTimeoutMs?: number;
|
|
914
1880
|
onConfirmationEvent?: (event: GdsConfirmationEvent) => void;
|
|
915
1881
|
}
|
|
1882
|
+
/**
|
|
1883
|
+
* Provides the imperative confirmation API and renders the shared `ConfirmDialog`
|
|
1884
|
+
* plus an undo banner. Handles boolean confirms and full destructive-action flows
|
|
1885
|
+
* (validate, then execute with a timeout, then an optional time-boxed undo),
|
|
1886
|
+
* restoring focus on close and emitting metadata-only lifecycle events.
|
|
1887
|
+
*/
|
|
916
1888
|
declare function GdsConfirmProvider({ children, defaultTimeoutMs, onConfirmationEvent, }: GdsConfirmProviderProps): react.JSX.Element;
|
|
1889
|
+
/** Returns the confirmation API; throws if used outside a `GdsConfirmProvider`. */
|
|
917
1890
|
declare function useGdsConfirm(): GdsConfirmApi;
|
|
1891
|
+
/** Toast payload accepted by the toast API: a notification message without a preset id or severity. */
|
|
918
1892
|
interface GdsToastMessage extends Omit<GdsNotificationMessage, 'id' | 'severity'> {
|
|
919
1893
|
id?: string;
|
|
920
1894
|
}
|
|
1895
|
+
/** Imperative toast API provided by `GdsToastProvider` and read via `useGdsToasts`. */
|
|
921
1896
|
interface GdsToastApi {
|
|
1897
|
+
/** Shows a success toast (auto-closes after 4s by default). */
|
|
922
1898
|
notifySuccess: (message: GdsToastMessage) => void;
|
|
1899
|
+
/** Shows an error toast (persistent by default) with an optional retry action. */
|
|
923
1900
|
notifyError: (message: GdsToastMessage & {
|
|
924
1901
|
retry?: () => void | Promise<void>;
|
|
925
1902
|
}) => void;
|
|
1903
|
+
/** Shows a short action-complete success toast (auto-closes after 3s by default). */
|
|
926
1904
|
notifyActionComplete: (message: GdsToastMessage) => void;
|
|
927
1905
|
}
|
|
928
|
-
|
|
1906
|
+
/** Props for {@link GdsToastProvider}. */
|
|
1907
|
+
interface GdsToastProviderProps {
|
|
929
1908
|
children: ReactNode;
|
|
930
|
-
|
|
1909
|
+
/**
|
|
1910
|
+
* Renders a {@link GdsToastViewport} so toasts are visible. Pass viewport props to place it, or
|
|
1911
|
+
* `false` when the app shows notifications only in its own `NotificationCenter`. Defaults to true.
|
|
1912
|
+
*/
|
|
1913
|
+
viewport?: boolean | GdsToastViewportProps;
|
|
1914
|
+
}
|
|
1915
|
+
/** Wraps children in the notification provider, exposes the governed toast API via `useGdsToasts`, and renders the visible toast stack. */
|
|
1916
|
+
declare function GdsToastProvider({ children, viewport }: GdsToastProviderProps): react.JSX.Element;
|
|
1917
|
+
/** Returns the toast API; throws if used outside a `GdsToastProvider`. */
|
|
931
1918
|
declare function useGdsToasts(): GdsToastApi;
|
|
932
1919
|
|
|
1920
|
+
/** A registrable command shown in the {@link CommandPalette}. */
|
|
933
1921
|
interface CommandDef {
|
|
934
1922
|
id: string;
|
|
935
1923
|
label: string;
|
|
936
1924
|
group?: string;
|
|
1925
|
+
/** Extra terms matched by search in addition to the label. */
|
|
937
1926
|
keywords?: string[];
|
|
1927
|
+
/** Display-only shortcut hint (e.g. `'⌘K'`). */
|
|
938
1928
|
shortcut?: string;
|
|
1929
|
+
/** Action run when the command is chosen. */
|
|
939
1930
|
run: () => Promise<void> | void;
|
|
1931
|
+
/** When present and returning `false`, the command is hidden from the palette. */
|
|
940
1932
|
enabledWhen?: () => boolean;
|
|
941
1933
|
}
|
|
1934
|
+
/** Provides the command registry and open/close state to the subtree, and mounts the {@link CommandPalette} modal. */
|
|
942
1935
|
declare function CommandRegistryProvider({ children }: {
|
|
943
1936
|
children: ReactNode;
|
|
944
1937
|
}): react.JSX.Element;
|
|
1938
|
+
/** Hook to open/close the palette and register commands; throws outside a {@link CommandRegistryProvider}. */
|
|
945
1939
|
declare function useCommandLauncher(): {
|
|
946
1940
|
open: () => void;
|
|
947
1941
|
close: () => void;
|
|
948
1942
|
registerCommands: (next: CommandDef[]) => void;
|
|
949
1943
|
};
|
|
1944
|
+
/**
|
|
1945
|
+
* Modal command palette: a searchable, score-ranked list of registered commands
|
|
1946
|
+
* that opens on Cmd/Ctrl+K and closes on Escape. Must be rendered within a
|
|
1947
|
+
* {@link CommandRegistryProvider} (mounted by it automatically).
|
|
1948
|
+
*/
|
|
950
1949
|
declare function CommandPalette({ opened, onClose }: {
|
|
951
1950
|
opened: boolean;
|
|
952
1951
|
onClose: () => void;
|
|
953
1952
|
}): react.JSX.Element;
|
|
954
1953
|
|
|
1954
|
+
/** Preferred side to anchor a step card relative to its spotlighted target. */
|
|
1955
|
+
type GdsTourPlacement = 'top' | 'bottom' | 'left' | 'right' | 'auto';
|
|
1956
|
+
/** Whether the spotlighted element can be interacted with through the scrim hole. */
|
|
1957
|
+
type GdsTourInteraction = 'none' | 'allow-target';
|
|
1958
|
+
/** Lifecycle state of a tour. */
|
|
1959
|
+
type GdsTourStatus = 'idle' | 'running' | 'finished' | 'skipped';
|
|
1960
|
+
/** Why a tour stopped, surfaced to `onStop`/telemetry consumers. */
|
|
1961
|
+
type GdsTourStopReason = 'finished' | 'skipped' | 'escape' | 'programmatic';
|
|
1962
|
+
/**
|
|
1963
|
+
* One step of a guided tour: what to spotlight and what to say about it.
|
|
1964
|
+
* `target` is either a `data-gds-tour-target` id string (recommended — stable
|
|
1965
|
+
* across refactors) or a React ref to the element to highlight.
|
|
1966
|
+
*/
|
|
1967
|
+
interface GdsTourStep {
|
|
1968
|
+
/** Stable id for the step (used for keys and analytics). */
|
|
1969
|
+
id: string;
|
|
1970
|
+
/** `data-gds-tour-target` value or a ref to the element to spotlight. */
|
|
1971
|
+
target: string | RefObject<HTMLElement | null>;
|
|
1972
|
+
/** Short heading shown in the step card. */
|
|
1973
|
+
title: string;
|
|
1974
|
+
/** Body copy explaining the spotlighted function. */
|
|
1975
|
+
body: ReactNode;
|
|
1976
|
+
/** Preferred card placement relative to the target. Defaults to `'auto'`. */
|
|
1977
|
+
placement?: GdsTourPlacement;
|
|
1978
|
+
/** Whether this step may be skipped with Esc / the Skip control. Defaults to true. */
|
|
1979
|
+
canSkip?: boolean;
|
|
1980
|
+
/** Extra halo (px) around the target inside the spotlight hole. */
|
|
1981
|
+
spotlightPadding?: number;
|
|
1982
|
+
/** Whether the target is clickable through the hole. Defaults to `'none'`. */
|
|
1983
|
+
interaction?: GdsTourInteraction;
|
|
1984
|
+
}
|
|
1985
|
+
/** Options accepted by `start()` and the declarative wrapper. */
|
|
1986
|
+
interface GdsTourStartOptions {
|
|
1987
|
+
/** Start on a specific step index. Defaults to 0. */
|
|
1988
|
+
startAt?: number;
|
|
1989
|
+
/** Persist "seen" state so an auto-start tour only runs once. */
|
|
1990
|
+
persist?: 'localStorage' | 'none';
|
|
1991
|
+
/** Called on every step transition with the new index. */
|
|
1992
|
+
onStepChange?: (index: number, step: GdsTourStep) => void;
|
|
1993
|
+
/** Called when the tour completes via the final "Done" action. */
|
|
1994
|
+
onFinish?: () => void;
|
|
1995
|
+
/** Called when the tour is skipped (Skip control or Esc). */
|
|
1996
|
+
onSkip?: () => void;
|
|
1997
|
+
/** Called whenever the tour stops, with the reason. */
|
|
1998
|
+
onStop?: (reason: GdsTourStopReason) => void;
|
|
1999
|
+
}
|
|
2000
|
+
interface GdsTourContextValue {
|
|
2001
|
+
status: GdsTourStatus;
|
|
2002
|
+
tourId: string | null;
|
|
2003
|
+
index: number;
|
|
2004
|
+
count: number;
|
|
2005
|
+
activeStep: GdsTourStep | null;
|
|
2006
|
+
start: (tourId: string, steps: GdsTourStep[], options?: GdsTourStartOptions) => void;
|
|
2007
|
+
next: () => void;
|
|
2008
|
+
back: () => void;
|
|
2009
|
+
goTo: (index: number) => void;
|
|
2010
|
+
stop: (reason?: GdsTourStopReason) => void;
|
|
2011
|
+
}
|
|
2012
|
+
/**
|
|
2013
|
+
* Returns whether the given tour has already been completed/skipped on this
|
|
2014
|
+
* device (reads the same `localStorage` key the provider writes when a
|
|
2015
|
+
* persisted tour ends). SSR-safe: returns false on the server.
|
|
2016
|
+
*/
|
|
2017
|
+
declare function useHasSeenTour(tourId: string): boolean;
|
|
2018
|
+
/** Props for {@link GdsTourProvider}. */
|
|
2019
|
+
interface GdsTourProviderProps {
|
|
2020
|
+
children: ReactNode;
|
|
2021
|
+
}
|
|
2022
|
+
/**
|
|
2023
|
+
* App-root controller for guided onboarding tours. Mount once inside
|
|
2024
|
+
* `GdsProvider`. Exposes {@link useGdsTour} and renders the spotlight scrim +
|
|
2025
|
+
* anchored step card while a tour is running. The dim reads the governed
|
|
2026
|
+
* `--gds-overlay-scrim` token; positioning is dynamic; Esc/keyboard, focus
|
|
2027
|
+
* trap + return, scroll-lock, and reposition-on-scroll/resize are handled here.
|
|
2028
|
+
*/
|
|
2029
|
+
declare function GdsTourProvider({ children }: GdsTourProviderProps): react.JSX.Element;
|
|
2030
|
+
/** Access the guided-tour controller. Throws if used outside {@link GdsTourProvider}. */
|
|
2031
|
+
declare function useGdsTour(): GdsTourContextValue;
|
|
2032
|
+
/** Props for the declarative {@link GdsGuidedTour} wrapper. */
|
|
2033
|
+
interface GdsGuidedTourProps extends GdsTourStartOptions {
|
|
2034
|
+
/** Stable id for the tour (used for persistence + analytics). */
|
|
2035
|
+
id: string;
|
|
2036
|
+
/** The ordered steps to run. */
|
|
2037
|
+
steps: GdsTourStep[];
|
|
2038
|
+
/** When true, the tour starts (once, respecting `persist`). */
|
|
2039
|
+
open?: boolean;
|
|
2040
|
+
/** Alias of `startAt`. */
|
|
2041
|
+
defaultStep?: number;
|
|
2042
|
+
}
|
|
2043
|
+
/**
|
|
2044
|
+
* Declarative controller for a guided tour: renders nothing, but starts the
|
|
2045
|
+
* tour when `open` becomes true (skipping it if `persist: 'localStorage'` and
|
|
2046
|
+
* the tour was already seen). For imperative control use {@link useGdsTour}.
|
|
2047
|
+
*/
|
|
2048
|
+
declare function GdsGuidedTour({ id, steps, open, defaultStep, ...options }: GdsGuidedTourProps): null;
|
|
2049
|
+
/** Props for {@link GdsTourButton}; extends the native button attributes (minus `onClick`). */
|
|
2050
|
+
interface GdsTourButtonProps extends Omit<ComponentPropsWithoutRef<'button'>, 'onClick' | 'type'>, GdsTourStartOptions {
|
|
2051
|
+
/** The tour id to start when the button is pressed. */
|
|
2052
|
+
tourId: string;
|
|
2053
|
+
/** The ordered steps to run. */
|
|
2054
|
+
steps: GdsTourStep[];
|
|
2055
|
+
/** Visible label. Defaults to the localized `gds.tour.launch` control ("Take the guided tour"). */
|
|
2056
|
+
label?: ReactNode;
|
|
2057
|
+
}
|
|
2058
|
+
/**
|
|
2059
|
+
* Governed launcher button for a guided tour: renders a themeable
|
|
2060
|
+
* `.gds-tour-launch` control whose label reads the localized `gds.tour.launch`
|
|
2061
|
+
* key, and imperatively starts the given tour via {@link useGdsTour} on click.
|
|
2062
|
+
* Use it wherever a product wants a "Take the guided tour" affordance without
|
|
2063
|
+
* hand-rolling a raw control; pair it with {@link GdsGuidedTour} for first-run
|
|
2064
|
+
* auto-start.
|
|
2065
|
+
*/
|
|
2066
|
+
declare function GdsTourButton({ tourId, steps, label, className, startAt, persist, onStepChange, onFinish, onSkip, onStop, ...buttonProps }: GdsTourButtonProps): react.JSX.Element;
|
|
2067
|
+
|
|
2068
|
+
/** Props for `GdsLayoutTemplatePreview`. */
|
|
955
2069
|
interface GdsLayoutTemplatePreviewProps {
|
|
2070
|
+
/** Templates to choose from; defaults to the built-in GDS layout templates. */
|
|
956
2071
|
templates?: GdsLayoutTemplate[];
|
|
2072
|
+
/** Id of the template selected initially; falls back to the first template. */
|
|
957
2073
|
initialTemplateId?: string;
|
|
2074
|
+
/** Panel heading; defaults to "Template cookbook". */
|
|
958
2075
|
title?: string;
|
|
2076
|
+
/** Panel description shown under the title. */
|
|
959
2077
|
description?: string;
|
|
960
2078
|
}
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
dismissNotification: (id: string) => void;
|
|
968
|
-
runAction: (id: string, actionId: string) => void;
|
|
969
|
-
runRetry: (id: string) => Promise<void>;
|
|
970
|
-
dismiss: (id: string) => void;
|
|
971
|
-
clear: () => void;
|
|
972
|
-
}
|
|
973
|
-
interface GdsNotificationProviderProps {
|
|
974
|
-
children: ReactNode;
|
|
975
|
-
disabled?: boolean;
|
|
976
|
-
defaultPolicy?: GdsNotificationPolicy;
|
|
977
|
-
onAuditEvent?: (event: GdsNotificationAuditEvent) => void;
|
|
978
|
-
}
|
|
979
|
-
declare function GdsNotificationProvider({ children, disabled, defaultPolicy, onAuditEvent, }: GdsNotificationProviderProps): react.JSX.Element;
|
|
980
|
-
declare function useGdsNotifications(): GdsNotificationContextValue;
|
|
981
|
-
declare function NotificationCenter({ title, emptyMessage, }: {
|
|
982
|
-
title?: ReactNode;
|
|
983
|
-
emptyMessage?: ReactNode;
|
|
984
|
-
}): react.JSX.Element;
|
|
985
|
-
declare const GdsNotificationCenter: typeof NotificationCenter;
|
|
2079
|
+
/**
|
|
2080
|
+
* Interactive layout-template cookbook: pick a template, edit its schema JSON, and
|
|
2081
|
+
* apply it to render the live layout with validation diagnostics; also supports
|
|
2082
|
+
* resetting to the template and copying the schema to the clipboard.
|
|
2083
|
+
*/
|
|
2084
|
+
declare function GdsLayoutTemplatePreview({ templates, initialTemplateId, title: titleProp, description: descriptionProp, }: GdsLayoutTemplatePreviewProps): react.JSX.Element;
|
|
986
2085
|
|
|
2086
|
+
/** Canonical GDS operational (UX) event types emitted by governed components. */
|
|
987
2087
|
declare const gdsOperationalEventTypes: readonly ["submit", "submit_success", "submit_error", "validation_error", "retry", "timeout", "upload_failure", "destructive_action", "user_cancel", "action_complete", "adapter_error", "payload_rejected"];
|
|
2088
|
+
/** Canonical failure-reason codes attached to failed/rejected telemetry events. */
|
|
988
2089
|
declare const gdsUxFailureReasons: readonly ["adapter_unavailable", "network_unavailable", "permission_denied", "validation_failed", "request_timeout", "upload_failed", "destructive_action_rejected", "user_cancelled", "payload_rejected", "unknown"];
|
|
2090
|
+
/** An event type: one of {@link gdsOperationalEventTypes} or any custom string. */
|
|
989
2091
|
type GdsOperationalEventType = (typeof gdsOperationalEventTypes)[number] | (string & {});
|
|
2092
|
+
/** A failure reason: one of {@link gdsUxFailureReasons} or any custom string. */
|
|
990
2093
|
type GdsUxFailureReason = (typeof gdsUxFailureReasons)[number] | (string & {});
|
|
2094
|
+
/** Outcome recorded alongside a telemetry event. */
|
|
991
2095
|
type GdsTelemetryOutcome = 'pending' | 'success' | 'error' | 'info' | 'cancelled' | 'timeout' | 'rejected';
|
|
2096
|
+
/** Allowed primitive value types inside a telemetry payload. */
|
|
992
2097
|
type GdsTelemetryPayloadValue = string | number | boolean | null;
|
|
2098
|
+
/** Flat key/value bag of telemetry payload values. */
|
|
993
2099
|
type GdsTelemetryPayload = Record<string, GdsTelemetryPayloadValue>;
|
|
2100
|
+
/** A normalized operational telemetry event as delivered to sinks and adapters. */
|
|
994
2101
|
interface GdsOperationalEvent {
|
|
2102
|
+
/** Name of the emitting component. */
|
|
995
2103
|
component: string;
|
|
996
2104
|
eventType: GdsOperationalEventType;
|
|
2105
|
+
/** Emission timestamp (epoch ms). */
|
|
997
2106
|
ts: number;
|
|
2107
|
+
/** Id used to correlate related events and to drive deterministic sampling. */
|
|
998
2108
|
correlationId: string;
|
|
999
2109
|
outcome?: GdsTelemetryOutcome;
|
|
1000
2110
|
reason?: GdsUxFailureReason;
|
|
1001
2111
|
actionId?: string;
|
|
1002
2112
|
workflowId?: string;
|
|
1003
2113
|
operationId?: string;
|
|
2114
|
+
/** Attempt number for retried operations. */
|
|
1004
2115
|
attempt?: number;
|
|
1005
2116
|
timeoutMs?: number;
|
|
2117
|
+
/** Structured context, scrubbed by the payload policy before dispatch. */
|
|
1006
2118
|
context?: GdsTelemetryPayload;
|
|
2119
|
+
/** Event payload, scrubbed by the payload policy before dispatch. */
|
|
1007
2120
|
payload?: GdsTelemetryPayload;
|
|
1008
2121
|
}
|
|
2122
|
+
/** Backward-compatible alias of {@link GdsOperationalEvent}. */
|
|
1009
2123
|
interface GdsUiEvent extends GdsOperationalEvent {
|
|
1010
2124
|
}
|
|
2125
|
+
/** Input shape for emitting an event; `ts` is filled in automatically when omitted. */
|
|
1011
2126
|
type GdsOperationalEventInput = Omit<GdsOperationalEvent, 'ts'> & {
|
|
1012
2127
|
ts?: number;
|
|
1013
2128
|
};
|
|
2129
|
+
/** A function that receives normalized telemetry events (sync or async). */
|
|
1014
2130
|
type GdsTelemetrySink = (event: GdsOperationalEvent) => void | Promise<void>;
|
|
2131
|
+
/** A telemetry transport: emits events, optionally gated by availability and with a flush hook. */
|
|
1015
2132
|
interface GdsTelemetryAdapter {
|
|
1016
2133
|
id: string;
|
|
1017
2134
|
emit: GdsTelemetrySink;
|
|
2135
|
+
/** When present and returning `false`, events are reported as `adapter-unavailable` instead of emitted. */
|
|
1018
2136
|
isAvailable?: () => boolean;
|
|
1019
2137
|
flush?: () => void | Promise<void>;
|
|
1020
2138
|
}
|
|
2139
|
+
/** Governs how event `context`/`payload` are scrubbed before dispatch. */
|
|
1021
2140
|
interface GdsEventPayloadPolicy {
|
|
2141
|
+
/** Keys whose values are dropped (case-insensitive substring match); merged with the built-in unsafe-key list. */
|
|
1022
2142
|
redactKeys?: string[];
|
|
2143
|
+
/** Keys that mark the payload as rejected (case-insensitive substring match). */
|
|
1023
2144
|
rejectKeys?: string[];
|
|
2145
|
+
/** When `true`, an event with any rejected key is dropped entirely rather than scrubbed. */
|
|
1024
2146
|
rejectUnsafePayload?: boolean;
|
|
2147
|
+
/** Maximum number of keys retained per payload. Defaults to 24. */
|
|
1025
2148
|
maxKeys?: number;
|
|
2149
|
+
/** Maximum string length before truncation. Defaults to 160. */
|
|
1026
2150
|
maxStringLength?: number;
|
|
2151
|
+
/** Called with the rejected keys whenever scrubbing removes any. */
|
|
1027
2152
|
onRejectedPayload?: (details: GdsRejectedPayloadDetails) => void;
|
|
1028
2153
|
}
|
|
2154
|
+
/** Details reported to `onRejectedPayload` when payload keys are redacted or rejected. */
|
|
1029
2155
|
interface GdsRejectedPayloadDetails {
|
|
1030
2156
|
component: string;
|
|
1031
2157
|
eventType: GdsOperationalEventType;
|
|
1032
2158
|
correlationId: string;
|
|
2159
|
+
/** The payload keys that were removed. */
|
|
1033
2160
|
rejectedKeys: string[];
|
|
1034
2161
|
}
|
|
2162
|
+
/** Result status returned when an event is dispatched via {@link emitGdsEvent}. */
|
|
1035
2163
|
type GdsTelemetryDispatchStatus = 'emitted' | 'adapter-unavailable' | 'payload-rejected' | 'sampled-out' | 'sampling-disabled' | 'dropped';
|
|
2164
|
+
/** Outcome of a dispatch attempt: the status plus the normalized event and any rejected keys. */
|
|
1036
2165
|
interface GdsTelemetryDispatchResult {
|
|
1037
2166
|
status: GdsTelemetryDispatchStatus;
|
|
2167
|
+
/** The normalized (scrubbed, timestamped) event, when one was produced. */
|
|
1038
2168
|
event?: GdsOperationalEvent;
|
|
1039
2169
|
rejectedKeys?: string[];
|
|
1040
2170
|
}
|
|
2171
|
+
/** Options controlling a single {@link emitGdsEvent} dispatch. */
|
|
1041
2172
|
interface GdsTelemetryDispatchOptions {
|
|
2173
|
+
/** Preferred transport; takes precedence over `sink`. */
|
|
1042
2174
|
adapter?: GdsTelemetryAdapter;
|
|
2175
|
+
/** Legacy sink used when no `adapter` is provided. */
|
|
1043
2176
|
sink?: GdsTelemetrySink;
|
|
2177
|
+
/** Fraction of events to keep (0–1), applied deterministically per `correlationId`. Defaults to 1. */
|
|
1044
2178
|
sampleRate?: number;
|
|
1045
2179
|
payloadPolicy?: GdsEventPayloadPolicy;
|
|
1046
2180
|
onAdapterError?: (error: unknown, event: GdsOperationalEvent) => void;
|
|
1047
2181
|
}
|
|
2182
|
+
/** Configuration for {@link createGdsTelemetryAdapter}, adding timeout/retry behavior around a sink. */
|
|
1048
2183
|
interface GdsTelemetryAdapterOptions {
|
|
1049
2184
|
id: string;
|
|
1050
2185
|
emit: GdsTelemetrySink;
|
|
1051
2186
|
isAvailable?: () => boolean;
|
|
1052
2187
|
flush?: () => void | Promise<void>;
|
|
2188
|
+
/** Per-attempt timeout in ms. Defaults to 1000. */
|
|
1053
2189
|
timeoutMs?: number;
|
|
2190
|
+
/** Number of extra retries after the first attempt. Defaults to 0. */
|
|
1054
2191
|
retryAttempts?: number;
|
|
2192
|
+
/** Delay between retries in ms. Defaults to 0. */
|
|
1055
2193
|
retryDelayMs?: number;
|
|
2194
|
+
/** Called with the last error once all attempts are exhausted. */
|
|
1056
2195
|
onError?: (error: unknown, event: GdsOperationalEvent) => void;
|
|
1057
2196
|
}
|
|
2197
|
+
/** Props for {@link GdsTelemetryProvider}; mirror {@link GdsTelemetryDispatchOptions} for the whole subtree. */
|
|
1058
2198
|
interface GdsTelemetryProviderProps {
|
|
1059
2199
|
children: ReactNode;
|
|
1060
2200
|
sink?: GdsTelemetrySink;
|
|
@@ -1067,59 +2207,108 @@ interface GdsTelemetryContextValue {
|
|
|
1067
2207
|
emit: (event: GdsOperationalEventInput) => GdsTelemetryDispatchResult;
|
|
1068
2208
|
emitGdsEvent: (event: GdsOperationalEventInput) => GdsTelemetryDispatchResult;
|
|
1069
2209
|
}
|
|
2210
|
+
/** Type guard: `true` when the string is one of the canonical {@link gdsOperationalEventTypes}. */
|
|
1070
2211
|
declare function isGdsOperationalEventType(eventType: string): eventType is (typeof gdsOperationalEventTypes)[number];
|
|
2212
|
+
/**
|
|
2213
|
+
* Wraps a sink into a {@link GdsTelemetryAdapter} that applies per-attempt
|
|
2214
|
+
* timeout and retry, stamps each attempt number onto the event, and reports the
|
|
2215
|
+
* final error to `onError` when all attempts fail.
|
|
2216
|
+
*/
|
|
1071
2217
|
declare function createGdsTelemetryAdapter({ id, emit, isAvailable, flush, timeoutMs, retryAttempts, retryDelayMs, onError, }: GdsTelemetryAdapterOptions): GdsTelemetryAdapter;
|
|
2218
|
+
/**
|
|
2219
|
+
* Core dispatch: applies sampling, scrubs the payload per policy, and routes the
|
|
2220
|
+
* normalized event to the adapter (or legacy sink), returning a
|
|
2221
|
+
* {@link GdsTelemetryDispatchResult} describing what happened.
|
|
2222
|
+
*/
|
|
1072
2223
|
declare function emitGdsEvent({ adapter, sink, sampleRate, payloadPolicy, onAdapterError, }: GdsTelemetryDispatchOptions, event: GdsOperationalEventInput): GdsTelemetryDispatchResult;
|
|
2224
|
+
/** Provides a memoized telemetry `emit` to the subtree via context, bound to the given adapter/sink and policy. */
|
|
1073
2225
|
declare function GdsTelemetryProvider({ children, sink, adapter, sampleRate, payloadPolicy, onAdapterError, }: GdsTelemetryProviderProps): react.JSX.Element;
|
|
2226
|
+
/** Reads the telemetry context; throws when used outside a {@link GdsTelemetryProvider}. */
|
|
1074
2227
|
declare function useGdsTelemetry(): GdsTelemetryContextValue;
|
|
1075
2228
|
|
|
2229
|
+
/** Stage of the public capture flow. */
|
|
1076
2230
|
type PublicCaptureStageId = 'identify' | 'consent' | 'capture' | 'accept' | 'cta' | 'restart' | 'share';
|
|
2231
|
+
/** Runtime state of the capture hardware and flow. */
|
|
1077
2232
|
type CaptureRuntimeState = 'idle' | 'loading' | 'ready' | 'permission-denied' | 'hardware-unavailable' | 'error' | 'complete';
|
|
2233
|
+
/** Props for {@link PublicCaptureFlow}. */
|
|
1078
2234
|
interface PublicCaptureFlowProps {
|
|
2235
|
+
/** Current flow stage; selects default title/description copy. */
|
|
1079
2236
|
stage: PublicCaptureStageId;
|
|
2237
|
+
/** Current runtime state; drives the flow status and permission/hardware recovery bodies. */
|
|
1080
2238
|
state: CaptureRuntimeState;
|
|
2239
|
+
/** Overrides the stage's default title. */
|
|
1081
2240
|
title?: ReactNode;
|
|
2241
|
+
/** Overrides the stage's default description. */
|
|
1082
2242
|
description?: ReactNode;
|
|
2243
|
+
/** Bounded hardware surface (e.g. camera view) rendered only during the `capture` stage. */
|
|
1083
2244
|
hardwareSurface?: ReactNode;
|
|
2245
|
+
/** Stage body content shown when no runtime recovery block applies. */
|
|
1084
2246
|
body?: ReactNode;
|
|
2247
|
+
/** Optional inline notice text for the stage. */
|
|
1085
2248
|
notice?: ReactNode;
|
|
1086
2249
|
actions?: PublicFlowAction[];
|
|
2250
|
+
/** Share options; on the `share` stage these render as the flow body. */
|
|
1087
2251
|
share?: ShareButtonGroupProps;
|
|
2252
|
+
/** Optional exit control rendered in the shell header. */
|
|
1088
2253
|
exitAction?: ReactNode;
|
|
1089
2254
|
}
|
|
2255
|
+
/**
|
|
2256
|
+
* Governed public capture flow: maps a capture stage and runtime state onto a
|
|
2257
|
+
* {@link PublicFlowShell}, supplying default stage copy, permission/hardware
|
|
2258
|
+
* recovery bodies, and an optional share overlay on the final stage.
|
|
2259
|
+
*/
|
|
1090
2260
|
declare function PublicCaptureFlow({ stage, state, title, description, hardwareSurface, body, notice, actions, share, exitAction, }: PublicCaptureFlowProps): react.JSX.Element;
|
|
2261
|
+
/** Identity stage layout: stacks the supplied identity fields. */
|
|
1091
2262
|
declare function PublicIdentityStep({ children }: {
|
|
1092
2263
|
children: ReactNode;
|
|
1093
2264
|
}): react.JSX.Element;
|
|
2265
|
+
/** Consent stage layout: renders consent copy above its control (e.g. a checkbox). */
|
|
1094
2266
|
declare function PublicConsentStep({ consentText, control }: {
|
|
1095
2267
|
consentText: ReactNode;
|
|
1096
2268
|
control: ReactNode;
|
|
1097
2269
|
}): react.JSX.Element;
|
|
2270
|
+
/** Accept stage layout: renders the captured result preview above accept/retry actions. */
|
|
1098
2271
|
declare function PublicAcceptStep({ preview, actions }: {
|
|
1099
2272
|
preview: ReactNode;
|
|
1100
2273
|
actions?: ReactNode;
|
|
1101
2274
|
}): react.JSX.Element;
|
|
2275
|
+
/** Call-to-action stage layout: stacks the supplied CTA content. */
|
|
1102
2276
|
declare function PublicCtaStep({ children }: {
|
|
1103
2277
|
children: ReactNode;
|
|
1104
2278
|
}): react.JSX.Element;
|
|
2279
|
+
/** Restart stage layout: stacks the supplied restart content. */
|
|
1105
2280
|
declare function PublicRestartStep({ children }: {
|
|
1106
2281
|
children: ReactNode;
|
|
1107
2282
|
}): react.JSX.Element;
|
|
2283
|
+
/** Share stage overlay: renders a {@link ShareButtonGroup} for the public result. */
|
|
1108
2284
|
declare function PublicShareOverlay(props: ShareButtonGroupProps): react.JSX.Element;
|
|
1109
2285
|
|
|
2286
|
+
/** Playback state driving control availability and the play/pause icon. */
|
|
1110
2287
|
type PlaybackControlState = 'loading' | 'ready' | 'playing' | 'paused' | 'empty' | 'error' | 'degraded';
|
|
2288
|
+
/** Props for `PlaybackControls`. Optional handlers whose control should not render are simply omitted (e.g. no `onRestart` hides the restart button). */
|
|
1111
2289
|
interface PlaybackControlsProps {
|
|
1112
2290
|
state: PlaybackControlState;
|
|
2291
|
+
/** Whether the Next control is enabled. Defaults to `true`. */
|
|
1113
2292
|
canGoNext?: boolean;
|
|
2293
|
+
/** Whether the Previous control is enabled. Defaults to `true`. */
|
|
1114
2294
|
canGoPrevious?: boolean;
|
|
2295
|
+
/** Current fullscreen state, driving the fullscreen toggle label. Defaults to `false`. */
|
|
1115
2296
|
fullscreen?: boolean;
|
|
1116
2297
|
onPlayPause?: () => void;
|
|
1117
2298
|
onNext?: () => void;
|
|
1118
2299
|
onPrevious?: () => void;
|
|
2300
|
+
/** Toggles fullscreen; when omitted the fullscreen control is not rendered. */
|
|
1119
2301
|
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
2302
|
+
/** Restarts playback; when omitted the restart control is not rendered. */
|
|
1120
2303
|
onRestart?: () => void;
|
|
1121
2304
|
reducedMotion?: boolean;
|
|
1122
2305
|
}
|
|
2306
|
+
/**
|
|
2307
|
+
* Binds global playback keyboard shortcuts while `enabled`: Space toggles
|
|
2308
|
+
* play/pause, Arrow Right/Left go next/previous, and `F` toggles fullscreen.
|
|
2309
|
+
* Ignores key events originating from inputs, buttons, links, or editable
|
|
2310
|
+
* elements, and cleans up its listener on unmount.
|
|
2311
|
+
*/
|
|
1123
2312
|
declare function usePlaybackKeyboardControls({ enabled, onPlayPause, onNext, onPrevious, onFullscreenToggle, }: {
|
|
1124
2313
|
enabled?: boolean;
|
|
1125
2314
|
onPlayPause?: () => void;
|
|
@@ -1127,7 +2316,370 @@ declare function usePlaybackKeyboardControls({ enabled, onPlayPause, onNext, onP
|
|
|
1127
2316
|
onPrevious?: () => void;
|
|
1128
2317
|
onFullscreenToggle?: () => void;
|
|
1129
2318
|
}): void;
|
|
2319
|
+
/** Governed transport control bar (previous, play/pause, next, optional restart/fullscreen) with a live-announced state label; controls disable in loading/empty/error states. */
|
|
1130
2320
|
declare function PlaybackControls({ state, canGoNext, canGoPrevious, fullscreen, onPlayPause, onNext, onPrevious, onFullscreenChange, onRestart, }: PlaybackControlsProps): react.JSX.Element;
|
|
2321
|
+
/** Overlay-styled wrapper around {@link PlaybackControls}, sharing the same props, for use atop media surfaces. */
|
|
1131
2322
|
declare function PlaybackOverlayControls(props: PlaybackControlsProps): react.JSX.Element;
|
|
1132
2323
|
|
|
1133
|
-
|
|
2324
|
+
/** Props for the asset-manager template: folder tree, toolbar, bulk actions, table/grid items, upload and detail. */
|
|
2325
|
+
interface GdsAssetManagerTemplateProps extends GdsPageTemplateBaseProps {
|
|
2326
|
+
/** Folder navigation, normally a `GdsTreeView`. */
|
|
2327
|
+
tree?: ReactNode;
|
|
2328
|
+
/** Toolbar above the items: search, filters, sort, upload trigger (`DataToolbar`, `ActionBar`). */
|
|
2329
|
+
toolbar?: ReactNode;
|
|
2330
|
+
/** Bulk actions for the current selection; the bar shows when `selectedCount` is above zero. */
|
|
2331
|
+
bulkActions?: GdsBulkActionBarProps;
|
|
2332
|
+
/** Items as a table, normally an `AdvancedDataTable` with row selection. */
|
|
2333
|
+
table?: ReactNode;
|
|
2334
|
+
/** Items as a grid of cards, e.g. `GdsAssetPreviewCard`. */
|
|
2335
|
+
grid?: ReactNode;
|
|
2336
|
+
/** Item layout (controlled) when both `table` and `grid` are given. */
|
|
2337
|
+
view?: GdsCollectionView;
|
|
2338
|
+
/** Initial item layout when uncontrolled; defaults to `'table'`. */
|
|
2339
|
+
defaultView?: GdsCollectionView;
|
|
2340
|
+
/** Called when the user switches the item layout. */
|
|
2341
|
+
onViewChange?: (view: GdsCollectionView) => void;
|
|
2342
|
+
/** Upload flow, normally `GdsAssetManager`. */
|
|
2343
|
+
upload?: ReactNode;
|
|
2344
|
+
/** Details of the selected item. */
|
|
2345
|
+
detail?: ReactNode;
|
|
2346
|
+
/** Shape profile for the page; defaults to `'operations'` for dense screens. */
|
|
2347
|
+
shapeProfile?: GdsShapeProfile;
|
|
2348
|
+
}
|
|
2349
|
+
/** Props for the workspace-inbox template: navigation, thread list and conversation pane. */
|
|
2350
|
+
interface GdsWorkspaceInboxTemplateProps extends GdsPageTemplateBaseProps {
|
|
2351
|
+
/** Workspace navigation, e.g. a `SidebarNav`. */
|
|
2352
|
+
navigation?: ReactNode;
|
|
2353
|
+
/** The conversation list, normally a `GdsThreadList`. */
|
|
2354
|
+
threadList: ReactNode;
|
|
2355
|
+
/** The open conversation, normally a `GdsMessageThread`. */
|
|
2356
|
+
detail?: ReactNode;
|
|
2357
|
+
/** Heading of the open conversation; focused when it opens on a narrow viewport. */
|
|
2358
|
+
detailTitle?: string;
|
|
2359
|
+
/** A conversation is open. On a narrow viewport the detail pane replaces the list. */
|
|
2360
|
+
hasSelection?: boolean;
|
|
2361
|
+
/** The open conversation is loading. */
|
|
2362
|
+
detailLoading?: boolean;
|
|
2363
|
+
/** Returns from the detail pane to the list on a narrow viewport; clear the selection here. */
|
|
2364
|
+
onBack?: () => void;
|
|
2365
|
+
/** Height of each region; when set, the regions scroll independently. */
|
|
2366
|
+
regionHeight?: string;
|
|
2367
|
+
}
|
|
2368
|
+
/**
|
|
2369
|
+
* Asset-manager page template: a folder tree beside the items, with a toolbar, a bulk-action
|
|
2370
|
+
* bar for the selection, a labelled table/grid toggle when both layouts are given, an upload
|
|
2371
|
+
* slot and item detail. The page uses the `operations` shape profile unless `shapeProfile`
|
|
2372
|
+
* says otherwise. Focus order follows the layout: tree, toolbar, bulk actions, layout toggle,
|
|
2373
|
+
* items.
|
|
2374
|
+
*/
|
|
2375
|
+
declare function GdsAssetManagerTemplate({ state, tree, toolbar, bulkActions, table, grid, view: viewProp, defaultView, onViewChange, upload, detail, shapeProfile, onRetry, retryLabel, ...props }: GdsAssetManagerTemplateProps): react.JSX.Element;
|
|
2376
|
+
/**
|
|
2377
|
+
* Workspace-inbox page template: workspace navigation, a conversation list and the open
|
|
2378
|
+
* conversation, each a labelled region that scrolls on its own when `regionHeight` is set. On a
|
|
2379
|
+
* narrow viewport it shows the list, or the open conversation with a back action; opening one
|
|
2380
|
+
* moves focus to its heading.
|
|
2381
|
+
*/
|
|
2382
|
+
declare function GdsWorkspaceInboxTemplate({ state, navigation, threadList, detail, detailTitle, hasSelection, detailLoading, onBack, regionHeight, onRetry, retryLabel, ...props }: GdsWorkspaceInboxTemplateProps): react.JSX.Element;
|
|
2383
|
+
|
|
2384
|
+
/** Props for {@link ReportOutdatedLink}. */
|
|
2385
|
+
interface ReportOutdatedLinkProps {
|
|
2386
|
+
/** Consumer-owned side effect; GDS performs no I/O. */
|
|
2387
|
+
onReport?: () => void;
|
|
2388
|
+
/** Overrides the default action label. */
|
|
2389
|
+
label?: string;
|
|
2390
|
+
}
|
|
2391
|
+
/**
|
|
2392
|
+
* Inline report action: idle renders a button, activation replaces it with a persistent
|
|
2393
|
+
* thank-you confirmation (announced via a polite live region) and fires `onReport` exactly
|
|
2394
|
+
* once. One-way — there is no revert, unlike `SemanticButton`'s transient feedback.
|
|
2395
|
+
*/
|
|
2396
|
+
declare function ReportOutdatedLink({ onReport, label }: ReportOutdatedLinkProps): react.JSX.Element;
|
|
2397
|
+
/** Row-level data-provenance status for a {@link SourceBlock} price/schedule row. */
|
|
2398
|
+
type SourceRowStatus = 'estimate' | 'confirmed' | 'needs-confirmation';
|
|
2399
|
+
/** Props for {@link SourceBlock}. */
|
|
2400
|
+
interface SourceBlockProps {
|
|
2401
|
+
/** e.g. "Official provider website", "Public event feed". */
|
|
2402
|
+
sourceType?: string;
|
|
2403
|
+
/** When set, the source type renders as a link. */
|
|
2404
|
+
sourceUrl?: string;
|
|
2405
|
+
/** When set, rendered via {@link LastCheckedLabel}; absent renders the unknown-value row. */
|
|
2406
|
+
lastChecked?: Date | string;
|
|
2407
|
+
/** Row status for the price. Absent renders the unknown-value row. */
|
|
2408
|
+
priceStatus?: SourceRowStatus;
|
|
2409
|
+
/** Row status for the schedule. Absent renders the unknown-value row. */
|
|
2410
|
+
scheduleStatus?: SourceRowStatus;
|
|
2411
|
+
/** When set, renders the embedded report-outdated action. */
|
|
2412
|
+
onReport?: () => void;
|
|
2413
|
+
}
|
|
2414
|
+
/**
|
|
2415
|
+
* Detail-page information-source card: a title, four labelled rows that are never omitted
|
|
2416
|
+
* (an absent value states the unknown wording explicitly), a standing confirm-with-provider
|
|
2417
|
+
* line, and — when `onReport` is set — the embedded {@link ReportOutdatedLink}.
|
|
2418
|
+
*/
|
|
2419
|
+
declare function SourceBlock({ sourceType, sourceUrl, lastChecked, priceStatus, scheduleStatus, onReport }: SourceBlockProps): react.JSX.Element;
|
|
2420
|
+
/** Props for {@link ConfirmChecklist}. */
|
|
2421
|
+
interface ConfirmChecklistProps {
|
|
2422
|
+
/** Omitted = the six standard items. Explicit [] renders nothing. */
|
|
2423
|
+
items?: string[];
|
|
2424
|
+
/** Overrides the default title. */
|
|
2425
|
+
title?: string;
|
|
2426
|
+
}
|
|
2427
|
+
/**
|
|
2428
|
+
* Amber check-before-booking card: a title and a list of items the reader should verify
|
|
2429
|
+
* directly with the provider before committing. Checking an item applies a line-through and
|
|
2430
|
+
* reduced emphasis while it remains a real, labelled, checked checkbox. Renders `null` for
|
|
2431
|
+
* an explicit empty `items` array.
|
|
2432
|
+
*/
|
|
2433
|
+
declare function ConfirmChecklist({ items, title }: ConfirmChecklistProps): react.JSX.Element | null;
|
|
2434
|
+
|
|
2435
|
+
/**
|
|
2436
|
+
* HeroSearchPanel (issue 710).
|
|
2437
|
+
*
|
|
2438
|
+
* Homepage intent-capture surface: a card-shaped `<form role="search">` with a
|
|
2439
|
+
* consumer-defined, flex-wrapping row of labeled text fields, a primary + optional
|
|
2440
|
+
* secondary CTA, and an optional trust-line slot. Field configuration and all
|
|
2441
|
+
* visible copy are consumer-supplied; the component owns only structure, tokens,
|
|
2442
|
+
* and value-collection behaviour.
|
|
2443
|
+
*/
|
|
2444
|
+
/** Flex basis of one intent field in the panel's wrapping row. */
|
|
2445
|
+
declare const GDS_HERO_SEARCH_FIELD_FLEX_BASIS_PX = 120;
|
|
2446
|
+
/** Minimum width one intent field may shrink to before the row wraps. */
|
|
2447
|
+
declare const GDS_HERO_SEARCH_FIELD_MIN_WIDTH_PX = 110;
|
|
2448
|
+
/** One text field in a HeroSearchPanel. All copy is consumer-supplied. */
|
|
2449
|
+
interface HeroSearchFieldConfig {
|
|
2450
|
+
/** Stable key; becomes the property name in the submitted values record. Must be unique. */
|
|
2451
|
+
key: string;
|
|
2452
|
+
/** Visible field label. */
|
|
2453
|
+
label: string;
|
|
2454
|
+
/** Optional input placeholder. */
|
|
2455
|
+
placeholder?: string;
|
|
2456
|
+
}
|
|
2457
|
+
/** Props for {@link HeroSearchPanel}. */
|
|
2458
|
+
interface HeroSearchPanelProps {
|
|
2459
|
+
/** Field row definition. Required; the component ships no default field set. */
|
|
2460
|
+
fields: HeroSearchFieldConfig[];
|
|
2461
|
+
/** Controlled values. When set, the component is fully controlled via onChange. */
|
|
2462
|
+
values?: Record<string, string>;
|
|
2463
|
+
/** Initial values for uncontrolled mode. */
|
|
2464
|
+
defaultValues?: Record<string, string>;
|
|
2465
|
+
/** Fires with the full values record on every edit. */
|
|
2466
|
+
onChange?: (values: Record<string, string>) => void;
|
|
2467
|
+
/** Fires with the current values record on primary CTA click or form submit. */
|
|
2468
|
+
onSubmit: (values: Record<string, string>) => void;
|
|
2469
|
+
/** Overrides the primary CTA label; default is the governed `search` vocabulary action. */
|
|
2470
|
+
primaryActionLabel?: string;
|
|
2471
|
+
/** Secondary CTA label; the secondary button renders only when this is provided. */
|
|
2472
|
+
secondaryActionLabel?: string;
|
|
2473
|
+
/** Secondary CTA handler. */
|
|
2474
|
+
onSecondaryAction?: () => void;
|
|
2475
|
+
/** Governed trust-line slot rendered below the CTA row in metadata typography. Omitted = not rendered. */
|
|
2476
|
+
trustLine?: ReactNode;
|
|
2477
|
+
/** Accessible name for the search region; defaults to a governed localized string. */
|
|
2478
|
+
ariaLabel?: string;
|
|
2479
|
+
/** Disables all fields and CTAs. */
|
|
2480
|
+
disabled?: boolean;
|
|
2481
|
+
}
|
|
2482
|
+
/**
|
|
2483
|
+
* Governed homepage intent-capture surface: a card-shaped `<form role="search">` with a
|
|
2484
|
+
* consumer-defined, flex-wrapping row of labeled text fields, a primary + optional
|
|
2485
|
+
* secondary CTA, and an optional trust-line slot. Values are collected in controlled
|
|
2486
|
+
* (`values`/`onChange`) or uncontrolled (`defaultValues`) mode and handed to `onSubmit`
|
|
2487
|
+
* verbatim — no trimming, coercion, validation, or navigation happens inside the
|
|
2488
|
+
* component. It renders no fetched data, so the loading/empty/error/success states
|
|
2489
|
+
* contract does not apply internally; express post-submit lifecycle with
|
|
2490
|
+
* `AsyncSurface`/`StateBlock` in the consuming page instead.
|
|
2491
|
+
*/
|
|
2492
|
+
declare function HeroSearchPanel({ fields, values, defaultValues, onChange, onSubmit, primaryActionLabel, secondaryActionLabel, onSecondaryAction, trustLine, ariaLabel: ariaLabelProp, disabled, }: HeroSearchPanelProps): react.JSX.Element;
|
|
2493
|
+
|
|
2494
|
+
/** A single card on the kanban board. */
|
|
2495
|
+
interface KanbanItem {
|
|
2496
|
+
id: string;
|
|
2497
|
+
title: ReactNode;
|
|
2498
|
+
description?: ReactNode;
|
|
2499
|
+
status?: ReactNode;
|
|
2500
|
+
/** Accessible name for the move action when `title` is not plain text. */
|
|
2501
|
+
ariaLabel?: string;
|
|
2502
|
+
}
|
|
2503
|
+
/** A column and the items it holds. */
|
|
2504
|
+
interface KanbanColumnData<TItem extends KanbanItem = KanbanItem> {
|
|
2505
|
+
id: string;
|
|
2506
|
+
/**
|
|
2507
|
+
* Column heading. A plain string renders as a governed `<Title>`; a
|
|
2508
|
+
* `ReactNode` (icon + label, a colored dot, a custom count pill, …) renders
|
|
2509
|
+
* verbatim. When `title` is not a plain string, set `ariaLabel` so move-menu
|
|
2510
|
+
* targets and drag announcements still have a meaningful accessible name.
|
|
2511
|
+
*/
|
|
2512
|
+
title: ReactNode;
|
|
2513
|
+
items: TItem[];
|
|
2514
|
+
/**
|
|
2515
|
+
* Real total for server-paginated columns, where `items` holds only the
|
|
2516
|
+
* currently-loaded page. The header count badge prefers this when present and
|
|
2517
|
+
* falls back to `items.length` when omitted — so existing consumers see zero
|
|
2518
|
+
* behavior change on upgrade.
|
|
2519
|
+
*/
|
|
2520
|
+
totalCount?: number;
|
|
2521
|
+
/** Accessible name for move-menu targets and drag announcements when `title` is not plain text. */
|
|
2522
|
+
ariaLabel?: string;
|
|
2523
|
+
}
|
|
2524
|
+
/** Board layout: a single `'stacked'` column per row, or side-by-side `'columns'`. */
|
|
2525
|
+
type KanbanOrientation = 'stacked' | 'columns';
|
|
2526
|
+
/** Options for {@link useGdsKanbanOrientation}. */
|
|
2527
|
+
interface UseGdsKanbanOrientationOptions {
|
|
2528
|
+
/**
|
|
2529
|
+
* Width, at or below which a portrait viewport is treated as "mobile" (1-column stacked).
|
|
2530
|
+
* Portrait viewports wider than this (tablets) and any landscape viewport render multi-column.
|
|
2531
|
+
* Defaults to the `xs` alias (36em / ~576px).
|
|
2532
|
+
*/
|
|
2533
|
+
stackedBreakpoint?: MantineBreakpoint;
|
|
2534
|
+
}
|
|
2535
|
+
/**
|
|
2536
|
+
* Resolves the governed kanban layout: portrait mobile renders a single stacked
|
|
2537
|
+
* column per row, everything else (landscape phones, tablets, desktop) renders
|
|
2538
|
+
* multi-column. Consumers never need custom CSS or local breakpoint logic.
|
|
2539
|
+
*/
|
|
2540
|
+
declare function useGdsKanbanOrientation({ stackedBreakpoint, }?: UseGdsKanbanOrientationOptions): KanbanOrientation;
|
|
2541
|
+
type OnMoveItem = (itemId: string, fromColumnId: string, toColumnId: string, toIndex?: number) => void;
|
|
2542
|
+
/** Column-level footer renderer (pagination / "load more" / per-column actions). */
|
|
2543
|
+
type RenderColumnFooter<TColumn> = (column: TColumn) => ReactNode;
|
|
2544
|
+
/** Props for {@link KanbanCard}. */
|
|
2545
|
+
interface KanbanCardProps<TItem extends KanbanItem = KanbanItem, TColumn extends KanbanColumnData<TItem> = KanbanColumnData<TItem>> {
|
|
2546
|
+
item: TItem;
|
|
2547
|
+
column: TColumn;
|
|
2548
|
+
columns: TColumn[];
|
|
2549
|
+
/** Called on a menu-driven or drag-driven move. `toIndex` is only populated by drag. */
|
|
2550
|
+
onMoveItem?: OnMoveItem;
|
|
2551
|
+
renderItem?: (item: TItem, column: TColumn) => ReactNode;
|
|
2552
|
+
/** Renders an additional pointer/touch/keyboard drag handle alongside the Move menu. */
|
|
2553
|
+
enableDrag?: boolean;
|
|
2554
|
+
/**
|
|
2555
|
+
* Icon for the "move to column" **menu** trigger. Defaults to a `More`
|
|
2556
|
+
* (vertical-dots) glyph — a "tap to open a menu" affordance that deliberately
|
|
2557
|
+
* does NOT imply free drag, since this control is a tap-to-open destination
|
|
2558
|
+
* picker, not a drag handle (the drag handle is separate and gated by
|
|
2559
|
+
* `enableDrag`). Override only if your icon set has a better "pick a
|
|
2560
|
+
* destination" glyph; avoid drag-implying icons here.
|
|
2561
|
+
*/
|
|
2562
|
+
moveMenuIcon?: ReactNode;
|
|
2563
|
+
/** Overrides the verb in the move-menu trigger's accessible label (default `"Move"`); the item name is still appended when available. */
|
|
2564
|
+
moveMenuLabel?: string;
|
|
2565
|
+
}
|
|
2566
|
+
/**
|
|
2567
|
+
* A single governed kanban card: renders the item body, an always-available
|
|
2568
|
+
* "move to column" menu (the accessible-equivalent reorder path), and, when
|
|
2569
|
+
* `enableDrag` is set, an accessible drag handle built on `@dnd-kit`.
|
|
2570
|
+
*/
|
|
2571
|
+
declare function KanbanCard<TItem extends KanbanItem = KanbanItem, TColumn extends KanbanColumnData<TItem> = KanbanColumnData<TItem>>({ item, column, columns, onMoveItem, renderItem, enableDrag, moveMenuIcon, moveMenuLabel }: KanbanCardProps<TItem, TColumn>): react.JSX.Element;
|
|
2572
|
+
/** Props for {@link KanbanColumn}. */
|
|
2573
|
+
interface KanbanColumnProps<TItem extends KanbanItem = KanbanItem, TColumn extends KanbanColumnData<TItem> = KanbanColumnData<TItem>> {
|
|
2574
|
+
column: TColumn;
|
|
2575
|
+
columns: TColumn[];
|
|
2576
|
+
onMoveItem?: OnMoveItem;
|
|
2577
|
+
renderItem?: (item: TItem, column: TColumn) => ReactNode;
|
|
2578
|
+
emptyLabel?: ReactNode;
|
|
2579
|
+
width?: number | string;
|
|
2580
|
+
enableDrag?: boolean;
|
|
2581
|
+
moveMenuIcon?: ReactNode;
|
|
2582
|
+
moveMenuLabel?: string;
|
|
2583
|
+
/** Static element rendered below the card list, inside the column (pagination / "load more" / per-column actions). */
|
|
2584
|
+
footer?: ReactNode;
|
|
2585
|
+
/** Function form of `footer`, receiving the column; takes precedence over `footer` when both are set. */
|
|
2586
|
+
renderFooter?: RenderColumnFooter<TColumn>;
|
|
2587
|
+
/**
|
|
2588
|
+
* Renders a header disclosure toggle that collapses the column body (cards +
|
|
2589
|
+
* footer) to just its title and count. Off by default — existing consumers
|
|
2590
|
+
* see no toggle. A collapsed column is not a drag drop target.
|
|
2591
|
+
*/
|
|
2592
|
+
collapsible?: boolean;
|
|
2593
|
+
/** Controlled collapsed state. Omit for uncontrolled (the column manages its own state). */
|
|
2594
|
+
collapsed?: boolean;
|
|
2595
|
+
/** Notified when the disclosure toggle changes the collapsed state. */
|
|
2596
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
2597
|
+
}
|
|
2598
|
+
/**
|
|
2599
|
+
* A single kanban column: header with title and count badge, the card list (a
|
|
2600
|
+
* droppable region when drag is enabled), an optional footer, and an optional
|
|
2601
|
+
* collapse/expand disclosure toggle.
|
|
2602
|
+
*/
|
|
2603
|
+
declare function KanbanColumn<TItem extends KanbanItem = KanbanItem, TColumn extends KanbanColumnData<TItem> = KanbanColumnData<TItem>>({ column, columns, onMoveItem, renderItem, emptyLabel, width, enableDrag, moveMenuIcon, moveMenuLabel, footer, renderFooter, collapsible, collapsed, onCollapsedChange, }: KanbanColumnProps<TItem, TColumn>): react.JSX.Element;
|
|
2604
|
+
/** Props for {@link KanbanBoard}. */
|
|
2605
|
+
interface KanbanBoardProps<TItem extends KanbanItem = KanbanItem, TColumn extends KanbanColumnData<TItem> = KanbanColumnData<TItem>> {
|
|
2606
|
+
title?: ReactNode;
|
|
2607
|
+
columns: TColumn[];
|
|
2608
|
+
/** Called when a card's move menu selects a target column, or (with `enableDrag`) when a
|
|
2609
|
+
* drag gesture completes. `toIndex` is only populated by drag; menu-driven moves append
|
|
2610
|
+
* to the end of the target column, matching existing behavior. Omit to render a read-only board. */
|
|
2611
|
+
onMoveItem?: OnMoveItem;
|
|
2612
|
+
/** Custom card body renderer. The card shell, border, and move action remain governed. */
|
|
2613
|
+
renderItem?: (item: TItem, column: TColumn) => ReactNode;
|
|
2614
|
+
emptyColumnLabel?: ReactNode;
|
|
2615
|
+
/**
|
|
2616
|
+
* `'auto'` (default) resolves the governed responsive rule via `useGdsKanbanOrientation`:
|
|
2617
|
+
* portrait mobile stacks columns vertically; landscape, tablet, and desktop render
|
|
2618
|
+
* multi-column with horizontal scroll. Force `'stacked'`/`'columns'` only for fixed layouts
|
|
2619
|
+
* (e.g. a dedicated mobile-only or desktop-only route).
|
|
2620
|
+
*/
|
|
2621
|
+
orientation?: 'auto' | KanbanOrientation;
|
|
2622
|
+
/** Minimum column width in multi-column layout. Defaults to `'17.5rem'` (scales with root font size). */
|
|
2623
|
+
columnWidth?: number | string;
|
|
2624
|
+
/**
|
|
2625
|
+
* Wheel-gesture routing over the multi-column horizontal scroll area (issue 464).
|
|
2626
|
+
* Defaults to `'none'`: no interception — a wheel/trackpad gesture behaves natively
|
|
2627
|
+
* (a vertical gesture chains to the page), fully backward compatible.
|
|
2628
|
+
*
|
|
2629
|
+
* `'header'` opts into Linear-style zone routing on **fine-pointer (desktop)** only:
|
|
2630
|
+
* a wheel gesture whose target is a column **header** (`data-gds-kanban-column-header`)
|
|
2631
|
+
* pans the columns horizontally regardless of gesture shape, while a gesture anywhere
|
|
2632
|
+
* else (a card, empty space) is never captured and scrolls the page as usual. Inert in
|
|
2633
|
+
* `'stacked'` orientation (there is no horizontal scroll area). RTL-aware.
|
|
2634
|
+
*/
|
|
2635
|
+
columnPanZone?: 'header' | 'none';
|
|
2636
|
+
/** Accessible name for the board region. Defaults to `title` (if a string) or a governed fallback. */
|
|
2637
|
+
boardLabel?: string;
|
|
2638
|
+
/**
|
|
2639
|
+
* Opt-in pointer/touch/keyboard drag-and-drop, in addition to (never instead of) the
|
|
2640
|
+
* "Move to column" menu, which stays rendered and fully functional either way — it is
|
|
2641
|
+
* the guaranteed accessible-equivalent fallback, not a mode that disappears when drag is
|
|
2642
|
+
* enabled. Defaults to `false`: existing consumers see zero behavior change on upgrade.
|
|
2643
|
+
* No native HTML5 `draggable`/`dragstart` is used (that remains prohibited — it cannot be
|
|
2644
|
+
* operated by keyboard or screen-reader users); this is built on `@dnd-kit`'s pointer and
|
|
2645
|
+
* keyboard sensors, which ship their own accessible keyboard-drag path independent of the
|
|
2646
|
+
* Move menu. Requires `onMoveItem`; has no effect on a read-only board.
|
|
2647
|
+
*/
|
|
2648
|
+
enableDrag?: boolean;
|
|
2649
|
+
/**
|
|
2650
|
+
* Icon for each card's "move to column" **menu** trigger. Defaults to a `More`
|
|
2651
|
+
* (vertical-dots) glyph — a "tap to open a menu" affordance that intentionally
|
|
2652
|
+
* does not imply free drag. The move menu is a tap-to-open destination picker
|
|
2653
|
+
* (always available, the accessible-equivalent fallback), distinct from the
|
|
2654
|
+
* `enableDrag` drag **handle**, which is the only control that implies physical
|
|
2655
|
+
* dragging — so this icon stays the same whether `enableDrag` is on or off.
|
|
2656
|
+
* Override only with another non-drag "pick a destination" glyph.
|
|
2657
|
+
*/
|
|
2658
|
+
moveMenuIcon?: ReactNode;
|
|
2659
|
+
/** Overrides the verb in each move-menu trigger's accessible label (default `"Move"`); the item name is still appended when available. */
|
|
2660
|
+
moveMenuLabel?: string;
|
|
2661
|
+
/** Per-column footer renderer, applied to every column (pagination / "load more" / per-column actions). */
|
|
2662
|
+
renderColumnFooter?: RenderColumnFooter<TColumn>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Enables the per-column collapse/expand disclosure toggle on every column.
|
|
2665
|
+
* Off by default. Pair with `collapsedColumnIds` + `onCollapsedChange` to control
|
|
2666
|
+
* collapsed state, or leave those unset for uncontrolled per-column state.
|
|
2667
|
+
*/
|
|
2668
|
+
collapsible?: boolean;
|
|
2669
|
+
/** Controlled set of collapsed column ids. Omit for uncontrolled (the board manages its own state). */
|
|
2670
|
+
collapsedColumnIds?: string[];
|
|
2671
|
+
/** Notified with the column id and its new collapsed state whenever a column's toggle changes. */
|
|
2672
|
+
onCollapsedChange?: (columnId: string, collapsed: boolean) => void;
|
|
2673
|
+
}
|
|
2674
|
+
/**
|
|
2675
|
+
* Governed responsive kanban board. Portrait mobile viewports render one stacked column
|
|
2676
|
+
* per row; landscape, tablet, and desktop viewports render multi-column with horizontal
|
|
2677
|
+
* scroll — resolved automatically via `useGdsKanbanOrientation`, no consumer CSS required.
|
|
2678
|
+
* Reordering always offers a keyboard-accessible "move to column" menu per card. Native
|
|
2679
|
+
* HTML5 drag-and-drop is never used (it cannot be operated by keyboard or screen-reader
|
|
2680
|
+
* users); an opt-in pointer/touch/keyboard drag affordance (`enableDrag`) is available
|
|
2681
|
+
* alongside it, built on `@dnd-kit`'s accessible sensors rather than native `draggable`.
|
|
2682
|
+
*/
|
|
2683
|
+
declare function KanbanBoard<TItem extends KanbanItem = KanbanItem, TColumn extends KanbanColumnData<TItem> = KanbanColumnData<TItem>>({ title, columns, onMoveItem, renderItem, emptyColumnLabel, orientation, columnWidth, columnPanZone, boardLabel, enableDrag, moveMenuIcon, moveMenuLabel, renderColumnFooter, collapsible, collapsedColumnIds, onCollapsedChange, }: KanbanBoardProps<TItem, TColumn>): react.JSX.Element;
|
|
2684
|
+
|
|
2685
|
+
export { type AccessRecoveryAction, AccessRecoveryPanel, type AccessRecoveryPanelProps, type AccessRecoveryState, AdvancedDataTable, type AdvancedDataTableProps, type AdvancedSortDirection, type AdvancedTableColumn, type AdvancedTableDensity, type CaptureRuntimeState, type CommandDef, CommandPalette, CommandRegistryProvider, ConfirmChecklist, type ConfirmChecklistProps, ConfirmDialog, type ConfirmDialogProps, type ConfirmRequest, type CreateGdsFormFromSchemaOptions, DiscoveryShell, type DiscoveryShellProps, type DiscoveryShellState, DocsCodeBlock, type DocsCodeBlockProps, DocsHeaderActionSelect, type DocsHeaderActionSelectOption, type DocsHeaderActionSelectProps, DocsShell, type DocsShellProps, type FieldState, FileUploadField, type FileUploadFieldProps, FormErrorSummary, type FormSnapshot, GDS_BUTTON_FEEDBACK_DURATION_MS, GDS_BUTTON_GRADIENT_TEXT_FLOOR, GDS_BUTTON_OUTLINE_ACCENT_STROKE_PX, GDS_HERO_SEARCH_FIELD_FLEX_BASIS_PX, GDS_HERO_SEARCH_FIELD_MIN_WIDTH_PX, GameBoardTile, type GameBoardTileProps, GdsAccessGate, GdsAccessGateAction, GdsAccessGateContract, GdsAccessGateEvent, type GdsAccessGateProps, type GdsAltTextPolicy, type GdsAsset, type GdsAssetAdapter, type GdsAssetDisplayMode, type GdsAssetEvent, GdsAssetManager, type GdsAssetManagerProps, GdsAssetManagerTemplate, type GdsAssetManagerTemplateProps, GdsAssetPreviewCard, type GdsAssetPreviewCardProps, type GdsAssetQueueItem, type GdsAssetStatus, type GdsAssetUploadQueueController, type GdsAssetUploadRequest, type GdsAssetValidationPolicy, type GdsBrowseSelection, type GdsBrowseSelectionOptions, type GdsBulkAction, GdsBulkActionBar, type GdsBulkActionBarProps, GdsCardContractOptions, GdsCardResolvedContract, type GdsCollectionView, type GdsConfirmApi, GdsConfirmProvider, type GdsConfirmProviderProps, type GdsConfirmationEvent, type GdsConfirmationEventType, type GdsConfirmationRequest, type GdsConfirmationStatus, GdsDataTable, type GdsDataTableController, type GdsDataTableProps, GdsDateInput, type GdsDateInputBaseProps, type GdsDateInputProps, GdsDateRangeInput, type GdsDateRangeInputProps, type GdsDateRangeValue, GdsDateTimeInput, type GdsDateTimeInputProps, GdsDensityProvider, type GdsDensityProviderProps, type GdsDestructiveActionResult, GdsDialog, type GdsDialogProps, type GdsDraftAdapter, GdsDrawer, type GdsDrawerProps, type GdsEventPayloadPolicy, type GdsExportRequest, type GdsFieldDescriptor, type GdsFieldOption, type GdsFieldRenderer, type GdsFieldRendererContext, type GdsFieldRendererMap, type GdsFormOrchestrationEvent, GdsFormProvider, type GdsFormSchema, type GdsFormServerError, GdsGuidedTour, type GdsGuidedTourProps, GdsLayoutTemplate, GdsLayoutTemplatePreview, type GdsLayoutTemplatePreviewProps, GdsMessageThread, type GdsMessageThreadProps, GdsModal, type GdsModalProps, GdsNotificationAuditEvent, GdsNotificationCenter, GdsNotificationMessage, GdsNotificationPolicy, GdsNotificationProvider, type GdsNotificationProviderProps, type GdsOperationalEvent, type GdsOperationalEventInput, type GdsOperationalEventType, type GdsOverlayEvent, type GdsOverlayEventType, type GdsOverlayPolicy, type GdsOverlayRoutePolicy, type GdsOverlayStackItem, type GdsOverlayStatus, type GdsOverlayType, GdsPageTemplateBaseProps, type GdsRejectedPayloadDetails, type GdsResourceActionId, type GdsResourceActionResult, type GdsResourceAdapter, GdsResourceManager, type GdsResourceManagerController, type GdsResourceManagerEvent, type GdsResourceManagerProps, type GdsResourcePermission, type GdsResourceRecord, type GdsResourceWorkflowState, type GdsRiskLevel, type GdsSchemaAdapterResult, type GdsSchemaFieldType, GdsSchemaForm, type GdsSchemaFormEvent, type GdsSchemaFormProps, type GdsSchemaUploadAdapter, type GdsSchemaUploadRemoveRequest, type GdsSchemaUploadRequest, type GdsSchemaUploadResult, GdsShapeScope, type GdsShapeScopeProps, GdsSheet, type GdsSheetProps, GdsSidePanel, type GdsSidePanelProps, type GdsTableColumn, type GdsTableDataAdapter, type GdsTableEvent, type GdsTableLoadResult, type GdsTableQuery, type GdsTableSortDirection, type GdsTableStatus, type GdsTelemetryAdapter, type GdsTelemetryAdapterOptions, type GdsTelemetryDispatchOptions, type GdsTelemetryDispatchResult, type GdsTelemetryDispatchStatus, type GdsTelemetryOutcome, type GdsTelemetryPayload, type GdsTelemetryPayloadValue, GdsTelemetryProvider, type GdsTelemetryProviderProps, type GdsTelemetrySink, GdsThreadList, type GdsThreadListItem, type GdsThreadListProps, type GdsThreadMessage, type GdsToastApi, type GdsToastMessage, GdsToastProvider, type GdsToastProviderProps, GdsToastViewport, type GdsToastViewportProps, GdsTourButton, type GdsTourButtonProps, type GdsTourInteraction, type GdsTourPlacement, GdsTourProvider, type GdsTourProviderProps, type GdsTourStartOptions, type GdsTourStatus, type GdsTourStep, type GdsTourStopReason, type GdsTreeNode, GdsTreeView, type GdsTreeViewProps, type GdsUiEvent, type GdsUndoPolicy, type GdsUxFailureReason, GdsValidationSummary, GdsViewToggle, type GdsViewToggleProps, GdsVocabularyPack, GdsWorkspaceInboxTemplate, type GdsWorkspaceInboxTemplateProps, type HeroSearchFieldConfig, HeroSearchPanel, type HeroSearchPanelProps, KanbanBoard, type KanbanBoardProps, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnData, type KanbanColumnProps, type KanbanItem, type KanbanOrientation, type ListingAction, ListingProvider, type ListingQueryState, type ListingStateConfig, type ListingStateValue, MediaFit, MediaPreviewAspectRatio, NotificationCenter, type OverlayCloseReason, type OverlayDescriptor, type OverlayKind, OverlayManagerProvider, type OverlayManagerProviderProps, type PlaybackControlState, PlaybackControls, type PlaybackControlsProps, PlaybackOverlayControls, ProviderCTA, type ProviderCTAProps, PublicAcceptStep, PublicCaptureFlow, type PublicCaptureFlowProps, type PublicCaptureStageId, PublicConsentStep, PublicCtaStep, PublicFlowAction, PublicIdentityStep, PublicRestartStep, PublicShareOverlay, ReportOutdatedLink, type ReportOutdatedLinkProps, SemanticAction, SemanticActionId, SemanticButton, type SemanticButtonProps, ShareButtonGroup, type ShareButtonGroupProps, type ShareChannel, SidebarNav, SidebarNavItem, type SidebarNavItemProps, type SidebarNavProps, SidebarNavSection, type SidebarNavSectionProps, SourceBlock, type SourceBlockProps, type SourceRowStatus, type SubmitState, ThemeToggle, type ThemeToggleProps, UploadDropzone, type UploadDropzoneProps, type UploadDropzoneState, type UseDiscoveryShellStateOptions, type UseGdsAssetUploadQueueConfig, type UseGdsDataTableConfig, type UseGdsFormOrchestrationConfig, type UseGdsKanbanOrientationOptions, type UseGdsResourceManagerConfig, ValidatedFieldMessage, type ValidationIssue, type ValidationSeverity, createGdsAssetAdapter, createGdsDraftAdapter, createGdsFormFromSchema, createGdsResourceAdapter, createGdsTableAdapter, createGdsTelemetryAdapter, emitGdsEvent, gdsFormReducer, gdsOperationalEventTypes, gdsUxFailureReasons, getGdsShapeScopeStyle, isGdsOperationalEventType, jsonSchemaToGdsFormSchema, listingQueryReducer, openApiToGdsFormSchema, serializeGdsTableQuery, useCommandLauncher, useDiscoveryShellState, useGdsAssetUploadQueue, useGdsBrowseSelection, useGdsCardContract, useGdsConfirm, useGdsDataTable, useGdsDensity, useGdsForm, useGdsFormOrchestration, useGdsFormSnapshot, useGdsKanbanOrientation, useGdsNotifications, useGdsResourceManager, useGdsTelemetry, useGdsToasts, useGdsTour, useHasSeenTour, useListingState, useOverlayManager, usePlaybackKeyboardControls, validateGdsAsset, zodToGdsFormSchema };
|