@tryghost/shade 0.1.0-alpha.2 → 0.1.0-alpha.21

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 (169) hide show
  1. package/README.md +30 -64
  2. package/es/components/page-templates/list-page.js +2 -1
  3. package/es/components/page-templates/list-page.js.map +1 -1
  4. package/es/components/patterns/filter-bar.js +4 -6
  5. package/es/components/patterns/filter-bar.js.map +1 -1
  6. package/es/components/patterns/filters.js +35 -22
  7. package/es/components/patterns/filters.js.map +1 -1
  8. package/es/components/patterns/gh-chart.js +6 -3
  9. package/es/components/patterns/gh-chart.js.map +1 -1
  10. package/es/components/patterns/image-upload.js +1 -3
  11. package/es/components/patterns/image-upload.js.map +1 -1
  12. package/es/components/patterns/page-header.js +18 -43
  13. package/es/components/patterns/page-header.js.map +1 -1
  14. package/es/components/patterns/setting-group-variants.js +1 -1
  15. package/es/components/patterns/setting-group-variants.js.map +1 -1
  16. package/es/components/patterns/share-modal.js +3 -15
  17. package/es/components/patterns/share-modal.js.map +1 -1
  18. package/es/components/ui/alert-dialog.js +2 -4
  19. package/es/components/ui/alert-dialog.js.map +1 -1
  20. package/es/components/ui/avatar.js +8 -4
  21. package/es/components/ui/avatar.js.map +1 -1
  22. package/es/components/ui/badge-variants.js +1 -1
  23. package/es/components/ui/badge-variants.js.map +1 -1
  24. package/es/components/ui/banner-variants.js +4 -4
  25. package/es/components/ui/banner-variants.js.map +1 -1
  26. package/es/components/ui/button-variants.js +2 -33
  27. package/es/components/ui/button-variants.js.map +1 -1
  28. package/es/components/ui/button.js +1 -2
  29. package/es/components/ui/button.js.map +1 -1
  30. package/es/components/ui/calendar.js +5 -6
  31. package/es/components/ui/calendar.js.map +1 -1
  32. package/es/components/ui/card-variants.js +1 -1
  33. package/es/components/ui/card-variants.js.map +1 -1
  34. package/es/components/ui/card.js +1 -1
  35. package/es/components/ui/card.js.map +1 -1
  36. package/es/components/ui/chart.js +2 -29
  37. package/es/components/ui/chart.js.map +1 -1
  38. package/es/components/ui/combobox.js +2 -2
  39. package/es/components/ui/combobox.js.map +1 -1
  40. package/es/components/ui/copy-field.js +1 -3
  41. package/es/components/ui/copy-field.js.map +1 -1
  42. package/es/components/ui/data-list.js +1 -3
  43. package/es/components/ui/data-list.js.map +1 -1
  44. package/es/components/ui/dialog.js +32 -8
  45. package/es/components/ui/dialog.js.map +1 -1
  46. package/es/components/ui/dropzone-variants.js +1 -3
  47. package/es/components/ui/dropzone-variants.js.map +1 -1
  48. package/es/components/ui/dropzone.js +2 -2
  49. package/es/components/ui/dropzone.js.map +1 -1
  50. package/es/components/ui/floating-sidebar.js +4 -4
  51. package/es/components/ui/floating-sidebar.js.map +1 -1
  52. package/es/components/ui/image-overlay-button.js +2 -2
  53. package/es/components/ui/image-overlay-button.js.map +1 -1
  54. package/es/components/ui/input-group.js +2 -5
  55. package/es/components/ui/input-group.js.map +1 -1
  56. package/es/components/ui/navbar.js +1 -3
  57. package/es/components/ui/navbar.js.map +1 -1
  58. package/es/components/ui/pagemenu.js +33 -9
  59. package/es/components/ui/pagemenu.js.map +1 -1
  60. package/es/components/ui/select-variants.js +2 -10
  61. package/es/components/ui/select-variants.js.map +1 -1
  62. package/es/components/ui/select.js +1 -4
  63. package/es/components/ui/select.js.map +1 -1
  64. package/es/components/ui/simple-pagination.js +4 -7
  65. package/es/components/ui/simple-pagination.js.map +1 -1
  66. package/es/components/ui/sticky-footer.js +1 -1
  67. package/es/components/ui/sticky-footer.js.map +1 -1
  68. package/es/components/ui/toast.js +2 -0
  69. package/es/components/ui/toggle-group.js +1 -3
  70. package/es/components/ui/toggle-group.js.map +1 -1
  71. package/es/components/ui/toggle-variants.js +1 -7
  72. package/es/components/ui/toggle-variants.js.map +1 -1
  73. package/es/components/ui/toggle.js +1 -2
  74. package/es/components/ui/toggle.js.map +1 -1
  75. package/es/components/ui/token-field.js +2 -2
  76. package/es/components/ui/token-field.js.map +1 -1
  77. package/es/components/ui/tooltip.js +8 -17
  78. package/es/components/ui/tooltip.js.map +1 -1
  79. package/es/components.js +3 -2
  80. package/es/index.js +3 -2
  81. package/es/lib/date-utils.js +151 -0
  82. package/es/lib/date-utils.js.map +1 -0
  83. package/es/lib/ds-utils.js +16 -72
  84. package/es/lib/ds-utils.js.map +1 -1
  85. package/es/lib/utils.js +3 -2
  86. package/es/providers/header-tooltip-provider.js +1 -4
  87. package/es/providers/header-tooltip-provider.js.map +1 -1
  88. package/es/providers/shade-context.js +1 -1
  89. package/es/providers/shade-context.js.map +1 -1
  90. package/es/providers/shade-provider.js +3 -3
  91. package/es/providers/shade-provider.js.map +1 -1
  92. package/es/shade-app.js +3 -3
  93. package/es/shade-app.js.map +1 -1
  94. package/es/shade-scope.js +2 -2
  95. package/es/shade-scope.js.map +1 -1
  96. package/es/tokens.js +1 -8
  97. package/es/tokens.js.map +1 -1
  98. package/es/utils.js +3 -2
  99. package/package.json +6 -6
  100. package/styles.css +12 -10
  101. package/tailwind.theme.css +202 -187
  102. package/theme-variables.css +291 -42
  103. package/types/components/page-templates/list-page.d.ts +2 -1
  104. package/types/components/page-templates/list-page.d.ts.map +1 -1
  105. package/types/components/patterns/filter-bar.d.ts.map +1 -1
  106. package/types/components/patterns/filters.d.ts +2 -4
  107. package/types/components/patterns/filters.d.ts.map +1 -1
  108. package/types/components/patterns/gh-chart.d.ts.map +1 -1
  109. package/types/components/patterns/image-upload.d.ts.map +1 -1
  110. package/types/components/patterns/page-header.d.ts +6 -11
  111. package/types/components/patterns/page-header.d.ts.map +1 -1
  112. package/types/components/patterns/share-modal.d.ts +1 -1
  113. package/types/components/patterns/share-modal.d.ts.map +1 -1
  114. package/types/components/ui/avatar.d.ts.map +1 -1
  115. package/types/components/ui/button-variants.d.ts +0 -1
  116. package/types/components/ui/button-variants.d.ts.map +1 -1
  117. package/types/components/ui/button.d.ts +1 -1
  118. package/types/components/ui/button.d.ts.map +1 -1
  119. package/types/components/ui/calendar.d.ts.map +1 -1
  120. package/types/components/ui/chart.d.ts +1 -17
  121. package/types/components/ui/chart.d.ts.map +1 -1
  122. package/types/components/ui/combobox.d.ts.map +1 -1
  123. package/types/components/ui/copy-field.d.ts.map +1 -1
  124. package/types/components/ui/data-list.d.ts.map +1 -1
  125. package/types/components/ui/dialog.d.ts +11 -2
  126. package/types/components/ui/dialog.d.ts.map +1 -1
  127. package/types/components/ui/dropzone-variants.d.ts +1 -1
  128. package/types/components/ui/dropzone-variants.d.ts.map +1 -1
  129. package/types/components/ui/image-overlay-button.d.ts +1 -1
  130. package/types/components/ui/image-overlay-button.d.ts.map +1 -1
  131. package/types/components/ui/input-group.d.ts.map +1 -1
  132. package/types/components/ui/navbar.d.ts.map +1 -1
  133. package/types/components/ui/pagemenu.d.ts +3 -0
  134. package/types/components/ui/pagemenu.d.ts.map +1 -1
  135. package/types/components/ui/select-variants.d.ts +0 -1
  136. package/types/components/ui/select-variants.d.ts.map +1 -1
  137. package/types/components/ui/select.d.ts +1 -1
  138. package/types/components/ui/select.d.ts.map +1 -1
  139. package/types/components/ui/simple-pagination.d.ts.map +1 -1
  140. package/types/components/ui/toast.d.ts +2 -0
  141. package/types/components/ui/toast.d.ts.map +1 -0
  142. package/types/components/ui/toggle-group.d.ts +4 -6
  143. package/types/components/ui/toggle-group.d.ts.map +1 -1
  144. package/types/components/ui/toggle-variants.d.ts +0 -1
  145. package/types/components/ui/toggle-variants.d.ts.map +1 -1
  146. package/types/components/ui/toggle.d.ts +2 -3
  147. package/types/components/ui/toggle.d.ts.map +1 -1
  148. package/types/components/ui/token-field.d.ts +2 -2
  149. package/types/components/ui/token-field.d.ts.map +1 -1
  150. package/types/components/ui/tooltip.d.ts.map +1 -1
  151. package/types/components.d.ts +1 -0
  152. package/types/components.d.ts.map +1 -1
  153. package/types/lib/date-utils.d.ts +17 -0
  154. package/types/lib/date-utils.d.ts.map +1 -0
  155. package/types/lib/ds-utils.d.ts +2 -16
  156. package/types/lib/ds-utils.d.ts.map +1 -1
  157. package/types/lib/utils.d.ts +1 -0
  158. package/types/lib/utils.d.ts.map +1 -1
  159. package/types/providers/header-tooltip-provider.d.ts.map +1 -1
  160. package/types/providers/shade-context.d.ts +2 -1
  161. package/types/providers/shade-context.d.ts.map +1 -1
  162. package/types/providers/shade-provider.d.ts +1 -1
  163. package/types/providers/shade-provider.d.ts.map +1 -1
  164. package/types/shade-app.d.ts +5 -2
  165. package/types/shade-app.d.ts.map +1 -1
  166. package/types/tokens.d.ts +1 -1
  167. package/types/tokens.d.ts.map +1 -1
  168. package/types/utils.d.ts +2 -1
  169. package/types/utils.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"alert-dialog.js","names":[],"sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '@/lib/utils';\nimport type { ButtonProps } from '@/components/ui/button';\nimport { buttonVariants } from '@/components/ui/button-variants';\nimport { useShade } from '@/providers/shade-context';\nimport { ShadeScope } from '@/shade-scope';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 transform-gpu bg-black/30 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 dark:bg-black/60',\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\ntype AlertDialogContentProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n> & {\n overlayClassName?: string;\n};\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n AlertDialogContentProps\n>(({ className, overlayClassName, ...props }, ref) => (\n <AlertDialogPortal>\n <ShadeScope>\n <AlertDialogOverlay className={overlayClassName} onClick={(e) => e.stopPropagation()} />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed top-[20%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-surface-elevated-2 p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg',\n className,\n )}\n {...props}\n />\n </ShadeScope>\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-y-2 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2', className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-xl font-semibold', className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description ref={ref} className={cn('text-base', className)} {...props} />\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & Pick<ButtonProps, 'variant'>\n>(({ className, variant, ...props }, ref) => {\n const { controlShape, isAdmin7 } = useShade();\n\n return (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants({ isAdmin7, shape: controlShape, variant }), className)}\n {...props}\n data-control-shape={controlShape}\n />\n );\n});\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => {\n const { controlShape, isAdmin7 } = useShade();\n\n return (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ isAdmin7, shape: controlShape, variant: 'outline' }),\n 'mt-2 sm:mt-0',\n className,\n )}\n {...props}\n data-control-shape={controlShape}\n />\n );\n});\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;;AASA,IAAM,cAAc,qBAAqB;AAEzC,IAAM,qBAAqB,qBAAqB;AAEhD,IAAM,oBAAoB,qBAAqB;AAE/C,IAAM,qBAAqB,QAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,SAAtB;CACE,WAAW,GACT,yLACA,SACF;CACA,GAAI;CACC;AACN,CAAA,CACF;AACD,mBAAmB,cAAc,qBAAqB,QA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ACnF,GAAI;EACJ,sBAAoB;CACrB,CAAA;AAEL,CAAC;AACD,kBAAkB,cAAc,qBAAqB,OAAO;AAE5D,IAAM,oBAAoB,QAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,MAAM,EAAE,cAAc,aAAa,SAAS;CAE5C,OACE,oBAAC,qBAAqB,QAAtB;EACO;EACL,WAAW,GACT,eAAe;GAAE;GAAU,OAAO;GAAc,SAAS;EAAU,CAAC,GACpE,gBACA,SACF;EACA,GAAI;EACJ,sBAAoB;CACrB,CAAA;AAEL,CAAC;AACD,kBAAkB,cAAc,qBAAqB,OAAO"}
