@deckai/deck-ui 0.0.14 → 0.0.15

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.
Files changed (180) hide show
  1. package/README.md +18 -2
  2. package/dist/components/AboutCard.cjs +1 -1
  3. package/dist/components/AboutCard.cjs.map +1 -1
  4. package/dist/components/AboutCard.d.cts +12 -0
  5. package/dist/components/AboutCard.d.ts +12 -0
  6. package/dist/components/AboutCard.js +1 -1
  7. package/dist/components/AboutCard.js.map +1 -1
  8. package/dist/components/Accordion.cjs +1 -1
  9. package/dist/components/Accordion.d.cts +26 -0
  10. package/dist/components/Accordion.d.ts +26 -0
  11. package/dist/components/Accordion.js +1 -1
  12. package/dist/components/AddWorkCard.cjs +1 -1
  13. package/dist/components/AddWorkCard.d.cts +9 -0
  14. package/dist/components/AddWorkCard.d.ts +9 -0
  15. package/dist/components/AddWorkCard.js +1 -1
  16. package/dist/components/Avatar.cjs +1 -1
  17. package/dist/components/Avatar.d.cts +12 -0
  18. package/dist/components/Avatar.d.ts +12 -0
  19. package/dist/components/Avatar.js +1 -1
  20. package/dist/components/Badge.cjs +1 -1
  21. package/dist/components/Badge.d.cts +13 -0
  22. package/dist/components/Badge.d.ts +13 -0
  23. package/dist/components/Badge.js +1 -1
  24. package/dist/components/Breadcrumbs.cjs +1 -1
  25. package/dist/components/Breadcrumbs.d.cts +15 -0
  26. package/dist/components/Breadcrumbs.d.ts +15 -0
  27. package/dist/components/Breadcrumbs.js +1 -1
  28. package/dist/components/Button.cjs +1 -1
  29. package/dist/components/Button.d.cts +38 -0
  30. package/dist/components/Button.d.ts +38 -0
  31. package/dist/components/Button.js +1 -1
  32. package/dist/components/Carousel.cjs +1 -1
  33. package/dist/components/Carousel.d.cts +12 -0
  34. package/dist/components/Carousel.d.ts +12 -0
  35. package/dist/components/Carousel.js +1 -1
  36. package/dist/components/Collapsible.cjs +1 -1
  37. package/dist/components/Collapsible.d.cts +12 -0
  38. package/dist/components/Collapsible.d.ts +12 -0
  39. package/dist/components/Collapsible.js +1 -1
  40. package/dist/components/Combobox.cjs +1 -1
  41. package/dist/components/Combobox.d.cts +29 -0
  42. package/dist/components/Combobox.d.ts +29 -0
  43. package/dist/components/Combobox.js +1 -1
  44. package/dist/components/ContactItem.cjs +1 -1
  45. package/dist/components/ContactItem.d.cts +10 -0
  46. package/dist/components/ContactItem.d.ts +10 -0
  47. package/dist/components/ContactItem.js +1 -1
  48. package/dist/components/Dropdown.cjs +1 -1
  49. package/dist/components/Dropdown.d.cts +18 -0
  50. package/dist/components/Dropdown.d.ts +18 -0
  51. package/dist/components/Dropdown.js +1 -1
  52. package/dist/components/EditButton.cjs +1 -1
  53. package/dist/components/EditButton.d.cts +12 -0
  54. package/dist/components/EditButton.d.ts +12 -0
  55. package/dist/components/EditButton.js +1 -1
  56. package/dist/components/Icon.cjs +1 -1
  57. package/dist/components/Icon.d.cts +19 -0
  58. package/dist/components/Icon.d.ts +19 -0
  59. package/dist/components/Icon.js +1 -1
  60. package/dist/components/IconRenderer.cjs +1 -1
  61. package/dist/components/IconRenderer.d.cts +13 -0
  62. package/dist/components/IconRenderer.d.ts +13 -0
  63. package/dist/components/IconRenderer.js +1 -1
  64. package/dist/components/Illustration.cjs +1 -1
  65. package/dist/components/Illustration.d.cts +10 -0
  66. package/dist/components/Illustration.d.ts +10 -0
  67. package/dist/components/Illustration.js +1 -1
  68. package/dist/components/Input.cjs +1 -1
  69. package/dist/components/Input.d.cts +20 -0
  70. package/dist/components/Input.d.ts +20 -0
  71. package/dist/components/Input.js +1 -1
  72. package/dist/components/Link.cjs +1 -1
  73. package/dist/components/Link.d.cts +13 -0
  74. package/dist/components/Link.d.ts +13 -0
  75. package/dist/components/Link.js +1 -1
  76. package/dist/components/Logo.cjs +1 -1
  77. package/dist/components/Logo.d.cts +8 -0
  78. package/dist/components/Logo.d.ts +8 -0
  79. package/dist/components/Logo.js +1 -1
  80. package/dist/components/MultiSelectCombobox.cjs +1 -1
  81. package/dist/components/MultiSelectCombobox.d.cts +25 -0
  82. package/dist/components/MultiSelectCombobox.d.ts +25 -0
  83. package/dist/components/MultiSelectCombobox.js +1 -1
  84. package/dist/components/Navbar.cjs +1 -1
  85. package/dist/components/Navbar.d.cts +22 -0
  86. package/dist/components/Navbar.d.ts +22 -0
  87. package/dist/components/Navbar.js +1 -1
  88. package/dist/components/NavbarItem.cjs +1 -1
  89. package/dist/components/NavbarItem.d.cts +13 -0
  90. package/dist/components/NavbarItem.d.ts +13 -0
  91. package/dist/components/NavbarItem.js +1 -1
  92. package/dist/components/Option.cjs +1 -1
  93. package/dist/components/Option.d.cts +16 -0
  94. package/dist/components/Option.d.ts +16 -0
  95. package/dist/components/Option.js +1 -1
  96. package/dist/components/Pressable.cjs +1 -1
  97. package/dist/components/Pressable.d.cts +6 -0
  98. package/dist/components/Pressable.d.ts +6 -0
  99. package/dist/components/Pressable.js +1 -1
  100. package/dist/components/ProfileCard.cjs +1 -1
  101. package/dist/components/ProfileCard.cjs.map +1 -1
  102. package/dist/components/ProfileCard.d.cts +17 -0
  103. package/dist/components/ProfileCard.d.ts +17 -0
  104. package/dist/components/ProfileCard.js +1 -1
  105. package/dist/components/ProfileCard.js.map +1 -1
  106. package/dist/components/ProgressBar.cjs +1 -1
  107. package/dist/components/ProgressBar.d.cts +21 -0
  108. package/dist/components/ProgressBar.d.ts +21 -0
  109. package/dist/components/ProgressBar.js +1 -1
  110. package/dist/components/SegmentedTabs.cjs +1 -1
  111. package/dist/components/SegmentedTabs.d.cts +16 -0
  112. package/dist/components/SegmentedTabs.d.ts +16 -0
  113. package/dist/components/SegmentedTabs.js +1 -1
  114. package/dist/components/Sidebar.cjs +1 -1
  115. package/dist/components/Sidebar.d.cts +37 -0
  116. package/dist/components/Sidebar.d.ts +37 -0
  117. package/dist/components/Sidebar.js +1 -1
  118. package/dist/components/SlideButton.cjs +3 -0
  119. package/dist/components/SlideButton.cjs.map +1 -0
  120. package/dist/components/SlideButton.d.cts +21 -0
  121. package/dist/components/SlideButton.d.ts +21 -0
  122. package/dist/components/SlideButton.js +3 -0
  123. package/dist/components/SlideButton.js.map +1 -0
  124. package/dist/components/SocialCard.cjs +1 -1
  125. package/dist/components/SocialCard.d.cts +12 -0
  126. package/dist/components/SocialCard.d.ts +12 -0
  127. package/dist/components/SocialCard.js +1 -1
  128. package/dist/components/Spinner.cjs +1 -1
  129. package/dist/components/Spinner.d.cts +54 -0
  130. package/dist/components/Spinner.d.ts +54 -0
  131. package/dist/components/Spinner.js +1 -1
  132. package/dist/components/Switch.cjs +1 -1
  133. package/dist/components/Switch.d.cts +13 -0
  134. package/dist/components/Switch.d.ts +13 -0
  135. package/dist/components/Switch.js +1 -1
  136. package/dist/components/Tabs.cjs +1 -1
  137. package/dist/components/Tabs.d.cts +17 -0
  138. package/dist/components/Tabs.d.ts +17 -0
  139. package/dist/components/Tabs.js +1 -1
  140. package/dist/components/Tag.cjs +1 -1
  141. package/dist/components/Tag.d.cts +12 -0
  142. package/dist/components/Tag.d.ts +12 -0
  143. package/dist/components/Tag.js +1 -1
  144. package/dist/components/Text.cjs +1 -1
  145. package/dist/components/Text.d.cts +42 -0
  146. package/dist/components/Text.d.ts +42 -0
  147. package/dist/components/Text.js +1 -1
  148. package/dist/components/TextArea.cjs +1 -1
  149. package/dist/components/TextArea.d.cts +19 -0
  150. package/dist/components/TextArea.d.ts +19 -0
  151. package/dist/components/TextArea.js +1 -1
  152. package/dist/components/Toast.cjs +1 -1
  153. package/dist/components/Toast.d.cts +35 -0
  154. package/dist/components/Toast.d.ts +35 -0
  155. package/dist/components/Toast.js +1 -1
  156. package/dist/components/ToastProvider.cjs +1 -1
  157. package/dist/components/ToastProvider.d.cts +8 -0
  158. package/dist/components/ToastProvider.d.ts +8 -0
  159. package/dist/components/ToastProvider.js +1 -1
  160. package/dist/components/Tooltip.cjs +1 -1
  161. package/dist/components/Tooltip.d.cts +16 -0
  162. package/dist/components/Tooltip.d.ts +16 -0
  163. package/dist/components/Tooltip.js +1 -1
  164. package/dist/components/WorkCard.cjs +1 -1
  165. package/dist/components/WorkCard.d.cts +14 -0
  166. package/dist/components/WorkCard.d.ts +14 -0
  167. package/dist/components/WorkCard.js +1 -1
  168. package/dist/index.cjs +2 -2
  169. package/dist/index.cjs.map +1 -1
  170. package/dist/index.d.cts +191 -0
  171. package/dist/index.d.ts +191 -0
  172. package/dist/index.js +2 -2
  173. package/dist/index.js.map +1 -1
  174. package/dist/styles/fonts.d.cts +2 -0
  175. package/dist/styles/fonts.d.ts +2 -0
  176. package/dist/styles/styles.d.cts +2 -0
  177. package/dist/styles/styles.d.ts +2 -0
  178. package/dist/tailwind-CuJn6tv4.d.cts +36 -0
  179. package/dist/tailwind-CuJn6tv4.d.ts +36 -0
  180. package/package.json +15 -16
package/README.md CHANGED
@@ -88,6 +88,22 @@ import type { Config } from "tailwindcss";
88
88
 
