@guardian/support-dotcom-components 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ export declare const hexColourSchema: z.ZodObject<{
16
16
  r: string;
17
17
  }>;
18
18
  export declare const configurableDesignSchema: z.ZodObject<{
19
- visual: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
19
+ visual: z.ZodOptional<z.ZodNullable<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
20
20
  mobileUrl: z.ZodString;
21
21
  tabletDesktopUrl: z.ZodString;
22
22
  wideUrl: z.ZodString;
@@ -35,7 +35,7 @@ export declare const configurableDesignSchema: z.ZodObject<{
35
35
  altText: string;
36
36
  tabletDesktopUrl: string;
37
37
  }>, z.ZodObject<{
38
- buttonColour: z.ZodOptional<z.ZodObject<{
38
+ buttonColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
39
39
  r: z.ZodEffects<z.ZodString, string, string>;
40
40
  g: z.ZodEffects<z.ZodString, string, string>;
41
41
  b: z.ZodEffects<z.ZodString, string, string>;
@@ -50,7 +50,87 @@ export declare const configurableDesignSchema: z.ZodObject<{
50
50
  g: string;
51
51
  kind: "hex";
52
52
  r: string;
53
- }>>;
53
+ }>>>;
54
+ buttonTextColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
55
+ r: z.ZodEffects<z.ZodString, string, string>;
56
+ g: z.ZodEffects<z.ZodString, string, string>;
57
+ b: z.ZodEffects<z.ZodString, string, string>;
58
+ kind: z.ZodLiteral<"hex">;
59
+ }, "strip", z.ZodTypeAny, {
60
+ b: string;
61
+ g: string;
62
+ kind: "hex";
63
+ r: string;
64
+ }, {
65
+ b: string;
66
+ g: string;
67
+ kind: "hex";
68
+ r: string;
69
+ }>>>;
70
+ buttonBorderColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
71
+ r: z.ZodEffects<z.ZodString, string, string>;
72
+ g: z.ZodEffects<z.ZodString, string, string>;
73
+ b: z.ZodEffects<z.ZodString, string, string>;
74
+ kind: z.ZodLiteral<"hex">;
75
+ }, "strip", z.ZodTypeAny, {
76
+ b: string;
77
+ g: string;
78
+ kind: "hex";
79
+ r: string;
80
+ }, {
81
+ b: string;
82
+ g: string;
83
+ kind: "hex";
84
+ r: string;
85
+ }>>>;
86
+ buttonSelectColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
87
+ r: z.ZodEffects<z.ZodString, string, string>;
88
+ g: z.ZodEffects<z.ZodString, string, string>;
89
+ b: z.ZodEffects<z.ZodString, string, string>;
90
+ kind: z.ZodLiteral<"hex">;
91
+ }, "strip", z.ZodTypeAny, {
92
+ b: string;
93
+ g: string;
94
+ kind: "hex";
95
+ r: string;
96
+ }, {
97
+ b: string;
98
+ g: string;
99
+ kind: "hex";
100
+ r: string;
101
+ }>>>;
102
+ buttonSelectTextColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
103
+ r: z.ZodEffects<z.ZodString, string, string>;
104
+ g: z.ZodEffects<z.ZodString, string, string>;
105
+ b: z.ZodEffects<z.ZodString, string, string>;
106
+ kind: z.ZodLiteral<"hex">;
107
+ }, "strip", z.ZodTypeAny, {
108
+ b: string;
109
+ g: string;
110
+ kind: "hex";
111
+ r: string;
112
+ }, {
113
+ b: string;
114
+ g: string;
115
+ kind: "hex";
116
+ r: string;
117
+ }>>>;
118
+ buttonSelectBorderColour: z.ZodOptional<z.ZodNullable<z.ZodObject<{
119
+ r: z.ZodEffects<z.ZodString, string, string>;
120
+ g: z.ZodEffects<z.ZodString, string, string>;
121
+ b: z.ZodEffects<z.ZodString, string, string>;
122
+ kind: z.ZodLiteral<"hex">;
123
+ }, "strip", z.ZodTypeAny, {
124
+ b: string;
125
+ g: string;
126
+ kind: "hex";
127
+ r: string;
128
+ }, {
129
+ b: string;
130
+ g: string;
131
+ kind: "hex";
132
+ r: string;
133
+ }>>>;
54
134
  kind: z.ZodLiteral<"ChoiceCards">;
