@ngrok/mantle 0.16.2 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/alert-dialog.js +1 -1
  3. package/dist/alert-dialog.js.map +1 -1
  4. package/dist/badge.js +1 -1
  5. package/dist/badge.js.map +1 -1
  6. package/dist/button.js +1 -1
  7. package/dist/calendar.js +1 -1
  8. package/dist/calendar.js.map +1 -1
  9. package/dist/chunk-A7ZXYP6T.js +2 -0
  10. package/dist/chunk-A7ZXYP6T.js.map +1 -0
  11. package/dist/chunk-DFJUKUK4.js +2 -0
  12. package/dist/chunk-DFJUKUK4.js.map +1 -0
  13. package/dist/chunk-LBEYGDAN.js +2 -0
  14. package/dist/{chunk-SMCZZUU4.js.map → chunk-LBEYGDAN.js.map} +1 -1
  15. package/dist/chunk-WCQVBWRD.js +2 -0
  16. package/dist/chunk-WCQVBWRD.js.map +1 -0
  17. package/dist/chunk-YC6QXFZS.js +2 -0
  18. package/dist/chunk-YC6QXFZS.js.map +1 -0
  19. package/dist/dialog.js +1 -1
  20. package/dist/dropdown-menu.js +1 -1
  21. package/dist/dropdown-menu.js.map +1 -1
  22. package/dist/icon.js +1 -1
  23. package/dist/input.js +1 -1
  24. package/dist/input.js.map +1 -1
  25. package/dist/pagination.js +1 -1
  26. package/dist/radio-group.js +1 -1
  27. package/dist/radio-group.js.map +1 -1
  28. package/dist/select.js +1 -1
  29. package/dist/sheet.js +1 -1
  30. package/dist/switch.js +1 -1
  31. package/dist/switch.js.map +1 -1
  32. package/dist/tabs.js +1 -1
  33. package/dist/tabs.js.map +1 -1
  34. package/dist/text-area.js +1 -1
  35. package/dist/text-area.js.map +1 -1
  36. package/dist/toast.js +1 -1
  37. package/package.json +15 -15
  38. package/dist/chunk-BGLTMLKM.js +0 -2
  39. package/dist/chunk-BGLTMLKM.js.map +0 -1
  40. package/dist/chunk-BU7JVIWF.js +0 -2
  41. package/dist/chunk-BU7JVIWF.js.map +0 -1
  42. package/dist/chunk-E6LNHWJ3.js +0 -2
  43. package/dist/chunk-E6LNHWJ3.js.map +0 -1
  44. package/dist/chunk-MJVZHJQA.js +0 -2
  45. package/dist/chunk-MJVZHJQA.js.map +0 -1
  46. package/dist/chunk-SMCZZUU4.js +0 -2
package/dist/accordion.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as m}from"./chunk-SMCZZUU4.js";import"./chunk-VJPVAY5J.js";import{a as r}from"./chunk-EW5CFGXT.js";import{CaretDown as g}from"@phosphor-icons/react/CaretDown";import*as o from"@radix-ui/react-accordion";import{forwardRef as n}from"react";import{jsx as c}from"react/jsx-runtime";var a=n(({className:e,...i},t)=>c(o.Root,{ref:t,className:r("w-full space-y-2.5",e),...i}));a.displayName="Accordion";var p=o.Item;p.displayName="AccordionItem";var s=n(({className:e,...i},t)=>c(o.Header,{ref:t,className:r("flex items-center gap-2",e),...i}));s.displayName="AccordionHeading";var f=n(({className:e,children:i,...t},d)=>c(o.Trigger,{ref:d,className:r("group flex items-center gap-1.5",e),...t,children:i}));f.displayName="AccordionTrigger";var l=({className:e,...i})=>c(m,{...i,svg:c(g,{weight:"fill"}),className:r("group-data-state-open:rotate-0 -rotate-90",e)}),A=n(({className:e,children:i,...t},d)=>c(o.Content,{ref:d,className:r("data-state-closed:animate-accordion-up data-state-open:animate-accordion-down overflow-hidden pt-4",e),...t,children:i}));A.displayName="AccordionContent";export{a as Accordion,A as AccordionContent,s as AccordionHeading,p as AccordionItem,f as AccordionTrigger,l as AccordionTriggerIcon};
1
+ import{a as m}from"./chunk-LBEYGDAN.js";import"./chunk-VJPVAY5J.js";import{a as r}from"./chunk-EW5CFGXT.js";import{CaretDown as g}from"@phosphor-icons/react/CaretDown";import*as o from"@radix-ui/react-accordion";import{forwardRef as n}from"react";import{jsx as c}from"react/jsx-runtime";var a=n(({className:e,...i},t)=>c(o.Root,{ref:t,className:r("w-full space-y-2.5",e),...i}));a.displayName="Accordion";var p=o.Item;p.displayName="AccordionItem";var s=n(({className:e,...i},t)=>c(o.Header,{ref:t,className:r("flex items-center gap-2",e),...i}));s.displayName="AccordionHeading";var f=n(({className:e,children:i,...t},d)=>c(o.Trigger,{ref:d,className:r("group flex items-center gap-1.5",e),...t,children:i}));f.displayName="AccordionTrigger";var l=({className:e,...i})=>c(m,{...i,svg:c(g,{weight:"fill"}),className:r("group-data-state-open:rotate-0 -rotate-90",e)}),A=n(({className:e,children:i,...t},d)=>c(o.Content,{ref:d,className:r("data-state-closed:animate-accordion-up data-state-open:animate-accordion-down overflow-hidden pt-4",e),...t,children:i}));A.displayName="AccordionContent";export{a as Accordion,A as AccordionContent,s as AccordionHeading,p as AccordionItem,f as AccordionTrigger,l as AccordionTriggerIcon};
2
2
  //# sourceMappingURL=accordion.js.map