89
89
  See NextJS [docs](https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#with-tailwind-css) for more options.
90
90
 
91
+ ## with typescript
92
+
93
+ To use `deck-ui` with typescript, you'll need to add the following to your `tsconfig.json` file:
94
+
95
+ ```json
96
+ {
97
+ "compilerOptions": {
98
+ "paths": {
99
+ "@deckai/deck-ui": ["./node_modules/@deckai/deck-ui/dist/index.d.ts"],
100
+ "@deckai/deck-ui/*": ["./node_modules/@deckai/deck-ui/dist/*"]
101
+ }
102
+ },
103
+ "include": ["node_modules/@deckai/deck-ui/dist/**/*.d.ts"]
104
+ }
105
+ ```
106
+
91
107
  ## next config
92
108
 
93
109
  Update your `next.config.ts` to automatically transpile the `deck-ui` package.
@@ -106,10 +122,10 @@ export default nextConfig;
106
122
 
107
123
  ## using components
108
124
 
109
- next will handle all the tree shaking for you, so just import components from `@deckai/deck-ui/components/<COMPONENT>` directly.
125
+ next will handle all the tree shaking for you, so just import components from `@deckai/deck-ui` directly.
110
126
 
111
127
  ```ts
112
- import { Button } from "@deckai/deck-ui/components/Button";
128
+ import { Button } from "@deckai/deck-ui";
113
129
  ```
114
130
 
115
131
  ### Server Components Compatibility
@@ -1,2 +1,2 @@
1
- 'use strict';var a=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),y=require('@radix-ui/react-collapsible');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var a__default=/*#__PURE__*/_interopDefault(a);var y__namespace=/*#__PURE__*/_interopNamespace(y);var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},R=e=>{let[r,t]=e.split("-");return r==="heading"?A[t]||"p":r==="label"?"label":"p"},$={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[o,n]=t.split(":");return `${o}:text-${n}`}return `text-${t}`}).join(" "):"text-body-default",p=a__default.default.forwardRef(({variant:e="body-default",color:r="primary",as:t,className:o,children:n,weight:i,...s},m)=>{let d=P(e),b=r==="inherit"?"text-inherit":`text-text-${r}`,f=a__default.default.useMemo(()=>{let C=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return R(C)},[e]);return a__default.default.createElement(t||f,{ref:m,className:`font-sans antialiased ${d} ${b} ${i?`!${$[i]}`:""} ${o??""}`,...s},n)});p.displayName="Text";var h=({icon:e,size:r=40,className:t})=>{let o=a.useMemo(()=>{let s=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg");if(!s)return null;s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("preserveAspectRatio","xMidYMid meet");let m=s.getAttribute("viewBox")||"0 0 40 40";return s.setAttribute("viewBox",m),s.outerHTML},[e]);return o?a__default.default.createElement("div",{style:{width:r,height:r,display:"flex",alignItems:"center",justifyContent:"center"},className:t,dangerouslySetInnerHTML:{__html:o}}):null};h.displayName="IconRenderer";function c(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var u="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var L=({children:e,color:r="inherit",variant:t="body-default-semibold",href:o,className:n,...i})=>a__default.default.createElement(p,{variant:t,color:r},a__default.default.createElement("a",{href:o,className:c("hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline",u,n),...i},e));var E=({icon:e,children:r,href:t,...o})=>a__default.default.createElement("div",{className:"row gap-2 flex items-center"},a__default.default.createElement("div",{className:"bg-secondary-400 rounded-full p-2.5 items-center justify-center"},a__default.default.createElement(h,{icon:e,size:18,className:"text-text"})),a__default.default.createElement(L,{className:"hover:underline",href:t,...o,variant:["body-default-semibold","md:body-default-semibold"]},r));var x=a__default.default.forwardRef(({children:e,type:r="button",className:t,disabled:o,...n},i)=>a__default.default.createElement("button",{ref:i,type:r,disabled:o,className:c("appearance-none hover:opacity-80 transition-all active:scale-95",u,o&&"opacity-50 cursor-not-allowed",t),...n},e));x.displayName="Pressable";var H=({children:e,maxHeight:r=100})=>{let[t,o]=a__default.default.useState(!1),n=a.useRef(null),[i,s]=a.useState(r);a.useLayoutEffect(()=>{if(!n.current)return;let d=new ResizeObserver(b=>{for(let f of b)s(f.target.scrollHeight);});return d.observe(n.current),()=>d.disconnect()},[]);let m=i>r;return a__default.default.createElement(y__namespace.Root,{open:t,onOpenChange:o},a__default.default.createElement("div",{className:"relative"},a__default.default.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:t?`${i}px`:`${r}px`}},a__default.default.createElement("div",{ref:n,className:"w-full"},e)),m&&a__default.default.createElement(y__namespace.Trigger,{asChild:!0},a__default.default.createElement(x,{className:c("absolute -bottom-8 left-0 right-0","flex items-end justify-center","h-16 pt-8 pb-2",!t&&"bg-gradient-to-b from-transparent via-white to-white","hover:opacity-100 transition-opacity")},a__default.default.createElement(p,{variant:"label-default",color:"secondary"},t?"See less":"See more")))))};H.displayName="Collapsible";var he=({interests:e,contactItems:r,description:t,isEditMode:o=!1,onEditClick:n,...i})=>a__default.default.createElement("div",{className:"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4",...i},a__default.default.createElement("div",{className:"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center"},a__default.default.createElement(H,{maxHeight:120},a__default.default.createElement(p,{variant:"body-default"},t))),a__default.default.createElement("span",{className:"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10"}),a__default.default.createElement("span",{className:"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10"}),a__default.default.createElement("div",{className:"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8"},r.map(s=>a__default.default.createElement(E,{key:s.title,...s}))));if (exports.default) module.exports = exports.default;exports.AboutCard=he;//# sourceMappingURL=AboutCard.cjs.map
1
+ 'use strict';var a=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),y=require('@radix-ui/react-collapsible');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var a__default=/*#__PURE__*/_interopDefault(a);var y__namespace=/*#__PURE__*/_interopNamespace(y);var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},R=e=>{let[t,r]=e.split("-");return t==="heading"?A[r]||"p":t==="label"?"label":"p"},$={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[o,s]=r.split(":");return `${o}:text-${s}`}return `text-${r}`}).join(" "):"text-body-default",p=a__default.default.forwardRef(({variant:e="body-default",color:t="primary",as:r,className:o,children:s,weight:n,...i},m)=>{let d=P(e),b=t==="inherit"?"text-inherit":`text-text-${t}`,f=a__default.default.useMemo(()=>{let C=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return R(C)},[e]);return a__default.default.createElement(r||f,{ref:m,className:`font-sans antialiased ${d} ${b} ${n?`!${$[n]}`:""} ${o??""}`,...i},s)});p.displayName="Text";var h=({icon:e,size:t=40,className:r})=>{let o=a.useMemo(()=>{let i=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg");if(!i)return null;i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("preserveAspectRatio","xMidYMid meet");let m=i.getAttribute("viewBox")||"0 0 40 40";return i.setAttribute("viewBox",m),i.outerHTML},[e]);return o?a__default.default.createElement("div",{style:{width:t,height:t,display:"flex",alignItems:"center",justifyContent:"center"},className:r,dangerouslySetInnerHTML:{__html:o}}):null};h.displayName="IconRenderer";function c(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var u="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var L=({children:e,color:t="inherit",variant:r="body-default-semibold",href:o,className:s,...n})=>a__default.default.createElement(p,{variant:r,color:t},a__default.default.createElement("a",{href:o,className:c("hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline",u,s),...n},e));var E=({icon:e,children:t,href:r,...o})=>a__default.default.createElement("div",{className:"row gap-2 flex items-center"},a__default.default.createElement("div",{className:"bg-secondary-400 rounded-full p-2.5 items-center justify-center"},a__default.default.createElement(h,{icon:e,size:18,className:"text-text"})),a__default.default.createElement(L,{className:"hover:underline",href:r,...o,variant:["body-default-semibold","md:body-default-semibold"]},t));var x=a__default.default.forwardRef(({children:e,type:t="button",className:r,disabled:o,...s},n)=>a__default.default.createElement("button",{ref:n,type:t,disabled:o,className:c("appearance-none hover:opacity-80 transition-all active:scale-95",u,o&&"opacity-50 cursor-not-allowed",r),...s},e));x.displayName="Pressable";var H=({children:e,maxHeight:t=100})=>{let[r,o]=a__default.default.useState(!1),s=a.useRef(null),[n,i]=a.useState(t);a.useLayoutEffect(()=>{if(!s.current)return;let d=new ResizeObserver(b=>{for(let f of b)i(f.target.scrollHeight);});return d.observe(s.current),()=>d.disconnect()},[]);let m=n>t;return a__default.default.createElement(y__namespace.Root,{open:r,onOpenChange:o},a__default.default.createElement("div",{className:"relative"},a__default.default.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:r?`${n}px`:`${t}px`}},a__default.default.createElement("div",{ref:s,className:"w-full"},e)),m&&a__default.default.createElement(y__namespace.Trigger,{asChild:!0},a__default.default.createElement(x,{className:c("absolute -bottom-8 left-0 right-0","flex items-end justify-center","h-16 pt-8 pb-2",!r&&"bg-gradient-to-b from-transparent via-white to-white","hover:opacity-100 transition-opacity")},a__default.default.createElement(p,{variant:"label-default",color:"secondary"},r?"See less":"See more")))))};H.displayName="Collapsible";var he=({contactItems:e,description:t,isEditMode:r=!1,onEditClick:o,...s})=>a__default.default.createElement("div",{className:"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4",...s},a__default.default.createElement("div",{className:"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center"},a__default.default.createElement(H,{maxHeight:120},a__default.default.createElement(p,{variant:"body-default"},t))),a__default.default.createElement("span",{className:"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10"}),a__default.default.createElement("span",{className:"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10"}),a__default.default.createElement("div",{className:"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8"},e.map(n=>a__default.default.createElement(E,{key:n.title,...n}))));exports.AboutCard=he;//# sourceMappingURL=AboutCard.cjs.map
2
2
  //# sourceMappingURL=AboutCard.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/Text.tsx","../../src/components/IconRenderer.tsx","../../src/components/Link.tsx","../../src/utils/index.ts","../../src/utils/tailwind.ts","../../src/components/ContactItem.tsx","../../src/components/Pressable.tsx","../../src/components/Collapsible.tsx","../../src/components/AboutCard.tsx"],"names":["HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","size","fontWeight","processVariants","variants","breakpoint","typographyClass","Text","React","color","as","className","children","weight","props","ref","typographyClasses","colorClasses","suggestedElement","baseVariant","IconRenderer","icon","sanitizedSvg","useMemo","svg","viewBox","cn","inputs","twMerge","clsx","focusRingStyles","Link","href","ContactItem","linkProps","Pressable","type","disabled","Collapsible","maxHeight","open","setOpen","contentRef","useRef","contentHeight","setContentHeight","useState","useLayoutEffect","resizeObserver","entries","entry","shouldShowTrigger","y","AboutCard","interests","contactItems","description","isEditMode","onEditClick","contactProps"],"mappings":"gmBAsEA,IAAMA,EAAmD,CACvD,EAAA,CAAI,IACJ,CAAA,EAAA,CAAI,KACJ,EAAI,CAAA,IAAA,CACJ,GAAI,IACJ,CAAA,EAAA,CAAI,IACN,CAEMC,CAAAA,CAAAA,CAAyBC,CAAwC,EAAA,CACrE,GAAM,CAACC,CAAAA,CAAUC,CAAI,CAAIF,CAAAA,CAAAA,CAAQ,MAAM,GAAG,CAAA,CAE1C,OAAIC,CAAa,GAAA,SAAA,CACRH,EAAoBI,CAAI,CAAA,EAAK,IAGlCD,CAAa,GAAA,OAAA,CACR,QAGF,GACT,CAAA,CAIME,CAAqC,CAAA,CACzC,MAAO,YACP,CAAA,OAAA,CAAS,eACT,QAAU,CAAA,eAAA,CACV,KAAM,WACR,CAAA,CA0BMC,EACJC,CAEKA,EAAAA,CAAAA,CAAAA,CAEgB,MAAM,OAAQA,CAAAA,CAAQ,EAAIA,CAAW,CAAA,CAACA,CAAQ,CAGhE,EAAA,GAAA,CAAKL,CAAY,EAAA,CAChB,GAAIA,CAAQ,CAAA,QAAA,CAAS,GAAG,CAAG,CAAA,CACzB,GAAM,CAACM,CAAAA,CAAYC,CAAe,CAAI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,CAAa,IAAKI,CACjBnD,EAAAA,kBAAAA,CAAA,cAACyB,CAAA,CAAA,CAAY,IAAK0B,CAAa,CAAA,KAAA,CAAQ,GAAGA,CAAc,CAAA,CACzD,CACH,CACF","file":"AboutCard.cjs","sourcesContent":["import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { useMemo } from \"react\";\n\nexport type IconRendererProps = {\n icon: string;\n size?: number;\n className?: string;\n};\n\nexport const IconRenderer = ({\n icon,\n size = 40,\n className\n}: IconRendererProps) => {\n const sanitizedSvg = useMemo(() => {\n const parser = new DOMParser();\n const doc = parser.parseFromString(icon, \"image/svg+xml\");\n const svg = doc.querySelector(\"svg\");\n\n if (!svg) return null;\n\n // Set size attributes but preserve aspect ratio\n svg.setAttribute(\"width\", \"100%\");\n svg.setAttribute(\"height\", \"100%\");\n svg.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n // Get the original viewBox or use the default\n const viewBox = svg.getAttribute(\"viewBox\") || \"0 0 40 40\";\n svg.setAttribute(\"viewBox\", viewBox);\n\n return svg.outerHTML;\n }, [icon]);\n\n if (!sanitizedSvg) return null;\n\n return (\n <div\n style={{\n width: size,\n height: size,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n }}\n className={className}\n dangerouslySetInnerHTML={{ __html: sanitizedSvg }}\n />\n );\n};\n\nIconRenderer.displayName = \"IconRenderer\";\n","import React from \"react\";\nimport { Text, TextProps } from \"./Text\";\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type LinkProps = {\n href: string;\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n} & Pick<TextProps, \"variant\" | \"color\"> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport const Link = ({\n children,\n color = \"inherit\",\n variant = \"body-default-semibold\",\n href,\n className,\n ...props\n}: LinkProps) => (\n <Text variant={variant} color={color}>\n <a\n href={href}\n className={cn(\n \"hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline\",\n focusRingStyles,\n className\n )}\n {...props}\n >\n {children}\n </a>\n </Text>\n);\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { HTMLAttributes } from \"react\";\nimport { IconRenderer } from \"./IconRenderer\";\nimport { Link } from \"./Link\";\n\nexport type ContactItemProps = {\n // TODO: figure out how to get filled icons to work correctly\n icon: string;\n children: React.ReactNode;\n href: string;\n} & Omit<HTMLAttributes<HTMLAnchorElement>, \"color\">;\n\nexport const ContactItem = ({\n icon,\n children,\n href,\n ...linkProps\n}: ContactItemProps) => (\n <div className=\"row gap-2 flex items-center\">\n <div className=\"bg-secondary-400 rounded-full p-2.5 items-center justify-center\">\n <IconRenderer icon={icon} size={18} className=\"text-text\" />\n </div>\n <Link\n className=\"hover:underline\"\n href={href}\n {...linkProps}\n variant={[\"body-default-semibold\", \"md:body-default-semibold\"]}\n >\n {children}\n </Link>\n </div>\n);\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React, { useRef, useLayoutEffect, useState } from \"react\";\nimport * as RadixCollapsible from \"@radix-ui/react-collapsible\";\nimport { Pressable } from \"./Pressable\";\nimport { Text } from \"./Text\";\nimport { cn } from \"../utils\";\n\nexport type CollapsibleProps = {\n children: React.ReactNode;\n maxHeight?: number;\n};\n\nexport const Collapsible = ({\n children,\n maxHeight = 100\n}: CollapsibleProps) => {\n const [open, setOpen] = React.useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const [contentHeight, setContentHeight] = useState<number>(maxHeight);\n\n // Measure content height on mount and resize\n useLayoutEffect(() => {\n if (!contentRef.current) return;\n\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setContentHeight(entry.target.scrollHeight);\n }\n });\n\n resizeObserver.observe(contentRef.current);\n return () => resizeObserver.disconnect();\n }, []);\n\n const shouldShowTrigger = contentHeight > maxHeight;\n\n return (\n <RadixCollapsible.Root open={open} onOpenChange={setOpen}>\n <div className=\"relative\">\n <div\n className=\"overflow-hidden transition-[height] duration-300 ease-in-out\"\n style={{\n height: open ? `${contentHeight}px` : `${maxHeight}px`\n }}\n >\n <div ref={contentRef} className=\"w-full\">\n {children}\n </div>\n </div>\n\n {shouldShowTrigger && (\n <RadixCollapsible.Trigger asChild>\n <Pressable\n className={cn(\n \"absolute -bottom-8 left-0 right-0\",\n \"flex items-end justify-center\",\n \"h-16 pt-8 pb-2\",\n !open && \"bg-gradient-to-b from-transparent via-white to-white\",\n \"hover:opacity-100 transition-opacity\"\n )}\n >\n <Text variant=\"label-default\" color=\"secondary\">\n {open ? \"See less\" : \"See more\"}\n </Text>\n </Pressable>\n </RadixCollapsible.Trigger>\n )}\n </div>\n </RadixCollapsible.Root>\n );\n};\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport { Text } from \"./Text\";\nimport { ContactItem, ContactItemProps } from \"./ContactItem\";\nimport { EditButton } from \"./EditButton\";\nimport { Collapsible } from \"./Collapsible\";\n\nexport type AboutCardProps = {\n interests: string[];\n contactItems: ContactItemProps[];\n description: string;\n isEditMode?: boolean;\n onEditClick?: () => void;\n};\n\nexport const AboutCard = ({\n interests,\n contactItems,\n description,\n isEditMode = false,\n onEditClick,\n ...props\n}: AboutCardProps) => (\n <div\n className=\"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4\"\n {...props}\n >\n <div className=\"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center\">\n <Collapsible maxHeight={120}>\n <Text variant=\"body-default\">{description}</Text>\n </Collapsible>\n </div>\n {/* vertical divider for desktop */}\n <span className=\"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10\" />\n {/* horizontal divider for mobile */}\n <span className=\"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10\" />\n <div className=\"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8\">\n {contactItems.map((contactProps) => (\n <ContactItem key={contactProps.title} {...contactProps} />\n ))}\n </div>\n </div>\n);\n"]}