1
+ {"version":3,"file":"alert-dialog.js","names":[],"sources":["../../../src/components/ui/alert-dialog.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '@/lib/utils';\nimport type { ButtonProps } from '@/components/ui/button';\nimport { buttonVariants } from '@/components/ui/button-variants';\nimport { useShade } from '@/providers/shade-context';\nimport { ShadeScope } from '@/shade-scope';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\nconst AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Overlay\n className={cn(\n 'fixed inset-0 z-50 transform-gpu bg-black/30 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0 dark:bg-black/60',\n className,\n )}\n {...props}\n ref={ref}\n />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\ntype AlertDialogContentProps = React.ComponentPropsWithoutRef<\n typeof AlertDialogPrimitive.Content\n> & {\n overlayClassName?: string;\n};\n\nconst AlertDialogContent = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Content>,\n AlertDialogContentProps\n>(({ className, overlayClassName, ...props }, ref) => (\n <AlertDialogPortal>\n <ShadeScope>\n <AlertDialogOverlay className={overlayClassName} onClick={(e) => e.stopPropagation()} />\n <AlertDialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed top-[20%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-20%] gap-6 bg-surface-elevated-2 p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-top-[18%] data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-top-[18%] sm:rounded-lg',\n className,\n )}\n {...props}\n />\n </ShadeScope>\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-y-2 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:gap-2', className)}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n className={cn('text-xl font-semibold', className)}\n {...props}\n />\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nconst AlertDialogDescription = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Description ref={ref} className={cn('text-base', className)} {...props} />\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nconst AlertDialogAction = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Action>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action> & Pick<ButtonProps, 'variant'>\n>(({ className, variant, ...props }, ref) => {\n const { controlShape } = useShade();\n\n return (\n <AlertDialogPrimitive.Action\n ref={ref}\n className={cn(buttonVariants({ shape: controlShape, variant }), className)}\n {...props}\n data-control-shape={controlShape}\n />\n );\n});\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nconst AlertDialogCancel = React.forwardRef<\n React.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Cancel>\n>(({ className, ...props }, ref) => {\n const { controlShape } = useShade();\n\n return (\n <AlertDialogPrimitive.Cancel\n ref={ref}\n className={cn(\n buttonVariants({ shape: controlShape, variant: 'outline' }),\n 'mt-2 sm:mt-0',\n className,\n )}\n {...props}\n data-control-shape={controlShape}\n />\n );\n});\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;;AASA,IAAM,cAAc,qBAAqB;AAEzC,IAAM,qBAAqB,qBAAqB;AAEhD,IAAM,oBAAoB,qBAAqB;AAE/C,IAAM,qBAAqB,QAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,qBAAqB,SAAtB;CACE,WAAW,GACT,yLACA,SACF;CACA,GAAI;CACC;AACN,CAAA,CACF;AACD,mBAAmB,cAAc,qBAAqB,QAAQ;AAQ9D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B;CACrB,CAAA;AAEL,CAAC;AACD,kBAAkB,cAAc,qBAAqB,OAAO;AAE5D,IAAM,oBAAoB,QAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,MAAM,EAAE,iBAAiB,SAAS;CAElC,OACE,oBAAC,qBAAqB,QAAtB;EACO;EACL,WAAW,GACT,eAAe;GAAE,OAAO;GAAc,SAAS;EAAU,CAAC,GAC1D,gBACA,SACF;EACA,GAAI;EACJ,sBAAoB;CACrB,CAAA;AAEL,CAAC;AACD,kBAAkB,cAAc,qBAAqB,OAAO"}
@@ -1,4 +1,5 @@
1
- import { cn, stringToHslColor } from "../../lib/ds-utils.js";
1
+ import { cn, stringToHslColor, stringToTonalAvatarClasses } from "../../lib/ds-utils.js";
2
+ import { useShade } from "../../providers/shade-context.js";
2
3
  import { User } from "lucide-react";
3
4
  import * as React$1 from "react";
4
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -32,15 +33,18 @@ function ValidatedAvatarImage({ src }) {
32
33
  });
33
34
  }
34
35
  var Avatar = React$1.forwardRef(({ className, children, src, initials, colorSeed, ...props }, ref) => {
36
+ const { admin7Design } = useShade();
35
37
  const hasInitials = !!initials;
36
- const bgColor = hasInitials ? stringToHslColor(colorSeed || initials, "45", "55") : void 0;
38
+ const seed = colorSeed || initials || "";
39
+ const tonal = hasInitials && admin7Design;
40
+ const bgColor = hasInitials && !tonal ? stringToHslColor(seed, "45", "55") : void 0;
37
41
  return /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
38
42
  ref,
39
43
  className: cn("relative flex size-8 shrink-0 overflow-hidden rounded-full", className),
40
44
  ...props,
41
45
  children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(AvatarFallback, {
42
- className: cn("text-xs text-muted-foreground md:text-sm [&_svg]:size-3 md:[&_svg]:size-4", hasInitials && "font-semibold text-white"),
43
- style: hasInitials ? { backgroundColor: bgColor } : void 0,
46
+ className: cn("text-xs text-muted-foreground md:text-sm [&_svg]:size-3 md:[&_svg]:size-4", hasInitials && "font-semibold", hasInitials && (tonal ? stringToTonalAvatarClasses(seed) : "text-white")),
47
+ style: bgColor ? { backgroundColor: bgColor } : void 0,
44
48
  children: initials ?? /* @__PURE__ */ jsx(User, {})
45
49
  }), src && /* @__PURE__ */ jsx(ValidatedAvatarImage, { src })] })
