quirk-ui 0.0.522 → 0.0.524
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/main.d.ts
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { AccordionBlockProps } from './AccordionBlock.types';
|
|
2
|
-
import {
|
|
1
|
+
import { AccordionBlockProps } from './next/blocks/AccordionBlock/AccordionBlock.types';
|
|
2
|
+
import { AccordionBlockProps as AccordionBlockProps_2 } from './AccordionBlock.types';
|
|
3
|
+
import { AdditionalCategoriesBlockProps } from './next/blocks/AdditionalCategoriesBlock/AdditionalCategoriesBlock.types';
|
|
4
|
+
import { AdditionalCategoriesBlockProps as AdditionalCategoriesBlockProps_2 } from './AdditionalCategoriesBlock.types';
|
|
3
5
|
import { ArticleItem } from './next/types/article';
|
|
4
|
-
import { CardGridBlockProps } from './CardGridBlock.types';
|
|
5
|
-
import {
|
|
6
|
+
import { CardGridBlockProps } from './next/blocks/CardGridBlock/CardGridBlock.types';
|
|
7
|
+
import { CardGridBlockProps as CardGridBlockProps_2 } from './CardGridBlock.types';
|
|
8
|
+
import { CarouselBlockProps } from './next/blocks/CarouselBlock/CarouselBlock.types';
|
|
9
|
+
import { CarouselBlockProps as CarouselBlockProps_2 } from './CarouselBlock.types';
|
|
6
10
|
import { CategoryProps } from './next/types/category';
|
|
7
11
|
import { ContentBlockProps } from './next/blocks/ContentBlock/ContentBlock.types';
|
|
8
12
|
import { ContentBlockProps as ContentBlockProps_2 } from './ContentBlock.types';
|
|
9
13
|
import { default as default_2 } from 'react';
|
|
10
|
-
import { DocumentListBlockProps } from './DocumentListBlock.types';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
+
import { DocumentListBlockProps } from './next/blocks/DocumentListBlock/DocumentListBlock.types';
|
|
15
|
+
import { DocumentListBlockProps as DocumentListBlockProps_2 } from './DocumentListBlock.types';
|
|
16
|
+
import { FaqBlockProps } from './next/blocks/FaqBlock/FaqBlock.types';
|
|
17
|
+
import { FaqBlockProps as FaqBlockProps_2 } from './FaqBlock.types';
|
|
18
|
+
import { FeaturedDocumentsBlockProps } from './next/blocks/FeaturedDocumentsBlock/FeaturedDocumentsBlock.types';
|
|
19
|
+
import { FeaturedDocumentsBlockProps as FeaturedDocumentsBlockProps_2 } from './FeaturedDocumentsBlock.types';
|
|
20
|
+
import { HeroBlockProps } from './next/blocks/HeroBlock/HeroBlock.types';
|
|
21
|
+
import { HeroBlockProps as HeroBlockProps_2 } from './HeroBlock.types';
|
|
14
22
|
import { JSX } from 'react/jsx-runtime';
|
|
23
|
+
import { Link } from './next/types/link';
|
|
15
24
|
import { LinkProps } from 'next/link';
|
|
16
25
|
import { NavigationData } from './next/types/navigation';
|
|
17
26
|
import { PageSection } from './next/types/pageSection';
|
|
@@ -26,14 +35,19 @@ import { SingletonBlockProps } from './next/types/singleton';
|
|
|
26
35
|
import { SiteSettings } from './next/types/site';
|
|
27
36
|
import { SpotlightProps } from './next/types/spotlight';
|
|
28
37
|
import { SpotlightProps as SpotlightProps_2 } from '../../types/spotlight';
|
|
29
|
-
import { StickyScrollBlockProps } from './StickyScrollBlock.types';
|
|
38
|
+
import { StickyScrollBlockProps } from './next/blocks/StickyScrollBlock/StickyScrollBlock.types';
|
|
39
|
+
import { StickyScrollBlockProps as StickyScrollBlockProps_2 } from './StickyScrollBlock.types';
|
|
30
40
|
import { Styles } from './next/types/styles';
|
|
31
|
-
import { TabsBlockProps } from './TabsBlock.types';
|
|
32
|
-
import {
|
|
41
|
+
import { TabsBlockProps } from './next/blocks/TabsBlock/TabsBlock.types';
|
|
42
|
+
import { TabsBlockProps as TabsBlockProps_2 } from './TabsBlock.types';
|
|
43
|
+
import { WasHelpfulBlockProps } from './next/blocks/WasHelpfulBlock/WasHelpful.types';
|
|
44
|
+
import { WasHelpfulBlockProps as WasHelpfulBlockProps_2 } from './WasHelpful.types';
|
|
33
45
|
|
|
34
46
|
export declare function Accordion({ items, multiple, className, }: AccordionProps): JSX.Element;
|
|
35
47
|
|
|
36
|
-
export declare function AccordionBlock({ heading, items, className, styleOptions, }:
|
|
48
|
+
export declare function AccordionBlock({ heading, items, className, styleOptions, }: AccordionBlockProps_2): JSX.Element;
|
|
49
|
+
|
|
50
|
+
export { AccordionBlockProps }
|
|
37
51
|
|
|
38
52
|
export declare type AccordionItem = {
|
|
39
53
|
id: string;
|
|
@@ -47,7 +61,9 @@ declare type AccordionProps = {
|
|
|
47
61
|
className?: string;
|
|
48
62
|
};
|
|
49
63
|
|
|
50
|
-
export declare function AdditionalCategoriesBlock({ categories, type, }:
|
|
64
|
+
export declare function AdditionalCategoriesBlock({ categories, type, }: AdditionalCategoriesBlockProps_2): JSX.Element | undefined;
|
|
65
|
+
|
|
66
|
+
export { AdditionalCategoriesBlockProps }
|
|
51
67
|
|
|
52
68
|
export declare function Alert({ message, variant, onClose, className, }: AlertProps): JSX.Element | null;
|
|
53
69
|
|
|
@@ -223,7 +239,9 @@ export declare type CallToActionProps = BaseProps & ((AnchorProps & {
|
|
|
223
239
|
|
|
224
240
|
export declare function Card({ title, content, footer, imageSrc, imageAlt, onClick, variant, clickable, className, }: CardProps): JSX.Element;
|
|
225
241
|
|
|
226
|
-
export declare function CardGridBlock({ heading, grid, callToAction, styleOptions, }:
|
|
242
|
+
export declare function CardGridBlock({ heading, grid, callToAction, styleOptions, }: CardGridBlockProps_2): JSX.Element;
|
|
243
|
+
|
|
244
|
+
export { CardGridBlockProps }
|
|
227
245
|
|
|
228
246
|
declare type CardProps = {
|
|
229
247
|
title?: string;
|
|
@@ -239,7 +257,9 @@ declare type CardProps = {
|
|
|
239
257
|
|
|
240
258
|
export declare function Carousel({ items, itemsPerPage, itemsPerRow, autoplay, autoplayInterval, className, externalRef, siblingRef, isSplit, }: CarouselProps): JSX.Element;
|
|
241
259
|
|
|
242
|
-
export declare function CarouselBlock({ heading, carouselOptions, items, styleOptions, }:
|
|
260
|
+
export declare function CarouselBlock({ heading, carouselOptions, items, styleOptions, }: CarouselBlockProps_2): JSX.Element;
|
|
261
|
+
|
|
262
|
+
export { CarouselBlockProps }
|
|
243
263
|
|
|
244
264
|
declare type CarouselProps = {
|
|
245
265
|
items: default_2.ReactNode[];
|
|
@@ -392,7 +412,9 @@ declare const displayClassMap: {
|
|
|
392
412
|
|
|
393
413
|
export declare function Divider({ axis, className, ...restProps }: SpacerProps): JSX.Element;
|
|
394
414
|
|
|
395
|
-
export declare function DocumentListBlock({ heading, layout, includeFilters, excludeFilters, limit, categoryFilters, documentType, styleOptions, initialArticles, initialTotalCount, initialIncludeCategories, }:
|
|
415
|
+
export declare function DocumentListBlock({ heading, layout, includeFilters, excludeFilters, limit, categoryFilters, documentType, styleOptions, initialArticles, initialTotalCount, initialIncludeCategories, }: DocumentListBlockProps_2): JSX.Element;
|
|
416
|
+
|
|
417
|
+
export { DocumentListBlockProps }
|
|
396
418
|
|
|
397
419
|
export declare function Drawer({ isOpen, onClose, position, overlay, ariaLabel, children, className, }: DrawerProps): JSX.Element;
|
|
398
420
|
|
|
@@ -406,9 +428,13 @@ declare type DrawerProps = {
|
|
|
406
428
|
className?: string;
|
|
407
429
|
};
|
|
408
430
|
|
|
409
|
-
export declare function FaqBlock({ heading, items, className, styleOptions, }:
|
|
431
|
+
export declare function FaqBlock({ heading, items, className, styleOptions, }: FaqBlockProps_2): JSX.Element;
|
|
432
|
+
|
|
433
|
+
export { FaqBlockProps }
|
|
410
434
|
|
|
411
|
-
export declare function FeaturedDocumentsBlock({ heading, selectionMode, layout, limit, articles, manualArticles, documentType, sortBy, callToAction, styleOptions, }:
|
|
435
|
+
export declare function FeaturedDocumentsBlock({ heading, selectionMode, layout, limit, articles, manualArticles, documentType, sortBy, callToAction, styleOptions, }: FeaturedDocumentsBlockProps_2): 0 | JSX.Element | undefined;
|
|
436
|
+
|
|
437
|
+
export { FeaturedDocumentsBlockProps }
|
|
412
438
|
|
|
413
439
|
export declare function Fieldset({ legend, className, children, ...restProps }: FieldsetProps): JSX.Element;
|
|
414
440
|
|
|
@@ -779,7 +805,9 @@ declare type HeadingProps = {
|
|
|
779
805
|
className?: string;
|
|
780
806
|
} & default_2.HTMLAttributes<HTMLHeadingElement>;
|
|
781
807
|
|
|
782
|
-
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, }:
|
|
808
|
+
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, }: HeroBlockProps_2): JSX.Element;
|
|
809
|
+
|
|
810
|
+
export { HeroBlockProps }
|
|
783
811
|
|
|
784
812
|
declare type HeroContextType = {
|
|
785
813
|
isFullbleedHeroAtTop: boolean;
|
|
@@ -866,6 +894,8 @@ declare type LabelProps = {
|
|
|
866
894
|
className?: string;
|
|
867
895
|
} & default_2.LabelHTMLAttributes<HTMLLabelElement>;
|
|
868
896
|
|
|
897
|
+
export { Link }
|
|
898
|
+
|
|
869
899
|
export declare function List({ items, ordered, className, onItemClick, }: ListProps): JSX.Element;
|
|
870
900
|
|
|
871
901
|
export declare type ListItem = {
|
|
@@ -1278,7 +1308,9 @@ declare const statusClassMap: {
|
|
|
1278
1308
|
readonly busy: string;
|
|
1279
1309
|
};
|
|
1280
1310
|
|
|
1281
|
-
export declare function StickyScrollBlock({ heading, items, showNumbers, }:
|
|
1311
|
+
export declare function StickyScrollBlock({ heading, items, showNumbers, }: StickyScrollBlockProps_2): JSX.Element;
|
|
1312
|
+
|
|
1313
|
+
export { StickyScrollBlockProps }
|
|
1282
1314
|
|
|
1283
1315
|
export { Styles }
|
|
1284
1316
|
|
|
@@ -1332,7 +1364,9 @@ export declare namespace Tabs {
|
|
|
1332
1364
|
}) => JSX.Element;
|
|
1333
1365
|
}
|
|
1334
1366
|
|
|
1335
|
-
export declare function TabsBlock({ heading, image, items, callToAction, styleOptions, }:
|
|
1367
|
+
export declare function TabsBlock({ heading, image, items, callToAction, styleOptions, }: TabsBlockProps_2): JSX.Element | undefined;
|
|
1368
|
+
|
|
1369
|
+
export { TabsBlockProps }
|
|
1336
1370
|
|
|
1337
1371
|
declare type TabsProps = {
|
|
1338
1372
|
children: ReactNode;
|
|
@@ -1501,6 +1535,8 @@ declare const variantClassMap_9: {
|
|
|
1501
1535
|
readonly small: string;
|
|
1502
1536
|
};
|
|
1503
1537
|
|
|
1504
|
-
export declare function WasHelpfulBlock({ page, type }:
|
|
1538
|
+
export declare function WasHelpfulBlock({ page, type }: WasHelpfulBlockProps_2): JSX.Element;
|
|
1539
|
+
|
|
1540
|
+
export { WasHelpfulBlockProps }
|
|
1505
1541
|
|
|
1506
1542
|
export { }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),P=require("../../ui/PortableTextRenderer/index.cjs"),Q=require("../../hooks/useStyleClasses.cjs"),V=require("../../contexts/LocaleBridge.cjs"),N=require("../../../index-BN6814Bi.cjs"),Y=require("../../../core/components/Input/index.cjs"),F=require("../../../core/components/Select/index.cjs"),ee=require("../../cards/BlogArticleCard/index.cjs"),s=require("../../../CategoryFilters-tDVNMlQO.cjs"),se=require("../../../x-Dft9NVe_.cjs"),te=[{label:"Newest",value:"date-desc"},{label:"Oldest",value:"date-asc"},{label:"Title A-Z",value:"title-asc"},{label:"Title Z-A",value:"title-desc"},{label:"Most Popular",value:"popular-desc"}];function le({heading:o,layout:z="grid",includeFilters:p,excludeFilters:v,limit:b=3,categoryFilters:d,documentType:g,styleOptions:D,initialArticles:j=[],initialTotalCount:L=0,initialIncludeCategories:I=[]}){const[k,c]=t.useState(j),[H,O]=t.useState(L),[C,W]=t.useState("date-desc"),[u,q]=t.useState(I),[T,i]=t.useState(j.length),[a,A]=t.useState(!1),[x,y]=t.useState(!1),[E,r]=t.useState(j.length<L),[f,_]=t.useState(""),[S,Z]=t.useState(""),{locale:G}=V.useLocaleBridge(),U=Q.useStyleClasses(D),R=t.useRef(!1),X={list:s.styles.list}[z??"grid"],J=l=>{W(l.target.value),c([]),i(0),r(!0)},B=()=>{y(!x)},K=()=>{c([]),i(0),r(!0),q([]),_(""),y(!1)},$=async(l=!1)=>{if(a||!E)return;A(!0);const h=new URLSearchParams({start:l?"0":String(T),limit:String(b),sort:C,documentType:g,locale:G});S&&h.append("search",S),u.forEach(n=>h.append("categories",n)),p==null||p.forEach(n=>h.append("include",n._id)),v==null||v.forEach(n=>h.append("exclude",n._id));try{const m=await(await fetch(`/api/articles?${h.toString()}`,{method:"GET"})).json();c(w=>l?m.articles:[...w,...m.articles]),i(w=>l?b:w+b),O(m.totalCount),r(T+m.articles.length<m.totalCount)}catch(n){console.error("Failed to load articles:",n),r(!1)}finally{A(!1)}},M=t.useCallback(()=>{typeof window<"u"&&window.innerWidth>768&&(y(!1),typeof document<"u"&&(document.body.style.overflow=""))},[]);return t.useEffect(()=>{const l=typeof window<"u";return l&&window.addEventListener("resize",M),()=>{l&&window.removeEventListener("resize",M)}},[]),t.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=x?"hidden":"",()=>{document.body.style.overflow=""}},[x]),t.useEffect(()=>{const l=setTimeout(()=>{Z(f)},500);return()=>clearTimeout(l)},[f]),t.useEffect(()=>{if(!R.current){R.current=!0;return}(S||C!=="date-desc"||u.length>0)&&$(!0)},[S,C,u.join(",")]),e.jsx("section",{className:`${s.styles.documentList} ${U}`,children:e.jsxs("article",{className:s.styles.container,children:[e.jsxs("div",{className:s.styles.heading,children:[(o==null?void 0:o.title)&&e.jsx(P.RichText,{blocks:o==null?void 0:o.title}),(o==null?void 0:o.description)&&e.jsx(P.RichText,{blocks:o==null?void 0:o.description})]}),e.jsxs("div",{className:s.styles.listContainer,children:[(d==null?void 0:d.length)&&e.jsxs("div",{className:s.styles.filterToggle,children:[e.jsx(N.CallToAction,{as:"button",variant:"secondary",onClick:B,disabled:a,icon:"settings",iconAlignment:"left",children:"Filters"}),e.jsx(N.CallToAction,{as:"button",variant:"link",onClick:K,disabled:a||u.length===0&&f.length===0,children:"Reset"})]}),d&&e.jsx(s.CategoryFilters,{categoryFilters:d,selectedCategories:u,setSelectedCategories:q,setArticles:c,setStart:i,setHasMore:r,showFilters:x,toggleFilters:B,isLoading:a}),e.jsxs("div",{className:s.styles.listWrapper,children:[e.jsxs("div",{className:s.styles.listHeader,children:[e.jsxs("div",{className:s.styles.listResults,children:["Results: ",e.jsx("span",{children:H})]}),e.jsxs("div",{className:s.styles.listHeaderFilters,children:[e.jsxs("div",{className:s.styles.listSearch,children:[e.jsx(Y.Input,{type:"text",name:"list-search",placeholder:"Search articles",value:f,onChange:l=>{_(l.target.value),c([]),i(0),r(!0)}}),f&&e.jsx("button",{className:s.styles.clearSearch,onClick:()=>{_(""),c([]),i(0),r(!0)},children:e.jsx(se.X,{size:21})})]}),e.jsx("div",{className:s.styles.listSort,children:e.jsx(F.Select,{id:"list-sort",name:"list-sort",label:"Sort by",options:te,onChange:J})})]})]}),e.jsx("div",{className:`${s.styles.list} ${X}`,children:k&&k.map(l=>g=="blog"&&e.jsx(ee.BlogArticleCard,{article:l},l._id))}),E&&e.jsx("div",{className:s.styles.loadMore,children:e.jsx(N.CallToAction,{as:"button",variant:"primary",onClick:()=>$(!1),disabled:a,icon:"refresh",iconAlignment:"left",className:a?s.styles.buttonIsLoading:"",children:a?"Loading...":"Load more"})})]})]})]})})}exports.DocumentListBlock=le;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("react"),P=require("../../ui/PortableTextRenderer/index.cjs"),Q=require("../../hooks/useStyleClasses.cjs"),V=require("../../contexts/LocaleBridge.cjs"),N=require("../../../index-BN6814Bi.cjs"),Y=require("../../../core/components/Input/index.cjs"),F=require("../../../core/components/Select/index.cjs"),ee=require("../../cards/BlogArticleCard/index.cjs"),s=require("../../../CategoryFilters-tDVNMlQO.cjs"),se=require("../../../x-Dft9NVe_.cjs"),te=[{label:"Newest",value:"date-desc"},{label:"Oldest",value:"date-asc"},{label:"Title A-Z",value:"title-asc"},{label:"Title Z-A",value:"title-desc"},{label:"Most Popular",value:"popular-desc"}];function le({heading:o,layout:z="grid",includeFilters:p,excludeFilters:v,limit:b=3,categoryFilters:d,documentType:g,styleOptions:D,initialArticles:j=[],initialTotalCount:L=0,initialIncludeCategories:I=[]}){const[k,c]=t.useState(j),[H,O]=t.useState(L),[C,W]=t.useState("date-desc"),[u,q]=t.useState(I),[T,i]=t.useState(j.length),[a,A]=t.useState(!1),[x,y]=t.useState(!1),[E,r]=t.useState(j.length<L),[f,_]=t.useState(""),[S,Z]=t.useState(""),{locale:G}=V.useLocaleBridge(),U=Q.useStyleClasses(D),R=t.useRef(!1),X={list:s.styles.list}[z??"grid"],J=l=>{W(l.target.value),c([]),i(0),r(!0)},B=()=>{y(!x)},K=()=>{c([]),i(0),r(!0),q([]),_(""),y(!1)},$=async(l=!1)=>{if(a||!E)return;A(!0);const h=new URLSearchParams({start:l?"0":String(T),limit:String(b),sort:C,documentType:g,locale:G});S&&h.append("search",S),u.forEach(n=>h.append("categories",n)),p==null||p.forEach(n=>h.append("include",n._id)),v==null||v.forEach(n=>h.append("exclude",n._id));try{const m=await(await fetch(`/api/articles?${h.toString()}`,{method:"GET"})).json();c(w=>l?m.articles:[...w,...m.articles]),i(w=>l?b:w+b),O(m.totalCount),r(T+m.articles.length<m.totalCount)}catch(n){console.error("Failed to load articles:",n),r(!1)}finally{A(!1)}},M=t.useCallback(()=>{typeof window<"u"&&window.innerWidth>768&&(y(!1),typeof document<"u"&&(document.body.style.overflow=""))},[]);return t.useEffect(()=>{const l=typeof window<"u";return l&&window.addEventListener("resize",M),()=>{l&&window.removeEventListener("resize",M)}},[]),t.useEffect(()=>{if(typeof document<"u")return document.body.style.overflow=x?"hidden":"",()=>{document.body.style.overflow=""}},[x]),t.useEffect(()=>{const l=setTimeout(()=>{Z(f)},500);return()=>clearTimeout(l)},[f]),t.useEffect(()=>{if(!R.current){R.current=!0;return}(S||C!=="date-desc"||u.length>0)&&$(!0)},[S,C,u.join(",")]),e.jsx("section",{className:`${s.styles.documentList} ${U}`,children:e.jsxs("article",{className:s.styles.container,children:[e.jsxs("div",{className:s.styles.heading,children:[(o==null?void 0:o.title)&&e.jsx(P.RichText,{blocks:o==null?void 0:o.title}),(o==null?void 0:o.description)&&e.jsx(P.RichText,{blocks:o==null?void 0:o.description})]}),e.jsxs("div",{className:s.styles.listContainer,children:[(d==null?void 0:d.length)&&e.jsxs("div",{className:s.styles.filterToggle,children:[e.jsx(N.CallToAction,{as:"button",variant:"secondary",onClick:B,disabled:a,icon:"settings",iconAlignment:"left",children:"Filters"}),e.jsx(N.CallToAction,{as:"button",variant:"link",onClick:K,disabled:a||u.length===0&&f.length===0,children:"Reset"})]}),d&&e.jsx(s.CategoryFilters,{categoryFilters:d,selectedCategories:u,setSelectedCategories:q,setArticles:c,setStart:i,setHasMore:r,showFilters:x,toggleFilters:B,isLoading:a}),e.jsxs("div",{className:s.styles.listWrapper,children:[e.jsxs("div",{className:s.styles.listHeader,children:[e.jsxs("div",{className:s.styles.listResults,children:["Results: ",e.jsx("span",{children:H})]}),e.jsxs("div",{className:s.styles.listHeaderFilters,children:[e.jsxs("div",{className:s.styles.listSearch,children:[e.jsx(Y.Input,{type:"text",name:"list-search",placeholder:"Search articles",value:f,onChange:l=>{_(l.target.value),c([]),i(0),r(!0)}}),f&&e.jsx("button",{className:s.styles.clearSearch,onClick:()=>{_(""),c([]),i(0),r(!0)},children:e.jsx(se.X,{size:21})})]}),e.jsx("div",{className:s.styles.listSort,children:e.jsx(F.Select,{id:"list-sort",name:"list-sort","aria-label":"Sort by",options:te,onChange:J})})]})]}),e.jsx("div",{className:`${s.styles.list} ${X}`,children:k&&k.map(l=>g=="blog"&&e.jsx(ee.BlogArticleCard,{article:l},l._id))}),E&&e.jsx("div",{className:s.styles.loadMore,children:e.jsx(N.CallToAction,{as:"button",variant:"primary",onClick:()=>$(!1),disabled:a,icon:"refresh",iconAlignment:"left",className:a?s.styles.buttonIsLoading:"",children:a?"Loading...":"Load more"})})]})]})]})})}exports.DocumentListBlock=le;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as a, useRef as Y, useCallback as F, useEffect as w } from "react";
|
|
3
3
|
import { RichText as _ } from "../../ui/PortableTextRenderer/index.mjs";
|
|
4
4
|
import { useStyleClasses as ee } from "../../hooks/useStyleClasses.mjs";
|
|
@@ -7,8 +7,8 @@ import { C as R } from "../../../index-C-E0ib2G.js";
|
|
|
7
7
|
import { Input as se } from "../../../core/components/Input/index.mjs";
|
|
8
8
|
import { Select as oe } from "../../../core/components/Select/index.mjs";
|
|
9
9
|
import { BlogArticleCard as ae } from "../../cards/BlogArticleCard/index.mjs";
|
|
10
|
-
import { s as t, C as
|
|
11
|
-
import { X as
|
|
10
|
+
import { s as t, C as re } from "../../../CategoryFilters-DJyQJ-ww.js";
|
|
11
|
+
import { X as le } from "../../../x-CnsEH4Ox.js";
|
|
12
12
|
const ne = [
|
|
13
13
|
{ label: "Newest", value: "date-desc" },
|
|
14
14
|
{ label: "Oldest", value: "date-asc" },
|
|
@@ -56,11 +56,11 @@ function we({
|
|
|
56
56
|
locale: X
|
|
57
57
|
});
|
|
58
58
|
C && h.append("search", C), m.forEach(
|
|
59
|
-
(
|
|
59
|
+
(l) => h.append("categories", l)
|
|
60
60
|
), S == null || S.forEach(
|
|
61
|
-
(
|
|
61
|
+
(l) => h.append("include", l._id)
|
|
62
62
|
), N == null || N.forEach(
|
|
63
|
-
(
|
|
63
|
+
(l) => h.append("exclude", l._id)
|
|
64
64
|
);
|
|
65
65
|
try {
|
|
66
66
|
const p = await (await fetch(`/api/articles?${h.toString()}`, {
|
|
@@ -69,8 +69,8 @@ function we({
|
|
|
69
69
|
i(
|
|
70
70
|
(E) => s ? p.articles : [...E, ...p.articles]
|
|
71
71
|
), d((E) => s ? y : E + y), q(p.totalCount), c(j + p.articles.length < p.totalCount);
|
|
72
|
-
} catch (
|
|
73
|
-
console.error("Failed to load articles:",
|
|
72
|
+
} catch (l) {
|
|
73
|
+
console.error("Failed to load articles:", l), c(!1);
|
|
74
74
|
} finally {
|
|
75
75
|
z(!1);
|
|
76
76
|
}
|
|
@@ -98,13 +98,13 @@ function we({
|
|
|
98
98
|
return;
|
|
99
99
|
}
|
|
100
100
|
(C || L !== "date-desc" || m.length > 0) && P(!0);
|
|
101
|
-
}, [C, L, m.join(",")]), /* @__PURE__ */ e("section", { className: `${t.documentList} ${J}`, children: /* @__PURE__ */
|
|
102
|
-
/* @__PURE__ */
|
|
101
|
+
}, [C, L, m.join(",")]), /* @__PURE__ */ e("section", { className: `${t.documentList} ${J}`, children: /* @__PURE__ */ r("article", { className: t.container, children: [
|
|
102
|
+
/* @__PURE__ */ r("div", { className: t.heading, children: [
|
|
103
103
|
(o == null ? void 0 : o.title) && /* @__PURE__ */ e(_, { blocks: o == null ? void 0 : o.title }),
|
|
104
104
|
(o == null ? void 0 : o.description) && /* @__PURE__ */ e(_, { blocks: o == null ? void 0 : o.description })
|
|
105
105
|
] }),
|
|
106
|
-
/* @__PURE__ */
|
|
107
|
-
(f == null ? void 0 : f.length) && /* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ r("div", { className: t.listContainer, children: [
|
|
107
|
+
(f == null ? void 0 : f.length) && /* @__PURE__ */ r("div", { className: t.filterToggle, children: [
|
|
108
108
|
/* @__PURE__ */ e(
|
|
109
109
|
R,
|
|
110
110
|
{
|
|
@@ -129,7 +129,7 @@ function we({
|
|
|
129
129
|
)
|
|
130
130
|
] }),
|
|
131
131
|
f && /* @__PURE__ */ e(
|
|
132
|
-
|
|
132
|
+
re,
|
|
133
133
|
{
|
|
134
134
|
categoryFilters: f,
|
|
135
135
|
selectedCategories: m,
|
|
@@ -142,14 +142,14 @@ function we({
|
|
|
142
142
|
isLoading: n
|
|
143
143
|
}
|
|
144
144
|
),
|
|
145
|
-
/* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ r("div", { className: t.listWrapper, children: [
|
|
146
|
+
/* @__PURE__ */ r("div", { className: t.listHeader, children: [
|
|
147
|
+
/* @__PURE__ */ r("div", { className: t.listResults, children: [
|
|
148
148
|
"Results: ",
|
|
149
149
|
/* @__PURE__ */ e("span", { children: Z })
|
|
150
150
|
] }),
|
|
151
|
-
/* @__PURE__ */
|
|
152
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ r("div", { className: t.listHeaderFilters, children: [
|
|
152
|
+
/* @__PURE__ */ r("div", { className: t.listSearch, children: [
|
|
153
153
|
/* @__PURE__ */ e(
|
|
154
154
|
se,
|
|
155
155
|
{
|
|
@@ -169,7 +169,7 @@ function we({
|
|
|
169
169
|
onClick: () => {
|
|
170
170
|
k(""), i([]), d(0), c(!0);
|
|
171
171
|
},
|
|
172
|
-
children: /* @__PURE__ */ e(
|
|
172
|
+
children: /* @__PURE__ */ e(le, { size: 21 })
|
|
173
173
|
}
|
|
174
174
|
)
|
|
175
175
|
] }),
|
|
@@ -178,7 +178,7 @@ function we({
|
|
|
178
178
|
{
|
|
179
179
|
id: "list-sort",
|
|
180
180
|
name: "list-sort",
|
|
181
|
-
label: "Sort by",
|
|
181
|
+
"aria-label": "Sort by",
|
|
182
182
|
options: ne,
|
|
183
183
|
onChange: Q
|
|
184
184
|
}
|
package/dist/next.d.ts
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { AccordionBlockProps } from './AccordionBlock.types';
|
|
2
|
-
import {
|
|
1
|
+
import { AccordionBlockProps } from './next/blocks/AccordionBlock/AccordionBlock.types';
|
|
2
|
+
import { AccordionBlockProps as AccordionBlockProps_2 } from './AccordionBlock.types';
|
|
3
|
+
import { AdditionalCategoriesBlockProps } from './next/blocks/AdditionalCategoriesBlock/AdditionalCategoriesBlock.types';
|
|
4
|
+
import { AdditionalCategoriesBlockProps as AdditionalCategoriesBlockProps_2 } from './AdditionalCategoriesBlock.types';
|
|
3
5
|
import { ArticleItem } from './next/types/article';
|
|
4
|
-
import { CardGridBlockProps } from './CardGridBlock.types';
|
|
5
|
-
import {
|
|
6
|
+
import { CardGridBlockProps } from './next/blocks/CardGridBlock/CardGridBlock.types';
|
|
7
|
+
import { CardGridBlockProps as CardGridBlockProps_2 } from './CardGridBlock.types';
|
|
8
|
+
import { CarouselBlockProps } from './next/blocks/CarouselBlock/CarouselBlock.types';
|
|
9
|
+
import { CarouselBlockProps as CarouselBlockProps_2 } from './CarouselBlock.types';
|
|
6
10
|
import { CategoryProps } from './next/types/category';
|
|
7
11
|
import { ContentBlockProps } from './next/blocks/ContentBlock/ContentBlock.types';
|
|
8
12
|
import { ContentBlockProps as ContentBlockProps_2 } from './ContentBlock.types';
|
|
9
13
|
import { default as default_2 } from 'react';
|
|
10
|
-
import { DocumentListBlockProps } from './DocumentListBlock.types';
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
+
import { DocumentListBlockProps } from './next/blocks/DocumentListBlock/DocumentListBlock.types';
|
|
15
|
+
import { DocumentListBlockProps as DocumentListBlockProps_2 } from './DocumentListBlock.types';
|
|
16
|
+
import { FaqBlockProps } from './next/blocks/FaqBlock/FaqBlock.types';
|
|
17
|
+
import { FaqBlockProps as FaqBlockProps_2 } from './FaqBlock.types';
|
|
18
|
+
import { FeaturedDocumentsBlockProps } from './next/blocks/FeaturedDocumentsBlock/FeaturedDocumentsBlock.types';
|
|
19
|
+
import { FeaturedDocumentsBlockProps as FeaturedDocumentsBlockProps_2 } from './FeaturedDocumentsBlock.types';
|
|
20
|
+
import { HeroBlockProps } from './next/blocks/HeroBlock/HeroBlock.types';
|
|
21
|
+
import { HeroBlockProps as HeroBlockProps_2 } from './HeroBlock.types';
|
|
14
22
|
import { JSX } from 'react/jsx-runtime';
|
|
23
|
+
import { Link } from './next/types/link';
|
|
15
24
|
import { LinkProps } from 'next/link';
|
|
16
25
|
import { NavigationData } from './next/types/navigation';
|
|
17
26
|
import { PageSection } from './next/types/pageSection';
|
|
@@ -25,20 +34,31 @@ import { SingletonBlockProps } from './next/types/singleton';
|
|
|
25
34
|
import { SiteSettings } from './next/types/site';
|
|
26
35
|
import { SpotlightProps } from './next/types/spotlight';
|
|
27
36
|
import { SpotlightProps as SpotlightProps_2 } from '../../types/spotlight';
|
|
28
|
-
import { StickyScrollBlockProps } from './StickyScrollBlock.types';
|
|
37
|
+
import { StickyScrollBlockProps } from './next/blocks/StickyScrollBlock/StickyScrollBlock.types';
|
|
38
|
+
import { StickyScrollBlockProps as StickyScrollBlockProps_2 } from './StickyScrollBlock.types';
|
|
29
39
|
import { Styles } from './next/types/styles';
|
|
30
|
-
import { TabsBlockProps } from './TabsBlock.types';
|
|
31
|
-
import {
|
|
40
|
+
import { TabsBlockProps } from './next/blocks/TabsBlock/TabsBlock.types';
|
|
41
|
+
import { TabsBlockProps as TabsBlockProps_2 } from './TabsBlock.types';
|
|
42
|
+
import { WasHelpfulBlockProps } from './next/blocks/WasHelpfulBlock/WasHelpful.types';
|
|
43
|
+
import { WasHelpfulBlockProps as WasHelpfulBlockProps_2 } from './WasHelpful.types';
|
|
32
44
|
|
|
33
|
-
export declare function AccordionBlock({ heading, items, className, styleOptions, }:
|
|
45
|
+
export declare function AccordionBlock({ heading, items, className, styleOptions, }: AccordionBlockProps_2): JSX.Element;
|
|
34
46
|
|
|
35
|
-
export
|
|
47
|
+
export { AccordionBlockProps }
|
|
48
|
+
|
|
49
|
+
export declare function AdditionalCategoriesBlock({ categories, type, }: AdditionalCategoriesBlockProps_2): JSX.Element | undefined;
|
|
50
|
+
|
|
51
|
+
export { AdditionalCategoriesBlockProps }
|
|
36
52
|
|
|
37
53
|
export { ArticleItem }
|
|
38
54
|
|
|
39
|
-
export declare function CardGridBlock({ heading, grid, callToAction, styleOptions, }:
|
|
55
|
+
export declare function CardGridBlock({ heading, grid, callToAction, styleOptions, }: CardGridBlockProps_2): JSX.Element;
|
|
56
|
+
|
|
57
|
+
export { CardGridBlockProps }
|
|
40
58
|
|
|
41
|
-
export declare function CarouselBlock({ heading, carouselOptions, items, styleOptions, }:
|
|
59
|
+
export declare function CarouselBlock({ heading, carouselOptions, items, styleOptions, }: CarouselBlockProps_2): JSX.Element;
|
|
60
|
+
|
|
61
|
+
export { CarouselBlockProps }
|
|
42
62
|
|
|
43
63
|
export { CategoryProps }
|
|
44
64
|
|
|
@@ -46,13 +66,21 @@ export declare function ContentBlock({ layout, heading, image, video, metrics, c
|
|
|
46
66
|
|
|
47
67
|
export { ContentBlockProps }
|
|
48
68
|
|
|
49
|
-
export declare function DocumentListBlock({ heading, layout, includeFilters, excludeFilters, limit, categoryFilters, documentType, styleOptions, initialArticles, initialTotalCount, initialIncludeCategories, }:
|
|
69
|
+
export declare function DocumentListBlock({ heading, layout, includeFilters, excludeFilters, limit, categoryFilters, documentType, styleOptions, initialArticles, initialTotalCount, initialIncludeCategories, }: DocumentListBlockProps_2): JSX.Element;
|
|
70
|
+
|
|
71
|
+
export { DocumentListBlockProps }
|
|
72
|
+
|
|
73
|
+
export declare function FaqBlock({ heading, items, className, styleOptions, }: FaqBlockProps_2): JSX.Element;
|
|
50
74
|
|
|
51
|
-
export
|
|
75
|
+
export { FaqBlockProps }
|
|
52
76
|
|
|
53
|
-
export declare function FeaturedDocumentsBlock({ heading, selectionMode, layout, limit, articles, manualArticles, documentType, sortBy, callToAction, styleOptions, }:
|
|
77
|
+
export declare function FeaturedDocumentsBlock({ heading, selectionMode, layout, limit, articles, manualArticles, documentType, sortBy, callToAction, styleOptions, }: FeaturedDocumentsBlockProps_2): 0 | JSX.Element | undefined;
|
|
54
78
|
|
|
55
|
-
export
|
|
79
|
+
export { FeaturedDocumentsBlockProps }
|
|
80
|
+
|
|
81
|
+
export declare function HeroBlock({ heading, image, video, callToAction, pageData, styleOptions, }: HeroBlockProps_2): JSX.Element;
|
|
82
|
+
|
|
83
|
+
export { HeroBlockProps }
|
|
56
84
|
|
|
57
85
|
declare type HeroContextType = {
|
|
58
86
|
isFullbleedHeroAtTop: boolean;
|
|
@@ -63,6 +91,8 @@ export declare function HeroProvider({ children }: {
|
|
|
63
91
|
children: React.ReactNode;
|
|
64
92
|
}): JSX.Element;
|
|
65
93
|
|
|
94
|
+
export { Link }
|
|
95
|
+
|
|
66
96
|
export declare function LocaleBridgeProvider({ children, value, }: {
|
|
67
97
|
children: default_2.ReactNode;
|
|
68
98
|
value: LocaleBridgeValue;
|
|
@@ -117,16 +147,22 @@ declare interface SpotlightCardProps {
|
|
|
117
147
|
|
|
118
148
|
export { SpotlightProps }
|
|
119
149
|
|
|
120
|
-
export declare function StickyScrollBlock({ heading, items, showNumbers, }:
|
|
150
|
+
export declare function StickyScrollBlock({ heading, items, showNumbers, }: StickyScrollBlockProps_2): JSX.Element;
|
|
151
|
+
|
|
152
|
+
export { StickyScrollBlockProps }
|
|
121
153
|
|
|
122
154
|
export { Styles }
|
|
123
155
|
|
|
124
|
-
export declare function TabsBlock({ heading, image, items, callToAction, styleOptions, }:
|
|
156
|
+
export declare function TabsBlock({ heading, image, items, callToAction, styleOptions, }: TabsBlockProps_2): JSX.Element | undefined;
|
|
157
|
+
|
|
158
|
+
export { TabsBlockProps }
|
|
125
159
|
|
|
126
160
|
export declare function useHeroContext(): HeroContextType;
|
|
127
161
|
|
|
128
162
|
export declare function useLocaleBridge(): LocaleBridgeValue;
|
|
129
163
|
|
|
130
|
-
export declare function WasHelpfulBlock({ page, type }:
|
|
164
|
+
export declare function WasHelpfulBlock({ page, type }: WasHelpfulBlockProps_2): JSX.Element;
|
|
165
|
+
|
|
166
|
+
export { WasHelpfulBlockProps }
|
|
131
167
|
|
|
132
168
|
export { }
|