@deckai/deck-ui 0.0.12 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +129 -1
- package/dist/components/AboutCard.cjs +1 -9
- package/dist/components/AboutCard.cjs.map +1 -1
- package/dist/components/AboutCard.js +1 -9
- package/dist/components/AboutCard.js.map +1 -1
- package/dist/components/Accordion.cjs +2 -0
- package/dist/components/Accordion.cjs.map +1 -0
- package/dist/components/Accordion.js +2 -0
- package/dist/components/Accordion.js.map +1 -0
- package/dist/components/AddWorkCard.cjs +117 -0
- package/dist/components/AddWorkCard.cjs.map +1 -0
- package/dist/components/AddWorkCard.js +117 -0
- package/dist/components/AddWorkCard.js.map +1 -0
- package/dist/components/Avatar.cjs +1 -1
- package/dist/components/Avatar.cjs.map +1 -1
- package/dist/components/Avatar.js +1 -1
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/Badge.cjs +1 -1
- package/dist/components/Badge.cjs.map +1 -1
- package/dist/components/Badge.js +1 -1
- package/dist/components/Badge.js.map +1 -1
- package/dist/components/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs.cjs.map +1 -1
- package/dist/components/Breadcrumbs.js +1 -1
- package/dist/components/Breadcrumbs.js.map +1 -1
- package/dist/components/Button.cjs +2 -2
- package/dist/components/Button.cjs.map +1 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Carousel.cjs +2 -0
- package/dist/components/Carousel.cjs.map +1 -0
- package/dist/components/Carousel.js +2 -0
- package/dist/components/Carousel.js.map +1 -0
- package/dist/components/Collapsible.cjs +1 -1
- package/dist/components/Collapsible.cjs.map +1 -1
- package/dist/components/Collapsible.js +1 -1
- package/dist/components/Collapsible.js.map +1 -1
- package/dist/components/Combobox.cjs +1 -1
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.js +1 -1
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ContactItem.cjs +1 -1
- package/dist/components/ContactItem.cjs.map +1 -1
- package/dist/components/ContactItem.js +1 -1
- package/dist/components/ContactItem.js.map +1 -1
- package/dist/components/Dropdown.cjs +2 -0
- package/dist/components/Dropdown.cjs.map +1 -0
- package/dist/components/Dropdown.js +2 -0
- package/dist/components/Dropdown.js.map +1 -0
- package/dist/components/EditButton.cjs +2 -2
- package/dist/components/EditButton.cjs.map +1 -1
- package/dist/components/EditButton.js +2 -2
- package/dist/components/EditButton.js.map +1 -1
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.cjs.map +1 -1
- package/dist/components/Icon.js +1 -1
- package/dist/components/Icon.js.map +1 -1
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.cjs.map +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Link.cjs +1 -1
- package/dist/components/Link.cjs.map +1 -1
- package/dist/components/Link.js +1 -1
- package/dist/components/Link.js.map +1 -1
- package/dist/components/MultiSelectCombobox.cjs +2 -0
- package/dist/components/MultiSelectCombobox.cjs.map +1 -0
- package/dist/components/MultiSelectCombobox.js +2 -0
- package/dist/components/MultiSelectCombobox.js.map +1 -0
- package/dist/components/Navbar.cjs +2 -2
- package/dist/components/Navbar.cjs.map +1 -1
- package/dist/components/Navbar.js +2 -2
- package/dist/components/Navbar.js.map +1 -1
- package/dist/components/NavbarItem.cjs +1 -1
- package/dist/components/NavbarItem.cjs.map +1 -1
- package/dist/components/NavbarItem.js +1 -1
- package/dist/components/NavbarItem.js.map +1 -1
- package/dist/components/Option.cjs +1 -1
- package/dist/components/Option.cjs.map +1 -1
- package/dist/components/Option.js +1 -1
- package/dist/components/Option.js.map +1 -1
- package/dist/components/Pressable.cjs +1 -1
- package/dist/components/Pressable.cjs.map +1 -1
- package/dist/components/Pressable.js +1 -1
- package/dist/components/Pressable.js.map +1 -1
- package/dist/components/ProfileCard.cjs +1 -9
- package/dist/components/ProfileCard.cjs.map +1 -1
- package/dist/components/ProfileCard.js +1 -9
- package/dist/components/ProfileCard.js.map +1 -1
- package/dist/components/ProgressBar.cjs +2 -0
- package/dist/components/ProgressBar.cjs.map +1 -0
- package/dist/components/ProgressBar.js +2 -0
- package/dist/components/ProgressBar.js.map +1 -0
- package/dist/components/SegmentedTabs.cjs +10 -0
- package/dist/components/SegmentedTabs.cjs.map +1 -0
- package/dist/components/SegmentedTabs.js +10 -0
- package/dist/components/SegmentedTabs.js.map +1 -0
- package/dist/components/Sidebar.cjs +2 -0
- package/dist/components/Sidebar.cjs.map +1 -0
- package/dist/components/Sidebar.js +2 -0
- package/dist/components/Sidebar.js.map +1 -0
- package/dist/components/SocialCard.cjs +1 -1
- package/dist/components/SocialCard.cjs.map +1 -1
- package/dist/components/SocialCard.js +1 -1
- package/dist/components/SocialCard.js.map +1 -1
- package/dist/components/Spinner.cjs +1 -1
- package/dist/components/Spinner.cjs.map +1 -1
- package/dist/components/Spinner.js +1 -1
- package/dist/components/Spinner.js.map +1 -1
- package/dist/components/Switch.cjs +1 -1
- package/dist/components/Switch.cjs.map +1 -1
- package/dist/components/Switch.js +1 -1
- package/dist/components/Switch.js.map +1 -1
- package/dist/components/Tabs.cjs +9 -1
- package/dist/components/Tabs.cjs.map +1 -1
- package/dist/components/Tabs.js +9 -1
- package/dist/components/Tabs.js.map +1 -1
- package/dist/components/Tag.cjs +1 -1
- package/dist/components/Tag.cjs.map +1 -1
- package/dist/components/Tag.js +1 -1
- package/dist/components/Tag.js.map +1 -1
- package/dist/components/Text.cjs +1 -1
- package/dist/components/Text.cjs.map +1 -1
- package/dist/components/Text.js +1 -1
- package/dist/components/Text.js.map +1 -1
- package/dist/components/TextArea.cjs +2 -0
- package/dist/components/TextArea.cjs.map +1 -0
- package/dist/components/TextArea.js +2 -0
- package/dist/components/TextArea.js.map +1 -0
- package/dist/components/Toast.cjs +10 -0
- package/dist/components/Toast.cjs.map +1 -0
- package/dist/components/Toast.js +10 -0
- package/dist/components/Toast.js.map +1 -0
- package/dist/components/ToastProvider.cjs +2 -0
- package/dist/components/ToastProvider.cjs.map +1 -0
- package/dist/components/ToastProvider.js +2 -0
- package/dist/components/ToastProvider.js.map +1 -0
- package/dist/components/Tooltip.cjs +1 -1
- package/dist/components/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/components/WorkCard.cjs +1 -1
- package/dist/components/WorkCard.cjs.map +1 -1
- package/dist/components/WorkCard.js +1 -1
- package/dist/components/WorkCard.js.map +1 -1
- package/dist/index.cjs +111 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +111 -3
- package/dist/index.js.map +1 -1
- package/dist/styles/styles.css +1 -1
- package/package.json +8 -2
- package/dist/components/AboutCard.d.cts +0 -13
- package/dist/components/AboutCard.d.ts +0 -13
- package/dist/components/Avatar.d.cts +0 -12
- package/dist/components/Avatar.d.ts +0 -12
- package/dist/components/Badge.d.cts +0 -13
- package/dist/components/Badge.d.ts +0 -13
- package/dist/components/Breadcrumbs.d.cts +0 -15
- package/dist/components/Breadcrumbs.d.ts +0 -15
- package/dist/components/Button.d.cts +0 -38
- package/dist/components/Button.d.ts +0 -38
- package/dist/components/Collapsible.d.cts +0 -12
- package/dist/components/Collapsible.d.ts +0 -12
- package/dist/components/Combobox.d.cts +0 -14
- package/dist/components/Combobox.d.ts +0 -14
- package/dist/components/ContactItem.d.cts +0 -10
- package/dist/components/ContactItem.d.ts +0 -10
- package/dist/components/EditButton.d.cts +0 -12
- package/dist/components/EditButton.d.ts +0 -12
- package/dist/components/Icon.d.cts +0 -19
- package/dist/components/Icon.d.ts +0 -19
- package/dist/components/IconRenderer.d.cts +0 -13
- package/dist/components/IconRenderer.d.ts +0 -13
- package/dist/components/Illustration.d.cts +0 -10
- package/dist/components/Illustration.d.ts +0 -10
- package/dist/components/Input.d.cts +0 -14
- package/dist/components/Input.d.ts +0 -14
- package/dist/components/Link.d.cts +0 -13
- package/dist/components/Link.d.ts +0 -13
- package/dist/components/Logo.d.cts +0 -8
- package/dist/components/Logo.d.ts +0 -8
- package/dist/components/Navbar.d.cts +0 -19
- package/dist/components/Navbar.d.ts +0 -19
- package/dist/components/NavbarItem.d.cts +0 -13
- package/dist/components/NavbarItem.d.ts +0 -13
- package/dist/components/Option.d.cts +0 -11
- package/dist/components/Option.d.ts +0 -11
- package/dist/components/Pressable.d.cts +0 -6
- package/dist/components/Pressable.d.ts +0 -6
- package/dist/components/ProfileCard.d.cts +0 -17
- package/dist/components/ProfileCard.d.ts +0 -17
- package/dist/components/SocialCard.d.cts +0 -12
- package/dist/components/SocialCard.d.ts +0 -12
- package/dist/components/Spinner.d.cts +0 -19
- package/dist/components/Spinner.d.ts +0 -19
- package/dist/components/Switch.d.cts +0 -13
- package/dist/components/Switch.d.ts +0 -13
- package/dist/components/Tabs.d.cts +0 -16
- package/dist/components/Tabs.d.ts +0 -16
- package/dist/components/Tag.d.cts +0 -11
- package/dist/components/Tag.d.ts +0 -11
- package/dist/components/Text.d.cts +0 -46
- package/dist/components/Text.d.ts +0 -46
- package/dist/components/Tooltip.d.cts +0 -13
- package/dist/components/Tooltip.d.ts +0 -13
- package/dist/components/WorkCard.d.cts +0 -13
- package/dist/components/WorkCard.d.ts +0 -13
- package/dist/index.d.cts +0 -98
- package/dist/index.d.ts +0 -98
- package/dist/styles/fonts.d.cts +0 -2
- package/dist/styles/fonts.d.ts +0 -2
- package/dist/styles/styles.d.cts +0 -2
- package/dist/styles/styles.d.ts +0 -2
- package/dist/tailwind-BKauZ5Yx.d.cts +0 -35
- package/dist/tailwind-BKauZ5Yx.d.ts +0 -35
package/README.md
CHANGED
|
@@ -1 +1,129 @@
|
|
|
1
|
-
|
|
1
|
+
# how to consume `deck-ui`
|
|
2
|
+
|
|
3
|
+
Install `@deckai/deck-ui` via npm, yarn, or bun package managers. Since this is a privately scoped package, you'll need to be added to the `@deckai` organization on npm, and run `npm login` with your npm credentials.
|
|
4
|
+
|
|
5
|
+
Note: you'll need to have both `react` and `react-dom` installed in your project to use `deck-ui` as they are peer dependencies. No other dependencies are required.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @deckai/deck-ui
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## styles & fonts
|
|
12
|
+
|
|
13
|
+
Add the following to your `layout.tsx` file:
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import type { Metadata } from "next";
|
|
17
|
+
import "./globals.css";
|
|
18
|
+
import "@deckai/deck-ui/styles/styles.css";
|
|
19
|
+
import localFont from "next/font/local";
|
|
20
|
+
import { ToastProvider } from "@deckai/deck-ui";
|
|
21
|
+
const gilroy = localFont({
|
|
22
|
+
src: [
|
|
23
|
+
{
|
|
24
|
+
path: "../../node_modules/@deckai/deck-ui/dist/fonts/Gilroy-Light.ttf",
|
|
25
|
+
weight: "400",
|
|
26
|
+
style: "normal"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
path: "../../node_modules/@deckai/deck-ui/dist/fonts/Gilroy-Regular.ttf",
|
|
30
|
+
weight: "500",
|
|
31
|
+
style: "normal"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
path: "../../node_modules/@deckai/deck-ui/dist/fonts/Gilroy-Medium.ttf",
|
|
35
|
+
weight: "600",
|
|
36
|
+
style: "normal"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
path: "../../node_modules/@deckai/deck-ui/dist/fonts/Gilroy-Bold.ttf",
|
|
40
|
+
weight: "700",
|
|
41
|
+
style: "normal"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
variable: "--font-gilroy"
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export default function RootLayout({
|
|
48
|
+
children
|
|
49
|
+
}: Readonly<{
|
|
50
|
+
children: React.ReactNode;
|
|
51
|
+
}>) {
|
|
52
|
+
return (
|
|
53
|
+
<html lang="en" className={`${gilroy.variable} antialiased`}>
|
|
54
|
+
<body>
|
|
55
|
+
<ToastProvider>{children}</ToastProvider>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
export const metadata: Metadata = {
|
|
61
|
+
title: "Create Next App",
|
|
62
|
+
description: "Generated by create next app"
|
|
63
|
+
};
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
and update your `tailwind.config.ts` to include the font variable and extend the `deck-ui` theme. this allows you to use `deck-ui` colors, typography, and spacing presets in your app.
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import type { Config } from "tailwindcss";
|
|
70
|
+
import { tailwindConfig } from "@deckai/deck-ui";
|
|
71
|
+
|
|
72
|
+
export default {
|
|
73
|
+
content: [
|
|
74
|
+
"./src/**/*.{ts,tsx}",
|
|
75
|
+
"./node_modules/@deckai/deck-ui/dist/**/*.{js,mjs}"
|
|
76
|
+
],
|
|
77
|
+
presets: [tailwindConfig],
|
|
78
|
+
theme: {
|
|
79
|
+
extend: {
|
|
80
|
+
fontFamily: {
|
|
81
|
+
gilroy: ["var(--font-gilroy)"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
} satisfies Config;
|
|
86
|
+
import type { Config } from "tailwindcss";
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
See NextJS [docs](https://nextjs.org/docs/pages/building-your-application/optimizing/fonts#with-tailwind-css) for more options.
|
|
90
|
+
|
|
91
|
+
## next config
|
|
92
|
+
|
|
93
|
+
Update your `next.config.ts` to automatically transpile the `deck-ui` package.
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import type { NextConfig } from "next";
|
|
97
|
+
|
|
98
|
+
const nextConfig: NextConfig = {
|
|
99
|
+
transpilePackages: ["@deckai/deck-ui", "@deckai/icons"]
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export default nextConfig;
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`@deckai/icons` is a direct dependency of `@deckai/deck-ui`, so no additional configuration is needed to use it in your project.
|
|
106
|
+
|
|
107
|
+
## using components
|
|
108
|
+
|
|
109
|
+
next will handle all the tree shaking for you, so just import components from `@deckai/deck-ui/components/<COMPONENT>` directly.
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import { Button } from "@deckai/deck-ui/components/Button";
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Server Components Compatibility
|
|
116
|
+
|
|
117
|
+
The following components must be used within Client Components (you'll need to add the `'use client'` directive to the top of any file using these components):
|
|
118
|
+
|
|
119
|
+
- `Tabs`
|
|
120
|
+
- `Combobox`
|
|
121
|
+
- Any components using event handlers or React hooks
|
|
122
|
+
|
|
123
|
+
Example usage in a Client Component:
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
"use client";
|
|
127
|
+
|
|
128
|
+
import { Tabs } from "@deckai/deck-ui";
|
|
129
|
+
```
|
|
@@ -1,10 +1,2 @@
|
|
|
1
|
-
'use strict';var
|
|
2
|
-
sm:px-7 px-4
|
|
3
|
-
py-2
|
|
4
|
-
inline-flex items-center justify-center
|
|
5
|
-
rounded-lg
|
|
6
|
-
transition-colors duration-200
|
|
7
|
-
disabled:opacity-50 disabled:pointer-events-none
|
|
8
|
-
hover:opacity-80 active:scale-95
|
|
9
|
-
truncate`,f,t==="filled"?j[r]:M[r],e),disabled:i||o,type:"button",...n},typeof s=="string"?p__namespace.createElement(l,{variant:["sm:body-default-bold","body-xxs-semibold"],color:"inherit"},s):s));z.displayName="Button";var A={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},G={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},_=e=>{if(!e)return {width:"24px",height:"24px"};let t=Array.isArray(e)?e:[e],r={},o;return t.forEach(s=>{if(typeof s=="number")o=`${s}px`;else {let[i,n]=s.split(":"),a=parseInt(n,10);r[`@media (min-width: ${G[i]})`]=`${a}px`;}}),{width:o||"24px",height:o||"24px",...Object.entries(r).reduce((s,[i,n])=>({...s,[i]:{width:n,height:n}}),{})}},E=p__namespace.default.forwardRef(({name:e,size:t=24,color:r="primary",title:o,className:s,style:i={},...n},a)=>{let d=icons.IconMap[e],y=_(t);return p__namespace.default.createElement("div",{className:c("flex justify-center items-center",s),style:{...y,"--icon-stroke":A[r],...i}},p__namespace.default.createElement(d,{ref:a,"aria-hidden":!o,"aria-label":o,stroke:e.includes("filled")?void 0:A[r],...n}))});E.displayName="Icon";var g=({children:e,type:t="button",className:r,disabled:o,...s})=>p__namespace.default.createElement("button",{type:t,disabled:o,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${f} ${r} ${o?"opacity-50 cursor-not-allowed":""}`,...s},e);var L=({className:e,onClick:t})=>p__namespace.default.createElement(g,{className:c("absolute lg:top-10 md:top-8 top-4 lg:right-10 md:right-8 right-4 lg:px-2 lg:py-2 px-1 py-1 rounded-lg",M.black,e),onClick:t},p__namespace.default.createElement(E,{color:"primary",name:"edit-2"}));L.displayName="EditButton";var v=({children:e,maxHeight:t=100})=>{let[r,o]=p__namespace.default.useState(!1),s=p.useRef(null),[i,n]=p.useState(t);p.useLayoutEffect(()=>{if(!s.current)return;let d=new ResizeObserver(y=>{for(let x of y)n(x.target.scrollHeight);});return d.observe(s.current),()=>d.disconnect()},[]);let a=i>t;return p__namespace.default.createElement(h__namespace.Root,{open:r,onOpenChange:o},p__namespace.default.createElement("div",{className:"relative"},p__namespace.default.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:r?`${i}px`:`${t}px`}},p__namespace.default.createElement("div",{ref:s,className:"w-full"},e)),a&&p__namespace.default.createElement(h__namespace.Trigger,{asChild:!0},p__namespace.default.createElement(g,{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")},p__namespace.default.createElement(l,{variant:"label-default",color:"text-secondary"},r?"See less":"See more")))))};v.displayName="Collapsible";var je=({interests:e,contactItems:t,description:r,isEditMode:o=!1,onEditClick:s,...i})=>p__namespace.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},o&&p__namespace.default.createElement(L,{onClick:s}),p__namespace.default.createElement("div",{className:"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0"},p__namespace.default.createElement(v,{maxHeight:120},p__namespace.default.createElement(l,{variant:"body-default"},r))),p__namespace.default.createElement("span",{className:"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10"}),p__namespace.default.createElement("span",{className:"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10"}),p__namespace.default.createElement("div",{className:"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8"},t.map(n=>p__namespace.default.createElement(R,{key:n.title,...n}))));if (exports.default) module.exports = exports.default;exports.AboutCard=je;//# 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[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
|
|
10
2
|
//# sourceMappingURL=AboutCard.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Text.tsx","../../src/components/IconRenderer.tsx","../../src/components/ContactItem.tsx","../../src/components/EditButton.tsx","../../src/utils/index.ts","../../src/utils/tailwind.ts","../../src/components/Button.tsx","../../src/components/Icon.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","ContactItem","href","linkProps","cn","inputs","twMerge","clsx","focusRingStyles","filled","outlined","Button","u","isLoading","disabled","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","valueStr","value","acc","query","Icon","name","title","style","IconComponent","IconMap","sizeStyles","Pressable","type","EditButton","onClick","Collapsible","maxHeight","open","setOpen","contentRef","useRef","contentHeight","setContentHeight","useState","useLayoutEffect","resizeObserver","entries","entry","shouldShowTrigger","h","AboutCard","interests","contactItems","description","isEditMode","onEditClick","contactProps"],"mappings":"kkBA4FA,IAAMA,CAAmD,CAAA,CACvD,EAAI,CAAA,IAAA,CACJ,EAAI,CAAA,IAAA,CACJ,GAAI,IACJ,CAAA,EAAA,CAAI,IACJ,CAAA,EAAA,CAAI,IACN,CAAA,CAEMC,EAAyBC,CAAwC,EAAA,CACrE,GAAM,CAACC,CAAUC,CAAAA,CAAI,EAAIF,CAAQ,CAAA,KAAA,CAAM,GAAG,CAAA,CAE1C,OAAIC,CAAAA,GAAa,UACRH,CAAoBI,CAAAA,CAAI,CAAK,EAAA,GAAA,CAGlCD,CAAa,GAAA,OAAA,CACR,QAGF,GACT,CAAA,CAIME,CAAqC,CAAA,CACzC,KAAO,CAAA,YAAA,CACP,QAAS,cACT,CAAA,QAAA,CAAU,eACV,CAAA,IAAA,CAAM,WACR,CAAA,CAiBMC,EACJC,CAEKA,EAAA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,CAAA,cAAA,CAAA,CAAgByE,CAAY,CAC5C,CACF,CAAA,CAEAxE,oBAAA,CAAA,aAAA,CAAC,QAAK,SAAU,CAAA,yEAAA,CAA0E,CAE1FA,CAAAA,oBAAAA,CAAA,aAAC,CAAA,MAAA,CAAA,CAAK,SAAU,CAAA,2DAAA,CAA4D,EAC5EA,oBAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,2CACZuE,CAAAA,CAAAA,CAAAA,CAAa,GAAKI,CAAAA,CAAAA,EACjB3E,qBAAA,aAACkB,CAAAA,CAAAA,CAAA,CAAY,GAAA,CAAKyD,EAAa,KAAQ,CAAA,GAAGA,CAAc,CAAA,CACzD,CACH,CACF","file":"AboutCard.cjs","sourcesContent":["import React from \"react\";\nimport {\n Colors,\n TextColorVariant,\n PrimaryShades,\n SecondaryShades,\n TertiaryShades,\n Typography\n} 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 ColorCategory = keyof Omit<Colors, \"stroke\" | \"background\">;\ntype ColorValue<T extends ColorCategory> = T extends \"text\"\n ? TextColorVariant\n : T extends \"primary\"\n ? keyof PrimaryShades\n : T extends \"secondary\"\n ? keyof SecondaryShades\n : T extends \"tertiary\"\n ? keyof TertiaryShades\n : never;\n\ntype ColorKey = {\n [T in ColorCategory]: `${T}-${ColorValue<T>}`;\n}[ColorCategory];\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\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\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: ColorKey | \"inherit\";\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 = \"text-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 && color === \"inherit\" ? \"inherit\" : color ? `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, { HTMLAttributes } from \"react\";\nimport { Text } from \"./Text\";\nimport { IconRenderer } from \"./IconRenderer\";\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={24} className=\"text-primary\" />\n </div>\n <Text\n className=\"hover:underline\"\n as=\"a\"\n href={href}\n {...linkProps}\n variant={[\"body-default-semibold\", \"md:body-default-medium\"]}\n >\n {children}\n </Text>\n </div>\n);\n","import React from \"react\";\nimport { cn } from \"../utils\";\nimport { outlined } from \"./Button\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type EditButtonProps = {\n className?: string;\n onClick?: () => void;\n};\n\nexport const EditButton = ({ className, onClick }: EditButtonProps) => {\n return (\n <Pressable\n className={cn(\n \"absolute lg:top-10 md:top-8 top-4 lg:right-10 md:right-8 right-4 lg:px-2 lg:py-2 px-1 py-1 rounded-lg\",\n outlined.black,\n className\n )}\n onClick={onClick}\n >\n <Icon color=\"primary\" name=\"edit-2\" />\n </Pressable>\n );\n};\n\nEditButton.displayName = \"EditButton\";\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 * as React from \"react\";\nimport { Text } from \"./Text\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type ButtonProps = {\n /** @default filled */\n variant?: \"filled\" | \"outlined\";\n /** @default primary */\n color?: \"black\" | \"accent\" | \"secondary\";\n isLoading?: boolean;\n children: React.ReactNode;\n className?: string;\n disabled?: boolean;\n start?: React.ReactNode;\n end?: React.ReactNode;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const filled = {\n black: \"bg-text-primary text-white\",\n // fade it slightly\n accent: \"bg-primary-100 text-white\",\n secondary: \"bg-secondary-100 text-secondary\"\n};\n\nexport const outlined = {\n black: \"border border-text-primary text-text-primary\",\n accent: \"border border-primary-100 text-primary-100\",\n secondary: \"border border-text-secondary text-secondary\"\n};\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = \"filled\",\n color = \"black\",\n isLoading = false,\n children,\n disabled,\n ...props\n },\n ref\n ) => (\n <button\n ref={ref}\n className={cn(\n `\n sm:px-7 px-4\n py-2\n inline-flex items-center justify-center\n rounded-lg \n transition-colors duration-200\n disabled:opacity-50 disabled:pointer-events-none\n hover:opacity-80 active:scale-95 \n truncate`,\n focusRingStyles,\n variant === \"filled\" ? filled[color] : outlined[color],\n className\n )}\n disabled={disabled || isLoading}\n type=\"button\"\n {...props}\n >\n {typeof children === \"string\" ? (\n <Text\n variant={[\"sm:body-default-bold\", \"body-xxs-semibold\"]}\n color=\"inherit\"\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </button>\n )\n);\n\nButton.displayName = \"Button\";\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\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=\"text-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 {isEditMode && <EditButton onClick={onEditClick} />}\n <div className=\"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0\">\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/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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AAA,CAAQ,gBAAgBiD,CAAY,CAC5C,CACF,CAEAhD,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,2CACZ+C,CAAAA,CAAAA,CAAAA,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,10 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
sm:px-7 px-4
|
|
3
|
-
py-2
|
|
4
|
-
inline-flex items-center justify-center
|
|
5
|
-
rounded-lg
|
|
6
|
-
transition-colors duration-200
|
|
7
|
-
disabled:opacity-50 disabled:pointer-events-none
|
|
8
|
-
hover:opacity-80 active:scale-95
|
|
9
|
-
truncate`,f,t==="filled"?j[r]:M[r],e),disabled:i||o,type:"button",...n},typeof s=="string"?p.createElement(l,{variant:["sm:body-default-bold","body-xxs-semibold"],color:"inherit"},s):s));z.displayName="Button";var A={primary:"#080808",secondary:"#666666",white:"#ffffff",primaryBlue:"#089CCB"},G={sm:"640px",md:"768px",lg:"1024px",xl:"1280px","2xl":"1536px"},_=e=>{if(!e)return {width:"24px",height:"24px"};let t=Array.isArray(e)?e:[e],r={},o;return t.forEach(s=>{if(typeof s=="number")o=`${s}px`;else {let[i,n]=s.split(":"),a=parseInt(n,10);r[`@media (min-width: ${G[i]})`]=`${a}px`;}}),{width:o||"24px",height:o||"24px",...Object.entries(r).reduce((s,[i,n])=>({...s,[i]:{width:n,height:n}}),{})}},E=p__default.forwardRef(({name:e,size:t=24,color:r="primary",title:o,className:s,style:i={},...n},a)=>{let d=IconMap[e],y=_(t);return p__default.createElement("div",{className:c("flex justify-center items-center",s),style:{...y,"--icon-stroke":A[r],...i}},p__default.createElement(d,{ref:a,"aria-hidden":!o,"aria-label":o,stroke:e.includes("filled")?void 0:A[r],...n}))});E.displayName="Icon";var g=({children:e,type:t="button",className:r,disabled:o,...s})=>p__default.createElement("button",{type:t,disabled:o,className:`appearance-none hover:opacity-80 transition-all active:scale-95 ${f} ${r} ${o?"opacity-50 cursor-not-allowed":""}`,...s},e);var L=({className:e,onClick:t})=>p__default.createElement(g,{className:c("absolute lg:top-10 md:top-8 top-4 lg:right-10 md:right-8 right-4 lg:px-2 lg:py-2 px-1 py-1 rounded-lg",M.black,e),onClick:t},p__default.createElement(E,{color:"primary",name:"edit-2"}));L.displayName="EditButton";var v=({children:e,maxHeight:t=100})=>{let[r,o]=p__default.useState(!1),s=useRef(null),[i,n]=useState(t);useLayoutEffect(()=>{if(!s.current)return;let d=new ResizeObserver(y=>{for(let x of y)n(x.target.scrollHeight);});return d.observe(s.current),()=>d.disconnect()},[]);let a=i>t;return p__default.createElement(h.Root,{open:r,onOpenChange:o},p__default.createElement("div",{className:"relative"},p__default.createElement("div",{className:"overflow-hidden transition-[height] duration-300 ease-in-out",style:{height:r?`${i}px`:`${t}px`}},p__default.createElement("div",{ref:s,className:"w-full"},e)),a&&p__default.createElement(h.Trigger,{asChild:!0},p__default.createElement(g,{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")},p__default.createElement(l,{variant:"label-default",color:"text-secondary"},r?"See less":"See more")))))};v.displayName="Collapsible";var je=({interests:e,contactItems:t,description:r,isEditMode:o=!1,onEditClick:s,...i})=>p__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},o&&p__default.createElement(L,{onClick:s}),p__default.createElement("div",{className:"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0"},p__default.createElement(v,{maxHeight:120},p__default.createElement(l,{variant:"body-default"},r))),p__default.createElement("span",{className:"hidden sm:block absolute bg-secondary-50 w-[1px] inset-x-1/2 inset-y-10"}),p__default.createElement("span",{className:"block sm:hidden bg-secondary-50 w-full h-[1px] inset-x-10"}),p__default.createElement("div",{className:"flex flex-col gap-4 sm:pl-10 pt-6 sm:pt-8"},t.map(n=>p__default.createElement(R,{key:n.title,...n}))));if (exports.default) module.exports = exports.default;export{je 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[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
|
|
10
2
|
//# sourceMappingURL=AboutCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/Text.tsx","../../src/components/IconRenderer.tsx","../../src/components/ContactItem.tsx","../../src/components/EditButton.tsx","../../src/utils/index.ts","../../src/utils/tailwind.ts","../../src/components/Button.tsx","../../src/components/Icon.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","ContactItem","href","linkProps","cn","inputs","twMerge","clsx","focusRingStyles","filled","outlined","Button","u","isLoading","disabled","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","valueStr","value","acc","query","Icon","name","title","style","IconComponent","IconMap","sizeStyles","Pressable","type","EditButton","onClick","Collapsible","maxHeight","open","setOpen","contentRef","useRef","contentHeight","setContentHeight","useState","useLayoutEffect","resizeObserver","entries","entry","shouldShowTrigger","AboutCard","interests","contactItems","description","isEditMode","onEditClick","contactProps"],"mappings":"8OA4FA,IAAMA,CAAmD,CAAA,CACvD,EAAI,CAAA,IAAA,CACJ,EAAI,CAAA,IAAA,CACJ,GAAI,IACJ,CAAA,EAAA,CAAI,IACJ,CAAA,EAAA,CAAI,IACN,CAAA,CAEMC,EAAyBC,CAAwC,EAAA,CACrE,GAAM,CAACC,CAAUC,CAAAA,CAAI,EAAIF,CAAQ,CAAA,KAAA,CAAM,GAAG,CAAA,CAE1C,OAAIC,CAAAA,GAAa,UACRH,CAAoBI,CAAAA,CAAI,CAAK,EAAA,GAAA,CAGlCD,CAAa,GAAA,OAAA,CACR,QAGF,GACT,CAAA,CAIME,CAAqC,CAAA,CACzC,KAAO,CAAA,YAAA,CACP,QAAS,cACT,CAAA,QAA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A,CAAAA,CAAA,CAAK,OAAQ,CAAA,cAAA,CAAA,CAAgBwE,CAAY,CAC5C,CACF,CAAA,CAEAvE,UAAA,CAAA,aAAA,CAAC,QAAK,SAAU,CAAA,yEAAA,CAA0E,CAE1FA,CAAAA,UAAAA,CAAA,aAAC,CAAA,MAAA,CAAA,CAAK,SAAU,CAAA,2DAAA,CAA4D,EAC5EA,UAAA,CAAA,aAAA,CAAC,KAAI,CAAA,CAAA,SAAA,CAAU,2CACZsE,CAAAA,CAAAA,CAAAA,CAAa,GAAKI,CAAAA,CAAAA,EACjB1E,WAAA,aAACkB,CAAAA,CAAAA,CAAA,CAAY,GAAA,CAAKwD,EAAa,KAAQ,CAAA,GAAGA,CAAc,CAAA,CACzD,CACH,CACF","file":"AboutCard.js","sourcesContent":["import React from \"react\";\nimport {\n Colors,\n TextColorVariant,\n PrimaryShades,\n SecondaryShades,\n TertiaryShades,\n Typography\n} 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 ColorCategory = keyof Omit<Colors, \"stroke\" | \"background\">;\ntype ColorValue<T extends ColorCategory> = T extends \"text\"\n ? TextColorVariant\n : T extends \"primary\"\n ? keyof PrimaryShades\n : T extends \"secondary\"\n ? keyof SecondaryShades\n : T extends \"tertiary\"\n ? keyof TertiaryShades\n : never;\n\ntype ColorKey = {\n [T in ColorCategory]: `${T}-${ColorValue<T>}`;\n}[ColorCategory];\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\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\n// Update TextProps to use ResponsiveVariant\nexport type TextProps<T extends TextElement = \"p\"> = {\n variant?: ResponsiveVariant | ResponsiveVariant[];\n color?: ColorKey | \"inherit\";\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 = \"text-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 && color === \"inherit\" ? \"inherit\" : color ? `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, { HTMLAttributes } from \"react\";\nimport { Text } from \"./Text\";\nimport { IconRenderer } from \"./IconRenderer\";\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={24} className=\"text-primary\" />\n </div>\n <Text\n className=\"hover:underline\"\n as=\"a\"\n href={href}\n {...linkProps}\n variant={[\"body-default-semibold\", \"md:body-default-medium\"]}\n >\n {children}\n </Text>\n </div>\n);\n","import React from \"react\";\nimport { cn } from \"../utils\";\nimport { outlined } from \"./Button\";\nimport { Icon } from \"./Icon\";\nimport { Pressable } from \"./Pressable\";\n\nexport type EditButtonProps = {\n className?: string;\n onClick?: () => void;\n};\n\nexport const EditButton = ({ className, onClick }: EditButtonProps) => {\n return (\n <Pressable\n className={cn(\n \"absolute lg:top-10 md:top-8 top-4 lg:right-10 md:right-8 right-4 lg:px-2 lg:py-2 px-1 py-1 rounded-lg\",\n outlined.black,\n className\n )}\n onClick={onClick}\n >\n <Icon color=\"primary\" name=\"edit-2\" />\n </Pressable>\n );\n};\n\nEditButton.displayName = \"EditButton\";\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 * as React from \"react\";\nimport { Text } from \"./Text\";\nimport { focusRingStyles } from \"../utils/tailwind\";\nimport { cn } from \"../utils\";\n\nexport type ButtonProps = {\n /** @default filled */\n variant?: \"filled\" | \"outlined\";\n /** @default primary */\n color?: \"black\" | \"accent\" | \"secondary\";\n isLoading?: boolean;\n children: React.ReactNode;\n className?: string;\n disabled?: boolean;\n start?: React.ReactNode;\n end?: React.ReactNode;\n} & React.ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const filled = {\n black: \"bg-text-primary text-white\",\n // fade it slightly\n accent: \"bg-primary-100 text-white\",\n secondary: \"bg-secondary-100 text-secondary\"\n};\n\nexport const outlined = {\n black: \"border border-text-primary text-text-primary\",\n accent: \"border border-primary-100 text-primary-100\",\n secondary: \"border border-text-secondary text-secondary\"\n};\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n className,\n variant = \"filled\",\n color = \"black\",\n isLoading = false,\n children,\n disabled,\n ...props\n },\n ref\n ) => (\n <button\n ref={ref}\n className={cn(\n `\n sm:px-7 px-4\n py-2\n inline-flex items-center justify-center\n rounded-lg \n transition-colors duration-200\n disabled:opacity-50 disabled:pointer-events-none\n hover:opacity-80 active:scale-95 \n truncate`,\n focusRingStyles,\n variant === \"filled\" ? filled[color] : outlined[color],\n className\n )}\n disabled={disabled || isLoading}\n type=\"button\"\n {...props}\n >\n {typeof children === \"string\" ? (\n <Text\n variant={[\"sm:body-default-bold\", \"body-xxs-semibold\"]}\n color=\"inherit\"\n >\n {children}\n </Text>\n ) : (\n children\n )}\n </button>\n )\n);\n\nButton.displayName = \"Button\";\n","import React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","import React, { ButtonHTMLAttributes } from \"react\";\nimport { focusRingStyles } from \"../utils/tailwind\";\n\nexport type PressableProps = ButtonHTMLAttributes<HTMLButtonElement>;\n\nexport const Pressable: React.FC<PressableProps> = ({\n children,\n type = \"button\",\n className,\n disabled,\n ...props\n}) => (\n <button\n // eslint-disable-next-line react/butt on-has-type\n type={type}\n disabled={disabled}\n className={`appearance-none hover:opacity-80 transition-all active:scale-95 ${focusRingStyles} ${className} ${disabled ? \"opacity-50 cursor-not-allowed\" : \"\"}`}\n {...props}\n >\n {children}\n </button>\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=\"text-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 {isEditMode && <EditButton onClick={onEditClick} />}\n <div className=\"flex sm:basis-1/2 basis-full flex-col gap-2 sm:pr-10 pb-6 sm:pb-0\">\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/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,OAA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gD,CAAY,CAC5C,CACF,CAEA/C,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,2CACZ8C,CAAAA,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"]}
|
|
@@ -0,0 +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
|
|
2
|
+
//# sourceMappingURL=Accordion.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/index.ts","../../src/components/Icon.tsx","../../src/components/Text.tsx","../../src/components/Accordion.tsx"],"names":["cn","inputs","twMerge","clsx","COLOR_MAP","BREAKPOINT_MAP","processSizes","sizes","sizeArray","mediaQueries","baseSize","size","breakpoint","valueStr","value","acc","query","Icon","React","name","color","title","className","style","props","ref","IconComponent","IconMap","sizeStyles","HEADING_ELEMENT_MAP","getElementFromVariant","variant","category","fontWeight","processVariants","variants","typographyClass","Text","as","children","weight","typographyClasses","colorClasses","suggestedElement","baseVariant","Accordion","n","items","type","defaultValue","onValueChange","c","item"],"mappings":"gkBAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCcA,IAAMG,CAAwC,CAAA,CAC5C,OAAS,CAAA,SAAA,CACT,SAAW,CAAA,SAAA,CACX,KAAO,CAAA,SAAA,CACP,YAAa,SACb,CAAA,QAAA,CAAU,SACZ,CAAA,CAEMC,CAA6C,CAAA,CACjD,EAAI,CAAA,OAAA,CACJ,GAAI,OACJ,CAAA,EAAA,CAAI,QACJ,CAAA,EAAA,CAAI,QACJ,CAAA,KAAA,CAAO,QACT,CAAA,CAEMC,EACJC,CACwB,EAAA,CACxB,GAAI,CAACA,EAAO,OAAO,CAAE,KAAO,CAAA,MAAA,CAAQ,OAAQ,MAAO,CAAA,CAEnD,IAAMC,CAAAA,CAAY,KAAM,CAAA,OAAA,CAAQD,CAAK,CAAA,CAAIA,EAAQ,CAACA,CAAK,CACjDE,CAAAA,CAAAA,CAAuC,EAAC,CAC1CC,CAGJ,CAAA,OAAAF,EAAU,OAASG,CAAAA,CAAAA,EAAS,CAC1B,GAAI,OAAOA,CAAAA,EAAS,QAClBD,CAAAA,CAAAA,CAAW,GAAGC,CAAI,CAAA,EAAA,CAAA,CAAA,KACb,CACL,GAAM,CAACC,CAAAA,CAAYC,CAAQ,CAAA,CAAIF,EAAK,KAAM,CAAA,GAAG,CACvCG,CAAAA,CAAAA,CAAQ,QAASD,CAAAA,CAAAA,CAAU,EAAE,CAAA,CACnCJ,EAAa,CAAsBJ,mBAAAA,EAAAA,CA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AEA8C,YAAC,CAAA,aAAA,CAAA,KAAA,CAAA,CAAI,UAAU,WAAaM,CAAAA,CAAAA,CAAAA,CAAK,OAAQ,CAC3C,CACF,CACD,CACH,CAGN,EAEAP,EAAU,WAAc,CAAA,WAAA","file":"Accordion.cjs","sourcesContent":["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 React, { SVGProps } from \"react\";\nimport { IconName, IconMap } from \"@deckai/icons\";\nimport { IconColors } from \"../types/tailwind\";\nimport { cn } from \"../utils\";\n\ntype Breakpoint = \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\ntype ResponsiveSize = number | `${Breakpoint}:${number}`;\n\nexport type IconProps = {\n name: IconName;\n /** @default 24 */\n size?: ResponsiveSize | ResponsiveSize[];\n /** @default primary */\n color?: IconColors;\n title?: string;\n className?: string;\n style?: React.CSSProperties;\n} & Omit<SVGProps<SVGSVGElement>, \"aria-hidden\" | \"aria-label\">;\n\nconst COLOR_MAP: Record<IconColors, string> = {\n primary: \"#080808\",\n secondary: \"#666666\",\n white: \"#ffffff\",\n primaryBlue: \"#089CCB\",\n disabled: \"#888888\"\n};\n\nconst BREAKPOINT_MAP: Record<Breakpoint, string> = {\n sm: \"640px\",\n md: \"768px\",\n lg: \"1024px\",\n xl: \"1280px\",\n \"2xl\": \"1536px\"\n};\n\nconst processSizes = (\n sizes: ResponsiveSize | ResponsiveSize[] | undefined\n): React.CSSProperties => {\n if (!sizes) return { width: \"24px\", height: \"24px\" };\n\n const sizeArray = Array.isArray(sizes) ? sizes : [sizes];\n const mediaQueries: Record<string, string> = {};\n let baseSize: string | undefined;\n\n // Process each size\n sizeArray.forEach((size) => {\n if (typeof size === \"number\") {\n baseSize = `${size}px`;\n } else {\n const [breakpoint, valueStr] = size.split(\":\") as [Breakpoint, string];\n const value = parseInt(valueStr, 10);\n mediaQueries[`@media (min-width: ${BREAKPOINT_MAP[breakpoint]})`] =\n `${value}px`;\n }\n });\n\n // Create the style object with the correct structure\n return {\n width: baseSize || \"24px\",\n height: baseSize || \"24px\",\n ...Object.entries(mediaQueries).reduce(\n (acc, [query, size]) => ({\n ...acc,\n [query]: {\n width: size,\n height: size\n }\n }),\n {}\n )\n };\n};\n\nexport const Icon = React.forwardRef<SVGSVGElement, IconProps>(\n (\n {\n name,\n size = 24,\n color = \"primary\",\n title,\n className,\n style = {},\n ...props\n },\n ref\n ) => {\n const IconComponent = IconMap[name];\n const sizeStyles = processSizes(size);\n\n return (\n <div\n className={cn(\"flex justify-center items-center\", className)}\n style={{\n ...sizeStyles,\n [\"--icon-stroke\" as string]: COLOR_MAP[color],\n ...style\n }}\n >\n <IconComponent\n ref={ref}\n aria-hidden={!title}\n aria-label={title}\n stroke={name.includes(\"filled\") ? undefined : COLOR_MAP[color]}\n {...props}\n />\n </div>\n );\n }\n);\n\nIcon.displayName = \"Icon\";\n","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 * as React from \"react\";\nimport * as AccordionPrimitive from \"@radix-ui/react-accordion\";\nimport { cn } from \"../utils\";\nimport { Icon } from \"./Icon\";\nimport { Text } from \"./Text\";\n\nexport type AccordionItem = {\n value: string;\n title: React.ReactNode;\n content: React.ReactNode;\n disabled?: boolean;\n};\n\nexport type AccordionProps = {\n /** Array of items to show in the accordion */\n items: AccordionItem[];\n /** Type of accordion (single item open or multiple) */\n type?:\n | AccordionPrimitive.AccordionSingleProps[\"type\"]\n | AccordionPrimitive.AccordionMultipleProps[\"type\"];\n /** Default value(s) to be expanded */\n defaultValue?:\n | AccordionPrimitive.AccordionSingleProps[\"defaultValue\"]\n | AccordionPrimitive.AccordionMultipleProps[\"defaultValue\"];\n /** Current value(s) for controlled component */\n value?:\n | AccordionPrimitive.AccordionSingleProps[\"value\"]\n | AccordionPrimitive.AccordionMultipleProps[\"value\"];\n /** Callback when value changes */\n onValueChange?:\n | AccordionPrimitive.AccordionSingleProps[\"onValueChange\"]\n | AccordionPrimitive.AccordionMultipleProps[\"onValueChange\"];\n /** Optional className for custom styling */\n className?: string;\n};\n\nexport const Accordion = React.forwardRef<\n React.ElementRef<typeof AccordionPrimitive.Root>,\n AccordionProps\n>(\n (\n {\n items,\n type = \"single\",\n defaultValue,\n value,\n onValueChange,\n className,\n ...props\n },\n ref\n ) => {\n return (\n // @ts-expect-error TODO: Fix this\n <AccordionPrimitive.Root\n ref={ref}\n type={type}\n defaultValue={defaultValue}\n value={value}\n onValueChange={onValueChange}\n className={cn(\"w-full\", className)}\n {...props}\n >\n {items.map((item) => (\n <AccordionPrimitive.Item\n key={item.value}\n value={item.value}\n disabled={item.disabled}\n className=\"w-full\"\n >\n <AccordionPrimitive.Header>\n <AccordionPrimitive.Trigger\n className={cn(\n \"flex w-full items-center gap-2 justify-between px-3 py-2 rounded bg-background-50 hover:bg-background-100 mt-4\",\n \"disabled:cursor-not-allowed\",\n \"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-100\"\n )}\n >\n <div className=\"flex items-center gap-3\">\n <Text\n variant=\"body-default-semibold\"\n className={item.disabled ? \"text-text-disabled\" : \"\"}\n >\n {item.title}\n </Text>\n </div>\n <Icon\n name=\"arrow-down\"\n size={18}\n aria-hidden\n color={item.disabled ? \"disabled\" : \"primary\"}\n className=\"transition-transform duration-200 data-[state=open]:rotate-180\"\n />\n </AccordionPrimitive.Trigger>\n </AccordionPrimitive.Header>\n <AccordionPrimitive.Content\n className={cn(\n \"overflow-hidden will-change-[height] data-[state=open]:animate-accordion-down data-[state=closed]:animate-accordion-up\"\n )}\n >\n <div className=\"py-2 px-3\">{item.content}</div>\n </AccordionPrimitive.Content>\n </AccordionPrimitive.Item>\n ))}\n </AccordionPrimitive.Root>\n );\n }\n);\n\nAccordion.displayName = \"Accordion\";\n"]}
|
|
@@ -0,0 +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
|
|
2
|
+
//# sourceMappingURL=Accordion.js.map
|