@betterinternship/components 2.9.7 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (220) hide show
  1. package/README.md +45 -50
  2. package/dist/components/{ui/accordion.d.ts → accordion.d.ts} +7 -1
  3. package/dist/components/accordion.js +23 -0
  4. package/dist/components/accordion.js.map +1 -0
  5. package/dist/components/{ui/animated-count.d.ts → animated-count.d.ts} +1 -4
  6. package/dist/components/animated-count.js +17 -0
  7. package/dist/components/animated-count.js.map +1 -0
  8. package/dist/components/animated-shiny-text.d.ts +5 -0
  9. package/dist/components/{ui/app-header.d.ts → app-header.d.ts} +3 -1
  10. package/dist/components/app-header.js +72 -0
  11. package/dist/components/app-header.js.map +1 -0
  12. package/dist/components/autocomplete.d.ts +34 -0
  13. package/dist/components/{ui/avatar.js → avatar.js} +1 -1
  14. package/dist/components/avatar.js.map +1 -0
  15. package/dist/components/badge.d.ts +13 -0
  16. package/dist/components/{ui/badge.js → badge.js} +54 -31
  17. package/dist/components/badge.js.map +1 -0
  18. package/dist/components/banner.d.ts +17 -0
  19. package/dist/components/banner.js +41 -0
  20. package/dist/components/banner.js.map +1 -0
  21. package/dist/components/button.d.ts +56 -0
  22. package/dist/components/button.js +53 -0
  23. package/dist/components/button.js.map +1 -0
  24. package/dist/components/calendar.d.ts +10 -0
  25. package/dist/components/calendar.js +56 -0
  26. package/dist/components/calendar.js.map +1 -0
  27. package/dist/components/{ui/card.d.ts → card.d.ts} +7 -1
  28. package/dist/components/{ui/card.js → card.js} +10 -4
  29. package/dist/components/card.js.map +1 -0
  30. package/dist/components/carousel.d.ts +40 -0
  31. package/dist/components/checkbox.d.ts +8 -0
  32. package/dist/components/checkbox.js +20 -0
  33. package/dist/components/checkbox.js.map +1 -0
  34. package/dist/components/chip-select.d.ts +18 -0
  35. package/dist/components/collapsible.d.ts +18 -0
  36. package/dist/components/context-menu.d.ts +27 -0
  37. package/dist/components/{ui/dialog.d.ts → dialog.d.ts} +5 -2
  38. package/dist/components/dialog.js +44 -0
  39. package/dist/components/dialog.js.map +1 -0
  40. package/dist/components/divider.d.ts +3 -0
  41. package/dist/components/divider.js +10 -0
  42. package/dist/components/divider.js.map +1 -0
  43. package/dist/components/dot-matrix.d.ts +21 -0
  44. package/dist/components/dropdown-menu.js +61 -0
  45. package/dist/components/dropdown-menu.js.map +1 -0
  46. package/dist/components/dropdown.d.ts +65 -0
  47. package/dist/components/error.d.ts +8 -0
  48. package/dist/components/file-upload.d.ts +16 -0
  49. package/dist/components/file-upload.js +29 -0
  50. package/dist/components/file-upload.js.map +1 -0
  51. package/dist/components/filter-chip.d.ts +21 -0
  52. package/dist/components/filter-chip.js +28 -0
  53. package/dist/components/filter-chip.js.map +1 -0
  54. package/dist/components/form-checkbox-group.d.ts +31 -0
  55. package/dist/components/form-checkbox-group.js +29 -0
  56. package/dist/components/form-checkbox-group.js.map +1 -0
  57. package/dist/components/form-checkbox.d.ts +15 -0
  58. package/dist/components/form-checkbox.js +14 -0
  59. package/dist/components/form-checkbox.js.map +1 -0
  60. package/dist/components/form-date-picker.d.ts +47 -0
  61. package/dist/components/form-date-picker.js +55 -0
  62. package/dist/components/form-date-picker.js.map +1 -0
  63. package/dist/components/form-field.d.ts +14 -0
  64. package/dist/components/form-field.js +10 -0
  65. package/dist/components/form-field.js.map +1 -0
  66. package/dist/components/form-input.d.ts +11 -0
  67. package/dist/components/form-input.js +12 -0
  68. package/dist/components/form-input.js.map +1 -0
  69. package/dist/components/form-month-picker.d.ts +26 -0
  70. package/dist/components/form-month-picker.js +55 -0
  71. package/dist/components/form-month-picker.js.map +1 -0
  72. package/dist/components/form-radio.d.ts +15 -0
  73. package/dist/components/form-radio.js +20 -0
  74. package/dist/components/form-radio.js.map +1 -0
  75. package/dist/components/form-textarea.d.ts +11 -0
  76. package/dist/components/form-textarea.js +11 -0
  77. package/dist/components/form-textarea.js.map +1 -0
  78. package/dist/components/form.d.ts +24 -0
  79. package/dist/components/hover-card.d.ts +6 -0
  80. package/dist/components/input-otp.d.ts +39 -0
  81. package/dist/components/input.js +30 -0
  82. package/dist/components/input.js.map +1 -0
  83. package/dist/components/label.d.ts +15 -0
  84. package/dist/components/label.js +19 -0
  85. package/dist/components/label.js.map +1 -0
  86. package/dist/components/loader.d.ts +20 -0
  87. package/dist/components/loader.js +14 -0
  88. package/dist/components/loader.js.map +1 -0
  89. package/dist/components/magnetic-button.d.ts +5 -0
  90. package/dist/components/messages.d.ts +6 -0
  91. package/dist/components/mobile-sheet-portal.d.ts +9 -0
  92. package/dist/components/page-header.d.ts +6 -0
  93. package/dist/components/page-header.js +9 -0
  94. package/dist/components/page-header.js.map +1 -0
  95. package/dist/components/paginator.d.ts +9 -0
  96. package/dist/components/{ui/popover.js → popover.js} +2 -2
  97. package/dist/components/popover.js.map +1 -0
  98. package/dist/components/progress.d.ts +4 -0
  99. package/dist/components/radio-group.d.ts +5 -0
  100. package/dist/components/radio-group.js +17 -0
  101. package/dist/components/radio-group.js.map +1 -0
  102. package/dist/components/select.d.ts +15 -0
  103. package/dist/components/select.js +50 -0
  104. package/dist/components/select.js.map +1 -0
  105. package/dist/components/sheet.d.ts +27 -0
  106. package/dist/components/{ui/skeleton.js → skeleton.js} +2 -2
  107. package/dist/components/skeleton.js.map +1 -0
  108. package/dist/components/slider.d.ts +4 -0
  109. package/dist/components/sonner-toast.d.ts +106 -0
  110. package/dist/components/stepper.d.ts +9 -0
  111. package/dist/components/stepper.js +14 -0
  112. package/dist/components/stepper.js.map +1 -0
  113. package/dist/components/switch.js +10 -0
  114. package/dist/components/switch.js.map +1 -0
  115. package/dist/components/table.d.ts +33 -0
  116. package/dist/components/table.js +88 -0
  117. package/dist/components/table.js.map +1 -0
  118. package/dist/components/tabs.d.ts +22 -0
  119. package/dist/components/tabs.js +40 -0
  120. package/dist/components/tabs.js.map +1 -0
  121. package/dist/components/textarea.d.ts +3 -0
  122. package/dist/components/textarea.js +11 -0
  123. package/dist/components/textarea.js.map +1 -0
  124. package/dist/components/time-input-native.d.ts +14 -0
  125. package/dist/components/time-input-native.js +61 -0
  126. package/dist/components/time-input-native.js.map +1 -0
  127. package/dist/components/timeline.d.ts +17 -0
  128. package/dist/components/toggle.d.ts +5 -0
  129. package/dist/components/{ui/tooltip.js → tooltip.js} +2 -2
  130. package/dist/components/tooltip.js.map +1 -0
  131. package/dist/design-tokens.d.ts +69 -0
  132. package/dist/hooks/use-detect-click-outside.d.ts +4 -0
  133. package/dist/hooks/use-field-focus.d.ts +37 -0
  134. package/dist/hooks/use-field-focus.js +57 -0
  135. package/dist/hooks/use-field-focus.js.map +1 -0
  136. package/dist/hooks/use-mobile-sheet-viewport.d.ts +6 -0
  137. package/dist/hooks/use-mobile-sheet-viewport.js +60 -0
  138. package/dist/hooks/use-mobile-sheet-viewport.js.map +1 -0
  139. package/dist/hooks/use-mobile.d.ts +1 -0
  140. package/dist/hooks/use-mobile.js +16 -0
  141. package/dist/hooks/use-mobile.js.map +1 -0
  142. package/dist/hooks/use-resource-table.d.ts +141 -0
  143. package/dist/hooks/useMQJob.d.ts +2 -2
  144. package/dist/hooks/useMQJob.js.map +1 -1
  145. package/dist/index.d.ts +37 -22
  146. package/dist/index.js +35 -22
  147. package/dist/index.js.map +1 -1
  148. package/dist/lib/interaction-styles.d.ts +10 -0
  149. package/dist/lib/interaction-styles.js +15 -0
  150. package/dist/lib/interaction-styles.js.map +1 -0
  151. package/dist/utils.js.map +1 -1
  152. package/package.json +290 -249
  153. package/theme.css +355 -228
  154. package/theme.legacy.css +84 -0
  155. package/dist/components/ui/accordion.js +0 -20
  156. package/dist/components/ui/accordion.js.map +0 -1
  157. package/dist/components/ui/animated-count.js +0 -22
  158. package/dist/components/ui/animated-count.js.map +0 -1
  159. package/dist/components/ui/app-header.js +0 -72
  160. package/dist/components/ui/app-header.js.map +0 -1
  161. package/dist/components/ui/avatar.js.map +0 -1
  162. package/dist/components/ui/badge.d.ts +0 -22
  163. package/dist/components/ui/badge.js.map +0 -1
  164. package/dist/components/ui/button.d.ts +0 -13
  165. package/dist/components/ui/button.js +0 -88
  166. package/dist/components/ui/button.js.map +0 -1
  167. package/dist/components/ui/button.test.d.ts +0 -1
  168. package/dist/components/ui/calendar.d.ts +0 -7
  169. package/dist/components/ui/card.js.map +0 -1
  170. package/dist/components/ui/checkbox.d.ts +0 -4
  171. package/dist/components/ui/checkbox.js +0 -11
  172. package/dist/components/ui/checkbox.js.map +0 -1
  173. package/dist/components/ui/dialog.js +0 -41
  174. package/dist/components/ui/dialog.js.map +0 -1
  175. package/dist/components/ui/dropdown-menu.js +0 -61
  176. package/dist/components/ui/dropdown-menu.js.map +0 -1
  177. package/dist/components/ui/fab.js +0 -9
  178. package/dist/components/ui/fab.js.map +0 -1
  179. package/dist/components/ui/icons.d.ts +0 -10
  180. package/dist/components/ui/icons.js +0 -39
  181. package/dist/components/ui/icons.js.map +0 -1
  182. package/dist/components/ui/input.js +0 -17
  183. package/dist/components/ui/input.js.map +0 -1
  184. package/dist/components/ui/label.d.ts +0 -4
  185. package/dist/components/ui/label.js +0 -10
  186. package/dist/components/ui/label.js.map +0 -1
  187. package/dist/components/ui/page-header.d.ts +0 -18
  188. package/dist/components/ui/page-header.js +0 -17
  189. package/dist/components/ui/page-header.js.map +0 -1
  190. package/dist/components/ui/popover.js.map +0 -1
  191. package/dist/components/ui/separator.d.ts +0 -4
  192. package/dist/components/ui/separator.js +0 -10
  193. package/dist/components/ui/separator.js.map +0 -1
  194. package/dist/components/ui/skeleton.js.map +0 -1
  195. package/dist/components/ui/status-notice.d.ts +0 -14
  196. package/dist/components/ui/status-notice.js +0 -30
  197. package/dist/components/ui/status-notice.js.map +0 -1
  198. package/dist/components/ui/switch.js +0 -10
  199. package/dist/components/ui/switch.js.map +0 -1
  200. package/dist/components/ui/table.d.ts +0 -10
  201. package/dist/components/ui/table.js +0 -30
  202. package/dist/components/ui/table.js.map +0 -1
  203. package/dist/components/ui/textarea.d.ts +0 -3
  204. package/dist/components/ui/textarea.js +0 -9
  205. package/dist/components/ui/textarea.js.map +0 -1
  206. package/dist/components/ui/tooltip.js.map +0 -1
  207. package/dist/config.d.ts +0 -6
  208. package/dist/config.js +0 -9
  209. package/dist/config.js.map +0 -1
  210. package/dist/hooks/useClientProcess.d.ts +0 -69
  211. package/dist/hooks/useClientProcess.js +0 -255
  212. package/dist/hooks/useClientProcess.js.map +0 -1
  213. /package/dist/components/{ui/avatar.d.ts → avatar.d.ts} +0 -0
  214. /package/dist/components/{ui/dropdown-menu.d.ts → dropdown-menu.d.ts} +0 -0
  215. /package/dist/components/{ui/fab.d.ts → fab.d.ts} +0 -0
  216. /package/dist/components/{ui/input.d.ts → input.d.ts} +0 -0
  217. /package/dist/components/{ui/popover.d.ts → popover.d.ts} +0 -0
  218. /package/dist/components/{ui/skeleton.d.ts → skeleton.d.ts} +0 -0
  219. /package/dist/components/{ui/switch.d.ts → switch.d.ts} +0 -0
  220. /package/dist/components/{ui/tooltip.d.ts → tooltip.d.ts} +0 -0
