@ngrok/mantle 0.28.0 → 0.28.1

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 (56) hide show
  1. package/dist/accordion.d.ts +1 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/alert-dialog.js +1 -1
  5. package/dist/alert-dialog.js.map +1 -1
  6. package/dist/alert.js +1 -1
  7. package/dist/alert.js.map +1 -1
  8. package/dist/anchor.js +1 -1
  9. package/dist/button.js +1 -1
  10. package/dist/calendar.js +1 -1
  11. package/dist/calendar.js.map +1 -1
  12. package/dist/chunk-BF3GF5YV.js +2 -0
  13. package/dist/chunk-BF3GF5YV.js.map +1 -0
  14. package/dist/chunk-IXWMMIAF.js +2 -0
  15. package/dist/chunk-IXWMMIAF.js.map +1 -0
  16. package/dist/{chunk-XQVVOOLT.js → chunk-QG5E42M3.js} +1 -1
  17. package/dist/chunk-QG5E42M3.js.map +1 -0
  18. package/dist/chunk-WFZS67BK.js +2 -0
  19. package/dist/chunk-WFZS67BK.js.map +1 -0
  20. package/dist/chunk-XUVIKTZN.js +2 -0
  21. package/dist/chunk-XUVIKTZN.js.map +1 -0
  22. package/dist/chunk-ZUSFDCTA.js +2 -0
  23. package/dist/chunk-ZUSFDCTA.js.map +1 -0
  24. package/dist/code-block.js +1 -1
  25. package/dist/code-block.js.map +1 -1
  26. package/dist/data-table.js +1 -1
  27. package/dist/dialog.js +1 -1
  28. package/dist/dialog.js.map +1 -1
  29. package/dist/dropdown-menu.js +1 -1
  30. package/dist/dropdown-menu.js.map +1 -1
  31. package/dist/{icon-Cu-iYUjr.d.ts → icon-DNrAWl1c.d.ts} +1 -1
  32. package/dist/icon.d.ts +1 -1
  33. package/dist/icon.js +1 -1
  34. package/dist/icons.js +1 -1
  35. package/dist/input.js +1 -1
  36. package/dist/input.js.map +1 -1
  37. package/dist/pagination.js +1 -1
  38. package/dist/pagination.js.map +1 -1
  39. package/dist/select.js +1 -1
  40. package/dist/sheet.js +1 -1
  41. package/dist/sheet.js.map +1 -1
  42. package/dist/tailwind-preset.js +1 -1
  43. package/dist/tailwind-preset.js.map +1 -1
  44. package/dist/toast.js +1 -1
  45. package/package.json +4 -4
  46. package/dist/chunk-2PHWBRBD.js +0 -2
  47. package/dist/chunk-2PHWBRBD.js.map +0 -1
  48. package/dist/chunk-3DXMGSDU.js +0 -2
  49. package/dist/chunk-3DXMGSDU.js.map +0 -1
  50. package/dist/chunk-BK4P33ZH.js +0 -2
  51. package/dist/chunk-BK4P33ZH.js.map +0 -1
  52. package/dist/chunk-VTCWSFFJ.js +0 -2
  53. package/dist/chunk-VTCWSFFJ.js.map +0 -1
  54. package/dist/chunk-WVHMNFQD.js +0 -2
  55. package/dist/chunk-WVHMNFQD.js.map +0 -1
  56. package/dist/chunk-XQVVOOLT.js.map +0 -1
package/dist/input.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as R}from"./chunk-ERBZR6SY.js";import{a as x}from"./chunk-MF2QITTY.js";import{a as d}from"./chunk-XQVVOOLT.js";import"./chunk-HDPLH5HC.js";import{a as b}from"./chunk-AZ56JGNY.js";import{CheckCircleIcon as H}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as L}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as E}from"@phosphor-icons/react/WarningDiamond";import W from"clsx";import{createContext as A,forwardRef as g,useContext as N,useRef as V}from"react";import{jsx as t,jsxs as T}from"react/jsx-runtime";var m=g(({children:e,className:n,...r},a)=>{let o=!!e,i=V(null);return o?t(C,{className:n,forwardedRef:a,innerRef:i,...r,children:e}):t(C,{...r,className:n,forwardedRef:a,innerRef:i,children:t(f,{...r})})});m.displayName="Input";var f=g(({"aria-invalid":e,className:n,validation:r,...a},o)=>{let{"aria-invalid":i,forwardedRef:s,innerRef:c,validation:I,...u}=N(P),p=I??r,w=(typeof p=="function"?p():p)||void 0,l=i??e??p==="error",v={...u,...a,type:a.type??u.type??"text"};return t("input",{"aria-invalid":l,"data-validation":w,className:b("placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] focus:outline-none",n),ref:x(o,s,c),...v})});f.displayName="InputCapture";var P=A({validation:void 0,innerRef:{current:null}}),C=({"aria-invalid":e,"aria-disabled":n,children:r,className:a,disabled:o,forwardedRef:i,innerRef:s,style:c,type:I,validation:u,...p})=>{let l=e!=null&&e!=="false"?"error":typeof u=="function"?u():u,v=e??l==="error";return t(P.Provider,{value:{"aria-invalid":e,"aria-disabled":n,disabled:o,type:I,validation:l,...p,forwardedRef:i,innerRef:s},children:T("div",{"aria-invalid":v,"aria-disabled":o??n,"data-validation":l||void 0,className:b("pointer-coarse:text-base h-9 text-sm","bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-none focus-within:ring-4 focus-visible:outline-none focus-visible:ring-4","aria-disabled:opacity-50","has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5","border-form text-strong has-[:focus-visible]:border-accent-600 has-[:focus-visible]:ring-focus-accent","data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:ring-focus-success","data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:ring-focus-warning","data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:ring-focus-danger","autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] has-[:autofill]:bg-blue-50 has-[:autofill]:[-webkit-text-fill-color:hsl(var(--text-strong))]",a),onClick:()=>{s?.current?.focus()},onKeyDown:()=>{s?.current!==document.activeElement&&s?.current?.focus()},style:c,children:[r,t(O,{name:p.name,validation:l})]})})};var O=({name:e,validation:n})=>{switch(n){case"error":return T("div",{className:"text-danger-600 pointer-events-none order-last select-none",children:[t("span",{className:"sr-only",children:W("The value entered for the",e,"input has failed validation.")}),t(d,{svg:t(L,{"aria-hidden":!0,weight:"fill"})})]});case"success":return t("div",{className:"text-success-600 pointer-events-none order-last select-none",children:t(d,{svg:t(H,{weight:"fill"})})});case"warning":return t("div",{className:"text-warning-600 pointer-events-none order-last select-none",children:t(d,{svg:t(E,{weight:"fill"})})});default:return null}};import{EyeIcon as j}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as k}from"@phosphor-icons/react/EyeClosed";import{forwardRef as B,useEffect as F,useState as _}from"react";import{jsx as h,jsxs as y}from"react/jsx-runtime";var M=B(({onValueVisibilityChange:e,showValue:n=!1,...r},a)=>{let[o,i]=_(n),s=o?"text":"password",c=o?j:k;return F(()=>{i(n)},[n]),y(m,{type:s,ref:a,...r,children:[h(f,{}),y("button",{type:"button",tabIndex:-1,className:"text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0",onClick:()=>{i(!o),e?.(!o)},children:[y("span",{className:"sr-only",children:["Turn password visibility ",o?"off":"on"]}),h(d,{svg:h(c,{"aria-hidden":!0})})]})]})});M.displayName="PasswordInput";export{m as Input,f as InputCapture,M as PasswordInput,R as isInput};
1
+ import{a as R}from"./chunk-ERBZR6SY.js";import{a as x}from"./chunk-MF2QITTY.js";import{a as d}from"./chunk-QG5E42M3.js";import"./chunk-HDPLH5HC.js";import{a as h}from"./chunk-AZ56JGNY.js";import{CheckCircle as E}from"@phosphor-icons/react/CheckCircle";import{Warning as H}from"@phosphor-icons/react/Warning";import{WarningDiamond as L}from"@phosphor-icons/react/WarningDiamond";import W from"clsx";import{createContext as A,forwardRef as g,useContext as N,useRef as V}from"react";import{jsx as t,jsxs as T}from"react/jsx-runtime";var m=g(({children:e,className:n,...r},a)=>{let o=!!e,i=V(null);return o?t(C,{className:n,forwardedRef:a,innerRef:i,...r,children:e}):t(C,{...r,className:n,forwardedRef:a,innerRef:i,children:t(f,{...r})})});m.displayName="Input";var f=g(({"aria-invalid":e,className:n,validation:r,...a},o)=>{let{"aria-invalid":i,forwardedRef:s,innerRef:c,validation:I,...l}=N(P),p=I??r,w=(typeof p=="function"?p():p)||void 0,u=i??e??p==="error",v={...l,...a,type:a.type??l.type??"text"};return t("input",{"aria-invalid":u,"data-validation":w,className:h("placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] focus:outline-none",n),ref:x(o,s,c),...v})});f.displayName="InputCapture";var P=A({validation:void 0,innerRef:{current:null}}),C=({"aria-invalid":e,"aria-disabled":n,children:r,className:a,disabled:o,forwardedRef:i,innerRef:s,style:c,type:I,validation:l,...p})=>{let u=e!=null&&e!=="false"?"error":typeof l=="function"?l():l,v=e??u==="error";return t(P.Provider,{value:{"aria-invalid":e,"aria-disabled":n,disabled:o,type:I,validation:u,...p,forwardedRef:i,innerRef:s},children:T("div",{"aria-invalid":v,"aria-disabled":o??n,"data-validation":u||void 0,className:h("pointer-coarse:text-base h-9 text-sm","bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-none focus-within:ring-4 focus-visible:outline-none focus-visible:ring-4","aria-disabled:opacity-50","has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5","border-form text-strong has-[:focus-visible]:border-accent-600 has-[:focus-visible]:ring-focus-accent","data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:ring-focus-success","data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:ring-focus-warning","data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:ring-focus-danger","autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] has-[:autofill]:bg-blue-50 has-[:autofill]:[-webkit-text-fill-color:hsl(var(--text-strong))]",a),onClick:()=>{s?.current?.focus()},onKeyDown:()=>{s?.current!==document.activeElement&&s?.current?.focus()},style:c,children:[r,t(k,{name:p.name,validation:u})]})})};var k=({name:e,validation:n})=>{switch(n){case"error":return T("div",{className:"text-danger-600 pointer-events-none order-last select-none",children:[t("span",{className:"sr-only",children:W("The value entered for the",e,"input has failed validation.")}),t(d,{svg:t(H,{"aria-hidden":!0,weight:"fill"})})]});case"success":return t("div",{className:"text-success-600 pointer-events-none order-last select-none",children:t(d,{svg:t(E,{weight:"fill"})})});case"warning":return t("div",{className:"text-warning-600 pointer-events-none order-last select-none",children:t(d,{svg:t(L,{weight:"fill"})})});default:return null}};import{Eye as O}from"@phosphor-icons/react/Eye";import{EyeClosed as j}from"@phosphor-icons/react/EyeClosed";import{forwardRef as B,useEffect as F,useState as _}from"react";import{jsx as y,jsxs as b}from"react/jsx-runtime";var M=B(({onValueVisibilityChange:e,showValue:n=!1,...r},a)=>{let[o,i]=_(n),s=o?"text":"password",c=o?O:j;return F(()=>{i(n)},[n]),b(m,{type:s,ref:a,...r,children:[y(f,{}),b("button",{type:"button",tabIndex:-1,className:"text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0",onClick:()=>{i(!o),e?.(!o)},children:[b("span",{className:"sr-only",children:["Turn password visibility ",o?"off":"on"]}),y(d,{svg:y(c,{"aria-hidden":!0})})]})]})});M.displayName="PasswordInput";export{m as Input,f as InputCapture,M as PasswordInput,R as isInput};
2
2
  //# sourceMappingURL=input.js.map
