quirk-ui 0.1.145 → 0.1.147
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/{CategoryFilters-CR4MkgvA.js → CategoryFilters-BJ_M7DHy.js} +1 -1
- package/dist/{CategoryFilters-oA43LCO6.cjs → CategoryFilters-DTw0ob7y.cjs} +1 -1
- package/dist/core/components/Button/Button.test.cjs +1 -1
- package/dist/core/components/Button/Button.test.mjs +1 -1
- package/dist/core/components/Button/index.cjs +1 -1
- package/dist/core/components/Button/index.mjs +1 -1
- package/dist/core/components/Footer/index.cjs +1 -1
- package/dist/core/components/Footer/index.mjs +1 -1
- package/dist/core/components/NavBar/index.cjs +1 -1
- package/dist/core/components/NavBar/index.mjs +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +2 -0
- package/dist/core.mjs +1 -1
- package/dist/{index-Cahn_yoK.js → index-BnvfQt_k.js} +92 -83
- package/dist/index-D7SAxT5B.cjs +31 -0
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.mjs +1 -1
- package/dist/next/blocks/DocumentListBlock/CategoryFilters.cjs +1 -1
- package/dist/next/blocks/DocumentListBlock/CategoryFilters.mjs +2 -2
- package/dist/next/blocks/DocumentListBlock/CategoryFilters.test.cjs +1 -1
- package/dist/next/blocks/DocumentListBlock/CategoryFilters.test.mjs +1 -1
- package/dist/next/blocks/DocumentListBlock/index.cjs +1 -1
- package/dist/next/blocks/DocumentListBlock/index.mjs +2 -2
- package/dist/next/blocks/FormBlock/index.cjs +1 -1
- package/dist/next/blocks/FormBlock/index.mjs +1 -1
- package/dist/next/blocks/TabsBlock/index.cjs +1 -1
- package/dist/next/blocks/TabsBlock/index.mjs +1 -1
- package/dist/next/blocks/WasHelpfulBlock/index.cjs +1 -1
- package/dist/next/blocks/WasHelpfulBlock/index.mjs +1 -1
- package/dist/next/cards/SpotlightCard/index.cjs +1 -1
- package/dist/next/cards/SpotlightCard/index.mjs +1 -1
- package/dist/next/ui/CallToAction/index.cjs +1 -1
- package/dist/next/ui/CallToAction/index.mjs +45 -44
- package/package.json +1 -1
- package/dist/index-CAS0iFfs.cjs +0 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { B as h } from "./index-
|
|
2
|
+
import { B as h } from "./index-BnvfQt_k.js";
|
|
3
3
|
import { X as v } from "./x-CnsEH4Ox.js";
|
|
4
4
|
import './CategoryFilters.css';const p = "_documentList_1vg9o_1", u = "_container_1vg9o_9", m = "_heading_1vg9o_20", b = "_title_1vg9o_25", f = "_eyebrow_1vg9o_30", H = "_listContainer_1vg9o_34", L = "_listWrapper_1vg9o_45", S = "_list_1vg9o_34", F = "_listHeader_1vg9o_66", w = "_listSearch_1vg9o_79", y = "_clearSearch_1vg9o_106", C = "_listHeaderFilters_1vg9o_125", k = "_listResults_1vg9o_136", x = "_listSort_1vg9o_140", N = "_filterToggle_1vg9o_163", I = "_filterHeader_1vg9o_178", M = "_loadMore_1vg9o_199", R = "_filterList_1vg9o_203", T = "_listFilters_1vg9o_210", W = "_applyFilters_1vg9o_218", j = "_show_1vg9o_247", B = "_hide_1vg9o_256", $ = "_buttonIsLoading_1vg9o_307", s = {
|
|
5
5
|
documentList: p,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require('./CategoryFilters.css');const t=require("react/jsx-runtime"),g=require("./index-
|
|
1
|
+
"use strict";require('./CategoryFilters.css');const t=require("react/jsx-runtime"),g=require("./index-D7SAxT5B.cjs"),h=require("./x-Dft9NVe_.cjs"),v="_documentList_1vg9o_1",u="_container_1vg9o_9",p="_heading_1vg9o_20",x="_title_1vg9o_25",b="_eyebrow_1vg9o_30",y="_listContainer_1vg9o_34",F="_listWrapper_1vg9o_45",H="_list_1vg9o_34",L="_listHeader_1vg9o_66",S="_listSearch_1vg9o_79",j="_clearSearch_1vg9o_106",m="_listHeaderFilters_1vg9o_125",f="_listResults_1vg9o_136",w="_listSort_1vg9o_140",C="_filterToggle_1vg9o_163",k="_filterHeader_1vg9o_178",q="_loadMore_1vg9o_199",N="_filterList_1vg9o_203",$="_listFilters_1vg9o_210",I="_applyFilters_1vg9o_218",M="_show_1vg9o_247",R="_hide_1vg9o_256",T="_buttonIsLoading_1vg9o_307",e={documentList:v,container:u,heading:p,title:x,eyebrow:b,listContainer:y,listWrapper:F,list:H,listHeader:L,listSearch:S,clearSearch:j,listHeaderFilters:m,listResults:f,listSort:w,filterToggle:C,filterHeader:k,loadMore:q,filterList:N,listFilters:$,applyFilters:I,show:M,hide:R,buttonIsLoading:T};function W({categoryFilters:i,selectedCategories:o,onSelectionChange:n,showFilters:_,toggleFilters:l,isLoading:r}){return t.jsxs("div",{className:`${e.listFilters} ${_?e.show:e.hide}`,children:[t.jsxs("div",{className:e.filterHeader,children:[t.jsx("h5",{children:"Filters"}),t.jsx("button",{onClick:l,children:t.jsx(h.X,{size:24})})]}),t.jsx("div",{className:e.filterList,children:i==null?void 0:i.map(s=>t.jsxs("label",{children:[t.jsx("input",{type:"checkbox",value:s._id,checked:o.includes(s._id),onChange:c=>{const a=c.target.checked?[...o,s._id]:o.filter(d=>d!==s._id);n(a)}}),s.title]},s._id))}),t.jsx(g.Button,{as:"button",variant:"secondary",onClick:l,disabled:r,className:e.applyFilters,children:"Apply Filters"})]})}exports.CategoryFilters=W;exports.styles=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),e=require("../../../react.esm-C_9Ma9mj.cjs"),r=require("../../../index-
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),e=require("../../../react.esm-C_9Ma9mj.cjs"),r=require("../../../index-D7SAxT5B.cjs");require("../../../index-CW_Ehh1q.cjs");e.describe("Button",()=>{e.describe("Rendering as button",()=>{e.it("renders as a button by default",()=>{e.render(n.jsx(r.Button,{variant:"primary",children:"Click Me"}));const t=e.screen.getByRole("button",{name:"Click Me"});e.globalExpect(t).toBeInTheDocument(),e.globalExpect(t.tagName).toBe("BUTTON")}),e.it("renders as a button when 'as' is set to 'button'",()=>{e.render(n.jsx(r.Button,{as:"button",variant:"primary",children:"Click Me"}));const t=e.screen.getByRole("button",{name:"Click Me"});e.globalExpect(t).toBeInTheDocument(),e.globalExpect(t).toHaveClass("button","primary")}),e.it("has type='button' by default",()=>{e.render(n.jsx(r.Button,{variant:"primary",children:"Click Me"}));const t=e.screen.getByRole("button");e.globalExpect(t).toHaveAttribute("type","button")}),e.it("respects the disabled prop on buttons",()=>{e.render(n.jsx(r.Button,{as:"button",variant:"primary",disabled:!0,children:"Disabled"}));const t=e.screen.getByRole("button",{name:"Disabled"});e.globalExpect(t).toBeDisabled()}),e.it("calls onClick when clicked",()=>{const t=e.vi.fn();e.render(n.jsx(r.Button,{variant:"primary",onClick:t,children:"Click Me"}));const o=e.screen.getByRole("button");e.fireEvent.click(o),e.globalExpect(t).toHaveBeenCalledTimes(1)}),e.it("does not call onClick when disabled",()=>{const t=e.vi.fn();e.render(n.jsx(r.Button,{variant:"primary",onClick:t,disabled:!0,children:"Disabled"}));const o=e.screen.getByRole("button");e.fireEvent.click(o),e.globalExpect(t).not.toHaveBeenCalled()})}),e.describe("Rendering as anchor",()=>{e.it("renders as an anchor when 'as' is set to 'a'",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",variant:"link",children:"Click Me"}));const t=e.screen.getByRole("link",{name:"Click Me"});e.globalExpect(t).toBeInTheDocument(),e.globalExpect(t.tagName).toBe("A"),e.globalExpect(t).toHaveAttribute("href","/test"),e.globalExpect(t).toHaveClass("button","link")}),e.it("adds rel='noopener noreferrer' when target is '_blank'",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",target:"_blank",variant:"link",children:"External"}));const t=e.screen.getByRole("link",{name:"External"});e.globalExpect(t).toHaveAttribute("rel","noopener noreferrer")}),e.it("preserves custom rel attribute and adds security",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",target:"_blank",rel:"author",variant:"link",children:"External"}));const t=e.screen.getByRole("link");e.globalExpect(t).toHaveAttribute("rel","author noopener noreferrer")}),e.it("does not add security rel for internal links",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",variant:"link",children:"Internal"}));const t=e.screen.getByRole("link");e.globalExpect(t).not.toHaveAttribute("rel")}),e.it("adds aria-disabled when disabled",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",variant:"link",disabled:!0,children:"Disabled Link"}));const t=e.screen.getByRole("link");e.globalExpect(t).toHaveAttribute("aria-disabled","true")})}),e.describe("Scroll button",()=>{e.it("renders as a scroll button when 'as' is set to 'scroll'",()=>{e.render(n.jsx(r.Button,{as:"scroll",scrollTarget:"section-1",variant:"primary",children:"Scroll Down"}));const t=e.screen.getByRole("button",{name:"Scroll to section-1"});e.globalExpect(t).toBeInTheDocument()}),e.it("has proper aria-label for scroll button",()=>{e.render(n.jsx(r.Button,{as:"scroll",scrollTarget:"footer",variant:"primary",children:"To Footer"}));const t=e.screen.getByRole("button");e.globalExpect(t).toHaveAttribute("aria-label","Scroll to footer")}),e.it("scrolls to target element when clicked",()=>{const t=document.createElement("div");t.id="target-section",document.body.appendChild(t);const o=e.vi.fn();t.scrollIntoView=o,e.render(n.jsx(r.Button,{as:"scroll",scrollTarget:"target-section",variant:"primary",children:"Scroll"}));const a=e.screen.getByRole("button");e.fireEvent.click(a),e.globalExpect(o).toHaveBeenCalledWith({behavior:"smooth",block:"start"}),document.body.removeChild(t)}),e.it("does not error if scroll target does not exist",()=>{e.render(n.jsx(r.Button,{as:"scroll",scrollTarget:"non-existent",variant:"primary",children:"Scroll"}));const t=e.screen.getByRole("button");e.globalExpect(()=>e.fireEvent.click(t)).not.toThrow()})}),e.describe("Variants",()=>{["primary","primaryInverted","secondary","secondaryInverted","link","linkInverted","underline","underlineInverted","blurred","blurredInverted"].forEach(o=>{e.it(`applies ${o} variant class`,()=>{e.render(n.jsx(r.Button,{variant:o,children:"Button"}));const a=e.screen.getByRole("button");e.globalExpect(a).toHaveClass(o)})}),e.it("uses primary variant by default",()=>{e.render(n.jsx(r.Button,{children:"Default"}));const o=e.screen.getByRole("button");e.globalExpect(o).toHaveClass("primary")})}),e.describe("Icons",()=>{e.it("includes icon when icon prop is provided",()=>{e.render(n.jsx(r.Button,{variant:"primary",icon:"arrow-right",children:"Next"}));const t=document.querySelector(".icon");e.globalExpect(t).toBeInTheDocument();const o=t==null?void 0:t.querySelector("svg");e.globalExpect(o).toBeInTheDocument()}),e.it("places icon on the left when iconAlignment is 'left'",()=>{e.render(n.jsx(r.Button,{variant:"primary",icon:"arrow-left",iconAlignment:"left",children:"Back"}));const t=document.querySelector(".content");e.globalExpect(t).toHaveClass("iconLeft")}),e.it("places icon on the right when iconAlignment is 'right'",()=>{e.render(n.jsx(r.Button,{variant:"primary",icon:"arrow-right",iconAlignment:"right",children:"Next"}));const t=document.querySelector(".content");e.globalExpect(t).toHaveClass("iconRight")}),e.it("uses right alignment by default",()=>{e.render(n.jsx(r.Button,{variant:"primary",icon:"arrow-right",children:"Default Icon"}));const t=document.querySelector(".content");e.globalExpect(t).toHaveClass("iconRight")}),e.it("icon has aria-hidden attribute",()=>{e.render(n.jsx(r.Button,{variant:"primary",icon:"settings",children:"Settings"}));const t=document.querySelector(".icon");e.globalExpect(t).toHaveAttribute("aria-hidden","true")}),e.it("works with anchor links",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",variant:"link",icon:"new-tab",children:"External"}));const t=document.querySelector(".icon");e.globalExpect(t).toBeInTheDocument()})}),e.describe("Image display",()=>{e.it("renders image when displayType is 'image' and imageSrc is provided",()=>{e.render(n.jsx(r.Button,{variant:"primary",displayType:"image",imageSrc:"/logo.png",imageAlt:"Company Logo",children:"Text not shown"}));const t=document.querySelector("img");e.globalExpect(t).toBeInTheDocument(),e.globalExpect(t).toHaveAttribute("src","/logo.png"),e.globalExpect(t).toHaveAttribute("alt","Company Logo")}),e.it("renders ImageComponent when provided",()=>{const t=()=>n.jsx("div",{"data-testid":"custom-image",children:"Custom"});e.render(n.jsx(r.Button,{variant:"primary",displayType:"image",ImageComponent:n.jsx(t,{}),children:"Text"})),e.globalExpect(e.screen.getByTestId("custom-image")).toBeInTheDocument()}),e.it("applies image class when displayType is image",()=>{e.render(n.jsx(r.Button,{variant:"primary",displayType:"image",imageSrc:"/logo.png",children:"Text"}));const t=e.screen.getByRole("button");e.globalExpect(t).toHaveClass("image"),e.globalExpect(t).not.toHaveClass("primary")})}),e.describe("Custom className",()=>{e.it("applies custom className",()=>{e.render(n.jsx(r.Button,{variant:"primary",className:"custom-button",children:"Custom"}));const t=e.screen.getByRole("button");e.globalExpect(t).toHaveClass("custom-button"),e.globalExpect(t).toHaveClass("button"),e.globalExpect(t).toHaveClass("primary")})}),e.describe("Accessibility",()=>{e.it("has button role for button element",()=>{e.render(n.jsx(r.Button,{variant:"primary",children:"Click"})),e.globalExpect(e.screen.getByRole("button")).toBeInTheDocument()}),e.it("has link role for anchor element",()=>{e.render(n.jsx(r.Button,{as:"a",href:"/test",variant:"link",children:"Link"})),e.globalExpect(e.screen.getByRole("link")).toBeInTheDocument()}),e.it("supports aria attributes",()=>{e.render(n.jsx(r.Button,{variant:"primary","aria-label":"Custom Label","aria-describedby":"desc",children:"Button"}));const t=e.screen.getByRole("button");e.globalExpect(t).toHaveAttribute("aria-label","Custom Label"),e.globalExpect(t).toHaveAttribute("aria-describedby","desc")})}),e.describe("Edge cases",()=>{e.it("handles undefined variant",()=>{e.render(n.jsx(r.Button,{variant:void 0,children:"No Variant"}));const t=e.screen.getByRole("button");e.globalExpect(t).toHaveClass("button")}),e.it("handles empty children",()=>{e.render(n.jsx(r.Button,{variant:"primary",children:"Primary"}));const t=e.screen.getByRole("button");e.globalExpect(t).toBeInTheDocument()}),e.it("handles complex children",()=>{e.render(n.jsxs(r.Button,{variant:"primary",children:[n.jsx("span",{children:"Complex"}),n.jsx("strong",{children:"Children"})]})),e.globalExpect(e.screen.getByText("Complex")).toBeInTheDocument(),e.globalExpect(e.screen.getByText("Children")).toBeInTheDocument()})})});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as n, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { d as s, i as o, r as a, s as i, g as t, v as u, f as c } from "../../../react.esm-DjxyacK8.js";
|
|
3
|
-
import { B as r } from "../../../index-
|
|
3
|
+
import { B as r } from "../../../index-BnvfQt_k.js";
|
|
4
4
|
import "../../../index-DPGXWTtt.js";
|
|
5
5
|
s("Button", () => {
|
|
6
6
|
s("Rendering as button", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const e=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const e=require("../../../index-D7SAxT5B.cjs");require("../../../index-CBK5rp6X.cjs");require("../../../external-link-DDShu-48.cjs");require("../../../play-CQBnZgNa.cjs");require("../../../chevron-right-motlyADs.cjs");require("../../../chevron-down-DfK1XBl3.cjs");require("../../../arrow-right-DO6S4vfx.cjs");require("../../../arrow-left-4E3t8axP.cjs");exports.Button=e.Button;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { B as s } from "../../../index-
|
|
3
|
+
import { B as s } from "../../../index-BnvfQt_k.js";
|
|
4
4
|
import "../../../index-CeBA0PT0.js";
|
|
5
5
|
import "../../../external-link-BOPobeQJ.js";
|
|
6
6
|
import "../../../play-DYgKiSaf.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index52.css');const e=require("react/jsx-runtime"),T=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index52.css');const e=require("react/jsx-runtime"),T=require("../../../index-D7SAxT5B.cjs"),k=require("../ButtonGroup/index.cjs"),s=require("../../../index-CBK5rp6X.cjs"),$=require("../../../external-link-DDShu-48.cjs"),F="_footer_1lalq_1",I="_container_1lalq_10",S="_primaryNav_1lalq_24",w="_secondaryNav_1lalq_35",L="_details_1lalq_72",A="_nav_1lalq_86",B="_logo_1lalq_94",E="_socialItems_1lalq_109",C="_group_1lalq_116",M="_groups_1lalq_126",z="_groupTitle_1lalq_137",G="_sublinks_1lalq_146",Y="_link_1lalq_154",O="_newTabIcon_1lalq_172",P="_bottom_1lalq_186",U="_left_1lalq_197",D="_center_1lalq_217",H="_right_1lalq_247",a={footer:F,container:I,primaryNav:S,secondaryNav:w,details:L,nav:A,logo:B,socialItems:E,group:C,groups:M,groupTitle:z,sublinks:G,link:Y,newTabIcon:O,bottom:P,left:U,center:D,right:H},J={Facebook:s.FaFacebook,Twitter:s.FaTwitter,LinkedIn:s.FaLinkedin,Instagram:s.FaInstagram,YouTube:s.FaYoutube},K={left:a.left,center:a.center,right:a.right};function Q({logo:d,items:u,primaryInfo:g,secondaryInfo:h,utilityItems:r,socialItems:t,alignment:m="left",copyright:v,className:b,style:j,...q}){const i=(l,o=!1)=>l.map((n,N)=>{var x;const f=n._key??`${n.label}-${N}`,c=!!((x=n.sublinks)!=null&&x.length),y=!!n.href,_=n.icon?J[n.icon]:void 0,p=e.jsxs(e.Fragment,{children:[!o&&n.label,_&&e.jsx(_,{"aria-hidden":"true"}),!_&&n.isExternal&&e.jsx($.ExternalLink,{className:a.newTabIcon,size:14,"aria-hidden":"true"})]});return e.jsxs("div",{className:a.group,children:[y?e.jsx("a",{href:n.href,className:`${a.link}${c?` ${a.groupTitle}`:""}`,target:n.isExternal?"_blank":"_self",rel:n.isExternal?"noopener noreferrer":void 0,"aria-label":o?n.label:void 0,onClick:n.onClick,children:p}):e.jsx("span",{className:c?a.groupTitle:void 0,children:p}),c&&e.jsx("div",{className:a.sublinks,"aria-label":`${n.label} links`,children:i(n.sublinks)})]},f)});return e.jsx("footer",{className:`${a.footer} ${K[m]}${b?` ${b}`:""}`,style:j,...q,children:e.jsxs("div",{className:a.container,children:[e.jsxs("div",{className:a.primaryNav,children:[e.jsxs("div",{className:a.details,children:[d&&e.jsx("div",{className:a.logo,children:d}),t&&t.length>0&&e.jsx("div",{className:a.socialItems,"aria-label":"Social media links",children:i(t,!0)}),g&&e.jsx("div",{children:g}),h&&e.jsx("div",{children:h})]}),u.length>0&&e.jsx("nav",{className:a.nav,id:"footer-nav","aria-label":"Footer navigation",children:e.jsx("div",{className:a.groups,children:i(u)})})]}),e.jsxs("div",{className:a.secondaryNav,children:[v&&e.jsx("div",{className:a.bottom,children:e.jsx("span",{children:v})}),r&&r.length>0&&e.jsx("nav",{"aria-label":"Utility links",children:e.jsx(k.ButtonGroup,{orientation:"horizontal",children:r.map((l,o)=>e.jsx(T.Button,{as:"a",href:l.href??"/",variant:l.variant??"primary",displayType:l.displayType??"text",imageSrc:l.imageSrc,imageAlt:l.imageAlt,"aria-label":l.ariaLabel??(typeof l.label=="string"?l.label:""),icon:l.icon,iconAlignment:l.iconAlignment,children:l.label},l._key??o))})})]})]})})}exports.Footer=Q;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l, jsxs as o, Fragment as F } from "react/jsx-runtime";
|
|
2
|
-
import { B as $ } from "../../../index-
|
|
2
|
+
import { B as $ } from "../../../index-BnvfQt_k.js";
|
|
3
3
|
import { ButtonGroup as x } from "../ButtonGroup/index.mjs";
|
|
4
4
|
import { a as I, b as w, c as E, d as S, e as A } from "../../../index-CeBA0PT0.js";
|
|
5
5
|
import { E as L } from "../../../external-link-BOPobeQJ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),ae=require("../Modal/index.cjs"),A=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),ae=require("../Modal/index.cjs"),A=require("../../../index-D7SAxT5B.cjs"),ie=require("../ButtonGroup/index.cjs"),e=require("../../../NavLink-2Civ1Vxf.cjs"),K=require("../../utils/NoScroll/noScroll.cjs"),Ee=require("../../../chevron-right-motlyADs.cjs"),V=require("../../../external-link-DDShu-48.cjs"),_e=require("../../../x-Dft9NVe_.cjs"),re=require("../../../createLucideIcon-DpotSgUx.cjs"),Le=require("../../../chevron-down-DfK1XBl3.cjs");/**
|
|
2
2
|
* @license lucide-react v0.488.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as a, jsxs as i, Fragment as ce } from "react/jsx-runtime";
|
|
2
2
|
import { useState as v, useRef as F, useCallback as _, useEffect as z } from "react";
|
|
3
3
|
import { Modal as oe } from "../Modal/index.mjs";
|
|
4
|
-
import { B as Y, M as Ae } from "../../../index-
|
|
4
|
+
import { B as Y, M as Ae } from "../../../index-BnvfQt_k.js";
|
|
5
5
|
import { ButtonGroup as de } from "../ButtonGroup/index.mjs";
|
|
6
6
|
import { s as e, N as Re } from "../../../NavLink-u4KvVgDl.js";
|
|
7
7
|
import { lockScroll as Be, unlockScroll as ue } from "../../utils/NoScroll/noScroll.mjs";
|
package/dist/core.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');;/* empty css */const e=require("./core/components/Announcement/index.cjs"),o=require("./core/components/Accordion/index.cjs"),n=require("./AccordionItem-DulgZilf.cjs"),r=require("./core/components/Avatar/index.cjs"),c=require("./core/components/Badge/index.cjs"),t=require("./core/components/Box/index.cjs"),i=require("./core/components/Breadcrumbs/index.cjs"),_=require("./core/components/ButtonGroup/index.cjs"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');;/* empty css */const e=require("./core/components/Announcement/index.cjs"),o=require("./core/components/Accordion/index.cjs"),n=require("./AccordionItem-DulgZilf.cjs"),r=require("./core/components/Avatar/index.cjs"),c=require("./core/components/Badge/index.cjs"),t=require("./core/components/Box/index.cjs"),i=require("./core/components/Breadcrumbs/index.cjs"),_=require("./core/components/ButtonGroup/index.cjs"),s=require("./index-D7SAxT5B.cjs"),d=require("./core/components/Card/index.cjs"),a=require("./core/components/Carousel/index.cjs"),u=require("./core/components/Checkbox/index.cjs"),p=require("./core/components/Container/index.cjs"),m=require("./core/components/DatePicker/index.cjs"),x=require("./core/components/Divider/index.cjs"),q=require("./core/components/Drawer/index.cjs"),l=require("./core/components/Fieldset/index.cjs"),S=require("./core/components/FileUpload/index.cjs"),b=require("./core/components/FloatingActionButton/index.cjs"),B=require("./core/components/Footer/index.cjs"),T=require("./core/components/Form/index.cjs"),g=require("./core/components/Grid/index.cjs"),A=require("./core/components/Heading/index.cjs"),C=require("./core/components/Input/index.cjs"),F=require("./core/components/Label/index.cjs"),k=require("./core/components/List/index.cjs"),v=require("./core/components/Modal/index.cjs"),h=require("./core/components/NavBar/index.cjs"),P=require("./core/components/Notification/index.cjs"),D=require("./core/components/NotificationContainer/index.cjs"),N=require("./core/components/ProgressBar/index.cjs"),f=require("./core/components/Radio/index.cjs"),M=require("./core/components/Range/index.cjs"),w=require("./core/components/Select/index.cjs"),G=require("./core/components/Sidebar/index.cjs"),I=require("./core/components/Skeleton/index.cjs"),L=require("./core/components/Spacer/index.cjs"),R=require("./core/components/Spinner/index.cjs"),y=require("./core/components/Stack/index.cjs"),H=require("./core/components/Switch/index.cjs"),Q=require("./core/components/Table/index.cjs"),U=require("./core/components/Tabs/index.cjs"),j=require("./core/components/Text/index.cjs"),O=require("./core/components/Textarea/index.cjs"),z=require("./core/components/Tooltip/index.cjs"),E=require("./core/utils/ThemeProvider/index.cjs"),J=require("./core/hooks/useMediaQuery.cjs");exports.Announcement=e.Announcement;exports.Accordion=o.Accordion;exports.AccordionItem=n.AccordionItem;exports.Avatar=r.Avatar;exports.Badge=c.Badge;exports.Box=t.Box;exports.Breadcrumbs=i.Breadcrumbs;exports.ButtonGroup=_.ButtonGroup;exports.Button=s.Button;exports.Card=d.Card;exports.Carousel=a.Carousel;exports.Checkbox=u.Checkbox;exports.Container=p.Container;exports.DatePicker=m.DatePicker;exports.Divider=x.Divider;exports.Drawer=q.Drawer;exports.Fieldset=l.Fieldset;exports.FileUpload=S.FileUpload;exports.FloatingActionButton=b.FloatingActionButton;exports.Footer=B.Footer;exports.Form=T.Form;exports.Grid=g.Grid;exports.Heading=A.Heading;exports.Input=C.Input;exports.Label=F.Label;exports.List=k.List;exports.Modal=v.Modal;exports.Navbar=h.Navbar;exports.Notification=P.Notification;exports.NotificationContainer=D.NotificationContainer;exports.ProgressBar=N.ProgressBar;exports.Radio=f.Radio;exports.Range=M.Range;exports.Select=w.Select;exports.Sidebar=G.Sidebar;exports.Skeleton=I.Skeleton;exports.Spacer=L.Spacer;exports.Spinner=R.Spinner;exports.Stack=y.Stack;exports.Switch=H.Switch;exports.Table=Q.Table;exports.Tabs=U.Tabs;exports.Text=j.Text;exports.Textarea=O.Textarea;exports.Tooltip=z.Tooltip;exports.ThemeProvider=E.ThemeProvider;exports.useMediaQuery=J.useMediaQuery;
|
package/dist/core.d.ts
CHANGED
|
@@ -1237,6 +1237,8 @@ export declare type RichContent = string | {
|
|
|
1237
1237
|
declare type ScrollTypeProps = {
|
|
1238
1238
|
as: "scroll";
|
|
1239
1239
|
scrollTarget: string;
|
|
1240
|
+
/** Offset in pixels to account for sticky headers etc. Defaults to 0. */
|
|
1241
|
+
scrollOffset?: number;
|
|
1240
1242
|
} & Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">;
|
|
1241
1243
|
|
|
1242
1244
|
export declare function Select(props: SelectProps): JSX.Element;
|
package/dist/core.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { Badge as c } from "./core/components/Badge/index.mjs";
|
|
|
7
7
|
import { Box as l } from "./core/components/Box/index.mjs";
|
|
8
8
|
import { Breadcrumbs as u } from "./core/components/Breadcrumbs/index.mjs";
|
|
9
9
|
import { ButtonGroup as b } from "./core/components/ButtonGroup/index.mjs";
|
|
10
|
-
import { B as A } from "./index-
|
|
10
|
+
import { B as A } from "./index-BnvfQt_k.js";
|
|
11
11
|
import { Card as g } from "./core/components/Card/index.mjs";
|
|
12
12
|
import { Carousel as F } from "./core/components/Carousel/index.mjs";
|
|
13
13
|
import { Checkbox as v } from "./core/components/Checkbox/index.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { f as
|
|
1
|
+
import { jsx as e, jsxs as b, Fragment as L } from "react/jsx-runtime";
|
|
2
|
+
import g from "react";
|
|
3
|
+
import { f as C, g as R, h as A } from "./index-CeBA0PT0.js";
|
|
4
4
|
import { c as r } from "./createLucideIcon-C8GTh_Qx.js";
|
|
5
|
-
import { E
|
|
6
|
-
import { P
|
|
7
|
-
import { a as
|
|
8
|
-
import { C as
|
|
9
|
-
import { A as
|
|
5
|
+
import { E } from "./external-link-BOPobeQJ.js";
|
|
6
|
+
import { P } from "./play-DYgKiSaf.js";
|
|
7
|
+
import { a as z, C as V } from "./chevron-right-Cim1KPuL.js";
|
|
8
|
+
import { C as j } from "./chevron-down-DSUzBz9F.js";
|
|
9
|
+
import { A as B } from "./arrow-right-QEwnX3Sk.js";
|
|
10
10
|
import { A as F } from "./arrow-left-BIJvHwNQ.js";
|
|
11
11
|
import './index66.css';/**
|
|
12
12
|
* @license lucide-react v0.488.0 - ISC
|
|
@@ -14,36 +14,36 @@ import './index66.css';/**
|
|
|
14
14
|
* This source code is licensed under the ISC license.
|
|
15
15
|
* See the LICENSE file in the root directory of this source tree.
|
|
16
16
|
*/
|
|
17
|
-
const q = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]],
|
|
17
|
+
const q = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], S = r("chevron-up", q);
|
|
18
18
|
/**
|
|
19
19
|
* @license lucide-react v0.488.0 - ISC
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
|
-
const
|
|
24
|
+
const D = [
|
|
25
25
|
["path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4", key: "u53s6r" }],
|
|
26
26
|
["polyline", { points: "10 17 15 12 10 7", key: "1ail0h" }],
|
|
27
27
|
["line", { x1: "15", x2: "3", y1: "12", y2: "12", key: "v6grx8" }]
|
|
28
|
-
],
|
|
28
|
+
], G = r("log-in", D);
|
|
29
29
|
/**
|
|
30
30
|
* @license lucide-react v0.488.0 - ISC
|
|
31
31
|
*
|
|
32
32
|
* This source code is licensed under the ISC license.
|
|
33
33
|
* See the LICENSE file in the root directory of this source tree.
|
|
34
34
|
*/
|
|
35
|
-
const
|
|
35
|
+
const O = [
|
|
36
36
|
["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
|
|
37
37
|
["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
|
|
38
38
|
["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
|
|
39
|
-
],
|
|
39
|
+
], T = r("menu", O);
|
|
40
40
|
/**
|
|
41
41
|
* @license lucide-react v0.488.0 - ISC
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
const
|
|
46
|
+
const U = [
|
|
47
47
|
[
|
|
48
48
|
"path",
|
|
49
49
|
{
|
|
@@ -51,26 +51,26 @@ const H = [
|
|
|
51
51
|
key: "foiqr5"
|
|
52
52
|
}
|
|
53
53
|
]
|
|
54
|
-
],
|
|
54
|
+
], Y = r("phone", U);
|
|
55
55
|
/**
|
|
56
56
|
* @license lucide-react v0.488.0 - ISC
|
|
57
57
|
*
|
|
58
58
|
* This source code is licensed under the ISC license.
|
|
59
59
|
* See the LICENSE file in the root directory of this source tree.
|
|
60
60
|
*/
|
|
61
|
-
const
|
|
61
|
+
const H = [
|
|
62
62
|
["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
|
|
63
63
|
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
|
|
64
64
|
["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
|
|
65
65
|
["path", { d: "M16 16h5v5", key: "ccwih5" }]
|
|
66
|
-
],
|
|
66
|
+
], J = r("refresh-ccw", H);
|
|
67
67
|
/**
|
|
68
68
|
* @license lucide-react v0.488.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
72
|
*/
|
|
73
|
-
const
|
|
73
|
+
const K = [
|
|
74
74
|
[
|
|
75
75
|
"path",
|
|
76
76
|
{
|
|
@@ -79,49 +79,49 @@ const Q = [
|
|
|
79
79
|
}
|
|
80
80
|
],
|
|
81
81
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
82
|
-
],
|
|
82
|
+
], Q = r("settings", K), W = "_button_1xx80_1", X = "_sm_1xx80_30", Z = "_content_1xx80_34", ee = "_icon_1xx80_38", ne = "_md_1xx80_43", te = "_lg_1xx80_48", re = "_image_1xx80_61", oe = "_blurred_1xx80_68", se = "_primary_1xx80_69", ae = "_secondary_1xx80_70", ce = "_destructive_1xx80_71", ie = "_primaryInverted_1xx80_72", le = "_secondaryInverted_1xx80_73", de = "_blurredInverted_1xx80_75", _e = "_link_1xx80_89", he = "_linkInverted_1xx80_90", me = "_underline_1xx80_91", xe = "_underlineInverted_1xx80_92", ue = "_children_1xx80_286", pe = "_iconLeft_1xx80_293", ve = "_iconRight_1xx80_297", n = {
|
|
83
83
|
button: W,
|
|
84
84
|
sm: X,
|
|
85
|
-
content:
|
|
86
|
-
icon:
|
|
87
|
-
md:
|
|
88
|
-
lg:
|
|
89
|
-
image:
|
|
90
|
-
blurred:
|
|
91
|
-
primary:
|
|
85
|
+
content: Z,
|
|
86
|
+
icon: ee,
|
|
87
|
+
md: ne,
|
|
88
|
+
lg: te,
|
|
89
|
+
image: re,
|
|
90
|
+
blurred: oe,
|
|
91
|
+
primary: se,
|
|
92
92
|
secondary: ae,
|
|
93
|
-
destructive:
|
|
94
|
-
primaryInverted:
|
|
95
|
-
secondaryInverted:
|
|
96
|
-
blurredInverted:
|
|
97
|
-
link:
|
|
98
|
-
linkInverted:
|
|
99
|
-
underline:
|
|
100
|
-
underlineInverted:
|
|
101
|
-
children:
|
|
102
|
-
iconLeft:
|
|
103
|
-
iconRight:
|
|
104
|
-
},
|
|
105
|
-
apps: /* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ e(
|
|
93
|
+
destructive: ce,
|
|
94
|
+
primaryInverted: ie,
|
|
95
|
+
secondaryInverted: le,
|
|
96
|
+
blurredInverted: de,
|
|
97
|
+
link: _e,
|
|
98
|
+
linkInverted: he,
|
|
99
|
+
underline: me,
|
|
100
|
+
underlineInverted: xe,
|
|
101
|
+
children: ue,
|
|
102
|
+
iconLeft: pe,
|
|
103
|
+
iconRight: ve
|
|
104
|
+
}, ye = {
|
|
105
|
+
apps: /* @__PURE__ */ b(L, { children: [
|
|
106
|
+
/* @__PURE__ */ e(R, {}),
|
|
107
107
|
" ",
|
|
108
|
-
/* @__PURE__ */ e(
|
|
108
|
+
/* @__PURE__ */ e(A, {})
|
|
109
109
|
] }),
|
|
110
110
|
"arrow-left": /* @__PURE__ */ e(F, {}),
|
|
111
|
-
"arrow-right": /* @__PURE__ */ e(
|
|
112
|
-
"chevron-up": /* @__PURE__ */ e(
|
|
113
|
-
"chevron-down": /* @__PURE__ */ e(
|
|
114
|
-
"chevron-left": /* @__PURE__ */ e(
|
|
115
|
-
"chevron-right": /* @__PURE__ */ e(
|
|
116
|
-
envelope: /* @__PURE__ */ e(
|
|
117
|
-
phone: /* @__PURE__ */ e(
|
|
118
|
-
play: /* @__PURE__ */ e(
|
|
119
|
-
"new-tab": /* @__PURE__ */ e(
|
|
120
|
-
menu: /* @__PURE__ */ e(
|
|
121
|
-
refresh: /* @__PURE__ */ e(
|
|
122
|
-
settings: /* @__PURE__ */ e(
|
|
123
|
-
"sign-in": /* @__PURE__ */ e(
|
|
124
|
-
},
|
|
111
|
+
"arrow-right": /* @__PURE__ */ e(B, {}),
|
|
112
|
+
"chevron-up": /* @__PURE__ */ e(S, {}),
|
|
113
|
+
"chevron-down": /* @__PURE__ */ e(j, {}),
|
|
114
|
+
"chevron-left": /* @__PURE__ */ e(V, {}),
|
|
115
|
+
"chevron-right": /* @__PURE__ */ e(z, {}),
|
|
116
|
+
envelope: /* @__PURE__ */ e(C, {}),
|
|
117
|
+
phone: /* @__PURE__ */ e(Y, {}),
|
|
118
|
+
play: /* @__PURE__ */ e(P, {}),
|
|
119
|
+
"new-tab": /* @__PURE__ */ e(E, {}),
|
|
120
|
+
menu: /* @__PURE__ */ e(T, {}),
|
|
121
|
+
refresh: /* @__PURE__ */ e(J, {}),
|
|
122
|
+
settings: /* @__PURE__ */ e(Q, {}),
|
|
123
|
+
"sign-in": /* @__PURE__ */ e(G, {})
|
|
124
|
+
}, fe = {
|
|
125
125
|
primary: n.primary,
|
|
126
126
|
primaryInverted: n.primaryInverted,
|
|
127
127
|
secondary: n.secondary,
|
|
@@ -133,63 +133,72 @@ const Q = [
|
|
|
133
133
|
blurred: n.blurred,
|
|
134
134
|
blurredInverted: n.blurredInverted,
|
|
135
135
|
destructive: n.destructive
|
|
136
|
-
},
|
|
136
|
+
}, ge = {
|
|
137
137
|
left: n.iconLeft,
|
|
138
138
|
right: n.iconRight
|
|
139
|
-
},
|
|
139
|
+
}, be = {
|
|
140
140
|
sm: n.sm,
|
|
141
141
|
md: n.md,
|
|
142
142
|
lg: n.lg
|
|
143
143
|
};
|
|
144
144
|
function Ee({
|
|
145
|
-
variant:
|
|
146
|
-
size:
|
|
147
|
-
displayType:
|
|
148
|
-
imageSrc:
|
|
149
|
-
imageAlt:
|
|
145
|
+
variant: k = "primary",
|
|
146
|
+
size: I = "md",
|
|
147
|
+
displayType: u = "text",
|
|
148
|
+
imageSrc: p,
|
|
149
|
+
imageAlt: w = "",
|
|
150
150
|
ImageComponent: t,
|
|
151
|
-
icon:
|
|
152
|
-
iconAlignment:
|
|
153
|
-
className:
|
|
151
|
+
icon: v,
|
|
152
|
+
iconAlignment: N = "right",
|
|
153
|
+
className: M,
|
|
154
154
|
children: l,
|
|
155
155
|
disabled: d = !1,
|
|
156
|
-
|
|
156
|
+
...$
|
|
157
157
|
}) {
|
|
158
|
-
let
|
|
159
|
-
t && (
|
|
160
|
-
const _ =
|
|
158
|
+
let c = null;
|
|
159
|
+
t && (g.isValidElement(t) ? c = t : (typeof t == "function" || typeof t == "object") && (c = /* @__PURE__ */ e(t, {})));
|
|
160
|
+
const _ = u === "image" ? c || (p ? /* @__PURE__ */ e("img", { src: p, alt: w, className: n.image }) : g.isValidElement(l) ? l : null) : /* @__PURE__ */ b("span", { className: `${n.content} ${ge[N]}`, children: [
|
|
161
161
|
/* @__PURE__ */ e("span", { className: n.children, children: l }),
|
|
162
|
-
|
|
163
|
-
] }),
|
|
164
|
-
if (
|
|
165
|
-
const { href: o, target: s, rel:
|
|
162
|
+
v && /* @__PURE__ */ e("span", { className: n.icon, "aria-hidden": "true", children: ye[v] })
|
|
163
|
+
] }), h = `${M ?? ""} ${n.button} ${be[I]} ${u === "text" ? fe[k] : n.image}`.trim(), { as: y = "button", ...m } = $;
|
|
164
|
+
if (y === "a") {
|
|
165
|
+
const { href: o, target: s, rel: a, ...f } = m, x = s === "_blank" ? a ? `${a} noopener noreferrer` : "noopener noreferrer" : a;
|
|
166
166
|
return /* @__PURE__ */ e(
|
|
167
167
|
"a",
|
|
168
168
|
{
|
|
169
169
|
href: o,
|
|
170
170
|
target: s,
|
|
171
|
-
rel:
|
|
172
|
-
className:
|
|
171
|
+
rel: x,
|
|
172
|
+
className: h,
|
|
173
173
|
"aria-disabled": d ? "true" : void 0,
|
|
174
|
-
...
|
|
174
|
+
...f,
|
|
175
175
|
children: _
|
|
176
176
|
}
|
|
177
177
|
);
|
|
178
178
|
}
|
|
179
|
-
if (
|
|
180
|
-
const {
|
|
179
|
+
if (y === "scroll") {
|
|
180
|
+
const {
|
|
181
|
+
scrollTarget: o,
|
|
182
|
+
scrollOffset: s = 0,
|
|
183
|
+
...a
|
|
184
|
+
} = m;
|
|
181
185
|
return /* @__PURE__ */ e(
|
|
182
186
|
"button",
|
|
183
187
|
{
|
|
184
188
|
type: "button",
|
|
185
189
|
onClick: () => {
|
|
186
190
|
const i = document.getElementById(o);
|
|
187
|
-
|
|
191
|
+
if (i)
|
|
192
|
+
if (s) {
|
|
193
|
+
const x = i.getBoundingClientRect().top + window.scrollY - s;
|
|
194
|
+
window.scrollTo({ top: x, behavior: "smooth" });
|
|
195
|
+
} else
|
|
196
|
+
i.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
188
197
|
},
|
|
189
|
-
className:
|
|
198
|
+
className: h,
|
|
190
199
|
disabled: d,
|
|
191
200
|
"aria-label": `Scroll to ${o}`,
|
|
192
|
-
...
|
|
201
|
+
...a,
|
|
193
202
|
children: _
|
|
194
203
|
}
|
|
195
204
|
);
|
|
@@ -198,7 +207,7 @@ function Ee({
|
|
|
198
207
|
"button",
|
|
199
208
|
{
|
|
200
209
|
type: "button",
|
|
201
|
-
className:
|
|
210
|
+
className: h,
|
|
202
211
|
disabled: d,
|
|
203
212
|
...m,
|
|
204
213
|
children: _
|
|
@@ -207,5 +216,5 @@ function Ee({
|
|
|
207
216
|
}
|
|
208
217
|
export {
|
|
209
218
|
Ee as B,
|
|
210
|
-
|
|
219
|
+
T as M
|
|
211
220
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";require('./index66.css');const e=require("react/jsx-runtime"),b=require("react"),y=require("./index-CBK5rp6X.cjs"),o=require("./createLucideIcon-DpotSgUx.cjs"),M=require("./external-link-DDShu-48.cjs"),R=require("./play-CQBnZgNa.cjs"),k=require("./chevron-right-motlyADs.cjs"),C=require("./chevron-down-DfK1XBl3.cjs"),E=require("./arrow-right-DO6S4vfx.cjs"),z=require("./arrow-left-4E3t8axP.cjs");/**
|
|
2
|
+
* @license lucide-react v0.488.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const A=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],P=o.createLucideIcon("chevron-up",A);/**
|
|
7
|
+
* @license lucide-react v0.488.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const V=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],B=o.createLucideIcon("log-in",V);/**
|
|
12
|
+
* @license lucide-react v0.488.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const F=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],I=o.createLucideIcon("menu",F);/**
|
|
17
|
+
* @license lucide-react v0.488.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const D=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],S=o.createLucideIcon("phone",D);/**
|
|
22
|
+
* @license lucide-react v0.488.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const G=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],O=o.createLucideIcon("refresh-ccw",G);/**
|
|
27
|
+
* @license lucide-react v0.488.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const T=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],U=o.createLucideIcon("settings",T),Y="_button_1xx80_1",H="_sm_1xx80_30",J="_content_1xx80_34",K="_icon_1xx80_38",Q="_md_1xx80_43",W="_lg_1xx80_48",X="_image_1xx80_61",Z="_blurred_1xx80_68",ee="_primary_1xx80_69",ne="_secondary_1xx80_70",te="_destructive_1xx80_71",re="_primaryInverted_1xx80_72",oe="_secondaryInverted_1xx80_73",se="_blurredInverted_1xx80_75",ce="_link_1xx80_89",ie="_linkInverted_1xx80_90",ae="_underline_1xx80_91",le="_underlineInverted_1xx80_92",de="_children_1xx80_286",xe="_iconLeft_1xx80_293",ue="_iconRight_1xx80_297",n={button:Y,sm:H,content:J,icon:K,md:Q,lg:W,image:X,blurred:Z,primary:ee,secondary:ne,destructive:te,primaryInverted:re,secondaryInverted:oe,blurredInverted:se,link:ce,linkInverted:ie,underline:ae,underlineInverted:le,children:de,iconLeft:xe,iconRight:ue},_e={apps:e.jsxs(e.Fragment,{children:[e.jsx(y.FaApple,{})," ",e.jsx(y.FaGooglePlay,{})]}),"arrow-left":e.jsx(z.ArrowLeft,{}),"arrow-right":e.jsx(E.ArrowRight,{}),"chevron-up":e.jsx(P,{}),"chevron-down":e.jsx(C.ChevronDown,{}),"chevron-left":e.jsx(k.ChevronLeft,{}),"chevron-right":e.jsx(k.ChevronRight,{}),envelope:e.jsx(y.FaEnvelope,{}),phone:e.jsx(S,{}),play:e.jsx(R.Play,{}),"new-tab":e.jsx(M.ExternalLink,{}),menu:e.jsx(I,{}),refresh:e.jsx(O,{}),settings:e.jsx(U,{}),"sign-in":e.jsx(B,{})},he={primary:n.primary,primaryInverted:n.primaryInverted,secondary:n.secondary,secondaryInverted:n.secondaryInverted,link:n.link,linkInverted:n.linkInverted,underline:n.underline,underlineInverted:n.underlineInverted,blurred:n.blurred,blurredInverted:n.blurredInverted,destructive:n.destructive},ve={left:n.iconLeft,right:n.iconRight},ye={sm:n.sm,md:n.md,lg:n.lg};function pe({variant:j="primary",size:L="md",displayType:p="text",imageSrc:m,imageAlt:w="",ImageComponent:t,icon:g,iconAlignment:$="right",className:q,children:l,disabled:d=!1,...N}){let i=null;if(t){if(b.isValidElement(t))i=t;else if(typeof t=="function"||typeof t=="object"){const r=t;i=e.jsx(r,{})}}const x=p==="image"?i||(m?e.jsx("img",{src:m,alt:w,className:n.image}):b.isValidElement(l)?l:null):e.jsxs("span",{className:`${n.content} ${ve[$]}`,children:[e.jsx("span",{className:n.children,children:l}),g&&e.jsx("span",{className:n.icon,"aria-hidden":"true",children:_e[g]})]}),u=`${q??""} ${n.button} ${ye[L]} ${p==="text"?he[j]:n.image}`.trim(),{as:f="button",..._}=N;if(f==="a"){const{href:r,target:s,rel:c,...h}=_,v=s==="_blank"?c?`${c} noopener noreferrer`:"noopener noreferrer":c;return e.jsx("a",{href:r,target:s,rel:v,className:u,"aria-disabled":d?"true":void 0,...h,children:x})}if(f==="scroll"){const{scrollTarget:r,scrollOffset:s=0,...c}=_,h=()=>{const a=document.getElementById(r);if(a)if(s){const v=a.getBoundingClientRect().top+window.scrollY-s;window.scrollTo({top:v,behavior:"smooth"})}else a.scrollIntoView({behavior:"smooth",block:"start"})};return e.jsx("button",{type:"button",onClick:h,className:u,disabled:d,"aria-label":`Scroll to ${r}`,...c,children:x})}return e.jsx("button",{type:"button",className:u,disabled:d,..._,children:x})}exports.Button=pe;exports.Menu=I;
|
package/dist/main.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');;/* empty css */const t=require("./core/components/Announcement/index.cjs"),i=require("./core/components/Accordion/index.cjs"),_=require("./AccordionItem-DulgZilf.cjs"),d=require("./core/components/Avatar/index.cjs"),s=require("./core/components/Badge/index.cjs"),a=require("./core/components/Box/index.cjs"),l=require("./core/components/Breadcrumbs/index.cjs"),u=require("./core/components/ButtonGroup/index.cjs"),x=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./index.css');;/* empty css */const t=require("./core/components/Announcement/index.cjs"),i=require("./core/components/Accordion/index.cjs"),_=require("./AccordionItem-DulgZilf.cjs"),d=require("./core/components/Avatar/index.cjs"),s=require("./core/components/Badge/index.cjs"),a=require("./core/components/Box/index.cjs"),l=require("./core/components/Breadcrumbs/index.cjs"),u=require("./core/components/ButtonGroup/index.cjs"),x=require("./index-D7SAxT5B.cjs"),k=require("./core/components/Card/index.cjs"),p=require("./core/components/Carousel/index.cjs"),B=require("./core/components/Checkbox/index.cjs"),m=require("./core/components/Container/index.cjs"),q=require("./core/components/DatePicker/index.cjs"),C=require("./core/components/Divider/index.cjs"),T=require("./core/components/Drawer/index.cjs"),b=require("./core/components/Fieldset/index.cjs"),S=require("./core/components/FileUpload/index.cjs"),g=require("./core/components/FloatingActionButton/index.cjs"),A=require("./core/components/Footer/index.cjs"),h=require("./core/components/Form/index.cjs"),v=require("./core/components/Grid/index.cjs"),R=require("./core/components/Heading/index.cjs"),F=require("./core/components/Input/index.cjs"),L=require("./core/components/Label/index.cjs"),P=require("./core/components/List/index.cjs"),D=require("./core/components/Modal/index.cjs"),H=require("./core/components/NavBar/index.cjs"),G=require("./core/components/Notification/index.cjs"),w=require("./core/components/NotificationContainer/index.cjs"),f=require("./core/components/ProgressBar/index.cjs"),M=require("./core/components/Radio/index.cjs"),y=require("./core/components/Range/index.cjs"),N=require("./core/components/Select/index.cjs"),I=require("./core/components/Sidebar/index.cjs"),Q=require("./core/components/Skeleton/index.cjs"),U=require("./core/components/Spacer/index.cjs"),W=require("./core/components/Spinner/index.cjs"),E=require("./core/components/Stack/index.cjs"),Y=require("./core/components/Switch/index.cjs"),j=require("./core/components/Table/index.cjs"),O=require("./core/components/Tabs/index.cjs"),z=require("./core/components/Text/index.cjs"),J=require("./core/components/Textarea/index.cjs"),K=require("./core/components/Tooltip/index.cjs"),V=require("./core/utils/ThemeProvider/index.cjs"),X=require("./core/hooks/useMediaQuery.cjs"),Z=require("./next/blocks/AccordionBlock/index.cjs"),$=require("./next/blocks/AdditionalCategoriesBlock/index.cjs"),ee=require("./next/blocks/CardGridBlock/index.cjs"),oe=require("./next/blocks/CarouselBlock/index.cjs"),re=require("./next/blocks/ContentBlock/index.cjs"),ne=require("./next/blocks/DocumentListBlock/index.cjs"),ce=require("./next/blocks/FeaturedDocumentsBlock/index.cjs"),te=require("./next/blocks/HeroBlock/index.cjs"),o=require("./next/blocks/HeroBlock/HeroContext.cjs"),ie=require("./next/ui/LocaleLink/index.cjs"),_e=require("./next/blocks/QuoteBlock/index.cjs"),de=require("./next/blocks/RichTextBlock/index.cjs"),se=require("./next/blocks/MarkdownBlock/index.cjs"),ae=require("./next/ui/PortableTextRenderer/index.cjs"),le=require("./next/blocks/StickyScrollBlock/index.cjs"),ue=require("./next/blocks/TabsBlock/index.cjs"),xe=require("./next/blocks/WasHelpfulBlock/index.cjs"),ke=require("./next/blocks/FormBlock/index.cjs"),pe=require("./next/cards/SpotlightCard/index.cjs"),Be=require("./next/cards/BlogArticleCard/index.cjs"),me=require("./next/cards/SpotlightCardAdapter.cjs"),qe=require("./next/cards/BlogArticleCardAdapter.cjs"),r=require("./next/cards/cardRegistry.cjs"),Ce=require("./next/cards/BioCard/index.cjs"),Te=require("./next/cards/GridCard/index.cjs"),be=require("./next/cards/ProductCard/index.cjs"),Se=require("./next/cards/ReviewCard/index.cjs"),ge=require("./next/cards/SegmentCard/index.cjs"),Ae=require("./next/cards/ServiceCard/index.cjs"),he=require("./next/cards/TestimonialCard/index.cjs"),n=require("./next/context/LocaleBridge.cjs"),c=require("./core/context/ThemeContext.cjs"),e=require("./next/utils/blockRenderers.cjs");exports.Announcement=t.Announcement;exports.Accordion=i.Accordion;exports.AccordionItem=_.AccordionItem;exports.Avatar=d.Avatar;exports.Badge=s.Badge;exports.Box=a.Box;exports.Breadcrumbs=l.Breadcrumbs;exports.ButtonGroup=u.ButtonGroup;exports.Button=x.Button;exports.Card=k.Card;exports.Carousel=p.Carousel;exports.Checkbox=B.Checkbox;exports.Container=m.Container;exports.DatePicker=q.DatePicker;exports.Divider=C.Divider;exports.Drawer=T.Drawer;exports.Fieldset=b.Fieldset;exports.FileUpload=S.FileUpload;exports.FloatingActionButton=g.FloatingActionButton;exports.Footer=A.Footer;exports.Form=h.Form;exports.Grid=v.Grid;exports.Heading=R.Heading;exports.Input=F.Input;exports.Label=L.Label;exports.List=P.List;exports.Modal=D.Modal;exports.Navbar=H.Navbar;exports.Notification=G.Notification;exports.NotificationContainer=w.NotificationContainer;exports.ProgressBar=f.ProgressBar;exports.Radio=M.Radio;exports.Range=y.Range;exports.Select=N.Select;exports.Sidebar=I.Sidebar;exports.Skeleton=Q.Skeleton;exports.Spacer=U.Spacer;exports.Spinner=W.Spinner;exports.Stack=E.Stack;exports.Switch=Y.Switch;exports.Table=j.Table;exports.Tabs=O.Tabs;exports.Text=z.Text;exports.Textarea=J.Textarea;exports.Tooltip=K.Tooltip;exports.ThemeProvider=V.ThemeProvider;exports.useMediaQuery=X.useMediaQuery;exports.AccordionBlock=Z.AccordionBlock;exports.AdditionalCategoriesBlock=$.AdditionalCategoriesBlock;exports.CardGridBlock=ee.CardGridBlock;exports.CarouselBlock=oe.CarouselBlock;exports.ContentBlock=re.ContentBlock;exports.DocumentListBlock=ne.DocumentListBlock;exports.FeaturedDocumentsBlock=ce.FeaturedDocumentsBlock;exports.HeroBlock=te.HeroBlock;exports.HeroProvider=o.HeroProvider;exports.useHeroContext=o.useHeroContext;exports.LocaleLink=ie.LocaleLink;exports.QuoteBlock=_e.QuoteBlock;exports.RichTextBlock=de.RichTextBlock;exports.MarkdownBlock=se.MarkdownBlock;exports.RichText=ae.RichText;exports.StickyScrollBlock=le.StickyScrollBlock;exports.TabsBlock=ue.TabsBlock;exports.WasHelpfulBlock=xe.WasHelpfulBlock;exports.FormBlock=ke.FormBlock;exports.SpotlightCard=pe.SpotlightCard;exports.BlogArticleCard=Be.BlogArticleCard;exports.SpotlightCardAdapter=me.SpotlightCardAdapter;exports.BlogArticleCardAdapter=qe.BlogArticleCardAdapter;exports.CARD_REGISTRY=r.CARD_REGISTRY;exports.resolveCard=r.resolveCard;exports.BioCard=Ce.BioCard;exports.GridCard=Te.GridCard;exports.ProductCard=be.ProductCard;exports.ReviewCard=Se.ReviewCard;exports.SegmentCard=ge.SegmentCard;exports.ServiceCard=Ae.ServiceCard;exports.TestimonialCard=he.TestimonialCard;exports.LocaleBridgeProvider=n.LocaleBridgeProvider;exports.useLocaleBridge=n.useLocaleBridge;exports.AppThemeProvider=c.AppThemeProvider;exports.useTheme=c.useTheme;exports.extractText=e.extractText;exports.renderCallToAction=e.renderCallToAction;exports.renderRichText=e.renderRichText;
|
package/dist/main.d.ts
CHANGED
|
@@ -1589,6 +1589,8 @@ export { SanitySpotlight }
|
|
|
1589
1589
|
declare type ScrollTypeProps = {
|
|
1590
1590
|
as: "scroll";
|
|
1591
1591
|
scrollTarget: string;
|
|
1592
|
+
/** Offset in pixels to account for sticky headers etc. Defaults to 0. */
|
|
1593
|
+
scrollOffset?: number;
|
|
1592
1594
|
} & Omit<default_2.ButtonHTMLAttributes<HTMLButtonElement>, "onClick">;
|
|
1593
1595
|
|
|
1594
1596
|
export declare function SegmentCard({ eyebrow, title, description, image, callToAction, onHover, onLeave, renderImage, renderRichText, }: SegmentCardProps): JSX.Element;
|
package/dist/main.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { Badge as d } from "./core/components/Badge/index.mjs";
|
|
|
7
7
|
import { Box as n } from "./core/components/Box/index.mjs";
|
|
8
8
|
import { Breadcrumbs as C } from "./core/components/Breadcrumbs/index.mjs";
|
|
9
9
|
import { ButtonGroup as s } from "./core/components/ButtonGroup/index.mjs";
|
|
10
|
-
import { B as T } from "./index-
|
|
10
|
+
import { B as T } from "./index-BnvfQt_k.js";
|
|
11
11
|
import { Card as S } from "./core/components/Card/index.mjs";
|
|
12
12
|
import { Carousel as h } from "./core/components/Carousel/index.mjs";
|
|
13
13
|
import { Checkbox as R } from "./core/components/Checkbox/index.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const e=require("../../../CategoryFilters-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");const e=require("../../../CategoryFilters-DTw0ob7y.cjs");require("../../../index-D7SAxT5B.cjs");require("../../../x-Dft9NVe_.cjs");exports.CategoryFilters=e.CategoryFilters;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import { C as p } from "../../../CategoryFilters-
|
|
3
|
-
import "../../../index-
|
|
2
|
+
import { C as p } from "../../../CategoryFilters-BJ_M7DHy.js";
|
|
3
|
+
import "../../../index-BnvfQt_k.js";
|
|
4
4
|
import "../../../x-CnsEH4Ox.js";
|
|
5
5
|
export {
|
|
6
6
|
p as CategoryFilters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const l=require("react/jsx-runtime"),e=require("../../../react.esm-C_9Ma9mj.cjs"),c=require("../../../CategoryFilters-
|
|
1
|
+
"use strict";const l=require("react/jsx-runtime"),e=require("../../../react.esm-C_9Ma9mj.cjs"),c=require("../../../CategoryFilters-DTw0ob7y.cjs");e.vi.mock("./styles.module.css",()=>({default:new Proxy({},{get:(i,o)=>o})}));e.vi.mock("../../../core/components/Button",()=>({Button:({children:t,onClick:i,disabled:o})=>l.jsx("button",{onClick:i,disabled:o,"data-testid":"button",children:t})}));e.vi.mock("lucide-react",()=>({XIcon:()=>l.jsx("span",{"data-testid":"x-icon"})}));const n=[{_id:"cat-1",title:"AI"},{_id:"cat-2",title:"Design"},{_id:"cat-3",title:"Engineering"}];function s(t={}){return{categoryFilters:n,selectedCategories:[],onSelectionChange:e.vi.fn(),showFilters:!0,toggleFilters:e.vi.fn(),isLoading:!1,...t}}e.describe("1. show/hide class",()=>{e.it("applies the 'show' class when showFilters is true",()=>{var i;const{container:t}=e.render(l.jsx(c.CategoryFilters,{...s({showFilters:!0})}));e.globalExpect((i=t.firstElementChild)==null?void 0:i.className).toContain("show")}),e.it("applies the 'hide' class when showFilters is false",()=>{var i;const{container:t}=e.render(l.jsx(c.CategoryFilters,{...s({showFilters:!1})}));e.globalExpect((i=t.firstElementChild)==null?void 0:i.className).toContain("hide")})});e.describe("2. Filter list — one checkbox per category",()=>{e.it("renders a checkbox for each filter",()=>{e.render(l.jsx(c.CategoryFilters,{...s()})),e.globalExpect(e.screen.getAllByRole("checkbox")).toHaveLength(3)}),e.it("renders each filter's title as its label",()=>{e.render(l.jsx(c.CategoryFilters,{...s()})),e.globalExpect(e.screen.getByText("AI")).toBeInTheDocument(),e.globalExpect(e.screen.getByText("Design")).toBeInTheDocument(),e.globalExpect(e.screen.getByText("Engineering")).toBeInTheDocument()})});e.describe("3. Checked state — checkbox reflects selectedCategories",()=>{e.it("checks the checkbox whose _id is in selectedCategories",()=>{e.render(l.jsx(c.CategoryFilters,{...s({selectedCategories:["cat-2"]})}));const t=e.screen.getAllByRole("checkbox");e.globalExpect(t[1].checked).toBe(!0)}),e.it("leaves unchecked boxes unchecked",()=>{e.render(l.jsx(c.CategoryFilters,{...s({selectedCategories:["cat-2"]})}));const t=e.screen.getAllByRole("checkbox");e.globalExpect(t[0].checked).toBe(!1),e.globalExpect(t[2].checked).toBe(!1)}),e.it("checks all boxes when all are selected",()=>{e.render(l.jsx(c.CategoryFilters,{...s({selectedCategories:["cat-1","cat-2","cat-3"]})}));const t=e.screen.getAllByRole("checkbox");e.globalExpect(t.every(i=>i.checked)).toBe(!0)})});e.describe("4. Checking a filter — onSelectionChange called with filter added",()=>{e.it("calls onSelectionChange with the new filter appended",()=>{const t=e.vi.fn();e.render(l.jsx(c.CategoryFilters,{...s({selectedCategories:["cat-1"],onSelectionChange:t})})),e.fireEvent.click(e.screen.getAllByRole("checkbox")[1]),e.globalExpect(t).toHaveBeenCalledWith(["cat-1","cat-2"])}),e.it("calls onSelectionChange with just the new filter when none were selected",()=>{const t=e.vi.fn();e.render(l.jsx(c.CategoryFilters,{...s({onSelectionChange:t})})),e.fireEvent.click(e.screen.getAllByRole("checkbox")[0]),e.globalExpect(t).toHaveBeenCalledWith(["cat-1"])})});e.describe("5. Unchecking a filter — onSelectionChange called with filter removed",()=>{e.it("calls onSelectionChange without the unchecked filter",()=>{const t=e.vi.fn();e.render(l.jsx(c.CategoryFilters,{...s({selectedCategories:["cat-1","cat-2"],onSelectionChange:t})})),e.fireEvent.click(e.screen.getAllByRole("checkbox")[0]),e.globalExpect(t).toHaveBeenCalledWith(["cat-2"])}),e.it("calls onSelectionChange with an empty array when the last filter is unchecked",()=>{const t=e.vi.fn();e.render(l.jsx(c.CategoryFilters,{...s({selectedCategories:["cat-1"],onSelectionChange:t})})),e.fireEvent.click(e.screen.getAllByRole("checkbox")[0]),e.globalExpect(t).toHaveBeenCalledWith([])})});e.describe("6. Close button — toggleFilters called when X is clicked",()=>{e.it("calls toggleFilters when the X icon button is clicked",()=>{const t=e.vi.fn();e.render(l.jsx(c.CategoryFilters,{...s({toggleFilters:t})})),e.fireEvent.click(e.screen.getByTestId("x-icon").closest("button")),e.globalExpect(t).toHaveBeenCalledOnce()})});e.describe("7. Apply Filters button — toggleFilters called when clicked",()=>{e.it("calls toggleFilters when Apply Filters is clicked",()=>{const t=e.vi.fn();e.render(l.jsx(c.CategoryFilters,{...s({toggleFilters:t})})),e.fireEvent.click(e.screen.getByText("Apply Filters")),e.globalExpect(t).toHaveBeenCalledOnce()})});e.describe("8. Apply Filters disabled — button disabled when isLoading=true",()=>{e.it("disables the Apply Filters button when isLoading is true",()=>{e.render(l.jsx(c.CategoryFilters,{...s({isLoading:!0})})),e.globalExpect(e.screen.getByText("Apply Filters").closest("button")).toBeDisabled()}),e.it("enables the Apply Filters button when isLoading is false",()=>{e.render(l.jsx(c.CategoryFilters,{...s({isLoading:!1})})),e.globalExpect(e.screen.getByText("Apply Filters").closest("button")).not.toBeDisabled()})});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { v as a, d as h, i as o, r as s, g as t, s as c, f as d } from "../../../react.esm-DjxyacK8.js";
|
|
3
|
-
import { C as n } from "../../../CategoryFilters-
|
|
3
|
+
import { C as n } from "../../../CategoryFilters-BJ_M7DHy.js";
|
|
4
4
|
a.mock("./styles.module.css", () => ({ default: new Proxy({}, { get: (r, g) => g }) }));
|
|
5
5
|
a.mock("../../../core/components/Button", () => ({
|
|
6
6
|
Button: ({ children: e, onClick: r, disabled: g }) => /* @__PURE__ */ l("button", { onClick: r, disabled: g, "data-testid": "button", children: e })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),oe=require("../../hooks/useStyleClasses.cjs"),ne=require("../../context/LocaleBridge.cjs"),w=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),oe=require("../../hooks/useStyleClasses.cjs"),ne=require("../../context/LocaleBridge.cjs"),w=require("../../../index-D7SAxT5B.cjs"),ce=require("../../../core/components/Input/index.cjs"),re=require("../../../core/components/Select/index.cjs"),t=require("../../../CategoryFilters-DTw0ob7y.cjs"),ie=require("../../../x-Dft9NVe_.cjs"),ue=[{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 de({heading:r,layout:X="grid",includeFilters:L,excludeFilters:q,limit:B=3,categoryFilters:h,documentType:E,styleOptions:G,initialDocuments:v=[],initialTotalCount:M=0,initialIncludeCategories:J=[],parentPage:$,id:K,renderRichText:o,renderCard:g}){const[Q,u]=s.useState(v),[V,Y]=s.useState(M),[b,R]=s.useState("date-desc"),[d,P]=s.useState(J),[z,m]=s.useState(v.length),[n,A]=s.useState(!1),[j,C]=s.useState(!1),[_,i]=s.useState(v.length<M),[y,x]=s.useState(""),[p,T]=s.useState(""),{locale:D}=ne.useLocaleBridge(),ee=oe.useStyleClasses(G),I=s.useRef(!1),F=s.useRef({sort:b,debouncedSearch:p,selectedCategories:d,start:z,isLoading:n,hasMore:_,limit:B,documentType:E,locale:D,includeFilters:L,excludeFilters:q,parentPage:$});F.current={sort:b,debouncedSearch:p,selectedCategories:d,start:z,isLoading:n,hasMore:_,limit:B,documentType:E,locale:D,includeFilters:L,excludeFilters:q,parentPage:$};const se=X==="list"?t.styles.list:void 0,H=s.useCallback(()=>{C(l=>!l)},[]),te=s.useCallback(l=>{R(l.target.value),u([]),m(0),i(!0)},[]),le=s.useCallback(()=>{u([]),m(0),i(!0),P([]),x(""),C(!1)},[]),ae=s.useCallback(l=>{u([]),m(0),i(!0),P(l)},[]),O=s.useRef(async(l=!1)=>{var W,Z,U;const a=F.current;if(!l&&(a.isLoading||!a.hasMore))return;A(!0);const f=new URLSearchParams({start:l?"0":String(a.start),limit:String(a.limit),sort:a.sort,documentType:a.documentType,locale:a.locale});a.debouncedSearch&&f.append("search",a.debouncedSearch),a.selectedCategories.forEach(c=>f.append("categories",c)),(W=a.includeFilters)==null||W.forEach(c=>f.append("include",c._id)),(Z=a.excludeFilters)==null||Z.forEach(c=>f.append("exclude",c._id)),(U=a.parentPage)!=null&&U._ref&&f.append("parentRef",a.parentPage._ref);try{const S=await(await fetch(`/api/documents?${f.toString()}`)).json();u(k=>l?S.documents:[...k,...S.documents]),m(k=>l?a.limit:k+a.limit),Y(S.totalCount),i((l?0:a.start)+S.documents.length<S.totalCount)}catch(c){console.error("Failed to load documents:",c),i(!1)}finally{A(!1)}}).current,N=s.useCallback(()=>{window.innerWidth>768&&(C(!1),document.body.style.overflow="")},[]);return s.useEffect(()=>(window.addEventListener("resize",N),()=>window.removeEventListener("resize",N)),[N]),s.useEffect(()=>(document.body.style.overflow=j?"hidden":"",()=>{document.body.style.overflow=""}),[j]),s.useEffect(()=>{const l=setTimeout(()=>T(y),500);return()=>clearTimeout(l)},[y]),s.useEffect(()=>{if(!I.current){I.current=!0;return}(p||b!=="date-desc"||d.length>0)&&O(!0)},[p,b,d.join(",")]),e.jsx("section",{id:K,className:`${t.styles.documentList} ${ee}`,children:e.jsxs("article",{className:t.styles.container,children:[e.jsxs("div",{className:t.styles.heading,children:[e.jsxs("div",{children:[r.eyebrow&&(o==null?void 0:o({blocks:r.eyebrow,className:t.styles.eyebrow})),o==null?void 0:o({blocks:r.title,className:t.styles.title})]})," ",(r==null?void 0:r.description)&&(o==null?void 0:o({blocks:r.description}))]}),e.jsxs("div",{className:t.styles.listContainer,children:[h!=null&&h.length?e.jsxs("div",{className:t.styles.filterToggle,children:[e.jsx(w.Button,{as:"button",variant:"secondary",onClick:H,disabled:n,icon:"settings",iconAlignment:"left",children:"Filters"}),e.jsx(w.Button,{as:"button",variant:"link",onClick:le,disabled:n||d.length===0&&y.length===0,children:"Reset"})]}):null,h&&e.jsx(t.CategoryFilters,{categoryFilters:h,selectedCategories:d,onSelectionChange:ae,showFilters:j,toggleFilters:H,isLoading:n}),e.jsxs("div",{className:t.styles.listWrapper,children:[e.jsxs("div",{className:t.styles.listHeader,children:[e.jsxs("div",{className:t.styles.listResults,children:["Results: ",e.jsx("span",{children:V})]}),e.jsxs("div",{className:t.styles.listHeaderFilters,children:[e.jsxs("div",{className:t.styles.listSearch,children:[e.jsx(ce.Input,{type:"text",name:"list-search",placeholder:"Search",value:y,onChange:l=>{x(l.target.value),u([]),m(0),i(!0)}}),y&&e.jsx("button",{className:t.styles.clearSearch,onClick:()=>{x(""),u([]),m(0),i(!0)},children:e.jsx(ie.X,{size:21})})]}),e.jsx("div",{className:t.styles.listSort,children:e.jsx(re.Select,{id:"list-sort",name:"list-sort","aria-label":"Sort by",options:ue,onChange:te})})]})]}),e.jsx("div",{className:`${t.styles.list} ${se??""}`,children:Q.map(l=>g==null?void 0:g(l))}),_&&e.jsx("div",{className:t.styles.loadMore,children:e.jsx(w.Button,{as:"button",variant:"primary",onClick:()=>O(!1),disabled:n,icon:"refresh",iconAlignment:"left",className:n?t.styles.buttonIsLoading:"",children:n?"Loading...":"Load more"})})]})]})]})})}exports.DocumentListBlock=de;
|
|
@@ -2,10 +2,10 @@ import { jsx as o, jsxs as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as l, useRef as j, useCallback as g, useEffect as w } from "react";
|
|
3
3
|
import { useStyleClasses as ie } from "../../hooks/useStyleClasses.mjs";
|
|
4
4
|
import { useLocaleBridge as de } from "../../context/LocaleBridge.mjs";
|
|
5
|
-
import { B as z } from "../../../index-
|
|
5
|
+
import { B as z } from "../../../index-BnvfQt_k.js";
|
|
6
6
|
import { Input as ue } from "../../../core/components/Input/index.mjs";
|
|
7
7
|
import { Select as me } from "../../../core/components/Select/index.mjs";
|
|
8
|
-
import { s as e, C as fe } from "../../../CategoryFilters-
|
|
8
|
+
import { s as e, C as fe } from "../../../CategoryFilters-BJ_M7DHy.js";
|
|
9
9
|
import { X as he } from "../../../x-CnsEH4Ox.js";
|
|
10
10
|
const pe = [
|
|
11
11
|
{ label: "Newest", value: "date-desc" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),U=require("../../../core/components/Form/index.cjs"),E=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),U=require("../../../core/components/Form/index.cjs"),E=require("../../../index-D7SAxT5B.cjs"),V=require("../../../core/components/ProgressBar/index.cjs"),W=require("../../hooks/useStyleClasses.cjs"),s=require("../../../FormField-fg7Q2UyZ.cjs"),_=require("./validate.cjs");function M(r,t){switch(t.type){case"SET_VALUE":return{...r,values:{...r.values,[t.name]:t.value},errors:{...r.errors,[t.name]:""}};case"SET_ERRORS":return{...r,errors:t.errors};case"CLEAR_ERROR":return{...r,errors:{...r.errors,[t.name]:""}};case"NEXT_STEP":return{...r,currentStep:r.currentStep+1,errors:{}};case"PREV_STEP":return{...r,currentStep:r.currentStep-1,errors:{}};case"SET_SUBMITTING":return{...r,isSubmitting:t.value};case"SET_RESULT":return{...r,submitResult:t.result,isSubmitting:!1};case"RESET":return{...r,currentStep:0,errors:{},submitResult:null,isSubmitting:!1};default:return r}}function A({id:r,heading:t,layout:x="vertical",maxWidth:B="md",steps:S,submitLabel:h="Submit",nextLabel:C="Next",backLabel:T="Back",successMessage:F="Thank you! Your submission has been received.",errorMessage:p="Something went wrong. Please try again.",styleOptions:R,renderRichText:n,onSubmit:v}){const j=W.useStyleClasses(R??{}),N={sm:s.styles.maxWidthSm,md:s.styles.maxWidthMd,lg:s.styles.maxWidthLg,full:s.styles.maxWidthFull}[B],g=u.useMemo(()=>_.buildInitialValues(S),[]),[L,c]=u.useReducer(M,{values:g,errors:{},currentStep:0,isSubmitting:!1,submitResult:null}),{values:i,errors:P,currentStep:m,isSubmitting:d,submitResult:o}=L,y=S.length,k=y>1,f=m===y-1,$=(m+1)/y*100,a=S[m],q=u.useCallback((l,b)=>{c({type:"SET_VALUE",name:l,value:b})},[]),w=u.useCallback(()=>{const l=_.validateStep(a.fields,i);if(Object.keys(l).length>0){c({type:"SET_ERRORS",errors:l});return}c({type:"NEXT_STEP"})},[a.fields,i]),I=u.useCallback(()=>{c({type:"PREV_STEP"})},[]),O=u.useCallback(async()=>{const l=_.validateStep(a.fields,i);if(Object.keys(l).length>0){c({type:"SET_ERRORS",errors:l});return}c({type:"SET_SUBMITTING",value:!0});try{const b=await v(i);c({type:"SET_RESULT",result:b})}catch{c({type:"SET_RESULT",result:{success:!1,message:p}})}},[a.fields,i,v,p]);return o!=null&&o.success?e.jsx("section",{id:r,className:`${s.styles.formBlock} ${j}`,children:e.jsx("div",{className:`${s.styles.formInner} ${N}`,children:e.jsx("div",{className:s.styles.container,children:e.jsxs("div",{className:s.styles.success,children:[e.jsx("p",{children:o.message??F}),e.jsx(E.Button,{as:"button",variant:"secondary",onClick:()=>c({type:"RESET"}),children:"Submit another response"})]})})})}):e.jsx("section",{id:r,className:`${s.styles.formBlock} ${j}`,children:e.jsx("div",{className:`${s.styles.formInner} ${N}`,children:e.jsxs("div",{className:s.styles.container,children:[((t==null?void 0:t.title)||(t==null?void 0:t.description))&&e.jsxs("div",{className:s.styles.heading,children:[t.eyebrow&&(n==null?void 0:n({blocks:t.eyebrow,className:s.styles.eyebrow})),t.title&&(n==null?void 0:n({blocks:t.title,className:s.styles.title})),t.description&&(n==null?void 0:n({blocks:t.description}))]}),k&&e.jsxs("div",{className:s.styles.progress,children:[e.jsxs("div",{className:s.styles.progressHeader,children:[e.jsx("span",{className:s.styles.stepLabel,children:a.title}),e.jsxs("span",{className:s.styles.stepCount,children:[m+1," / ",y]})]}),e.jsx(V.ProgressBar,{progress:$,variant:"primary",size:"sm",showLabel:!1})]}),a.description&&e.jsx("p",{className:s.styles.stepDescription,children:a.description}),o&&!o.success&&e.jsx("div",{className:s.styles.errorBanner,role:"alert",children:o.message??p}),e.jsxs(U.Form,{layout:x,noValidate:!0,onSubmit:l=>{l.preventDefault(),f?O():w()},children:[e.jsx("div",{className:s.styles.fields,children:a.fields.map(l=>e.jsx(s.FormField,{field:l,value:i[l.name.current],error:P[l.name.current],onChange:q},l._key))}),e.jsxs("div",{className:s.styles.actions,children:[k&&m>0&&e.jsx(E.Button,{as:"button",type:"button",variant:"secondary",onClick:I,disabled:d,children:T}),e.jsx(E.Button,{as:"button",type:"submit",variant:"primary",disabled:d,className:s.styles.submitButton,children:d?"Submitting…":f?h:C})]})]})]})})})}exports.FormBlock=A;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as o } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as A, useReducer as D, useCallback as S } from "react";
|
|
3
3
|
import { Form as M } from "../../../core/components/Form/index.mjs";
|
|
4
|
-
import { B as y } from "../../../index-
|
|
4
|
+
import { B as y } from "../../../index-BnvfQt_k.js";
|
|
5
5
|
import { ProgressBar as G } from "../../../core/components/ProgressBar/index.mjs";
|
|
6
6
|
import { useStyleClasses as X } from "../../hooks/useStyleClasses.mjs";
|
|
7
7
|
import { s, F as z } from "../../../FormField-Rqe3qF_t.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index13.css');const a=require("react/jsx-runtime"),G=require("../../hooks/useStyleClasses.cjs"),g=require("../../../core/components/Tabs/index.cjs"),Y=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index13.css');const a=require("react/jsx-runtime"),G=require("../../hooks/useStyleClasses.cjs"),g=require("../../../core/components/Tabs/index.cjs"),Y=require("../../../index-D7SAxT5B.cjs"),J=require("../../utils/resolveLinkUrl.cjs"),K=require("../../../core/context/ThemeContext.cjs"),_=require("../../utils/mediaUtils.cjs"),O=require("../../hooks/useMediaQuery.cjs"),W="_tabs_jt1ik_1",X="_container_jt1ik_7",Z="_heading_jt1ik_25",A="_text_jt1ik_32",T="_headingHorizontal_jt1ik_46",R="_title_jt1ik_54",tt="_headingVertical_jt1ik_64",at="_tabContent_jt1ik_74",st="_tabImage_jt1ik_98",lt="_vertical_jt1ik_103",it="_tabsContainer_jt1ik_69",et="_tabText_jt1ik_126",ot="_gridItems_jt1ik_146",nt="_gridItem_jt1ik_146",ct="_fullBleed_jt1ik_186",bt="_overlay_jt1ik_213",mt="_eyebrow_jt1ik_319",s={tabs:W,container:X,heading:Z,text:A,headingHorizontal:T,title:R,headingVertical:tt,tabContent:at,tabImage:st,vertical:lt,tabsContainer:it,tabText:et,gridItems:ot,gridItem:nt,default:"_default_jt1ik_171",fullBleed:ct,overlay:bt,eyebrow:mt},_t={orientationHorizontal:"horizontal",orientationVertical:"vertical"},rt={themeDefault:"default",themeLight:"light",themeDark:"dark",themeTransparent:"transparent"},ut={horizontal:s.headingHorizontal,vertical:s.headingVertical},gt={horizontal:"",vertical:s.vertical};function jt({src:l,alt:c,renderImage:m}){return m?m({src:l,alt:c,width:600,height:658,priority:!0}):a.jsx("img",{src:l,alt:c,width:600,height:658})}function kt({items:l,mode:c,renderImage:m,renderRichText:o}){return a.jsx("div",{className:s.gridItems,children:l.map((e,t)=>{const n=_.resolveImageUrl(e.itemImage,c,"medium"),b=_.resolveAltText(e.itemImage,c,"Grid image");return a.jsxs("div",{className:s.gridItem,children:[n&&m?m({src:n,alt:b,width:200,height:200}):n?a.jsx("img",{src:n,alt:b,width:200,height:200}):null,e.itemText&&(o==null?void 0:o({blocks:e.itemText}))]},t)})})}function vt({heading:l,image:c,items:m,callToAction:o,styleOptions:e,renderRichText:t,renderCallToAction:n,renderImage:b}){const{mode:u}=K.useTheme(),N=G.useStyleClasses(e),P=O.useMediaQuery("(max-width: 768px)")??!1,I=(e==null?void 0:e.layout)??"default",d=ut[l.headingLayout??"vertical"],w=_t[(e==null?void 0:e.orientation)??"orientationHorizontal"],F=rt[(e==null?void 0:e.theme)??"themeDefault"],p=_.resolveImageUrl(c,u,"medium"),j=_.resolveImageUrl(c,u,"large"),k=_.resolveAltText(c,u,"Block image"),L=a.jsxs(g.Tabs,{defaultIndex:0,orientation:w,theme:F,children:[a.jsx(g.Tabs.List,{children:m.map((i,v)=>a.jsx(g.Tabs.Trigger,{index:v,children:i.title},i.title))}),m.map((i,v)=>{var U,B,z,q,x,C,H,E,M,V,D;const f=_.resolveImageUrl((U=i.content)==null?void 0:U.tabImage,u,"medium"),$=_.resolveAltText((B=i.content)==null?void 0:B.tabImage,u,"Tab image"),y=(z=i.content)!=null&&z.tabLink?J.resolveLinkURL(i.content.tabLink):void 0,r=(q=i.content)==null?void 0:q.tabLink,S=Array.isArray((x=i.content)==null?void 0:x.tabGridItem)?i.content.tabGridItem:null,Q=(C=i.content)!=null&&C.tabStyleOptions?G.useStyleClasses((H=i.content)==null?void 0:H.tabStyleOptions):void 0,h=_.resolveImageStyle(c,P);return a.jsx(g.Tabs.Panel,{index:v,children:a.jsxs("div",{className:`${s.tabContent} ${gt[w]} ${Q}`,children:[f&&a.jsx("div",{className:s.tabImage,children:b?b({src:f,alt:$,width:250,height:250,style:h}):a.jsx("img",{src:f,alt:$,width:250,height:250,style:{width:"100%",height:"auto",...h}})}),a.jsxs("div",{className:s.tabText,children:[((E=i.content)==null?void 0:E.tabText)&&(t==null?void 0:t({blocks:i.content.tabText})),S&&a.jsx(kt,{items:S,mode:u,renderImage:b,renderRichText:t}),y&&y!=="#"&&r&&a.jsx(Y.Button,{as:"a",variant:r.variant??"primary",href:y,target:((M=r.linkOptions)==null?void 0:M.linkType)==="external"?"_blank":"_self",rel:((V=r.linkOptions)==null?void 0:V.linkType)==="external"?"noopener noreferrer":"","aria-label":r.ariaLabel||r.label,children:r.label}),((D=i.content)==null?void 0:D.tabDisclaimer)&&(t==null?void 0:t({blocks:i.content.tabDisclaimer}))]})]})},i.title)})]});return I==="default"?a.jsx("section",{className:`${s.tabs} ${s.default} ${N}`,children:a.jsxs("article",{className:s.container,children:[p&&a.jsx(jt,{src:p,alt:k,renderImage:b}),a.jsxs("div",{className:`${s.heading} ${d}`,children:[a.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.eyebrow})),t==null?void 0:t({blocks:l.title,className:s.title})]}),l.description&&a.jsx("div",{className:s.text,children:t==null?void 0:t({blocks:l.description})})]}),a.jsx("div",{className:s.tabsContainer,children:L}),o&&(n==null?void 0:n({items:o.items,alignment:o.alignment,spacing:o.spacing,mobileOrientation:o.mobileOrientation})),l.disclaimer&&(t==null?void 0:t({blocks:l.disclaimer}))]})}):I==="full-bleed"?a.jsx("section",{"data-overlay":"true",className:`${s.tabs} ${s.fullBleed} ${N} tabsFullBleed`,children:a.jsxs("article",{className:s.container,children:[j&&(b?b({src:j,alt:k,fill:!0,priority:!0,sizes:"(max-width: 767px) 600px, 1200px",style:{objectFit:"cover"},draggable:!1}):a.jsx("img",{src:j,alt:k,style:{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}})),a.jsx("div",{className:s.overlay,children:a.jsxs("div",{className:`${s.heading} ${d}`,children:[a.jsxs("div",{children:[l.eyebrow&&(t==null?void 0:t({blocks:l.eyebrow,className:s.eyebrow})),t==null?void 0:t({blocks:l.title,className:s.title})]}),l.description&&(t==null?void 0:t({blocks:l.description})),a.jsx("div",{className:s.tabsContainer,children:L}),o&&(n==null?void 0:n({items:o.items,alignment:o.alignment,spacing:o.spacing,mobileOrientation:o.mobileOrientation})),l.disclaimer&&(t==null?void 0:t({blocks:l.disclaimer}))]})})]})}):null}exports.TabsBlock=vt;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as b, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useStyleClasses as Y } from "../../hooks/useStyleClasses.mjs";
|
|
3
3
|
import { Tabs as g } from "../../../core/components/Tabs/index.mjs";
|
|
4
|
-
import { B as W } from "../../../index-
|
|
4
|
+
import { B as W } from "../../../index-BnvfQt_k.js";
|
|
5
5
|
import { resolveLinkURL as X } from "../../utils/resolveLinkUrl.mjs";
|
|
6
6
|
import { useTheme as Z } from "../../../core/context/ThemeContext.mjs";
|
|
7
7
|
import { resolveImageUrl as k, resolveAltText as p, resolveImageStyle as O } from "../../utils/mediaUtils.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index14.css');const e=require("react/jsx-runtime"),n=require("react"),f=require("../../../core/components/ButtonGroup/index.cjs"),u=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index14.css');const e=require("react/jsx-runtime"),n=require("react"),f=require("../../../core/components/ButtonGroup/index.cjs"),u=require("../../../index-D7SAxT5B.cjs"),p="_wasHelpful_1msqu_1",_="_container_1msqu_5",m="_buttons_1msqu_34",b="_heading_1msqu_49",o={wasHelpful:p,container:_,buttons:m,heading:b};function y({page:t,type:d}){const[h,l]=n.useState(!1),[i,c]=n.useState(!1),a=n.useMemo(()=>`wasHelpful:${t._id}`,[t._id]);n.useEffect(()=>{const s=localStorage.getItem(a);(s==="yes"||s==="no")&&l(!0)},[a]);const r=n.useCallback(async s=>{c(!0);try{await fetch("/api/helpful",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({postId:t._id,isHelpful:s})}),localStorage.setItem(a,s?"yes":"no"),l(!0)}catch{}finally{c(!1)}},[t._id,a]);return e.jsx("section",{className:`${o.wasHelpful} ${d==="article"?"narrow":""}`,children:e.jsxs("article",{className:o.container,children:[e.jsx("hr",{}),h?e.jsx("p",{className:o.heading,children:"Thanks for your feedback!"}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:o.heading,children:"Was this article helpful?"}),e.jsxs(f.ButtonGroup,{className:o.buttons,orientation:"horizontal",alignment:"center",children:[e.jsx(u.Button,{as:"button",variant:"primary",onClick:()=>r(!0),disabled:i,children:"Yes"}),e.jsx(u.Button,{as:"button",variant:"secondary",onClick:()=>r(!1),disabled:i,children:"No"})]})]}),t.helpfulYesCount>0&&e.jsxs("p",{children:[t.helpfulYesCount.toLocaleString(),t.helpfulYesCount===1?" person":" people"," found this article helpful"]}),e.jsx("hr",{})]})})}exports.WasHelpfulBlock=y;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a, Fragment as m } from "react/jsx-runtime";
|
|
2
2
|
import { useState as u, useMemo as p, useEffect as _, useCallback as b } from "react";
|
|
3
3
|
import { ButtonGroup as y } from "../../../core/components/ButtonGroup/index.mjs";
|
|
4
|
-
import { B as d } from "../../../index-
|
|
4
|
+
import { B as d } from "../../../index-BnvfQt_k.js";
|
|
5
5
|
import '../../../index14.css';const g = "_wasHelpful_1msqu_1", C = "_container_1msqu_5", S = "_buttons_1msqu_34", k = "_heading_1msqu_49", n = {
|
|
6
6
|
wasHelpful: g,
|
|
7
7
|
container: C,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index15.css');const t=require("react/jsx-runtime"),v=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('../../../index15.css');const t=require("react/jsx-runtime"),v=require("../../../index-D7SAxT5B.cjs"),d=require("../../utils/resolveLinkUrl.cjs"),y=require("../../../core/context/ThemeContext.cjs"),m=require("../../utils/mediaUtils.cjs"),b="_spotlight_u9yqn_1",p="_imageWrapper_u9yqn_7",q="_content_u9yqn_29",j="_title_u9yqn_35",g="_actions_u9yqn_45",a={spotlight:b,imageWrapper:p,content:q,title:j,actions:g};function A({spotlight:e,renderImage:l,renderRichText:n}){var r,_;const{mode:o}=y.useTheme(),i=m.resolveImageUrl(e.image,o),c=m.resolveAltText(e.image,o),u=d.resolveLinkURL(e.callToAction)??"#",s=((r=e.callToAction.linkOptions)==null?void 0:r.linkType)==="external";return t.jsxs("div",{className:a.spotlight,children:[e.image&&i&&t.jsx("div",{className:a.imageWrapper,children:l?l({src:i,alt:c,width:600,height:400,priority:!1}):t.jsx("img",{src:i,alt:c,width:600,height:400,style:{width:"100%",height:"100%",objectFit:"cover"}})}),t.jsxs("div",{className:a.content,children:[t.jsx("div",{children:n==null?void 0:n({blocks:e.title,className:a.title})}),e.description&&t.jsx("div",{children:n==null?void 0:n({blocks:e.description})})]}),((_=e.callToAction)==null?void 0:_.label)&&t.jsx("div",{className:a.actions,children:t.jsx(v.Button,{as:"a",variant:e.callToAction.variant??"primary",href:u,target:s?"_blank":"_self",rel:s?"noopener noreferrer":"","aria-label":e.callToAction.ariaLabel||e.callToAction.label,children:e.callToAction.label})})]})}exports.SpotlightCard=A;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as _, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { B as v } from "../../../index-
|
|
2
|
+
import { B as v } from "../../../index-BnvfQt_k.js";
|
|
3
3
|
import { resolveLinkURL as d } from "../../utils/resolveLinkUrl.mjs";
|
|
4
4
|
import { useTheme as f } from "../../../core/context/ThemeContext.mjs";
|
|
5
5
|
import { resolveImageUrl as y, resolveAltText as b } from "../../utils/mediaUtils.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),U=require("react"),B=require("next/image"),G=require("../../../core/components/ButtonGroup/index.cjs"),l=require("../../../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),U=require("react"),B=require("next/image"),G=require("../../../core/components/ButtonGroup/index.cjs"),l=require("../../../index-D7SAxT5B.cjs"),I=require("../../../core/components/Modal/index.cjs"),C=require("../../utils/resolveLinkUrl.cjs"),H=require("../../../core/context/ThemeContext.cjs"),Q=require("../../hooks/useMediaQuery.cjs");function W({items:r,alignment:M,spacing:R,mobileOrientation:O="column",className:P}){const[S,$]=U.useState([]),{mode:t}=H.useTheme(),g=Q.useMediaQuery("(max-width: 767px)");return U.useEffect(()=>{if(!(r!=null&&r.length)||!C.resolveLinkURL)return;async function e(){const o=await Promise.all(r.map(a=>C.resolveLinkURL(a)));$(o)}e()},[r]),r!=null&&r.length?n.jsx(G.ButtonGroup,{className:P,alignment:M,spacing:R,mobileOrientation:O,children:r.slice(0,3).map((e,o)=>{var m,d,c,p,h,b,f,y,v,x,_,k,j,T,A,w,q,L;const a=S[o]??"#",i={};if(i.height="auto",((m=e.image)==null?void 0:m.layout)==="cover")i.objectFit="cover",(d=e.image)!=null&&d.position&&(i.objectPosition=g?"top":(c=e.image)==null?void 0:c.position);else if(((p=e.image)==null?void 0:p.layout)==="contain"){if(i.objectFit="contain",((h=e.image)==null?void 0:h.sizing)==="half"?i.width=g?"100%":"50%":((b=e.image)==null?void 0:b.sizing)==="inset"?(i.width="100%",i.maxWidth=e.image.maxWidth??"unset"):i.width="100%",(f=e.image)!=null&&f.aspectRatio){const[F,z]=(y=e.image)==null?void 0:y.aspectRatio.split(":").map(Number);i.aspectRatio=`${F}/${z}`}}else i.objectFit="none";let s;(v=e.image)!=null&&v.imageUrls&&(s=t==="dark"&&((x=e.image.imageUrls.dark)==null?void 0:x.medium)||e.image.imageUrls.default.medium);let u=((j=(k=(_=e.image)==null?void 0:_[t==="dark"?"darkImage":"defaultImage"])==null?void 0:k.asset)==null?void 0:j.altText)||((w=(A=(T=e.image)==null?void 0:T[t==="dark"?"darkImage":"defaultImage"])==null?void 0:A.asset)==null?void 0:w.description)||"Card image";switch(e.type){case"link":return n.jsx(l.Button,{as:"a",variant:e.variant,href:a,target:((q=e.linkOptions)==null?void 0:q.linkType)==="external"?"_blank":"_self",rel:((L=e.linkOptions)==null?void 0:L.linkType)==="external"?"noopener noreferrer":"","aria-label":e.ariaLabel||e.label,icon:e.icon,iconAlignment:e.iconAlignment??"right",displayType:e.displayType,ImageComponent:n.jsx(B,{src:s??"",alt:u,width:600,height:658,priority:!1,style:i}),children:e.label},o);case"scroll":return n.jsx(l.Button,{as:"scroll",variant:e.variant,scrollTarget:e.scrollTarget??"","aria-label":e.ariaLabel||e.label,icon:e.icon,iconAlignment:e.iconAlignment??"right",displayType:e.displayType,scrollOffset:e.scrollOffset,ImageComponent:n.jsx(B,{src:s??"",alt:u,width:600,height:658,priority:!1,style:i}),children:e.label},o);case"modal":return n.jsx(I.Modal,{trigger:n.jsx(l.Button,{as:"button",variant:e.variant??"primary",icon:e.icon,iconAlignment:e.iconAlignment??"right","aria-label":e.ariaLabel||e.label,children:e.label}),content:e.modalContent},o);case"video":return n.jsx(I.Modal,{trigger:n.jsx(l.Button,{as:"button",variant:e.variant??"primary",icon:e.icon,iconAlignment:e.iconAlignment??"right","aria-label":e.ariaLabel||e.label,children:e.label}),content:n.jsx("video",{src:e.videoUrl,controls:!0,autoPlay:!0})},o);case"download":return n.jsx(l.Button,{as:"a",variant:e.variant??"primary",href:a,download:!0,target:"_blank",rel:"noopener noreferrer","aria-label":e.ariaLabel||e.label,icon:e.icon,iconAlignment:e.iconAlignment??"right",children:e.label},o)}})}):null}exports.CallToAction=W;
|
|
@@ -2,58 +2,58 @@ import { jsx as r } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as W, useEffect as $ } from "react";
|
|
3
3
|
import C from "next/image";
|
|
4
4
|
import { ButtonGroup as E } from "../../../core/components/ButtonGroup/index.mjs";
|
|
5
|
-
import { B as
|
|
6
|
-
import { Modal as
|
|
7
|
-
import { resolveLinkURL as
|
|
5
|
+
import { B as o } from "../../../index-BnvfQt_k.js";
|
|
6
|
+
import { Modal as O } from "../../../core/components/Modal/index.mjs";
|
|
7
|
+
import { resolveLinkURL as R } from "../../utils/resolveLinkUrl.mjs";
|
|
8
8
|
import { useTheme as G } from "../../../core/context/ThemeContext.mjs";
|
|
9
9
|
import { useMediaQuery as N } from "../../hooks/useMediaQuery.mjs";
|
|
10
10
|
function ee({
|
|
11
|
-
items:
|
|
12
|
-
alignment:
|
|
13
|
-
spacing:
|
|
14
|
-
mobileOrientation:
|
|
15
|
-
className:
|
|
11
|
+
items: l,
|
|
12
|
+
alignment: B,
|
|
13
|
+
spacing: F,
|
|
14
|
+
mobileOrientation: M = "column",
|
|
15
|
+
className: P
|
|
16
16
|
}) {
|
|
17
|
-
const [
|
|
17
|
+
const [_, z] = W([]), { mode: t } = G(), m = N("(max-width: 767px)");
|
|
18
18
|
return $(() => {
|
|
19
|
-
if (!(
|
|
19
|
+
if (!(l != null && l.length) || !R) return;
|
|
20
20
|
async function e() {
|
|
21
|
-
const
|
|
22
|
-
|
|
21
|
+
const n = await Promise.all(
|
|
22
|
+
l.map((a) => R(a))
|
|
23
23
|
);
|
|
24
|
-
|
|
24
|
+
z(n);
|
|
25
25
|
}
|
|
26
26
|
e();
|
|
27
|
-
}, [
|
|
27
|
+
}, [l]), l != null && l.length ? /* @__PURE__ */ r(
|
|
28
28
|
E,
|
|
29
29
|
{
|
|
30
|
-
className:
|
|
31
|
-
alignment:
|
|
32
|
-
spacing:
|
|
33
|
-
mobileOrientation:
|
|
34
|
-
children:
|
|
35
|
-
var p, d,
|
|
36
|
-
const
|
|
30
|
+
className: P,
|
|
31
|
+
alignment: B,
|
|
32
|
+
spacing: F,
|
|
33
|
+
mobileOrientation: M,
|
|
34
|
+
children: l.slice(0, 3).map((e, n) => {
|
|
35
|
+
var p, d, f, u, h, b, y, c, v, k, A, T, w, I, L, U, j, x;
|
|
36
|
+
const a = _[n] ?? "#", i = {};
|
|
37
37
|
if (i.height = "auto", ((p = e.image) == null ? void 0 : p.layout) === "cover")
|
|
38
|
-
i.objectFit = "cover", (d = e.image) != null && d.position && (i.objectPosition =
|
|
39
|
-
else if (((
|
|
40
|
-
if (i.objectFit = "contain", ((h = e.image) == null ? void 0 : h.sizing) === "half" ? i.width =
|
|
41
|
-
const [
|
|
42
|
-
i.aspectRatio = `${
|
|
38
|
+
i.objectFit = "cover", (d = e.image) != null && d.position && (i.objectPosition = m ? "top" : (f = e.image) == null ? void 0 : f.position);
|
|
39
|
+
else if (((u = e.image) == null ? void 0 : u.layout) === "contain") {
|
|
40
|
+
if (i.objectFit = "contain", ((h = e.image) == null ? void 0 : h.sizing) === "half" ? i.width = m ? "100%" : "50%" : ((b = e.image) == null ? void 0 : b.sizing) === "inset" ? (i.width = "100%", i.maxWidth = e.image.maxWidth ?? "unset") : i.width = "100%", (y = e.image) != null && y.aspectRatio) {
|
|
41
|
+
const [H, S] = (c = e.image) == null ? void 0 : c.aspectRatio.split(":").map(Number);
|
|
42
|
+
i.aspectRatio = `${H}/${S}`;
|
|
43
43
|
}
|
|
44
44
|
} else
|
|
45
45
|
i.objectFit = "none";
|
|
46
|
-
let
|
|
47
|
-
(v = e.image) != null && v.imageUrls && (
|
|
46
|
+
let s;
|
|
47
|
+
(v = e.image) != null && v.imageUrls && (s = t === "dark" && ((k = e.image.imageUrls.dark) == null ? void 0 : k.medium) || e.image.imageUrls.default.medium);
|
|
48
48
|
let g = ((w = (T = (A = e.image) == null ? void 0 : A[t === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : T.asset) == null ? void 0 : w.altText) || ((U = (L = (I = e.image) == null ? void 0 : I[t === "dark" ? "darkImage" : "defaultImage"]) == null ? void 0 : L.asset) == null ? void 0 : U.description) || "Card image";
|
|
49
49
|
switch (e.type) {
|
|
50
50
|
case "link":
|
|
51
51
|
return /* @__PURE__ */ r(
|
|
52
|
-
|
|
52
|
+
o,
|
|
53
53
|
{
|
|
54
54
|
as: "a",
|
|
55
55
|
variant: e.variant,
|
|
56
|
-
href:
|
|
56
|
+
href: a,
|
|
57
57
|
target: ((j = e.linkOptions) == null ? void 0 : j.linkType) === "external" ? "_blank" : "_self",
|
|
58
58
|
rel: ((x = e.linkOptions) == null ? void 0 : x.linkType) === "external" ? "noopener noreferrer" : "",
|
|
59
59
|
"aria-label": e.ariaLabel || e.label,
|
|
@@ -63,7 +63,7 @@ function ee({
|
|
|
63
63
|
ImageComponent: /* @__PURE__ */ r(
|
|
64
64
|
C,
|
|
65
65
|
{
|
|
66
|
-
src:
|
|
66
|
+
src: s ?? "",
|
|
67
67
|
alt: g,
|
|
68
68
|
width: 600,
|
|
69
69
|
height: 658,
|
|
@@ -73,11 +73,11 @@ function ee({
|
|
|
73
73
|
),
|
|
74
74
|
children: e.label
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
n
|
|
77
77
|
);
|
|
78
78
|
case "scroll":
|
|
79
79
|
return /* @__PURE__ */ r(
|
|
80
|
-
|
|
80
|
+
o,
|
|
81
81
|
{
|
|
82
82
|
as: "scroll",
|
|
83
83
|
variant: e.variant,
|
|
@@ -86,10 +86,11 @@ function ee({
|
|
|
86
86
|
icon: e.icon,
|
|
87
87
|
iconAlignment: e.iconAlignment ?? "right",
|
|
88
88
|
displayType: e.displayType,
|
|
89
|
+
scrollOffset: e.scrollOffset,
|
|
89
90
|
ImageComponent: /* @__PURE__ */ r(
|
|
90
91
|
C,
|
|
91
92
|
{
|
|
92
|
-
src:
|
|
93
|
+
src: s ?? "",
|
|
93
94
|
alt: g,
|
|
94
95
|
width: 600,
|
|
95
96
|
height: 658,
|
|
@@ -99,14 +100,14 @@ function ee({
|
|
|
99
100
|
),
|
|
100
101
|
children: e.label
|
|
101
102
|
},
|
|
102
|
-
|
|
103
|
+
n
|
|
103
104
|
);
|
|
104
105
|
case "modal":
|
|
105
106
|
return /* @__PURE__ */ r(
|
|
106
|
-
|
|
107
|
+
O,
|
|
107
108
|
{
|
|
108
109
|
trigger: /* @__PURE__ */ r(
|
|
109
|
-
|
|
110
|
+
o,
|
|
110
111
|
{
|
|
111
112
|
as: "button",
|
|
112
113
|
variant: e.variant ?? "primary",
|
|
@@ -118,14 +119,14 @@ function ee({
|
|
|
118
119
|
),
|
|
119
120
|
content: e.modalContent
|
|
120
121
|
},
|
|
121
|
-
|
|
122
|
+
n
|
|
122
123
|
);
|
|
123
124
|
case "video":
|
|
124
125
|
return /* @__PURE__ */ r(
|
|
125
|
-
|
|
126
|
+
O,
|
|
126
127
|
{
|
|
127
128
|
trigger: /* @__PURE__ */ r(
|
|
128
|
-
|
|
129
|
+
o,
|
|
129
130
|
{
|
|
130
131
|
as: "button",
|
|
131
132
|
variant: e.variant ?? "primary",
|
|
@@ -137,15 +138,15 @@ function ee({
|
|
|
137
138
|
),
|
|
138
139
|
content: /* @__PURE__ */ r("video", { src: e.videoUrl, controls: !0, autoPlay: !0 })
|
|
139
140
|
},
|
|
140
|
-
|
|
141
|
+
n
|
|
141
142
|
);
|
|
142
143
|
case "download":
|
|
143
144
|
return /* @__PURE__ */ r(
|
|
144
|
-
|
|
145
|
+
o,
|
|
145
146
|
{
|
|
146
147
|
as: "a",
|
|
147
148
|
variant: e.variant ?? "primary",
|
|
148
|
-
href:
|
|
149
|
+
href: a,
|
|
149
150
|
download: !0,
|
|
150
151
|
target: "_blank",
|
|
151
152
|
rel: "noopener noreferrer",
|
|
@@ -154,7 +155,7 @@ function ee({
|
|
|
154
155
|
iconAlignment: e.iconAlignment ?? "right",
|
|
155
156
|
children: e.label
|
|
156
157
|
},
|
|
157
|
-
|
|
158
|
+
n
|
|
158
159
|
);
|
|
159
160
|
}
|
|
160
161
|
})
|
package/package.json
CHANGED
package/dist/index-CAS0iFfs.cjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";require('./index66.css');const e=require("react/jsx-runtime"),g=require("react"),h=require("./index-CBK5rp6X.cjs"),o=require("./createLucideIcon-DpotSgUx.cjs"),N=require("./external-link-DDShu-48.cjs"),M=require("./play-CQBnZgNa.cjs"),k=require("./chevron-right-motlyADs.cjs"),R=require("./chevron-down-DfK1XBl3.cjs"),E=require("./arrow-right-DO6S4vfx.cjs"),z=require("./arrow-left-4E3t8axP.cjs");/**
|
|
2
|
-
* @license lucide-react v0.488.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/const A=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],C=o.createLucideIcon("chevron-up",A);/**
|
|
7
|
-
* @license lucide-react v0.488.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const P=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],V=o.createLucideIcon("log-in",P);/**
|
|
12
|
-
* @license lucide-react v0.488.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const F=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],I=o.createLucideIcon("menu",F);/**
|
|
17
|
-
* @license lucide-react v0.488.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const B=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],D=o.createLucideIcon("phone",B);/**
|
|
22
|
-
* @license lucide-react v0.488.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const S=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],G=o.createLucideIcon("refresh-ccw",S);/**
|
|
27
|
-
* @license lucide-react v0.488.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const U=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],H=o.createLucideIcon("settings",U),J="_button_1xx80_1",K="_sm_1xx80_30",O="_content_1xx80_34",Q="_icon_1xx80_38",T="_md_1xx80_43",W="_lg_1xx80_48",X="_image_1xx80_61",Y="_blurred_1xx80_68",Z="_primary_1xx80_69",ee="_secondary_1xx80_70",ne="_destructive_1xx80_71",re="_primaryInverted_1xx80_72",te="_secondaryInverted_1xx80_73",oe="_blurredInverted_1xx80_75",se="_link_1xx80_89",ce="_linkInverted_1xx80_90",ie="_underline_1xx80_91",ae="_underlineInverted_1xx80_92",le="_children_1xx80_286",de="_iconLeft_1xx80_293",xe="_iconRight_1xx80_297",n={button:J,sm:K,content:O,icon:Q,md:T,lg:W,image:X,blurred:Y,primary:Z,secondary:ee,destructive:ne,primaryInverted:re,secondaryInverted:te,blurredInverted:oe,link:se,linkInverted:ce,underline:ie,underlineInverted:ae,children:le,iconLeft:de,iconRight:xe},ue={apps:e.jsxs(e.Fragment,{children:[e.jsx(h.FaApple,{})," ",e.jsx(h.FaGooglePlay,{})]}),"arrow-left":e.jsx(z.ArrowLeft,{}),"arrow-right":e.jsx(E.ArrowRight,{}),"chevron-up":e.jsx(C,{}),"chevron-down":e.jsx(R.ChevronDown,{}),"chevron-left":e.jsx(k.ChevronLeft,{}),"chevron-right":e.jsx(k.ChevronRight,{}),envelope:e.jsx(h.FaEnvelope,{}),phone:e.jsx(D,{}),play:e.jsx(M.Play,{}),"new-tab":e.jsx(N.ExternalLink,{}),menu:e.jsx(I,{}),refresh:e.jsx(G,{}),settings:e.jsx(H,{}),"sign-in":e.jsx(V,{})},_e={primary:n.primary,primaryInverted:n.primaryInverted,secondary:n.secondary,secondaryInverted:n.secondaryInverted,link:n.link,linkInverted:n.linkInverted,underline:n.underline,underlineInverted:n.underlineInverted,blurred:n.blurred,blurredInverted:n.blurredInverted,destructive:n.destructive},he={left:n.iconLeft,right:n.iconRight},ve={sm:n.sm,md:n.md,lg:n.lg};function ye({variant:b="primary",size:f="md",displayType:v="text",imageSrc:y,imageAlt:j="",ImageComponent:r,icon:p,iconAlignment:L="right",className:w,children:l,disabled:d=!1,...$}){let c=null;if(r){if(g.isValidElement(r))c=r;else if(typeof r=="function"||typeof r=="object"){const t=r;c=e.jsx(t,{})}}const x=v==="image"?c||(y?e.jsx("img",{src:y,alt:j,className:n.image}):g.isValidElement(l)?l:null):e.jsxs("span",{className:`${n.content} ${he[L]}`,children:[e.jsx("span",{className:n.children,children:l}),p&&e.jsx("span",{className:n.icon,"aria-hidden":"true",children:ue[p]})]}),u=`${w??""} ${n.button} ${ve[f]} ${v==="text"?_e[b]:n.image}`.trim(),{as:m="button",..._}=$;if(m==="a"){const{href:t,target:i,rel:s,...a}=_,q=i==="_blank"?s?`${s} noopener noreferrer`:"noopener noreferrer":s;return e.jsx("a",{href:t,target:i,rel:q,className:u,"aria-disabled":d?"true":void 0,...a,children:x})}if(m==="scroll"){const{scrollTarget:t,...i}=_,s=()=>{const a=document.getElementById(t);a&&a.scrollIntoView({behavior:"smooth",block:"start"})};return e.jsx("button",{type:"button",onClick:s,className:u,disabled:d,"aria-label":`Scroll to ${t}`,...i,children:x})}return e.jsx("button",{type:"button",className:u,disabled:d,..._,children:x})}exports.Button=ye;exports.Menu=I;
|