55
135
  }, "strip", z.ZodTypeAny, {
56
136
  kind: "ChoiceCards";
@@ -59,7 +139,37 @@ export declare const configurableDesignSchema: z.ZodObject<{
59
139
  g: string;
60
140
  kind: "hex";
61
141
  r: string;
62
- } | undefined;
142
+ } | null | undefined;
143
+ buttonTextColour?: {
144
+ b: string;
145
+ g: string;
146
+ kind: "hex";
147
+ r: string;
148
+ } | null | undefined;
149
+ buttonBorderColour?: {
150
+ b: string;
151
+ g: string;
152
+ kind: "hex";
153
+ r: string;
154
+ } | null | undefined;
155
+ buttonSelectColour?: {
156
+ b: string;
157
+ g: string;
158
+ kind: "hex";
159
+ r: string;
160
+ } | null | undefined;
161
+ buttonSelectTextColour?: {
162
+ b: string;
163
+ g: string;
164
+ kind: "hex";
165
+ r: string;
166
+ } | null | undefined;
167
+ buttonSelectBorderColour?: {
168
+ b: string;
169
+ g: string;
170
+ kind: "hex";
171
+ r: string;
172
+ } | null | undefined;
63
173
  }, {
64
174
  kind: "ChoiceCards";
65
175
  buttonColour?: {
@@ -67,8 +177,38 @@ export declare const configurableDesignSchema: z.ZodObject<{
67
177
  g: string;
68
178
  kind: "hex";
69
179
  r: string;
70
- } | undefined;
71
- }>]>>;
180
+ } | null | undefined;
181
+ buttonTextColour?: {
182
+ b: string;
183
+ g: string;
184
+ kind: "hex";
185
+ r: string;
186
+ } | null | undefined;
187
+ buttonBorderColour?: {
188
+ b: string;
189
+ g: string;
190
+ kind: "hex";
191
+ r: string;
192
+ } | null | undefined;
193
+ buttonSelectColour?: {
194
+ b: string;
195
+ g: string;
196
+ kind: "hex";
197
+ r: string;
198
+ } | null | undefined;
199
+ buttonSelectTextColour?: {
200
+ b: string;
201
+ g: string;
202
+ kind: "hex";
203
+ r: string;
204
+ } | null | undefined;
205
+ buttonSelectBorderColour?: {
206
+ b: string;
207
+ g: string;
208
+ kind: "hex";
209
+ r: string;
210
+ } | null | undefined;
211
+ }>]>>>;
72
212
  colours: z.ZodObject<{
73
213
  basic: z.ZodObject<{
74
214
  background: z.ZodObject<{
@@ -191,8 +331,38 @@ export declare const configurableDesignSchema: z.ZodObject<{
191
331
  g: string;
192
332
  kind: "hex";
193
333
  r: string;
194
- } | undefined;
195
- } | undefined;
334
+ } | null | undefined;
335
+ buttonTextColour?: {
336
+ b: string;
337
+ g: string;
338
+ kind: "hex";
339
+ r: string;
340
+ } | null | undefined;
341
+ buttonBorderColour?: {
342
+ b: string;
343
+ g: string;
344
+ kind: "hex";
345
+ r: string;
346
+ } | null | undefined;
347
+ buttonSelectColour?: {
348
+ b: string;
349
+ g: string;
350
+ kind: "hex";
351
+ r: string;
352
+ } | null | undefined;
353
+ buttonSelectTextColour?: {
354
+ b: string;
355
+ g: string;
356
+ kind: "hex";
357
+ r: string;
358
+ } | null | undefined;
359
+ buttonSelectBorderColour?: {
360
+ b: string;
361
+ g: string;
362
+ kind: "hex";
363
+ r: string;
364
+ } | null | undefined;
365
+ } | null | undefined;
196
366
  }, {
197
367
  colours: {
198
368
  basic: {
@@ -223,8 +393,38 @@ export declare const configurableDesignSchema: z.ZodObject<{
223
393
  g: string;
224
394
  kind: "hex";
225
395
  r: string;
226
- } | undefined;
227
- } | undefined;
396
+ } | null | undefined;
397
+ buttonTextColour?: {
398
+ b: string;
399
+ g: string;
400
+ kind: "hex";
401
+ r: string;
402
+ } | null | undefined;
403
+ buttonBorderColour?: {
404
+ b: string;
405
+ g: string;
406
+ kind: "hex";
407
+ r: string;
408
+ } | null | undefined;
409
+ buttonSelectColour?: {
410
+ b: string;
411
+ g: string;
412
+ kind: "hex";
413
+ r: string;
414
+ } | null | undefined;
415
+ buttonSelectTextColour?: {
416
+ b: string;
417
+ g: string;
418
+ kind: "hex";
419
+ r: string;
420
+ } | null | undefined;
421
+ buttonSelectBorderColour?: {
422
+ b: string;
423
+ g: string;
424
+ kind: "hex";
425
+ r: string;
426
+ } | null | undefined;
427
+ } | null | undefined;
228
428
  }>;
229
429
  type HexChar = '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F';
230
430
  type HexValue = `${HexChar}${HexChar}`;
@@ -244,7 +444,6 @@ export interface CtaDesign {
244
444
  default: CtaStateDesign;
245
445
  hover: CtaStateDesign;
246
446
  }
247
- export type GuardianRoundel = 'default' | 'brand' | 'inverse';
248
447
  interface TickerDesign {
249
448
  text: HexColour;
250
449
  filledProgress: HexColour;
@@ -263,6 +462,11 @@ export interface BannerDesignImage extends BannerDesignHeaderImage {
263
462
  interface ChoiceCardsDesign {
264
463
  kind: 'ChoiceCards';
265
464
  buttonColour?: HexColour;
465
+ buttonTextColour?: HexColour;
466
+ buttonBorderColour?: HexColour;
467
+ buttonSelectColour?: HexColour;
468
+ buttonSelectTextColour?: HexColour;
469
+ buttonSelectBorderColour?: HexColour;
266
470
  }
267
471
  type Visual = BannerDesignImage | ChoiceCardsDesign;
268
472
  export interface ConfigurableDesign {
@@ -274,6 +478,7 @@ export interface ConfigurableDesign {
274
478
  bodyText: HexColour;
275
479
  headerText: HexColour;
276
480
  articleCountText: HexColour;
481
+ logo: HexColour;
277
482
  };
278
483
  highlightedText: {
279
484
  text: HexColour;
@@ -282,7 +487,6 @@ export interface ConfigurableDesign {
282
487
  primaryCta: CtaDesign;
283
488
  secondaryCta: CtaDesign;
284
489
  closeButton: CtaDesign;
285
- guardianRoundel: GuardianRoundel;
286
490
  ticker: TickerDesign;
287
491
  };
288
492
  }
@@ -1 +1 @@
1
- {"version":3,"file":"design.d.ts","sourceRoot":"","sources":["../../../../../../shared/src/types/props/design.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAazB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;EAK1B,CAAC;AAiBH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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