package/dist/input.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/input/input.tsx","../src/components/input/password-input.tsx"],"sourcesContent":["import { CheckCircleIcon } from \"@phosphor-icons/react/CheckCircle\";\nimport { WarningIcon } from \"@phosphor-icons/react/Warning\";\nimport { WarningDiamondIcon } from \"@phosphor-icons/react/WarningDiamond\";\nimport clsx from \"clsx\";\nimport type {\n\tComponentRef,\n\tForwardedRef,\n\tInputHTMLAttributes,\n\tMutableRefObject,\n\tPropsWithChildren,\n} from \"react\";\nimport { createContext, forwardRef, useContext, useRef } from \"react\";\nimport { composeRefs } from \"../../utils/compose-refs/compose-refs.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/icon.js\";\nimport type {\n\tValidation,\n\tWithAutoComplete,\n\tWithInputType,\n\tWithValidation,\n} from \"./types.js\";\n\ntype BaseProps = WithAutoComplete & WithInputType & WithValidation;\n\n/**\n * The props for the `Input` component.\n */\ntype InputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tBaseProps &\n\tPropsWithChildren;\n\n/**\n * Used to create interactive controls for web-based forms in order to accept data from the user\n */\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n\t({ children, className, ...props }, forwardedRef) => {\n\t\tconst hasChildren = Boolean(children);\n\t\tconst innerRef = useRef<ComponentRef<\"input\">>(null);\n\n\t\tif (hasChildren) {\n\t\t\treturn (\n\t\t\t\t<InputContainer\n\t\t\t\t\tclassName={className}\n\t\t\t\t\tforwardedRef={forwardedRef}\n\t\t\t\t\tinnerRef={innerRef}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</InputContainer>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<InputContainer\n\t\t\t\t{...props}\n\t\t\t\tclassName={className}\n\t\t\t\tforwardedRef={forwardedRef}\n\t\t\t\tinnerRef={innerRef}\n\t\t\t>\n\t\t\t\t<InputCapture {...props} />\n\t\t\t</InputContainer>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\ntype InputCaptureProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tBaseProps;\n\n/**\n * The actual <input /> element that captures user input.\n */\nconst InputCapture = forwardRef<HTMLInputElement, InputCaptureProps>(\n\t(\n\t\t{\n\t\t\t\"aria-invalid\": _ariaInvalid,\n\t\t\tclassName,\n\t\t\tvalidation: _validation,\n\t\t\t...restProps\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst {\n\t\t\t\"aria-invalid\": ctxAriaInvalid,\n\t\t\tforwardedRef: ctxForwardedRef,\n\t\t\tinnerRef: ctxInnerRef,\n\t\t\tvalidation: ctxValidation,\n\t\t\t...ctx\n\t\t} = useContext(InputContext);\n\n\t\tconst validation = ctxValidation ?? _validation;\n\t\tconst validationValue =\n\t\t\t(typeof validation === \"function\" ? validation() : validation) ||\n\t\t\tundefined;\n\t\tconst ariaInvalid =\n\t\t\tctxAriaInvalid ?? _ariaInvalid ?? validation === \"error\";\n\t\tconst props = {\n\t\t\t...ctx,\n\t\t\t...restProps,\n\t\t\ttype: restProps.type ?? ctx.type ?? \"text\",\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\tdata-validation={validationValue}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] focus:outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={composeRefs(ref, ctxForwardedRef, ctxInnerRef)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInputCapture.displayName = \"InputCapture\";\n\ntype InputContextType = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tBaseProps & {\n\t\t/**\n\t\t * inner ref for the input element, controlled by `Input`\n\t\t */\n\t\tinnerRef: MutableRefObject<HTMLInputElement | null>;\n\t\t/**\n\t\t * forwarded ref to the input element, forwarded from `Input` to `InputCapture`\n\t\t */\n\t\tforwardedRef?: ForwardedRef<HTMLInputElement>;\n\t};\n\nconst InputContext = createContext<InputContextType>({\n\tvalidation: undefined,\n\tinnerRef: { current: null },\n});\n\ntype InputContainerProps = InputHTMLAttributes<HTMLInputElement> &\n\tBaseProps & {\n\t\t/**\n\t\t * @private inner ref for the input element, controlled by `Input`\n\t\t */\n\t\tinnerRef: MutableRefObject<HTMLInputElement | null>;\n\t\t/**\n\t\t * @private ref to the input element, forwarded from `Input` to `InputCapture`\n\t\t */\n\t\tforwardedRef: ForwardedRef<HTMLInputElement>;\n\t};\n\n/**\n * The container for the input element.\n */\nconst InputContainer = ({\n\t\"aria-invalid\": _ariaInvalid,\n\t\"aria-disabled\": _ariaDisabled,\n\tchildren,\n\tclassName,\n\tdisabled,\n\tforwardedRef,\n\tinnerRef,\n\tstyle,\n\ttype,\n\tvalidation: _validation,\n\t...props\n}: InputContainerProps) => {\n\tconst isInvalid = _ariaInvalid != null && _ariaInvalid !== \"false\";\n\tconst validation = isInvalid\n\t\t? \"error\"\n\t\t: typeof _validation === \"function\"\n\t\t\t? _validation()\n\t\t\t: _validation;\n\tconst ariaInvalid = _ariaInvalid ?? validation === \"error\";\n\n\treturn (\n\t\t<InputContext.Provider\n\t\t\tvalue={{\n\t\t\t\t\"aria-invalid\": _ariaInvalid,\n\t\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\t\tdisabled,\n\t\t\t\ttype,\n\t\t\t\tvalidation,\n\t\t\t\t...props,\n\t\t\t\tforwardedRef,\n\t\t\t\tinnerRef,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\taria-disabled={disabled ?? _ariaDisabled}\n\t\t\t\tdata-validation={validation || undefined}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"pointer-coarse:text-base h-9 text-sm\",\n\t\t\t\t\t\"bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-none focus-within:ring-4 focus-visible:outline-none focus-visible:ring-4\",\n\t\t\t\t\t\"aria-disabled:opacity-50\",\n\t\t\t\t\t\"has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5\",\n\t\t\t\t\t\"border-form text-strong has-[:focus-visible]:border-accent-600 has-[:focus-visible]:ring-focus-accent\",\n\t\t\t\t\t\"data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:ring-focus-success\",\n\t\t\t\t\t\"data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:ring-focus-warning\",\n\t\t\t\t\t\"data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:ring-focus-danger\",\n\t\t\t\t\t\"autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] has-[:autofill]:bg-blue-50 has-[:autofill]:[-webkit-text-fill-color:hsl(var(--text-strong))]\", // Autofill styling on the input itself and any children with autofill styling\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tinnerRef?.current?.focus();\n\t\t\t\t}}\n\t\t\t\tonKeyDown={() => {\n\t\t\t\t\tif (innerRef?.current !== document.activeElement) {\n\t\t\t\t\t\tinnerRef?.current?.focus();\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tstyle={style}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t<ValidationFeedback name={props.name} validation={validation} />\n\t\t\t</div>\n\t\t</InputContext.Provider>\n\t);\n};\n\nexport { Input, InputCapture };\nexport type { InputProps, InputCaptureProps };\n\nconst ValidationFeedback = ({\n\tname,\n\tvalidation,\n}: { name?: string; validation: Validation | undefined }) => {\n\tswitch (validation) {\n\t\tcase \"error\":\n\t\t\treturn (\n\t\t\t\t<div className=\"text-danger-600 pointer-events-none order-last select-none\">\n\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\t{clsx(\n\t\t\t\t\t\t\t\"The value entered for the\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\"input has failed validation.\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon svg={<WarningIcon aria-hidden weight=\"fill\" />} />\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase \"success\":\n\t\t\treturn (\n\t\t\t\t<div className=\"text-success-600 pointer-events-none order-last select-none\">\n\t\t\t\t\t<Icon svg={<CheckCircleIcon weight=\"fill\" />} />\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase \"warning\":\n\t\t\treturn (\n\t\t\t\t<div className=\"text-warning-600 pointer-events-none order-last select-none\">\n\t\t\t\t\t<Icon svg={<WarningDiamondIcon weight=\"fill\" />} />\n\t\t\t\t</div>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { EyeIcon } from \"@phosphor-icons/react/Eye\";\nimport { EyeClosedIcon } from \"@phosphor-icons/react/EyeClosed\";\nimport { forwardRef, useEffect, useState } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { Icon } from \"../icon/icon.js\";\nimport { Input, InputCapture } from \"./input.js\";\nimport type { InputType, WithAutoComplete, WithValidation } from \"./types.js\";\n\ntype PasswordInputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tWithValidation &\n\tWithAutoComplete & {\n\t\t/**\n\t\t * Callback for when the visibility of the password value changes.\n\t\t */\n\t\tonValueVisibilityChange?: (visible: boolean) => void;\n\t\t/**\n\t\t * Show/hide the password value as a controlled state.\n\t\t * @default false\n\t\t */\n\t\tshowValue?: boolean;\n\t};\n\ntype PasswordInputType = Extract<InputType, \"text\" | \"password\">;\n\nconst PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n\t({ onValueVisibilityChange, showValue = false, ...props }, ref) => {\n\t\tconst [showPassword, setShowPassword] = useState<boolean>(showValue);\n\t\tconst type: PasswordInputType = showPassword ? \"text\" : \"password\";\n\t\tconst EyeCon = showPassword ? EyeIcon : EyeClosedIcon;\n\n\t\tuseEffect(() => {\n\t\t\tsetShowPassword(showValue);\n\t\t}, [showValue]);\n\n\t\treturn (\n\t\t\t<Input type={type} ref={ref} {...props}>\n\t\t\t\t<InputCapture />\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\tclassName=\"text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetShowPassword(!showPassword);\n\t\t\t\t\t\tonValueVisibilityChange?.(!showPassword);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\tTurn password visibility {showPassword ? \"off\" : \"on\"}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon svg={<EyeCon aria-hidden />} />\n\t\t\t\t</button>\n\t\t\t</Input>\n\t\t);\n\t},\n);\nPasswordInput.displayName = \"PasswordInput\";\n\nexport { PasswordInput };\nexport type { PasswordInputProps };\n"],"mappings":"4LAAA,OAAS,mBAAAA,MAAuB,oCAChC,OAAS,eAAAC,MAAmB,gCAC5B,OAAS,sBAAAC,MAA0B,uCACnC,OAAOC,MAAU,OAQjB,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,EAAY,UAAAC,MAAc,QAiC1D,cAAAC,EAqJD,QAAAC,MArJC,oBAPJ,IAAMC,EAAQC,EACb,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAAiB,CACpD,IAAMC,EAAc,EAAQJ,EACtBK,EAAWC,EAA8B,IAAI,EAEnD,OAAIF,EAEFR,EAACW,EAAA,CACA,UAAWN,EACX,aAAcE,EACd,SAAUE,EACT,GAAGH,EAEH,SAAAF,EACF,EAKDJ,EAACW,EAAA,CACC,GAAGL,EACJ,UAAWD,EACX,aAAcE,EACd,SAAUE,EAEV,SAAAT,EAACY,EAAA,CAAc,GAAGN,EAAO,EAC1B,CAEF,C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AM,CACfN,EAAgBJ,CAAS,CAC1B,EAAG,CAACA,CAAS,CAAC,EAGbJ,EAACe,EAAA,CAAM,KAAML,EAAM,IAAKJ,EAAM,GAAGD,EAChC,UAAAN,EAACiB,EAAA,EAAa,EACdhB,EAAC,UACA,KAAK,SACL,SAAU,GACV,UAAU,iEACV,QAAS,IAAM,CACdQ,EAAgB,CAACD,CAAY,EAC7BJ,IAA0B,CAACI,CAAY,CACxC,EAEA,UAAAP,EAAC,QAAK,UAAU,UAAU,sCACCO,EAAe,MAAQ,MAClD,EACAR,EAACkB,EAAA,CAAK,IAAKlB,EAACY,EAAA,CAAO,cAAW,GAAC,EAAI,GACpC,GACD,CAEF,CACD,EACAV,EAAc,YAAc","names":["CheckCircleIcon","WarningIcon","WarningDiamondIcon","clsx","createContext","forwardRef","useContext","useRef","jsx","jsxs","Input","forwardRef","children","className","props","forwardedRef","hasChildren","innerRef","useRef","InputContainer","InputCapture","_ariaInvalid","_validation","restProps","ref","ctxAriaInvalid","ctxForwardedRef","ctxInnerRef","ctxValidation","ctx","useContext","InputContext","validation","validationValue","ariaInvalid","cx","composeRefs","createContext","_ariaDisabled","disabled","style","type","ValidationFeedback","ValidationFeedback","name","validation","jsxs","jsx","clsx","Icon","WarningIcon","CheckCircleIcon","WarningDiamondIcon","EyeIcon","EyeClosedIcon","forwardRef","useEffect","useState","jsx","jsxs","PasswordInput","forwardRef","onValueVisibilityChange","showValue","props","ref","showPassword","setShowPassword","useState","type","EyeCon","EyeIcon","EyeClosedIcon","useEffect","Input","InputCapture","Icon"]}
1
+ {"version":3,"sources":["../src/components/input/input.tsx","../src/components/input/password-input.tsx"],"sourcesContent":["import { CheckCircle as CheckCircleIcon } from \"@phosphor-icons/react/CheckCircle\";\nimport { Warning as WarningIcon } from \"@phosphor-icons/react/Warning\";\nimport { WarningDiamond as WarningDiamondIcon } from \"@phosphor-icons/react/WarningDiamond\";\nimport clsx from \"clsx\";\nimport type {\n\tComponentRef,\n\tForwardedRef,\n\tInputHTMLAttributes,\n\tMutableRefObject,\n\tPropsWithChildren,\n} from \"react\";\nimport { createContext, forwardRef, useContext, useRef } from \"react\";\nimport { composeRefs } from \"../../utils/compose-refs/compose-refs.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/icon.js\";\nimport type {\n\tValidation,\n\tWithAutoComplete,\n\tWithInputType,\n\tWithValidation,\n} from \"./types.js\";\n\ntype BaseProps = WithAutoComplete & WithInputType & WithValidation;\n\n/**\n * The props for the `Input` component.\n */\ntype InputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tBaseProps &\n\tPropsWithChildren;\n\n/**\n * Used to create interactive controls for web-based forms in order to accept data from the user\n */\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n\t({ children, className, ...props }, forwardedRef) => {\n\t\tconst hasChildren = Boolean(children);\n\t\tconst innerRef = useRef<ComponentRef<\"input\">>(null);\n\n\t\tif (hasChildren) {\n\t\t\treturn (\n\t\t\t\t<InputContainer\n\t\t\t\t\tclassName={className}\n\t\t\t\t\tforwardedRef={forwardedRef}\n\t\t\t\t\tinnerRef={innerRef}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</InputContainer>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<InputContainer\n\t\t\t\t{...props}\n\t\t\t\tclassName={className}\n\t\t\t\tforwardedRef={forwardedRef}\n\t\t\t\tinnerRef={innerRef}\n\t\t\t>\n\t\t\t\t<InputCapture {...props} />\n\t\t\t</InputContainer>\n\t\t);\n\t},\n);\nInput.displayName = \"Input\";\n\ntype InputCaptureProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tBaseProps;\n\n/**\n * The actual <input /> element that captures user input.\n */\nconst InputCapture = forwardRef<HTMLInputElement, InputCaptureProps>(\n\t(\n\t\t{\n\t\t\t\"aria-invalid\": _ariaInvalid,\n\t\t\tclassName,\n\t\t\tvalidation: _validation,\n\t\t\t...restProps\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst {\n\t\t\t\"aria-invalid\": ctxAriaInvalid,\n\t\t\tforwardedRef: ctxForwardedRef,\n\t\t\tinnerRef: ctxInnerRef,\n\t\t\tvalidation: ctxValidation,\n\t\t\t...ctx\n\t\t} = useContext(InputContext);\n\n\t\tconst validation = ctxValidation ?? _validation;\n\t\tconst validationValue =\n\t\t\t(typeof validation === \"function\" ? validation() : validation) ||\n\t\t\tundefined;\n\t\tconst ariaInvalid =\n\t\t\tctxAriaInvalid ?? _ariaInvalid ?? validation === \"error\";\n\t\tconst props = {\n\t\t\t...ctx,\n\t\t\t...restProps,\n\t\t\ttype: restProps.type ?? ctx.type ?? \"text\",\n\t\t};\n\n\t\treturn (\n\t\t\t<input\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\tdata-validation={validationValue}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] focus:outline-none\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={composeRefs(ref, ctxForwardedRef, ctxInnerRef)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nInputCapture.displayName = \"InputCapture\";\n\ntype InputContextType = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tBaseProps & {\n\t\t/**\n\t\t * inner ref for the input element, controlled by `Input`\n\t\t */\n\t\tinnerRef: MutableRefObject<HTMLInputElement | null>;\n\t\t/**\n\t\t * forwarded ref to the input element, forwarded from `Input` to `InputCapture`\n\t\t */\n\t\tforwardedRef?: ForwardedRef<HTMLInputElement>;\n\t};\n\nconst InputContext = createContext<InputContextType>({\n\tvalidation: undefined,\n\tinnerRef: { current: null },\n});\n\ntype InputContainerProps = InputHTMLAttributes<HTMLInputElement> &\n\tBaseProps & {\n\t\t/**\n\t\t * @private inner ref for the input element, controlled by `Input`\n\t\t */\n\t\tinnerRef: MutableRefObject<HTMLInputElement | null>;\n\t\t/**\n\t\t * @private ref to the input element, forwarded from `Input` to `InputCapture`\n\t\t */\n\t\tforwardedRef: ForwardedRef<HTMLInputElement>;\n\t};\n\n/**\n * The container for the input element.\n */\nconst InputContainer = ({\n\t\"aria-invalid\": _ariaInvalid,\n\t\"aria-disabled\": _ariaDisabled,\n\tchildren,\n\tclassName,\n\tdisabled,\n\tforwardedRef,\n\tinnerRef,\n\tstyle,\n\ttype,\n\tvalidation: _validation,\n\t...props\n}: InputContainerProps) => {\n\tconst isInvalid = _ariaInvalid != null && _ariaInvalid !== \"false\";\n\tconst validation = isInvalid\n\t\t? \"error\"\n\t\t: typeof _validation === \"function\"\n\t\t\t? _validation()\n\t\t\t: _validation;\n\tconst ariaInvalid = _ariaInvalid ?? validation === \"error\";\n\n\treturn (\n\t\t<InputContext.Provider\n\t\t\tvalue={{\n\t\t\t\t\"aria-invalid\": _ariaInvalid,\n\t\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\t\tdisabled,\n\t\t\t\ttype,\n\t\t\t\tvalidation,\n\t\t\t\t...props,\n\t\t\t\tforwardedRef,\n\t\t\t\tinnerRef,\n\t\t\t}}\n\t\t>\n\t\t\t<div\n\t\t\t\taria-invalid={ariaInvalid}\n\t\t\t\taria-disabled={disabled ?? _ariaDisabled}\n\t\t\t\tdata-validation={validation || undefined}\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"pointer-coarse:text-base h-9 text-sm\",\n\t\t\t\t\t\"bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-none focus-within:ring-4 focus-visible:outline-none focus-visible:ring-4\",\n\t\t\t\t\t\"aria-disabled:opacity-50\",\n\t\t\t\t\t\"has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5\",\n\t\t\t\t\t\"border-form text-strong has-[:focus-visible]:border-accent-600 has-[:focus-visible]:ring-focus-accent\",\n\t\t\t\t\t\"data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:border-success-600 has-[:focus-visible]:data-validation-success:ring-focus-success\",\n\t\t\t\t\t\"data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:border-warning-600 has-[:focus-visible]:data-validation-warning:ring-focus-warning\",\n\t\t\t\t\t\"data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:border-danger-600 has-[:focus-visible]:data-validation-error:ring-focus-danger\",\n\t\t\t\t\t\"autofill:shadow-[inset_0_0_0px_1000px_hsl(var(--blue-50))] has-[:autofill]:bg-blue-50 has-[:autofill]:[-webkit-text-fill-color:hsl(var(--text-strong))]\", // Autofill styling on the input itself and any children with autofill styling\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tinnerRef?.current?.focus();\n\t\t\t\t}}\n\t\t\t\tonKeyDown={() => {\n\t\t\t\t\tif (innerRef?.current !== document.activeElement) {\n\t\t\t\t\t\tinnerRef?.current?.focus();\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\tstyle={style}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t<ValidationFeedback name={props.name} validation={validation} />\n\t\t\t</div>\n\t\t</InputContext.Provider>\n\t);\n};\n\nexport { Input, InputCapture };\nexport type { InputProps, InputCaptureProps };\n\nconst ValidationFeedback = ({\n\tname,\n\tvalidation,\n}: { name?: string; validation: Validation | undefined }) => {\n\tswitch (validation) {\n\t\tcase \"error\":\n\t\t\treturn (\n\t\t\t\t<div className=\"text-danger-600 pointer-events-none order-last select-none\">\n\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\t{clsx(\n\t\t\t\t\t\t\t\"The value entered for the\",\n\t\t\t\t\t\t\tname,\n\t\t\t\t\t\t\t\"input has failed validation.\",\n\t\t\t\t\t\t)}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon svg={<WarningIcon aria-hidden weight=\"fill\" />} />\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase \"success\":\n\t\t\treturn (\n\t\t\t\t<div className=\"text-success-600 pointer-events-none order-last select-none\">\n\t\t\t\t\t<Icon svg={<CheckCircleIcon weight=\"fill\" />} />\n\t\t\t\t</div>\n\t\t\t);\n\t\tcase \"warning\":\n\t\t\treturn (\n\t\t\t\t<div className=\"text-warning-600 pointer-events-none order-last select-none\">\n\t\t\t\t\t<Icon svg={<WarningDiamondIcon weight=\"fill\" />} />\n\t\t\t\t</div>\n\t\t\t);\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n","import { Eye as EyeIcon } from \"@phosphor-icons/react/Eye\";\nimport { EyeClosed as EyeClosedIcon } from \"@phosphor-icons/react/EyeClosed\";\nimport { forwardRef, useEffect, useState } from \"react\";\nimport type { InputHTMLAttributes } from \"react\";\nimport { Icon } from \"../icon/icon.js\";\nimport { Input, InputCapture } from \"./input.js\";\nimport type { InputType, WithAutoComplete, WithValidation } from \"./types.js\";\n\ntype PasswordInputProps = Omit<\n\tInputHTMLAttributes<HTMLInputElement>,\n\t\"autoComplete\" | \"type\"\n> &\n\tWithValidation &\n\tWithAutoComplete & {\n\t\t/**\n\t\t * Callback for when the visibility of the password value changes.\n\t\t */\n\t\tonValueVisibilityChange?: (visible: boolean) => void;\n\t\t/**\n\t\t * Show/hide the password value as a controlled state.\n\t\t * @default false\n\t\t */\n\t\tshowValue?: boolean;\n\t};\n\ntype PasswordInputType = Extract<InputType, \"text\" | \"password\">;\n\nconst PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>(\n\t({ onValueVisibilityChange, showValue = false, ...props }, ref) => {\n\t\tconst [showPassword, setShowPassword] = useState<boolean>(showValue);\n\t\tconst type: PasswordInputType = showPassword ? \"text\" : \"password\";\n\t\tconst EyeCon = showPassword ? EyeIcon : EyeClosedIcon;\n\n\t\tuseEffect(() => {\n\t\t\tsetShowPassword(showValue);\n\t\t}, [showValue]);\n\n\t\treturn (\n\t\t\t<Input type={type} ref={ref} {...props}>\n\t\t\t\t<InputCapture />\n\t\t\t\t<button\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\ttabIndex={-1}\n\t\t\t\t\tclassName=\"text-body hover:text-strong ml-1 cursor-pointer bg-inherit p-0\"\n\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\tsetShowPassword(!showPassword);\n\t\t\t\t\t\tonValueVisibilityChange?.(!showPassword);\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<span className=\"sr-only\">\n\t\t\t\t\t\tTurn password visibility {showPassword ? \"off\" : \"on\"}\n\t\t\t\t\t</span>\n\t\t\t\t\t<Icon svg={<EyeCon aria-hidden />} />\n\t\t\t\t</button>\n\t\t\t</Input>\n\t\t);\n\t},\n);\nPasswordInput.displayName = \"PasswordInput\";\n\nexport { PasswordInput };\nexport type { PasswordInputProps };\n"],"mappings":"4LAAA,OAAS,eAAeA,MAAuB,oCAC/C,OAAS,WAAWC,MAAmB,gCACvC,OAAS,kBAAkBC,MAA0B,uCACrD,OAAOC,MAAU,OAQjB,OAAS,iBAAAC,EAAe,cAAAC,EAAY,cAAAC,EAAY,UAAAC,MAAc,QAiC1D,cAAAC,EAqJD,QAAAC,MArJC,oBAPJ,IAAMC,EAAQC,EACb,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAAiB,CACpD,IAAMC,EAAc,EAAQJ,EACtBK,EAAWC,EAA8B,IAAI,EAEnD,OAAIF,EAEFR,EAACW,EAAA,CACA,UAAWN,EACX,aAAcE,EACd,SAAUE,EACT,GAAGH,EAEH,SAAAF,EACF,EAKDJ,EAACW,EAAA,CACC,GAAGL,EACJ,UAAWD,EACX,aAAcE,EACd,SAAUE,EAEV,SAAAT,EAACY,EAAA,CAAc,GAAGN,EAAO,EAC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C,EAAU,IAAM,CACfN,EAAgBJ,CAAS,CAC1B,EAAG,CAACA,CAAS,CAAC,EAGbJ,EAACe,EAAA,CAAM,KAAML,EAAM,IAAKJ,EAAM,GAAGD,EAChC,UAAAN,EAACiB,EAAA,EAAa,EACdhB,EAAC,UACA,KAAK,SACL,SAAU,GACV,UAAU,iEACV,QAAS,IAAM,CACdQ,EAAgB,CAACD,CAAY,EAC7BJ,IAA0B,CAACI,CAAY,CACxC,EAEA,UAAAP,EAAC,QAAK,UAAU,UAAU,sCACCO,EAAe,MAAQ,MAClD,EACAR,EAACkB,EAAA,CAAK,IAAKlB,EAACY,EAAA,CAAO,cAAW,GAAC,EAAI,GACpC,GACD,CAEF,CACD,EACAV,EAAc,YAAc","names":["CheckCircleIcon","WarningIcon","WarningDiamondIcon","clsx","createContext","forwardRef","useContext","useRef","jsx","jsxs","Input","forwardRef","children","className","props","forwardedRef","hasChildren","innerRef","useRef","InputContainer","InputCapture","_ariaInvalid","_validation","restProps","ref","ctxAriaInvalid","ctxForwardedRef","ctxInnerRef","ctxValidation","ctx","useContext","InputContext","validation","validationValue","ariaInvalid","cx","composeRefs","createContext","_ariaDisabled","disabled","style","type","ValidationFeedback","ValidationFeedback","name","validation","jsxs","jsx","clsx","Icon","WarningIcon","CheckCircleIcon","WarningDiamondIcon","EyeIcon","EyeClosedIcon","forwardRef","useEffect","useState","jsx","jsxs","PasswordInput","forwardRef","onValueVisibilityChange","showValue","props","ref","showPassword","setShowPassword","useState","type","EyeCon","EyeIcon","EyeClosedIcon","useEffect","Input","InputCapture","Icon"]}
@@ -1,2 +1,2 @@
1
- import{a as b,c as v,d as x,e as y,g as h}from"./chunk-WVHMNFQD.js";import"./chunk-MF2QITTY.js";import{b as z}from"./chunk-UXH22BMO.js";import{a as d}from"./chunk-7XIZZ4HQ.js";import{a as l}from"./chunk-BK4P33ZH.js";import"./chunk-VTCWSFFJ.js";import"./chunk-4LSFAAZW.js";import"./chunk-3C5O3AQA.js";import"./chunk-72TJUKMV.js";import"./chunk-XQVVOOLT.js";import"./chunk-HDPLH5HC.js";import{a as p}from"./chunk-AZ56JGNY.js";import{CaretLeftIcon as k}from"@phosphor-icons/react/CaretLeft";import{CaretRightIcon as A}from"@phosphor-icons/react/CaretRight";import{Slot as E}from"@radix-ui/react-slot";import{createContext as F,forwardRef as c,useContext as N,useState as W}from"react";import P from"tiny-invariant";import{jsx as s,jsxs as f}from"react/jsx-runtime";var m=F(void 0),O=c(({className:n,children:e,defaultPageSize:a,...t},i)=>{let[o,r]=W(a);return s(m.Provider,{value:{defaultPageSize:a,pageSize:o,setPageSize:r},children:s("div",{className:p("inline-flex items-center justify-between gap-2",n),ref:i,...t,children:e})})});O.displayName="CursorPagination";var T=c(({hasNextPage:n,hasPreviousPage:e,onNextPage:a,onPreviousPage:t,...i},o)=>f(d,{appearance:"panel",ref:o,...i,children:[s(l,{appearance:"ghost",disabled:!e,icon:s(k,{}),label:"Previous page",onClick:t,size:"sm",type:"button"}),s(z,{orientation:"vertical",className:"min-h-5"}),s(l,{appearance:"ghost",disabled:!n,icon:s(A,{}),label:"Next page",onClick:a,size:"sm",type:"button"})]}));T.displayName="CursorButtons";var $=[5,10,20,50,100],B=c(({className:n,pageSizes:e=$,onChangePageSize:a,...t},i)=>{let o=N(m);return P(o,"CursorPageSizeSelect must be used as a child of a CursorPagination component"),P(e.includes(o.defaultPageSize),"CursorPagination.defaultPageSize must be included in CursorPageSizeSelect.pageSizes"),P(e.includes(o.pageSize),"CursorPagination.pageSize must be included in CursorPageSizeSelect.pageSizes"),f(b,{defaultValue:`${o.pageSize}`,onValueChange:r=>{let g=Number.parseInt(r,10);Number.isNaN(g)&&(g=o.defaultPageSize),o.setPageSize(g),a?.(g)},children:[s(x,{ref:i,className:p("w-auto min-w-36",n),value:o.pageSize,...t,children:s(v,{})}),s(y,{width:"trigger",children:e.map(r=>f(h,{value:`${r}`,children:[r," per page"]},r))})]})});B.displayName="CursorPageSizeSelect";function D({asChild:n=!1,className:e,...a}){let t=N(m);return P(t,"CursorPageSizeValue must be used as a child of a CursorPagination component"),f(n?E:"span",{className:p("text-muted text-sm font-normal",e),...a,children:[t.pageSize," per page"]})}import{useEffect as V,useState as w}from"react";function H({listSize:n,pageSize:e}){let[a,t]=w(1),[i,o]=w(e);V(()=>{o(e),t(1)},[e]),V(()=>{t(1)},[n]);let r=Math.ceil(n/i),g=(a-1)*i,S=a>1,C=a<r;function I(u){let j=Math.max(1,Math.min(u,r));t(j)}function M(){C&&t(u=>Math.min(u+1,r))}function R(){S&&t(u=>Math.max(u-1,1))}function G(u){o(u),t(1)}function L(){t(r)}function U(){t(1)}return{currentPage:a,goToFirstPage:U,goToLastPage:L,goToPage:I,hasNextPage:C,hasPreviousPage:S,nextPage:M,offset:g,pageSize:i,previousPage:R,setPageSize:G,totalPages:r}}function q(n,e){return n.slice(e.offset,e.offset+e.pageSize)}export{T as CursorButtons,B as CursorPageSizeSelect,D as CursorPageSizeValue,O as CursorPagination,q as getOffsetPaginatedSlice,H as useOffsetPagination};
1
+ import{a as b,c as v,d as x,e as y,g as h}from"./chunk-ZUSFDCTA.js";import"./chunk-MF2QITTY.js";import{b as z}from"./chunk-UXH22BMO.js";import{a as d}from"./chunk-7XIZZ4HQ.js";import{a as l}from"./chunk-IXWMMIAF.js";import"./chunk-WFZS67BK.js";import"./chunk-4LSFAAZW.js";import"./chunk-3C5O3AQA.js";import"./chunk-72TJUKMV.js";import"./chunk-QG5E42M3.js";import"./chunk-HDPLH5HC.js";import{a as p}from"./chunk-AZ56JGNY.js";import{CaretLeft as k}from"@phosphor-icons/react/CaretLeft";import{CaretRight as A}from"@phosphor-icons/react/CaretRight";import{Slot as E}from"@radix-ui/react-slot";import{createContext as F,forwardRef as c,useContext as N,useState as W}from"react";import P from"tiny-invariant";import{jsx as s,jsxs as f}from"react/jsx-runtime";var m=F(void 0),O=c(({className:n,children:e,defaultPageSize:a,...t},i)=>{let[o,r]=W(a);return s(m.Provider,{value:{defaultPageSize:a,pageSize:o,setPageSize:r},children:s("div",{className:p("inline-flex items-center justify-between gap-2",n),ref:i,...t,children:e})})});O.displayName="CursorPagination";var T=c(({hasNextPage:n,hasPreviousPage:e,onNextPage:a,onPreviousPage:t,...i},o)=>f(d,{appearance:"panel",ref:o,...i,children:[s(l,{appearance:"ghost",disabled:!e,icon:s(k,{}),label:"Previous page",onClick:t,size:"sm",type:"button"}),s(z,{orientation:"vertical",className:"min-h-5"}),s(l,{appearance:"ghost",disabled:!n,icon:s(A,{}),label:"Next page",onClick:a,size:"sm",type:"button"})]}));T.displayName="CursorButtons";var $=[5,10,20,50,100],B=c(({className:n,pageSizes:e=$,onChangePageSize:a,...t},i)=>{let o=N(m);return P(o,"CursorPageSizeSelect must be used as a child of a CursorPagination component"),P(e.includes(o.defaultPageSize),"CursorPagination.defaultPageSize must be included in CursorPageSizeSelect.pageSizes"),P(e.includes(o.pageSize),"CursorPagination.pageSize must be included in CursorPageSizeSelect.pageSizes"),f(b,{defaultValue:`${o.pageSize}`,onValueChange:r=>{let g=Number.parseInt(r,10);Number.isNaN(g)&&(g=o.defaultPageSize),o.setPageSize(g),a?.(g)},children:[s(x,{ref:i,className:p("w-auto min-w-36",n),value:o.pageSize,...t,children:s(v,{})}),s(y,{width:"trigger",children:e.map(r=>f(h,{value:`${r}`,children:[r," per page"]},r))})]})});B.displayName="CursorPageSizeSelect";function D({asChild:n=!1,className:e,...a}){let t=N(m);return P(t,"CursorPageSizeValue must be used as a child of a CursorPagination component"),f(n?E:"span",{className:p("text-muted text-sm font-normal",e),...a,children:[t.pageSize," per page"]})}import{useEffect as V,useState as w}from"react";function H({listSize:n,pageSize:e}){let[a,t]=w(1),[i,o]=w(e);V(()=>{o(e),t(1)},[e]),V(()=>{t(1)},[n]);let r=Math.ceil(n/i),g=(a-1)*i,S=a>1,C=a<r;function I(u){let j=Math.max(1,Math.min(u,r));t(j)}function M(){C&&t(u=>Math.min(u+1,r))}function R(){S&&t(u=>Math.max(u-1,1))}function L(u){o(u),t(1)}function G(){t(r)}function U(){t(1)}return{currentPage:a,goToFirstPage:U,goToLastPage:G,goToPage:I,hasNextPage:C,hasPreviousPage:S,nextPage:M,offset:g,pageSize:i,previousPage:R,setPageSize:L,totalPages:r}}function q(n,e){return n.slice(e.offset,e.offset+e.pageSize)}export{T as CursorButtons,B as CursorPageSizeSelect,D as CursorPageSizeValue,O as CursorPagination,q as getOffsetPaginatedSlice,H as useOffsetPagination};
2
2
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/pagination/cursor-pagination.tsx","../src/components/pagination/use-offset-pagination.tsx"],"sourcesContent":["import { CaretLeftIcon } from \"@phosphor-icons/react/CaretLeft\";\nimport { CaretRightIcon } from \"@phosphor-icons/react/CaretRight\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n\ttype ComponentProps,\n\ttype ComponentRef,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\tuseState,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { ButtonGroup, IconButton } from \"../button/index.js\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"../select/select.js\";\nimport { Separator } from \"../separator/separator.js\";\n\ntype CursorPaginationContextValue = {\n\t/**\n\t * The default number of items per page.\n\t */\n\tdefaultPageSize: number;\n\t/**\n\t * The current number of items per page.\n\t */\n\tpageSize: number;\n\t/**\n\t * A function to set the number of items per page.\n\t */\n\tsetPageSize: (value: number) => void;\n};\n\nconst CursorPaginationContext = createContext<\n\tCursorPaginationContextValue | undefined\n>(undefined);\n\ntype CursorPaginationProps = ComponentProps<\"div\"> & {\n\t/**\n\t * The default number of items per page.\n\t */\n\tdefaultPageSize: number;\n};\n\n/**\n * A pagination component for use with cursor-based pagination.\n *\n * Cursor-based pagination is a way of loading data in chunks by using a cursor\n * from the last item on the current page to know where to start the next set,\n * making sure nothing is missed or repeated. Like a linked list, but for chunks\n * of data. It doesn't let you jump to a specific page or know how many total pages\n * there are, but it's more efficient for large or real-time data sets.\n */\nconst CursorPagination = forwardRef<HTMLDivElement, CursorPaginationProps>(\n\t({ className, children, defaultPageSize, ...props }, ref) => {\n\t\tconst [pageSize, setPageSize] = useState<number>(defaultPageSize);\n\n\t\treturn (\n\t\t\t<CursorPaginationContext.Provider\n\t\t\t\tvalue={{ defaultPageSize, pageSize, setPageSize }}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"inline-flex items-center justify-between gap-2\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</CursorPaginationContext.Provider>\n\t\t);\n\t},\n);\nCursorPagination.displayName = \"CursorPagination\";\n\ntype CursorButtonsProps = Omit<\n\tComponentProps<typeof ButtonGroup>,\n\t\"appearance\"\n> & {\n\t/**\n\t * Whether there is a next page of data to load.\n\t */\n\thasNextPage: boolean;\n\t/**\n\t * Whether there is a previous page of data to load.\n\t */\n\thasPreviousPage: boolean;\n\t/**\n\t * A callback that is called when the next page button is clicked.\n\t */\n\tonNextPage?: () => void;\n\t/**\n\t * A callback that is called when the previous page button is clicked.\n\t */\n\tonPreviousPage?: () => void;\n};\n\n/**\n * A pair of buttons for navigating between pages of data when using cursor-based pagination.\n */\nconst CursorButtons = forwardRef<\n\tComponentRef<typeof ButtonGroup>,\n\tCursorButtonsProps\n>(\n\t(\n\t\t{ hasNextPage, hasPreviousPage, onNextPage, onPreviousPage, ...props },\n\t\tref,\n\t) => {\n\t\t// TODO(cody): this _feels_ like a good spot for left and right arrow keys to navigate between pages when focused on the buttons\n\n\t\treturn (\n\t\t\t<ButtonGroup appearance=\"panel\" ref={ref} {...props}>\n\t\t\t\t<IconButton\n\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\tdisabled={!hasPreviousPage}\n\t\t\t\t\ticon={<CaretLeftIcon />}\n\t\t\t\t\tlabel=\"Previous page\"\n\t\t\t\t\tonClick={onPreviousPage}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t/>\n\t\t\t\t<Separator orientation=\"vertical\" className=\"min-h-5\" />\n\t\t\t\t<IconButton\n\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\tdisabled={!hasNextPage}\n\t\t\t\t\ticon={<CaretRightIcon />}\n\t\t\t\t\tlabel=\"Next page\"\n\t\t\t\t\tonClick={onNextPage}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t/>\n\t\t\t</ButtonGroup>\n\t\t);\n\t},\n);\nCursorButtons.displayName = \"CursorButtons\";\n\nconst defaultPageSizes = [5, 10, 20, 50, 100] as const;\n\ntype CursorPageSizeSelectProps = Omit<\n\tComponentProps<typeof SelectTrigger>,\n\t\"children\"\n> & {\n\t/**\n\t * A list of page sizes to choose from. The default page size must be included in this list.\n\t */\n\tpageSizes?: typeof defaultPageSizes | readonly number[];\n\t/**\n\t * A callback that is called when the page size is changed.\n\t */\n\tonChangePageSize?: (value: number) => void;\n};\n\n/**\n * A select input for changing the number of items per page when using cursor-based pagination.\n */\nconst CursorPageSizeSelect = forwardRef<\n\tComponentRef<typeof SelectTrigger>,\n\tCursorPageSizeSelectProps\n>(\n\t(\n\t\t{ className, pageSizes = defaultPageSizes, onChangePageSize, ...rest },\n\t\tref,\n\t) => {\n\t\tconst ctx = useContext(CursorPaginationContext);\n\n\t\tinvariant(\n\t\t\tctx,\n\t\t\t\"CursorPageSizeSelect must be used as a child of a CursorPagination component\",\n\t\t);\n\n\t\tinvariant(\n\t\t\tpageSizes.includes(ctx.defaultPageSize),\n\t\t\t\"CursorPagination.defaultPageSize must be included in CursorPageSizeSelect.pageSizes\",\n\t\t);\n\n\t\tinvariant(\n\t\t\tpageSizes.includes(ctx.pageSize),\n\t\t\t\"CursorPagination.pageSize must be included in CursorPageSizeSelect.pageSizes\",\n\t\t);\n\n\t\treturn (\n\t\t\t<Select\n\t\t\t\tdefaultValue={`${ctx.pageSize}`}\n\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\tlet newPageSize = Number.parseInt(value, 10);\n\t\t\t\t\tif (Number.isNaN(newPageSize)) {\n\t\t\t\t\t\tnewPageSize = ctx.defaultPageSize;\n\t\t\t\t\t}\n\t\t\t\t\tctx.setPageSize(newPageSize);\n\t\t\t\t\tonChangePageSize?.(newPageSize);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<SelectTrigger\n\t\t\t\t\tref={ref}\n\t\t\t\t\tclassName={cx(\"w-auto min-w-36\", className)}\n\t\t\t\t\tvalue={ctx.pageSize}\n\t\t\t\t\t{...rest}\n\t\t\t\t>\n\t\t\t\t\t<SelectValue />\n\t\t\t\t</SelectTrigger>\n\t\t\t\t<SelectContent width=\"trigger\">\n\t\t\t\t\t{pageSizes.map((size) => (\n\t\t\t\t\t\t<SelectItem key={size} value={`${size}`}>\n\t\t\t\t\t\t\t{size} per page\n\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t))}\n\t\t\t\t</SelectContent>\n\t\t\t</Select>\n\t\t);\n\t},\n);\nCursorPageSizeSelect.displayName = \"CursorPageSizeSelect\";\n\ntype CursorPageSizeValueProps = Omit<ComponentProps<\"span\">, \"children\"> &\n\tWithAsChild;\n\n/**\n * Displays the current page size when using cursor-based pagination as a read-only value.\n */\nfunction CursorPageSizeValue({\n\tasChild = false,\n\tclassName,\n\t...props\n}: CursorPageSizeValueProps) {\n\tconst ctx = useContext(CursorPaginationContext);\n\n\tinvariant(\n\t\tctx,\n\t\t\"CursorPageSizeValue must be used as a child of a CursorPagination component\",\n\t);\n\n\tconst Component = asChild ? Slot : \"span\";\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={cx(\"text-muted text-sm font-normal\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{ctx.pageSize} per page\n\t\t</Component>\n\t);\n}\n\nexport {\n\t//,\n\tCursorButtons,\n\tCursorPageSizeSelect,\n\tCursorPageSizeValue,\n\tCursorPagination,\n};\n\nexport type {\n\t//,\n\tCursorButtonsProps,\n\tCursorPageSizeSelectProps,\n\tCursorPageSizeValueProps,\n\tCursorPaginationProps,\n};\n","import { useEffect, useState } from \"react\";\n\ntype UseOffsetPaginationProps = {\n\t/**\n\t * The total number of items in the list to be paginated.\n\t */\n\tlistSize: number;\n\t/**\n\t * The number of items per page.\n\t */\n\tpageSize: number;\n};\n\ntype OffsetPaginationState = {\n\t/**\n\t * The current page number, 1-indexed (starting at 1).\n\t */\n\tcurrentPage: number;\n\t/**\n\t * Whether there is a previous page.\n\t */\n\thasPreviousPage: boolean;\n\t/**\n\t * Whether there is a next page.\n\t */\n\thasNextPage: boolean;\n\t/**\n\t * Go to a specific page.\n\t */\n\tgoToPage: (page: number) => void;\n\t/**\n\t * Go to the first page.\n\t */\n\tgoToFirstPage: () => void;\n\t/**\n\t * Go to the last page.\n\t */\n\tgoToLastPage: () => void;\n\t/**\n\t * Go to the next page.\n\t */\n\tnextPage: () => void;\n\t/**\n\t * The offset of the current page in the list.\n\t */\n\toffset: number;\n\t/**\n\t * The number of items per page.\n\t */\n\tpageSize: number;\n\t/**\n\t * Go to the previous page.\n\t */\n\tpreviousPage: () => void;\n\t/**\n\t * Set the number of items per page. This will reset the current page to the first page.\n\t */\n\tsetPageSize: (size: number) => void;\n\t/**\n\t * The total number of pages.\n\t */\n\ttotalPages: number;\n};\n\n/**\n * A headless hook for managing offset-based pagination state\n */\nfunction useOffsetPagination({\n\tlistSize,\n\tpageSize,\n}: UseOffsetPaginationProps): OffsetPaginationState {\n\tconst [currentPage, setCurrentPage] = useState(1);\n\tconst [currentPageSize, setCurrentPageSize] = useState(pageSize);\n\n\t// Reset the current page to 1 when the page size prop changes\n\tuseEffect(() => {\n\t\tsetCurrentPageSize(pageSize);\n\t\tsetCurrentPage(1);\n\t}, [pageSize]);\n\n\t// Reset the current page to 1 when the list size prop changes\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: when the listSize prop changes, we want to reset the current page to the start\n\tuseEffect(() => {\n\t\tsetCurrentPage(1);\n\t}, [listSize]);\n\n\tconst totalPages = Math.ceil(listSize / currentPageSize);\n\tconst offset = (currentPage - 1) * currentPageSize;\n\n\tconst hasPreviousPage = currentPage > 1;\n\tconst hasNextPage = currentPage < totalPages;\n\n\tfunction goToPage(page: number) {\n\t\tconst nextPage = Math.max(1, Math.min(page, totalPages));\n\t\tsetCurrentPage(nextPage);\n\t}\n\n\tfunction nextPage() {\n\t\tif (hasNextPage) {\n\t\t\tsetCurrentPage((prev) => Math.min(prev + 1, totalPages));\n\t\t}\n\t}\n\n\tfunction previousPage() {\n\t\tif (hasPreviousPage) {\n\t\t\tsetCurrentPage((prev) => Math.max(prev - 1, 1));\n\t\t}\n\t}\n\n\tfunction setPageSize(size: number) {\n\t\tsetCurrentPageSize(size);\n\t\tsetCurrentPage(1); // reset to the first page when page size changes\n\t}\n\n\tfunction goToLastPage() {\n\t\tsetCurrentPage(totalPages);\n\t}\n\n\tfunction goToFirstPage() {\n\t\tsetCurrentPage(1);\n\t}\n\n\treturn {\n\t\tcurrentPage,\n\t\tgoToFirstPage,\n\t\tgoToLastPage,\n\t\tgoToPage,\n\t\thasNextPage,\n\t\thasPreviousPage,\n\t\tnextPage,\n\t\toffset,\n\t\tpageSize: currentPageSize,\n\t\tpreviousPage,\n\t\tsetPageSize,\n\t\ttotalPages,\n\t};\n}\n\n/**\n * Get a paginated slice of a list based on the current offset pagination state.\n */\nfunction getOffsetPaginatedSlice<T>(\n\tlist: readonly T[],\n\tpagination: OffsetPaginationState,\n): T[] {\n\treturn list.slice(pagination.offset, pagination.offset + pagination.pageSize);\n}\n\nexport {\n\t//,\n\tgetOffsetPaginatedSlice,\n\tuseOffsetPagination,\n};\n\nexport type {\n\t//,\n\tOffsetPagination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ACnD,GAAM,CAACC,EAAaC,CAAc,EAAIL,EAAS,CAAC,EAC1C,CAACM,EAAiBC,CAAkB,EAAIP,EAASG,CAAQ,EAG/DJ,EAAU,IAAM,CACfQ,EAAmBJ,CAAQ,EAC3BE,EAAe,CAAC,CACjB,EAAG,CAACF,CAAQ,CAAC,EAIbJ,EAAU,IAAM,CACfM,EAAe,CAAC,CACjB,EAAG,CAACH,CAAQ,CAAC,EAEb,IAAMM,EAAa,KAAK,KAAKN,EAAWI,CAAe,EACjDG,GAAUL,EAAc,GAAKE,EAE7BI,EAAkBN,EAAc,EAChCO,EAAcP,EAAcI,EAElC,SAASI,EAASC,EAAc,CAC/B,IAAMC,EAAW,KAAK,IAAI,EAAG,KAAK,IAAID,EAAML,CAAU,CAAC,EACvDH,EAAeS,CAAQ,CACxB,CAEA,SAASA,GAAW,CACfH,GACHN,EAAgBU,GAAS,KAAK,IAAIA,EAAO,EAAGP,CAAU,CAAC,CAEzD,CAEA,SAASQ,GAAe,CACnBN,GACHL,EAAgBU,GAAS,KAAK,IAAIA,EAAO,EAAG,CAAC,CAAC,CAEhD,CAEA,SAASE,EAAYC,EAAc,CAClCX,EAAmBW,CAAI,EACvBb,EAAe,CAAC,CACjB,CAEA,SAASc,GAAe,CACvBd,EAAeG,CAAU,CAC1B,CAEA,SAASY,GAAgB,CACxBf,EAAe,CAAC,CACjB,CAEA,MAAO,CACN,YAAAD,EACA,cAAAgB,EACA,aAAAD,EACA,SAAAP,EACA,YAAAD,EACA,gBAAAD,EACA,SAAAI,EACA,OAAAL,EACA,SAAUH,EACV,aAAAU,EACA,YAAAC,EACA,WAAAT,CACD,CACD,CAKA,SAASa,EACRC,EACAC,EACM,CACN,OAAOD,EAAK,MAAMC,EAAW,OAAQA,EAAW,OAASA,EAAW,QAAQ,CAC7E","names":["CaretLeftIcon","CaretRightIcon","Slot","createContext","forwardRef","useContext","useState","invariant","jsx","jsxs","CursorPaginationContext","createContext","CursorPagination","forwardRef","className","children","defaultPageSize","props","ref","pageSize","setPageSize","useState","cx","CursorButtons","hasNextPage","hasPreviousPage","onNextPage","onPreviousPage","ButtonGroup","IconButton","CaretLeftIcon","Separator","CaretRightIcon","defaultPageSizes","CursorPageSizeSelect","pageSizes","onChangePageSize","rest","ctx","useContext","invariant","Select","value","newPageSize","SelectTrigger","SelectValue","SelectContent","size","SelectItem","CursorPageSizeValue","asChild","Slot","useEffect","useState","useOffsetPagination","listSize","pageSize","currentPage","setCurrentPage","currentPageSize","setCurrentPageSize","totalPages","offset","hasPreviousPage","hasNextPage","goToPage","page","nextPage","prev","previousPage","setPageSize","size","goToLastPage","goToFirstPage","getOffsetPaginatedSlice","list","pagination"]}
1
+ {"version":3,"sources":["../src/components/pagination/cursor-pagination.tsx","../src/components/pagination/use-offset-pagination.tsx"],"sourcesContent":["import { CaretLeft as CaretLeftIcon } from \"@phosphor-icons/react/CaretLeft\";\nimport { CaretRight as CaretRightIcon } from \"@phosphor-icons/react/CaretRight\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport {\n\ttype ComponentProps,\n\ttype ComponentRef,\n\tcreateContext,\n\tforwardRef,\n\tuseContext,\n\tuseState,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { ButtonGroup, IconButton } from \"../button/index.js\";\nimport {\n\tSelect,\n\tSelectContent,\n\tSelectItem,\n\tSelectTrigger,\n\tSelectValue,\n} from \"../select/select.js\";\nimport { Separator } from \"../separator/separator.js\";\n\ntype CursorPaginationContextValue = {\n\t/**\n\t * The default number of items per page.\n\t */\n\tdefaultPageSize: number;\n\t/**\n\t * The current number of items per page.\n\t */\n\tpageSize: number;\n\t/**\n\t * A function to set the number of items per page.\n\t */\n\tsetPageSize: (value: number) => void;\n};\n\nconst CursorPaginationContext = createContext<\n\tCursorPaginationContextValue | undefined\n>(undefined);\n\ntype CursorPaginationProps = ComponentProps<\"div\"> & {\n\t/**\n\t * The default number of items per page.\n\t */\n\tdefaultPageSize: number;\n};\n\n/**\n * A pagination component for use with cursor-based pagination.\n *\n * Cursor-based pagination is a way of loading data in chunks by using a cursor\n * from the last item on the current page to know where to start the next set,\n * making sure nothing is missed or repeated. Like a linked list, but for chunks\n * of data. It doesn't let you jump to a specific page or know how many total pages\n * there are, but it's more efficient for large or real-time data sets.\n */\nconst CursorPagination = forwardRef<HTMLDivElement, CursorPaginationProps>(\n\t({ className, children, defaultPageSize, ...props }, ref) => {\n\t\tconst [pageSize, setPageSize] = useState<number>(defaultPageSize);\n\n\t\treturn (\n\t\t\t<CursorPaginationContext.Provider\n\t\t\t\tvalue={{ defaultPageSize, pageSize, setPageSize }}\n\t\t\t>\n\t\t\t\t<div\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"inline-flex items-center justify-between gap-2\",\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t</CursorPaginationContext.Provider>\n\t\t);\n\t},\n);\nCursorPagination.displayName = \"CursorPagination\";\n\ntype CursorButtonsProps = Omit<\n\tComponentProps<typeof ButtonGroup>,\n\t\"appearance\"\n> & {\n\t/**\n\t * Whether there is a next page of data to load.\n\t */\n\thasNextPage: boolean;\n\t/**\n\t * Whether there is a previous page of data to load.\n\t */\n\thasPreviousPage: boolean;\n\t/**\n\t * A callback that is called when the next page button is clicked.\n\t */\n\tonNextPage?: () => void;\n\t/**\n\t * A callback that is called when the previous page button is clicked.\n\t */\n\tonPreviousPage?: () => void;\n};\n\n/**\n * A pair of buttons for navigating between pages of data when using cursor-based pagination.\n */\nconst CursorButtons = forwardRef<\n\tComponentRef<typeof ButtonGroup>,\n\tCursorButtonsProps\n>(\n\t(\n\t\t{ hasNextPage, hasPreviousPage, onNextPage, onPreviousPage, ...props },\n\t\tref,\n\t) => {\n\t\t// TODO(cody): this _feels_ like a good spot for left and right arrow keys to navigate between pages when focused on the buttons\n\n\t\treturn (\n\t\t\t<ButtonGroup appearance=\"panel\" ref={ref} {...props}>\n\t\t\t\t<IconButton\n\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\tdisabled={!hasPreviousPage}\n\t\t\t\t\ticon={<CaretLeftIcon />}\n\t\t\t\t\tlabel=\"Previous page\"\n\t\t\t\t\tonClick={onPreviousPage}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t/>\n\t\t\t\t<Separator orientation=\"vertical\" className=\"min-h-5\" />\n\t\t\t\t<IconButton\n\t\t\t\t\tappearance=\"ghost\"\n\t\t\t\t\tdisabled={!hasNextPage}\n\t\t\t\t\ticon={<CaretRightIcon />}\n\t\t\t\t\tlabel=\"Next page\"\n\t\t\t\t\tonClick={onNextPage}\n\t\t\t\t\tsize=\"sm\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t/>\n\t\t\t</ButtonGroup>\n\t\t);\n\t},\n);\nCursorButtons.displayName = \"CursorButtons\";\n\nconst defaultPageSizes = [5, 10, 20, 50, 100] as const;\n\ntype CursorPageSizeSelectProps = Omit<\n\tComponentProps<typeof SelectTrigger>,\n\t\"children\"\n> & {\n\t/**\n\t * A list of page sizes to choose from. The default page size must be included in this list.\n\t */\n\tpageSizes?: typeof defaultPageSizes | readonly number[];\n\t/**\n\t * A callback that is called when the page size is changed.\n\t */\n\tonChangePageSize?: (value: number) => void;\n};\n\n/**\n * A select input for changing the number of items per page when using cursor-based pagination.\n */\nconst CursorPageSizeSelect = forwardRef<\n\tComponentRef<typeof SelectTrigger>,\n\tCursorPageSizeSelectProps\n>(\n\t(\n\t\t{ className, pageSizes = defaultPageSizes, onChangePageSize, ...rest },\n\t\tref,\n\t) => {\n\t\tconst ctx = useContext(CursorPaginationContext);\n\n\t\tinvariant(\n\t\t\tctx,\n\t\t\t\"CursorPageSizeSelect must be used as a child of a CursorPagination component\",\n\t\t);\n\n\t\tinvariant(\n\t\t\tpageSizes.includes(ctx.defaultPageSize),\n\t\t\t\"CursorPagination.defaultPageSize must be included in CursorPageSizeSelect.pageSizes\",\n\t\t);\n\n\t\tinvariant(\n\t\t\tpageSizes.includes(ctx.pageSize),\n\t\t\t\"CursorPagination.pageSize must be included in CursorPageSizeSelect.pageSizes\",\n\t\t);\n\n\t\treturn (\n\t\t\t<Select\n\t\t\t\tdefaultValue={`${ctx.pageSize}`}\n\t\t\t\tonValueChange={(value) => {\n\t\t\t\t\tlet newPageSize = Number.parseInt(value, 10);\n\t\t\t\t\tif (Number.isNaN(newPageSize)) {\n\t\t\t\t\t\tnewPageSize = ctx.defaultPageSize;\n\t\t\t\t\t}\n\t\t\t\t\tctx.setPageSize(newPageSize);\n\t\t\t\t\tonChangePageSize?.(newPageSize);\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t<SelectTrigger\n\t\t\t\t\tref={ref}\n\t\t\t\t\tclassName={cx(\"w-auto min-w-36\", className)}\n\t\t\t\t\tvalue={ctx.pageSize}\n\t\t\t\t\t{...rest}\n\t\t\t\t>\n\t\t\t\t\t<SelectValue />\n\t\t\t\t</SelectTrigger>\n\t\t\t\t<SelectContent width=\"trigger\">\n\t\t\t\t\t{pageSizes.map((size) => (\n\t\t\t\t\t\t<SelectItem key={size} value={`${size}`}>\n\t\t\t\t\t\t\t{size} per page\n\t\t\t\t\t\t</SelectItem>\n\t\t\t\t\t))}\n\t\t\t\t</SelectContent>\n\t\t\t</Select>\n\t\t);\n\t},\n);\nCursorPageSizeSelect.displayName = \"CursorPageSizeSelect\";\n\ntype CursorPageSizeValueProps = Omit<ComponentProps<\"span\">, \"children\"> &\n\tWithAsChild;\n\n/**\n * Displays the current page size when using cursor-based pagination as a read-only value.\n */\nfunction CursorPageSizeValue({\n\tasChild = false,\n\tclassName,\n\t...props\n}: CursorPageSizeValueProps) {\n\tconst ctx = useContext(CursorPaginationContext);\n\n\tinvariant(\n\t\tctx,\n\t\t\"CursorPageSizeValue must be used as a child of a CursorPagination component\",\n\t);\n\n\tconst Component = asChild ? Slot : \"span\";\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={cx(\"text-muted text-sm font-normal\", className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{ctx.pageSize} per page\n\t\t</Component>\n\t);\n}\n\nexport {\n\t//,\n\tCursorButtons,\n\tCursorPageSizeSelect,\n\tCursorPageSizeValue,\n\tCursorPagination,\n};\n\nexport type {\n\t//,\n\tCursorButtonsProps,\n\tCursorPageSizeSelectProps,\n\tCursorPageSizeValueProps,\n\tCursorPaginationProps,\n};\n","import { useEffect, useState } from \"react\";\n\ntype UseOffsetPaginationProps = {\n\t/**\n\t * The total number of items in the list to be paginated.\n\t */\n\tlistSize: number;\n\t/**\n\t * The number of items per page.\n\t */\n\tpageSize: number;\n};\n\ntype OffsetPaginationState = {\n\t/**\n\t * The current page number, 1-indexed (starting at 1).\n\t */\n\tcurrentPage: number;\n\t/**\n\t * Whether there is a previous page.\n\t */\n\thasPreviousPage: boolean;\n\t/**\n\t * Whether there is a next page.\n\t */\n\thasNextPage: boolean;\n\t/**\n\t * Go to a specific page.\n\t */\n\tgoToPage: (page: number) => void;\n\t/**\n\t * Go to the first page.\n\t */\n\tgoToFirstPage: () => void;\n\t/**\n\t * Go to the last page.\n\t */\n\tgoToLastPage: () => void;\n\t/**\n\t * Go to the next page.\n\t */\n\tnextPage: () => void;\n\t/**\n\t * The offset of the current page in the list.\n\t */\n\toffset: number;\n\t/**\n\t * The number of items per page.\n\t */\n\tpageSize: number;\n\t/**\n\t * Go to the previous page.\n\t */\n\tpreviousPage: () => void;\n\t/**\n\t * Set the number of items per page. This will reset the current page to the first page.\n\t */\n\tsetPageSize: (size: number) => void;\n\t/**\n\t * The total number of pages.\n\t */\n\ttotalPages: number;\n};\n\n/**\n * A headless hook for managing offset-based pagination state\n */\nfunction useOffsetPagination({\n\tlistSize,\n\tpageSize,\n}: UseOffsetPaginationProps): OffsetPaginationState {\n\tconst [currentPage, setCurrentPage] = useState(1);\n\tconst [currentPageSize, setCurrentPageSize] = useState(pageSize);\n\n\t// Reset the current page to 1 when the page size prop changes\n\tuseEffect(() => {\n\t\tsetCurrentPageSize(pageSize);\n\t\tsetCurrentPage(1);\n\t}, [pageSize]);\n\n\t// Reset the current page to 1 when the list size prop changes\n\t// biome-ignore lint/correctness/useExhaustiveDependencies: when the listSize prop changes, we want to reset the current page to the start\n\tuseEffect(() => {\n\t\tsetCurrentPage(1);\n\t}, [listSize]);\n\n\tconst totalPages = Math.ceil(listSize / currentPageSize);\n\tconst offset = (currentPage - 1) * currentPageSize;\n\n\tconst hasPreviousPage = currentPage > 1;\n\tconst hasNextPage = currentPage < totalPages;\n\n\tfunction goToPage(page: number) {\n\t\tconst nextPage = Math.max(1, Math.min(page, totalPages));\n\t\tsetCurrentPage(nextPage);\n\t}\n\n\tfunction nextPage() {\n\t\tif (hasNextPage) {\n\t\t\tsetCurrentPage((prev) => Math.min(prev + 1, totalPages));\n\t\t}\n\t}\n\n\tfunction previousPage() {\n\t\tif (hasPreviousPage) {\n\t\t\tsetCurrentPage((prev) => Math.max(prev - 1, 1));\n\t\t}\n\t}\n\n\tfunction setPageSize(size: number) {\n\t\tsetCurrentPageSize(size);\n\t\tsetCurrentPage(1); // reset to the first page when page size changes\n\t}\n\n\tfunction goToLastPage() {\n\t\tsetCurrentPage(totalPages);\n\t}\n\n\tfunction goToFirstPage() {\n\t\tsetCurrentPage(1);\n\t}\n\n\treturn {\n\t\tcurrentPage,\n\t\tgoToFirstPage,\n\t\tgoToLastPage,\n\t\tgoToPage,\n\t\thasNextPage,\n\t\thasPreviousPage,\n\t\tnextPage,\n\t\toffset,\n\t\tpageSize: currentPageSize,\n\t\tpreviousPage,\n\t\tsetPageSize,\n\t\ttotalPages,\n\t};\n}\n\n/**\n * Get a paginated slice of a list based on the current offset pagination state.\n */\nfunction getOffsetPaginatedSlice<T>(\n\tlist: readonly T[],\n\tpagination: OffsetPaginationState,\n): T[] {\n\treturn list.slice(pagination.offset, pagination.offset + pagination.pageSize);\n}\n\nexport {\n\t//,\n\tgetOffsetPaginatedSlice,\n\tuseOffsetPagination,\n};\n\nexport type {\n\t//,\n\tOffsetPaginationState,\n\tUseOffsetPaginationProps,\n};\n"],"mappings":"waAAA,OAAS,aAAaA,MAAqB,kCAC3C,OAAS,cAAcC,MAAsB,mCAC7C,OAAS,QAAAC,MAAY,uBACrB,OAGC,iBAAAC,EACA,cAAAC,EACA,cAAAC,EACA,YAAAC,MACM,QACP,OAAOC,MAAe,iBAwDlB,cAAAC,EAoDD,QAAAC,MApDC,oBA5BJ,IAAMC,EAA0BC,EAE9B,MAAS,EAkBLC,EAAmBC,EACxB,CAAC,CAAE,UAAAC,EAAW,SAAAC,EAAU,gBAAAC,EAAiB,GAAGC,CAAM,EAAGC,IAAQ,CAC5D,GAAM,CAACC,EAAUC,CAAW,EAAIC,EAAiBL,CAAe,EAEhE,OACCR,EAACE,EAAwB,SAAxB,CACA,MAAO,CAAE,gBAAAM,EAAiB,SAAAG,EAAU,YAAAC,CAAY,EAEhD,SAAAZ,EAAC,OACA,UAAWc,EACV,iDACAR,CACD,EACA,IAAKI,EACJ,GAAGD,EAEH,SAAAF,EACF,EACD,CAEF,CACD,EACAH,EAAiB,YAAc,mBA2B/B,IAAMW,EAAgBV,EAIrB,CACC,CAAE,YAAAW,EAAa,gBAAAC,EAAiB,WAAAC,EAAY,eAAAC,EAAgB,GAAGV,CAAM,EACrEC,IAKCT,EAACmB,EAAA,CAAY,WAAW,QAAQ,IAAKV,EAAM,GAAGD,EAC7C,UAAAT,EAACqB,EAAA,CACA,WAAW,QACX,SAAU,CAACJ,EACX,KAAMjB,EAACsB,EAAA,EAAc,EACrB,MAAM,gBACN,QAASH,EACT,KAAK,KACL,KAAK,SACN,EACAnB,EAACuB,EAAA,CAAU,YAAY,WAAW,UAAU,UAAU,EACtDvB,EAACqB,EAAA,CACA,WAAW,QACX,SAAU,CAACL,EACX,KAAMhB,EAACwB,EAAA,E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,CAC7E","names":["CaretLeftIcon","CaretRightIcon","Slot","createContext","forwardRef","useContext","useState","invariant","jsx","jsxs","CursorPaginationContext","createContext","CursorPagination","forwardRef","className","children","defaultPageSize","props","ref","pageSize","setPageSize","useState","cx","CursorButtons","hasNextPage","hasPreviousPage","onNextPage","onPreviousPage","ButtonGroup","IconButton","CaretLeftIcon","Separator","CaretRightIcon","defaultPageSizes","CursorPageSizeSelect","pageSizes","onChangePageSize","rest","ctx","useContext","invariant","Select","value","newPageSize","SelectTrigger","SelectValue","SelectContent","size","SelectItem","CursorPageSizeValue","asChild","Slot","useEffect","useState","useOffsetPagination","listSize","pageSize","currentPage","setCurrentPage","currentPageSize","setCurrentPageSize","totalPages","offset","hasPreviousPage","hasNextPage","goToPage","page","nextPage","prev","previousPage","setPageSize","size","goToLastPage","goToFirstPage","getOffsetPaginatedSlice","list","pagination"]}
package/dist/select.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as e,b as t,c as l,d as S,e as c,f as r,g as o,h as a}from"./chunk-WVHMNFQD.js";import"./chunk-MF2QITTY.js";import"./chunk-UXH22BMO.js";import"./chunk-XQVVOOLT.js";import"./chunk-HDPLH5HC.js";import"./chunk-AZ56JGNY.js";export{e as Select,c as SelectContent,t as SelectGroup,o as SelectItem,r as SelectLabel,a as SelectSeparator,S as SelectTrigger,l as SelectValue};
1
+ import{a as e,b as t,c as l,d as S,e as c,f as r,g as o,h as a}from"./chunk-ZUSFDCTA.js";import"./chunk-MF2QITTY.js";import"./chunk-UXH22BMO.js";import"./chunk-QG5E42M3.js";import"./chunk-HDPLH5HC.js";import"./chunk-AZ56JGNY.js";export{e as Select,c as SelectContent,t as SelectGroup,o as SelectItem,r as SelectLabel,a as SelectSeparator,S as SelectTrigger,l as SelectValue};
2
2
  //# sourceMappingURL=select.js.map