1
+ {"version":3,"sources":["../../src/components/Text.tsx","../../src/components/IconRenderer.tsx","../../src/utils/index.ts","../../src/utils/tailwind.ts","../../src/components/Link.tsx","../../src/components/ContactItem.tsx","../../src/components/Collapsible.tsx","../../src/components/Pressable.tsx","../../src/components/AboutCard.tsx"],"names":["HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","size","fontWeight","processVariants","variants","breakpoint","typographyClass","Text","React","color","as","className","children","weight","props","ref","typographyClasses","colorClasses","suggestedElement","baseVariant","IconRenderer","icon","sanitizedSvg","useMemo","svg","viewBox","cn","inputs","twMerge","clsx","focusRingStyles","Link","href","ContactItem","linkProps","Pressable","type","disabled","Collapsible","maxHeight","open","setOpen","contentRef","useRef","contentHeight","setContentHeight","useState","useLayoutEffect","resizeObserver","entries","entry","shouldShowTrigger","y","AboutCard","contactItems","description","isEditMode","onEditClick","contactProps"],"mappings":"gmBAsEA,IAAMA,EAAmD,CACvD,EAAA,CAAI,IACJ,CAAA,EAAA,CAAI,KACJ,EAAI,CAAA,IAAA,CACJ,GAAI,IACJ,CAAA,EAAA,CAAI,IACN,CAEMC,CAAAA,CAAAA,CAAyBC,CAAwC,EAAA,CACrE,GAAM,CAACC,CAAAA,CAAUC,CAAI,CAAIF,CAAAA,CAAAA,CAAQ,MAAM,GAAG,CAAA,CAE1C,OAAIC,CAAa,GAAA,SAAA,CACRH,EAAoBI,CAAI,CAAA,EAAK,IAGlCD,CAAa,GAAA,OAAA,CACR,QAGF,GACT,CAAA,CAIME,CAAqC,CAAA,CACzC,MAAO,YACP,CAAA,OAAA,CAAS,eACT,QAAU,CAAA,eAAA,CACV,KAAM,WACR,CAAA,CA0BMC,EACJC,CAEKA,EAAAA,CAAAA,CAAAA,CAEgB,MAAM,OAAQA,CAAAA,CAAQ,EAAIA,CAAW,CAAA,CAACA,CAAQ,CAGhE,EAAA,GAAA,CAAKL,CAAY,EAAA,CAChB,GAAIA,CAAQ,CAAA,QAAA,CAAS,GAAG,CAAG,CAAA,CACzB,GAAM,CAACM,CAAAA,CAAYC,CAAe,CAAIP,CAAAA,CAAAA,CAAQ,MAAM,GAAG,CAAA,CACvD,OAAO,CAAGM,EAAAA,CAAU,SAASC,CAAe,CAAA,CAC9C,CACA,OAAO,QAAQP,CAAO,CAAA,CACxB,CAAC,CACA,CAAA,IAAA,CAAK,GAAG,CAZW,CAAA,mBAAA,CAeXQ,CAAOC,CAAAA,kBAAAA,CAAM,WACxB,CACE,CACE,QAAAT,CAAU,CAAA,cAAA,CACV,MAAAU,CAAQ,CAAA,S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,UAAA,CAAa,UACvB,CACF,CACF,CAEJ,CACF,CAEJ,EAEAF,CAAY,CAAA,WAAA,CAAc,cE3Dbe,IAAAA,EAAAA,CAAY,CAAC,CACxB,YAAA,CAAAC,EACA,WAAAC,CAAAA,CAAAA,CACA,UAAAC,CAAAA,CAAAA,CAAa,GACb,WAAAC,CAAAA,CAAAA,CACA,GAAG3C,CACL,CAAA,GACEN,mBAAA,aAAC,CAAA,KAAA,CAAA,CACC,UAAU,iGACT,CAAA,GAAGM,GAEJN,kBAAA,CAAA,aAAA,CAAC,OAAI,SAAU,CAAA,kFAAA,CAAA,CACbA,mBAAA,aAAC8B,CAAAA,CAAAA,CAAA,CAAY,SAAA,CAAW,KACtB9B,kBAAA,CAAA,aAAA,CAACD,EAAA,CAAK,OAAA,CAAQ,gBAAgBgD,CAAY,CAC5C,CACF,CAEA/C,CAAAA,kBAAAA,CAAA,cAAC,MAAK,CAAA,CAAA,SAAA,CAAU,0EAA0E,CAE1FA,CAAAA,kBAAAA,CAAA,cAAC,MAAK,CAAA,CAAA,SAAA,CAAU,2DAA4D,CAAA,CAAA,CAC5EA,mBAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,2CACZ8C,CAAAA,CAAAA,CAAAA,CAAa,IAAKI,CACjBlD,EAAAA,kBAAAA,CAAA,cAACyB,CAAA,CAAA,CAAY,IAAKyB,CAAa,CAAA,KAAA,CAAQ,GAAGA,CAAc,CAAA,CACzD,CACH,CACF","file":"AboutCard.cjs","sourcesContent":["import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { useMemo } from \"react\";\n\nexport type IconRendererProps = {\n icon: string;\n size?: number;\n className?: string;\n};\n\nexport const IconRenderer = ({\n icon,\n size = 40,\n className\n}: IconRendererProps) => {\n const sanitizedSvg = useMemo(() => {\n const parser = new DOMParser();\n const doc = parser.parseFromString(icon, \"image/svg+xml\");\n const svg = doc.querySelector(\"svg\");\n\n if (!svg) return null;\n\n // Set size attributes but preserve aspect ratio\n svg.setAttribute(\"width\", \"100%\");\n svg.setAttribute(\"height\", \"100%\");\n svg.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n // Get the original viewBox or use the default\n const viewBox = svg.getAttribute(\"viewBox\") || \"0 0 40 40\";\n svg.setAttribute(\"viewBox\", viewBox);\n\n return svg.outerHTML;\n }, [icon]);\n\n if (!sanitizedSvg) return null;\n\n return (\n <div\n style={{\n width: size,\n height: size,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n }}\n className={className}\n dangerouslySetInnerHTML={{ __html: sanitizedSvg }}\n />\n );\n};\n\nIconRenderer.displayName = \"IconRenderer\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React from \"react\";\nimport { Text, TextProps } from \"./Text\";\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type LinkProps = {\n href: string;\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n} & Pick<TextProps, \"variant\" | \"color\"> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport const Link = ({\n children,\n color = \"inherit\",\n variant = \"body-default-semibold\",\n href,\n className,\n ...props\n}: LinkProps) => (\n <Text variant={variant} color={color}>\n <a\n href={href}\n className={cn(\n \"hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline\",\n focusRingStyles,\n className\n )}\n {...props}\n >\n {children}\n </a>\n </Text>\n);\n","import React, { HTMLAttributes } from \"react\";\nimport { IconRenderer } from \"./IconRenderer\";\nimport { Link } from \"./Link\";\n\nexport type ContactItemProps = {\n // TODO: figure out how to get filled icons to work correctly\n icon: string;\n children: React.ReactNode;\n href: string;\n} & Omit<HTMLAttributes<HTMLAnchorElement>, \"color\">;\n\nexport const ContactItem = ({\n icon,\n children,\n href,\n ...linkProps\n}: ContactItemProps) => (\n <div className=\"row gap-2 flex items-center\">\n <div className=\"bg-secondary-400 rounded-full p-2.5 items-center justify-center\">\n <IconRenderer icon={icon} size={18} className=\"text-text\" />\n </div>\n <Link\n className=\"hover:underline\"\n href={href}\n {...linkProps}\n variant={[\"body-default-semibold\", \"md:body-default-semibold\"]}\n >\n {children}\n </Link>\n </div>\n);\n","import React, { useRef, useLayoutEffect, useState } from \"react\";\nimport * as RadixCollapsible from \"@radix-ui/react-collapsible\";\nimport { Pressable } from \"./Pressable\";\nimport { Text } from \"./Text\";\nimport { cn } from \"../utils\";\n\nexport type CollapsibleProps = {\n children: React.ReactNode;\n maxHeight?: number;\n};\n\nexport const Collapsible = ({\n children,\n maxHeight = 100\n}: CollapsibleProps) => {\n const [open, setOpen] = React.useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const [contentHeight, setContentHeight] = useState<number>(maxHeight);\n\n // Measure content height on mount and resize\n useLayoutEffect(() => {\n if (!contentRef.current) return;\n\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setContentHeight(entry.target.scrollHeight);\n }\n });\n\n resizeObserver.observe(contentRef.current);\n return () => resizeObserver.disconnect();\n }, []);\n\n const shouldShowTrigger = contentHeight > maxHeight;\n\n return (\n <RadixCollapsible.Root open={open} onOpenChange={setOpen}>\n <div className=\"relative\">\n <div\n className=\"overflow-hidden transition-[height] duration-300 ease-in-out\"\n style={{\n height: open ? `${contentHeight}px` : `${maxHeight}px`\n }}\n >\n <div ref={contentRef} className=\"w-full\">\n {children}\n </div>\n </div>\n\n {shouldShowTrigger && (\n <RadixCollapsible.Trigger asChild>\n <Pressable\n className={cn(\n \"absolute -bottom-8 left-0 right-0\",\n \"flex items-end justify-center\",\n \"h-16 pt-8 pb-2\",\n !open && \"bg-gradient-to-b from-transparent via-white to-white\",\n \"hover:opacity-100 transition-opacity\"\n )}\n >\n <Text variant=\"label-default\" color=\"secondary\">\n {open ? \"See less\" : \"See more\"}\n </Text>\n </Pressable>\n </RadixCollapsible.Trigger>\n )}\n </div>\n </RadixCollapsible.Root>\n );\n};\n\nCollapsible.displayName = \"Collapsible\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React from \"react\";\nimport { Text } from \"./Text\";\nimport { ContactItem, ContactItemProps } from \"./ContactItem\";\nimport { Collapsible } from \"./Collapsible\";\n\nexport type AboutCardProps = {\n contactItems: ContactItemProps[];\n description: string;\n isEditMode?: boolean;\n onEditClick?: () => void;\n};\n\nexport const AboutCard = ({\n contactItems,\n description,\n isEditMode = false,\n onEditClick,\n ...props\n}: AboutCardProps) => (\n <div\n className=\"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4\"\n {...props}\n >\n <div className=\"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center\">\n <Collapsible maxHeight={120}>\n <Text variant=\"body-default\">{description}</Text>\n </Collapsible>\n </div>\n {/* vertical divider for desktop */}\n <span className=\"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10\" />\n {/* horizontal divider for mobile */}\n <span className=\"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10\" />\n <div className=\"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8\">\n {contactItems.map((contactProps) => (\n <ContactItem key={contactProps.title} {...contactProps} />\n ))}\n </div>\n </div>\n);\n"]}
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { ContactItemProps } from './ContactItem.cjs';
3
+
4
+ type AboutCardProps = {
5
+ contactItems: ContactItemProps[];
6
+ description: string;
7
+ isEditMode?: boolean;
8
+ onEditClick?: () => void;
9
+ };
10
+ declare const AboutCard: ({ contactItems, description, isEditMode, onEditClick, ...props }: AboutCardProps) => React__default.JSX.Element;
11
+
12
+ export { AboutCard, type AboutCardProps };
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { ContactItemProps } from './ContactItem.js';
3
+
4
+ type AboutCardProps = {
5
+ contactItems: ContactItemProps[];
6
+ description: string;
7
+ isEditMode?: boolean;
8
+ onEditClick?: () => void;
9
+ };
10
+ declare const AboutCard: ({ contactItems, description, isEditMode, onEditClick, ...props }: AboutCardProps) => React__default.JSX.Element;
11
+
12
+ export { AboutCard, type AboutCardProps };
@@ -1,2 +1,2 @@
1
- import a,{useRef,useState,useLayoutEffect,useMemo}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import*as y from'@radix-ui/react-collapsible';var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},R=e=>{let[r,t]=e.split("-");return r==="heading"?A[t]||"p":r==="label"?"label":"p"},$={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[o,n]=t.split(":");return `${o}:text-${n}`}return `text-${t}`}).join(" "):"text-body-default",p=a.forwardRef(({variant:e="body-default",color:r="primary",as:t,className:o,children:n,weight:i,...s},m)=>{let d=P(e),b=r==="inherit"?"text-inherit":`text-text-${r}`,f=a.useMemo(()=>{let C=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return R(C)},[e]);return a.createElement(t||f,{ref:m,className:`font-sans antialiased ${d} ${b} ${i?`!${$[i]}`:""} ${o??""}`,...s},n)});p.displayName="Text";var h=({icon:e,size:r=40,className:t})=>{let o=useMemo(()=>{let s=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg");if(!s)return null;s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("preserveAspectRatio","xMidYMid meet");let m=s.getAttribute("viewBox")||"0 0 40 40";return s.setAttribute("viewBox",m),s.outerHTML},[e]);return o?a.createElement("div",{style:{width:r,height:r,display:"flex",alignItems:"center",justifyContent:"center"},className:t,dangerouslySetInnerHTML:{__html:o}}):null};h.displayName="IconRenderer";function c(...e){return twMerge(clsx(e))}var u="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var L=({children:e,color:r="inherit",variant:t="body-default-semibold",href:o,className:n,...i})=>a.createElement(p,{variant:t,color:r},a.createElement("a",{href:o,className:c("hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline",u,n),...i},e));var E=({icon:e,children:r,href:t,...o})=>a.createElement("div",{className:"row gap-2 flex items-center"},a.createElement("div",{className:"bg-secondary-400 rounded-full p-2.5 items-center justify-center"},a.createElement(h,{icon:e,size:18,className:"text-text"})),a.createElement(L,{className:"hover:underline",href:t,...o,variant:["body-default-semibold","md:body-default-semibold"]},r));var x=a.forwardRef(({children:e,type:r="button",className:t,disabled:o,...n},i)=>a.createElement("button",{ref:i,type:r,disabled:o,className:c("appearance-none hover:opacity-80 transition-all active:scale-95",u,o&&"opacity-50 cursor-not-allowed",t),...n},e));x.displayName="Pressable";var H=({children:e,maxHeight:r=100})=>{let[t,o]=a.useState(!1),n=useRef(null),[i,s]=useState(r);useLayoutEffect(()=>{if(!n.current)return;let d=new ResizeObserver(b=>{for(let f of b)s(f.target.scrollHeight);});return d.observe(n.current),()=>d.disconnect()},[]);let m=i>r;return a.createElement(y.Root,{open:t,onOpenChange:o},a.createElement("div",{className:"relative"},a.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:t?`${i}px`:`${r}px`}},a.createElement("div",{ref:n,className:"w-full"},e)),m&&a.createElement(y.Trigger,{asChild:!0},a.createElement(x,{className:c("absolute -bottom-8 left-0 right-0","flex items-end justify-center","h-16 pt-8 pb-2",!t&&"bg-gradient-to-b from-transparent via-white to-white","hover:opacity-100 transition-opacity")},a.createElement(p,{variant:"label-default",color:"secondary"},t?"See less":"See more")))))};H.displayName="Collapsible";var he=({interests:e,contactItems:r,description:t,isEditMode:o=!1,onEditClick:n,...i})=>a.createElement("div",{className:"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4",...i},a.createElement("div",{className:"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center"},a.createElement(H,{maxHeight:120},a.createElement(p,{variant:"body-default"},t))),a.createElement("span",{className:"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10"}),a.createElement("span",{className:"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10"}),a.createElement("div",{className:"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8"},r.map(s=>a.createElement(E,{key:s.title,...s}))));if (exports.default) module.exports = exports.default;export{he as AboutCard};//# sourceMappingURL=AboutCard.js.map
1
+ import a,{useRef,useState,useLayoutEffect,useMemo}from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import*as y from'@radix-ui/react-collapsible';var A={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},R=e=>{let[t,r]=e.split("-");return t==="heading"?A[r]||"p":t==="label"?"label":"p"},$={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},P=e=>e?(Array.isArray(e)?e:[e]).map(r=>{if(r.includes(":")){let[o,s]=r.split(":");return `${o}:text-${s}`}return `text-${r}`}).join(" "):"text-body-default",p=a.forwardRef(({variant:e="body-default",color:t="primary",as:r,className:o,children:s,weight:n,...i},m)=>{let d=P(e),b=t==="inherit"?"text-inherit":`text-text-${t}`,f=a.useMemo(()=>{let C=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return R(C)},[e]);return a.createElement(r||f,{ref:m,className:`font-sans antialiased ${d} ${b} ${n?`!${$[n]}`:""} ${o??""}`,...i},s)});p.displayName="Text";var h=({icon:e,size:t=40,className:r})=>{let o=useMemo(()=>{let i=new DOMParser().parseFromString(e,"image/svg+xml").querySelector("svg");if(!i)return null;i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("preserveAspectRatio","xMidYMid meet");let m=i.getAttribute("viewBox")||"0 0 40 40";return i.setAttribute("viewBox",m),i.outerHTML},[e]);return o?a.createElement("div",{style:{width:t,height:t,display:"flex",alignItems:"center",justifyContent:"center"},className:r,dangerouslySetInnerHTML:{__html:o}}):null};h.displayName="IconRenderer";function c(...e){return twMerge(clsx(e))}var u="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";var L=({children:e,color:t="inherit",variant:r="body-default-semibold",href:o,className:s,...n})=>a.createElement(p,{variant:r,color:t},a.createElement("a",{href:o,className:c("hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline",u,s),...n},e));var E=({icon:e,children:t,href:r,...o})=>a.createElement("div",{className:"row gap-2 flex items-center"},a.createElement("div",{className:"bg-secondary-400 rounded-full p-2.5 items-center justify-center"},a.createElement(h,{icon:e,size:18,className:"text-text"})),a.createElement(L,{className:"hover:underline",href:r,...o,variant:["body-default-semibold","md:body-default-semibold"]},t));var x=a.forwardRef(({children:e,type:t="button",className:r,disabled:o,...s},n)=>a.createElement("button",{ref:n,type:t,disabled:o,className:c("appearance-none hover:opacity-80 transition-all active:scale-95",u,o&&"opacity-50 cursor-not-allowed",r),...s},e));x.displayName="Pressable";var H=({children:e,maxHeight:t=100})=>{let[r,o]=a.useState(!1),s=useRef(null),[n,i]=useState(t);useLayoutEffect(()=>{if(!s.current)return;let d=new ResizeObserver(b=>{for(let f of b)i(f.target.scrollHeight);});return d.observe(s.current),()=>d.disconnect()},[]);let m=n>t;return a.createElement(y.Root,{open:r,onOpenChange:o},a.createElement("div",{className:"relative"},a.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:r?`${n}px`:`${t}px`}},a.createElement("div",{ref:s,className:"w-full"},e)),m&&a.createElement(y.Trigger,{asChild:!0},a.createElement(x,{className:c("absolute -bottom-8 left-0 right-0","flex items-end justify-center","h-16 pt-8 pb-2",!r&&"bg-gradient-to-b from-transparent via-white to-white","hover:opacity-100 transition-opacity")},a.createElement(p,{variant:"label-default",color:"secondary"},r?"See less":"See more")))))};H.displayName="Collapsible";var he=({contactItems:e,description:t,isEditMode:r=!1,onEditClick:o,...s})=>a.createElement("div",{className:"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4",...s},a.createElement("div",{className:"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center"},a.createElement(H,{maxHeight:120},a.createElement(p,{variant:"body-default"},t))),a.createElement("span",{className:"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10"}),a.createElement("span",{className:"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10"}),a.createElement("div",{className:"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8"},e.map(n=>a.createElement(E,{key:n.title,...n}))));export{he as AboutCard};//# sourceMappingURL=AboutCard.js.map
2
2
  //# sourceMappingURL=AboutCard.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/Text.tsx","../../src/components/IconRenderer.tsx","../../src/components/Link.tsx","../../src/utils/index.ts","../../src/utils/tailwind.ts","../../src/components/ContactItem.tsx","../../src/components/Pressable.tsx","../../src/components/Collapsible.tsx","../../src/components/AboutCard.tsx"],"names":["HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","size","fontWeight","processVariants","variants","breakpoint","typographyClass","Text","React","color","as","className","children","weight","props","ref","typographyClasses","colorClasses","suggestedElement","baseVariant","IconRenderer","icon","sanitizedSvg","useMemo","svg","viewBox","cn","inputs","twMerge","clsx","focusRingStyles","Link","href","ContactItem","linkProps","Pressable","type","disabled","Collapsible","maxHeight","open","setOpen","contentRef","useRef","contentHeight","setContentHeight","useState","useLayoutEffect","resizeObserver","entries","entry","shouldShowTrigger","AboutCard","interests","contactItems","description","isEditMode","onEditClick","contactProps"],"mappings":"yKAsEA,IAAMA,EAAmD,CACvD,EAAA,CAAI,IACJ,CAAA,EAAA,CAAI,KACJ,EAAI,CAAA,IAAA,CACJ,GAAI,IACJ,CAAA,EAAA,CAAI,IACN,CAEMC,CAAAA,CAAAA,CAAyBC,CAAwC,EAAA,CACrE,GAAM,CAACC,CAAAA,CAAUC,CAAI,CAAIF,CAAAA,CAAAA,CAAQ,MAAM,GAAG,CAAA,CAE1C,OAAIC,CAAa,GAAA,SAAA,CACRH,EAAoBI,CAAI,CAAA,EAAK,IAGlCD,CAAa,GAAA,OAAA,CACR,QAGF,GACT,CAAA,CAIME,CAAqC,CAAA,CACzC,MAAO,YACP,CAAA,OAAA,CAAS,eACT,QAAU,CAAA,eAAA,CACV,KAAM,WACR,CAAA,CA0BMC,EACJC,CAEKA,EAAAA,CAAAA,CAAAA,CAEgB,MAAM,OAAQA,CAAAA,CAAQ,EAAIA,CAAW,CAAA,CAACA,CAAQ,CAGhE,EAAA,GAAA,CAAKL,CAAY,EAAA,CAChB,GAAIA,CAAQ,CAAA,QAAA,CAAS,GA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AAA,CAAAA,CAAAA,CAAa,IAAKI,CACjBlD,EAAAA,CAAAA,CAAA,cAACyB,CAAA,CAAA,CAAY,IAAKyB,CAAa,CAAA,KAAA,CAAQ,GAAGA,CAAc,CAAA,CACzD,CACH,CACF","file":"AboutCard.js","sourcesContent":["import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { useMemo } from \"react\";\n\nexport type IconRendererProps = {\n icon: string;\n size?: number;\n className?: string;\n};\n\nexport const IconRenderer = ({\n icon,\n size = 40,\n className\n}: IconRendererProps) => {\n const sanitizedSvg = useMemo(() => {\n const parser = new DOMParser();\n const doc = parser.parseFromString(icon, \"image/svg+xml\");\n const svg = doc.querySelector(\"svg\");\n\n if (!svg) return null;\n\n // Set size attributes but preserve aspect ratio\n svg.setAttribute(\"width\", \"100%\");\n svg.setAttribute(\"height\", \"100%\");\n svg.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n // Get the original viewBox or use the default\n const viewBox = svg.getAttribute(\"viewBox\") || \"0 0 40 40\";\n svg.setAttribute(\"viewBox\", viewBox);\n\n return svg.outerHTML;\n }, [icon]);\n\n if (!sanitizedSvg) return null;\n\n return (\n <div\n style={{\n width: size,\n height: size,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n }}\n className={className}\n dangerouslySetInnerHTML={{ __html: sanitizedSvg }}\n />\n );\n};\n\nIconRenderer.displayName = \"IconRenderer\";\n","import React from \"react\";\nimport { Text, TextProps } from \"./Text\";\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type LinkProps = {\n href: string;\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n} & Pick<TextProps, \"variant\" | \"color\"> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport const Link = ({\n children,\n color = \"inherit\",\n variant = \"body-default-semibold\",\n href,\n className,\n ...props\n}: LinkProps) => (\n <Text variant={variant} color={color}>\n <a\n href={href}\n className={cn(\n \"hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline\",\n focusRingStyles,\n className\n )}\n {...props}\n >\n {children}\n </a>\n </Text>\n);\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React, { HTMLAttributes } from \"react\";\nimport { IconRenderer } from \"./IconRenderer\";\nimport { Link } from \"./Link\";\n\nexport type ContactItemProps = {\n // TODO: figure out how to get filled icons to work correctly\n icon: string;\n children: React.ReactNode;\n href: string;\n} & Omit<HTMLAttributes<HTMLAnchorElement>, \"color\">;\n\nexport const ContactItem = ({\n icon,\n children,\n href,\n ...linkProps\n}: ContactItemProps) => (\n <div className=\"row gap-2 flex items-center\">\n <div className=\"bg-secondary-400 rounded-full p-2.5 items-center justify-center\">\n <IconRenderer icon={icon} size={18} className=\"text-text\" />\n </div>\n <Link\n className=\"hover:underline\"\n href={href}\n {...linkProps}\n variant={[\"body-default-semibold\", \"md:body-default-semibold\"]}\n >\n {children}\n </Link>\n </div>\n);\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React, { useRef, useLayoutEffect, useState } from \"react\";\nimport * as RadixCollapsible from \"@radix-ui/react-collapsible\";\nimport { Pressable } from \"./Pressable\";\nimport { Text } from \"./Text\";\nimport { cn } from \"../utils\";\n\nexport type CollapsibleProps = {\n children: React.ReactNode;\n maxHeight?: number;\n};\n\nexport const Collapsible = ({\n children,\n maxHeight = 100\n}: CollapsibleProps) => {\n const [open, setOpen] = React.useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const [contentHeight, setContentHeight] = useState<number>(maxHeight);\n\n // Measure content height on mount and resize\n useLayoutEffect(() => {\n if (!contentRef.current) return;\n\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setContentHeight(entry.target.scrollHeight);\n }\n });\n\n resizeObserver.observe(contentRef.current);\n return () => resizeObserver.disconnect();\n }, []);\n\n const shouldShowTrigger = contentHeight > maxHeight;\n\n return (\n <RadixCollapsible.Root open={open} onOpenChange={setOpen}>\n <div className=\"relative\">\n <div\n className=\"overflow-hidden transition-[height] duration-300 ease-in-out\"\n style={{\n height: open ? `${contentHeight}px` : `${maxHeight}px`\n }}\n >\n <div ref={contentRef} className=\"w-full\">\n {children}\n </div>\n </div>\n\n {shouldShowTrigger && (\n <RadixCollapsible.Trigger asChild>\n <Pressable\n className={cn(\n \"absolute -bottom-8 left-0 right-0\",\n \"flex items-end justify-center\",\n \"h-16 pt-8 pb-2\",\n !open && \"bg-gradient-to-b from-transparent via-white to-white\",\n \"hover:opacity-100 transition-opacity\"\n )}\n >\n <Text variant=\"label-default\" color=\"secondary\">\n {open ? \"See less\" : \"See more\"}\n </Text>\n </Pressable>\n </RadixCollapsible.Trigger>\n )}\n </div>\n </RadixCollapsible.Root>\n );\n};\n\nCollapsible.displayName = \"Collapsible\";\n","import React from \"react\";\nimport { Text } from \"./Text\";\nimport { ContactItem, ContactItemProps } from \"./ContactItem\";\nimport { EditButton } from \"./EditButton\";\nimport { Collapsible } from \"./Collapsible\";\n\nexport type AboutCardProps = {\n interests: string[];\n contactItems: ContactItemProps[];\n description: string;\n isEditMode?: boolean;\n onEditClick?: () => void;\n};\n\nexport const AboutCard = ({\n interests,\n contactItems,\n description,\n isEditMode = false,\n onEditClick,\n ...props\n}: AboutCardProps) => (\n <div\n className=\"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4\"\n {...props}\n >\n <div className=\"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center\">\n <Collapsible maxHeight={120}>\n <Text variant=\"body-default\">{description}</Text>\n </Collapsible>\n </div>\n {/* vertical divider for desktop */}\n <span className=\"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10\" />\n {/* horizontal divider for mobile */}\n <span className=\"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10\" />\n <div className=\"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8\">\n {contactItems.map((contactProps) => (\n <ContactItem key={contactProps.title} {...contactProps} />\n ))}\n </div>\n </div>\n);\n"]}