@@ -1,2 +1,2 @@
1
- import{a as c,b as d,c as f,d as D,e as A,f as y,g as u,h as P}from"./chunk-J4X3ODX7.js";import{g as p}from"./chunk-BGLTMLKM.js";import"./chunk-273VK4KO.js";import"./chunk-D3XF6J5A.js";import{b as m}from"./chunk-MJVZHJQA.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-SMCZZUU4.js";import{a as g}from"./chunk-VJPVAY5J.js";import{a as r}from"./chunk-EW5CFGXT.js";import{Info as W}from"@phosphor-icons/react/Info";import{Warning as F}from"@phosphor-icons/react/Warning";import{createContext as H,forwardRef as s,useContext as S}from"react";import j from"tiny-invariant";import{jsx as o,jsxs as q}from"react/jsx-runtime";var v=H(null);function x(){let t=S(v);return j(t,"AlertDialog child component used outside of AlertDialog parent!"),t}function C({priority:t,...e}){return o(v.Provider,{value:{priority:t},children:o(c,{...e})})}C.displayName="AlertDialog";var V=d,k=f,N=s(({className:t,...e},i)=>o(A,{className:r("data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-sm",t),...e,ref:i}));N.displayName="AlertDialogOverlay";var R=s(({className:t,onInteractOutside:e,onPointerDownOutside:i,...a},l)=>q(k,{children:[o(N,{}),o("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:o(y,{ref:l,className:r("flex w-full max-w-md flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start","outline-none focus-within:outline-none","p-6","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95",t),onInteractOutside:n=>{p(n),e?.(n)},onPointerDownOutside:n=>{p(n),i?.(n)},...a})})]}));R.displayName="AlertDialogContent";var b=({className:t,...e})=>o("div",{className:r("flex-1 space-y-4",t),...e});b.displayName="AlertDialogBody";var h=({className:t,...e})=>o("div",{className:r("flex flex-col space-y-2 text-center sm:text-start",t),...e});h.displayName="AlertDialogHeader";var O=({className:t,...e})=>o("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});O.displayName="AlertDialogFooter";var B=s(({className:t,...e},i)=>o(u,{ref:i,className:r("text-strong text-center text-xl font-medium sm:text-start sm:text-lg",t),...e}));B.displayName="AlertDialogTitle";var I=s(({className:t,...e},i)=>o(P,{ref:i,className:r("text-body text-center text-base font-normal sm:text-start sm:text-sm",t),...e}));I.displayName="AlertDialogDescription";var T=s(({appearance:t="filled",...e},i)=>{let a=x(),l="default";return a.priority==="danger"&&(l="danger"),o(m,{appearance:t,priority:l,ref:i,...e})});T.displayName="AlertDialogAction";var w=s(({appearance:t="outlined",className:e,priority:i="neutral",...a},l)=>o(D,{asChild:!0,children:o(m,{appearance:t,className:r("mt-2 sm:mt-0",e),priority:i,ref:l,...a})}));w.displayName="AlertDialogCancel";var E=s(({className:t,svg:e,...i},a)=>{let l=x(),n=l.priority==="danger"?"text-danger-600":"text-accent-600",z=l.priority==="danger"?o(F,{}):o(W,{});return o(g,{ref:a,className:r("size-12 sm:size-7",n,t),svg:e??z,...i})});E.displayName="AlertDialogIcon";export{C as AlertDialog,T as AlertDialogAction,b as AlertDialogBody,w as AlertDialogCancel,R as AlertDialogContent,I as AlertDialogDescription,O as AlertDialogFooter,h as AlertDialogHeader,E as AlertDialogIcon,B as AlertDialogTitle,V as AlertDialogTrigger};
1
+ import{a as c,b as d,c as f,d as D,e as A,f as y,g as u,h as P}from"./chunk-J4X3ODX7.js";import{g as p}from"./chunk-A7ZXYP6T.js";import"./chunk-273VK4KO.js";import"./chunk-D3XF6J5A.js";import{b as m}from"./chunk-DFJUKUK4.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-LBEYGDAN.js";import{a as g}from"./chunk-VJPVAY5J.js";import{a as r}from"./chunk-EW5CFGXT.js";import{Info as W}from"@phosphor-icons/react/Info";import{Warning as F}from"@phosphor-icons/react/Warning";import{createContext as H,forwardRef as s,useContext as S}from"react";import j from"tiny-invariant";import{jsx as o,jsxs as q}from"react/jsx-runtime";var v=H(null);function x(){let t=S(v);return j(t,"AlertDialog child component used outside of AlertDialog parent!"),t}function C({priority:t,...e}){return o(v.Provider,{value:{priority:t},children:o(c,{...e})})}C.displayName="AlertDialog";var V=d,k=f,N=s(({className:t,...e},i)=>o(A,{className:r("data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-sm",t),...e,ref:i}));N.displayName="AlertDialogOverlay";var R=s(({className:t,onInteractOutside:e,onPointerDownOutside:i,...a},l)=>q(k,{children:[o(N,{}),o("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:o(y,{ref:l,className:r("flex w-full max-w-md flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start","outline-none focus-within:outline-none","p-6","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95",t),onInteractOutside:n=>{p(n),e?.(n)},onPointerDownOutside:n=>{p(n),i?.(n)},...a})})]}));R.displayName="AlertDialogContent";var b=({className:t,...e})=>o("div",{className:r("flex-1 space-y-4",t),...e});b.displayName="AlertDialogBody";var h=({className:t,...e})=>o("div",{className:r("flex flex-col space-y-2 text-center sm:text-start",t),...e});h.displayName="AlertDialogHeader";var O=({className:t,...e})=>o("div",{className:r("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t),...e});O.displayName="AlertDialogFooter";var B=s(({className:t,...e},i)=>o(u,{ref:i,className:r("text-strong text-center text-lg font-medium sm:text-start",t),...e}));B.displayName="AlertDialogTitle";var I=s(({className:t,...e},i)=>o(P,{ref:i,className:r("text-body text-center text-sm font-normal sm:text-start",t),...e}));I.displayName="AlertDialogDescription";var T=s(({appearance:t="filled",...e},i)=>{let a=x(),l="default";return a.priority==="danger"&&(l="danger"),o(m,{appearance:t,priority:l,ref:i,...e})});T.displayName="AlertDialogAction";var w=s(({appearance:t="outlined",className:e,priority:i="neutral",...a},l)=>o(D,{asChild:!0,children:o(m,{appearance:t,className:r("mt-2 sm:mt-0",e),priority:i,ref:l,...a})}));w.displayName="AlertDialogCancel";var E=s(({className:t,svg:e,...i},a)=>{let l=x(),n=l.priority==="danger"?"text-danger-600":"text-accent-600",z=l.priority==="danger"?o(F,{}):o(W,{});return o(g,{ref:a,className:r("size-12 sm:size-7",n,t),svg:e??z,...i})});E.displayName="AlertDialogIcon";export{C as AlertDialog,T as AlertDialogAction,b as AlertDialogBody,w as AlertDialogCancel,R as AlertDialogContent,I as AlertDialogDescription,O as AlertDialogFooter,h as AlertDialogHeader,E as AlertDialogIcon,B as AlertDialogTitle,V as AlertDialogTrigger};
2
2
  //# sourceMappingURL=alert-dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { Info } from \"@phosphor-icons/react/Info\";\nimport { Warning } from \"@phosphor-icons/react/Warning\";\nimport {\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\ttype ComponentProps,\n\ttype ComponentPropsWithoutRef,\n\ttype ElementRef,\n\ttype ReactNode,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Button, type ButtonPriority, type ButtonProps } from \"../button/button.js\";\nimport * as AlertDialogPrimitive from \"../dialog/primitive.js\";\nimport { SvgOnly } from \"../icon/svg-only.js\";\nimport type { SvgAttributes } from \"../icon/types.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\nconst priorities = [\"info\", \"danger\"] as const;\ntype Priority = (typeof priorities)[number];\n\ntype AlertDialogContextValue = {\n\tpriority: Priority;\n};\n\nconst AlertDialogContext = createContext<AlertDialogContextValue | null>(null);\n\nfunction useAlertDialogContext() {\n\tconst context = useContext(AlertDialogContext);\n\tinvariant(context, \"AlertDialog child component used outside of AlertDialog parent!\");\n\treturn context;\n}\n\ntype AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root> & {\n\t/**\n\t * Indicates the importance or impact level of the AlertDialog, affecting its\n\t * color and styling to communicate its purpose to the user.\n\t */\n\tpriority: Priority;\n};\n\n/**\n * The root component for the Alert Dialog\n */\nfunction AlertDialog({ priority, ...props }: AlertDialogProps) {\n\treturn (\n\t\t<AlertDialogContext.Provider value={{ priority }}>\n\t\t\t<AlertDialogPrimitive.Root {...props} />\n\t\t</AlertDialogContext.Provider>\n\t);\n}\nAlertDialog.displayName = \"AlertDialog\";\n\n/**\n * A button that opens the Alert Dialog.\n */\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\n/**\n * A layer that covers the inert portion of the view when the dialog is open.\n */\nconst AlertDialogOverlay = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = \"AlertDialogOverlay\";\n\n/**\n * The popover alert dialog container.\n *\n * Renders on top of the overlay and is centered in the viewport.\n */\nconst AlertDialogContent = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, onInteractOutside, onPointerDownOutside, ...props }, ref) => (\n\t<AlertDialogPortal>\n\t\t<AlertDialogOverlay />\n\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"flex w-full max-w-md flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start\",\n\t\t\t\t\t\"outline-none focus-within:outline-none\",\n\t\t\t\t\t\"p-6\",\n\t\t\t\t\t\"border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\"data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t}}\n\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = \"AlertDialogContent\";\n\n/**\n * Contains the main content of the dialog.\n */\nconst AlertDialogBody = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div className={cx(\"flex-1 space-y-4\", className)} {...props} />\n);\nAlertDialogBody.displayName = \"AlertDialogBody\";\n\n/**\n * Contains the header content of the dialog, including the title and description.\n */\nconst AlertDialogHeader = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div className={cx(\"flex flex-col space-y-2 text-center sm:text-start\", className)} {...props} />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\n/**\n * Contains the footer content of the dialog, including the action and cancel buttons.\n */\nconst AlertDialogFooter = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div className={cx(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\n/**\n * An accessible name to be announced when the dialog is opened.\n *\n * Alternatively, you can provide `aria-label` or `aria-labelledby` to\n * `AlertDialogContent` and exclude this component.\n */\nconst AlertDialogTitle = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong text-center text-xl font-medium sm:text-start sm:text-lg\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = \"AlertDialogTitle\";\n\n/**\n * An accessible description to be announced when the dialog is opened.\n *\n * Alternatively, you can provide `aria-describedby` to `AlertDialogContent` and\n * exclude this component.\n */\nconst AlertDialogDescription = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-center text-base font-normal sm:text-start sm:text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName = \"AlertDialogDescription\";\n\n/**\n * A button that confirms the Alert Dialog action.\n * Will default to appearance=\"filled\", as well as the priority color from the `AlertDialog`.\n * Does not close the alert dialog by default.\n *\n * These buttons should be distinguished visually from the AlertDialogCancel button.\n *\n * Composes around the mantle Button component.\n */\nconst AlertDialogAction = forwardRef<ElementRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"filled\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst ctx = useAlertDialogContext();\n\t\tlet buttonPriority: NonNullable<ButtonPriority> = \"default\";\n\t\tif (ctx.priority === \"danger\") {\n\t\t\tbuttonPriority = \"danger\";\n\t\t}\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t//\n\t\t\t\tappearance={appearance}\n\t\t\t\tpriority={buttonPriority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertDialogAction.displayName = \"AlertDialogAction\";\n\n/**\n * A button that closes the dialog and cancels the action.\n * Will default to appearance=\"outlined\" and priority=\"neutral\".\n *\n * This button should be distinguished visually from AlertDialogAction buttons.\n *\n * Composes around the mantle Button component.\n */\nconst AlertDialogCancel = forwardRef<ElementRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"outlined\",\n\t\t\tclassName,\n\t\t\tpriority = \"neutral\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<AlertDialogPrimitive.Close asChild>\n\t\t\t<Button\n\t\t\t\tappearance={appearance}\n\t\t\t\tclassName={cx(\"mt-2 sm:mt-0\", className)}\n\t\t\t\tpriority={priority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPrimitive.Close>\n\t),\n);\nAlertDialogCancel.displayName = \"AlertDialogCancel\";\n\ntype AlertDialogIconProps = Omit<SvgAttributes, \"children\"> & {\n\tsvg?: ReactNode;\n};\n\n/**\n * An icon that visually represents the priority of the AlertDialog.\n *\n * Defaults to a warning icon for danger priority and an info icon for info\n * priority with the appropriate color.\n *\n * Can be overridden with a custom icon using the `svg` prop.\n */\nconst AlertDialogIcon = forwardRef<ElementRef<\"svg\">, AlertDialogIconProps>(({ className, svg, ...props }, ref) => {\n\tconst ctx = useAlertDialogContext();\n\tconst defaultColor = ctx.priority === \"danger\" ? \"text-danger-600\" : \"text-accent-600\";\n\tconst defaultIcon = ctx.priority === \"danger\" ? <Warning /> : <Info />;\n\n\treturn (\n\t\t<SvgOnly\n\t\t\tref={ref}\n\t\t\tclassName={cx(\"size-12 sm:size-7\", defaultColor, className)}\n\t\t\tsvg={svg ?? defaultIcon}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nAlertDialogIcon.displayName = \"AlertDialogIcon\";\n\nexport {\n\t//,\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogBody,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n\tAlertDialogDescription,\n\tAlertDialogFooter,\n\tAlertDialogHeader,\n\tAlertDialogIcon,\n\tAlertDialogTitle,\n\tAlertDialogTrigger,\n};\n"],"mappings":"iaAEA,OAAS,QAAAA,MAAY,6BACrB,OAAS,WAAAC,MAAe,gCACxB,OACC,iBAAAC,EACA,cAAAC,EACA,cAAAC,MAKM,QACP,OAAOC,MAAe,iBAqCnB,cAAAC,EAwCF,QAAAC,MAxCE,oBAtBH,IAAMC,EAAqBC,EAA8C,IAAI,EAE7E,SAASC,GAAwB,CAChC,IAAMC,EAAUC,EAAWJ,CAAkB,EAC7C,OAAAK,EAAUF,EAAS,iEAAiE,EAC7EA,CACR,CAaA,SAASG,EAAY,CAAE,SAAAC,EAAU,GAAGC,CAAM,EAAqB,CAC9D,OACCC,EAACT,EAAmB,SAAnB,CAA4B,MAAO,CAAE,SAAAO,CAAS,EAC9C,SAAAE,EAAsBC,EAArB,CAA2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AAWE,EAAG,oBAAqBwB,EAAc3B,CAAS,EAC1D,IAAK0B,GAAOE,EACX,GAAGrC,EACL,CAEF,CAAC,EACDkC,EAAgB,YAAc","names":["Info","Warning","createContext","forwardRef","useContext","invariant","jsx","jsxs","AlertDialogContext","createContext","useAlertDialogContext","context","useContext","invariant","AlertDialog","priority","props","jsx","Root","AlertDialogTrigger","Trigger","AlertDialogPortal","Portal","AlertDialogOverlay","forwardRef","className","ref","Overlay","cx","AlertDialogContent","onInteractOutside","onPointerDownOutside","jsxs","Content","event","preventCloseOnPromptInteraction","AlertDialogBody","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","Title","AlertDialogDescription","Description","AlertDialogAction","appearance","ctx","buttonPriority","Button","AlertDialogCancel","Close","AlertDialogIcon","svg","defaultColor","defaultIcon","Warning","Info","SvgOnly"]}
1
+ {"version":3,"sources":["../src/components/alert-dialog/alert-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { Info } from \"@phosphor-icons/react/Info\";\nimport { Warning } from \"@phosphor-icons/react/Warning\";\nimport {\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\ttype ComponentProps,\n\ttype ComponentPropsWithoutRef,\n\ttype ElementRef,\n\ttype ReactNode,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Button, type ButtonPriority, type ButtonProps } from \"../button/button.js\";\nimport * as AlertDialogPrimitive from \"../dialog/primitive.js\";\nimport { SvgOnly } from \"../icon/svg-only.js\";\nimport type { SvgAttributes } from \"../icon/types.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\nconst priorities = [\"info\", \"danger\"] as const;\ntype Priority = (typeof priorities)[number];\n\ntype AlertDialogContextValue = {\n\tpriority: Priority;\n};\n\nconst AlertDialogContext = createContext<AlertDialogContextValue | null>(null);\n\nfunction useAlertDialogContext() {\n\tconst context = useContext(AlertDialogContext);\n\tinvariant(context, \"AlertDialog child component used outside of AlertDialog parent!\");\n\treturn context;\n}\n\ntype AlertDialogProps = ComponentProps<typeof AlertDialogPrimitive.Root> & {\n\t/**\n\t * Indicates the importance or impact level of the AlertDialog, affecting its\n\t * color and styling to communicate its purpose to the user.\n\t */\n\tpriority: Priority;\n};\n\n/**\n * The root component for the Alert Dialog\n */\nfunction AlertDialog({ priority, ...props }: AlertDialogProps) {\n\treturn (\n\t\t<AlertDialogContext.Provider value={{ priority }}>\n\t\t\t<AlertDialogPrimitive.Root {...props} />\n\t\t</AlertDialogContext.Provider>\n\t);\n}\nAlertDialog.displayName = \"AlertDialog\";\n\n/**\n * A button that opens the Alert Dialog.\n */\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\n/**\n * A layer that covers the inert portion of the view when the dialog is open.\n */\nconst AlertDialogOverlay = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 bg-overlay fixed inset-0 z-50 backdrop-blur-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nAlertDialogOverlay.displayName = \"AlertDialogOverlay\";\n\n/**\n * The popover alert dialog container.\n *\n * Renders on top of the overlay and is centered in the viewport.\n */\nconst AlertDialogContent = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Content>\n>(({ className, onInteractOutside, onPointerDownOutside, ...props }, ref) => (\n\t<AlertDialogPortal>\n\t\t<AlertDialogOverlay />\n\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t<AlertDialogPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"flex w-full max-w-md flex-1 flex-col items-center gap-4 sm:flex-row sm:items-start\",\n\t\t\t\t\t\"outline-none focus-within:outline-none\",\n\t\t\t\t\t\"p-6\",\n\t\t\t\t\t\"border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\"data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t}}\n\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</div>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = \"AlertDialogContent\";\n\n/**\n * Contains the main content of the dialog.\n */\nconst AlertDialogBody = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div className={cx(\"flex-1 space-y-4\", className)} {...props} />\n);\nAlertDialogBody.displayName = \"AlertDialogBody\";\n\n/**\n * Contains the header content of the dialog, including the title and description.\n */\nconst AlertDialogHeader = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div className={cx(\"flex flex-col space-y-2 text-center sm:text-start\", className)} {...props} />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\n/**\n * Contains the footer content of the dialog, including the action and cancel buttons.\n */\nconst AlertDialogFooter = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div className={cx(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)} {...props} />\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n\n/**\n * An accessible name to be announced when the dialog is opened.\n *\n * Alternatively, you can provide `aria-label` or `aria-labelledby` to\n * `AlertDialogContent` and exclude this component.\n */\nconst AlertDialogTitle = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong text-center text-lg font-medium sm:text-start\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = \"AlertDialogTitle\";\n\n/**\n * An accessible description to be announced when the dialog is opened.\n *\n * Alternatively, you can provide `aria-describedby` to `AlertDialogContent` and\n * exclude this component.\n */\nconst AlertDialogDescription = forwardRef<\n\tElementRef<typeof AlertDialogPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-center text-sm font-normal sm:text-start\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName = \"AlertDialogDescription\";\n\n/**\n * A button that confirms the Alert Dialog action.\n * Will default to appearance=\"filled\", as well as the priority color from the `AlertDialog`.\n * Does not close the alert dialog by default.\n *\n * These buttons should be distinguished visually from the AlertDialogCancel button.\n *\n * Composes around the mantle Button component.\n */\nconst AlertDialogAction = forwardRef<ElementRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"filled\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst ctx = useAlertDialogContext();\n\t\tlet buttonPriority: NonNullable<ButtonPriority> = \"default\";\n\t\tif (ctx.priority === \"danger\") {\n\t\t\tbuttonPriority = \"danger\";\n\t\t}\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\t//\n\t\t\t\tappearance={appearance}\n\t\t\t\tpriority={buttonPriority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nAlertDialogAction.displayName = \"AlertDialogAction\";\n\n/**\n * A button that closes the dialog and cancels the action.\n * Will default to appearance=\"outlined\" and priority=\"neutral\".\n *\n * This button should be distinguished visually from AlertDialogAction buttons.\n *\n * Composes around the mantle Button component.\n */\nconst AlertDialogCancel = forwardRef<ElementRef<\"button\">, ButtonProps>(\n\t(\n\t\t{\n\t\t\t//,\n\t\t\tappearance = \"outlined\",\n\t\t\tclassName,\n\t\t\tpriority = \"neutral\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<AlertDialogPrimitive.Close asChild>\n\t\t\t<Button\n\t\t\t\tappearance={appearance}\n\t\t\t\tclassName={cx(\"mt-2 sm:mt-0\", className)}\n\t\t\t\tpriority={priority}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</AlertDialogPrimitive.Close>\n\t),\n);\nAlertDialogCancel.displayName = \"AlertDialogCancel\";\n\ntype AlertDialogIconProps = Omit<SvgAttributes, \"children\"> & {\n\tsvg?: ReactNode;\n};\n\n/**\n * An icon that visually represents the priority of the AlertDialog.\n *\n * Defaults to a warning icon for danger priority and an info icon for info\n * priority with the appropriate color.\n *\n * Can be overridden with a custom icon using the `svg` prop.\n */\nconst AlertDialogIcon = forwardRef<ElementRef<\"svg\">, AlertDialogIconProps>(({ className, svg, ...props }, ref) => {\n\tconst ctx = useAlertDialogContext();\n\tconst defaultColor = ctx.priority === \"danger\" ? \"text-danger-600\" : \"text-accent-600\";\n\tconst defaultIcon = ctx.priority === \"danger\" ? <Warning /> : <Info />;\n\n\treturn (\n\t\t<SvgOnly\n\t\t\tref={ref}\n\t\t\tclassName={cx(\"size-12 sm:size-7\", defaultColor, className)}\n\t\t\tsvg={svg ?? defaultIcon}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nAlertDialogIcon.displayName = \"AlertDialogIcon\";\n\nexport {\n\t//,\n\tAlertDialog,\n\tAlertDialogAction,\n\tAlertDialogBody,\n\tAlertDialogCancel,\n\tAlertDialogContent,\n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,CACC,CAEC,WAAAoB,EAAa,WACb,UAAAnB,EACA,SAAAV,EAAW,UACX,GAAGC,CACJ,EACAU,IAEAT,EAAsBgC,EAArB,CAA2B,QAAO,GAClC,SAAAhC,EAAC8B,EAAA,CACA,WAAYH,EACZ,UAAWhB,EAAG,eAAgBH,CAAS,EACvC,SAAUV,EACV,IAAKW,EACJ,GAAGV,EACL,EACD,CAEF,EACAgC,EAAkB,YAAc,oBAchC,IAAME,EAAkB1B,EAAoD,CAAC,CAAE,UAAAC,EAAW,IAAA0B,EAAK,GAAGnC,CAAM,EAAGU,IAAQ,CAClH,IAAMmB,EAAMnC,EAAsB,EAC5B0C,EAAeP,EAAI,WAAa,SAAW,kBAAoB,kBAC/DQ,EAAcR,EAAI,WAAa,SAAW5B,EAACqC,EAAA,EAAQ,EAAKrC,EAACsC,EAAA,EAAK,EAEpE,OACCtC,EAACuC,EAAA,CACA,IAAK9B,EACL,UAAWE,EAAG,oBAAqBwB,EAAc3B,CAAS,EAC1D,IAAK0B,GAAOE,EACX,GAAGrC,EACL,CAEF,CAAC,EACDkC,EAAgB,YAAc","names":["Info","Warning","createContext","forwardRef","useContext","invariant","jsx","jsxs","AlertDialogContext","createContext","useAlertDialogContext","context","useContext","invariant","AlertDialog","priority","props","jsx","Root","AlertDialogTrigger","Trigger","AlertDialogPortal","Portal","AlertDialogOverlay","forwardRef","className","ref","Overlay","cx","AlertDialogContent","onInteractOutside","onPointerDownOutside","jsxs","Content","event","preventCloseOnPromptInteraction","AlertDialogBody","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","Title","AlertDialogDescription","Description","AlertDialogAction","appearance","ctx","buttonPriority","Button","AlertDialogCancel","Close","AlertDialogIcon","svg","defaultColor","defaultIcon","Warning","Info","SvgOnly"]}
package/dist/badge.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as s}from"./chunk-VJPVAY5J.js";import{a as c}from"./chunk-EW5CFGXT.js";import{Slot as y}from"@radix-ui/react-slot";import{Children as f,cloneElement as h,isValidElement as C}from"react";import n from"tiny-invariant";import{Fragment as S,jsx as o,jsxs as d}from"react/jsx-runtime";var k=({appearance:t,asChild:e=!1,children:l,className:m,color:i="neutral",icon:r,...g})=>{let u=v(i,t),b=A(i,t),p=c("inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 text-sm font-medium sm:text-xs",r&&"ps-1",u,b,m);if(e){let a=f.only(l);n(C(a),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let x=a.props?.children;return o(y,{className:p,...g,children:h(a,{},d(S,{children:[r&&o(s,{className:"size-5 sm:size-4",svg:r}),x]}))})}return d("span",{className:p,...g,children:[r&&o(s,{className:"size-5 sm:size-4",svg:r}),l]})};var w={amber:"bg-amber-500/20",blue:"bg-blue-500/20",cyan:"bg-cyan-500/20",emerald:"bg-emerald-500/20",fuchsia:"bg-fuchsia-500/20",gray:"bg-gray-500/20",green:"bg-green-500/20",indigo:"bg-indigo-500/20",lime:"bg-lime-500/20",orange:"bg-orange-500/20",pink:"bg-pink-500/20",purple:"bg-purple-500/20",red:"bg-red-500/20",rose:"bg-rose-500/20",sky:"bg-sky-500/20",teal:"bg-teal-500/20",violet:"bg-violet-500/20",yellow:"bg-yellow-500/20",accent:"bg-accent-500/20",danger:"bg-danger-500/20",neutral:"bg-neutral-500/20",success:"bg-success-500/20",warning:"bg-warning-500/20"};function v(t,e){switch(e){case"muted":return w[t];default:n(!1,`Invalid appearance: ${String(e)}`)}}var B={amber:"text-amber-700",blue:"text-blue-700",cyan:"text-cyan-700",emerald:"text-emerald-700",fuchsia:"text-fuchsia-700",gray:"text-gray-700",green:"text-green-700",indigo:"text-indigo-700",lime:"text-lime-700",orange:"text-orange-700",pink:"text-pink-700",purple:"text-purple-700",red:"text-red-700",rose:"text-rose-700",sky:"text-sky-700",teal:"text-teal-700",violet:"text-violet-700",yellow:"text-yellow-700",accent:"text-accent-700",danger:"text-danger-700",neutral:"text-neutral-700",success:"text-success-700",warning:"text-warning-700"};function A(t,e){switch(e){case"muted":return B[t];default:n(!1,`Invalid appearance: ${String(e)}`)}}export{k as Badge};
1
+ import{a as o}from"./chunk-VJPVAY5J.js";import{a as c}from"./chunk-EW5CFGXT.js";import{Slot as y}from"@radix-ui/react-slot";import{Children as f,cloneElement as h,isValidElement as C}from"react";import n from"tiny-invariant";import{Fragment as S,jsx as s,jsxs as d}from"react/jsx-runtime";var k=({appearance:t,asChild:e=!1,children:l,className:u,color:i="neutral",icon:r,...g})=>{let m=v(i,t),b=A(i,t),p=c("inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs",r&&"ps-1",m,b,u);if(e){let a=f.only(l);n(C(a),"When using `asChild`, Badge must be passed a single child as a JSX tag.");let x=a.props?.children;return s(y,{className:p,...g,children:h(a,{},d(S,{children:[r&&s(o,{className:"size-4",svg:r}),x]}))})}return d("span",{className:p,...g,children:[r&&s(o,{className:"size-4",svg:r}),l]})};var w={amber:"bg-amber-500/20",blue:"bg-blue-500/20",cyan:"bg-cyan-500/20",emerald:"bg-emerald-500/20",fuchsia:"bg-fuchsia-500/20",gray:"bg-gray-500/20",green:"bg-green-500/20",indigo:"bg-indigo-500/20",lime:"bg-lime-500/20",orange:"bg-orange-500/20",pink:"bg-pink-500/20",purple:"bg-purple-500/20",red:"bg-red-500/20",rose:"bg-rose-500/20",sky:"bg-sky-500/20",teal:"bg-teal-500/20",violet:"bg-violet-500/20",yellow:"bg-yellow-500/20",accent:"bg-accent-500/20",danger:"bg-danger-500/20",neutral:"bg-neutral-500/20",success:"bg-success-500/20",warning:"bg-warning-500/20"};function v(t,e){switch(e){case"muted":return w[t];default:n(!1,`Invalid appearance: ${String(e)}`)}}var B={amber:"text-amber-700",blue:"text-blue-700",cyan:"text-cyan-700",emerald:"text-emerald-700",fuchsia:"text-fuchsia-700",gray:"text-gray-700",green:"text-green-700",indigo:"text-indigo-700",lime:"text-lime-700",orange:"text-orange-700",pink:"text-pink-700",purple:"text-purple-700",red:"text-red-700",rose:"text-rose-700",sky:"text-sky-700",teal:"text-teal-700",violet:"text-violet-700",yellow:"text-yellow-700",accent:"text-accent-700",danger:"text-danger-700",neutral:"text-neutral-700",success:"text-success-700",warning:"text-warning-700"};function A(t,e){switch(e){case"muted":return B[t];default:n(!1,`Invalid appearance: ${String(e)}`)}}export{k as Badge};
2
2
  //# sourceMappingURL=badge.js.map
package/dist/badge.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/badge/badge.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { Children, cloneElement, isValidElement, type HTMLAttributes, type ReactNode } from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport type { Color } from \"../../utils/color/index.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { SvgOnly } from \"../icon/svg-only.js\";\n\nconst appearances = [\"muted\" /*\"strong\" */] as const;\ntype Appearance = (typeof appearances)[number];\n\ntype BadgeProps = HTMLAttributes<HTMLSpanElement> &\n\tWithAsChild & {\n\t\t/**\n\t\t * The color variant of the badge. Accepts named colors and functional colors from the mantle color palette.\n\t\t */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * The icon to render inside the badge.\n\t\t */\n\t\ticon?: ReactNode;\n\t\t/**\n\t\t * The visual style of the badge.\n\t\t */\n\t\tappearance: Appearance;\n\t};\n\n/**\n * A Badge is a non-interactive component used to highlight important information or to visually indicate the status of an item.\n */\nconst Badge = ({ appearance, asChild = false, children, className, color = \"neutral\", icon, ...props }: BadgeProps) => {\n\tconst bgColor = computeBgColor(color, appearance);\n\tconst textColor = computeTextColor(color, appearance);\n\n\tconst badgeClasses = cx(\n\t\t\"inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 text-sm font-medium sm:text-xs\",\n\t\ticon && \"ps-1\",\n\t\tbgColor,\n\t\ttextColor,\n\t\tclassName,\n\t);\n\n\tif (asChild) {\n\t\tconst singleChild = Children.only(children);\n\t\tinvariant(\n\t\t\tisValidElement<BadgeProps>(singleChild),\n\t\t\t\"When using `asChild`, Badge must be passed a single child as a JSX tag.\",\n\t\t);\n\t\tconst grandchildren = singleChild.props?.children;\n\n\t\treturn (\n\t\t\t<Slot className={badgeClasses} {...props}>\n\t\t\t\t{cloneElement(\n\t\t\t\t\tsingleChild,\n\t\t\t\t\t{},\n\t\t\t\t\t<>\n\t\t\t\t\t\t{icon && <SvgOnly className=\"size-5 sm:size-4\" svg={icon} />}\n\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t</>,\n\t\t\t\t)}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn (\n\t\t<span className={badgeClasses} {...props}>\n\t\t\t{icon && <SvgOnly className=\"size-5 sm:size-4\" svg={icon} />}\n\t\t\t{children}\n\t\t</span>\n\t);\n};\n\n// MARK: - Exports\n\nexport { Badge };\n\nexport type { BadgeProps };\n\n// MARK: - Private\n\nconst mutedBgColorLookup = {\n\tamber: \"bg-amber-500/20\",\n\tblue: \"bg-blue-500/20\",\n\tcyan: \"bg-cyan-500/20\",\n\temerald: \"bg-emerald-500/20\",\n\tfuchsia: \"bg-fuchsia-500/20\",\n\tgray: \"bg-gray-500/20\",\n\tgreen: \"bg-green-500/20\",\n\tindigo: \"bg-indigo-500/20\",\n\tlime: \"bg-lime-500/20\",\n\torange: \"bg-orange-500/20\",\n\tpink: \"bg-pink-500/20\",\n\tpurple: \"bg-purple-500/20\",\n\tred: \"bg-red-500/20\",\n\trose: \"bg-rose-500/20\",\n\tsky: \"bg-sky-500/20\",\n\tteal: \"bg-teal-500/20\",\n\tviolet: \"bg-violet-500/20\",\n\tyellow: \"bg-yellow-500/20\",\n\taccent: \"bg-accent-500/20\",\n\tdanger: \"bg-danger-500/20\",\n\tneutral: \"bg-neutral-500/20\",\n\tsuccess: \"bg-success-500/20\",\n\twarning: \"bg-warning-500/20\",\n} satisfies Record<Color, string>;\n\nfunction computeBgColor(color: Color, appearance: Appearance) {\n\tswitch (appearance) {\n\t\tcase \"muted\":\n\t\t\treturn mutedBgColorLookup[color];\n\t\tdefault:\n\t\t\tinvariant(false, `Invalid appearance: ${String(appearance)}`);\n\t}\n}\n\nconst textColorMutedLookup = {\n\tamber: \"text-amber-700\",\n\tblue: \"text-blue-700\",\n\tcyan: \"text-cyan-700\",\n\temerald: \"text-emerald-700\",\n\tfuchsia: \"text-fuchsia-700\",\n\tgray: \"text-gray-700\",\n\tgreen: \"text-green-700\",\n\tindigo: \"text-indigo-700\",\n\tlime: \"text-lime-700\",\n\torange: \"text-orange-700\",\n\tpink: \"text-pink-700\",\n\tpurple: \"text-purple-700\",\n\tred: \"text-red-700\",\n\trose: \"text-rose-700\",\n\tsky: \"text-sky-700\",\n\tteal: \"text-teal-700\",\n\tviolet: \"text-violet-700\",\n\tyellow: \"text-yellow-700\",\n\taccent: \"text-accent-700\",\n\tdanger: \"text-danger-700\",\n\tneutral: \"text-neutral-700\",\n\tsuccess: \"text-success-700\",\n\twarning: \"text-warning-700\",\n} satisfies Record<Color, string>;\n\nfunction computeTextColor(color: Color, appearance: Appearance) {\n\tswitch (appearance) {\n\t\tcase \"muted\":\n\t\t\treturn textColorMutedLookup[color];\n\t\tdefault:\n\t\t\tinvariant(false, `Invalid appearance: ${String(appearance)}`);\n\t}\n}\n"],"mappings":"gFAAA,OAAS,QAAAA,MAAY,uBACrB,OAAS,YAAAC,EAAU,gBAAAC,EAAc,kBAAAC,MAA2D,QAC5F,OAAOC,MAAe,iBAqDjB,mBAAAC,EACU,OAAAC,EADV,QAAAC,MAAA,oBAzBL,IAAMC,EAAQ,CAAC,CAAE,WAAAC,EAAY,QAAAC,EAAU,GAAO,SAAAC,EAAU,UAAAC,EAAW,MAAAC,EAAQ,UAAW,KAAAC,EAAM,GAAGC,CAAM,IAAkB,CACtH,IAAMC,EAAUC,EAAeJ,EAAOJ,CAAU,EAC1CS,EAAYC,EAAiBN,EAAOJ,CAAU,EAE9CW,EAAeC,EACpB,oHAC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kBACR,OAAQ,kBACR,QAAS,mBACT,QAAS,mBACT,QAAS,kBACV,EAEA,SAASC,EAAiBJ,EAAcC,EAAwB,CAC/D,OAAQA,EAAY,CACnB,IAAK,QACJ,OAAOE,EAAqBH,CAAK,EAClC,QACCE,EAAU,GAAO,uBAAuB,OAAOD,CAAU,CAAC,EAAE,CAC9D,CACD","names":["Slot","Children","cloneElement","isValidElement","invariant","Fragment","jsx","jsxs","Badge","appearance","asChild","children","className","color","icon","props","bgColor","computeBgColor","textColor","computeTextColor","badgeClasses","cx","singleChild","Children","invariant","isValidElement","grandchildren","jsx","Slot","cloneElement","jsxs","Fragment","SvgOnly","mutedBgColorLookup","computeBgColor","color","appearance","invariant","textColorMutedLookup","computeTextColor"]}
1
+ {"version":3,"sources":["../src/components/badge/badge.tsx"],"sourcesContent":["import { Slot } from \"@radix-ui/react-slot\";\nimport { Children, cloneElement, isValidElement, type HTMLAttributes, type ReactNode } from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport type { Color } from \"../../utils/color/index.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { SvgOnly } from \"../icon/svg-only.js\";\n\nconst appearances = [\"muted\" /*\"strong\" */] as const;\ntype Appearance = (typeof appearances)[number];\n\ntype BadgeProps = HTMLAttributes<HTMLSpanElement> &\n\tWithAsChild & {\n\t\t/**\n\t\t * The color variant of the badge. Accepts named colors and functional colors from the mantle color palette.\n\t\t */\n\t\tcolor?: Color;\n\t\t/**\n\t\t * The icon to render inside the badge.\n\t\t */\n\t\ticon?: ReactNode;\n\t\t/**\n\t\t * The visual style of the badge.\n\t\t */\n\t\tappearance: Appearance;\n\t};\n\n/**\n * A Badge is a non-interactive component used to highlight important information or to visually indicate the status of an item.\n */\nconst Badge = ({ appearance, asChild = false, children, className, color = \"neutral\", icon, ...props }: BadgeProps) => {\n\tconst bgColor = computeBgColor(color, appearance);\n\tconst textColor = computeTextColor(color, appearance);\n\n\tconst badgeClasses = cx(\n\t\t\"inline-flex w-fit shrink-0 cursor-default items-center gap-1 rounded px-1.5 py-0.5 font-medium text-xs\",\n\t\ticon && \"ps-1\",\n\t\tbgColor,\n\t\ttextColor,\n\t\tclassName,\n\t);\n\n\tif (asChild) {\n\t\tconst singleChild = Children.only(children);\n\t\tinvariant(\n\t\t\tisValidElement<BadgeProps>(singleChild),\n\t\t\t\"When using `asChild`, Badge must be passed a single child as a JSX tag.\",\n\t\t);\n\t\tconst grandchildren = singleChild.props?.children;\n\n\t\treturn (\n\t\t\t<Slot className={badgeClasses} {...props}>\n\t\t\t\t{cloneElement(\n\t\t\t\t\tsingleChild,\n\t\t\t\t\t{},\n\t\t\t\t\t<>\n\t\t\t\t\t\t{icon && <SvgOnly className=\"size-4\" svg={icon} />}\n\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t</>,\n\t\t\t\t)}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn (\n\t\t<span className={badgeClasses} {...props}>\n\t\t\t{icon && <SvgOnly className=\"size-4\" svg={icon} />}\n\t\t\t{children}\n\t\t</span>\n\t);\n};\n\n// MARK: - Exports\n\nexport { Badge };\n\nexport type { BadgeProps };\n\n// MARK: - Private\n\nconst mutedBgColorLookup = {\n\tamber: \"bg-amber-500/20\",\n\tblue: \"bg-blue-500/20\",\n\tcyan: \"bg-cyan-500/20\",\n\temerald: \"bg-emerald-500/20\",\n\tfuchsia: \"bg-fuchsia-500/20\",\n\tgray: \"bg-gray-500/20\",\n\tgreen: \"bg-green-500/20\",\n\tindigo: \"bg-indigo-500/20\",\n\tlime: \"bg-lime-500/20\",\n\torange: \"bg-orange-500/20\",\n\tpink: \"bg-pink-500/20\",\n\tpurple: \"bg-purple-500/20\",\n\tred: \"bg-red-500/20\",\n\trose: \"bg-rose-500/20\",\n\tsky: \"bg-sky-500/20\",\n\tteal: \"bg-teal-500/20\",\n\tviolet: \"bg-violet-500/20\",\n\tyellow: \"bg-yellow-500/20\",\n\taccent: \"bg-accent-500/20\",\n\tdanger: \"bg-danger-500/20\",\n\tneutral: \"bg-neutral-500/20\",\n\tsuccess: \"bg-success-500/20\",\n\twarning: \"bg-warning-500/20\",\n} satisfies Record<Color, string>;\n\nfunction computeBgColor(color: Color, appearance: Appearance) {\n\tswitch (appearance) {\n\t\tcase \"muted\":\n\t\t\treturn mutedBgColorLookup[color];\n\t\tdefault:\n\t\t\tinvariant(false, `Invalid appearance: ${String(appearance)}`);\n\t}\n}\n\nconst textColorMutedLookup = {\n\tamber: \"text-amber-700\",\n\tblue: \"text-blue-700\",\n\tcyan: \"text-cyan-700\",\n\temerald: \"text-emerald-700\",\n\tfuchsia: \"text-fuchsia-700\",\n\tgray: \"text-gray-700\",\n\tgreen: \"text-green-700\",\n\tindigo: \"text-indigo-700\",\n\tlime: \"text-lime-700\",\n\torange: \"text-orange-700\",\n\tpink: \"text-pink-700\",\n\tpurple: \"text-purple-700\",\n\tred: \"text-red-700\",\n\trose: \"text-rose-700\",\n\tsky: \"text-sky-700\",\n\tteal: \"text-teal-700\",\n\tviolet: \"text-violet-700\",\n\tyellow: \"text-yellow-700\",\n\taccent: \"text-accent-700\",\n\tdanger: \"text-danger-700\",\n\tneutral: \"text-neutral-700\",\n\tsuccess: \"text-success-700\",\n\twarning: \"text-warning-700\",\n} satisfies Record<Color, string>;\n\nfunction computeTextColor(color: Color, appearance: Appearance) {\n\tswitch (appearance) {\n\t\tcase \"muted\":\n\t\t\treturn textColorMutedLookup[color];\n\t\tdefault:\n\t\t\tinvariant(false, `Invalid appearance: ${String(appearance)}`);\n\t}\n}\n"],"mappings":"gFAAA,OAAS,QAAAA,MAAY,uBACrB,OAAS,YAAAC,EAAU,gBAAAC,EAAc,kBAAAC,MAA2D,QAC5F,OAAOC,MAAe,iBAqDjB,mBAAAC,EACU,OAAAC,EADV,QAAAC,MAAA,oBAzBL,IAAMC,EAAQ,CAAC,CAAE,WAAAC,EAAY,QAAAC,EAAU,GAAO,SAAAC,EAAU,UAAAC,EAAW,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ACN,MAAO,iBACP,OAAQ,kBACR,KAAM,gBACN,OAAQ,kBACR,KAAM,gBACN,OAAQ,kBACR,IAAK,eACL,KAAM,gBACN,IAAK,eACL,KAAM,gBACN,OAAQ,kBACR,OAAQ,kBACR,OAAQ,kBACR,OAAQ,kBACR,QAAS,mBACT,QAAS,mBACT,QAAS,kBACV,EAEA,SAASC,EAAiBJ,EAAcC,EAAwB,CAC/D,OAAQA,EAAY,CACnB,IAAK,QACJ,OAAOE,EAAqBH,CAAK,EAClC,QACCE,EAAU,GAAO,uBAAuB,OAAOD,CAAU,CAAC,EAAE,CAC9D,CACD","names":["Slot","Children","cloneElement","isValidElement","invariant","Fragment","jsx","jsxs","Badge","appearance","asChild","children","className","color","icon","props","bgColor","computeBgColor","textColor","computeTextColor","badgeClasses","cx","singleChild","Children","invariant","isValidElement","grandchildren","jsx","Slot","cloneElement","jsxs","Fragment","SvgOnly","mutedBgColorLookup","computeBgColor","color","appearance","invariant","textColorMutedLookup","computeTextColor"]}
package/dist/button.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as c}from"./chunk-2YAPDW3F.js";import{a as b}from"./chunk-BU7JVIWF.js";import{b as a}from"./chunk-MJVZHJQA.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-SMCZZUU4.js";import"./chunk-VJPVAY5J.js";import"./chunk-EW5CFGXT.js";export{a as Button,c as ButtonGroup,b as IconButton};
1
+ import{a as c}from"./chunk-2YAPDW3F.js";import{a as b}from"./chunk-YC6QXFZS.js";import{b as a}from"./chunk-DFJUKUK4.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-LBEYGDAN.js";import"./chunk-VJPVAY5J.js";import"./chunk-EW5CFGXT.js";export{a as Button,c as ButtonGroup,b as IconButton};
2
2
  //# sourceMappingURL=button.js.map
package/dist/calendar.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as d}from"./chunk-MJVZHJQA.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-SMCZZUU4.js";import"./chunk-VJPVAY5J.js";import{a as e}from"./chunk-EW5CFGXT.js";import{CaretLeft as s}from"@phosphor-icons/react/dist/icons/CaretLeft";import{CaretRight as i}from"@phosphor-icons/react/dist/icons/CaretRight";import{DayPicker as c}from"react-day-picker";import{jsx as t}from"react/jsx-runtime";function r({className:o,classNames:n,showOutsideDays:l=!1,...a}){return t(c,{showOutsideDays:l,className:e("",o),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"flex items-center",nav_button:e(d({appearance:"ghost",priority:"neutral"}),"sm:h-7 sm:w-7 h-7 w-7"),nav_button_previous:"absolute left-0",nav_button_next:"absolute right-0",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-body w-7 text-[0.8rem] text-center font-normal",row:"flex w-full mt-1",cell:e("overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 sm:h-7 sm:w-7 h-7 w-7 ",a.mode==="range"?"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":""),day:"day size-full rounded-md [&:not([aria-selected],_[disabled])]:hover:bg-filled-accent/15",day_range_start:"day-range-start [&:not(.day-range-end)]:rounded-r-none",day_range_end:"day-range-end [&:not(.day-range-start)]:rounded-l-none",day_selected:"[&:not([disabled])]:bg-filled-accent text-on-filled [&:not([disabled])]:hover:bg-filled-accent",day_today:"[&:not([aria-selected],_[disabled])]:text-accent-600 font-medium [&:not([aria-selected],_[disabled])]:bg-filled-accent/10",day_outside:"day-outside aria-selected:text-on-filled opacity-50 text-muted",day_disabled:"text-muted opacity-50",day_range_middle:"day-range-middle [&:not([disabled])]:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none [&:not([disabled])]:aria-selected:hover:bg-filled-accent/25",day_hidden:"invisible",...n},components:{IconLeft:()=>t(s,{className:"h-4 w-4 shrink-0",weight:"bold"}),IconRight:()=>t(i,{className:"h-4 w-4 shrink-0",weight:"bold"})},...a})}r.displayName="Calendar";export{r as Calendar};
1
+ import{a as d}from"./chunk-DFJUKUK4.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-LBEYGDAN.js";import"./chunk-VJPVAY5J.js";import{a as e}from"./chunk-EW5CFGXT.js";import{CaretLeft as s}from"@phosphor-icons/react/dist/icons/CaretLeft";import{CaretRight as i}from"@phosphor-icons/react/dist/icons/CaretRight";import{DayPicker as c}from"react-day-picker";import{jsx as t}from"react/jsx-runtime";function r({className:o,classNames:n,showOutsideDays:l=!1,...a}){return t(c,{showOutsideDays:l,className:e("",o),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"flex items-center",nav_button:e(d({appearance:"ghost",priority:"neutral"}),"size-7"),nav_button_previous:"absolute left-0",nav_button_next:"absolute right-0",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-body w-7 text-[0.8rem] text-center font-normal",row:"flex w-full mt-1",cell:e("overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7",a.mode==="range"?"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":""),day:"day size-full rounded-md [&:not([aria-selected],_[disabled])]:hover:bg-filled-accent/15",day_range_start:"day-range-start [&:not(.day-range-end)]:rounded-r-none",day_range_end:"day-range-end [&:not(.day-range-start)]:rounded-l-none",day_selected:"[&:not([disabled])]:bg-filled-accent text-on-filled [&:not([disabled])]:hover:bg-filled-accent",day_today:"[&:not([aria-selected],_[disabled])]:text-accent-600 font-medium [&:not([aria-selected],_[disabled])]:bg-filled-accent/10",day_outside:"day-outside aria-selected:text-on-filled opacity-50 text-muted",day_disabled:"text-muted opacity-50",day_range_middle:"day-range-middle [&:not([disabled])]:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none [&:not([disabled])]:aria-selected:hover:bg-filled-accent/25",day_hidden:"invisible",...n},components:{IconLeft:()=>t(s,{className:"h-4 w-4 shrink-0",weight:"bold"}),IconRight:()=>t(i,{className:"h-4 w-4 shrink-0",weight:"bold"})},...a})}r.displayName="Calendar";export{r as Calendar};
2
2
  //# sourceMappingURL=calendar.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/calendar/calendar.tsx"],"sourcesContent":["import { CaretLeft } from \"@phosphor-icons/react/dist/icons/CaretLeft\";\nimport { CaretRight } from \"@phosphor-icons/react/dist/icons/CaretRight\";\nimport type { ComponentProps } from \"react\";\nimport { DayPicker } from \"react-day-picker\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { buttonVariants } from \"../button/button.js\";\n\ntype CalendarProps = ComponentProps<typeof DayPicker>;\n\n/**\n * A calendar component that allows users to select a date or a range of dates.\n *\n * @preview This component is in `preview` mode which means the API is not stable and may change.\n * There may also be bugs! Please file an issue if you find any! <3\n *\n * https://github.com/ngrok-oss/mantle/issues\n */\nfunction Calendar({ className, classNames, showOutsideDays = false, ...props }: CalendarProps) {\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cx(\"\", className)}\n\t\t\tclassNames={{\n\t\t\t\tmonths: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n\t\t\t\tmonth: \"space-y-4\",\n\t\t\t\tcaption: \"flex justify-center pt-1 relative items-center\",\n\t\t\t\tcaption_label: \"text-sm font-medium\",\n\t\t\t\tnav: \"flex items-center\",\n\t\t\t\tnav_button: cx(buttonVariants({ appearance: \"ghost\", priority: \"neutral\" }), \"sm:h-7 sm:w-7 h-7 w-7\"),\n\t\t\t\tnav_button_previous: \"absolute left-0\",\n\t\t\t\tnav_button_next: \"absolute right-0\",\n\t\t\t\ttable: \"w-full border-collapse space-y-1\",\n\t\t\t\thead_row: \"flex\",\n\t\t\t\thead_cell: \"text-body w-7 text-[0.8rem] text-center font-normal\",\n\t\t\t\trow: \"flex w-full mt-1\",\n\t\t\t\tcell: cx(\n\t\t\t\t\t\"overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 sm:h-7 sm:w-7 h-7 w-7 \",\n\t\t\t\t\tprops.mode === \"range\"\n\t\t\t\t\t\t? \"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\n\t\t\t\t\t\t: \"\",\n\t\t\t\t),\n\t\t\t\tday: \"day size-full rounded-md [&:not([aria-selected],_[disabled])]:hover:bg-filled-accent/15\",\n\t\t\t\tday_range_start: \"day-range-start [&:not(.day-range-end)]:rounded-r-none\",\n\t\t\t\tday_range_end: \"day-range-end [&:not(.day-range-start)]:rounded-l-none\",\n\t\t\t\tday_selected: \"[&:not([disabled])]:bg-filled-accent text-on-filled [&:not([disabled])]:hover:bg-filled-accent\",\n\t\t\t\tday_today:\n\t\t\t\t\t\"[&:not([aria-selected],_[disabled])]:text-accent-600 font-medium [&:not([aria-selected],_[disabled])]:bg-filled-accent/10\",\n\t\t\t\tday_outside: \"day-outside aria-selected:text-on-filled opacity-50 text-muted\",\n\t\t\t\tday_disabled: \"text-muted opacity-50\",\n\t\t\t\tday_range_middle:\n\t\t\t\t\t\"day-range-middle [&:not([disabled])]:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none [&:not([disabled])]:aria-selected:hover:bg-filled-accent/25\",\n\t\t\t\tday_hidden: \"invisible\",\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tIconLeft: () => <CaretLeft className=\"h-4 w-4 shrink-0\" weight=\"bold\" />,\n\t\t\t\tIconRight: () => <CaretRight className=\"h-4 w-4 shrink-0\" weight=\"bold\" />,\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCalendar.displayName = \"Calendar\";\n\nexport {\n\t//,\n\tCalendar,\n};\n\nexport type {\n\t//,\n\tCalendarProps,\n};\n"],"mappings":"4NAAA,OAAS,aAAAA,MAAiB,6CAC1B,OAAS,cAAAC,MAAkB,8CAE3B,OAAS,aAAAC,MAAiB,mBAoDN,cAAAC,MAAA,oBAtCpB,SAASC,EAAS,CAAE,UAAAC,EAAW,WAAAC,EAAY,gBAAAC,EAAkB,GAAO,GAAGC,CAAM,EAAkB,CAC9F,OACCL,EAACM,EAAA,CACA,gBAAiBF,EACjB,UAAWG,EAAG,GAAIL,CAAS,EAC3B,WAAY,CACX,OAAQ,gEACR,MAAO,YACP,QAAS,iDACT,cAAe,sBACf,IAAK,oBACL,WAAYK,EAAGC,EAAe,CAAE,WAAY,QAAS,SAAU,SAAU,CAAC,EAAG,uBAAuB,EACpG,oBAAqB,kBACrB,gBAAiB,mBACjB,MAAO,mCACP,SAAU,OACV,UAAW,sDACX,IAAK,mBACL,KAAMD,EACL,kHACAF,EAAM,OAAS,QACZ,yFACA,EACJ,EACA,IAAK,0FACL,gBAAiB,yDACjB,cAAe,yDACf,aAAc,iGACd,UACC,4HACD,YAAa,iEACb,aAAc,wBACd,iBACC,4KACD,WAAY,YACZ,GAAGF,CACJ,EACA,WAAY,CACX,SAAU,IAAMH,EAACS,EAAA,CAAU,UAAU,mBAAmB,OAAO,OAAO,EACtE,UAAW,IAAMT,EAACU,EAAA,CAAW,UAAU,mBAAmB,OAAO,OAAO,CACzE,EACC,GAAGL,EACL,CAEF,CACAJ,EAAS,YAAc","names":["CaretLeft","CaretRight","DayPicker","jsx","Calendar","className","classNames","showOutsideDays","props","DayPicker","cx","buttonVariants","CaretLeft","CaretRight"]}
1
+ {"version":3,"sources":["../src/components/calendar/calendar.tsx"],"sourcesContent":["import { CaretLeft } from \"@phosphor-icons/react/dist/icons/CaretLeft\";\nimport { CaretRight } from \"@phosphor-icons/react/dist/icons/CaretRight\";\nimport type { ComponentProps } from \"react\";\nimport { DayPicker } from \"react-day-picker\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { buttonVariants } from \"../button/button.js\";\n\ntype CalendarProps = ComponentProps<typeof DayPicker>;\n\n/**\n * A calendar component that allows users to select a date or a range of dates.\n *\n * @preview This component is in `preview` mode which means the API is not stable and may change.\n * There may also be bugs! Please file an issue if you find any! <3\n *\n * https://github.com/ngrok-oss/mantle/issues\n */\nfunction Calendar({ className, classNames, showOutsideDays = false, ...props }: CalendarProps) {\n\treturn (\n\t\t<DayPicker\n\t\t\tshowOutsideDays={showOutsideDays}\n\t\t\tclassName={cx(\"\", className)}\n\t\t\tclassNames={{\n\t\t\t\tmonths: \"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0\",\n\t\t\t\tmonth: \"space-y-4\",\n\t\t\t\tcaption: \"flex justify-center pt-1 relative items-center\",\n\t\t\t\tcaption_label: \"text-sm font-medium\",\n\t\t\t\tnav: \"flex items-center\",\n\t\t\t\tnav_button: cx(buttonVariants({ appearance: \"ghost\", priority: \"neutral\" }), \"size-7\"),\n\t\t\t\tnav_button_previous: \"absolute left-0\",\n\t\t\t\tnav_button_next: \"absolute right-0\",\n\t\t\t\ttable: \"w-full border-collapse space-y-1\",\n\t\t\t\thead_row: \"flex\",\n\t\t\t\thead_cell: \"text-body w-7 text-[0.8rem] text-center font-normal\",\n\t\t\t\trow: \"flex w-full mt-1\",\n\t\t\t\tcell: cx(\n\t\t\t\t\t\"overflow-hidden text-center text-sm p-0 relative focus-within:relative focus-within:z-20 size-7\",\n\t\t\t\t\tprops.mode === \"range\"\n\t\t\t\t\t\t? \"first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md\"\n\t\t\t\t\t\t: \"\",\n\t\t\t\t),\n\t\t\t\tday: \"day size-full rounded-md [&:not([aria-selected],_[disabled])]:hover:bg-filled-accent/15\",\n\t\t\t\tday_range_start: \"day-range-start [&:not(.day-range-end)]:rounded-r-none\",\n\t\t\t\tday_range_end: \"day-range-end [&:not(.day-range-start)]:rounded-l-none\",\n\t\t\t\tday_selected: \"[&:not([disabled])]:bg-filled-accent text-on-filled [&:not([disabled])]:hover:bg-filled-accent\",\n\t\t\t\tday_today:\n\t\t\t\t\t\"[&:not([aria-selected],_[disabled])]:text-accent-600 font-medium [&:not([aria-selected],_[disabled])]:bg-filled-accent/10\",\n\t\t\t\tday_outside: \"day-outside aria-selected:text-on-filled opacity-50 text-muted\",\n\t\t\t\tday_disabled: \"text-muted opacity-50\",\n\t\t\t\tday_range_middle:\n\t\t\t\t\t\"day-range-middle [&:not([disabled])]:aria-selected:bg-filled-accent/15 aria-selected:text-strong rounded-none [&:not([disabled])]:aria-selected:hover:bg-filled-accent/25\",\n\t\t\t\tday_hidden: \"invisible\",\n\t\t\t\t...classNames,\n\t\t\t}}\n\t\t\tcomponents={{\n\t\t\t\tIconLeft: () => <CaretLeft className=\"h-4 w-4 shrink-0\" weight=\"bold\" />,\n\t\t\t\tIconRight: () => <CaretRight className=\"h-4 w-4 shrink-0\" weight=\"bold\" />,\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\nCalendar.displayName = \"Calendar\";\n\nexport {\n\t//,\n\tCalendar,\n};\n\nexport type {\n\t//,\n\tCalendarProps,\n};\n"],"mappings":"4NAAA,OAAS,aAAAA,MAAiB,6CAC1B,OAAS,cAAAC,MAAkB,8CAE3B,OAAS,aAAAC,MAAiB,mBAoDN,cAAAC,MAAA,oBAtCpB,SAASC,EAAS,CAAE,UAAAC,EAAW,WAAAC,EAAY,gBAAAC,EAAkB,GAAO,GAAGC,CAAM,EAAkB,CAC9F,OACCL,EAACM,EAAA,CACA,gBAAiBF,EACjB,UAAWG,EAAG,GAAIL,CAAS,EAC3B,WAAY,CACX,OAAQ,gEACR,MAAO,YACP,QAAS,iDACT,cAAe,sBACf,IAAK,oBACL,WAAYK,EAAGC,EAAe,CAAE,WAAY,QAAS,SAAU,SAAU,CAAC,EAAG,QAAQ,EACrF,oBAAqB,kBACrB,gBAAiB,mBACjB,MAAO,mCACP,SAAU,OACV,UAAW,sDACX,IAAK,mBACL,KAAMD,EACL,kGACAF,EAAM,OAAS,QACZ,yFACA,EACJ,EACA,IAAK,0FACL,gBAAiB,yDACjB,cAAe,yDACf,aAAc,iGACd,UACC,4HACD,YAAa,iEACb,aAAc,wBACd,iBACC,4KACD,WAAY,YACZ,GAAGF,CACJ,EACA,WAAY,CACX,SAAU,IAAMH,EAACS,EAAA,CAAU,UAAU,mBAAmB,OAAO,OAAO,EACtE,UAAW,IAAMT,EAACU,EAAA,CAAW,UAAU,mBAAmB,OAAO,OAAO,CACzE,EACC,GAAGL,EACL,CAEF,CACAJ,EAAS,YAAc","names":["CaretLeft","CaretRight","DayPicker","jsx","Calendar","className","classNames","showOutsideDays","props","DayPicker","cx","buttonVariants","CaretLeft","CaretRight"]}
@@ -0,0 +1,2 @@
1
+ import{l as P}from"./chunk-273VK4KO.js";import{a as p}from"./chunk-LBEYGDAN.js";import{a as i}from"./chunk-EW5CFGXT.js";import{CheckCircle as h}from"@phosphor-icons/react/CheckCircle";import{Info as v}from"@phosphor-icons/react/Info";import{Warning as C}from"@phosphor-icons/react/Warning";import{WarningDiamond as b}from"@phosphor-icons/react/WarningDiamond";import{Slot as l}from"@radix-ui/react-slot";import{createContext as f,forwardRef as d,useContext as y}from"react";import*as m from"sonner";import{jsx as r,jsxs as A}from"react/jsx-runtime";var B=({className:t,containerAriaLabel:e,dir:o,duration_ms:s=4e3,position:n="top-center",style:a})=>{let c=P();return r(m.Toaster,{className:i("toaster mantle-prompt pointer-events-auto font-sans *:duration-200",t),containerAriaLabel:e,dir:o,duration:s,gap:12,position:n??"top-center",style:a,theme:c,toastOptions:{unstyled:!0}})},g=f("");function _(t,e){return m.toast.custom(o=>r(g.Provider,{value:o,children:t}),{duration:e?.duration_ms,...e?.id?{id:e.id}:{},unstyled:!0})}var T=f({priority:"info"}),j=d(({asChild:t,children:e,className:o,priority:s,...n},a)=>{let c=t?l:"div";return r(T.Provider,{value:{priority:s},children:A(c,{className:i("relative flex items-start gap-2 text-sm","p-3 pl-[0.9375rem]","bg-popover high-contrast:border-popover rounded rounded-r-[0.3125rem] border border-gray-500/35 shadow-lg",o),ref:a,...n,children:[r(w,{priority:s}),e]})})}),D=d(({className:t,svg:e,...o},s)=>{let n=y(T);switch(n.priority){case"danger":return r(p,{className:i("text-danger-600",t),ref:s,svg:e??r(C,{weight:"fill"}),...o});case"warning":return r(p,{className:i("text-warning-600",t),ref:s,svg:e??r(b,{weight:"fill"}),...o});case"success":return r(p,{className:i("text-success-600",t),ref:s,svg:e??r(h,{weight:"fill"}),...o});case"info":return r(p,{className:i("text-accent-600",t),ref:s,svg:r(v,{weight:"fill"}),...o});default:throw new Error(`Unreachable Case: ${n.priority}`)}}),L=d(({asChild:t,className:e,onClick:o,...s},n)=>{let a=y(g);return r(t?l:"button",{className:i("shrink-0","data-[icon-button]:-mr-0.5 data-[icon-button]:-mt-0.5 data-[icon-button]:rounded-sm",e),onClick:u=>{o?.(u),!u.defaultPrevented&&m.toast.dismiss(a)},ref:n,...s})}),z=d(({asChild:t,className:e,...o},s)=>r(t?l:"p",{className:i("text-strong flex-1 text-sm",e),ref:s,...o}));function F(t){t.target instanceof Element&&t.target.closest(".mantle-prompt")&&t.preventDefault()}var x={info:"bg-accent-600",warning:"bg-warning-600",success:"bg-success-600",danger:"bg-danger-600"};function w({className:t,priority:e,...o}){return r("div",{"aria-hidden":!0,className:i("z-1 absolute -inset-px right-auto w-1.5 rounded-l",x[e],t),...o})}export{B as a,_ as b,j as c,D as d,L as e,z as f,F as g};
2
+ //# sourceMappingURL=chunk-A7ZXYP6T.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/toast/toast.tsx"],"sourcesContent":["\"use client\";\n\nimport { CheckCircle } from \"@phosphor-icons/react/CheckCircle\";\nimport { Info } from \"@phosphor-icons/react/Info\";\nimport { Warning } from \"@phosphor-icons/react/Warning\";\nimport { WarningDiamond } from \"@phosphor-icons/react/WarningDiamond\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { createContext, forwardRef, useContext, type ComponentProps, type ElementRef, type ReactNode } from \"react\";\nimport * as ToastPrimitive from \"sonner\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport type { WithStyleProps } from \"../../types/with-style-props.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/icon.js\";\nimport type { SvgOnlyProps } from \"../icon/svg-only.js\";\nimport { useAppliedTheme } from \"../theme-provider/theme-provider.js\";\n\ntype ToasterPrimitiveProps = ComponentProps<typeof ToastPrimitive.Toaster>;\ntype ToasterPrimitiveTheme = ToasterPrimitiveProps[\"theme\"];\n\ntype ToasterProps = WithStyleProps &\n\tPick<ToasterPrimitiveProps, \"containerAriaLabel\" | \"dir\" | \"position\"> & {\n\t\t/**\n\t\t * Time in milliseconds that should elapse before automatically dismissing toasts.\n\t\t * When set here, this will be the default duration for all toasts.\n\t\t * @default 4000\n\t\t */\n\t\tduration_ms?: number;\n\t};\n\n/**\n * A container for displaying all toasts.\n *\n * Only one `<Toaster />` should be rendered in an app a time, preferably at the\n * root level of the app.\n */\nconst Toaster = ({\n\t//,\n\tclassName,\n\tcontainerAriaLabel,\n\tdir,\n\tduration_ms = 4000,\n\tposition = \"top-center\",\n\tstyle,\n}: ToasterProps) => {\n\tconst theme = useAppliedTheme();\n\n\treturn (\n\t\t<ToastPrimitive.Toaster\n\t\t\tclassName={cx(\"toaster mantle-prompt pointer-events-auto font-sans *:duration-200\", className)}\n\t\t\tcontainerAriaLabel={containerAriaLabel}\n\t\t\tdir={dir}\n\t\t\tduration={duration_ms}\n\t\t\tgap={12}\n\t\t\tposition={position ?? \"top-center\"}\n\t\t\tstyle={style}\n\t\t\ttheme={theme as ToasterPrimitiveTheme} // we have additional themes that are not in the sonner types, so we need to cast for now\n\t\t\ttoastOptions={{\n\t\t\t\tunstyled: true,\n\t\t\t}}\n\t\t/>\n\t);\n};\n\nconst ToastIdContext = createContext<string | number>(\"\");\n\ntype MakeToastOptions = {\n\t/**\n\t * Time in milliseconds that should elapse before automatically closing the toast.\n\t * Will default to the `<Toaster />`'s `duration_ms` if not provided.\n\t */\n\tduration_ms?: number;\n\t/**\n\t * An optional custom ID for this toast. If not given, a unique ID is provided for you.\n\t */\n\tid?: string;\n};\n\n/**\n * Create a toast. Provide a `<Toast>` component as the `children` to be rendered\n * inside the `<Toaster />` section.\n */\nfunction makeToast(children: ReactNode, options?: MakeToastOptions) {\n\treturn ToastPrimitive.toast.custom(\n\t\t(toastId) => <ToastIdContext.Provider value={toastId}>{children}</ToastIdContext.Provider>,\n\t\t{\n\t\t\t//\n\t\t\tduration: options?.duration_ms,\n\t\t\t// If a custom ID is provided, use it, else use the toastId provided by the sonner library\n\t\t\t// don't set an ID to `undefined` as it breaks the sonner library\n\t\t\t...(options?.id ? { id: options.id } : {}),\n\t\t\tunstyled: true,\n\t\t},\n\t);\n}\n\nconst priorities = [\n\t//,\n\t\"danger\",\n\t\"info\",\n\t\"success\",\n\t\"warning\",\n] as const;\ntype Priority = (typeof priorities)[number];\n\ntype ToastState = {\n\tpriority: Priority;\n};\n\nconst ToastStateContext = createContext<ToastState>({\n\tpriority: \"info\",\n});\n\ntype ToastProps = ComponentProps<\"div\"> &\n\tWithAsChild & {\n\t\tpriority: Priority;\n\t};\n\n/**\n * A succinct message with a priority that is displayed temporarily.\n * Toasts are used to provide feedback to the user without interrupting their workflow.\n */\nconst Toast = forwardRef<ElementRef<\"div\">, ToastProps>(({ asChild, children, className, priority, ...props }, ref) => {\n\tconst Component = asChild ? Slot : \"div\";\n\n\treturn (\n\t\t<ToastStateContext.Provider value={{ priority }}>\n\t\t\t<Component\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"relative flex items-start gap-2 text-sm\",\n\t\t\t\t\t\"p-3 pl-[0.9375rem]\",\n\t\t\t\t\t\"bg-popover high-contrast:border-popover rounded rounded-r-[0.3125rem] border border-gray-500/35 shadow-lg\",\n\t\t\t\t\t/**\n\t\t\t\t\t * Do not apply overflow-hidden because we want the priority bar accent\n\t\t\t\t\t * to overlap the toast border, else the border flows over the\n\t\t\t\t\t * priority bar.\n\t\t\t\t\t */\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<PriorityBarAccent priority={priority} />\n\t\t\t\t{children}\n\t\t\t</Component>\n\t\t</ToastStateContext.Provider>\n\t);\n});\n\ntype ToastIconProps = Partial<SvgOnlyProps>;\n\n/**\n * An icon that visually represents the priority of the toast.\n * If you do not provide an icon, the default icon and color for the priority is used.\n */\nconst ToastIcon = forwardRef<ElementRef<\"svg\">, ToastIconProps>(({ className, svg, ...props }, ref) => {\n\tconst ctx = useContext(ToastStateContext);\n\n\tswitch (ctx.priority) {\n\t\tcase \"danger\":\n\t\t\treturn (\n\t\t\t\t<Icon\n\t\t\t\t\tclassName={cx(\"text-danger-600\", className)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tsvg={svg ?? <Warning weight=\"fill\" />}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"warning\":\n\t\t\treturn (\n\t\t\t\t<Icon\n\t\t\t\t\tclassName={cx(\"text-warning-600\", className)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tsvg={svg ?? <WarningDiamond weight=\"fill\" />}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"success\":\n\t\t\treturn (\n\t\t\t\t<Icon\n\t\t\t\t\tclassName={cx(\"text-success-600\", className)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tsvg={svg ?? <CheckCircle weight=\"fill\" />}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t);\n\t\tcase \"info\":\n\t\t\treturn (\n\t\t\t\t<Icon\n\t\t\t\t\t//\n\t\t\t\t\tclassName={cx(\"text-accent-600\", className)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\tsvg={<Info weight=\"fill\" />}\n\t\t\t\t\t{...props}\n\t\t\t\t/>\n\t\t\t);\n\t\tdefault:\n\t\t\tthrow new Error(`Unreachable Case: ${ctx.priority}`);\n\t}\n});\n\ntype ToastActionProps = ComponentProps<\"button\"> & WithAsChild;\n\n/**\n * A button that dismisses the toast when clicked.\n * You can prevent the toast from being dismissed `onClick` by calling `event.preventDefault()`\n */\nconst ToastAction = forwardRef<ElementRef<\"button\">, ToastActionProps>(\n\t({ asChild, className, onClick, ...props }, ref) => {\n\t\tconst ctx = useContext(ToastIdContext);\n\n\t\tconst Component = asChild ? Slot : \"button\";\n\n\t\treturn (\n\t\t\t<Component\n\t\t\t\tclassName={cx(\n\t\t\t\t\t//,\n\t\t\t\t\t\"shrink-0\",\n\t\t\t\t\t// 👇 wiggle the bits so that icon buttons toast actions are aligned with the toast icon\n\t\t\t\t\t\"data-[icon-button]:-mr-0.5 data-[icon-button]:-mt-0.5 data-[icon-button]:rounded-sm\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t\tif (event.defaultPrevented) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tToastPrimitive.toast.dismiss(ctx);\n\t\t\t\t}}\n\t\t\t\tref={ref}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\n\ntype ToastMessageProps = ComponentProps<\"p\"> & WithAsChild;\n\n/**\n * The message content of the toast.\n */\nconst ToastMessage = forwardRef<ElementRef<\"p\">, ToastMessageProps>(({ asChild, className, ...props }, ref) => {\n\tconst Component = asChild ? Slot : \"p\";\n\n\treturn (\n\t\t<Component\n\t\t\t//\n\t\t\tclassName={cx(\"text-strong flex-1 text-sm\", className)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\n\nexport {\n\t//,\n\tmakeToast,\n\tToast,\n\tToastAction,\n\tToaster,\n\tToastIcon,\n\tToastMessage,\n};\n\nexport type {\n\t//,\n\tPriority,\n};\n\n/**\n * @private\n *\n * Allows any mantle floating prompt (e.g. toasts and notifications) to be interacted with\n * even when a modaled view (e.g. dialog, sheet, etc) is open and a focus trap is active.\n *\n * Without this, interacting with the prompt would close the modaled view.\n */\nexport function preventCloseOnPromptInteraction(\n\tevent: CustomEvent | PointerEvent | MouseEvent | TouchEvent | FocusEvent,\n) {\n\tif (!(event.target instanceof Element)) {\n\t\treturn;\n\t}\n\n\tif (event.target.closest(\".mantle-prompt\")) {\n\t\tevent.preventDefault();\n\t}\n}\n\nconst priorityBackgroundColor = {\n\tinfo: \"bg-accent-600\",\n\twarning: \"bg-warning-600\",\n\tsuccess: \"bg-success-600\",\n\tdanger: \"bg-danger-600\",\n} as const satisfies Record<Priority, string>;\n\ntype PriorityBarAccentProps = Omit<ComponentProps<\"div\">, \"children\"> & { priority: Priority };\n\n/**\n * @private\n *\n * A colored bar that visually represents the priority of the toast.\n */\nfunction PriorityBarAccent({ className, priority, ...props }: PriorityBarAccentProps) {\n\treturn (\n\t\t<div\n\t\t\taria-hidden\n\t\t\tclassName={cx(\n\t\t\t\t//\n\t\t\t\t\"z-1 absolute -inset-px right-auto w-1.5 rounded-l\",\n\t\t\t\tpriorityBackgroundColor[priority],\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mappings":"wHAEA,OAAS,eAAAA,MAAmB,oCAC5B,OAAS,QAAAC,MAAY,6BACrB,OAAS,WAAAC,MAAe,gCACxB,OAAS,kBAAAC,MAAsB,uCAC/B,OAAS,QAAAC,MAAY,uBACrB,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,MAAwE,QAC5G,UAAYC,MAAoB,SAuC9B,cAAAC,EA+EC,QAAAC,MA/ED,oBAZF,IAAMC,EAAU,CAAC,CAEhB,UAAAC,EACA,mBAAAC,EACA,IAAAC,EACA,YAAAC,EAAc,IACd,S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CAC/B,KAAM,gBACN,QAAS,iBACT,QAAS,iBACT,OAAQ,eACT,EASA,SAASC,EAAkB,CAAE,UAAAC,EAAW,SAAAC,EAAU,GAAGC,CAAM,EAA2B,CACrF,OACCC,EAAC,OACA,cAAW,GACX,UAAWC,EAEV,oDACAN,EAAwBG,CAAQ,EAChCD,CACD,EACC,GAAGE,EACL,CAEF","names":["CheckCircle","Info","Warning","WarningDiamond","Slot","createContext","forwardRef","useContext","ToastPrimitive","jsx","jsxs","Toaster","className","containerAriaLabel","dir","duration_ms","position","style","theme","useAppliedTheme","cx","ToastIdContext","createContext","makeToast","children","options","toastId","ToastStateContext","createContext","Toast","forwardRef","asChild","children","className","priority","props","ref","Component","Slot","jsx","jsxs","cx","PriorityBarAccent","ToastIcon","svg","ctx","useContext","Icon","Warning","WarningDiamond","CheckCircle","Info","ToastAction","onClick","ToastIdContext","event","ToastMessage","preventCloseOnPromptInteraction","event","priorityBackgroundColor","PriorityBarAccent","className","priority","props","jsx","cx"]}
@@ -0,0 +1,2 @@
1
+ import{a as g}from"./chunk-RDMTCZPT.js";import{a as u}from"./chunk-LBEYGDAN.js";import{a as p}from"./chunk-EW5CFGXT.js";import{CircleNotch as k}from"@phosphor-icons/react/CircleNotch";import{Slot as N}from"@radix-ui/react-slot";import{cva as I}from"class-variance-authority";import f from"clsx";import{Children as w,cloneElement as E,forwardRef as H,isValidElement as M}from"react";import T from"tiny-invariant";import{jsx as t,jsxs as S}from"react/jsx-runtime";var A=I("inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50 [&>*]:focus-within:outline-none",{variants:{appearance:{filled:"bg-filled-accent text-on-filled focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover not-disabled:active:bg-filled-accent-active h-9 border border-transparent px-3 text-sm font-medium",ghost:"text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 not-disabled:active:bg-accent-500/15 not-disabled:active:text-accent-700 h-9 border border-transparent px-3 text-sm font-medium",outlined:"border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 not-disabled:active:border-accent-700 not-disabled:active:bg-accent-500/15 not-disabled:active:text-accent-700 h-9 border px-3 text-sm font-medium",link:"text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group border-transparent"},isLoading:{false:"",true:"opacity-50"},priority:{danger:"",default:"",neutral:""}},defaultVariants:{appearance:"outlined",isLoading:!1,priority:"default"},compoundVariants:[{appearance:"ghost",priority:"danger",class:"text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 not-disabled:active:bg-danger-500/15 not-disabled:active:text-danger-700 border-transparent"},{appearance:"outlined",priority:"danger",class:"border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 not-disabled:active:border-danger-700 not-disabled:active:bg-danger-500/15 not-disabled:active:text-danger-700"},{appearance:"filled",priority:"danger",class:"bg-filled-danger focus-visible:border-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover not-disabled:active:bg-filled-danger-active border-transparent"},{appearance:"link",priority:"danger",class:"text-danger-600 focus-visible:ring-focus-danger"},{appearance:"ghost",priority:"neutral",class:"text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong border-transparent"},{appearance:"outlined",priority:"neutral",class:"border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600"},{appearance:"filled",priority:"neutral",class:"bg-filled-neutral focus-visible:ring-focus-neutral not-disabled:hover:bg-filled-neutral-hover not-disabled:active:bg-filled-neutral-active border-transparent focus-visible:border-neutral-600"},{appearance:"link",priority:"neutral",class:"text-strong focus-visible:ring-focus-accent"}]}),L=H(({"aria-disabled":i,appearance:e="outlined",asChild:n,children:r,className:m,disabled:h,icon:x,iconPlacement:o="start",isLoading:a=!1,priority:y="default",type:B,...P},C)=>{let c=g(i??h??a),s=a?t(k,{className:"animate-spin"}):x,l=s&&e!=="link",b={"aria-disabled":c,className:p(A({appearance:e,priority:y,isLoading:a}),l&&o==="start"&&"ps-2.5",l&&o==="end"&&"pe-2.5",m),"data-loading":a,disabled:c,ref:C,...P};if(n){let d=w.only(r);T(M(d),"When using `asChild`, Button must be passed a single child as a JSX tag.");let V=d.props?.children;return t(N,{...b,children:E(d,{},t(v,{appearance:e,icon:s,iconPlacement:o,children:V}))})}return t("button",{...b,type:B,children:t(v,{appearance:e,icon:s,iconPlacement:o,children:r})})});L.displayName="Button";var v=({appearance:i,children:e,icon:n,iconPlacement:r})=>S("span",{className:f("inline-flex items-center gap-1.5 focus-within:outline-none focus-visible:outline-none",i==="link"&&"not-disabled:group-hover:underline"),children:[n&&t(u,{svg:n,className:f(r==="end"&&"order-last")}),e]});export{A as a,L as b};
2
+ //# sourceMappingURL=chunk-DFJUKUK4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/button/button.tsx"],"sourcesContent":["import { CircleNotch } from \"@phosphor-icons/react/CircleNotch\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport { Children, cloneElement, forwardRef, isValidElement } from \"react\";\nimport type { ButtonHTMLAttributes, ComponentProps, PropsWithChildren, ReactNode } from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { parseBooleanish } from \"../../types/index.js\";\nimport type { VariantProps } from \"../../types/variant-props.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/index.js\";\n\nconst buttonVariants = cva(\n\t\"inline-flex cursor-pointer items-center justify-center gap-1.5 whitespace-nowrap rounded-md focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50 [&>*]:focus-within:outline-none\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * Defines the visual style of the Button.\n\t\t\t */\n\t\t\tappearance: {\n\t\t\t\tfilled:\n\t\t\t\t\t\"bg-filled-accent text-on-filled focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-filled-accent-hover not-disabled:active:bg-filled-accent-active h-9 border border-transparent px-3 text-sm font-medium\",\n\t\t\t\tghost:\n\t\t\t\t\t\"text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 not-disabled:active:bg-accent-500/15 not-disabled:active:text-accent-700 h-9 border border-transparent px-3 text-sm font-medium\",\n\t\t\t\toutlined:\n\t\t\t\t\t\"border-accent-600 bg-form text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-accent-700 not-disabled:hover:bg-accent-500/10 not-disabled:hover:text-accent-700 not-disabled:active:border-accent-700 not-disabled:active:bg-accent-500/15 not-disabled:active:text-accent-700 h-9 border px-3 text-sm font-medium\",\n\t\t\t\tlink: \"text-accent-600 focus-visible:ring-focus-accent not-disabled:hover:underline group border-transparent\",\n\t\t\t},\n\t\t\t/**\n\t\t\t * Whether or not the button is in a loading state, default `false`. Setting `isLoading` will\n\t\t\t * replace any `icon` with a spinner, or add one if an icon wasn't given.\n\t\t\t * It will also disable user interaction with the button and set `disabled`.\n\t\t\t */\n\t\t\tisLoading: {\n\t\t\t\tfalse: \"\",\n\t\t\t\ttrue: \"opacity-50\",\n\t\t\t},\n\t\t\t/**\n\t\t\t * Indicates the importance or impact level of the button, affecting its\n\t\t\t * color and styling to communicate its purpose to the user\n\t\t\t */\n\t\t\tpriority: {\n\t\t\t\tdanger: \"\",\n\t\t\t\tdefault: \"\",\n\t\t\t\tneutral: \"\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tappearance: \"outlined\",\n\t\t\tisLoading: false,\n\t\t\tpriority: \"default\",\n\t\t},\n\t\tcompoundVariants: [\n\t\t\t{\n\t\t\t\tappearance: \"ghost\",\n\t\t\t\tpriority: \"danger\",\n\t\t\t\tclass:\n\t\t\t\t\t\"text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 not-disabled:active:bg-danger-500/15 not-disabled:active:text-danger-700 border-transparent\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"outlined\",\n\t\t\t\tpriority: \"danger\",\n\t\t\t\tclass:\n\t\t\t\t\t\"border-danger-600 bg-form text-danger-600 focus-visible:ring-focus-danger not-disabled:hover:border-danger-700 not-disabled:hover:bg-danger-500/10 not-disabled:hover:text-danger-700 not-disabled:active:border-danger-700 not-disabled:active:bg-danger-500/15 not-disabled:active:text-danger-700\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"filled\",\n\t\t\t\tpriority: \"danger\",\n\t\t\t\tclass:\n\t\t\t\t\t\"bg-filled-danger focus-visible:border-danger-600 focus-visible:ring-focus-danger not-disabled:hover:bg-filled-danger-hover not-disabled:active:bg-filled-danger-active border-transparent\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"link\",\n\t\t\t\tpriority: \"danger\",\n\t\t\t\tclass: \"text-danger-600 focus-visible:ring-focus-danger\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"ghost\",\n\t\t\t\tpriority: \"neutral\",\n\t\t\t\tclass:\n\t\t\t\t\t\"text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong border-transparent\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"outlined\",\n\t\t\t\tpriority: \"neutral\",\n\t\t\t\tclass:\n\t\t\t\t\t\"border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"filled\",\n\t\t\t\tpriority: \"neutral\",\n\t\t\t\tclass:\n\t\t\t\t\t\"bg-filled-neutral focus-visible:ring-focus-neutral not-disabled:hover:bg-filled-neutral-hover not-disabled:active:bg-filled-neutral-active border-transparent focus-visible:border-neutral-600\",\n\t\t\t},\n\t\t\t{\n\t\t\t\tappearance: \"link\",\n\t\t\t\tpriority: \"neutral\",\n\t\t\t\tclass: \"text-strong focus-visible:ring-focus-accent\",\n\t\t\t},\n\t\t],\n\t},\n);\n\ntype ButtonVariants = VariantProps<typeof buttonVariants>;\n\ntype ButtonAppearance = Pick<ButtonVariants, \"appearance\">[\"appearance\"];\ntype ButtonPriority = Pick<ButtonVariants, \"priority\">[\"priority\"];\n\n/**\n * The props for the `Button` component.\n */\ntype ButtonProps = ComponentProps<\"button\"> &\n\tButtonVariants & {\n\t\t/**\n\t\t * An icon to render inside the button. If the `state` is `\"pending\"`, then\n\t\t * the icon will automatically be replaced with a spinner.\n\t\t */\n\t\ticon?: ReactNode;\n\t\t/**\n\t\t * The side that the icon will render on, if one is present. If `state=\"pending\"`,\n\t\t * then the loading icon will also render on this side.\n\t\t */\n\t\ticonPlacement?: \"start\" | \"end\";\n\t} & (\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * Use the `asChild` prop to compose Radix's functionality onto alternative\n\t\t\t\t * element types or your own React components.\n\t\t\t\t *\n\t\t\t\t * When `asChild` is set to `true`, mantle will not render a default DOM\n\t\t\t\t * element, instead cloning the component's child and passing it the props and\n\t\t\t\t * behavior required to make it functional.\n\t\t\t\t *\n\t\t\t\t * asChild can be used as deeply as you need to. This means it is a great way\n\t\t\t\t * to compose multiple primitive's behavior together.\n\t\t\t\t *\n\t\t\t\t * @see https://www.radix-ui.com/docs/primitives/guides/composition#composition\n\t\t\t\t */\n\t\t\t\tasChild: true;\n\t\t\t\t/**\n\t\t\t\t * The default behavior of the button. Possible values are: `\"button\"`, `\"submit\"`, and `\"reset\"`.\n\t\t\t\t *\n\t\t\t\t * if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.\n\t\t\t\t *\n\t\t\t\t * If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type\n\t\t\t\t *\n\t\t\t\t * @enum\n\t\t\t\t * - `\"button\"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.\n\t\t\t\t * - `\"reset\"`: The button resets all the controls to their initial values.\n\t\t\t\t * - `\"submit\"`: The button submits the form data to the server.\n\t\t\t\t *\n\t\t\t\t * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type\n\t\t\t\t */\n\t\t\t\ttype?: ButtonHTMLAttributes<HTMLButtonElement>[\"type\"];\n\t\t }\n\t\t| {\n\t\t\t\tasChild?: false | undefined;\n\t\t\t\t/**\n\t\t\t\t * The default behavior of the button. Possible values are: `\"button\"`, `\"submit\"`, and `\"reset\"`.\n\t\t\t\t *\n\t\t\t\t * if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.\n\t\t\t\t *\n\t\t\t\t * If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type\n\t\t\t\t *\n\t\t\t\t * @enum\n\t\t\t\t * - `\"button\"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.\n\t\t\t\t * - `\"reset\"`: The button resets all the controls to their initial values.\n\t\t\t\t * - `\"submit\"`: The button submits the form data to the server.\n\t\t\t\t *\n\t\t\t\t * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type\n\t\t\t\t */\n\t\t\t\ttype: Exclude<ButtonHTMLAttributes<HTMLButtonElement>[\"type\"], undefined>;\n\t\t }\n\t);\n\n/**\n * Renders a button or a component that looks like a button, an interactive\n * element activated by a user with a mouse, keyboard, finger, voice command, or\n * other assistive technology. Once activated, it then performs an action, such\n * as submitting a form or opening a dialog.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button\n */\nconst Button = forwardRef<HTMLButtonElement, ButtonProps>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tappearance = \"outlined\",\n\t\t\tasChild,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\ticon: propIcon,\n\t\t\ticonPlacement = \"start\",\n\t\t\tisLoading = false,\n\t\t\tpriority = \"default\",\n\t\t\ttype,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled ?? isLoading);\n\t\tconst icon = isLoading ? <CircleNotch className=\"animate-spin\" /> : propIcon;\n\n\t\t/**\n\t\t * If the button has an icon and is not a link, add padding-start or padding-end to the button depending on the icon placement.\n\t\t */\n\t\tconst hasSpecialIconPadding = icon && appearance !== \"link\";\n\n\t\tconst buttonProps = {\n\t\t\t\"aria-disabled\": disabled,\n\t\t\tclassName: cx(\n\t\t\t\tbuttonVariants({ appearance, priority, isLoading }),\n\t\t\t\thasSpecialIconPadding && iconPlacement === \"start\" && \"ps-2.5\",\n\t\t\t\thasSpecialIconPadding && iconPlacement === \"end\" && \"pe-2.5\",\n\t\t\t\tclassName,\n\t\t\t),\n\t\t\t\"data-loading\": isLoading,\n\t\t\tdisabled,\n\t\t\tref,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tinvariant(\n\t\t\t\tisValidElement<ButtonProps>(singleChild),\n\t\t\t\t\"When using `asChild`, Button must be passed a single child as a JSX tag.\",\n\t\t\t);\n\t\t\tconst grandchildren = singleChild.props?.children;\n\n\t\t\treturn (\n\t\t\t\t<Slot {...buttonProps}>\n\t\t\t\t\t{cloneElement(\n\t\t\t\t\t\tsingleChild,\n\t\t\t\t\t\t{},\n\t\t\t\t\t\t<InnerContent appearance={appearance} icon={icon} iconPlacement={iconPlacement}>\n\t\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t\t</InnerContent>,\n\t\t\t\t\t)}\n\t\t\t\t</Slot>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<button {...buttonProps} type={type}>\n\t\t\t\t<InnerContent appearance={appearance} icon={icon} iconPlacement={iconPlacement}>\n\t\t\t\t\t{children}\n\t\t\t\t</InnerContent>\n\t\t\t</button>\n\t\t);\n\t},\n);\nButton.displayName = \"Button\";\n\nexport {\n\t//,\n\tButton,\n\tbuttonVariants,\n};\n\nexport type {\n\t//,\n\tButtonProps,\n\tButtonAppearance,\n\tButtonPriority,\n};\n\ntype InnerContentProps = PropsWithChildren & Pick<ButtonProps, \"appearance\" | \"icon\" | \"iconPlacement\">;\n\nconst InnerContent = ({ appearance, children, icon, iconPlacement }: InnerContentProps) => (\n\t<span\n\t\tclassName={clsx(\n\t\t\t\"inline-flex items-center gap-1.5 focus-within:outline-none focus-visible:outline-none\",\n\t\t\tappearance === \"link\" && \"not-disabled:group-hover:underline\",\n\t\t)}\n\t>\n\t\t{icon && <Icon svg={icon} className={clsx(iconPlacement === \"end\" && \"order-last\")} />}\n\t\t{children}\n\t</span>\n);\n"],"mappings":"wHAAA,OAAS,eAAAA,MAAmB,oCAC5B,OAAS,QAAAC,MAAY,uBACrB,O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Y,SAAAQ,EAAU,UAAAD,CAAU,CAAC,EAClDS,GAAyBV,IAAkB,SAAW,SACtDU,GAAyBV,IAAkB,OAAS,SACpDH,CACD,EACA,eAAgBI,EAChB,SAAAK,EACA,IAAAD,EACA,GAAGD,CACJ,EAEA,GAAIT,EAAS,CACZ,IAAMkB,EAAcC,EAAS,KAAKlB,CAAQ,EAC1CmB,EACCC,EAA4BH,CAAW,EACvC,0EACD,EACA,IAAMI,EAAgBJ,EAAY,OAAO,SAEzC,OACC1B,EAAC+B,EAAA,CAAM,GAAGP,EACR,SAAAQ,EACAN,EACA,CAAC,EACD1B,EAACiC,EAAA,CAAa,WAAY1B,EAAY,KAAMc,EAAM,cAAeR,EAC/D,SAAAiB,EACF,CACD,EACD,CAEF,CAEA,OACC9B,EAAC,UAAQ,GAAGwB,EAAa,KAAMR,EAC9B,SAAAhB,EAACiC,EAAA,CAAa,WAAY1B,EAAY,KAAMc,EAAM,cAAeR,EAC/D,SAAAJ,EACF,EACD,CAEF,CACD,EACAL,EAAO,YAAc,SAiBrB,IAAM8B,EAAe,CAAC,CAAE,WAAAC,EAAY,SAAAC,EAAU,KAAAC,EAAM,cAAAC,CAAc,IACjEC,EAAC,QACA,UAAWC,EACV,wFACAL,IAAe,QAAU,oCAC1B,EAEC,UAAAE,GAAQI,EAACC,EAAA,CAAK,IAAKL,EAAM,UAAWG,EAAKF,IAAkB,OAAS,YAAY,EAAG,EACnFF,GACF","names":["CircleNotch","Slot","cva","clsx","Children","cloneElement","forwardRef","isValidElement","invariant","jsx","jsxs","buttonVariants","cva","Button","forwardRef","_ariaDisabled","appearance","asChild","children","className","_disabled","propIcon","iconPlacement","isLoading","priority","type","props","ref","disabled","parseBooleanish","icon","CircleNotch","hasSpecialIconPadding","buttonProps","cx","singleChild","Children","invariant","isValidElement","grandchildren","Slot","cloneElement","InnerContent","InnerContent","appearance","children","icon","iconPlacement","jsxs","clsx","jsx","Icon"]}
@@ -0,0 +1,2 @@
1
+ import{a as t}from"./chunk-VJPVAY5J.js";import{a as e}from"./chunk-EW5CFGXT.js";import{forwardRef as c}from"react";import{jsx as f}from"react/jsx-runtime";var g=c(({className:o,style:r,svg:p,...s},m)=>f(t,{ref:m,className:e("size-5",o),style:r,svg:p,...s}));export{g as a};
2
+ //# sourceMappingURL=chunk-LBEYGDAN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/icon/icon.tsx"],"sourcesContent":["import { forwardRef, type ElementRef, type ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { SvgOnly } from \"./svg-only.js\";\nimport type { SvgAttributes } from \"./types.js\";\n\ntype IconProps = Omit<SvgAttributes, \"children\"> & {\n\t/**\n\t * A single SVG icon element.\n\t */\n\tsvg: ReactNode;\n};\n/**\n * Decorates an svg icon with automatic sizing styles and a `shrink-0` class.\n *\n * Merges `className` selectors with the following order of precedence (last one wins):\n * 1. SvgOnly base classes\n * 2. Icon base classes\n * 3. Icon className\n * 4. svg className\n */\nconst Icon = forwardRef<ElementRef<\"svg\">, IconProps>(({ className, style, svg, ...props }, ref) => (\n\t<SvgOnly ref={ref} className={cx(\"size-6 sm:size-5\", className)} style={style} svg={svg} {...props} />\n));\n\nexport {\n\t//,\n\tIcon,\n};\n\nexport type {\n\t//,\n\tIconProps,\n};\n"],"mappings":"gFAAA,OAAS,cAAAA,MAAmD,QAqB3D,cAAAC,MAAA,oBADD,IAAMC,EAAOC,EAAyC,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,IAAAC,EAAK,GAAGC,CAAM,EAAGC,IAC3FP,EAACQ,EAAA,CAAQ,IAAKD,EAAK,UAAWE,EAAG,mBAAoBN,CAAS,EAAG,MAAOC,EAAO,IAAKC,EAAM,GAAGC,EAAO,CACpG","names":["forwardRef","jsx","Icon","forwardRef","className","style","svg","props","ref","SvgOnly","cx"]}
1
+ {"version":3,"sources":["../src/components/icon/icon.tsx"],"sourcesContent":["import { forwardRef, type ElementRef, type ReactNode } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { SvgOnly } from \"./svg-only.js\";\nimport type { SvgAttributes } from \"./types.js\";\n\ntype IconProps = Omit<SvgAttributes, \"children\"> & {\n\t/**\n\t * A single SVG icon element.\n\t */\n\tsvg: ReactNode;\n};\n/**\n * Decorates an svg icon with automatic sizing styles and a `shrink-0` class.\n *\n * Merges `className` selectors with the following order of precedence (last one wins):\n * 1. SvgOnly base classes\n * 2. Icon base classes\n * 3. Icon className\n * 4. svg className\n */\nconst Icon = forwardRef<ElementRef<\"svg\">, IconProps>(({ className, style, svg, ...props }, ref) => (\n\t<SvgOnly ref={ref} className={cx(\"size-5\", className)} style={style} svg={svg} {...props} />\n));\n\nexport {\n\t//,\n\tIcon,\n};\n\nexport type {\n\t//,\n\tIconProps,\n};\n"],"mappings":"gFAAA,OAAS,cAAAA,MAAmD,QAqB3D,cAAAC,MAAA,oBADD,IAAMC,EAAOC,EAAyC,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,IAAAC,EAAK,GAAGC,CAAM,EAAGC,IAC3FP,EAACQ,EAAA,CAAQ,IAAKD,EAAK,UAAWE,EAAG,SAAUN,CAAS,EAAG,MAAOC,EAAO,IAAKC,EAAM,GAAGC,EAAO,CAC1F","names":["forwardRef","jsx","Icon","forwardRef","className","style","svg","props","ref","SvgOnly","cx"]}
@@ -0,0 +1,2 @@
1
+ import{b as g}from"./chunk-CXQLUXDJ.js";import{a as S}from"./chunk-5E73VWJX.js";import{a as r}from"./chunk-EW5CFGXT.js";import{CaretDown as P}from"@phosphor-icons/react/CaretDown";import{CaretUp as R}from"@phosphor-icons/react/CaretUp";import{Check as I}from"@phosphor-icons/react/Check";import*as e from"@radix-ui/react-select";import{createContext as N,forwardRef as n,useContext as T}from"react";import{jsx as i,jsxs as v}from"react/jsx-runtime";var h=N({}),B=n(({"aria-invalid":o,children:a,id:t,validation:l,onBlur:s,onChange:d,...m},c)=>i(e.Root,{...m,onValueChange:d,children:i(h.Provider,{value:{"aria-invalid":o,id:t,validation:l,onBlur:s,ref:c},children:a})}));B.displayName="Select";var F=e.Group,G=e.Value,W=n(({"aria-invalid":o,className:a,children:t,id:l,validation:s,...d},m)=>{let c=T(h),p=c["aria-invalid"]??o,x=p!=null&&p!=="false",f=c.validation??s,u=x?"error":typeof f=="function"?f():f,w=p??u==="error",C=c.id??l;return v(e.Trigger,{"aria-invalid":w,"data-validation":u||void 0,className:r("h-9 text-sm","border-form bg-form text-strong placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 hover:border-neutral-400 disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left","focus:outline-none focus:ring-4 aria-expanded:ring-4","focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent","data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success","data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning","data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger",a),id:C,ref:S(m,c.ref),...d,children:[t,i(e.Icon,{asChild:!0,children:i(P,{className:"size-4 shrink-0",weight:"bold"})})]})});W.displayName="SelectTrigger";var y=n(({className:o,...a},t)=>i(e.ScrollUpButton,{ref:t,className:r("flex cursor-default items-center justify-center py-1",o),...a,children:i(R,{className:"size-4 shrink-0",weight:"bold"})}));y.displayName="SelectScrollUpButton";var b=n(({className:o,...a},t)=>i(e.ScrollDownButton,{ref:t,className:r("flex cursor-default items-center justify-center py-1",o),...a,children:i(P,{className:"size-4 shrink-0",weight:"bold"})}));b.displayName="SelectScrollDownButton";var E=n(({className:o,children:a,position:t="popper",width:l,...s},d)=>i(e.Portal,{children:v(e.Content,{ref:d,className:r("border-popover 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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md","bg-popover",t==="popper"&&"data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-[var(--radix-select-content-available-height)]",l==="trigger"&&"w-[var(--radix-select-trigger-width)]",o),position:t,...s,children:[i(y,{}),i(e.Viewport,{className:r("p-1",t==="popper"&&"h-[var(--radix-select-trigger-height)] w-full"),children:a}),i(b,{})]})}));E.displayName="SelectContent";var L=n(({className:o,...a},t)=>i(e.Label,{ref:t,className:r("px-2 py-1.5 text-sm font-semibold",o),...a}));L.displayName="SelectLabel";var k=n(({className:o,children:a,...t},l)=>v(e.Item,{ref:l,className:r("focus:bg-popover-hover data-disabled:pointer-events-none data-disabled:opacity-50 data-state-checked:bg-filled-accent data-state-checked:text-on-filled relative flex w-full cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-8 text-sm outline-none",o),...t,children:[i(e.ItemText,{children:a}),i(e.ItemIndicator,{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:i(I,{className:"size-4 shrink-0",weight:"bold"})})]}));k.displayName="SelectItem";var V=n(({className:o,...a},t)=>i(g,{ref:t,className:r("-mx-1 my-1 h-px w-auto",o),...a}));V.displayName="SelectSeparator";export{B as a,F as b,G as c,W as d,E as e,L as f,k as g,V as h};
2
+ //# sourceMappingURL=chunk-WCQVBWRD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/select/select.tsx"],"sourcesContent":["import { CaretDown } from \"@phosphor-icons/react/CaretDown\";\nimport { CaretUp } from \"@phosphor-icons/react/CaretUp\";\nimport { Check } from \"@phosphor-icons/react/Check\";\nimport * as SelectPrimitive from \"@radix-ui/react-select\";\nimport type {\n\tComponentProps,\n\tComponentPropsWithoutRef,\n\tElementRef,\n\tFocusEvent,\n\tRef,\n\tSelectHTMLAttributes,\n} from \"react\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport { composeRefs } from \"../../utils/compose-refs/compose-refs.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport type { WithValidation } from \"../input/types.js\";\nimport { Separator } from \"../separator/separator.js\";\n\ntype WithAriaInvalid = Pick<SelectHTMLAttributes<HTMLSelectElement>, \"aria-invalid\">;\ntype SelectContextType = WithValidation &\n\tWithAriaInvalid & {\n\t\t/**\n\t\t * Ref for the trigger button.\n\t\t */\n\t\tref?: Ref<HTMLButtonElement>;\n\t\t/**\n\t\t * Event handler called when Select blurs.\n\t\t * @note this is a no-op for now until we can guarantee that it works identically to a native select onBlur\n\t\t */\n\t\tonBlur?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t} & Pick<ComponentProps<\"button\">, \"id\">;\n\nconst SelectContext = createContext<SelectContextType>({});\n\ntype SelectProps = Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Root>, \"onValueChange\"> &\n\tWithValidation &\n\tWithAriaInvalid & {\n\t\t/**\n\t\t * Event handler called when the value changes.\n\t\t */\n\t\tonChange?: (value: string) => void;\n\t\t/**\n\t\t * Event handler called when Select blurs.\n\t\t * @note this is a no-op for now until we can guarantee that it works identically to a native select onBlur\n\t\t */\n\t\tonBlur?: (event: FocusEvent<HTMLButtonElement>) => void;\n\t} & Pick<ComponentProps<\"button\">, \"id\">;\n\n/**\n * Displays a list of options for the user to pick from—triggered by a button.\n */\nconst Select = forwardRef<HTMLButtonElement, SelectProps>(\n\t({ \"aria-invalid\": _ariaInvalid, children, id, validation, onBlur, onChange, ...props }, ref) => {\n\t\treturn (\n\t\t\t<SelectPrimitive.Root {...props} onValueChange={onChange}>\n\t\t\t\t<SelectContext.Provider value={{ \"aria-invalid\": _ariaInvalid, id, validation, onBlur, ref }}>\n\t\t\t\t\t{children}\n\t\t\t\t</SelectContext.Provider>\n\t\t\t</SelectPrimitive.Root>\n\t\t);\n\t},\n);\nSelect.displayName = \"Select\";\n\n/**\n * A group of related options within a select menu. Similar to an html `<optgroup>` element.\n * Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.\n */\nconst SelectGroup = SelectPrimitive.Group;\n\n/**\n * The part that reflects the selected value. By default the selected item's text will be rendered. if you require more control, you can instead control the select and pass your own children. It should not be styled to ensure correct positioning. An optional placeholder prop is also available for when the select has no value.\n */\nconst SelectValue = SelectPrimitive.Value;\n\ntype SelectTriggerProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> & WithAriaInvalid & WithValidation;\n\n/**\n * The button that toggles the select. The Select.Content will position itself adjacent to the trigger.\n */\nconst SelectTrigger = forwardRef<ElementRef<typeof SelectPrimitive.Trigger>, SelectTriggerProps>(\n\t({ \"aria-invalid\": ariaInValidProp, className, children, id: propId, validation: propValidation, ...props }, ref) => {\n\t\tconst ctx = useContext(SelectContext);\n\t\tconst _ariaInvalid = ctx[\"aria-invalid\"] ?? ariaInValidProp;\n\t\tconst isInvalid = _ariaInvalid != null && _ariaInvalid !== \"false\";\n\t\tconst _validation = ctx.validation ?? propValidation;\n\t\tconst validation = isInvalid ? \"error\" : typeof _validation === \"function\" ? _validation() : _validation;\n\t\tconst ariaInvalid = _ariaInvalid ?? validation === \"error\";\n\t\tconst id = ctx.id ?? propId;\n\n\t\treturn (\n\t\t\t<SelectPrimitive.Trigger\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\tdata-validation={validation || undefined}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"h-9 text-sm\",\n\t\t\t\t\t\"border-form bg-form text-strong placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 hover:border-neutral-400 disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left\",\n\t\t\t\t\t\"focus:outline-none focus:ring-4 aria-expanded:ring-4\",\n\t\t\t\t\t\"focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent\",\n\t\t\t\t\t\"data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success\",\n\t\t\t\t\t\"data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning\",\n\t\t\t\t\t\"data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tid={id}\n\t\t\t\tref={composeRefs(ref, ctx.ref)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t<SelectPrimitive.Icon asChild>\n\t\t\t\t\t<CaretDown className=\"size-4 shrink-0\" weight=\"bold\" />\n\t\t\t\t</SelectPrimitive.Icon>\n\t\t\t</SelectPrimitive.Trigger>\n\t\t);\n\t},\n);\nSelectTrigger.displayName = \"SelectTrigger\";\n\nconst SelectScrollUpButton = forwardRef<\n\tElementRef<typeof SelectPrimitive.ScrollUpButton>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollUpButton\n\t\tref={ref}\n\t\tclassName={cx(\"flex cursor-default items-center justify-center py-1\", className)}\n\t\t{...props}\n\t>\n\t\t<CaretUp className=\"size-4 shrink-0\" weight=\"bold\" />\n\t</SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = \"SelectScrollUpButton\";\n\nconst SelectScrollDownButton = forwardRef<\n\tElementRef<typeof SelectPrimitive.ScrollDownButton>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.ScrollDownButton\n\t\tref={ref}\n\t\tclassName={cx(\"flex cursor-default items-center justify-center py-1\", className)}\n\t\t{...props}\n\t>\n\t\t<CaretDown className=\"size-4 shrink-0\" weight=\"bold\" />\n\t</SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = \"SelectScrollDownButton\";\n\ntype SelectContentProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & {\n\twidth?: \"trigger\" | \"content\";\n};\n\n/**\n * The component that pops out when the select is open as a portal adjacent to the trigger button.\n * It contains a scrolling viewport of the select items.\n */\nconst SelectContent = forwardRef<ElementRef<typeof SelectPrimitive.Content>, SelectContentProps>(\n\t({ className, children, position = \"popper\", width, ...props }, ref) => (\n\t\t<SelectPrimitive.Portal>\n\t\t\t<SelectPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"border-popover 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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md\",\n\t\t\t\t\t\"bg-popover\",\n\t\t\t\t\tposition === \"popper\" &&\n\t\t\t\t\t\t\"data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-[var(--radix-select-content-available-height)]\",\n\t\t\t\t\twidth === \"trigger\" && \"w-[var(--radix-select-trigger-width)]\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tposition={position}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SelectScrollUpButton />\n\t\t\t\t<SelectPrimitive.Viewport\n\t\t\t\t\tclassName={cx(\"p-1\", position === \"popper\" && \"h-[var(--radix-select-trigger-height)] w-full\")}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SelectPrimitive.Viewport>\n\t\t\t\t<SelectScrollDownButton />\n\t\t\t</SelectPrimitive.Content>\n\t\t</SelectPrimitive.Portal>\n\t),\n);\nSelectContent.displayName = \"SelectContent\";\n\n/**\n * Used to render the label of a group. It won't be focusable using arrow keys.\n */\nconst SelectLabel = forwardRef<\n\tElementRef<typeof SelectPrimitive.Label>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n\t<SelectPrimitive.Label ref={ref} className={cx(\"px-2 py-1.5 text-sm font-semibold\", className)} {...props} />\n));\nSelectLabel.displayName = \"SelectLabel\";\n\n/**\n * An option within a select menu. Similar to an html `<option>` element.\n * Contains a `value` prop that will be passed to the `onChange` handler of the `Select` component when selected.\n * Displays the children as the option's text.\n */\nconst SelectItem = forwardRef<\n\tElementRef<typeof SelectPrimitive.Item>,\n\tComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n\t<SelectPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus:bg-popover-hover data-disabled:pointer-events-none data-disabled:opacity-50 data-state-checked:bg-filled-accent data-state-checked:text-on-filled relative flex w-full cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-8 text-sm outline-none\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t\t<SelectPrimitive.ItemIndicator className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n\t\t\t<Check className=\"size-4 shrink-0\" weight=\"bold\" />\n\t\t</SelectPrimitive.ItemIndicator>\n\t</SelectPrimitive.Item>\n));\nSelectItem.displayName = \"SelectItem\";\n\n/**\n * Used to visually separate items in the select.\n */\nconst SelectSeparator = forwardRef<ElementRef<typeof Separator>, ComponentPropsWithoutRef<typeof Separator>>(\n\t({ className, ...props }, ref) => (\n\t\t<Separator ref={ref} className={cx(\"-mx-1 my-1 h-px w-auto\", className)} {...props} />\n\t),\n);\nSelectSeparator.displayName = \"SelectSeparator\";\n\nexport {\n\tSelect,\n\tSelectGroup,\n\tSelectValue,\n\tSelectTrigger,\n\tSelectContent,\n\tSelectLabel,\n\tSelectItem,\n\tSelectSeparator,\n\tSelectScrollUpButton,\n\tSelectScrollDownButton,\n};\n"],"mappings":"wHAAA,OAAS,aAAAA,MAAiB,kCAC1B,OAAS,WAAAC,MAAe,gCACxB,OAAS,SAAAC,MAAa,8BACtB,UAAYC,MAAqB,yBASjC,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,MAAkB,QA2ClD,cAAAC,EAoCD,QAAAC,MApCC,oBAvBJ,IAAMC,EAAgBC,EAAiC,CAAC,CAAC,EAmBnDC,EAASC,EACd,CAAC,CAAE,eAAgBC,EAAc,SAAAC,EAAU,GAAAC,EAAI,WAAAC,EAAY,OAAAC,EAAQ,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAEvFb,EAAiB,OAAhB,CAAsB,GAAGY,EAAO,cAAeD,EAC/C,SAAAX,EAACE,EAAc,SAAd,CAAuB,MAAO,CAAE,eAAgBI,EAAc,GAAAE,EAAI,WAAAC,EAAY,OAAAC,EAAQ,IAAAG,CAAI,EACzF,SAAAN,EACF,EACD,CAGH,EACAH,EAAO,YAAc,SAMrB,IAAMU,EAA8B,QAK9BC,EAA8B,QAO9BC,EAAgBX,EACrB,CAAC,CAAE,eAAgBY,EAAiB,UAAAC,EAAW,SAAAX,EAAU,GAAIY,EAAQ,WAAYC,EAAgB,GAAGR,CAAM,EAAGC,IAAQ,CACpH,IAAMQ,EAAMC,EAAWpB,CAAa,EAC9BI,EAAee,EAAI,cAAc,GAAKJ,EACtCM,EA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,EACV,8ZACA,aACAO,IAAa,UACZ,+KACDC,IAAU,WAAa,wCACvBhB,CACD,EACA,SAAUe,EACT,GAAGrB,EAEJ,UAAAZ,EAAC6B,EAAA,EAAqB,EACtB7B,EAAiB,WAAhB,CACA,UAAW0B,EAAG,MAAOO,IAAa,UAAY,+CAA+C,EAE5F,SAAA1B,EACF,EACAP,EAAC+B,EAAA,EAAuB,GACzB,EACD,CAEF,EACAC,EAAc,YAAc,gBAK5B,IAAMG,EAAc9B,EAGlB,CAAC,CAAE,UAAAa,EAAW,GAAGN,CAAM,EAAGC,IAC3Bb,EAAiB,QAAhB,CAAsB,IAAKa,EAAK,UAAWa,EAAG,oCAAqCR,CAAS,EAAI,GAAGN,EAAO,CAC3G,EACDuB,EAAY,YAAc,cAO1B,IAAMC,EAAa/B,EAGjB,CAAC,CAAE,UAAAa,EAAW,SAAAX,EAAU,GAAGK,CAAM,EAAGC,IACrCZ,EAAiB,OAAhB,CACA,IAAKY,EACL,UAAWa,EACV,qQACAR,CACD,EACC,GAAGN,EAEJ,UAAAZ,EAAiB,WAAhB,CAA0B,SAAAO,EAAS,EACpCP,EAAiB,gBAAhB,CAA8B,UAAU,gEACxC,SAAAA,EAACqC,EAAA,CAAM,UAAU,kBAAkB,OAAO,OAAO,EAClD,GACD,CACA,EACDD,EAAW,YAAc,aAKzB,IAAME,EAAkBjC,EACvB,CAAC,CAAE,UAAAa,EAAW,GAAGN,CAAM,EAAGC,IACzBb,EAACuC,EAAA,CAAU,IAAK1B,EAAK,UAAWa,EAAG,yBAA0BR,CAAS,EAAI,GAAGN,EAAO,CAEtF,EACA0B,EAAgB,YAAc","names":["CaretDown","CaretUp","Check","SelectPrimitive","createContext","forwardRef","useContext","jsx","jsxs","SelectContext","createContext","Select","forwardRef","_ariaInvalid","children","id","validation","onBlur","onChange","props","ref","SelectGroup","SelectValue","SelectTrigger","ariaInValidProp","className","propId","propValidation","ctx","useContext","isInvalid","_validation","ariaInvalid","cx","composeRefs","CaretDown","SelectScrollUpButton","CaretUp","SelectScrollDownButton","SelectContent","position","width","SelectLabel","SelectItem","Check","SelectSeparator","Separator"]}
@@ -0,0 +1,2 @@
1
+ import{a as l}from"./chunk-RDMTCZPT.js";import{a as o}from"./chunk-LBEYGDAN.js";import{a as d}from"./chunk-EW5CFGXT.js";import{CircleNotch as V}from"@phosphor-icons/react/CircleNotch";import{Slot as C}from"@radix-ui/react-slot";import{cva as H}from"class-variance-authority";import{Children as I,cloneElement as M,forwardRef as T,isValidElement as E}from"react";import{jsx as t,jsxs as L}from"react/jsx-runtime";var N=H("inline-flex shrink-0 cursor-pointer items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50",{variants:{appearance:{ghost:"text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong border-transparent",outlined:"border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600"},isLoading:{false:"",true:"opacity-50"},size:{xs:"size-6",sm:"size-7",md:"size-9"}},defaultVariants:{appearance:"outlined",size:"md"}}),A=T(({"aria-disabled":c,appearance:u,asChild:b=!1,children:p,className:m,disabled:f,icon:v,isLoading:e=!1,label:h,size:n,type:g,...y},B)=>{let r=l(c??f??e),i=e?t(V,{className:"animate-spin"}):v,s={"aria-disabled":r,"data-icon-button":!0,"data-loading":e,"data-size":n,className:d("icon-button",N({appearance:u,isLoading:e,size:n}),m),disabled:r,ref:B,...y};if(b){let a=I.only(p),x=E(a);return t(C,{...s,children:x&&M(a,{},t(o,{svg:i}))})}return L("button",{...s,type:g,children:[t("span",{className:"sr-only",children:h}),t(o,{svg:i})]})});A.displayName="IconButton";export{A as a};
2
+ //# sourceMappingURL=chunk-YC6QXFZS.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/button/icon-button.tsx"],"sourcesContent":["import { CircleNotch } from \"@phosphor-icons/react/CircleNotch\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva } from \"class-variance-authority\";\nimport { Children, cloneElement, forwardRef, isValidElement } from \"react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\nimport type { VariantProps, WithAsChild } from \"../../types/index.js\";\nimport { parseBooleanish } from \"../../types/index.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/index.js\";\n\nconst iconButtonVariants = cva(\n\t\"inline-flex shrink-0 cursor-pointer items-center justify-center rounded-[var(--icon-button-border-radius,0.375rem)] border focus-within:outline-none focus-visible:ring-4 disabled:cursor-default disabled:opacity-50\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * Defines the visual style of the Button.\n\t\t\t */\n\t\t\tappearance: {\n\t\t\t\tghost:\n\t\t\t\t\t\"text-strong focus-visible:ring-focus-accent not-disabled:hover:bg-neutral-500/10 not-disabled:hover:text-strong not-disabled:active:bg-neutral-500/15 not-disabled:active:text-strong border-transparent\",\n\t\t\t\toutlined:\n\t\t\t\t\t\"border-form bg-form text-strong focus-visible:border-accent-600 focus-visible:ring-focus-accent not-disabled:hover:border-neutral-400 not-disabled:hover:bg-form-hover not-disabled:hover:text-strong not-disabled:active:border-neutral-400 not-disabled:active:bg-neutral-500/10 not-disabled:active:text-strong focus-visible:not-disabled:active:border-accent-600\",\n\t\t\t},\n\t\t\t/**\n\t\t\t * Whether or not the button is in a loading state, default `false`. Setting `isLoading` will\n\t\t\t * replace the `icon` with a spinner.\n\t\t\t * It will also disable user interaction with the button and set `aria-disabled`.\n\t\t\t */\n\t\t\tisLoading: {\n\t\t\t\tfalse: \"\",\n\t\t\t\ttrue: \"opacity-50\",\n\t\t\t},\n\t\t\t/**\n\t\t\t * The size of the IconButton.\n\t\t\t */\n\t\t\tsize: {\n\t\t\t\txs: \"size-6\",\n\t\t\t\tsm: \"size-7\",\n\t\t\t\tmd: \"size-9\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tappearance: \"outlined\",\n\t\t\tsize: \"md\",\n\t\t},\n\t},\n);\n\ntype IconButtonVariants = VariantProps<typeof iconButtonVariants>;\n\n/**\n * The props for the `Button` component.\n */\ntype IconButtonProps = ButtonHTMLAttributes<HTMLButtonElement> &\n\tWithAsChild &\n\tIconButtonVariants & {\n\t\t/**\n\t\t * The accessible label for the icon. This label will be visually hidden but announced to screen reader users, similar to alt text for img tags.\n\t\t */\n\t\tlabel: string;\n\t\t/**\n\t\t * An icon to render inside the button. If the `state` is `\"pending\"`, then\n\t\t * the icon will automatically be replaced with a spinner.\n\t\t */\n\t\ticon: ReactNode;\n\t} & (\n\t\t| {\n\t\t\t\t/**\n\t\t\t\t * Use the `asChild` prop to compose Radix's functionality onto alternative\n\t\t\t\t * element types or your own React components.\n\t\t\t\t *\n\t\t\t\t * When `asChild` is set to `true`, mantle will not render a default DOM\n\t\t\t\t * element, instead cloning the component's child and passing it the props and\n\t\t\t\t * behavior required to make it functional.\n\t\t\t\t *\n\t\t\t\t * asChild can be used as deeply as you need to. This means it is a great way\n\t\t\t\t * to compose multiple primitive's behavior together.\n\t\t\t\t *\n\t\t\t\t * @see https://www.radix-ui.com/docs/primitives/guides/composition#composition\n\t\t\t\t */\n\t\t\t\tasChild: true;\n\t\t\t\t/**\n\t\t\t\t * The default behavior of the button. Possible values are: `\"button\"`, `\"submit\"`, and `\"reset\"`.\n\t\t\t\t *\n\t\t\t\t * if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.\n\t\t\t\t *\n\t\t\t\t * If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type\n\t\t\t\t *\n\t\t\t\t * @enum\n\t\t\t\t * - `\"button\"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.\n\t\t\t\t * - `\"reset\"`: The button resets all the controls to their initial values.\n\t\t\t\t * - `\"submit\"`: The button submits the form data to the server.\n\t\t\t\t *\n\t\t\t\t * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type\n\t\t\t\t */\n\t\t\t\ttype?: ButtonHTMLAttributes<HTMLButtonElement>[\"type\"];\n\t\t }\n\t\t| {\n\t\t\t\tasChild?: false | undefined;\n\t\t\t\t/**\n\t\t\t\t * The default behavior of the button. Possible values are: `\"button\"`, `\"submit\"`, and `\"reset\"`.\n\t\t\t\t *\n\t\t\t\t * if `asChild` is NOT used: Unlike the native `<button>` element, this prop is required and has no default value.\n\t\t\t\t *\n\t\t\t\t * If `asChild` IS used: This prop HAS NO EFFECT, is REMOVED, and has no default value. This is because we do not want the `button` `type` to automatically merge with any child anchor `type` attribute because the `anchor` `type` is _strictly different_ than the `button` type, see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#type\n\t\t\t\t *\n\t\t\t\t * @enum\n\t\t\t\t * - `\"button\"`: The button has no default behavior, and does nothing when pressed by default. It can have client-side scripts listen to the element's events, which are triggered when the events occur.\n\t\t\t\t * - `\"reset\"`: The button resets all the controls to their initial values.\n\t\t\t\t * - `\"submit\"`: The button submits the form data to the server.\n\t\t\t\t *\n\t\t\t\t * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#type\n\t\t\t\t */\n\t\t\t\ttype: Exclude<ButtonHTMLAttributes<HTMLButtonElement>[\"type\"], undefined>;\n\t\t }\n\t);\n\n/**\n * Renders a button or a component that looks like a button, an interactive\n * element activated by a user with a mouse, keyboard, finger, voice command, or\n * other assistive technology. Once activated, it then performs an action, such\n * as submitting a form or opening a dialog.\n * Renders only a single icon as children with an accessible, screen-reader-only label.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button\n */\nconst IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tappearance,\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\ticon: propIcon,\n\t\t\tisLoading = false,\n\t\t\tlabel,\n\t\t\tsize,\n\t\t\ttype,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled ?? isLoading);\n\t\tconst icon = isLoading ? <CircleNotch className=\"animate-spin\" /> : propIcon;\n\n\t\tconst buttonProps = {\n\t\t\t\"aria-disabled\": disabled,\n\t\t\t\"data-icon-button\": true,\n\t\t\t\"data-loading\": isLoading,\n\t\t\t\"data-size\": size,\n\t\t\tclassName: cx(\"icon-button\", iconButtonVariants({ appearance, isLoading, size }), className),\n\t\t\tdisabled,\n\t\t\tref,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tconst isValidChild = isValidElement(singleChild);\n\n\t\t\treturn <Slot {...buttonProps}>{isValidChild && cloneElement(singleChild, {}, <Icon svg={icon} />)}</Slot>;\n\t\t}\n\n\t\treturn (\n\t\t\t<button {...buttonProps} type={type}>\n\t\t\t\t<span className=\"sr-only\">{label}</span>\n\t\t\t\t<Icon svg={icon} />\n\t\t\t</button>\n\t\t);\n\t},\n);\nIconButton.displayName = \"IconButton\";\n\nexport { IconButton, iconButtonVariants };\nexport type { IconButtonProps };\n"],"mappings":"wHAAA,OAAS,eAAAA,MAAmB,oCAC5B,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAAW,2BACpB,OAAS,YAAAC,EAAU,gBAAAC,EAAc,cAAAC,EAAY,kBAAAC,MAAsB,QA8IxC,cAAAC,EAqBxB,QAAAC,MArBwB,oBAvI3B,IAAMC,EAAqBC,EAC1B,wNACA,CACC,SAAU,CAIT,WAAY,CACX,MACC,2MACD,SACC,wWACF,EAMA,UAAW,CACV,MAAO,GACP,KAAM,YACP,EAIA,KAAM,CACL,GAAI,SACJ,GAAI,SACJ,GAAI,QACL,CACD,EACA,gBAAiB,CAChB,WAAY,WACZ,KAAM,IACP,CACD,CACD,EAgFMC,EAAaC,EAClB,CACC,CACC,gBAAiBC,EACjB,WAAAC,EACA,QAAAC,EAAU,GACV,SAAAC,EACA,UAAAC,EACA,SAAUC,EACV,KAAMC,EACN,UAAAC,EAAY,GACZ,MAAAC,EACA,KAAAC,EACA,KAAAC,EACA,GAAGC,CACJ,EACAC,IACI,CACJ,IAAMC,EAAWC,EAAgBd,GAAiBK,GAAaE,CAAS,EAClEQ,EAAOR,EAAYb,EAACsB,EAAA,CAAY,UAAU,eAAe,EAAKV,EAE9DW,EAAc,CACnB,gBAAiBJ,EACjB,mBAAoB,GACpB,eAAgBN,EAChB,YAAaE,EACb,UAAWS,EAAG,cAAetB,EAAmB,CAAE,WAAAK,EAAY,UAAAM,EAAW,KAAAE,CAAK,CAAC,EAAGL,CAAS,EAC3F,SAAAS,EACA,IAAAD,EACA,GAAGD,CACJ,EAEA,GAAIT,EAAS,CACZ,IAAMiB,EAAcC,EAAS,KAAKjB,CAAQ,EACpCkB,EAAeC,EAAeH,CAAW,EAE/C,OAAOzB,EAAC6B,EAAA,CAAM,GAAGN,EAAc,SAAAI,GAAgBG,EAAaL,EAAa,CAAC,EAAGzB,EAAC+B,EAAA,CAAK,IAAKV,EAAM,CAAE,EAAE,CACnG,CAEA,OACCpB,EAAC,UAAQ,GAAGsB,EAAa,KAAMP,EAC9B,UAAAhB,EAAC,QAAK,UAAU,UAAW,SAAAc,EAAM,EACjCd,EAAC+B,EAAA,CAAK,IAAKV,EAAM,GAClB,CAEF,CACD,EACAjB,EAAW,YAAc","names":["CircleNotch","Slot","cva","Children","cloneElement","forwardRef","isValidElement","jsx","jsxs","iconButtonVariants","cva","IconButton","forwardRef","_ariaDisabled","appearance","asChild","children","className","_disabled","propIcon","isLoading","label","size","type","props","ref","disabled","parseBooleanish","icon","CircleNotch","buttonProps","cx","singleChild","Children","isValidChild","isValidElement","Slot","cloneElement","Icon"]}
package/dist/dialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as P,b as v,c as u,d as m,e as p,f as d,g,h as D}from"./chunk-J4X3ODX7.js";import{g as c}from"./chunk-BGLTMLKM.js";import"./chunk-273VK4KO.js";import"./chunk-D3XF6J5A.js";import{a as y}from"./chunk-BU7JVIWF.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-SMCZZUU4.js";import"./chunk-VJPVAY5J.js";import{a}from"./chunk-EW5CFGXT.js";import{X as I}from"@phosphor-icons/react/X";import{forwardRef as r}from"react";import{jsx as i,jsxs as W}from"react/jsx-runtime";var O=P,T=v,C=u,z=m,f=r(({className:o,...e},t)=>i(p,{ref:t,className:a("bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",o),...e}));f.displayName=p.displayName;var x=r(({children:o,className:e,onInteractOutside:t,onPointerDownOutside:n,...s},w)=>W(C,{children:[i(f,{}),i("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:i(d,{className:a("flex max-h-full w-full max-w-lg flex-1 flex-col","outline-none focus-within:outline-none","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95",e),onInteractOutside:l=>{c(l),t?.(l)},onPointerDownOutside:l=>{c(l),n?.(l)},ref:w,...s,children:o})})]}));x.displayName=d.displayName;var N=({className:o,children:e,...t})=>i("div",{className:a("border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4","has-[.icon-button]:pr-4",o),...t,children:e});N.displayName="DialogHeader";var E=({size:o="md",type:e="button",label:t="Close Dialog",appearance:n="ghost",...s})=>i(m,{asChild:!0,children:i(y,{appearance:n,icon:i(I,{}),label:t,size:o,type:e,...s})}),b=({className:o,...e})=>i("div",{className:a("scrollbar text-body flex-1 overflow-y-auto p-6",o),...e});b.displayName="DialogBody";var h=({className:o,...e})=>i("div",{className:a("border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4",o),...e});h.displayName="DialogFooter";var R=r(({className:o,...e},t)=>i(g,{ref:t,className:a("text-strong truncate text-lg font-medium",o),...e}));R.displayName=g.displayName;var B=r(({className:o,...e},t)=>i(D,{ref:t,className:a("text-muted",o),...e}));B.displayName=D.displayName;export{O as Dialog,b as DialogBody,z as DialogClose,E as DialogCloseIconButton,x as DialogContent,B as DialogDescription,h as DialogFooter,N as DialogHeader,f as DialogOverlay,C as DialogPortal,R as DialogTitle,T as DialogTrigger};
1
+ import{a as P,b as v,c as u,d as m,e as p,f as d,g,h as D}from"./chunk-J4X3ODX7.js";import{g as c}from"./chunk-A7ZXYP6T.js";import"./chunk-273VK4KO.js";import"./chunk-D3XF6J5A.js";import{a as y}from"./chunk-YC6QXFZS.js";import"./chunk-4LSFAAZW.js";import"./chunk-RDMTCZPT.js";import"./chunk-72TJUKMV.js";import"./chunk-LBEYGDAN.js";import"./chunk-VJPVAY5J.js";import{a}from"./chunk-EW5CFGXT.js";import{X as I}from"@phosphor-icons/react/X";import{forwardRef as r}from"react";import{jsx as i,jsxs as W}from"react/jsx-runtime";var O=P,T=v,C=u,z=m,f=r(({className:o,...e},t)=>i(p,{ref:t,className:a("bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",o),...e}));f.displayName=p.displayName;var x=r(({children:o,className:e,onInteractOutside:t,onPointerDownOutside:n,...s},w)=>W(C,{children:[i(f,{}),i("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:i(d,{className:a("flex max-h-full w-full max-w-lg flex-1 flex-col","outline-none focus-within:outline-none","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95",e),onInteractOutside:l=>{c(l),t?.(l)},onPointerDownOutside:l=>{c(l),n?.(l)},ref:w,...s,children:o})})]}));x.displayName=d.displayName;var N=({className:o,children:e,...t})=>i("div",{className:a("border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4","has-[.icon-button]:pr-4",o),...t,children:e});N.displayName="DialogHeader";var E=({size:o="md",type:e="button",label:t="Close Dialog",appearance:n="ghost",...s})=>i(m,{asChild:!0,children:i(y,{appearance:n,icon:i(I,{}),label:t,size:o,type:e,...s})}),b=({className:o,...e})=>i("div",{className:a("scrollbar text-body flex-1 overflow-y-auto p-6",o),...e});b.displayName="DialogBody";var h=({className:o,...e})=>i("div",{className:a("border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4",o),...e});h.displayName="DialogFooter";var R=r(({className:o,...e},t)=>i(g,{ref:t,className:a("text-strong truncate text-lg font-medium",o),...e}));R.displayName=g.displayName;var B=r(({className:o,...e},t)=>i(D,{ref:t,className:a("text-muted",o),...e}));B.displayName=D.displayName;export{O as Dialog,b as DialogBody,z as DialogClose,E as DialogCloseIconButton,x as DialogContent,B as DialogDescription,h as DialogFooter,N as DialogHeader,f as DialogOverlay,C as DialogPortal,R as DialogTitle,T as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1,2 +1,2 @@
1
- import{b as l}from"./chunk-CXQLUXDJ.js";import{a}from"./chunk-EW5CFGXT.js";import{CaretRight as y}from"@phosphor-icons/react/CaretRight";import{Check as c}from"@phosphor-icons/react/Check";import*as e from"@radix-ui/react-dropdown-menu";import{forwardRef as d}from"react";import{jsx as n,jsxs as m}from"react/jsx-runtime";var C=e.Root,R=e.Trigger,I=e.Group,s=e.Portal,k=e.Sub,S=e.RadioGroup,w=d(({className:o,inset:t,children:r,...i},p)=>m(e.SubTrigger,{className:a("focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-base outline-none sm:text-sm","data-highlighted:bg-popover-hover data-state-open:bg-popover-hover","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",t&&"pl-8",o),ref:p,...i,children:[r,n("span",{className:"absolute right-2 flex items-center",children:n(y,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})]}));w.displayName="DropdownMenuSubTrigger";var f=d(({className:o,loop:t=!0,...r},i)=>n(s,{children:n(e.SubContent,{className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 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] overflow-hidden rounded-md border shadow-xl","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",o),loop:t,ref:i,...r})}));f.displayName="DropdownMenuSubContent";var g=d(({className:o,onClick:t,loop:r=!0,width:i,...p},x)=>n(s,{children:n(e.Content,{ref:x,className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none","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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",i==="trigger"&&"w-[var(--radix-dropdown-menu-trigger-width)]",o),loop:r,onClick:u=>{u.stopPropagation(),t?.(u)},...p})}));g.displayName="DropdownMenuContent";var v=d(({className:o,inset:t,...r},i)=>n(e.Item,{ref:i,className:a("focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-base font-normal outline-none transition-colors sm:text-sm","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",t&&"pl-8",o),...r}));v.displayName="DropdownMenuItem";var h=d(({className:o,children:t,checked:r,...i},p)=>m(e.CheckboxItem,{ref:p,className:a("text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-base font-normal outline-none sm:text-sm","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",o),checked:r,...i,children:[n("span",{className:"absolute right-2 flex items-center",children:n(e.ItemIndicator,{children:n(c,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})}),t]}));h.displayName="DropdownMenuCheckboxItem";var M=d(({className:o,children:t,...r},i)=>m(e.RadioItem,{className:a("text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-base font-normal outline-none sm:text-sm","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium","[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0",o),ref:i,...r,children:[n("span",{className:"absolute right-2 flex items-center",children:n(e.ItemIndicator,{children:n(c,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})}),t]}));M.displayName="DropdownMenuRadioItem";var D=d(({className:o,inset:t,...r},i)=>n(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...r}));D.displayName="DropdownMenuLabel";var b=d(({className:o,...t},r)=>n(l,{ref:r,className:a("-mx-1.25 my-1 w-auto",o),...t}));b.displayName="DropdownMenuSeparator";var P=({className:o,...t})=>n("span",{className:a("ml-auto text-xs tracking-widest opacity-60",o),...t});P.displayName="DropdownMenuShortcut";export{C as DropdownMenu,h as DropdownMenuCheckboxItem,g as DropdownMenuContent,I as DropdownMenuGroup,v as DropdownMenuItem,D as DropdownMenuLabel,s as DropdownMenuPortal,S as DropdownMenuRadioGroup,M as DropdownMenuRadioItem,b as DropdownMenuSeparator,P as DropdownMenuShortcut,k as DropdownMenuSub,f as DropdownMenuSubContent,w as DropdownMenuSubTrigger,R as DropdownMenuTrigger};
1
+ import{b as l}from"./chunk-CXQLUXDJ.js";import{a}from"./chunk-EW5CFGXT.js";import{CaretRight as y}from"@phosphor-icons/react/CaretRight";import{Check as c}from"@phosphor-icons/react/Check";import*as e from"@radix-ui/react-dropdown-menu";import{forwardRef as d}from"react";import{jsx as n,jsxs as m}from"react/jsx-runtime";var C=e.Root,R=e.Trigger,I=e.Group,s=e.Portal,k=e.Sub,S=e.RadioGroup,w=d(({className:o,inset:t,children:r,...i},p)=>m(e.SubTrigger,{className:a("focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-sm outline-none","data-highlighted:bg-popover-hover data-state-open:bg-popover-hover","[&>svg]:size-5 [&_svg]:shrink-0",t&&"pl-8",o),ref:p,...i,children:[r,n("span",{className:"absolute right-2 flex items-center",children:n(y,{className:"size-4 shrink-0",weight:"bold"})})]}));w.displayName="DropdownMenuSubTrigger";var f=d(({className:o,loop:t=!0,...r},i)=>n(s,{children:n(e.SubContent,{className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 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] overflow-hidden rounded-md border shadow-xl","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",o),loop:t,ref:i,...r})}));f.displayName="DropdownMenuSubContent";var g=d(({className:o,onClick:t,loop:r=!0,width:i,...p},x)=>n(s,{children:n(e.Content,{ref:x,className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none","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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",i==="trigger"&&"w-[var(--radix-dropdown-menu-trigger-width)]",o),loop:r,onClick:u=>{u.stopPropagation(),t?.(u)},...p})}));g.displayName="DropdownMenuContent";var h=d(({className:o,inset:t,...r},i)=>n(e.Item,{ref:i,className:a("focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm font-normal outline-none transition-colors","[&>svg]:size-5 [&_svg]:shrink-0",t&&"pl-8",o),...r}));h.displayName="DropdownMenuItem";var M=d(({className:o,children:t,checked:r,...i},p)=>m(e.CheckboxItem,{ref:p,className:a("text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium","[&>svg]:size-5 [&_svg]:shrink-0",o),checked:r,...i,children:[n("span",{className:"absolute right-2 flex items-center",children:n(e.ItemIndicator,{children:n(c,{className:"size-5 shrink-0 sm:size-4",weight:"bold"})})}),t]}));M.displayName="DropdownMenuCheckboxItem";var v=d(({className:o,children:t,...r},i)=>m(e.RadioItem,{className:a("text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium","[&>svg]:size-5 [&_svg]:shrink-0",o),ref:i,...r,children:[n("span",{className:"absolute right-2 flex items-center",children:n(e.ItemIndicator,{children:n(c,{className:"size-4 shrink-0",weight:"bold"})})}),t]}));v.displayName="DropdownMenuRadioItem";var D=d(({className:o,inset:t,...r},i)=>n(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",o),...r}));D.displayName="DropdownMenuLabel";var b=d(({className:o,...t},r)=>n(l,{ref:r,className:a("-mx-1.25 my-1 w-auto",o),...t}));b.displayName="DropdownMenuSeparator";var P=({className:o,...t})=>n("span",{className:a("ml-auto text-xs tracking-widest opacity-60",o),...t});P.displayName="DropdownMenuShortcut";export{C as DropdownMenu,M as DropdownMenuCheckboxItem,g as DropdownMenuContent,I as DropdownMenuGroup,h as DropdownMenuItem,D as DropdownMenuLabel,s as DropdownMenuPortal,S as DropdownMenuRadioGroup,v as DropdownMenuRadioItem,b as DropdownMenuSeparator,P as DropdownMenuShortcut,k as DropdownMenuSub,f as DropdownMenuSubContent,w as DropdownMenuSubTrigger,R as DropdownMenuTrigger};
2
2
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { CaretRight } from \"@phosphor-icons/react/CaretRight\";\nimport { Check } from \"@phosphor-icons/react/Check\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Separator } from \"../separator/separator.js\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-base outline-none sm:text-sm\",\n\t\t\t\"data-highlighted:bg-popover-hover data-state-open:bg-popover-hover\",\n\t\t\t\"[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<CaretRight className=\"size-5 shrink-0 sm:size-4\" weight=\"bold\" />\n\t\t</span>\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = \"DropdownMenuSubTrigger\";\n\nconst DropdownMenuSubContent = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.SubContent>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, loop = true, ...props }, ref) => (\n\t<DropdownMenuPortal>\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cx(\n\t\t\t\t\"scrollbar\",\n\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 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] overflow-hidden rounded-md border shadow-xl\",\n\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tloop={loop}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPortal>\n));\nDropdownMenuSubContent.displayName = \"DropdownMenuSubContent\";\n\ntype DropdownMenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {\n\t/**\n\t * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.\n\t */\n\twidth?: \"trigger\" | \"content\";\n};\n\nconst DropdownMenuContent = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Content>, DropdownMenuContentProps>(\n\t({ className, onClick, loop = true, width, ...props }, ref) => (\n\t\t<DropdownMenuPortal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"scrollbar\",\n\t\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none\",\n\t\t\t\t\t\"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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\t\twidth === \"trigger\" && \"w-[var(--radix-dropdown-menu-trigger-width)]\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tloop={loop}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\t/**\n\t\t\t\t\t * Prevent the click event from propagating up to parent/containing elements\n\t\t\t\t\t * of the DropdownMenu\n\t\t\t\t\t */\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPortal>\n\t),\n);\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nconst DropdownMenuItem = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.Item>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-base font-normal outline-none transition-colors sm:text-sm\",\n\t\t\t\"[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nconst DropdownMenuCheckboxItem = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-base font-normal outline-none sm:text-sm\",\n\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium\",\n\t\t\t\"[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"size-5 shrink-0 sm:size-4\" weight=\"bold\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\ntype DropdownMenuRadioItemProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & {\n\tname?: string;\n\tid?: string;\n};\n\nconst DropdownMenuRadioItem = forwardRef<ElementRef<\"input\">, DropdownMenuRadioItemProps>(\n\t({ className, children, ...props }, ref) => (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tclassName={cx(\n\t\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-base font-normal outline-none sm:text-sm\",\n\t\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium\",\n\t\t\t\t\"[&>svg]:size-6 [&>svg]:sm:size-5 [&_svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t\t<Check className=\"size-5 shrink-0 sm:size-4\" weight=\"bold\" />\n\t\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t),\n);\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nconst DropdownMenuLabel = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.Label>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cx(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nconst DropdownMenuSeparator = forwardRef<ElementRef<typeof Separator>, ComponentPropsWithoutRef<typeof Separator>>(\n\t({ className, ...props }, ref) => (\n\t\t<Separator ref={ref} className={cx(\"-mx-1.25 my-1 w-auto\", className)} {...props} />\n\t),\n);\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn <span className={cx(\"ml-auto text-xs tracking-widest opacity-60\", className)} {...props} />;\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\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E,UAAAC,EAAW,GAAGG,CAAM,EAAGC,IACzBd,EAAC8B,EAAA,CAAU,IAAKhB,EAAK,UAAWC,EAAG,uBAAwBL,CAAS,EAAI,GAAGG,EAAO,CAEpF,EACAgB,EAAsB,YAAc,wBAEpC,IAAME,EAAuB,CAAC,CAAE,UAAArB,EAAW,GAAGG,CAAM,IAC5Cb,EAAC,QAAK,UAAWe,EAAG,6CAA8CL,CAAS,EAAI,GAAGG,EAAO,EAEjGkB,EAAqB,YAAc","names":["CaretRight","Check","DropdownMenuPrimitive","forwardRef","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","cx","CaretRight","DropdownMenuSubContent","loop","DropdownMenuContent","onClick","width","event","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","Separator","DropdownMenuShortcut"]}
1
+ {"version":3,"sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { CaretRight } from \"@phosphor-icons/react/CaretRight\";\nimport { Check } from \"@phosphor-icons/react/Check\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport type { ComponentPropsWithoutRef, ElementRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Separator } from \"../separator/separator.js\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-sm outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-state-open:bg-popover-hover\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<CaretRight className=\"size-4 shrink-0\" weight=\"bold\" />\n\t\t</span>\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = \"DropdownMenuSubTrigger\";\n\nconst DropdownMenuSubContent = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.SubContent>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, loop = true, ...props }, ref) => (\n\t<DropdownMenuPortal>\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cx(\n\t\t\t\t\"scrollbar\",\n\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 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] overflow-hidden rounded-md border shadow-xl\",\n\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tloop={loop}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPortal>\n));\nDropdownMenuSubContent.displayName = \"DropdownMenuSubContent\";\n\ntype DropdownMenuContentProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {\n\t/**\n\t * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.\n\t */\n\twidth?: \"trigger\" | \"content\";\n};\n\nconst DropdownMenuContent = forwardRef<ElementRef<typeof DropdownMenuPrimitive.Content>, DropdownMenuContentProps>(\n\t({ className, onClick, loop = true, width, ...props }, ref) => (\n\t\t<DropdownMenuPortal>\n\t\t\t<DropdownMenuPrimitive.Content\n\t\t\t\tref={ref}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"scrollbar\",\n\t\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none\",\n\t\t\t\t\t\"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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95\",\n\t\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\t\twidth === \"trigger\" && \"w-[var(--radix-dropdown-menu-trigger-width)]\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tloop={loop}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\t/**\n\t\t\t\t\t * Prevent the click event from propagating up to parent/containing elements\n\t\t\t\t\t * of the DropdownMenu\n\t\t\t\t\t */\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tonClick?.(event);\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</DropdownMenuPortal>\n\t),\n);\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nconst DropdownMenuItem = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.Item>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm font-normal outline-none transition-colors\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nconst DropdownMenuCheckboxItem = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Check className=\"size-5 shrink-0 sm:size-4\" weight=\"bold\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\ntype DropdownMenuRadioItemProps = ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & {\n\tname?: string;\n\tid?: string;\n};\n\nconst DropdownMenuRadioItem = forwardRef<ElementRef<\"input\">, DropdownMenuRadioItemProps>(\n\t({ className, children, ...props }, ref) => (\n\t\t<DropdownMenuPrimitive.RadioItem\n\t\t\tclassName={cx(\n\t\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none\",\n\t\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium\",\n\t\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t\t<Check className=\"size-4 shrink-0\" weight=\"bold\" />\n\t\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</DropdownMenuPrimitive.RadioItem>\n\t),\n);\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nconst DropdownMenuLabel = forwardRef<\n\tElementRef<typeof DropdownMenuPrimitive.Label>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cx(\"px-2 py-1.5 text-sm font-semibold\", inset && \"pl-8\", className)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nconst DropdownMenuSeparator = forwardRef<ElementRef<typeof Separator>, ComponentPropsWithoutRef<typeof Separator>>(\n\t({ className, ...props }, ref) => (\n\t\t<Separator ref={ref} className={cx(\"-mx-1.25 my-1 w-auto\", className)} {...props} />\n\t),\n);\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn <span className={cx(\"ml-auto text-xs tracking-widest opacity-60\", className)} {...props} />;\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n"],"mappings":"2EAAA,OAAS,cAAAA,MAAkB,mCAC3B,OAAS,SAAAC,MAAa,8BACtB,UAAYC,MAA2B,gCAEvC,OAAS,cAAAC,MAAkB,QAsB1B,OAaE,OAAAC,EAbF,QAAAC,MAAA,oBAlBD,IAAMC,EAAqC,OAErCC,EAA4C,UAE5CC,EAA0C,QAE1CC,EAA2C,SAE3CC,EAAwC,MAExCC,EAA+C,aAE/CC,EAAyBC,EAK7B,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,SAAAC,EAAU,GAAGC,CAAM,EAAGC,IAC5Cb,EAAuB,aAAtB,CACA,UAAWc,EACV,gJACA,qEACA,kCACAJ,GAAS,OACTD,CACD,EACA,IAAKI,EACJ,GAAGD,EAEH,UAAAD,EACDZ,EAAC,QAAK,UAAU,qCACf,SAAAA,EAACgB,EAAA,CAAW,UAAU,kBAAkB,OAAO,OAAO,EACvD,GACD,CACA,EACDR,EAAuB,YAAc,y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,EAAwBlB,EAC7B,CAAC,CAAE,UAAAC,EAAW,SAAAE,EAAU,GAAGC,CAAM,EAAGC,IACnCb,EAAuB,YAAtB,CACA,UAAWc,EACV,+LACA,2EACA,sFACA,kCACAL,CACD,EACA,IAAKI,EACJ,GAAGD,EAEJ,UAAAb,EAAC,QAAK,UAAU,qCACf,SAAAA,EAAuB,gBAAtB,CACA,SAAAA,EAAC0B,EAAA,CAAM,UAAU,kBAAkB,OAAO,OAAO,EAClD,EACD,EACCd,GACF,CAEF,EACAe,EAAsB,YAAc,wBAEpC,IAAMC,EAAoBnB,EAKxB,CAAC,CAAE,UAAAC,EAAW,MAAAC,EAAO,GAAGE,CAAM,EAAGC,IAClCd,EAAuB,QAAtB,CACA,IAAKc,EACL,UAAWC,EAAG,oCAAqCJ,GAAS,OAAQD,CAAS,EAC5E,GAAGG,EACL,CACA,EACDe,EAAkB,YAAc,oBAEhC,IAAMC,EAAwBpB,EAC7B,CAAC,CAAE,UAAAC,EAAW,GAAGG,CAAM,EAAGC,IACzBd,EAAC8B,EAAA,CAAU,IAAKhB,EAAK,UAAWC,EAAG,uBAAwBL,CAAS,EAAI,GAAGG,EAAO,CAEpF,EACAgB,EAAsB,YAAc,wBAEpC,IAAME,EAAuB,CAAC,CAAE,UAAArB,EAAW,GAAGG,CAAM,IAC5Cb,EAAC,QAAK,UAAWe,EAAG,6CAA8CL,CAAS,EAAI,GAAGG,EAAO,EAEjGkB,EAAqB,YAAc","names":["CaretRight","Check","DropdownMenuPrimitive","forwardRef","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","cx","CaretRight","DropdownMenuSubContent","loop","DropdownMenuContent","onClick","width","event","DropdownMenuItem","DropdownMenuCheckboxItem","checked","Check","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","Separator","DropdownMenuShortcut"]}
package/dist/icon.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-72TJUKMV.js";import{a as b}from"./chunk-SMCZZUU4.js";import{a}from"./chunk-VJPVAY5J.js";import"./chunk-EW5CFGXT.js";export{b as Icon,a as SvgOnly};
1
+ import"./chunk-72TJUKMV.js";import{a as b}from"./chunk-LBEYGDAN.js";import{a}from"./chunk-VJPVAY5J.js";import"./chunk-EW5CFGXT.js";export{b as Icon,a as SvgOnly};
2
2
  //# sourceMappingURL=icon.js.map