@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,13 +1,9 @@
1
1
  import * as React from 'react';
2
- import { CheckboxGroup, CheckboxGroupProps, CheckboxGroupItem } from './primitive/checkbox-group.js';
3
- import '@radix-ui/react-context';
4
- import '@radix-ui/react-checkbox';
5
- import '@radix-ui/react-roving-focus';
6
- import '@radix-ui/react-primitive';
2
+ import * as CheckboxGroupPrimitive from '@codefast/primitive/checkbox-group';
7
3
 
8
- type CheckboxCardsProps = React.ComponentPropsWithoutRef<typeof CheckboxGroup>;
9
- declare const CheckboxCards: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- interface CheckboxCardsItemProps extends React.ComponentPropsWithoutRef<typeof CheckboxGroupItem> {
4
+ type CheckboxCardsProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;
5
+ declare const CheckboxCards: React.ForwardRefExoticComponent<Omit<CheckboxGroupPrimitive.CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ interface CheckboxCardsItemProps extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {
11
7
  checkboxClassName?: string;
12
8
  }
13
9
  declare const CheckboxCardsItem: React.ForwardRefExoticComponent<CheckboxCardsItemProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,2 +1,2 @@
1
- "use client";import{b as c,c as s,d as m}from"../chunk-CAK5VDBY.js";import{a as e}from"../chunk-VRBUDJBH.js";import*as a from"react";import{CheckIcon as d}from"@radix-ui/react-icons";import{jsx as o,jsxs as l}from"react/jsx-runtime";var b=a.forwardRef(({className:r,...t},i)=>o(c,{className:e("grid gap-2",r),...t,ref:i}));b.displayName=c.displayName;var h=a.forwardRef(({children:r,className:t,checkboxClassName:i,...p},C)=>l("label",{className:e("flex items-center justify-center gap-4 rounded-md border p-4",t),children:[r,o(s,{ref:C,className:e("border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50",i),...p,children:o(m,{className:"flex size-full items-center justify-center text-current",children:o(d,{className:"size-3.5"})})})]}));h.displayName=s.displayName;export{b as CheckboxCards,h as CheckboxCardsItem};
1
+ "use client";import{a as o}from"../chunk-VRBUDJBH.js";import*as s from"react";import{CheckIcon as p}from"@radix-ui/react-icons";import*as e from"@codefast/primitive/checkbox-group";import{jsx as r,jsxs as b}from"react/jsx-runtime";var C=s.forwardRef(({className:t,...i},c)=>r(e.Root,{className:o("grid gap-2",t),...i,ref:c}));C.displayName=e.Root.displayName;var d=s.forwardRef(({children:t,className:i,checkboxClassName:c,...a},m)=>b("label",{className:o("flex items-center justify-center gap-4 rounded-md border p-4",i),children:[t,r(e.Item,{ref:m,className:o("border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50",c),...a,children:r(e.CheckboxGroupIndicator,{className:"flex size-full items-center justify-center text-current",children:r(p,{className:"size-3.5"})})})]}));d.displayName=e.Item.displayName;export{C as CheckboxCards,d as CheckboxCardsItem};
2
2
  //# sourceMappingURL=checkbox-cards.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/checkbox-cards.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport * as CheckboxGroupPrimitive from '@/react/primitive/checkbox-group';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxCardsProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxCards = React.forwardRef<CheckboxCardsElement, CheckboxCardsProps>(\n ({ className, ...props }, forwardedRef) => {\n return <CheckboxGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={forwardedRef} />;\n },\n);\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\n\ninterface CheckboxCardsItemProps extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = React.forwardRef<CheckboxCardsItemElement, CheckboxCardsItemProps>(\n ({ children, className, checkboxClassName, ...props }, forwardedRef) => {\n return (\n <label className={cn('flex items-center justify-center gap-4 rounded-md border p-4', className)}>\n {children}\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',\n checkboxClassName,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n </label>\n );\n },\n);\n\nCheckboxCardsItem.displayName = CheckboxGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxCards, CheckboxCardsItem, type CheckboxCardsProps, type CheckboxCardsItemProps };\n"],"mappings":"6GAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAaf,cAAAC,EAmBL,QAAAC,MAnBK,oBAFX,IAAMC,EAAsB,aAC1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjBL,EAAwBM,EAAvB,CAA4B,UAAWC,EAAG,aAAcJ,CAAS,EAAI,GAAGC,EAAO,IAAKC,EAAc,CAE9G,EAEAH,EAAc,YAAqCI,EAAK,YAYxD,IAAME,EAA0B,aAC9B,CAAC,CAAE,SAAAC,EAAU,UAAAN,EAAW,kBAAAO,EAAmB,GAAGN,CAAM,EAAGC,IAEnDJ,EAAC,SAAM,UAAWM,EAAG,+DAAgEJ,CAAS,EAC3F,UAAAM,EACDT,EAAwBW,EAAvB,CACC,IAAKN,EACL,UAAWE,EACT,sSACAG,CACF,EACC,GAAGN,EAEJ,SAAAJ,EAAwBY,EAAvB,CAA8C,UAAU,0DACvD,SAAAZ,EAACa,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,GACF,CAGN,EAEAL,EAAkB,YAAqCG,EAAK","names":["React","CheckIcon","jsx","jsxs","CheckboxCards","className","props","forwardedRef","CheckboxGroup","cn","CheckboxCardsItem","children","checkboxClassName","CheckboxGroupItem","CheckboxGroupIndicator","CheckIcon"]}
1
+ {"version":3,"sources":["../../src/react/checkbox-cards.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport * as CheckboxGroupPrimitive from '@codefast/primitive/checkbox-group';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCards\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxCardsProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxCards = React.forwardRef<CheckboxCardsElement, CheckboxCardsProps>(\n ({ className, ...props }, forwardedRef) => {\n return <CheckboxGroupPrimitive.Root className={cn('grid gap-2', className)} {...props} ref={forwardedRef} />;\n },\n);\n\nCheckboxCards.displayName = CheckboxGroupPrimitive.Root.displayName;\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxCardsItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxCardsItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\n\ninterface CheckboxCardsItemProps extends React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item> {\n checkboxClassName?: string;\n}\n\nconst CheckboxCardsItem = React.forwardRef<CheckboxCardsItemElement, CheckboxCardsItemProps>(\n ({ children, className, checkboxClassName, ...props }, forwardedRef) => {\n return (\n <label className={cn('flex items-center justify-center gap-4 rounded-md border p-4', className)}>\n {children}\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:cursor-default disabled:opacity-50',\n checkboxClassName,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n </label>\n );\n },\n);\n\nCheckboxCardsItem.displayName = CheckboxGroupPrimitive.Item.displayName;\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxCards, CheckboxCardsItem, type CheckboxCardsProps, type CheckboxCardsItemProps };\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAC1B,UAAYC,MAA4B,qCAY7B,cAAAC,EAmBL,QAAAC,MAnBK,oBAFX,IAAMC,EAAsB,aAC1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjBL,EAAwB,OAAvB,CAA4B,UAAWM,EAAG,aAAcH,CAAS,EAAI,GAAGC,EAAO,IAAKC,EAAc,CAE9G,EAEAH,EAAc,YAAqC,OAAK,YAYxD,IAAMK,EAA0B,aAC9B,CAAC,CAAE,SAAAC,EAAU,UAAAL,EAAW,kBAAAM,EAAmB,GAAGL,CAAM,EAAGC,IAEnDJ,EAAC,SAAM,UAAWK,EAAG,+DAAgEH,CAAS,EAC3F,UAAAK,EACDR,EAAwB,OAAvB,CACC,IAAKK,EACL,UAAWC,EACT,sSACAG,CACF,EACC,GAAGL,EAEJ,SAAAJ,EAAwB,yBAAvB,CAA8C,UAAU,0DACvD,SAAAA,EAACU,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,GACF,CAGN,EAEAH,EAAkB,YAAqC,OAAK","names":["React","CheckIcon","CheckboxGroupPrimitive","jsx","jsxs","CheckboxCards","className","props","forwardedRef","cn","CheckboxCardsItem","children","checkboxClassName","CheckIcon"]}
@@ -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 _chunkOJI2FD2Tcjs = require('../chunk-OJI2FD2T.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var p = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');var a=p.forwardRef(({className:o,...r},t)=>_jsxruntime.jsx.call(void 0, _chunkOJI2FD2Tcjs.b,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "grid gap-2",o),...r}));a.displayName="CheckboxGroup";var b=p.forwardRef(({className:o,...r},t)=>_jsxruntime.jsx.call(void 0, _chunkOJI2FD2Tcjs.c,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",o),...r,children:_jsxruntime.jsx.call(void 0, _chunkOJI2FD2Tcjs.d,{className:"flex size-full items-center justify-center text-current",children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-3.5"})})}));b.displayName="CheckboxGroupItem";exports.CheckboxGroup = a; exports.CheckboxGroupItem = b;
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 _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var c = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _checkboxgroup = require('@codefast/primitive/checkbox-group'); var e = _interopRequireWildcard(_checkboxgroup);var _jsxruntime = require('react/jsx-runtime');var u=c.forwardRef(({className:r,...t},i)=>_jsxruntime.jsx.call(void 0, e.Root,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "grid gap-2",r),...t}));u.displayName="CheckboxGroup";var s=c.forwardRef(({className:r,...t},i)=>_jsxruntime.jsx.call(void 0, e.Item,{ref:i,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",r),...t,children:_jsxruntime.jsx.call(void 0, e.CheckboxGroupIndicator,{className:"flex size-full items-center justify-center text-current",children:_jsxruntime.jsx.call(void 0, _reacticons.CheckIcon,{className:"size-3.5"})})}));s.displayName="CheckboxGroupItem";exports.CheckboxGroup = u; exports.CheckboxGroupItem = s;
2
2
  //# sourceMappingURL=checkbox-group.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/checkbox-group.cjs","../../src/react/checkbox-group.tsx"],"names":["CheckboxGroup","className","props","forwardedRef","jsx","cn","CheckboxGroupItem","CheckboxGroupIndicator","CheckIcon"],"mappings":"AAAA,uWAAY,CAAC,yDAAuD,yDAA0C,uECEvF,mDACG,+CAaf,IAFLA,CAAAA,CAAsB,CAAA,CAAA,UAAA,CAC1B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACjBC,6BAAAA,mBAAwBJ,CAAvB,CAA4B,GAAA,CAAKG,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,YAAG,CAAcJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAE9G,CAAA,CAEAF,CAAAA,CAAc,WAAA,CAAc,eAAA,CAS5B,IAAMM,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAC9B,CAAC,CAAE,SAAA,CAAAL,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAEtBC,6BAAAA,mBAAwBE,CAAvB,CACC,GAAA,CAAKH,CAAAA,CACL,SAAA,CAAWE,iCAAAA,gTACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEJ,QAAA,CAAAE,6BAAAA,mBAAwBG,CAAvB,CAA8C,SAAA,CAAU,yDAAA,CACvD,QAAA,CAAAH,6BAAAA,qBAACI,CAAA,CAAU,SAAA,CAAU,UAAA,CAAW,CAAA,CAClC,CAAA,CACF,CAGN,CAAA,CAEAF,CAAAA,CAAkB,WAAA,CAAc,mBAAA,CAAA,yDAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/checkbox-group.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport * as CheckboxGroupPrimitive from '@/react/primitive/checkbox-group';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n ({ className, ...props }, forwardedRef) => {\n return <CheckboxGroupPrimitive.Root ref={forwardedRef} className={cn('grid gap-2', className)} {...props} />;\n },\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, forwardedRef) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = 'CheckboxGroupItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/checkbox-group.cjs","../../src/react/checkbox-group.tsx"],"names":["CheckboxGroup","className","props","forwardedRef","jsx","cn","CheckboxGroupItem","CheckIcon"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,uECE/B,mDACG,oHACc,+CAY7B,IAFLA,CAAAA,CAAsB,CAAA,CAAA,UAAA,CAC1B,CAAC,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EACjBC,6BAAAA,CAAwB,CAAA,IAAA,CAAvB,CAA4B,GAAA,CAAKD,CAAAA,CAAc,SAAA,CAAWE,iCAAAA,YAAG,CAAcJ,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAAO,CAE9G,CAAA,CAEAF,CAAAA,CAAc,WAAA,CAAc,eAAA,CAS5B,IAAMM,CAAAA,CAA0B,CAAA,CAAA,UAAA,CAC9B,CAAC,CAAE,SAAA,CAAAL,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAAGC,CAAAA,CAAAA,EAEtBC,6BAAAA,CAAwB,CAAA,IAAA,CAAvB,CACC,GAAA,CAAKD,CAAAA,CACL,SAAA,CAAWE,iCAAAA,gTACT,CACAJ,CACF,CAAA,CACC,GAAGC,CAAAA,CAEJ,QAAA,CAAAE,6BAAAA,CAAwB,CAAA,sBAAA,CAAvB,CAA8C,SAAA,CAAU,yDAAA,CACvD,QAAA,CAAAA,6BAAAA,qBAACG,CAAA,CAAU,SAAA,CAAU,UAAA,CAAW,CAAA,CAClC,CAAA,CACF,CAGN,CAAA,CAEAD,CAAAA,CAAkB,WAAA,CAAc,mBAAA,CAAA,yDAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/checkbox-group.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport * as CheckboxGroupPrimitive from '@codefast/primitive/checkbox-group';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n ({ className, ...props }, forwardedRef) => {\n return <CheckboxGroupPrimitive.Root ref={forwardedRef} className={cn('grid gap-2', className)} {...props} />;\n },\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, forwardedRef) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = 'CheckboxGroupItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"]}
@@ -1,13 +1,9 @@
1
1
  import * as React from 'react';
2
- import { CheckboxGroup as CheckboxGroup$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxGroupItem as CheckboxGroupItem$1, CheckboxGroupItemProps as CheckboxGroupItemProps$1 } from './primitive/checkbox-group.cjs';
3
- import '@radix-ui/react-context';
4
- import '@radix-ui/react-checkbox';
5
- import '@radix-ui/react-roving-focus';
6
- import '@radix-ui/react-primitive';
2
+ import * as CheckboxGroupPrimitive from '@codefast/primitive/checkbox-group';
7
3
 
8
- type CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroup$1>;
9
- declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps$1 & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- type CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupItem$1>;
11
- declare const CheckboxGroupItem: React.ForwardRefExoticComponent<Omit<CheckboxGroupItemProps$1 & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ type CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;
5
+ declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupPrimitive.CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ type CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;
7
+ declare const CheckboxGroupItem: React.ForwardRefExoticComponent<Omit<CheckboxGroupPrimitive.CheckboxGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
8
 
13
9
  export { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps };
@@ -1,13 +1,9 @@
1
1
  import * as React from 'react';
2
- import { CheckboxGroup as CheckboxGroup$1, CheckboxGroupProps as CheckboxGroupProps$1, CheckboxGroupItem as CheckboxGroupItem$1, CheckboxGroupItemProps as CheckboxGroupItemProps$1 } from './primitive/checkbox-group.js';
3
- import '@radix-ui/react-context';
4
- import '@radix-ui/react-checkbox';
5
- import '@radix-ui/react-roving-focus';
6
- import '@radix-ui/react-primitive';
2
+ import * as CheckboxGroupPrimitive from '@codefast/primitive/checkbox-group';
7
3
 
8
- type CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroup$1>;
9
- declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupProps$1 & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
- type CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupItem$1>;
11
- declare const CheckboxGroupItem: React.ForwardRefExoticComponent<Omit<CheckboxGroupItemProps$1 & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ type CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;
5
+ declare const CheckboxGroup: React.ForwardRefExoticComponent<Omit<CheckboxGroupPrimitive.CheckboxGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ type CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;
7
+ declare const CheckboxGroupItem: React.ForwardRefExoticComponent<Omit<CheckboxGroupPrimitive.CheckboxGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
8
 
13
9
  export { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupItemProps, type CheckboxGroupProps };
@@ -1,2 +1,2 @@
1
- "use client";import{b as c,c as m,d as u}from"../chunk-CAK5VDBY.js";import{a as i}from"../chunk-VRBUDJBH.js";import*as p from"react";import{CheckIcon as s}from"@radix-ui/react-icons";import{jsx as e}from"react/jsx-runtime";var a=p.forwardRef(({className:o,...r},t)=>e(c,{ref:t,className:i("grid gap-2",o),...r}));a.displayName="CheckboxGroup";var b=p.forwardRef(({className:o,...r},t)=>e(m,{ref:t,className:i("border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",o),...r,children:e(u,{className:"flex size-full items-center justify-center text-current",children:e(s,{className:"size-3.5"})})}));b.displayName="CheckboxGroupItem";export{a as CheckboxGroup,b as CheckboxGroupItem};
1
+ "use client";import{a as p}from"../chunk-VRBUDJBH.js";import*as c from"react";import{CheckIcon as m}from"@radix-ui/react-icons";import*as e from"@codefast/primitive/checkbox-group";import{jsx as o}from"react/jsx-runtime";var u=c.forwardRef(({className:r,...t},i)=>o(e.Root,{ref:i,className:p("grid gap-2",r),...t}));u.displayName="CheckboxGroup";var s=c.forwardRef(({className:r,...t},i)=>o(e.Item,{ref:i,className:p("border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50",r),...t,children:o(e.CheckboxGroupIndicator,{className:"flex size-full items-center justify-center text-current",children:o(m,{className:"size-3.5"})})}));s.displayName="CheckboxGroupItem";export{u as CheckboxGroup,s as CheckboxGroupItem};
2
2
  //# sourceMappingURL=checkbox-group.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/checkbox-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport { cn } from '@/lib/utils';\nimport * as CheckboxGroupPrimitive from '@/react/primitive/checkbox-group';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n ({ className, ...props }, forwardedRef) => {\n return <CheckboxGroupPrimitive.Root ref={forwardedRef} className={cn('grid gap-2', className)} {...props} />;\n },\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, forwardedRef) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = 'CheckboxGroupItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"],"mappings":"6GAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAaf,cAAAC,MAAA,oBAFX,IAAMC,EAAsB,aAC1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjBJ,EAAwBC,EAAvB,CAA4B,IAAKG,EAAc,UAAWC,EAAG,aAAcH,CAAS,EAAI,GAAGC,EAAO,CAE9G,EAEAF,EAAc,YAAc,gBAS5B,IAAMK,EAA0B,aAC9B,CAAC,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAGC,IAEtBJ,EAAwBM,EAAvB,CACC,IAAKF,EACL,UAAWC,EACT,iTACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAwBO,EAAvB,CAA8C,UAAU,0DACvD,SAAAP,EAACQ,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,CAGN,EAEAF,EAAkB,YAAc","names":["React","CheckIcon","jsx","CheckboxGroup","className","props","forwardedRef","cn","CheckboxGroupItem","CheckboxGroupIndicator","CheckIcon"]}
1
+ {"version":3,"sources":["../../src/react/checkbox-group.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { CheckIcon } from '@radix-ui/react-icons';\nimport * as CheckboxGroupPrimitive from '@codefast/primitive/checkbox-group';\nimport { cn } from '@/lib/utils';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroup\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupElement = React.ElementRef<typeof CheckboxGroupPrimitive.Root>;\ntype CheckboxGroupProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Root>;\n\nconst CheckboxGroup = React.forwardRef<CheckboxGroupElement, CheckboxGroupProps>(\n ({ className, ...props }, forwardedRef) => {\n return <CheckboxGroupPrimitive.Root ref={forwardedRef} className={cn('grid gap-2', className)} {...props} />;\n },\n);\n\nCheckboxGroup.displayName = 'CheckboxGroup';\n\n/* -----------------------------------------------------------------------------\n * Component: CheckboxGroupItem\n * -------------------------------------------------------------------------- */\n\ntype CheckboxGroupItemElement = React.ElementRef<typeof CheckboxGroupPrimitive.Item>;\ntype CheckboxGroupItemProps = React.ComponentPropsWithoutRef<typeof CheckboxGroupPrimitive.Item>;\n\nconst CheckboxGroupItem = React.forwardRef<CheckboxGroupItemElement, CheckboxGroupItemProps>(\n ({ className, ...props }, forwardedRef) => {\n return (\n <CheckboxGroupPrimitive.Item\n ref={forwardedRef}\n className={cn(\n 'border-input hover:border-primary aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground peer flex size-4 shrink-0 rounded-sm border shadow-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 disabled:pointer-events-none disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <CheckboxGroupPrimitive.CheckboxGroupIndicator className=\"flex size-full items-center justify-center text-current\">\n <CheckIcon className=\"size-3.5\" />\n </CheckboxGroupPrimitive.CheckboxGroupIndicator>\n </CheckboxGroupPrimitive.Item>\n );\n },\n);\n\nCheckboxGroupItem.displayName = 'CheckboxGroupItem';\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport { CheckboxGroup, CheckboxGroupItem, type CheckboxGroupProps, type CheckboxGroupItemProps };\n"],"mappings":"sDAEA,UAAYA,MAAW,QACvB,OAAS,aAAAC,MAAiB,wBAC1B,UAAYC,MAA4B,qCAY7B,cAAAC,MAAA,oBAFX,IAAMC,EAAsB,aAC1B,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IACjBJ,EAAwB,OAAvB,CAA4B,IAAKI,EAAc,UAAWC,EAAG,aAAcH,CAAS,EAAI,GAAGC,EAAO,CAE9G,EAEAF,EAAc,YAAc,gBAS5B,IAAMK,EAA0B,aAC9B,CAAC,CAAE,UAAAJ,EAAW,GAAGC,CAAM,EAAGC,IAEtBJ,EAAwB,OAAvB,CACC,IAAKI,EACL,UAAWC,EACT,iTACAH,CACF,EACC,GAAGC,EAEJ,SAAAH,EAAwB,yBAAvB,CAA8C,UAAU,0DACvD,SAAAA,EAACO,EAAA,CAAU,UAAU,WAAW,EAClC,EACF,CAGN,EAEAD,EAAkB,YAAc","names":["React","CheckIcon","CheckboxGroupPrimitive","jsx","CheckboxGroup","className","props","forwardedRef","cn","CheckboxGroupItem","CheckIcon"]}
@@ -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 _chunkUYD4MGABcjs = require('../chunk-UYD4MGAB.cjs');require('../chunk-BASRQOAA.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var p = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _cmdk = require('cmdk');var _jsxruntime = require('react/jsx-runtime');var i=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=_cmdk.Command.displayName;function v({children:e,...m}){return _jsxruntime.jsx.call(void 0, _chunkUYD4MGABcjs.a,{...m,children:_jsxruntime.jsx.call(void 0, _chunkUYD4MGABcjs.c,{className:"p-0",children:_jsxruntime.jsx.call(void 0, i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _reacticons.MagnifyingGlassIcon,{className:"size-5 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...m})]}));l.displayName=_cmdk.Command.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=_cmdk.Command.List.displayName;var f=p.forwardRef((e,m)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=_cmdk.Command.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...m}));C.displayName=_cmdk.Command.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-border -mx-1 h-px",e),...m}));y.displayName=_cmdk.Command.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none",e),...m}));u.displayName=_cmdk.Command.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Loading,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex justify-center p-2",e),...m}));P.displayName=_cmdk.Command.Loading.displayName;function N({className:e,...m}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}exports.Command = i; exports.CommandDialog = v; exports.CommandEmpty = f; exports.CommandGroup = C; exports.CommandInput = l; exports.CommandItem = u; exports.CommandList = c; exports.CommandLoading = P; exports.CommandSeparator = y; exports.CommandShortcut = N;
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 _chunkYOJAJOXDcjs = require('../chunk-YOJAJOXD.cjs');require('../chunk-YIBPK6E7.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var p = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _cmdk = require('cmdk');var _jsxruntime = require('react/jsx-runtime');var i=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=_cmdk.Command.displayName;function v({children:e,...m}){return _jsxruntime.jsx.call(void 0, _chunkYOJAJOXDcjs.a,{...m,children:_jsxruntime.jsx.call(void 0, _chunkYOJAJOXDcjs.c,{className:"p-0",children:_jsxruntime.jsx.call(void 0, i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[_jsxruntime.jsx.call(void 0, _reacticons.MagnifyingGlassIcon,{className:"size-5 shrink-0 opacity-50"}),_jsxruntime.jsx.call(void 0, _cmdk.Command.Input,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...m})]}));l.displayName=_cmdk.Command.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.List,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=_cmdk.Command.List.displayName;var f=p.forwardRef((e,m)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=_cmdk.Command.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Group,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...m}));C.displayName=_cmdk.Command.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Separator,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-border -mx-1 h-px",e),...m}));y.displayName=_cmdk.Command.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Item,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none",e),...m}));u.displayName=_cmdk.Command.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>_jsxruntime.jsx.call(void 0, _cmdk.Command.Loading,{ref:t,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex justify-center p-2",e),...m}));P.displayName=_cmdk.Command.Loading.displayName;function N({className:e,...m}){return _jsxruntime.jsx.call(void 0, "span",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}exports.Command = i; exports.CommandDialog = v; exports.CommandEmpty = f; exports.CommandGroup = C; exports.CommandInput = l; exports.CommandItem = u; exports.CommandList = c; exports.CommandLoading = P; exports.CommandSeparator = y; exports.CommandShortcut = N;
2
2
  //# sourceMappingURL=command.cjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{a as r,c as d}from"../chunk-VOYJX4JS.js";import"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import{a as n}from"../chunk-VRBUDJBH.js";import*as p from"react";import{MagnifyingGlassIcon as s}from"@radix-ui/react-icons";import{Command as o}from"cmdk";import{jsx as a,jsxs as g}from"react/jsx-runtime";var i=p.forwardRef(({className:e,...m},t)=>a(o,{ref:t,className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=o.displayName;function v({children:e,...m}){return a(r,{...m,children:a(d,{className:"p-0",children:a(i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>g("div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[a(s,{className:"size-5 shrink-0 opacity-50"}),a(o.Input,{ref:t,className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...m})]}));l.displayName=o.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>a(o.List,{ref:t,className:n("max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=o.List.displayName;var f=p.forwardRef((e,m)=>a(o.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=o.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>a(o.Group,{ref:t,className:n("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...m}));C.displayName=o.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>a(o.Separator,{ref:t,className:n("bg-border -mx-1 h-px",e),...m}));y.displayName=o.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>a(o.Item,{ref:t,className:n("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none",e),...m}));u.displayName=o.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>a(o.Loading,{ref:t,className:n("flex justify-center p-2",e),...m}));P.displayName=o.Loading.displayName;function N({className:e,...m}){return a("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}export{i as Command,v as CommandDialog,f as CommandEmpty,C as CommandGroup,l as CommandInput,u as CommandItem,c as CommandList,P as CommandLoading,y as CommandSeparator,N as CommandShortcut};
1
+ "use client";import{a as r,c as d}from"../chunk-WQGHLC2A.js";import"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import{a as n}from"../chunk-VRBUDJBH.js";import*as p from"react";import{MagnifyingGlassIcon as s}from"@radix-ui/react-icons";import{Command as o}from"cmdk";import{jsx as a,jsxs as g}from"react/jsx-runtime";var i=p.forwardRef(({className:e,...m},t)=>a(o,{ref:t,className:n("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...m}));i.displayName=o.displayName;function v({children:e,...m}){return a(r,{...m,children:a(d,{className:"p-0",children:a(i,{className:"[&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:size-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5",children:e})})})}var l=p.forwardRef(({className:e,...m},t)=>g("div",{className:"flex items-center gap-2 border-b px-3","cmdk-input-wrapper":"",children:[a(s,{className:"size-5 shrink-0 opacity-50"}),a(o.Input,{ref:t,className:n("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent text-sm outline-none disabled:cursor-default disabled:opacity-50",e),...m})]}));l.displayName=o.Input.displayName;var c=p.forwardRef(({className:e,...m},t)=>a(o.List,{ref:t,className:n("max-h-72 overflow-y-auto overflow-x-hidden",e),...m}));c.displayName=o.List.displayName;var f=p.forwardRef((e,m)=>a(o.Empty,{ref:m,className:"py-6 text-center text-sm",...e}));f.displayName=o.Empty.displayName;var C=p.forwardRef(({className:e,...m},t)=>a(o.Group,{ref:t,className:n("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...m}));C.displayName=o.Group.displayName;var y=p.forwardRef(({className:e,...m},t)=>a(o.Separator,{ref:t,className:n("bg-border -mx-1 h-px",e),...m}));y.displayName=o.Separator.displayName;var u=p.forwardRef(({className:e,...m},t)=>a(o.Item,{ref:t,className:n("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm aria-disabled:pointer-events-none aria-disabled:opacity-50 aria-selected:outline-none",e),...m}));u.displayName=o.Item.displayName;var P=p.forwardRef(({className:e,...m},t)=>a(o.Loading,{ref:t,className:n("flex justify-center p-2",e),...m}));P.displayName=o.Loading.displayName;function N({className:e,...m}){return a("span",{className:n("text-muted-foreground ml-auto text-xs tracking-widest",e),...m})}export{i as Command,v as CommandDialog,f as CommandEmpty,C as CommandGroup,l as CommandInput,u as CommandItem,c as CommandList,P as CommandLoading,y as CommandSeparator,N as CommandShortcut};
2
2
  //# sourceMappingURL=command.js.map
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkZNI5WE4Xcjs = require('../chunk-ZNI5WE4X.cjs');var _chunkREVF5ERBcjs = require('../chunk-REVF5ERB.cjs');var _chunkBASRQOAAcjs = require('../chunk-BASRQOAA.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function A({table:a}){return _jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkBASRQOAAcjs.b,{className:"ml-auto hidden h-8 lg:flex",size:"sm",variant:"outline",children:[_jsxruntime.jsx.call(void 0, _reacticons.MixerHorizontalIcon,{className:"mr-2 size-4"}),"View"]})}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.j,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return _jsxruntime.jsxs.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex items-center justify-between px-2",n),...s,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-6 lg:space-x-8",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium",children:"Rows per page"}),_jsxruntime.jsxs.call(void 0, _chunkZNI5WE4Xcjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.i,{value:String(i),children:i},i))})]})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsxs.call(void 0, _chunkBASRQOAAcjs.b,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to first page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkBASRQOAAcjs.b,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to previous page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkBASRQOAAcjs.b,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to next page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkBASRQOAAcjs.b,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to last page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowRightIcon,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?_jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex items-center space-x-2",s),children:_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkBASRQOAAcjs.b,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[_jsxruntime.jsx.call(void 0, "span",{children:n}),_jsxruntime.jsx.call(void 0, z,{sorted:a.getIsSorted()})]})}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.i,{onClick:()=>{a.toggleSorting(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.i,{onClick:()=>{a.toggleSorting(!0)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.m,{}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.i,{onClick:()=>{a.toggleVisibility(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.EyeNoneIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):_jsxruntime.jsx.call(void 0, "div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"ml-2 size-4"});case"asc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"ml-2 size-4"});default:return _jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{className:"ml-2 size-4"})}}exports.DataTableColumnHeader = L; exports.DataTablePagination = B; exports.DataTableViewOptions = A;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkZNI5WE4Xcjs = require('../chunk-ZNI5WE4X.cjs');var _chunkREVF5ERBcjs = require('../chunk-REVF5ERB.cjs');var _chunkYIBPK6E7cjs = require('../chunk-YIBPK6E7.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('react/jsx-runtime');function L({table:a}){return _jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.a,{children:[_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.b,{className:_chunkYIBPK6E7cjs.a.call(void 0, {className:"hidden h-8 lg:flex",size:"sm",variant:"outline"}),children:[_jsxruntime.jsx.call(void 0, _reacticons.MixerHorizontalIcon,{className:"size-4"}),"View"]}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.h,{align:"end",className:"w-36",children:[_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.l,{children:"Toggle columns"}),_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.m,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.j,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:o=>{n.toggleVisibility(!!o)},children:n.id},n.id))]})]})}function B({table:a,className:n,...o}){return _jsxruntime.jsxs.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex items-center justify-between px-2",n),...o,children:[_jsxruntime.jsxs.call(void 0, "div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-6 lg:space-x-8",children:[_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsx.call(void 0, "p",{className:"text-sm font-medium",children:"Rows per page"}),_jsxruntime.jsxs.call(void 0, _chunkZNI5WE4Xcjs.a,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.d,{className:"w-18 h-8",children:_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.c,{placeholder:a.getState().pagination.pageSize})}),_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.g,{side:"top",children:[10,20,30,40,50].map(i=>_jsxruntime.jsx.call(void 0, _chunkZNI5WE4Xcjs.i,{value:String(i),children:i},i))})]})]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),_jsxruntime.jsxs.call(void 0, "div",{className:"flex items-center space-x-2",children:[_jsxruntime.jsxs.call(void 0, _chunkYIBPK6E7cjs.b,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to first page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkYIBPK6E7cjs.b,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to previous page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronLeftIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkYIBPK6E7cjs.b,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to next page"}),_jsxruntime.jsx.call(void 0, _reacticons.ChevronRightIcon,{className:"size-4"})]}),_jsxruntime.jsxs.call(void 0, _chunkYIBPK6E7cjs.b,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[_jsxruntime.jsx.call(void 0, "span",{className:"sr-only",children:"Go to last page"}),_jsxruntime.jsx.call(void 0, _reacticons.DoubleArrowRightIcon,{className:"size-4"})]})]})]})]})}function E({column:a,title:n,className:o}){return a.getCanSort()?_jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "flex items-center space-x-2",o),children:_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.a,{children:[_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.b,{asChild:!0,children:_jsxruntime.jsxs.call(void 0, _chunkYIBPK6E7cjs.b,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[_jsxruntime.jsx.call(void 0, "span",{children:n}),_jsxruntime.jsx.call(void 0, R,{sorted:a.getIsSorted()})]})}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.h,{align:"start",children:[_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.i,{onClick:()=>{a.toggleSorting(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.i,{onClick:()=>{a.toggleSorting(!0)},children:[_jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),_jsxruntime.jsx.call(void 0, _chunkREVF5ERBcjs.m,{}),_jsxruntime.jsxs.call(void 0, _chunkREVF5ERBcjs.i,{onClick:()=>{a.toggleVisibility(!1)},children:[_jsxruntime.jsx.call(void 0, _reacticons.EyeNoneIcon,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):_jsxruntime.jsx.call(void 0, "div",{className:o,children:n})}function R({sorted:a}){switch(a){case"desc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowDownIcon,{className:"ml-2 size-4"});case"asc":return _jsxruntime.jsx.call(void 0, _reacticons.ArrowUpIcon,{className:"ml-2 size-4"});default:return _jsxruntime.jsx.call(void 0, _reacticons.CaretSortIcon,{className:"ml-2 size-4"})}}exports.DataTableColumnHeader = E; exports.DataTablePagination = B; exports.DataTableViewOptions = L;
2
2
  //# sourceMappingURL=data-table.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/data-table.cjs","../../src/react/data-table.tsx"],"names":["DataTableViewOptions","table","jsxs","DropdownMenu","jsx","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"],"mappings":"AAAA,qFAAY,CAAC,yDAAqE,yDAAoF,yDAA0C,iCAA8B,yDAA0C,mDCajR,+CA2BC,SAJCA,CAAAA,CAA4B,CAAE,KAAA,CAAAC,CAAM,CAAA,CAAwD,CACnG,OACEC,8BAAAA,mBAACC,CAAA,CACC,QAAA,CAAA,CAAAC,6BAAAA,mBAACC,CAAA,CAAoB,OAAA,CAAO,CAAA,CAAA,CAC1B,QAAA,CAAAH,8BAAAA,mBAACI,CAAA,CAAO,SAAA,CAAU,4BAAA,CAA6B,IAAA,CAAK,IAAA,CAAK,OAAA,CAAQ,SAAA,CAC/D,QAAA,CAAA,CAAAF,6BAAAA,+BAACG,CAAA,CAAoB,SAAA,CAAU,aAAA,CAAc,CAAA,CAAE,MAAA,CAAA,CAEjD,CAAA,CACF,CAAA,CACAL,8BAAAA,mBAACM,CAAA,CAAoB,KAAA,CAAM,KAAA,CAAM,SAAA,CAAU,MAAA,CACzC,QAAA,CAAA,CAAAJ,6BAAAA,mBAACK,CAAA,CAAkB,QAAA,CAAA,gBAAA,CAAc,CAAA,CACjCL,6BAAAA,mBAACM,CAAA,CAAA,CAAsB,CAAA,CACtBT,CAAAA,CACE,aAAA,CAAc,CAAA,CACd,MAA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from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '@/lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/react/dropdown-menu';\nimport { Button } from '@/react/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/react/select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"ml-auto hidden h-8 lg:flex\" size=\"sm\" variant=\"outline\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc': {\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n }\n\n case 'asc': {\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n }\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/data-table.cjs","../../src/react/data-table.tsx"],"names":["DataTableViewOptions","table","jsxs","DropdownMenu","DropdownMenuTrigger","buttonVariants","jsx","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","Button","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"],"mappings":"AAAA,qFAAY,CAAC,yDAAqE,yDAAoF,yDAAiD,iCAA8B,yDAA0C,mDCaxR,+CA0BD,SAHGA,CAAAA,CAA4B,CAAE,KAAA,CAAAC,CAAM,CAAA,CAAwD,CACnG,OACEC,8BAAAA,mBAACC,CAAA,CACC,QAAA,CAAA,CAAAD,8BAAAA,mBAACE,CAAA,CACC,SAAA,CAAWC,iCAAAA,CAAiB,SAAA,CAAW,oBAAA,CAAsB,IAAA,CAAM,IAAA,CAAM,OAAA,CAAS,SAAU,CAAC,CAAA,CAE7F,QAAA,CAAA,CAAAC,6BAAAA,+BAACC,CAAA,CAAoB,SAAA,CAAU,QAAA,CAAS,CAAA,CAAE,MAAA,CAAA,CAE5C,CAAA,CACAL,8BAAAA,mBAACM,CAAA,CAAoB,KAAA,CAAM,KAAA,CAAM,SAAA,CAAU,MAAA,CACzC,QAAA,CAA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,OAAA,CACE,OAAO3B,6BAAAA,yBAAC+B,CAAA,CAAc,SAAA,CAAU,aAAA,CAAc,CAClD,CACF,CAAA,qGAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/data-table.cjs","sourcesContent":[null,"'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '@/lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/react/dropdown-menu';\nimport { Button, buttonVariants } from '@/react/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/react/select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className={buttonVariants({ className: 'hidden h-8 lg:flex', size: 'sm', variant: 'outline' })}\n >\n <MixerHorizontalIcon className=\"size-4\" />\n View\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc': {\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n }\n\n case 'asc': {\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n }\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"]}
@@ -1,2 +1,2 @@
1
- "use client";import{a as D,c as f,d as T,g as x,i as w}from"../chunk-Z6T6ART3.js";import{a as c,b as d,h as m,i as r,j as p,l as u,m as g}from"../chunk-YQWJBH4E.js";import{b as o}from"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import{a as l}from"../chunk-VRBUDJBH.js";import{ArrowDownIcon as C,ArrowUpIcon as N,CaretSortIcon as v,ChevronLeftIcon as S,ChevronRightIcon as P,DoubleArrowLeftIcon as b,DoubleArrowRightIcon as M,EyeNoneIcon as I,MixerHorizontalIcon as h}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function A({table:a}){return t(c,{children:[e(d,{asChild:!0,children:t(o,{className:"ml-auto hidden h-8 lg:flex",size:"sm",variant:"outline",children:[e(h,{className:"mr-2 size-4"}),"View"]})}),t(m,{align:"end",className:"w-36",children:[e(u,{children:"Toggle columns"}),e(g,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(p,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:s=>{n.toggleVisibility(!!s)},children:n.id},n.id))]})]})}function B({table:a,className:n,...s}){return t("div",{className:l("flex items-center justify-between px-2",n),...s,children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[e("p",{className:"text-sm font-medium",children:"Rows per page"}),t(D,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[e(T,{className:"w-18 h-8",children:e(f,{placeholder:a.getState().pagination.pageSize})}),e(x,{side:"top",children:[10,20,30,40,50].map(i=>e(w,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(o,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[e("span",{className:"sr-only",children:"Go to first page"}),e(b,{className:"size-4"})]}),t(o,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(S,{className:"size-4"})]}),t(o,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[e("span",{className:"sr-only",children:"Go to next page"}),e(P,{className:"size-4"})]}),t(o,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[e("span",{className:"sr-only",children:"Go to last page"}),e(M,{className:"size-4"})]})]})]})]})}function L({column:a,title:n,className:s}){return a.getCanSort()?e("div",{className:l("flex items-center space-x-2",s),children:t(c,{children:[e(d,{asChild:!0,children:t(o,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[e("span",{children:n}),e(z,{sorted:a.getIsSorted()})]})}),t(m,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(N,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(C,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),e(g,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(I,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):e("div",{className:s,children:n})}function z({sorted:a}){switch(a){case"desc":return e(C,{className:"ml-2 size-4"});case"asc":return e(N,{className:"ml-2 size-4"});default:return e(v,{className:"ml-2 size-4"})}}export{L as DataTableColumnHeader,B as DataTablePagination,A as DataTableViewOptions};
1
+ "use client";import{a as f,c as T,d as x,g as w,i as C}from"../chunk-Z6T6ART3.js";import{a as c,b as d,h as m,i as r,j as u,l as D,m as g}from"../chunk-YQWJBH4E.js";import{a as p,b as s}from"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import{a as l}from"../chunk-VRBUDJBH.js";import{ArrowDownIcon as N,ArrowUpIcon as v,CaretSortIcon as S,ChevronLeftIcon as P,ChevronRightIcon as b,DoubleArrowLeftIcon as M,DoubleArrowRightIcon as I,EyeNoneIcon as h,MixerHorizontalIcon as z}from"@radix-ui/react-icons";import{jsx as e,jsxs as t}from"react/jsx-runtime";function L({table:a}){return t(c,{children:[t(d,{className:p({className:"hidden h-8 lg:flex",size:"sm",variant:"outline"}),children:[e(z,{className:"size-4"}),"View"]}),t(m,{align:"end",className:"w-36",children:[e(D,{children:"Toggle columns"}),e(g,{}),a.getAllColumns().filter(n=>typeof n.accessorFn<"u"&&n.getCanHide()).map(n=>e(u,{checked:n.getIsVisible(),className:"capitalize",onCheckedChange:o=>{n.toggleVisibility(!!o)},children:n.id},n.id))]})]})}function B({table:a,className:n,...o}){return t("div",{className:l("flex items-center justify-between px-2",n),...o,children:[t("div",{className:"text-muted-foreground flex-1 text-sm",children:[a.getFilteredSelectedRowModel().rows.length," of ",a.getFilteredRowModel().rows.length," row(s) selected."]}),t("div",{className:"flex items-center space-x-6 lg:space-x-8",children:[t("div",{className:"flex items-center space-x-2",children:[e("p",{className:"text-sm font-medium",children:"Rows per page"}),t(f,{value:String(a.getState().pagination.pageSize),onValueChange:i=>{a.setPageSize(Number(i))},children:[e(x,{className:"w-18 h-8",children:e(T,{placeholder:a.getState().pagination.pageSize})}),e(w,{side:"top",children:[10,20,30,40,50].map(i=>e(C,{value:String(i),children:i},i))})]})]}),t("div",{className:"flex w-28 items-center justify-center text-sm font-medium",children:["Page ",a.getState().pagination.pageIndex+1," of ",a.getPageCount()]}),t("div",{className:"flex items-center space-x-2",children:[t(s,{className:"hidden lg:flex",disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(0)},children:[e("span",{className:"sr-only",children:"Go to first page"}),e(M,{className:"size-4"})]}),t(s,{disabled:!a.getCanPreviousPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.previousPage()},children:[e("span",{className:"sr-only",children:"Go to previous page"}),e(P,{className:"size-4"})]}),t(s,{disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.nextPage()},children:[e("span",{className:"sr-only",children:"Go to next page"}),e(b,{className:"size-4"})]}),t(s,{className:"hidden lg:flex",disabled:!a.getCanNextPage(),size:"icon-xs",variant:"outline",onClick:()=>{a.setPageIndex(a.getPageCount()-1)},children:[e("span",{className:"sr-only",children:"Go to last page"}),e(I,{className:"size-4"})]})]})]})]})}function E({column:a,title:n,className:o}){return a.getCanSort()?e("div",{className:l("flex items-center space-x-2",o),children:t(c,{children:[e(d,{asChild:!0,children:t(s,{className:"data-[state=open]:bg-accent -ml-3",size:"xs",variant:"ghost",children:[e("span",{children:n}),e(R,{sorted:a.getIsSorted()})]})}),t(m,{align:"start",children:[t(r,{onClick:()=>{a.toggleSorting(!1)},children:[e(v,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Asc"]}),t(r,{onClick:()=>{a.toggleSorting(!0)},children:[e(N,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Desc"]}),e(g,{}),t(r,{onClick:()=>{a.toggleVisibility(!1)},children:[e(h,{className:"text-muted-foreground/70 mr-2 size-3.5"}),"Hide"]})]})]})}):e("div",{className:o,children:n})}function R({sorted:a}){switch(a){case"desc":return e(N,{className:"ml-2 size-4"});case"asc":return e(v,{className:"ml-2 size-4"});default:return e(S,{className:"ml-2 size-4"})}}export{E as DataTableColumnHeader,B as DataTablePagination,L as DataTableViewOptions};
2
2
  //# sourceMappingURL=data-table.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/react/data-table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '@/lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/react/dropdown-menu';\nimport { Button } from '@/react/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/react/select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"ml-auto hidden h-8 lg:flex\" size=\"sm\" variant=\"outline\">\n <MixerHorizontalIcon className=\"mr-2 size-4\" />\n View\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc': {\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n }\n\n case 'asc': {\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n }\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":"oRAGA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA2BC,OACE,OAAAC,EADF,QAAAC,MAAA,oBAJR,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAJ,EAACK,EAAA,CAAoB,QAAO,GAC1B,SAAAJ,EAACK,EAAA,CAAO,UAAU,6BAA6B,KAAK,KAAK,QAAQ,UAC/D,UAAAN,EAACO,EAAA,CAAoB,UAAU,cAAc,EAAE,QAEjD,EACF,EACAN,EAACO,EAAA,CAAoB,MAAM,MAAM,UAAU,OACzC,UAAAR,EAACS,EAAA,CAAkB,0BAAc,EACjCT,EAACU,EAAA,EAAsB,EACtBP,EACE,cAAc,EACd,OAAQQ,GAAW,OAAOA,EAAO,WAAe,KAAeA,EAAO,WAAW,CAAC,EAClF,IAAKA,G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ACC,QAAS,IAAM,CACbpB,EAAO,cAAc,EAAK,CAC5B,EAEA,UAAAX,EAACgC,EAAA,CAAY,UAAU,yCAAyC,EAAE,OAEpE,EACA/B,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,cAAc,EAAI,CAC3B,EAEA,UAAAX,EAACiC,EAAA,CAAc,UAAU,yCAAyC,EAAE,QAEtE,EACAjC,EAACU,EAAA,EAAsB,EACvBT,EAAC8B,EAAA,CACC,QAAS,IAAM,CACbpB,EAAO,iBAAiB,EAAK,CAC/B,EAEA,UAAAX,EAACkC,EAAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EAxCOlC,EAAC,OAAI,UAAWe,EAAY,SAAAc,EAAM,CA0C7C,CAEA,SAASC,EAAS,CAAE,OAAAK,CAAO,EAAoE,CAC7F,OAAQA,EAAQ,CACd,IAAK,OACH,OAAOnC,EAACiC,EAAA,CAAc,UAAU,cAAc,EAGhD,IAAK,MACH,OAAOjC,EAACgC,EAAA,CAAY,UAAU,cAAc,EAG9C,QACE,OAAOhC,EAACoC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","Button","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
1
+ {"version":3,"sources":["../../src/react/data-table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport {\n ArrowDownIcon,\n ArrowUpIcon,\n CaretSortIcon,\n ChevronLeftIcon,\n ChevronRightIcon,\n DoubleArrowLeftIcon,\n DoubleArrowRightIcon,\n EyeNoneIcon,\n MixerHorizontalIcon,\n} from '@radix-ui/react-icons';\nimport type * as ReactTable from '@tanstack/react-table';\nimport { cn } from '@/lib/utils';\nimport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/react/dropdown-menu';\nimport { Button, buttonVariants } from '@/react/button';\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/react/select';\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableViewOptions\n * -------------------------------------------------------------------------- */\n\ninterface DataTableViewOptionsProps<TData> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTableViewOptions<TData>({ table }: DataTableViewOptionsProps<TData>): React.JSX.Element {\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className={buttonVariants({ className: 'hidden h-8 lg:flex', size: 'sm', variant: 'outline' })}\n >\n <MixerHorizontalIcon className=\"size-4\" />\n View\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-36\">\n <DropdownMenuLabel>Toggle columns</DropdownMenuLabel>\n <DropdownMenuSeparator />\n {table\n .getAllColumns()\n .filter((column) => typeof column.accessorFn !== 'undefined' && column.getCanHide())\n .map((column) => {\n return (\n <DropdownMenuCheckboxItem\n key={column.id}\n checked={column.getIsVisible()}\n className=\"capitalize\"\n onCheckedChange={(value) => {\n column.toggleVisibility(Boolean(value));\n }}\n >\n {column.id}\n </DropdownMenuCheckboxItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTablePagination\n * -------------------------------------------------------------------------- */\n\ninterface DataTablePaginationProps<TData> extends React.HTMLAttributes<HTMLDivElement> {\n table: ReactTable.Table<TData>;\n}\n\nfunction DataTablePagination<TData>({\n table,\n className,\n ...props\n}: DataTablePaginationProps<TData>): React.JSX.Element {\n return (\n <div className={cn('flex items-center justify-between px-2', className)} {...props}>\n <div className=\"text-muted-foreground flex-1 text-sm\">\n {table.getFilteredSelectedRowModel().rows.length} of {table.getFilteredRowModel().rows.length} row(s) selected.\n </div>\n <div className=\"flex items-center space-x-6 lg:space-x-8\">\n <div className=\"flex items-center space-x-2\">\n <p className=\"text-sm font-medium\">Rows per page</p>\n <Select\n value={String(table.getState().pagination.pageSize)}\n onValueChange={(value) => {\n table.setPageSize(Number(value));\n }}\n >\n <SelectTrigger className=\"w-18 h-8\">\n <SelectValue placeholder={table.getState().pagination.pageSize} />\n </SelectTrigger>\n <SelectContent side=\"top\">\n {[10, 20, 30, 40, 50].map((pageSize) => (\n <SelectItem key={pageSize} value={String(pageSize)}>\n {pageSize}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n </div>\n <div className=\"flex w-28 items-center justify-center text-sm font-medium\">\n Page {table.getState().pagination.pageIndex + 1} of {table.getPageCount()}\n </div>\n <div className=\"flex items-center space-x-2\">\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(0);\n }}\n >\n <span className=\"sr-only\">Go to first page</span>\n <DoubleArrowLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanPreviousPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.previousPage();\n }}\n >\n <span className=\"sr-only\">Go to previous page</span>\n <ChevronLeftIcon className=\"size-4\" />\n </Button>\n <Button\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.nextPage();\n }}\n >\n <span className=\"sr-only\">Go to next page</span>\n <ChevronRightIcon className=\"size-4\" />\n </Button>\n <Button\n className=\"hidden lg:flex\"\n disabled={!table.getCanNextPage()}\n size=\"icon-xs\"\n variant=\"outline\"\n onClick={() => {\n table.setPageIndex(table.getPageCount() - 1);\n }}\n >\n <span className=\"sr-only\">Go to last page</span>\n <DoubleArrowRightIcon className=\"size-4\" />\n </Button>\n </div>\n </div>\n </div>\n );\n}\n\n/* -----------------------------------------------------------------------------\n * Component: DataTableColumnHeader\n * -------------------------------------------------------------------------- */\n\ninterface DataTableColumnHeaderProps<TData, TValue> extends React.HTMLAttributes<HTMLDivElement> {\n column: ReactTable.Column<TData, TValue>;\n title: string;\n}\n\nfunction DataTableColumnHeader<TData, TValue>({\n column,\n title,\n className,\n}: DataTableColumnHeaderProps<TData, TValue>): React.JSX.Element {\n if (!column.getCanSort()) {\n return <div className={className}>{title}</div>;\n }\n\n return (\n <div className={cn('flex items-center space-x-2', className)}>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button className=\"data-[state=open]:bg-accent -ml-3\" size=\"xs\" variant=\"ghost\">\n <span>{title}</span>\n <SortIcon sorted={column.getIsSorted()} />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\">\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(false);\n }}\n >\n <ArrowUpIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Asc\n </DropdownMenuItem>\n <DropdownMenuItem\n onClick={() => {\n column.toggleSorting(true);\n }}\n >\n <ArrowDownIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Desc\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n onClick={() => {\n column.toggleVisibility(false);\n }}\n >\n <EyeNoneIcon className=\"text-muted-foreground/70 mr-2 size-3.5\" />\n Hide\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n );\n}\n\nfunction SortIcon({ sorted }: { sorted: false | ReactTable.SortDirection }): React.JSX.Element {\n switch (sorted) {\n case 'desc': {\n return <ArrowDownIcon className=\"ml-2 size-4\" />;\n }\n\n case 'asc': {\n return <ArrowUpIcon className=\"ml-2 size-4\" />;\n }\n\n default:\n return <CaretSortIcon className=\"ml-2 size-4\" />;\n }\n}\n\n/* -----------------------------------------------------------------------------\n * Exports\n * -------------------------------------------------------------------------- */\n\nexport {\n DataTableViewOptions,\n DataTablePagination,\n DataTableColumnHeader,\n type DataTableViewOptionsProps,\n type DataTablePaginationProps,\n type DataTableColumnHeaderProps,\n};\n"],"mappings":"2RAGA,OACE,iBAAAA,EACA,eAAAC,EACA,iBAAAC,EACA,mBAAAC,EACA,oBAAAC,EACA,uBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,uBAAAC,MACK,wBA0BD,OAGE,OAAAC,EAHF,QAAAC,MAAA,oBAHN,SAASC,EAA4B,CAAE,MAAAC,CAAM,EAAwD,CACnG,OACEF,EAACG,EAAA,CACC,UAAAH,EAACI,EAAA,CACC,UAAWC,EAAe,CAAE,UAAW,qBAAsB,KAAM,KAAM,QAAS,SAAU,CAAC,EAE7F,UAAAN,EAACO,EAAA,CAAoB,UAAU,SAAS,EAAE,QAE5C,EACAN,EAACO,EAAA,CAAoB,MAAM,MAAM,UAAU,OACzC,UAAAR,EAACS,EAAA,CAAkB,0BAAc,EACjCT,EAACU,EAAA,EAAsB,EACtBP,EACE,cAAc,EACd,OAAQQ,GAAW,OAAOA,EAAO,WAAe,KAAeA,EAAO,WAAW,CAAC,EAClF,IAAKA,GAEFX,EAACY,EAAA,CAEC,QAASD,EAAO,aAAa,EAC7B,UAAU,aACV,gBAAkBE,GAAU,CAC1BF,EAAO,iBAAiB,EAAQE,CAAM,CACxC,EAEC,SAAAF,EAAO,IAPHA,EAAO,EAQd,CAEH,GACL,GACF,CAEJ,CAUA,SAASG,EAA2B,CAClC,MAAAX,EACA,UAAAY,EACA,GAAGC,CACL,EAAuD,CACrD,OACEf,EAAC,OAAI,UAAWgB,EAAG,yCAA0CF,CAAS,EAAI,GAAGC,EAC3E,UAAAf,EAAC,OAAI,UAAU,uCACZ,UAAAE,EAAM,4BAA4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AAA,CAAY,UAAU,yCAAyC,EAAE,QAEpE,GACF,GACF,EACF,EAxCOnC,EAAC,OAAI,UAAWe,EAAY,SAAAe,EAAM,CA0C7C,CAEA,SAASC,EAAS,CAAE,OAAAK,CAAO,EAAoE,CAC7F,OAAQA,EAAQ,CACd,IAAK,OACH,OAAOpC,EAACkC,EAAA,CAAc,UAAU,cAAc,EAGhD,IAAK,MACH,OAAOlC,EAACiC,EAAA,CAAY,UAAU,cAAc,EAG9C,QACE,OAAOjC,EAACqC,EAAA,CAAc,UAAU,cAAc,CAClD,CACF","names":["ArrowDownIcon","ArrowUpIcon","CaretSortIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowLeftIcon","DoubleArrowRightIcon","EyeNoneIcon","MixerHorizontalIcon","jsx","jsxs","DataTableViewOptions","table","DropdownMenu","DropdownMenuTrigger","buttonVariants","MixerHorizontalIcon","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","column","DropdownMenuCheckboxItem","value","DataTablePagination","className","props","cn","Select","SelectTrigger","SelectValue","SelectContent","pageSize","SelectItem","Button","DoubleArrowLeftIcon","ChevronLeftIcon","ChevronRightIcon","DoubleArrowRightIcon","DataTableColumnHeader","title","SortIcon","DropdownMenuItem","ArrowUpIcon","ArrowDownIcon","EyeNoneIcon","sorted","CaretSortIcon"]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkUYD4MGABcjs = require('../chunk-UYD4MGAB.cjs');require('../chunk-BASRQOAA.cjs');require('../chunk-VJSYNP4O.cjs');require('../chunk-4XRBMJ5Q.cjs');exports.Dialog = _chunkUYD4MGABcjs.a; exports.DialogBody = _chunkUYD4MGABcjs.e; exports.DialogClose = _chunkUYD4MGABcjs.i; exports.DialogContent = _chunkUYD4MGABcjs.c; exports.DialogDescription = _chunkUYD4MGABcjs.h; exports.DialogFooter = _chunkUYD4MGABcjs.f; exports.DialogHeader = _chunkUYD4MGABcjs.d; exports.DialogTitle = _chunkUYD4MGABcjs.g; exports.DialogTrigger = _chunkUYD4MGABcjs.b;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client";var _chunkYOJAJOXDcjs = require('../chunk-YOJAJOXD.cjs');require('../chunk-YIBPK6E7.cjs');require('../chunk-VJSYNP4O.cjs');require('../chunk-4XRBMJ5Q.cjs');exports.Dialog = _chunkYOJAJOXDcjs.a; exports.DialogBody = _chunkYOJAJOXDcjs.e; exports.DialogClose = _chunkYOJAJOXDcjs.i; exports.DialogContent = _chunkYOJAJOXDcjs.c; exports.DialogDescription = _chunkYOJAJOXDcjs.h; exports.DialogFooter = _chunkYOJAJOXDcjs.f; exports.DialogHeader = _chunkYOJAJOXDcjs.d; exports.DialogTitle = _chunkYOJAJOXDcjs.g; exports.DialogTrigger = _chunkYOJAJOXDcjs.b;
2
2
  //# sourceMappingURL=dialog.cjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-VOYJX4JS.js";import"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import"../chunk-VRBUDJBH.js";export{a as Dialog,e as DialogBody,i as DialogClose,c as DialogContent,h as DialogDescription,f as DialogFooter,d as DialogHeader,g as DialogTitle,b as DialogTrigger};
1
+ "use client";import{a,b,c,d,e,f,g,h,i}from"../chunk-WQGHLC2A.js";import"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import"../chunk-VRBUDJBH.js";export{a as Dialog,e as DialogBody,i as DialogClose,c as DialogContent,h as DialogDescription,f as DialogFooter,d as DialogHeader,g as DialogTitle,b as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -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 n = _interopRequireWildcard(_react);var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');function R({shouldScaleBackground:e=!0,...r}){return _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{shouldScaleBackground:e,...r})}var u=_vaul.Drawer.Trigger,D= exports.DrawerContent =n.forwardRef(({children:e,className:r,...a},s)=>_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...a,children:[_jsxruntime.jsx.call(void 0, "div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function C({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function v({className:e,...r}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "overflow-auto px-4 py-2",e),...r})}function g({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "mt-auto flex flex-col-reverse gap-2 p-4",e),...r})}var w=n.forwardRef(({className:e,...r},a)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...r}));w.displayName=_vaul.Drawer.Title.displayName;var c=n.forwardRef(({className:e,...r},a)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Description,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground text-sm",e),...r}));c.displayName=_vaul.Drawer.Description.displayName;var f=n.forwardRef(({className:e,size:r,variant:a="outline",...s},m)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Close,{ref:m,className:_chunkBASRQOAAcjs.a.call(void 0, {className:e,size:r,variant:a}),...s}));f.displayName=_vaul.Drawer.Close.displayName;exports.Drawer = R; exports.DrawerBody = v; exports.DrawerClose = f; exports.DrawerContent = D; exports.DrawerDescription = c; exports.DrawerFooter = g; exports.DrawerHeader = C; exports.DrawerTitle = w; exports.DrawerTrigger = u;
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 n = _interopRequireWildcard(_react);var _vaul = require('vaul');var _jsxruntime = require('react/jsx-runtime');function R({shouldScaleBackground:e=!0,...r}){return _jsxruntime.jsx.call(void 0, _vaul.Drawer.Root,{shouldScaleBackground:e,...r})}var u=_vaul.Drawer.Trigger,D= exports.DrawerContent =n.forwardRef(({children:e,className:r,...a},s)=>_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Portal,{children:[_jsxruntime.jsx.call(void 0, _vaul.Drawer.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),_jsxruntime.jsxs.call(void 0, _vaul.Drawer.Content,{ref:s,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...a,children:[_jsxruntime.jsx.call(void 0, "div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function C({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function v({className:e,...r}){return _jsxruntime.jsx.call(void 0, "main",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "overflow-auto px-4 py-2",e),...r})}function g({className:e,...r}){return _jsxruntime.jsx.call(void 0, "div",{className:_chunk4XRBMJ5Qcjs.a.call(void 0, "mt-auto flex flex-col-reverse gap-2 p-4",e),...r})}var w=n.forwardRef(({className:e,...r},a)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Title,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-lg font-semibold leading-none tracking-tight",e),...r}));w.displayName=_vaul.Drawer.Title.displayName;var c=n.forwardRef(({className:e,...r},a)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Description,{ref:a,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "text-muted-foreground text-sm",e),...r}));c.displayName=_vaul.Drawer.Description.displayName;var f=n.forwardRef(({className:e,size:r,variant:a="outline",...s},m)=>_jsxruntime.jsx.call(void 0, _vaul.Drawer.Close,{ref:m,className:_chunkYIBPK6E7cjs.a.call(void 0, {className:e,size:r,variant:a}),...s}));f.displayName=_vaul.Drawer.Close.displayName;exports.Drawer = R; exports.DrawerBody = v; exports.DrawerClose = f; exports.DrawerContent = D; exports.DrawerDescription = c; exports.DrawerFooter = g; exports.DrawerHeader = C; exports.DrawerTitle = w; exports.DrawerTrigger = u;
2
2
  //# sourceMappingURL=drawer.cjs.map
@@ -1,2 +1,2 @@
1
- "use client";import{a as p}from"../chunk-U62JBFEF.js";import"../chunk-JK5GPYFN.js";import{a as i}from"../chunk-VRBUDJBH.js";import*as n from"react";import{Drawer as t}from"vaul";import{jsx as o,jsxs as l}from"react/jsx-runtime";function R({shouldScaleBackground:e=!0,...r}){return o(t.Root,{shouldScaleBackground:e,...r})}var u=t.Trigger,D=n.forwardRef(({children:e,className:r,...a},s)=>l(t.Portal,{children:[o(t.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),l(t.Content,{ref:s,className:i("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...a,children:[o("div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function C({className:e,...r}){return o("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function v({className:e,...r}){return o("main",{className:i("overflow-auto px-4 py-2",e),...r})}function g({className:e,...r}){return o("div",{className:i("mt-auto flex flex-col-reverse gap-2 p-4",e),...r})}var w=n.forwardRef(({className:e,...r},a)=>o(t.Title,{ref:a,className:i("text-lg font-semibold leading-none tracking-tight",e),...r}));w.displayName=t.Title.displayName;var c=n.forwardRef(({className:e,...r},a)=>o(t.Description,{ref:a,className:i("text-muted-foreground text-sm",e),...r}));c.displayName=t.Description.displayName;var f=n.forwardRef(({className:e,size:r,variant:a="outline",...s},m)=>o(t.Close,{ref:m,className:p({className:e,size:r,variant:a}),...s}));f.displayName=t.Close.displayName;export{R as Drawer,v as DrawerBody,f as DrawerClose,D as DrawerContent,c as DrawerDescription,g as DrawerFooter,C as DrawerHeader,w as DrawerTitle,u as DrawerTrigger};
1
+ "use client";import{a as p}from"../chunk-VEXIU3VB.js";import"../chunk-JK5GPYFN.js";import{a as i}from"../chunk-VRBUDJBH.js";import*as n from"react";import{Drawer as t}from"vaul";import{jsx as o,jsxs as l}from"react/jsx-runtime";function R({shouldScaleBackground:e=!0,...r}){return o(t.Root,{shouldScaleBackground:e,...r})}var u=t.Trigger,D=n.forwardRef(({children:e,className:r,...a},s)=>l(t.Portal,{children:[o(t.Overlay,{className:"fixed inset-0 z-50 bg-black/80"}),l(t.Content,{ref:s,className:i("bg-background fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-xl border",r),...a,children:[o("div",{className:"bg-muted mx-auto mt-4 h-2 w-24 rounded-full"}),e]})]}));D.displayName="DrawerContent";function C({className:e,...r}){return o("div",{className:i("grid gap-1.5 p-4 text-center sm:text-left",e),...r})}function v({className:e,...r}){return o("main",{className:i("overflow-auto px-4 py-2",e),...r})}function g({className:e,...r}){return o("div",{className:i("mt-auto flex flex-col-reverse gap-2 p-4",e),...r})}var w=n.forwardRef(({className:e,...r},a)=>o(t.Title,{ref:a,className:i("text-lg font-semibold leading-none tracking-tight",e),...r}));w.displayName=t.Title.displayName;var c=n.forwardRef(({className:e,...r},a)=>o(t.Description,{ref:a,className:i("text-muted-foreground text-sm",e),...r}));c.displayName=t.Description.displayName;var f=n.forwardRef(({className:e,size:r,variant:a="outline",...s},m)=>o(t.Close,{ref:m,className:p({className:e,size:r,variant:a}),...s}));f.displayName=t.Close.displayName;export{R as Drawer,v as DrawerBody,f as DrawerClose,D as DrawerContent,c as DrawerDescription,g as DrawerFooter,C as DrawerHeader,w as DrawerTitle,u as DrawerTrigger};
2
2
  //# sourceMappingURL=drawer.js.map
@@ -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 _chunk3Z6QUP75cjs = require('../chunk-3Z6QUP75.cjs');require('../chunk-76TT2QSB.cjs');var _chunk7NEJ7IQ3cjs = require('../chunk-7NEJ7IQ3.cjs');var _chunkBASRQOAAcjs = require('../chunk-BASRQOAA.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var l = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _jsxruntime = require('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)=>_jsxruntime.jsxs.call(void 0, _chunk3Z6QUP75cjs.b,{ariaDecrementLabel:c,ariaIncrementLabel:d,className:_chunk7NEJ7IQ3cjs.b.call(void 0, {inputSize:r,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "pr-0",I)}),defaultValue:f,disabled:N,formatOptions:b,id:v,max:P,min:R,readOnly:h,step:y,value:C,onChange:g,children:[_jsxruntime.jsx.call(void 0, _chunk3Z6QUP75cjs.c,{ref:D,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",className:_chunk7NEJ7IQ3cjs.c.call(void 0, {inputSize:r}),inputMode:"numeric",spellCheck:"false",...B}),_jsxruntime.jsxs.call(void 0, "div",{className:"ml-auto grid h-full divide-y rounded-r-md border-l",children:[_jsxruntime.jsx.call(void 0, _chunk3Z6QUP75cjs.d,{className:_chunkBASRQOAAcjs.a.call(void 0, {size:"icon",variant:"ghost",className:"h-full rounded-none rounded-tr-md"}),children:_jsxruntime.jsx.call(void 0, _reacticons.ChevronUpIcon,{})}),_jsxruntime.jsx.call(void 0, _chunk3Z6QUP75cjs.e,{className:_chunkBASRQOAAcjs.a.call(void 0, {size:"icon",variant:"ghost",className:"rounded-tb-md h-full rounded-none"}),children:_jsxruntime.jsx.call(void 0, _reacticons.ChevronDownIcon,{})})]})]}));w.displayName="NumberInput";exports.NumberInput = w;
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 _chunkCE6DSAWAcjs = require('../chunk-CE6DSAWA.cjs');var _chunkYIBPK6E7cjs = require('../chunk-YIBPK6E7.cjs');require('../chunk-VJSYNP4O.cjs');var _chunk4XRBMJ5Qcjs = require('../chunk-4XRBMJ5Q.cjs');var _react = require('react'); var u = _interopRequireWildcard(_react);var _reacticons = require('@radix-ui/react-icons');var _numberinput = require('@codefast/primitive/number-input'); var e = _interopRequireWildcard(_numberinput);var _jsxruntime = require('react/jsx-runtime');var{root:g,input:B}=_chunkCE6DSAWAcjs.a.call(void 0, ),D= exports.NumberInput =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)=>_jsxruntime.jsxs.call(void 0, e.Root,{ariaDecrementLabel:a,ariaIncrementLabel:p,className:g({inputSize:n,className:_chunk4XRBMJ5Qcjs.a.call(void 0, "pr-0",s)}),defaultValue:l,disabled:c,formatOptions:d,id:I,max:f,min:N,readOnly:b,step:v,value:P,onChange:R,children:[_jsxruntime.jsx.call(void 0, e.Item,{ref:y,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",className:B({inputSize:n}),inputMode:"numeric",spellCheck:"false",...h}),_jsxruntime.jsxs.call(void 0, "div",{className:"ml-auto grid h-full divide-y rounded-r-md border-l",children:[_jsxruntime.jsx.call(void 0, e.IncrementButton,{className:_chunkYIBPK6E7cjs.a.call(void 0, {size:"icon",variant:"ghost",className:"h-full rounded-none rounded-tr-md"}),children:_jsxruntime.jsx.call(void 0, _reacticons.ChevronUpIcon,{})}),_jsxruntime.jsx.call(void 0, e.DecrementButton,{className:_chunkYIBPK6E7cjs.a.call(void 0, {size:"icon",variant:"ghost",className:"rounded-tb-md h-full rounded-none"}),children:_jsxruntime.jsx.call(void 0, _reacticons.ChevronDownIcon,{})})]})]}));D.displayName="NumberInput";exports.NumberInput = D;
2
2
  //# sourceMappingURL=number-input.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/number-input.cjs","../../src/react/number-input.tsx"],"names":["NumberInput","ariaDecrementLabel","ariaIncrementLabel","className","inputSize","defaultValue","disabled","formatOptions","id","max","min","readOnly","step","value","onChange","props","forwardedRef","jsxs","root","cn","jsx","NumberInputItem","input","NumberInputIncrementButton","buttonVariants","ChevronUpIcon","NumberInputDecrementButton","ChevronDownIcon"],"mappings":"AAAA,uWAAY,CAAC,yDAA8D,iCAA8B,yDAAiD,yDAA0C,iCAA8B,yDAA0C,uECErP,mDACwB,+CAoDzC,IApCAA,CAAAA,CAAoB,CAAA,CAAA,UAAA,CACxB,CACE,CACE,kBAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,EAAA,CAAAC,CAAAA,CACA,GAAA,CAAAC,CAAAA,CACA,GAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EAEAC,8BAAAA,mBAAsBjB,CAArB,CACC,kBAAA,CAAoBC,CAAAA,CACpB,kBAAA,CAAoBC,CAAAA,CACpB,SAAA,CAAWgB,iCAAAA,CAAO,SAAA,CAAAd,CAAAA,CAAW,SAAA,CAAWe,iCAAAA,MAAG,CAAQhB,CAAS,CAAE,CAAC,CAAA,CAC/D,YAAA,CAAcE,CAAAA,CACd,QAAA,CAAUC,CAAAA,CACV,aAAA,CAAeC,CAAAA,CACf,EAAA,CAAIC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACL,GAAA,CAAKC,CAAAA,CACL,QAAA,CAAUC,CAAAA,CACV,IAAA,CAAMC,CAAAA,CACN,KAAA,CAAOC,CAAAA,CACP,QAAA,CAAUC,CAAAA,CAEV,QAAA,CAAA,CAAAM,6BAAAA,mBAAsBC,CAArB,CACC,GAAA,CAAKL,CAAAA,CACL,cAAA,CAAe,KAAA,CACf,YAAA,CAAa,KAAA,CACb,WAAA,CAAY,KAAA,CACZ,SAAA,CAAWM,iCAAAA,CAAQ,SAAA,CAAAlB,CAAU,CAAC,CAAA,CAC9B,SAAA,CAAU,SAAA,CACV,UAAA,CAAW,OAAA,CACV,GAAGW,CAAAA,CACN,CAAA,CACAE,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,oDAAA,CACb,QAAA,CAAA,CAAAG,6BAAAA,mBAAsBG,CAArB,CACC,SAAA,CAAWC,iCAAAA,CAAiB,IAAA,CAAM,MAAA,CAAQ,OAAA,CAAS,OAAA,CAAS,SAAA,CAAW,mCAAoC,CAAC,CAAA,CAE5G,QAAA,CAAAJ,6BAAAA,yBAACK,CAAA,CAAA,CAAc,CAAA,CACjB,CAAA,CACAL,6BAAAA,mBAAsBM,CAArB,CACC,SAAA,CAAWF,iCAAAA,CAAiB,IAAA,CAAM,MAAA,CAAQ,OAAA,CAAS,OAAA,CAAS,SAAA,CAAW,mCAAoC,CAAC,CAAA,CAE5G,QAAA,CAAAJ,6BAAAA,2BAACO,CAAA,CAAA,CAAgB,CAAA,CACnB,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAEJ,CAAA,CAEA3B,CAAAA,CAAY,WAAA,CAAc,aAAA,CAAA,wBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/number-input.cjs","sourcesContent":[null,"'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"]}
1
+ {"version":3,"sources":["/home/runner/work/codefast/codefast/packages/ui/dist/react/number-input.cjs","../../src/react/number-input.tsx"],"names":["root","input","inputVariants","NumberInput","ariaDecrementLabel","ariaIncrementLabel","className","inputSize","defaultValue","disabled","formatOptions","id","max","min","readOnly","step","value","onChange","props","forwardedRef","jsxs","cn","jsx","buttonVariants","ChevronUpIcon","ChevronDownIcon"],"mappings":"AAAA,uWAAY,CAAC,yDAAyC,yDAA0C,iCAA8B,yDAA0C,uECEjJ,mDACwB,8GACT,+CAqDhC,GAhDA,CAAE,IAAA,CAAAA,CAAAA,CAAM,KAAA,CAAAC,CAAM,CAAA,CAAIC,iCAAAA,CAAc,CAYhCC,CAAAA,uBAAoB,CAAA,CAAA,UAAA,CACxB,CACE,CACE,kBAAA,CAAAC,CAAAA,CACA,kBAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,EAAA,CAAAC,CAAAA,CACA,GAAA,CAAAC,CAAAA,CACA,GAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CACAC,CAAAA,CAAAA,EAEAC,8BAAAA,CAAsB,CAAA,IAAA,CAArB,CACC,kBAAA,CAAoBhB,CAAAA,CACpB,kBAAA,CAAoBC,CAAAA,CACpB,SAAA,CAAWL,CAAAA,CAAK,CAAE,SAAA,CAAAO,CAAAA,CAAW,SAAA,CAAWc,iCAAAA,MAAG,CAAQf,CAAS,CAAE,CAAC,CAAA,CAC/D,YAAA,CAAcE,CAAAA,CACd,QAAA,CAAUC,CAAAA,CACV,aAAA,CAAeC,CAAAA,CACf,EAAA,CAAIC,CAAAA,CACJ,GAAA,CAAKC,CAAAA,CACL,GAAA,CAAKC,CAAAA,CACL,QAAA,CAAUC,CAAAA,CACV,IAAA,CAAMC,CAAAA,CACN,KAAA,CAAOC,CAAAA,CACP,QAAA,CAAUC,CAAAA,CAEV,QAAA,CAAA,CAAAK,6BAAAA,CAAsB,CAAA,IAAA,CAArB,CACC,GAAA,CAAKH,CAAAA,CACL,cAAA,CAAe,KAAA,CACf,YAAA,CAAa,KAAA,CACb,WAAA,CAAY,KAAA,CACZ,SAAA,CAAWlB,CAAAA,CAAM,CAAE,SAAA,CAAAM,CAAU,CAAC,CAAA,CAC9B,SAAA,CAAU,SAAA,CACV,UAAA,CAAW,OAAA,CACV,GAAGW,CAAAA,CACN,CAAA,CACAE,8BAAAA,KAAC,CAAA,CAAI,SAAA,CAAU,oDAAA,CACb,QAAA,CAAA,CAAAE,6BAAAA,CAAsB,CAAA,eAAA,CAArB,CACC,SAAA,CAAWC,iCAAAA,CAAiB,IAAA,CAAM,MAAA,CAAQ,OAAA,CAAS,OAAA,CAAS,SAAA,CAAW,mCAAoC,CAAC,CAAA,CAE5G,QAAA,CAAAD,6BAAAA,yBAACE,CAAA,CAAA,CAAc,CAAA,CACjB,CAAA,CACAF,6BAAAA,CAAsB,CAAA,eAAA,CAArB,CACC,SAAA,CAAWC,iCAAAA,CAAiB,IAAA,CAAM,MAAA,CAAQ,OAAA,CAAS,OAAA,CAAS,SAAA,CAAW,mCAAoC,CAAC,CAAA,CAE5G,QAAA,CAAAD,6BAAAA,2BAACG,CAAA,CAAA,CAAgB,CAAA,CACnB,CAAA,CAAA,CACF,CAAA,CAAA,CACF,CAEJ,CAAA,CAEAtB,CAAAA,CAAY,WAAA,CAAc,aAAA,CAAA,wBAAA","file":"/home/runner/work/codefast/codefast/packages/ui/dist/react/number-input.cjs","sourcesContent":[null,"'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"]}
@@ -1,14 +1,11 @@
1
1
  import * as React from 'react';
2
- import { NumberInput as NumberInput$1, NumberInputItem } from './primitive/number-input.cjs';
3
- import { InputVariantsProps } from './style/input.cjs';
4
- import '@radix-ui/react-context';
5
- import '@radix-ui/react-primitive';
6
- import './primitive/input.cjs';
7
- import 'tailwind-merge';
2
+ import * as NumberInputPrimitive from '@codefast/primitive/number-input';
3
+ import { InputVariantsProps } from './text-input.cjs';
8
4
  import 'tailwind-variants';
9
5
  import 'tailwind-variants/dist/config.js';
6
+ import '@codefast/primitive/input';
10
7
 
11
- interface NumberInputProps extends InputVariantsProps, React.ComponentProps<typeof NumberInput$1>, React.ComponentPropsWithoutRef<typeof NumberInputItem> {
8
+ interface NumberInputProps extends InputVariantsProps, React.ComponentProps<typeof NumberInputPrimitive.Root>, React.ComponentPropsWithoutRef<typeof NumberInputPrimitive.Item> {
12
9
  }
13
10
  declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
14
11
 
@@ -1,14 +1,11 @@
1
1
  import * as React from 'react';
2
- import { NumberInput as NumberInput$1, NumberInputItem } from './primitive/number-input.js';
3
- import { InputVariantsProps } from './style/input.js';
4
- import '@radix-ui/react-context';
5
- import '@radix-ui/react-primitive';
6
- import './primitive/input.js';
7
- import 'tailwind-merge';
2
+ import * as NumberInputPrimitive from '@codefast/primitive/number-input';
3
+ import { InputVariantsProps } from './text-input.js';
8
4
  import 'tailwind-variants';
9
5
  import 'tailwind-variants/dist/config.js';
6
+ import '@codefast/primitive/input';
10
7
 
11
- interface NumberInputProps extends InputVariantsProps, React.ComponentProps<typeof NumberInput$1>, React.ComponentPropsWithoutRef<typeof NumberInputItem> {
8
+ interface NumberInputProps extends InputVariantsProps, React.ComponentProps<typeof NumberInputPrimitive.Root>, React.ComponentPropsWithoutRef<typeof NumberInputPrimitive.Item> {
12
9
  }
13
10
  declare const NumberInput: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLInputElement>>;
14
11