1
+ {"version":3,"sources":["../../src/components/Text.tsx","../../src/components/IconRenderer.tsx","../../src/utils/index.ts","../../src/utils/tailwind.ts","../../src/components/Link.tsx","../../src/components/ContactItem.tsx","../../src/components/Collapsible.tsx","../../src/components/Pressable.tsx","../../src/components/AboutCard.tsx"],"names":["HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","size","fontWeight","processVariants","variants","breakpoint","typographyClass","Text","React","color","as","className","children","weight","props","ref","typographyClasses","colorClasses","suggestedElement","baseVariant","IconRenderer","icon","sanitizedSvg","useMemo","svg","viewBox","cn","inputs","twMerge","clsx","focusRingStyles","Link","href","ContactItem","linkProps","Pressable","type","disabled","Collapsible","maxHeight","open","setOpen","contentRef","useRef","contentHeight","setContentHeight","useState","useLayoutEffect","resizeObserver","entries","entry","shouldShowTrigger","AboutCard","contactItems","description","isEditMode","onEditClick","contactProps"],"mappings":"yKAsEA,IAAMA,EAAmD,CACvD,EAAA,CAAI,IACJ,CAAA,EAAA,CAAI,KACJ,EAAI,CAAA,IAAA,CACJ,GAAI,IACJ,CAAA,EAAA,CAAI,IACN,CAEMC,CAAAA,CAAAA,CAAyBC,CAAwC,EAAA,CACrE,GAAM,CAACC,CAAAA,CAAUC,CAAI,CAAIF,CAAAA,CAAAA,CAAQ,MAAM,GAAG,CAAA,CAE1C,OAAIC,CAAa,GAAA,SAAA,CACRH,EAAoBI,CAAI,CAAA,EAAK,IAGlCD,CAAa,GAAA,OAAA,CACR,QAGF,GACT,CAAA,CAIME,CAAqC,CAAA,CACzC,MAAO,YACP,CAAA,OAAA,CAAS,eACT,QAAU,CAAA,eAAA,CACV,KAAM,WACR,CAAA,CA0BMC,EACJC,CAEKA,EAAAA,CAAAA,CAAAA,CAEgB,MAAM,OAAQA,CAAAA,CAAQ,EAAIA,CAAW,CAAA,CAACA,CAAQ,CAGhE,EAAA,GAAA,CAAKL,CAAY,EAAA,CAChB,GAAIA,CAAQ,CAAA,QAAA,CAAS,GAAG,CAAG,CAAA,CACzB,GAAM,CAACM,CAAAA,CAAYC,CAAe,CAAIP,CAAAA,CAAAA,CAAQ,MAAM,GAAG,CAAA,CACvD,OAAO,CAAGM,EAAAA,CAAU,SAASC,CAAe,CAAA,CAC9C,CACA,OAAO,QAAQP,CAAO,CAAA,CACxB,CAAC,CACA,CAAA,IAAA,CAAK,GAAG,CAZW,CAAA,mBAAA,CAeXQ,CAAOC,CAAAA,CAAAA,CAAM,WACxB,CACE,CACE,QAAAT,CAAU,CAAA,cAAA,CACV,MAAAU,CAAQ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F,CACF,CAEJ,CACF,CAEJ,EAEAF,CAAY,CAAA,WAAA,CAAc,cE3Dbc,IAAAA,EAAAA,CAAY,CAAC,CACxB,YAAA,CAAAC,EACA,WAAAC,CAAAA,CAAAA,CACA,UAAAC,CAAAA,CAAAA,CAAa,GACb,WAAAC,CAAAA,CAAAA,CACA,GAAG1C,CACL,CAAA,GACEN,EAAA,aAAC,CAAA,KAAA,CAAA,CACC,UAAU,iGACT,CAAA,GAAGM,GAEJN,CAAA,CAAA,aAAA,CAAC,OAAI,SAAU,CAAA,kFAAA,CAAA,CACbA,EAAA,aAAC8B,CAAAA,CAAAA,CAAA,CAAY,SAAA,CAAW,KACtB9B,CAAA,CAAA,aAAA,CAACD,EAAA,CAAK,OAAA,CAAQ,gBAAgB+C,CAAY,CAC5C,CACF,CAEA9C,CAAAA,CAAAA,CAAA,cAAC,MAAK,CAAA,CAAA,SAAA,CAAU,0EAA0E,CAE1FA,CAAAA,CAAAA,CAAA,cAAC,MAAK,CAAA,CAAA,SAAA,CAAU,2DAA4D,CAAA,CAAA,CAC5EA,EAAA,aAAC,CAAA,KAAA,CAAA,CAAI,UAAU,2CACZ6C,CAAAA,CAAAA,CAAAA,CAAa,IAAKI,CACjBjD,EAAAA,CAAAA,CAAA,cAACyB,CAAA,CAAA,CAAY,IAAKwB,CAAa,CAAA,KAAA,CAAQ,GAAGA,CAAc,CAAA,CACzD,CACH,CACF","file":"AboutCard.js","sourcesContent":["import React from \"react\";\nimport { Typography } from \"../types/tailwind\";\n\ntype TextElement =\n | \"p\"\n | \"span\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"strong\"\n | \"em\"\n | \"blockquote\"\n | \"pre\"\n | \"code\"\n | \"small\"\n | \"label\"\n | \"a\";\n\n// HTML element mapping type\ntype HTMLElementByTag = {\n p: HTMLParagraphElement;\n span: HTMLSpanElement;\n h1: HTMLHeadingElement;\n h2: HTMLHeadingElement;\n h3: HTMLHeadingElement;\n h4: HTMLHeadingElement;\n h5: HTMLHeadingElement;\n h6: HTMLHeadingElement;\n strong: HTMLElement;\n em: HTMLElement;\n blockquote: HTMLQuoteElement;\n pre: HTMLPreElement;\n code: HTMLElement;\n small: HTMLElement;\n label: HTMLLabelElement;\n a: HTMLAnchorElement;\n};\n\n// HTML props mapping type\ntype HTMLPropsMap = {\n p: React.HTMLAttributes<HTMLParagraphElement>;\n span: React.HTMLAttributes<HTMLSpanElement>;\n h1: React.HTMLAttributes<HTMLHeadingElement>;\n h2: React.HTMLAttributes<HTMLHeadingElement>;\n h3: React.HTMLAttributes<HTMLHeadingElement>;\n h4: React.HTMLAttributes<HTMLHeadingElement>;\n h5: React.HTMLAttributes<HTMLHeadingElement>;\n h6: React.HTMLAttributes<HTMLHeadingElement>;\n strong: React.HTMLAttributes<HTMLElement>;\n em: React.HTMLAttributes<HTMLElement>;\n blockquote: React.HTMLAttributes<HTMLQuoteElement>;\n pre: React.HTMLAttributes<HTMLPreElement>;\n code: React.HTMLAttributes<HTMLElement>;\n small: React.HTMLAttributes<HTMLElement>;\n label: React.LabelHTMLAttributes<HTMLLabelElement>;\n a: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"color\">;\n};\n\ntype TextColor =\n | \"primary\"\n | \"secondary\"\n | \"white\"\n | \"primary-blue\"\n | \"disabled\"\n | \"danger\"\n | \"inherit\";\n\nconst HEADING_ELEMENT_MAP: Record<string, TextElement> = {\n xl: \"h1\",\n lg: \"h1\",\n md: \"h2\",\n sm: \"h3\",\n xs: \"h4\"\n};\n\nconst getElementFromVariant = (variant: TypographyKey): TextElement => {\n const [category, size] = variant.split(\"-\");\n\n if (category === \"heading\") {\n return HEADING_ELEMENT_MAP[size] || \"p\";\n }\n\n if (category === \"label\") {\n return \"label\";\n }\n\n return \"p\";\n};\n\ntype Weight = \"light\" | \"regular\" | \"semibold\" | \"bold\";\n\nconst fontWeight: Record<Weight, string> = {\n light: \"font-light\",\n regular: \"font-regular\",\n semibold: \"font-semibold\",\n bold: \"font-bold\"\n};\n\n// Add breakpoint types\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveVariant = TypographyKey | `${Breakpoint}:${TypographyKey}`;\n\ntype TypographyCategory = keyof Typography;\ntype TypographyValue<T extends TypographyCategory> = Extract<\n keyof Typography[T],\n string | number | bigint | boolean | null | undefined\n>;\ntype TypographyKey = {\n [T in TypographyCategory]: `${T}-${TypographyValue<T>}`;\n}[TypographyCategory];\n\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: TextColor;\n as?: T;\n className?: string;\n children: React.ReactNode;\n weight?: Weight;\n} & HTMLPropsMap[T];\n\n// Add helper function to process variants\nconst processVariants = (\n variants: ResponsiveVariant | ResponsiveVariant[] | undefined\n): string => {\n if (!variants) return \"text-body-default\";\n\n const variantArray = Array.isArray(variants) ? variants : [variants];\n\n return variantArray\n .map((variant) => {\n if (variant.includes(\":\")) {\n const [breakpoint, typographyClass] = variant.split(\":\");\n return `${breakpoint}:text-${typographyClass}`;\n }\n return `text-${variant}`;\n })\n .join(\" \");\n};\n\nexport const Text = React.forwardRef(\n <T extends TextElement = \"p\">(\n {\n variant = \"body-default\",\n color = \"primary\",\n as,\n className,\n children,\n weight,\n ...props\n }: TextProps<T>,\n ref: React.ForwardedRef<HTMLElementByTag[T]>\n ) => {\n // Process typography classes with breakpoints\n const typographyClasses = processVariants(variant);\n\n // Get color styles\n const colorClasses =\n color === \"inherit\" ? \"text-inherit\" : `text-text-${color}`;\n\n const suggestedElement = React.useMemo(() => {\n const baseVariant =\n typeof variant === \"string\"\n ? variant.split(\":\").pop()!\n : Array.isArray(variant)\n ? variant[0].split(\":\").pop()!\n : \"body-default\";\n return getElementFromVariant(baseVariant as TypographyKey);\n }, [variant]);\n\n const Component = (as || suggestedElement) as T;\n\n return (\n // @ts-expect-error TODO: figure this out\n <Component\n ref={ref}\n className={`font-sans antialiased ${typographyClasses} ${colorClasses} ${\n weight ? `!${fontWeight[weight]}` : \"\"\n } ${className ?? \"\"}`}\n {...props}\n >\n {children}\n </Component>\n );\n }\n);\n\nText.displayName = \"Text\";\n","import React, { useMemo } from \"react\";\n\nexport type IconRendererProps = {\n icon: string;\n size?: number;\n className?: string;\n};\n\nexport const IconRenderer = ({\n icon,\n size = 40,\n className\n}: IconRendererProps) => {\n const sanitizedSvg = useMemo(() => {\n const parser = new DOMParser();\n const doc = parser.parseFromString(icon, \"image/svg+xml\");\n const svg = doc.querySelector(\"svg\");\n\n if (!svg) return null;\n\n // Set size attributes but preserve aspect ratio\n svg.setAttribute(\"width\", \"100%\");\n svg.setAttribute(\"height\", \"100%\");\n svg.setAttribute(\"preserveAspectRatio\", \"xMidYMid meet\");\n\n // Get the original viewBox or use the default\n const viewBox = svg.getAttribute(\"viewBox\") || \"0 0 40 40\";\n svg.setAttribute(\"viewBox\", viewBox);\n\n return svg.outerHTML;\n }, [icon]);\n\n if (!sanitizedSvg) return null;\n\n return (\n <div\n style={{\n width: size,\n height: size,\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n }}\n className={className}\n dangerouslySetInnerHTML={{ __html: sanitizedSvg }}\n />\n );\n};\n\nIconRenderer.displayName = \"IconRenderer\";\n","import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n\nexport const noopFn = () => {};\n","import { Colors, Typography } from \"../types/tailwind\";\n\n// Generate safelist patterns for all color utilities so you can use any theme color variable in your code\nexport const generateSafelist = (colors: Colors, typography: Typography) => {\n const colorNames = Object.keys(colors) as (keyof Colors)[];\n const utilities = [\"bg\", \"text\", \"border\", \"ring\", \"divide\", \"outline\"];\n const variants = [\"hover:\", \"focus:\", \"active:\", \"disabled:\"];\n\n const safelist: string[] = [];\n\n colorNames.forEach((colorName) => {\n if (typeof colors[colorName] === \"object\") {\n // Handle nested color objects (with number keys)\n Object.keys(colors[colorName]).forEach((shade) => {\n utilities.forEach((utility) => {\n // Base utility\n safelist.push(`${utility}-${colorName}-${shade}`);\n\n // Variant utilities\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}-${shade}`);\n });\n });\n });\n } else {\n // Handle direct color values\n utilities.forEach((utility) => {\n safelist.push(`${utility}-${colorName}`);\n\n variants.forEach((variant) => {\n safelist.push(`${variant}${utility}-${colorName}`);\n });\n });\n }\n });\n\n // Generate typography classes\n Object.entries(typography).forEach(([family, sizes]) => {\n Object.keys(sizes).forEach((size) => {\n // Base typography classes\n safelist.push(`text-${family}-${size}`);\n\n // Add variants\n variants.forEach((variant) => {\n safelist.push(`${variant}text-${family}-${size}`);\n });\n });\n });\n\n const breakpoints = [\"sm\", \"md\", \"lg\", \"xl\", \"2xl\"];\n const typographyClasses = Object.entries(typography).flatMap(\n ([category, sizes]) =>\n Object.keys(sizes).map((size) => `text-${category}-${size}`)\n );\n\n // Generate responsive variants\n const responsiveTypographyClasses = typographyClasses.flatMap((className) =>\n breakpoints.map((breakpoint) => `${breakpoint}:${className}`)\n );\n\n return [\n ...typographyClasses,\n ...responsiveTypographyClasses\n // ... rest of your safelist\n ];\n};\n\nexport const focusRingStyles =\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2\";\n\nexport const focusRingStylesCoerced = \"ring-2 ring-ring ring-offset-2\";\n","import React from \"react\";\nimport { Text, TextProps } from \"./Text\";\nimport { cn } from \"../utils\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type LinkProps = {\n href: string;\n children: React.ReactNode;\n className?: string;\n style?: React.CSSProperties;\n} & Pick<TextProps, \"variant\" | \"color\"> &\n React.AnchorHTMLAttributes<HTMLAnchorElement>;\n\nexport const Link = ({\n children,\n color = \"inherit\",\n variant = \"body-default-semibold\",\n href,\n className,\n ...props\n}: LinkProps) => (\n <Text variant={variant} color={color}>\n <a\n href={href}\n className={cn(\n \"hover:opacity-80 transition-all ease-in-out active:scale-95 hover:underline\",\n focusRingStyles,\n className\n )}\n {...props}\n >\n {children}\n </a>\n </Text>\n);\n","import React, { HTMLAttributes } from \"react\";\nimport { IconRenderer } from \"./IconRenderer\";\nimport { Link } from \"./Link\";\n\nexport type ContactItemProps = {\n // TODO: figure out how to get filled icons to work correctly\n icon: string;\n children: React.ReactNode;\n href: string;\n} & Omit<HTMLAttributes<HTMLAnchorElement>, \"color\">;\n\nexport const ContactItem = ({\n icon,\n children,\n href,\n ...linkProps\n}: ContactItemProps) => (\n <div className=\"row gap-2 flex items-center\">\n <div className=\"bg-secondary-400 rounded-full p-2.5 items-center justify-center\">\n <IconRenderer icon={icon} size={18} className=\"text-text\" />\n </div>\n <Link\n className=\"hover:underline\"\n href={href}\n {...linkProps}\n variant={[\"body-default-semibold\", \"md:body-default-semibold\"]}\n >\n {children}\n </Link>\n </div>\n);\n","import React, { useRef, useLayoutEffect, useState } from \"react\";\nimport * as RadixCollapsible from \"@radix-ui/react-collapsible\";\nimport { Pressable } from \"./Pressable\";\nimport { Text } from \"./Text\";\nimport { cn } from \"../utils\";\n\nexport type CollapsibleProps = {\n children: React.ReactNode;\n maxHeight?: number;\n};\n\nexport const Collapsible = ({\n children,\n maxHeight = 100\n}: CollapsibleProps) => {\n const [open, setOpen] = React.useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const [contentHeight, setContentHeight] = useState<number>(maxHeight);\n\n // Measure content height on mount and resize\n useLayoutEffect(() => {\n if (!contentRef.current) return;\n\n const resizeObserver = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setContentHeight(entry.target.scrollHeight);\n }\n });\n\n resizeObserver.observe(contentRef.current);\n return () => resizeObserver.disconnect();\n }, []);\n\n const shouldShowTrigger = contentHeight > maxHeight;\n\n return (\n <RadixCollapsible.Root open={open} onOpenChange={setOpen}>\n <div className=\"relative\">\n <div\n className=\"overflow-hidden transition-[height] duration-300 ease-in-out\"\n style={{\n height: open ? `${contentHeight}px` : `${maxHeight}px`\n }}\n >\n <div ref={contentRef} className=\"w-full\">\n {children}\n </div>\n </div>\n\n {shouldShowTrigger && (\n <RadixCollapsible.Trigger asChild>\n <Pressable\n className={cn(\n \"absolute -bottom-8 left-0 right-0\",\n \"flex items-end justify-center\",\n \"h-16 pt-8 pb-2\",\n !open && \"bg-gradient-to-b from-transparent via-white to-white\",\n \"hover:opacity-100 transition-opacity\"\n )}\n >\n <Text variant=\"label-default\" color=\"secondary\">\n {open ? \"See less\" : \"See more\"}\n </Text>\n </Pressable>\n </RadixCollapsible.Trigger>\n )}\n </div>\n </RadixCollapsible.Root>\n );\n};\n\nCollapsible.displayName = \"Collapsible\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable = React.forwardRef<HTMLButtonElement, PressableProps>(\n ({ children, type = \"button\", className, disabled, ...props }, ref) => (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={cn(\n \"appearance-none hover:opacity-80 transition-all active:scale-95\",\n focusRingStyles,\n disabled && \"opacity-50 cursor-not-allowed\",\n className\n )}\n {...props}\n >\n {children}\n </button>\n )\n);\n\nPressable.displayName = \"Pressable\";\n","import React from \"react\";\nimport { Text } from \"./Text\";\nimport { ContactItem, ContactItemProps } from \"./ContactItem\";\nimport { Collapsible } from \"./Collapsible\";\n\nexport type AboutCardProps = {\n contactItems: ContactItemProps[];\n description: string;\n isEditMode?: boolean;\n onEditClick?: () => void;\n};\n\nexport const AboutCard = ({\n contactItems,\n description,\n isEditMode = false,\n onEditClick,\n ...props\n}: AboutCardProps) => (\n <div\n className=\"border border-secondary rounded-2xl sm:p-10 p-4 relative flex sm:flex-row flex-col pt-8 sm:pt-4\"\n {...props}\n >\n <div className=\"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0 justify-center\">\n <Collapsible maxHeight={120}>\n <Text variant=\"body-default\">{description}</Text>\n </Collapsible>\n </div>\n {/* vertical divider for desktop */}\n <span className=\"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10\" />\n {/* horizontal divider for mobile */}\n <span className=\"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10\" />\n <div className=\"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8\">\n {contactItems.map((contactProps) => (\n <ContactItem key={contactProps.title} {...contactProps} />\n ))}\n </div>\n </div>\n);\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var n=require('react'),c=require('@radix-ui/react-accordion'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var n__namespace=/*#__PURE__*/_interopNamespace(n);var c__namespace=/*#__PURE__*/_interopNamespace(c);function d(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var h={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},x={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},L=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},i;return o.forEach(r=>{if(typeof r=="number")i=`${r}px`;else {let[s,l]=r.split(":"),p=parseInt(l,10);t[`@media (min-width: ${x[s]})`]=`${p}px`;}}),{width:i||"24px",height:i||"24px",...Object.entries(t).reduce((r,[s,l])=>({...r,[s]:{width:l,height:l}}),{})}},g=n__namespace.default.forwardRef(({name:e,size:o=24,color:t="primary",title:i,className:r,style:s={},...l},p)=>{let a=icons.IconMap[e],m=L(o);return n__namespace.default.createElement("div",{className:d("flex justify-center items-center",r),style:{...m,"--icon-stroke":h[t],...s}},n__namespace.default.createElement(a,{ref:p,"aria-hidden":!i,"aria-label":i,stroke:e.includes("filled")?void 0:h[t],...l}))});g.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},E=e=>{let[o,t]=e.split("-");return o==="heading"?R[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},v=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[i,r]=t.split(":");return `${i}:text-${r}`}return `text-${t}`}).join(" "):"text-body-default",T=n__namespace.default.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:i,children:r,weight:s,...l},p)=>{let a=v(e),m=o==="inherit"?"text-inherit":`text-text-${o}`,f=n__namespace.default.useMemo(()=>{let b=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return E(b)},[e]);return n__namespace.default.createElement(t||f,{ref:p,className:`font-sans antialiased ${a} ${m} ${s?`!${P[s]}`:""} ${i??""}`,...l},r)});T.displayName="Text";var C=n__namespace.forwardRef(({items:e,type:o="single",defaultValue:t,value:i,onValueChange:r,className:s,...l},p)=>n__namespace.createElement(c__namespace.Root,{ref:p,type:o,defaultValue:t,value:i,onValueChange:r,className:d("w-full",s),...l},e.map(a=>n__namespace.createElement(c__namespace.Item,{key:a.value,value:a.value,disabled:a.disabled,className:"w-full"},n__namespace.createElement(c__namespace.Header,null,n__namespace.createElement(c__namespace.Trigger,{className:d("flex w-full items-center gap-2 justify-between px-3 py-2 rounded bg-background-50 hover:bg-background-100 mt-4","disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100")},n__namespace.createElement("div",{className:"flex items-center gap-3"},n__namespace.createElement(T,{variant:"body-default-semibold",className:a.disabled?"text-text-disabled":""},a.title)),n__namespace.createElement(g,{name:"arrow-down",size:18,"aria-hidden":!0,color:a.disabled?"disabled":"primary",className:"transition-transform duration-200 data-[state=open]:rotate-180"}))),n__namespace.createElement(c__namespace.Content,{className:d("overflow-hidden will-change-[height] data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up")},n__namespace.createElement("div",{className:"py-2 px-3"},a.content))))));C.displayName="Accordion";if (exports.default) module.exports = exports.default;exports.Accordion=C;//# sourceMappingURL=Accordion.cjs.map
1
+ 'use strict';var n=require('react'),c=require('@radix-ui/react-accordion'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var n__namespace=/*#__PURE__*/_interopNamespace(n);var c__namespace=/*#__PURE__*/_interopNamespace(c);function d(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var h={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},x={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},L=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},i;return o.forEach(r=>{if(typeof r=="number")i=`${r}px`;else {let[s,l]=r.split(":"),p=parseInt(l,10);t[`@media (min-width: ${x[s]})`]=`${p}px`;}}),{width:i||"24px",height:i||"24px",...Object.entries(t).reduce((r,[s,l])=>({...r,[s]:{width:l,height:l}}),{})}},g=n__namespace.default.forwardRef(({name:e,size:o=24,color:t="primary",title:i,className:r,style:s={},...l},p)=>{let a=icons.IconMap[e],m=L(o);return n__namespace.default.createElement("div",{className:d("flex justify-center items-center",r),style:{...m,"--icon-stroke":h[t],...s}},n__namespace.default.createElement(a,{ref:p,"aria-hidden":!i,"aria-label":i,stroke:e.includes("filled")?void 0:h[t],...l}))});g.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},E=e=>{let[o,t]=e.split("-");return o==="heading"?R[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},v=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[i,r]=t.split(":");return `${i}:text-${r}`}return `text-${t}`}).join(" "):"text-body-default",T=n__namespace.default.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:i,children:r,weight:s,...l},p)=>{let a=v(e),m=o==="inherit"?"text-inherit":`text-text-${o}`,f=n__namespace.default.useMemo(()=>{let b=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return E(b)},[e]);return n__namespace.default.createElement(t||f,{ref:p,className:`font-sans antialiased ${a} ${m} ${s?`!${P[s]}`:""} ${i??""}`,...l},r)});T.displayName="Text";var C=n__namespace.forwardRef(({items:e,type:o="single",defaultValue:t,value:i,onValueChange:r,className:s,...l},p)=>n__namespace.createElement(c__namespace.Root,{ref:p,type:o,defaultValue:t,value:i,onValueChange:r,className:d("w-full",s),...l},e.map(a=>n__namespace.createElement(c__namespace.Item,{key:a.value,value:a.value,disabled:a.disabled,className:"w-full"},n__namespace.createElement(c__namespace.Header,null,n__namespace.createElement(c__namespace.Trigger,{className:d("flex w-full items-center gap-2 justify-between px-3 py-2 rounded bg-background-50 hover:bg-background-100 mt-4","disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100")},n__namespace.createElement("div",{className:"flex items-center gap-3"},n__namespace.createElement(T,{variant:"body-default-semibold",className:a.disabled?"text-text-disabled":""},a.title)),n__namespace.createElement(g,{name:"arrow-down",size:18,"aria-hidden":!0,color:a.disabled?"disabled":"primary",className:"transition-transform duration-200 data-[state=open]:rotate-180"}))),n__namespace.createElement(c__namespace.Content,{className:d("overflow-hidden will-change-[height] data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up")},n__namespace.createElement("div",{className:"py-2 px-3"},a.content))))));C.displayName="Accordion";exports.Accordion=C;//# sourceMappingURL=Accordion.cjs.map
2
2
  //# sourceMappingURL=Accordion.cjs.map
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+
4
+ type AccordionItem = {
5
+ value: string;
6
+ title: React.ReactNode;
7
+ content: React.ReactNode;
8
+ disabled?: boolean;
9
+ };
10
+ type AccordionProps = {
11
+ /** Array of items to show in the accordion */
12
+ items: AccordionItem[];
13
+ /** Type of accordion (single item open or multiple) */
14
+ type?: AccordionPrimitive.AccordionSingleProps["type"] | AccordionPrimitive.AccordionMultipleProps["type"];
15
+ /** Default value(s) to be expanded */
16
+ defaultValue?: AccordionPrimitive.AccordionSingleProps["defaultValue"] | AccordionPrimitive.AccordionMultipleProps["defaultValue"];
17
+ /** Current value(s) for controlled component */
18
+ value?: AccordionPrimitive.AccordionSingleProps["value"] | AccordionPrimitive.AccordionMultipleProps["value"];
19
+ /** Callback when value changes */
20
+ onValueChange?: AccordionPrimitive.AccordionSingleProps["onValueChange"] | AccordionPrimitive.AccordionMultipleProps["onValueChange"];
21
+ /** Optional className for custom styling */
22
+ className?: string;
23
+ };
24
+ declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
25
+
26
+ export { Accordion, type AccordionItem, type AccordionProps };
@@ -0,0 +1,26 @@
1
+ import * as React from 'react';
2
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
3
+
4
+ type AccordionItem = {
5
+ value: string;
6
+ title: React.ReactNode;
7
+ content: React.ReactNode;
8
+ disabled?: boolean;
9
+ };
10
+ type AccordionProps = {
11
+ /** Array of items to show in the accordion */
12
+ items: AccordionItem[];
13
+ /** Type of accordion (single item open or multiple) */
14
+ type?: AccordionPrimitive.AccordionSingleProps["type"] | AccordionPrimitive.AccordionMultipleProps["type"];
15
+ /** Default value(s) to be expanded */
16
+ defaultValue?: AccordionPrimitive.AccordionSingleProps["defaultValue"] | AccordionPrimitive.AccordionMultipleProps["defaultValue"];
17
+ /** Current value(s) for controlled component */
18
+ value?: AccordionPrimitive.AccordionSingleProps["value"] | AccordionPrimitive.AccordionMultipleProps["value"];
19
+ /** Callback when value changes */
20
+ onValueChange?: AccordionPrimitive.AccordionSingleProps["onValueChange"] | AccordionPrimitive.AccordionMultipleProps["onValueChange"];
21
+ /** Optional className for custom styling */
22
+ className?: string;
23
+ };
24
+ declare const Accordion: React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>;
25
+
26
+ export { Accordion, type AccordionItem, type AccordionProps };
@@ -1,2 +1,2 @@
1
- import*as n from'react';import n__default from'react';import*as c from'@radix-ui/react-accordion';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';function d(...e){return twMerge(clsx(e))}var h={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},x={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},L=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},i;return o.forEach(r=>{if(typeof r=="number")i=`${r}px`;else {let[s,l]=r.split(":"),p=parseInt(l,10);t[`@media (min-width: ${x[s]})`]=`${p}px`;}}),{width:i||"24px",height:i||"24px",...Object.entries(t).reduce((r,[s,l])=>({...r,[s]:{width:l,height:l}}),{})}},g=n__default.forwardRef(({name:e,size:o=24,color:t="primary",title:i,className:r,style:s={},...l},p)=>{let a=IconMap[e],m=L(o);return n__default.createElement("div",{className:d("flex justify-center items-center",r),style:{...m,"--icon-stroke":h[t],...s}},n__default.createElement(a,{ref:p,"aria-hidden":!i,"aria-label":i,stroke:e.includes("filled")?void 0:h[t],...l}))});g.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},E=e=>{let[o,t]=e.split("-");return o==="heading"?R[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},v=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[i,r]=t.split(":");return `${i}:text-${r}`}return `text-${t}`}).join(" "):"text-body-default",T=n__default.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:i,children:r,weight:s,...l},p)=>{let a=v(e),m=o==="inherit"?"text-inherit":`text-text-${o}`,f=n__default.useMemo(()=>{let b=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return E(b)},[e]);return n__default.createElement(t||f,{ref:p,className:`font-sans antialiased ${a} ${m} ${s?`!${P[s]}`:""} ${i??""}`,...l},r)});T.displayName="Text";var C=n.forwardRef(({items:e,type:o="single",defaultValue:t,value:i,onValueChange:r,className:s,...l},p)=>n.createElement(c.Root,{ref:p,type:o,defaultValue:t,value:i,onValueChange:r,className:d("w-full",s),...l},e.map(a=>n.createElement(c.Item,{key:a.value,value:a.value,disabled:a.disabled,className:"w-full"},n.createElement(c.Header,null,n.createElement(c.Trigger,{className:d("flex w-full items-center gap-2 justify-between px-3 py-2 rounded bg-background-50 hover:bg-background-100 mt-4","disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100")},n.createElement("div",{className:"flex items-center gap-3"},n.createElement(T,{variant:"body-default-semibold",className:a.disabled?"text-text-disabled":""},a.title)),n.createElement(g,{name:"arrow-down",size:18,"aria-hidden":!0,color:a.disabled?"disabled":"primary",className:"transition-transform duration-200 data-[state=open]:rotate-180"}))),n.createElement(c.Content,{className:d("overflow-hidden will-change-[height] data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up")},n.createElement("div",{className:"py-2 px-3"},a.content))))));C.displayName="Accordion";if (exports.default) module.exports = exports.default;export{C as Accordion};//# sourceMappingURL=Accordion.js.map
1
+ import*as n from'react';import n__default from'react';import*as c from'@radix-ui/react-accordion';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {IconMap}from'@deckai/icons';function d(...e){return twMerge(clsx(e))}var h={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},x={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},L=e=>{if(!e)return {width:"24px",height:"24px"};let o=Array.isArray(e)?e:[e],t={},i;return o.forEach(r=>{if(typeof r=="number")i=`${r}px`;else {let[s,l]=r.split(":"),p=parseInt(l,10);t[`@media (min-width: ${x[s]})`]=`${p}px`;}}),{width:i||"24px",height:i||"24px",...Object.entries(t).reduce((r,[s,l])=>({...r,[s]:{width:l,height:l}}),{})}},g=n__default.forwardRef(({name:e,size:o=24,color:t="primary",title:i,className:r,style:s={},...l},p)=>{let a=IconMap[e],m=L(o);return n__default.createElement("div",{className:d("flex justify-center items-center",r),style:{...m,"--icon-stroke":h[t],...s}},n__default.createElement(a,{ref:p,"aria-hidden":!i,"aria-label":i,stroke:e.includes("filled")?void 0:h[t],...l}))});g.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},E=e=>{let[o,t]=e.split("-");return o==="heading"?R[t]||"p":o==="label"?"label":"p"},P={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},v=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[i,r]=t.split(":");return `${i}:text-${r}`}return `text-${t}`}).join(" "):"text-body-default",T=n__default.forwardRef(({variant:e="body-default",color:o="primary",as:t,className:i,children:r,weight:s,...l},p)=>{let a=v(e),m=o==="inherit"?"text-inherit":`text-text-${o}`,f=n__default.useMemo(()=>{let b=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return E(b)},[e]);return n__default.createElement(t||f,{ref:p,className:`font-sans antialiased ${a} ${m} ${s?`!${P[s]}`:""} ${i??""}`,...l},r)});T.displayName="Text";var C=n.forwardRef(({items:e,type:o="single",defaultValue:t,value:i,onValueChange:r,className:s,...l},p)=>n.createElement(c.Root,{ref:p,type:o,defaultValue:t,value:i,onValueChange:r,className:d("w-full",s),...l},e.map(a=>n.createElement(c.Item,{key:a.value,value:a.value,disabled:a.disabled,className:"w-full"},n.createElement(c.Header,null,n.createElement(c.Trigger,{className:d("flex w-full items-center gap-2 justify-between px-3 py-2 rounded bg-background-50 hover:bg-background-100 mt-4","disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100")},n.createElement("div",{className:"flex items-center gap-3"},n.createElement(T,{variant:"body-default-semibold",className:a.disabled?"text-text-disabled":""},a.title)),n.createElement(g,{name:"arrow-down",size:18,"aria-hidden":!0,color:a.disabled?"disabled":"primary",className:"transition-transform duration-200 data-[state=open]:rotate-180"}))),n.createElement(c.Content,{className:d("overflow-hidden will-change-[height] data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up")},n.createElement("div",{className:"py-2 px-3"},a.content))))));C.displayName="Accordion";export{C as Accordion};//# sourceMappingURL=Accordion.js.map
2
2
  //# sourceMappingURL=Accordion.js.map
