@doneisbetter/gds-core 2.6.1

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.
@@ -0,0 +1,366 @@
1
+ import {
2
+ GdsIcons,
3
+ GdsVocabulary,
4
+ StateBlock
5
+ } from "./chunk-6B42ANK7.mjs";
6
+
7
+ // src/SemanticButton.tsx
8
+ import { useState, useEffect } from "react";
9
+ import { Button } from "@mantine/core";
10
+ import { useGdsTranslation } from "@doneisbetter/gds-theme";
11
+ import { IconCheck, IconX } from "@tabler/icons-react";
12
+ import { jsx } from "react/jsx-runtime";
13
+ function SemanticButton({ action, loading, feedbackState, feedbackText, ...props }) {
14
+ const { t } = useGdsTranslation();
15
+ const config = GdsVocabulary[action];
16
+ const [internalFeedback, setInternalFeedback] = useState(null);
17
+ useEffect(() => {
18
+ if (feedbackState) {
19
+ setInternalFeedback(feedbackState);
20
+ const timer = setTimeout(() => setInternalFeedback(null), 2e3);
21
+ return () => clearTimeout(timer);
22
+ }
23
+ }, [feedbackState]);
24
+ let Icon = config.icon;
25
+ let label = t(config.id, config.defaultMessage);
26
+ let color = props.color;
27
+ if (internalFeedback === "success") {
28
+ const defaultFeedback = "feedback" in config && config.feedback ? config.feedback : { icon: IconCheck, color: "teal", messageId: "gds.feedback.saved" };
29
+ Icon = defaultFeedback.icon;
30
+ label = feedbackText || t(defaultFeedback.messageId, "Success");
31
+ color = defaultFeedback.color;
32
+ } else if (internalFeedback === "error") {
33
+ Icon = IconX;
34
+ label = feedbackText || t("gds.feedback.error", "Something went wrong");
35
+ color = "red";
36
+ }
37
+ return /* @__PURE__ */ jsx(
38
+ Button,
39
+ {
40
+ leftSection: /* @__PURE__ */ jsx(Icon, { size: "1rem" }),
41
+ loading,
42
+ color,
43
+ ...props,
44
+ children: label
45
+ }
46
+ );
47
+ }
48
+
49
+ // src/ConfirmDialog.tsx
50
+ import { Modal, Group, Text } from "@mantine/core";
51
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
52
+ function ConfirmDialog({
53
+ opened,
54
+ onClose,
55
+ onConfirm,
56
+ title,
57
+ children,
58
+ confirmAction = "confirm",
59
+ cancelAction = "cancel",
60
+ isDanger = true,
61
+ loading = false
62
+ }) {
63
+ return /* @__PURE__ */ jsxs(Modal, { opened, onClose, title, centered: true, trapFocus: true, children: [
64
+ /* @__PURE__ */ jsx2(Text, { size: "sm", mb: "xl", children }),
65
+ /* @__PURE__ */ jsxs(Group, { justify: "flex-end", children: [
66
+ /* @__PURE__ */ jsx2(SemanticButton, { action: cancelAction, variant: "default", onClick: onClose, disabled: loading }),
67
+ /* @__PURE__ */ jsx2(SemanticButton, { action: confirmAction, color: isDanger ? "red" : "violet", onClick: onConfirm, loading })
68
+ ] })
69
+ ] });
70
+ }
71
+
72
+ // src/ThemeToggle.tsx
73
+ import { ActionIcon, useMantineColorScheme, useComputedColorScheme } from "@mantine/core";
74
+ import { useGdsTranslation as useGdsTranslation2 } from "@doneisbetter/gds-theme";
75
+ import { jsx as jsx3 } from "react/jsx-runtime";
76
+ function ThemeToggle({ size = "md" }) {
77
+ const { setColorScheme } = useMantineColorScheme();
78
+ const computedColorScheme = useComputedColorScheme("light", { getInitialValueInEffect: true });
79
+ const { t } = useGdsTranslation2();
80
+ const toggleColorScheme = () => {
81
+ setColorScheme(computedColorScheme === "dark" ? "light" : "dark");
82
+ };
83
+ const isDark = computedColorScheme === "dark";
84
+ return /* @__PURE__ */ jsx3(
85
+ ActionIcon,
86
+ {
87
+ onClick: toggleColorScheme,
88
+ variant: "default",
89
+ size,
90
+ "aria-label": t("gds.aria.themeToggle", "Toggle color scheme"),
91
+ children: isDark ? /* @__PURE__ */ jsx3(GdsIcons.Sun, { size: "1.2rem" }) : /* @__PURE__ */ jsx3(GdsIcons.Moon, { size: "1.2rem" })
92
+ }
93
+ );
94
+ }
95
+
96
+ // src/GameBoardTile.tsx
97
+ import { Center, Paper, Text as Text2, UnstyledButton, useMantineTheme } from "@mantine/core";
98
+ import { useMediaQuery } from "@mantine/hooks";
99
+ import { jsx as jsx4 } from "react/jsx-runtime";
100
+ function GameBoardTile({
101
+ face,
102
+ revealed,
103
+ matched,
104
+ disabled,
105
+ onPress,
106
+ highlightColor
107
+ }) {
108
+ const theme = useMantineTheme();
109
+ const reduceMotion = useMediaQuery("(prefers-reduced-motion: reduce)");
110
+ const highlighted = revealed && !matched;
111
+ const revealBg = highlightColor ?? (typeof theme.primaryColor === "string" ? `${theme.primaryColor}.5` : "violet.5");
112
+ return /* @__PURE__ */ jsx4(UnstyledButton, { w: "100%", disabled, onClick: onPress, "aria-pressed": revealed, children: /* @__PURE__ */ jsx4(
113
+ Paper,
114
+ {
115
+ withBorder: true,
116
+ radius: "md",
117
+ p: "md",
118
+ bg: revealed ? revealBg : "dark.6",
119
+ styles: {
120
+ root: {
121
+ aspectRatio: "1",
122
+ opacity: matched ? 0.55 : 1,
123
+ cursor: disabled ? "not-allowed" : "pointer",
124
+ transition: reduceMotion ? "opacity 0.2s ease" : "transform 0.25s ease, background-color 0.25s ease, opacity 0.25s ease",
125
+ transform: reduceMotion || !highlighted ? "scale(1)" : "scale(1.02)"
126
+ }
127
+ },
128
+ children: /* @__PURE__ */ jsx4(Center, { h: "100%", children: /* @__PURE__ */ jsx4(Text2, { size: "xl", fw: 700, children: face }) })
129
+ }
130
+ ) });
131
+ }
132
+
133
+ // src/DocsCodeBlock.tsx
134
+ import { useState as useState2 } from "react";
135
+ import { ActionIcon as ActionIcon2, Code, Group as Group2, Paper as Paper2, Stack, Text as Text3 } from "@mantine/core";
136
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
137
+ function DocsCodeBlock({ code, language, title, withCopy = true }) {
138
+ const [copied, setCopied] = useState2(false);
139
+ const handleCopy = async () => {
140
+ if (!navigator?.clipboard) {
141
+ return;
142
+ }
143
+ await navigator.clipboard.writeText(code);
144
+ setCopied(true);
145
+ window.setTimeout(() => setCopied(false), 1200);
146
+ };
147
+ return /* @__PURE__ */ jsx5(Paper2, { withBorder: true, radius: "lg", p: "md", children: /* @__PURE__ */ jsxs2(Stack, { gap: "sm", children: [
148
+ title || withCopy ? /* @__PURE__ */ jsxs2(Group2, { justify: "space-between", align: "center", children: [
149
+ /* @__PURE__ */ jsxs2(Stack, { gap: 0, children: [
150
+ title ? /* @__PURE__ */ jsx5(Text3, { fw: 600, children: title }) : null,
151
+ language ? /* @__PURE__ */ jsx5(Text3, { size: "xs", c: "dimmed", children: language }) : null
152
+ ] }),
153
+ withCopy ? /* @__PURE__ */ jsx5(
154
+ ActionIcon2,
155
+ {
156
+ variant: "subtle",
157
+ "aria-label": copied ? "Copied code block" : "Copy code block",
158
+ onClick: () => {
159
+ void handleCopy();
160
+ },
161
+ children: /* @__PURE__ */ jsx5(GdsIcons.Copy, { size: "1rem" })
162
+ }
163
+ ) : null
164
+ ] }) : null,
165
+ /* @__PURE__ */ jsx5(Code, { block: true, children: code })
166
+ ] }) });
167
+ }
168
+
169
+ // src/UploadDropzone.tsx
170
+ import { useRef, useState as useState3 } from "react";
171
+ import { Box, Button as Button2, Group as Group3, Stack as Stack2, Text as Text4 } from "@mantine/core";
172
+ import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
173
+ function UploadDropzone({
174
+ title,
175
+ description,
176
+ onFilesSelected,
177
+ accept,
178
+ multiple = true,
179
+ actionLabel = "Choose files",
180
+ mode = "panel"
181
+ }) {
182
+ const inputRef = useRef(null);
183
+ const [dragging, setDragging] = useState3(false);
184
+ const UploadIcon = GdsIcons.Upload;
185
+ const forwardFiles = (files) => {
186
+ if (!files?.length || !onFilesSelected) {
187
+ return;
188
+ }
189
+ onFilesSelected(Array.from(files));
190
+ };
191
+ return /* @__PURE__ */ jsxs3(
192
+ Box,
193
+ {
194
+ onDragOver: (event) => {
195
+ event.preventDefault();
196
+ setDragging(true);
197
+ },
198
+ onDragLeave: () => setDragging(false),
199
+ onDrop: (event) => {
200
+ event.preventDefault();
201
+ setDragging(false);
202
+ forwardFiles(event.dataTransfer.files);
203
+ },
204
+ p: mode === "inline" ? "md" : "xl",
205
+ style: {
206
+ border: `1px dashed var(${dragging ? "--mantine-color-violet-6" : "--mantine-color-default-border"})`,
207
+ borderRadius: "var(--mantine-radius-lg)",
208
+ background: dragging ? "var(--mantine-color-violet-light)" : "transparent"
209
+ },
210
+ children: [
211
+ /* @__PURE__ */ jsx6(
212
+ "input",
213
+ {
214
+ ref: inputRef,
215
+ type: "file",
216
+ hidden: true,
217
+ accept,
218
+ multiple,
219
+ onChange: (event) => forwardFiles(event.currentTarget.files)
220
+ }
221
+ ),
222
+ /* @__PURE__ */ jsxs3(Stack2, { align: mode === "inline" ? "flex-start" : "center", ta: mode === "inline" ? "left" : "center", gap: "sm", children: [
223
+ /* @__PURE__ */ jsx6(UploadIcon, { size: "1.5rem" }),
224
+ /* @__PURE__ */ jsx6(Text4, { fw: 600, children: title }),
225
+ description ? /* @__PURE__ */ jsx6(Text4, { size: "sm", c: "dimmed", children: description }) : null,
226
+ /* @__PURE__ */ jsx6(Group3, { children: /* @__PURE__ */ jsx6(Button2, { variant: "light", onClick: () => inputRef.current?.click(), children: actionLabel }) })
227
+ ] })
228
+ ]
229
+ }
230
+ );
231
+ }
232
+
233
+ // src/AccessRecoveryPanel.tsx
234
+ import { Group as Group4 } from "@mantine/core";
235
+ import { useGdsTranslation as useGdsTranslation3 } from "@doneisbetter/gds-theme";
236
+ import { jsx as jsx7 } from "react/jsx-runtime";
237
+ var stateBlockVariantByState = {
238
+ unauthenticated: "permission",
239
+ "expired-session": "info",
240
+ forbidden: "permission",
241
+ missing: "error",
242
+ unavailable: "error"
243
+ };
244
+ var defaultCopyByState = {
245
+ unauthenticated: {
246
+ title: "Sign in required",
247
+ description: "Please sign in to continue to this content."
248
+ },
249
+ "expired-session": {
250
+ title: "Session expired",
251
+ description: "Sign in again or retry to continue where you left off."
252
+ },
253
+ forbidden: {
254
+ title: "You do not have access",
255
+ description: "This content is outside your current permissions or scope."
256
+ },
257
+ missing: {
258
+ title: "Content not found",
259
+ description: "The resource may have moved, been deleted, or never existed in this scope."
260
+ },
261
+ unavailable: {
262
+ title: "Content is temporarily unavailable",
263
+ description: "Try again in a moment or return to a safe destination."
264
+ }
265
+ };
266
+ function defaultActionsForState(state, {
267
+ onRetry,
268
+ onSignIn,
269
+ onBack,
270
+ supportAction
271
+ }) {
272
+ const signInAction = onSignIn ? { action: "login", onClick: onSignIn } : null;
273
+ const retryAction = onRetry ? { action: "refresh", onClick: onRetry, variant: "light" } : null;
274
+ const backAction = onBack ? { action: "back", onClick: onBack, variant: "default" } : null;
275
+ switch (state) {
276
+ case "unauthenticated":
277
+ return { primary: signInAction, secondary: backAction, tertiary: supportAction ?? null };
278
+ case "expired-session":
279
+ return {
280
+ primary: signInAction ?? retryAction,
281
+ secondary: retryAction && signInAction ? retryAction : backAction,
282
+ tertiary: supportAction ?? null
283
+ };
284
+ case "forbidden":
285
+ return { primary: backAction, secondary: supportAction ?? null, tertiary: null };
286
+ case "missing":
287
+ return { primary: backAction, secondary: supportAction ?? null, tertiary: null };
288
+ case "unavailable":
289
+ return {
290
+ primary: retryAction ?? backAction,
291
+ secondary: retryAction && backAction ? backAction : supportAction ?? null,
292
+ tertiary: retryAction && backAction ? supportAction ?? null : null
293
+ };
294
+ }
295
+ }
296
+ function ActionGroup({
297
+ primaryAction,
298
+ secondaryAction,
299
+ tertiaryAction
300
+ }) {
301
+ const actions = [primaryAction, secondaryAction, tertiaryAction].filter(Boolean);
302
+ if (actions.length === 0) {
303
+ return null;
304
+ }
305
+ return /* @__PURE__ */ jsx7(Group4, { gap: "sm", justify: "center", wrap: "wrap", children: actions.map((actionConfig, index) => /* @__PURE__ */ jsx7(
306
+ SemanticButton,
307
+ {
308
+ action: actionConfig.action,
309
+ onClick: actionConfig.onClick,
310
+ loading: actionConfig.loading,
311
+ disabled: actionConfig.disabled,
312
+ color: actionConfig.color,
313
+ variant: actionConfig.variant ?? (index === 0 ? "filled" : "default")
314
+ },
315
+ `${actionConfig.action}-${index}`
316
+ )) });
317
+ }
318
+ function AccessRecoveryPanel({
319
+ state,
320
+ title,
321
+ description,
322
+ primaryAction,
323
+ secondaryAction,
324
+ tertiaryAction,
325
+ onRetry,
326
+ onSignIn,
327
+ onBack,
328
+ supportAction,
329
+ compact = false
330
+ }) {
331
+ const { t } = useGdsTranslation3();
332
+ const defaultCopy = defaultCopyByState[state];
333
+ const defaults = defaultActionsForState(state, {
334
+ onRetry,
335
+ onSignIn,
336
+ onBack,
337
+ supportAction
338
+ });
339
+ return /* @__PURE__ */ jsx7(
340
+ StateBlock,
341
+ {
342
+ variant: stateBlockVariantByState[state],
343
+ compact,
344
+ title: title ?? t(`gds.accessRecovery.${state}.title`, defaultCopy.title),
345
+ description: description ?? t(`gds.accessRecovery.${state}.description`, defaultCopy.description),
346
+ action: /* @__PURE__ */ jsx7(
347
+ ActionGroup,
348
+ {
349
+ primaryAction: primaryAction ?? defaults.primary,
350
+ secondaryAction: secondaryAction ?? defaults.secondary,
351
+ tertiaryAction: tertiaryAction ?? defaults.tertiary
352
+ }
353
+ )
354
+ }
355
+ );
356
+ }
357
+
358
+ export {
359
+ SemanticButton,
360
+ ConfirmDialog,
361
+ ThemeToggle,
362
+ GameBoardTile,
363
+ DocsCodeBlock,
364
+ UploadDropzone,
365
+ AccessRecoveryPanel
366
+ };
@@ -0,0 +1,103 @@
1
+ import { SemanticAction } from './server.mjs';
2
+ export { AccentPanel, AccentPanelProps, AccentPanelVariant, AccentTone, AccessSummary, AccessSummaryProps, ArticleShell, ArticleShellProps, AuthShell, AuthShellProps, BreadcrumbItem, BrowseSurface, BrowseSurfaceFilterChip, BrowseSurfaceProps, BrowseSurfaceScopeOption, ConsumerDashboardGrid, ConsumerDashboardGridProps, ConsumerSection, ConsumerSectionProps, CtaButtonGroup, CtaButtonGroupProps, DataToolbar, DataToolbarFilterChip, DataToolbarProps, DocsPageShell, DocsPageShellProps, EditorialCard, EditorialCardProps, EditorialHero, EditorialHeroAction, EditorialHeroMetaItem, EditorialHeroProps, EmptyState, EmptyStateProps, FeatureBand, FeatureBandItem, FeatureBandProps, FilterDrawer, FilterDrawerMode, FilterDrawerProps, FormField, FormFieldProps, GdsIcons, GdsLocale, GdsVocabulary, MediaCard, MediaCardAction, MediaCardProps, MediaField, MediaFieldProps, MetricCard, MetricCardProps, PageHeader, PageHeaderEyebrowVariant, PageHeaderProps, PlaceholderPanel, PlaceholderPanelProps, ProductCard, ProductCardAction, ProductCardMetaItem, ProductCardProps, ProgressCard, ProgressCardProps, PublicBrandFooter, PublicBrandFooterClassNames, PublicBrandFooterLayoutVariant, PublicBrandFooterProps, PublicNav, PublicNavItem, PublicNavProps, PublicProductCard, PublicProductCardHelperKind, PublicProductCardMetaItem, PublicProductCardProps, PublicProductCardState, PublicShell, PublicShellClassNames, PublicShellHeaderVariant, PublicShellMobileNavigationMode, PublicShellProps, PublicSiteFooter, PublicSiteFooterProps, SectionPanel, SectionPanelProps, SectionPanelTone, SimpleDataTable, SimpleDataTableProps, SimpleTableColumn, StateBlock, StateBlockProps, StateBlockVariant, StatsSection, StatsSectionProps, StatusBadge, StatusBadgeProps, StatusVariant, ar, de, en, es, fr, gdsLocales, getGdsMessages, he, hu, it, resolveAccentPanelStyles, ru } from './server.mjs';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import react__default, { ReactNode } from 'react';
5
+ import { ButtonProps, MantineColor } from '@mantine/core';
6
+ import '@tabler/icons-react';
7
+
8
+ interface ConfirmDialogProps {
9
+ opened: boolean;
10
+ onClose: () => void;
11
+ onConfirm: () => void;
12
+ title: string;
13
+ children: ReactNode;
14
+ confirmAction?: SemanticAction;
15
+ cancelAction?: SemanticAction;
16
+ isDanger?: boolean;
17
+ loading?: boolean;
18
+ }
19
+ /**
20
+ * Standardized destructive/confirmation dialog.
21
+ */
22
+ declare function ConfirmDialog({ opened, onClose, onConfirm, title, children, confirmAction, cancelAction, isDanger, loading, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
23
+
24
+ interface ThemeToggleProps {
25
+ size?: 'sm' | 'md' | 'lg' | 'xl';
26
+ }
27
+ /**
28
+ * Standardized ThemeToggle component for switching between Light and Dark mode.
29
+ * Should be placed in the main application header/shell.
30
+ */
31
+ declare function ThemeToggle({ size }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
32
+
33
+ interface SemanticButtonProps extends ButtonProps, Omit<react__default.ComponentPropsWithoutRef<'button'>, keyof ButtonProps | 'leftSection' | 'children'> {
34
+ action: SemanticAction;
35
+ loading?: boolean;
36
+ feedbackState?: 'success' | 'error' | null;
37
+ feedbackText?: string;
38
+ }
39
+ /**
40
+ * SemanticButton strictly enforces ubiquitous language and standardized iconography.
41
+ * Developers cannot pass arbitrary text or icons; they must use a semantic action key.
42
+ */
43
+ declare function SemanticButton({ action, loading, feedbackState, feedbackText, ...props }: SemanticButtonProps): react_jsx_runtime.JSX.Element;
44
+
45
+ interface GameBoardTileProps {
46
+ face: ReactNode;
47
+ revealed: boolean;
48
+ matched: boolean;
49
+ disabled: boolean;
50
+ onPress: () => void;
51
+ /** Mantine color token for revealed (non-matched) highlight, e.g. `violet.5` or product primary. */
52
+ highlightColor?: MantineColor;
53
+ }
54
+ /**
55
+ * Governed flip/select tile for memory-match and similar game boards.
56
+ * Respects prefers-reduced-motion; motion is local to the tile, not global theme hover defaults.
57
+ */
58
+ declare function GameBoardTile({ face, revealed, matched, disabled, onPress, highlightColor, }: GameBoardTileProps): react_jsx_runtime.JSX.Element;
59
+
60
+ interface DocsCodeBlockProps {
61
+ code: string;
62
+ language?: string;
63
+ title?: string;
64
+ withCopy?: boolean;
65
+ }
66
+ declare function DocsCodeBlock({ code, language, title, withCopy }: DocsCodeBlockProps): react_jsx_runtime.JSX.Element;
67
+
68
+ interface UploadDropzoneProps {
69
+ title: string;
70
+ description?: string;
71
+ onFilesSelected?: (files: File[]) => void;
72
+ accept?: string;
73
+ multiple?: boolean;
74
+ actionLabel?: string;
75
+ mode?: 'panel' | 'inline';
76
+ }
77
+ declare function UploadDropzone({ title, description, onFilesSelected, accept, multiple, actionLabel, mode, }: UploadDropzoneProps): react_jsx_runtime.JSX.Element;
78
+
79
+ type AccessRecoveryState = 'unauthenticated' | 'expired-session' | 'forbidden' | 'missing' | 'unavailable';
80
+ interface AccessRecoveryAction {
81
+ action: SemanticAction;
82
+ onClick?: () => void;
83
+ loading?: boolean;
84
+ disabled?: boolean;
85
+ color?: string;
86
+ variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default';
87
+ }
88
+ interface AccessRecoveryPanelProps {
89
+ state: AccessRecoveryState;
90
+ title?: string;
91
+ description?: ReactNode;
92
+ primaryAction?: AccessRecoveryAction | null;
93
+ secondaryAction?: AccessRecoveryAction | null;
94
+ tertiaryAction?: AccessRecoveryAction | null;
95
+ onRetry?: () => void;
96
+ onSignIn?: () => void;
97
+ onBack?: () => void;
98
+ supportAction?: AccessRecoveryAction | null;
99
+ compact?: boolean;
100
+ }
101
+ declare function AccessRecoveryPanel({ state, title, description, primaryAction, secondaryAction, tertiaryAction, onRetry, onSignIn, onBack, supportAction, compact, }: AccessRecoveryPanelProps): react_jsx_runtime.JSX.Element;
102
+
103
+ export { type AccessRecoveryAction, AccessRecoveryPanel, type AccessRecoveryPanelProps, type AccessRecoveryState, ConfirmDialog, type ConfirmDialogProps, DocsCodeBlock, type DocsCodeBlockProps, GameBoardTile, type GameBoardTileProps, SemanticAction, SemanticButton, type SemanticButtonProps, ThemeToggle, type ThemeToggleProps, UploadDropzone, type UploadDropzoneProps };
@@ -0,0 +1,103 @@
1
+ import { SemanticAction } from './server.js';
2
+ export { AccentPanel, AccentPanelProps, AccentPanelVariant, AccentTone, AccessSummary, AccessSummaryProps, ArticleShell, ArticleShellProps, AuthShell, AuthShellProps, BreadcrumbItem, BrowseSurface, BrowseSurfaceFilterChip, BrowseSurfaceProps, BrowseSurfaceScopeOption, ConsumerDashboardGrid, ConsumerDashboardGridProps, ConsumerSection, ConsumerSectionProps, CtaButtonGroup, CtaButtonGroupProps, DataToolbar, DataToolbarFilterChip, DataToolbarProps, DocsPageShell, DocsPageShellProps, EditorialCard, EditorialCardProps, EditorialHero, EditorialHeroAction, EditorialHeroMetaItem, EditorialHeroProps, EmptyState, EmptyStateProps, FeatureBand, FeatureBandItem, FeatureBandProps, FilterDrawer, FilterDrawerMode, FilterDrawerProps, FormField, FormFieldProps, GdsIcons, GdsLocale, GdsVocabulary, MediaCard, MediaCardAction, MediaCardProps, MediaField, MediaFieldProps, MetricCard, MetricCardProps, PageHeader, PageHeaderEyebrowVariant, PageHeaderProps, PlaceholderPanel, PlaceholderPanelProps, ProductCard, ProductCardAction, ProductCardMetaItem, ProductCardProps, ProgressCard, ProgressCardProps, PublicBrandFooter, PublicBrandFooterClassNames, PublicBrandFooterLayoutVariant, PublicBrandFooterProps, PublicNav, PublicNavItem, PublicNavProps, PublicProductCard, PublicProductCardHelperKind, PublicProductCardMetaItem, PublicProductCardProps, PublicProductCardState, PublicShell, PublicShellClassNames, PublicShellHeaderVariant, PublicShellMobileNavigationMode, PublicShellProps, PublicSiteFooter, PublicSiteFooterProps, SectionPanel, SectionPanelProps, SectionPanelTone, SimpleDataTable, SimpleDataTableProps, SimpleTableColumn, StateBlock, StateBlockProps, StateBlockVariant, StatsSection, StatsSectionProps, StatusBadge, StatusBadgeProps, StatusVariant, ar, de, en, es, fr, gdsLocales, getGdsMessages, he, hu, it, resolveAccentPanelStyles, ru } from './server.js';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import react__default, { ReactNode } from 'react';
5
+ import { ButtonProps, MantineColor } from '@mantine/core';
6
+ import '@tabler/icons-react';
7
+
8
+ interface ConfirmDialogProps {
9
+ opened: boolean;
10
+ onClose: () => void;
11
+ onConfirm: () => void;
12
+ title: string;
13
+ children: ReactNode;
14
+ confirmAction?: SemanticAction;
15
+ cancelAction?: SemanticAction;
16
+ isDanger?: boolean;
17
+ loading?: boolean;
18
+ }
19
+ /**
20
+ * Standardized destructive/confirmation dialog.
21
+ */
22
+ declare function ConfirmDialog({ opened, onClose, onConfirm, title, children, confirmAction, cancelAction, isDanger, loading, }: ConfirmDialogProps): react_jsx_runtime.JSX.Element;
23
+
24
+ interface ThemeToggleProps {
25
+ size?: 'sm' | 'md' | 'lg' | 'xl';
26
+ }
27
+ /**
28
+ * Standardized ThemeToggle component for switching between Light and Dark mode.
29
+ * Should be placed in the main application header/shell.
30
+ */
31
+ declare function ThemeToggle({ size }: ThemeToggleProps): react_jsx_runtime.JSX.Element;
32
+
33
+ interface SemanticButtonProps extends ButtonProps, Omit<react__default.ComponentPropsWithoutRef<'button'>, keyof ButtonProps | 'leftSection' | 'children'> {
34
+ action: SemanticAction;
35
+ loading?: boolean;
36
+ feedbackState?: 'success' | 'error' | null;
37
+ feedbackText?: string;
38
+ }
39
+ /**
40
+ * SemanticButton strictly enforces ubiquitous language and standardized iconography.
41
+ * Developers cannot pass arbitrary text or icons; they must use a semantic action key.
42
+ */
43
+ declare function SemanticButton({ action, loading, feedbackState, feedbackText, ...props }: SemanticButtonProps): react_jsx_runtime.JSX.Element;
44
+
45
+ interface GameBoardTileProps {
46
+ face: ReactNode;
47
+ revealed: boolean;
48
+ matched: boolean;
49
+ disabled: boolean;
50
+ onPress: () => void;
51
+ /** Mantine color token for revealed (non-matched) highlight, e.g. `violet.5` or product primary. */
52
+ highlightColor?: MantineColor;
53
+ }
54
+ /**
55
+ * Governed flip/select tile for memory-match and similar game boards.
56
+ * Respects prefers-reduced-motion; motion is local to the tile, not global theme hover defaults.
57
+ */
58
+ declare function GameBoardTile({ face, revealed, matched, disabled, onPress, highlightColor, }: GameBoardTileProps): react_jsx_runtime.JSX.Element;
59
+
60
+ interface DocsCodeBlockProps {
61
+ code: string;
62
+ language?: string;
63
+ title?: string;
64
+ withCopy?: boolean;
65
+ }
66
+ declare function DocsCodeBlock({ code, language, title, withCopy }: DocsCodeBlockProps): react_jsx_runtime.JSX.Element;
67
+
68
+ interface UploadDropzoneProps {
69
+ title: string;
70
+ description?: string;
71
+ onFilesSelected?: (files: File[]) => void;
72
+ accept?: string;
73
+ multiple?: boolean;
74
+ actionLabel?: string;
75
+ mode?: 'panel' | 'inline';
76
+ }
77
+ declare function UploadDropzone({ title, description, onFilesSelected, accept, multiple, actionLabel, mode, }: UploadDropzoneProps): react_jsx_runtime.JSX.Element;
78
+
79
+ type AccessRecoveryState = 'unauthenticated' | 'expired-session' | 'forbidden' | 'missing' | 'unavailable';
80
+ interface AccessRecoveryAction {
81
+ action: SemanticAction;
82
+ onClick?: () => void;
83
+ loading?: boolean;
84
+ disabled?: boolean;
85
+ color?: string;
86
+ variant?: 'filled' | 'light' | 'outline' | 'subtle' | 'default';
87
+ }
88
+ interface AccessRecoveryPanelProps {
89
+ state: AccessRecoveryState;
90
+ title?: string;
91
+ description?: ReactNode;
92
+ primaryAction?: AccessRecoveryAction | null;
93
+ secondaryAction?: AccessRecoveryAction | null;
94
+ tertiaryAction?: AccessRecoveryAction | null;
95
+ onRetry?: () => void;
96
+ onSignIn?: () => void;
97
+ onBack?: () => void;
98
+ supportAction?: AccessRecoveryAction | null;
99
+ compact?: boolean;
100
+ }
101
+ declare function AccessRecoveryPanel({ state, title, description, primaryAction, secondaryAction, tertiaryAction, onRetry, onSignIn, onBack, supportAction, compact, }: AccessRecoveryPanelProps): react_jsx_runtime.JSX.Element;
102
+
103
+ export { type AccessRecoveryAction, AccessRecoveryPanel, type AccessRecoveryPanelProps, type AccessRecoveryState, ConfirmDialog, type ConfirmDialogProps, DocsCodeBlock, type DocsCodeBlockProps, GameBoardTile, type GameBoardTileProps, SemanticAction, SemanticButton, type SemanticButtonProps, ThemeToggle, type ThemeToggleProps, UploadDropzone, type UploadDropzoneProps };