46
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","names":[],"sources":["../../../src/components/ui/avatar.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { User } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { stringToHslColor } from '@/lib/ds-utils';\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn('aspect-square size-full', className)}\n {...props}\n />\n));\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n 'flex size-full items-center justify-center rounded-full bg-muted [&_svg]:size-4',\n className,\n )}\n {...props}\n />\n));\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\n\n// Gravatar's `d=blank` parameter returns a 1×1 transparent PNG when no avatar\n// exists for the given email. The HTTP response is 200, so Radix's AvatarImage\n// would treat it as a valid image and hide the fallback. We render the image\n// ourselves and only reveal it once it loads with non-trivial dimensions.\nfunction ValidatedAvatarImage({ src }: { src: string }) {\n const [loaded, setLoaded] = React.useState(false);\n\n React.useEffect(() => {\n setLoaded(false);\n }, [src]);\n\n return (\n <img\n alt=\"\"\n className={cn('absolute inset-0 size-full object-cover', !loaded && 'invisible')}\n src={src}\n onLoad={(e) => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n if (naturalWidth > 1 && naturalHeight > 1) {\n setLoaded(true);\n }\n }}\n />\n );\n}\n\ninterface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> {\n src?: string | null;\n initials?: string | null;\n /**\n * Seeds the fallback background hue. Defaults to the initials, but callers\n * should pass the richer identity string they derived the initials from\n * (name/email) so distinct people keep distinct hues.\n */\n colorSeed?: string | null;\n}\n\nconst Avatar = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n ({ className, children, src, initials, colorSeed, ...props }, ref) => {\n const hasInitials = !!initials;\n const bgColor = hasInitials ? stringToHslColor(colorSeed || initials, '45', '55') : undefined;\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)}\n {...props}\n >\n {children ?? (\n <>\n <AvatarFallback\n className={cn(\n 'text-xs text-muted-foreground md:text-sm [&_svg]:size-3 md:[&_svg]:size-4',\n hasInitials && 'font-semibold text-white',\n )}\n style={hasInitials ? { backgroundColor: bgColor } : undefined}\n >\n {initials ?? <User />}\n </AvatarFallback>\n {src && <ValidatedAvatarImage src={src} />}\n </>\n )}\n </AvatarPrimitive.Root>\n );\n },\n);\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"],"mappings":";;;;;;AAOA,IAAM,cAAc,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,2BAA2B,SAAS;CAClD,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,iBAAiB,QAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,UAAjB;CACO;CACL,WAAW,GACT,mFACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc,gBAAgB,SAAS;AAMtD,SAAS,qBAAqB,EAAE,OAAwB;CACtD,MAAM,CAAC,QAAQ,aAAa,QAAM,SAAS,KAAK;CAEhD,QAAM,gBAAgB;EACpB,UAAU,KAAK;CACjB,GAAG,CAAC,GAAG,CAAC;CAER,OACE,oBAAC,OAAD;EACE,KAAI;EACJ,WAAW,GAAG,2CAA2C,CAAC,UAAU,WAAW;EAC1E;EACL,SAAS,MAAM;GACb,MAAM,EAAE,cAAc,kBAAkB,EAAE;GAC1C,IAAI,eAAe,KAAK,gBAAgB,GACtC,UAAU,IAAI;EAElB;CACD,CAAA;AAEL;AAaA,IAAM,SAAS,QAAM,YAClB,EAAE,WAAW,UAAU,KAAK,UAAU,WAAW,GAAG,SAAS,QAAQ;CACpE,MAAM,cAAc,CAAC,CAAC;CACtB,MAAM,UAAU,cAAc,iBAAiB,aAAa,UAAU,MAAM,IAAI,IAAI,KAAA;CAEpF,OACE,oBAAC,gBAAgB,MAAjB;EACO;EACL,WAAW,GAAG,8DAA8D,SAAS;EACrF,GAAI;YAEH,YACC,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,gBAAD;GACE,WAAW,GACT,6EACA,eAAe,0BACjB;GACA,OAAO,cAAc,EAAE,iBAAiB,QAAQ,IAAI,KAAA;aAEnD,YAAY,oBAAC,MAAD,CAAO,CAAA;EACN,CAAA,GACf,OAAO,oBAAC,sBAAD,EAA2B,IAAM,CAAA,CACzC,EAAA,CAAA;CAEgB,CAAA;AAE1B,CACF;AACA,OAAO,cAAc,gBAAgB,KAAK"}
1
+ {"version":3,"file":"avatar.js","names":[],"sources":["../../../src/components/ui/avatar.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as AvatarPrimitive from '@radix-ui/react-avatar';\nimport { User } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { stringToHslColor, stringToTonalAvatarClasses } from '@/lib/ds-utils';\nimport { useShade } from '@/providers/shade-context';\n\nconst AvatarImage = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Image>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Image>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Image\n ref={ref}\n className={cn('aspect-square size-full', className)}\n {...props}\n />\n));\nAvatarImage.displayName = AvatarPrimitive.Image.displayName;\n\nconst AvatarFallback = React.forwardRef<\n React.ElementRef<typeof AvatarPrimitive.Fallback>,\n React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Fallback>\n>(({ className, ...props }, ref) => (\n <AvatarPrimitive.Fallback\n ref={ref}\n className={cn(\n 'flex size-full items-center justify-center rounded-full bg-muted [&_svg]:size-4',\n className,\n )}\n {...props}\n />\n));\nAvatarFallback.displayName = AvatarPrimitive.Fallback.displayName;\n\n// Gravatar's `d=blank` parameter returns a 1×1 transparent PNG when no avatar\n// exists for the given email. The HTTP response is 200, so Radix's AvatarImage\n// would treat it as a valid image and hide the fallback. We render the image\n// ourselves and only reveal it once it loads with non-trivial dimensions.\nfunction ValidatedAvatarImage({ src }: { src: string }) {\n const [loaded, setLoaded] = React.useState(false);\n\n React.useEffect(() => {\n setLoaded(false);\n }, [src]);\n\n return (\n <img\n alt=\"\"\n className={cn('absolute inset-0 size-full object-cover', !loaded && 'invisible')}\n src={src}\n onLoad={(e) => {\n const { naturalWidth, naturalHeight } = e.currentTarget;\n if (naturalWidth > 1 && naturalHeight > 1) {\n setLoaded(true);\n }\n }}\n />\n );\n}\n\ninterface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> {\n src?: string | null;\n initials?: string | null;\n /**\n * Seeds the fallback background hue. Defaults to the initials, but callers\n * should pass the richer identity string they derived the initials from\n * (name/email) so distinct people keep distinct hues.\n */\n colorSeed?: string | null;\n}\n\nconst Avatar = React.forwardRef<React.ElementRef<typeof AvatarPrimitive.Root>, AvatarProps>(\n ({ className, children, src, initials, colorSeed, ...props }, ref) => {\n const { admin7Design } = useShade();\n const hasInitials = !!initials;\n const seed = colorSeed || initials || '';\n const tonal = hasInitials && admin7Design;\n const bgColor = hasInitials && !tonal ? stringToHslColor(seed, '45', '55') : undefined;\n\n return (\n <AvatarPrimitive.Root\n ref={ref}\n className={cn('relative flex size-8 shrink-0 overflow-hidden rounded-full', className)}\n {...props}\n >\n {children ?? (\n <>\n <AvatarFallback\n className={cn(\n 'text-xs text-muted-foreground md:text-sm [&_svg]:size-3 md:[&_svg]:size-4',\n hasInitials && 'font-semibold',\n hasInitials && (tonal ? stringToTonalAvatarClasses(seed) : 'text-white'),\n )}\n style={bgColor ? { backgroundColor: bgColor } : undefined}\n >\n {initials ?? <User />}\n </AvatarFallback>\n {src && <ValidatedAvatarImage src={src} />}\n </>\n )}\n </AvatarPrimitive.Root>\n );\n },\n);\nAvatar.displayName = AvatarPrimitive.Root.displayName;\n\nexport { Avatar, AvatarImage, AvatarFallback };\n"],"mappings":";;;;;;;AAQA,IAAM,cAAc,QAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,OAAjB;CACO;CACL,WAAW,GAAG,2BAA2B,SAAS;CAClD,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc,gBAAgB,MAAM;AAEhD,IAAM,iBAAiB,QAAM,YAG1B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAAC,gBAAgB,UAAjB;CACO;CACL,WAAW,GACT,mFACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,eAAe,cAAc,gBAAgB,SAAS;AAMtD,SAAS,qBAAqB,EAAE,OAAwB;CACtD,MAAM,CAAC,QAAQ,aAAa,QAAM,SAAS,KAAK;CAEhD,QAAM,gBAAgB;EACpB,UAAU,KAAK;CACjB,GAAG,CAAC,GAAG,CAAC;CAER,OACE,oBAAC,OAAD;EACE,KAAI;EACJ,WAAW,GAAG,2CAA2C,CAAC,UAAU,WAAW;EAC1E;EACL,SAAS,MAAM;GACb,MAAM,EAAE,cAAc,kBAAkB,EAAE;GAC1C,IAAI,eAAe,KAAK,gBAAgB,GACtC,UAAU,IAAI;EAElB;CACD,CAAA;AAEL;AAaA,IAAM,SAAS,QAAM,YAClB,EAAE,WAAW,UAAU,KAAK,UAAU,WAAW,GAAG,SAAS,QAAQ;CACpE,MAAM,EAAE,iBAAiB,SAAS;CAClC,MAAM,cAAc,CAAC,CAAC;CACtB,MAAM,OAAO,aAAa,YAAY;CACtC,MAAM,QAAQ,eAAe;CAC7B,MAAM,UAAU,eAAe,CAAC,QAAQ,iBAAiB,MAAM,MAAM,IAAI,IAAI,KAAA;CAE7E,OACE,oBAAC,gBAAgB,MAAjB;EACO;EACL,WAAW,GAAG,8DAA8D,SAAS;EACrF,GAAI;YAEH,YACC,qBAAA,YAAA,EAAA,UAAA,CACE,oBAAC,gBAAD;GACE,WAAW,GACT,6EACA,eAAe,iBACf,gBAAgB,QAAQ,2BAA2B,IAAI,IAAI,aAC7D;GACA,OAAO,UAAU,EAAE,iBAAiB,QAAQ,IAAI,KAAA;aAE/C,YAAY,oBAAC,MAAD,CAAO,CAAA;EACN,CAAA,GACf,OAAO,oBAAC,sBAAD,EAA2B,IAAM,CAAA,CACzC,EAAA,CAAA;CAEgB,CAAA;AAE1B,CACF;AACA,OAAO,cAAc,gBAAgB,KAAK"}
@@ -7,7 +7,7 @@ var badgeVariants = cva("inline-flex items-center border font-semibold tracking-
7
7
  secondary: "border-transparent bg-secondary text-secondary-foreground/70",
8
8
  destructive: "border-transparent bg-destructive/20 text-destructive",
9
9
  success: "border-transparent bg-green/20 text-green",
10
- warning: "border-transparent bg-state-warning/20 text-yellow-600",
10
+ warning: "border-transparent bg-badge-warning text-badge-warning-foreground",
11
11
  outline: "text-foreground"
12
12
  },