@@ -113,5 +113,5 @@
113
113
  stroke-linejoin="round"
114
114
  />
115
115
  </svg>
116
- `;if (exports.default) module.exports = exports.default;exports.AddWorkCard=ae;//# sourceMappingURL=AddWorkCard.cjs.map
116
+ `;exports.AddWorkCard=ae;//# sourceMappingURL=AddWorkCard.cjs.map
117
117
  //# sourceMappingURL=AddWorkCard.cjs.map
@@ -0,0 +1,9 @@
1
+ import React__default from 'react';
2
+
3
+ type AddWorkCardProps = {
4
+ onClick: () => void;
5
+ backgroundImage?: string;
6
+ };
7
+ declare const AddWorkCard: ({ onClick, backgroundImage }: AddWorkCardProps) => React__default.JSX.Element;
8
+
9
+ export { AddWorkCard, type AddWorkCardProps };
@@ -0,0 +1,9 @@
1
+ import React__default from 'react';
2
+
3
+ type AddWorkCardProps = {
4
+ onClick: () => void;
5
+ backgroundImage?: string;
6
+ };
7
+ declare const AddWorkCard: ({ onClick, backgroundImage }: AddWorkCardProps) => React__default.JSX.Element;
8
+
9
+ export { AddWorkCard, type AddWorkCardProps };
@@ -113,5 +113,5 @@ import*as d from'react';import d__default,{useMemo}from'react';import {IconMap}f
113
113
  stroke-linejoin="round"