package/dist/sheet.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as S,b as u,c as v,d as m,e as p,f as d,g as h,h as f}from"./chunk-PBARMKNJ.js";import{g as c}from"./chunk-3DXMGSDU.js";import"./chunk-XN5RN6JW.js";import"./chunk-D3XF6J5A.js";import{a as P}from"./chunk-BK4P33ZH.js";import"./chunk-4LSFAAZW.js";import"./chunk-3C5O3AQA.js";import"./chunk-72TJUKMV.js";import"./chunk-XQVVOOLT.js";import"./chunk-HDPLH5HC.js";import{a as r}from"./chunk-AZ56JGNY.js";import{XIcon as D}from"@phosphor-icons/react/X";import{cva as L}from"class-variance-authority";import{forwardRef as a}from"react";import{jsx as i,jsxs as k}from"react/jsx-runtime";var M=S,I=u,w=m,A=v,y=a(({className:e,...t},o)=>i(p,{className:r("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-40 backdrop-blur-sm",e),...t,ref:o}));y.displayName=p.displayName;var B=L("bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 flex flex-col shadow-lg outline-none transition ease-in-out focus-within:outline-none data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in",{variants:{side:{left:"data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r",right:"data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l"}},defaultVariants:{side:"right"}}),C=a(({children:e,className:t,onInteractOutside:o,onPointerDownOutside:n,preferredWidth:l="sm:max-w-[30rem]",side:N="right",...R},H)=>k(A,{children:[i(y,{}),i(d,{className:r(B({side:N}),l,t),onInteractOutside:s=>{c(s),o?.(s)},onPointerDownOutside:s=>{c(s),n?.(s)},ref:H,...R,children:e})]}));C.displayName=d.displayName;var O=({size:e="md",type:t="button",label:o="Close Sheet",appearance:n="ghost",...l})=>i(m,{asChild:!0,children:i(P,{appearance:n,icon:i(D,{}),label:o,size:e,type:t,...l})}),W=({className:e,...t})=>i("div",{className:r("scrollbar text-body flex-1 overflow-y-auto p-6",e),...t}),E=({className:e,...t})=>i("div",{className:r("border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4","has-[.icon-button]:pr-4",e),...t}),V=({className:e,...t})=>i("div",{className:r("border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5",e),...t}),g=a(({className:e,...t},o)=>i(h,{ref:o,className:r("text-strong flex-1 truncate text-lg font-medium",e),...t}));g.displayName=h.displayName;var b=a(({children:e,className:t,...o},n)=>i("div",{className:r("flex items-center justify-between gap-2",t),...o,ref:n,children:e}));b.displayName="SheetTitleGroup";var T=a(({className:e,...t},o)=>i(f,{ref:o,className:r("text-body text-sm",e),...t}));T.displayName=f.displayName;var x=a(({children:e,className:t,...o},n)=>i("div",{className:r("flex h-full items-center gap-2",t),...o,ref:n,children:e}));x.displayName="SheetActions";export{M as Sheet,x as SheetActions,W as SheetBody,w as SheetClose,O as SheetCloseIconButton,C as SheetContent,T as SheetDescription,V as SheetFooter,E as SheetHeader,g as SheetTitle,b as SheetTitleGroup,I as SheetTrigger};
1
+ import{a as S,b as u,c as v,d as m,e as p,f as d,g as h,h as f}from"./chunk-PBARMKNJ.js";import{g as c}from"./chunk-BF3GF5YV.js";import"./chunk-XN5RN6JW.js";import"./chunk-D3XF6J5A.js";import{a as P}from"./chunk-IXWMMIAF.js";import"./chunk-4LSFAAZW.js";import"./chunk-3C5O3AQA.js";import"./chunk-72TJUKMV.js";import"./chunk-QG5E42M3.js";import"./chunk-HDPLH5HC.js";import{a as r}from"./chunk-AZ56JGNY.js";import{X as D}from"@phosphor-icons/react/X";import{cva as L}from"class-variance-authority";import{forwardRef as n}from"react";import{jsx as i,jsxs as k}from"react/jsx-runtime";var M=S,I=u,w=m,A=v,y=n(({className:e,...t},o)=>i(p,{className:r("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-40 backdrop-blur-sm",e),...t,ref:o}));y.displayName=p.displayName;var B=L("bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 flex flex-col shadow-lg outline-none transition ease-in-out focus-within:outline-none data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in",{variants:{side:{left:"data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r",right:"data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l"}},defaultVariants:{side:"right"}}),C=n(({children:e,className:t,onInteractOutside:o,onPointerDownOutside:a,preferredWidth:l="sm:max-w-[30rem]",side:N="right",...R},H)=>k(A,{children:[i(y,{}),i(d,{className:r(B({side:N}),l,t),onInteractOutside:s=>{c(s),o?.(s)},onPointerDownOutside:s=>{c(s),a?.(s)},ref:H,...R,children:e})]}));C.displayName=d.displayName;var O=({size:e="md",type:t="button",label:o="Close Sheet",appearance:a="ghost",...l})=>i(m,{asChild:!0,children:i(P,{appearance:a,icon:i(D,{}),label:o,size:e,type:t,...l})}),W=({className:e,...t})=>i("div",{className:r("scrollbar text-body flex-1 overflow-y-auto p-6",e),...t}),E=({className:e,...t})=>i("div",{className:r("border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4","has-[.icon-button]:pr-4",e),...t}),V=({className:e,...t})=>i("div",{className:r("border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5",e),...t}),g=n(({className:e,...t},o)=>i(h,{ref:o,className:r("text-strong flex-1 truncate text-lg font-medium",e),...t}));g.displayName=h.displayName;var b=n(({children:e,className:t,...o},a)=>i("div",{className:r("flex items-center justify-between gap-2",t),...o,ref:a,children:e}));b.displayName="SheetTitleGroup";var T=n(({className:e,...t},o)=>i(f,{ref:o,className:r("text-body text-sm",e),...t}));T.displayName=f.displayName;var x=n(({children:e,className:t,...o},a)=>i("div",{className:r("flex h-full items-center gap-2",t),...o,ref:a,children:e}));x.displayName="SheetActions";export{M as Sheet,x as SheetActions,W as SheetBody,w as SheetClose,O as SheetCloseIconButton,C as SheetContent,T as SheetDescription,V as SheetFooter,E as SheetHeader,g as SheetTitle,b as SheetTitleGroup,I as SheetTrigger};
2
2
  //# sourceMappingURL=sheet.js.map