13
13
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"badge-variants.js","names":[],"sources":["../../../src/components/ui/badge-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center border font-semibold tracking-normal transition-colors focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:outline-hidden',\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground',\n secondary: 'border-transparent bg-secondary text-secondary-foreground/70',\n destructive: 'border-transparent bg-destructive/20 text-destructive',\n success: 'border-transparent bg-green/20 text-green',\n warning: 'border-transparent bg-state-warning/20 text-yellow-600',\n outline: 'text-foreground',\n },\n size: {\n default: 'h-4.5 px-1.5 text-xs',\n sm: 'h-5 px-2 text-sm',\n md: 'h-6 px-2.5 text-sm',\n },\n shape: {\n rounded: 'rounded-xs',\n pill: 'rounded-full',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n shape: 'pill',\n },\n },\n);\n\nexport { badgeVariants };\n"],"mappings":";;AAEA,IAAM,gBAAgB,IACpB,+JACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,WAAW;GACX,aAAa;GACb,SAAS;GACT,SAAS;GACT,SAAS;EACX;EACA,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;EACN;EACA,OAAO;GACL,SAAS;GACT,MAAM;EACR;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF"}
1
+ {"version":3,"file":"badge-variants.js","names":[],"sources":["../../../src/components/ui/badge-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst badgeVariants = cva(\n 'inline-flex items-center border font-semibold tracking-normal transition-colors focus:ring-2 focus:ring-focus-ring focus:ring-offset-2 focus:outline-hidden',\n {\n variants: {\n variant: {\n default: 'border-transparent bg-primary text-primary-foreground',\n secondary: 'border-transparent bg-secondary text-secondary-foreground/70',\n destructive: 'border-transparent bg-destructive/20 text-destructive',\n success: 'border-transparent bg-green/20 text-green',\n warning: 'border-transparent bg-badge-warning text-badge-warning-foreground',\n outline: 'text-foreground',\n },\n size: {\n default: 'h-4.5 px-1.5 text-xs',\n sm: 'h-5 px-2 text-sm',\n md: 'h-6 px-2.5 text-sm',\n },\n shape: {\n rounded: 'rounded-xs',\n pill: 'rounded-full',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n shape: 'pill',\n },\n },\n);\n\nexport { badgeVariants };\n"],"mappings":";;AAEA,IAAM,gBAAgB,IACpB,+JACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,WAAW;GACX,aAAa;GACb,SAAS;GACT,SAAS;GACT,SAAS;EACX;EACA,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;EACN;EACA,OAAO;GACL,SAAS;GACT,MAAM;EACR;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF"}
@@ -6,10 +6,10 @@ var bannerVariants = cva("relative block rounded-lg transition-all duration-300"
6
6
  default: "border border-border-default bg-surface-panel shadow-sm hover:shadow-md",
7
7
  gradient: [
8
8
  "cursor-pointer bg-surface-elevated",
9
- "shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_28%),7px_6px_42px_8px_rgb(202_103_255_/_32%)]",
10
- "dark:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_36%),7px_6px_42px_8px_rgb(202_103_255_/_38%)]",
11
- "hover:shadow-[-7px_-4px_42px_10px_rgb(75_225_226_/_38%),7px_8px_42px_10px_rgb(202_103_255_/_42%)]",
12
- "dark:hover:shadow-[-7px_-4px_42px_10px_rgb(75_225_226_/_50%),7px_8px_42px_10px_rgb(202_103_255_/_52%)]",
9
+ "shadow-[-7px_-6px_42px_8px_color-mix(in_oklab,var(--banner-glow-start)_28%,transparent),7px_6px_42px_8px_color-mix(in_oklab,var(--banner-glow-end)_32%,transparent)]",
10
+ "dark:shadow-[-7px_-6px_42px_8px_color-mix(in_oklab,var(--banner-glow-start)_36%,transparent),7px_6px_42px_8px_color-mix(in_oklab,var(--banner-glow-end)_38%,transparent)]",
11
+ "hover:shadow-[-7px_-4px_42px_10px_color-mix(in_oklab,var(--banner-glow-start)_38%,transparent),7px_8px_42px_10px_color-mix(in_oklab,var(--banner-glow-end)_42%,transparent)]",
12
+ "dark:hover:shadow-[-7px_-4px_42px_10px_color-mix(in_oklab,var(--banner-glow-start)_50%,transparent),7px_8px_42px_10px_color-mix(in_oklab,var(--banner-glow-end)_52%,transparent)]",
13
13
  "hover:translate-y-[-2px] hover:scale-[1.01]"
14
14
  ],
15
15
  info: "border border-state-info/40 bg-state-info/10",
@@ -1 +1 @@
1
- {"version":3,"file":"banner-variants.js","names":[],"sources":["../../../src/components/ui/banner-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst bannerVariants = cva('relative block rounded-lg transition-all duration-300', {\n variants: {\n variant: {\n default: 'border border-border-default bg-surface-panel shadow-sm hover:shadow-md',\n gradient: [\n 'cursor-pointer bg-surface-elevated',\n 'shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_28%),7px_6px_42px_8px_rgb(202_103_255_/_32%)]',\n 'dark:shadow-[-7px_-6px_42px_8px_rgb(75_225_226_/_36%),7px_6px_42px_8px_rgb(202_103_255_/_38%)]',\n 'hover:shadow-[-7px_-4px_42px_10px_rgb(75_225_226_/_38%),7px_8px_42px_10px_rgb(202_103_255_/_42%)]',\n 'dark:hover:shadow-[-7px_-4px_42px_10px_rgb(75_225_226_/_50%),7px_8px_42px_10px_rgb(202_103_255_/_52%)]',\n 'hover:translate-y-[-2px] hover:scale-[1.01]',\n ],\n info: 'border border-state-info/40 bg-state-info/10',\n success: 'border border-state-success/40 bg-state-success/10',\n warning: 'border border-state-warning/40 bg-state-warning/10',\n destructive: 'border border-state-danger/20 bg-state-danger/10',\n },\n size: {\n sm: 'p-2 text-sm',\n md: 'p-3',\n lg: 'p-4',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n});\n\nexport { bannerVariants };\n"],"mappings":";;AAEA,IAAM,iBAAiB,IAAI,yDAAyD;CAClF,UAAU;EACR,SAAS;GACP,SAAS;GACT,UAAU;IACR;IACA;IACA;IACA;IACA;IACA;GACF;GACA,MAAM;GACN,SAAS;GACT,SAAS;GACT,aAAa;EACf;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CAAC"}
1
+ {"version":3,"file":"banner-variants.js","names":[],"sources":["../../../src/components/ui/banner-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst bannerVariants = cva('relative block rounded-lg transition-all duration-300', {\n variants: {\n variant: {\n default: 'border border-border-default bg-surface-panel shadow-sm hover:shadow-md',\n gradient: [\n 'cursor-pointer bg-surface-elevated',\n 'shadow-[-7px_-6px_42px_8px_color-mix(in_oklab,var(--banner-glow-start)_28%,transparent),7px_6px_42px_8px_color-mix(in_oklab,var(--banner-glow-end)_32%,transparent)]',\n 'dark:shadow-[-7px_-6px_42px_8px_color-mix(in_oklab,var(--banner-glow-start)_36%,transparent),7px_6px_42px_8px_color-mix(in_oklab,var(--banner-glow-end)_38%,transparent)]',\n 'hover:shadow-[-7px_-4px_42px_10px_color-mix(in_oklab,var(--banner-glow-start)_38%,transparent),7px_8px_42px_10px_color-mix(in_oklab,var(--banner-glow-end)_42%,transparent)]',\n 'dark:hover:shadow-[-7px_-4px_42px_10px_color-mix(in_oklab,var(--banner-glow-start)_50%,transparent),7px_8px_42px_10px_color-mix(in_oklab,var(--banner-glow-end)_52%,transparent)]',\n 'hover:translate-y-[-2px] hover:scale-[1.01]',\n ],\n info: 'border border-state-info/40 bg-state-info/10',\n success: 'border border-state-success/40 bg-state-success/10',\n warning: 'border border-state-warning/40 bg-state-warning/10',\n destructive: 'border border-state-danger/20 bg-state-danger/10',\n },\n size: {\n sm: 'p-2 text-sm',\n md: 'p-3',\n lg: 'p-4',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'md',\n },\n});\n\nexport { bannerVariants };\n"],"mappings":";;AAEA,IAAM,iBAAiB,IAAI,yDAAyD;CAClF,UAAU;EACR,SAAS;GACP,SAAS;GACT,UAAU;IACR;IACA;IACA;IACA;IACA;IACA;GACF;GACA,MAAM;GACN,SAAS;GACT,SAAS;GACT,aAAa;EACf;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CAAC"}
@@ -20,10 +20,6 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-1.5 text-c
20
20
  icon: "size-9",
21
21
  "icon-sm": "size-7 p-0 [&_svg]:size-3"
22
22
  },
23
- isAdmin7: {
24
- true: "",
25
- false: ""
26
- },
27
23
  shape: {
28
24
  rounded: "rounded-control",
29
25
  pill: "rounded-full"
@@ -31,37 +27,18 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-1.5 text-c
31
27
  },