114
114
  />
115
115
  </svg>
116
- `;if (exports.default) module.exports = exports.default;export{ae as AddWorkCard};//# sourceMappingURL=AddWorkCard.js.map
116
+ `;export{ae as AddWorkCard};//# sourceMappingURL=AddWorkCard.js.map
117
117
  //# sourceMappingURL=AddWorkCard.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var p=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var p__default=/*#__PURE__*/_interopDefault(p);var c="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var a=p__default.default.forwardRef(({children:e,type:n="button",className:o,disabled:s,...t},r)=>p__default.default.createElement("button",{ref:r,type:n,disabled:s,className:l("appearance-none hover:opacity-80 transition-all active:scale-95",c,s&&"opacity-50 cursor-not-allowed",o),...t},e));a.displayName="Pressable";var m={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},x=e=>{if(!e)return {width:"48px",height:"48px"};let n=Array.isArray(e)?e:[e],o={},s;return n.forEach(t=>{if(typeof t=="number")s=`${t}px`;else {let[r,i]=t.split(":"),u=parseInt(i,10);o[`@media (minWidth: ${m[r]})`]=`${u}px`;}}),{width:s||"48px",height:s||"48px",...Object.entries(o).reduce((t,[r,i])=>({...t,[r]:{width:i,height:i}}),{})}},A=({src:e,size:n=48,onClick:o,...s})=>{let t=x(n),r=e?p__default.default.createElement("img",{src:e,alt:"avatar",className:"rounded-full",style:t,...s}):p__default.default.createElement("div",{style:t,className:"rounded-full bg-gray-200"});return o?p__default.default.createElement(a,{onClick:o,...s},r):r};if (exports.default) module.exports = exports.default;exports.Avatar=A;//# sourceMappingURL=Avatar.cjs.map