package/dist/sheet.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/sheet/sheet.tsx"],"sourcesContent":["import { XIcon } from \"@phosphor-icons/react/X\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type {\n\tComponentPropsWithoutRef,\n\tComponentRef,\n\tHTMLAttributes,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconButton, type IconButtonProps } from \"../button/icon-button.js\";\nimport * as SheetPrimitive from \"../dialog/primitive.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\n/**\n * The root component for a `Sheet`. Should compose the `SheetTrigger` and `SheetContent`.\n * Acts as a stateful provider for the Sheet's open/closed state.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet\n *\n * @example\n * ```tsx\n * // Triggering a stateful sheet\n * <Sheet>\n * <SheetTrigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </SheetTrigger>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst Sheet = SheetPrimitive.Root;\n\n/**\n * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-trigger\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </SheetTrigger>\n * <SheetContent>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/**\n * The close button for a `Sheet`. Should be rendered as a child of the `SheetContent` component.\n * Usually contained within the `SheetFooter` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </SheetTrigger>\n * <SheetContent>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetClose = SheetPrimitive.Close;\n\n/**\n * The portal for a sheet. Should be rendered as a child of the `Sheet` component.\n * Renders a portal that the `SheetOverlay` and `SheetContent` is rendered into.\n *\n * @private\n */\nconst SheetPortal = SheetPrimitive.Portal;\n\n/**\n * The overlay backdrop for a sheet. Should be rendered as a child of the `SheetPortal` component.\n *\n * You likely don't need to use this component directly, as it is used internally by the `SheetContent` component.\n *\n * @private\n */\nconst SheetOverlay = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"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-40 backdrop-blur-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst SheetVariants = cva(\n\t\"bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 flex flex-col shadow-lg outline-none transition ease-in-out focus-within:outline-none data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * The side of the screen the sheet should slide in from.\n\t\t\t */\n\t\t\tside: {\n\t\t\t\tleft: \"data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r\",\n\t\t\t\tright:\n\t\t\t\t\t\"data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ntype SheetContentProps = ComponentPropsWithoutRef<\n\ttypeof SheetPrimitive.Content\n> &\n\tVariantProps<typeof SheetVariants> & {\n\t\t/**\n\t\t * The preferred width of the `SheetContent` as a tailwind `max-w-` class.\n\t\t *\n\t\t * By default, a `Sheet`'s content width is responsive with a default\n\t\t * preferred width: the maximum width of the `SheetContent` when the window\n\t\t * viewport is larger than the mobile breakpoint (`sm`).\n\t\t *\n\t\t * @default `sm:max-w-[30rem]`\n\t\t */\n\t\tpreferredWidth?: `sm:max-w-${string}`;\n\t};\n\n/**\n * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders on top of the overlay backdrop.\n * Should contain the `SheetHeader`, `SheetBody`, and `SheetFooter`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-content\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetContent = forwardRef<ComponentRef<\"div\">, SheetContentProps>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonInteractOutside,\n\t\t\tonPointerDownOutside,\n\t\t\tpreferredWidth = \"sm:max-w-[30rem]\",\n\t\t\tside = \"right\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<SheetPortal>\n\t\t\t<SheetOverlay />\n\t\t\t<SheetPrimitive.Content\n\t\t\t\tclassName={cx(SheetVariants({ side }), preferredWidth, className)}\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\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SheetPrimitive.Content>\n\t\t</SheetPortal>\n\t),\n);\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\ntype SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\n\n/**\n * An icon button that closes the `Sheet` when clicked.\n * Should be rendered within the `SheetHeader` as a child of `SheetActions`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close-icon-button\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetCloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Sheet\",\n\tappearance = \"ghost\",\n\t...props\n}: SheetCloseIconButtonProps) => (\n\t<SheetPrimitive.Close asChild>\n\t\t<IconButton\n\t\t\tappearance={appearance}\n\t\t\ticon={<XIcon />}\n\t\t\tlabel={label}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t</SheetPrimitive.Close>\n);\n\n/**\n * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.\n * Should be rendered as a child of `SheetContent`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-body\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetBody = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\"scrollbar text-body flex-1 overflow-y-auto p-6\", className)}\n\t\t{...props}\n\t/>\n);\n\n/**\n * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.\n * Should be rendered as a child of `SheetContent`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-header\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetHeader = ({\n\tclassName,\n\t...props\n}: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\n\n/**\n * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.\n * Should be rendered as a child of `SheetContent`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-footer\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetFooter = ({\n\tclassName,\n\t...props\n}: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\n\n/**\n * The title for a `Sheet`. Typically rendered as a child of `SheetTitleGroup`.\n * Defaults to an `h2` element, but can be changed via the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetTitle = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong flex-1 truncate text-lg font-medium\", className)}\n\t\t{...props}\n\t/>\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/**\n * A group container for the title and actions of a sheet. Typically rendered as a child of `SheetHeader`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title-group\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetTitleGroup = forwardRef<\n\tComponentRef<\"div\">,\n\tHTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => (\n\t<div\n\t\tclassName={cx(\"flex items-center justify-between gap-2\", className)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t{children}\n\t</div>\n));\nSheetTitleGroup.displayName = \"SheetTitleGroup\";\n\n/**\n * A description for a sheet. Typically rendered as a child of `SheetHeader`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-description\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetDescription = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/**\n * A group container for the actions of a `Sheet`. Typically rendered as a child of `SheetTitleGroup`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-actions\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetActions = forwardRef<\n\tComponentRef<\"div\">,\n\tHTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => (\n\t<div\n\t\tclassName={cx(\"flex h-full items-center gap-2\", className)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t{children}\n\t</div>\n));\nSheetActions.displayName = \"SheetActions\";\n\nexport {\n\t//,\n\tSheet,\n\tSheetActions,\n\tSheetBody,\n\tSheetClose,\n\tSheetCloseIconButton,\n\tSheetContent,\n\tSheetDescription,\n\tSheetFooter,\n\tSheetHeader,\n\tSheetTitle,\n\tSheetTitleGroup,\n\tSheetTrigger,\n};\n"],"mappings":"qZAAA,OAAS,SAAAA,MAAa,0BACtB,OAA4B,OAAAC,MAAW,2BAMvC,OAAS,cAAAC,MAAkB,QAwL1B,cAAAC,EA6GC,QAAAC,MA7GD,oBAjFD,IAAMC,EAAuBC,EA2BvBC,EAA8BC,EAiC9BC,EAA4BC,EAQ5BC,EAA6BC,EAS7BC,EAAeC,EAGnB,C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AC,CACpB,UAAAxB,EACA,GAAGC,CACJ,IACCb,EAAC,OACA,UAAWgB,EACV,2EACA,0BACAJ,CACD,EACC,GAAGC,EACL,EAoDKwB,EAAc,CAAC,CACpB,UAAAzB,EACA,GAAGC,CACJ,IACCb,EAAC,OACA,UAAWgB,EACV,2EACAJ,CACD,EACC,GAAGC,EACL,EAoDKyB,EAAa3B,EAGjB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAgBuC,EAAf,CACA,IAAKzB,EACL,UAAWE,EAAG,kDAAmDJ,CAAS,EACzE,GAAGC,EACL,CACA,EACDyB,EAAW,YAA6BC,EAAM,YAkD9C,IAAMC,EAAkB7B,EAGtB,CAAC,CAAE,SAAAS,EAAU,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACrCd,EAAC,OACA,UAAWgB,EAAG,0CAA2CJ,CAAS,EACjE,GAAGC,EACJ,IAAKC,EAEJ,SAAAM,EACF,CACA,EACDoB,EAAgB,YAAc,kBAkD9B,IAAMC,EAAmB9B,EAGvB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAgB0C,EAAf,CACA,IAAK5B,EACL,UAAWE,EAAG,oBAAqBJ,CAAS,EAC3C,GAAGC,EACL,CACA,EACD4B,EAAiB,YAA6BC,EAAY,YAkD1D,IAAMC,EAAehC,EAGnB,CAAC,CAAE,SAAAS,EAAU,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACrCd,EAAC,OACA,UAAWgB,EAAG,iCAAkCJ,CAAS,EACxD,GAAGC,EACJ,IAAKC,EAEJ,SAAAM,EACF,CACA,EACDuB,EAAa,YAAc","names":["XIcon","cva","forwardRef","jsx","jsxs","Sheet","Root","SheetTrigger","Trigger","SheetClose","Close","SheetPortal","Portal","SheetOverlay","forwardRef","className","props","ref","Overlay","cx","SheetVariants","cva","SheetContent","children","onInteractOutside","onPointerDownOutside","preferredWidth","side","Content","event","preventCloseOnPromptInteraction","SheetCloseIconButton","size","type","label","appearance","IconButton","XIcon","SheetBody","SheetHeader","SheetFooter","SheetTitle","Title","SheetTitleGroup","SheetDescription","Description","SheetActions"]}
1
+ {"version":3,"sources":["../src/components/sheet/sheet.tsx"],"sourcesContent":["import { X as XIcon } from \"@phosphor-icons/react/X\";\nimport { type VariantProps, cva } from \"class-variance-authority\";\nimport type {\n\tComponentPropsWithoutRef,\n\tComponentRef,\n\tHTMLAttributes,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconButton, type IconButtonProps } from \"../button/icon-button.js\";\nimport * as SheetPrimitive from \"../dialog/primitive.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\n\n/**\n * The root component for a `Sheet`. Should compose the `SheetTrigger` and `SheetContent`.\n * Acts as a stateful provider for the Sheet's open/closed state.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet\n *\n * @example\n * ```tsx\n * // Triggering a stateful sheet\n * <Sheet>\n * <SheetTrigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </SheetTrigger>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst Sheet = SheetPrimitive.Root;\n\n/**\n * The button trigger for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-trigger\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </SheetTrigger>\n * <SheetContent>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/**\n * The close button for a `Sheet`. Should be rendered as a child of the `SheetContent` component.\n * Usually contained within the `SheetFooter` component.\n * Renders an unstyled button by default, but can be customized with the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close\n *\n * @example\n * ```tsx\n * <Sheet>\n * <SheetTrigger asChild>\n * <Button type=\"button\" appearance=\"filled\">\n * Open Sheet\n * </Button>\n * </SheetTrigger>\n * <SheetContent>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetClose = SheetPrimitive.Close;\n\n/**\n * The portal for a sheet. Should be rendered as a child of the `Sheet` component.\n * Renders a portal that the `SheetOverlay` and `SheetContent` is rendered into.\n *\n * @private\n */\nconst SheetPortal = SheetPrimitive.Portal;\n\n/**\n * The overlay backdrop for a sheet. Should be rendered as a child of the `SheetPortal` component.\n *\n * You likely don't need to use this component directly, as it is used internally by the `SheetContent` component.\n *\n * @private\n */\nconst SheetOverlay = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Overlay>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Overlay\n\t\tclassName={cx(\n\t\t\t\"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-40 backdrop-blur-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t\tref={ref}\n\t/>\n));\nSheetOverlay.displayName = SheetPrimitive.Overlay.displayName;\n\nconst SheetVariants = cva(\n\t\"bg-dialog border-dialog inset-y-0 h-full w-full fixed z-40 flex flex-col shadow-lg outline-none transition ease-in-out focus-within:outline-none data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in\",\n\t{\n\t\tvariants: {\n\t\t\t/**\n\t\t\t * The side of the screen the sheet should slide in from.\n\t\t\t */\n\t\t\tside: {\n\t\t\t\tleft: \"data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r\",\n\t\t\t\tright:\n\t\t\t\t\t\"data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tside: \"right\",\n\t\t},\n\t},\n);\n\ntype SheetContentProps = ComponentPropsWithoutRef<\n\ttypeof SheetPrimitive.Content\n> &\n\tVariantProps<typeof SheetVariants> & {\n\t\t/**\n\t\t * The preferred width of the `SheetContent` as a tailwind `max-w-` class.\n\t\t *\n\t\t * By default, a `Sheet`'s content width is responsive with a default\n\t\t * preferred width: the maximum width of the `SheetContent` when the window\n\t\t * viewport is larger than the mobile breakpoint (`sm`).\n\t\t *\n\t\t * @default `sm:max-w-[30rem]`\n\t\t */\n\t\tpreferredWidth?: `sm:max-w-${string}`;\n\t};\n\n/**\n * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.\n * Renders on top of the overlay backdrop.\n * Should contain the `SheetHeader`, `SheetBody`, and `SheetFooter`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-content\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetContent = forwardRef<ComponentRef<\"div\">, SheetContentProps>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonInteractOutside,\n\t\t\tonPointerDownOutside,\n\t\t\tpreferredWidth = \"sm:max-w-[30rem]\",\n\t\t\tside = \"right\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<SheetPortal>\n\t\t\t<SheetOverlay />\n\t\t\t<SheetPrimitive.Content\n\t\t\t\tclassName={cx(SheetVariants({ side }), preferredWidth, className)}\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\tref={ref}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SheetPrimitive.Content>\n\t\t</SheetPortal>\n\t),\n);\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\ntype SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\n\n/**\n * An icon button that closes the `Sheet` when clicked.\n * Should be rendered within the `SheetHeader` as a child of `SheetActions`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-close-icon-button\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetCloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Sheet\",\n\tappearance = \"ghost\",\n\t...props\n}: SheetCloseIconButtonProps) => (\n\t<SheetPrimitive.Close asChild>\n\t\t<IconButton\n\t\t\tappearance={appearance}\n\t\t\ticon={<XIcon />}\n\t\t\tlabel={label}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t</SheetPrimitive.Close>\n);\n\n/**\n * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.\n * Should be rendered as a child of `SheetContent`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-body\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetBody = ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\"scrollbar text-body flex-1 overflow-y-auto p-6\", className)}\n\t\t{...props}\n\t/>\n);\n\n/**\n * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.\n * Should be rendered as a child of `SheetContent`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-header\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetHeader = ({\n\tclassName,\n\t...props\n}: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\n\n/**\n * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.\n * Should be rendered as a child of `SheetContent`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-footer\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetFooter = ({\n\tclassName,\n\t...props\n}: HTMLAttributes<HTMLDivElement>) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\n\n/**\n * The title for a `Sheet`. Typically rendered as a child of `SheetTitleGroup`.\n * Defaults to an `h2` element, but can be changed via the `asChild` prop.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetTitle = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong flex-1 truncate text-lg font-medium\", className)}\n\t\t{...props}\n\t/>\n));\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/**\n * A group container for the title and actions of a sheet. Typically rendered as a child of `SheetHeader`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-title-group\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetTitleGroup = forwardRef<\n\tComponentRef<\"div\">,\n\tHTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => (\n\t<div\n\t\tclassName={cx(\"flex items-center justify-between gap-2\", className)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t{children}\n\t</div>\n));\nSheetTitleGroup.displayName = \"SheetTitleGroup\";\n\n/**\n * A description for a sheet. Typically rendered as a child of `SheetHeader`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-description\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetDescription = forwardRef<\n\tComponentRef<typeof SheetPrimitive.Description>,\n\tComponentPropsWithoutRef<typeof SheetPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<SheetPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-body text-sm\", className)}\n\t\t{...props}\n\t/>\n));\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/**\n * A group container for the actions of a `Sheet`. Typically rendered as a child of `SheetTitleGroup`.\n *\n * @see https://mantle.ngrok.com/components/sheet#api-sheet-actions\n *\n * @example\n * ```tsx\n * // Sheet without a trigger (e.g. router controlled)\n * <Sheet open opOpenChange={() => onClose()}>\n * <SheetContent>\n * <SheetHeader>\n * <SheetTitleGroup>\n * <SheetTitle>Are you absolutely sure?</SheetTitle>\n * <SheetActions>\n * <IconButton\n * appearance=\"ghost\"\n * type=\"button\"\n * icon={<TrashSimple />}\n * label=\"Delete\"\n * />\n * <Separator orientation=\"vertical\" className=\"h-[80%]\" />\n * <SheetCloseIconButton />\n * </SheetActions>\n * </SheetTitleGroup>\n * <SheetDescription>\n * This action cannot be undone. This will permanently delete your account and remove your data from our servers.\n * </SheetDescription>\n * </SheetHeader>\n * <SheetBody>\n * <p>\n * Consequat do voluptate culpa fugiat consequat nostrud duis\n * aliqua minim. Tempor voluptate cillum elit velit. Voluptate\n * aliqua ipsum aliqua dolore in nisi ea fugiat aliqua velit\n * proident amet.\n * </p>\n * </SheetBody>\n * <SheetFooter>\n * <SheetClose asChild>\n * <Button type=\"button\">Close</Button>\n * </SheetClose>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </SheetFooter>\n * </SheetContent>\n * </Sheet>\n * ```\n */\nconst SheetActions = forwardRef<\n\tComponentRef<\"div\">,\n\tHTMLAttributes<HTMLDivElement>\n>(({ children, className, ...props }, ref) => (\n\t<div\n\t\tclassName={cx(\"flex h-full items-center gap-2\", className)}\n\t\t{...props}\n\t\tref={ref}\n\t>\n\t\t{children}\n\t</div>\n));\nSheetActions.displayName = \"SheetActions\";\n\nexport {\n\t//,\n\tSheet,\n\tSheetActions,\n\tSheetBody,\n\tSheetClose,\n\tSheetCloseIconButton,\n\tSheetContent,\n\tSheetDescription,\n\tSheetFooter,\n\tSheetHeader,\n\tSheetTitle,\n\tSheetTitleGroup,\n\tSheetTrigger,\n};\n"],"mappings":"qZAAA,OAAS,KAAKA,MAAa,0BAC3B,OAA4B,OAAAC,MAAW,2BAMvC,OAAS,cAAAC,MAAkB,QAwL1B,cAAAC,EA6GC,QAAAC,MA7GD,oBAjFD,IAAMC,EAAuBC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,EAAC,OACA,UAAWgB,EAAG,iDAAkDJ,CAAS,EACxE,GAAGC,EACL,EAoDKuB,EAAc,CAAC,CACpB,UAAAxB,EACA,GAAGC,CACJ,IACCb,EAAC,OACA,UAAWgB,EACV,2EACA,0BACAJ,CACD,EACC,GAAGC,EACL,EAoDKwB,EAAc,CAAC,CACpB,UAAAzB,EACA,GAAGC,CACJ,IACCb,EAAC,OACA,UAAWgB,EACV,2EACAJ,CACD,EACC,GAAGC,EACL,EAoDKyB,EAAa3B,EAGjB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAgBuC,EAAf,CACA,IAAKzB,EACL,UAAWE,EAAG,kDAAmDJ,CAAS,EACzE,GAAGC,EACL,CACA,EACDyB,EAAW,YAA6BC,EAAM,YAkD9C,IAAMC,EAAkB7B,EAGtB,CAAC,CAAE,SAAAS,EAAU,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACrCd,EAAC,OACA,UAAWgB,EAAG,0CAA2CJ,CAAS,EACjE,GAAGC,EACJ,IAAKC,EAEJ,SAAAM,EACF,CACA,EACDoB,EAAgB,YAAc,kBAkD9B,IAAMC,EAAmB9B,EAGvB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAgB0C,EAAf,CACA,IAAK5B,EACL,UAAWE,EAAG,oBAAqBJ,CAAS,EAC3C,GAAGC,EACL,CACA,EACD4B,EAAiB,YAA6BC,EAAY,YAkD1D,IAAMC,EAAehC,EAGnB,CAAC,CAAE,SAAAS,EAAU,UAAAR,EAAW,GAAGC,CAAM,EAAGC,IACrCd,EAAC,OACA,UAAWgB,EAAG,iCAAkCJ,CAAS,EACxD,GAAGC,EACJ,IAAKC,EAEJ,SAAAM,EACF,CACA,EACDuB,EAAa,YAAc","names":["XIcon","cva","forwardRef","jsx","jsxs","Sheet","Root","SheetTrigger","Trigger","SheetClose","Close","SheetPortal","Portal","SheetOverlay","forwardRef","className","props","ref","Overlay","cx","SheetVariants","cva","SheetContent","children","onInteractOutside","onPointerDownOutside","preferredWidth","side","Content","event","preventCloseOnPromptInteraction","SheetCloseIconButton","size","type","label","appearance","IconButton","XIcon","SheetBody","SheetHeader","SheetFooter","SheetTitle","Title","SheetTitleGroup","SheetDescription","Description","SheetActions"]}
@@ -1,2 +1,2 @@
1
- import $ from"tailwindcss-animate";import n from"tailwindcss/defaultTheme.js";import f from"tailwindcss/plugin.js";import x from"tailwindcss/plugin.js";function t(a){return Object.fromEntries(Object.entries(a).filter(([l])=>l!=="DEFAULT"))}function o(a,l){let r={},{parentKey:e="",separator:s="-"}=l??{};for(let v in a)if(Object.hasOwn(a,v)){let p=e?`${e}${s}${v}`:v,h=a[v];if(h==null)continue;typeof h=="object"&&!Array.isArray(h)?Object.assign(r,o(h,{parentKey:p})):r[p]=h}return r}var i=x(a=>{a.matchUtilities({"animation-duration":l=>({animationDuration:l})},{values:t(a.theme("animationDuration"))})});import w from"tailwindcss/plugin.js";var u=w(a=>{a.addVariant("aria-enabled",({modifySelectors:l,separator:r})=>{l(({className:e})=>`:not([aria-disabled]).${a.e(`aria-enabled${r}${e}`)}`)})});import b from"tailwindcss/plugin.js";var c=b(a=>{a.addVariant("firefox",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"supports",params:"(-moz-appearance:none)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`firefox${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})})});import y from"tailwindcss/plugin.js";var d=y(a=>{a.matchUtilities({"stop-opacity":l=>({"stop-opacity":l})},{values:t(a.theme("opacity")),respectImportant:!0,respectPrefix:!0}),a.matchUtilities({"stop-color":l=>({"stop-color":l})},{values:o(a.theme("colors")),respectImportant:!0,respectPrefix:!0,type:"color"})});import P from"tailwindcss/plugin.js";var g=P(a=>{a.addVariant("pointer-coarse",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(pointer: coarse)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`pointer-coarse${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("pointer-fine",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(pointer: fine)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`pointer-fine${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("pointer-none",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(pointer: none)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`pointer-none${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("hover-hover",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(hover: hover)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`hover-hover${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("hover-none",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(hover: none)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`hover-none${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})})});import k from"tailwindcss/plugin.js";var m=k(a=>{a.addVariant("where",({modifySelectors:l,separator:r})=>{l(({className:e})=>`:where(&.${a.e(`where${r}${e}`)})`)})});var R={inherit:"inherit",current:"currentColor",transparent:"transparent",white:"hsl(var(--white) / <alpha-value>)",black:"hsl(var(--black) / <alpha-value>)",gray:{50:"hsl(var(--gray-50) / <alpha-value>)",100:"hsl(var(--gray-100) / <alpha-value>)",200:"hsl(var(--gray-200) / <alpha-value>)",300:"hsl(var(--gray-300) / <alpha-value>)",400:"hsl(var(--gray-400) / <alpha-value>)",500:"hsl(var(--gray-500) / <alpha-value>)",600:"hsl(var(--gray-600) / <alpha-value>)",700:"hsl(var(--gray-700) / <alpha-value>)",800:"hsl(var(--gray-800) / <alpha-value>)",900:"hsl(var(--gray-900) / <alpha-value>)",950:"hsl(var(--gray-950) / <alpha-value>)"},red:{50:"hsl(var(--red-50) / <alpha-value>)",100:"hsl(var(--red-100) / <alpha-value>)",200:"hsl(var(--red-200) / <alpha-value>)",300:"hsl(var(--red-300) / <alpha-value>)",400:"hsl(var(--red-400) / <alpha-value>)",500:"hsl(var(--red-500) / <alpha-value>)",600:"hsl(var(--red-600) / <alpha-value>)",700:"hsl(var(--red-700) / <alpha-value>)",800:"hsl(var(--red-800) / <alpha-value>)",900:"hsl(var(--red-900) / <alpha-value>)",950:"hsl(var(--red-950) / <alpha-value>)"},orange:{50:"hsl(var(--orange-50) / <alpha-value>)",100:"hsl(var(--orange-100) / <alpha-value>)",200:"hsl(var(--orange-200) / <alpha-value>)",300:"hsl(var(--orange-300) / <alpha-value>)",400:"hsl(var(--orange-400) / <alpha-value>)",500:"hsl(var(--orange-500) / <alpha-value>)",600:"hsl(var(--orange-600) / <alpha-value>)",700:"hsl(var(--orange-700) / <alpha-value>)",800:"hsl(var(--orange-800) / <alpha-value>)",900:"hsl(var(--orange-900) / <alpha-value>)",950:"hsl(var(--orange-950) / <alpha-value>)"},amber:{50:"hsl(var(--amber-50) / <alpha-value>)",100:"hsl(var(--amber-100) / <alpha-value>)",200:"hsl(var(--amber-200) / <alpha-value>)",300:"hsl(var(--amber-300) / <alpha-value>)",400:"hsl(var(--amber-400) / <alpha-value>)",500:"hsl(var(--amber-500) / <alpha-value>)",600:"hsl(var(--amber-600) / <alpha-value>)",700:"hsl(var(--amber-700) / <alpha-value>)",800:"hsl(var(--amber-800) / <alpha-value>)",900:"hsl(var(--amber-900) / <alpha-value>)",950:"hsl(var(--amber-950) / <alpha-value>)"},yellow:{50:"hsl(var(--yellow-50) / <alpha-value>)",100:"hsl(var(--yellow-100) / <alpha-value>)",200:"hsl(var(--yellow-200) / <alpha-value>)",300:"hsl(var(--yellow-300) / <alpha-value>)",400:"hsl(var(--yellow-400) / <alpha-value>)",500:"hsl(var(--yellow-500) / <alpha-value>)",600:"hsl(var(--yellow-600) / <alpha-value>)",700:"hsl(var(--yellow-700) / <alpha-value>)",800:"hsl(var(--yellow-800) / <alpha-value>)",900:"hsl(var(--yellow-900) / <alpha-value>)",950:"hsl(var(--yellow-950) / <alpha-value>)"},lime:{50:"hsl(var(--lime-50) / <alpha-value>)",100:"hsl(var(--lime-100) / <alpha-value>)",200:"hsl(var(--lime-200) / <alpha-value>)",300:"hsl(var(--lime-300) / <alpha-value>)",400:"hsl(var(--lime-400) / <alpha-value>)",500:"hsl(var(--lime-500) / <alpha-value>)",600:"hsl(var(--lime-600) / <alpha-value>)",700:"hsl(var(--lime-700) / <alpha-value>)",800:"hsl(var(--lime-800) / <alpha-value>)",900:"hsl(var(--lime-900) / <alpha-value>)",950:"hsl(var(--lime-950) / <alpha-value>)"},green:{50:"hsl(var(--green-50) / <alpha-value>)",100:"hsl(var(--green-100) / <alpha-value>)",200:"hsl(var(--green-200) / <alpha-value>)",300:"hsl(var(--green-300) / <alpha-value>)",400:"hsl(var(--green-400) / <alpha-value>)",500:"hsl(var(--green-500) / <alpha-value>)",600:"hsl(var(--green-600) / <alpha-value>)",700:"hsl(var(--green-700) / <alpha-value>)",800:"hsl(var(--green-800) / <alpha-value>)",900:"hsl(var(--green-900) / <alpha-value>)",950:"hsl(var(--green-950) / <alpha-value>)"},emerald:{50:"hsl(var(--emerald-50) / <alpha-value>)",100:"hsl(var(--emerald-100) / <alpha-value>)",200:"hsl(var(--emerald-200) / <alpha-value>)",300:"hsl(var(--emerald-300) / <alpha-value>)",400:"hsl(var(--emerald-400) / <alpha-value>)",500:"hsl(var(--emerald-500) / <alpha-value>)",600:"hsl(var(--emerald-600) / <alpha-value>)",700:"hsl(var(--emerald-700) / <alpha-value>)",800:"hsl(var(--emerald-800) / <alpha-value>)",900:"hsl(var(--emerald-900) / <alpha-value>)",950:"hsl(var(--emerald-950) / <alpha-value>)"},teal:{50:"hsl(var(--teal-50) / <alpha-value>)",100:"hsl(var(--teal-100) / <alpha-value>)",200:"hsl(var(--teal-200) / <alpha-value>)",300:"hsl(var(--teal-300) / <alpha-value>)",400:"hsl(var(--teal-400) / <alpha-value>)",500:"hsl(var(--teal-500) / <alpha-value>)",600:"hsl(var(--teal-600) / <alpha-value>)",700:"hsl(var(--teal-700) / <alpha-value>)",800:"hsl(var(--teal-800) / <alpha-value>)",900:"hsl(var(--teal-900) / <alpha-value>)",950:"hsl(var(--teal-950) / <alpha-value>)"},cyan:{50:"hsl(var(--cyan-50) / <alpha-value>)",100:"hsl(var(--cyan-100) / <alpha-value>)",200:"hsl(var(--cyan-200) / <alpha-value>)",300:"hsl(var(--cyan-300) / <alpha-value>)",400:"hsl(var(--cyan-400) / <alpha-value>)",500:"hsl(var(--cyan-500) / <alpha-value>)",600:"hsl(var(--cyan-600) / <alpha-value>)",700:"hsl(var(--cyan-700) / <alpha-value>)",800:"hsl(var(--cyan-800) / <alpha-value>)",900:"hsl(var(--cyan-900) / <alpha-value>)",950:"hsl(var(--cyan-950) / <alpha-value>)"},sky:{50:"hsl(var(--sky-50) / <alpha-value>)",100:"hsl(var(--sky-100) / <alpha-value>)",200:"hsl(var(--sky-200) / <alpha-value>)",300:"hsl(var(--sky-300) / <alpha-value>)",400:"hsl(var(--sky-400) / <alpha-value>)",500:"hsl(var(--sky-500) / <alpha-value>)",600:"hsl(var(--sky-600) / <alpha-value>)",700:"hsl(var(--sky-700) / <alpha-value>)",800:"hsl(var(--sky-800) / <alpha-value>)",900:"hsl(var(--sky-900) / <alpha-value>)",950:"hsl(var(--sky-950) / <alpha-value>)"},blue:{50:"hsl(var(--blue-50) / <alpha-value>)",100:"hsl(var(--blue-100) / <alpha-value>)",200:"hsl(var(--blue-200) / <alpha-value>)",300:"hsl(var(--blue-300) / <alpha-value>)",400:"hsl(var(--blue-400) / <alpha-value>)",500:"hsl(var(--blue-500) / <alpha-value>)",600:"hsl(var(--blue-600) / <alpha-value>)",700:"hsl(var(--blue-700) / <alpha-value>)",800:"hsl(var(--blue-800) / <alpha-value>)",900:"hsl(var(--blue-900) / <alpha-value>)",950:"hsl(var(--blue-950) / <alpha-value>)"},indigo:{50:"hsl(var(--indigo-50) / <alpha-value>)",100:"hsl(var(--indigo-100) / <alpha-value>)",200:"hsl(var(--indigo-200) / <alpha-value>)",300:"hsl(var(--indigo-300) / <alpha-value>)",400:"hsl(var(--indigo-400) / <alpha-value>)",500:"hsl(var(--indigo-500) / <alpha-value>)",600:"hsl(var(--indigo-600) / <alpha-value>)",700:"hsl(var(--indigo-700) / <alpha-value>)",800:"hsl(var(--indigo-800) / <alpha-value>)",900:"hsl(var(--indigo-900) / <alpha-value>)",950:"hsl(var(--indigo-950) / <alpha-value>)"},violet:{50:"hsl(var(--violet-50) / <alpha-value>)",100:"hsl(var(--violet-100) / <alpha-value>)",200:"hsl(var(--violet-200) / <alpha-value>)",300:"hsl(var(--violet-300) / <alpha-value>)",400:"hsl(var(--violet-400) / <alpha-value>)",500:"hsl(var(--violet-500) / <alpha-value>)",600:"hsl(var(--violet-600) / <alpha-value>)",700:"hsl(var(--violet-700) / <alpha-value>)",800:"hsl(var(--violet-800) / <alpha-value>)",900:"hsl(var(--violet-900) / <alpha-value>)",950:"hsl(var(--violet-950) / <alpha-value>)"},purple:{50:"hsl(var(--purple-50) / <alpha-value>)",100:"hsl(var(--purple-100) / <alpha-value>)",200:"hsl(var(--purple-200) / <alpha-value>)",300:"hsl(var(--purple-300) / <alpha-value>)",400:"hsl(var(--purple-400) / <alpha-value>)",500:"hsl(var(--purple-500) / <alpha-value>)",600:"hsl(var(--purple-600) / <alpha-value>)",700:"hsl(var(--purple-700) / <alpha-value>)",800:"hsl(var(--purple-800) / <alpha-value>)",900:"hsl(var(--purple-900) / <alpha-value>)",950:"hsl(var(--purple-950) / <alpha-value>)"},fuchsia:{50:"hsl(var(--fuchsia-50) / <alpha-value>)",100:"hsl(var(--fuchsia-100) / <alpha-value>)",200:"hsl(var(--fuchsia-200) / <alpha-value>)",300:"hsl(var(--fuchsia-300) / <alpha-value>)",400:"hsl(var(--fuchsia-400) / <alpha-value>)",500:"hsl(var(--fuchsia-500) / <alpha-value>)",600:"hsl(var(--fuchsia-600) / <alpha-value>)",700:"hsl(var(--fuchsia-700) / <alpha-value>)",800:"hsl(var(--fuchsia-800) / <alpha-value>)",900:"hsl(var(--fuchsia-900) / <alpha-value>)",950:"hsl(var(--fuchsia-950) / <alpha-value>)"},pink:{50:"hsl(var(--pink-50) / <alpha-value>)",100:"hsl(var(--pink-100) / <alpha-value>)",200:"hsl(var(--pink-200) / <alpha-value>)",300:"hsl(var(--pink-300) / <alpha-value>)",400:"hsl(var(--pink-400) / <alpha-value>)",500:"hsl(var(--pink-500) / <alpha-value>)",600:"hsl(var(--pink-600) / <alpha-value>)",700:"hsl(var(--pink-700) / <alpha-value>)",800:"hsl(var(--pink-800) / <alpha-value>)",900:"hsl(var(--pink-900) / <alpha-value>)",950:"hsl(var(--pink-950) / <alpha-value>)"},rose:{50:"hsl(var(--rose-50) / <alpha-value>)",100:"hsl(var(--rose-100) / <alpha-value>)",200:"hsl(var(--rose-200) / <alpha-value>)",300:"hsl(var(--rose-300) / <alpha-value>)",400:"hsl(var(--rose-400) / <alpha-value>)",500:"hsl(var(--rose-500) / <alpha-value>)",600:"hsl(var(--rose-600) / <alpha-value>)",700:"hsl(var(--rose-700) / <alpha-value>)",800:"hsl(var(--rose-800) / <alpha-value>)",900:"hsl(var(--rose-900) / <alpha-value>)",950:"hsl(var(--rose-950) / <alpha-value>)"},neutral:{50:"hsl(var(--neutral-50) / <alpha-value>)",100:"hsl(var(--neutral-100) / <alpha-value>)",200:"hsl(var(--neutral-200) / <alpha-value>)",300:"hsl(var(--neutral-300) / <alpha-value>)",400:"hsl(var(--neutral-400) / <alpha-value>)",500:"hsl(var(--neutral-500) / <alpha-value>)",600:"hsl(var(--neutral-600) / <alpha-value>)",700:"hsl(var(--neutral-700) / <alpha-value>)",800:"hsl(var(--neutral-800) / <alpha-value>)",900:"hsl(var(--neutral-900) / <alpha-value>)",950:"hsl(var(--neutral-950) / <alpha-value>)"},accent:{50:"hsl(var(--accent-50) / <alpha-value>)",100:"hsl(var(--accent-100) / <alpha-value>)",200:"hsl(var(--accent-200) / <alpha-value>)",300:"hsl(var(--accent-300) / <alpha-value>)",400:"hsl(var(--accent-400) / <alpha-value>)",500:"hsl(var(--accent-500) / <alpha-value>)",600:"hsl(var(--accent-600) / <alpha-value>)",700:"hsl(var(--accent-700) / <alpha-value>)",800:"hsl(var(--accent-800) / <alpha-value>)",900:"hsl(var(--accent-900) / <alpha-value>)",950:"hsl(var(--accent-950) / <alpha-value>)"},danger:{50:"hsl(var(--danger-50) / <alpha-value>)",100:"hsl(var(--danger-100) / <alpha-value>)",200:"hsl(var(--danger-200) / <alpha-value>)",300:"hsl(var(--danger-300) / <alpha-value>)",400:"hsl(var(--danger-400) / <alpha-value>)",500:"hsl(var(--danger-500) / <alpha-value>)",600:"hsl(var(--danger-600) / <alpha-value>)",700:"hsl(var(--danger-700) / <alpha-value>)",800:"hsl(var(--danger-800) / <alpha-value>)",900:"hsl(var(--danger-900) / <alpha-value>)",950:"hsl(var(--danger-950) / <alpha-value>)"},warning:{50:"hsl(var(--warning-50) / <alpha-value>)",100:"hsl(var(--warning-100) / <alpha-value>)",200:"hsl(var(--warning-200) / <alpha-value>)",300:"hsl(var(--warning-300) / <alpha-value>)",400:"hsl(var(--warning-400) / <alpha-value>)",500:"hsl(var(--warning-500) / <alpha-value>)",600:"hsl(var(--warning-600) / <alpha-value>)",700:"hsl(var(--warning-700) / <alpha-value>)",800:"hsl(var(--warning-800) / <alpha-value>)",900:"hsl(var(--warning-900) / <alpha-value>)",950:"hsl(var(--warning-950) / <alpha-value>)"},success:{50:"hsl(var(--success-50) / <alpha-value>)",100:"hsl(var(--success-100) / <alpha-value>)",200:"hsl(var(--success-200) / <alpha-value>)",300:"hsl(var(--success-300) / <alpha-value>)",400:"hsl(var(--success-400) / <alpha-value>)",500:"hsl(var(--success-500) / <alpha-value>)",600:"hsl(var(--success-600) / <alpha-value>)",700:"hsl(var(--success-700) / <alpha-value>)",800:"hsl(var(--success-800) / <alpha-value>)",900:"hsl(var(--success-900) / <alpha-value>)",950:"hsl(var(--success-950) / <alpha-value>)"}},V={content:[],darkMode:"class",theme:{colors:R,container:{center:!0,padding:"2rem",screens:{"2xl":"1400px"}},extend:{animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},aria:{collapsed:'expanded="false"',invalid:'invalid="true"',unchecked:'checked="false"'},backgroundImage:{"checked-icon":`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M12.7071 4.29289c.3905.39053.3905 1.02369 0 1.41422L6.70711 11.7071c-.39053.3905-1.02369.3905-1.41422 0l-2-1.99999c-.39052-.39053-.39052-1.02369 0-1.41422.39053-.39052 1.02369-.39052 1.41422 0L6 9.58579l5.2929-5.2929c.3905-.39052 1.0237-.39052 1.4142 0Z'/%3e%3c/svg%3e")`,"indeterminate-icon":`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M4 8c0-.55228.44772-1 1-1h6c.5523 0 1 .44772 1 1s-.4477 1-1 1H5c-.55228 0-1-.44772-1-1Z'/%3e%3c/svg%3e")`},boxShadow:{sm:"0px 1px 2px 0 hsl(var(--shadow-color) / var(--shadow-first))",DEFAULT:"0px 1px 2px -1px hsl(var(--shadow-color) / var(--shadow-second)), 0px 1px 3px 0px hsl(var(--shadow-color) / var(--shadow-second))",md:"0px 2px 13px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 2px 4px -2px hsl(var(--shadow-color) / var(--shadow-second)), 0px 4px 6px -1px hsl(var(--shadow-color) / var(--shadow-second))",lg:"0px 1px 13px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 4px 6px -4px hsl(var(--shadow-color) / var(--shadow-second)), 0px 10px 15px -3px hsl(var(--shadow-color) / var(--shadow-second))",xl:"0px 0px 15px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 8px 10px -6px hsl(var(--shadow-color) / var(--shadow-second)), 0px 20px 25px -5px hsl(var(--shadow-color) / var(--shadow-second))","2xl":"0px 0px 15px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 11px 10px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 17px 25px 2px hsl(var(--shadow-color) / var(--shadow-second))",inner:"inset 0px 2px 4px 0px hsl(var(--shadow-color) / var(--shadow-first))"},backgroundColor:{base:"hsl(var(--bg-base))",card:"hsl(var(--bg-card))",dialog:"hsl(var(--bg-dialog))",form:"hsl(var(--bg-form))",overlay:"hsl(var(--bg-overlay))",popover:"hsl(var(--bg-popover))",tooltip:"hsl(var(--bg-tooltip))","base-hover":"hsl(var(--bg-base-hover))","card-hover":"hsl(var(--bg-card-hover))","filled-accent-active":"hsl(var(--bg-filled-accent-active))","filled-accent-hover":"hsl(var(--bg-filled-accent-hover))","filled-accent":"hsl(var(--bg-filled-accent))","filled-danger-active":"hsl(var(--bg-filled-danger-active))","filled-danger-hover":"hsl(var(--bg-filled-danger-hover))","filled-danger":"hsl(var(--bg-filled-danger))","filled-neutral-active":"hsl(var(--bg-filled-neutral-active))","filled-neutral-hover":"hsl(var(--bg-filled-neutral-hover))","filled-neutral":"hsl(var(--bg-filled-neutral))","filled-success-active":"hsl(var(--bg-filled-success-active))","filled-success-hover":"hsl(var(--bg-filled-success-hover))","filled-success":"hsl(var(--bg-filled-success))","filled-warning-active":"hsl(var(--bg-filled-warning-active))","filled-warning-hover":"hsl(var(--bg-filled-warning-hover))","filled-warning":"hsl(var(--bg-filled-warning))","form-active":"hsl(var(--bg-form-active))","form-hover":"hsl(var(--bg-form-hover))","popover-hover":"hsl(var(--bg-popover-hover))"},textColor:{body:"hsl(var(--text-body))",muted:"hsl(var(--text-muted))",placeholder:"hsl(var(--text-placeholder))",strong:"hsl(var(--text-strong))",tooltip:"hsl(var(--text-tooltip))","on-filled":"hsl(var(--text-on-filled))"},borderColor:{base:"hsl(var(--border-base))",card:"hsl(var(--border-card))",dialog:"hsl(var(--border-dialog))",form:"hsl(var(--border-form))",popover:"hsl(var(--border-popover))","base-muted":"hsl(var(--border-base-muted))","card-muted":"hsl(var(--border-card-muted))","dialog-muted":"hsl(var(--border-dialog-muted))","popover-muted":"hsl(var(--border-popover-muted))"},ringColor:{"focus-accent":"hsl(var(--ring-focus-accent))","focus-danger":"hsl(var(--ring-focus-danger))","focus-neutral":"hsl(var(--ring-focus-neutral))","focus-success":"hsl(var(--ring-focus-success))","focus-warning":"hsl(var(--ring-focus-warning))"},cursor:{inherit:"inherit",initial:"initial"},data:{"active-item":"active-item","drag-over":'drag-over="true"',disabled:"disabled",highlighted:"highlighted","orientation-horizontal":'orientation="horizontal"',"orientation-vertical":'orientation="vertical"',"side-bottom":'side="bottom"',"side-left":'side="left"',"side-right":'side="right"',"side-top":'side="top"',"state-active":'state~="active"',"state-checked":'state~="checked"',"state-closed":'state~="closed"',"state-idle":'state~="idle"',"state-inactive":'state~="inactive"',"state-indeterminate":'state~="indeterminate"',"state-open":'state~="open"',"state-pending":'state~="pending"',"state-selected":'state~="selected"',"state-submitting":'state~="submitting"',"state-unchecked":'state~="unchecked"',"validation-error":'validation="error"',"validation-success":'validation="success"',"validation-warning":'validation="warning"'},fontFamily:{sans:["EuclidSquare",...n.fontFamily.sans],mono:["IBMPlexMono",...n.fontFamily.mono],body:["Nunito Sans",...n.fontFamily.sans]},fontSize:{"size-inherit":"inherit","size-mono":["0.8125rem","1.25rem"]},fontWeight:{initial:"initial"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}},"fade-in":{"0%":{opacity:"0"},"100%":{opacity:"1"}},spin:{from:{transform:"rotate(var(--spin-start-deg, 0))"},to:{transform:"rotate(var(--spin-end-deg, 360deg))"}}},lineHeight:{0:"0",initial:"initial"},screens:{xs:"480px"},spacing:{"1.25":"0.3125rem"},transitionProperty:{"max-height":"max-height"},zIndex:{1:"1",max:"2147483647"}}},plugins:[i,u,c,d,g,$,m,f(({addVariant:a})=>{a("dark-high-contrast",[":is(.dark-high-contrast &)"]),a("high-contrast",[":is(.light-high-contrast &)"])}),f(({addVariant:a})=>{a("not-disabled",["&:not(:disabled)"]),a("not-aria-disabled",['&:not(&[aria-disabled="true"])'])})]};import j from"node:path";function A(a){try{let l=a.resolve("@ngrok/mantle/tailwind-preset");return j.join(l,"..","**","*.js")}catch(l){return console.warn(l),"node_modules/@ngrok/mantle/dist/**/*.js"}}export{V as mantlePreset,A as resolveMantleContentGlob};
1
+ import $ from"tailwindcss-animate";import n from"tailwindcss/defaultTheme.js";import f from"tailwindcss/plugin.js";import x from"tailwindcss/plugin.js";function t(a){return Object.fromEntries(Object.entries(a).filter(([l])=>l!=="DEFAULT"))}function o(a,l){let r={},{parentKey:e="",separator:s="-"}=l??{};for(let v in a)if(Object.hasOwn(a,v)){let p=e?`${e}${s}${v}`:v,h=a[v];if(h==null)continue;typeof h=="object"&&!Array.isArray(h)?Object.assign(r,o(h,{parentKey:p})):r[p]=h}return r}var i=x(a=>{a.matchUtilities({"animation-duration":l=>({animationDuration:l})},{values:t(a.theme("animationDuration"))})});import w from"tailwindcss/plugin.js";var u=w(a=>{a.addVariant("aria-enabled",({modifySelectors:l,separator:r})=>{l(({className:e})=>`:not([aria-disabled]).${a.e(`aria-enabled${r}${e}`)}`)})});import b from"tailwindcss/plugin.js";var c=b(a=>{a.addVariant("firefox",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"supports",params:"(-moz-appearance:none)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`firefox${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})})});import y from"tailwindcss/plugin.js";var d=y(a=>{a.matchUtilities({"stop-opacity":l=>({"stop-opacity":l})},{values:t(a.theme("opacity")),respectImportant:!0,respectPrefix:!0}),a.matchUtilities({"stop-color":l=>({"stop-color":l})},{values:o(a.theme("colors")),respectImportant:!0,respectPrefix:!0,type:"color"})});import P from"tailwindcss/plugin.js";var g=P(a=>{a.addVariant("pointer-coarse",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(pointer: coarse)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`pointer-coarse${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("pointer-fine",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(pointer: fine)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`pointer-fine${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("pointer-none",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(pointer: none)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`pointer-none${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("hover-hover",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(hover: hover)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`hover-hover${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})}),a.addVariant("hover-none",({container:l,separator:r})=>{let e=a.postcss.atRule({name:"media",params:"(hover: none)"});e.append(l.nodes),l.append(e),e.walkRules(s=>{s.selector=`.${a.e(`hover-none${r}${s.selector.slice(1).replace(/\\/g,"")}`)}`})})});import k from"tailwindcss/plugin.js";var m=k(a=>{a.addVariant("where",({modifySelectors:l,separator:r})=>{l(({className:e})=>`:where(&.${a.e(`where${r}${e}`)})`)})});var R={inherit:"inherit",current:"currentColor",transparent:"transparent",white:"hsl(var(--white) / <alpha-value>)",black:"hsl(var(--black) / <alpha-value>)",gray:{50:"hsl(var(--gray-50) / <alpha-value>)",100:"hsl(var(--gray-100) / <alpha-value>)",200:"hsl(var(--gray-200) / <alpha-value>)",300:"hsl(var(--gray-300) / <alpha-value>)",400:"hsl(var(--gray-400) / <alpha-value>)",500:"hsl(var(--gray-500) / <alpha-value>)",600:"hsl(var(--gray-600) / <alpha-value>)",700:"hsl(var(--gray-700) / <alpha-value>)",800:"hsl(var(--gray-800) / <alpha-value>)",900:"hsl(var(--gray-900) / <alpha-value>)",950:"hsl(var(--gray-950) / <alpha-value>)"},red:{50:"hsl(var(--red-50) / <alpha-value>)",100:"hsl(var(--red-100) / <alpha-value>)",200:"hsl(var(--red-200) / <alpha-value>)",300:"hsl(var(--red-300) / <alpha-value>)",400:"hsl(var(--red-400) / <alpha-value>)",500:"hsl(var(--red-500) / <alpha-value>)",600:"hsl(var(--red-600) / <alpha-value>)",700:"hsl(var(--red-700) / <alpha-value>)",800:"hsl(var(--red-800) / <alpha-value>)",900:"hsl(var(--red-900) / <alpha-value>)",950:"hsl(var(--red-950) / <alpha-value>)"},orange:{50:"hsl(var(--orange-50) / <alpha-value>)",100:"hsl(var(--orange-100) / <alpha-value>)",200:"hsl(var(--orange-200) / <alpha-value>)",300:"hsl(var(--orange-300) / <alpha-value>)",400:"hsl(var(--orange-400) / <alpha-value>)",500:"hsl(var(--orange-500) / <alpha-value>)",600:"hsl(var(--orange-600) / <alpha-value>)",700:"hsl(var(--orange-700) / <alpha-value>)",800:"hsl(var(--orange-800) / <alpha-value>)",900:"hsl(var(--orange-900) / <alpha-value>)",950:"hsl(var(--orange-950) / <alpha-value>)"},amber:{50:"hsl(var(--amber-50) / <alpha-value>)",100:"hsl(var(--amber-100) / <alpha-value>)",200:"hsl(var(--amber-200) / <alpha-value>)",300:"hsl(var(--amber-300) / <alpha-value>)",400:"hsl(var(--amber-400) / <alpha-value>)",500:"hsl(var(--amber-500) / <alpha-value>)",600:"hsl(var(--amber-600) / <alpha-value>)",700:"hsl(var(--amber-700) / <alpha-value>)",800:"hsl(var(--amber-800) / <alpha-value>)",900:"hsl(var(--amber-900) / <alpha-value>)",950:"hsl(var(--amber-950) / <alpha-value>)"},yellow:{50:"hsl(var(--yellow-50) / <alpha-value>)",100:"hsl(var(--yellow-100) / <alpha-value>)",200:"hsl(var(--yellow-200) / <alpha-value>)",300:"hsl(var(--yellow-300) / <alpha-value>)",400:"hsl(var(--yellow-400) / <alpha-value>)",500:"hsl(var(--yellow-500) / <alpha-value>)",600:"hsl(var(--yellow-600) / <alpha-value>)",700:"hsl(var(--yellow-700) / <alpha-value>)",800:"hsl(var(--yellow-800) / <alpha-value>)",900:"hsl(var(--yellow-900) / <alpha-value>)",950:"hsl(var(--yellow-950) / <alpha-value>)"},lime:{50:"hsl(var(--lime-50) / <alpha-value>)",100:"hsl(var(--lime-100) / <alpha-value>)",200:"hsl(var(--lime-200) / <alpha-value>)",300:"hsl(var(--lime-300) / <alpha-value>)",400:"hsl(var(--lime-400) / <alpha-value>)",500:"hsl(var(--lime-500) / <alpha-value>)",600:"hsl(var(--lime-600) / <alpha-value>)",700:"hsl(var(--lime-700) / <alpha-value>)",800:"hsl(var(--lime-800) / <alpha-value>)",900:"hsl(var(--lime-900) / <alpha-value>)",950:"hsl(var(--lime-950) / <alpha-value>)"},green:{50:"hsl(var(--green-50) / <alpha-value>)",100:"hsl(var(--green-100) / <alpha-value>)",200:"hsl(var(--green-200) / <alpha-value>)",300:"hsl(var(--green-300) / <alpha-value>)",400:"hsl(var(--green-400) / <alpha-value>)",500:"hsl(var(--green-500) / <alpha-value>)",600:"hsl(var(--green-600) / <alpha-value>)",700:"hsl(var(--green-700) / <alpha-value>)",800:"hsl(var(--green-800) / <alpha-value>)",900:"hsl(var(--green-900) / <alpha-value>)",950:"hsl(var(--green-950) / <alpha-value>)"},emerald:{50:"hsl(var(--emerald-50) / <alpha-value>)",100:"hsl(var(--emerald-100) / <alpha-value>)",200:"hsl(var(--emerald-200) / <alpha-value>)",300:"hsl(var(--emerald-300) / <alpha-value>)",400:"hsl(var(--emerald-400) / <alpha-value>)",500:"hsl(var(--emerald-500) / <alpha-value>)",600:"hsl(var(--emerald-600) / <alpha-value>)",700:"hsl(var(--emerald-700) / <alpha-value>)",800:"hsl(var(--emerald-800) / <alpha-value>)",900:"hsl(var(--emerald-900) / <alpha-value>)",950:"hsl(var(--emerald-950) / <alpha-value>)"},teal:{50:"hsl(var(--teal-50) / <alpha-value>)",100:"hsl(var(--teal-100) / <alpha-value>)",200:"hsl(var(--teal-200) / <alpha-value>)",300:"hsl(var(--teal-300) / <alpha-value>)",400:"hsl(var(--teal-400) / <alpha-value>)",500:"hsl(var(--teal-500) / <alpha-value>)",600:"hsl(var(--teal-600) / <alpha-value>)",700:"hsl(var(--teal-700) / <alpha-value>)",800:"hsl(var(--teal-800) / <alpha-value>)",900:"hsl(var(--teal-900) / <alpha-value>)",950:"hsl(var(--teal-950) / <alpha-value>)"},cyan:{50:"hsl(var(--cyan-50) / <alpha-value>)",100:"hsl(var(--cyan-100) / <alpha-value>)",200:"hsl(var(--cyan-200) / <alpha-value>)",300:"hsl(var(--cyan-300) / <alpha-value>)",400:"hsl(var(--cyan-400) / <alpha-value>)",500:"hsl(var(--cyan-500) / <alpha-value>)",600:"hsl(var(--cyan-600) / <alpha-value>)",700:"hsl(var(--cyan-700) / <alpha-value>)",800:"hsl(var(--cyan-800) / <alpha-value>)",900:"hsl(var(--cyan-900) / <alpha-value>)",950:"hsl(var(--cyan-950) / <alpha-value>)"},sky:{50:"hsl(var(--sky-50) / <alpha-value>)",100:"hsl(var(--sky-100) / <alpha-value>)",200:"hsl(var(--sky-200) / <alpha-value>)",300:"hsl(var(--sky-300) / <alpha-value>)",400:"hsl(var(--sky-400) / <alpha-value>)",500:"hsl(var(--sky-500) / <alpha-value>)",600:"hsl(var(--sky-600) / <alpha-value>)",700:"hsl(var(--sky-700) / <alpha-value>)",800:"hsl(var(--sky-800) / <alpha-value>)",900:"hsl(var(--sky-900) / <alpha-value>)",950:"hsl(var(--sky-950) / <alpha-value>)"},blue:{50:"hsl(var(--blue-50) / <alpha-value>)",100:"hsl(var(--blue-100) / <alpha-value>)",200:"hsl(var(--blue-200) / <alpha-value>)",300:"hsl(var(--blue-300) / <alpha-value>)",400:"hsl(var(--blue-400) / <alpha-value>)",500:"hsl(var(--blue-500) / <alpha-value>)",600:"hsl(var(--blue-600) / <alpha-value>)",700:"hsl(var(--blue-700) / <alpha-value>)",800:"hsl(var(--blue-800) / <alpha-value>)",900:"hsl(var(--blue-900) / <alpha-value>)",950:"hsl(var(--blue-950) / <alpha-value>)"},indigo:{50:"hsl(var(--indigo-50) / <alpha-value>)",100:"hsl(var(--indigo-100) / <alpha-value>)",200:"hsl(var(--indigo-200) / <alpha-value>)",300:"hsl(var(--indigo-300) / <alpha-value>)",400:"hsl(var(--indigo-400) / <alpha-value>)",500:"hsl(var(--indigo-500) / <alpha-value>)",600:"hsl(var(--indigo-600) / <alpha-value>)",700:"hsl(var(--indigo-700) / <alpha-value>)",800:"hsl(var(--indigo-800) / <alpha-value>)",900:"hsl(var(--indigo-900) / <alpha-value>)",950:"hsl(var(--indigo-950) / <alpha-value>)"},violet:{50:"hsl(var(--violet-50) / <alpha-value>)",100:"hsl(var(--violet-100) / <alpha-value>)",200:"hsl(var(--violet-200) / <alpha-value>)",300:"hsl(var(--violet-300) / <alpha-value>)",400:"hsl(var(--violet-400) / <alpha-value>)",500:"hsl(var(--violet-500) / <alpha-value>)",600:"hsl(var(--violet-600) / <alpha-value>)",700:"hsl(var(--violet-700) / <alpha-value>)",800:"hsl(var(--violet-800) / <alpha-value>)",900:"hsl(var(--violet-900) / <alpha-value>)",950:"hsl(var(--violet-950) / <alpha-value>)"},purple:{50:"hsl(var(--purple-50) / <alpha-value>)",100:"hsl(var(--purple-100) / <alpha-value>)",200:"hsl(var(--purple-200) / <alpha-value>)",300:"hsl(var(--purple-300) / <alpha-value>)",400:"hsl(var(--purple-400) / <alpha-value>)",500:"hsl(var(--purple-500) / <alpha-value>)",600:"hsl(var(--purple-600) / <alpha-value>)",700:"hsl(var(--purple-700) / <alpha-value>)",800:"hsl(var(--purple-800) / <alpha-value>)",900:"hsl(var(--purple-900) / <alpha-value>)",950:"hsl(var(--purple-950) / <alpha-value>)"},fuchsia:{50:"hsl(var(--fuchsia-50) / <alpha-value>)",100:"hsl(var(--fuchsia-100) / <alpha-value>)",200:"hsl(var(--fuchsia-200) / <alpha-value>)",300:"hsl(var(--fuchsia-300) / <alpha-value>)",400:"hsl(var(--fuchsia-400) / <alpha-value>)",500:"hsl(var(--fuchsia-500) / <alpha-value>)",600:"hsl(var(--fuchsia-600) / <alpha-value>)",700:"hsl(var(--fuchsia-700) / <alpha-value>)",800:"hsl(var(--fuchsia-800) / <alpha-value>)",900:"hsl(var(--fuchsia-900) / <alpha-value>)",950:"hsl(var(--fuchsia-950) / <alpha-value>)"},pink:{50:"hsl(var(--pink-50) / <alpha-value>)",100:"hsl(var(--pink-100) / <alpha-value>)",200:"hsl(var(--pink-200) / <alpha-value>)",300:"hsl(var(--pink-300) / <alpha-value>)",400:"hsl(var(--pink-400) / <alpha-value>)",500:"hsl(var(--pink-500) / <alpha-value>)",600:"hsl(var(--pink-600) / <alpha-value>)",700:"hsl(var(--pink-700) / <alpha-value>)",800:"hsl(var(--pink-800) / <alpha-value>)",900:"hsl(var(--pink-900) / <alpha-value>)",950:"hsl(var(--pink-950) / <alpha-value>)"},rose:{50:"hsl(var(--rose-50) / <alpha-value>)",100:"hsl(var(--rose-100) / <alpha-value>)",200:"hsl(var(--rose-200) / <alpha-value>)",300:"hsl(var(--rose-300) / <alpha-value>)",400:"hsl(var(--rose-400) / <alpha-value>)",500:"hsl(var(--rose-500) / <alpha-value>)",600:"hsl(var(--rose-600) / <alpha-value>)",700:"hsl(var(--rose-700) / <alpha-value>)",800:"hsl(var(--rose-800) / <alpha-value>)",900:"hsl(var(--rose-900) / <alpha-value>)",950:"hsl(var(--rose-950) / <alpha-value>)"},neutral:{50:"hsl(var(--neutral-50) / <alpha-value>)",100:"hsl(var(--neutral-100) / <alpha-value>)",200:"hsl(var(--neutral-200) / <alpha-value>)",300:"hsl(var(--neutral-300) / <alpha-value>)",400:"hsl(var(--neutral-400) / <alpha-value>)",500:"hsl(var(--neutral-500) / <alpha-value>)",600:"hsl(var(--neutral-600) / <alpha-value>)",700:"hsl(var(--neutral-700) / <alpha-value>)",800:"hsl(var(--neutral-800) / <alpha-value>)",900:"hsl(var(--neutral-900) / <alpha-value>)",950:"hsl(var(--neutral-950) / <alpha-value>)"},accent:{50:"hsl(var(--accent-50) / <alpha-value>)",100:"hsl(var(--accent-100) / <alpha-value>)",200:"hsl(var(--accent-200) / <alpha-value>)",300:"hsl(var(--accent-300) / <alpha-value>)",400:"hsl(var(--accent-400) / <alpha-value>)",500:"hsl(var(--accent-500) / <alpha-value>)",600:"hsl(var(--accent-600) / <alpha-value>)",700:"hsl(var(--accent-700) / <alpha-value>)",800:"hsl(var(--accent-800) / <alpha-value>)",900:"hsl(var(--accent-900) / <alpha-value>)",950:"hsl(var(--accent-950) / <alpha-value>)"},danger:{50:"hsl(var(--danger-50) / <alpha-value>)",100:"hsl(var(--danger-100) / <alpha-value>)",200:"hsl(var(--danger-200) / <alpha-value>)",300:"hsl(var(--danger-300) / <alpha-value>)",400:"hsl(var(--danger-400) / <alpha-value>)",500:"hsl(var(--danger-500) / <alpha-value>)",600:"hsl(var(--danger-600) / <alpha-value>)",700:"hsl(var(--danger-700) / <alpha-value>)",800:"hsl(var(--danger-800) / <alpha-value>)",900:"hsl(var(--danger-900) / <alpha-value>)",950:"hsl(var(--danger-950) / <alpha-value>)"},warning:{50:"hsl(var(--warning-50) / <alpha-value>)",100:"hsl(var(--warning-100) / <alpha-value>)",200:"hsl(var(--warning-200) / <alpha-value>)",300:"hsl(var(--warning-300) / <alpha-value>)",400:"hsl(var(--warning-400) / <alpha-value>)",500:"hsl(var(--warning-500) / <alpha-value>)",600:"hsl(var(--warning-600) / <alpha-value>)",700:"hsl(var(--warning-700) / <alpha-value>)",800:"hsl(var(--warning-800) / <alpha-value>)",900:"hsl(var(--warning-900) / <alpha-value>)",950:"hsl(var(--warning-950) / <alpha-value>)"},success:{50:"hsl(var(--success-50) / <alpha-value>)",100:"hsl(var(--success-100) / <alpha-value>)",200:"hsl(var(--success-200) / <alpha-value>)",300:"hsl(var(--success-300) / <alpha-value>)",400:"hsl(var(--success-400) / <alpha-value>)",500:"hsl(var(--success-500) / <alpha-value>)",600:"hsl(var(--success-600) / <alpha-value>)",700:"hsl(var(--success-700) / <alpha-value>)",800:"hsl(var(--success-800) / <alpha-value>)",900:"hsl(var(--success-900) / <alpha-value>)",950:"hsl(var(--success-950) / <alpha-value>)"}},V={content:[],darkMode:"class",theme:{colors:R,container:{center:!0,padding:"2rem",screens:{"2xl":"1400px"}},extend:{animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},aria:{collapsed:'expanded="false"',invalid:'invalid="true"',unchecked:'checked="false"'},backgroundImage:{"checked-icon":`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M12.7071 4.29289c.3905.39053.3905 1.02369 0 1.41422L6.70711 11.7071c-.39053.3905-1.02369.3905-1.41422 0l-2-1.99999c-.39052-.39053-.39052-1.02369 0-1.41422.39053-.39052 1.02369-.39052 1.41422 0L6 9.58579l5.2929-5.2929c.3905-.39052 1.0237-.39052 1.4142 0Z'/%3e%3c/svg%3e")`,"indeterminate-icon":`url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath fill='white' d='M4 8c0-.55228.44772-1 1-1h6c.5523 0 1 .44772 1 1s-.4477 1-1 1H5c-.55228 0-1-.44772-1-1Z'/%3e%3c/svg%3e")`},boxShadow:{sm:"0px 1px 2px 0 hsl(var(--shadow-color) / var(--shadow-first))",DEFAULT:"0px 1px 2px -1px hsl(var(--shadow-color) / var(--shadow-second)), 0px 1px 3px 0px hsl(var(--shadow-color) / var(--shadow-second))",md:"0px 2px 13px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 2px 4px -2px hsl(var(--shadow-color) / var(--shadow-second)), 0px 4px 6px -1px hsl(var(--shadow-color) / var(--shadow-second))",lg:"0px 1px 13px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 4px 6px -4px hsl(var(--shadow-color) / var(--shadow-second)), 0px 10px 15px -3px hsl(var(--shadow-color) / var(--shadow-second))",xl:"0px 0px 15px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 8px 10px -6px hsl(var(--shadow-color) / var(--shadow-second)), 0px 20px 25px -5px hsl(var(--shadow-color) / var(--shadow-second))","2xl":"0px 0px 15px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 11px 10px 0px hsl(var(--shadow-color) / var(--shadow-first)), 0px 17px 25px 2px hsl(var(--shadow-color) / var(--shadow-second))",inner:"inset 0px 2px 4px 0px hsl(var(--shadow-color) / var(--shadow-first))"},backgroundColor:{base:"hsl(var(--bg-base))",card:"hsl(var(--bg-card))",dialog:"hsl(var(--bg-dialog))",form:"hsl(var(--bg-form))",overlay:"hsl(var(--bg-overlay))",popover:"hsl(var(--bg-popover))",tooltip:"hsl(var(--bg-tooltip))","base-hover":"hsl(var(--bg-base-hover))","card-hover":"hsl(var(--bg-card-hover))","filled-accent-active":"hsl(var(--bg-filled-accent-active))","filled-accent-hover":"hsl(var(--bg-filled-accent-hover))","filled-accent":"hsl(var(--bg-filled-accent))","filled-danger-active":"hsl(var(--bg-filled-danger-active))","filled-danger-hover":"hsl(var(--bg-filled-danger-hover))","filled-danger":"hsl(var(--bg-filled-danger))","filled-neutral-active":"hsl(var(--bg-filled-neutral-active))","filled-neutral-hover":"hsl(var(--bg-filled-neutral-hover))","filled-neutral":"hsl(var(--bg-filled-neutral))","filled-success-active":"hsl(var(--bg-filled-success-active))","filled-success-hover":"hsl(var(--bg-filled-success-hover))","filled-success":"hsl(var(--bg-filled-success))","filled-warning-active":"hsl(var(--bg-filled-warning-active))","filled-warning-hover":"hsl(var(--bg-filled-warning-hover))","filled-warning":"hsl(var(--bg-filled-warning))","form-active":"hsl(var(--bg-form-active))","form-hover":"hsl(var(--bg-form-hover))","popover-hover":"hsl(var(--bg-popover-hover))"},textColor:{body:"hsl(var(--text-body))",muted:"hsl(var(--text-muted))",placeholder:"hsl(var(--text-placeholder))",strong:"hsl(var(--text-strong))",tooltip:"hsl(var(--text-tooltip))","on-filled":"hsl(var(--text-on-filled))"},borderColor:{base:"hsl(var(--border-base))",card:"hsl(var(--border-card))",dialog:"hsl(var(--border-dialog))",form:"hsl(var(--border-form))",popover:"hsl(var(--border-popover))","base-muted":"hsl(var(--border-base-muted))","card-muted":"hsl(var(--border-card-muted))","dialog-muted":"hsl(var(--border-dialog-muted))","popover-muted":"hsl(var(--border-popover-muted))"},ringColor:{"focus-accent":"hsl(var(--ring-focus-accent))","focus-danger":"hsl(var(--ring-focus-danger))","focus-neutral":"hsl(var(--ring-focus-neutral))","focus-success":"hsl(var(--ring-focus-success))","focus-warning":"hsl(var(--ring-focus-warning))"},cursor:{inherit:"inherit",initial:"initial"},data:{"active-item":"active-item","drag-over":'drag-over="true"',disabled:"disabled",highlighted:"highlighted","orientation-horizontal":'orientation="horizontal"',"orientation-vertical":'orientation="vertical"',"side-bottom":'side="bottom"',"side-left":'side="left"',"side-right":'side="right"',"side-top":'side="top"',"state-active":'state~="active"',"state-checked":'state~="checked"',"state-closed":'state~="closed"',"state-idle":'state~="idle"',"state-inactive":'state~="inactive"',"state-indeterminate":'state~="indeterminate"',"state-open":'state~="open"',"state-pending":'state~="pending"',"state-selected":'state~="selected"',"state-submitting":'state~="submitting"',"state-unchecked":'state~="unchecked"',"validation-error":'validation="error"',"validation-success":'validation="success"',"validation-warning":'validation="warning"'},fontFamily:{sans:["EuclidSquare",...n.fontFamily.sans],mono:["IBMPlexMono",...n.fontFamily.mono],body:["Nunito Sans",...n.fontFamily.sans]},fontSize:{"size-inherit":"inherit","size-mono":["0.8125rem","1.25rem"]},fontWeight:{initial:"initial"},keyframes:{"accordion-down":{from:{height:"0"},to:{height:"var(--radix-accordion-content-height)"}},"accordion-up":{from:{height:"var(--radix-accordion-content-height)"},to:{height:"0"}},"fade-in":{"0%":{opacity:"0"},"100%":{opacity:"1"}},spin:{from:{transform:"rotate(var(--spin-start-deg, 0))"},to:{transform:"rotate(var(--spin-end-deg, 360deg))"}}},lineHeight:{0:"0",initial:"initial"},screens:{xs:"480px"},spacing:{"1.25":"0.3125rem"},transitionProperty:{"max-height":"max-height"},zIndex:{1:"1",max:"2147483647"}}},plugins:[i,u,c,d,g,$,m,f(({addVariant:a})=>{a("dark-high-contrast",[":is(.dark-high-contrast &)"]),a("high-contrast",[":is(.light-high-contrast &)"])}),f(({addVariant:a})=>{a("not-disabled",["&:not(:disabled)"]),a("not-aria-disabled",['&:not(&[aria-disabled="true"])'])})]};import j from"path";function A(a){try{let l=a.resolve("@ngrok/mantle/tailwind-preset");return j.join(l,"..","**","*.js")}catch(l){return console.warn(l),"node_modules/@ngrok/mantle/dist/**/*.js"}}export{V as mantlePreset,A as resolveMantleContentGlob};
2
2
  //# sourceMappingURL=tailwind-preset.js.map