@popgrids/ui 0.0.7 → 0.0.9
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 +15 -9
- package/dist/button.cjs +2 -0
- package/dist/button.cjs.map +1 -0
- package/dist/button.d.cts +27 -0
- package/dist/button.d.ts +27 -0
- package/dist/button.js +2 -0
- package/dist/button.js.map +1 -0
- package/dist/content-block.cjs +2 -0
- package/dist/content-block.cjs.map +1 -0
- package/dist/content-block.d.cts +12 -0
- package/dist/content-block.d.ts +12 -0
- package/dist/content-block.js +2 -0
- package/dist/content-block.js.map +1 -0
- package/dist/dialog.cjs +2 -0
- package/dist/dialog.cjs.map +1 -0
- package/dist/dialog.d.cts +19 -0
- package/dist/dialog.d.ts +19 -0
- package/dist/dialog.js +2 -0
- package/dist/dialog.js.map +1 -0
- package/dist/dropdown-menu.cjs +2 -0
- package/dist/dropdown-menu.cjs.map +1 -0
- package/dist/dropdown-menu.d.cts +28 -0
- package/dist/dropdown-menu.d.ts +28 -0
- package/dist/dropdown-menu.js +2 -0
- package/dist/dropdown-menu.js.map +1 -0
- package/dist/footer.cjs +3 -0
- package/dist/footer.cjs.map +1 -0
- package/dist/footer.d.cts +11 -0
- package/dist/footer.d.ts +11 -0
- package/dist/footer.js +3 -0
- package/dist/footer.js.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -34
- package/dist/index.d.ts +15 -34
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +2 -0
- package/dist/input.cjs.map +1 -0
- package/dist/input.d.cts +6 -0
- package/dist/input.d.ts +6 -0
- package/dist/input.js +2 -0
- package/dist/input.js.map +1 -0
- package/dist/label.cjs +2 -0
- package/dist/label.cjs.map +1 -0
- package/dist/label.d.cts +7 -0
- package/dist/label.d.ts +7 -0
- package/dist/label.js +2 -0
- package/dist/label.js.map +1 -0
- package/dist/section-flourish.cjs +2 -0
- package/dist/section-flourish.cjs.map +1 -0
- package/dist/section-flourish.d.cts +5 -0
- package/dist/section-flourish.d.ts +5 -0
- package/dist/section-flourish.js +2 -0
- package/dist/section-flourish.js.map +1 -0
- package/dist/theme.css +14 -0
- package/package.json +129 -14
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @popgrids/ui
|
|
2
2
|
|
|
3
|
-
A modern, production-ready React UI component library based on shadcn/ui principles, built with
|
|
3
|
+
A modern, production-ready React UI component library based on shadcn/ui principles, built with Radix UI primitives and optimized for tree-shaking.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -18,11 +18,17 @@ npm install @popgrids/ui
|
|
|
18
18
|
|
|
19
19
|
This library requires the following peer dependencies:
|
|
20
20
|
|
|
21
|
-
- `react` ^19
|
|
22
|
-
- `react-dom` ^19.0.0
|
|
23
|
-
-
|
|
21
|
+
- `react` ^18 or ^19
|
|
22
|
+
- `react-dom` ^18 or ^19.0.0
|
|
23
|
+
- `radix-ui` ^1.4.3
|
|
24
24
|
- `tailwindcss` ^4.0.0
|
|
25
|
-
- `
|
|
25
|
+
- `@untitledui/icons` ^0.1.0
|
|
26
|
+
- `@fontsource-variable/inter` ^5.2.8
|
|
27
|
+
- `@fontsource/poppins` ^5.2.7
|
|
28
|
+
|
|
29
|
+
Optional peer dependencies:
|
|
30
|
+
|
|
31
|
+
- `@tailwindcss/typography` ^0.5.19
|
|
26
32
|
|
|
27
33
|
## Requirements
|
|
28
34
|
|
|
@@ -46,7 +52,7 @@ This library requires the following peer dependencies:
|
|
|
46
52
|
### Step 2: Import and Use Components
|
|
47
53
|
|
|
48
54
|
```tsx
|
|
49
|
-
import { Button } from "@popgrids/ui";
|
|
55
|
+
import { Button } from "@popgrids/ui/button";
|
|
50
56
|
|
|
51
57
|
function App() {
|
|
52
58
|
return <Button>Click me</Button>;
|
|
@@ -61,7 +67,7 @@ That's it! The `@import "@popgrids/ui/theme.css"` line:
|
|
|
61
67
|
### Variants
|
|
62
68
|
|
|
63
69
|
```tsx
|
|
64
|
-
import { Button } from "@popgrids/ui";
|
|
70
|
+
import { Button } from "@popgrids/ui/button";
|
|
65
71
|
|
|
66
72
|
function App() {
|
|
67
73
|
return (
|
|
@@ -80,7 +86,7 @@ function App() {
|
|
|
80
86
|
### Sizes
|
|
81
87
|
|
|
82
88
|
```tsx
|
|
83
|
-
import { Button } from "@popgrids/ui";
|
|
89
|
+
import { Button } from "@popgrids/ui/button";
|
|
84
90
|
|
|
85
91
|
function App() {
|
|
86
92
|
return (
|
|
@@ -199,7 +205,7 @@ Apply the `.dark` class to your root element to enable dark mode:
|
|
|
199
205
|
This library is fully tree-shakeable. When you import only the components you need:
|
|
200
206
|
|
|
201
207
|
```tsx
|
|
202
|
-
import { Button } from "@popgrids/ui";
|
|
208
|
+
import { Button } from "@popgrids/ui/button";
|
|
203
209
|
```
|
|
204
210
|
|
|
205
211
|
Your bundler will only include the Button component and its dependencies, not unused exports.
|
package/dist/button.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var reactSlot=require('@radix-ui/react-slot'),classVarianceAuthority=require('class-variance-authority'),s=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');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 s__namespace=/*#__PURE__*/_interopNamespace(s);function u(...r){return tailwindMerge.twMerge(clsx.clsx(r))}var y=classVarianceAuthority.cva("inline-flex relative items-center gap-1.5 whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 text-foreground bg-background group/button outline-none focus-visible:border-ring-3 focus-visible:ring-ring/60 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{align:{left:"justify-start",center:"justify-center",right:"justify-end"},collapsed:{false:null,true:"min-w-10 max-w-10 justify-center"},outline:{false:null,true:""},leading:{false:null},theme:{base:"bg-foreground text-background",brand:"bg-primary-foreground text-primary",error:""},trailing:{false:null},variant:{default:"hover:bg-background/90",outline:"backdrop-blur-lg ",primary:"bg-primary-foreground/0 backdrop-blur-lg text-primary",secondary:"bg-secondary-foreground/0 backdrop-blur-lg text-secondary",tertiary:"bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]"},pill:{false:"rounded-xs",true:"rounded-full"},size:{default:"h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]",lg:"h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]"}},defaultVariants:{align:"center",pill:false,size:"default",theme:"brand",variant:"default"},compoundVariants:[{pill:true,size:"default",class:"min-w-10 min-h-10 px-4"},{pill:true,collapsed:true,class:"max-w-10"},{pill:true,size:"lg",class:"min-w-12 min-h-12 px-4"},{pill:true,size:"lg",collapsed:true,class:"max-w-[54px] max-h-12"},{collapsed:false,size:"default",align:"left",pill:false,class:"pr-3 pl-2"},{align:"center",collapsed:false,size:"default",pill:false,class:"px-3"},{leading:true,pill:false,align:"left",size:"default",class:"pr-3 pl-2"},{collapsed:false,size:"default",pill:true,class:"px-4"},{size:"lg",pill:true,collapsed:false,class:"px-4"},{variant:"primary",outline:true,theme:"brand",class:"ring ring-primary-foreground bg-background/0 text-primary-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1"},{variant:"primary",theme:"brand",outline:false,class:"bg-primary-foreground text-primary hover:bg-primary-foreground hover:text-primary active:bg-primary-foreground active:text-primary focus-visible:bg-primary-foreground focus-visible:text-primary"},{variant:"secondary",outline:true,theme:"base",class:"bg-background/0 text-foreground ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md"},{variant:"tertiary",outline:false,theme:"base",class:"bg-background/0 text-foreground hover:ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md"},{variant:"primary",theme:"error",class:"bg-destructive text-foreground"},{variant:"tertiary",theme:"error",class:"bg-transparent text-destructive"}]}),x=classVarianceAuthority.cva("before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none",{variants:{outline:{false:null},variant:{default:"",outline:"",primary:"before:bg-tint-700-reversed/0 hover:before:bg-tint-700-reversed active:before:bg-tint-700-reversed/0 disabled:before:bg-tint-900-default focus-visible:before:bg-tint-700-reversed/0",secondary:"before:bg-tint-900-default hover:before:bg-tint-800-default active:before:bg-tint-900-default disabled:before:bg-tint-900-default focus-visible:before:bg-tint-800-default",tertiary:"before:bg-tint-950-reversed hover:before:bg-tint-900-default active:before:bg-tint-950-reversed disabled:before:bg-tint-950-reversed focus-visible:before:bg-tint-950-reversed"}},defaultVariants:{outline:false,variant:"default"},compoundVariants:[{outline:true,variant:"primary",class:"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed"},{outline:true,variant:"secondary",class:"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed"}]});function R(r){let t=s__namespace.Children.toArray(r).filter(e=>e==null||typeof e=="boolean"?false:typeof e=="string"?e.trim().length>0:true);if(t.length!==1)return null;let a=t[0];return s__namespace.isValidElement(a)?a:null}function S({className:r,children:t,collapsed:a=false,variant:e="default",align:d="center",outline:i=false,pill:b=false,size:f="default",theme:g="brand",leading:n,trailing:o,asChild:c=false,...p}){let v=c?reactSlot.Slot:"button";if(c){let m=R(t);if(!m)throw new Error("Button with `asChild` expects exactly one React element child.");return jsxRuntime.jsx(v,{"data-slot":"button",className:u(y({variant:e,size:f,align:d,outline:i,collapsed:a,pill:b,className:r,leading:!!n,theme:g,trailing:!!o}),x({variant:e,outline:i})),...p,children:m})}return jsxRuntime.jsxs(v,{"data-slot":"button",className:u(y({variant:e,size:f,align:d,outline:i,collapsed:a,pill:b,className:r,leading:!!n,theme:g,trailing:!!o}),x({variant:e,outline:i})),...p,children:[n&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:n}),t&&jsxRuntime.jsx("span",{className:"min-w-0 truncate",children:t}),o&&jsxRuntime.jsx(jsxRuntime.Fragment,{children:o})]})}exports.Button=S;exports.buttonVariants=y;exports.tintVariants=x;//# sourceMappingURL=button.cjs.map
|
|
2
|
+
//# sourceMappingURL=button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/button/button.tsx"],"names":["cn","inputs","twMerge","clsx","buttonVariants","cva","tintVariants","getSingleElementChild","children","normalized","s","child","only","Button","className","collapsed","variant","align","outline","pill","size","theme","leading","trailing","asChild","props","Comp","Slot","onlyChild","jsx","jsxs","Fragment"],"mappings":"olBAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCGA,IAAMG,CAAAA,CAAiBC,0BAAAA,CACrB,8aAAA,CACA,CACE,QAAA,CAAU,CACR,KAAA,CAAO,CACL,IAAA,CAAM,gBACN,MAAA,CAAQ,gBAAA,CACR,KAAA,CAAO,aACT,CAAA,CACA,SAAA,CAAW,CACT,KAAA,CAAO,KACP,IAAA,CAAM,kCACR,CAAA,CACA,OAAA,CAAS,CACP,KAAA,CAAO,IAAA,CACP,IAAA,CAAM,EACR,CAAA,CACA,OAAA,CAAS,CACP,KAAA,CAAO,IACT,CAAA,CACA,KAAA,CAAO,C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AA,CAAAR,CAAAA,CAAS,GAC3B,CAEJ","file":"button.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","\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex relative items-center gap-1.5 whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 text-foreground bg-background group/button outline-none focus-visible:border-ring-3 focus-visible:ring-ring/60 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n align: {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\",\n },\n collapsed: {\n false: null,\n true: \"min-w-10 max-w-10 justify-center\",\n },\n outline: {\n false: null,\n true: \"\",\n },\n leading: {\n false: null,\n },\n theme: {\n base: \"bg-foreground text-background\",\n brand: \"bg-primary-foreground text-primary\",\n error: \"\",\n },\n trailing: {\n false: null,\n },\n variant: {\n default: \"hover:bg-background/90\",\n outline: \"backdrop-blur-lg \",\n primary: \"bg-primary-foreground/0 backdrop-blur-lg text-primary\",\n secondary: \"bg-secondary-foreground/0 backdrop-blur-lg text-secondary\",\n tertiary: \"bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]\",\n },\n pill: {\n false: \"rounded-xs\",\n true: \"rounded-full\",\n },\n size: {\n default: \"h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]\",\n lg: \"h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]\",\n },\n },\n defaultVariants: {\n align: \"center\",\n pill: false,\n size: \"default\",\n theme: \"brand\",\n variant: \"default\",\n },\n compoundVariants: [\n {\n pill: true,\n size: \"default\",\n class: \"min-w-10 min-h-10 px-4\",\n },\n {\n pill: true,\n collapsed: true,\n class: \"max-w-10\",\n },\n {\n pill: true,\n size: \"lg\",\n class: \"min-w-12 min-h-12 px-4\",\n },\n {\n pill: true,\n size: \"lg\",\n collapsed: true,\n class: \"max-w-[54px] max-h-12\",\n },\n {\n collapsed: false,\n size: \"default\",\n align: \"left\",\n pill: false,\n class: \"pr-3 pl-2\",\n },\n {\n align: \"center\",\n collapsed: false,\n size: \"default\",\n pill: false,\n class: \"px-3\",\n },\n {\n leading: true,\n pill: false,\n align: \"left\",\n size: \"default\",\n class: \"pr-3 pl-2\",\n },\n {\n collapsed: false,\n size: \"default\",\n pill: true,\n class: \"px-4\",\n },\n {\n size: \"lg\",\n pill: true,\n collapsed: false,\n class: \"px-4\",\n },\n {\n variant: \"primary\",\n outline: true,\n theme: \"brand\",\n class:\n \"ring ring-primary-foreground bg-background/0 text-primary-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1\",\n },\n {\n variant: \"primary\",\n theme: \"brand\",\n outline: false,\n class:\n \"bg-primary-foreground text-primary hover:bg-primary-foreground hover:text-primary active:bg-primary-foreground active:text-primary focus-visible:bg-primary-foreground focus-visible:text-primary\",\n },\n {\n variant: \"secondary\",\n outline: true,\n theme: \"base\",\n class:\n \"bg-background/0 text-foreground ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md\",\n },\n {\n variant: \"tertiary\",\n outline: false,\n theme: \"base\",\n class:\n \"bg-background/0 text-foreground hover:ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md\",\n },\n {\n variant: \"primary\",\n theme: \"error\",\n class: \"bg-destructive text-foreground\",\n },\n {\n variant: \"tertiary\",\n theme: \"error\",\n class: \"bg-transparent text-destructive\",\n },\n ],\n },\n);\n\nconst tintVariants = cva(\n \"before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none\",\n {\n variants: {\n outline: {\n false: null,\n },\n variant: {\n default: \"\",\n outline: \"\",\n primary:\n \"before:bg-tint-700-reversed/0 hover:before:bg-tint-700-reversed active:before:bg-tint-700-reversed/0 disabled:before:bg-tint-900-default focus-visible:before:bg-tint-700-reversed/0\",\n secondary:\n \"before:bg-tint-900-default hover:before:bg-tint-800-default active:before:bg-tint-900-default disabled:before:bg-tint-900-default focus-visible:before:bg-tint-800-default\",\n tertiary:\n \"before:bg-tint-950-reversed hover:before:bg-tint-900-default active:before:bg-tint-950-reversed disabled:before:bg-tint-950-reversed focus-visible:before:bg-tint-950-reversed\",\n },\n },\n defaultVariants: {\n outline: false,\n variant: \"default\",\n },\n compoundVariants: [\n {\n outline: true,\n variant: \"primary\",\n class:\n \"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed\",\n },\n {\n outline: true,\n variant: \"secondary\",\n class:\n \"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed\",\n },\n ],\n },\n);\n\nfunction getSingleElementChild(children: React.ReactNode) {\n // Tolerate JSX formatting whitespace/newlines (common with pretty indentation).\n const normalized = React.Children.toArray(children).filter((child) => {\n if (child === null || child === undefined) return false;\n if (typeof child === \"boolean\") return false;\n if (typeof child === \"string\") return child.trim().length > 0;\n return true;\n });\n\n if (normalized.length !== 1) return null;\n const only = normalized[0];\n return React.isValidElement(only) ? only : null;\n}\n\nfunction Button({\n className,\n children,\n collapsed = false,\n variant = \"default\",\n align = \"center\",\n outline = false,\n pill = false,\n size = \"default\",\n theme = \"brand\",\n leading,\n trailing,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n } & VariantProps<typeof tintVariants>) {\n const Comp = asChild ? Slot : \"button\";\n\n if (asChild) {\n const onlyChild = getSingleElementChild(children);\n if (!onlyChild) {\n throw new Error(\"Button with `asChild` expects exactly one React element child.\");\n }\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(\n buttonVariants({\n variant,\n size,\n align,\n outline,\n collapsed,\n pill,\n className,\n leading: !!leading,\n theme,\n trailing: !!trailing,\n }),\n tintVariants({ variant, outline }),\n )}\n {...props}\n >\n {onlyChild}\n </Comp>\n );\n }\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(\n buttonVariants({\n variant,\n size,\n align,\n outline,\n collapsed,\n pill,\n className,\n leading: !!leading,\n theme,\n trailing: !!trailing,\n }),\n tintVariants({ variant, outline }),\n )}\n {...props}\n >\n {leading && <>{leading}</>}\n {children && <span className=\"min-w-0 truncate\">{children}</span>}\n {trailing && <>{trailing}</>}\n </Comp>\n );\n}\n\nexport { Button, buttonVariants, tintVariants };\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
align?: "left" | "center" | "right" | null | undefined;
|
|
8
|
+
collapsed?: boolean | null | undefined;
|
|
9
|
+
outline?: boolean | null | undefined;
|
|
10
|
+
leading?: boolean | null | undefined;
|
|
11
|
+
theme?: "base" | "brand" | "error" | null | undefined;
|
|
12
|
+
trailing?: boolean | null | undefined;
|
|
13
|
+
variant?: "default" | "outline" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
14
|
+
pill?: boolean | null | undefined;
|
|
15
|
+
size?: "default" | "lg" | null | undefined;
|
|
16
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
17
|
+
declare const tintVariants: (props?: ({
|
|
18
|
+
outline?: boolean | null | undefined;
|
|
19
|
+
variant?: "default" | "outline" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
20
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
21
|
+
declare function Button({ className, children, collapsed, variant, align, outline, pill, size, theme, leading, trailing, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
22
|
+
asChild?: boolean;
|
|
23
|
+
leading?: React.ReactNode;
|
|
24
|
+
trailing?: React.ReactNode;
|
|
25
|
+
} & VariantProps<typeof tintVariants>): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Button, buttonVariants, tintVariants };
|
package/dist/button.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
|
|
6
|
+
declare const buttonVariants: (props?: ({
|
|
7
|
+
align?: "left" | "center" | "right" | null | undefined;
|
|
8
|
+
collapsed?: boolean | null | undefined;
|
|
9
|
+
outline?: boolean | null | undefined;
|
|
10
|
+
leading?: boolean | null | undefined;
|
|
11
|
+
theme?: "base" | "brand" | "error" | null | undefined;
|
|
12
|
+
trailing?: boolean | null | undefined;
|
|
13
|
+
variant?: "default" | "outline" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
14
|
+
pill?: boolean | null | undefined;
|
|
15
|
+
size?: "default" | "lg" | null | undefined;
|
|
16
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
17
|
+
declare const tintVariants: (props?: ({
|
|
18
|
+
outline?: boolean | null | undefined;
|
|
19
|
+
variant?: "default" | "outline" | "primary" | "secondary" | "tertiary" | null | undefined;
|
|
20
|
+
} & class_variance_authority_dist_types.ClassProp) | undefined) => string;
|
|
21
|
+
declare function Button({ className, children, collapsed, variant, align, outline, pill, size, theme, leading, trailing, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
|
|
22
|
+
asChild?: boolean;
|
|
23
|
+
leading?: React.ReactNode;
|
|
24
|
+
trailing?: React.ReactNode;
|
|
25
|
+
} & VariantProps<typeof tintVariants>): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { Button, buttonVariants, tintVariants };
|
package/dist/button.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {Slot}from'@radix-ui/react-slot';import {cva}from'class-variance-authority';import*as s from'react';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function u(...r){return twMerge(clsx(r))}var y=cva("inline-flex relative items-center gap-1.5 whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 text-foreground bg-background group/button outline-none focus-visible:border-ring-3 focus-visible:ring-ring/60 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{align:{left:"justify-start",center:"justify-center",right:"justify-end"},collapsed:{false:null,true:"min-w-10 max-w-10 justify-center"},outline:{false:null,true:""},leading:{false:null},theme:{base:"bg-foreground text-background",brand:"bg-primary-foreground text-primary",error:""},trailing:{false:null},variant:{default:"hover:bg-background/90",outline:"backdrop-blur-lg ",primary:"bg-primary-foreground/0 backdrop-blur-lg text-primary",secondary:"bg-secondary-foreground/0 backdrop-blur-lg text-secondary",tertiary:"bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]"},pill:{false:"rounded-xs",true:"rounded-full"},size:{default:"h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]",lg:"h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]"}},defaultVariants:{align:"center",pill:false,size:"default",theme:"brand",variant:"default"},compoundVariants:[{pill:true,size:"default",class:"min-w-10 min-h-10 px-4"},{pill:true,collapsed:true,class:"max-w-10"},{pill:true,size:"lg",class:"min-w-12 min-h-12 px-4"},{pill:true,size:"lg",collapsed:true,class:"max-w-[54px] max-h-12"},{collapsed:false,size:"default",align:"left",pill:false,class:"pr-3 pl-2"},{align:"center",collapsed:false,size:"default",pill:false,class:"px-3"},{leading:true,pill:false,align:"left",size:"default",class:"pr-3 pl-2"},{collapsed:false,size:"default",pill:true,class:"px-4"},{size:"lg",pill:true,collapsed:false,class:"px-4"},{variant:"primary",outline:true,theme:"brand",class:"ring ring-primary-foreground bg-background/0 text-primary-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1"},{variant:"primary",theme:"brand",outline:false,class:"bg-primary-foreground text-primary hover:bg-primary-foreground hover:text-primary active:bg-primary-foreground active:text-primary focus-visible:bg-primary-foreground focus-visible:text-primary"},{variant:"secondary",outline:true,theme:"base",class:"bg-background/0 text-foreground ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md"},{variant:"tertiary",outline:false,theme:"base",class:"bg-background/0 text-foreground hover:ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md"},{variant:"primary",theme:"error",class:"bg-destructive text-foreground"},{variant:"tertiary",theme:"error",class:"bg-transparent text-destructive"}]}),x=cva("before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none",{variants:{outline:{false:null},variant:{default:"",outline:"",primary:"before:bg-tint-700-reversed/0 hover:before:bg-tint-700-reversed active:before:bg-tint-700-reversed/0 disabled:before:bg-tint-900-default focus-visible:before:bg-tint-700-reversed/0",secondary:"before:bg-tint-900-default hover:before:bg-tint-800-default active:before:bg-tint-900-default disabled:before:bg-tint-900-default focus-visible:before:bg-tint-800-default",tertiary:"before:bg-tint-950-reversed hover:before:bg-tint-900-default active:before:bg-tint-950-reversed disabled:before:bg-tint-950-reversed focus-visible:before:bg-tint-950-reversed"}},defaultVariants:{outline:false,variant:"default"},compoundVariants:[{outline:true,variant:"primary",class:"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed"},{outline:true,variant:"secondary",class:"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed"}]});function R(r){let t=s.Children.toArray(r).filter(e=>e==null||typeof e=="boolean"?false:typeof e=="string"?e.trim().length>0:true);if(t.length!==1)return null;let a=t[0];return s.isValidElement(a)?a:null}function S({className:r,children:t,collapsed:a=false,variant:e="default",align:d="center",outline:i=false,pill:b=false,size:f="default",theme:g="brand",leading:n,trailing:o,asChild:c=false,...p}){let v=c?Slot:"button";if(c){let m=R(t);if(!m)throw new Error("Button with `asChild` expects exactly one React element child.");return jsx(v,{"data-slot":"button",className:u(y({variant:e,size:f,align:d,outline:i,collapsed:a,pill:b,className:r,leading:!!n,theme:g,trailing:!!o}),x({variant:e,outline:i})),...p,children:m})}return jsxs(v,{"data-slot":"button",className:u(y({variant:e,size:f,align:d,outline:i,collapsed:a,pill:b,className:r,leading:!!n,theme:g,trailing:!!o}),x({variant:e,outline:i})),...p,children:[n&&jsx(Fragment,{children:n}),t&&jsx("span",{className:"min-w-0 truncate",children:t}),o&&jsx(Fragment,{children:o})]})}export{S as Button,y as buttonVariants,x as tintVariants};//# sourceMappingURL=button.js.map
|
|
2
|
+
//# sourceMappingURL=button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/button/button.tsx"],"names":["cn","inputs","twMerge","clsx","buttonVariants","cva","tintVariants","getSingleElementChild","children","normalized","child","only","Button","className","collapsed","variant","align","outline","pill","size","theme","leading","trailing","asChild","props","Comp","Slot","onlyChild","jsx","jsxs","Fragment"],"mappings":"0NAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,OAAAA,CAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCGA,IAAMG,CAAAA,CAAiBC,GAAAA,CACrB,8aAAA,CACA,CACE,QAAA,CAAU,CACR,KAAA,CAAO,CACL,IAAA,CAAM,gBACN,MAAA,CAAQ,gBAAA,CACR,KAAA,CAAO,aACT,CAAA,CACA,SAAA,CAAW,CACT,KAAA,CAAO,KACP,IAAA,CAAM,kCACR,CAAA,CACA,OAAA,CAAS,CACP,KAAA,CAAO,IAAA,CACP,IAAA,CAAM,EACR,CAAA,CACA,OAAA,CAAS,CACP,KAAA,CAAO,IACT,CAAA,CACA,KAAA,CAAO,CACL,IAAA,CAAM,+BAAA,CACN,KAAA,CAAO,oCAAA,CACP,KAAA,CAAO,EACT,CAAA,CACA,QAAA,CAAU,CACR,KAAA,CAAO,IACT,CAAA,CACA,OAAA,CAAS,CACP,OAAA,CAAS,wBAAA,CACT,OAAA,CAAS,oBACT,OAAA,CAAS,uDAAA,CACT,SAAA,CAAW,2DAAA,CACX,QAAA,CAAU,gFACZ,CAAA,CACA,IAAA,CAAM,CACJ,KAAA,CAAO,YAAA,CACP,IAAA,CAAM,cACR,CAAA,CACA,IAAA,CAAM,CACJ,OAAA,CAAS,2EAAA,CACT,EAAA,CAAI,mEACN,CACF,CAAA,CACA,eAAA,CAAiB,CACf,KAAA,CAAO,SACP,IAAA,CAAM,KAAA,CACN,IAAA,CAAM,SAAA,CACN,KAAA,CAAO,OAAA,CACP,OAAA,CAAS,SACX,EACA,gBAAA,CAAkB,CAChB,CACE,IAAA,CAAM,IAAA,CACN,IAAA,CAAM,SAAA,CAC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AAA,CAAAI,CAAAA,CACA,KAAA,CAAAH,EACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAH,CAAAA,CACA,IAAA,CAAAI,CAAAA,CACA,SAAA,CAAAL,CAAAA,CACA,QAAS,CAAC,CAACQ,CAAAA,CACX,KAAA,CAAAD,CAAAA,CACA,QAAA,CAAU,CAAC,CAACE,CACd,CAAC,CAAA,CACDhB,CAAAA,CAAa,CAAE,OAAA,CAAAS,CAAAA,CAAS,OAAA,CAAAE,CAAQ,CAAC,CACnC,CAAA,CACC,GAAGO,CAAAA,CAEH,QAAA,CAAA,CAAAH,CAAAA,EAAWO,GAAAA,CAAAE,QAAAA,CAAA,CAAG,QAAA,CAAAT,CAAAA,CAAQ,CAAA,CACtBb,CAAAA,EAAYoB,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,kBAAA,CAAoB,SAAApB,CAAAA,CAAS,CAAA,CACzDc,CAAAA,EAAYM,GAAAA,CAAAE,QAAAA,CAAA,CAAG,QAAA,CAAAR,CAAAA,CAAS,GAC3B,CAEJ","file":"button.js","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","\"use client\";\n\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport * as React from \"react\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex relative items-center gap-1.5 whitespace-nowrap font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 text-foreground bg-background group/button outline-none focus-visible:border-ring-3 focus-visible:ring-ring/60 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n {\n variants: {\n align: {\n left: \"justify-start\",\n center: \"justify-center\",\n right: \"justify-end\",\n },\n collapsed: {\n false: null,\n true: \"min-w-10 max-w-10 justify-center\",\n },\n outline: {\n false: null,\n true: \"\",\n },\n leading: {\n false: null,\n },\n theme: {\n base: \"bg-foreground text-background\",\n brand: \"bg-primary-foreground text-primary\",\n error: \"\",\n },\n trailing: {\n false: null,\n },\n variant: {\n default: \"hover:bg-background/90\",\n outline: \"backdrop-blur-lg \",\n primary: \"bg-primary-foreground/0 backdrop-blur-lg text-primary\",\n secondary: \"bg-secondary-foreground/0 backdrop-blur-lg text-secondary\",\n tertiary: \"bg-background/0 backdrop-blur-lg [--foreground:var(--color-text-text-default)]\",\n },\n pill: {\n false: \"rounded-xs\",\n true: \"rounded-full\",\n },\n size: {\n default: \"h-10 min-h-10 px-3 py-2 text-sm [&_svg:not([class*='size-'])]:size-[18px]\",\n lg: \"h-12 min-h-12 text-base [&_svg:not([class*='size-'])]:size-[20px]\",\n },\n },\n defaultVariants: {\n align: \"center\",\n pill: false,\n size: \"default\",\n theme: \"brand\",\n variant: \"default\",\n },\n compoundVariants: [\n {\n pill: true,\n size: \"default\",\n class: \"min-w-10 min-h-10 px-4\",\n },\n {\n pill: true,\n collapsed: true,\n class: \"max-w-10\",\n },\n {\n pill: true,\n size: \"lg\",\n class: \"min-w-12 min-h-12 px-4\",\n },\n {\n pill: true,\n size: \"lg\",\n collapsed: true,\n class: \"max-w-[54px] max-h-12\",\n },\n {\n collapsed: false,\n size: \"default\",\n align: \"left\",\n pill: false,\n class: \"pr-3 pl-2\",\n },\n {\n align: \"center\",\n collapsed: false,\n size: \"default\",\n pill: false,\n class: \"px-3\",\n },\n {\n leading: true,\n pill: false,\n align: \"left\",\n size: \"default\",\n class: \"pr-3 pl-2\",\n },\n {\n collapsed: false,\n size: \"default\",\n pill: true,\n class: \"px-4\",\n },\n {\n size: \"lg\",\n pill: true,\n collapsed: false,\n class: \"px-4\",\n },\n {\n variant: \"primary\",\n outline: true,\n theme: \"brand\",\n class:\n \"ring ring-primary-foreground bg-background/0 text-primary-foreground hover:ring-2 active:ring active:bg-background/1 disabled:outline-none disabled:bg-background/0 focus-visible:ring focus-visible:ring-ring focus-visible:outline-background focus-visible:bg-background/1\",\n },\n {\n variant: \"primary\",\n theme: \"brand\",\n outline: false,\n class:\n \"bg-primary-foreground text-primary hover:bg-primary-foreground hover:text-primary active:bg-primary-foreground active:text-primary focus-visible:bg-primary-foreground focus-visible:text-primary\",\n },\n {\n variant: \"secondary\",\n outline: true,\n theme: \"base\",\n class:\n \"bg-background/0 text-foreground ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md\",\n },\n {\n variant: \"tertiary\",\n outline: false,\n theme: \"base\",\n class:\n \"bg-background/0 text-foreground hover:ring ring-foreground/0 hover:ring-foreground active:ring-foreground/0 disabled:ring-foreground/0 backdrop-blur-lg focus-visible:backdrop-blur-md\",\n },\n {\n variant: \"primary\",\n theme: \"error\",\n class: \"bg-destructive text-foreground\",\n },\n {\n variant: \"tertiary\",\n theme: \"error\",\n class: \"bg-transparent text-destructive\",\n },\n ],\n },\n);\n\nconst tintVariants = cva(\n \"before:content-[''] before:absolute before:inset-0 before:transition-all before:rounded-[inherit] before:pointer-events-none\",\n {\n variants: {\n outline: {\n false: null,\n },\n variant: {\n default: \"\",\n outline: \"\",\n primary:\n \"before:bg-tint-700-reversed/0 hover:before:bg-tint-700-reversed active:before:bg-tint-700-reversed/0 disabled:before:bg-tint-900-default focus-visible:before:bg-tint-700-reversed/0\",\n secondary:\n \"before:bg-tint-900-default hover:before:bg-tint-800-default active:before:bg-tint-900-default disabled:before:bg-tint-900-default focus-visible:before:bg-tint-800-default\",\n tertiary:\n \"before:bg-tint-950-reversed hover:before:bg-tint-900-default active:before:bg-tint-950-reversed disabled:before:bg-tint-950-reversed focus-visible:before:bg-tint-950-reversed\",\n },\n },\n defaultVariants: {\n outline: false,\n variant: \"default\",\n },\n compoundVariants: [\n {\n outline: true,\n variant: \"primary\",\n class:\n \"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed\",\n },\n {\n outline: true,\n variant: \"secondary\",\n class:\n \"before:bg-tint-950-reversed hover:before:bg-tint-950-reversed active:before:bg-tint-950-reversed disabled:before:bg-tint-900-default focus-visible:before:bg-tint-950-reversed\",\n },\n ],\n },\n);\n\nfunction getSingleElementChild(children: React.ReactNode) {\n // Tolerate JSX formatting whitespace/newlines (common with pretty indentation).\n const normalized = React.Children.toArray(children).filter((child) => {\n if (child === null || child === undefined) return false;\n if (typeof child === \"boolean\") return false;\n if (typeof child === \"string\") return child.trim().length > 0;\n return true;\n });\n\n if (normalized.length !== 1) return null;\n const only = normalized[0];\n return React.isValidElement(only) ? only : null;\n}\n\nfunction Button({\n className,\n children,\n collapsed = false,\n variant = \"default\",\n align = \"center\",\n outline = false,\n pill = false,\n size = \"default\",\n theme = \"brand\",\n leading,\n trailing,\n asChild = false,\n ...props\n}: React.ComponentProps<\"button\"> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n leading?: React.ReactNode;\n trailing?: React.ReactNode;\n } & VariantProps<typeof tintVariants>) {\n const Comp = asChild ? Slot : \"button\";\n\n if (asChild) {\n const onlyChild = getSingleElementChild(children);\n if (!onlyChild) {\n throw new Error(\"Button with `asChild` expects exactly one React element child.\");\n }\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(\n buttonVariants({\n variant,\n size,\n align,\n outline,\n collapsed,\n pill,\n className,\n leading: !!leading,\n theme,\n trailing: !!trailing,\n }),\n tintVariants({ variant, outline }),\n )}\n {...props}\n >\n {onlyChild}\n </Comp>\n );\n }\n\n return (\n <Comp\n data-slot=\"button\"\n className={cn(\n buttonVariants({\n variant,\n size,\n align,\n outline,\n collapsed,\n pill,\n className,\n leading: !!leading,\n theme,\n trailing: !!trailing,\n }),\n tintVariants({ variant, outline }),\n )}\n {...props}\n >\n {leading && <>{leading}</>}\n {children && <span className=\"min-w-0 truncate\">{children}</span>}\n {trailing && <>{trailing}</>}\n </Comp>\n );\n}\n\nexport { Button, buttonVariants, tintVariants };\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function i(...t){return tailwindMerge.twMerge(clsx.clsx(t))}function x({className:t,children:a,title:o,subhead:r,cta:l}){return jsxRuntime.jsxs("div",{className:i("flex max-w-xl flex-col items-start gap-3 self-stretch",t),children:[jsxRuntime.jsxs("div",{className:"flex min-h-10 items-start justify-between self-stretch",children:[jsxRuntime.jsxs("div",{className:"flex min-h-10 shrink-0 grow basis-0 flex-col items-start justify-center",children:[o&&jsxRuntime.jsx("h2",{className:"font-decor text-decor-xs self-stretch font-bold",children:o}),r&&jsxRuntime.jsx("p",{className:"text-base font-semibold",children:r})]}),jsxRuntime.jsx("div",{children:l})]}),a&&jsxRuntime.jsx("div",{className:"prose prose-base max-w-(--width-xl) pb-3",children:a})]})}exports.ContentBlock=x;//# sourceMappingURL=content-block.cjs.map
|
|
2
|
+
//# sourceMappingURL=content-block.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/content-block/content-block.tsx"],"names":["cn","inputs","twMerge","clsx","ContentBlock","className","children","title","subhead","cta","jsxs","jsx"],"mappings":"sHAGO,SAASA,CAAAA,CAAAA,GAAMC,EAAsB,CAC1C,OAAOC,sBAAQC,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCKO,SAASG,CAAAA,CAAa,CAAE,SAAA,CAAAC,CAAAA,CAAW,SAAAC,CAAAA,CAAU,KAAA,CAAAC,EAAO,OAAA,CAAAC,CAAAA,CAAS,IAAAC,CAAI,CAAA,CAAsB,CAC5F,OACEC,eAAAA,CAAC,OAAI,SAAA,CAAWV,CAAAA,CAAG,uDAAA,CAAyDK,CAAS,EACnF,QAAA,CAAA,CAAAK,eAAAA,CAAC,OAAI,SAAA,CAAU,wDAAA,CAEb,UAAAA,eAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,yEAAA,CACZ,QAAA,CAAA,CAAAH,GAASI,cAAAA,CAAC,IAAA,CAAA,CAAG,UAAU,iDAAA,CAAmD,QAAA,CAAAJ,EAAM,CAAA,CAChFC,CAAAA,EAAWG,eAAC,GAAA,CAAA,CAAE,SAAA,CAAU,0BAA2B,QAAA,CAAAH,CAAAA,CAAQ,GAC9D,CAAA,CAEAG,cAAAA,CAAC,OAAK,QAAA,CAAAF,CAAAA,CAAI,GACZ,CAAA,CACCH,CAAAA,EAAYK,eAAC,KAAA,CAAA,CAAI,SAAA,CAAU,2CAA4C,QAAA,CAAAL,CAAAA,CAAS,GACnF,CAEJ","file":"content-block.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","import { cn } from \"../../lib/utils\";\n\ninterface ContentBlockProps {\n className?: string;\n children?: React.ReactNode;\n title?: string;\n subhead?: string;\n cta?: React.ReactNode;\n}\n\nexport function ContentBlock({ className, children, title, subhead, cta }: ContentBlockProps) {\n return (\n <div className={cn(\"flex max-w-xl flex-col items-start gap-3 self-stretch\", className)}>\n <div className=\"flex min-h-10 items-start justify-between self-stretch\">\n {/* Text Group */}\n <div className=\"flex min-h-10 shrink-0 grow basis-0 flex-col items-start justify-center\">\n {title && <h2 className=\"font-decor text-decor-xs self-stretch font-bold\">{title}</h2>}\n {subhead && <p className=\"text-base font-semibold\">{subhead}</p>}\n </div>\n {/* CTA */}\n <div>{cta}</div>\n </div>\n {children && <div className=\"prose prose-base max-w-(--width-xl) pb-3\">{children}</div>}\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ContentBlockProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
subhead?: string;
|
|
8
|
+
cta?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function ContentBlock({ className, children, title, subhead, cta }: ContentBlockProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { ContentBlock };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface ContentBlockProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
title?: string;
|
|
7
|
+
subhead?: string;
|
|
8
|
+
cta?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare function ContentBlock({ className, children, title, subhead, cta }: ContentBlockProps): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { ContentBlock };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsxs,jsx}from'react/jsx-runtime';function i(...t){return twMerge(clsx(t))}function x({className:t,children:a,title:o,subhead:r,cta:l}){return jsxs("div",{className:i("flex max-w-xl flex-col items-start gap-3 self-stretch",t),children:[jsxs("div",{className:"flex min-h-10 items-start justify-between self-stretch",children:[jsxs("div",{className:"flex min-h-10 shrink-0 grow basis-0 flex-col items-start justify-center",children:[o&&jsx("h2",{className:"font-decor text-decor-xs self-stretch font-bold",children:o}),r&&jsx("p",{className:"text-base font-semibold",children:r})]}),jsx("div",{children:l})]}),a&&jsx("div",{className:"prose prose-base max-w-(--width-xl) pb-3",children:a})]})}export{x as ContentBlock};//# sourceMappingURL=content-block.js.map
|
|
2
|
+
//# sourceMappingURL=content-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/content-block/content-block.tsx"],"names":["cn","inputs","twMerge","clsx","ContentBlock","className","children","title","subhead","cta","jsxs","jsx"],"mappings":"sGAGO,SAASA,CAAAA,CAAAA,GAAMC,EAAsB,CAC1C,OAAOC,QAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCKO,SAASG,CAAAA,CAAa,CAAE,SAAA,CAAAC,CAAAA,CAAW,SAAAC,CAAAA,CAAU,KAAA,CAAAC,EAAO,OAAA,CAAAC,CAAAA,CAAS,IAAAC,CAAI,CAAA,CAAsB,CAC5F,OACEC,IAAAA,CAAC,OAAI,SAAA,CAAWV,CAAAA,CAAG,uDAAA,CAAyDK,CAAS,EACnF,QAAA,CAAA,CAAAK,IAAAA,CAAC,OAAI,SAAA,CAAU,wDAAA,CAEb,UAAAA,IAAAA,CAAC,KAAA,CAAA,CAAI,UAAU,yEAAA,CACZ,QAAA,CAAA,CAAAH,GAASI,GAAAA,CAAC,IAAA,CAAA,CAAG,UAAU,iDAAA,CAAmD,QAAA,CAAAJ,EAAM,CAAA,CAChFC,CAAAA,EAAWG,IAAC,GAAA,CAAA,CAAE,SAAA,CAAU,0BAA2B,QAAA,CAAAH,CAAAA,CAAQ,GAC9D,CAAA,CAEAG,GAAAA,CAAC,OAAK,QAAA,CAAAF,CAAAA,CAAI,GACZ,CAAA,CACCH,CAAAA,EAAYK,IAAC,KAAA,CAAA,CAAI,SAAA,CAAU,2CAA4C,QAAA,CAAAL,CAAAA,CAAS,GACnF,CAEJ","file":"content-block.js","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","import { cn } from \"../../lib/utils\";\n\ninterface ContentBlockProps {\n className?: string;\n children?: React.ReactNode;\n title?: string;\n subhead?: string;\n cta?: React.ReactNode;\n}\n\nexport function ContentBlock({ className, children, title, subhead, cta }: ContentBlockProps) {\n return (\n <div className={cn(\"flex max-w-xl flex-col items-start gap-3 self-stretch\", className)}>\n <div className=\"flex min-h-10 items-start justify-between self-stretch\">\n {/* Text Group */}\n <div className=\"flex min-h-10 shrink-0 grow basis-0 flex-col items-start justify-center\">\n {title && <h2 className=\"font-decor text-decor-xs self-stretch font-bold\">{title}</h2>}\n {subhead && <p className=\"text-base font-semibold\">{subhead}</p>}\n </div>\n {/* CTA */}\n <div>{cta}</div>\n </div>\n {children && <div className=\"prose prose-base max-w-(--width-xl) pb-3\">{children}</div>}\n </div>\n );\n}\n"]}
|
package/dist/dialog.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var e=require('@radix-ui/react-dialog'),icons=require('@untitledui/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');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 e__namespace=/*#__PURE__*/_interopNamespace(e);function i(...t){return tailwindMerge.twMerge(clsx.clsx(t))}function P({...t}){return jsxRuntime.jsx(e__namespace.Root,{"data-slot":"dialog",...t})}function x({...t}){return jsxRuntime.jsx(e__namespace.Trigger,{"data-slot":"dialog-trigger",...t})}function f({...t}){return jsxRuntime.jsx(e__namespace.Portal,{"data-slot":"dialog-portal",...t})}function C({...t}){return jsxRuntime.jsx(e__namespace.Close,{"data-slot":"dialog-close",...t})}function g({className:t,...a}){return jsxRuntime.jsx(e__namespace.Overlay,{"data-slot":"dialog-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[rgb(0_0_32_/_0.01)] backdrop-blur-sm dark:bg-[rgb(255_255_255_/_0.01)]",t),...a})}function y({className:t,children:a,bottom:l=false,showCloseButton:r=true,...n}){return jsxRuntime.jsxs(f,{"data-slot":"dialog-portal",children:[jsxRuntime.jsx(g,{}),r&&jsxRuntime.jsx(e__namespace.Close,{"data-slot":"dialog-close",asChild:true,children:jsxRuntime.jsx("button",{type:"button",className:"before:bg-tint-700-reversed fixed top-[15px] left-5 z-50 overflow-visible before:absolute before:-inset-1.5 before:z-40 before:flex before:size-[calc(100%+12px)] before:rounded-full before:backdrop-blur-sm before:content-['']",children:jsxRuntime.jsx("div",{className:"bg-foreground text-background relative z-50 flex size-10 items-center justify-center rounded-full",children:jsxRuntime.jsx(icons.XClose,{className:"size-[18px]"})})})}),jsxRuntime.jsx(e__namespace.Content,{"data-slot":"dialog-content",className:i("bg-surface-bg-default data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-xl shadow-2xl duration-200 sm:max-w-lg",{"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom m:max-h-full z-50 h-full max-h-full w-full max-w-full overflow-auto data-[state=closed]:duration-200 data-[state=closed]:ease-[cubic-bezier(1,0,0.72,0.32)] data-[state=open]:duration-500 data-[state=open]:ease-[cubic-bezier(0.32,0.72,0,1)] sm:max-w-full":l},t),...n,children:a})]})}function z({className:t,...a}){return jsxRuntime.jsx("div",{"data-slot":"dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",t),...a})}function R({className:t,...a}){return jsxRuntime.jsx("div",{"data-slot":"dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function w({className:t,...a}){return jsxRuntime.jsx(e__namespace.Title,{"data-slot":"dialog-title",className:i("text-lg leading-none font-semibold",t),...a})}function N({className:t,...a}){return jsxRuntime.jsx(e__namespace.Description,{"data-slot":"dialog-description",className:i("text-muted-foreground text-sm",t),...a})}exports.Dialog=P;exports.DialogClose=C;exports.DialogContent=y;exports.DialogDescription=N;exports.DialogFooter=R;exports.DialogHeader=z;exports.DialogOverlay=g;exports.DialogPortal=f;exports.DialogTitle=w;exports.DialogTrigger=x;//# sourceMappingURL=dialog.cjs.map
|
|
2
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/dialog/dialog.tsx"],"names":["cn","inputs","twMerge","clsx","Dialog","props","jsx","e","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","DialogContent","children","bottom","showCloseButton","jsxs","XClose","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":"miBAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCCA,SAASG,CAAAA,CAAO,CAAE,GAAGC,CAAM,CAAA,CAAsD,CAC/E,OAAOC,cAAAA,CAAiBC,YAAA,CAAA,IAAA,CAAhB,CAAqB,YAAU,QAAA,CAAU,GAAGF,CAAAA,CAAO,CAC7D,CAEA,SAASG,CAAAA,CAAc,CAAE,GAAGH,CAAM,CAAA,CAAyD,CACzF,OAAOC,cAAAA,CAAiBC,YAAA,CAAA,OAAA,CAAhB,CAAwB,WAAA,CAAU,iBAAkB,GAAGF,CAAAA,CAAO,CACxE,CAEA,SAASI,CAAAA,CAAa,CAAE,GAAGJ,CAAM,EAAwD,CACvF,OAAOC,cAAAA,CAAiBC,YAAA,CAAA,MAAA,CAAhB,CAAuB,WAAA,CAAU,eAAA,CAAiB,GAAGF,EAAO,CACtE,CAEA,SAASK,CAAAA,CAAY,CAAE,GAAGL,CAAM,CAAA,CAAuD,CACrF,OAAOC,cAAAA,CAAiBC,YAAA,CAAA,KAAA,CAAhB,CAAsB,WAAA,CAAU,cAAA,CAAgB,GAAGF,CAAAA,CAAO,CACpE,CAEA,SAASM,CAAAA,CAAc,CACrB,UAAAC,CAAAA,CACA,GAAGP,CACL,CAAA,CAAyD,CACvD,OACEC,cAAA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AAA,CAAa,CAAE,SAAA,CAAAR,CAAAA,CAAW,GAAGP,CAAM,CAAA,CAAgC,CAC1E,OACEC,cAAAA,CAAC,OACC,WAAA,CAAU,eAAA,CACV,SAAA,CAAWN,CAAAA,CAAG,wDAAA,CAA0DY,CAAS,CAAA,CAChF,GAAGP,EACN,CAEJ,CAEA,SAASgB,CAAAA,CAAY,CAAE,SAAA,CAAAT,CAAAA,CAAW,GAAGP,CAAM,EAAuD,CAChG,OACEC,cAAAA,CAAiBC,YAAA,CAAA,KAAA,CAAhB,CACC,WAAA,CAAU,cAAA,CACV,SAAA,CAAWP,EAAG,oCAAA,CAAsCY,CAAS,CAAA,CAC5D,GAAGP,EACN,CAEJ,CAEA,SAASiB,CAAAA,CAAkB,CACzB,SAAA,CAAAV,CAAAA,CACA,GAAGP,CACL,CAAA,CAA6D,CAC3D,OACEC,cAAAA,CAAiBC,yBAAhB,CACC,WAAA,CAAU,oBAAA,CACV,SAAA,CAAWP,EAAG,+BAAA,CAAiCY,CAAS,CAAA,CACvD,GAAGP,EACN,CAEJ","file":"dialog.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","import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport type * as React from \"react\";\n\nimport { XClose } from \"@untitledui/icons\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[rgb(0_0_32_/_0.01)] backdrop-blur-sm dark:bg-[rgb(255_255_255_/_0.01)]\",\n // \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n bottom = false,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n bottom?: boolean;\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n {/* <Button\n className=\"fixed top-[15px] left-5 z-50 overflow-visible before:absolute before:top-3 before:left-3 before:z-50 before:flex before:size-[100px] before:bg-red-600 before:content-['']\"\n collapsed\n leading={<XClose className=\"size-[18px]\" />}\n pill\n theme=\"brand\"\n variant=\"primary\"\n /> */}\n <button\n type=\"button\"\n className=\"before:bg-tint-700-reversed fixed top-[15px] left-5 z-50 overflow-visible before:absolute before:-inset-1.5 before:z-40 before:flex before:size-[calc(100%+12px)] before:rounded-full before:backdrop-blur-sm before:content-['']\"\n >\n <div className=\"bg-foreground text-background relative z-50 flex size-10 items-center justify-center rounded-full\">\n <XClose className=\"size-[18px]\" />\n </div>\n </button>\n </DialogPrimitive.Close>\n )}\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-surface-bg-default data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-xl shadow-2xl duration-200 sm:max-w-lg\",\n {\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom m:max-h-full z-50 h-full max-h-full w-full max-w-full overflow-auto data-[state=closed]:duration-200 data-[state=closed]:ease-[cubic-bezier(1,0,0.72,0.32)] data-[state=open]:duration-500 data-[state=open]:ease-[cubic-bezier(0.32,0.72,0,1)] sm:max-w-full\":\n bottom,\n },\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function DialogContent({ className, children, bottom, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
11
|
+
bottom?: boolean;
|
|
12
|
+
showCloseButton?: boolean;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/dialog.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function DialogContent({ className, children, bottom, showCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
11
|
+
bottom?: boolean;
|
|
12
|
+
showCloseButton?: boolean;
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/dialog.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from'@radix-ui/react-dialog';import {XClose}from'@untitledui/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';function i(...t){return twMerge(clsx(t))}function P({...t}){return jsx(e.Root,{"data-slot":"dialog",...t})}function x({...t}){return jsx(e.Trigger,{"data-slot":"dialog-trigger",...t})}function f({...t}){return jsx(e.Portal,{"data-slot":"dialog-portal",...t})}function C({...t}){return jsx(e.Close,{"data-slot":"dialog-close",...t})}function g({className:t,...a}){return jsx(e.Overlay,{"data-slot":"dialog-overlay",className:i("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[rgb(0_0_32_/_0.01)] backdrop-blur-sm dark:bg-[rgb(255_255_255_/_0.01)]",t),...a})}function y({className:t,children:a,bottom:l=false,showCloseButton:r=true,...n}){return jsxs(f,{"data-slot":"dialog-portal",children:[jsx(g,{}),r&&jsx(e.Close,{"data-slot":"dialog-close",asChild:true,children:jsx("button",{type:"button",className:"before:bg-tint-700-reversed fixed top-[15px] left-5 z-50 overflow-visible before:absolute before:-inset-1.5 before:z-40 before:flex before:size-[calc(100%+12px)] before:rounded-full before:backdrop-blur-sm before:content-['']",children:jsx("div",{className:"bg-foreground text-background relative z-50 flex size-10 items-center justify-center rounded-full",children:jsx(XClose,{className:"size-[18px]"})})})}),jsx(e.Content,{"data-slot":"dialog-content",className:i("bg-surface-bg-default data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-xl shadow-2xl duration-200 sm:max-w-lg",{"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom m:max-h-full z-50 h-full max-h-full w-full max-w-full overflow-auto data-[state=closed]:duration-200 data-[state=closed]:ease-[cubic-bezier(1,0,0.72,0.32)] data-[state=open]:duration-500 data-[state=open]:ease-[cubic-bezier(0.32,0.72,0,1)] sm:max-w-full":l},t),...n,children:a})]})}function z({className:t,...a}){return jsx("div",{"data-slot":"dialog-header",className:i("flex flex-col gap-2 text-center sm:text-left",t),...a})}function R({className:t,...a}){return jsx("div",{"data-slot":"dialog-footer",className:i("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...a})}function w({className:t,...a}){return jsx(e.Title,{"data-slot":"dialog-title",className:i("text-lg leading-none font-semibold",t),...a})}function N({className:t,...a}){return jsx(e.Description,{"data-slot":"dialog-description",className:i("text-muted-foreground text-sm",t),...a})}export{P as Dialog,C as DialogClose,y as DialogContent,N as DialogDescription,R as DialogFooter,z as DialogHeader,g as DialogOverlay,f as DialogPortal,w as DialogTitle,x as DialogTrigger};//# sourceMappingURL=dialog.js.map
|
|
2
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/dialog/dialog.tsx"],"names":["cn","inputs","twMerge","clsx","Dialog","props","jsx","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","DialogContent","children","bottom","showCloseButton","jsxs","XClose","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":"sLAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,OAAAA,CAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCCA,SAASG,CAAAA,CAAO,CAAE,GAAGC,CAAM,CAAA,CAAsD,CAC/E,OAAOC,GAAAA,CAAiB,CAAA,CAAA,IAAA,CAAhB,CAAqB,YAAU,QAAA,CAAU,GAAGD,CAAAA,CAAO,CAC7D,CAEA,SAASE,CAAAA,CAAc,CAAE,GAAGF,CAAM,CAAA,CAAyD,CACzF,OAAOC,GAAAA,CAAiB,CAAA,CAAA,OAAA,CAAhB,CAAwB,WAAA,CAAU,iBAAkB,GAAGD,CAAAA,CAAO,CACxE,CAEA,SAASG,CAAAA,CAAa,CAAE,GAAGH,CAAM,EAAwD,CACvF,OAAOC,GAAAA,CAAi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ACE,+UACEc,CACJ,CAAA,CACAH,CACF,CAAA,CACC,GAAGN,CAAAA,CAEH,QAAA,CAAAQ,CAAAA,CACH,GACF,CAEJ,CAEA,SAASK,CAAAA,CAAa,CAAE,SAAA,CAAAP,CAAAA,CAAW,GAAGN,CAAM,CAAA,CAAgC,CAC1E,OACEC,GAAAA,CAAC,OACC,WAAA,CAAU,eAAA,CACV,SAAA,CAAWN,CAAAA,CAAG,+CAAgDW,CAAS,CAAA,CACtE,GAAGN,CAAAA,CACN,CAEJ,CAEA,SAASc,CAAAA,CAAa,CAAE,SAAA,CAAAR,CAAAA,CAAW,GAAGN,CAAM,CAAA,CAAgC,CAC1E,OACEC,GAAAA,CAAC,OACC,WAAA,CAAU,eAAA,CACV,SAAA,CAAWN,CAAAA,CAAG,wDAAA,CAA0DW,CAAS,CAAA,CAChF,GAAGN,EACN,CAEJ,CAEA,SAASe,CAAAA,CAAY,CAAE,SAAA,CAAAT,CAAAA,CAAW,GAAGN,CAAM,EAAuD,CAChG,OACEC,GAAAA,CAAiB,CAAA,CAAA,KAAA,CAAhB,CACC,WAAA,CAAU,cAAA,CACV,SAAA,CAAWN,EAAG,oCAAA,CAAsCW,CAAS,CAAA,CAC5D,GAAGN,EACN,CAEJ,CAEA,SAASgB,CAAAA,CAAkB,CACzB,SAAA,CAAAV,CAAAA,CACA,GAAGN,CACL,CAAA,CAA6D,CAC3D,OACEC,GAAAA,CAAiB,cAAhB,CACC,WAAA,CAAU,oBAAA,CACV,SAAA,CAAWN,EAAG,+BAAA,CAAiCW,CAAS,CAAA,CACvD,GAAGN,EACN,CAEJ","file":"dialog.js","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","import * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport type * as React from \"react\";\n\nimport { XClose } from \"@untitledui/icons\";\nimport { cn } from \"../../lib/utils\";\n\nfunction Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nfunction DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nfunction DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nfunction DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[rgb(0_0_32_/_0.01)] backdrop-blur-sm dark:bg-[rgb(255_255_255_/_0.01)]\",\n // \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DialogContent({\n className,\n children,\n bottom = false,\n showCloseButton = true,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Content> & {\n bottom?: boolean;\n showCloseButton?: boolean;\n}) {\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay />\n {showCloseButton && (\n <DialogPrimitive.Close data-slot=\"dialog-close\" asChild>\n {/* <Button\n className=\"fixed top-[15px] left-5 z-50 overflow-visible before:absolute before:top-3 before:left-3 before:z-50 before:flex before:size-[100px] before:bg-red-600 before:content-['']\"\n collapsed\n leading={<XClose className=\"size-[18px]\" />}\n pill\n theme=\"brand\"\n variant=\"primary\"\n /> */}\n <button\n type=\"button\"\n className=\"before:bg-tint-700-reversed fixed top-[15px] left-5 z-50 overflow-visible before:absolute before:-inset-1.5 before:z-40 before:flex before:size-[calc(100%+12px)] before:rounded-full before:backdrop-blur-sm before:content-['']\"\n >\n <div className=\"bg-foreground text-background relative z-50 flex size-10 items-center justify-center rounded-full\">\n <XClose className=\"size-[18px]\" />\n </div>\n </button>\n </DialogPrimitive.Close>\n )}\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-surface-bg-default data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-xl shadow-2xl duration-200 sm:max-w-lg\",\n {\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom m:max-h-full z-50 h-full max-h-full w-full max-w-full overflow-auto data-[state=closed]:duration-200 data-[state=closed]:ease-[cubic-bezier(1,0,0.72,0.32)] data-[state=open]:duration-500 data-[state=open]:ease-[cubic-bezier(0.32,0.72,0,1)] sm:max-w-full\":\n bottom,\n },\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2 text-center sm:text-left\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-semibold\", className)}\n {...props}\n />\n );\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n );\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n};\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var e=require('@radix-ui/react-dropdown-menu'),icons=require('@untitledui/icons'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');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 e__namespace=/*#__PURE__*/_interopNamespace(e);function i(...t){return tailwindMerge.twMerge(clsx.clsx(t))}function P({...t}){return jsxRuntime.jsx(e__namespace.Root,{"data-slot":"dropdown-menu",...t})}function b({...t}){return jsxRuntime.jsx(e__namespace.Portal,{"data-slot":"dropdown-menu-portal",...t})}function M({...t}){return jsxRuntime.jsx(e__namespace.Trigger,{"data-slot":"dropdown-menu-trigger",...t})}function D({className:t,sideOffset:n=4,...r}){return jsxRuntime.jsx(e__namespace.Portal,{children:jsxRuntime.jsx(e__namespace.Content,{"data-slot":"dropdown-menu-content",sideOffset:n,className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-border-edge-light z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1.5 shadow-xl",t),...r})})}function x({...t}){return jsxRuntime.jsx(e__namespace.Group,{"data-slot":"dropdown-menu-group",...t})}function h({className:t,inset:n,variant:r="default",...a}){return jsxRuntime.jsx(e__namespace.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...a})}function C({className:t,children:n,checked:r,...a}){return jsxRuntime.jsxs(e__namespace.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:i("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:r,...a,children:[jsxRuntime.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:jsxRuntime.jsx(e__namespace.ItemIndicator,{children:jsxRuntime.jsx(icons.CheckCircle,{className:"size-4"})})}),n]})}function y({...t}){return jsxRuntime.jsx(e__namespace.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...t})}function R({className:t,children:n,...r}){return jsxRuntime.jsxs(e__namespace.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:i("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[jsxRuntime.jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:jsxRuntime.jsx(e__namespace.ItemIndicator,{children:jsxRuntime.jsx(icons.Circle,{className:"size-2 fill-current"})})}),n]})}function z({className:t,inset:n,...r}){return jsxRuntime.jsx(e__namespace.Label,{"data-slot":"dropdown-menu-label","data-inset":n,className:i("px-2 py-1.5 text-sm font-medium data-inset:pl-8",t),...r})}function I({className:t,...n}){return jsxRuntime.jsx(e__namespace.Separator,{"data-slot":"dropdown-menu-separator",className:i("bg-border -mx-1 my-1 h-px",t),...n})}function N({className:t,...n}){return jsxRuntime.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:i("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})}function S({...t}){return jsxRuntime.jsx(e__namespace.Sub,{"data-slot":"dropdown-menu-sub",...t})}function _({className:t,inset:n,children:r,...a}){return jsxRuntime.jsxs(e__namespace.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:i("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...a,children:[r,jsxRuntime.jsx(icons.ChevronRight,{className:"ml-auto size-4"})]})}function k({className:t,...n}){return jsxRuntime.jsx(e__namespace.SubContent,{"data-slot":"dropdown-menu-sub-content",className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-2xl border p-1 shadow-lg",t),...n})}exports.DropdownMenu=P;exports.DropdownMenuCheckboxItem=C;exports.DropdownMenuContent=D;exports.DropdownMenuGroup=x;exports.DropdownMenuItem=h;exports.DropdownMenuLabel=z;exports.DropdownMenuPortal=b;exports.DropdownMenuRadioGroup=y;exports.DropdownMenuRadioItem=R;exports.DropdownMenuSeparator=I;exports.DropdownMenuShortcut=N;exports.DropdownMenuSub=S;exports.DropdownMenuSubContent=k;exports.DropdownMenuSubTrigger=_;exports.DropdownMenuTrigger=M;//# sourceMappingURL=dropdown-menu.cjs.map
|
|
2
|
+
//# sourceMappingURL=dropdown-menu.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/dropdown-menu/dropdown-menu.tsx"],"names":["cn","inputs","twMerge","clsx","DropdownMenu","props","jsx","e","DropdownMenuPortal","DropdownMenuTrigger","DropdownMenuContent","className","sideOffset","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckCircle","DropdownMenuRadioGroup","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRight","DropdownMenuSubContent"],"mappings":"0iBAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCCA,SAASG,CAAAA,CAAa,CAAE,GAAGC,CAAM,CAAA,CAA4D,CAC3F,OAAOC,cAAAA,CAAuBC,YAAA,CAAA,IAAA,CAAtB,CAA2B,YAAU,eAAA,CAAiB,GAAGF,CAAAA,CAAO,CAC1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A,CAAa,SAAA,CAAU,iBAAiB,CAAA,CAAA,CAC3C,CAEJ,CAEA,SAASC,CAAAA,CAAuB,CAC9B,UAAApB,CAAAA,CACA,GAAGN,CACL,CAAA,CAAkE,CAChE,OACEC,eAAuBC,YAAA,CAAA,UAAA,CAAtB,CACC,WAAA,CAAU,2BAAA,CACV,SAAA,CAAWP,CAAAA,CACT,ifACAW,CACF,CAAA,CACC,GAAGN,CAAAA,CACN,CAEJ","file":"dropdown-menu.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","import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport type * as React from \"react\";\n\nimport { CheckCircle, ChevronRight, Circle } from \"@untitledui/icons\";\nimport { cn } from \"../../lib/utils\";\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-border-edge-light z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1.5 shadow-xl\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckCircle className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-2 py-1.5 text-sm font-medium data-inset:pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"text-muted-foreground ml-auto text-xs tracking-widest\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-2xl border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): react_jsx_runtime.JSX.Element;
|
|
7
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
11
|
+
inset?: boolean;
|
|
12
|
+
variant?: "default" | "destructive";
|
|
13
|
+
}): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): react_jsx_runtime.JSX.Element;
|
|
16
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
24
|
+
inset?: boolean;
|
|
25
|
+
}): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from'@radix-ui/react-dropdown-menu';import {CheckCircle,Circle,ChevronRight}from'@untitledui/icons';import {clsx}from'clsx';import {twMerge}from'tailwind-merge';import {jsx,jsxs}from'react/jsx-runtime';function i(...t){return twMerge(clsx(t))}function P({...t}){return jsx(e.Root,{"data-slot":"dropdown-menu",...t})}function b({...t}){return jsx(e.Portal,{"data-slot":"dropdown-menu-portal",...t})}function M({...t}){return jsx(e.Trigger,{"data-slot":"dropdown-menu-trigger",...t})}function D({className:t,sideOffset:n=4,...r}){return jsx(e.Portal,{children:jsx(e.Content,{"data-slot":"dropdown-menu-content",sideOffset:n,className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-border-edge-light z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1.5 shadow-xl",t),...r})})}function x({...t}){return jsx(e.Group,{"data-slot":"dropdown-menu-group",...t})}function h({className:t,inset:n,variant:r="default",...a}){return jsx(e.Item,{"data-slot":"dropdown-menu-item","data-inset":n,"data-variant":r,className:i("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...a})}function C({className:t,children:n,checked:r,...a}){return jsxs(e.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item",className:i("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),checked:r,...a,children:[jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:jsx(e.ItemIndicator,{children:jsx(CheckCircle,{className:"size-4"})})}),n]})}function y({...t}){return jsx(e.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...t})}function R({className:t,children:n,...r}){return jsxs(e.RadioItem,{"data-slot":"dropdown-menu-radio-item",className:i("focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[jsx("span",{className:"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center",children:jsx(e.ItemIndicator,{children:jsx(Circle,{className:"size-2 fill-current"})})}),n]})}function z({className:t,inset:n,...r}){return jsx(e.Label,{"data-slot":"dropdown-menu-label","data-inset":n,className:i("px-2 py-1.5 text-sm font-medium data-inset:pl-8",t),...r})}function I({className:t,...n}){return jsx(e.Separator,{"data-slot":"dropdown-menu-separator",className:i("bg-border -mx-1 my-1 h-px",t),...n})}function N({className:t,...n}){return jsx("span",{"data-slot":"dropdown-menu-shortcut",className:i("text-muted-foreground ml-auto text-xs tracking-widest",t),...n})}function S({...t}){return jsx(e.Sub,{"data-slot":"dropdown-menu-sub",...t})}function _({className:t,inset:n,children:r,...a}){return jsxs(e.SubTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":n,className:i("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...a,children:[r,jsx(ChevronRight,{className:"ml-auto size-4"})]})}function k({className:t,...n}){return jsx(e.SubContent,{"data-slot":"dropdown-menu-sub-content",className:i("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-2xl border p-1 shadow-lg",t),...n})}export{P as DropdownMenu,C as DropdownMenuCheckboxItem,D as DropdownMenuContent,x as DropdownMenuGroup,h as DropdownMenuItem,z as DropdownMenuLabel,b as DropdownMenuPortal,y as DropdownMenuRadioGroup,R as DropdownMenuRadioItem,I as DropdownMenuSeparator,N as DropdownMenuShortcut,S as DropdownMenuSub,k as DropdownMenuSubContent,_ as DropdownMenuSubTrigger,M as DropdownMenuTrigger};//# sourceMappingURL=dropdown-menu.js.map
|
|
2
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/lib/utils.ts","../src/components/dropdown-menu/dropdown-menu.tsx"],"names":["cn","inputs","twMerge","clsx","DropdownMenu","props","jsx","DropdownMenuPortal","DropdownMenuTrigger","DropdownMenuContent","className","sideOffset","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuCheckboxItem","children","checked","jsxs","CheckCircle","DropdownMenuRadioGroup","DropdownMenuRadioItem","Circle","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuShortcut","DropdownMenuSub","DropdownMenuSubTrigger","ChevronRight","DropdownMenuSubContent"],"mappings":"sNAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAAA,CAAsB,CAC1C,OAAOC,OAAAA,CAAQC,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCCA,SAASG,CAAAA,CAAa,CAAE,GAAGC,CAAM,CAAA,CAA4D,CAC3F,OAAOC,GAAAA,CAAuB,CAAA,CAAA,IAAA,CAAtB,CAA2B,YAAU,eAAA,CAAiB,GAAGD,CAAAA,CAAO,CAC1E,CAEA,SAASE,EAAmB,CAC1B,GAAGF,CACL,CAAA,CAA8D,CAC5D,OAAOC,GAAAA,CAAuB,CAAA,CAAA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CACL,CAAA,CAAkE,CAChE,OACEC,IAAuB,CAAA,CAAA,UAAA,CAAtB,CACC,WAAA,CAAU,2BAAA,CACV,SAAA,CAAWN,CAAAA,CACT,ifACAU,CACF,CAAA,CACC,GAAGL,CAAAA,CACN,CAEJ","file":"dropdown-menu.js","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","import * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport type * as React from \"react\";\n\nimport { CheckCircle, ChevronRight, Circle } from \"@untitledui/icons\";\nimport { cn } from \"../../lib/utils\";\n\nfunction DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />;\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border-border-edge-light z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-2xl border p-1.5 shadow-xl\",\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nfunction DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n variant?: \"default\" | \"destructive\";\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive! [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm font-medium outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckCircle className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\"px-2 py-1.5 text-sm font-medium data-inset:pl-8\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuShortcut({ className, ...props }: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\"text-muted-foreground ml-auto text-xs tracking-widest\", className)}\n {...props}\n />\n );\n}\n\nfunction DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-1.5 rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-2xl border p-1 shadow-lg\",\n className,\n )}\n {...props}\n />\n );\n}\n\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n};\n"]}
|