1
+ 'use strict';var p=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var p__default=/*#__PURE__*/_interopDefault(p);var c="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var a=p__default.default.forwardRef(({children:e,type:n="button",className:o,disabled:s,...t},r)=>p__default.default.createElement("button",{ref:r,type:n,disabled:s,className:l("appearance-none hover:opacity-80 transition-all active:scale-95",c,s&&"opacity-50 cursor-not-allowed",o),...t},e));a.displayName="Pressable";var m={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},x=e=>{if(!e)return {width:"48px",height:"48px"};let n=Array.isArray(e)?e:[e],o={},s;return n.forEach(t=>{if(typeof t=="number")s=`${t}px`;else {let[r,i]=t.split(":"),u=parseInt(i,10);o[`@media (minWidth: ${m[r]})`]=`${u}px`;}}),{width:s||"48px",height:s||"48px",...Object.entries(o).reduce((t,[r,i])=>({...t,[r]:{width:i,height:i}}),{})}},A=({src:e,size:n=48,onClick:o,...s})=>{let t=x(n),r=e?p__default.default.createElement("img",{src:e,alt:"avatar",className:"rounded-full",style:t,...s}):p__default.default.createElement("div",{style:t,className:"rounded-full bg-gray-200"});return o?p__default.default.createElement(a,{onClick:o,...s},r):r};exports.Avatar=A;//# sourceMappingURL=Avatar.cjs.map
2
2
  //# sourceMappingURL=Avatar.cjs.map
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { Pressable } from './Pressable.cjs';
3
+
4
+ type Breakpoint = "sm" | "md" | "lg" | "xl" | "2xl";
5
+ type ResponsiveSize = number | `${Breakpoint}:${number}`;
6
+ type AvatarProps = {
7
+ src?: string;
8
+ size?: ResponsiveSize | ResponsiveSize[];
9
+ } & Pick<React__default.ComponentProps<typeof Pressable>, "onClick">;
10
+ declare const Avatar: ({ src, size, onClick, ...props }: AvatarProps) => React__default.JSX.Element;
11
+
12
+ export { Avatar, type AvatarProps };
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { Pressable } from './Pressable.js';
3
+
4
+ type Breakpoint = "sm" | "md" | "lg" | "xl" | "2xl";
5
+ type ResponsiveSize = number | `${Breakpoint}:${number}`;
6
+ type AvatarProps = {
7
+ src?: string;
8
+ size?: ResponsiveSize | ResponsiveSize[];
9
+ } & Pick<React__default.ComponentProps<typeof Pressable>, "onClick">;
10
+ declare const Avatar: ({ src, size, onClick, ...props }: AvatarProps) => React__default.JSX.Element;
11
+
12
+ export { Avatar, type AvatarProps };
@@ -1,2 +1,2 @@
1
- import p from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';var c="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function l(...e){return twMerge(clsx(e))}var a=p.forwardRef(({children:e,type:n="button",className:o,disabled:s,...t},r)=>p.createElement("button",{ref:r,type:n,disabled:s,className:l("appearance-none hover:opacity-80 transition-all active:scale-95",c,s&&"opacity-50 cursor-not-allowed",o),...t},e));a.displayName="Pressable";var m={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},x=e=>{if(!e)return {width:"48px",height:"48px"};let n=Array.isArray(e)?e:[e],o={},s;return n.forEach(t=>{if(typeof t=="number")s=`${t}px`;else {let[r,i]=t.split(":"),u=parseInt(i,10);o[`@media (minWidth: ${m[r]})`]=`${u}px`;}}),{width:s||"48px",height:s||"48px",...Object.entries(o).reduce((t,[r,i])=>({...t,[r]:{width:i,height:i}}),{})}},A=({src:e,size:n=48,onClick:o,...s})=>{let t=x(n),r=e?p.createElement("img",{src:e,alt:"avatar",className:"rounded-full",style:t,...s}):p.createElement("div",{style:t,className:"rounded-full bg-gray-200"});return o?p.createElement(a,{onClick:o,...s},r):r};if (exports.default) module.exports = exports.default;export{A as Avatar};//# sourceMappingURL=Avatar.js.map
1
+ import p from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';var c="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2";function l(...e){return twMerge(clsx(e))}var a=p.forwardRef(({children:e,type:n="button",className:o,disabled:s,...t},r)=>p.createElement("button",{ref:r,type:n,disabled:s,className:l("appearance-none hover:opacity-80 transition-all active:scale-95",c,s&&"opacity-50 cursor-not-allowed",o),...t},e));a.displayName="Pressable";var m={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},x=e=>{if(!e)return {width:"48px",height:"48px"};let n=Array.isArray(e)?e:[e],o={},s;return n.forEach(t=>{if(typeof t=="number")s=`${t}px`;else {let[r,i]=t.split(":"),u=parseInt(i,10);o[`@media (minWidth: ${m[r]})`]=`${u}px`;}}),{width:s||"48px",height:s||"48px",...Object.entries(o).reduce((t,[r,i])=>({...t,[r]:{width:i,height:i}}),{})}},A=({src:e,size:n=48,onClick:o,...s})=>{let t=x(n),r=e?p.createElement("img",{src:e,alt:"avatar",className:"rounded-full",style:t,...s}):p.createElement("div",{style:t,className:"rounded-full bg-gray-200"});return o?p.createElement(a,{onClick:o,...s},r):r};export{A as Avatar};//# sourceMappingURL=Avatar.js.map
2
2
  //# sourceMappingURL=Avatar.js.map