32
28
  compoundVariants: [
33
29
  {
34
- isAdmin7: false,
35
- variant: "secondary",
36
- className: "bg-secondary hover:bg-secondary/80"
37
- },
38
- {
39
- isAdmin7: true,
40
30
  variant: "secondary",
41
31
  className: "bg-tab-active hover:bg-secondary"
42
32
  },
43
33
  {
44
- isAdmin7: false,
45
- variant: "destructive-ghost",
46
- className: "hover:bg-accent"
47
- },
48
- {
49
- isAdmin7: true,
50
34
  variant: "destructive-ghost",
51
35
  className: "hover:bg-destructive/10 enabled:active:bg-destructive/10 enabled:aria-expanded:bg-destructive/10"
52
36
  },
53
37
  {
54
- isAdmin7: false,
55
- variant: "subtle",
56
- className: "border border-control-border bg-transparent hover:bg-button-hover hover:text-accent-foreground"
57
- },
58
- {
59
- isAdmin7: true,
60
38
  variant: "subtle",
61
39
  className: "hover:bg-accent hover:text-accent-foreground"
62
40
  },
63
41
  {
64
- isAdmin7: true,
65
42
  variant: [
66
43
  "secondary",
67
44
  "ghost",
@@ -71,22 +48,18 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-1.5 text-c
71
48
  className: "enabled:active:shadow-control-pressed enabled:aria-expanded:shadow-control-pressed"
72
49
  },
73
50
  {
74
- isAdmin7: true,
75
51
  variant: "secondary",
76
52
  className: "enabled:active:bg-secondary enabled:aria-expanded:bg-secondary"
77
53
  },
78
54
  {
79
- isAdmin7: true,
80
55
  variant: ["ghost", "subtle"],
81
56
  className: "enabled:active:bg-accent enabled:aria-expanded:bg-accent enabled:aria-expanded:text-accent-foreground"
82
57
  },
83
58
  {
84
- isAdmin7: true,
85
59
  variant: "ghost",
86
60
  className: "hover:bg-button-ghost-hover enabled:active:bg-button-ghost-hover enabled:aria-expanded:bg-button-ghost-hover"
87
61
  },
88
62
  {
89
- isAdmin7: true,
90
63
  variant: "default",
91
64
  size: [
92
65
  "default",
@@ -96,7 +69,6 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-1.5 text-c
96
69
  className: "px-4"
97
70
  },
98
71
  {
99
- isAdmin7: true,
100
72
  variant: [
101
73
  "destructive",
102
74
  "outline",
@@ -114,12 +86,10 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-1.5 text-c
114
86
  className: "px-3"
115
87
  },
116
88
  {
117
- isAdmin7: true,
118
89
  variant: "outline",
119
- className: "border-0 shadow-control-outline enabled:active:shadow-control-outline-pressed enabled:aria-expanded:shadow-control-outline-pressed enabled:aria-expanded:bg-button-hover"
90
+ className: "border-0 shadow-control-outline enabled:active:shadow-control-outline-pressed enabled:aria-expanded:shadow-control-outline-pressed enabled:active:bg-button-pressed enabled:aria-expanded:bg-button-pressed"
120
91
  },
121
92
  {
122
- isAdmin7: true,
123
93
  size: "icon",
124
94
  className: "size-(--control-height) aspect-square p-0"
125
95
  }
@@ -127,8 +97,7 @@ var buttonVariants = cva("inline-flex items-center justify-center gap-1.5 text-c
127
97
  defaultVariants: {
128
98
  variant: "default",
129
99
  size: "default",
130
- shape: "pill",
131
- isAdmin7: true
100
+ shape: "pill"
132
101
  }
133
102
  });
134
103
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"button-variants.js","names":[],"sources":["../../../src/components/ui/button-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-1.5 text-control whitespace-nowrap transition-colors focus-visible:ring-1 focus-visible:ring-focus-ring focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.5px]',\n {\n variants: {\n variant: {\n default:\n 'bg-primary font-semibold text-primary-foreground hover:bg-primary/90 disabled:bg-control-disabled-surface disabled:text-muted-foreground/80 disabled:opacity-100',\n destructive:\n 'bg-destructive font-medium text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-control-border bg-transparent font-medium hover:bg-button-hover hover:text-accent-foreground',\n secondary: 'font-medium text-secondary-foreground',\n subtle: 'font-medium',\n ghost: 'font-medium hover:bg-accent hover:text-accent-foreground',\n 'destructive-ghost': 'font-medium text-destructive hover:text-destructive',\n link: 'font-medium text-primary underline-offset-4 hover:underline',\n dropdown:\n 'border border-control-border bg-transparent hover:bg-button-hover hover:text-accent-foreground',\n },\n size: {\n default: 'h-(--control-height) px-2.5 py-2',\n sm: 'h-7 px-3 text-sm! [&_svg]:size-3',\n lg: 'h-11 px-8 text-md font-semibold',\n icon: 'size-9',\n 'icon-sm': 'size-7 p-0 [&_svg]:size-3',\n },\n isAdmin7: { true: '', false: '' },\n shape: {\n rounded: 'rounded-control',\n pill: 'rounded-full',\n },\n },\n compoundVariants: [\n {\n isAdmin7: false,\n variant: 'secondary',\n className: 'bg-secondary hover:bg-secondary/80',\n },\n { isAdmin7: true, variant: 'secondary', className: 'bg-tab-active hover:bg-secondary' },\n { isAdmin7: false, variant: 'destructive-ghost', className: 'hover:bg-accent' },\n {\n isAdmin7: true,\n variant: 'destructive-ghost',\n className:\n 'hover:bg-destructive/10 enabled:active:bg-destructive/10 enabled:aria-expanded:bg-destructive/10',\n },\n {\n isAdmin7: false,\n variant: 'subtle',\n className:\n 'border border-control-border bg-transparent hover:bg-button-hover hover:text-accent-foreground',\n },\n {\n isAdmin7: true,\n variant: 'subtle',\n className: 'hover:bg-accent hover:text-accent-foreground',\n },\n {\n isAdmin7: true,\n variant: ['secondary', 'ghost', 'destructive-ghost', 'subtle'],\n className:\n 'enabled:active:shadow-control-pressed enabled:aria-expanded:shadow-control-pressed',\n },\n {\n isAdmin7: true,\n variant: 'secondary',\n className: 'enabled:active:bg-secondary enabled:aria-expanded:bg-secondary',\n },\n {\n isAdmin7: true,\n variant: ['ghost', 'subtle'],\n className:\n 'enabled:active:bg-accent enabled:aria-expanded:bg-accent enabled:aria-expanded:text-accent-foreground',\n },\n {\n isAdmin7: true,\n variant: 'ghost',\n className:\n 'hover:bg-button-ghost-hover enabled:active:bg-button-ghost-hover enabled:aria-expanded:bg-button-ghost-hover',\n },\n {\n isAdmin7: true,\n variant: 'default',\n size: ['default', 'sm', 'lg'],\n className: 'px-4',\n },\n {\n isAdmin7: true,\n variant: [\n 'destructive',\n 'outline',\n 'secondary',\n 'ghost',\n 'destructive-ghost',\n 'dropdown',\n 'subtle',\n ],\n size: ['default', 'sm', 'lg'],\n className: 'px-3',\n },\n {\n isAdmin7: true,\n variant: 'outline',\n className:\n 'border-0 shadow-control-outline enabled:active:shadow-control-outline-pressed enabled:aria-expanded:shadow-control-outline-pressed enabled:aria-expanded:bg-button-hover',\n },\n {\n isAdmin7: true,\n size: 'icon',\n className: 'size-(--control-height) aspect-square p-0',\n },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'default',\n shape: 'pill',\n isAdmin7: true,\n },\n },\n);\n\nexport { buttonVariants };\n"],"mappings":";;AAEA,IAAM,iBAAiB,IACrB,wTACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,aACE;GACF,SACE;GACF,WAAW;GACX,QAAQ;GACR,OAAO;GACP,qBAAqB;GACrB,MAAM;GACN,UACE;EACJ;EACA,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,MAAM;GACN,WAAW;EACb;EACA,UAAU;GAAE,MAAM;GAAI,OAAO;EAAG;EAChC,OAAO;GACL,SAAS;GACT,MAAM;EACR;CACF;CACA,kBAAkB;EAChB;GACE,UAAU;GACV,SAAS;GACT,WAAW;EACb;EACA;GAAE,UAAU;GAAM,SAAS;GAAa,WAAW;EAAmC;EACtF;GAAE,UAAU;GAAO,SAAS;GAAqB,WAAW;EAAkB;EAC9E;GACE,UAAU;GACV,SAAS;GACT,WACE;EACJ;EACA;GACE,UAAU;GACV,SAAS;GACT,WACE;EACJ;EACA;GACE,UAAU;GACV,SAAS;GACT,WAAW;EACb;EACA;GACE,UAAU;GACV,SAAS;IAAC;IAAa;IAAS;IAAqB;GAAQ;GAC7D,WACE;EACJ;EACA;GACE,UAAU;GACV,SAAS;GACT,WAAW;EACb;EACA;GACE,UAAU;GACV,SAAS,CAAC,SAAS,QAAQ;GAC3B,WACE;EACJ;EACA;GACE,UAAU;GACV,SAAS;GACT,WACE;EACJ;EACA;GACE,UAAU;GACV,SAAS;GACT,MAAM;IAAC;IAAW;IAAM;GAAI;GAC5B,WAAW;EACb;EACA;GACE,UAAU;GACV,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,MAAM;IAAC;IAAW;IAAM;GAAI;GAC5B,WAAW;EACb;EACA;GACE,UAAU;GACV,SAAS;GACT,WACE;EACJ;EACA;GACE,UAAU;GACV,MAAM;GACN,WAAW;EACb;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;EACP,UAAU;CACZ;AACF,CACF"}
1
+ {"version":3,"file":"button-variants.js","names":[],"sources":["../../../src/components/ui/button-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst buttonVariants = cva(\n 'inline-flex items-center justify-center gap-1.5 text-control whitespace-nowrap transition-colors focus-visible:ring-1 focus-visible:ring-focus-ring focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:stroke-[1.5px]',\n {\n variants: {\n variant: {\n default:\n 'bg-primary font-semibold text-primary-foreground hover:bg-primary/90 disabled:bg-control-disabled-surface disabled:text-muted-foreground/80 disabled:opacity-100',\n destructive:\n 'bg-destructive font-medium text-destructive-foreground hover:bg-destructive/90',\n outline:\n 'border border-control-border bg-transparent font-medium hover:bg-button-hover hover:text-accent-foreground',\n secondary: 'font-medium text-secondary-foreground',\n subtle: 'font-medium',\n ghost: 'font-medium hover:bg-accent hover:text-accent-foreground',\n 'destructive-ghost': 'font-medium text-destructive hover:text-destructive',\n link: 'font-medium text-primary underline-offset-4 hover:underline',\n dropdown:\n 'border border-control-border bg-transparent hover:bg-button-hover hover:text-accent-foreground',\n },\n size: {\n default: 'h-(--control-height) px-2.5 py-2',\n sm: 'h-7 px-3 text-sm! [&_svg]:size-3',\n lg: 'h-11 px-8 text-md font-semibold',\n icon: 'size-9',\n 'icon-sm': 'size-7 p-0 [&_svg]:size-3',\n },\n shape: {\n rounded: 'rounded-control',\n pill: 'rounded-full',\n },\n },\n compoundVariants: [\n { variant: 'secondary', className: 'bg-tab-active hover:bg-secondary' },\n {\n variant: 'destructive-ghost',\n className:\n 'hover:bg-destructive/10 enabled:active:bg-destructive/10 enabled:aria-expanded:bg-destructive/10',\n },\n {\n variant: 'subtle',\n className: 'hover:bg-accent hover:text-accent-foreground',\n },\n {\n variant: ['secondary', 'ghost', 'destructive-ghost', 'subtle'],\n className:\n 'enabled:active:shadow-control-pressed enabled:aria-expanded:shadow-control-pressed',\n },\n {\n variant: 'secondary',\n className: 'enabled:active:bg-secondary enabled:aria-expanded:bg-secondary',\n },\n {\n variant: ['ghost', 'subtle'],\n className:\n 'enabled:active:bg-accent enabled:aria-expanded:bg-accent enabled:aria-expanded:text-accent-foreground',\n },\n {\n variant: 'ghost',\n className:\n 'hover:bg-button-ghost-hover enabled:active:bg-button-ghost-hover enabled:aria-expanded:bg-button-ghost-hover',\n },\n {\n variant: 'default',\n size: ['default', 'sm', 'lg'],\n className: 'px-4',\n },\n {\n variant: [\n 'destructive',\n 'outline',\n 'secondary',\n 'ghost',\n 'destructive-ghost',\n 'dropdown',\n 'subtle',\n ],\n size: ['default', 'sm', 'lg'],\n className: 'px-3',\n },\n {\n variant: 'outline',\n className:\n 'border-0 shadow-control-outline enabled:active:shadow-control-outline-pressed enabled:aria-expanded:shadow-control-outline-pressed enabled:active:bg-button-pressed enabled:aria-expanded:bg-button-pressed',\n },\n {\n size: 'icon',\n className: 'size-(--control-height) aspect-square p-0',\n },\n ],\n defaultVariants: {\n variant: 'default',\n size: 'default',\n shape: 'pill',\n },\n },\n);\n\nexport { buttonVariants };\n"],"mappings":";;AAEA,IAAM,iBAAiB,IACrB,wTACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,aACE;GACF,SACE;GACF,WAAW;GACX,QAAQ;GACR,OAAO;GACP,qBAAqB;GACrB,MAAM;GACN,UACE;EACJ;EACA,MAAM;GACJ,SAAS;GACT,IAAI;GACJ,IAAI;GACJ,MAAM;GACN,WAAW;EACb;EACA,OAAO;GACL,SAAS;GACT,MAAM;EACR;CACF;CACA,kBAAkB;EAChB;GAAE,SAAS;GAAa,WAAW;EAAmC;EACtE;GACE,SAAS;GACT,WACE;EACJ;EACA;GACE,SAAS;GACT,WAAW;EACb;EACA;GACE,SAAS;IAAC;IAAa;IAAS;IAAqB;GAAQ;GAC7D,WACE;EACJ;EACA;GACE,SAAS;GACT,WAAW;EACb;EACA;GACE,SAAS,CAAC,SAAS,QAAQ;GAC3B,WACE;EACJ;EACA;GACE,SAAS;GACT,WACE;EACJ;EACA;GACE,SAAS;GACT,MAAM;IAAC;IAAW;IAAM;GAAI;GAC5B,WAAW;EACb;EACA;GACE,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACF;GACA,MAAM;IAAC;IAAW;IAAM;GAAI;GAC5B,WAAW;EACb;EACA;GACE,SAAS;GACT,WACE;EACJ;EACA;GACE,MAAM;GACN,WAAW;EACb;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;EACN,OAAO;CACT;AACF,CACF"}
@@ -7,7 +7,7 @@ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { Slot } from "@radix-ui/react-slot";
8
8
  //#region src/components/ui/button.tsx
9
9
  var Button = React$1.forwardRef(({ className, variant, size, shape, asChild = false, children, ...props }, ref) => {
10
- const { controlShape, isAdmin7 } = useShade();
10
+ const { controlShape } = useShade();
11
11
  const Comp = asChild ? Slot : "button";
12
12
  const resolvedShape = variant === "link" ? "rounded" : shape ?? controlShape;
13
13
  const content = variant === "dropdown" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [children, /* @__PURE__ */ jsx(ChevronDown, {
@@ -19,7 +19,6 @@ var Button = React$1.forwardRef(({ className, variant, size, shape, asChild = fa
19
19
  className: cn(buttonVariants({
20
20
  variant,
21
21
  size,
22
- isAdmin7,
23
22
  shape: resolvedShape,
24
23
  className
25
24
  })),
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":[],"sources":["../../../src/components/ui/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\n\nimport { buttonVariants } from '@/components/ui/button-variants';\nimport { cn } from '@/lib/utils';\nimport { useShade } from '@/providers/shade-context';\n\nexport interface ButtonProps\n extends\n React.ButtonHTMLAttributes<HTMLButtonElement>,\n Omit<VariantProps<typeof buttonVariants>, 'isAdmin7'> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, shape, asChild = false, children, ...props }, ref) => {\n const { controlShape, isAdmin7 } = useShade();\n const Comp = asChild ? Slot : 'button';\n const resolvedShape = variant === 'link' ? 'rounded' : (shape ?? controlShape);\n const content =\n variant === 'dropdown' ? (\n <>\n {children}\n <ChevronDown\n className=\"-mr-0.5! -ml-1! size-4 stroke-[2px]! opacity-50\"\n strokeWidth={2}\n />\n </>\n ) : (\n children\n );\n\n return (\n <Comp\n ref={ref}\n className={cn(buttonVariants({ variant, size, isAdmin7, shape: resolvedShape, className }))}\n {...props}\n data-control-shape={resolvedShape}\n >\n {content}\n </Comp>\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button };\n"],"mappings":";;;;;;;;AAgBA,IAAM,SAAS,QAAM,YAClB,EAAE,WAAW,SAAS,MAAM,OAAO,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACjF,MAAM,EAAE,cAAc,aAAa,SAAS;CAC5C,MAAM,OAAO,UAAU,OAAO;CAC9B,MAAM,gBAAgB,YAAY,SAAS,YAAa,SAAS;CACjE,MAAM,UACJ,YAAY,aACV,qBAAA,YAAA,EAAA,UAAA,CACG,UACD,oBAAC,aAAD;EACE,WAAU;EACV,aAAa;CACd,CAAA,CACD,EAAA,CAAA,IAEF;CAGJ,OACE,oBAAC,MAAD;EACO;EACL,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAU,OAAO;GAAe;EAAU,CAAC,CAAC;EAC1F,GAAI;EACJ,sBAAoB;YAEnB;CACG,CAAA;AAEV,CACF;AACA,OAAO,cAAc"}
1
+ {"version":3,"file":"button.js","names":[],"sources":["../../../src/components/ui/button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Slot } from '@radix-ui/react-slot';\nimport { type VariantProps } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\n\nimport { buttonVariants } from '@/components/ui/button-variants';\nimport { cn } from '@/lib/utils';\nimport { useShade } from '@/providers/shade-context';\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, shape, asChild = false, children, ...props }, ref) => {\n const { controlShape } = useShade();\n const Comp = asChild ? Slot : 'button';\n const resolvedShape = variant === 'link' ? 'rounded' : (shape ?? controlShape);\n const content =\n variant === 'dropdown' ? (\n <>\n {children}\n <ChevronDown\n className=\"-mr-0.5! -ml-1! size-4 stroke-[2px]! opacity-50\"\n strokeWidth={2}\n />\n </>\n ) : (\n children\n );\n\n return (\n <Comp\n ref={ref}\n className={cn(buttonVariants({ variant, size, shape: resolvedShape, className }))}\n {...props}\n data-control-shape={resolvedShape}\n >\n {content}\n </Comp>\n );\n },\n);\nButton.displayName = 'Button';\n\nexport { Button };\n"],"mappings":";;;;;;;;AAcA,IAAM,SAAS,QAAM,YAClB,EAAE,WAAW,SAAS,MAAM,OAAO,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CACjF,MAAM,EAAE,iBAAiB,SAAS;CAClC,MAAM,OAAO,UAAU,OAAO;CAC9B,MAAM,gBAAgB,YAAY,SAAS,YAAa,SAAS;CACjE,MAAM,UACJ,YAAY,aACV,qBAAA,YAAA,EAAA,UAAA,CACG,UACD,oBAAC,aAAD;EACE,WAAU;EACV,aAAa;CACd,CAAA,CACD,EAAA,CAAA,IAEF;CAGJ,OACE,oBAAC,MAAD;EACO;EACL,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM,OAAO;GAAe;EAAU,CAAC,CAAC;EAChF,GAAI;EACJ,sBAAoB;YAEnB;CACG,CAAA;AAEV,CACF;AACA,OAAO,cAAc"}
@@ -8,7 +8,7 @@ import { jsx } from "react/jsx-runtime";
8
8
  import { DayPicker, getDefaultClassNames } from "react-day-picker";
9
9
  //#region src/components/ui/calendar.tsx
10
10
  function Calendar({ className, classNames, showOutsideDays = true, captionLayout = "label", buttonVariant = "ghost", formatters, components, ...props }) {
11
- const { controlShape, isAdmin7 } = useShade();
11
+ const { controlShape } = useShade();
12
12
  const defaultClassNames = getDefaultClassNames();
13
13
  return /* @__PURE__ */ jsx(DayPicker, {
14
14
  captionLayout,
@@ -20,12 +20,10 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
20
20
  nav: cn("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1", defaultClassNames.nav),
21
21
  button_previous: cn(buttonVariants({
22
22
  variant: buttonVariant,
23
- isAdmin7,
24
23
  shape: controlShape
25
24
  }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_previous),
26
25
  button_next: cn(buttonVariants({
27
26
  variant: buttonVariant,
28
- isAdmin7,
29
27
  shape: controlShape
30
28
  }), "size-(--cell-size) p-0 select-none aria-disabled:opacity-50", defaultClassNames.button_next),
31
29
  month_caption: cn("flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)", defaultClassNames.month_caption),
@@ -39,11 +37,11 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
39
37
  week: cn("mt-2 flex w-full", defaultClassNames.week),
40
38
  week_number_header: cn("w-(--cell-size) select-none", defaultClassNames.week_number_header),
41
39
  week_number: cn("text-[0.8rem] text-muted-foreground select-none", defaultClassNames.week_number),
42
- day: cn("group/day relative aspect-square size-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md", defaultClassNames.day),
40
+ day: cn("group/day relative aspect-square size-full p-0 text-center select-none [&:first-child[data-selected=true]_button[data-range-middle=true]]:rounded-l-md [&:last-child[data-selected=true]_button[data-range-middle=true]]:rounded-r-md", defaultClassNames.day),
43
41
  range_start: cn("rounded-l-md bg-accent", defaultClassNames.range_start),
44
42
  range_middle: cn("rounded-none", defaultClassNames.range_middle),
45
43
  range_end: cn("rounded-r-md bg-accent", defaultClassNames.range_end),
46
- today: cn("rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none", defaultClassNames.today),
44
+ today: cn(defaultClassNames.today),
47
45
  outside: cn("text-muted-foreground aria-selected:text-muted-foreground", defaultClassNames.outside),
48
46
  disabled: cn("text-muted-foreground opacity-50", defaultClassNames.disabled),
49
47
  hidden: cn("invisible", defaultClassNames.hidden),
@@ -101,12 +99,13 @@ function CalendarDayButton({ className, day, modifiers, ...props }) {
101
99
  }, [modifiers.focused]);
102
100
  return /* @__PURE__ */ jsx(Button, {
103
101
  ref,
104
- className: cn("flex aspect-square size-auto w-full min-w-(--cell-size) flex-auto items-center justify-center gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
102
+ className: cn("relative flex aspect-square size-auto w-full min-w-(--cell-size) flex-auto items-center justify-center gap-1 leading-none font-normal group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[today=true]:font-medium data-[today=true]:after:absolute data-[today=true]:after:bottom-1 data-[today=true]:after:left-1/2 data-[today=true]:after:h-0.5 data-[today=true]:after:w-3 data-[today=true]:after:-translate-x-1/2 data-[today=true]:after:rounded-full data-[today=true]:after:bg-current data-[today=true]:after:content-[''] dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70", defaultClassNames.day, className),
105
103
  "data-day": day.date.toLocaleDateString(),
106
104
  "data-range-end": modifiers.range_end,
107
105
  "data-range-middle": modifiers.range_middle,
108
106
  "data-range-start": modifiers.range_start,
109
107
  "data-selected-single": modifiers.selected && !modifiers.range_start && !modifiers.range_end && !modifiers.range_middle,
108
+ "data-today": modifiers.today,
110
109
  size: "icon",
111
110
  variant: "ghost",
112
111
  ...props
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","names":[],"sources":["../../../src/components/ui/calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { useShade } from '@/providers/shade-context';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\nimport { buttonVariants } from '@/components/ui/button-variants';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const { controlShape, isAdmin7 } = useShade();\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n captionLayout={captionLayout}\n className={cn(\n 'group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn(\n 'absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1',\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant, isAdmin7, shape: controlShape }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant, isAdmin7, shape: controlShape }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n 'relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50',\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label,\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'w-(--cell-size) rounded-md text-sm font-normal text-muted-foreground select-none',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn(\n 'text-[0.8rem] text-muted-foreground select-none',\n defaultClassNames.week_number,\n ),\n day: cn(\n 'group/day relative aspect-square size-full p-0 text-center select-none [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md',\n defaultClassNames.day,\n ),\n range_start: cn('rounded-l-md bg-accent', defaultClassNames.range_start),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),\n today: cn(\n 'rounded-md bg-accent text-accent-foreground data-[selected=true]:rounded-none',\n defaultClassNames.today,\n ),\n outside: cn(\n 'text-muted-foreground aria-selected:text-muted-foreground',\n defaultClassNames.outside,\n ),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className: rootClassName, rootRef, ...rootProps }) => {\n return (\n <div ref={rootRef} className={cn(rootClassName)} data-slot=\"calendar\" {...rootProps} />\n );\n },\n Chevron: ({ className: chevronClassName, orientation, ...chevronProps }) => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('size-4', chevronClassName)} {...chevronProps} />;\n }\n if (orientation === 'right') {\n return (\n <ChevronRightIcon className={cn('size-4', chevronClassName)} {...chevronProps} />\n );\n }\n return <ChevronDownIcon className={cn('size-4', chevronClassName)} {...chevronProps} />;\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...weekProps }) => {\n return (\n <td {...weekProps}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n className={cn(\n 'flex aspect-square size-auto w-full min-w-(--cell-size) flex-auto items-center justify-center gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70',\n defaultClassNames.day,\n className,\n )}\n data-day={day.date.toLocaleDateString()}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n data-range-start={modifiers.range_start}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n size=\"icon\"\n variant=\"ghost\"\n {...props}\n />\n );\n}\nCalendarDayButton.displayName = 'CalendarDayButton';\n\nexport { Calendar, CalendarDayButton };\n"],"mappings":";;;;;;;;;AASA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,gBAAgB,SAChB,gBAAgB,SAChB,YACA,YACA,GAAG,SAGF;CACD,MAAM,EAAE,cAAc,aAAa,SAAS;CAC5C,MAAM,oBAAoB,qBAAqB;CAE/C,OACE,oBAAC,WAAD;EACiB;EACf,WAAW,GACT,0JACA,OAAO,GAAG,6CACV,OAAO,GAAG,iDACV,SACF;EACA,YAAY;GACV,MAAM,GAAG,SAAS,kBAAkB,IAAI;GACxC,QAAQ,GAAG,4CAA4C,kBAAkB,MAAM;GAC/E,OAAO,GAAG,8BAA8B,kBAAkB,KAAK;GAC/D,KAAK,GACH,2EACA,kBAAkB,GACpB;GACA,iBAAiB,GACf,eAAe;IAAE,SAAS;IAAe;IAAU,OAAO;GAAa,CAAC,GACxE,+DACA,kBAAkB,eACpB;GACA,aAAa,GACX,eAAe;IAAE,SAAS;IAAe;IAAU,OAAO;GAAa,CAAC,GACxE,+DACA,kBAAkB,WACpB;GACA,eAAe,GACb,4EACA,kBAAkB,aACpB;GACA,WAAW,GACT,uFACA,kBAAkB,SACpB;GACA,eAAe,GACb,uHACA,kBAAkB,aACpB;GACA,UAAU,GAAG,yCAAyC,kBAAkB,QAAQ;GAChF,eAAe,GACb,2BACA,kBAAkB,UACd,YACA,2GACJ,kBAAkB,aAC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,YAAY;GACV,sBAAsB,SAAS,KAAK,eAAe,WAAW,EAAE,OAAO,QAAQ,CAAC;GAChF,GAAG;EACL;EACiB;EACjB,GAAI;CACL,CAAA;AAEL;AACA,SAAS,cAAc;AAEvB,SAAS,kBAAkB,EACzB,WACA,KACA,WACA,GAAG,SACsC;CACzC,MAAM,oBAAoB,qBAAqB;CAE/C,MAAM,MAAM,QAAM,OAA0B,IAAI;CAChD,QAAM,gBAAgB;EACpB,IAAI,UAAU,SACZ,IAAI,SAAS,MAAM;CAEvB,GAAG,CAAC,UAAU,OAAO,CAAC;CAEtB,OACE,oBAAC,QAAD;EACO;EACL,WAAW,GACT,i5BACA,kBAAkB,KAClB,SACF;EACA,YAAU,IAAI,KAAK,mBAAmB;EACtC,kBAAgB,UAAU;EAC1B,qBAAmB,UAAU;EAC7B,oBAAkB,UAAU;EAC5B,wBACE,UAAU,YACV,CAAC,UAAU,eACX,CAAC,UAAU,aACX,CAAC,UAAU;EAEb,MAAK;EACL,SAAQ;EACR,GAAI;CACL,CAAA;AAEL;AACA,kBAAkB,cAAc"}
1
+ {"version":3,"file":"calendar.js","names":[],"sources":["../../../src/components/ui/calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from 'lucide-react';\nimport { DayButton, DayPicker, getDefaultClassNames } from 'react-day-picker';\n\nimport { useShade } from '@/providers/shade-context';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/components/ui/button';\nimport { buttonVariants } from '@/components/ui/button-variants';\n\nfunction Calendar({\n className,\n classNames,\n showOutsideDays = true,\n captionLayout = 'label',\n buttonVariant = 'ghost',\n formatters,\n components,\n ...props\n}: React.ComponentProps<typeof DayPicker> & {\n buttonVariant?: React.ComponentProps<typeof Button>['variant'];\n}) {\n const { controlShape } = useShade();\n const defaultClassNames = getDefaultClassNames();\n\n return (\n <DayPicker\n captionLayout={captionLayout}\n className={cn(\n 'group/calendar bg-background p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent',\n String.raw`rtl:**:[.rdp-button\\_next>svg]:rotate-180`,\n String.raw`rtl:**:[.rdp-button\\_previous>svg]:rotate-180`,\n className,\n )}\n classNames={{\n root: cn('w-fit', defaultClassNames.root),\n months: cn('relative flex flex-col gap-4 md:flex-row', defaultClassNames.months),\n month: cn('flex w-full flex-col gap-4', defaultClassNames.month),\n nav: cn(\n 'absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1',\n defaultClassNames.nav,\n ),\n button_previous: cn(\n buttonVariants({ variant: buttonVariant, shape: controlShape }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_previous,\n ),\n button_next: cn(\n buttonVariants({ variant: buttonVariant, shape: controlShape }),\n 'size-(--cell-size) p-0 select-none aria-disabled:opacity-50',\n defaultClassNames.button_next,\n ),\n month_caption: cn(\n 'flex h-(--cell-size) w-full items-center justify-center px-(--cell-size)',\n defaultClassNames.month_caption,\n ),\n dropdowns: cn(\n 'flex h-(--cell-size) w-full items-center justify-center gap-1.5 text-sm font-medium',\n defaultClassNames.dropdowns,\n ),\n dropdown_root: cn(\n 'relative rounded-md border border-input shadow-xs has-focus:border-ring has-focus:ring-[3px] has-focus:ring-ring/50',\n defaultClassNames.dropdown_root,\n ),\n dropdown: cn('absolute inset-0 bg-popover opacity-0', defaultClassNames.dropdown),\n caption_label: cn(\n 'font-medium select-none',\n captionLayout === 'label'\n ? 'text-sm'\n : 'flex h-8 items-center gap-1 rounded-md pr-1 pl-2 text-sm [&>svg]:size-3.5 [&>svg]:text-muted-foreground',\n defaultClassNames.caption_label,\n ),\n table: 'w-full border-collapse',\n weekdays: cn('flex', defaultClassNames.weekdays),\n weekday: cn(\n 'w-(--cell-size) rounded-md text-sm font-normal text-muted-foreground select-none',\n defaultClassNames.weekday,\n ),\n week: cn('mt-2 flex w-full', defaultClassNames.week),\n week_number_header: cn('w-(--cell-size) select-none', defaultClassNames.week_number_header),\n week_number: cn(\n 'text-[0.8rem] text-muted-foreground select-none',\n defaultClassNames.week_number,\n ),\n day: cn(\n // A range rounds off where it wraps onto the next week; a day picked\n // on its own keeps its full shape on any weekday\n 'group/day relative aspect-square size-full p-0 text-center select-none [&:first-child[data-selected=true]_button[data-range-middle=true]]:rounded-l-md [&:last-child[data-selected=true]_button[data-range-middle=true]]:rounded-r-md',\n defaultClassNames.day,\n ),\n range_start: cn('rounded-l-md bg-accent', defaultClassNames.range_start),\n range_middle: cn('rounded-none', defaultClassNames.range_middle),\n range_end: cn('rounded-r-md bg-accent', defaultClassNames.range_end),\n // Today is marked under its number (see CalendarDayButton), not with\n // a background that would read as selected or vanish inside a range\n today: cn(defaultClassNames.today),\n outside: cn(\n 'text-muted-foreground aria-selected:text-muted-foreground',\n defaultClassNames.outside,\n ),\n disabled: cn('text-muted-foreground opacity-50', defaultClassNames.disabled),\n hidden: cn('invisible', defaultClassNames.hidden),\n ...classNames,\n }}\n components={{\n Root: ({ className: rootClassName, rootRef, ...rootProps }) => {\n return (\n <div ref={rootRef} className={cn(rootClassName)} data-slot=\"calendar\" {...rootProps} />\n );\n },\n Chevron: ({ className: chevronClassName, orientation, ...chevronProps }) => {\n if (orientation === 'left') {\n return <ChevronLeftIcon className={cn('size-4', chevronClassName)} {...chevronProps} />;\n }\n if (orientation === 'right') {\n return (\n <ChevronRightIcon className={cn('size-4', chevronClassName)} {...chevronProps} />\n );\n }\n return <ChevronDownIcon className={cn('size-4', chevronClassName)} {...chevronProps} />;\n },\n DayButton: CalendarDayButton,\n WeekNumber: ({ children, ...weekProps }) => {\n return (\n <td {...weekProps}>\n <div className=\"flex size-(--cell-size) items-center justify-center text-center\">\n {children}\n </div>\n </td>\n );\n },\n ...components,\n }}\n formatters={{\n formatMonthDropdown: (date) => date.toLocaleString('default', { month: 'short' }),\n ...formatters,\n }}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n );\n}\nCalendar.displayName = 'Calendar';\n\nfunction CalendarDayButton({\n className,\n day,\n modifiers,\n ...props\n}: React.ComponentProps<typeof DayButton>) {\n const defaultClassNames = getDefaultClassNames();\n\n const ref = React.useRef<HTMLButtonElement>(null);\n React.useEffect(() => {\n if (modifiers.focused) {\n ref.current?.focus();\n }\n }, [modifiers.focused]);\n\n return (\n <Button\n ref={ref}\n className={cn(\n \"relative flex aspect-square size-auto w-full min-w-(--cell-size) flex-auto items-center justify-center gap-1 leading-none font-normal group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-[3px] group-data-[focused=true]/day:ring-ring/50 data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground data-[range-middle=true]:rounded-none data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[today=true]:font-medium data-[today=true]:after:absolute data-[today=true]:after:bottom-1 data-[today=true]:after:left-1/2 data-[today=true]:after:h-0.5 data-[today=true]:after:w-3 data-[today=true]:after:-translate-x-1/2 data-[today=true]:after:rounded-full data-[today=true]:after:bg-current data-[today=true]:after:content-[''] dark:hover:text-accent-foreground [&>span]:text-xs [&>span]:opacity-70\",\n defaultClassNames.day,\n className,\n )}\n data-day={day.date.toLocaleDateString()}\n data-range-end={modifiers.range_end}\n data-range-middle={modifiers.range_middle}\n data-range-start={modifiers.range_start}\n data-selected-single={\n modifiers.selected &&\n !modifiers.range_start &&\n !modifiers.range_end &&\n !modifiers.range_middle\n }\n data-today={modifiers.today}\n size=\"icon\"\n variant=\"ghost\"\n {...props}\n />\n );\n}\nCalendarDayButton.displayName = 'CalendarDayButton';\n\nexport { Calendar, CalendarDayButton };\n"],"mappings":";;;;;;;;;AASA,SAAS,SAAS,EAChB,WACA,YACA,kBAAkB,MAClB,gBAA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;EAC1B,qBAAmB,UAAU;EAC7B,oBAAkB,UAAU;EAC5B,wBACE,UAAU,YACV,CAAC,UAAU,eACX,CAAC,UAAU,aACX,CAAC,UAAU;EAEb,cAAY,UAAU;EACtB,MAAK;EACL,SAAQ;EACR,GAAI;CACL,CAAA;AAEL;AACA,kBAAkB,cAAc"}
@@ -2,7 +2,7 @@ import { cva } from "class-variance-authority";
2
2
  //#region src/components/ui/card-variants.ts
3
3
  var cardVariants = cva("flex flex-col bg-card text-card-foreground", {
4
4
  variants: { variant: {
5
- outline: "rounded-xl border border-border-default transition-all hover:shadow-xs",
5
+ outline: "rounded-card border border-border-default transition-all hover:shadow-xs",
6
6
  plain: ""
7
7
  } },
8
8
  defaultVariants: { variant: "outline" }
@@ -1 +1 @@
1
- {"version":3,"file":"card-variants.js","names":[],"sources":["../../../src/components/ui/card-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst cardVariants = cva('flex flex-col bg-card text-card-foreground', {\n variants: {\n variant: {\n outline: 'rounded-xl border border-border-default transition-all hover:shadow-xs',\n plain: '',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nexport { cardVariants };\n"],"mappings":";;AAEA,IAAM,eAAe,IAAI,8CAA8C;CACrE,UAAU,EACR,SAAS;EACP,SAAS;EACT,OAAO;CACT,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC"}
1
+ {"version":3,"file":"card-variants.js","names":[],"sources":["../../../src/components/ui/card-variants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nconst cardVariants = cva('flex flex-col bg-card text-card-foreground', {\n variants: {\n variant: {\n outline: 'rounded-card border border-border-default transition-all hover:shadow-xs',\n plain: '',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nexport { cardVariants };\n"],"mappings":";;AAEA,IAAM,eAAe,IAAI,8CAA8C;CACrE,UAAU,EACR,SAAS;EACP,SAAS;EACT,OAAO;CACT,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC"}
@@ -88,7 +88,7 @@ var CardFooter = React$1.forwardRef(({ className, ...props }, ref) => {
88
88
  CardFooter.displayName = "CardFooter";
89
89
  var EmptyCard = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
90
90
  ref,
91
- className: cn("flex flex-col rounded-xl border border-border-default bg-card p-6 text-card-foreground transition-all hover:shadow-xs", className),
91
+ className: cn("flex flex-col rounded-card border border-border-default bg-card p-6 text-card-foreground transition-all hover:shadow-xs", className),
92
92
  ...props
93
93
  }));
94
94
  EmptyCard.displayName = "EmptyCard";
@@ -1 +1 @@
1
- {"version":3,"file":"card.js","names":[],"sources":["../../../src/components/ui/card.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cardVariants } from '@/components/ui/card-variants';\nimport { cn } from '@/lib/utils';\nimport { cva } from 'class-variance-authority';\n\ntype CardsVariant = 'outline' | 'plain';\nconst CardsVariantContext = React.createContext<CardsVariant>('outline');\n\nexport interface CardProps extends React.ComponentPropsWithoutRef<'div'> {\n variant?: CardsVariant;\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ variant = 'outline', className, ...props }, ref) => (\n <CardsVariantContext.Provider value={variant}>\n <div ref={ref} className={cn(cardVariants({ variant, className }))} {...props} />\n </CardsVariantContext.Provider>\n ),\n);\nCard.displayName = 'Card';\n\nconst cardHeaderVariants = cva('flex flex-col gap-y-1.5', {\n variants: {\n variant: {\n outline: 'p-6',\n plain: 'border-b border-border-default py-5',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(CardsVariantContext);\n return <div ref={ref} className={cn(cardHeaderVariants({ variant, className }))} {...props} />;\n },\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n ),\n);\nCardDescription.displayName = 'CardDescription';\n\nconst cardContentVariants = cva('', {\n variants: {\n variant: {\n outline: 'p-6 pt-0',\n plain: 'border-b border-border-default',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(CardsVariantContext);\n return <div ref={ref} className={cn(cardContentVariants({ variant, className }))} {...props} />;\n },\n);\nCardContent.displayName = 'CardContent';\n\nconst cardFooterVariants = cva('flex w-full items-center', {\n variants: {\n variant: {\n outline: 'p-6 pt-0',\n plain: 'py-5',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(CardsVariantContext);\n return (\n <div className=\"flex grow items-end\">\n <div ref={ref} className={cn(cardFooterVariants({ variant, className }))} {...props} />\n </div>\n );\n },\n);\nCardFooter.displayName = 'CardFooter';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface EmptyCardProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst EmptyCard = React.forwardRef<HTMLDivElement, EmptyCardProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex flex-col rounded-xl border border-border-default bg-card p-6 text-card-foreground transition-all hover:shadow-xs',\n className,\n )}\n {...props}\n />\n ),\n);\nEmptyCard.displayName = 'EmptyCard';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, EmptyCard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AoB;GAAE,SAD1C,QAAM,WAAW,mBACyB;GAAS;EAAU,CAAC,CAAC;EAAG,GAAI;CAAQ,CAAA;AAChG,CACF;AACA,YAAY,cAAc;AAE1B,IAAM,qBAAqB,IAAI,4BAA4B;CACzD,UAAU,EACR,SAAS;EACP,SAAS;EACT,OAAO;CACT,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC;AAED,IAAM,aAAa,QAAM,YACtB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAEhC,OACE,oBAAC,OAAD;EAAK,WAAU;YACb,oBAAC,OAAD;GAAU;GAAK,WAAW,GAAG,mBAAmB;IAAE,SAHtC,QAAM,WAAW,mBAGqB;IAAS;GAAU,CAAC,CAAC;GAAG,GAAI;EAAQ,CAAA;CACnF,CAAA;AAET,CACF;AACA,WAAW,cAAc;AAKzB,IAAM,YAAY,QAAM,YACrB,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,OAAD;CACO;CACL,WAAW,GACT,yHACA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,UAAU,cAAc"}
1
+ {"version":3,"file":"card.js","names":[],"sources":["../../../src/components/ui/card.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cardVariants } from '@/components/ui/card-variants';\nimport { cn } from '@/lib/utils';\nimport { cva } from 'class-variance-authority';\n\ntype CardsVariant = 'outline' | 'plain';\nconst CardsVariantContext = React.createContext<CardsVariant>('outline');\n\nexport interface CardProps extends React.ComponentPropsWithoutRef<'div'> {\n variant?: CardsVariant;\n}\n\nconst Card = React.forwardRef<HTMLDivElement, CardProps>(\n ({ variant = 'outline', className, ...props }, ref) => (\n <CardsVariantContext.Provider value={variant}>\n <div ref={ref} className={cn(cardVariants({ variant, className }))} {...props} />\n </CardsVariantContext.Provider>\n ),\n);\nCard.displayName = 'Card';\n\nconst cardHeaderVariants = cva('flex flex-col gap-y-1.5', {\n variants: {\n variant: {\n outline: 'p-6',\n plain: 'border-b border-border-default py-5',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(CardsVariantContext);\n return <div ref={ref} className={cn(cardHeaderVariants({ variant, className }))} {...props} />;\n },\n);\nCardHeader.displayName = 'CardHeader';\n\nconst CardTitle = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn('leading-none font-semibold tracking-tight', className)}\n {...props}\n />\n ),\n);\nCardTitle.displayName = 'CardTitle';\n\nconst CardDescription = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn('text-sm text-muted-foreground', className)} {...props} />\n ),\n);\nCardDescription.displayName = 'CardDescription';\n\nconst cardContentVariants = cva('', {\n variants: {\n variant: {\n outline: 'p-6 pt-0',\n plain: 'border-b border-border-default',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(CardsVariantContext);\n return <div ref={ref} className={cn(cardContentVariants({ variant, className }))} {...props} />;\n },\n);\nCardContent.displayName = 'CardContent';\n\nconst cardFooterVariants = cva('flex w-full items-center', {\n variants: {\n variant: {\n outline: 'p-6 pt-0',\n plain: 'py-5',\n },\n },\n defaultVariants: {\n variant: 'outline',\n },\n});\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => {\n const variant = React.useContext(CardsVariantContext);\n return (\n <div className=\"flex grow items-end\">\n <div ref={ref} className={cn(cardFooterVariants({ variant, className }))} {...props} />\n </div>\n );\n },\n);\nCardFooter.displayName = 'CardFooter';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface EmptyCardProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst EmptyCard = React.forwardRef<HTMLDivElement, EmptyCardProps>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\n 'flex flex-col rounded-card border border-border-default bg-card p-6 text-card-foreground transition-all hover:shadow-xs',\n className,\n )}\n {...props}\n />\n ),\n);\nEmptyCard.displayName = 'EmptyCard';\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent, EmptyCard };\n"],"mappings":";;;;;;AAMA,IAAM,sBAAsB,QAAM,cAA4B,SAAS;AAMvE,IAAM,OAAO,QAAM,YAChB,EAAE,UAAU,WAAW,WAAW,GAAG,SAAS,QAC7C,oBAAC,oBAAoB,UAArB;CAA8B,OAAO;WACnC,oBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,aAAa;GAAE;GAAS;EAAU,CAAC,CAAC;EAAG,GAAI;CAAQ,CAAA;AACpD,CAAA,CAElC;AACA,KAAK,cAAc;AAEnB,IAAM,qBAAqB,IAAI,2BAA2B;CACxD,UAAU,EACR,SAAS;EACP,SAAS;EACT,OAAO;CACT,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC;AAED,IAAM,aAAa,QAAM,YACtB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAEhC,OAAO,oBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,mBAAmB;GAAE,SADzC,QAAM,WAAW,mBACwB;GAAS;EAAU,CAAC,CAAC;EAAG,GAAI;CAAQ,CAAA;AAC/F,CACF;AACA,WAAW,cAAc;AAEzB,IAAM,YAAY,QAAM,YACrB,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,OAAD;CACO;CACL,WAAW,GAAG,6CAA6C,SAAS;CACpE,GAAI;AACL,CAAA,CAEL;AACA,UAAU,cAAc;AAExB,IAAM,kBAAkB,QAAM,YAC3B,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,OAAD;CAAU;CAAK,WAAW,GAAG,iCAAiC,SAAS;CAAG,GAAI;AAAQ,CAAA,CAE1F;AACA,gBAAgB,cAAc;AAE9B,IAAM,sBAAsB,IAAI,IAAI;CAClC,UAAU,EACR,SAAS;EACP,SAAS;EACT,OAAO;CACT,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC;AAED,IAAM,cAAc,QAAM,YACvB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAEhC,OAAO,oBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,oBAAoB;GAAE,SAD1C,QAAM,WAAW,mBACyB;GAAS;EAAU,CAAC,CAAC;EAAG,GAAI;CAAQ,CAAA;AAChG,CACF;AACA,YAAY,cAAc;AAE1B,IAAM,qBAAqB,IAAI,4BAA4B;CACzD,UAAU,EACR,SAAS;EACP,SAAS;EACT,OAAO;CACT,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CAAC;AAED,IAAM,aAAa,QAAM,YACtB,EAAE,WAAW,GAAG,SAAS,QAAQ;CAEhC,OACE,oBAAC,OAAD;EAAK,WAAU;YACb,oBAAC,OAAD;GAAU;GAAK,WAAW,GAAG,mBAAmB;IAAE,SAHtC,QAAM,WAAW,mBAGqB;IAAS;GAAU,CAAC,CAAC;GAAG,GAAI;EAAQ,CAAA;CACnF,CAAA;AAET,CACF;AACA,WAAW,cAAc;AAKzB,IAAM,YAAY,QAAM,YACrB,EAAE,WAAW,GAAG,SAAS,QACxB,oBAAC,OAAD;CACO;CACL,WAAW,GACT,2HACA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,UAAU,cAAc"}
@@ -1,4 +1,4 @@
1
- import { cn, formatDisplayDate, formatDisplayDateWithRange } from "../../lib/ds-utils.js";
1
+ import { cn } from "../../lib/ds-utils.js";
2
2
  import * as RechartsPrimitive from "recharts";
3
3
  import * as React$1 from "react";
4
4
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
@@ -155,34 +155,7 @@ var AlignedAxisTick = ({ x, y, payload, index, textAnchor = index === 0 ? "start
155
155
  })
156
156
  });
157
157
  };
158
- var DateTooltipContent = ({ color, active, payload, range }) => {
159
- if (!active || !payload?.length) return null;
160
- const { date, formattedValue, label } = payload[0].payload;
161
- const displayValue = formattedValue || payload[0].value;
162
- return /* @__PURE__ */ jsxs("div", {
163
- className: "min-w-[120px] rounded-lg border bg-background px-3 py-2 shadow-lg",
164
- children: [date && /* @__PURE__ */ jsx("div", {
165
- className: "text-sm text-foreground",
166
- children: range ? formatDisplayDateWithRange(date, range) : formatDisplayDate(date)
167
- }), /* @__PURE__ */ jsxs("div", {
168
- className: "flex items-center gap-2",
169
- children: [/* @__PURE__ */ jsx("span", {
170
- className: "inline-block size-[9px] rounded-[2px] opacity-50",
171
- style: { backgroundColor: color || "var(--chart-blue)" }
172
- }), /* @__PURE__ */ jsxs("div", {
173
- className: "flex grow items-center justify-between gap-3",
174
- children: [label && /* @__PURE__ */ jsx("div", {
175
- className: "text-sm text-muted-foreground",
176
- children: label
177
- }), /* @__PURE__ */ jsx("div", {
178
- className: "font-mono font-medium",
179
- children: displayValue
180
- })]
181
- })]
182
- })]
183
- });
184
- };
185
158
  //#endregion
186
- export { AlignedAxisTick, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, DateTooltipContent, DateTooltipContent as default };
159
+ export { AlignedAxisTick, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
187
160
 
188
161
  //# sourceMappingURL=chart.js.map