@codefast/ui 0.1.9 → 0.1.11

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 (116) hide show
  1. package/dist/chunk-CE6DSAWA.cjs +2 -0
  2. package/dist/chunk-CE6DSAWA.cjs.map +1 -0
  3. package/dist/chunk-DULXJDFQ.js +2 -0
  4. package/dist/chunk-DULXJDFQ.js.map +1 -0
  5. package/dist/chunk-VEXIU3VB.js +2 -0
  6. package/dist/chunk-VEXIU3VB.js.map +1 -0
  7. package/dist/chunk-WQGHLC2A.js +2 -0
  8. package/dist/chunk-WQGHLC2A.js.map +1 -0
  9. package/dist/{chunk-BASRQOAA.cjs → chunk-YIBPK6E7.cjs} +2 -2
  10. package/dist/chunk-YIBPK6E7.cjs.map +1 -0
  11. package/dist/chunk-YOJAJOXD.cjs +2 -0
  12. package/dist/chunk-YOJAJOXD.cjs.map +1 -0
  13. package/dist/react/alert-dialog.cjs +1 -1
  14. package/dist/react/alert-dialog.js +1 -1
  15. package/dist/react/button.cjs +1 -1
  16. package/dist/react/button.d.cts +21 -7
  17. package/dist/react/button.d.ts +21 -7
  18. package/dist/react/button.js +1 -1
  19. package/dist/react/calendar.cjs +1 -1
  20. package/dist/react/calendar.js +1 -1
  21. package/dist/react/carousel.cjs +1 -1
  22. package/dist/react/carousel.js +1 -1
  23. package/dist/react/checkbox-cards.cjs +1 -1
  24. package/dist/react/checkbox-cards.cjs.map +1 -1
  25. package/dist/react/checkbox-cards.d.cts +4 -8
  26. package/dist/react/checkbox-cards.d.ts +4 -8
  27. package/dist/react/checkbox-cards.js +1 -1
  28. package/dist/react/checkbox-cards.js.map +1 -1
  29. package/dist/react/checkbox-group.cjs +1 -1
  30. package/dist/react/checkbox-group.cjs.map +1 -1
  31. package/dist/react/checkbox-group.d.cts +5 -9
  32. package/dist/react/checkbox-group.d.ts +5 -9
  33. package/dist/react/checkbox-group.js +1 -1
  34. package/dist/react/checkbox-group.js.map +1 -1
  35. package/dist/react/command.cjs +1 -1
  36. package/dist/react/command.js +1 -1
  37. package/dist/react/data-table.cjs +1 -1
  38. package/dist/react/data-table.cjs.map +1 -1
  39. package/dist/react/data-table.js +1 -1
  40. package/dist/react/data-table.js.map +1 -1
  41. package/dist/react/dialog.cjs +1 -1
  42. package/dist/react/dialog.js +1 -1
  43. package/dist/react/drawer.cjs +1 -1
  44. package/dist/react/drawer.js +1 -1
  45. package/dist/react/number-input.cjs +1 -1
  46. package/dist/react/number-input.cjs.map +1 -1
  47. package/dist/react/number-input.d.cts +4 -7
  48. package/dist/react/number-input.d.ts +4 -7
  49. package/dist/react/number-input.js +1 -1
  50. package/dist/react/number-input.js.map +1 -1
  51. package/dist/react/pagination.cjs +1 -1
  52. package/dist/react/pagination.cjs.map +1 -1
  53. package/dist/react/pagination.d.cts +2 -2
  54. package/dist/react/pagination.d.ts +2 -2
  55. package/dist/react/pagination.js +1 -1
  56. package/dist/react/pagination.js.map +1 -1
  57. package/dist/react/sheet.cjs +1 -1
  58. package/dist/react/sheet.cjs.map +1 -1
  59. package/dist/react/sheet.js +1 -1
  60. package/dist/react/sheet.js.map +1 -1
  61. package/dist/react/text-input.cjs +1 -1
  62. package/dist/react/text-input.cjs.map +1 -1
  63. package/dist/react/text-input.d.cts +150 -9
  64. package/dist/react/text-input.d.ts +150 -9
  65. package/dist/react/text-input.js +1 -1
  66. package/dist/react/text-input.js.map +1 -1
  67. package/dist/styles.css +1 -1
  68. package/dist/styles.css.map +1 -1
  69. package/package.json +10 -11
  70. package/dist/chunk-3Z6QUP75.cjs +0 -2
  71. package/dist/chunk-3Z6QUP75.cjs.map +0 -1
  72. package/dist/chunk-76TT2QSB.cjs +0 -2
  73. package/dist/chunk-76TT2QSB.cjs.map +0 -1
  74. package/dist/chunk-7NEJ7IQ3.cjs +0 -2
  75. package/dist/chunk-7NEJ7IQ3.cjs.map +0 -1
  76. package/dist/chunk-BASRQOAA.cjs.map +0 -1
  77. package/dist/chunk-CAK5VDBY.js +0 -2
  78. package/dist/chunk-CAK5VDBY.js.map +0 -1
  79. package/dist/chunk-EYL4UQ5E.js +0 -2
  80. package/dist/chunk-EYL4UQ5E.js.map +0 -1
  81. package/dist/chunk-OJI2FD2T.cjs +0 -2
  82. package/dist/chunk-OJI2FD2T.cjs.map +0 -1
  83. package/dist/chunk-QCHBG2C4.js +0 -2
  84. package/dist/chunk-QCHBG2C4.js.map +0 -1
  85. package/dist/chunk-U62JBFEF.js +0 -2
  86. package/dist/chunk-U62JBFEF.js.map +0 -1
  87. package/dist/chunk-UYD4MGAB.cjs +0 -2
  88. package/dist/chunk-UYD4MGAB.cjs.map +0 -1
  89. package/dist/chunk-VOYJX4JS.js +0 -2
  90. package/dist/chunk-VOYJX4JS.js.map +0 -1
  91. package/dist/chunk-W5RHRZIO.js +0 -2
  92. package/dist/chunk-W5RHRZIO.js.map +0 -1
  93. package/dist/react/primitive/checkbox-group.cjs +0 -2
  94. package/dist/react/primitive/checkbox-group.cjs.map +0 -1
  95. package/dist/react/primitive/checkbox-group.d.cts +0 -35
  96. package/dist/react/primitive/checkbox-group.d.ts +0 -35
  97. package/dist/react/primitive/checkbox-group.js +0 -2
  98. package/dist/react/primitive/checkbox-group.js.map +0 -1
  99. package/dist/react/primitive/input.cjs +0 -2
  100. package/dist/react/primitive/input.cjs.map +0 -1
  101. package/dist/react/primitive/input.d.cts +0 -20
  102. package/dist/react/primitive/input.d.ts +0 -20
  103. package/dist/react/primitive/input.js +0 -2
  104. package/dist/react/primitive/input.js.map +0 -1
  105. package/dist/react/primitive/number-input.cjs +0 -2
  106. package/dist/react/primitive/number-input.cjs.map +0 -1
  107. package/dist/react/primitive/number-input.d.cts +0 -36
  108. package/dist/react/primitive/number-input.d.ts +0 -36
  109. package/dist/react/primitive/number-input.js +0 -2
  110. package/dist/react/primitive/number-input.js.map +0 -1
  111. package/dist/react/style/input.cjs +0 -2
  112. package/dist/react/style/input.cjs.map +0 -1
  113. package/dist/react/style/input.d.cts +0 -161
  114. package/dist/react/style/input.d.ts +0 -161
  115. package/dist/react/style/input.js +0 -2
  116. package/dist/react/style/input.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use client";import{b as o,c as m,d as i,e as u}from"../chunk-W5RHRZIO.js";import"../chunk-QCHBG2C4.js";import{b as a,c as p}from"../chunk-EYL4UQ5E.js";import{a as t}from"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import{a as n}from"../chunk-VRBUDJBH.js";import*as l from"react";import{ChevronDownIcon as V,ChevronUpIcon as E}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var w=l.forwardRef(({ariaDecrementLabel:c,ariaIncrementLabel:d,className:I,inputSize:r,defaultValue:f,disabled:N,formatOptions:b,id:v,max:P,min:R,readOnly:h,step:y,value:C,onChange:g,...B},D)=>s(o,{ariaDecrementLabel:c,ariaIncrementLabel:d,className:a({inputSize:r,className:n("pr-0",I)}),defaultValue:f,disabled:N,formatOptions:b,id:v,max:P,min:R,readOnly:h,step:y,value:C,onChange:g,children:[e(m,{ref:D,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",className:p({inputSize:r}),inputMode:"numeric",spellCheck:"false",...B}),s("div",{className:"ml-auto grid h-full divide-y rounded-r-md border-l",children:[e(i,{className:t({size:"icon",variant:"ghost",className:"h-full rounded-none rounded-tr-md"}),children:e(E,{})}),e(u,{className:t({size:"icon",variant:"ghost",className:"rounded-tb-md h-full rounded-none"}),children:e(V,{})})]})]}));w.displayName="NumberInput";export{w as NumberInput};
1
+ "use client";import{a as m}from"../chunk-DULXJDFQ.js";import{a as r}from"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import{a as o}from"../chunk-VRBUDJBH.js";import*as u from"react";import{ChevronDownIcon as C,ChevronUpIcon as V}from"@radix-ui/react-icons";import*as e from"@codefast/primitive/number-input";import{jsx as t,jsxs as i}from"react/jsx-runtime";var{root:g,input:B}=m(),D=u.forwardRef(({ariaDecrementLabel:a,ariaIncrementLabel:p,className:s,inputSize:n,defaultValue:l,disabled:c,formatOptions:d,id:I,max:f,min:N,readOnly:b,step:v,value:P,onChange:R,...h},y)=>i(e.Root,{ariaDecrementLabel:a,ariaIncrementLabel:p,className:g({inputSize:n,className:o("pr-0",s)}),defaultValue:l,disabled:c,formatOptions:d,id:I,max:f,min:N,readOnly:b,step:v,value:P,onChange:R,children:[t(e.Item,{ref:y,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",className:B({inputSize:n}),inputMode:"numeric",spellCheck:"false",...h}),i("div",{className:"ml-auto grid h-full divide-y rounded-r-md border-l",children:[t(e.IncrementButton,{className:r({size:"icon",variant:"ghost",className:"h-full rounded-none rounded-tr-md"}),children:t(V,{})}),t(e.DecrementButton,{className:r({size:"icon",variant:"ghost",className:"rounded-tb-md h-full rounded-none"}),children:t(C,{})})]})]}));D.displayName="NumberInput";export{D as NumberInput};
2
2
  //# sourceMappingURL=number-input.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/number-input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as NumberInputPrimitive from '@/react/primitive/number-input';\nimport { input, type InputVariantsProps, root } from '@/react/style/input';\nimport { buttonVariants } from '@/react/button';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: NumberInput\n * -------------------------------------------------------------------------- */\n\ntype NumberInputElement = React.ElementRef<typeof NumberInputPrimitive.Item>;\ninterface NumberInputProps\n extends InputVariantsProps,\n React.ComponentProps<typeof NumberInputPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NumberInputPrimitive.Item> {}\n\nconst NumberInput = React.forwardRef<NumberInputElement, NumberInputProps>(\n (\n {\n ariaDecrementLabel,\n ariaIncrementLabel,\n className,\n inputSize,\n defaultValue,\n disabled,\n formatOptions,\n id,\n max,\n min,\n readOnly,\n step,\n value,\n onChange,\n ...props\n },\n forwardedRef,\n ) => (\n <NumberInputPrimitive.Root\n ariaDecrementLabel={ariaDecrementLabel}\n ariaIncrementLabel={ariaIncrementLabel}\n className={root({ inputSize, className: cn('pr-0', className) })}\n defaultValue={defaultValue}\n disabled={disabled}\n formatOptions={formatOptions}\n id={id}\n max={max}\n min={min}\n readOnly={readOnly}\n step={step}\n value={value}\n onChange={onChange}\n >\n <NumberInputPrimitive.Item\n ref={forwardedRef}\n autoCapitalize=\"off\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n className={input({ inputSize })}\n inputMode=\"numeric\"\n spellCheck=\"false\"\n {...props}\n />\n <div className=\"ml-auto grid h-full divide-y rounded-r-md border-l\">\n <NumberInputPrimitive.IncrementButton\n className={buttonVariants({ size: 'icon', variant: 'ghost', className: 'h-full rounded-none rounded-tr-md' })}\n >\n <ChevronUpIcon />\n </NumberInputPrimitive.IncrementButton>\n <NumberInputPrimitive.DecrementButton\n className={buttonVariants({ size: 'icon', variant: 'ghost', className: 'rounded-tb-md h-full rounded-none' })}\n >\n <ChevronDownIcon />\n </NumberInputPrimitive.DecrementButton>\n </div>\n </NumberInputPrimitive.Root>\n ),\n);\n\nNumberInput.displayName = 'NumberInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { NumberInput, type NumberInputProps };\n"],"mappings":"uQAEA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,EAAiB,iBAAAC,MAAqB,wBAoDzC,cAAAC,EAUA,QAAAC,MAVA,oBApCN,IAAMC,EAAoB,aACxB,CACE,CACE,mBAAAC,EACA,mBAAAC,EACA,UAAAC,EACA,UAAAC,EACA,aAAAC,EACA,SAAAC,EACA,cAAAC,EACA,GAAAC,EACA,IAAAC,EACA,IAAAC,EACA,SAAAC,EACA,KAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,IAEAjB,EAAsBC,EAArB,CACC,mBAAoBC,EACpB,mBAAoBC,EACpB,UAAWe,EAAK,CAAE,UAAAb,EAAW,UAAWc,EAAG,OAAQf,CAAS,CAAE,CAAC,EAC/D,aAAcE,EACd,SAAUC,EACV,cAAeC,EACf,GAAIC,EACJ,IAAKC,EACL,IAAKC,EACL,SAAUC,EACV,KAAMC,EACN,MAAOC,EACP,SAAUC,EAEV,UAAAhB,EAAsBqB,EAArB,CACC,IAAKH,EACL,eAAe,MACf,aAAa,MACb,YAAY,MACZ,UAAWI,EAAM,CAAE,UAAAhB,CAAU,CAAC,EAC9B,UAAU,UACV,WAAW,QACV,GAAGW,EACN,EACAhB,EAAC,OAAI,UAAU,qDACb,UAAAD,EAAsBuB,EAArB,CACC,UAAWC,EAAe,CAAE,KAAM,OAAQ,QAAS,QAAS,UAAW,mCAAoC,CAAC,EAE5G,SAAAxB,EAACyB,EAAA,EAAc,EACjB,EACAzB,EAAsB0B,EAArB,CACC,UAAWF,EAAe,CAAE,KAAM,OAAQ,QAAS,QAAS,UAAW,mCAAoC,CAAC,EAE5G,SAAAxB,EAAC2B,EAAA,EAAgB,EACnB,GACF,GACF,CAEJ,EAEAzB,EAAY,YAAc","names":["React","ChevronDownIcon","ChevronUpIcon","jsx","jsxs","NumberInput","ariaDecrementLabel","ariaIncrementLabel","className","inputSize","defaultValue","disabled","formatOptions","id","max","min","readOnly","step","value","onChange","props","forwardedRef","root","cn","NumberInputItem","input","NumberInputIncrementButton","buttonVariants","ChevronUpIcon","NumberInputDecrementButton","ChevronDownIcon"]}
