automoby-kit 1.0.8 → 1.0.10
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/cjs/Accordion.js +1 -0
- package/dist/cjs/Accordion.js.map +1 -0
- package/dist/cjs/Backdrop.js +1 -0
- package/dist/cjs/Backdrop.js.map +1 -0
- package/dist/cjs/Breadcrumb.js +1 -0
- package/dist/cjs/Breadcrumb.js.map +1 -0
- package/dist/cjs/Button.js +1 -0
- package/dist/cjs/Button.js.map +1 -0
- package/dist/cjs/Chips.js +1 -0
- package/dist/cjs/Chips.js.map +1 -0
- package/dist/cjs/Divider.js +1 -0
- package/dist/cjs/Divider.js.map +1 -0
- package/dist/cjs/Drawer.js +1 -0
- package/dist/cjs/Drawer.js.map +1 -0
- package/dist/cjs/Input.js +1 -0
- package/dist/cjs/Input.js.map +1 -0
- package/dist/cjs/Menu.js +1 -0
- package/dist/cjs/Menu.js.map +1 -0
- package/dist/cjs/Pagination.js +1 -0
- package/dist/cjs/Pagination.js.map +1 -0
- package/dist/cjs/ProtectedComponent.js +1 -0
- package/dist/cjs/ProtectedComponent.js.map +1 -0
- package/dist/cjs/RadioGroup.js +1 -0
- package/dist/cjs/RadioGroup.js.map +1 -0
- package/dist/cjs/Tabs.js +1 -0
- package/dist/cjs/Tabs.js.map +1 -0
- package/dist/cjs/Typography.js +1 -0
- package/dist/cjs/Typography.js.map +1 -0
- package/dist/cjs/chunks/chevron-left-Do__K6cA.js +1 -0
- package/dist/cjs/chunks/chevron-left-Do__K6cA.js.map +1 -0
- package/dist/cjs/chunks/createLucideIcon-BqJVOzoK.js +1 -0
- package/dist/cjs/chunks/createLucideIcon-BqJVOzoK.js.map +1 -0
- package/dist/cjs/chunks/jsx-runtime-Bgd4cJfV.js +1 -0
- package/dist/cjs/chunks/jsx-runtime-Bgd4cJfV.js.map +1 -0
- package/dist/cjs/contexts.js +1 -0
- package/dist/cjs/contexts.js.map +1 -0
- package/dist/cjs/index.js +2 -1
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/licensing.js +1 -0
- package/dist/cjs/licensing.js.map +1 -0
- package/dist/cjs/utils.js +1 -0
- package/dist/cjs/utils.js.map +1 -0
- package/dist/esm/Accordion.js +1 -0
- package/dist/esm/Accordion.js.map +1 -0
- package/dist/esm/Backdrop.js +1 -0
- package/dist/esm/Backdrop.js.map +1 -0
- package/dist/esm/Breadcrumb.js +1 -0
- package/dist/esm/Breadcrumb.js.map +1 -0
- package/dist/esm/Button.js +1 -0
- package/dist/esm/Button.js.map +1 -0
- package/dist/esm/Chips.js +1 -0
- package/dist/esm/Chips.js.map +1 -0
- package/dist/esm/Divider.js +1 -0
- package/dist/esm/Divider.js.map +1 -0
- package/dist/esm/Drawer.js +1 -0
- package/dist/esm/Drawer.js.map +1 -0
- package/dist/esm/Input.js +1 -0
- package/dist/esm/Input.js.map +1 -0
- package/dist/esm/Menu.js +1 -0
- package/dist/esm/Menu.js.map +1 -0
- package/dist/esm/Pagination.js +1 -0
- package/dist/esm/Pagination.js.map +1 -0
- package/dist/esm/ProtectedComponent.js +1 -0
- package/dist/esm/ProtectedComponent.js.map +1 -0
- package/dist/esm/RadioGroup.js +1 -0
- package/dist/esm/RadioGroup.js.map +1 -0
- package/dist/esm/Tabs.js +1 -0
- package/dist/esm/Tabs.js.map +1 -0
- package/dist/esm/Typography.js +1 -0
- package/dist/esm/Typography.js.map +1 -0
- package/dist/esm/chunks/chevron-left-4HSuTes3.js +1 -0
- package/dist/esm/chunks/chevron-left-4HSuTes3.js.map +1 -0
- package/dist/esm/chunks/createLucideIcon-DGp0SoUT.js +1 -0
- package/dist/esm/chunks/createLucideIcon-DGp0SoUT.js.map +1 -0
- package/dist/esm/chunks/jsx-runtime-DZXOD2H9.js +1 -0
- package/dist/esm/chunks/jsx-runtime-DZXOD2H9.js.map +1 -0
- package/dist/esm/contexts.js +1 -0
- package/dist/esm/contexts.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/licensing.js +1 -0
- package/dist/esm/licensing.js.map +1 -0
- package/dist/esm/utils.js +1 -0
- package/dist/esm/utils.js.map +1 -0
- package/dist/types/index.d.ts +14 -14
- package/dist/types/index.js +18 -16
- package/package.json +1 -1
package/dist/cjs/Accordion.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use client";"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),r=require("react"),s=require("./utils.js"),t=require("./Typography.js"),i=require("./chunks/createLucideIcon-BqJVOzoK.js");const n=i.createLucideIcon("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),a=i.createLucideIcon("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),o=r.forwardRef(({title:i,body:o,startIcon:d,isExpanded:l,onToggle:c,defaultExpanded:u=!1,className:x,id:m,disabled:p=!1,isMobile:h,...j},f)=>{const[y,b]=r.useState(u),v=void 0!==l?l:y,g=m||`accordion-${Math.random().toString(36).substr(2,9)}`,E=`${g}-header`,R=`${g}-content`,N=h?20:24,k=h?"body-s-heavy":"body-l-heavy",w=h?"body-s-medium":"body-m-medium";return e.jsxRuntimeExports.jsxs("div",{ref:f,className:s("rounded-2xl border-0 overflow-hidden","transition-all duration-200 ease-in-out",x),...j,children:[e.jsxRuntimeExports.jsxs("button",{id:E,type:"button",onClick:()=>{if(p)return;const e=!v;void 0===l&&b(e),c?.(e)},disabled:p,"aria-expanded":v,"aria-controls":R,className:s("w-full flex items-center justify-between",h?"p-3":"p-4","focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed","transition-all duration-200 ease-in-out",!p&&"hover:bg-neutral-lighter"),children:[e.jsxRuntimeExports.jsx("div",{className:"flex-shrink-0 mr-4",children:v?e.jsxRuntimeExports.jsx(a,{size:N,className:"text-neutral-darker transition-transform duration-200","aria-hidden":"true"}):e.jsxRuntimeExports.jsx(n,{size:N,className:"text-neutral-darker transition-transform duration-200","aria-hidden":"true"})}),e.jsxRuntimeExports.jsxs("div",{className:s("flex items-center flex-1",h?"gap-3":"gap-4"),children:[e.jsxRuntimeExports.jsx("div",{className:"flex-1 text-right",children:e.jsxRuntimeExports.jsx(t.Typography,{variant:k,color:"neutral-darker",children:i})}),d&&e.jsxRuntimeExports.jsx("div",{className:s("flex-shrink-0 flex items-center justify-center",h?"w-6 h-6":"w-8 h-8"),children:d})]})]}),e.jsxRuntimeExports.jsx("div",{id:R,role:"region","aria-labelledby":E,className:s("w-full overflow-hidden transition-all duration-300 ease-in-out",v?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:e.jsxRuntimeExports.jsx("div",{className:s(h?"pb-3 mt-1":"pb-4 mt-1.5"),children:e.jsxRuntimeExports.jsx("div",{className:s("bg-neutral-lighter rounded-lg",h?"p-3":"p-4"),children:e.jsxRuntimeExports.jsx(t.Typography,{variant:w,color:"neutral-dark",children:o})})})})]})});o.displayName="Accordion",exports.Accordion=o;
|
|
2
|
+
//# sourceMappingURL=Accordion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../node_modules/lucide-react/dist/esm/icons/chevron-down.js","../../node_modules/lucide-react/dist/esm/icons/chevron-up.js","../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]];\nconst ChevronDown = createLucideIcon(\"chevron-down\", __iconNode);\n\nexport { __iconNode, ChevronDown as default };\n//# sourceMappingURL=chevron-down.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m18 15-6-6-6 6\", key: \"153udz\" }]];\nconst ChevronUp = createLucideIcon(\"chevron-up\", __iconNode);\n\nexport { __iconNode, ChevronUp as default };\n//# sourceMappingURL=chevron-up.js.map\n","import React, { useState } from 'react';\nimport { ChevronDown, ChevronUp } from 'lucide-react';\nimport cn from '@/utils/cn';\nimport { Typography } from '../Typography/Typography';\n\nexport interface AccordionProps {\n /** The header text content */\n title: string;\n /** The body text content */\n body: string;\n /** Icon to display at the start of the header */\n startIcon?: React.ReactNode;\n /** Whether the accordion is expanded (controlled) */\n isExpanded?: boolean;\n /** Callback when the accordion state changes */\n onToggle?: (isExpanded: boolean) => void;\n /** Default expanded state (uncontrolled) */\n defaultExpanded?: boolean;\n /** Additional CSS classes for the root element */\n className?: string;\n /** Unique identifier for the accordion */\n id?: string;\n /** Whether the accordion is disabled */\n disabled?: boolean;\n /** Whether the component is in mobile mode */\n isMobile: boolean;\n}\n\nconst Accordion = React.forwardRef<HTMLDivElement, AccordionProps>(\n (\n {\n title,\n body,\n startIcon,\n isExpanded: controlledExpanded,\n onToggle,\n defaultExpanded = false,\n className,\n id,\n disabled = false,\n isMobile,\n ...props\n },\n ref,\n ) => {\n const [internalExpanded, setInternalExpanded] = useState(defaultExpanded);\n\n // Use controlled state if provided, otherwise use internal state\n const isExpanded =\n controlledExpanded !== undefined ? controlledExpanded : internalExpanded;\n\n const handleToggle = () => {\n if (disabled) return;\n\n const newExpanded = !isExpanded;\n\n if (controlledExpanded === undefined) {\n setInternalExpanded(newExpanded);\n }\n\n onToggle?.(newExpanded);\n };\n\n const accordionId =\n id || `accordion-${Math.random().toString(36).substr(2, 9)}`;\n const headerId = `${accordionId}-header`;\n const contentId = `${accordionId}-content`;\n\n // Icon size based on device\n const iconSize = isMobile ? 20 : 24;\n\n // Typography variants based on device\n const titleVariant = isMobile ? 'body-s-heavy' : 'body-l-heavy';\n const bodyVariant = isMobile ? 'body-s-medium' : 'body-m-medium';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'rounded-2xl border-0 overflow-hidden',\n 'transition-all duration-200 ease-in-out',\n className,\n )}\n {...props}\n >\n {/* Header */}\n <button\n id={headerId}\n type=\"button\"\n onClick={handleToggle}\n disabled={disabled}\n aria-expanded={isExpanded}\n aria-controls={contentId}\n className={cn(\n 'w-full flex items-center justify-between',\n isMobile ? 'p-3' : 'p-4',\n 'focus:outline-none focus:ring-2 focus:ring-primary focus:ring-offset-2',\n 'disabled:opacity-50 disabled:cursor-not-allowed',\n 'transition-all duration-200 ease-in-out',\n !disabled && 'hover:bg-neutral-lighter',\n )}\n >\n {/* Left side: Chevron icon */}\n <div className=\"flex-shrink-0 mr-4\">\n {isExpanded ? (\n <ChevronUp\n size={iconSize}\n className=\"text-neutral-darker transition-transform duration-200\"\n aria-hidden=\"true\"\n />\n ) : (\n <ChevronDown\n size={iconSize}\n className=\"text-neutral-darker transition-transform duration-200\"\n aria-hidden=\"true\"\n />\n )}\n </div>\n\n {/* Right side: Start icon and title */}\n <div\n className={cn(\n 'flex items-center flex-1',\n isMobile ? 'gap-3' : 'gap-4',\n )}\n >\n <div className=\"flex-1 text-right\">\n <Typography variant={titleVariant} color=\"neutral-darker\">\n {title}\n </Typography>\n </div>\n {startIcon && (\n <div\n className={cn(\n 'flex-shrink-0 flex items-center justify-center',\n isMobile ? 'w-6 h-6' : 'w-8 h-8',\n )}\n >\n {startIcon}\n </div>\n )}\n </div>\n </button>\n\n {/* Content */}\n <div\n id={contentId}\n role=\"region\"\n aria-labelledby={headerId}\n className={cn(\n 'w-full overflow-hidden transition-all duration-300 ease-in-out',\n isExpanded ? 'max-h-screen opacity-100' : 'max-h-0 opacity-0',\n )}\n >\n <div className={cn(isMobile ? 'pb-3 mt-1' : 'pb-4 mt-1.5')}>\n <div\n className={cn(\n 'bg-neutral-lighter rounded-lg',\n isMobile ? 'p-3' : 'p-4',\n )}\n >\n <Typography variant={bodyVariant} color=\"neutral-dark\">\n {body}\n </Typography>\n </div>\n </div>\n </div>\n </div>\n );\n },\n);\n\nAccordion.displayName = 'Accordion';\n\nexport { Accordion };\n"],"names":["ChevronDown","createLucideIcon","d","key","ChevronUp","Accordion","React","forwardRef","title","body","startIcon","isExpanded","controlledExpanded","onToggle","defaultExpanded","className","id","disabled","isMobile","props","ref","internalExpanded","setInternalExpanded","useState","undefined","accordionId","Math","random","toString","substr","headerId","contentId","iconSize","titleVariant","bodyVariant","_jsxs","cn","children","type","onClick","newExpanded","_jsx","size","Typography","variant","color","role","displayName"],"mappings":"uMASA,MACMA,EAAcC,EAAAA,iBAAiB,eADlB,CAAC,CAAC,OAAQ,CAAEC,EAAG,eAAgBC,IAAK,aCCjDC,EAAYH,EAAAA,iBAAiB,aADhB,CAAC,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK,aCmBnDE,EAAYC,EAAMC,WACtB,EAEIC,QACAC,OACAC,YACAC,WAAYC,EACZC,WACAC,mBAAkB,EAClBC,YACAC,KACAC,YAAW,EACXC,cACGC,GAELC,KAEA,MAAOC,EAAkBC,GAAuBC,EAAAA,SAAST,GAGnDH,OACmBa,IAAvBZ,EAAmCA,EAAqBS,EAcpDI,EACJT,GAAM,aAAaU,KAAKC,SAASC,SAAS,IAAIC,OAAO,EAAG,KACpDC,EAAW,GAAGL,WACdM,EAAY,GAAGN,YAGfO,EAAWd,EAAW,GAAK,GAG3Be,EAAef,EAAW,eAAiB,eAC3CgB,EAAchB,EAAW,gBAAkB,gBAEjD,OACEiB,EAAAA,kBAAAA,KAAA,MAAA,CACEf,IAAKA,EACLL,UAAWqB,EACT,uCACA,0CACArB,MAEEI,EAAKkB,SAAA,CAGTF,EAAAA,kBAAAA,KAAA,SAAA,CACEnB,GAAIc,EACJQ,KAAK,SACLC,QAtCe,KACnB,GAAItB,EAAU,OAEd,MAAMuB,GAAe7B,OAEMa,IAAvBZ,GACFU,EAAoBkB,GAGtB3B,IAAW2B,IA8BPvB,SAAUA,EAAQ,gBACHN,EAAU,gBACVoB,EACfhB,UAAWqB,EACT,2CACAlB,EAAW,MAAQ,MACnB,yEACA,kDACA,2CACCD,GAAY,4BACdoB,SAAA,CAGDI,EAAAA,kBAAAA,IAAA,MAAA,CAAK1B,UAAU,qBAAoBsB,SAChC1B,EACC8B,EAAAA,kBAAAA,IAACrC,EAAS,CACRsC,KAAMV,EACNjB,UAAU,wDAAuD,cACrD,SAGd0B,wBAACzC,EAAW,CACV0C,KAAMV,EACNjB,UAAU,wDAAuD,cACrD,WAMlBoB,EAAAA,kBAAAA,KAAA,MAAA,CACEpB,UAAWqB,EACT,2BACAlB,EAAW,QAAU,SACtBmB,SAAA,CAEDI,EAAAA,kBAAAA,IAAA,MAAA,CAAK1B,UAAU,oBAAmBsB,SAChCI,EAAAA,kBAAAA,IAACE,aAAU,CAACC,QAASX,EAAcY,MAAM,iBAAgBR,SACtD7B,MAGJE,GACC+B,EAAAA,kBAAAA,IAAA,MAAA,CACE1B,UAAWqB,EACT,iDACAlB,EAAW,UAAY,WACxBmB,SAEA3B,UAOT+B,EAAAA,kBAAAA,IAAA,MAAA,CACEzB,GAAIe,EACJe,KAAK,SAAQ,kBACIhB,EACjBf,UAAWqB,EACT,iEACAzB,EAAa,2BAA6B,qBAC3C0B,SAEDI,EAAAA,kBAAAA,IAAA,MAAA,CAAK1B,UAAWqB,EAAGlB,EAAW,YAAc,eAAcmB,SACxDI,EAAAA,kBAAAA,IAAA,MAAA,CACE1B,UAAWqB,EACT,gCACAlB,EAAW,MAAQ,OACpBmB,SAEDI,EAAAA,kBAAAA,IAACE,EAAAA,WAAU,CAACC,QAASV,EAAaW,MAAM,eAAcR,SACnD5B,eAUjBJ,EAAU0C,YAAc","x_google_ignoreList":[0,1]}
|
package/dist/cjs/Backdrop.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),r=require("react"),t=require("./utils.js");const n=r.forwardRef(({isOpen:r=!1,onClick:n,blur:i=!1,zIndex:s=51,className:a,children:o,...c},d)=>{const l=t("fixed inset-0 transition-all duration-300",{"opacity-100 pointer-events-auto":r,"opacity-0 pointer-events-none":!r,"backdrop-blur-sm":i},a),u={backgroundColor:"rgba(0, 0, 0, 0.60)",zIndex:s};return e.jsxRuntimeExports.jsx("div",{ref:d,className:l,style:u,onClick:e=>{n&&e.target===e.currentTarget&&n()},role:"presentation","aria-hidden":!r,...c,children:o})});n.displayName="Backdrop",exports.Backdrop=n;
|
|
2
|
+
//# sourceMappingURL=Backdrop.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Backdrop.js","sources":["../../src/components/Backdrop/Backdrop.tsx"],"sourcesContent":["import React from 'react';\nimport cn from '@/utils/cn';\n\nexport interface BackdropProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Whether the backdrop is visible\n */\n isOpen?: boolean;\n /**\n * Callback function when backdrop is clicked\n */\n onClick?: () => void;\n /**\n * Whether to show a blur effect\n */\n blur?: boolean;\n /**\n * Custom z-index (defaults to z-51 which is drawer z-index + 1)\n */\n zIndex?: number;\n}\n\nexport const Backdrop = React.forwardRef<HTMLDivElement, BackdropProps>(\n (\n {\n isOpen = false,\n onClick,\n blur = false,\n zIndex = 51,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (onClick && event.target === event.currentTarget) {\n onClick();\n }\n };\n\n const backdropClasses = cn(\n 'fixed inset-0 transition-all duration-300',\n {\n 'opacity-100 pointer-events-auto': isOpen,\n 'opacity-0 pointer-events-none': !isOpen,\n 'backdrop-blur-sm': blur,\n },\n className,\n );\n\n const backdropStyle: React.CSSProperties = {\n backgroundColor: 'rgba(0, 0, 0, 0.60)',\n zIndex,\n };\n\n return (\n <div\n ref={ref}\n className={backdropClasses}\n style={backdropStyle}\n onClick={handleClick}\n role=\"presentation\"\n aria-hidden={!isOpen}\n {...props}\n >\n {children}\n </div>\n );\n },\n);\n\nBackdrop.displayName = 'Backdrop';\n"],"names":["Backdrop","React","forwardRef","isOpen","onClick","blur","zIndex","className","children","props","ref","backdropClasses","cn","backdropStyle","backgroundColor","_jsx","style","event","target","currentTarget","role","displayName"],"mappings":"0GAsBO,MAAMA,EAAWC,EAAMC,WAC5B,EAEIC,UAAS,EACTC,UACAC,QAAO,EACPC,SAAS,GACTC,YACAC,cACGC,GAELC,KAEA,MAMMC,EAAkBC,EACtB,4CACA,CACE,kCAAmCT,EACnC,iCAAkCA,EAClC,mBAAoBE,GAEtBE,GAGIM,EAAqC,CACzCC,gBAAiB,sBACjBR,UAGF,OACES,EAAAA,kBAAAA,IAAA,MAAA,CACEL,IAAKA,EACLH,UAAWI,EACXK,MAAOH,EACPT,QA1BiBa,IACfb,GAAWa,EAAMC,SAAWD,EAAME,eACpCf,KAyBAgB,KAAK,eAAc,eACLjB,KACVM,EAAKD,SAERA,MAMTR,EAASqB,YAAc"}
|
package/dist/cjs/Breadcrumb.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),r=require("react"),t=require("./utils.js"),s=require("./chunks/chevron-left-Do__K6cA.js");require("./chunks/createLucideIcon-BqJVOzoK.js");const n=r.forwardRef(({items:r,className:n,isMobile:a},i)=>e.jsxRuntimeExports.jsx("nav",{ref:i,className:t("flex flex-row-reverse items-center",a?"gap-1 px-4 py-2.5":"gap-3 pr-1 pt-3 pb-4 pl-0",n),"aria-label":"Breadcrumb navigation",children:e.jsxRuntimeExports.jsx("ol",{className:"flex flex-row-reverse items-center gap-inherit",children:r.map((n,i)=>{const l=i===r.length-1,o=!l&&(n.href||n.onClick),c=`${n.label}-${i}`;return e.jsxRuntimeExports.jsxs("li",{className:"flex items-center gap-inherit",children:[o?e.jsxRuntimeExports.jsx("a",{href:n.href||"#",className:t("whitespace-nowrap border-0 bg-transparent p-0 no-underline",a?"text-t":"text-s","text-neutral-main","cursor-pointer hover:text-neutral-dark transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded-sm"),onClick:e=>((e,t,s)=>{t!==r.length-1&&e.onClick&&(s.preventDefault(),e.onClick())})(n,i,e),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),n.onClick&&n.onClick())},"aria-label":`Go to ${n.label}`,children:n.label}):e.jsxRuntimeExports.jsx("span",{className:t("whitespace-nowrap",a?"text-t":"text-s","text-neutral-main","font-medium"),"aria-current":l?"page":void 0,"aria-label":l?`Current page: ${n.label}`:void 0,children:n.label}),!l&&e.jsxRuntimeExports.jsx(s.ChevronLeft,{className:t("text-black flex-shrink-0",a?"w-2.5 h-2.5":"w-3 h-3"),"aria-hidden":"true"})]},c)})})}));n.displayName="Breadcrumb",exports.Breadcrumb=n;
|
|
2
|
+
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","sources":["../../src/components/Breadcrumb/Breadcrumb.tsx"],"sourcesContent":["import React from 'react';\nimport { ChevronLeft } from 'lucide-react';\nimport cn from '@/utils/cn';\n\nexport interface BreadcrumbItem {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface BreadcrumbProps {\n items: BreadcrumbItem[];\n className?: string;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n}\n\nconst Breadcrumb = React.forwardRef<HTMLElement, BreadcrumbProps>(\n ({ items, className, isMobile }, ref) => {\n const handleItemClick = (\n item: BreadcrumbItem,\n index: number,\n e: React.MouseEvent,\n ) => {\n // Don't make the last item (current page) clickable\n if (index === items.length - 1) return;\n\n if (item.onClick) {\n e.preventDefault();\n item.onClick();\n }\n // If item has href, let the anchor tag handle navigation naturally\n };\n\n return (\n <nav\n ref={ref}\n className={cn(\n // Base layout - RTL with flex-row-reverse to show items right to left\n 'flex flex-row-reverse items-center',\n // Responsive gap and padding based on mobile state\n isMobile ? 'gap-1 px-4 py-2.5' : 'gap-3 pr-1 pt-3 pb-4 pl-0',\n className,\n )}\n aria-label=\"Breadcrumb navigation\"\n >\n <ol className=\"flex flex-row-reverse items-center gap-inherit\">\n {items.map((item, index) => {\n const isLast = index === items.length - 1;\n const isClickable = !isLast && (item.href || item.onClick);\n const itemKey = `${item.label}-${index}`;\n\n return (\n <li key={itemKey} className=\"flex items-center gap-inherit\">\n {/* Breadcrumb item */}\n {isClickable ? (\n <a\n href={item.href || '#'}\n className={cn(\n // Base styles\n 'whitespace-nowrap border-0 bg-transparent p-0 no-underline',\n // Responsive font size based on mobile state\n isMobile ? 'text-t' : 'text-s',\n // Color\n 'text-neutral-main',\n // Cursor and hover effects for clickable items\n 'cursor-pointer hover:text-neutral-dark transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-1 rounded-sm',\n )}\n onClick={(e) => handleItemClick(item, index, e)}\n onKeyDown={(e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n if (item.onClick) {\n item.onClick();\n }\n }\n }}\n aria-label={`Go to ${item.label}`}\n >\n {item.label}\n </a>\n ) : (\n <span\n className={cn(\n // Base styles\n 'whitespace-nowrap',\n // Responsive font size based on mobile state\n isMobile ? 'text-t' : 'text-s',\n // Color\n 'text-neutral-main',\n // Different styles for current page (last item)\n 'font-medium',\n )}\n aria-current={isLast ? 'page' : undefined}\n aria-label={\n isLast ? `Current page: ${item.label}` : undefined\n }\n >\n {item.label}\n </span>\n )}\n\n {/* Separator - only show if not the last item */}\n {!isLast && (\n <ChevronLeft\n className={cn(\n 'text-black flex-shrink-0',\n // Responsive icon size\n isMobile ? 'w-2.5 h-2.5' : 'w-3 h-3',\n )}\n aria-hidden=\"true\"\n />\n )}\n </li>\n );\n })}\n </ol>\n </nav>\n );\n },\n);\n\nBreadcrumb.displayName = 'Breadcrumb';\n\nexport { Breadcrumb };\n"],"names":["Breadcrumb","React","forwardRef","items","className","isMobile","ref","_jsx","cn","children","map","item","index","isLast","length","isClickable","href","onClick","itemKey","label","_jsxs","e","preventDefault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ANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var r=require("./chunks/jsx-runtime-Bgd4cJfV.js"),e=require("react"),t=require("./utils.js"),a=require("./Typography.js");const o={sm:"px-[16px] py-[7px]",md:"px-[16px] py-[9px]",lg:"px-[16px] py-[13px]",xl:"px-[20px] py-[13px]"},l={sm:"body-s-bold",md:"body-m-bold",lg:"body-l-bold",xl:"body-xl-heavy"},i={primary:"\n bg-[var(--color-primary)] text-white\n hover:bg-[var(--color-primary-dark)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n ",secondary:"\n bg-[var(--color-primary-lightest)] text-[var(--color-primary)]\n hover:bg-[var(--color-primary-lighter)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n ",tertiary:"\n bg-white border border-[var(--color-primary-light)] text-[var(--color-primary)]\n hover:bg-[var(--color-neutral-lighter)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n ",ghost:"\n bg-transparent text-[var(--color-primary)]\n hover:bg-[var(--color-primary-lightest)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n "},n=e.forwardRef(({className:e,variant:n="primary",size:s="md",icon:d,iconPosition:p="right",children:c,loading:x=!1,disabled:b,textVariant:m,...g},y)=>{const u=m||l[s];return r.jsxRuntimeExports.jsxs("button",{ref:y,type:"button",className:t("inline-flex items-center justify-center rounded-[8px] transition-colors duration-200",o[s],i[n],a.getTypographyClasses(u),b&&"opacity-50 pointer-events-none",e),disabled:b||x,...g,children:[d&&"left"===p&&r.jsxRuntimeExports.jsx("span",{className:"mr-2 flex items-center",children:d}),x?"...":c,d&&"right"===p&&r.jsxRuntimeExports.jsx("span",{className:"ml-2 flex items-center",children:d})]})});n.displayName="Button",exports.Button=n;
|
|
2
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../src/components/Button/Button.tsx"],"sourcesContent":["import React from 'react';\nimport cn from '@/utils/cn';\nimport {\n TypographyVariant,\n getTypographyClasses,\n} from '../Typography/Typography';\n\nexport type ButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'ghost';\nexport type ButtonSize = 'sm' | 'md' | 'lg' | 'xl';\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant?: ButtonVariant;\n size?: ButtonSize;\n textVariant?: TypographyVariant;\n icon?: React.ReactNode;\n iconPosition?: 'left' | 'right';\n loading?: boolean;\n}\n\nconst sizeClasses: Record<ButtonSize, string> = {\n sm: 'px-[16px] py-[7px]',\n md: 'px-[16px] py-[9px]',\n lg: 'px-[16px] py-[13px]',\n xl: 'px-[20px] py-[13px]',\n};\n\nconst defaultTextVariants: Record<ButtonSize, TypographyVariant> = {\n sm: 'body-s-bold', // 14px / Bold (600)\n md: 'body-m-bold', // 16px / Bold (600)\n lg: 'body-l-bold', // 18px / Bold (600)\n xl: 'body-xl-heavy', // 20px / Heavy (700)\n};\n\nconst variantClasses: Record<ButtonVariant, string> = {\n primary: `\n bg-[var(--color-primary)] text-white\n hover:bg-[var(--color-primary-dark)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n `,\n secondary: `\n bg-[var(--color-primary-lightest)] text-[var(--color-primary)]\n hover:bg-[var(--color-primary-lighter)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n `,\n tertiary: `\n bg-white border border-[var(--color-primary-light)] text-[var(--color-primary)]\n hover:bg-[var(--color-neutral-lighter)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n `,\n ghost: `\n bg-transparent text-[var(--color-primary)]\n hover:bg-[var(--color-primary-lightest)]\n disabled:bg-[var(--color-neutral-light)] disabled:text-[var(--color-neutral-darker)]\n `,\n};\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = 'primary',\n size = 'md',\n icon,\n iconPosition = 'right',\n children,\n loading = false,\n disabled,\n textVariant,\n ...props\n },\n ref,\n ) => {\n const finalTextVariant = textVariant || defaultTextVariants[size];\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={cn(\n 'inline-flex items-center justify-center rounded-[8px] transition-colors duration-200',\n sizeClasses[size],\n variantClasses[variant],\n getTypographyClasses(finalTextVariant),\n disabled && 'opacity-50 pointer-events-none',\n className,\n )}\n disabled={disabled || loading}\n {...props}\n >\n {icon && iconPosition === 'left' && (\n <span className=\"mr-2 flex items-center\">{icon}</span>\n )}\n {loading ? '...' : children}\n {icon && iconPosition === 'right' && (\n <span className=\"ml-2 flex items-center\">{icon}</span>\n )}\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n"],"names":["sizeClasses","sm","md","lg","xl","defaultTextVariants","variantClasses","primary","secondary","tertiary","ghost","Button","React","forwardRef","className","variant","size","icon","iconPosition","children","loading","disabled","textVariant","props","ref","finalTextVariant","_jsxs","type","cn","getTypographyClasses","_jsx","displayName"],"mappings":"uIAoBA,MAAMA,EAA0C,CAC9CC,GAAI,qBACJC,GAAI,qBACJC,GAAI,sBACJC,GAAI,uBAGAC,EAA6D,CACjEJ,GAAI,cACJC,GAAI,cACJC,GAAI,cACJC,GAAI,iBAGAE,EAAgD,CACpDC,QAAS,qLAKTC,UAAW,kNAKXC,SAAU,mOAKVC,MAAO,gMAOIC,EAASC,EAAMC,WAC1B,EAEIC,YACAC,UAAU,UACVC,OAAO,KACPC,OACAC,eAAe,QACfC,WACAC,WAAU,EACVC,WACAC,iBACGC,GAELC,KAEA,MAAMC,EAAmBH,GAAejB,EAAoBW,GAE5D,OACEU,yBAAA,SAAA,CACEF,IAAKA,EACLG,KAAK,SACLb,UAAWc,EACT,uFACA5B,EAAYgB,GACZV,EAAeS,GACfc,EAAAA,qBAAqBJ,GACrBJ,GAAY,iCACZP,GAEFO,SAAUA,GAAYD,KAClBG,EAAKJ,SAAA,CAERF,GAAyB,SAAjBC,GACPY,EAAAA,kBAAAA,IAAA,OAAA,CAAMhB,UAAU,yBAAwBK,SAAEF,IAE3CG,EAAU,MAAQD,EAClBF,GAAyB,UAAjBC,GACPY,EAAAA,kBAAAA,YAAMhB,UAAU,yBAAwBK,SAAEF,SAOpDN,EAAOoB,YAAc"}
|
package/dist/cjs/Chips.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),r=require("react"),t=require("./utils.js");const o=require("./chunks/createLucideIcon-BqJVOzoK.js").createLucideIcon("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),i={purple:{background:"bg-[var(--color-primary-lightest)]",text:"text-[var(--color-primary-darkest)]",border:"border-[var(--color-primary-light)]"},red:{background:"bg-[var(--color-error-light)]",text:"text-[var(--color-error)]",border:"border-[#f0d6d6]"},green:{background:"bg-[var(--color-success-light)]",text:"text-[var(--color-success)]",border:"border-[#d4e8dc]"},orange:{background:"bg-[var(--color-warning-light)]",text:"text-[var(--color-warning)]",border:"border-[#f5e1d1]"},blue:{background:"bg-[var(--color-info-light)]",text:"text-[var(--color-info)]",border:"border-[#d3e9f2]"},white:{background:"bg-[var(--color-white)]",text:"text-[var(--color-neutral-darker)]",border:"border-[var(--color-neutral-light)]"},disabled:{background:"bg-[var(--color-neutral-lighter)]",text:"text-[var(--color-neutral-main)]",border:"border-[var(--color-neutral-light)]"}},a={mobile:{padding:"px-2.5 py-1",gap:"gap-1",iconSize:"size-4",fontSize:"text-[12px]",lineHeight:"leading-[1.8]"},desktop:{padding:"px-3 py-1",gap:"gap-1.5",iconSize:"size-5",fontSize:"text-[14px]",lineHeight:"leading-[24px]"}},n=r.forwardRef(({variant:r="purple",size:n,children:l="متن پیشفرض",disabled:d=!1,onClick:c,onIconClick:s,className:p,isMobile:b,...u},x)=>{const g=i[d?"disabled":r],v=a[n||(b?"mobile":"desktop")],handleIconClick=e=>{e.stopPropagation(),s&&s()};return e.jsxRuntimeExports.jsxs("div",{ref:x,className:t("relative rounded-[50px] border border-solid inline-flex","flex-row items-center justify-center","font-sans font-bold not-italic","text-nowrap text-right","transition-all duration-200",g.background,g.text,g.border,v.padding,v.gap,v.fontSize,v.lineHeight,c&&!d&&"cursor-pointer hover:opacity-80",d&&"cursor-not-allowed opacity-60",p),onClick:d?void 0:c,onKeyDown:c&&!d?e=>{"Enter"!==e.key&&" "!==e.key||!c||d||(e.preventDefault(),c())}:void 0,tabIndex:c&&!d?0:void 0,role:c?"button":void 0,...u,children:[e.jsxRuntimeExports.jsx("span",{className:"text-center",children:l}),(()=>{const r=e.jsxRuntimeExports.jsx(o,{className:t(v.iconSize)});return s?e.jsxRuntimeExports.jsx("button",{type:"button",onClick:handleIconClick,disabled:d,className:t("flex items-center justify-center","hover:opacity-70 transition-opacity",d&&"cursor-not-allowed opacity-50"),"aria-label":"حذف",children:r}):r})()]})});n.displayName="Chips",exports.Chips=n,exports.default=n;
|
|
2
|
+
//# sourceMappingURL=Chips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chips.js","sources":["../../node_modules/lucide-react/dist/esm/icons/x.js","../../src/components/Chips/Chips.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"x\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n","import React from 'react';\nimport { X } from 'lucide-react';\nimport cn from '@/utils/cn';\n\nexport interface ChipsProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The variant/color of the chip\n */\n variant?:\n | 'purple'\n | 'red'\n | 'green'\n | 'orange'\n | 'blue'\n | 'white'\n | 'disabled';\n /**\n * Size of the chip - affects padding and font size. If not provided, automatically detected from MobileContext\n */\n size?: 'mobile' | 'desktop';\n /**\n * Text content of the chip\n */\n children?: React.ReactNode;\n /**\n * Whether the chip is disabled\n */\n disabled?: boolean;\n /**\n * Click handler for the chip\n */\n onClick?: () => void;\n /**\n * Click handler for the X icon/close button\n */\n onIconClick?: () => void;\n /**\n * Custom class name\n */\n className?: string;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n}\n\nconst chipVariants = {\n purple: {\n background: 'bg-[var(--color-primary-lightest)]',\n text: 'text-[var(--color-primary-darkest)]',\n border: 'border-[var(--color-primary-light)]',\n },\n red: {\n background: 'bg-[var(--color-error-light)]',\n text: 'text-[var(--color-error)]',\n border: 'border-[#f0d6d6]',\n },\n green: {\n background: 'bg-[var(--color-success-light)]',\n text: 'text-[var(--color-success)]',\n border: 'border-[#d4e8dc]',\n },\n orange: {\n background: 'bg-[var(--color-warning-light)]',\n text: 'text-[var(--color-warning)]',\n border: 'border-[#f5e1d1]',\n },\n blue: {\n background: 'bg-[var(--color-info-light)]',\n text: 'text-[var(--color-info)]',\n border: 'border-[#d3e9f2]',\n },\n white: {\n background: 'bg-[var(--color-white)]',\n text: 'text-[var(--color-neutral-darker)]',\n border: 'border-[var(--color-neutral-light)]',\n },\n disabled: {\n background: 'bg-[var(--color-neutral-lighter)]',\n text: 'text-[var(--color-neutral-main)]',\n border: 'border-[var(--color-neutral-light)]',\n },\n};\n\nconst chipSizes = {\n mobile: {\n padding: 'px-2.5 py-1',\n gap: 'gap-1',\n iconSize: 'size-4',\n fontSize: 'text-[12px]',\n lineHeight: 'leading-[1.8]',\n },\n desktop: {\n padding: 'px-3 py-1',\n gap: 'gap-1.5',\n iconSize: 'size-5',\n fontSize: 'text-[14px]',\n lineHeight: 'leading-[24px]',\n },\n};\n\nexport const Chips = React.forwardRef<HTMLDivElement, ChipsProps>(\n (\n {\n variant = 'purple',\n size,\n children = 'متن پیشفرض',\n disabled = false,\n onClick,\n onIconClick,\n className,\n isMobile,\n ...props\n },\n ref,\n ) => {\n const actualSize = size || (isMobile ? 'mobile' : 'desktop');\n\n const actualVariant = disabled ? 'disabled' : variant;\n const variantStyles = chipVariants[actualVariant];\n const sizeStyles = chipSizes[actualSize];\n\n const handleIconClick = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (onIconClick) {\n onIconClick();\n }\n };\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if ((e.key === 'Enter' || e.key === ' ') && onClick && !disabled) {\n e.preventDefault();\n onClick();\n }\n };\n\n const renderIcon = () => {\n const iconElement = <X className={cn(sizeStyles.iconSize)} />;\n\n if (onIconClick) {\n return (\n <button\n type=\"button\"\n onClick={handleIconClick}\n disabled={disabled}\n className={cn(\n 'flex items-center justify-center',\n 'hover:opacity-70 transition-opacity',\n disabled && 'cursor-not-allowed opacity-50',\n )}\n aria-label=\"حذف\"\n >\n {iconElement}\n </button>\n );\n }\n\n return iconElement;\n };\n\n return (\n <div\n ref={ref}\n className={cn(\n // Base styles\n 'relative rounded-[50px] border border-solid inline-flex',\n 'flex-row items-center justify-center',\n 'font-sans font-bold not-italic',\n 'text-nowrap text-right',\n 'transition-all duration-200',\n\n // Variant styles\n variantStyles.background,\n variantStyles.text,\n variantStyles.border,\n\n // Size styles\n sizeStyles.padding,\n sizeStyles.gap,\n sizeStyles.fontSize,\n sizeStyles.lineHeight,\n\n // Interactive styles\n onClick && !disabled && 'cursor-pointer hover:opacity-80',\n disabled && 'cursor-not-allowed opacity-60',\n\n className,\n )}\n onClick={disabled ? undefined : onClick}\n onKeyDown={onClick && !disabled ? handleKeyDown : undefined}\n tabIndex={onClick && !disabled ? 0 : undefined}\n role={onClick ? 'button' : undefined}\n {...props}\n >\n <span className=\"text-center\">{children}</span>\n {renderIcon()}\n </div>\n );\n },\n);\n\nChips.displayName = 'Chips';\n\nexport default Chips;\n"],"names":["X","createLucideIcon","d","key","chipVariants","purple","background","text","border","red","green","orange","blue","white","disabled","chipSizes","mobile","padding","gap","iconSize","fontSize","lineHeight","desktop","Chips","React","forwardRef","variant","size","children","onClick","onIconClick","className","isMobile","props","ref","variantStyles","sizeStyles","handleIconClick","e","stopPropagation","_jsxs","cn","undefined","onKeyDown","preventDefault","tabIndex","role","_jsx","iconElement","type","renderIcon","displayName"],"mappings":"iKASA,MAIMA,mDAAIC,iBAAiB,IAJR,CACjB,CAAC,OAAQ,CAAEC,EAAG,aAAcC,IAAK,WACjC,CAAC,OAAQ,CAAED,EAAG,aAAcC,IAAK,aCmC7BC,EAAe,CACnBC,OAAQ,CACNC,WAAY,qCACZC,KAAM,sCACNC,OAAQ,uCAEVC,IAAK,CACHH,WAAY,gCACZC,KAAM,4BACNC,OAAQ,oBAEVE,MAAO,CACLJ,WAAY,kCACZC,KAAM,8BACNC,OAAQ,oBAEVG,OAAQ,CACNL,WAAY,kCACZC,KAAM,8BACNC,OAAQ,oBAEVI,KAAM,CACJN,WAAY,+BACZC,KAAM,2BACNC,OAAQ,oBAEVK,MAAO,CACLP,WAAY,0BACZC,KAAM,qCACNC,OAAQ,uCAEVM,SAAU,CACRR,WAAY,oCACZC,KAAM,mCACNC,OAAQ,wCAINO,EAAY,CAChBC,OAAQ,CACNC,QAAS,cACTC,IAAK,QACLC,SAAU,SACVC,SAAU,cACVC,WAAY,iBAEdC,QAAS,CACPL,QAAS,YACTC,IAAK,UACLC,SAAU,SACVC,SAAU,cACVC,WAAY,mBAIHE,EAAQC,EAAMC,WACzB,EAEIC,UAAU,SACVC,OACAC,WAAW,aACXd,YAAW,EACXe,UACAC,cACAC,YACAC,cACGC,GAELC,KAEA,MAGMC,EAAgB/B,EADAU,EAAW,WAAaY,GAExCU,EAAarB,EAJAY,IAASK,EAAW,SAAW,YAM5CK,gBAAmBC,IACvBA,EAAEC,kBACET,GACFA,KAmCJ,OACEU,EAAAA,kBAAAA,YACEN,IAAKA,EACLH,UAAWU,EAET,0DACA,uCACA,iCACA,yBACA,8BAGAN,EAAc7B,WACd6B,EAAc5B,KACd4B,EAAc3B,OAGd4B,EAAWnB,QACXmB,EAAWlB,IACXkB,EAAWhB,SACXgB,EAAWf,WAGXQ,IAAYf,GAAY,kCACxBA,GAAY,gCAEZiB,GAEFF,QAASf,OAAW4B,EAAYb,EAChCc,UAAWd,IAAYf,EA5DJwB,IACN,UAAVA,EAAEnC,KAA6B,MAAVmC,EAAEnC,MAAgB0B,GAAYf,IACtDwB,EAAEM,iBACFf,WAyDkDa,EAClDG,SAAUhB,IAAYf,EAAW,OAAI4B,EACrCI,KAAMjB,EAAU,cAAWa,KACvBT,EAAKL,SAAA,CAETmB,EAAAA,kBAAAA,YAAMhB,UAAU,cAAaH,SAAEA,IA1DhB,MACjB,MAAMoB,EAAcD,EAAAA,kBAAAA,IAAC/C,GAAE+B,UAAWU,EAAGL,EAAWjB,YAEhD,OAAIW,EAEAiB,EAAAA,kBAAAA,IAAA,SAAA,CACEE,KAAK,SACLpB,QAASQ,gBACTvB,SAAUA,EACViB,UAAWU,EACT,mCACA,sCACA3B,GAAY,iCACb,aACU,MAAKc,SAEfoB,IAKAA,GAsCJE,QAMT3B,EAAM4B,YAAc","x_google_ignoreList":[0]}
|
package/dist/cjs/Divider.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var r=require("./chunks/jsx-runtime-Bgd4cJfV.js"),e=require("react"),t=require("./utils.js");const i=e.forwardRef(({width:e="100%",height:i=1,orientation:a="horizontal",variant:s="neutral-light",className:n,style:l,...u},h)=>{const o="horizontal"===a,m={width:o?e:i,height:o?i:e,...l};return r.jsxRuntimeExports.jsx("div",{ref:h,className:t("shrink-0",{"neutral-light":"bg-neutral-light","neutral-main":"bg-neutral-main",primary:"bg-primary"}[s],n),style:m,role:"separator",...u})});i.displayName="Divider",exports.Divider=i;
|
|
2
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React from 'react';\nimport cn from '@/utils/cn';\n\nexport interface DividerProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Width of the divider\n * @default \"100%\"\n */\n width?: string | number;\n /**\n * Height (thickness) of the divider\n * @default 1\n */\n height?: string | number;\n /**\n * Orientation of the divider\n * @default \"horizontal\"\n */\n orientation?: 'horizontal' | 'vertical';\n /**\n * Color variant of the divider\n * @default \"neutral-light\"\n */\n variant?: 'neutral-light' | 'neutral-main' | 'primary';\n}\n\nconst Divider = React.forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n width = '100%',\n height = 1,\n orientation = 'horizontal',\n variant = 'neutral-light',\n className,\n style,\n ...props\n },\n ref,\n ) => {\n const isHorizontal = orientation === 'horizontal';\n\n const variantClasses = {\n 'neutral-light': 'bg-neutral-light',\n 'neutral-main': 'bg-neutral-main',\n primary: 'bg-primary',\n };\n\n const dividerStyle = {\n width: isHorizontal ? width : height,\n height: isHorizontal ? height : width,\n ...style,\n };\n\n return (\n <div\n ref={ref}\n className={cn('shrink-0', variantClasses[variant], className)}\n style={dividerStyle}\n role=\"separator\"\n {...props}\n />\n );\n },\n);\n\nDivider.displayName = 'Divider';\n\nexport { Divider };\n"],"names":["Divider","React","forwardRef","width","height","orientation","variant","className","style","props","ref","isHorizontal","dividerStyle","_jsx","cn","primary","role","displayName"],"mappings":"0GA0BA,MAAMA,EAAUC,EAAMC,WACpB,EAEIC,QAAQ,OACRC,SAAS,EACTC,cAAc,aACdC,UAAU,gBACVC,YACAC,WACGC,GAELC,KAEA,MAAMC,EAA+B,eAAhBN,EAQfO,EAAe,CACnBT,MAAOQ,EAAeR,EAAQC,EAC9BA,OAAQO,EAAeP,EAASD,KAC7BK,GAGL,OACEK,EAAAA,kBAAAA,IAAA,MAAA,CACEH,IAAKA,EACLH,UAAWO,EAAG,WAfK,CACrB,gBAAiB,mBACjB,eAAgB,kBAChBC,QAAS,cAYkCT,GAAUC,GACnDC,MAAOI,EACPI,KAAK,eACDP,MAMZT,EAAQiB,YAAc"}
|
package/dist/cjs/Drawer.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use client";"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),t=require("react"),r=require("./utils.js");const n=t.forwardRef(({children:n,direction:l="bottom",fullScreen:o=!1,isOpen:a=!1,onClose:s,className:u,isMobile:i,...d},c)=>{const f=t.useRef(null),m=t.useRef(null);t.useEffect(()=>{const handleEscape=e=>{"Escape"===e.key&&a&&s&&s()};return a&&(document.addEventListener("keydown",handleEscape),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",handleEscape),document.body.style.overflow="auto"}},[a,s]);const b=r("fixed inset-0 z-50 transition-all duration-300",{"bg-neutral-darker/50 backdrop-blur-sm":a,"bg-transparent pointer-events-none":!a}),x=r("fixed bg-white shadow-2xl transition-all duration-300 ease-out overflow-auto",(()=>{switch(l){case"top":return"top-0 left-0 right-0";case"bottom":default:return"bottom-0 left-0 right-0";case"left":return"top-0 left-0 bottom-0";case"right":return"top-0 right-0 bottom-0"}})(),(()=>{const e="top"===l||"bottom"===l;return o?"w-full h-full":e?"w-full max-h-[90vh]":"h-full max-w-[90vw]"})(),(()=>{if(!a)switch(l){case"top":return"-translate-y-full";case"bottom":default:return"translate-y-full";case"left":return"-translate-x-full";case"right":return"translate-x-full"}return"translate-x-0 translate-y-0"})(),{"rounded-t-2xl":"bottom"===l&&!o,"rounded-b-2xl":"top"===l&&!o,"rounded-r-2xl":"left"===l&&!o,"rounded-l-2xl":"right"===l&&!o,"p-6":!i,"p-4":i},u);return a?e.jsxRuntimeExports.jsx("div",{ref:f,className:b,onClick:e=>{!o&&s&&f.current&&e.target===f.current&&s()},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||!o&&s&&f.current&&e.target===f.current&&s()},tabIndex:-1,role:"button","aria-label":"Close drawer",children:e.jsxRuntimeExports.jsx("div",{ref:c||m,className:x,role:"dialog","aria-modal":"true","aria-label":"Drawer",...d,children:n})}):null});n.displayName="Drawer",exports.Drawer=n;
|
|
2
|
+
//# sourceMappingURL=Drawer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Drawer.js","sources":["../../src/components/Drawer/Drawer.tsx"],"sourcesContent":["import React, { useEffect, useRef, ReactNode } from 'react';\nimport cn from '@/utils/cn';\n\nexport type DrawerDirection = 'top' | 'bottom' | 'left' | 'right';\n\nexport type DrawerProps = {\n children: ReactNode;\n direction?: DrawerDirection;\n fullScreen?: boolean;\n isOpen?: boolean;\n onClose?: () => void;\n className?: string;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n};\n\nconst Drawer = React.forwardRef<HTMLDivElement, DrawerProps>(\n (\n {\n children,\n direction = 'bottom',\n fullScreen = false,\n isOpen = false,\n onClose,\n className,\n isMobile,\n ...props\n },\n ref,\n ) => {\n const overlayRef = useRef<HTMLDivElement>(null);\n const drawerRef = useRef<HTMLDivElement>(null);\n\n // Handle escape key\n useEffect(() => {\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === 'Escape' && isOpen && onClose) {\n onClose();\n }\n };\n\n if (isOpen) {\n document.addEventListener('keydown', handleEscape);\n // Prevent body scroll when drawer is open\n document.body.style.overflow = 'hidden';\n }\n\n return () => {\n document.removeEventListener('keydown', handleEscape);\n document.body.style.overflow = 'auto';\n };\n }, [isOpen, onClose]);\n\n // Handle click outside\n const handleOverlayClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (\n !fullScreen &&\n onClose &&\n overlayRef.current &&\n event.target === overlayRef.current\n ) {\n onClose();\n }\n };\n\n // Handle keyboard events on overlay\n const handleOverlayKeyDown = (\n event: React.KeyboardEvent<HTMLDivElement>,\n ) => {\n if (event.key === 'Enter' || event.key === ' ') {\n if (\n !fullScreen &&\n onClose &&\n overlayRef.current &&\n event.target === overlayRef.current\n ) {\n onClose();\n }\n }\n };\n\n const getTranslateClasses = () => {\n if (!isOpen) {\n switch (direction) {\n case 'top':\n return '-translate-y-full';\n case 'bottom':\n return 'translate-y-full';\n case 'left':\n return '-translate-x-full';\n case 'right':\n return 'translate-x-full';\n default:\n return 'translate-y-full';\n }\n }\n return 'translate-x-0 translate-y-0';\n };\n\n const getPositionClasses = () => {\n switch (direction) {\n case 'top':\n return 'top-0 left-0 right-0';\n case 'bottom':\n return 'bottom-0 left-0 right-0';\n case 'left':\n return 'top-0 left-0 bottom-0';\n case 'right':\n return 'top-0 right-0 bottom-0';\n default:\n return 'bottom-0 left-0 right-0';\n }\n };\n\n const getSizeClasses = () => {\n const isVertical = direction === 'top' || direction === 'bottom';\n\n if (fullScreen) {\n return isVertical ? 'w-full h-full' : 'w-full h-full';\n }\n\n if (isVertical) {\n return 'w-full max-h-[90vh]';\n }\n return 'h-full max-w-[90vw]';\n };\n\n const baseOverlayClasses = 'fixed inset-0 z-50 transition-all duration-300';\n const baseDrawerClasses =\n 'fixed bg-white shadow-2xl transition-all duration-300 ease-out overflow-auto';\n\n const overlayClasses = cn(baseOverlayClasses, {\n 'bg-neutral-darker/50 backdrop-blur-sm': isOpen,\n 'bg-transparent pointer-events-none': !isOpen,\n });\n\n const drawerClasses = cn(\n baseDrawerClasses,\n getPositionClasses(),\n getSizeClasses(),\n getTranslateClasses(),\n {\n 'rounded-t-2xl': direction === 'bottom' && !fullScreen,\n 'rounded-b-2xl': direction === 'top' && !fullScreen,\n 'rounded-r-2xl': direction === 'left' && !fullScreen,\n 'rounded-l-2xl': direction === 'right' && !fullScreen,\n 'p-6': !isMobile,\n 'p-4': isMobile,\n },\n className,\n );\n\n if (!isOpen) {\n return null;\n }\n\n return (\n <div\n ref={overlayRef}\n className={overlayClasses}\n onClick={handleOverlayClick}\n onKeyDown={handleOverlayKeyDown}\n tabIndex={-1}\n role=\"button\"\n aria-label=\"Close drawer\"\n >\n <div\n ref={ref || drawerRef}\n className={drawerClasses}\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Drawer\"\n {...props}\n >\n {children}\n </div>\n </div>\n );\n },\n);\n\nDrawer.displayName = 'Drawer';\n\nexport { Drawer };\n"],"names":["Drawer","React","forwardRef","children","direction","fullScreen","isOpen","onClose","className","isMobile","props","ref","overlayRef","useRef","drawerRef","useEffect","handleEscape","event","key","document","addEventListener","body","style","overflow","removeEventListener","overlayClasses","cn","drawerClasses","getPositionClasses","isVertical","getSizeClasses","getTranslateClasses","_jsx","onClick","current","target","onKeyDown","tabIndex","role","displayName"],"mappings":"uHAkBA,MAAMA,EAASC,EAAMC,WACnB,EAEIC,WACAC,YAAY,SACZC,cAAa,EACbC,UAAS,EACTC,UACAC,YACAC,cACGC,GAELC,KAEA,MAAMC,EAAaC,EAAAA,OAAuB,MACpCC,EAAYD,EAAAA,OAAuB,MAGzCE,EAAAA,UAAU,KACR,MAAMC,aAAgBC,IACF,WAAdA,EAAMC,KAAoBZ,GAAUC,GACtCA,KAUJ,OANID,IACFa,SAASC,iBAAiB,UAAWJ,cAErCG,SAASE,KAAKC,MAAMC,SAAW,UAG1B,KACLJ,SAASK,oBAAoB,UAAWR,cACxCG,SAASE,KAAKC,MAAMC,SAAW,SAEhC,CAACjB,EAAQC,IAGZ,MA6EMkB,EAAiBC,EAJI,iDAImB,CAC5C,wCAAyCpB,EACzC,sCAAuCA,IAGnCqB,EAAgBD,EAPpB,+EA9ByB,MACzB,OAAQtB,GACN,IAAK,MACH,MAAO,uBACT,IAAK,SAML,QACE,MAAO,0BALT,IAAK,OACH,MAAO,wBACT,IAAK,QACH,MAAO,2BA8BXwB,GAxBqB,MACrB,MAAMC,EAA2B,QAAdzB,GAAqC,WAAdA,EAE1C,OAAIC,EACkB,gBAGlBwB,EACK,sBAEF,uBAePC,GA1D0B,MAC1B,IAAKxB,EACH,OAAQF,GACN,IAAK,MACH,MAAO,oBACT,IAAK,SAML,QACE,MAAO,mBALT,IAAK,OACH,MAAO,oBACT,IAAK,QACH,MAAO,mBAKb,MAAO,+BA4CP2B,GACA,CACE,gBAA+B,WAAd3B,IAA2BC,EAC5C,gBAA+B,QAAdD,IAAwBC,EACzC,gBAA+B,SAAdD,IAAyBC,EAC1C,gBAA+B,UAAdD,IAA0BC,EAC3C,OAAQI,EACR,MAAOA,GAETD,GAGF,OAAKF,EAKH0B,EAAAA,kBAAAA,IAAA,MAAA,CACErB,IAAKC,EACLJ,UAAWiB,EACXQ,QA1GwBhB,KAEvBZ,GACDE,GACAK,EAAWsB,SACXjB,EAAMkB,SAAWvB,EAAWsB,SAE5B3B,KAoGA6B,UA9FFnB,IAEkB,UAAdA,EAAMC,KAAiC,MAAdD,EAAMC,MAE9Bb,GACDE,GACAK,EAAWsB,SACXjB,EAAMkB,SAAWvB,EAAWsB,SAE5B3B,KAsFF8B,UAAU,EACVC,KAAK,SAAQ,aACF,eAAcnC,SAEzB6B,EAAAA,kBAAAA,IAAA,MAAA,CACErB,IAAKA,GAAOG,EACZN,UAAWmB,EACXW,KAAK,SAAQ,aACF,OAAM,aACN,YACP5B,EAAKP,SAERA,MArBE,OA4BbH,EAAOuC,YAAc"}
|
package/dist/cjs/Input.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use client";"use strict";var t=require("./chunks/jsx-runtime-Bgd4cJfV.js"),e=require("react"),r=require("./utils.js");const l=e.forwardRef(({state:l="default",label:n,value:a,onChange:s,helperText:i,startIcon:o,endIcon:u,type:x="text",isMobile:d,...p},m)=>{const[h,c]=e.useState(!1),f=e.useId(),g=h||""!==a&&null!=a,j="disabled"===l,b=r("relative flex items-center border rounded-lg transition-all duration-300 w-[360px]",{"h-[54px]":!d,"h-12":d,"border-neutral-light":"default"===l&&!h,"border-primary":"default"===l&&h,"border-error":"error"===l,"bg-white border-neutral-light cursor-not-allowed":j}),w=r("absolute pointer-events-none transition-all duration-300",{"top-[-10px] bg-white px-1 mx-3 font-medium":g,"text-s":!d&&g||d&&!g,"text-xs":d&&g,"text-m":!d&&!g,"right-1":o,"right-3":!o,"top-1/2 -translate-y-1/2 text-m font-medium":!g,"right-11":!g&&o,"right-4":!g&&!o,"text-neutral-main":!h&&"default"===l,"text-neutral-light":j,"text-primary":h&&"default"===l,"text-error":g&&"error"===l}),y=r("peer w-full h-full bg-transparent outline-none text-m font-medium disabled:text-neutral-light",{"pr-12":o,"pl-12":u,"px-4":!o&&!u,"pr-4 pl-12":!o&&u,"pl-4 pr-12":o&&!u,"cursor-not-allowed text-red-500":j,"text-neutral-dark":!h,"text-neutral-darker":h}),R=r("absolute h-5 w-5 transition-colors duration-300",{"text-neutral-main":"error"!==l&&!h,"text-primary":"default"===l&&h,"text-error":"error"===l,"text-neutral-light":j}),v=r("font-light mt-1 px-2 h-4",{"text-s":!d,"text-xs":d,"text-neutral-main":"default"===l,"text-primary":"default"===l&&h,"text-error":"error"===l,"text-neutral-light":j});return t.jsxRuntimeExports.jsxs("div",{children:[t.jsxRuntimeExports.jsxs("div",{className:b,children:[u&&t.jsxRuntimeExports.jsx("span",{className:r(R,"left-4"),children:u}),t.jsxRuntimeExports.jsx("label",{htmlFor:f,className:w,children:n}),t.jsxRuntimeExports.jsx("input",{ref:m,id:f,type:x,value:a,onChange:s,onFocus:t=>{j||(c(!0),p.onFocus?.(t))},onBlur:t=>{j||(c(!1),p.onBlur?.(t))},disabled:j,className:y,...p}),o&&t.jsxRuntimeExports.jsx("span",{className:r(R,"right-4"),children:o})]}),i&&t.jsxRuntimeExports.jsx("p",{className:v,children:i})]})});l.displayName="Input",exports.Input=l;
|
|
2
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../src/components/Input/Input.tsx"],"sourcesContent":["import React, { useState, useId, ReactNode } from 'react';\nimport cn from '@/utils/cn';\n\nexport type InputProps = {\n state?: 'default' | 'disabled' | 'error';\n label: string;\n helperText?: string;\n startIcon?: ReactNode;\n endIcon?: ReactNode;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n} & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'id'>;\n\nconst Input = React.forwardRef<HTMLInputElement, InputProps>(\n (\n {\n state = 'default',\n label,\n value,\n onChange,\n helperText,\n startIcon,\n endIcon,\n type = 'text',\n isMobile,\n ...props\n },\n ref,\n ) => {\n const [isFocused, setIsFocused] = useState(false);\n const id = useId();\n\n const hasContent = value !== '' && value !== null && value !== undefined;\n const isLabelFloated = isFocused || hasContent;\n const isDisabled = state === 'disabled';\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!isDisabled) {\n setIsFocused(true);\n props.onFocus?.(e);\n }\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!isDisabled) {\n setIsFocused(false);\n props.onBlur?.(e);\n }\n };\n\n const baseContainerClasses =\n 'relative flex items-center border rounded-lg transition-all duration-300 w-[360px]';\n const baseLabelClasses =\n 'absolute pointer-events-none transition-all duration-300';\n const baseInputClasses =\n 'peer w-full h-full bg-transparent outline-none text-m font-medium disabled:text-neutral-light';\n const baseIconClasses = 'absolute h-5 w-5 transition-colors duration-300';\n\n const containerClasses = cn(baseContainerClasses, {\n 'h-[54px]': !isMobile,\n 'h-12': isMobile,\n 'border-neutral-light': state === 'default' && !isFocused,\n 'border-primary': state === 'default' && isFocused,\n 'border-error': state === 'error',\n 'bg-white border-neutral-light cursor-not-allowed': isDisabled,\n });\n\n const labelClasses = cn(baseLabelClasses, {\n 'top-[-10px] bg-white px-1 mx-3 font-medium': isLabelFloated,\n 'text-s': (!isMobile && isLabelFloated) || (isMobile && !isLabelFloated),\n 'text-xs': isMobile && isLabelFloated,\n 'text-m': !isMobile && !isLabelFloated,\n 'right-1': startIcon,\n 'right-3': !startIcon,\n 'top-1/2 -translate-y-1/2 text-m font-medium': !isLabelFloated,\n 'right-11': !isLabelFloated && startIcon,\n 'right-4': !isLabelFloated && !startIcon,\n 'text-neutral-main': !isFocused && state === 'default',\n 'text-neutral-light': isDisabled,\n 'text-primary': isFocused && state === 'default',\n 'text-error': isLabelFloated && state === 'error',\n });\n\n const inputClasses = cn(baseInputClasses, {\n 'pr-12': startIcon,\n 'pl-12': endIcon,\n 'px-4': !startIcon && !endIcon,\n 'pr-4 pl-12': !startIcon && endIcon,\n 'pl-4 pr-12': startIcon && !endIcon,\n 'cursor-not-allowed text-red-500': isDisabled,\n 'text-neutral-dark': !isFocused,\n 'text-neutral-darker': isFocused,\n });\n\n const iconClasses = cn(baseIconClasses, {\n 'text-neutral-main': state !== 'error' && !isFocused,\n 'text-primary': state === 'default' && isFocused,\n 'text-error': state === 'error',\n 'text-neutral-light': isDisabled,\n });\n\n const helperTextClasses = cn('font-light mt-1 px-2 h-4', {\n 'text-s': !isMobile,\n 'text-xs': isMobile,\n 'text-neutral-main': state === 'default',\n 'text-primary': state === 'default' && isFocused,\n 'text-error': state === 'error',\n 'text-neutral-light': isDisabled,\n });\n\n return (\n <div>\n <div className={containerClasses}>\n {endIcon && (\n <span className={cn(iconClasses, 'left-4')}>{endIcon}</span>\n )}\n\n <label htmlFor={id} className={labelClasses}>\n {label}\n </label>\n\n <input\n ref={ref}\n id={id}\n type={type}\n value={value}\n onChange={onChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n disabled={isDisabled}\n className={inputClasses}\n {...props}\n />\n\n {startIcon && (\n <span className={cn(iconClasses, 'right-4')}>{startIcon}</span>\n )}\n </div>\n\n {helperText && <p className={helperTextClasses}>{helperText}</p>}\n </div>\n );\n },\n);\n\nInput.displayName = 'Input';\n\nexport { Input };\n"],"names":["Input","React","forwardRef","state","label","value","onChange","helperText","startIcon","endIcon","type","isMobile","props","ref","isFocused","setIsFocused","useState","id","useId","isLabelFloated","isDisabled","containerClasses","cn","labelClasses","inputClasses","iconClasses","helperTextClasses","_jsxs","className","children","_jsx","htmlFor","onFocus","e","onBlur","disabled","displayName"],"mappings":"uHAeA,MAAMA,EAAQC,EAAMC,WAClB,EAEIC,QAAQ,UACRC,QACAC,QACAC,WACAC,aACAC,YACAC,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AGpB,IAG/CqB,EAAAA,kBAAAA,IAAA,QAAA,CAAOC,QAASd,EAAIW,UAAWL,EAAYM,SACxCzB,IAGH0B,wBAAA,QAAA,CACEjB,IAAKA,EACLI,GAAIA,EACJP,KAAMA,EACNL,MAAOA,EACPC,SAAUA,EACV0B,QA3FaC,IACdb,IACHL,GAAa,GACbH,EAAMoB,UAAUC,KAyFZC,OArFYD,IACbb,IACHL,GAAa,GACbH,EAAMsB,SAASD,KAmFXE,SAAUf,EACVQ,UAAWJ,KACPZ,IAGLJ,GACCsB,EAAAA,kBAAAA,YAAMF,UAAWN,EAAGG,EAAa,WAAUI,SAAGrB,OAIjDD,GAAcuB,wBAAA,IAAA,CAAGF,UAAWF,WAAoBnB,SAMzDP,EAAMoC,YAAc"}
|
package/dist/cjs/Menu.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use client";"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),r=require("react"),t=require("./utils.js"),o=require("./Typography.js");const n=r.forwardRef(({buttonText:n,items:a,disabled:s=!1,className:i,onOpenChange:l,isOpen:u,"aria-label":c,...d},p)=>{const[x,b]=r.useState(!1),h=r.useRef(null),m=r.useRef(null),f=void 0!==u?u:x,handleToggle=()=>{if(s)return;const e=!f;void 0===u&&b(e),l?.(e)};r.useEffect(()=>{const handleClickOutside=e=>{h.current&&!h.current.contains(e.target)&&(void 0===u&&b(!1),l?.(!1))};if(f)return document.addEventListener("mousedown",handleClickOutside),()=>{document.removeEventListener("mousedown",handleClickOutside)}},[f,u,l]);const v=t("inline-flex items-center justify-center","bg-white border border-[var(--color-neutral-light)]","rounded-[6px] px-[16px] py-[13px]","transition-colors duration-200","hover:bg-[var(--color-neutral-lighter)]","focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:ring-offset-2",{"opacity-50 cursor-not-allowed":s,"cursor-pointer":!s}),y=t("absolute top-full left-0 right-0 z-10 mt-[4px]","bg-white border border-[var(--color-neutral-light)]","rounded-[6px] py-[13px] px-[16px]","shadow-lg","transition-all duration-200",{"opacity-100 translate-y-0 pointer-events-auto":f,"opacity-0 -translate-y-2 pointer-events-none":!f}),g=t("block w-full text-right","transition-colors duration-200","hover:bg-[var(--color-neutral-lighter)] rounded-[4px] px-[8px] py-[4px] -mx-[8px]","focus:outline-none focus:bg-[var(--color-neutral-lighter)]");return e.jsxRuntimeExports.jsx("div",{ref:p,className:t("relative inline-block",i),...d,children:e.jsxRuntimeExports.jsxs("div",{ref:h,children:[e.jsxRuntimeExports.jsx("button",{ref:m,type:"button",className:v,onClick:handleToggle,onKeyDown:e=>{if(!s)switch(e.key){case"Escape":f&&(e.preventDefault(),void 0===u&&b(!1),l?.(!1),m.current?.focus());break;case"ArrowDown":f||(e.preventDefault(),handleToggle());break;case"Enter":case" ":e.preventDefault(),handleToggle()}},disabled:s,"aria-expanded":f,"aria-haspopup":"true","aria-label":c||`منوی ${n}`,children:e.jsxRuntimeExports.jsx(o.Typography,{variant:"body-s-heavy",color:"neutral-darker",className:"text-right",children:n})}),e.jsxRuntimeExports.jsx("div",{className:y,children:e.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-[16px]",children:a.map(r=>{const n=e.jsxRuntimeExports.jsx(o.Typography,{variant:"body-s-heavy",color:r.disabled?"neutral-main":"neutral-darker",className:"text-right",children:r.label}),a={className:t(g,{"opacity-50 cursor-not-allowed":r.disabled,"cursor-pointer":!r.disabled}),onClick:r.disabled?void 0:()=>(e=>{e.disabled||(void 0===u&&b(!1),l?.(!1),e.onClick?.())})(r),"aria-label":`منوی ${r.label}`};return r.href&&!r.disabled?e.jsxRuntimeExports.jsx("a",{...a,href:r.href,role:"menuitem",tabIndex:f?0:-1,children:n},r.id):e.jsxRuntimeExports.jsx("button",{...a,type:"button",role:"menuitem",tabIndex:f?0:-1,disabled:r.disabled,children:n},r.id)})})})]})})});n.displayName="Menu",exports.Menu=n;
|
|
2
|
+
//# sourceMappingURL=Menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Menu.js","sources":["../../src/components/Menu/Menu.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport cn from '@/utils/cn';\nimport { Typography } from '../Typography/Typography';\n\nexport interface MenuItem {\n id: string;\n label: string;\n href?: string;\n onClick?: () => void;\n disabled?: boolean;\n}\n\nexport interface MenuProps {\n /**\n * The text displayed on the main menu button\n */\n buttonText: string;\n /**\n * Array of menu items to display in the dropdown\n */\n items: MenuItem[];\n /**\n * Whether the menu is disabled\n */\n disabled?: boolean;\n /**\n * Additional CSS classes for the menu container\n */\n className?: string;\n /**\n * Callback fired when menu open state changes\n */\n onOpenChange?: (isOpen: boolean) => void;\n /**\n * Whether the menu is initially open (controlled mode)\n */\n isOpen?: boolean;\n /**\n * Aria label for the menu button\n */\n 'aria-label'?: string;\n}\n\nexport const Menu = React.forwardRef<HTMLDivElement, MenuProps>(\n (\n {\n buttonText,\n items,\n disabled = false,\n className,\n onOpenChange,\n isOpen: controlledIsOpen,\n 'aria-label': ariaLabel,\n ...props\n },\n ref,\n ) => {\n const [internalIsOpen, setInternalIsOpen] = useState(false);\n const menuRef = useRef<HTMLDivElement>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n // Use controlled or uncontrolled state\n const isOpen =\n controlledIsOpen !== undefined ? controlledIsOpen : internalIsOpen;\n\n const handleToggle = () => {\n if (disabled) return;\n\n const newIsOpen = !isOpen;\n\n if (controlledIsOpen === undefined) {\n setInternalIsOpen(newIsOpen);\n }\n\n onOpenChange?.(newIsOpen);\n };\n\n const handleItemClick = (item: MenuItem) => {\n if (item.disabled) return;\n\n // Close menu after item click\n if (controlledIsOpen === undefined) {\n setInternalIsOpen(false);\n }\n onOpenChange?.(false);\n\n // Execute item's onClick if provided\n item.onClick?.();\n };\n\n // Close menu when clicking outside\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (\n menuRef.current &&\n !menuRef.current.contains(event.target as Node)\n ) {\n if (controlledIsOpen === undefined) {\n setInternalIsOpen(false);\n }\n onOpenChange?.(false);\n }\n };\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }\n return undefined;\n }, [isOpen, controlledIsOpen, onOpenChange]);\n\n // Handle keyboard navigation\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (disabled) return;\n\n switch (event.key) {\n case 'Escape':\n if (isOpen) {\n event.preventDefault();\n if (controlledIsOpen === undefined) {\n setInternalIsOpen(false);\n }\n onOpenChange?.(false);\n buttonRef.current?.focus();\n }\n break;\n case 'ArrowDown':\n if (!isOpen) {\n event.preventDefault();\n handleToggle();\n }\n break;\n case 'Enter':\n case ' ':\n event.preventDefault();\n handleToggle();\n break;\n default:\n // No action needed for other keys\n break;\n }\n };\n\n const buttonClasses = cn(\n // Base button styles matching Figma design\n 'inline-flex items-center justify-center',\n 'bg-white border border-[var(--color-neutral-light)]',\n 'rounded-[6px] px-[16px] py-[13px]',\n 'transition-colors duration-200',\n // Interactive states\n 'hover:bg-[var(--color-neutral-lighter)]',\n 'focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)] focus:ring-offset-2',\n // Disabled state\n {\n 'opacity-50 cursor-not-allowed': disabled,\n 'cursor-pointer': !disabled,\n },\n );\n\n const dropdownClasses = cn(\n // Base dropdown styles\n 'absolute top-full left-0 right-0 z-10 mt-[4px]',\n 'bg-white border border-[var(--color-neutral-light)]',\n 'rounded-[6px] py-[13px] px-[16px]',\n 'shadow-lg',\n // Animation\n 'transition-all duration-200',\n {\n 'opacity-100 translate-y-0 pointer-events-auto': isOpen,\n 'opacity-0 -translate-y-2 pointer-events-none': !isOpen,\n },\n );\n\n const itemClasses = cn(\n 'block w-full text-right',\n 'transition-colors duration-200',\n 'hover:bg-[var(--color-neutral-lighter)] rounded-[4px] px-[8px] py-[4px] -mx-[8px]',\n 'focus:outline-none focus:bg-[var(--color-neutral-lighter)]',\n );\n\n return (\n <div\n ref={ref}\n className={cn('relative inline-block', className)}\n {...props}\n >\n <div ref={menuRef}>\n {/* Main Menu Button */}\n <button\n ref={buttonRef}\n type=\"button\"\n className={buttonClasses}\n onClick={handleToggle}\n onKeyDown={handleKeyDown}\n disabled={disabled}\n aria-expanded={isOpen}\n aria-haspopup=\"true\"\n aria-label={ariaLabel || `منوی ${buttonText}`}\n >\n <Typography\n variant=\"body-s-heavy\"\n color=\"neutral-darker\"\n className=\"text-right\"\n >\n {buttonText}\n </Typography>\n </button>\n\n {/* Dropdown Menu */}\n <div className={dropdownClasses}>\n <div className=\"flex flex-col gap-[16px]\">\n {items.map((item) => {\n const content = (\n <Typography\n variant=\"body-s-heavy\"\n color={item.disabled ? 'neutral-main' : 'neutral-darker'}\n className=\"text-right\"\n >\n {item.label}\n </Typography>\n );\n\n const commonProps = {\n className: cn(itemClasses, {\n 'opacity-50 cursor-not-allowed': item.disabled,\n 'cursor-pointer': !item.disabled,\n }),\n onClick: item.disabled\n ? undefined\n : () => handleItemClick(item),\n 'aria-label': `منوی ${item.label}`,\n };\n\n // Render as link if href is provided\n if (item.href && !item.disabled) {\n return (\n <a\n key={item.id}\n {...commonProps}\n href={item.href}\n role=\"menuitem\"\n tabIndex={isOpen ? 0 : -1}\n >\n {content}\n </a>\n );\n }\n\n // Render as button\n return (\n <button\n key={item.id}\n {...commonProps}\n type=\"button\"\n role=\"menuitem\"\n tabIndex={isOpen ? 0 : -1}\n disabled={item.disabled}\n >\n {content}\n </button>\n );\n })}\n </div>\n </div>\n </div>\n </div>\n );\n },\n);\n\nMenu.displayName = 'Menu';\n"],"names":["Menu","React","forwardRef","buttonText","items","disabled","className","onOpenChange","isOpen","controlledIsOpen","ariaLabel","props","ref","internalIsOpen","setInternalIsOpen","useState","menuRef","useRef","buttonRef","undefined","handleToggle","newIsOpen","useEffect","handleClickOutside","event","current","contains","target","document","addEventListener","removeEventListener","buttonClasses","cn","dropdownClasses","itemClasses","_jsx","_jsxs","children","type","onClick","onKeyDown","key","preventDefault","focus","Typography","variant","color","map","item","content","label","commonProps","handleItemClick","href","role","tabIndex","id","displayName"],"mappings":"oJA2CO,MAAMA,EAAOC,EAAMC,WACxB,EAEIC,aACAC,QACAC,YAAW,EACXC,YACAC,eACAC,OAAQC,EACR,aAAcC,KACXC,GAELC,KAEA,MAAOC,EAAgBC,GAAqBC,EAAAA,UAAS,GAC/CC,EAAUC,EAAAA,OAAuB,MACjCC,EAAYD,EAAAA,OAA0B,MAGtCT,OACiBW,IAArBV,EAAiCA,EAAmBI,EAEhDO,aAAe,KACnB,GAAIf,EAAU,OAEd,MAAMgB,GAAab,OAEMW,IAArBV,GACFK,EAAkBO,GAGpBd,IAAec,IAiBjBC,EAAAA,UAAU,KACR,MAAMC,mBAAsBC,IAExBR,EAAQS,UACPT,EAAQS,QAAQC,SAASF,EAAMG,eAEPR,IAArBV,GACFK,GAAkB,GAEpBP,KAAe,KAInB,GAAIC,EAEF,OADAoB,SAASC,iBAAiB,YAAaN,oBAChC,KACLK,SAASE,oBAAoB,YAAaP,sBAI7C,CAACf,EAAQC,EAAkBF,IAG9B,MA+BMwB,EAAgBC,EAEpB,0CACA,sDACA,oCACA,iCAEA,0CACA,wFAEA,CACE,gCAAiC3B,EACjC,kBAAmBA,IAIjB4B,EAAkBD,EAEtB,iDACA,sDACA,oCACA,YAEA,8BACA,CACE,gDAAiDxB,EACjD,gDAAiDA,IAI/C0B,EAAcF,EAClB,0BACA,iCACA,oFACA,8DAGF,OACEG,EAAAA,kBAAAA,WACEvB,IAAKA,EACLN,UAAW0B,EAAG,wBAAyB1B,MACnCK,WAEJyB,EAAAA,kBAAAA,KAAA,MAAA,CAAKxB,IAAKI,EAAOqB,SAAA,CAEfF,EAAAA,kBAAAA,cACEvB,IAAKM,EACLoB,KAAK,SACLhC,UAAWyB,EACXQ,QAASnB,aACToB,UAjFehB,IACrB,IAAInB,EAEJ,OAAQmB,EAAMiB,KACZ,IAAK,SACCjC,IACFgB,EAAMkB,sBACmBvB,IAArBV,GACF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";"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),t=require("react"),i=require("./utils.js"),n=require("./chunks/createLucideIcon-BqJVOzoK.js"),a=require("./chunks/chevron-left-Do__K6cA.js");const s=n.createLucideIcon("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),r=n.createLucideIcon("chevrons-left",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]),o=n.createLucideIcon("chevrons-right",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]),x=n.createLucideIcon("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);function PaginationRoot({className:t,...n}){return e.jsxRuntimeExports.jsx("nav",{role:"navigation","aria-label":"pagination","data-slot":"pagination",className:i("mx-auto flex w-full justify-center",t),...n})}function PaginationContent({className:t,device:n,...a}){return e.jsxRuntimeExports.jsx("ul",{"data-slot":"pagination-content",className:i("flex flex-row items-center","mobile"===n?"gap-[6px]":"gap-2",t),...a})}function PaginationItem({...t}){return e.jsxRuntimeExports.jsx("li",{"data-slot":"pagination-item",...t})}function PaginationLink({className:t,device:n,variant:a,isActive:s,...r}){return e.jsxRuntimeExports.jsx("a",{"aria-current":s?"page":void 0,"data-slot":"pagination-link","data-active":s,className:i(buttonVariants({variant:"nextPrev"===a?a:s?"active":"outline",device:n}),t),tabIndex:r["aria-disabled"]?-1:0,...r})}function PaginationPrevious({className:t,device:i,variant:n,...a}){const r="mobile"===i,x={mobile:e.jsxRuntimeExports.jsx(s,{size:18}),desktop:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(o,{size:20})," ",e.jsxRuntimeExports.jsx("span",{children:"قبلی"})]})};return e.jsxRuntimeExports.jsx(PaginationLink,{"aria-label":"Go to previous page",className:r?"ml-2.5":"flex justify-center items-center gap-2 w-[89px] h-[48px] ml-4",device:i,variant:"nextPrev",...a,children:"mobile"===i?x.mobile:x.desktop})}function PaginationNext({className:t,device:i,variant:n,...s}){const o="mobile"===i,x={mobile:e.jsxRuntimeExports.jsx(a.ChevronLeft,{size:18}),desktop:e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("span",{children:"بعدی"}),e.jsxRuntimeExports.jsx(r,{size:20})]})};return e.jsxRuntimeExports.jsx(PaginationLink,{"aria-label":"Go to next page",className:o?"mr-2.5":"flex justify-center items-center gap-2 w-[89px] h-[48px] mr-4",device:i,variant:"nextPrev",...s,children:"mobile"===i?x.mobile:x.desktop})}function PaginationEllipsis({className:t,...n}){return e.jsxRuntimeExports.jsx("span",{"aria-hidden":!0,"data-slot":"pagination-ellipsis",className:i("flex size-9 items-center justify-center",t),...n,children:e.jsxRuntimeExports.jsx(x,{className:"size-4"})})}function buttonVariants({variant:e,device:t}){const n="mobile"===t;return[i({"flex items-center justify-center rounded-[6px]":!0,"w-[40px] h-[40px] text-s font-heavy":n,"w-[48px] h-[48px] text-l font-heavy":!n}),{outline:"border border-neutral-light bg-white text-neutral-darker",active:"bg-primary text-white",nextPrev:"border border-neutral-light bg-white text-neutral-darker"}[e]].join(" ")}exports.Pagination=({pageCount:i,page:n,defaultPage:a=1,onPageChange:s,className:r,isMobile:o,...x})=>{const c=void 0!==n,[l,u]=t.useState(a),m=c?n:l,p=o?"mobile":"desktop";t.useEffect(()=>{c||u(a)},[a,c]);const changePage=e=>{c||u(e),s?.(e)};return e.jsxRuntimeExports.jsx(PaginationRoot,{className:r,...x,children:e.jsxRuntimeExports.jsxs(PaginationContent,{device:"mobile",children:[e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationPrevious,{href:"#",onClick:e=>{e.preventDefault(),m>1&&changePage(m-1)},variant:"nextPrev",device:p,"aria-disabled":1===m,tabIndex:1===m?-1:0})}),function(){const t=[];if(i<=5)for(let n=1;n<=i;n++)t.push(e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationLink,{href:"#",isActive:m===n,variant:"main",device:p,onClick:e=>{e.preventDefault(),m!==n&&changePage(n)},"aria-disabled":m===n,tabIndex:m===n?-1:0,children:n})},n));else{t.push(e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationLink,{href:"#",isActive:1===m,device:p,variant:"main",onClick:e=>{e.preventDefault(),1!==m&&changePage(1)},"aria-disabled":1===m,tabIndex:1===m?-1:0,children:"1"})},1)),m>3&&t.push(e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationEllipsis,{})},"start-ellipsis"));const n=Math.max(2,m-1),a=Math.min(i-1,m+1);for(let i=n;i<=a;i++)t.push(e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationLink,{href:"#",isActive:m===i,device:p,variant:"main",onClick:e=>{e.preventDefault(),m!==i&&changePage(i)},"aria-disabled":m===i,tabIndex:m===i?-1:0,children:i})},i));m<i-2&&t.push(e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationEllipsis,{})},"end-ellipsis")),t.push(e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationLink,{href:"#",isActive:m===i,device:p,variant:"main",onClick:e=>{e.preventDefault(),m!==i&&changePage(i)},"aria-disabled":m===i,tabIndex:m===i?-1:0,children:i})},i))}return t}(),e.jsxRuntimeExports.jsx(PaginationItem,{children:e.jsxRuntimeExports.jsx(PaginationNext,{href:"#",onClick:e=>{e.preventDefault(),m<i&&changePage(m+1)},variant:"nextPrev",device:p,"aria-disabled":m===i,tabIndex:m===i?-1:0})})]})})};
|
|
2
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.js","sources":["../../node_modules/lucide-react/dist/esm/icons/chevron-right.js","../../node_modules/lucide-react/dist/esm/icons/chevrons-left.js","../../node_modules/lucide-react/dist/esm/icons/chevrons-right.js","../../node_modules/lucide-react/dist/esm/icons/ellipsis.js","../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]];\nconst ChevronRight = createLucideIcon(\"chevron-right\", __iconNode);\n\nexport { __iconNode, ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m11 17-5-5 5-5\", key: \"13zhaf\" }],\n [\"path\", { d: \"m18 17-5-5 5-5\", key: \"h8a8et\" }]\n];\nconst ChevronsLeft = createLucideIcon(\"chevrons-left\", __iconNode);\n\nexport { __iconNode, ChevronsLeft as default };\n//# sourceMappingURL=chevrons-left.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m6 17 5-5-5-5\", key: \"xnjwq\" }],\n [\"path\", { d: \"m13 17 5-5-5-5\", key: \"17xmmf\" }]\n];\nconst ChevronsRight = createLucideIcon(\"chevrons-right\", __iconNode);\n\nexport { __iconNode, ChevronsRight as default };\n//# sourceMappingURL=chevrons-right.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }]\n];\nconst Ellipsis = createLucideIcon(\"ellipsis\", __iconNode);\n\nexport { __iconNode, Ellipsis as default };\n//# sourceMappingURL=ellipsis.js.map\n","import { useEffect, useState } from 'react';\nimport {\n ChevronLeftIcon,\n ChevronRightIcon,\n ChevronsRightIcon,\n ChevronsLeftIcon,\n MoreHorizontalIcon,\n} from 'lucide-react';\nimport cn from '@/utils/cn';\n\ntype Device = 'mobile' | 'desktop';\n\nfunction PaginationRoot({ className, ...props }: React.ComponentProps<'nav'>) {\n return (\n <nav\n role=\"navigation\"\n aria-label=\"pagination\"\n data-slot=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n {...props}\n />\n );\n}\n\nfunction PaginationContent({\n className,\n device,\n ...props\n}: React.ComponentProps<'ul'> & { device: Device }) {\n return (\n <ul\n data-slot=\"pagination-content\"\n className={cn(\n 'flex flex-row items-center',\n device === 'mobile' ? 'gap-[6px]' : 'gap-2',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction PaginationItem({ ...props }: React.ComponentProps<'li'>) {\n return <li data-slot=\"pagination-item\" {...props} />;\n}\n\ntype PaginationLinkVariant = 'main' | 'nextPrev';\n\ntype PaginationLinkProps = {\n variant: PaginationLinkVariant;\n isActive?: boolean;\n} & React.ComponentProps<'a'> & { device: Device };\n\nfunction PaginationLink({\n className,\n device,\n variant,\n isActive,\n ...props\n}: PaginationLinkProps) {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n data-slot=\"pagination-link\"\n data-active={isActive}\n className={cn(\n buttonVariants({\n variant:\n variant === 'nextPrev' ? variant : isActive ? 'active' : 'outline',\n device,\n }),\n className,\n )}\n tabIndex={props['aria-disabled'] ? -1 : 0}\n {...props}\n />\n );\n}\n\nfunction PaginationPrevious({\n className,\n device,\n variant,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n const isMobile = device === 'mobile';\n\n const content = {\n mobile: <ChevronRightIcon size={18} />,\n desktop: (\n <>\n <ChevronsRightIcon size={20} /> <span>قبلی</span>\n </>\n ),\n };\n\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={\n !isMobile\n ? 'flex justify-center items-center gap-2 w-[89px] h-[48px] ml-4'\n : 'ml-2.5'\n }\n device={device}\n variant=\"nextPrev\"\n {...props}\n >\n {device === 'mobile' ? content.mobile : content.desktop}\n </PaginationLink>\n );\n}\n\nfunction PaginationNext({\n className,\n device,\n variant,\n ...props\n}: React.ComponentProps<typeof PaginationLink>) {\n const isMobile = device === 'mobile';\n\n const content = {\n mobile: <ChevronLeftIcon size={18} />,\n desktop: (\n <>\n <span>بعدی</span>\n <ChevronsLeftIcon size={20} />\n </>\n ),\n };\n\n return (\n <PaginationLink\n aria-label=\"Go to next page\"\n className={\n !isMobile\n ? 'flex justify-center items-center gap-2 w-[89px] h-[48px] mr-4'\n : 'mr-2.5'\n }\n device={device}\n variant=\"nextPrev\"\n {...props}\n >\n {device === 'mobile' ? content.mobile : content.desktop}\n </PaginationLink>\n );\n}\n\nfunction PaginationEllipsis({\n className,\n ...props\n}: React.ComponentProps<'span'>) {\n return (\n <span\n aria-hidden\n data-slot=\"pagination-ellipsis\"\n className={cn('flex size-9 items-center justify-center', className)}\n {...props}\n >\n <MoreHorizontalIcon className=\"size-4\" />\n </span>\n );\n}\n\ntype ButtonVariant = 'outline' | 'active' | 'nextPrev';\n\nfunction buttonVariants({\n variant,\n device,\n}: {\n variant: ButtonVariant;\n device: Device;\n}) {\n const isMobile = device === 'mobile';\n\n const base = cn({\n 'flex items-center justify-center rounded-[6px]': true,\n 'w-[40px] h-[40px] text-s font-heavy': isMobile,\n 'w-[48px] h-[48px] text-l font-heavy': !isMobile,\n });\n\n const variants: Record<ButtonVariant, string> = {\n outline: 'border border-neutral-light bg-white text-neutral-darker',\n active: 'bg-primary text-white',\n nextPrev: 'border border-neutral-light bg-white text-neutral-darker',\n };\n\n return [base, variants[variant]].join(' ');\n}\n\nexport interface UnifiedPaginationProps {\n pageCount: number;\n page?: number;\n defaultPage?: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n}\n\nexport const Pagination: React.FC<UnifiedPaginationProps> = ({\n pageCount,\n page: controlledPage,\n defaultPage = 1,\n onPageChange,\n className,\n isMobile,\n ...navProps\n}) => {\n const isControlled = controlledPage !== undefined;\n const [internalPage, setInternalPage] = useState(defaultPage);\n\n const page = isControlled ? controlledPage! : internalPage;\n\n const device = isMobile ? 'mobile' : 'desktop';\n\n useEffect(() => {\n if (!isControlled) setInternalPage(defaultPage);\n }, [defaultPage, isControlled]);\n\n const changePage = (newPage: number) => {\n if (!isControlled) setInternalPage(newPage);\n onPageChange?.(newPage);\n };\n\n function renderPages() {\n const items: React.ReactNode[] = [];\n\n if (pageCount <= 5) {\n for (let i = 1; i <= pageCount; i++) {\n items.push(\n <PaginationItem key={i}>\n <PaginationLink\n href=\"#\"\n isActive={page === i}\n variant=\"main\"\n device={device}\n onClick={(e) => {\n e.preventDefault();\n if (page !== i) changePage(i);\n }}\n aria-disabled={page === i}\n tabIndex={page === i ? -1 : 0}\n >\n {i}\n </PaginationLink>\n </PaginationItem>,\n );\n }\n } else {\n // First page\n items.push(\n <PaginationItem key={1}>\n <PaginationLink\n href=\"#\"\n isActive={page === 1}\n device={device}\n variant=\"main\"\n onClick={(e) => {\n e.preventDefault();\n if (page !== 1) changePage(1);\n }}\n aria-disabled={page === 1}\n tabIndex={page === 1 ? -1 : 0}\n >\n 1\n </PaginationLink>\n </PaginationItem>,\n );\n // Ellipsis start\n if (page > 3) {\n items.push(\n <PaginationItem key=\"start-ellipsis\">\n <PaginationEllipsis />\n </PaginationItem>,\n );\n }\n // Middle pages\n const start = Math.max(2, page - 1);\n const end = Math.min(pageCount - 1, page + 1);\n for (let i = start; i <= end; i++) {\n items.push(\n <PaginationItem key={i}>\n <PaginationLink\n href=\"#\"\n isActive={page === i}\n device={device}\n variant=\"main\"\n onClick={(e) => {\n e.preventDefault();\n if (page !== i) changePage(i);\n }}\n aria-disabled={page === i}\n tabIndex={page === i ? -1 : 0}\n >\n {i}\n </PaginationLink>\n </PaginationItem>,\n );\n }\n // Ellipsis end\n if (page < pageCount - 2) {\n items.push(\n <PaginationItem key=\"end-ellipsis\">\n <PaginationEllipsis />\n </PaginationItem>,\n );\n }\n // Last page\n items.push(\n <PaginationItem key={pageCount}>\n <PaginationLink\n href=\"#\"\n isActive={page === pageCount}\n device={device}\n variant=\"main\"\n onClick={(e) => {\n e.preventDefault();\n if (page !== pageCount) changePage(pageCount);\n }}\n aria-disabled={page === pageCount}\n tabIndex={page === pageCount ? -1 : 0}\n >\n {pageCount}\n </PaginationLink>\n </PaginationItem>,\n );\n }\n return items;\n }\n\n return (\n <PaginationRoot className={className} {...navProps}>\n <PaginationContent device=\"mobile\">\n <PaginationItem>\n <PaginationPrevious\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n if (page > 1) changePage(page - 1);\n }}\n variant=\"nextPrev\"\n device={device}\n aria-disabled={page === 1}\n tabIndex={page === 1 ? -1 : 0}\n />\n </PaginationItem>\n {renderPages()}\n <PaginationItem>\n <PaginationNext\n href=\"#\"\n onClick={(e) => {\n e.preventDefault();\n if (page < pageCount) changePage(page + 1);\n }}\n variant=\"nextPrev\"\n device={device}\n aria-disabled={page === pageCount}\n tabIndex={page === pageCount ? -1 : 0}\n />\n </PaginationItem>\n </PaginationContent>\n </PaginationRoot>\n );\n};\n"],"names":["ChevronRight","createLucideIcon","d","key","ChevronsLeft","ChevronsRight","Ellipsis","cx","cy","r","PaginationRoot","className","props","_jsx","role","cn","PaginationContent","device","PaginationItem","PaginationLink","variant","isActive","undefined","buttonVariants","tabIndex","PaginationPrevious","isMobile","content","mobile","ChevronRightIcon","size","desktop","_jsxs","_Fragment","children","ChevronsRightIcon","PaginationNext","ChevronLeftIcon","ChevronsLeftIcon","PaginationEllipsis","MoreHorizontalIcon","outline","active","nextPrev","join","pageCount","page","controlledPage","defaultPage","onPageChange","navProps","isControlled","internalPage","setInternalPage","useState","useEffect","changePage","newPage","href","onClick","e","preventDefault","items","i","push","start","Math","max","end","min","renderPages"],"mappings":"yNASA,MACMA,EAAeC,EAAAA,iBAAiB,gBADnB,CAAC,CAAC,OAAQ,CAAEC,EAAG,gBAAiBC,IAAK,aCIlDC,EAAeH,EAAAA,iBAAiB,gBAJnB,CACjB,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK,WACrC,CAAC,OAAQ,CAAED,EAAG,iBAAkBC,IAAK,aCEjCE,EAAgBJ,EAAAA,iBAAiB,iBAJpB,CACjB,CAAC,OAAQ,CAAEC,EAAG,gBAAiBC,IAAK,UACpC,CAAC,OAAQ,CAAED,EAAG,iBAAkBC,IAAK,aCGjCG,EAAWL,EAAAA,iBAAiB,WALf,CACjB,CAAC,SAAU,CAAEM,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKN,IAAK,WAC9C,CAAC,SAAU,CAAEI,GAAI,KAAMC,GAAI,KAAMC,EAAG,IAAKN,IAAK,WAC9C,CAAC,SAAU,CAAEI,GAAI,IAAKC,GAAI,KAAMC,EAAG,IAAKN,IAAK,aCA/C,SAASO,gBAAeC,UAAEA,KAAcC,IACtC,OACEC,EAAAA,kBAAAA,WACEC,KAAK,aAAY,aACN,aAAY,YACb,aACVH,UAAWI,EAAG,qCAAsCJ,MAChDC,GAGV,CAEA,SAASI,mBAAkBL,UACzBA,EAASM,OACTA,KACGL,IAEH,OACEC,EAAAA,kBAAAA,IAAA,KAAA,CAAA,YACY,qBACVF,UAAWI,EACT,6BACW,WAAXE,EAAsB,YAAc,QACpCN,MAEEC,GAGV,CAEA,S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c,CAAAgB,SACbrB,EAAAA,kBAAAA,IAAC0B,mBAAkB,CAAA,IADD,iBAMxBuB,EAAME,KACJnD,EAAAA,kBAAAA,IAACK,eAAc,CAAAgB,SACbrB,EAAAA,kBAAAA,IAACM,eAAc,CACbuC,KAAK,IACLrC,SAAUyB,IAASD,EACnB5B,OAAQA,EACRG,QAAQ,OACRuC,QAAUC,IACRA,EAAEC,iBACEf,IAASD,GAAWW,WAAWX,IACpC,gBACcC,IAASD,EACxBrB,SAAUsB,IAASD,GAAY,EAAK,EAACX,SAEpCW,KAbgBA,GAiBzB,CACA,OAAOiB,CACT,CAkBOQ,GACDzD,wBAACK,eAAc,CAAAgB,SACbrB,wBAACuB,eAAc,CACbsB,KAAK,IACLC,QAAUC,IACRA,EAAEC,iBACEf,EAAOD,GAAWW,WAAWV,EAAO,IAE1C1B,QAAQ,WACRH,OAAQA,EAAM,gBACC6B,IAASD,EACxBrB,SAAUsB,IAASD,KAAiB","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),i=require("react"),t=require("./licensing.js");exports.withLicenseProtection=function(s,r){const n=i.forwardRef((i,n)=>t.canUseComponents()?e.jsxRuntimeExports.jsx(s,{...i,ref:n}):e.jsxRuntimeExports.jsxs("div",{style:{padding:"16px",border:"2px dashed #ef4444",borderRadius:"8px",backgroundColor:"#fef2f2",color:"#dc2626",textAlign:"center",fontFamily:"system-ui, sans-serif",fontSize:"14px",maxWidth:"400px",margin:"16px auto"},children:[e.jsxRuntimeExports.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"🔒 License Required"}),e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"8px"},children:['Component "',r,'" requires a valid license key.']}),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"12px",opacity:.8},children:"Please initialize Automoby Kit with your license key before using components."})]}));return n.displayName=`Protected(${r})`,n};
|
|
2
|
+
//# sourceMappingURL=ProtectedComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProtectedComponent.js","sources":["../../src/components/ProtectedComponent.tsx"],"sourcesContent":["import React from 'react';\nimport { canUseComponents } from '../licensing';\n\n/**\n * Higher-order component that protects components with license validation\n */\nexport function withLicenseProtection<T extends object>(\n Component: React.ComponentType<T>,\n componentName: string,\n) {\n const ProtectedComponent = React.forwardRef<unknown, T>((props, ref) => {\n if (!canUseComponents()) {\n // Return a placeholder component with error styling\n return (\n <div\n style={{\n padding: '16px',\n border: '2px dashed #ef4444',\n borderRadius: '8px',\n backgroundColor: '#fef2f2',\n color: '#dc2626',\n textAlign: 'center',\n fontFamily: 'system-ui, sans-serif',\n fontSize: '14px',\n maxWidth: '400px',\n margin: '16px auto',\n }}\n >\n <div style={{ fontWeight: 'bold', marginBottom: '8px' }}>\n 🔒 License Required\n </div>\n <div style={{ marginBottom: '8px' }}>\n Component "{componentName}" requires a valid license key.\n </div>\n <div style={{ fontSize: '12px', opacity: 0.8 }}>\n Please initialize Automoby Kit with your license key before using\n components.\n </div>\n </div>\n );\n }\n\n // If license is valid, render the actual component\n // Use type assertion to handle the generic component props properly\n return <Component {...(props as T)} ref={ref} />;\n });\n\n ProtectedComponent.displayName = `Protected(${componentName})`;\n\n return ProtectedComponent;\n}\n"],"names":["Component","componentName","ProtectedComponent","React","forwardRef","props","ref","canUseComponents","_jsx","_jsxs","style","padding","border","borderRadius","backgroundColor","color","textAlign","fontFamily","fontSize","maxWidth","margin","children","fontWeight","marginBottom","opacity","displayName"],"mappings":"4IAMM,SACJA,EACAC,GAEA,MAAMC,EAAqBC,EAAMC,WAAuB,CAACC,EAAOC,IACzDC,EAAAA,mBAiCEC,EAAAA,kBAAAA,IAACR,EAAS,IAAMK,EAAaC,IAAKA,IA9BrCG,EAAAA,kBAAAA,KAAA,MAAA,CACEC,MAAO,CACLC,QAAS,OACTC,OAAQ,qBACRC,aAAc,MACdC,gBAAiB,UACjBC,MAAO,UACPC,UAAW,SACXC,WAAY,wBACZC,SAAU,OACVC,SAAU,QACVC,OAAQ,aACTC,SAAA,CAEDb,EAAAA,kBAAAA,WAAKE,MAAO,CAAEY,WAAY,OAAQC,aAAc,OAAOF,SAAA,wBAGvDZ,EAAAA,kBAAAA,YAAKC,MAAO,CAAEa,aAAc,+BACTtB,EAAa,qCAEhCO,EAAAA,kBAAAA,IAAA,MAAA,CAAKE,MAAO,CAAEQ,SAAU,OAAQM,QAAS,IAAKH,SAAA,sFAetD,OAFAnB,EAAmBuB,YAAc,aAAaxB,KAEvCC,CACT"}
|
package/dist/cjs/RadioGroup.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use client";"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),s=require("react"),r=require("./utils.js");const RadioButton=({selected:s,disabled:i,isMobile:t})=>{const a=t?"size-5":"size-6";return s?e.jsxRuntimeExports.jsxs("div",{className:r("relative flex items-center justify-center",a),children:[e.jsxRuntimeExports.jsx("div",{className:r("absolute inset-0 rounded-full border-2",i?"bg-neutral-light border-neutral-light":"bg-primary border-primary")}),e.jsxRuntimeExports.jsx("div",{className:r("absolute rounded-full bg-white",t?"inset-[5px]":"inset-1.5")})]}):e.jsxRuntimeExports.jsx("div",{className:r("relative flex items-center justify-center",a),children:e.jsxRuntimeExports.jsx("div",{className:r("absolute inset-0 rounded-full border",t?"border":"border-[1.5px]",i?"border-neutral-light":"border-midnight")})})},RadioOptionComponent=({option:i,selected:t,disabled:a,onClick:l,name:n,isMobile:o})=>{const[d,x]=s.useState(!1),getTextColor=()=>a?"text-midnight":t?"text-primary":"text-neutral-dark";return e.jsxRuntimeExports.jsx("div",{className:r("relative rounded-lg border-[1.5px] cursor-pointer transition-all duration-200",a?"bg-neutral-lighter":t?"bg-primary-lightest":d?"bg-primary-lightest/20":"bg-white",t?"border-primary":"border-transparent",a?"":"shadow-[0px_2px_4px_0px_rgba(0,0,0,0.08)]",a&&"cursor-not-allowed"),onClick:a?void 0:l,onMouseEnter:()=>x(!0),onMouseLeave:()=>x(!1),onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||a||(e.preventDefault(),l())},tabIndex:a?-1:0,role:"radio","aria-checked":t,"aria-disabled":a,children:e.jsxRuntimeExports.jsx("div",{className:"flex flex-row items-center justify-end relative w-full",children:e.jsxRuntimeExports.jsx("div",{className:r("box-border flex flex-row items-center justify-end relative w-full",o?"gap-2 px-4 py-3":"gap-4 px-6 py-4"),children:e.jsxRuntimeExports.jsxs("div",{className:r("flex flex-row items-center justify-end p-0 relative shrink-0",o?"gap-2":"gap-3"),children:[e.jsxRuntimeExports.jsx("input",{type:"radio",name:n,value:i.id,checked:t,disabled:a,onChange:l,className:"sr-only","aria-label":i.label}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-0.5 items-end justify-start p-0 relative shrink-0",children:e.jsxRuntimeExports.jsx("div",{className:r("font-sans font-bold text-nowrap text-right transition-colors duration-200",o?"text-[14px] leading-[24px]":"text-[16px] leading-normal",getTextColor()),children:e.jsxRuntimeExports.jsx("p",{className:"whitespace-pre",dir:"auto",children:i.label})})}),i.icon&&e.jsxRuntimeExports.jsx("div",{className:r("flex items-center justify-center shrink-0 transition-colors duration-200",o?"size-6":"size-7",getTextColor()),children:i.icon}),e.jsxRuntimeExports.jsx("div",{className:"flex flex-col items-start justify-start p-0 relative shrink-0",children:e.jsxRuntimeExports.jsx(RadioButton,{selected:t,disabled:a,isMobile:o})})]})})})})},i=s.forwardRef(({options:s,value:i,onChange:t,name:a,disabled:l=!1,className:n,isMobile:o,direction:d="vertical",...x},u)=>e.jsxRuntimeExports.jsx("div",{ref:u,className:"horizontal"===d?r("flex flex-row gap-2",o?"flex-wrap":"flex-nowrap",n):r("flex flex-col gap-2",n),role:"radiogroup",...x,children:s.map(s=>e.jsxRuntimeExports.jsx(RadioOptionComponent,{option:s,selected:i===s.id,disabled:l||s.disabled,onClick:()=>{return e=s.id,void(!l&&t&&t(e));var e},name:a,isMobile:o},s.id))}));i.displayName="RadioGroup",exports.RadioGroup=i;
|
|
2
|
+
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sources":["../../src/components/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import React from 'react';\nimport cn from '@/utils/cn';\n\nexport interface RadioOption {\n /**\n * Unique identifier for the radio option\n */\n id: string;\n /**\n * Display label for the option\n */\n label: string;\n /**\n * Optional icon element\n */\n icon?: React.ReactNode;\n /**\n * Whether this option is disabled\n */\n disabled?: boolean;\n}\n\nexport interface RadioGroupProps\n extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {\n /**\n * Array of radio options\n */\n options: RadioOption[];\n /**\n * Currently selected option ID\n */\n value?: string;\n /**\n * Callback when selection changes\n */\n onChange?: (value: string) => void;\n /**\n * Name attribute for the radio group\n */\n name: string;\n /**\n * Whether the entire group is disabled\n */\n disabled?: boolean;\n /**\n * Custom class name\n */\n className?: string;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n /**\n * Layout direction of radio options\n */\n direction?: 'vertical' | 'horizontal';\n}\n\ninterface RadioButtonProps {\n /**\n * Whether the radio is selected\n */\n selected: boolean;\n /**\n * Whether the radio is disabled\n */\n disabled?: boolean;\n /**\n * Whether in mobile mode\n */\n isMobile: boolean;\n}\n\nconst RadioButton: React.FC<RadioButtonProps> = ({\n selected,\n disabled,\n isMobile,\n}) => {\n const size = isMobile ? 'size-5' : 'size-6';\n\n if (selected) {\n return (\n <div className={cn('relative flex items-center justify-center', size)}>\n {/* Outer circle - filled when selected */}\n <div\n className={cn(\n 'absolute inset-0 rounded-full border-2',\n disabled\n ? 'bg-neutral-light border-neutral-light'\n : 'bg-primary border-primary',\n )}\n />\n {/* Inner white circle */}\n <div\n className={cn(\n 'absolute rounded-full bg-white',\n isMobile ? 'inset-[5px]' : 'inset-1.5',\n )}\n />\n </div>\n );\n }\n\n return (\n <div className={cn('relative flex items-center justify-center', size)}>\n {/* Empty circle border */}\n <div\n className={cn(\n 'absolute inset-0 rounded-full border',\n isMobile ? 'border' : 'border-[1.5px]',\n disabled ? 'border-neutral-light' : 'border-midnight',\n )}\n />\n </div>\n );\n};\n\ninterface RadioOptionComponentProps {\n /**\n * Radio option data\n */\n option: RadioOption;\n /**\n * Whether this option is selected\n */\n selected: boolean;\n /**\n * Whether the option is disabled\n */\n disabled?: boolean;\n /**\n * Click handler\n */\n onClick: () => void;\n /**\n * Name attribute for radio input\n */\n name: string;\n /**\n * Whether in mobile mode\n */\n isMobile: boolean;\n}\n\nconst RadioOptionComponent: React.FC<RadioOptionComponentProps> = ({\n option,\n selected,\n disabled,\n onClick,\n name,\n isMobile,\n}) => {\n const [isHovered, setIsHovered] = React.useState(false);\n\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if ((e.key === 'Enter' || e.key === ' ') && !disabled) {\n e.preventDefault();\n onClick();\n }\n };\n\n const getBackgroundColor = () => {\n if (disabled) return 'bg-neutral-lighter';\n if (selected) return 'bg-primary-lightest';\n if (isHovered) return 'bg-primary-lightest/20';\n return 'bg-white';\n };\n\n const getBorderColor = () => {\n if (selected) return 'border-primary';\n return 'border-transparent';\n };\n\n const getTextColor = () => {\n if (disabled) return 'text-midnight';\n if (selected) return 'text-primary';\n return 'text-neutral-dark';\n };\n\n const getShadow = () => {\n if (disabled) return '';\n return 'shadow-[0px_2px_4px_0px_rgba(0,0,0,0.08)]';\n };\n\n return (\n <div\n className={cn(\n 'relative rounded-lg border-[1.5px] cursor-pointer transition-all duration-200',\n getBackgroundColor(),\n getBorderColor(),\n getShadow(),\n disabled && 'cursor-not-allowed',\n )}\n onClick={disabled ? undefined : onClick}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n onKeyDown={handleKeyDown}\n tabIndex={disabled ? -1 : 0}\n role=\"radio\"\n aria-checked={selected}\n aria-disabled={disabled}\n >\n <div className=\"flex flex-row items-center justify-end relative w-full\">\n <div\n className={cn(\n 'box-border flex flex-row items-center justify-end relative w-full',\n isMobile ? 'gap-2 px-4 py-3' : 'gap-4 px-6 py-4',\n )}\n >\n <div\n className={cn(\n 'flex flex-row items-center justify-end p-0 relative shrink-0',\n isMobile ? 'gap-2' : 'gap-3',\n )}\n >\n {/* Hidden native radio input for accessibility */}\n <input\n type=\"radio\"\n name={name}\n value={option.id}\n checked={selected}\n disabled={disabled}\n onChange={onClick}\n className=\"sr-only\"\n aria-label={option.label}\n />\n\n {/* Text Label */}\n <div className=\"flex flex-col gap-0.5 items-end justify-start p-0 relative shrink-0\">\n <div\n className={cn(\n 'font-sans font-bold text-nowrap text-right transition-colors duration-200',\n isMobile\n ? 'text-[14px] leading-[24px]'\n : 'text-[16px] leading-normal',\n getTextColor(),\n )}\n >\n <p className=\"whitespace-pre\" dir=\"auto\">\n {option.label}\n </p>\n </div>\n </div>\n\n {/* Optional Icon */}\n {option.icon && (\n <div\n className={cn(\n 'flex items-center justify-center shrink-0 transition-colors duration-200',\n isMobile ? 'size-6' : 'size-7',\n getTextColor(),\n )}\n >\n {option.icon}\n </div>\n )}\n\n {/* Radio Button */}\n <div className=\"flex flex-col items-start justify-start p-0 relative shrink-0\">\n <RadioButton\n selected={selected}\n disabled={disabled}\n isMobile={isMobile}\n />\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nconst RadioGroup = React.forwardRef<HTMLDivElement, RadioGroupProps>(\n (\n {\n options,\n value,\n onChange,\n name,\n disabled = false,\n className,\n isMobile,\n direction = 'vertical',\n ...props\n },\n ref,\n ) => {\n const handleOptionClick = (optionId: string) => {\n if (!disabled && onChange) {\n onChange(optionId);\n }\n };\n\n const getContainerClasses = () => {\n if (direction === 'horizontal') {\n return cn(\n 'flex flex-row gap-2',\n isMobile ? 'flex-wrap' : 'flex-nowrap',\n className,\n );\n }\n return cn('flex flex-col gap-2', className);\n };\n\n return (\n <div\n ref={ref}\n className={getContainerClasses()}\n role=\"radiogroup\"\n {...props}\n >\n {options.map((option) => (\n <RadioOptionComponent\n key={option.id}\n option={option}\n selected={value === option.id}\n disabled={disabled || option.disabled}\n onClick={() => handleOptionClick(option.id)}\n name={name}\n isMobile={isMobile}\n />\n ))}\n </div>\n );\n },\n);\n\nRadioGroup.displayName = 'RadioGroup';\n\nexport { RadioGroup };\n"],"names":["RadioButton","selected","disabled","isMobile","size","_jsxs","className","cn","children","_jsx","RadioOptionComponent","option","onClick","name","isHovered","setIsHovered","React","useState","getTextColor","undefined","onMouseEnter","onMouseLeave","onKeyDown","e","key","preventDefault","tabIndex","role","type","value","id","checked","onChange","label","dir","icon","RadioGroup","forwardRef","options","direction","props","ref","map","handleOptionClick","optionId","displayName"],"mappings":"uHAyEA,MAAMA,YAA0C,EAC9CC,WACAC,WACAC,eAEA,MAAMC,EAAOD,EAAW,SAAW,SAEnC,OAAIF,EAEAI,EAAAA,kBAAAA,KAAA,MAAA,CAAKC,UAAWC,EAAG,4CAA6CH,GAAKI,SAAA,CAEnEC,EAAAA,kBAAAA,WACEH,UAAWC,EACT,yCACAL,EACI,wCACA,+BAIRO,EAAAA,kBAAAA,WACEH,UAAWC,EACT,iCACAJ,EAAW,cAAgB,kBAQnCM,EAAAA,kBAAAA,IAAA,MAAA,CAAKH,UAAWC,EAAG,4CAA6CH,GAAKI,SAEnEC,EAAAA,kBAAAA,WACEH,UAAWC,EACT,uCACAJ,EAAW,SAAW,iBACtBD,EAAW,uBAAyB,wBAkCxCQ,qBAA4D,EAChEC,SACAV,WACAC,WACAU,UACAC,OACAV,eAEA,MAAOW,EAAWC,GAAgBC,EAAMC,UAAS,GAqB3CC,aAAe,IACfhB,EAAiB,gBACjBD,EAAiB,eACd,oBAQT,OACEQ,wBAAA,MAAA,CACEH,UAAWC,EACT,gFAzBAL,EAAiB,qBACjBD,EAAiB,sBACjBa,EAAkB,yBACf,WAIHb,EAAiB,iBACd,qBAUHC,EAAiB,GACd,4CAUHA,GAAY,sBAEdU,QAASV,OAAWiB,EA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,EACKhC,EACL,sBACAJ,EAAW,YAAc,cACzBG,GAGGC,EAAG,sBAAuBD,GAO/BqB,KAAK,gBACDa,EAAKhC,SAER8B,EAAQI,IAAK/B,GACZF,EAAAA,kBAAAA,IAACC,qBAAoB,CAEnBC,OAAQA,EACRV,SAAU4B,IAAUlB,EAAOmB,GAC3B5B,SAAUA,GAAYS,EAAOT,SAC7BU,QAAS,KAAM+B,OA9BIC,EA8BcjC,EAAOmB,SA7BzC5B,GAAY8B,GACfA,EAASY,IAFa,IAACA,GA+BnB/B,KAAMA,EACNV,SAAUA,GANLQ,EAAOmB,QAcxBM,EAAWS,YAAc"}
|
package/dist/cjs/Tabs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("./chunks/jsx-runtime-Bgd4cJfV.js"),t=require("react"),s=require("./utils.js");const renderBadge=(t,i,r,a)=>void 0===t?null:e.jsxRuntimeExports.jsx("div",{className:s("flex items-center justify-center rounded-[5px] font-sans font-bold text-white","transition-colors duration-200",a?"size-6 text-[14px] pt-0.5":"size-[25px] text-[14px] pt-[3px]",r?"bg-midnight":i?"bg-primary":"bg-neutral-main"),children:e.jsxRuntimeExports.jsx("p",{className:"leading-[24px] whitespace-pre",dir:"auto",children:t})}),renderTabContent=(t,i,r)=>{const a=void 0!==t.count;return e.jsxRuntimeExports.jsxs("div",{className:s("flex flex-row items-center justify-start transition-colors duration-200","gap-1.5"),children:[a&&renderBadge(t.count,i,t.disabled,r),e.jsxRuntimeExports.jsx("div",{className:s("font-sans text-nowrap text-right transition-colors duration-200",r?"text-[14px]":i?"text-[16px]":"text-[18px]",t.disabled?"font-normal text-midnight":i?"font-bold text-primary":"font-normal text-neutral-main",r?"leading-[24px]":i?"leading-normal":"leading-[1.9]"),children:e.jsxRuntimeExports.jsx("p",{className:"whitespace-pre",dir:"auto",children:t.label})})]})},i=t.forwardRef(({items:t,activeTab:i,onTabChange:r,className:a,isMobile:n,...o},l)=>e.jsxRuntimeExports.jsxs("div",{ref:l,className:s("relative w-full",a),...o,children:[e.jsxRuntimeExports.jsx("div",{className:"box-border flex flex-row items-center justify-end p-0 relative w-full",children:t.map(t=>((t,i,r,a)=>{const n=t.id===i;return e.jsxRuntimeExports.jsxs("div",{className:s("box-border flex flex-col items-center justify-between relative shrink-0","cursor-pointer transition-all duration-200",r?"h-12 px-3":"h-14 px-4",n?r?"pt-[11px] pb-0":"pt-3.5 pb-0":"py-0 justify-center",t.disabled&&"cursor-not-allowed opacity-50",!t.disabled&&"hover:opacity-80"),onClick:()=>((e,t,s)=>{t||s(e)})(t.id,t.disabled,a),onKeyDown:e=>((e,t,s,i)=>{"Enter"!==e.key&&" "!==e.key||s||(e.preventDefault(),i(t))})(e,t.id,t.disabled,a),tabIndex:t.disabled?-1:0,role:"tab","aria-selected":n,"aria-disabled":t.disabled,children:[renderTabContent(t,n,r),n&&e.jsxRuntimeExports.jsx("div",{className:"bg-primary h-1 rounded-tl-[8px] rounded-tr-[8px] shrink-0 w-full"})]},t.id)})(t,i,n,r))}),e.jsxRuntimeExports.jsx("div",{className:"absolute border-midnight-light border-[0px_0px_1px] border-solid bottom-[-0.5px] left-0 right-0 top-0 pointer-events-none"})]}));i.displayName="Tabs",exports.Tabs=i;
|
|
2
|
+
//# sourceMappingURL=Tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.js","sources":["../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import React from 'react';\nimport cn from '@/utils/cn';\n\nexport interface TabItem {\n /**\n * Unique identifier for the tab\n */\n id: string;\n /**\n * Display label for the tab\n */\n label: string;\n /**\n * Badge count number (optional)\n */\n count?: number;\n /**\n * Whether the tab is disabled\n */\n disabled?: boolean;\n}\n\nexport interface TabsProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Array of tab items\n */\n items: TabItem[];\n /**\n * Currently active tab ID\n */\n activeTab: string;\n /**\n * Callback when tab is clicked\n */\n onTabChange: (tabId: string) => void;\n /**\n * Custom class name\n */\n className?: string;\n /**\n * Whether the component is in mobile mode\n */\n isMobile: boolean;\n}\n\n// Helper functions moved outside component\nconst handleTabClick = (\n tabId: string,\n disabled: boolean | undefined,\n onTabChange: (tabId: string) => void,\n) => {\n if (!disabled) {\n onTabChange(tabId);\n }\n};\n\nconst handleKeyDown = (\n e: React.KeyboardEvent,\n tabId: string,\n disabled: boolean | undefined,\n onTabChange: (tabId: string) => void,\n) => {\n if ((e.key === 'Enter' || e.key === ' ') && !disabled) {\n e.preventDefault();\n onTabChange(tabId);\n }\n};\n\nconst renderBadge = (\n count: number | undefined,\n isActive: boolean | undefined,\n disabled: boolean | undefined,\n isMobile: boolean,\n) => {\n if (count === undefined) return null;\n\n return (\n <div\n className={cn(\n 'flex items-center justify-center rounded-[5px] font-sans font-bold text-white',\n 'transition-colors duration-200',\n isMobile\n ? 'size-6 text-[14px] pt-0.5'\n : 'size-[25px] text-[14px] pt-[3px]',\n disabled ? 'bg-midnight' : isActive ? 'bg-primary' : 'bg-neutral-main',\n )}\n >\n <p className=\"leading-[24px] whitespace-pre\" dir=\"auto\">\n {count}\n </p>\n </div>\n );\n};\n\nconst renderTabContent = (\n item: TabItem,\n isActive: boolean,\n isMobile: boolean,\n) => {\n const hasCount = item.count !== undefined;\n\n return (\n <div\n className={cn(\n 'flex flex-row items-center justify-start transition-colors duration-200',\n isMobile ? 'gap-1.5' : 'gap-1.5',\n )}\n >\n {hasCount && renderBadge(item.count, isActive, item.disabled, isMobile)}\n <div\n className={cn(\n 'font-sans text-nowrap text-right transition-colors duration-200',\n isMobile ? 'text-[14px]' : isActive ? 'text-[16px]' : 'text-[18px]',\n item.disabled\n ? 'font-normal text-midnight'\n : isActive\n ? 'font-bold text-primary'\n : 'font-normal text-neutral-main',\n isMobile\n ? 'leading-[24px]'\n : isActive\n ? 'leading-normal'\n : 'leading-[1.9]',\n )}\n >\n <p className=\"whitespace-pre\" dir=\"auto\">\n {item.label}\n </p>\n </div>\n </div>\n );\n};\n\nconst renderTab = (\n item: TabItem,\n activeTab: string,\n isMobile: boolean,\n onTabChange: (tabId: string) => void,\n) => {\n const isActive = item.id === activeTab;\n\n return (\n <div\n key={item.id}\n className={cn(\n 'box-border flex flex-col items-center justify-between relative shrink-0',\n 'cursor-pointer transition-all duration-200',\n isMobile ? 'h-12 px-3' : 'h-14 px-4',\n isActive\n ? isMobile\n ? 'pt-[11px] pb-0'\n : 'pt-3.5 pb-0'\n : 'py-0 justify-center',\n item.disabled && 'cursor-not-allowed opacity-50',\n !item.disabled && 'hover:opacity-80',\n )}\n onClick={() => handleTabClick(item.id, item.disabled, onTabChange)}\n onKeyDown={(e) => handleKeyDown(e, item.id, item.disabled, onTabChange)}\n tabIndex={item.disabled ? -1 : 0}\n role=\"tab\"\n aria-selected={isActive}\n aria-disabled={item.disabled}\n >\n {renderTabContent(item, isActive, isMobile)}\n\n {/* Active indicator line */}\n {isActive && (\n <div className=\"bg-primary h-1 rounded-tl-[8px] rounded-tr-[8px] shrink-0 w-full\" />\n )}\n </div>\n );\n};\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(\n ({ items, activeTab, onTabChange, className, isMobile, ...props }, ref) => {\n return (\n <div ref={ref} className={cn('relative w-full', className)} {...props}>\n <div className=\"box-border flex flex-row items-center justify-end p-0 relative w-full\">\n {items.map((item) =>\n renderTab(item, activeTab, isMobile, onTabChange),\n )}\n </div>\n\n {/* Bottom border line */}\n <div className=\"absolute border-midnight-light border-[0px_0px_1px] border-solid bottom-[-0.5px] left-0 right-0 top-0 pointer-events-none\" />\n </div>\n );\n },\n);\n\nTabs.displayName = 'Tabs';\n\nexport { Tabs };\n"],"names":["renderBadge","count","isActive","disabled","isMobile","undefined","_jsx","className","cn","children","dir","renderTabContent","item","hasCount","_jsxs","label","Tabs","React","forwardRef","items","activeTab","onTabChange","props","ref","map","id","onClick","tabId","handleTabClick","onKeyDown","e","key","preventDefault","handleKeyDown","tabIndex","role","renderTab","displayName"],"mappings":"0GA8CA,MAsB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,EAAYM,IAwGKC,CAAehB,EAAKa,GAAIb,EAAKT,SAAUkB,GACtDQ,UAAYC,GArGI,EACpBA,EACAH,EACAxB,EACAkB,KAEe,UAAVS,EAAEC,KAA6B,MAAVD,EAAEC,KAAiB5B,IAC3C2B,EAAEE,iBACFX,EAAYM,KA6FQM,CAAcH,EAAGlB,EAAKa,GAAIb,EAAKT,SAAUkB,GAC3Da,SAAUtB,EAAKT,UAAW,EAAK,EAC/BgC,KAAK,MAAK,gBACKjC,EAAQ,gBACRU,EAAKT,SAAQM,SAAA,CAE3BE,iBAAiBC,EAAMV,EAAUE,GAGjCF,GACCI,EAAAA,kBAAAA,WAAKC,UAAU,uEAxBZK,EAAKa,KAoCJW,CAAUxB,EAAMQ,EAAWhB,EAAUiB,MAKzCf,EAAAA,kBAAAA,IAAA,MAAA,CAAKC,UAAU,kIAMvBS,EAAKqB,YAAc"}
|
package/dist/cjs/Typography.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var t=require("react"),e=require("./utils.js");const o={h1:"text-[36px] font-[var(--font-weight-fat)]",h2:"text-[32px] font-[var(--font-weight-fat)]",h3:"text-[28px] font-[var(--font-weight-fat)]",h4:"text-[24px] font-[var(--font-weight-heavy)]",h5:"text-[22px] font-[var(--font-weight-heavy)]",h6:"text-[20px] font-[var(--font-weight-heavy)]","body-xl-heavy":"text-[20px] font-[var(--font-weight-heavy)]","body-l-heavy":"text-[18px] font-[var(--font-weight-heavy)]","body-l-bold":"text-[18px] font-[var(--font-weight-bold)]","body-l-medium":"text-[18px] font-[var(--font-weight-medium)]","body-m-heavy":"text-[16px] font-[var(--font-weight-heavy)]","body-m-bold":"text-[16px] font-[var(--font-weight-bold)]","body-m-medium":"text-[16px] font-[var(--font-weight-medium)]","body-s-heavy":"text-[14px] font-[var(--font-weight-heavy)]","body-s-bold":"text-[14px] font-[var(--font-weight-bold)]","body-s-medium":"text-[14px] font-[var(--font-weight-medium)]","body-ms-bold":"text-[13px] font-[var(--font-weight-bold)]","body-ms-medium":"text-[13px] font-[var(--font-weight-medium)]","body-xs-bold":"text-[12px] font-[var(--font-weight-bold)]","body-xs-medium":"text-[12px] font-[var(--font-weight-medium)]","body-t-bold":"text-[10px] font-[var(--font-weight-bold)]","body-t-medium":"text-[10px] font-[var(--font-weight-medium)]","body-ss-medium":"text-[9px] font-[var(--font-weight-medium)]"},a={primary:"text-[var(--color-primary)]",secondary:"text-[var(--color-secondary)]","neutral-darker":"text-[var(--color-neutral-darker)]","neutral-dark":"text-[var(--color-neutral-dark)]","neutral-main":"text-[var(--color-neutral-main)]",white:"text-[var(--color-white)]",inherit:"text-inherit"},r=t.forwardRef(({variant:r="body-m-medium",color:n="inherit",as:i,className:x,children:d,...f},h)=>{const m=i||(t=>t.startsWith("h")?t.split("-")[0]:"p")(r);return t.createElement(m,{ref:h,className:e(o[r],a[n],"leading-[var(--leading-default)]",x),...f},d)});r.displayName="Typography",exports.Typography=r,exports.getTypographyClasses=t=>o[t];
|
|
2
|
+
//# sourceMappingURL=Typography.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.js","sources":["../../src/components/Typography/Typography.tsx"],"sourcesContent":["import React from 'react';\nimport cn from '@/utils/cn';\n\nexport type TypographyVariant =\n // Headings with Fat weight (900)\n | 'h1' // 36px / Fat (900)\n | 'h2' // 32px / Fat (900)\n | 'h3' // 28px / Fat (900)\n | 'h4' // 24px / Heavy (700)\n | 'h5' // 22px / Heavy (700)\n | 'h6' // 20px / Heavy (700)\n // Body Copy variants with specific weights\n | 'body-xl-heavy' // 20px / Heavy (700)\n | 'body-l-heavy' // 18px / Heavy (700)\n | 'body-l-bold' // 18px / Bold (600)\n | 'body-l-medium' // 18px / Medium (400)\n | 'body-m-heavy' // 16px / Heavy (700)\n | 'body-m-bold' // 16px / Bold (600)\n | 'body-m-medium' // 16px / Medium (400)\n | 'body-s-heavy' // 14px / Heavy (700)\n | 'body-s-bold' // 14px / Bold (600)\n | 'body-s-medium' // 14px / Medium (400)\n | 'body-ms-bold' // 13px / Bold (600)\n | 'body-ms-medium' // 13px / Medium (400)\n | 'body-xs-bold' // 12px / Bold (600)\n | 'body-xs-medium' // 12px / Medium (400)\n | 'body-t-bold' // 10px / Bold (600)\n | 'body-t-medium' // 10px / Medium (400)\n | 'body-ss-medium'; // 9px / Medium (400)\n\nexport interface TypographyProps extends React.HTMLAttributes<HTMLElement> {\n variant?: TypographyVariant;\n color?:\n | 'primary'\n | 'secondary'\n | 'neutral-darker'\n | 'neutral-dark'\n | 'neutral-main'\n | 'white'\n | 'inherit';\n as?: React.ElementType;\n}\n\nconst variantClasses: Record<TypographyVariant, string> = {\n // Headings with Fat weight (900)\n h1: 'text-[36px] font-[var(--font-weight-fat)]',\n h2: 'text-[32px] font-[var(--font-weight-fat)]',\n h3: 'text-[28px] font-[var(--font-weight-fat)]',\n h4: 'text-[24px] font-[var(--font-weight-heavy)]',\n h5: 'text-[22px] font-[var(--font-weight-heavy)]',\n h6: 'text-[20px] font-[var(--font-weight-heavy)]',\n\n // Body Copy with specific weight variants\n 'body-xl-heavy': 'text-[20px] font-[var(--font-weight-heavy)]',\n 'body-l-heavy': 'text-[18px] font-[var(--font-weight-heavy)]',\n 'body-l-bold': 'text-[18px] font-[var(--font-weight-bold)]',\n 'body-l-medium': 'text-[18px] font-[var(--font-weight-medium)]',\n 'body-m-heavy': 'text-[16px] font-[var(--font-weight-heavy)]',\n 'body-m-bold': 'text-[16px] font-[var(--font-weight-bold)]',\n 'body-m-medium': 'text-[16px] font-[var(--font-weight-medium)]',\n 'body-s-heavy': 'text-[14px] font-[var(--font-weight-heavy)]',\n 'body-s-bold': 'text-[14px] font-[var(--font-weight-bold)]',\n 'body-s-medium': 'text-[14px] font-[var(--font-weight-medium)]',\n 'body-ms-bold': 'text-[13px] font-[var(--font-weight-bold)]',\n 'body-ms-medium': 'text-[13px] font-[var(--font-weight-medium)]',\n 'body-xs-bold': 'text-[12px] font-[var(--font-weight-bold)]',\n 'body-xs-medium': 'text-[12px] font-[var(--font-weight-medium)]',\n 'body-t-bold': 'text-[10px] font-[var(--font-weight-bold)]',\n 'body-t-medium': 'text-[10px] font-[var(--font-weight-medium)]',\n 'body-ss-medium': 'text-[9px] font-[var(--font-weight-medium)]',\n};\n\n// Export for reuse in other components\nexport const getTypographyClasses = (variant: TypographyVariant): string => {\n return variantClasses[variant];\n};\n\nconst colorClasses: Record<string, string> = {\n primary: 'text-[var(--color-primary)]',\n secondary: 'text-[var(--color-secondary)]',\n 'neutral-darker': 'text-[var(--color-neutral-darker)]',\n 'neutral-dark': 'text-[var(--color-neutral-dark)]',\n 'neutral-main': 'text-[var(--color-neutral-main)]',\n white: 'text-[var(--color-white)]',\n inherit: 'text-inherit',\n};\n\nconst getDefaultElement = (variant: TypographyVariant): string => {\n if (variant.startsWith('h')) return variant.split('-')[0]; // h1, h2, etc.\n return 'p';\n};\n\nexport const Typography = React.forwardRef<HTMLElement, TypographyProps>(\n (\n {\n variant = 'body-m-medium',\n color = 'inherit',\n as,\n className,\n children,\n ...props\n },\n ref,\n ) => {\n const Element = as || getDefaultElement(variant);\n\n return React.createElement(\n Element,\n {\n ref,\n className: cn(\n variantClasses[variant],\n colorClasses[color],\n 'leading-[var(--leading-default)]', // 180% line height\n className,\n ),\n ...props,\n },\n children,\n );\n },\n);\n\nTypography.displayName = 'Typography';\n"],"names":["variantClasses","h1","h2","h3","h4","h5","h6","colorClasses","primary","secondary","white","inherit","Typography","React","forwardRef","variant","color","as","className","children","props","ref","Element","startsWith","split","getDefaultElement","createElement","cn","displayName"],"mappings":"4DA2CA,MAAMA,EAAoD,CAExDC,GAAI,4CACJC,GAAI,4CACJC,GAAI,4CACJC,GAAI,8CACJC,GAAI,8CACJC,GAAI,8CAGJ,gBAAiB,8CACjB,eAAgB,8CAChB,cAAe,6CACf,gBAAiB,+CACjB,eAAgB,8CAChB,cAAe,6CACf,gBAAiB,+CACjB,eAAgB,8CAChB,cAAe,6CACf,gBAAiB,+CACjB,eAAgB,6CAChB,iBAAkB,+CAClB,eAAgB,6CAChB,iBAAkB,+CAClB,cAAe,6CACf,gBAAiB,+CACjB,iBAAkB,+CAQdC,EAAuC,CAC3CC,QAAS,8BACTC,UAAW,gCACX,iBAAkB,qCAClB,eAAgB,mCAChB,eAAgB,mCAChBC,MAAO,4BACPC,QAAS,gBAQEC,EAAaC,EAAMC,WAC9B,EAEIC,UAAU,gBACVC,QAAQ,UACRC,KACAC,YACAC,cACGC,GAELC,KAEA,MAAMC,EAAUL,GAjBM,CAACF,GACrBA,EAAQQ,WAAW,KAAaR,EAAQS,MAAM,KAAK,GAChD,IAeiBC,CAAkBV,GAExC,OAAOF,EAAMa,cACXJ,EACA,CACED,MACAH,UAAWS,EACT3B,EAAee,GACfR,EAAaS,GACb,mCACAE,MAECE,GAELD,KAKNP,EAAWgB,YAAc,+DAlDYb,GAC5Bf,EAAee"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chevron-left-Do__K6cA.js","sources":["../../../node_modules/lucide-react/dist/esm/icons/chevron-left.js"],"sourcesContent":["/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m15 18-6-6 6-6\", key: \"1wnfg3\" }]];\nconst ChevronLeft = createLucideIcon(\"chevron-left\", __iconNode);\n\nexport { __iconNode, ChevronLeft as default };\n//# sourceMappingURL=chevron-left.js.map\n"],"names":["ChevronLeft","createLucideIcon","d","key"],"mappings":"aASA,MACMA,4CAAcC,iBAAiB,eADlB,CAAC,CAAC,OAAQ,CAAEC,EAAG,iBAAkBC,IAAK","x_google_ignoreList":[0]}
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var e=require("react");const toPascalCase=e=>{const r=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,t)=>t?t.toUpperCase():r.toLowerCase()))(e);return r.charAt(0).toUpperCase()+r.slice(1)},mergeClasses=(...e)=>e.filter((e,r,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===r).join(" ").trim(),hasA11yProp=e=>{for(const r in e)if(r.startsWith("aria-")||"role"===r||"title"===r)return!0};var r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const t=e.forwardRef(({color:t="currentColor",size:o=24,strokeWidth:a=2,absoluteStrokeWidth:i,className:s="",children:c,iconNode:n,...l},d)=>e.createElement("svg",{ref:d,...r,width:o,height:o,stroke:t,strokeWidth:i?24*Number(a)/Number(o):a,className:mergeClasses("lucide",s),...!c&&!hasA11yProp(l)&&{"aria-hidden":"true"},...l},[...n.map(([r,t])=>e.createElement(r,t)),...Array.isArray(c)?c:[c]]));exports.createLucideIcon=(r,o)=>{const a=e.forwardRef(({className:a,...i},s)=>{return e.createElement(t,{ref:s,iconNode:o,className:mergeClasses(`lucide-${c=toPascalCase(r),c.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${r}`,a),...i});var c});return a.displayName=toPascalCase(r),a};
|
|
2
|
+
//# sourceMappingURL=createLucideIcon-BqJVOzoK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createLucideIcon-BqJVOzoK.js","sources":["../../../node_modules/lucide-react/dist/esm/shared/src/utils.js","../../../node_modules/lucide-react/dist/esm/defaultAttributes.js","../../../node_modules/lucide-react/dist/esm/Icon.js","../../../node_modules/lucide-react/dist/esm/createLucideIcon.js"],"sourcesContent":["/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nconst toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").toLowerCase();\nconst toCamelCase = (string) => string.replace(\n /^([A-Z])|[\\s-_]+(\\w)/g,\n (match, p1, p2) => p2 ? p2.toUpperCase() : p1.toLowerCase()\n);\nconst toPascalCase = (string) => {\n const camelCase = toCamelCase(string);\n return camelCase.charAt(0).toUpperCase() + camelCase.slice(1);\n};\nconst mergeClasses = (...classes) => classes.filter((className, index, array) => {\n return Boolean(className) && className.trim() !== \"\" && array.indexOf(className) === index;\n}).join(\" \").trim();\nconst hasA11yProp = (props) => {\n for (const prop in props) {\n if (prop.startsWith(\"aria-\") || prop === \"role\" || prop === \"title\") {\n return true;\n }\n }\n};\n\nexport { hasA11yProp, mergeClasses, toCamelCase, toKebabCase, toPascalCase };\n//# sourceMappingURL=utils.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nvar defaultAttributes = {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: 24,\n height: 24,\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: 2,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n};\n\nexport { defaultAttributes as default };\n//# sourceMappingURL=defaultAttributes.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport defaultAttributes from './defaultAttributes.js';\nimport { mergeClasses, hasA11yProp } from './shared/src/utils.js';\n\nconst Icon = forwardRef(\n ({\n color = \"currentColor\",\n size = 24,\n strokeWidth = 2,\n absoluteStrokeWidth,\n className = \"\",\n children,\n iconNode,\n ...rest\n }, ref) => createElement(\n \"svg\",\n {\n ref,\n ...defaultAttributes,\n width: size,\n height: size,\n stroke: color,\n strokeWidth: absoluteStrokeWidth ? Number(strokeWidth) * 24 / Number(size) : strokeWidth,\n className: mergeClasses(\"lucide\", className),\n ...!children && !hasA11yProp(rest) && { \"aria-hidden\": \"true\" },\n ...rest\n },\n [\n ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),\n ...Array.isArray(children) ? children : [children]\n ]\n )\n);\n\nexport { Icon as default };\n//# sourceMappingURL=Icon.js.map\n","/**\n * @license lucide-react v0.522.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport { forwardRef, createElement } from 'react';\nimport { mergeClasses, toKebabCase, toPascalCase } from './shared/src/utils.js';\nimport Icon from './Icon.js';\n\nconst createLucideIcon = (iconName, iconNode) => {\n const Component = forwardRef(\n ({ className, ...props }, ref) => createElement(Icon, {\n ref,\n iconNode,\n className: mergeClasses(\n `lucide-${toKebabCase(toPascalCase(iconName))}`,\n `lucide-${iconName}`,\n className\n ),\n ...props\n })\n );\n Component.displayName = toPascalCase(iconName);\n return Component;\n};\n\nexport { createLucideIcon as default };\n//# sourceMappingURL=createLucideIcon.js.map\n"],"names":["toPascalCase","string","camelCase","replace","match","p1","p2","toUpperCase","toLowerCase","toCamelCase","charAt","slice","mergeClasses","classes","filter","className","index","array","Boolean","trim","indexOf","join","hasA11yProp","props","prop","startsWith","defaultAttributes","xmlns","width","height","viewBox","fill","stroke","strokeWidth","strokeLinecap","strokeLinejoin","Icon","forwardRef","color","size","absoluteStrokeWidth","children","iconNode","rest","ref","createElement","Number","map","tag","attrs","Array","isArray","iconName","Component","displayName"],"mappings":"oCAOA,MAKMA,aAAgBC,IACpB,MAAMC,EALY,CAACD,GAAWA,EAAOE,QACrC,wBACA,CAACC,EAAOC,EAAIC,IAAOA,EAAKA,EAAGC,cAAgBF,EAAGG,eAG5BC,CAAYR,GAC9B,OAAOC,EAAUQ,OAAO,GAAGH,cAAgBL,EAAUS,MAAM,IAEvDC,aAAe,IAAIC,IAAYA,EAAQC,OAAO,CAACC,EAAWC,EAAOC,IAC9DC,QAAQH,IAAmC,KAArBA,EAAUI,QAAiBF,EAAMG,QAAQL,KAAeC,GACpFK,KAAK,KAAKF,OACPG,YAAeC,IACnB,IAAK,MAAMC,KAAQD,EACjB,GAAIC,EAAKC,WAAW,UAAqB,SAATD,GAA4B,UAATA,EACjD,OAAO,GCfb,IAAIE,EAAoB,CACtBC,MAAO,6BACPC,MAAO,GACPC,OAAQ,GACRC,QAAS,YACTC,KAAM,OACNC,OAAQ,eACRC,YAAa,EACbC,cAAe,QACfC,eAAgB,SCLlB,MAAMC,EAAOC,EAAAA,WACX,EACEC,QAAQ,eACRC,OAAO,GACPN,cAAc,EACdO,sBACAzB,YAAY,GACZ0B,WACAC,cACGC,GACFC,IAAQC,EAAAA,cACT,MACA,CACED,SACGlB,EACHE,MAAOW,EACPV,OAAQU,EACRP,OAAQM,EACRL,YAAaO,EAA4C,GAAtBM,OAAOb,GAAoBa,OAAOP,GAAQN,EAC7ElB,UAAWH,aAAa,SAAUG,OAC9B0B,IAAanB,YAAYqB,IAAS,CAAE,cAAe,WACpDA,GAEL,IACKD,EAASK,IAAI,EAAEC,EAAKC,KAAWJ,EAAAA,cAAcG,EAAKC,OAClDC,MAAMC,QAAQV,GAAYA,EAAW,CAACA,+BCzBtB,CAACW,EAAUV,KAClC,MAAMW,EAAYhB,EAAAA,WAChB,EAAGtB,eAAcQ,GAASqB,KAAQC,SAAAA,cAAcT,EAAM,CACpDQ,MACAF,WACA3B,UAAWH,aACT,UHVaX,EGUSD,aAAaoD,GHVXnD,EAAOE,QAAQ,qBAAsB,SAASK,gBGWtE,UAAU4C,IACVrC,MAECQ,IHdW,IAACtB,IGkBnB,OADAoD,EAAUC,YAActD,aAAaoD,GAC9BC","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
"use strict";var e,r=require("react"),t={exports:{}},n={};var o,a,i={};function requireReactJsxRuntime_development(){return o||(o=1,"production"!==process.env.NODE_ENV&&function(){function getComponentNameFromType(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===g?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case a:return"Fragment";case s:return"Profiler";case c:return"StrictMode";case p:return"Suspense";case y:return"SuspenseList";case b:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case o:return"Portal";case u:return(e.displayName||"Context")+".Provider";case l:return(e._context.displayName||"Context")+".Consumer";case f:var r=e.render;return(e=e.displayName)||(e=""!==(e=r.displayName||r.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case m:return null!==(r=e.displayName||null)?r:getComponentNameFromType(e.type)||"Memo";case d:r=e._payload,e=e._init;try{return getComponentNameFromType(e(r))}catch(e){}}return null}function testStringCoercion(e){return""+e}function checkKeyStringCoercion(e){try{testStringCoercion(e);var r=!1}catch(e){r=!0}if(r){var t=(r=console).error,n="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),testStringCoercion(e)}}function getTaskName(e){if(e===a)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===d)return"<...>";try{var r=getComponentNameFromType(e);return r?"<"+r+">":"<...>"}catch(e){return"<...>"}}function UnknownOwner(){return Error("react-stack-top-frame")}function elementRefGetterWithDeprecationWarning(){var e=getComponentNameFromType(this.type);return h[e]||(h[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function jsxDEVImpl(r,t,o,a,i,c,s,l){var u,f=t.children;if(void 0!==f)if(a)if(S(f)){for(a=0;a<f.length;a++)validateChildKeys(f[a]);Object.freeze&&Object.freeze(f)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else validateChildKeys(f);if(k.call(t,"key")){f=getComponentNameFromType(r);var p=Object.keys(t).filter(function(e){return"key"!==e});a=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",_[f+a]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',a,f,p,f),_[f+a]=!0)}if(f=null,void 0!==o&&(checkKeyStringCoercion(o),f=""+o),function(e){if(k.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(t)&&(checkKeyStringCoercion(t.key),f=""+t.key),"key"in t)for(var y in o={},t)"key"!==y&&(o[y]=t[y]);else o=t;return f&&function(r,t){function warnAboutAccessingKey(){e||(e=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}warnAboutAccessingKey.isReactWarning=!0,Object.defineProperty(r,"key",{get:warnAboutAccessingKey,configurable:!0})}(o,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(e,r,t,o,a,i,c,s){return t=i.ref,e={$$typeof:n,type:e,key:r,props:i,_owner:a},null!==(void 0!==t?t:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:elementRefGetterWithDeprecationWarning}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:c}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(r,f,c,0,null===(u=v.A)?null:u.getOwner(),o,s,l)}function validateChildKeys(e){"object"==typeof e&&null!==e&&e.$$typeof===n&&e._store&&(e._store.validated=1)}var e,t=r,n=Symbol.for("react.transitional.element"),o=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),g=Symbol.for("react.client.reference"),v=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,S=Array.isArray,j=console.createTask?console.createTask:function(){return null},h={},w=(t={"react-stack-bottom-frame":function(e){return e()}})["react-stack-bottom-frame"].bind(t,UnknownOwner)(),O=j(getTaskName(UnknownOwner)),_={};i.Fragment=a,i.jsx=function(e,r,t,n,o){var a=1e4>v.recentlyCreatedOwnerStacks++;return jsxDEVImpl(e,r,t,!1,0,o,a?Error("react-stack-top-frame"):w,a?j(getTaskName(e)):O)},i.jsxs=function(e,r,t,n,o){var a=1e4>v.recentlyCreatedOwnerStacks++;return jsxDEVImpl(e,r,t,!0,0,o,a?Error("react-stack-top-frame"):w,a?j(getTaskName(e)):O)}}()),i}var c=(a||(a=1,"production"===process.env.NODE_ENV?t.exports=function(){if(e)return n;e=1;var r=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function jsxProd(e,t,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),"key"in t)for(var a in n={},t)"key"!==a&&(n[a]=t[a]);else n=t;return t=n.ref,{$$typeof:r,type:e,key:o,ref:void 0!==t?t:null,props:n}}return n.Fragment=t,n.jsx=jsxProd,n.jsxs=jsxProd,n}():t.exports=requireReactJsxRuntime_development()),t.exports);exports.jsxRuntimeExports=c;
|
|
2
|
+
//# sourceMappingURL=jsx-runtime-Bgd4cJfV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jsx-runtime-Bgd4cJfV.js","sources":["../../../node_modules/react/cjs/react-jsx-runtime.development.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/cjs/react-jsx-runtime.production.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n"],"names":["process","env","NODE_ENV","getComponentNameFromType","type","$$typeof","REACT_CLIENT_REFERENCE","displayName","name","REACT_FRAGMENT_TYPE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","tag","console","error","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","_context","REACT_FORWARD_REF_TYPE","innerType","render","REACT_MEMO_TYPE","REACT_LAZY_TYPE","_payload","_init","x","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","e","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","Symbol","toStringTag","constructor","call","getTaskName","UnknownOwner","Error","elementRefGetterWithDeprecationWarning","componentName","this","didWarnAboutElementRef","props","ref","jsxDEVImpl","config","maybeKey","isStaticChildren","source","self","debugStack","debugTask","dispatcher","children","isArrayImpl","length","validateChildKeys","Object","freeze","hasOwnProperty","keys","filter","k","join","didWarnAboutKeySpread","getter","getOwnPropertyDescriptor","get","isReactWarning","key","hasValidKey","propName","warnAboutAccessingKey","specialPropKeyWarningShown","defineProperty","configurable","defineKeyPropWarningGetter","owner","REACT_ELEMENT_TYPE","_owner","enumerable","_store","writable","ReactElement","ReactSharedInternals","A","getOwner","node","validated","React","require$$0","for","__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE","prototype","Array","isArray","createTask","unknownOwnerDebugStack","callStackForError","bind","unknownOwnerDebugTask","reactJsxRuntime_development","Fragment","jsx","trackActualOwner","recentlyCreatedOwnerStacks","jsxs","jsxRuntimeModule","exports","jsxProd","reactJsxRuntime_production","require$$1"],"mappings":"oIAWA,eAAiBA,QAAQC,IAAIC,UAC3B,WACE,SAASC,yBAAyBC,GAChC,GAAI,MAAQA,EAAM,OAAO,KACzB,GAAI,mBAAsBA,EACxB,OAAOA,EAAKC,WAAaC,EACrB,KACAF,EAAKG,aAAeH,EAAKI,MAAQ,KACvC,GAAI,iBAAoBJ,EAAM,OAAOA,EACrC,OAAQA,GACN,KAAKK,EACH,MAAO,WACT,KAAKC,EACH,MAAO,WACT,KAAKC,EACH,MAAO,aACT,KAAKC,EACH,MAAO,WACT,KAAKC,EACH,MAAO,eACT,KAAKC,EACH,MAAO,WAEX,GAAI,iBAAoBV,EACtB,OACG,iBAAoBA,EAAKW,KACxBC,QAAQC,MACN,qHAEJb,EAAKC,UAEL,KAAKa,EACH,MAAO,SACT,KAAKC,EACH,OAAQf,EAAKG,aAAe,WAAa,YAC3C,KAAKa,EACH,OAAQhB,EAAKiB,SAASd,aAAe,WAAa,YACpD,KAAKe,EACH,IAAIC,EAAYnB,EAAKoB,OAKrB,OAJApB,EAAOA,EAAKG,eAGTH,EAAO,MADNA,EAAOmB,EAAUhB,aAAegB,EAAUf,MAAQ,IAC9B,cAAgBJ,EAAO,IAAM,cAC9CA,EACT,KAAKqB,EACH,OAEE,QADCF,EAAYnB,EAAKG,aAAe,MAE7BgB,EACApB,yBAAyBC,EAAKA,OAAS,OAE/C,K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