@paolojulian.dev/design-system 4.3.0 → 4.5.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"icons.es.js","sources":["../src/icons/triangle-list-icon.tsx","../src/icons/linkedin-icon.tsx","../src/icons/mail-icon.tsx","../src/icons/new-tab-arrow-icon.tsx","../src/icons/phone-icon.tsx"],"sourcesContent":["import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function TriangleListIcon({ className, ...props }: Props) {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='11'\n height='12'\n viewBox='0 0 11 12'\n fill='none'\n aria-hidden='true'\n className={cn('text-secondary', className)}\n {...props}\n >\n <path\n d='M-4.89749e-07 0.397423L10.9999 0.397422L10.9999 11.6016L-4.89749e-07 0.397423Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function LinkedInIcon({ className, ...props }: Props) {\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-hidden='true'\n className={cn('text-white', className)}\n {...props}\n >\n <path\n d='M20.3732 0.000153812H1.62676C1.41603 -0.00275523 1.20679 0.0356256 1.01099 0.113104C0.815184 0.190583 0.636653 0.305642 0.485591 0.451711C0.334528 0.597779 0.213893 0.771996 0.130575 0.964411C0.0472562 1.15683 0.00288655 1.36367 0 1.57313V20.4269C0.00288655 20.6363 0.0472562 20.8432 0.130575 21.0356C0.213893 21.228 0.334528 21.4022 0.485591 21.5483C0.636653 21.6944 0.815184 21.8094 1.01099 21.8869C1.20679 21.9644 1.41603 22.0028 1.62676 21.9998H20.3732C20.584 22.0028 20.7932 21.9644 20.989 21.8869C21.1848 21.8094 21.3633 21.6944 21.5144 21.5483C21.6655 21.4022 21.7861 21.228 21.8694 21.0356C21.9527 20.8432 21.9971 20.6363 22 20.4269V1.57313C21.9971 1.36367 21.9527 1.15683 21.8694 0.964411C21.7861 0.771996 21.6655 0.597779 21.5144 0.451711C21.3633 0.305642 21.1848 0.190583 20.989 0.113104C20.7932 0.0356256 20.584 -0.00275523 20.3732 0.000153812ZM6.67304 18.4139H3.35312V8.51403H6.67304V18.4139ZM5.01308 7.12805C4.78637 7.12805 4.56188 7.08367 4.35243 6.99743C4.14298 6.9112 3.95267 6.7848 3.79236 6.62546C3.63205 6.46611 3.50489 6.27695 3.41813 6.06875C3.33137 5.86056 3.28672 5.63742 3.28672 5.41208C3.28672 5.18673 3.33137 4.96359 3.41813 4.7554C3.50489 4.54721 3.63205 4.35804 3.79236 4.1987C3.95267 4.03936 4.14298 3.91296 4.35243 3.82672C4.56188 3.74049 4.78637 3.6961 5.01308 3.6961C5.2562 3.6687 5.50241 3.69264 5.73558 3.76637C5.96874 3.8401 6.18361 3.96196 6.36612 4.12395C6.54862 4.28595 6.69465 4.48444 6.79463 4.70642C6.89461 4.9284 6.94629 5.16887 6.94629 5.41208C6.94629 5.65529 6.89461 5.89576 6.79463 6.11774C6.69465 6.33972 6.54862 6.53821 6.36612 6.7002C6.18361 6.8622 5.96874 6.98405 5.73558 7.05778C5.50241 7.13151 5.2562 7.15546 5.01308 7.12805ZM18.6469 18.4139H15.327V13.101C15.327 11.77 14.8511 10.901 13.6449 10.901C13.2716 10.9037 12.9081 11.0201 12.6033 11.2345C12.2986 11.4489 12.0673 11.7509 11.9406 12.1C11.854 12.3585 11.8165 12.6308 11.83 12.903V18.4029H8.51006C8.51006 18.4029 8.51006 9.40502 8.51006 8.50303H11.83V9.90001C12.1316 9.37984 12.5702 8.9513 13.0987 8.66055C13.6271 8.36981 14.2254 8.22787 14.829 8.25004C17.0423 8.25004 18.6469 9.66902 18.6469 12.716V18.4139Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function MailIcon({ className, ...props }: Props) {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n aria-hidden='true'\n className={cn('text-white', className)}\n {...props}\n >\n <path\n d='M1.5 8.66992V17.2499C1.5 18.0456 1.81607 18.8086 2.37868 19.3712C2.94129 19.9339 3.70435 20.2499 4.5 20.2499H19.5C20.2956 20.2499 21.0587 19.9339 21.6213 19.3712C22.1839 18.8086 22.5 18.0456 22.5 17.2499V8.66992L13.572 14.1629C13.0992 14.4538 12.5551 14.6078 12 14.6078C11.4449 14.6078 10.9008 14.4538 10.428 14.1629L1.5 8.66992Z'\n fill='currentColor'\n />\n <path\n d='M22.5 6.908V6.75C22.5 5.95435 22.1839 5.19129 21.6213 4.62868C21.0587 4.06607 20.2956 3.75 19.5 3.75H4.5C3.70435 3.75 2.94129 4.06607 2.37868 4.62868C1.81607 5.19129 1.5 5.95435 1.5 6.75V6.908L11.214 12.886C11.4504 13.0314 11.7225 13.1084 12 13.1084C12.2775 13.1084 12.5496 13.0314 12.786 12.886L22.5 6.908Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function NewTabArrowIcon({ className, ...props }: Props) {\n return (\n <svg\n width='54'\n height='55'\n viewBox='0 0 54 55'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-hidden='true'\n className={cn('text-secondary', className)}\n {...props}\n >\n <g clipPath='url(#clip0_2414_7900)'>\n <path\n d='M24.4898 15.9316L40.0283 20.0952M40.0283 20.0952L35.8648 35.6337M40.0283 20.0952L14.6971 34.7202'\n stroke='currentColor'\n strokeWidth='4'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </g>\n <defs>\n <clipPath id='clip0_2414_7900'>\n <rect\n width='39'\n height='39'\n fill='white'\n transform='translate(34.5 0.769531) rotate(60)'\n />\n </clipPath>\n </defs>\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function PhoneIcon({ className, ...props }: Props) {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n aria-hidden='true'\n className={cn('text-white', className)}\n {...props}\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M1.5 4.5C1.5 3.70435 1.81607 2.94129 2.37868 2.37868C2.94129 1.81607 3.70435 1.5 4.5 1.5H5.872C6.732 1.5 7.482 2.086 7.691 2.92L8.796 7.343C8.88554 7.701 8.86746 8.07746 8.74401 8.42522C8.62055 8.77299 8.39723 9.07659 8.102 9.298L6.809 10.268C6.674 10.369 6.645 10.517 6.683 10.62C7.24738 12.1549 8.1386 13.5487 9.29495 14.7051C10.4513 15.8614 11.8451 16.7526 13.38 17.317C13.483 17.355 13.63 17.326 13.732 17.191L14.702 15.898C14.9234 15.6028 15.227 15.3794 15.5748 15.256C15.9225 15.1325 16.299 15.1145 16.657 15.204L21.08 16.309C21.914 16.518 22.5 17.268 22.5 18.129V19.5C22.5 20.2956 22.1839 21.0587 21.6213 21.6213C21.0587 22.1839 20.2956 22.5 19.5 22.5H17.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n"],"names":["TriangleListIcon","className","props","jsx","cn","LinkedInIcon","MailIcon","jsxs","NewTabArrowIcon","PhoneIcon"],"mappings":"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"}
1
+ {"version":3,"file":"icons.es.js","sources":["../src/icons/triangle-list-icon.tsx","../src/icons/linkedin-icon.tsx","../src/icons/mail-icon.tsx","../src/icons/new-tab-arrow-icon.tsx","../src/icons/phone-icon.tsx"],"sourcesContent":["import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function TriangleListIcon({ className, ...props }: Props) {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='11'\n height='12'\n viewBox='0 0 11 12'\n fill='none'\n aria-hidden='true'\n className={cn('text-secondary', className)}\n {...props}\n >\n <path\n d='M-4.89749e-07 0.397423L10.9999 0.397422L10.9999 11.6016L-4.89749e-07 0.397423Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function LinkedInIcon({ className, ...props }: Props) {\n return (\n <svg\n width='22'\n height='22'\n viewBox='0 0 22 22'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-hidden='true'\n className={cn('text-white', className)}\n {...props}\n >\n <path\n d='M20.3732 0.000153812H1.62676C1.41603 -0.00275523 1.20679 0.0356256 1.01099 0.113104C0.815184 0.190583 0.636653 0.305642 0.485591 0.451711C0.334528 0.597779 0.213893 0.771996 0.130575 0.964411C0.0472562 1.15683 0.00288655 1.36367 0 1.57313V20.4269C0.00288655 20.6363 0.0472562 20.8432 0.130575 21.0356C0.213893 21.228 0.334528 21.4022 0.485591 21.5483C0.636653 21.6944 0.815184 21.8094 1.01099 21.8869C1.20679 21.9644 1.41603 22.0028 1.62676 21.9998H20.3732C20.584 22.0028 20.7932 21.9644 20.989 21.8869C21.1848 21.8094 21.3633 21.6944 21.5144 21.5483C21.6655 21.4022 21.7861 21.228 21.8694 21.0356C21.9527 20.8432 21.9971 20.6363 22 20.4269V1.57313C21.9971 1.36367 21.9527 1.15683 21.8694 0.964411C21.7861 0.771996 21.6655 0.597779 21.5144 0.451711C21.3633 0.305642 21.1848 0.190583 20.989 0.113104C20.7932 0.0356256 20.584 -0.00275523 20.3732 0.000153812ZM6.67304 18.4139H3.35312V8.51403H6.67304V18.4139ZM5.01308 7.12805C4.78637 7.12805 4.56188 7.08367 4.35243 6.99743C4.14298 6.9112 3.95267 6.7848 3.79236 6.62546C3.63205 6.46611 3.50489 6.27695 3.41813 6.06875C3.33137 5.86056 3.28672 5.63742 3.28672 5.41208C3.28672 5.18673 3.33137 4.96359 3.41813 4.7554C3.50489 4.54721 3.63205 4.35804 3.79236 4.1987C3.95267 4.03936 4.14298 3.91296 4.35243 3.82672C4.56188 3.74049 4.78637 3.6961 5.01308 3.6961C5.2562 3.6687 5.50241 3.69264 5.73558 3.76637C5.96874 3.8401 6.18361 3.96196 6.36612 4.12395C6.54862 4.28595 6.69465 4.48444 6.79463 4.70642C6.89461 4.9284 6.94629 5.16887 6.94629 5.41208C6.94629 5.65529 6.89461 5.89576 6.79463 6.11774C6.69465 6.33972 6.54862 6.53821 6.36612 6.7002C6.18361 6.8622 5.96874 6.98405 5.73558 7.05778C5.50241 7.13151 5.2562 7.15546 5.01308 7.12805ZM18.6469 18.4139H15.327V13.101C15.327 11.77 14.8511 10.901 13.6449 10.901C13.2716 10.9037 12.9081 11.0201 12.6033 11.2345C12.2986 11.4489 12.0673 11.7509 11.9406 12.1C11.854 12.3585 11.8165 12.6308 11.83 12.903V18.4029H8.51006C8.51006 18.4029 8.51006 9.40502 8.51006 8.50303H11.83V9.90001C12.1316 9.37984 12.5702 8.9513 13.0987 8.66055C13.6271 8.36981 14.2254 8.22787 14.829 8.25004C17.0423 8.25004 18.6469 9.66902 18.6469 12.716V18.4139Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function MailIcon({ className, ...props }: Props) {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n aria-hidden='true'\n className={cn('text-white', className)}\n {...props}\n >\n <path\n d='M1.5 8.66992V17.2499C1.5 18.0456 1.81607 18.8086 2.37868 19.3712C2.94129 19.9339 3.70435 20.2499 4.5 20.2499H19.5C20.2956 20.2499 21.0587 19.9339 21.6213 19.3712C22.1839 18.8086 22.5 18.0456 22.5 17.2499V8.66992L13.572 14.1629C13.0992 14.4538 12.5551 14.6078 12 14.6078C11.4449 14.6078 10.9008 14.4538 10.428 14.1629L1.5 8.66992Z'\n fill='currentColor'\n />\n <path\n d='M22.5 6.908V6.75C22.5 5.95435 22.1839 5.19129 21.6213 4.62868C21.0587 4.06607 20.2956 3.75 19.5 3.75H4.5C3.70435 3.75 2.94129 4.06607 2.37868 4.62868C1.81607 5.19129 1.5 5.95435 1.5 6.75V6.908L11.214 12.886C11.4504 13.0314 11.7225 13.1084 12 13.1084C12.2775 13.1084 12.5496 13.0314 12.786 12.886L22.5 6.908Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function NewTabArrowIcon({ className, ...props }: Props) {\n return (\n <svg\n width='54'\n height='55'\n viewBox='0 0 54 55'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n aria-hidden='true'\n className={cn('text-secondary', className)}\n {...props}\n >\n <g clipPath='url(#clip0_2414_7900)'>\n <path\n d='M24.4898 15.9316L40.0283 20.0952M40.0283 20.0952L35.8648 35.6337M40.0283 20.0952L14.6971 34.7202'\n stroke='currentColor'\n strokeWidth='4'\n strokeLinecap='round'\n strokeLinejoin='round'\n />\n </g>\n <defs>\n <clipPath id='clip0_2414_7900'>\n <rect\n width='39'\n height='39'\n fill='white'\n transform='translate(34.5 0.769531) rotate(60)'\n />\n </clipPath>\n </defs>\n </svg>\n );\n}\n","import { SVGAttributes } from 'react';\nimport { cn } from '../utils';\n\ntype Props = SVGAttributes<SVGElement>;\n\nexport default function PhoneIcon({ className, ...props }: Props) {\n return (\n <svg\n xmlns='http://www.w3.org/2000/svg'\n width='24'\n height='24'\n viewBox='0 0 24 24'\n fill='none'\n aria-hidden='true'\n className={cn('text-white', className)}\n {...props}\n >\n <path\n fillRule='evenodd'\n clipRule='evenodd'\n d='M1.5 4.5C1.5 3.70435 1.81607 2.94129 2.37868 2.37868C2.94129 1.81607 3.70435 1.5 4.5 1.5H5.872C6.732 1.5 7.482 2.086 7.691 2.92L8.796 7.343C8.88554 7.701 8.86746 8.07746 8.74401 8.42522C8.62055 8.77299 8.39723 9.07659 8.102 9.298L6.809 10.268C6.674 10.369 6.645 10.517 6.683 10.62C7.24738 12.1549 8.1386 13.5487 9.29495 14.7051C10.4513 15.8614 11.8451 16.7526 13.38 17.317C13.483 17.355 13.63 17.326 13.732 17.191L14.702 15.898C14.9234 15.6028 15.227 15.3794 15.5748 15.256C15.9225 15.1325 16.299 15.1145 16.657 15.204L21.08 16.309C21.914 16.518 22.5 17.268 22.5 18.129V19.5C22.5 20.2956 22.1839 21.0587 21.6213 21.6213C21.0587 22.1839 20.2956 22.5 19.5 22.5H17.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z'\n fill='currentColor'\n />\n </svg>\n );\n}\n"],"names":["TriangleListIcon","className","props","jsx","cn","LinkedInIcon","MailIcon","jsxs","NewTabArrowIcon","PhoneIcon"],"mappings":"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"}
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),c=require("./utils.cjs.js"),g=require("react"),L=({children:t,gap:a=void 0,alignItems:e=void 0,justifyContent:n=void 0,className:s=""})=>r.jsx("div",{className:c.cn("flex flex-row",s),style:{gap:a,alignItems:e,justifyContent:n},children:t}),I=({children:t,gap:a=void 0,alignItems:e=void 0,justifyContent:n=void 0,className:s=""})=>r.jsx("div",{className:c.cn("flex flex-col",s),style:{gap:a,alignItems:e,justifyContent:n},children:t});function C(t){var a,e,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t))for(a=0;a<t.length;a++)t[a]&&(e=C(t[a]))&&(n&&(n+=" "),n+=e);else for(a in t)t[a]&&(n&&(n+=" "),n+=a);return n}function O(){for(var t,a,e=0,n="";e<arguments.length;)(t=arguments[e++])&&(a=C(t))&&(n&&(n+=" "),n+=a);return n}const N=t=>typeof t=="boolean"?"".concat(t):t===0?"0":t,P=O,$=(t,a)=>e=>{var n;if((a==null?void 0:a.variants)==null)return P(t,e==null?void 0:e.class,e==null?void 0:e.className);const{variants:s,defaultVariants:i}=a,l=Object.keys(s).map(o=>{const u=e==null?void 0:e[o],f=i==null?void 0:i[o];if(u===null)return null;const d=N(u)||N(f);return s[o][d]}),x=e&&Object.entries(e).reduce((o,u)=>{let[f,d]=u;return d===void 0||(o[f]=d),o},{}),b=a==null||(n=a.compoundVariants)===null||n===void 0?void 0:n.reduce((o,u)=>{let{class:f,className:d,...v}=u;return Object.entries(v).every(m=>{let[p,h]=m;return Array.isArray(h)?h.includes({...i,...x}[p]):{...i,...x}[p]===h})?[...o,f,d]:o},[]);return P(t,l,b,e==null?void 0:e.class,e==null?void 0:e.className)},H={serif:"font-serif",body:"text-base","body-wide":"text-sm tracking-[0.40em] font-medium",heading:"text-[1.5rem] md:text-4xl tracking-[-0.04em] font-medium","heading-lg":"text-[2.5rem] md:text-[4rem] tracking-[-0.04em] font-medium leading-[2.75rem] md:leading-[4.5rem]","heading-xl":"text-[4rem] md:text-[7rem] tracking-[-0.04em] leading-[3.5rem] md:leading-[5.5rem] font-medium"},W=$("font-sans",{variants:{variant:H},defaultVariants:{variant:"body"}});function S({as:t="p",children:a,className:e="",variant:n,...s}){return r.jsx(t,{className:c.cn(W({variant:n,className:e})),...s,children:a})}function F({title:t}){return r.jsx(I,{className:"pt-2 border-t border-white text-white",children:r.jsx(S,{className:"uppercase",variant:"body-wide",children:t})})}function M(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[r.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),r.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function z(){return r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[r.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),r.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),r.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),r.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]})}const A=g.forwardRef(({className:t,inputClassName:a,type:e,label:n,helperText:s,id:i,isError:l=!1,errorMessage:x,rightAdornment:b,disabled:o,readOnly:u,style:f,...d},v)=>{const m=g.useId(),p=i??m,h=`${p}-error`,w=`${p}-helper`,y=e==="password",k=!!b&&!y,[j,T]=g.useState(!1),q=y?j?"text":"password":e??"text",B=[l&&x?h:null,!l&&s?w:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{className:c.cn("p-text-input relative w-full",t),style:f,children:[r.jsx("input",{...d,id:p,ref:v,type:q,disabled:o,readOnly:u,placeholder:" ","aria-invalid":l||void 0,"aria-describedby":B,"aria-required":d.required,"aria-disabled":o,"aria-readonly":u,autoComplete:d.autoComplete??(y?"current-password":void 0),className:c.cn("peer h-16 w-full rounded px-4 pt-6 pb-2",(y||k)&&"pr-12","bg-(--p-input-bg) text-(--p-input-text)","font-sans text-sm outline-none","border border-(--p-input-border) focus:border-(--p-input-border-focus)","focus:bg-(--p-input-bg-focus)","focus:ring-2 focus:ring-(--p-input-ring)","transition-all duration-150 ease-in","disabled:cursor-not-allowed disabled:opacity-50","read-only:cursor-default read-only:bg-(--p-input-bg-readonly)",l&&"ring-2 ring-red-500",k&&e==="date"&&"[&::-webkit-calendar-picker-indicator]:absolute [&::-webkit-calendar-picker-indicator]:right-0 [&::-webkit-calendar-picker-indicator]:h-full [&::-webkit-calendar-picker-indicator]:w-full [&::-webkit-calendar-picker-indicator]:cursor-pointer [&::-webkit-calendar-picker-indicator]:opacity-0",a)}),r.jsx("span",{"aria-hidden":"true",className:c.cn("pointer-events-none absolute top-2 left-4","font-sans text-xs","origin-left transition-all duration-150 ease-in","scale-0 opacity-0",l?"text-red-500":"text-(--p-input-label) peer-focus:text-(--p-input-label-focus)","peer-focus:scale-100 peer-focus:opacity-100","peer-not-placeholder-shown:scale-100 peer-not-placeholder-shown:opacity-100"),children:n}),r.jsx("label",{htmlFor:p,className:c.cn("pointer-events-none absolute top-1/2 left-4 -translate-y-1/2","font-sans text-sm text-(--p-input-text)","origin-left transition-all duration-150 ease-in","peer-focus:scale-0 peer-focus:opacity-0","peer-not-placeholder-shown:scale-0 peer-not-placeholder-shown:opacity-0",o&&"opacity-50"),children:n}),y&&r.jsx("button",{type:"button",onClick:()=>T(R=>!R),disabled:o,className:c.cn("absolute top-1/2 right-4 -translate-y-1/2","text-(--p-input-label) hover:text-(--p-input-text)","transition-colors duration-150","focus-visible:outline-2 focus-visible:outline-offset-2","focus-visible:outline-(--p-input-ring)","disabled:pointer-events-none disabled:opacity-50"),"aria-label":j?"Hide password":"Show password","aria-pressed":j,"aria-controls":p,children:j?r.jsx(M,{}):r.jsx(z,{})}),k&&r.jsx("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-1/2 right-4 -translate-y-1/2 text-(--p-input-label)",children:b}),l&&x&&r.jsx("p",{id:h,role:"alert",className:"mt-1 px-4 font-sans text-xs text-red-500",children:x}),!l&&s&&r.jsx("p",{id:w,className:"mt-1 px-4 font-sans text-xs text-(--p-input-text-helper)",children:s})]})});A.displayName="PTextInput";const V=g.forwardRef(({className:t,textareaClassName:a,label:e,helperText:n,id:s,isError:i=!1,errorMessage:l,disabled:x,readOnly:b,rows:o=4,style:u,...f},d)=>{const v=g.useId(),m=s??v,p=`${m}-error`,h=`${m}-helper`,w=[i&&l?p:null,!i&&n?h:null].filter(Boolean).join(" ")||void 0;return r.jsxs("div",{className:c.cn("p-text-area relative w-full",t),style:u,children:[r.jsx("textarea",{...f,id:m,ref:d,rows:o,disabled:x,readOnly:b,placeholder:" ","aria-invalid":i||void 0,"aria-describedby":w,"aria-required":f.required,"aria-disabled":x,"aria-readonly":b,className:c.cn("peer w-full rounded px-4 pt-8 pb-3","bg-(--p-textarea-bg) text-(--p-textarea-text)","font-sans text-sm outline-none","border border-(--p-textarea-border) focus:border-(--p-textarea-border-focus)","focus:bg-(--p-textarea-bg-focus)","focus:ring-2 focus:ring-(--p-textarea-ring)","resize-y","transition-all duration-150 ease-in","disabled:cursor-not-allowed disabled:opacity-50","read-only:cursor-default read-only:bg-(--p-textarea-bg-readonly)",i&&"ring-2 ring-red-500",a)}),r.jsx("span",{"aria-hidden":"true",className:c.cn("pointer-events-none absolute top-2 left-4","font-sans text-xs","origin-left transition-all duration-150 ease-in","scale-0 opacity-0",i?"text-red-500":"text-(--p-textarea-label) peer-focus:text-(--p-textarea-label-focus)","peer-focus:scale-100 peer-focus:opacity-100","peer-not-placeholder-shown:scale-100 peer-not-placeholder-shown:opacity-100"),children:e}),r.jsx("label",{htmlFor:m,className:c.cn("pointer-events-none absolute top-4 left-4","font-sans text-sm text-(--p-textarea-text)","origin-left transition-all duration-150 ease-in","peer-focus:scale-0 peer-focus:opacity-0","peer-not-placeholder-shown:scale-0 peer-not-placeholder-shown:opacity-0",x&&"opacity-50"),children:e}),i&&l&&r.jsx("p",{id:p,role:"alert",className:"mt-1 px-4 font-sans text-xs text-red-500",children:l}),!i&&n&&r.jsx("p",{id:h,className:"mt-1 px-4 font-sans text-xs text-(--p-textarea-text-helper)",children:n})]})});V.displayName="PTextArea";exports.PSectionHeader=F;exports.PTextArea=V;exports.PTextInput=A;exports.PTypography=S;exports.Row=L;exports.Stack=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),f=require("./utils.cjs.js"),d=require("react"),Ve=require("./chevron-right-icon-CctWeN0d.cjs"),Kt=({children:e,gap:t=void 0,alignItems:a=void 0,justifyContent:r=void 0,className:s=""})=>n.jsx("div",{className:f.cn("flex flex-row",s),style:{gap:t,alignItems:a,justifyContent:r},children:e}),$t=({children:e,gap:t=void 0,alignItems:a=void 0,justifyContent:r=void 0,className:s=""})=>n.jsx("div",{className:f.cn("flex flex-col",s),style:{gap:t,alignItems:a,justifyContent:r},children:e}),Pt=d.forwardRef(({as:e="span",variant:t="neutral",size:a="sm",appearance:r="subtle",leftIcon:s,rightIcon:i,children:u,className:m,...y},p)=>n.jsxs(e,{...y,ref:p,className:f.cn("p-badge",`p-badge--${t}`,`p-badge--${a}`,`p-badge--${r}`,m),children:[s&&n.jsx("span",{className:"p-badge__icon","aria-hidden":"true",children:s}),n.jsx("span",{className:"p-badge__label",children:u}),i&&n.jsx("span",{className:"p-badge__icon","aria-hidden":"true",children:i})]}));Pt.displayName="PBadge";const St=d.forwardRef(({variant:e="primary",size:t="md",fullWidth:a=!1,isActive:r=!1,isLoading:s=!1,leftIcon:i,rightIcon:u,children:m,className:y,...p},g)=>{const b=!!("disabled"in p&&p.disabled||s),N=f.cn("p-button",`p-button--${e}`,`p-button--${t}`,a&&"p-button--full-width",r&&"p-button--active",y),T=n.jsxs(n.Fragment,{children:[s?n.jsx("span",{className:"p-button__spinner","aria-hidden":"true"}):i&&n.jsx("span",{className:"p-button__icon","aria-hidden":"true",children:i}),n.jsx("span",{className:"p-button__label",children:m}),!s&&u&&n.jsx("span",{className:"p-button__icon","aria-hidden":"true",children:u})]});if("href"in p&&typeof p.href=="string"){const{disabled:B,onClick:M,...C}=p,R=q=>{if(b){q.preventDefault();return}M==null||M(q)};return n.jsx("a",{...C,ref:g,className:N,"aria-disabled":b||void 0,"aria-busy":s||void 0,"data-active":r||void 0,"data-disabled":B||void 0,tabIndex:b?-1:C.tabIndex,onClick:R,children:T})}const{type:F="button",disabled:j,...w}=p;return n.jsx("button",{...w,ref:g,type:F,disabled:!!(j||s),className:N,"aria-busy":s||void 0,"data-active":r||void 0,children:T})});St.displayName="PButton";function Ft(e){var t,a,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(a=Ft(e[t]))&&(r&&(r+=" "),r+=a);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function qt(){for(var e,t,a=0,r="";a<arguments.length;)(e=arguments[a++])&&(t=Ft(e))&&(r&&(r+=" "),r+=t);return r}const xt=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,yt=qt,Ut=(e,t)=>a=>{var r;if((t==null?void 0:t.variants)==null)return yt(e,a==null?void 0:a.class,a==null?void 0:a.className);const{variants:s,defaultVariants:i}=t,u=Object.keys(s).map(p=>{const g=a==null?void 0:a[p],b=i==null?void 0:i[p];if(g===null)return null;const N=xt(g)||xt(b);return s[p][N]}),m=a&&Object.entries(a).reduce((p,g)=>{let[b,N]=g;return N===void 0||(p[b]=N),p},{}),y=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((p,g)=>{let{class:b,className:N,...T}=g;return Object.entries(T).every(F=>{let[j,w]=F;return Array.isArray(w)?w.includes({...i,...m}[j]):{...i,...m}[j]===w})?[...p,b,N]:p},[]);return yt(e,u,y,a==null?void 0:a.class,a==null?void 0:a.className)},Wt={serif:"p-typography--serif",body:"p-typography--body","body-wide":"p-typography--body-wide",heading:"p-typography--heading","heading-lg":"p-typography--heading-lg","heading-xl":"p-typography--heading-xl"},Et=Ut("p-typography",{variants:{variant:Wt},defaultVariants:{variant:"body"}});function Ge({as:e="p",children:t,className:a="",variant:r,...s}){return n.jsx(e,{className:f.cn(Et({variant:r,className:a})),...s,children:t})}function Ye(e){return e!=null&&e!==!1&&e!==""}function vt(e,t){return Ye(e)?typeof e=="string"||typeof e=="number"?n.jsx(Ge,{className:t,variant:"body-wide",children:e}):n.jsx("span",{className:f.cn(t,"p-card__meta-custom"),children:e}):null}function Xe(e){return typeof e=="number"?`${e}px`:e}const Rt=d.forwardRef(({prefix:e,eyebrow:t,title:a,description:r,media:s,actions:i,density:u="default",fullWidth:m=!1,width:y,minWidth:p,height:g,minHeight:b,className:N,style:T,children:F,...j},w)=>{const B="href"in j&&typeof j.href=="string",M=f.cn("p-card",u!=="default"&&`p-card--${u}`,m&&"p-card--full-width",y!==void 0&&"p-card--custom-width",p!==void 0&&"p-card--custom-min-width",g!==void 0&&"p-card--custom-height",b!==void 0&&"p-card--custom-min-height",B&&"p-card--interactive",N),C={...T,...y!==void 0?{"--p-card-width":Xe(y)}:{},...p!==void 0?{"--p-card-min-width":Xe(p)}:{},...g!==void 0?{"--p-card-height":Xe(g)}:{},...b!==void 0?{"--p-card-min-height":Xe(b)}:{}},R=n.jsxs(n.Fragment,{children:[Ye(s)&&n.jsx("div",{className:"p-card__media",children:s}),(Ye(e)||Ye(t))&&n.jsxs("div",{className:"p-card__meta",children:[vt(e,"p-card__prefix"),vt(t,"p-card__eyebrow")]}),n.jsxs("div",{className:"p-card__body",children:[n.jsx(Ge,{as:"h3",className:"p-card__title",variant:"heading",children:B?n.jsx("a",{...j,className:"p-card__link",children:a}):a}),Ye(r)?n.jsx(Ge,{className:"p-card__description",variant:"body",children:r}):null]}),Ye(F)&&n.jsx("div",{className:"p-card__content",children:F}),Ye(i)&&n.jsx("div",{className:"p-card__actions",children:i})]});return B?n.jsx("article",{ref:w,className:M,style:C,children:R}):n.jsx("article",{...j,ref:w,className:M,style:C,children:R})});Rt.displayName="PCard";function Ot(){return n.jsx("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75","aria-hidden":"true",children:n.jsx("path",{d:"m5 8 5 5 5-5"})})}function Gt(){return n.jsx("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75","aria-hidden":"true",children:n.jsx("path",{d:"m4 10 4 4 8-8"})})}function jt(){return n.jsxs("svg",{viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeWidth:"1.75","aria-hidden":"true",children:[n.jsx("path",{d:"m5 5 10 10"}),n.jsx("path",{d:"m15 5-10 10"})]})}function Nt(e){return e.trim().toLocaleLowerCase()}function lt(e,t){const a=Nt(t);return a?e.filter(r=>{const s=[r.label,r.value,r.description,r.group,...r.keywords??[]].filter(Boolean).join(" ");return Nt(s).includes(a)}):e}function Yt(e){return e.findIndex(t=>!t.disabled)}function ct(e,t){const a=e.findIndex(r=>r.value===t&&!r.disabled);return a>=0?a:Yt(e)}function kt(e,t,a){var s;if(!e.length)return-1;let r=t;for(let i=0;i<e.length;i+=1)if(r=(r+a+e.length)%e.length,!((s=e[r])!=null&&s.disabled))return r;return-1}function Xt(e,t){if(typeof e=="function"){e(t);return}e&&(e.current=t)}const Tt=d.forwardRef(({label:e,options:t,value:a,defaultValue:r,selectedOption:s,onValueChange:i,query:u,defaultQuery:m,onQueryChange:y,filterMode:p="local",isLoading:g=!1,isLoadingMore:b=!1,hasMore:N=!1,onLoadMore:T,placeholder:F="Select an option",searchPlaceholder:j="Search options",emptyText:w="No options found.",loadingText:B="Loading options...",loadingMoreText:M="Loading more options...",loadMoreText:C="Load more options",helperText:R,isError:q=!1,errorMessage:ue,name:Ne,disabled:pe=!1,readOnly:ke=!1,required:ae=!1,clearable:re=!0,className:Q,inputClassName:se,id:Pe,style:Se,...Te},He)=>{const G=d.useId(),P=Pe??G,xe=`${P}-label`,v=`${P}-input`,Y=`${P}-listbox`,H=`${P}-helper`,A=`${P}-error`,I=d.useRef(null),L=d.useRef(null),S=d.useRef(null),X=d.useRef(null),he=d.useRef(null),ee=d.useRef(null),ge=a!==void 0,ye=u!==void 0,[we,Ke]=d.useState(r??""),W=ge?a:we,$=(s==null?void 0:s.value)===W?s:t.find(c=>c.value===W)??null,[qe,oe]=d.useState(m??($==null?void 0:$.label)??""),Z=ye?u:qe,[k,J]=d.useState(!1),[le,De]=d.useState(!1),V=d.useMemo(()=>p==="local"?lt(t,Z):t,[p,t,Z]),[ve,fe]=d.useState(()=>ct(t,W)),me=k?V[ve]:void 0,Fe=me?`${Y}-option-${ve}`:void 0,ce=`${P}-modal-title`,be=q&&ue?A:R?H:void 0,Re=!!$,ie=re&&Re&&!pe&&!ke,Me=k?Z:($==null?void 0:$.label)??Z,Be=g&&V.length===0,Ue=b||g&&V.length>0,We=!!(N&&T&&!g&&!b);d.useEffect(()=>{!k&&!ye&&oe(($==null?void 0:$.label)??"")},[k,ye,$]),d.useEffect(()=>{k&&fe(c=>V[c]&&!V[c].disabled?c:ct(V,W))},[V,k,W]),d.useEffect(()=>{var c;k&&((c=he.current)==null||c.scrollIntoView({block:"nearest"}))},[ve,k]),d.useEffect(()=>{var Ce,$e;const c=globalThis,h=(Ce=c.matchMedia)==null?void 0:Ce.call(c,"(max-width: 64rem)");if(!h)return;const U=()=>De(h.matches);return U(),($e=h.addEventListener)==null||$e.call(h,"change",U),()=>{var Ae;return(Ae=h.removeEventListener)==null?void 0:Ae.call(h,"change",U)}},[]),d.useEffect(()=>{var c;!k||!le||(c=S.current)==null||c.focus()},[le,k]),d.useEffect(()=>{X.current&&X.current.setCustomValidity(ae&&!W?"Select an option.":"")},[ae,W]);const l=c=>{I.current=c,Xt(He,c)},x=(c,h)=>{ye||oe(c),y==null||y(c,{source:h})},K=()=>{!N||!T||g||b||T({query:Z,optionCount:V.length})};d.useEffect(()=>{if(!k||!ee.current)return;const{scrollHeight:c,clientHeight:h}=ee.current;c<=h+48&&K()});const o=c=>{const h=(c==null?void 0:c.value)??"";ge||Ke(h),x((c==null?void 0:c.label)??"",c?"selection":"clear"),i==null||i(h,c)},_=(c=Z)=>{if(pe||ke)return;const h=p==="local"?lt(t,c):t;x(c,"open"),fe(ct(h,W)),J(!0)},z=()=>{J(!1),x(($==null?void 0:$.label)??"","reset")},_e=c=>{const h=c.currentTarget.value,U=p==="local"?lt(t,h):t;x(h,"input"),fe(Yt(U)),J(!0)},te=c=>{if(c.key==="ArrowDown"){if(c.preventDefault(),!k){_("");return}fe(h=>kt(V,h,1));return}if(c.key==="ArrowUp"){if(c.preventDefault(),!k){_("");return}fe(h=>kt(V,h,-1));return}if(c.key==="Enter"){if(!k){_(Z);return}me&&!me.disabled&&(c.preventDefault(),o(me),J(!1));return}if(c.key==="Escape"&&k){c.preventDefault(),z();return}c.key==="Tab"&&z()},Ie=(c,h)=>{var U;c.preventDefault(),!h.disabled&&(o(h),J(!1),(U=L.current)==null||U.focus())},rt=c=>{var h;c.preventDefault(),c.stopPropagation(),o(null),J(!1),(h=L.current)==null||h.focus()},st=c=>{const h=c.currentTarget;h.scrollHeight-h.scrollTop-h.clientHeight<=48&&K()},ot=c=>{if(!k)return;c.currentTarget.contains(c.relatedTarget)||z()},_t=V.reduce((c,h)=>{const U=h.group??null,Ce=c.find($e=>$e.group===U);return Ce?(Ce.options.push(h),c):(c.push({group:U,options:[h]}),c)},[]);return n.jsxs("div",{...Te,ref:l,id:P,style:Se,onBlur:ot,className:f.cn("p-combobox",k&&"p-combobox--open",q&&"p-combobox--error",pe&&"p-combobox--disabled",ke&&"p-combobox--readonly",Q),children:[n.jsxs("div",{className:"p-combobox__field",children:[n.jsx("input",{ref:L,id:v,role:"combobox",type:"text",value:Me,placeholder:k?j:" ",disabled:pe,readOnly:ke,required:!1,"aria-autocomplete":"list","aria-controls":Y,"aria-describedby":be,"aria-activedescendant":Fe,"aria-expanded":k,"aria-haspopup":"listbox","aria-invalid":q||void 0,"aria-labelledby":xe,autoComplete:"off",className:f.cn("p-combobox__input",(ie||Re)&&"p-combobox__input--adorned",se),onChange:_e,onClick:()=>_(""),onKeyDown:te}),n.jsx("label",{id:xe,htmlFor:v,className:f.cn("p-combobox__label p-combobox__floating-label",q&&"p-combobox__label--error"),children:e}),n.jsx("span",{"aria-hidden":"true",className:"p-combobox__label p-combobox__placeholder-label",children:F||e}),ie?n.jsx("button",{type:"button",className:"p-combobox__clear","aria-label":`Clear ${e}`,onMouseDown:rt,children:n.jsx(jt,{})}):null,n.jsx("span",{className:"p-combobox__chevron","aria-hidden":"true",children:n.jsx(Ot,{})}),k?n.jsxs("div",{className:"p-combobox__panel",role:le?"dialog":void 0,"aria-modal":le||void 0,"aria-labelledby":le?ce:void 0,children:[n.jsxs("div",{className:"p-combobox__modal-header",children:[n.jsx("div",{id:ce,className:"p-combobox__modal-title",children:e}),n.jsx("button",{type:"button",className:"p-combobox__modal-close","aria-label":`Close ${e}`,onClick:z,children:n.jsx(jt,{})})]}),n.jsx("div",{className:"p-combobox__modal-search",children:n.jsx("input",{ref:S,role:"combobox",type:"search",value:Z,placeholder:j,"aria-activedescendant":Fe,"aria-autocomplete":"list","aria-controls":Y,"aria-expanded":k,"aria-haspopup":"listbox","aria-label":`Search ${e}`,autoComplete:"off",className:"p-combobox__modal-input",onChange:_e,onKeyDown:te})}),n.jsxs("div",{id:Y,ref:c=>{ee.current=c},role:"listbox","aria-busy":g||b||void 0,"aria-labelledby":xe,className:"p-combobox__list",onScroll:st,children:[Be?n.jsxs("div",{className:"p-combobox__status",role:"option","aria-disabled":"true","aria-selected":"false",children:[n.jsx("span",{className:"p-combobox__spinner","aria-hidden":"true"}),n.jsx("span",{children:B})]}):null,_t.length?_t.map(c=>n.jsxs("div",{className:"p-combobox__group",children:[c.group?n.jsx("div",{className:"p-combobox__group-label",children:c.group}):null,c.options.map(h=>{const U=V.indexOf(h),Ce=U===ve,$e=h.value===W;return n.jsxs("div",{ref:Ce?Ae=>{he.current=Ae}:void 0,id:`${Y}-option-${U}`,role:"option","aria-disabled":h.disabled||void 0,"aria-selected":$e,className:f.cn("p-combobox__option",Ce&&"p-combobox__option--active",$e&&"p-combobox__option--selected",h.disabled&&"p-combobox__option--disabled"),onMouseDown:Ae=>Ie(Ae,h),children:[n.jsx("span",{className:"p-combobox__option-check",children:$e?n.jsx(Gt,{}):null}),n.jsxs("span",{className:"p-combobox__option-content",children:[n.jsx("span",{className:"p-combobox__option-label",children:h.label}),h.description?n.jsx("span",{className:"p-combobox__option-description",children:h.description}):null]}),h.meta?n.jsx("span",{className:"p-combobox__option-meta",children:h.meta}):null]},h.value)})]},c.group??"ungrouped")):Be?null:n.jsx("div",{className:"p-combobox__empty",role:"option","aria-disabled":"true","aria-selected":"false",children:w}),Ue?n.jsxs("div",{className:"p-combobox__status p-combobox__status--footer",role:"option","aria-disabled":"true","aria-selected":"false",children:[n.jsx("span",{className:"p-combobox__spinner","aria-hidden":"true"}),n.jsx("span",{children:M})]}):null]}),We?n.jsx("div",{className:"p-combobox__footer",children:n.jsx("button",{type:"button",className:"p-combobox__load-more",onMouseDown:c=>c.preventDefault(),onClick:K,children:C})}):null]}):null]}),n.jsx("input",{ref:X,type:"text",name:Ne,value:W??"",required:ae,tabIndex:-1,"aria-hidden":"true",className:"p-combobox__hidden-input",onChange:()=>{}}),k?n.jsx("div",{className:"p-combobox__backdrop","aria-hidden":"true",onMouseDown:z}):null,q&&ue?n.jsx("p",{id:A,role:"alert",className:"p-combobox__message p-combobox__message--error",children:ue}):null,!q&&R?n.jsx("p",{id:H,className:"p-combobox__message",children:R}):null]})});Tt.displayName="PCombobox";const Zt=new Intl.DateTimeFormat(void 0,{weekday:"short"});function Qe(e){if(!e)return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:new Date(e.getFullYear(),e.getMonth(),e.getDate());const t=e.split("-").map(Number);if(t.length!==3||t.some(Number.isNaN))return null;const[a,r,s]=t,i=new Date(a,r-1,s);return i.getFullYear()!==a||i.getMonth()!==r-1||i.getDate()!==s?null:i}function Oe(e){if(!e)return"";const t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${r}`}function ne(e){return new Date(e.getFullYear(),e.getMonth(),1)}function at(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function bt(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function wt(e,t){const a=bt(e,t),r=at(a).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),r))}function de(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function Ee(e,t){return!!(e&&t&&Oe(e)===Oe(t))}function Le(){const e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Jt(e,t){const a=ne(e),r=(a.getDay()-t+7)%7,s=de(a,-r);return Array.from({length:42},(i,u)=>de(s,u))}function it(e){const t=typeof e.value=="function"?e.value():e.value;return Qe(t)}function Qt(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}).format(e)}function en(e){return Array.from({length:12},(t,a)=>({label:new Intl.DateTimeFormat(e,{month:"long"}).format(new Date(2024,a,1)),value:a}))}function tn(e,t){return new Intl.DateTimeFormat(t,{month:"short",day:"numeric",year:"numeric"}).format(e)}function nn(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"long",day:"numeric",year:"numeric"}).format(e)}function an(e,t){const a=new Date(2024,0,7);return Array.from({length:7},(r,s)=>{const i=de(a,e+s);return Zt.formatToParts(i).length?new Intl.DateTimeFormat(t,{weekday:"short"}).format(i):""})}function dt(e,t){return!!(t&&e.getTime()<t.getTime())}function ut(e,t){return!!(t&&e.getTime()>t.getTime())}function Dt(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function pt(e,t,a){const r=ne(e),s=at(e);return!!(t&&s<t||a&&r>a)}function rn(e,t,a){return t&&at(e)<t?ne(t):a&&ne(e)>a?ne(a):ne(e)}function sn(e,t,a,r){const s=ne(e),i=at(e);let u=new Date(s.getFullYear(),s.getMonth(),Math.min(t.getDate(),i.getDate()));return a&&u<a&&(u=Dt(a,s)?a:s),r&&u>r&&(u=Dt(r,s)?r:i),u}function on(e,t,a,r){const s=e.getFullYear(),i=Math.min(s,r.getFullYear()-100),u=Math.max(s,r.getFullYear()+20),m=(t==null?void 0:t.getFullYear())??i,y=(a==null?void 0:a.getFullYear())??u,p=Math.min(m,y,s),g=Math.max(m,y,s);return Array.from({length:g-p+1},(b,N)=>p+N)}const Bt=d.forwardRef(({label:e,value:t,defaultValue:a,onValueChange:r,presets:s=[],customLabel:i="Custom",showCustom:u=!0,presetColumns:m="auto",placeholder:y="Select date",helperText:p,isError:g=!1,errorMessage:b,min:N,max:T,name:F,disabled:j=!1,readOnly:w=!1,required:B=!1,locale:M,weekStartsOn:C=0,className:R,id:q,style:ue,...Ne},pe)=>{const ke=d.useId(),ae=q??ke,re=`${ae}-label`,Q=`${ae}-panel`,se=`${ae}-helper`,Pe=`${ae}-error`,Se=t!==void 0,[Te,He]=d.useState(a??""),[G,P]=d.useState(!1),xe=Se?t:Te,v=Qe(xe),Y=d.useMemo(Le,[]),H=Qe(N),A=Qe(T),[I,L]=d.useState(()=>ne(v??Y)),[S,X]=d.useState(()=>v??Y),he=d.useRef(null),ee=d.useRef({}),ge=d.useRef(!1),ye=Jt(I,C),we=an(C,M),Ke=d.useMemo(()=>en(M),[M]),W=on(I,H,A,Y),$=s.length>0,qe=$?u:!0,oe=m==="auto"?void 0:{"--p-date-picker-preset-columns":String(m)},Z=g&&b?Pe:p?se:void 0,k=v?tn(v,M):y,J=$?s.some(l=>Ee(it(l),v)):!1,le=G||!!(v&&!J),De=bt(I,-1),V=bt(I,1),ve=pt(De,H,A),fe=pt(V,H,A);d.useEffect(()=>{var l;G&&ge.current&&((l=ee.current[Oe(S)])==null||l.focus(),ge.current=!1)},[S,G,I]);const me=(l,x)=>{const K=Oe(l);Se||He(K),l&&L(ne(l)),r==null||r(K,{date:l,source:x})},Fe=l=>{if(j||w)return;const x=v??Y;he.current=l,ge.current=!0,X(x),L(ne(x)),P(!0)},ce=(l=!1)=>{var x;P(!1),l&&((x=he.current)==null||x.focus())},be=l=>{const x=rn(l,H,A);L(x),X(sn(x,S,H,A))},Re=l=>{const{value:x}=l.currentTarget;be(new Date(I.getFullYear(),Number(x),1))},ie=l=>{const{value:x}=l.currentTarget;be(new Date(Number(x),I.getMonth(),1))},Me=l=>{if(j||w)return;const x=it(l);me(x,"preset"),ce()},Be=l=>{j||w||dt(l,H)||ut(l,A)||(X(l),me(l,"calendar"),ce(!0))},Ue=l=>{dt(l,H)||ut(l,A)||(ge.current=!0,X(l),L(ne(l)))},We=l=>x=>{if(x.key==="Escape"){x.preventDefault(),ce(!0);return}const K=(l.getDay()-C+7)%7,_={ArrowLeft:de(l,-1),ArrowRight:de(l,1),ArrowUp:de(l,-7),ArrowDown:de(l,7),Home:de(l,-K),End:de(l,6-K),PageUp:wt(l,-1),PageDown:wt(l,1)}[x.key];_&&(x.preventDefault(),Ue(_))};return n.jsxs("div",{...Ne,ref:pe,id:ae,style:oe?{...ue,...oe}:ue,className:f.cn("p-date-picker",$&&"p-date-picker--with-presets",g&&"p-date-picker--error",j&&"p-date-picker--disabled",R),children:[$?n.jsxs("div",{id:re,className:"p-date-picker__label",children:[n.jsx("span",{children:e}),n.jsx("span",{className:f.cn("p-date-picker__label-value",!v&&"p-date-picker__label-value--empty"),children:k})]}):null,$?n.jsxs("div",{"aria-describedby":Z,"aria-labelledby":re,className:f.cn("p-date-picker__presets",m!=="auto"&&"p-date-picker__presets--fixed"),role:"group",children:[s.map(l=>{const x=it(l),K=Ee(x,v);return n.jsx("button",{type:"button",className:f.cn("p-date-picker__preset",K&&"p-date-picker__preset--active"),disabled:j,"aria-pressed":K,onClick:()=>Me(l),children:l.label},l.label)}),qe?n.jsx("button",{type:"button",className:f.cn("p-date-picker__preset",le&&"p-date-picker__preset--active"),disabled:j,"aria-controls":Q,"aria-expanded":G,"aria-pressed":le,onClick:l=>G?ce(!0):Fe(l.currentTarget),children:i}):null]}):n.jsxs("button",{type:"button",className:f.cn("p-date-picker__trigger",!v&&"p-date-picker__trigger--empty",v&&"p-date-picker__trigger--filled",G&&"p-date-picker__trigger--open"),disabled:j,"aria-controls":Q,"aria-describedby":Z,"aria-expanded":G,"aria-haspopup":"dialog","aria-label":`${e}: ${k}`,onClick:l=>G?ce(!0):Fe(l.currentTarget),children:[n.jsx("span",{id:re,className:f.cn("p-date-picker__trigger-label p-date-picker__trigger-floating-label",g&&"p-date-picker__trigger-label--error"),"aria-hidden":"true",children:e}),n.jsx("span",{className:f.cn("p-date-picker__trigger-label p-date-picker__trigger-placeholder-label",g&&"p-date-picker__trigger-label--error"),"aria-hidden":"true",children:e}),n.jsx("span",{className:"p-date-picker__trigger-value",children:k}),n.jsx("span",{className:"p-date-picker__trigger-icon",children:n.jsx(Ve.CalendarIcon,{})})]}),n.jsx("input",{type:"hidden",name:F,value:xe??"",required:B}),G&&n.jsxs("div",{id:Q,className:"p-date-picker__panel",role:"dialog","aria-labelledby":`${Q}-title`,onKeyDown:l=>{l.key==="Escape"&&ce()},children:[n.jsxs("div",{className:"p-date-picker__calendar-header",children:[n.jsx("button",{type:"button",className:"p-date-picker__nav","aria-label":"Previous month",disabled:ve,onClick:()=>be(De),children:n.jsx(Ve.ChevronLeftIcon,{})}),n.jsxs("div",{className:"p-date-picker__month",children:[n.jsx("span",{id:`${Q}-title`,className:"p-date-picker__month-label",children:Qt(I,M)}),n.jsx("select",{className:"p-date-picker__month-select p-date-picker__calendar-select","aria-label":"Month",value:I.getMonth(),onChange:Re,children:Ke.map(l=>n.jsx("option",{value:l.value,disabled:pt(new Date(I.getFullYear(),l.value,1),H,A),children:l.label},l.value))}),n.jsx("select",{className:"p-date-picker__year-select p-date-picker__calendar-select","aria-label":"Year",value:I.getFullYear(),onChange:ie,children:W.map(l=>n.jsx("option",{value:l,children:l},l))})]}),n.jsx("button",{type:"button",className:"p-date-picker__nav","aria-label":"Next month",disabled:fe,onClick:()=>be(V),children:n.jsx(Ve.ChevronRightIcon,{})})]}),n.jsx("div",{className:"p-date-picker__weekdays","aria-hidden":"true",children:we.map(l=>n.jsx("span",{children:l},l))}),n.jsx("div",{className:"p-date-picker__grid",role:"grid","aria-labelledby":`${Q}-title`,children:ye.map(l=>{const x=Oe(l),K=l.getMonth()!==I.getMonth(),o=Ee(l,v),_=Ee(l,Y),z=dt(l,H)||ut(l,A);return n.jsx("button",{ref:_e=>{ee.current[x]=_e},type:"button",role:"gridcell","data-date":x,className:f.cn("p-date-picker__day",K&&"p-date-picker__day--outside",_&&"p-date-picker__day--today",o&&"p-date-picker__day--selected"),disabled:z,"aria-label":nn(l,M),"aria-selected":o,tabIndex:Ee(l,S)?0:-1,onClick:()=>Be(l),onKeyDown:We(l),children:l.getDate()},x)})})]}),g&&b?n.jsx("p",{id:Pe,role:"alert",className:"p-date-picker__message p-date-picker__message--error",children:b}):null,!g&&p?n.jsx("p",{id:se,className:"p-date-picker__message",children:p}):null]})});Bt.displayName="PDatePicker";const ln={today:{label:"Today",value:()=>Le()},yesterday:{label:"Yesterday",value:()=>de(Le(),-1)},tomorrow:{label:"Tomorrow",value:()=>de(Le(),1)},startOfMonth:{label:"Start of month",value:()=>ne(Le())},endOfMonth:{label:"End of month",value:()=>{const e=Le();return new Date(e.getFullYear(),e.getMonth()+1,0)}}},cn=new Intl.DateTimeFormat(void 0,{weekday:"short"});function tt(e){if(!e)return null;if(e instanceof Date)return Number.isNaN(e.getTime())?null:new Date(e.getFullYear(),e.getMonth(),e.getDate());const t=e.split("-").map(Number);if(t.length!==3||t.some(Number.isNaN))return null;const[a,r,s]=t,i=new Date(a,r-1,s);return i.getFullYear()!==a||i.getMonth()!==r-1||i.getDate()!==s?null:i}function D(e){if(!e)return"";const t=e.getFullYear(),a=String(e.getMonth()+1).padStart(2,"0"),r=String(e.getDate()).padStart(2,"0");return`${t}-${a}-${r}`}function O(e){return new Date(e.getFullYear(),e.getMonth(),1)}function ze(e){return new Date(e.getFullYear(),e.getMonth()+1,0)}function nt(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function Mt(e,t){const a=nt(e,t),r=ze(a).getDate();return new Date(a.getFullYear(),a.getMonth(),Math.min(e.getDate(),r))}function E(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)}function je(){const e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function dn(e,t){const a=O(e),r=(a.getDay()-t+7)%7,s=E(a,-r);return Array.from({length:42},(i,u)=>E(s,u))}function un(e,t){return new Intl.DateTimeFormat(t,{month:"long",year:"numeric"}).format(e)}function pn(e){return Array.from({length:12},(t,a)=>({label:new Intl.DateTimeFormat(e,{month:"long"}).format(new Date(2024,a,1)),value:a}))}function Ze(e,t){return new Intl.DateTimeFormat(t,{month:"short",day:"numeric",year:"numeric"}).format(e)}function hn(e,t){return new Intl.DateTimeFormat(t,{weekday:"long",month:"long",day:"numeric",year:"numeric"}).format(e)}function gn(e,t){const a=new Date(2024,0,7);return Array.from({length:7},(r,s)=>{const i=E(a,e+s);return cn.formatToParts(i).length?new Intl.DateTimeFormat(t,{weekday:"short"}).format(i):""})}function Je(e,t){return!!(e&&t&&D(e)===D(t))}function ht(e,t){return!!(t&&e.getTime()<t.getTime())}function gt(e,t){return!!(t&&e.getTime()>t.getTime())}function It(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function ft(e,t,a){const r=O(e),s=ze(e);return!!(t&&s<t||a&&r>a)}function fn(e,t,a){return t&&ze(e)<t?O(t):a&&O(e)>a?O(a):O(e)}function mn(e,t,a,r){const s=O(e),i=ze(e);let u=new Date(s.getFullYear(),s.getMonth(),Math.min(t.getDate(),i.getDate()));return a&&u<a&&(u=It(a,s)?a:s),r&&u>r&&(u=It(r,s)?r:i),u}function bn(e,t,a,r){const s=e.getFullYear(),i=Math.min(s,r.getFullYear()-100),u=Math.max(s,r.getFullYear()+20),m=(t==null?void 0:t.getFullYear())??i,y=(a==null?void 0:a.getFullYear())??u,p=Math.min(m,y,s),g=Math.max(m,y,s);return Array.from({length:g-p+1},(b,N)=>p+N)}function _n(e,t,a){return!!(t&&a&&e>t&&e<a)}function xn(e,t){return!e&&!t?{}:e&&t&&t<e?{start:D(t),end:D(e)}:{start:D(e),end:D(t)}}function mt(e){return typeof e.value=="function"?e.value():e.value}function et(e){return{startDate:tt(e==null?void 0:e.start),endDate:tt(e==null?void 0:e.end)}}function Ct(e,t){return!!(e!=null&&e.start&&(e!=null&&e.end)&&e.start===(t==null?void 0:t.start)&&e.end===(t==null?void 0:t.end))}function yn(e,t,a){const{startDate:r,endDate:s}=et(e);return r&&s?`${Ze(r,a)} - ${Ze(s,a)}`:r?`${Ze(r,a)} -`:s?`- ${Ze(s,a)}`:t}const At=d.forwardRef(({label:e,value:t,defaultValue:a,onValueChange:r,presets:s=[],customLabel:i="Custom",showCustom:u=!0,presetColumns:m="auto",placeholder:y="Select range",helperText:p,isError:g=!1,errorMessage:b,min:N,max:T,nameStart:F,nameEnd:j,disabled:w=!1,readOnly:B=!1,required:M=!1,locale:C,weekStartsOn:R=0,className:q,id:ue,style:Ne,...pe},ke)=>{const ae=d.useId(),re=ue??ae,Q=`${re}-label`,se=`${re}-panel`,Pe=`${re}-helper`,Se=`${re}-error`,Te=t!==void 0,[He,G]=d.useState(a??{}),[P,xe]=d.useState(!1),v=Te?t:He,{startDate:Y,endDate:H}=et(v),A=d.useMemo(je,[]),I=tt(N),L=tt(T),[S,X]=d.useState(()=>O(Y??A)),[he,ee]=d.useState(()=>Y??A),ge=d.useRef(null),ye=d.useRef({}),we=d.useRef(!1),Ke=dn(S,R),W=gn(R,C),$=d.useMemo(()=>pn(C),[C]),qe=bn(S,I,L,A),oe=s.length>0,Z=oe?u:!0,k=m==="auto"?void 0:{"--p-date-range-picker-preset-columns":String(m)},J=!!(v!=null&&v.start&&(v!=null&&v.end)),le=g&&b?Se:p?Pe:void 0,De=yn(v,y,C),V=oe?s.some(o=>Ct(mt(o),v)):!1,ve=P||!!(J&&!V),fe=nt(S,-1),me=nt(S,1),Fe=ft(fe,I,L),ce=ft(me,I,L);d.useEffect(()=>{var o;P&&we.current&&((o=ye.current[D(he)])==null||o.focus(),we.current=!1)},[he,P,S]);const be=(o,_)=>{const{startDate:z,endDate:_e}=et(o),te=xn(z,_e);Te||G(te);const Ie=et(te);Ie.startDate&&X(O(Ie.startDate)),r==null||r(te,{startDate:Ie.startDate,endDate:Ie.endDate,source:_})},Re=o=>{if(w||B)return;const _=Y??A;ge.current=o,we.current=!0,ee(_),X(O(_)),xe(!0)},ie=(o=!1)=>{var _;xe(!1),o&&((_=ge.current)==null||_.focus())},Me=o=>{const _=fn(o,I,L);X(_),ee(mn(_,he,I,L))},Be=o=>{const{value:_}=o.currentTarget;Me(new Date(S.getFullYear(),Number(_),1))},Ue=o=>{const{value:_}=o.currentTarget;Me(new Date(Number(_),S.getMonth(),1))},We=o=>{w||B||(be(mt(o),"preset"),ie())},l=o=>{if(!(w||B||ht(o,I)||gt(o,L))){if(!Y||H){ee(o),be({start:D(o),end:""},"calendar");return}ee(o),be({start:D(Y),end:D(o)},"calendar"),ie(!0)}},x=o=>{ht(o,I)||gt(o,L)||(we.current=!0,ee(o),X(O(o)))},K=o=>_=>{if(_.key==="Escape"){_.preventDefault(),ie(!0);return}const z=(o.getDay()-R+7)%7,te={ArrowLeft:E(o,-1),ArrowRight:E(o,1),ArrowUp:E(o,-7),ArrowDown:E(o,7),Home:E(o,-z),End:E(o,6-z),PageUp:Mt(o,-1),PageDown:Mt(o,1)}[_.key];te&&(_.preventDefault(),x(te))};return n.jsxs("div",{...pe,ref:ke,id:re,style:k?{...Ne,...k}:Ne,className:f.cn("p-date-range-picker",oe&&"p-date-range-picker--with-presets",g&&"p-date-range-picker--error",w&&"p-date-range-picker--disabled",q),children:[oe?n.jsxs("div",{id:Q,className:"p-date-range-picker__label",children:[n.jsx("span",{children:e}),n.jsx("span",{className:f.cn("p-date-range-picker__label-value",!J&&"p-date-range-picker__label-value--empty"),children:De})]}):null,oe?n.jsxs("div",{"aria-describedby":le,"aria-labelledby":Q,className:f.cn("p-date-range-picker__presets",m!=="auto"&&"p-date-range-picker__presets--fixed"),role:"group",children:[s.map(o=>{const _=mt(o),z=Ct(_,v);return n.jsx("button",{type:"button",className:f.cn("p-date-range-picker__preset",z&&"p-date-range-picker__preset--active"),disabled:w,"aria-pressed":z,onClick:()=>We(o),children:o.label},o.label)}),Z?n.jsx("button",{type:"button",className:f.cn("p-date-range-picker__preset",ve&&"p-date-range-picker__preset--active"),disabled:w,"aria-controls":se,"aria-expanded":P,"aria-pressed":ve,onClick:o=>P?ie(!0):Re(o.currentTarget),children:i}):null]}):n.jsxs("button",{type:"button",className:f.cn("p-date-range-picker__trigger",!J&&"p-date-range-picker__trigger--empty",J&&"p-date-range-picker__trigger--filled",P&&"p-date-range-picker__trigger--open"),disabled:w,"aria-controls":se,"aria-describedby":le,"aria-expanded":P,"aria-haspopup":"dialog","aria-label":`${e}: ${De}`,onClick:o=>P?ie(!0):Re(o.currentTarget),children:[n.jsx("span",{id:Q,className:f.cn("p-date-range-picker__trigger-label p-date-range-picker__trigger-floating-label",g&&"p-date-range-picker__trigger-label--error"),"aria-hidden":"true",children:e}),n.jsx("span",{className:f.cn("p-date-range-picker__trigger-label p-date-range-picker__trigger-placeholder-label",g&&"p-date-range-picker__trigger-label--error"),"aria-hidden":"true",children:e}),n.jsx("span",{className:"p-date-range-picker__trigger-value",children:De}),n.jsx("span",{className:"p-date-range-picker__trigger-icon",children:n.jsx(Ve.CalendarIcon,{})})]}),n.jsx("input",{type:"hidden",name:F,value:(v==null?void 0:v.start)??"",required:M}),n.jsx("input",{type:"hidden",name:j,value:(v==null?void 0:v.end)??"",required:M}),P&&n.jsxs("div",{id:se,className:"p-date-range-picker__panel",role:"dialog","aria-labelledby":`${se}-title`,onKeyDown:o=>{o.key==="Escape"&&ie()},children:[n.jsxs("div",{className:"p-date-range-picker__calendar-header",children:[n.jsx("button",{type:"button",className:"p-date-range-picker__nav","aria-label":"Previous month",disabled:Fe,onClick:()=>Me(fe),children:n.jsx(Ve.ChevronLeftIcon,{})}),n.jsxs("div",{className:"p-date-range-picker__month",children:[n.jsx("span",{id:`${se}-title`,className:"p-date-range-picker__month-label",children:un(S,C)}),n.jsx("select",{className:"p-date-range-picker__month-select p-date-range-picker__calendar-select","aria-label":"Month",value:S.getMonth(),onChange:Be,children:$.map(o=>n.jsx("option",{value:o.value,disabled:ft(new Date(S.getFullYear(),o.value,1),I,L),children:o.label},o.value))}),n.jsx("select",{className:"p-date-range-picker__year-select p-date-range-picker__calendar-select","aria-label":"Year",value:S.getFullYear(),onChange:Ue,children:qe.map(o=>n.jsx("option",{value:o,children:o},o))})]}),n.jsx("button",{type:"button",className:"p-date-range-picker__nav","aria-label":"Next month",disabled:ce,onClick:()=>Me(me),children:n.jsx(Ve.ChevronRightIcon,{})})]}),n.jsx("div",{className:"p-date-range-picker__weekdays","aria-hidden":"true",children:W.map(o=>n.jsx("span",{children:o},o))}),n.jsx("div",{className:"p-date-range-picker__grid",role:"grid","aria-labelledby":`${se}-title`,children:Ke.map(o=>{const _=D(o),z=o.getMonth()!==S.getMonth(),_e=Je(o,Y),te=Je(o,H),Ie=_n(o,Y,H),rt=Je(o,A),st=ht(o,I)||gt(o,L);return n.jsx("button",{ref:ot=>{ye.current[_]=ot},type:"button",role:"gridcell","data-date":_,className:f.cn("p-date-range-picker__day",z&&"p-date-range-picker__day--outside",rt&&"p-date-range-picker__day--today",Ie&&"p-date-range-picker__day--in-range",(_e||te)&&"p-date-range-picker__day--selected"),disabled:st,"aria-label":hn(o,C),"aria-selected":_e||te,tabIndex:Je(o,he)?0:-1,onClick:()=>l(o),onKeyDown:K(o),children:o.getDate()},_)})})]}),g&&b?n.jsx("p",{id:Se,role:"alert",className:"p-date-range-picker__message p-date-range-picker__message--error",children:b}):null,!g&&p?n.jsx("p",{id:Pe,className:"p-date-range-picker__message",children:p}):null]})});At.displayName="PDateRangePicker";const vn={thisWeek:{label:"This week",value:()=>{const e=je(),t=E(e,-e.getDay());return{start:D(t),end:D(E(t,6))}}},last7Days:{label:"Last 7 days",value:()=>{const e=je();return{start:D(E(e,-6)),end:D(e)}}},last14Days:{label:"Last 14 days",value:()=>{const e=je();return{start:D(E(e,-13)),end:D(e)}}},last30Days:{label:"Last 30 days",value:()=>{const e=je();return{start:D(E(e,-29)),end:D(e)}}},thisMonth:{label:"This month",value:()=>{const e=je(),t=O(e),a=ze(e);return{start:D(t),end:D(a)}}},lastMonth:{label:"Last month",value:()=>{const e=je(),t=nt(e,-1);return{start:D(O(t)),end:D(ze(t))}}},monthToDate:{label:"Month to date",value:()=>{const e=je(),t=O(e);return{start:D(t),end:D(e)}}},yearToDate:{label:"Year to date",value:()=>{const e=je();return{start:D(new Date(e.getFullYear(),0,1)),end:D(e)}}}},Lt=d.forwardRef(({as:e="span",variant:t="primary",appearance:a="text",color:r,textColor:s,children:i,className:u,style:m,...y},p)=>{const g={...m,...r?{"--p-highlight-color":r,"--p-highlight-bg":r}:{},...s?{"--p-highlight-text":s}:{}};return n.jsx(e,{...y,ref:p,className:f.cn("p-highlight",`p-highlight--${t}`,a==="background"&&"p-highlight--background",u),style:g,children:i})});Lt.displayName="PHighlight";const Vt=d.forwardRef(({children:e,ariaLabel:t="Horizontal content",gap:a,snap:r=!0,className:s,scrollerClassName:i,listClassName:u,itemClassName:m,style:y,...p},g)=>{const b={...y,...a?{"--p-horizontal-slider-gap":a}:{}};return n.jsx("div",{...p,ref:g,className:f.cn("p-horizontal-slider",!r&&"p-horizontal-slider--no-snap",s),style:b,children:n.jsx("div",{"aria-label":t,className:f.cn("p-horizontal-slider__scroller",i),role:"region",tabIndex:0,children:n.jsx("ul",{className:f.cn("p-horizontal-slider__list",u),children:d.Children.map(e,N=>n.jsx("li",{className:f.cn("p-horizontal-slider__item",m),children:N}))})})})});Vt.displayName="PHorizontalSlider";function jn({title:e}){return n.jsx($t,{className:"pt-2 border-t border-white text-white",children:n.jsx(Ge,{className:"uppercase",variant:"body-wide",children:e})})}function Nn(){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",className:"p-text-input__icon",children:[n.jsx("path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z"}),n.jsx("circle",{cx:"12",cy:"12",r:"3"})]})}function kn(){return n.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",className:"p-text-input__icon",children:[n.jsx("path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24"}),n.jsx("path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68"}),n.jsx("path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61"}),n.jsx("line",{x1:"2",x2:"22",y1:"2",y2:"22"})]})}const zt=d.forwardRef(({className:e,inputClassName:t,type:a,label:r,helperText:s,id:i,isError:u=!1,errorMessage:m,rightAdornment:y,disabled:p,readOnly:g,style:b,...N},T)=>{const F=d.useId(),j=i??F,w=`${j}-error`,B=`${j}-helper`,M=a==="password",C=!!y&&!M,[R,q]=d.useState(!1),ue=M?R?"text":"password":a??"text",Ne=[u&&m?w:null,!u&&s?B:null].filter(Boolean).join(" ")||void 0;return n.jsxs("div",{className:f.cn("p-text-input",e),style:b,children:[n.jsxs("div",{className:"p-text-input__field",children:[n.jsx("input",{...N,id:j,ref:T,type:ue,disabled:p,readOnly:g,placeholder:" ","aria-invalid":u||void 0,"aria-describedby":Ne,"aria-required":N.required,"aria-disabled":p,"aria-readonly":g,autoComplete:N.autoComplete??(M?"current-password":void 0),className:f.cn("p-text-input__control",(M||C)&&"p-text-input__control--adorned",u&&"p-text-input__control--error",C&&a==="date"&&"p-text-input__control--date-adorned",t)}),n.jsx("span",{"aria-hidden":"true",className:f.cn("p-text-input__label p-text-input__floating-label",u&&"p-text-input__label--error"),children:r}),n.jsx("label",{htmlFor:j,className:"p-text-input__label p-text-input__placeholder-label",children:r}),M&&n.jsx("button",{type:"button",onClick:()=>q(pe=>!pe),disabled:p,className:"p-text-input__action","aria-label":R?"Hide password":"Show password","aria-pressed":R,"aria-controls":j,children:R?n.jsx(Nn,{}):n.jsx(kn,{})}),C&&n.jsx("span",{"aria-hidden":"true",className:"p-text-input__adornment",children:y})]}),u&&m&&n.jsx("p",{id:w,role:"alert",className:"p-text-input__message p-text-input__message--error",children:m}),!u&&s&&n.jsx("p",{id:B,className:"p-text-input__message p-text-input__message--helper",children:s})]})});zt.displayName="PTextInput";const Ht=d.forwardRef(({className:e,textareaClassName:t,label:a,helperText:r,id:s,isError:i=!1,errorMessage:u,disabled:m,readOnly:y,rows:p=4,style:g,...b},N)=>{const T=d.useId(),F=s??T,j=`${F}-error`,w=`${F}-helper`,B=[i&&u?j:null,!i&&r?w:null].filter(Boolean).join(" ")||void 0;return n.jsxs("div",{className:f.cn("p-text-area",e),style:g,children:[n.jsx("textarea",{...b,id:F,ref:N,rows:p,disabled:m,readOnly:y,placeholder:" ","aria-invalid":i||void 0,"aria-describedby":B,"aria-required":b.required,"aria-disabled":m,"aria-readonly":y,className:f.cn("p-text-area__control",i&&"p-text-area__control--error",t)}),n.jsx("span",{"aria-hidden":"true",className:f.cn("p-text-area__label p-text-area__floating-label",i&&"p-text-area__label--error"),children:a}),n.jsx("label",{htmlFor:F,className:"p-text-area__label p-text-area__placeholder-label",children:a}),i&&u&&n.jsx("p",{id:j,role:"alert",className:"p-text-area__message p-text-area__message--error",children:u}),!i&&r&&n.jsx("p",{id:w,className:"p-text-area__message p-text-area__message--helper",children:r})]})});Ht.displayName="PTextArea";exports.PBadge=Pt;exports.PButton=St;exports.PCard=Rt;exports.PCombobox=Tt;exports.PDatePicker=Bt;exports.PDatePickerPresets=ln;exports.PDateRangePicker=At;exports.PDateRangePickerPresets=vn;exports.PHighlight=Lt;exports.PHorizontalSlider=Vt;exports.PSectionHeader=jn;exports.PTextArea=Ht;exports.PTextInput=zt;exports.PTypography=Ge;exports.Row=Kt;exports.Stack=$t;
2
2
  //# sourceMappingURL=index.cjs.js.map