@@ -1,2 +1,2 @@
1
- 'use strict';var i=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var i__namespace=/*#__PURE__*/_interopNamespace(i);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var u={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},x={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},E=e=>{if(!e)return {width:"24px",height:"24px"};let n=Array.isArray(e)?e:[e],t={},r;return n.forEach(o=>{if(typeof o=="number")r=`${o}px`;else {let[a,s]=o.split(":"),p=parseInt(s,10);t[`@media (min-width: ${x[a]})`]=`${p}px`;}}),{width:r||"24px",height:r||"24px",...Object.entries(t).reduce((o,[a,s])=>({...o,[a]:{width:s,height:s}}),{})}},T=i__namespace.default.forwardRef(({name:e,size:n=24,color:t="primary",title:r,className:o,style:a={},...s},p)=>{let m=icons.IconMap[e],c=E(n);return i__namespace.default.createElement("div",{className:l("flex justify-center items-center",o),style:{...c,"--icon-stroke":u[t],...a}},i__namespace.default.createElement(m,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:u[t],...s}))});T.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},A=e=>{let[n,t]=e.split("-");return n==="heading"?R[t]||"p":n==="label"?"label":"p"},C={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},S=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,o]=t.split(":");return `${r}:text-${o}`}return `text-${t}`}).join(" "):"text-body-default",g=i__namespace.default.forwardRef(({variant:e="body-default",color:n="primary",as:t,className:r,children:o,weight:a,...s},p)=>{let m=S(e),c=n==="inherit"?"text-inherit":`text-text-${n}`,H=i__namespace.default.useMemo(()=>{let f=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return A(f)},[e]);return i__namespace.default.createElement(t||H,{ref:p,className:`font-sans antialiased ${m} ${c} ${a?`!${C[a]}`:""} ${r??""}`,...s},o)});g.displayName="Text";var h={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},k=e=>{let n=Object.keys(h),t=e.split("").reduce((a,s)=>s.charCodeAt(0)+((a<<5)-a),0),r=Math.abs(t)%n.length,o=n[r];return console.log({input:e,hash:t,variantKeys:n,index:r,selectedVariant:o}),o},V=i__namespace.forwardRef(({className:e,variant:n,iconName:t,children:r,...o},a)=>{let s=n||(typeof r=="string"?k(r):"pink");return i__namespace.createElement("span",{ref:a,className:l("inline-flex items-center gap-2","rounded px-2 py-1.5","text-sm font-medium",h[s],e),...o},t&&i__namespace.createElement(T,{size:16,name:t}),i__namespace.createElement(g,{variant:"body-xxs-semibold",className:"mt-0.5"},r))});V.displayName="Badge";if (exports.default) module.exports = exports.default;exports.Badge=V;//# sourceMappingURL=Badge.cjs.map
1
+ 'use strict';var i=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),icons=require('@deckai/icons');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var i__namespace=/*#__PURE__*/_interopNamespace(i);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var u={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB",disabled:"#888888"},x={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},E=e=>{if(!e)return {width:"24px",height:"24px"};let n=Array.isArray(e)?e:[e],t={},r;return n.forEach(o=>{if(typeof o=="number")r=`${o}px`;else {let[a,s]=o.split(":"),p=parseInt(s,10);t[`@media (min-width: ${x[a]})`]=`${p}px`;}}),{width:r||"24px",height:r||"24px",...Object.entries(t).reduce((o,[a,s])=>({...o,[a]:{width:s,height:s}}),{})}},T=i__namespace.default.forwardRef(({name:e,size:n=24,color:t="primary",title:r,className:o,style:a={},...s},p)=>{let m=icons.IconMap[e],c=E(n);return i__namespace.default.createElement("div",{className:l("flex justify-center items-center",o),style:{...c,"--icon-stroke":u[t],...a}},i__namespace.default.createElement(m,{ref:p,"aria-hidden":!r,"aria-label":r,stroke:e.includes("filled")?void 0:u[t],...s}))});T.displayName="Icon";var R={xl:"h1",lg:"h1",md:"h2",sm:"h3",xs:"h4"},A=e=>{let[n,t]=e.split("-");return n==="heading"?R[t]||"p":n==="label"?"label":"p"},C={light:"font-light",regular:"font-regular",semibold:"font-semibold",bold:"font-bold"},S=e=>e?(Array.isArray(e)?e:[e]).map(t=>{if(t.includes(":")){let[r,o]=t.split(":");return `${r}:text-${o}`}return `text-${t}`}).join(" "):"text-body-default",g=i__namespace.default.forwardRef(({variant:e="body-default",color:n="primary",as:t,className:r,children:o,weight:a,...s},p)=>{let m=S(e),c=n==="inherit"?"text-inherit":`text-text-${n}`,H=i__namespace.default.useMemo(()=>{let f=typeof e=="string"?e.split(":").pop():Array.isArray(e)?e[0].split(":").pop():"body-default";return A(f)},[e]);return i__namespace.default.createElement(t||H,{ref:p,className:`font-sans antialiased ${m} ${c} ${a?`!${C[a]}`:""} ${r??""}`,...s},o)});g.displayName="Text";var h={pink:"bg-tertiary-5",orange:"bg-tertiary-15",green:"bg-tertiary-25",purple:"bg-secondary-300"},k=e=>{let n=Object.keys(h),t=e.split("").reduce((a,s)=>s.charCodeAt(0)+((a<<5)-a),0),r=Math.abs(t)%n.length,o=n[r];return console.log({input:e,hash:t,variantKeys:n,index:r,selectedVariant:o}),o},V=i__namespace.forwardRef(({className:e,variant:n,iconName:t,children:r,...o},a)=>{let s=n||(typeof r=="string"?k(r):"pink");return i__namespace.createElement("span",{ref:a,className:l("inline-flex items-center gap-2","rounded px-2 py-1.5","text-sm font-medium",h[s],e),...o},t&&i__namespace.createElement(T,{size:16,name:t}),i__namespace.createElement(g,{variant:"body-xxs-semibold",className:"mt-0.5"},r))});V.displayName="Badge";exports.Badge=V;//# sourceMappingURL=Badge.cjs.map
2
2
  //# sourceMappingURL=Badge.cjs.map