@sovereignsquad/gds-core 6.9.0 → 6.10.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/dist/{GdsBadge-DqTdnomt.d.mts → GdsBadge-j_kQnIL0.d.mts} +1 -1
- package/dist/{GdsBadge-DqTdnomt.d.ts → GdsBadge-j_kQnIL0.d.ts} +1 -1
- package/dist/{PartnerDiscovery-Bwxixtka.d.mts → PartnerDiscovery-Dy3YnO02.d.mts} +15 -8
- package/dist/{PartnerDiscovery-As_-JKtb.d.ts → PartnerDiscovery-pdJmaKwq.d.ts} +15 -8
- package/dist/{QuickStartCard-Bgjdfs_t.d.ts → QuickStartCard-BqbYrKRY.d.ts} +1034 -90
- package/dist/{QuickStartCard-DnZMDjzb.d.mts → QuickStartCard-lE9kMqH8.d.mts} +1034 -90
- package/dist/{chunk-KEYBUMOR.mjs → chunk-7NNKXZFF.mjs} +29 -4
- package/dist/{chunk-IMT3UTOT.mjs → chunk-CWMDWMYL.mjs} +28 -3
- package/dist/{chunk-BD5XQH5Z.mjs → chunk-D65VHUXK.mjs} +28 -3
- package/dist/{chunk-MKEWYVTJ.mjs → chunk-J4TSXITU.mjs} +30 -5
- package/dist/{chunk-3B5MK2PG.mjs → chunk-LTNPECWV.mjs} +959 -632
- package/dist/{chunk-5G3XZWSW.mjs → chunk-MO5TLIIB.mjs} +1039 -1605
- package/dist/{chunk-WI24JME4.mjs → chunk-PCG34VRY.mjs} +12 -1
- package/dist/{chunk-EQ7Y2PUI.mjs → chunk-PJR3OJJD.mjs} +811 -185
- package/dist/{chunk-F76YTG3S.mjs → chunk-PLJT4I7B.mjs} +84 -59
- package/dist/{chunk-KLFTBWEG.mjs → chunk-RBXAJJB2.mjs} +29 -4
- package/dist/{chunk-HJVDKPVW.mjs → chunk-SV3VL3GG.mjs} +3 -2
- package/dist/{chunk-KNP35WAB.mjs → chunk-TD3JPMMO.mjs} +1 -1
- package/dist/{chunk-5GH7XD7X.mjs → chunk-TVGDH5O5.mjs} +29 -4
- package/dist/{chunk-OH5HH4G3.mjs → chunk-V5WUGRFL.mjs} +29 -4
- package/dist/{chunk-DBJE4TRO.mjs → chunk-V6SP5O4D.mjs} +66 -41
- package/dist/{chunk-A32PWTD2.mjs → chunk-XL7MGQJ4.mjs} +28 -3
- package/dist/{chunk-LERXSJHD.mjs → chunk-YASVRGKJ.mjs} +30 -5
- package/dist/{chunk-6WDH57MJ.mjs → chunk-Z6XXK57E.mjs} +28 -3
- package/dist/client.d.mts +123 -8
- package/dist/client.d.ts +123 -8
- package/dist/client.js +2495 -1810
- package/dist/client.mjs +41 -29
- package/dist/{en-D9CWSH3F.d.ts → en-CzuiMnTG.d.mts} +27 -2
- package/dist/{en-D9CWSH3F.d.mts → en-CzuiMnTG.d.ts} +27 -2
- package/dist/index.d.mts +24 -22
- package/dist/index.d.ts +24 -22
- package/dist/index.js +3867 -3066
- package/dist/index.mjs +182 -61
- package/dist/locales/lazy/all.js +438 -138
- package/dist/locales/lazy/all.mjs +13 -13
- package/dist/locales/lazy/ar.js +57 -7
- package/dist/locales/lazy/ar.mjs +3 -3
- package/dist/locales/lazy/de.js +57 -7
- package/dist/locales/lazy/de.mjs +3 -3
- package/dist/locales/lazy/es.js +58 -8
- package/dist/locales/lazy/es.mjs +3 -3
- package/dist/locales/lazy/fr.js +56 -6
- package/dist/locales/lazy/fr.mjs +3 -3
- package/dist/locales/lazy/he.js +58 -8
- package/dist/locales/lazy/he.mjs +3 -3
- package/dist/locales/lazy/hu.js +56 -6
- package/dist/locales/lazy/hu.mjs +3 -3
- package/dist/locales/lazy/index.d.mts +1 -1
- package/dist/locales/lazy/index.d.ts +1 -1
- package/dist/locales/lazy/index.js +28 -3
- package/dist/locales/lazy/index.mjs +2 -2
- package/dist/locales/lazy/it.js +57 -7
- package/dist/locales/lazy/it.mjs +3 -3
- package/dist/locales/lazy/ja.js +56 -6
- package/dist/locales/lazy/ja.mjs +3 -3
- package/dist/locales/lazy/ko.js +112 -62
- package/dist/locales/lazy/ko.mjs +3 -3
- package/dist/locales/lazy/ru.js +57 -7
- package/dist/locales/lazy/ru.mjs +3 -3
- package/dist/locales/lazy/zh.js +94 -44
- package/dist/locales/lazy/zh.mjs +3 -3
- package/dist/map.d.mts +1 -1
- package/dist/map.d.ts +1 -1
- package/dist/reference-theme-explorer.d.mts +3 -1
- package/dist/reference-theme-explorer.d.ts +3 -1
- package/dist/reference-theme-explorer.js +1458 -526
- package/dist/reference-theme-explorer.mjs +57 -37
- package/dist/server.d.mts +6 -6
- package/dist/server.d.ts +6 -6
- package/dist/server.js +1261 -892
- package/dist/server.mjs +31 -29
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -7,13 +7,17 @@ import {
|
|
|
7
7
|
ConfirmDialog,
|
|
8
8
|
DiscoveryShell,
|
|
9
9
|
DocsCodeBlock,
|
|
10
|
+
DocsCodeDisclosure,
|
|
10
11
|
DocsHeaderActionSelect,
|
|
11
12
|
DocsShell,
|
|
12
13
|
FileUploadField,
|
|
13
14
|
FormErrorSummary,
|
|
15
|
+
GDS_BUTTON_CONFIRM_WINDOW_MS,
|
|
14
16
|
GDS_BUTTON_FEEDBACK_DURATION_MS,
|
|
15
17
|
GDS_BUTTON_GRADIENT_TEXT_FLOOR,
|
|
16
18
|
GDS_BUTTON_OUTLINE_ACCENT_STROKE_PX,
|
|
19
|
+
GDS_BUTTON_PENDING_DELAY_MS,
|
|
20
|
+
GDS_BUTTON_PENDING_MIN_MS,
|
|
17
21
|
GDS_HERO_SEARCH_FIELD_FLEX_BASIS_PX,
|
|
18
22
|
GDS_HERO_SEARCH_FIELD_MIN_WIDTH_PX,
|
|
19
23
|
GameBoardTile,
|
|
@@ -37,11 +41,13 @@ import {
|
|
|
37
41
|
GdsModal,
|
|
38
42
|
GdsNotificationCenter,
|
|
39
43
|
GdsNotificationProvider,
|
|
44
|
+
GdsReleaseNotes,
|
|
40
45
|
GdsResourceManager,
|
|
41
46
|
GdsSchemaForm,
|
|
42
47
|
GdsShapeScope,
|
|
43
48
|
GdsSheet,
|
|
44
49
|
GdsSidePanel,
|
|
50
|
+
GdsTableScrollContainer,
|
|
45
51
|
GdsTelemetryProvider,
|
|
46
52
|
GdsThreadList,
|
|
47
53
|
GdsToastProvider,
|
|
@@ -118,7 +124,7 @@ import {
|
|
|
118
124
|
usePlaybackKeyboardControls,
|
|
119
125
|
validateGdsAsset,
|
|
120
126
|
zodToGdsFormSchema
|
|
121
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-LTNPECWV.mjs";
|
|
122
128
|
import {
|
|
123
129
|
GdsInlineLink
|
|
124
130
|
} from "./chunk-W5O2JSVK.mjs";
|
|
@@ -126,7 +132,7 @@ import {
|
|
|
126
132
|
GdsAccentContrastMatrix,
|
|
127
133
|
GdsDesignRuleProfilePanel,
|
|
128
134
|
GdsGeneratedMark
|
|
129
|
-
} from "./chunk-
|
|
135
|
+
} from "./chunk-SV3VL3GG.mjs";
|
|
130
136
|
import {
|
|
131
137
|
ThemeToggle
|
|
132
138
|
} from "./chunk-ZFGYQSNR.mjs";
|
|
@@ -154,11 +160,12 @@ import {
|
|
|
154
160
|
filterPartnerPlaces,
|
|
155
161
|
partnerDiscoveryDefaultAmenities,
|
|
156
162
|
partnerDiscoveryDefaultFilterState,
|
|
163
|
+
partnerDiscoveryFamilyAmenities,
|
|
157
164
|
redactPartnerDiscoveryEventMetadata,
|
|
158
165
|
resetPartnerDiscoveryFilters,
|
|
159
166
|
togglePartnerAmenity,
|
|
160
167
|
togglePartnerPrice
|
|
161
|
-
} from "./chunk-
|
|
168
|
+
} from "./chunk-PCG34VRY.mjs";
|
|
162
169
|
import {
|
|
163
170
|
AISearchCard,
|
|
164
171
|
AccentPanel,
|
|
@@ -225,18 +232,12 @@ import {
|
|
|
225
232
|
GdsAreaChart,
|
|
226
233
|
GdsBarChart,
|
|
227
234
|
GdsBenchmarkBarChart,
|
|
228
|
-
GdsBleed,
|
|
229
|
-
GdsBox,
|
|
230
235
|
GdsBreadcrumbs,
|
|
231
236
|
GdsCalendarHeatmapChart,
|
|
232
237
|
GdsChartAxis,
|
|
233
238
|
GdsChartLegend,
|
|
234
239
|
GdsChartTooltip,
|
|
235
|
-
GdsCluster,
|
|
236
|
-
GdsColumnGrid,
|
|
237
|
-
GdsColumnGridItem,
|
|
238
240
|
GdsCompareButton,
|
|
239
|
-
GdsContainer,
|
|
240
241
|
GdsContentPatternCatalog,
|
|
241
242
|
GdsCountBadge,
|
|
242
243
|
GdsCrudEditorTemplate,
|
|
@@ -249,9 +250,7 @@ import {
|
|
|
249
250
|
GdsFormattedDate,
|
|
250
251
|
GdsFormattedNumber,
|
|
251
252
|
GdsGaugeChart,
|
|
252
|
-
GdsGrid,
|
|
253
253
|
GdsHistogramChart,
|
|
254
|
-
GdsInline,
|
|
255
254
|
GdsLineChart,
|
|
256
255
|
GdsLocaleText,
|
|
257
256
|
GdsLogoLockup,
|
|
@@ -276,12 +275,9 @@ import {
|
|
|
276
275
|
GdsSafeBox,
|
|
277
276
|
GdsSegmentedControl,
|
|
278
277
|
GdsSettingsTemplate,
|
|
279
|
-
GdsSidebar,
|
|
280
278
|
GdsSlider,
|
|
281
279
|
GdsSlopeChart,
|
|
282
280
|
GdsSparkline,
|
|
283
|
-
GdsSplit,
|
|
284
|
-
GdsStack,
|
|
285
281
|
GdsStackedBarChart,
|
|
286
282
|
GdsSymmetryChart,
|
|
287
283
|
GdsWizardStepper,
|
|
@@ -342,7 +338,6 @@ import {
|
|
|
342
338
|
SearchableSelect,
|
|
343
339
|
SectionTitle,
|
|
344
340
|
Select,
|
|
345
|
-
SemanticChartFrame,
|
|
346
341
|
SemanticInset,
|
|
347
342
|
SimpleGrid,
|
|
348
343
|
Slider,
|
|
@@ -412,7 +407,6 @@ import {
|
|
|
412
407
|
getProviderIdentityPolicy,
|
|
413
408
|
getSupportedProviderIdentityIds,
|
|
414
409
|
isGdsActivityPictogramKey,
|
|
415
|
-
normalizeGdsResponsiveValue,
|
|
416
410
|
redactGdsAccessGateMetadata,
|
|
417
411
|
registerGdsBlock,
|
|
418
412
|
renderGdsCopyTemplate,
|
|
@@ -422,7 +416,6 @@ import {
|
|
|
422
416
|
resolveGdsAccessAdapterState,
|
|
423
417
|
resolveGdsAccessState,
|
|
424
418
|
resolveGdsActivityPictogramLabel,
|
|
425
|
-
resolveGdsLayoutStyle,
|
|
426
419
|
resolveGdsLocale,
|
|
427
420
|
resolveGdsMessage,
|
|
428
421
|
sortGdsAccessGateActions,
|
|
@@ -437,7 +430,7 @@ import {
|
|
|
437
430
|
validateGdsLayout,
|
|
438
431
|
validateGdsPageTemplates,
|
|
439
432
|
validateGdsTaskPatterns
|
|
440
|
-
} from "./chunk-
|
|
433
|
+
} from "./chunk-MO5TLIIB.mjs";
|
|
441
434
|
import {
|
|
442
435
|
GDS_PIN_APPROXIMATE_DASH,
|
|
443
436
|
GDS_PIN_EMOJI_SCALE,
|
|
@@ -461,13 +454,25 @@ import {
|
|
|
461
454
|
GDS_LISTING_PICK_BADGE_PADDING_INLINE_PX,
|
|
462
455
|
GDS_LISTING_TILE_SIZE_PX,
|
|
463
456
|
GdsBadge,
|
|
457
|
+
GdsBleed,
|
|
458
|
+
GdsBox,
|
|
464
459
|
GdsChart,
|
|
460
|
+
GdsCluster,
|
|
461
|
+
GdsColumnGrid,
|
|
462
|
+
GdsColumnGridItem,
|
|
463
|
+
GdsContainer,
|
|
465
464
|
GdsGeneratedThumbnail,
|
|
465
|
+
GdsGrid,
|
|
466
|
+
GdsInline,
|
|
467
|
+
GdsSidebar,
|
|
468
|
+
GdsSplit,
|
|
469
|
+
GdsStack,
|
|
466
470
|
GdsVocabulary,
|
|
467
471
|
ListingCard,
|
|
468
472
|
MAX_LISTING_CARD_ACTIONS,
|
|
469
473
|
ReferenceSection,
|
|
470
474
|
SectionPanel,
|
|
475
|
+
SemanticChartFrame,
|
|
471
476
|
SimpleDataTable,
|
|
472
477
|
createGdsOwnedContrastTokens,
|
|
473
478
|
createGdsVocabularyPack,
|
|
@@ -497,12 +502,14 @@ import {
|
|
|
497
502
|
isGdsChartSetBType,
|
|
498
503
|
isGdsChartSetCType,
|
|
499
504
|
mergeGdsVocabularyPacks,
|
|
505
|
+
normalizeGdsResponsiveValue,
|
|
500
506
|
resolveGdsCardContract,
|
|
501
507
|
resolveGdsChartTokenColor,
|
|
502
508
|
resolveGdsGeneratedPaletteHex,
|
|
509
|
+
resolveGdsLayoutStyle,
|
|
503
510
|
resolveSemanticActionConfig,
|
|
504
511
|
validateGdsChartData
|
|
505
|
-
} from "./chunk-
|
|
512
|
+
} from "./chunk-PJR3OJJD.mjs";
|
|
506
513
|
import {
|
|
507
514
|
GDS_PIN_SILHOUETTE_PATH,
|
|
508
515
|
GdsBadgeShapeCircle,
|
|
@@ -531,40 +538,40 @@ import {
|
|
|
531
538
|
} from "./chunk-J66ITCXC.mjs";
|
|
532
539
|
import {
|
|
533
540
|
ko
|
|
534
|
-
} from "./chunk-
|
|
541
|
+
} from "./chunk-PLJT4I7B.mjs";
|
|
535
542
|
import {
|
|
536
543
|
ru
|
|
537
|
-
} from "./chunk-
|
|
544
|
+
} from "./chunk-RBXAJJB2.mjs";
|
|
538
545
|
import {
|
|
539
546
|
zh
|
|
540
|
-
} from "./chunk-
|
|
547
|
+
} from "./chunk-V6SP5O4D.mjs";
|
|
541
548
|
import {
|
|
542
549
|
de
|
|
543
|
-
} from "./chunk-
|
|
550
|
+
} from "./chunk-TVGDH5O5.mjs";
|
|
544
551
|
import {
|
|
545
552
|
es
|
|
546
|
-
} from "./chunk-
|
|
553
|
+
} from "./chunk-J4TSXITU.mjs";
|
|
547
554
|
import {
|
|
548
555
|
fr
|
|
549
|
-
} from "./chunk-
|
|
556
|
+
} from "./chunk-Z6XXK57E.mjs";
|
|
550
557
|
import {
|
|
551
558
|
he
|
|
552
|
-
} from "./chunk-
|
|
559
|
+
} from "./chunk-YASVRGKJ.mjs";
|
|
553
560
|
import {
|
|
554
561
|
hu
|
|
555
|
-
} from "./chunk-
|
|
562
|
+
} from "./chunk-CWMDWMYL.mjs";
|
|
556
563
|
import {
|
|
557
564
|
it
|
|
558
|
-
} from "./chunk-
|
|
565
|
+
} from "./chunk-V5WUGRFL.mjs";
|
|
559
566
|
import {
|
|
560
567
|
ja
|
|
561
|
-
} from "./chunk-
|
|
568
|
+
} from "./chunk-XL7MGQJ4.mjs";
|
|
562
569
|
import {
|
|
563
570
|
ar
|
|
564
|
-
} from "./chunk-
|
|
571
|
+
} from "./chunk-7NNKXZFF.mjs";
|
|
565
572
|
import {
|
|
566
573
|
en
|
|
567
|
-
} from "./chunk-
|
|
574
|
+
} from "./chunk-D65VHUXK.mjs";
|
|
568
575
|
|
|
569
576
|
// src/GdsPinSystemReference.tsx
|
|
570
577
|
import { useMemo } from "react";
|
|
@@ -574,7 +581,8 @@ import {
|
|
|
574
581
|
getGdsContrastRatio,
|
|
575
582
|
getGdsVibeThemeCssVariables,
|
|
576
583
|
resolveGdsAccentTokens,
|
|
577
|
-
useGdsAmbientTheme
|
|
584
|
+
useGdsAmbientTheme,
|
|
585
|
+
useGdsTranslation
|
|
578
586
|
} from "@sovereignsquad/gds-theme";
|
|
579
587
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
580
588
|
var DEFAULT_ACCENTS = ["ocean", "teal", "grape", "forest"];
|
|
@@ -583,6 +591,7 @@ function GdsPinSystemReference({
|
|
|
583
591
|
colorScheme,
|
|
584
592
|
accents = DEFAULT_ACCENTS
|
|
585
593
|
}) {
|
|
594
|
+
const { t } = useGdsTranslation();
|
|
586
595
|
const ambient = useGdsAmbientTheme();
|
|
587
596
|
const activePreset = preset ?? ambient.preset;
|
|
588
597
|
const activeScheme = colorScheme ?? ambient.colorScheme;
|
|
@@ -637,7 +646,7 @@ function GdsPinSystemReference({
|
|
|
637
646
|
/* @__PURE__ */ jsx(Code, { children: "-1/24" }),
|
|
638
647
|
":"
|
|
639
648
|
] }),
|
|
640
|
-
/* @__PURE__ */ jsx(Code, { block: true, children: `transform: ${GDS_PIN_HEAD_CENTER_OFFSET} scale(${GDS_PIN_ICON_SCALE})` }),
|
|
649
|
+
/* @__PURE__ */ jsx(Code, { block: true, tabIndex: 0, role: "group", "aria-label": t("gds.docsCodeBlock.region", "Code"), children: `transform: ${GDS_PIN_HEAD_CENTER_OFFSET} scale(${GDS_PIN_ICON_SCALE})` }),
|
|
641
650
|
/* @__PURE__ */ jsxs(Text, { size: "sm", c: "dimmed", children: [
|
|
642
651
|
"The rule is \u201Ccentre on the pin\u2019s circle\u201D, not a number tuned until it looked right. The visible dome\u2019s midpoint is a ",
|
|
643
652
|
/* @__PURE__ */ jsx("em", { children: "different" }),
|
|
@@ -1059,7 +1068,7 @@ function GdsMapBasemapWash({ children, tint = GDS_MAP_WASH_TINT }) {
|
|
|
1059
1068
|
// src/GdsMapFilterRail.tsx
|
|
1060
1069
|
import { useEffect, useRef } from "react";
|
|
1061
1070
|
import { Box as Box2, Group as Group3 } from "@mantine/core";
|
|
1062
|
-
import { useGdsTranslation } from "@sovereignsquad/gds-theme";
|
|
1071
|
+
import { useGdsTranslation as useGdsTranslation2 } from "@sovereignsquad/gds-theme";
|
|
1063
1072
|
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1064
1073
|
var ALL_VALUE = "__gds-map-filter-all__";
|
|
1065
1074
|
var withCount = (label, count) => count === void 0 ? label : /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
@@ -1075,7 +1084,7 @@ function GdsMapFilterRail({
|
|
|
1075
1084
|
allLabel: allLabelProp,
|
|
1076
1085
|
onHeightChange
|
|
1077
1086
|
}) {
|
|
1078
|
-
const { t } =
|
|
1087
|
+
const { t } = useGdsTranslation2();
|
|
1079
1088
|
const allLabel = allLabelProp ?? t("gds.gdsMapFilterRail.allLabel", "All");
|
|
1080
1089
|
const hostRef = useRef(null);
|
|
1081
1090
|
useEffect(() => {
|
|
@@ -1127,9 +1136,11 @@ function PreviewSkeleton() {
|
|
|
1127
1136
|
}
|
|
1128
1137
|
function GdsMapPinPreviewCard({
|
|
1129
1138
|
title,
|
|
1139
|
+
category: categoryProp,
|
|
1130
1140
|
activity,
|
|
1131
1141
|
neighbourhood,
|
|
1132
1142
|
summary,
|
|
1143
|
+
audience: audienceProp,
|
|
1133
1144
|
ageRange,
|
|
1134
1145
|
trust,
|
|
1135
1146
|
priceEstimate,
|
|
@@ -1148,7 +1159,9 @@ function GdsMapPinPreviewCard({
|
|
|
1148
1159
|
const hasMedia = Boolean(thumbnailSeed && categories && categories.length > 0);
|
|
1149
1160
|
const hasEstimate = Boolean(priceEstimate || lastChecked);
|
|
1150
1161
|
const hasSave = Boolean(saveLabel && unsaveLabel);
|
|
1151
|
-
const
|
|
1162
|
+
const category = categoryProp ?? activity;
|
|
1163
|
+
const audience = audienceProp ?? ageRange;
|
|
1164
|
+
const meta = [category, neighbourhood].filter((part) => part !== void 0 && part !== null);
|
|
1152
1165
|
return /* @__PURE__ */ jsx7(
|
|
1153
1166
|
Paper2,
|
|
1154
1167
|
{
|
|
@@ -1188,8 +1201,8 @@ function GdsMapPinPreviewCard({
|
|
|
1188
1201
|
] }, index)) }) : null
|
|
1189
1202
|
] }),
|
|
1190
1203
|
summary ? /* @__PURE__ */ jsx7(Text3, { size: "sm", children: summary }) : null,
|
|
1191
|
-
|
|
1192
|
-
|
|
1204
|
+
audience || trust ? /* @__PURE__ */ jsxs7(Group4, { gap: "xs", children: [
|
|
1205
|
+
audience ? /* @__PURE__ */ jsx7(GdsBadge, { tone: "neutral", label: audience }) : null,
|
|
1193
1206
|
trust ? /* @__PURE__ */ jsx7(MeaningBadge, { variant: trust.variant, label: trust.label }) : null
|
|
1194
1207
|
] }) : null,
|
|
1195
1208
|
hasEstimate ? /* @__PURE__ */ jsx7(Paper2, { withBorder: true, radius: "md", p: "sm", "data-gds-map-pin-preview-estimate": true, children: /* @__PURE__ */ jsxs7(Stack4, { gap: 2, children: [
|
|
@@ -1507,7 +1520,7 @@ function GdsMotionSystemReference() {
|
|
|
1507
1520
|
/* @__PURE__ */ jsxs9(Stack5, { gap: "2xs", children: [
|
|
1508
1521
|
/* @__PURE__ */ jsx10(Text4, { fw: 700, children: "The reaction axis \u2014 micro-feedback on every control" }),
|
|
1509
1522
|
/* @__PURE__ */ jsx10(Text4, { size: "sm", children: "Hover, active, and pressed treatments plus the focus ring are an AXIS a theme declares once, not per-component CSS: every governed control reacts consistently, and a theme can retune all of it in one place. The values below are the default axis\u2019s own." }),
|
|
1510
|
-
/* @__PURE__ */ jsx10(Table3, { withTableBorder: true, children: /* @__PURE__ */ jsxs9(Table3.Tbody, { children: [
|
|
1523
|
+
/* @__PURE__ */ jsx10(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx10(Table3, { withTableBorder: true, children: /* @__PURE__ */ jsxs9(Table3.Tbody, { children: [
|
|
1511
1524
|
/* @__PURE__ */ jsxs9(Table3.Tr, { children: [
|
|
1512
1525
|
/* @__PURE__ */ jsx10(Table3.Td, { children: "hover" }),
|
|
1513
1526
|
/* @__PURE__ */ jsx10(Table3.Td, { children: /* @__PURE__ */ jsx10(Code2, { children: String(axis.hover) }) })
|
|
@@ -1528,7 +1541,7 @@ function GdsMotionSystemReference() {
|
|
|
1528
1541
|
/* @__PURE__ */ jsx10(Table3.Td, { children: "transition scope" }),
|
|
1529
1542
|
/* @__PURE__ */ jsx10(Table3.Td, { children: /* @__PURE__ */ jsx10(Code2, { children: (axis.transitionScope ?? []).join(", ") }) })
|
|
1530
1543
|
] })
|
|
1531
|
-
] }) }),
|
|
1544
|
+
] }) }) }),
|
|
1532
1545
|
/* @__PURE__ */ jsxs9(Text4, { size: "sm", c: "dimmed", children: [
|
|
1533
1546
|
"Wire-up is one call: ",
|
|
1534
1547
|
/* @__PURE__ */ jsx10(Code2, { children: "withGdsMotion(theme)" }),
|
|
@@ -1578,10 +1591,10 @@ function GdsShapeElevationSystemReference() {
|
|
|
1578
1591
|
/* @__PURE__ */ jsx11(Code3, { children: "resolveGdsShapeTokens()" }),
|
|
1579
1592
|
" emits, falling back to the axis\u2019s default step when a theme leaves a role undeclared."
|
|
1580
1593
|
] }),
|
|
1581
|
-
/* @__PURE__ */ jsx11(Table4, { withTableBorder: true, children: /* @__PURE__ */ jsx11(Table4.Tbody, { children: GDS_RADIUS_ROLES.map((role) => /* @__PURE__ */ jsxs10(Table4.Tr, { children: [
|
|
1594
|
+
/* @__PURE__ */ jsx11(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx11(Table4, { withTableBorder: true, children: /* @__PURE__ */ jsx11(Table4.Tbody, { children: GDS_RADIUS_ROLES.map((role) => /* @__PURE__ */ jsxs10(Table4.Tr, { children: [
|
|
1582
1595
|
/* @__PURE__ */ jsx11(Table4.Td, { children: role }),
|
|
1583
1596
|
/* @__PURE__ */ jsx11(Table4.Td, { children: /* @__PURE__ */ jsx11(Code3, { children: shapeTokens[`--gds-radius-${role}`] }) })
|
|
1584
|
-
] }, role)) }) }),
|
|
1597
|
+
] }, role)) }) }) }),
|
|
1585
1598
|
(() => {
|
|
1586
1599
|
const values = GDS_RADIUS_ROLES.map((role) => shapeTokens[`--gds-radius-${role}`]);
|
|
1587
1600
|
const distinctCount = new Set(values).size;
|
|
@@ -1619,10 +1632,10 @@ function GdsShapeElevationSystemReference() {
|
|
|
1619
1632
|
/* @__PURE__ */ jsx11(Chip, { size: "xs", checked: true, readOnly: true, children: "Chip" })
|
|
1620
1633
|
] })
|
|
1621
1634
|
] }) }),
|
|
1622
|
-
/* @__PURE__ */ jsx11(Paper3, { p: "xs", children: /* @__PURE__ */ jsx11(Table4, { children: /* @__PURE__ */ jsx11(Table4.Tbody, { children: ["card", "panel", "input", "button", "chip", "modal", "sheet"].map((role) => /* @__PURE__ */ jsxs10(Table4.Tr, { children: [
|
|
1635
|
+
/* @__PURE__ */ jsx11(Paper3, { p: "xs", children: /* @__PURE__ */ jsx11(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx11(Table4, { children: /* @__PURE__ */ jsx11(Table4.Tbody, { children: ["card", "panel", "input", "button", "chip", "modal", "sheet"].map((role) => /* @__PURE__ */ jsxs10(Table4.Tr, { children: [
|
|
1623
1636
|
/* @__PURE__ */ jsx11(Table4.Td, { children: role }),
|
|
1624
1637
|
/* @__PURE__ */ jsx11(Table4.Td, { children: /* @__PURE__ */ jsx11(Code3, { children: roles[role] ?? "theme" }) })
|
|
1625
|
-
] }, role)) }) }) })
|
|
1638
|
+
] }, role)) }) }) }) })
|
|
1626
1639
|
] }) }, profile);
|
|
1627
1640
|
}) })
|
|
1628
1641
|
] }),
|
|
@@ -1645,7 +1658,7 @@ function GdsShapeElevationSystemReference() {
|
|
|
1645
1658
|
/* @__PURE__ */ jsx11(Code3, { children: "resolveGdsElevationTokens()" }),
|
|
1646
1659
|
"."
|
|
1647
1660
|
] }),
|
|
1648
|
-
/* @__PURE__ */ jsx11(Table4, { withTableBorder: true, children: /* @__PURE__ */ jsx11(Table4.Tbody, { children: GDS_ELEVATION_ROLES.map((role) => /* @__PURE__ */ jsxs10(Table4.Tr, { children: [
|
|
1661
|
+
/* @__PURE__ */ jsx11(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx11(Table4, { withTableBorder: true, children: /* @__PURE__ */ jsx11(Table4.Tbody, { children: GDS_ELEVATION_ROLES.map((role) => /* @__PURE__ */ jsxs10(Table4.Tr, { children: [
|
|
1649
1662
|
/* @__PURE__ */ jsx11(Table4.Td, { children: role }),
|
|
1650
1663
|
/* @__PURE__ */ jsx11(Table4.Td, { children: /* @__PURE__ */ jsx11(
|
|
1651
1664
|
Paper3,
|
|
@@ -1655,7 +1668,7 @@ function GdsShapeElevationSystemReference() {
|
|
|
1655
1668
|
children: /* @__PURE__ */ jsx11(Text5, { size: "xs", c: "dimmed", children: role })
|
|
1656
1669
|
}
|
|
1657
1670
|
) })
|
|
1658
|
-
] }, role)) }) })
|
|
1671
|
+
] }, role)) }) }) })
|
|
1659
1672
|
] })
|
|
1660
1673
|
] });
|
|
1661
1674
|
}
|
|
@@ -1701,11 +1714,11 @@ function GdsDensitySpacingSystemReference() {
|
|
|
1701
1714
|
GDS_MIN_TARGET_PX,
|
|
1702
1715
|
"px floor (stricter than WCAG 2.5.8\u2019s 24px \u2014 the AAA figure Apple and Google both publish). A compact or spacious density mode scales spacing freely, but a control height only shrinks below the floor when the size carries a recorded exception below."
|
|
1703
1716
|
] }),
|
|
1704
|
-
/* @__PURE__ */ jsx12(Table5, { withTableBorder: true, children: /* @__PURE__ */ jsx12(Table5.Tbody, { children: GDS_CONTROL_SIZES.map((size) => /* @__PURE__ */ jsxs11(Table5.Tr, { children: [
|
|
1717
|
+
/* @__PURE__ */ jsx12(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx12(Table5, { withTableBorder: true, children: /* @__PURE__ */ jsx12(Table5.Tbody, { children: GDS_CONTROL_SIZES.map((size) => /* @__PURE__ */ jsxs11(Table5.Tr, { children: [
|
|
1705
1718
|
/* @__PURE__ */ jsx12(Table5.Td, { children: size }),
|
|
1706
1719
|
/* @__PURE__ */ jsx12(Table5.Td, { children: /* @__PURE__ */ jsx12(Code4, { children: tokens[`--gds-control-height-${size}`] }) }),
|
|
1707
1720
|
/* @__PURE__ */ jsx12(Table5.Td, { children: /* @__PURE__ */ jsx12(Text6, { size: "xs", c: "dimmed", children: GDS_CONTROL_HEIGHT_EXCEPTIONS[size] ?? "holds the floor" }) })
|
|
1708
|
-
] }, size)) }) })
|
|
1721
|
+
] }, size)) }) }) })
|
|
1709
1722
|
] })
|
|
1710
1723
|
] });
|
|
1711
1724
|
}
|
|
@@ -1872,7 +1885,7 @@ function GdsPictogramSystemReference() {
|
|
|
1872
1885
|
/* @__PURE__ */ jsx14(Code6, { children: "GDS_PICTOGRAM_TREATMENT_SCALE" }),
|
|
1873
1886
|
") and stroke weight \u2014 the path data itself never changes across a row."
|
|
1874
1887
|
] }),
|
|
1875
|
-
/* @__PURE__ */ jsxs13(Table6, { withTableBorder: true, children: [
|
|
1888
|
+
/* @__PURE__ */ jsx14(GdsTableScrollContainer, { children: /* @__PURE__ */ jsxs13(Table6, { withTableBorder: true, children: [
|
|
1876
1889
|
/* @__PURE__ */ jsx14(Table6.Thead, { children: /* @__PURE__ */ jsxs13(Table6.Tr, { children: [
|
|
1877
1890
|
/* @__PURE__ */ jsx14(Table6.Th, { children: "Pictogram" }),
|
|
1878
1891
|
treatments.map((treatment) => /* @__PURE__ */ jsxs13(Table6.Th, { children: [
|
|
@@ -1888,7 +1901,7 @@ function GdsPictogramSystemReference() {
|
|
|
1888
1901
|
/* @__PURE__ */ jsx14(Table6.Td, { children: gdsActivityPictograms.pictograms[key].label }),
|
|
1889
1902
|
treatments.map((treatment) => /* @__PURE__ */ jsx14(Table6.Td, { children: /* @__PURE__ */ jsx14(GdsPictogram, { pictogram: key, treatment, label: gdsActivityPictograms.pictograms[key].label }) }, treatment))
|
|
1890
1903
|
] }, key)) })
|
|
1891
|
-
] })
|
|
1904
|
+
] }) })
|
|
1892
1905
|
] }),
|
|
1893
1906
|
/* @__PURE__ */ jsxs13(Stack9, { gap: "2xs", children: [
|
|
1894
1907
|
/* @__PURE__ */ jsxs13(Text8, { fw: 700, children: [
|
|
@@ -1935,7 +1948,7 @@ function GdsPictogramSystemReference() {
|
|
|
1935
1948
|
/* @__PURE__ */ jsx14(Code6, { children: "default" }),
|
|
1936
1949
|
"."
|
|
1937
1950
|
] }),
|
|
1938
|
-
/* @__PURE__ */ jsxs13(Table6, { withTableBorder: true, children: [
|
|
1951
|
+
/* @__PURE__ */ jsx14(GdsTableScrollContainer, { children: /* @__PURE__ */ jsxs13(Table6, { withTableBorder: true, children: [
|
|
1939
1952
|
/* @__PURE__ */ jsx14(Table6.Thead, { children: /* @__PURE__ */ jsxs13(Table6.Tr, { children: [
|
|
1940
1953
|
/* @__PURE__ */ jsx14(Table6.Th, { children: "Pictogram" }),
|
|
1941
1954
|
STATES.map((state) => /* @__PURE__ */ jsx14(Table6.Th, { children: state }, state))
|
|
@@ -1944,7 +1957,7 @@ function GdsPictogramSystemReference() {
|
|
|
1944
1957
|
/* @__PURE__ */ jsx14(Table6.Td, { children: gdsActivityPictograms.pictograms[key].label }),
|
|
1945
1958
|
STATES.map((state) => /* @__PURE__ */ jsx14(Table6.Td, { children: /* @__PURE__ */ jsx14(GdsPictogram, { pictogram: key, treatment: "detail", state, label: `${gdsActivityPictograms.pictograms[key].label} \u2014 ${state}` }) }, state))
|
|
1946
1959
|
] }, key)) })
|
|
1947
|
-
] })
|
|
1960
|
+
] }) })
|
|
1948
1961
|
] }),
|
|
1949
1962
|
/* @__PURE__ */ jsxs13(Stack9, { gap: "2xs", children: [
|
|
1950
1963
|
/* @__PURE__ */ jsxs13(Text8, { fw: 700, children: [
|
|
@@ -1960,7 +1973,7 @@ function GdsPictogramSystemReference() {
|
|
|
1960
1973
|
GDS_PICTOGRAM_HERO_LAYERS.length - 1,
|
|
1961
1974
|
" larger, fainter, offset echoes of the identical path \u2014 depth from transform and opacity alone, never a second colour."
|
|
1962
1975
|
] }),
|
|
1963
|
-
/* @__PURE__ */ jsxs13(Table6, { withTableBorder: true, children: [
|
|
1976
|
+
/* @__PURE__ */ jsx14(GdsTableScrollContainer, { children: /* @__PURE__ */ jsxs13(Table6, { withTableBorder: true, children: [
|
|
1964
1977
|
/* @__PURE__ */ jsx14(Table6.Thead, { children: /* @__PURE__ */ jsxs13(Table6.Tr, { children: [
|
|
1965
1978
|
/* @__PURE__ */ jsx14(Table6.Th, { children: "Layer" }),
|
|
1966
1979
|
/* @__PURE__ */ jsx14(Table6.Th, { children: "scale" }),
|
|
@@ -1975,7 +1988,7 @@ function GdsPictogramSystemReference() {
|
|
|
1975
1988
|
/* @__PURE__ */ jsx14(Table6.Td, { children: /* @__PURE__ */ jsx14(Code6, { children: layer.offsetX }) }),
|
|
1976
1989
|
/* @__PURE__ */ jsx14(Table6.Td, { children: /* @__PURE__ */ jsx14(Code6, { children: layer.offsetY }) })
|
|
1977
1990
|
] }, `${layer.scale}-${layer.offsetX}-${layer.offsetY}`)) })
|
|
1978
|
-
] }),
|
|
1991
|
+
] }) }),
|
|
1979
1992
|
/* @__PURE__ */ jsxs13(Group9, { gap: "xl", align: "center", children: [
|
|
1980
1993
|
/* @__PURE__ */ jsx14(GdsPictogram, { pictogram: "basketball", treatment: "hero", label: "Basketball, hero treatment" }),
|
|
1981
1994
|
/* @__PURE__ */ jsx14(GdsPictogram, { pictogram: "camps", treatment: "hero", label: "Camps, hero treatment" })
|
|
@@ -1983,7 +1996,7 @@ function GdsPictogramSystemReference() {
|
|
|
1983
1996
|
] }),
|
|
1984
1997
|
/* @__PURE__ */ jsxs13(Stack9, { gap: "2xs", children: [
|
|
1985
1998
|
/* @__PURE__ */ jsx14(Text8, { fw: 700, children: "Numeric contract \u2014 read from the exports, never retyped" }),
|
|
1986
|
-
/* @__PURE__ */ jsx14(Table6, { withTableBorder: true, children: /* @__PURE__ */ jsxs13(Table6.Tbody, { children: [
|
|
1999
|
+
/* @__PURE__ */ jsx14(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx14(Table6, { withTableBorder: true, children: /* @__PURE__ */ jsxs13(Table6.Tbody, { children: [
|
|
1987
2000
|
/* @__PURE__ */ jsxs13(Table6.Tr, { children: [
|
|
1988
2001
|
/* @__PURE__ */ jsx14(Table6.Td, { children: "Optical grid" }),
|
|
1989
2002
|
/* @__PURE__ */ jsx14(Table6.Td, { children: /* @__PURE__ */ jsxs13(Code6, { children: [
|
|
@@ -2021,7 +2034,7 @@ function GdsPictogramSystemReference() {
|
|
|
2021
2034
|
/* @__PURE__ */ jsx14(Code6, { children: GDS_PICTOGRAM_TREATMENT_SCALE[treatment] })
|
|
2022
2035
|
] })
|
|
2023
2036
|
] }, treatment))
|
|
2024
|
-
] }) })
|
|
2037
|
+
] }) }) })
|
|
2025
2038
|
] }),
|
|
2026
2039
|
/* @__PURE__ */ jsxs13(Stack9, { gap: "2xs", children: [
|
|
2027
2040
|
/* @__PURE__ */ jsxs13(Text8, { fw: 700, children: [
|
|
@@ -2119,10 +2132,10 @@ function GdsTypographySystemReference() {
|
|
|
2119
2132
|
/* @__PURE__ */ jsxs14(Stack10, { gap: "2xs", children: [
|
|
2120
2133
|
/* @__PURE__ */ jsx15(Text9, { fw: 700, children: "Font lanes \u2014 display, body, mono" }),
|
|
2121
2134
|
/* @__PURE__ */ jsx15(Text9, { size: "sm", children: "Three roles a theme assigns a registered lane id to; component source asks for a role, never a font family directly." }),
|
|
2122
|
-
/* @__PURE__ */ jsx15(Table7, { withTableBorder: true, children: /* @__PURE__ */ jsx15(Table7.Tbody, { children: ["display", "body", "mono"].map((role) => /* @__PURE__ */ jsxs14(Table7.Tr, { children: [
|
|
2135
|
+
/* @__PURE__ */ jsx15(GdsTableScrollContainer, { children: /* @__PURE__ */ jsx15(Table7, { withTableBorder: true, children: /* @__PURE__ */ jsx15(Table7.Tbody, { children: ["display", "body", "mono"].map((role) => /* @__PURE__ */ jsxs14(Table7.Tr, { children: [
|
|
2123
2136
|
/* @__PURE__ */ jsx15(Table7.Td, { children: role }),
|
|
2124
2137
|
/* @__PURE__ */ jsx15(Table7.Td, { children: /* @__PURE__ */ jsx15(Code7, { children: tokens[`--gds-font-lane-${role}`] }) })
|
|
2125
|
-
] }, role)) }) })
|
|
2138
|
+
] }, role)) }) }) })
|
|
2126
2139
|
] })
|
|
2127
2140
|
] });
|
|
2128
2141
|
}
|
|
@@ -2250,7 +2263,7 @@ function GdsAccessibilitySystemReference() {
|
|
|
2250
2263
|
] }),
|
|
2251
2264
|
/* @__PURE__ */ jsxs16(Stack12, { gap: "2xs", children: [
|
|
2252
2265
|
/* @__PURE__ */ jsx17(Text11, { fw: 700, children: "The rules \u2014 minimums no theme may cross" }),
|
|
2253
|
-
/* @__PURE__ */ jsx17(Text11, { size: "sm", children: "Every rule is checkable from resolved tokens alone, so it runs over
|
|
2266
|
+
/* @__PURE__ */ jsx17(Text11, { size: "sm", children: "Every rule is checkable from resolved tokens alone, so it runs over every preset in both schemes without a browser. Rules needing real rendered geometry belong to the runtime harness instead (forced-colors, focus-ring, touch-target-floor)." }),
|
|
2254
2267
|
/* @__PURE__ */ jsx17(
|
|
2255
2268
|
SimpleDataTable,
|
|
2256
2269
|
{
|
|
@@ -2278,7 +2291,7 @@ function GdsAccessibilitySystemReference() {
|
|
|
2278
2291
|
|
|
2279
2292
|
// src/GdsButtonFeedbackReference.tsx
|
|
2280
2293
|
import { useCallback, useEffect as useEffect3, useRef as useRef2, useState } from "react";
|
|
2281
|
-
import { Badge as Badge6, Box as Box7, Group as Group13, Stack as Stack13, Text as Text12 } from "@mantine/core";
|
|
2294
|
+
import { Badge as Badge6, Box as Box7, Button as Button3, Group as Group13, SegmentedControl, SimpleGrid as SimpleGrid3, Stack as Stack13, Text as Text12 } from "@mantine/core";
|
|
2282
2295
|
import { jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2283
2296
|
var feedbackRows = Object.entries(GdsVocabulary).filter(([, config]) => Boolean(config.feedback)).map(([action, config]) => ({
|
|
2284
2297
|
action,
|
|
@@ -2287,6 +2300,52 @@ var feedbackRows = Object.entries(GdsVocabulary).filter(([, config]) => Boolean(
|
|
|
2287
2300
|
Icon: config.feedback.icon
|
|
2288
2301
|
}));
|
|
2289
2302
|
var totalActions = Object.keys(GdsVocabulary).length;
|
|
2303
|
+
var motionRows = Object.entries(GdsVocabulary).filter(([, config]) => Boolean(config.motion)).map(([action, config]) => ({
|
|
2304
|
+
action,
|
|
2305
|
+
pending: config.motion.pending ?? "spinner",
|
|
2306
|
+
success: config.motion.success ?? "pop",
|
|
2307
|
+
confirm: config.motion.confirm ? "yes" : "no"
|
|
2308
|
+
}));
|
|
2309
|
+
var DEMO_LATENCIES = {
|
|
2310
|
+
fast: Math.round(GDS_BUTTON_PENDING_DELAY_MS / 2),
|
|
2311
|
+
slow: GDS_BUTTON_PENDING_DELAY_MS * 3
|
|
2312
|
+
};
|
|
2313
|
+
function simulatedAction(latencyMs, succeed) {
|
|
2314
|
+
return () => new Promise((resolve, reject) => {
|
|
2315
|
+
setTimeout(() => succeed ? resolve() : reject(new Error("Simulated failure")), latencyMs);
|
|
2316
|
+
});
|
|
2317
|
+
}
|
|
2318
|
+
function ActionMotionDemo() {
|
|
2319
|
+
const [outcome, setOutcome] = useState("success");
|
|
2320
|
+
const [speed, setSpeed] = useState("slow");
|
|
2321
|
+
const run = simulatedAction(DEMO_LATENCIES[speed], outcome === "success");
|
|
2322
|
+
return /* @__PURE__ */ jsxs17(Stack13, { gap: "xs", "data-gds-button-motion-reference": "", children: [
|
|
2323
|
+
/* @__PURE__ */ jsxs17(Group13, { gap: "sm", wrap: "wrap", children: [
|
|
2324
|
+
/* @__PURE__ */ jsx18(
|
|
2325
|
+
SegmentedControl,
|
|
2326
|
+
{
|
|
2327
|
+
"aria-label": "Simulated outcome",
|
|
2328
|
+
value: outcome,
|
|
2329
|
+
onChange: (value) => setOutcome(value),
|
|
2330
|
+
data: [{ value: "success", label: "Succeeds" }, { value: "error", label: "Fails" }]
|
|
2331
|
+
}
|
|
2332
|
+
),
|
|
2333
|
+
/* @__PURE__ */ jsx18(
|
|
2334
|
+
SegmentedControl,
|
|
2335
|
+
{
|
|
2336
|
+
"aria-label": "Simulated duration",
|
|
2337
|
+
value: speed,
|
|
2338
|
+
onChange: (value) => setSpeed(value),
|
|
2339
|
+
data: [
|
|
2340
|
+
{ value: "fast", label: `${DEMO_LATENCIES.fast}ms` },
|
|
2341
|
+
{ value: "slow", label: `${DEMO_LATENCIES.slow}ms` }
|
|
2342
|
+
]
|
|
2343
|
+
}
|
|
2344
|
+
)
|
|
2345
|
+
] }),
|
|
2346
|
+
/* @__PURE__ */ jsx18(SimpleGrid3, { cols: { base: 1, xs: 2, md: 3 }, spacing: "xs", children: motionRows.map((row) => /* @__PURE__ */ jsx18(Group13, { gap: "xs", wrap: "nowrap", "data-gds-button-motion-demo": row.action, children: /* @__PURE__ */ jsx18(SemanticButton, { action: row.action, onAction: run }) }, row.action)) })
|
|
2347
|
+
] });
|
|
2348
|
+
}
|
|
2290
2349
|
var representativeByColor = Array.from(
|
|
2291
2350
|
feedbackRows.reduce((acc, row) => acc.has(row.color) ? acc : acc.set(row.color, row), /* @__PURE__ */ new Map()).values()
|
|
2292
2351
|
);
|
|
@@ -2306,6 +2365,7 @@ function LiveFeedbackButton({ action }) {
|
|
|
2306
2365
|
/* @__PURE__ */ jsx18(SemanticButton, { action, variant: "light", feedbackState: state, onClick: () => fire("error") })
|
|
2307
2366
|
] });
|
|
2308
2367
|
}
|
|
2368
|
+
var GDS_BUTTON_VARIANT_HIERARCHY = ["filled", "light", "outline", "subtle", "default"];
|
|
2309
2369
|
var brandIntentDemos = [
|
|
2310
2370
|
{ variant: "outline-accent", label: "outline-accent" },
|
|
2311
2371
|
{ variant: "gradient", label: "gradient" }
|
|
@@ -2330,6 +2390,12 @@ function BrandIntentDemo({ variant }) {
|
|
|
2330
2390
|
}
|
|
2331
2391
|
function GdsButtonFeedbackReference() {
|
|
2332
2392
|
return /* @__PURE__ */ jsxs17(Stack13, { gap: "md", "data-gds-button-feedback-reference": "", children: [
|
|
2393
|
+
/* @__PURE__ */ jsxs17(Stack13, { gap: "2xs", "data-gds-button-variant-reference": "", children: [
|
|
2394
|
+
/* @__PURE__ */ jsx18(Text12, { fw: 700, children: "Variants" }),
|
|
2395
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", children: "Emphasis from strongest to weakest. Under every preset the filled button takes the preset's primary colour and the others keep their own treatment, so a page has one primary action and the rest read as secondary. Red marks a destructive action at the same two emphasis levels." }),
|
|
2396
|
+
/* @__PURE__ */ jsx18(Group13, { gap: "xs", wrap: "wrap", children: GDS_BUTTON_VARIANT_HIERARCHY.map((variant) => /* @__PURE__ */ jsx18(Button3, { variant, "data-gds-button-variant-probe": variant, children: variant }, variant)) }),
|
|
2397
|
+
/* @__PURE__ */ jsx18(Group13, { gap: "xs", wrap: "wrap", children: ["filled", "light"].map((variant) => /* @__PURE__ */ jsx18(Button3, { color: "red", variant, "data-gds-button-variant-probe": `red-${variant}`, children: `red ${variant}` }, variant)) })
|
|
2398
|
+
] }),
|
|
2333
2399
|
/* @__PURE__ */ jsxs17(Stack13, { gap: "2xs", children: [
|
|
2334
2400
|
/* @__PURE__ */ jsxs17(Group13, { gap: "xs", align: "center", children: [
|
|
2335
2401
|
/* @__PURE__ */ jsx18(Text12, { fw: 700, children: "Live \u2014 click either button" }),
|
|
@@ -2349,6 +2415,54 @@ function GdsButtonFeedbackReference() {
|
|
|
2349
2415
|
/* @__PURE__ */ jsx18(LiveFeedbackButton, { action: row.action })
|
|
2350
2416
|
] }, row.action)) })
|
|
2351
2417
|
] }),
|
|
2418
|
+
/* @__PURE__ */ jsxs17(Stack13, { gap: "2xs", children: [
|
|
2419
|
+
/* @__PURE__ */ jsxs17(Group13, { gap: "xs", align: "center", children: [
|
|
2420
|
+
/* @__PURE__ */ jsx18(Text12, { fw: 700, children: "Action micro-interactions \u2014 onAction" }),
|
|
2421
|
+
/* @__PURE__ */ jsxs17(Badge6, { variant: "light", children: [
|
|
2422
|
+
"pending after ",
|
|
2423
|
+
GDS_BUTTON_PENDING_DELAY_MS,
|
|
2424
|
+
"ms"
|
|
2425
|
+
] }),
|
|
2426
|
+
/* @__PURE__ */ jsxs17(Badge6, { variant: "light", children: [
|
|
2427
|
+
"pending at least ",
|
|
2428
|
+
GDS_BUTTON_PENDING_MIN_MS,
|
|
2429
|
+
"ms"
|
|
2430
|
+
] })
|
|
2431
|
+
] }),
|
|
2432
|
+
/* @__PURE__ */ jsxs17(Text12, { size: "sm", children: [
|
|
2433
|
+
"Pass the action as ",
|
|
2434
|
+
/* @__PURE__ */ jsx18("code", { children: "onAction" }),
|
|
2435
|
+
" and the button runs the whole cycle from its promise. An action that settles within ",
|
|
2436
|
+
GDS_BUTTON_PENDING_DELAY_MS,
|
|
2437
|
+
"ms goes straight to its result; a slower one shows its pending motion and label, held at least",
|
|
2438
|
+
" ",
|
|
2439
|
+
GDS_BUTTON_PENDING_MIN_MS,
|
|
2440
|
+
"ms so it never flickers. Clicks are ignored while it runs and the button stays focusable (",
|
|
2441
|
+
/* @__PURE__ */ jsx18("code", { children: "aria-disabled" }),
|
|
2442
|
+
"). The result shows for",
|
|
2443
|
+
" ",
|
|
2444
|
+
GDS_BUTTON_FEEDBACK_DURATION_MS,
|
|
2445
|
+
"ms. Delete asks for a second click within",
|
|
2446
|
+
" ",
|
|
2447
|
+
GDS_BUTTON_CONFIRM_WINDOW_MS,
|
|
2448
|
+
"ms. Each button reserves the width of its widest state, so the layout does not move, and a live region announces pending, success and error."
|
|
2449
|
+
] }),
|
|
2450
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", c: "dimmed", children: "The actions below are simulated: each waits the selected time, then succeeds or fails. With reduced motion turned on in the operating system, nothing moves: icons and labels swap without animation." }),
|
|
2451
|
+
/* @__PURE__ */ jsx18(ActionMotionDemo, {}),
|
|
2452
|
+
/* @__PURE__ */ jsx18(
|
|
2453
|
+
SimpleDataTable,
|
|
2454
|
+
{
|
|
2455
|
+
columns: [
|
|
2456
|
+
{ key: "action", header: "Action" },
|
|
2457
|
+
{ key: "pending", header: "Pending motion" },
|
|
2458
|
+
{ key: "success", header: "Success motion" },
|
|
2459
|
+
{ key: "confirm", header: "Confirm first" }
|
|
2460
|
+
],
|
|
2461
|
+
rows: motionRows,
|
|
2462
|
+
getRowKey: (row) => row.action
|
|
2463
|
+
}
|
|
2464
|
+
)
|
|
2465
|
+
] }),
|
|
2352
2466
|
/* @__PURE__ */ jsxs17(Stack13, { gap: "2xs", children: [
|
|
2353
2467
|
/* @__PURE__ */ jsx18(Text12, { fw: 700, children: "Success feedback is per action" }),
|
|
2354
2468
|
/* @__PURE__ */ jsxs17(Text12, { size: "sm", children: [
|
|
@@ -2384,7 +2498,7 @@ function GdsButtonFeedbackReference() {
|
|
|
2384
2498
|
] }),
|
|
2385
2499
|
/* @__PURE__ */ jsxs17(Stack13, { gap: "2xs", children: [
|
|
2386
2500
|
/* @__PURE__ */ jsx18(Text12, { fw: 700, children: "Error feedback is uniform" }),
|
|
2387
|
-
/* @__PURE__ */ jsx18(Text12, { size: "sm", children: "Where success is per action, the error treatment is fixed: the same cross icon and the `gds.feedback.error` message
|
|
2501
|
+
/* @__PURE__ */ jsx18(Text12, { size: "sm", children: "Where success is per action, the error treatment is fixed for every action: the same cross icon, a short shake, the short `gds.feedback.failed` label on the button (so it keeps its width), and the full `gds.feedback.error` message in the live region, so a failure reads the same way wherever it appears. Pass `feedbackText` to replace the label in either state \u2014 the icon stays governed." })
|
|
2388
2502
|
] }),
|
|
2389
2503
|
/* @__PURE__ */ jsxs17(Stack13, { gap: "2xs", "data-gds-brand-intent-reference": "", children: [
|
|
2390
2504
|
/* @__PURE__ */ jsxs17(Group13, { gap: "xs", align: "center", children: [
|
|
@@ -2463,6 +2577,7 @@ export {
|
|
|
2463
2577
|
DetailProfileShell,
|
|
2464
2578
|
DiscoveryShell,
|
|
2465
2579
|
DocsCodeBlock,
|
|
2580
|
+
DocsCodeDisclosure,
|
|
2466
2581
|
DocsHeaderActionSelect,
|
|
2467
2582
|
DocsPageShell,
|
|
2468
2583
|
DocsShell,
|
|
@@ -2479,9 +2594,12 @@ export {
|
|
|
2479
2594
|
FoodMenuSection,
|
|
2480
2595
|
FormErrorSummary,
|
|
2481
2596
|
FormField,
|
|
2597
|
+
GDS_BUTTON_CONFIRM_WINDOW_MS,
|
|
2482
2598
|
GDS_BUTTON_FEEDBACK_DURATION_MS,
|
|
2483
2599
|
GDS_BUTTON_GRADIENT_TEXT_FLOOR,
|
|
2484
2600
|
GDS_BUTTON_OUTLINE_ACCENT_STROKE_PX,
|
|
2601
|
+
GDS_BUTTON_PENDING_DELAY_MS,
|
|
2602
|
+
GDS_BUTTON_PENDING_MIN_MS,
|
|
2485
2603
|
GDS_CHART_SERIES_COLORS,
|
|
2486
2604
|
GDS_CHART_SERIES_SLOTS,
|
|
2487
2605
|
GDS_DETAIL_FACTS_LABEL_COLUMN_PX,
|
|
@@ -2615,6 +2733,7 @@ export {
|
|
|
2615
2733
|
GdsRatingDisplay,
|
|
2616
2734
|
GdsRatingScale,
|
|
2617
2735
|
GdsRelativeTime,
|
|
2736
|
+
GdsReleaseNotes,
|
|
2618
2737
|
GdsRemovableTag,
|
|
2619
2738
|
GdsResourceManager,
|
|
2620
2739
|
GdsResourceManagerTemplate,
|
|
@@ -2637,6 +2756,7 @@ export {
|
|
|
2637
2756
|
GdsStack,
|
|
2638
2757
|
GdsStackedBarChart,
|
|
2639
2758
|
GdsSymmetryChart,
|
|
2759
|
+
GdsTableScrollContainer,
|
|
2640
2760
|
GdsTelemetryProvider,
|
|
2641
2761
|
GdsThreadList,
|
|
2642
2762
|
GdsToastProvider,
|
|
@@ -2898,6 +3018,7 @@ export {
|
|
|
2898
3018
|
openApiToGdsFormSchema,
|
|
2899
3019
|
partnerDiscoveryDefaultAmenities,
|
|
2900
3020
|
partnerDiscoveryDefaultFilterState,
|
|
3021
|
+
partnerDiscoveryFamilyAmenities,
|
|
2901
3022
|
redactGdsAccessGateMetadata,
|
|
2902
3023
|
redactPartnerDiscoveryEventMetadata,
|
|
2903
3024
|
registerGdsBlock,
|