1
+ {"version":3,"sources":["../../src/react/number-input.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as NumberInputPrimitive from '@codefast/primitive/number-input';\nimport { buttonVariants } from '@/react/button';\nimport { cn } from '@/lib/utils';\nimport { inputVariants, type InputVariantsProps } from '@/react/text-input';\n\nconst { root, input } = inputVariants();\n\n/* -----------------------------------------------------------------------------\n * Component: NumberInput\n * -------------------------------------------------------------------------- */\n\ntype NumberInputElement = React.ElementRef<typeof NumberInputPrimitive.Item>;\ninterface NumberInputProps\n extends InputVariantsProps,\n React.ComponentProps<typeof NumberInputPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NumberInputPrimitive.Item> {}\n\nconst NumberInput = React.forwardRef<NumberInputElement, NumberInputProps>(\n (\n {\n ariaDecrementLabel,\n ariaIncrementLabel,\n className,\n inputSize,\n defaultValue,\n disabled,\n formatOptions,\n id,\n max,\n min,\n readOnly,\n step,\n value,\n onChange,\n ...props\n },\n forwardedRef,\n ) => (\n <NumberInputPrimitive.Root\n ariaDecrementLabel={ariaDecrementLabel}\n ariaIncrementLabel={ariaIncrementLabel}\n className={root({ inputSize, className: cn('pr-0', className) })}\n defaultValue={defaultValue}\n disabled={disabled}\n formatOptions={formatOptions}\n id={id}\n max={max}\n min={min}\n readOnly={readOnly}\n step={step}\n value={value}\n onChange={onChange}\n >\n <NumberInputPrimitive.Item\n ref={forwardedRef}\n autoCapitalize=\"off\"\n autoComplete=\"off\"\n autoCorrect=\"off\"\n className={input({ inputSize })}\n inputMode=\"numeric\"\n spellCheck=\"false\"\n {...props}\n />\n <div className=\"ml-auto grid h-full divide-y rounded-r-md border-l\">\n <NumberInputPrimitive.IncrementButton\n className={buttonVariants({ size: 'icon', variant: 'ghost', className: 'h-full rounded-none rounded-tr-md' })}\n >\n <ChevronUpIcon />\n </NumberInputPrimitive.IncrementButton>\n <NumberInputPrimitive.DecrementButton\n className={buttonVariants({ size: 'icon', variant: 'ghost', className: 'rounded-tb-md h-full rounded-none' })}\n >\n <ChevronDownIcon />\n </NumberInputPrimitive.DecrementButton>\n </div>\n </NumberInputPrimitive.Root>\n ),\n);\n\nNumberInput.displayName = 'NumberInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { NumberInput, type NumberInputProps };\n"],"mappings":"qKAEA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,EAAiB,iBAAAC,MAAqB,wBAC/C,UAAYC,MAA0B,mCAqDhC,cAAAC,EAUA,QAAAC,MAVA,oBAhDN,GAAM,CAAE,KAAAC,EAAM,MAAAC,CAAM,EAAIC,EAAc,EAYhCC,EAAoB,aACxB,CACE,CACE,mBAAAC,EACA,mBAAAC,EACA,UAAAC,EACA,UAAAC,EACA,aAAAC,EACA,SAAAC,EACA,cAAAC,EACA,GAAAC,EACA,IAAAC,EACA,IAAAC,EACA,SAAAC,EACA,KAAAC,EACA,MAAAC,EACA,SAAAC,EACA,GAAGC,CACL,EACAC,IAEApB,EAAsB,OAArB,CACC,mBAAoBK,EACpB,mBAAoBC,EACpB,UAAWL,EAAK,CAAE,UAAAO,EAAW,UAAWa,EAAG,OAAQd,CAAS,CAAE,CAAC,EAC/D,aAAcE,EACd,SAAUC,EACV,cAAeC,EACf,GAAIC,EACJ,IAAKC,EACL,IAAKC,EACL,SAAUC,EACV,KAAMC,EACN,MAAOC,EACP,SAAUC,EAEV,UAAAnB,EAAsB,OAArB,CACC,IAAKqB,EACL,eAAe,MACf,aAAa,MACb,YAAY,MACZ,UAAWlB,EAAM,CAAE,UAAAM,CAAU,CAAC,EAC9B,UAAU,UACV,WAAW,QACV,GAAGW,EACN,EACAnB,EAAC,OAAI,UAAU,qDACb,UAAAD,EAAsB,kBAArB,CACC,UAAWuB,EAAe,CAAE,KAAM,OAAQ,QAAS,QAAS,UAAW,mCAAoC,CAAC,EAE5G,SAAAvB,EAACwB,EAAA,EAAc,EACjB,EACAxB,EAAsB,kBAArB,CACC,UAAWuB,EAAe,CAAE,KAAM,OAAQ,QAAS,QAAS,UAAW,mCAAoC,CAAC,EAE5G,SAAAvB,EAACyB,EAAA,EAAgB,EACnB,GACF,GACF,CAEJ,EAEApB,EAAY,YAAc","names":["React","ChevronDownIcon","ChevronUpIcon","NumberInputPrimitive","jsx","jsxs","root","input","inputVariants","NumberInput","ariaDecrementLabel","ariaIncrementLabel","className","inputSize","defaultValue","disabled","formatOptions","id","max","min","readOnly","step","value","onChange","props","forwardedRef","cn","buttonVariants","ChevronUpIcon","ChevronDownIcon"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkBASRQOAAcjs = require('../chunk-BASRQOAA.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function N({className:n,...t}){return _jsxruntime.jsx.call(void 0, "nav",{"aria-label":"pagination",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "mx-auto flex w-full justify-center",n),role:"navigation",...t})}var u=o.forwardRef(({className:n,...t},i)=>_jsxruntime.jsx.call(void 0, "ul",{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return _jsxruntime.jsx.call(void 0, "a",{"aria-current":t?"page":void 0,className:_chunkBASRQOAAcjs.a.call(void 0, {variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to previous page",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "gap-1 pl-2.5",n),size:"default",...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{children:"Previous"})]})}function H({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to next page",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "gap-1 pr-2.5",n),size:"default",...t,children:[_jsxruntime.jsx.call(void 0, "span",{children:"Next"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]})}function M({className:n,...t}){return _jsxruntime.jsxs.call(void 0, "span",{"aria-hidden":!0,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex size-10 items-center justify-center",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.DotsHorizontalIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"More pages"})]})}exports.Pagination = N; exports.PaginationContent = u; exports.PaginationEllipsis = M; exports.PaginationItem = f; exports.PaginationLink = p; exports.PaginationNext = H; exports.PaginationPrevious = R;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunkYIBPK6E7cjs = require('../chunk-YIBPK6E7.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var o = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function N({className:n,...t}){return _jsxruntime.jsx.call(void 0, "nav",{"aria-label":"pagination",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "mx-auto flex w-full justify-center",n),role:"navigation",...t})}var u=o.forwardRef(({className:n,...t},i)=>_jsxruntime.jsx.call(void 0, "ul",{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>_jsxruntime.jsx.call(void 0, "li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return _jsxruntime.jsx.call(void 0, "a",{"aria-current":t?"page":void 0,className:_chunkYIBPK6E7cjs.a.call(void 0, {variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to previous page",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "gap-1 pl-2.5",n),size:"default",...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{children:"Previous"})]})}function H({className:n,...t}){return _jsxruntime.jsxs.call(void 0, p,{"aria-label":"Go to next page",className:_chunk4XRBMJ5Qcjs.a.call(void 0, "gap-1 pr-2.5",n),size:"default",...t,children:[_jsxruntime.jsx.call(void 0, "span",{children:"Next"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]})}function M({className:n,...t}){return _jsxruntime.jsxs.call(void 0, "span",{"aria-hidden":!0,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex size-10 items-center justify-center",n),...t,children:[_jsxruntime.jsx.call(void 0, _reacticons.DotsHorizontalIcon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"More pages"})]})}exports.Pagination = N; exports.PaginationContent = u; exports.PaginationEllipsis = M; exports.PaginationItem = f; exports.PaginationLink = p; exports.PaginationNext = H; exports.PaginationPrevious = R;
2
2
  //# sourceMappingURL=pagination.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/pagination.cjs","../../src/react/pagination.tsx"],"names":["Pagination","className","props","jsx","cn","PaginationContent","forwardedRef","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"],"mappings":"AAAA,oZAAyC,iCAA8B,yDAA0C,uECA1F,mDAC+C,+CAYlE,SAFKA,CAAAA,CAAW,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAu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ination.cjs","sourcesContent":[null,"import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport { type ButtonProps, buttonVariants } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n role=\"navigation\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ul ref={forwardedRef} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, forwardedRef) => (\n <li ref={forwardedRef} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={cn('gap-1 pl-2.5', className)}\n size=\"default\"\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" className={cn('gap-1 pr-2.5', className)} size=\"default\" {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/pagination.cjs","../../src/react/pagination.tsx"],"names":["Pagination","className","props","jsx","cn","PaginationContent","forwardedRef","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","jsxs","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"],"mappings":"AAAA,oZAAyC,iCAA8B,yDAA0C,uECA1F,mDAC+C,+CAYlE,SAFKA,CAAAA,CAAW,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAuC,CAC/E,OACEC,6BAAAA,KAAC,CAAA,CACC,YAAA,CAAW,YAAA,CACX,SAAA,CAAWC,iCAAAA,oCAAG,CAAsCH,CAAS,CAAA,CAC7D,IAAA,CAAK,YAAA,CACJ,GAAGC,CAAAA,CACN,CAEJ,CASA,IAAMG,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAC9B,CAAC,CAAE,SAAA,CAAAJ,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGI,CAAAA,CAAAA,EACxBH,6BAAAA,IAAC,CAAA,CAAG,GAAA,CAAKG,CAAAA,CAAc,SAAA,CAAWF,iCAAAA,kCAAG,CAAoCH,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEpG,CAAA,CAEAG,CAAAA,CAAkB,WAAA,CAAc,mBAAA,CAShC,IAAME,CAAAA,CAAuB,CAAA,CAAA,UAAA,CAAuD,CAACL,CAAAA,CAAOI,CAAAA,CAAAA,EAC1FH,6BAAAA,IAAC,CAAA,CAAG,GAAA,CAAKG,CAAAA,CAAe,GAAGJ,CAAAA,CAAO,CACnC,CAAA,CAEDK,CAAAA,CAAe,WAAA,CAAc,gBAAA,CAU7B,SAASC,CAAAA,CAAe,CACtB,SAAA,CAAAP,CAAAA,CACA,QAAA,CAAAQ,CAAAA,CACA,IAAA,CAAAC,CAAAA,CAAO,MAAA,CACP,QAAA,CAAAC,CAAAA,CACA,GAAGT,CACL,CAAA,CAA2C,CACzC,OACEC,6BAAAA,GAAC,CAAA,CACC,cAAA,CAAcM,CAAAA,CAAW,MAAA,C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S,CAAA,CAAI,GAAGC,CAAAA,CAC1F,QAAA,CAAA,CAAAC,6BAAAA,8BAACgB,CAAA,CAAmB,SAAA,CAAU,QAAA,CAAS,CAAA,CACvChB,6BAAAA,MAAC,CAAA,CAAK,SAAA,CAAU,SAAA,CAAU,QAAA,CAAA,YAAA,CAAU,CAAA,CAAA,CACtC,CAEJ,CAAA,0MAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/pagination.cjs","sourcesContent":[null,"import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n role=\"navigation\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ul ref={forwardedRef} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, forwardedRef) => (\n <li ref={forwardedRef} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonVariantsProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={cn('gap-1 pl-2.5', className)}\n size=\"default\"\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" className={cn('gap-1 pr-2.5', className)} size=\"default\" {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ButtonProps } from './button.cjs';
2
+ import { ButtonVariantsProps } from './button.cjs';
3
3
  import 'tailwind-variants';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
 
@@ -9,7 +9,7 @@ type PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;
9
9
  declare const PaginationContent: React.ForwardRefExoticComponent<PaginationContentProps & React.RefAttributes<HTMLUListElement>>;
10
10
  type PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;
11
11
  declare const PaginationItem: React.ForwardRefExoticComponent<PaginationItemProps & React.RefAttributes<HTMLLIElement>>;
12
- interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {
12
+ interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonVariantsProps, 'size'> {
13
13
  isActive?: boolean;
14
14
  }
15
15
  declare function PaginationLink({ className, isActive, size, children, ...props }: PaginationLinkProps): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { ButtonProps } from './button.js';
2
+ import { ButtonVariantsProps } from './button.js';
3
3
  import 'tailwind-variants';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
 
@@ -9,7 +9,7 @@ type PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;
9
9
  declare const PaginationContent: React.ForwardRefExoticComponent<PaginationContentProps & React.RefAttributes<HTMLUListElement>>;
10
10
  type PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;
11
11
  declare const PaginationItem: React.ForwardRefExoticComponent<PaginationItemProps & React.RefAttributes<HTMLLIElement>>;
12
- interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {
12
+ interface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonVariantsProps, 'size'> {
13
13
  isActive?: boolean;
14
14
  }
15
15
  declare function PaginationLink({ className, isActive, size, children, ...props }: PaginationLinkProps): React.JSX.Element;
@@ -1,2 +1,2 @@
1
- import{a as r}from"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import{a as e}from"../chunk-VRBUDJBH.js";import*as o from"react";import{ChevronLeftIcon as g,ChevronRightIcon as m,DotsHorizontalIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as s}from"react/jsx-runtime";function N({className:n,...t}){return a("nav",{"aria-label":"pagination",className:e("mx-auto flex w-full justify-center",n),role:"navigation",...t})}var u=o.forwardRef(({className:n,...t},i)=>a("ul",{ref:i,className:e("flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>a("li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return a("a",{"aria-current":t?"page":void 0,className:r({variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return s(p,{"aria-label":"Go to previous page",className:e("gap-1 pl-2.5",n),size:"default",...t,children:[a(g,{className:"size-4"}),a("span",{children:"Previous"})]})}function H({className:n,...t}){return s(p,{"aria-label":"Go to next page",className:e("gap-1 pr-2.5",n),size:"default",...t,children:[a("span",{children:"Next"}),a(m,{className:"size-4"})]})}function M({className:n,...t}){return s("span",{"aria-hidden":!0,className:e("flex size-10 items-center justify-center",n),...t,children:[a(c,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{N as Pagination,u as PaginationContent,M as PaginationEllipsis,f as PaginationItem,p as PaginationLink,H as PaginationNext,R as PaginationPrevious};
1
+ import{a as r}from"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import{a as e}from"../chunk-VRBUDJBH.js";import*as o from"react";import{ChevronLeftIcon as g,ChevronRightIcon as m,DotsHorizontalIcon as c}from"@radix-ui/react-icons";import{jsx as a,jsxs as s}from"react/jsx-runtime";function N({className:n,...t}){return a("nav",{"aria-label":"pagination",className:e("mx-auto flex w-full justify-center",n),role:"navigation",...t})}var u=o.forwardRef(({className:n,...t},i)=>a("ul",{ref:i,className:e("flex flex-row items-center gap-1",n),...t}));u.displayName="PaginationContent";var f=o.forwardRef((n,t)=>a("li",{ref:t,...n}));f.displayName="PaginationItem";function p({className:n,isActive:t,size:i="icon",children:P,...l}){return a("a",{"aria-current":t?"page":void 0,className:r({variant:t?"outline":"ghost",size:i,className:n}),...l,children:P})}function R({className:n,...t}){return s(p,{"aria-label":"Go to previous page",className:e("gap-1 pl-2.5",n),size:"default",...t,children:[a(g,{className:"size-4"}),a("span",{children:"Previous"})]})}function H({className:n,...t}){return s(p,{"aria-label":"Go to next page",className:e("gap-1 pr-2.5",n),size:"default",...t,children:[a("span",{children:"Next"}),a(m,{className:"size-4"})]})}function M({className:n,...t}){return s("span",{"aria-hidden":!0,className:e("flex size-10 items-center justify-center",n),...t,children:[a(c,{className:"size-4"}),a("span",{className:"sr-only",children:"More pages"})]})}export{N as Pagination,u as PaginationContent,M as PaginationEllipsis,f as PaginationItem,p as PaginationLink,H as PaginationNext,R as PaginationPrevious};
2
2
  //# sourceMappingURL=pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport { type ButtonProps, buttonVariants } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n role=\"navigation\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ul ref={forwardedRef} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, forwardedRef) => (\n <li ref={forwardedRef} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={cn('gap-1 pl-2.5', className)}\n size=\"default\"\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" className={cn('gap-1 pr-2.5', className)} size=\"default\" {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type PaginationPreviousProps,\n type PaginationNextProps,\n type PaginationEllipsisProps,\n};\n"],"mappings":"+GAAA,UAAYA,MAAW,QACvB,OAAS,mBAAAC,EAAiB,oBAAAC,EAAkB,sBAAAC,MAA0B,wBAYlE,cAAAC,EA2EA,QAAAC,MA3EA,oBAFJ,SAASC,EAAW,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAuC,CAC/E,OACEJ,EAAC,OACC,aAAW,aACX,UAAWK,EAAG,qCAAsCF,CAAS,EAC7D,KAAK,aACJ,GAAGC,EACN,CAEJ,CASA,IAAME,EAA0B,aAC9B,CAAC,CAAE,UAAAH,EAAW,GAAGC,CAAM,EAAGG,IACxBP,EAAC,MAAG,IAAKO,EAAc,UAAWF,EAAG,mCAAoCF,CAAS,EAAI,GAAGC,EAAO,CAEpG,EAEAE,EAAkB,YAAc,oBAShC,IAAME,EAAuB,aAAuD,CAACJ,EAAOG,IAC1FP,EAAC,MAAG,IAAKO,EAAe,GAAGH,EAAO,CACnC,EAEDI,EAAe,YAAc,iBAU7B,SAASC,EAAe,CACtB,UAAAN,EACA,SAAAO,EACA,KAAAC,EAAO,OACP,SAAAC,EACA,GAAGR,CACL,EAA2C,CACzC,OACEJ,EAAC,KACC,eAAcU,EAAW,OAAS,OAClC,UAAWG,EAAe,CACxB,QAASH,EAAW,UAAY,QAChC,KAAAC,EACA,UAAAR,CACF,CAAC,EACA,GAAGC,EAEH,SAAAQ,EACH,CAEJ,CAQA,SAASE,EAAmB,CAAE,UAAAX,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAACQ,EAAA,CACC,aAAW,sBACX,UAAWJ,EAAG,eAAgBF,CAAS,EACvC,KAAK,UACJ,GAAGC,EAEJ,UAAAJ,EAACe,EAAA,CAAgB,UAAU,SAAS,EACpCf,EAAC,QAAK,oBAAQ,GAChB,CAEJ,CAQA,SAASgB,EAAe,CAAE,UAAAb,EAAW,GAAGC,CAAM,EAA2C,CACvF,OACEH,EAACQ,EAAA,CAAe,aAAW,kBAAkB,UAAWJ,EAAG,eAAgBF,CAAS,EAAG,KAAK,UAAW,GAAGC,EACxG,UAAAJ,EAAC,QAAK,gBAAI,EACVA,EAACiB,EAAA,CAAiB,UAAU,SAAS,GACvC,CAEJ,CAQA,SAASC,EAAmB,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAAC,QAAK,cAAW,GAAC,UAAWI,EAAG,2CAA4CF,CAAS,EAAI,GAAGC,EAC1F,UAAAJ,EAACmB,EAAA,CAAmB,UAAU,SAAS,EACvCnB,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ","names":["React","ChevronLeftIcon","ChevronRightIcon","DotsHorizontalIcon","jsx","jsxs","Pagination","className","props","cn","PaginationContent","forwardedRef","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"]}
1
+ {"version":3,"sources":["../../src/react/pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronLeftIcon, ChevronRightIcon, DotsHorizontalIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Pagination\n * -------------------------------------------------------------------------- */\n\ntype PaginationProps = React.HTMLAttributes<HTMLElement>;\n\nfunction Pagination({ className, ...props }: PaginationProps): React.JSX.Element {\n return (\n <nav\n aria-label=\"pagination\"\n className={cn('mx-auto flex w-full justify-center', className)}\n role=\"navigation\"\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationContent\n * -------------------------------------------------------------------------- */\n\ntype PaginationContentElement = HTMLUListElement;\ntype PaginationContentProps = React.HTMLAttributes<HTMLUListElement>;\n\nconst PaginationContent = React.forwardRef<PaginationContentElement, PaginationContentProps>(\n ({ className, ...props }, forwardedRef) => (\n <ul ref={forwardedRef} className={cn('flex flex-row items-center gap-1', className)} {...props} />\n ),\n);\n\nPaginationContent.displayName = 'PaginationContent';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationItem\n * -------------------------------------------------------------------------- */\n\ntype PaginationItemElement = HTMLLIElement;\ntype PaginationItemProps = React.LiHTMLAttributes<HTMLLIElement>;\n\nconst PaginationItem = React.forwardRef<PaginationItemElement, PaginationItemProps>((props, forwardedRef) => (\n <li ref={forwardedRef} {...props} />\n));\n\nPaginationItem.displayName = 'PaginationItem';\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationLink\n * -------------------------------------------------------------------------- */\n\ninterface PaginationLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement>, Pick<ButtonVariantsProps, 'size'> {\n isActive?: boolean;\n}\n\nfunction PaginationLink({\n className,\n isActive,\n size = 'icon',\n children,\n ...props\n}: PaginationLinkProps): React.JSX.Element {\n return (\n <a\n aria-current={isActive ? 'page' : undefined}\n className={buttonVariants({\n variant: isActive ? 'outline' : 'ghost',\n size,\n className,\n })}\n {...props}\n >\n {children}\n </a>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationPrevious\n * -------------------------------------------------------------------------- */\n\ntype PaginationPreviousProps = PaginationLinkProps;\n\nfunction PaginationPrevious({ className, ...props }: PaginationPreviousProps): React.JSX.Element {\n return (\n <PaginationLink\n aria-label=\"Go to previous page\"\n className={cn('gap-1 pl-2.5', className)}\n size=\"default\"\n {...props}\n >\n <ChevronLeftIcon className=\"size-4\" />\n <span>Previous</span>\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationNext\n * -------------------------------------------------------------------------- */\n\ntype PaginationNextProps = PaginationLinkProps;\n\nfunction PaginationNext({ className, ...props }: PaginationNextProps): React.JSX.Element {\n return (\n <PaginationLink aria-label=\"Go to next page\" className={cn('gap-1 pr-2.5', className)} size=\"default\" {...props}>\n <span>Next</span>\n <ChevronRightIcon className=\"size-4\" />\n </PaginationLink>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: PaginationEllipsis\n * -------------------------------------------------------------------------- */\n\ntype PaginationEllipsisProps = React.HTMLAttributes<HTMLSpanElement>;\n\nfunction PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): React.JSX.Element {\n return (\n <span aria-hidden className={cn('flex size-10 items-center justify-center', className)} {...props}>\n <DotsHorizontalIcon className=\"size-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Pagination,\n PaginationContent,\n PaginationLink,\n PaginationItem,\n PaginationPrevious,\n PaginationNext,\n PaginationEllipsis,\n type PaginationProps,\n type PaginationContentProps,\n type PaginationLinkProps,\n type PaginationItemProps,\n type Pagination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kBAAkB,UAAWJ,EAAG,eAAgBF,CAAS,EAAG,KAAK,UAAW,GAAGC,EACxG,UAAAJ,EAAC,QAAK,gBAAI,EACVA,EAACiB,EAAA,CAAiB,UAAU,SAAS,GACvC,CAEJ,CAQA,SAASC,EAAmB,CAAE,UAAAf,EAAW,GAAGC,CAAM,EAA+C,CAC/F,OACEH,EAAC,QAAK,cAAW,GAAC,UAAWI,EAAG,2CAA4CF,CAAS,EAAI,GAAGC,EAC1F,UAAAJ,EAACmB,EAAA,CAAmB,UAAU,SAAS,EACvCnB,EAAC,QAAK,UAAU,UAAU,sBAAU,GACtC,CAEJ","names":["React","ChevronLeftIcon","ChevronRightIcon","DotsHorizontalIcon","jsx","jsxs","Pagination","className","props","cn","PaginationContent","forwardedRef","PaginationItem","PaginationLink","isActive","size","children","buttonVariants","PaginationPrevious","ChevronLeftIcon","PaginationNext","ChevronRightIcon","PaginationEllipsis","DotsHorizontalIcon"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkBASRQOAAcjs = require('../chunk-BASRQOAA.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var r = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _tailwindvariants = require('tailwind-variants');var _jsxruntime = require('react/jsx-runtime');var g=e.Root,x= exports.SheetTrigger =e.Trigger,c=_tailwindvariants.tv.call(void 0, {base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),f= exports.SheetContent =r.forwardRef(({children:t,side:o="right",className:a,...n},p)=>_jsxruntime.jsxs.call(void 0, e.Portal,{children:[_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:p,className:c({side:o,className:a}),...n,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[_jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]}));f.displayName=e.Content.displayName;function T({className:t,...o}){return _jsxruntime.jsx.call(void 0, "header",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function N({className:t,...o}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-6 py-2",t),...o})}function S({className:t,...o}){return _jsxruntime.jsx.call(void 0, "footer",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",t),...o})}S.displayName="SheetFooter";var P=r.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-foreground text-lg font-semibold",t),...o}));P.displayName=e.Title.displayName;var y=r.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground text-sm",t),...o}));y.displayName=e.Description.displayName;var u=r.forwardRef(({className:t,size:o,variant:a="outline",...n},p)=>_jsxruntime.jsx.call(void 0, e.Close,{ref:p,className:_chunkBASRQOAAcjs.a.call(void 0, {variant:a,size:o,className:t}),...n}));u.displayName=e.Close.displayName;exports.Sheet = g; exports.SheetBody = N; exports.SheetClose = u; exports.SheetContent = f; exports.SheetDescription = y; exports.SheetFooter = S; exports.SheetHeader = T; exports.SheetTitle = P; exports.SheetTrigger = x;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunkYIBPK6E7cjs = require('../chunk-YIBPK6E7.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var s = _interopRequireWildcard(_react);var _reactdialog = require('@radix-ui/react-dialog'); var e = _interopRequireWildcard(_reactdialog);var _reacticons = require('@radix-ui/react-icons');var _tailwindvariants = require('tailwind-variants');var _jsxruntime = require('react/jsx-runtime');var x=e.Root,b= exports.SheetTrigger =e.Trigger,S=_tailwindvariants.tv.call(void 0, {base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),c= exports.SheetContent =s.forwardRef(({children:t,side:o="right",className:a,...n},p)=>_jsxruntime.jsxs.call(void 0, e.Portal,{children:[_jsxruntime.jsx.call(void 0, e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, e.Content,{ref:p,className:S({side:o,className:a}),...n,children:[t,_jsxruntime.jsxs.call(void 0, e.Close,{className:_chunkYIBPK6E7cjs.a.call(void 0, {size:"icon-2xs",variant:"ghost",className:"absolute right-4 top-4"}),children:[_jsxruntime.jsx.call(void 0, _reacticons.Cross2Icon,{className:"size-4"}),_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function N({className:t,...o}){return _jsxruntime.jsx.call(void 0, "header",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function T({className:t,...o}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "px-6 py-2",t),...o})}function f({className:t,...o}){return _jsxruntime.jsx.call(void 0, "footer",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",t),...o})}f.displayName="SheetFooter";var P=s.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Title,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-foreground text-lg font-semibold",t),...o}));P.displayName=e.Title.displayName;var y=s.forwardRef(({className:t,...o},a)=>_jsxruntime.jsx.call(void 0, e.Description,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground text-sm",t),...o}));y.displayName=e.Description.displayName;var u=s.forwardRef(({className:t,size:o,variant:a="outline",...n},p)=>_jsxruntime.jsx.call(void 0, e.Close,{ref:p,className:_chunkYIBPK6E7cjs.a.call(void 0, {variant:a,size:o,className:t}),...n}));u.displayName=e.Close.displayName;exports.Sheet = x; exports.SheetBody = T; exports.SheetClose = u; exports.SheetContent = c; exports.SheetDescription = y; exports.SheetFooter = f; exports.SheetHeader = N; exports.SheetTitle = P; exports.SheetTrigger = b;
2
2
  //# sourceMappingURL=sheet.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/sheet.cjs","../../src/react/sheet.tsx"],"names":["Sheet","SheetTrigger","sheetContentVariants","tv","SheetContent","children","side","className","props","forwardedRef","jsxs","jsx","Cross2Icon","SheetHeader","cn","SheetBody","SheetFooter","SheetTitle","SheetDescription","SheetClose","size","variant","buttonVariants"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,iCAA8B,yDAA0C,uECEvG,oGACS,mDACL,qDACW,+CAmDhC,IA1CAA,CAAAA,CAAuB,CAAA,CAAA,IAAA,CAOvBC,CAAAA,wBAA8B,CAAA,CAAA,OAAA,CAM9BC,CAAAA,CAAuBC,kCAAAA,CAC3B,IAAA,CAAM,iOAAA,CACN,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,GAAA,CAAK,gHAAA,CACL,MAAA,CACE,yHAAA,CACF,IAAA,CAAM,+HAAA,CACN,KAAA,CACE,kIACJ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M,OAAA,CAAAC,CAAAA,CAAU,SAAA,CAAW,GAAGb,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACnDE,6BAAAA,CAAgB,CAAA,KAAA,CAAf,CAAqB,GAAA,CAAKF,CAAAA,CAAc,SAAA,CAAWa,iCAAAA,CAAiB,OAAA,CAAAD,CAAAA,CAAS,IAAA,CAAAD,CAAAA,CAAM,SAAA,CAAAb,CAAU,CAAC,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEjH,CAAA,CAEAW,CAAAA,CAAW,WAAA,CAA6B,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,6NAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/sheet.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Variant: SheetContent\n * -------------------------------------------------------------------------- */\n\nconst sheetContentVariants = tv({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetContentVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, forwardedRef) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={forwardedRef} className={sheetContentVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetBody\n * -------------------------------------------------------------------------- */\n\ntype SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <main className={cn('px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Title\n ref={forwardedRef}\n className={cn('text-foreground text-lg font-semibold', className)}\n {...props}\n />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseElement = React.ElementRef<typeof SheetPrimitive.Close>;\n\ninterface SheetCloseProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst SheetClose = React.forwardRef<SheetCloseElement, SheetCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <SheetPrimitive.Close ref={forwardedRef} className={buttonVariants({ variant, size, className })} {...props} />\n ),\n);\n\nSheetClose.displayName = SheetPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetBody,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetBodyProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/sheet.cjs","../../src/react/sheet.tsx"],"names":["Sheet","SheetTrigger","sheetContentVariants","tv","SheetContent","children","side","className","props","forwardedRef","jsxs","jsx","buttonVariants","Cross2Icon","SheetHeader","cn","SheetBody","SheetFooter","SheetTitle","SheetDescription","SheetClose","size","variant"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,iCAA8B,yDAA0C,uECEvG,oGACS,mDACL,qDACW,+CAmDhC,IA1CAA,CAAAA,CAAuB,CAAA,CAAA,IAAA,CAOvBC,CAAAA,wBAA8B,CAAA,CAAA,OAAA,CAM9BC,CAAAA,CAAuBC,kCAAAA,CAC3B,IAAA,CAAM,iOAAA,CACN,QAAA,CAAU,CACR,IAAA,CAAM,CACJ,GAAA,CAAK,gHAAA,CACL,MAAA,CACE,yH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A,WAAA,CAAY,WAAA,CAa1D,IAAMC,CAAAA,CAAmB,CAAA,CAAA,UAAA,CACvB,CAAC,CAAE,SAAA,CAAAb,CAAAA,CAAW,IAAA,CAAAc,CAAAA,CAAM,OAAA,CAAAC,CAAAA,CAAU,SAAA,CAAW,GAAGd,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACnDE,6BAAAA,CAAgB,CAAA,KAAA,CAAf,CAAqB,GAAA,CAAKF,CAAAA,CAAc,SAAA,CAAWG,iCAAAA,CAAiB,OAAA,CAAAU,CAAAA,CAAS,IAAA,CAAAD,CAAAA,CAAM,SAAA,CAAAd,CAAU,CAAC,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAEjH,CAAA,CAEAY,CAAAA,CAAW,WAAA,CAA6B,CAAA,CAAA,KAAA,CAAM,WAAA,CAAA,6NAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/sheet.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Variant: SheetContent\n * -------------------------------------------------------------------------- */\n\nconst sheetContentVariants = tv({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetContentVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, forwardedRef) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={forwardedRef} className={sheetContentVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close\n className={buttonVariants({ size: 'icon-2xs', variant: 'ghost', className: 'absolute right-4 top-4' })}\n >\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetBody\n * -------------------------------------------------------------------------- */\n\ntype SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <main className={cn('px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Title\n ref={forwardedRef}\n className={cn('text-foreground text-lg font-semibold', className)}\n {...props}\n />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseElement = React.ElementRef<typeof SheetPrimitive.Close>;\n\ninterface SheetCloseProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst SheetClose = React.forwardRef<SheetCloseElement, SheetCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <SheetPrimitive.Close ref={forwardedRef} className={buttonVariants({ variant, size, className })} {...props} />\n ),\n);\n\nSheetClose.displayName = SheetPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetBody,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetBodyProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as m}from"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import{a as s}from"../chunk-VRBUDJBH.js";import*as r from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as h}from"@radix-ui/react-icons";import{tv as d}from"tailwind-variants";import{jsx as i,jsxs as l}from"react/jsx-runtime";var g=e.Root,x=e.Trigger,c=d({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),f=r.forwardRef(({children:t,side:o="right",className:a,...n},p)=>l(e.Portal,{children:[i(e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),l(e.Content,{ref:p,className:c({side:o,className:a}),...n,children:[t,l(e.Close,{className:"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none",children:[i(h,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));f.displayName=e.Content.displayName;function T({className:t,...o}){return i("header",{className:s("flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function N({className:t,...o}){return i("main",{className:s("px-6 py-2",t),...o})}function S({className:t,...o}){return i("footer",{className:s("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",t),...o})}S.displayName="SheetFooter";var P=r.forwardRef(({className:t,...o},a)=>i(e.Title,{ref:a,className:s("text-foreground text-lg font-semibold",t),...o}));P.displayName=e.Title.displayName;var y=r.forwardRef(({className:t,...o},a)=>i(e.Description,{ref:a,className:s("text-muted-foreground text-sm",t),...o}));y.displayName=e.Description.displayName;var u=r.forwardRef(({className:t,size:o,variant:a="outline",...n},p)=>i(e.Close,{ref:p,className:m({variant:a,size:o,className:t}),...n}));u.displayName=e.Close.displayName;export{g as Sheet,N as SheetBody,u as SheetClose,f as SheetContent,y as SheetDescription,S as SheetFooter,T as SheetHeader,P as SheetTitle,x as SheetTrigger};
1
+ "use client";import{a as m}from"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import{a as r}from"../chunk-VRBUDJBH.js";import*as s from"react";import*as e from"@radix-ui/react-dialog";import{Cross2Icon as h}from"@radix-ui/react-icons";import{tv as d}from"tailwind-variants";import{jsx as i,jsxs as l}from"react/jsx-runtime";var x=e.Root,b=e.Trigger,S=d({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg",variants:{side:{top:"data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b",bottom:"data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t",left:"data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}}),c=s.forwardRef(({children:t,side:o="right",className:a,...n},p)=>l(e.Portal,{children:[i(e.Overlay,{className:"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80"}),l(e.Content,{ref:p,className:S({side:o,className:a}),...n,children:[t,l(e.Close,{className:m({size:"icon-2xs",variant:"ghost",className:"absolute right-4 top-4"}),children:[i(h,{className:"size-4"}),i("span",{className:"sr-only",children:"Close"})]})]})]}));c.displayName=e.Content.displayName;function N({className:t,...o}){return i("header",{className:r("flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left",t),...o})}function T({className:t,...o}){return i("main",{className:r("px-6 py-2",t),...o})}function f({className:t,...o}){return i("footer",{className:r("flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end",t),...o})}f.displayName="SheetFooter";var P=s.forwardRef(({className:t,...o},a)=>i(e.Title,{ref:a,className:r("text-foreground text-lg font-semibold",t),...o}));P.displayName=e.Title.displayName;var y=s.forwardRef(({className:t,...o},a)=>i(e.Description,{ref:a,className:r("text-muted-foreground text-sm",t),...o}));y.displayName=e.Description.displayName;var u=s.forwardRef(({className:t,size:o,variant:a="outline",...n},p)=>i(e.Close,{ref:p,className:m({variant:a,size:o,className:t}),...n}));u.displayName=e.Close.displayName;export{x as Sheet,T as SheetBody,u as SheetClose,c as SheetContent,y as SheetDescription,f as SheetFooter,N as SheetHeader,P as SheetTitle,b as SheetTrigger};
2
2
  //# sourceMappingURL=sheet.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Variant: SheetContent\n * -------------------------------------------------------------------------- */\n\nconst sheetContentVariants = tv({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetContentVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, forwardedRef) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={forwardedRef} className={sheetContentVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close className=\"data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm p-1 opacity-70 transition hover:opacity-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none\">\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetBody\n * -------------------------------------------------------------------------- */\n\ntype SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <main className={cn('px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Title\n ref={forwardedRef}\n className={cn('text-foreground text-lg font-semibold', className)}\n {...props}\n />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseElement = React.ElementRef<typeof SheetPrimitive.Close>;\n\ninterface SheetCloseProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst SheetClose = React.forwardRef<SheetCloseElement, SheetCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <SheetPrimitive.Close ref={forwardedRef} className={buttonVariants({ variant, size, className })} {...props} />\n ),\n);\n\nSheetClose.displayName = SheetPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetBody,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetBodyProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"],"mappings":"4HAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,MAAAC,MAA6B,oBAmDhC,cAAAC,EAGE,QAAAC,MAHF,oBA1CN,IAAMC,EAAuB,OAOvBC,EAA8B,UAM9BC,EAAuBC,EAAG,CAC9B,KAAM,kOACN,SAAU,CACR,KAAM,CACJ,IAAK,iHACL,OACE,0HACF,KAAM,gIACN,MACE,kIACJ,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC,EAWKC,EAAqB,aACzB,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,QAAS,UAAAC,EAAW,GAAGC,CAA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W,KAAAW,EAAM,QAAAC,EAAU,UAAW,GAAGX,CAAM,EAAGC,IACnDX,EAAgB,QAAf,CAAqB,IAAKW,EAAc,UAAWW,EAAe,CAAE,QAAAD,EAAS,KAAAD,EAAM,UAAAX,CAAU,CAAC,EAAI,GAAGC,EAAO,CAEjH,EAEAS,EAAW,YAA6B,QAAM","names":["React","SheetPrimitive","Cross2Icon","tv","jsx","jsxs","Sheet","SheetTrigger","sheetContentVariants","tv","SheetContent","children","side","className","props","forwardedRef","Cross2Icon","SheetHeader","cn","SheetBody","SheetFooter","SheetTitle","SheetDescription","SheetClose","size","variant","buttonVariants"]}
1
+ {"version":3,"sources":["../../src/react/sheet.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as SheetPrimitive from '@radix-ui/react-dialog';\nimport { Cross2Icon } from '@radix-ui/react-icons';\nimport { tv, type VariantProps } from 'tailwind-variants';\nimport { cn } from '@/lib/utils';\nimport { buttonVariants, type ButtonVariantsProps } from '@/react/button';\n\n/* -----------------------------------------------------------------------------\n * Component: Sheet\n * -------------------------------------------------------------------------- */\n\ntype SheetProps = React.ComponentProps<typeof SheetPrimitive.Root>;\nconst Sheet = SheetPrimitive.Root;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTrigger\n * -------------------------------------------------------------------------- */\n\ntype SheetTriggerProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Trigger>;\nconst SheetTrigger = SheetPrimitive.Trigger;\n\n/* -----------------------------------------------------------------------------\n * Variant: SheetContent\n * -------------------------------------------------------------------------- */\n\nconst sheetContentVariants = tv({\n base: 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 animate-ease-in-out fixed z-50 flex flex-col overflow-auto shadow-lg',\n variants: {\n side: {\n top: 'data-[state=open]:slide-in-from-top data-[state=closed]:slide-out-to-top inset-x-0 top-0 max-h-screen border-b',\n bottom:\n 'data-[state=open]:slide-in-from-bottom data-[state=closed]:slide-out-to-bottom inset-x-0 bottom-0 max-h-screen border-t',\n left: 'data-[state=open]:slide-in-from-left data-[state=closed]:slide-out-to-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n right:\n 'data-[state=open]:slide-in-from-right data-[state=closed]:slide-out-to-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n },\n },\n defaultVariants: {\n side: 'right',\n },\n});\n\ntype SheetContentVariantsProps = VariantProps<typeof sheetContentVariants>;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetContent\n * -------------------------------------------------------------------------- */\n\ntype SheetContentElement = React.ElementRef<typeof SheetPrimitive.Content>;\ntype SheetContentProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content> & SheetContentVariantsProps;\n\nconst SheetContent = React.forwardRef<SheetContentElement, SheetContentProps>(\n ({ children, side = 'right', className, ...props }, forwardedRef) => (\n <SheetPrimitive.Portal>\n <SheetPrimitive.Overlay className=\"data-[state=closed]:animate-duration-300 data-[state=open]:animate-duration-500 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out fixed inset-0 z-50 bg-black/80\" />\n <SheetPrimitive.Content ref={forwardedRef} className={sheetContentVariants({ side, className })} {...props}>\n {children}\n <SheetPrimitive.Close\n className={buttonVariants({ size: 'icon-2xs', variant: 'ghost', className: 'absolute right-4 top-4' })}\n >\n <Cross2Icon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPrimitive.Portal>\n ),\n);\n\nSheetContent.displayName = SheetPrimitive.Content.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetHeader\n * -------------------------------------------------------------------------- */\n\ntype SheetHeaderProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetHeader({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return (\n <header\n className={cn('flex shrink-0 flex-col gap-1.5 px-6 pb-4 pt-6 text-center sm:text-left', className)}\n {...props}\n />\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetBody\n * -------------------------------------------------------------------------- */\n\ntype SheetBodyProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetBody({ className, ...props }: SheetHeaderProps): React.JSX.Element {\n return <main className={cn('px-6 py-2', className)} {...props} />;\n}\n\n/* -----------------------------------------------------------------------------\n * Component: SheetFooter\n * -------------------------------------------------------------------------- */\n\ntype SheetFooterProps = React.HTMLAttributes<HTMLDivElement>;\n\nfunction SheetFooter({ className, ...props }: SheetFooterProps): React.JSX.Element {\n return (\n <footer\n className={cn('flex shrink-0 flex-col-reverse gap-2 px-6 pb-6 pt-4 sm:flex-row sm:justify-end', className)}\n {...props}\n />\n );\n}\n\nSheetFooter.displayName = 'SheetFooter';\n\n/* -----------------------------------------------------------------------------\n * Component: SheetTitle\n * -------------------------------------------------------------------------- */\n\ntype SheetTitleElement = React.ElementRef<typeof SheetPrimitive.Title>;\ntype SheetTitleProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Title>;\n\nconst SheetTitle = React.forwardRef<SheetTitleElement, SheetTitleProps>(({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Title\n ref={forwardedRef}\n className={cn('text-foreground text-lg font-semibold', className)}\n {...props}\n />\n));\n\nSheetTitle.displayName = SheetPrimitive.Title.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetDescription\n * -------------------------------------------------------------------------- */\n\ntype SheetDescriptionElement = React.ElementRef<typeof SheetPrimitive.Description>;\ntype SheetDescriptionProps = React.ComponentPropsWithoutRef<typeof SheetPrimitive.Description>;\n\nconst SheetDescription = React.forwardRef<SheetDescriptionElement, SheetDescriptionProps>(\n ({ className, ...props }, forwardedRef) => (\n <SheetPrimitive.Description\n ref={forwardedRef}\n className={cn('text-muted-foreground text-sm', className)}\n {...props}\n />\n ),\n);\n\nSheetDescription.displayName = SheetPrimitive.Description.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: SheetClose\n * -------------------------------------------------------------------------- */\n\ntype SheetCloseElement = React.ElementRef<typeof SheetPrimitive.Close>;\n\ninterface SheetCloseProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Close> {\n size?: ButtonVariantsProps['size'];\n variant?: ButtonVariantsProps['variant'];\n}\n\nconst SheetClose = React.forwardRef<SheetCloseElement, SheetCloseProps>(\n ({ className, size, variant = 'outline', ...props }, forwardedRef) => (\n <SheetPrimitive.Close ref={forwardedRef} className={buttonVariants({ variant, size, className })} {...props} />\n ),\n);\n\nSheetClose.displayName = SheetPrimitive.Close.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetBody,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n type SheetProps,\n type SheetTriggerProps,\n type SheetCloseProps,\n type SheetContentProps,\n type SheetHeaderProps,\n type SheetBodyProps,\n type SheetFooterProps,\n type SheetTitleProps,\n type SheetDescriptionProps,\n};\n"],"mappings":"4HAEA,UAAYA,MAAW,QACvB,UAAYC,MAAoB,yBAChC,OAAS,cAAAC,MAAkB,wBAC3B,OAAS,MAAAC,MAA6B,oBAmDhC,cAAAC,EAGE,QAAAC,MAHF,oBA1CN,IAAMC,EAAuB,OAOvBC,EAA8B,UAM9BC,EAAuBC,EAAG,CAC9B,KAAM,kOACN,SAAU,CACR,KAAM,CACJ,IAAK,iHACL,OACE,0HACF,KAAM,gIACN,MACE,kIACJ,CACF,EACA,gBAAiB,CACf,KAAM,OACR,CACF,CAAC,EAWKC,EAAqB,aACzB,CAAC,CAAE,SAAAC,EAAU,KAAAC,EAAO,QAAS,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAClDV,EAAgB,SAAf,CACC,UAAAD,EAAgB,UAAf,CAAuB,UAAU,wLAAwL,EAC1NC,EAAgB,UAAf,CAAuB,IAAKU,EAAc,UAAWP,EAAqB,CAAE,KAAAI,EAAM,UAAAC,CAAU,CAAC,EAAI,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EAAS,KAAAD,EAAM,UAAAZ,CAAU,CAAC,EAAI,GAAGC,EAAO,CAEjH,EAEAU,EAAW,YAA6B,QAAM","names":["React","SheetPrimitive","Cross2Icon","tv","jsx","jsxs","Sheet","SheetTrigger","sheetContentVariants","tv","SheetContent","children","side","className","props","forwardedRef","buttonVariants","Cross2Icon","SheetHeader","cn","SheetBody","SheetFooter","SheetTitle","SheetDescription","SheetClose","size","variant"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }"use client";var _chunk76TT2QSBcjs = require('../chunk-76TT2QSB.cjs');var _chunk7NEJ7IQ3cjs = require('../chunk-7NEJ7IQ3.cjs');var _chunkVJSYNP4Ocjs = require('../chunk-VJSYNP4O.cjs');require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var f = _interopRequireWildcard(_react);var _jsxruntime = require('react/jsx-runtime');var P=f.forwardRef(({inputSize:p,className:s,loading:i,loaderPosition:o,prefix:u,suffix:I,...x},R)=>_jsxruntime.jsxs.call(void 0, _chunk76TT2QSBcjs.b,{className:_chunk7NEJ7IQ3cjs.b.call(void 0, {inputSize:p,className:s}),children:[i&&o==="prefix"?_jsxruntime.jsx.call(void 0, _chunkVJSYNP4Ocjs.a,{}):u,_jsxruntime.jsx.call(void 0, _chunk76TT2QSBcjs.c,{ref:R,className:_chunk7NEJ7IQ3cjs.c.call(void 0, {inputSize:p}),...x}),i&&o==="suffix"?_jsxruntime.jsx.call(void 0, _chunkVJSYNP4Ocjs.a,{}):I]}));P.displayName="TextInput";exports.TextInput = P;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkCE6DSAWAcjs = require('../chunk-CE6DSAWA.cjs');require('../chunk-VJSYNP4O.cjs');require('../chunk-4XRBMJ5Q.cjs');exports.TextInput = _chunkCE6DSAWAcjs.b; exports.inputVariants = _chunkCE6DSAWAcjs.a;
2
2
  //# sourceMappingURL=text-input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/text-input.cjs","../../src/react/text-input.tsx"],"names":["TextInput","inputSize","className","loading","loaderPosition","prefix","suffix","props","forwardedRef","jsxs","Input","root","jsx","Spinner","InputItem","input"],"mappings":"AAAA,uWAAY,CAAC,yDAAgD,yDAAiD,yDAA0C,iCAA8B,uECE/J,+CAuBjB,IAHAA,CAAAA,CAAkB,CAAA,CAAA,UAAA,CACtB,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,SAAA,CAAAC,CAAAA,CAAW,OAAA,CAAAC,CAAAA,CAAS,cAAA,CAAAC,CAAAA,CAAgB,MAAA,CAAAC,CAAAA,CAAQ,MAAA,CAAAC,CAAAA,CAAQ,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAE1EC,8BAAAA,mBAAgBC,CAAf,CAAoB,SAAA,CAAWC,iCAAAA,CAAO,SAAA,CAAAV,CAAAA,CAAW,SAAA,CAAAC,CAAU,CAAC,CAAA,CAC1D,QAAA,CAAA,CAAAC,CAAAA,EAAWC,CAAAA,GAAmB,QAAA,CAAWQ,6BAAAA,mBAACC,CAAA,CAAA,CAAQ,CAAA,CAAKR,CAAAA,CACxDO,6BAAAA,mBAAgBE,CAAf,CAAoB,GAAA,CAAKN,CAAAA,CAAc,SAAA,CAAWO,iCAAAA,CAAQ,SAAA,CAAAd,CAAU,CAAC,CAAA,CAAI,GAAGM,CAAAA,CAAO,CAAA,CACnFJ,CAAAA,EAAWC,CAAAA,GAAmB,QAAA,CAAWQ,6BAAAA,mBAACC,CAAA,CAAA,CAAQ,CAAA,CAAKP,CAAAA,CAAAA,CAC1D,CAGN,CAAA,CAEAN,CAAAA,CAAU,WAAA,CAAc,WAAA,CAAA,sBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/text-input.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport * as InputPrimitive from '@/react/primitive/input';\nimport { Spinner } from '@/react/spinner';\nimport { input, type InputVariantsProps, root } from '@/react/style/input';\n\n/* -----------------------------------------------------------------------------\n * Component: TextInput\n * -------------------------------------------------------------------------- */\n\ntype TextInputElement = React.ElementRef<typeof InputPrimitive.Item>;\ninterface TextInputProps\n extends InputVariantsProps,\n React.ComponentProps<typeof InputPrimitive.Root>,\n Omit<React.ComponentPropsWithoutRef<typeof InputPrimitive.Item>, 'prefix'> {\n loaderPosition?: 'prefix' | 'suffix';\n loading?: boolean;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n}\n\nconst TextInput = React.forwardRef<TextInputElement, TextInputProps>(\n ({ inputSize, className, loading, loaderPosition, prefix, suffix, ...props }, forwardedRef) => {\n return (\n <InputPrimitive.Root className={root({ inputSize, className })}>\n {loading && loaderPosition === 'prefix' ? <Spinner /> : prefix}\n <InputPrimitive.Item ref={forwardedRef} className={input({ inputSize })} {...props} />\n {loading && loaderPosition === 'suffix' ? <Spinner /> : suffix}\n </InputPrimitive.Root>\n );\n },\n);\n\nTextInput.displayName = 'TextInput';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { TextInput, type TextInputProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/text-input.cjs"],"names":[],"mappings":"AAAA,qFAAY,CAAC,yDAAsC,iCAA8B,iCAA8B,qFAA0C","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/text-input.cjs"}
@@ -1,13 +1,154 @@
1
+ import * as tailwind_variants from 'tailwind-variants';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
1
4
  import * as React from 'react';
2
- import { Input, InputItem } from './primitive/input.cjs';
3
- import { InputVariantsProps } from './style/input.cjs';
4
- import '@radix-ui/react-context';
5
- import '@radix-ui/react-primitive';
6
- import 'tailwind-merge';
7
- import 'tailwind-variants';
8
- import 'tailwind-variants/dist/config.js';
5
+ import * as InputPrimitive from '@codefast/primitive/input';
9
6
 
10
- interface TextInputProps extends InputVariantsProps, React.ComponentProps<typeof Input>, Omit<React.ComponentPropsWithoutRef<typeof InputItem>, 'prefix'> {
7
+ declare const inputVariants: tailwind_variants.TVReturnType<{
8
+ inputSize: {
9
+ default: {
10
+ root: string;
11
+ input: string;
12
+ };
13
+ xs: {
14
+ root: string;
15
+ input: string;
16
+ };
17
+ sm: {
18
+ root: string;
19
+ input: string;
20
+ };
21
+ lg: {
22
+ root: string;
23
+ input: string;
24
+ };
25
+ };
26
+ }, {
27
+ root: string;
28
+ input: string;
29
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
30
+ inputSize: {
31
+ default: {
32
+ root: string;
33
+ input: string;
34
+ };
35
+ xs: {
36
+ root: string;
37
+ input: string;
38
+ };
39
+ sm: {
40
+ root: string;
41
+ input: string;
42
+ };
43
+ lg: {
44
+ root: string;
45
+ input: string;
46
+ };
47
+ };
48
+ }, {
49
+ inputSize: {
50
+ default: {
51
+ root: string;
52
+ input: string;
53
+ };
54
+ xs: {
55
+ root: string;
56
+ input: string;
57
+ };
58
+ sm: {
59
+ root: string;
60
+ input: string;
61
+ };
62
+ lg: {
63
+ root: string;
64
+ input: string;
65
+ };
66
+ };
67
+ }>, {
68
+ inputSize: {
69
+ default: {
70
+ root: string;
71
+ input: string;
72
+ };
73
+ xs: {
74
+ root: string;
75
+ input: string;
76
+ };
77
+ sm: {
78
+ root: string;
79
+ input: string;
80
+ };
81
+ lg: {
82
+ root: string;
83
+ input: string;
84
+ };
85
+ };
86
+ }, {
87
+ root: string;
88
+ input: string;
89
+ }, tailwind_variants.TVReturnType<{
90
+ inputSize: {
91
+ default: {
92
+ root: string;
93
+ input: string;
94
+ };
95
+ xs: {
96
+ root: string;
97
+ input: string;
98
+ };
99
+ sm: {
100
+ root: string;
101
+ input: string;
102
+ };
103
+ lg: {
104
+ root: string;
105
+ input: string;
106
+ };
107
+ };
108
+ }, {
109
+ root: string;
110
+ input: string;
111
+ }, undefined, tailwind_variants_dist_config_js.TVConfig<{
112
+ inputSize: {
113
+ default: {
114
+ root: string;
115
+ input: string;
116
+ };
117
+ xs: {
118
+ root: string;
119
+ input: string;
120
+ };
121
+ sm: {
122
+ root: string;
123
+ input: string;
124
+ };
125
+ lg: {
126
+ root: string;
127
+ input: string;
128
+ };
129
+ };
130
+ }, {
131
+ inputSize: {
132
+ default: {
133
+ root: string;
134
+ input: string;
135
+ };
136
+ xs: {
137
+ root: string;
138
+ input: string;
139
+ };
140
+ sm: {
141
+ root: string;
142
+ input: string;
143
+ };
144
+ lg: {
145
+ root: string;
146
+ input: string;
147
+ };
148
+ };
149
+ }>, unknown, unknown, undefined>>;
150
+ type InputVariantsProps = VariantProps<typeof inputVariants>;
151
+ interface TextInputProps extends InputVariantsProps, React.ComponentProps<typeof InputPrimitive.Root>, Omit<React.ComponentPropsWithoutRef<typeof InputPrimitive.Item>, 'prefix'> {
11
152
  loaderPosition?: 'prefix' | 'suffix';
12
153
  loading?: boolean;
13
154
  prefix?: React.ReactNode;
@@ -15,4 +156,4 @@ interface TextInputProps extends InputVariantsProps, React.ComponentProps<typeof
15
156
  }
16
157
  declare const TextInput: React.ForwardRefExoticComponent<TextInputProps & React.RefAttributes<HTMLInputElement>>;
17
158
 
18
- export { TextInput, type TextInputProps };
159
+ export { type InputVariantsProps, TextInput, type TextInputProps, inputVariants };