quirk-ui 0.1.29 → 0.1.30
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/core.d.ts +12 -0
- package/dist/main.d.ts +23 -38
- package/dist/next.d.ts +12 -37
- package/package.json +1 -1
package/dist/core.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { ImageAdapter } from './core/types/adapters';
|
|
|
5
5
|
import { JSX } from 'react/jsx-runtime';
|
|
6
6
|
import { LinkAdapter } from './core/types/adapters';
|
|
7
7
|
import { ReactNode } from 'react';
|
|
8
|
+
import { RenderCallToActionProps } from './core/types/renderers';
|
|
9
|
+
import { RenderImageProps } from './core/types/renderers';
|
|
10
|
+
import { RenderLinkProps } from './core/types/renderers';
|
|
11
|
+
import { RenderRichTextProps } from './core/types/renderers';
|
|
8
12
|
|
|
9
13
|
export declare function Accordion({ items, multiple, className, defaultOpenItems, onItemToggle, }: AccordionProps): JSX.Element;
|
|
10
14
|
|
|
@@ -1225,6 +1229,14 @@ declare type RangeProps = {
|
|
|
1225
1229
|
|
|
1226
1230
|
declare type RangeSize = "sm" | "md" | "lg";
|
|
1227
1231
|
|
|
1232
|
+
export { RenderCallToActionProps }
|
|
1233
|
+
|
|
1234
|
+
export { RenderImageProps }
|
|
1235
|
+
|
|
1236
|
+
export { RenderLinkProps }
|
|
1237
|
+
|
|
1238
|
+
export { RenderRichTextProps }
|
|
1239
|
+
|
|
1228
1240
|
export declare type RichContent = string | {
|
|
1229
1241
|
type: "markdown";
|
|
1230
1242
|
content: string;
|
package/dist/main.d.ts
CHANGED
|
@@ -22,19 +22,26 @@ import { ImageAdapter } from './core/types/adapters';
|
|
|
22
22
|
import { ItemType } from './sanity/types/item';
|
|
23
23
|
import { JSX } from 'react/jsx-runtime';
|
|
24
24
|
import { Link } from './sanity/types/link';
|
|
25
|
-
import { Link as Link_2 } from '../../../sanity/types/link';
|
|
26
|
-
import { Link as Link_3 } from '../../sanity/types/link';
|
|
27
25
|
import { LinkAdapter } from './core/types/adapters';
|
|
28
26
|
import { LinkProps } from 'next/link';
|
|
29
27
|
import { MetricType } from './sanity/types/metric';
|
|
30
28
|
import { NavigationData } from './sanity/types/navigation';
|
|
31
29
|
import { PageProps } from './sanity/types/page';
|
|
32
30
|
import { PageSection } from './sanity/types/pageSection';
|
|
33
|
-
import { PortableTextBlock } from '@portabletext/
|
|
34
|
-
import { PortableTextBlock as PortableTextBlock_2 } from '@portabletext/
|
|
31
|
+
import { PortableTextBlock } from '@portabletext/react';
|
|
32
|
+
import { PortableTextBlock as PortableTextBlock_2 } from '@portabletext/types';
|
|
35
33
|
import { QuoteBlockProps } from './next/blocks/QuoteBlock/QuoteBlock.types';
|
|
36
34
|
import { QuoteBlockProps as QuoteBlockProps_2 } from './QuoteBlock.types';
|
|
37
35
|
import { ReactNode } from 'react';
|
|
36
|
+
import { RenderCallToActionProps } from './core/types/renderers';
|
|
37
|
+
import { RenderCallToActionProps as RenderCallToActionProps_2 } from '../../../core/types/renderers';
|
|
38
|
+
import { RenderCallToActionProps as RenderCallToActionProps_3 } from '../../core/types/renderers';
|
|
39
|
+
import { RenderImageProps } from './core/types/renderers';
|
|
40
|
+
import { RenderImageProps as RenderImageProps_2 } from '../../../core/types/renderers';
|
|
41
|
+
import { RenderLinkProps } from './core/types/renderers';
|
|
42
|
+
import { RenderRichTextProps } from './core/types/renderers';
|
|
43
|
+
import { RenderRichTextProps as RenderRichTextProps_2 } from '../../../core/types/renderers';
|
|
44
|
+
import { RenderRichTextProps as RenderRichTextProps_3 } from '../../core/types/renderers';
|
|
38
45
|
import { RichTextBlockProps } from './next/blocks/RichTextBlock/RichTextBlock.types';
|
|
39
46
|
import { RichTextBlockProps as RichTextBlockProps_2 } from './RichTextBlock.types';
|
|
40
47
|
import { SanityCategory } from './sanity/types/category';
|
|
@@ -365,9 +372,9 @@ export declare type ContainerTag = "div" | "section" | "main" | "aside" | "artic
|
|
|
365
372
|
export declare function ContentBlock({ layout, heading, additionalContent, image, video, metrics, callToAction, disclaimer, styleOptions, id, renderImage, renderRichText, renderCallToAction, }: ContentBlockOptimisedProps): JSX.Element;
|
|
366
373
|
|
|
367
374
|
declare type ContentBlockOptimisedProps = ContentBlockProps_2 & {
|
|
368
|
-
renderImage?: (props:
|
|
369
|
-
renderRichText?: (props:
|
|
370
|
-
renderCallToAction?: (props:
|
|
375
|
+
renderImage?: (props: RenderImageProps_2) => default_2.ReactElement | null;
|
|
376
|
+
renderRichText?: (props: RenderRichTextProps_2) => default_2.ReactElement | null;
|
|
377
|
+
renderCallToAction?: (props: RenderCallToActionProps_2) => default_2.ReactElement | null;
|
|
371
378
|
};
|
|
372
379
|
|
|
373
380
|
export { ContentBlockProps }
|
|
@@ -463,7 +470,7 @@ export declare type DrawerSize = keyof typeof sizeClassMap_3;
|
|
|
463
470
|
* Flattens all span children into a single string — suitable for Badge labels,
|
|
464
471
|
* aria attributes, and any context that needs a plain string from rich text.
|
|
465
472
|
*/
|
|
466
|
-
export declare function extractText(blocks:
|
|
473
|
+
export declare function extractText(blocks: PortableTextBlock_2[]): string;
|
|
467
474
|
|
|
468
475
|
declare type FABPosition = "bottom-right" | "bottom-left" | "top-right" | "top-left";
|
|
469
476
|
|
|
@@ -1372,28 +1379,13 @@ declare type RangeSize = "sm" | "md" | "lg";
|
|
|
1372
1379
|
* <HeroBlock {...section} renderCallToAction={renderCallToAction} />
|
|
1373
1380
|
* <ContentBlock {...section} renderCallToAction={renderCallToAction} />
|
|
1374
1381
|
*/
|
|
1375
|
-
export declare function renderCallToAction({ alignment, items, className, }:
|
|
1382
|
+
export declare function renderCallToAction({ alignment, items, className, }: RenderCallToActionProps_3): default_2.ReactElement | null;
|
|
1376
1383
|
|
|
1377
|
-
|
|
1378
|
-
alignment: "left" | "center" | "right";
|
|
1379
|
-
items: Link_2[];
|
|
1380
|
-
className?: string;
|
|
1381
|
-
};
|
|
1384
|
+
export { RenderCallToActionProps }
|
|
1382
1385
|
|
|
1383
|
-
|
|
1384
|
-
alignment: "left" | "center" | "right";
|
|
1385
|
-
items: Link_3[];
|
|
1386
|
-
className?: string;
|
|
1387
|
-
}
|
|
1386
|
+
export { RenderImageProps }
|
|
1388
1387
|
|
|
1389
|
-
|
|
1390
|
-
src: string;
|
|
1391
|
-
alt: string;
|
|
1392
|
-
width?: number;
|
|
1393
|
-
height?: number;
|
|
1394
|
-
priority?: boolean;
|
|
1395
|
-
style?: default_2.CSSProperties;
|
|
1396
|
-
};
|
|
1388
|
+
export { RenderLinkProps }
|
|
1397
1389
|
|
|
1398
1390
|
/**
|
|
1399
1391
|
* Drop-in `renderRichText` prop for all QuirkUI blocks.
|
|
@@ -1403,16 +1395,9 @@ declare type RenderImageProps = {
|
|
|
1403
1395
|
* <HeroBlock {...section} renderRichText={renderRichText} />
|
|
1404
1396
|
* <CardGridBlock {...section} renderRichText={renderRichText} />
|
|
1405
1397
|
*/
|
|
1406
|
-
export declare function renderRichText({ blocks, className, textOverride, animateText, }:
|
|
1398
|
+
export declare function renderRichText({ blocks, className, textOverride, animateText, }: RenderRichTextProps_3): default_2.ReactElement | null;
|
|
1407
1399
|
|
|
1408
|
-
export
|
|
1409
|
-
blocks: PortableTextBlock[];
|
|
1410
|
-
className?: string;
|
|
1411
|
-
/** Optional plain-text override — replaces rendered block content */
|
|
1412
|
-
textOverride?: string;
|
|
1413
|
-
/** Triggers text entrance animation when true */
|
|
1414
|
-
animateText?: boolean;
|
|
1415
|
-
}
|
|
1400
|
+
export { RenderRichTextProps }
|
|
1416
1401
|
|
|
1417
1402
|
export declare type RichContent = string | {
|
|
1418
1403
|
type: "markdown";
|
|
@@ -1429,7 +1414,7 @@ export declare function RichTextBlock({ text, styleOptions, id, renderRichText,
|
|
|
1429
1414
|
export { RichTextBlockProps }
|
|
1430
1415
|
|
|
1431
1416
|
declare interface RichTextProps {
|
|
1432
|
-
blocks:
|
|
1417
|
+
blocks: PortableTextBlock[] | string;
|
|
1433
1418
|
className?: string;
|
|
1434
1419
|
textOverride?: string;
|
|
1435
1420
|
animateText?: boolean;
|
|
@@ -1637,7 +1622,7 @@ declare interface SpotlightCardProps {
|
|
|
1637
1622
|
priority?: boolean;
|
|
1638
1623
|
}) => default_2.ReactElement | null;
|
|
1639
1624
|
renderRichText?: (props: {
|
|
1640
|
-
blocks:
|
|
1625
|
+
blocks: PortableTextBlock_2[];
|
|
1641
1626
|
className?: string;
|
|
1642
1627
|
}) => default_2.ReactElement | null;
|
|
1643
1628
|
}
|
package/dist/next.d.ts
CHANGED
|
@@ -16,13 +16,16 @@ import { FeaturedDocumentsBlockProps as FeaturedDocumentsBlockProps_2 } from './
|
|
|
16
16
|
import { HeroBlockProps } from './next/blocks/HeroBlock/HeroBlock.types';
|
|
17
17
|
import { HeroBlockProps as HeroBlockProps_2 } from './HeroBlock.types';
|
|
18
18
|
import { JSX } from 'react/jsx-runtime';
|
|
19
|
-
import { Link } from '../../../sanity/types/link';
|
|
20
|
-
import { Link as Link_2 } from '../../sanity/types/link';
|
|
21
19
|
import { LinkProps } from 'next/link';
|
|
22
|
-
import { PortableTextBlock } from '@portabletext/
|
|
23
|
-
import { PortableTextBlock as PortableTextBlock_2 } from '@portabletext/
|
|
20
|
+
import { PortableTextBlock } from '@portabletext/react';
|
|
21
|
+
import { PortableTextBlock as PortableTextBlock_2 } from '@portabletext/types';
|
|
24
22
|
import { QuoteBlockProps } from './next/blocks/QuoteBlock/QuoteBlock.types';
|
|
25
23
|
import { QuoteBlockProps as QuoteBlockProps_2 } from './QuoteBlock.types';
|
|
24
|
+
import { RenderCallToActionProps } from '../../../core/types/renderers';
|
|
25
|
+
import { RenderCallToActionProps as RenderCallToActionProps_2 } from '../../core/types/renderers';
|
|
26
|
+
import { RenderImageProps } from '../../../core/types/renderers';
|
|
27
|
+
import { RenderRichTextProps } from '../../core/types/renderers';
|
|
28
|
+
import { RenderRichTextProps as RenderRichTextProps_2 } from '../../../core/types/renderers';
|
|
26
29
|
import { RichTextBlockProps } from './next/blocks/RichTextBlock/RichTextBlock.types';
|
|
27
30
|
import { RichTextBlockProps as RichTextBlockProps_2 } from './RichTextBlock.types';
|
|
28
31
|
import { SanitySpotlight } from '../../../sanity/types/spotlight';
|
|
@@ -57,7 +60,7 @@ export declare function ContentBlock({ layout, heading, additionalContent, image
|
|
|
57
60
|
|
|
58
61
|
declare type ContentBlockOptimisedProps = ContentBlockProps_2 & {
|
|
59
62
|
renderImage?: (props: RenderImageProps) => default_2.ReactElement | null;
|
|
60
|
-
renderRichText?: (props:
|
|
63
|
+
renderRichText?: (props: RenderRichTextProps_2) => default_2.ReactElement | null;
|
|
61
64
|
renderCallToAction?: (props: RenderCallToActionProps) => default_2.ReactElement | null;
|
|
62
65
|
};
|
|
63
66
|
|
|
@@ -72,7 +75,7 @@ export { DocumentListBlockProps }
|
|
|
72
75
|
* Flattens all span children into a single string — suitable for Badge labels,
|
|
73
76
|
* aria attributes, and any context that needs a plain string from rich text.
|
|
74
77
|
*/
|
|
75
|
-
export declare function extractText(blocks:
|
|
78
|
+
export declare function extractText(blocks: PortableTextBlock_2[]): string;
|
|
76
79
|
|
|
77
80
|
export declare function FeaturedDocumentsBlock({ heading, selectionMode, layout, limit, articles, manualArticles, sortBy, callToAction, styleOptions, id, renderRichText, renderLink, renderCard, }: FeaturedDocumentsBlockProps_2): JSX.Element | null;
|
|
78
81
|
|
|
@@ -124,27 +127,6 @@ export { QuoteBlockProps }
|
|
|
124
127
|
*/
|
|
125
128
|
export declare function renderCallToAction({ alignment, items, className, }: RenderCallToActionProps_2): default_2.ReactElement | null;
|
|
126
129
|
|
|
127
|
-
declare type RenderCallToActionProps = {
|
|
128
|
-
alignment: "left" | "center" | "right";
|
|
129
|
-
items: Link[];
|
|
130
|
-
className?: string;
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
declare interface RenderCallToActionProps_2 {
|
|
134
|
-
alignment: "left" | "center" | "right";
|
|
135
|
-
items: Link_2[];
|
|
136
|
-
className?: string;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
declare type RenderImageProps = {
|
|
140
|
-
src: string;
|
|
141
|
-
alt: string;
|
|
142
|
-
width?: number;
|
|
143
|
-
height?: number;
|
|
144
|
-
priority?: boolean;
|
|
145
|
-
style?: default_2.CSSProperties;
|
|
146
|
-
};
|
|
147
|
-
|
|
148
130
|
/**
|
|
149
131
|
* Drop-in `renderRichText` prop for all QuirkUI blocks.
|
|
150
132
|
*
|
|
@@ -155,14 +137,7 @@ declare type RenderImageProps = {
|
|
|
155
137
|
*/
|
|
156
138
|
export declare function renderRichText({ blocks, className, textOverride, animateText, }: RenderRichTextProps): default_2.ReactElement | null;
|
|
157
139
|
|
|
158
|
-
export
|
|
159
|
-
blocks: PortableTextBlock[];
|
|
160
|
-
className?: string;
|
|
161
|
-
/** Optional plain-text override — replaces rendered block content */
|
|
162
|
-
textOverride?: string;
|
|
163
|
-
/** Triggers text entrance animation when true */
|
|
164
|
-
animateText?: boolean;
|
|
165
|
-
}
|
|
140
|
+
export { RenderRichTextProps }
|
|
166
141
|
|
|
167
142
|
export declare const RichText: default_2.FC<RichTextProps>;
|
|
168
143
|
|
|
@@ -171,7 +146,7 @@ export declare function RichTextBlock({ text, styleOptions, id, renderRichText,
|
|
|
171
146
|
export { RichTextBlockProps }
|
|
172
147
|
|
|
173
148
|
declare interface RichTextProps {
|
|
174
|
-
blocks:
|
|
149
|
+
blocks: PortableTextBlock[] | string;
|
|
175
150
|
className?: string;
|
|
176
151
|
textOverride?: string;
|
|
177
152
|
animateText?: boolean;
|
|
@@ -189,7 +164,7 @@ declare interface SpotlightCardProps {
|
|
|
189
164
|
priority?: boolean;
|
|
190
165
|
}) => default_2.ReactElement | null;
|
|
191
166
|
renderRichText?: (props: {
|
|
192
|
-
blocks:
|
|
167
|
+
blocks: PortableTextBlock_2[];
|
|
193
168
|
className?: string;
|
|
194
169
|
}) => default_2.ReactElement | null;
|
|
195
170
|
}
|