@@ -1,14 +1,14 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import * as PopoverPrimitive from '@radix-ui/react-popover';
4
- import { cn } from '../../utils.js';
4
+ import { cn } from '../utils.js';
5
5
 
6
6
  function Popover({ ...props }) {
7
7
  return jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
8
8
  }
9
9
  const PopoverTrigger = React.forwardRef(({ className, ...props }, ref) => (jsx(PopoverPrimitive.Trigger, { ref: ref, className: className, "data-slot": "popover-trigger", ...props })));
10
10
  PopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;
11
- const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (jsx(PopoverPrimitive.Portal, { children: jsx(PopoverPrimitive.Content, { ref: ref, "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[0.33em] border p-4 shadow-md outline-hidden', className), ...props }) })));
11
+ const PopoverContent = React.forwardRef(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (jsx(PopoverPrimitive.Portal, { children: jsx(PopoverPrimitive.Content, { ref: ref, "data-slot": "popover-content", align: align, sideOffset: sideOffset, className: cn('bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border border-border p-4 shadow-card outline-hidden', className), ...props }) })));
12
12
  PopoverContent.displayName = PopoverPrimitive.Content.displayName;
13
13
  const PopoverAnchor = React.forwardRef(({ className, ...props }, ref) => (jsx(PopoverPrimitive.Anchor, { ref: ref, "data-slot": "popover-anchor", className: className, ...props })));
14
14
  PopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.js","sources":["../../src/components/popover.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\n\nimport { cn } from '@/utils';\n\nfunction Popover({\n ...props\n}: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />;\n}\n\nconst PopoverTrigger = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Trigger\n ref={ref}\n className={className}\n data-slot=\"popover-trigger\"\n {...props}\n />\n));\nPopoverTrigger.displayName = PopoverPrimitive.Trigger.displayName;\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = 'center', sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in motion-reduce:animate-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-card border border-border p-4 shadow-card outline-hidden',\n className,\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n));\nPopoverContent.displayName = PopoverPrimitive.Content.displayName;\n\nconst PopoverAnchor = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Anchor>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Anchor>\n>(({ className, ...props }, ref) => (\n <PopoverPrimitive.Anchor\n ref={ref}\n data-slot=\"popover-anchor\"\n className={className}\n {...props}\n />\n));\nPopoverAnchor.displayName = PopoverPrimitive.Anchor.displayName;\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };\n"],"names":["_jsx"],"mappings":";;;;;AAKA,SAAS,OAAO,CAAC,EACf,GAAG,KAAK,EAC2C,EAAA;IACnD,OAAOA,GAAA,CAAC,gBAAgB,CAAC,IAAI,iBAAW,SAAS,EAAA,GAAK,KAAK,EAAA,CAAI;AACjE;AAEA,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,eACV,iBAAiB,EAAA,GACvB,KAAK,EAAA,CACT,CACH;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,cAAc,GAAG,KAAK,CAAC,UAAU,CAGrC,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,QAAQ,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC/DA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EAAA,QAAA,EACtBA,GAAA,CAAC,gBAAgB,CAAC,OAAO,EAAA,EACvB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,iBAAiB,EAC3B,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACX,6gBAA6gB,EAC7gB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,CACT,EAAA,CACsB,CAC3B;AACD,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC,OAAO,CAAC,WAAW;AAEjE,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAGpC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,MAC7BA,GAAA,CAAC,gBAAgB,CAAC,MAAM,EAAA,EACtB,GAAG,EAAE,GAAG,EAAA,WAAA,EACE,gBAAgB,EAC1B,SAAS,EAAE,SAAS,EAAA,GAChB,KAAK,EAAA,CACT,CACH;AACD,aAAa,CAAC,WAAW,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW;;;;"}
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as ProgressPrimitive from "@radix-ui/react-progress";
3
+ declare const Progress: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Progress };
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export { RadioGroup, RadioGroupItem };
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
5
+ import { cn } from '../utils.js';
6
+
7
+ const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
8
+ return (jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref: ref }));
9
+ });
10
+ RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
11
+ const RadioGroupItem = React.forwardRef(({ className, ...props }, ref) => {
12
+ return (jsx(RadioGroupPrimitive.Item, { ref: ref, className: cn("relative aspect-square h-4 w-4 shrink-0 rounded-full border border-input bg-muted text-primary transition-colors duration-state data-[state=checked]:border-primary data-[state=checked]:bg-primary hover:border-primary focus:outline-none focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none after:absolute after:-inset-3 after:content-['']", className), ...props, children: jsx(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: jsx("span", { className: "h-2 w-2 rounded-full bg-background" }) }) }));
13
+ });
14
+ RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
15
+
16
+ export { RadioGroup, RadioGroupItem };
17
+ //# sourceMappingURL=radio-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-group.js","sources":["../../src/components/radio-group.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n );\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"relative aspect-square h-4 w-4 shrink-0 rounded-full border border-input bg-muted text-primary transition-colors duration-state data-[state=checked]:border-primary data-[state=checked]:bg-primary hover:border-primary focus:outline-none focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none after:absolute after:-inset-3 after:content-['']\",\n className,\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <span className=\"h-2 w-2 rounded-full bg-background\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n );\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":[],"mappings":";;;;;;AAOA;;AAWA;AACA;AAEA;AAIE;AAcF;AACA;;"}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
+ declare function Select({ open: controlledOpen, defaultOpen, onOpenChange, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ title?: string;
11
+ } & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -0,0 +1,50 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import * as SelectPrimitive from '@radix-ui/react-select';
4
+ import { ChevronDown, ChevronUp, X, Check } from 'lucide-react';
5
+ import { cn } from '../utils.js';
6
+ import { fieldInteractionClassName } from '../hooks/use-field-focus.js';
7
+ import { useMobile } from '../hooks/use-mobile.js';
8
+ import { useMobileSheetViewport } from '../hooks/use-mobile-sheet-viewport.js';
9
+
10
+ const SelectContext = React.createContext({ open: false, setOpen: (_open) => { } });
11
+ function Select({ open: controlledOpen, defaultOpen = false, onOpenChange, children, ...props }) {
12
+ const [internalOpen, setInternalOpen] = React.useState(defaultOpen);
13
+ const open = controlledOpen ?? internalOpen;
14
+ const setOpen = (next) => {
15
+ if (controlledOpen === undefined)
16
+ setInternalOpen(next);
17
+ onOpenChange?.(next);
18
+ };
19
+ return (jsx(SelectContext.Provider, { value: { open, setOpen }, children: jsx(SelectPrimitive.Root, { ...props, open: open, onOpenChange: setOpen, children: children }) }));
20
+ }
21
+ const SelectGroup = SelectPrimitive.Group;
22
+ const SelectValue = SelectPrimitive.Value;
23
+ const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => (jsxs(SelectPrimitive.Trigger, { ref: ref, className: cn('group bg-background text-foreground placeholder:text-muted-foreground/40 data-[placeholder]:text-muted-foreground/40 border-input enabled:hover:border-input-hover flex h-form-control min-h-form-control max-h-form-control w-full cursor-pointer items-center justify-between gap-2 rounded-control-lg border px-field-padding-x py-0 text-base font-normal outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1', 'focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue', fieldInteractionClassName, className), ...props, children: [children, jsx(SelectPrimitive.Icon, { asChild: true, children: jsx(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-interactive ease-out-strong group-data-[state=open]:rotate-180 motion-reduce:transition-none" }) })] })));
24
+ SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
25
+ const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => (jsx(SelectPrimitive.ScrollUpButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: jsx(ChevronUp, { className: "h-4 w-4" }) })));
26
+ SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
27
+ const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => (jsx(SelectPrimitive.ScrollDownButton, { ref: ref, className: cn('flex cursor-default items-center justify-center py-1', className), ...props, children: jsx(ChevronDown, { className: "h-4 w-4" }) })));
28
+ SelectScrollDownButton.displayName =
29
+ SelectPrimitive.ScrollDownButton.displayName;
30
+ const SelectContent = React.forwardRef(({ className, children, position = 'popper', title = 'Choose an option', style, ...props }, ref) => {
31
+ const mobile = useMobile();
32
+ const { open, setOpen } = React.useContext(SelectContext);
33
+ const viewport = useMobileSheetViewport(open && mobile);
34
+ return (jsx(SelectPrimitive.Portal, { children: jsxs("div", { className: mobile ? '[&>[data-radix-popper-content-wrapper]]:!fixed [&>[data-radix-popper-content-wrapper]]:!inset-x-0 [&>[data-radix-popper-content-wrapper]]:!top-auto [&>[data-radix-popper-content-wrapper]]:!bottom-[var(--select-sheet-bottom)] [&>[data-radix-popper-content-wrapper]]:!transform-none [&>[data-radix-popper-content-wrapper]]:!z-[1100] [&>[data-radix-popper-content-wrapper]]:!min-w-0' : undefined, style: { '--select-sheet-bottom': `${viewport?.bottom ?? 0}px` }, children: [mobile && open && (jsx("div", { "aria-hidden": "true", className: "fixed inset-0 z-[1090] bg-black/25 backdrop-blur-[1px]" })), jsxs(SelectPrimitive.Content, { ref: ref, className: cn('relative flex flex-col overflow-hidden border border-border bg-background text-sm text-foreground shadow-card duration-interactive ease-out-strong motion-reduce:animate-none', mobile
35
+ ? 'w-full rounded-t-control-lg border-b-0 pb-[env(safe-area-inset-bottom)]'
36
+ : 'z-50 max-h-[400px] min-w-[8rem] rounded-control-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95', className), position: mobile ? 'popper' : position, sideOffset: 4, style: {
37
+ ...(mobile ? { maxHeight: viewport ? Math.min(viewport.height, 640) : '80dvh' } : {}),
38
+ ...style,
39
+ }, ...props, children: [mobile && (jsxs("div", { role: "presentation", className: "flex shrink-0 items-center justify-between gap-4 px-4 pb-3 pt-4", children: [jsx("h2", { className: "text-base font-semibold text-foreground", children: title }), jsx("button", { type: "button", "aria-label": "Close options", className: "-mr-3 flex h-11 w-11 shrink-0 items-center justify-center rounded-control-lg text-muted-foreground hover:bg-muted", onPointerDown: (event) => event.stopPropagation(), onClick: () => setOpen(false), children: jsx(X, { className: "h-5 w-5", "aria-hidden": "true" }) })] })), !mobile && jsx(SelectScrollUpButton, {}), jsx(SelectPrimitive.Viewport, { className: cn('min-h-0 overflow-y-auto overscroll-contain', mobile ? 'w-full flex-1' : position === 'popper' && 'w-full min-w-[var(--radix-select-trigger-width)]'), children: children }), !mobile && jsx(SelectScrollDownButton, {})] })] }) }));
40
+ });
41
+ SelectContent.displayName = SelectPrimitive.Content.displayName;
42
+ const SelectLabel = React.forwardRef(({ className, ...props }, ref) => (jsx(SelectPrimitive.Label, { ref: ref, className: cn('py-2 pr-4 pl-8 text-sm font-semibold text-foreground', className), ...props })));
43
+ SelectLabel.displayName = SelectPrimitive.Label.displayName;
44
+ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => (jsxs(SelectPrimitive.Item, { ref: ref, className: cn('relative flex w-full cursor-pointer items-center gap-2 px-4 py-2 pr-10 text-sm text-muted-foreground outline-none select-none transition-colors duration-interactive ease-out-strong focus:bg-muted data-[state=checked]:bg-primary-tint data-[disabled]:pointer-events-none data-[disabled]:opacity-50 motion-reduce:transition-none max-md:min-h-12', className), ...props, children: [jsx("span", { className: "absolute right-4 flex h-4 w-4 items-center justify-center", children: jsx(SelectPrimitive.ItemIndicator, { children: jsx(Check, { className: "h-4 w-4" }) }) }), jsx(SelectPrimitive.ItemText, { children: children })] })));
45
+ SelectItem.displayName = SelectPrimitive.Item.displayName;
46
+ const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => (jsx(SelectPrimitive.Separator, { ref: ref, className: cn('bg-border h-px', className), ...props })));
47
+ SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
48
+
49
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
50
+ //# sourceMappingURL=select.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.js","sources":["../../src/components/select.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { Check, ChevronDown, ChevronUp, X } from 'lucide-react';\n\nimport { cn } from '@/utils';\nimport { fieldInteractionClassName } from '@/hooks/use-field-focus';\nimport { useMobile } from '@/hooks/use-mobile';\nimport { useMobileSheetViewport } from '@/hooks/use-mobile-sheet-viewport';\n\nconst SelectContext = React.createContext({ open: false, setOpen: (_open: boolean) => {} });\n\nfunction Select({ open: controlledOpen, defaultOpen = false, onOpenChange, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n const [internalOpen, setInternalOpen] = React.useState(defaultOpen);\n const open = controlledOpen ?? internalOpen;\n const setOpen = (next: boolean) => {\n if (controlledOpen === undefined) setInternalOpen(next);\n onOpenChange?.(next);\n };\n\n return (\n <SelectContext.Provider value={{ open, setOpen }}>\n <SelectPrimitive.Root {...props} open={open} onOpenChange={setOpen}>\n {children}\n </SelectPrimitive.Root>\n </SelectContext.Provider>\n );\n}\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'group bg-background text-foreground placeholder:text-muted-foreground/40 data-[placeholder]:text-muted-foreground/40 border-input enabled:hover:border-input-hover flex h-form-control min-h-form-control max-h-form-control w-full cursor-pointer items-center justify-between gap-2 rounded-control-lg border px-field-padding-x py-0 text-base font-normal outline-none aria-invalid:border-destructive disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n 'focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-landing-blue',\n fieldInteractionClassName,\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-interactive ease-out-strong group-data-[state=open]:rotate-180 motion-reduce:transition-none\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-1',\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> & { title?: string }\n>(({ className, children, position = 'popper', title = 'Choose an option', style, ...props }, ref) => {\n const mobile = useMobile();\n const { open, setOpen } = React.useContext(SelectContext);\n const viewport = useMobileSheetViewport(open && mobile);\n\n return (\n <SelectPrimitive.Portal>\n <div\n className={mobile ? '[&>[data-radix-popper-content-wrapper]]:!fixed [&>[data-radix-popper-content-wrapper]]:!inset-x-0 [&>[data-radix-popper-content-wrapper]]:!top-auto [&>[data-radix-popper-content-wrapper]]:!bottom-[var(--select-sheet-bottom)] [&>[data-radix-popper-content-wrapper]]:!transform-none [&>[data-radix-popper-content-wrapper]]:!z-[1100] [&>[data-radix-popper-content-wrapper]]:!min-w-0' : undefined}\n style={{ '--select-sheet-bottom': `${viewport?.bottom ?? 0}px` } as React.CSSProperties}\n >\n {mobile && open && (\n <div aria-hidden=\"true\" className=\"fixed inset-0 z-[1090] bg-black/25 backdrop-blur-[1px]\" />\n )}\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative flex flex-col overflow-hidden border border-border bg-background text-sm text-foreground shadow-card duration-interactive ease-out-strong motion-reduce:animate-none',\n mobile\n ? 'w-full rounded-t-control-lg border-b-0 pb-[env(safe-area-inset-bottom)]'\n : 'z-50 max-h-[400px] min-w-[8rem] rounded-control-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95',\n className,\n )}\n position={mobile ? 'popper' : position}\n sideOffset={4}\n style={{\n ...(mobile ? { maxHeight: viewport ? Math.min(viewport.height, 640) : '80dvh' } : {}),\n ...style,\n }}\n {...props}\n >\n {mobile && (\n <div role=\"presentation\" className=\"flex shrink-0 items-center justify-between gap-4 px-4 pb-3 pt-4\">\n <h2 className=\"text-base font-semibold text-foreground\">{title}</h2>\n <button\n type=\"button\"\n aria-label=\"Close options\"\n className=\"-mr-3 flex h-11 w-11 shrink-0 items-center justify-center rounded-control-lg text-muted-foreground hover:bg-muted\"\n onPointerDown={(event) => event.stopPropagation()}\n onClick={() => setOpen(false)}\n >\n <X className=\"h-5 w-5\" aria-hidden=\"true\" />\n </button>\n </div>\n )}\n {!mobile && <SelectScrollUpButton />}\n <SelectPrimitive.Viewport\n className={cn(\n 'min-h-0 overflow-y-auto overscroll-contain',\n mobile ? 'w-full flex-1' : position === 'popper' && 'w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n {!mobile && <SelectScrollDownButton />}\n </SelectPrimitive.Content>\n </div>\n </SelectPrimitive.Portal>\n );\n});\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('py-2 pr-4 pl-8 text-sm font-semibold text-foreground', className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-pointer items-center gap-2 px-4 py-2 pr-10 text-sm text-muted-foreground outline-none select-none transition-colors duration-interactive ease-out-strong focus:bg-muted data-[state=checked]:bg-primary-tint data-[disabled]:pointer-events-none data-[disabled]:opacity-50 motion-reduce:transition-none max-md:min-h-12',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-4 flex h-4 w-4 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('bg-border h-px', className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectGroup,\n SelectValue,\n SelectTrigger,\n SelectContent,\n SelectLabel,\n SelectItem,\n SelectSeparator,\n SelectScrollUpButton,\n SelectScrollDownButton,\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;AASA,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,KAAc,KAAI,EAAE,CAAC,EAAE,CAAC;AAE3F,SAAS,MAAM,CAAC,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,GAAG,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAqD,EAAA;AAChJ,IAAA,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC;AACnE,IAAA,MAAM,IAAI,GAAG,cAAc,IAAI,YAAY;AAC3C,IAAA,MAAM,OAAO,GAAG,CAAC,IAAa,KAAI;QAChC,IAAI,cAAc,KAAK,SAAS;YAAE,eAAe,CAAC,IAAI,CAAC;AACvD,QAAA,YAAY,GAAG,IAAI,CAAC;AACtB,IAAA,CAAC;AAED,IAAA,QACEA,GAAA,CAAC,aAAa,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,YAC9CA,GAAA,CAAC,eAAe,CAAC,IAAI,EAAA,EAAA,GAAK,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAA,QAAA,EAC/D,QAAQ,EAAA,CACY,EAAA,CAC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,0 +1,27 @@
1
+ import * as React from "react";
2
+ import * as SheetPrimitive from "@radix-ui/react-dialog";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
5
+ declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
8
+ declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const sheetVariants: (props?: ({
10
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
11
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
12
+ interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
+ showCloseButton?: boolean;
14
+ overlayClassName?: string;
15
+ }
16
+ declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
17
+ declare const SheetHeader: {
18
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
19
+ displayName: string;
20
+ };
21
+ declare const SheetFooter: {
22
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
23
+ displayName: string;
24
+ };
25
+ declare const SheetTitle: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
26
+ declare const SheetDescription: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
27
+ export { Sheet, SheetPortal, SheetOverlay, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
@@ -1,8 +1,8 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { cn } from '../../utils.js';
2
+ import { cn } from '../utils.js';
3
3
 
4
4
  function Skeleton({ className, ...props }) {
5
- return (jsx("div", { "data-slot": "skeleton", className: cn('bg-accent animate-pulse rounded-md', className), ...props }));
5
+ return (jsx("div", { "data-slot": "skeleton", className: cn('bg-muted animate-pulse rounded-control-lg motion-reduce:animate-none', className), ...props }));
6
6
  }
7
7
 
8
8
  export { Skeleton };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","sources":["../../src/components/skeleton.tsx"],"sourcesContent":["import { cn } from '@/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"skeleton\"\n className={cn('bg-muted animate-pulse rounded-control-lg motion-reduce:animate-none', className)}\n {...props}\n />\n );\n}\n\nexport { Skeleton };\n"],"names":["_jsx"],"mappings":";;;AAEA,SAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAA+B,EAAA;AACpE,IAAA,QACEA,GAAA,CAAA,KAAA,EAAA,EAAA,WAAA,EACY,UAAU,EACpB,SAAS,EAAE,EAAE,CAAC,sEAAsE,EAAE,SAAS,CAAC,EAAA,GAC5F,KAAK,EAAA,CACT;AAEN;;;;"}
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SliderPrimitive from "@radix-ui/react-slider";
3
+ declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ export { Slider };
@@ -0,0 +1,106 @@
1
+ interface ToastOptions {
2
+ center?: boolean;
3
+ fitContent?: boolean;
4
+ color?: string;
5
+ }
6
+ export declare const toastPresets: {
7
+ success: {
8
+ icon: import("react").ReactNode;
9
+ style: {
10
+ width?: string | undefined;
11
+ background: string;
12
+ color: string;
13
+ border: string;
14
+ display: string;
15
+ alignItems: string;
16
+ justifyContent: string;
17
+ borderRadius: string;
18
+ boxShadow: string;
19
+ padding: string;
20
+ minHeight: string;
21
+ };
22
+ };
23
+ destructive: {
24
+ icon: import("react").ReactNode;
25
+ style: {
26
+ width?: string | undefined;
27
+ background: string;
28
+ color: string;
29
+ border: string;
30
+ display: string;
31
+ alignItems: string;
32
+ justifyContent: string;
33
+ borderRadius: string;
34
+ boxShadow: string;
35
+ padding: string;
36
+ minHeight: string;
37
+ };
38
+ };
39
+ alert: {
40
+ icon: import("react").ReactNode;
41
+ style: {
42
+ width?: string | undefined;
43
+ background: string;
44
+ color: string;
45
+ border: string;
46
+ display: string;
47
+ alignItems: string;
48
+ justifyContent: string;
49
+ borderRadius: string;
50
+ boxShadow: string;
51
+ padding: string;
52
+ minHeight: string;
53
+ };
54
+ };
55
+ info: {
56
+ icon: import("react").ReactNode;
57
+ style: {
58
+ width?: string | undefined;
59
+ background: string;
60
+ color: string;
61
+ border: string;
62
+ display: string;
63
+ alignItems: string;
64
+ justifyContent: string;
65
+ borderRadius: string;
66
+ boxShadow: string;
67
+ padding: string;
68
+ minHeight: string;
69
+ };
70
+ };
71
+ loading: {
72
+ duration: number;
73
+ icon: import("react").ReactNode;
74
+ style: {
75
+ width?: string | undefined;
76
+ background: string;
77
+ color: string;
78
+ border: string;
79
+ display: string;
80
+ alignItems: string;
81
+ justifyContent: string;
82
+ borderRadius: string;
83
+ boxShadow: string;
84
+ padding: string;
85
+ minHeight: string;
86
+ };
87
+ };
88
+ };
89
+ export declare function createCustomToastPreset(background: string, icon: React.ReactNode, options?: ToastOptions): {
90
+ icon: import("react").ReactNode;
91
+ style: {
92
+ width?: string | undefined;
93
+ background: string;
94
+ color: string;
95
+ border: string;
96
+ display: string;
97
+ alignItems: string;
98
+ justifyContent: string;
99
+ borderRadius: string;
100
+ boxShadow: string;
101
+ padding: string;
102
+ minHeight: string;
103
+ };
104
+ };
105
+ export declare function SonnerToaster(): import("react/jsx-runtime").JSX.Element;
106
+ export {};
@@ -0,0 +1,9 @@
1
+ export interface StepperStep {
2
+ title: string;
3
+ }
4
+ export declare const Stepper: ({ steps, currentStep, stepNumberOffset, className, }: {
5
+ steps: StepperStep[];
6
+ currentStep: number;
7
+ stepNumberOffset?: number;
8
+ className?: string;
9
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Check } from 'lucide-react';
3
+ import { cn } from '../utils.js';
4
+
5
+ const Stepper = ({ steps, currentStep, stepNumberOffset = 0, className, }) => {
6
+ return (jsx("nav", { "aria-label": "Form progress", className: cn("flex w-full flex-col gap-4 sm:flex-row sm:items-center sm:gap-3", className), children: steps.map((step, index) => {
7
+ const active = index === currentStep;
8
+ const complete = index < currentStep;
9
+ return (jsxs("div", { className: cn("flex min-w-0 items-center gap-3", index < steps.length - 1 && "sm:flex-1"), children: [jsxs("div", { className: cn("relative z-10 flex min-w-0 items-center gap-2 text-sm font-medium", active ? "text-primary" : complete ? "text-supportive" : "text-muted-foreground"), "aria-current": active ? "step" : undefined, children: [complete ? (jsx("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-full bg-supportive text-supportive-foreground", children: jsx(Check, { className: "size-3.5", "aria-hidden": "true" }) })) : (jsx("span", { className: cn("flex size-6 shrink-0 items-center justify-center rounded-full border text-xs font-semibold", active ? "border-primary bg-primary text-primary-foreground" : "border-border bg-background text-muted-foreground"), children: jsx("span", { children: index + stepNumberOffset + 1 }) })), jsx("span", { className: "truncate", children: step.title })] }), index < steps.length - 1 && jsx("span", { "aria-hidden": "true", className: cn("hidden h-px min-w-4 flex-1 sm:block", complete ? "bg-supportive" : "bg-border") })] }, step.title));
10
+ }) }));
11
+ };
12
+
13
+ export { Stepper };
14
+ //# sourceMappingURL=stepper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stepper.js","sources":["../../src/components/stepper.tsx"],"sourcesContent":["import { Check } from \"lucide-react\";\nimport { cn } from \"@/utils\";\n\nexport interface StepperStep {\n title: string;\n}\n\nexport const Stepper = ({\n steps,\n currentStep,\n stepNumberOffset = 0,\n className,\n}: {\n steps: StepperStep[];\n currentStep: number;\n stepNumberOffset?: number;\n className?: string;\n}) => {\n return (\n <nav\n aria-label=\"Form progress\"\n className={cn(\"flex w-full flex-col gap-4 sm:flex-row sm:items-center sm:gap-3\", className)}\n >\n {steps.map((step, index) => {\n const active = index === currentStep;\n const complete = index < currentStep;\n\n return (\n <div key={step.title} className={cn(\"flex min-w-0 items-center gap-3\", index < steps.length - 1 && \"sm:flex-1\")}>\n <div\n className={cn(\n \"relative z-10 flex min-w-0 items-center gap-2 text-sm font-medium\",\n active ? \"text-primary\" : complete ? \"text-supportive\" : \"text-muted-foreground\"\n )}\n aria-current={active ? \"step\" : undefined}\n >\n {complete ? (\n <span className=\"flex size-6 shrink-0 items-center justify-center rounded-full bg-supportive text-supportive-foreground\">\n <Check className=\"size-3.5\" aria-hidden=\"true\" />\n </span>\n ) : (\n <span\n className={cn(\n \"flex size-6 shrink-0 items-center justify-center rounded-full border text-xs font-semibold\",\n active ? \"border-primary bg-primary text-primary-foreground\" : \"border-border bg-background text-muted-foreground\"\n )}\n >\n <span>{index + stepNumberOffset + 1}</span>\n </span>\n )}\n <span className=\"truncate\">{step.title}</span>\n </div>\n {index < steps.length - 1 && <span aria-hidden=\"true\" className={cn(\"hidden h-px min-w-4 flex-1 sm:block\", complete ? \"bg-supportive\" : \"bg-border\")} />}\n </div>\n );\n })}\n </nav>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAOO,MAAM,OAAO,GAAG,CAAC,EACtB,KAAK,EACL,WAAW,EACX,gBAAgB,GAAG,CAAC,EACpB,SAAS,GAMV,KAAI;IACH,QACEA,2BACa,eAAe,EAC1B,SAAS,EAAE,EAAE,CAAC,iEAAiE,EAAE,SAAS,CAAC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AC,CAAC,EAAA,CACE;AAEV;;;;"}
@@ -0,0 +1,10 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import * as SwitchPrimitive from '@radix-ui/react-switch';
3
+ import { cn } from '../utils.js';
4
+
5
+ function Switch({ className, ...props }) {
6
+ return (jsx(SwitchPrimitive.Root, { "data-slot": "switch", className: cn('relative after:absolute after:-inset-y-3 after:-inset-x-2 after:content-[""] peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-[background-color,border-color,box-shadow] duration-state ease-out-strong outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none', className), ...props, children: jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: cn('bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform duration-state ease-out-strong data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 motion-reduce:transition-none') }) }));
7
+ }
8
+
9
+ export { Switch };
10
+ //# sourceMappingURL=switch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"switch.js","sources":["../../src/components/switch.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as SwitchPrimitive from '@radix-ui/react-switch';\n\nimport { cn } from '@/utils';\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n data-slot=\"switch\"\n className={cn(\n 'relative after:absolute after:-inset-y-3 after:-inset-x-2 after:content-[\"\"] peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-[background-color,border-color,box-shadow] duration-state ease-out-strong outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 motion-reduce:transition-none',\n className,\n )}\n {...props}\n >\n <SwitchPrimitive.Thumb\n data-slot=\"switch-thumb\"\n className={cn(\n 'bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground pointer-events-none block size-4 rounded-full ring-0 transition-transform duration-state ease-out-strong data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 motion-reduce:transition-none',\n )}\n />\n </SwitchPrimitive.Root>\n );\n}\n\nexport { Switch };\n"],"names":["_jsx"],"mappings":";;;;AAKA,SAAS,MAAM,CAAC,EACd,SAAS,EACT,GAAG,KAAK,EAC0C,EAAA;AAClD,IAAA,QACEA,GAAA,CAAC,eAAe,CAAC,IAAI,EAAA,EAAA,WAAA,EACT,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,4hBAA4hB,EAC5hB,SAAS,CACV,EAAA,GACG,KAAK,EAAA,QAAA,EAETA,IAAC,eAAe,CAAC,KAAK,EAAA,EAAA,WAAA,EACV,cAAc,EACxB,SAAS,EAAE,EAAE,CACX,uUAAuU,CACxU,EAAA,CACD,EAAA,CACmB;AAE3B;;;;"}
@@ -0,0 +1,33 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ResourceTableColumn, ResourceTableState } from "../hooks/use-resource-table";
3
+ export type { ResourceTableColumn } from "../hooks/use-resource-table";
4
+ type ResourceEmptyState = {
5
+ title: string;
6
+ description?: ReactNode;
7
+ action?: ReactNode;
8
+ };
9
+ export declare function ResourceTable<TData>({ table, columns, renderMobileRow, emptyState, noResultsState, rowLabelSingular, rowLabelPlural, className, contentClassName, listClassName, paginationClassName, toolbarStart, toolbarLeading, showSelectionRatio, selectionColumnClassName, rowSelectionCheckboxClassName, rowSelectionUnavailableClassName, getRowSelectionUnavailableReason, selectionIndicatorClassName, headerSelectionCheckboxClassName, onRowClick, getRowClassName, }: {
10
+ table: ResourceTableState<TData>;
11
+ columns?: Array<ResourceTableColumn<TData>>;
12
+ renderMobileRow: (row: TData) => ReactNode;
13
+ emptyState: ResourceEmptyState;
14
+ noResultsState?: ResourceEmptyState;
15
+ rowLabelSingular: string;
16
+ rowLabelPlural: string;
17
+ className?: string;
18
+ contentClassName?: string;
19
+ listClassName?: string;
20
+ paginationClassName?: string;
21
+ toolbarStart?: ReactNode;
22
+ toolbarLeading?: ReactNode;
23
+ showSelectionRatio?: boolean;
24
+ selectionColumnClassName?: string;
25
+ rowSelectionCheckboxClassName?: string;
26
+ rowSelectionUnavailableClassName?: string;
27
+ getRowSelectionUnavailableReason?: (row: TData) => ReactNode;
28
+ selectionIndicatorClassName?: string;
29
+ headerSelectionCheckboxClassName?: string;
30
+ onRowClick?: (row: TData) => void;
31
+ getRowClassName?: (row: TData) => string | undefined;
32
+ }): import("react/jsx-runtime").JSX.Element;
33
+ export declare const Table: typeof ResourceTable;
@@ -0,0 +1,88 @@
1
+ "use client";
2
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
3
+ import { Search, Filter, ChevronLeft, ChevronRight, ChevronDown, ChevronUp, ChevronsUpDown, X } from 'lucide-react';
4
+ import { Button } from './button.js';
5
+ import { Checkbox } from './checkbox.js';
6
+ import { Popover, PopoverTrigger, PopoverContent } from './popover.js';
7
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from './select.js';
8
+ import { Tooltip, TooltipTrigger, TooltipContent } from './tooltip.js';
9
+ import { cn } from '../utils.js';
10
+
11
+ // REVIEW SNAPSHOT: bi-iom/IOM-Client/components/ui/resource-table.tsx
12
+ // Source SHA-256: 9772e5fbce1e3adc3af1e8bf8184c4ef3546a0608cce43154aeecad56ca58fd6
13
+ // Generated by playground/review/snapshot.mjs; import paths normalized for isolated review.
14
+ // Sized up from the Checkbox default (size-4) and given a visible hover cue
15
+ // — these sit in a dense, easy-to-miss leading column. UnselectableMark
16
+ // matches the same size so a column of checkboxes stays aligned.
17
+ const SELECTION_CHECKBOX_CLASS = "size-5 border-gray-400 hover:border-primary hover:ring-2 hover:ring-primary/15";
18
+ /**
19
+ * Stands in for the selection checkbox on rows the caller marked
20
+ * unselectable. A disabled Radix checkbox only fades — with no indicator
21
+ * shown, it reads as barely-there. This is always visibly crossed out
22
+ * instead, so "you can't pick this row" doesn't depend on noticing a
23
+ * subtle opacity change.
24
+ */
25
+ function UnselectableMark({ className, reason = "Not selectable", }) {
26
+ return (jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { className: cn("flex size-5 shrink-0 items-center justify-center rounded-[4px] border border-gray-300 bg-gray-100", className), role: "img", tabIndex: 0, "aria-label": "Not selectable", children: jsx(X, { className: "size-3.5 text-gray-400", strokeWidth: 3, "aria-hidden": "true" }) }) }), jsx(TooltipContent, { side: "right", sideOffset: 6, children: reason })] }));
27
+ }
28
+ function ResourceFilterPanel({ groups, draftValue, draftActiveCount, toggleOption, toggleGroup, clearDraft, cancel, apply, }) {
29
+ return (jsxs(Fragment, { children: [jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-gray-200 px-3 py-2", children: [jsx("span", { className: "text-sm font-semibold text-gray-900", children: "Filters" }), draftActiveCount > 0 && (jsx("button", { type: "button", onClick: clearDraft, className: "shrink-0 text-sm font-medium text-gray-600 hover:text-primary", children: "Clear all" }))] }), jsx("div", { className: "min-h-0 flex-1 space-y-3 overflow-y-auto p-3", children: groups.map((group) => {
30
+ const activeValues = draftValue[group.id] ?? [];
31
+ const allSelected = activeValues.length === group.options.length;
32
+ return (jsxs("section", { className: "overflow-hidden rounded-[0.33em] border border-gray-200 bg-white", children: [jsxs("div", { className: "flex items-center justify-between border-b border-gray-200 px-4 py-2.5", children: [jsx("span", { className: "text-sm font-semibold text-gray-800", children: group.label }), jsx("button", { type: "button", onClick: () => toggleGroup(group.id), className: "text-sm font-medium text-gray-600 hover:text-primary", children: allSelected ? "Clear" : "Select all" })] }), group.options.map((option) => (jsxs("label", { className: "flex cursor-pointer items-center gap-3 px-4 py-2.5 text-sm text-gray-800 hover:bg-gray-50 active:bg-gray-100", children: [jsx("span", { className: "flex-1", children: option.label }), typeof option.count === "number" && (jsx("span", { className: "text-muted-foreground", children: option.count })), jsx(Checkbox, { checked: activeValues.includes(option.value), onCheckedChange: (checked) => toggleOption(group.id, option.value, checked === true) })] }, option.value)))] }, group.id));
33
+ }) }), jsxs("div", { className: "flex items-center justify-end gap-2 border-t bg-white px-3 py-2.5", children: [jsx(Button, { variant: "outline", onClick: cancel, children: "Cancel" }), jsx(Button, { onClick: apply, children: "Apply" })] })] }));
34
+ }
35
+ function ResourceTable({ table, columns = table.columns, renderMobileRow, emptyState, noResultsState, rowLabelSingular, rowLabelPlural, className, contentClassName, listClassName, paginationClassName, toolbarStart, toolbarLeading, showSelectionRatio = true, selectionColumnClassName, rowSelectionCheckboxClassName, rowSelectionUnavailableClassName, getRowSelectionUnavailableReason, selectionIndicatorClassName, headerSelectionCheckboxClassName, onRowClick, getRowClassName, }) {
36
+ const hasToolbar = !!toolbarStart || !!toolbarLeading || !!table.search || !!table.filters;
37
+ const hasRows = table.pagedRows.length > 0;
38
+ const hasAnyData = table.dataCount > 0;
39
+ const hasDesktopTable = !!columns?.length;
40
+ const resolvedEmptyState = hasAnyData
41
+ ? (noResultsState ?? emptyState)
42
+ : emptyState;
43
+ const selection = table.selection;
44
+ const selectablePageRows = selection
45
+ ? table.pagedRows.filter(selection.isRowSelectable)
46
+ : [];
47
+ const headerCheckedState = selection
48
+ ? selection.isAllPageSelected
49
+ ? true
50
+ : selectablePageRows.some((row) => selection.isSelected(row))
51
+ ? "indeterminate"
52
+ : false
53
+ : false;
54
+ const showSelectAllMatchingBanner = !!selection &&
55
+ hasRows &&
56
+ selection.isAllPageSelected &&
57
+ selection.selectableMatchingCount > selection.selectablePageCount;
58
+ const showAllMatchingSelectedBanner = !!selection &&
59
+ hasRows &&
60
+ selection.isAllMatchingSelected &&
61
+ selection.selectableMatchingCount > selection.selectablePageCount;
62
+ const renderHeaderCell = (column) => {
63
+ const sortColumn = table.sort?.columns.find((item) => item.id === column.id);
64
+ const isSortable = !!table.sort && column.sortable !== false && !!sortColumn;
65
+ const isActive = table.sort?.column === column.id;
66
+ const isDesc = isActive && table.sort?.direction === "desc";
67
+ return (jsx("th", { className: cn("px-5 py-3 font-medium", column.align === "center" && "text-center", column.align === "right" && "text-right", column.width), children: isSortable ? (jsxs("button", { type: "button", className: cn("inline-flex cursor-pointer items-center gap-1.5 text-left hover:text-gray-900", column.align === "center" && "justify-center", column.align === "right" && "justify-end", isActive && "text-primary"), onClick: () => table.sort?.setSort(column.id, column.defaultSortDirection), children: [column.header, isDesc ? (jsx(ChevronDown, { className: "h-3.5 w-3.5" })) : isActive ? (jsx(ChevronUp, { className: "h-3.5 w-3.5" })) : (jsx(ChevronsUpDown, { className: "text-muted-foreground/60 h-3.5 w-3.5" }))] })) : (column.header) }, column.id));
68
+ };
69
+ return (jsxs("div", { className: cn("space-y-5", className), children: [hasToolbar && (jsxs("div", { className: cn("flex flex-wrap items-center gap-2", toolbarStart && "min-w-0 lg:flex-nowrap"), children: [toolbarStart && (jsx("div", { className: "min-w-0 max-w-full overflow-hidden", children: toolbarStart })), jsxs("div", { className: cn("flex min-w-0 flex-1 items-center gap-2", toolbarStart && "w-full justify-end lg:ml-auto lg:w-auto"), children: [table.search && (jsxs("div", { className: cn("relative min-w-0 flex-1", toolbarStart ? "lg:w-80 lg:flex-none" : "w-full max-w-xl"), children: [jsx(Search, { className: "text-muted-foreground pointer-events-none absolute top-1/2 left-4 z-20 h-4 w-4 -translate-y-1/2" }), jsx("input", { type: "search", value: table.search.value, onChange: (event) => table.search?.setValue(event.target.value), placeholder: table.search.placeholder, "aria-label": table.search.ariaLabel, className: "placeholder:text-muted-foreground/60 focus:border-primary h-11 w-full rounded-[0.33em] border border-gray-200 bg-white pr-4 pl-11 text-sm outline-none transition-colors focus:ring-2 focus:ring-primary/10" })] })), table.filters && (jsxs(Popover, { open: table.filters.open, onOpenChange: table.filters.setOpen, children: [jsx(PopoverTrigger, { asChild: true, children: jsxs(Button, { variant: "outline", size: "sm", className: cn("relative h-11 w-11 shrink-0 border-gray-200 bg-white text-gray-600 hover:text-primary", table.filters.activeCount > 0 && "text-primary"), "aria-label": "Filter results", "aria-expanded": table.filters.open, children: [jsx(Filter, {}), table.filters.activeCount > 0 && (jsx("span", { className: "bg-primary text-primary-foreground absolute top-0 right-0 inline-flex h-5 min-w-5 items-center justify-center rounded-full px-1 text-[11px] font-semibold", children: table.filters.activeCount }))] }) }), jsx(PopoverContent, { align: "start", sideOffset: 6, className: "flex max-h-[70vh] w-[calc(100vw-2rem)] flex-col overflow-hidden rounded-[0.33em] border border-gray-200 bg-white p-0 shadow-lg sm:w-[445px]", children: jsx(ResourceFilterPanel, { groups: table.filters.groups, draftValue: table.filters.draftValue, draftActiveCount: table.filters.draftActiveCount, toggleOption: table.filters.toggleDraftOption, toggleGroup: table.filters.toggleDraftGroup, clearDraft: table.filters.clearDraft, cancel: table.filters.cancel, apply: table.filters.apply }) })] })), toolbarLeading] })] })), hasRows ? (jsxs("div", { className: cn("overflow-hidden rounded-[0.33em] border border-gray-200 bg-white", contentClassName), children: [(showSelectAllMatchingBanner || showAllMatchingSelectedBanner) && (jsx("div", { className: "bg-primary/5 flex items-center justify-center gap-2 border-b border-gray-200 px-4 py-2 text-sm text-gray-700", children: showAllMatchingSelectedBanner ? (jsxs(Fragment, { children: [jsxs("span", { children: ["All ", selection.selectableMatchingCount, " matching rows are selected."] }), jsx("button", { type: "button", onClick: selection.clear, className: "text-primary cursor-pointer font-medium hover:underline", children: "Clear selection" })] })) : (jsxs(Fragment, { children: [jsxs("span", { children: ["All ", selection.selectablePageCount, " on this page are selected."] }), jsxs("button", { type: "button", onClick: selection.selectAllMatching, className: "text-primary cursor-pointer font-medium hover:underline", children: ["Select all ", selection.selectableMatchingCount, " matching rows"] })] })) })), hasDesktopTable && (jsx("div", { className: "hidden overflow-x-auto md:block", children: jsxs("table", { className: "w-full table-fixed border-collapse text-left", children: [jsx("thead", { className: "bg-gray-50 text-sm font-medium text-gray-700", children: jsxs("tr", { className: "border-b border-gray-200", children: [selection && (jsx("th", { className: cn("w-16 px-3 py-3", selectionColumnClassName), children: jsxs("div", { className: "flex flex-col items-start gap-0.5", children: [jsx(Checkbox, { checked: headerCheckedState, onCheckedChange: () => selection.isAllPageSelected
70
+ ? selection.deselectPage()
71
+ : selection.selectPage(), className: cn(SELECTION_CHECKBOX_CLASS, selectionIndicatorClassName, headerSelectionCheckboxClassName), "aria-label": "Select all rows on this page" }), showSelectionRatio &&
72
+ selection.selectablePageCount <
73
+ table.pagedRows.length && (jsxs("span", { className: "text-muted-foreground text-[10px] leading-tight font-normal", children: [selection.selectablePageCount, "/", table.pagedRows.length] }))] }) })), columns.map(renderHeaderCell)] }) }), jsx("tbody", { children: table.pagedRows.map((row) => {
74
+ const rowSelectable = selection?.isRowSelectable(row) ?? true;
75
+ return (jsxs("tr", { className: cn("group border-b border-gray-200 transition-colors last:border-b-0 hover:bg-primary/[0.035] focus-within:bg-primary/[0.035]", onRowClick && "cursor-pointer", getRowClassName?.(row)), onClick: onRowClick ? () => onRowClick(row) : undefined, children: [selection && (jsx("td", { className: cn("px-3 py-4", selectionColumnClassName), onClick: (event) => event.stopPropagation(), children: rowSelectable ? (jsx("span", { className: "flex size-5 items-center justify-center", children: jsx(Checkbox, { checked: selection.isSelected(row), onCheckedChange: () => selection.toggle(row), className: cn(SELECTION_CHECKBOX_CLASS, rowSelectionCheckboxClassName, selectionIndicatorClassName), "aria-label": "Select row" }) })) : (jsx(UnselectableMark, { reason: getRowSelectionUnavailableReason?.(row), className: cn(selectionIndicatorClassName, rowSelectionUnavailableClassName) })) })), columns.map((column) => (jsx("td", { className: cn("px-5 py-4", column.align === "center" && "text-center", column.align === "right" && "text-right"), children: column.render(row) }, column.id)))] }, table.getRowId(row)));
76
+ }) })] }) })), jsx("div", { className: cn("divide-y divide-gray-200", hasDesktopTable && "md:hidden", listClassName), children: table.pagedRows.map((row) => {
77
+ const rowSelectable = selection?.isRowSelectable(row) ?? true;
78
+ return (jsxs("div", { className: "flex items-start", children: [selection && (jsx("div", { className: "flex shrink-0 items-center self-stretch pl-4", onClick: (event) => event.stopPropagation(), children: rowSelectable ? (jsx("span", { className: "flex size-5 items-center justify-center", children: jsx(Checkbox, { checked: selection.isSelected(row), onCheckedChange: () => selection.toggle(row), className: cn(SELECTION_CHECKBOX_CLASS, rowSelectionCheckboxClassName, selectionIndicatorClassName), "aria-label": "Select row" }) })) : (jsx(UnselectableMark, { reason: getRowSelectionUnavailableReason?.(row), className: cn(selectionIndicatorClassName, rowSelectionUnavailableClassName) })) })), jsx("div", { className: "min-w-0 flex-1", children: renderMobileRow(row) })] }, table.getRowId(row)));
79
+ }) }), jsxs("div", { className: cn("flex flex-col items-center justify-between gap-3 border-t border-gray-200 px-5 py-4 sm:flex-row", paginationClassName), children: [jsxs("p", { className: "text-muted-foreground text-sm", children: ["Showing ", table.pageStart + 1, " to ", table.pageEnd, " of", " ", table.totalCount, " ", table.totalCount === 1 ? rowLabelSingular : rowLabelPlural] }), jsxs("div", { className: "flex flex-wrap items-center justify-center gap-3", children: [jsxs("label", { className: "text-muted-foreground flex items-center gap-2 text-sm whitespace-nowrap", children: ["Rows per page", jsxs(Select, { value: String(table.pagination.pageSize), onValueChange: (value) => table.pagination.setPageSize(Number(value)), children: [jsx(SelectTrigger, { className: "w-20", "aria-label": "Rows per page", children: jsx(SelectValue, {}) }), jsx(SelectContent, { align: "end", children: table.pagination.pageSizeOptions.map((pageSize) => (jsx(SelectItem, { value: String(pageSize), children: pageSize }, pageSize))) })] })] }), table.pageCount > 1 && (jsxs("div", { className: "flex items-center gap-1", "aria-label": "Pagination", children: [jsx(Button, { variant: "ghost", size: "sm", disabled: table.page === 1, onClick: () => table.pagination.setPage(table.page - 1), "aria-label": "Previous page", children: jsx(ChevronLeft, {}) }), Array.from({ length: table.pageCount }, (_, index) => index + 1)
80
+ .filter((page) => page === 1 ||
81
+ page === table.pageCount ||
82
+ Math.abs(page - table.page) <= 1)
83
+ .map((page, index, pages) => (jsxs("span", { className: "flex items-center gap-1", children: [index > 0 && page - pages[index - 1] > 1 && (jsx("span", { className: "text-muted-foreground px-1", children: "..." })), jsx(Button, { variant: page === table.page ? "outline" : "ghost", scheme: page === table.page ? "primary" : undefined, size: "sm", className: "h-9 w-9", onClick: () => table.pagination.setPage(page), "aria-label": `Page ${page}`, "aria-current": page === table.page ? "page" : undefined, children: page })] }, page))), jsx(Button, { variant: "ghost", size: "sm", disabled: table.page === table.pageCount, onClick: () => table.pagination.setPage(table.page + 1), "aria-label": "Next page", children: jsx(ChevronRight, {}) })] }))] })] })] })) : (jsxs("div", { className: "rounded-[0.33em] border border-dashed border-gray-300 bg-white px-6 py-12 text-center", children: [jsx("p", { className: "text-sm font-medium text-gray-700", children: resolvedEmptyState.title }), resolvedEmptyState.description && (jsx("p", { className: "text-muted-foreground mt-1 text-sm", children: resolvedEmptyState.description })), resolvedEmptyState.action && (jsx("div", { className: "mt-4", children: resolvedEmptyState.action }))] }))] }));
84
+ }
85
+ const Table = ResourceTable;
86
+
87
+ export { ResourceTable, Table };
88
+ //# sourceMappingURL=table.js.map