@gaulatti/bleecker 0.1.35 → 0.1.37

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 (122) hide show
  1. package/README.md +75 -0
  2. package/dist/components/accordion.js +3 -2
  3. package/dist/components/activity-item.js +1 -1
  4. package/dist/components/alert-dialog.js +24 -11
  5. package/dist/components/alert.d.ts +2 -1
  6. package/dist/components/alert.js +11 -10
  7. package/dist/components/avatar.d.ts +2 -1
  8. package/dist/components/avatar.js +1 -0
  9. package/dist/components/bauhaus-background.js +1 -1
  10. package/dist/components/brand-lockup.d.ts +1 -1
  11. package/dist/components/brand-lockup.js +3 -3
  12. package/dist/components/breadcrumb.js +3 -2
  13. package/dist/components/button.d.ts +3 -5
  14. package/dist/components/button.js +17 -12
  15. package/dist/components/card.d.ts +5 -1
  16. package/dist/components/card.js +3 -2
  17. package/dist/components/checkbox.js +1 -1
  18. package/dist/components/collection-filters.d.ts +2 -1
  19. package/dist/components/collection-filters.js +40 -7
  20. package/dist/components/command-spotlight.js +10 -5
  21. package/dist/components/context-menu.js +2 -2
  22. package/dist/components/dashboard-section.js +1 -1
  23. package/dist/components/data-list.js +1 -1
  24. package/dist/components/data-table-column-toggle.js +8 -20
  25. package/dist/components/data-table.js +2 -1
  26. package/dist/components/date-picker.d.ts +3 -1
  27. package/dist/components/date-picker.js +11 -29
  28. package/dist/components/date-range-picker.d.ts +3 -3
  29. package/dist/components/date-range-picker.js +24 -9
  30. package/dist/components/dialog-close-button.js +2 -2
  31. package/dist/components/donut-chart.js +1 -1
  32. package/dist/components/drawer.js +8 -22
  33. package/dist/components/dropdown-menu.js +7 -7
  34. package/dist/components/empty.js +1 -1
  35. package/dist/components/error-state.js +1 -1
  36. package/dist/components/feed-item.js +1 -1
  37. package/dist/components/field-help-tooltip.js +1 -1
  38. package/dist/components/field.d.ts +17 -0
  39. package/dist/components/field.js +16 -0
  40. package/dist/components/file-input.js +1 -1
  41. package/dist/components/filter-chip.js +2 -2
  42. package/dist/components/header-select.d.ts +13 -2
  43. package/dist/components/header-select.js +7 -3
  44. package/dist/components/hero-carousel.js +3 -2
  45. package/dist/components/hover-card.js +1 -1
  46. package/dist/components/icon-badge.d.ts +5 -2
  47. package/dist/components/icon-badge.js +2 -2
  48. package/dist/components/icon-button.d.ts +4 -0
  49. package/dist/components/icon-button.js +3 -2
  50. package/dist/components/input.d.ts +2 -3
  51. package/dist/components/input.js +5 -5
  52. package/dist/components/label.js +1 -1
  53. package/dist/components/loading-overlay.js +1 -1
  54. package/dist/components/loading-spinner.d.ts +3 -1
  55. package/dist/components/media-library.js +5 -3
  56. package/dist/components/menubar.js +17 -7
  57. package/dist/components/metric.d.ts +2 -2
  58. package/dist/components/metric.js +1 -0
  59. package/dist/components/modal.js +53 -13
  60. package/dist/components/navigation-menu.js +15 -5
  61. package/dist/components/notification-badge.js +1 -1
  62. package/dist/components/otp-input.js +2 -1
  63. package/dist/components/page-header.js +1 -1
  64. package/dist/components/pagination.js +3 -3
  65. package/dist/components/panel.js +1 -1
  66. package/dist/components/popover.d.ts +3 -2
  67. package/dist/components/popover.js +4 -91
  68. package/dist/components/progress.d.ts +4 -2
  69. package/dist/components/progress.js +3 -3
  70. package/dist/components/radio-group.d.ts +3 -1
  71. package/dist/components/radio-group.js +2 -2
  72. package/dist/components/sankey-chart.js +1 -0
  73. package/dist/components/search-input.js +1 -1
  74. package/dist/components/section-header.js +1 -1
  75. package/dist/components/select.d.ts +12 -1
  76. package/dist/components/select.js +13 -64
  77. package/dist/components/sheet.js +8 -24
  78. package/dist/components/sidebar.js +4 -3
  79. package/dist/components/slider.js +2 -2
  80. package/dist/components/sonner.js +3 -2
  81. package/dist/components/stat-card.js +1 -1
  82. package/dist/components/status-badge.d.ts +2 -1
  83. package/dist/components/status-badge.js +5 -6
  84. package/dist/components/stepper.js +2 -2
  85. package/dist/components/sunburst-chart.js +1 -0
  86. package/dist/components/switch.js +1 -1
  87. package/dist/components/table.js +10 -8
  88. package/dist/components/tabs.d.ts +6 -1
  89. package/dist/components/tabs.js +30 -7
  90. package/dist/components/textarea.d.ts +2 -3
  91. package/dist/components/textarea.js +2 -2
  92. package/dist/components/theme-toggle.js +1 -0
  93. package/dist/components/timeline.js +1 -1
  94. package/dist/components/toggle-group.js +2 -1
  95. package/dist/components/toggle.d.ts +4 -2
  96. package/dist/components/toggle.js +1 -1
  97. package/dist/components/tooltip.d.ts +2 -1
  98. package/dist/components/tooltip.js +3 -21
  99. package/dist/core/contracts.d.ts +48 -0
  100. package/dist/core/contracts.js +23 -0
  101. package/dist/core/index.d.ts +2 -0
  102. package/dist/core/index.js +2 -0
  103. package/dist/index.d.ts +3 -0
  104. package/dist/index.js +3 -0
  105. package/dist/layout/admin-shell.js +1 -1
  106. package/dist/layout/app-shell.js +1 -1
  107. package/dist/layout/footer.js +4 -4
  108. package/dist/layout/header.js +2 -1
  109. package/dist/styles.css +1 -1
  110. package/dist/theme/theme-provider.js +1 -0
  111. package/dist/theme/theme-script.d.ts +1 -2
  112. package/dist/theme/theme-script.js +1 -3
  113. package/dist/theme/types.d.ts +2 -1
  114. package/dist/tokens/index.d.ts +1 -0
  115. package/dist/tokens/index.js +1 -0
  116. package/dist/tokens/source.d.ts +221 -0
  117. package/dist/tokens/source.js +140 -0
  118. package/dist/utils/hooks.d.ts +14 -0
  119. package/dist/utils/hooks.js +101 -0
  120. package/package.json +41 -7
  121. package/src/styles/global.css +82 -175
  122. package/src/styles/tokens.generated.css +171 -0
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { ChevronLeft, ChevronRight } from 'lucide-react';
3
4
  import React from 'react';
@@ -73,6 +74,6 @@ export function HeroCarousel({ autoAdvanceMs = 5000, className, defaultBackgroun
73
74
  item,
74
75
  ariaLabel: getAriaLabel(item),
75
76
  className: 'group flex h-full items-center pb-8 pt-16',
76
- children: (_jsx("div", { className: 'mx-auto max-w-3xl px-4 text-center', children: _jsxs("div", { className: 'text-shadow-lg relative z-10 px-2 sm:px-6', children: [_jsxs("div", { className: 'flex flex-col items-center opacity-75', children: [_jsx("span", { className: 'text-sm font-light uppercase tracking-widest light:text-white', children: getKicker(item) }), _jsx("div", { className: 'mb-6 mt-4 h-px w-12 bg-white/30' })] }), item.kind === 'project' && item.tags?.length ? (_jsx("div", { className: 'mb-4 space-x-2', children: item.tags.map((tag) => (_jsx("span", { className: 'inline-block rounded-full border border-white/10 bg-white/15 px-3 py-1 text-sm backdrop-blur-sm light:text-white', children: tag }, `${item.id ?? item.href}:${tag}`))) })) : null, _jsx("h1", { className: 'mb-4 text-3xl font-bold text-balance transition-colors drop-shadow-[0_0_14px_rgba(0,0,0,0.5)] group-hover:text-white/90 light:text-white sm:text-4xl lg:text-5xl', children: item.title }), _jsx("p", { className: 'mb-6 text-base text-gray-100 transition-colors drop-shadow-[0_0_10px_rgba(0,0,0,0.45)] group-hover:text-gray-200 sm:text-lg', children: item.description }), _jsx("div", { className: 'inline-block rounded-full border px-6 py-2 font-medium transition-colors backdrop-blur-sm light:border-white/20 light:bg-white/90 light:text-gray-900 light:group-hover:bg-white dark:border-sand/35 dark:bg-sand/90 dark:text-text-primary dark:group-hover:bg-dark-sand/90', children: getCtaLabel(item) })] }) }))
77
- }) })] }, item.id ?? `${item.title}:${item.href}`))), showNavigation ? (_jsxs("div", { className: 'absolute bottom-8 left-4 right-4 flex items-center justify-between', children: [_jsx(IconButton, { className: 'border-0 bg-black/20 p-2 text-white/75 shadow-none backdrop-blur-sm hover:translate-y-0 hover:scale-100 hover:bg-black/30 hover:text-white dark:bg-black/20 dark:hover:bg-black/30', "data-carousel-prev": true, "aria-label": 'Previous slide', onClick: () => setCurrentSlide((previous) => (previous - 1 + items.length) % items.length), type: 'button', children: _jsx(ChevronLeft, { size: 20 }) }), showIndicators ? (_jsx("div", { className: 'flex gap-2 rounded-full bg-black/20 p-2 backdrop-blur-sm', children: items.map((item, index) => (_jsxs("button", { className: cn('relative flex h-10 w-10 touch-manipulation items-center justify-center', index === currentSlide && 'active'), "data-dot": index, "aria-label": `Go to slide ${index + 1}`, onClick: () => setCurrentSlide(index), type: 'button', children: [_jsx("span", { className: 'dot-indicator block h-2 w-2 rounded-full bg-white/50 transition-colors' }), _jsxs("span", { className: 'sr-only', children: ["Slide ", index + 1] })] }, `dot:${item.id ?? `${item.title}:${item.href}`}`))) })) : null, _jsx(IconButton, { className: 'border-0 bg-black/20 p-2 text-white/75 shadow-none backdrop-blur-sm hover:translate-y-0 hover:scale-100 hover:bg-black/30 hover:text-white dark:bg-black/20 dark:hover:bg-black/30', "data-carousel-next": true, "aria-label": 'Next slide', onClick: () => setCurrentSlide((previous) => (previous + 1) % items.length), type: 'button', children: _jsx(ChevronRight, { size: 20 }) })] })) : null] }) }));
77
+ children: (_jsx("div", { className: 'mx-auto max-w-3xl px-4 text-center', children: _jsxs("div", { className: 'text-shadow-lg relative z-10 px-2 sm:px-6', children: [_jsxs("div", { className: 'flex flex-col items-center opacity-75', children: [_jsx("span", { className: 'text-sm font-light uppercase tracking-widest light:text-white', children: getKicker(item) }), _jsx("div", { className: 'mb-6 mt-4 h-px w-12 bg-white/30' })] }), item.kind === 'project' && item.tags?.length ? (_jsx("div", { className: 'mb-4 space-x-2', children: item.tags.map((tag) => (_jsx("span", { className: 'inline-block rounded-[6px] border border-white/15 bg-black/15 px-2.5 py-1 text-[12px] font-medium backdrop-blur-[2px] light:text-white', children: tag }, `${item.id ?? item.href}:${tag}`))) })) : null, _jsx("h1", { className: 'mb-4 text-3xl font-semibold text-balance transition-colors duration-[var(--motion-surface)] ease-premium drop-shadow-[0_2px_8px_rgba(0,0,0,0.35)] group-hover:text-white/90 light:text-white sm:text-4xl lg:text-5xl', children: item.title }), _jsx("p", { className: 'mb-6 text-base text-gray-100 transition-colors duration-[var(--motion-surface)] ease-premium drop-shadow-[0_0_10px_rgba(0,0,0,0.45)] group-hover:text-gray-200 sm:text-lg', children: item.description }), _jsx("div", { className: 'inline-block rounded-[var(--radius-button)] border px-5 py-2.5 text-sm font-medium transition-colors duration-[var(--motion-surface)] ease-premium backdrop-blur-[2px] light:border-white/25 light:bg-white/92 light:text-gray-900 light:group-hover:bg-white dark:border-sand/35 dark:bg-sand/90 dark:text-text-primary dark:group-hover:bg-dark-sand/90', children: getCtaLabel(item) })] }) }))
78
+ }) })] }, item.id ?? `${item.title}:${item.href}`))), showNavigation ? (_jsxs("div", { className: 'absolute bottom-8 left-4 right-4 flex items-center justify-between', children: [_jsx(IconButton, { className: 'border-white/15 bg-black/20 text-white/80 shadow-none backdrop-blur-[2px] hover:border-white/25 hover:bg-black/30 hover:text-white dark:bg-black/20 dark:hover:bg-black/30', "data-carousel-prev": true, "aria-label": 'Previous slide', onClick: () => setCurrentSlide((previous) => (previous - 1 + items.length) % items.length), type: 'button', children: _jsx(ChevronLeft, { size: 20 }) }), showIndicators ? (_jsx("div", { className: 'flex gap-1 rounded-[var(--radius-ui)] border border-white/10 bg-black/20 p-1 backdrop-blur-[2px]', children: items.map((item, index) => (_jsxs("button", { className: cn('relative flex h-10 w-10 touch-manipulation items-center justify-center', index === currentSlide && 'active'), "data-dot": index, "aria-label": `Go to slide ${index + 1}`, onClick: () => setCurrentSlide(index), type: 'button', children: [_jsx("span", { className: 'dot-indicator block h-2 w-2 rounded-full bg-white/50 transition-[background-color,transform] duration-[var(--motion-control)] ease-premium' }), _jsxs("span", { className: 'sr-only', children: ["Slide ", index + 1] })] }, `dot:${item.id ?? `${item.title}:${item.href}`}`))) })) : null, _jsx(IconButton, { className: 'border-white/15 bg-black/20 text-white/80 shadow-none backdrop-blur-[2px] hover:border-white/25 hover:bg-black/30 hover:text-white dark:bg-black/20 dark:hover:bg-black/30', "data-carousel-next": true, "aria-label": 'Next slide', onClick: () => setCurrentSlide((previous) => (previous + 1) % items.length), type: 'button', children: _jsx(ChevronRight, { size: 20 }) })] })) : null] }) }));
78
79
  }
@@ -5,5 +5,5 @@ import { cn } from '../utils/cn.js';
5
5
  * Pure CSS approach — no portal needed.
6
6
  */
7
7
  export function HoverCard({ children, className, content, side = 'bottom' }) {
8
- return (_jsxs("span", { className: 'group relative inline-flex', children: [children, _jsx("span", { className: cn('pointer-events-none absolute z-50 w-72 rounded-2xl border border-sand/10 bg-white p-4 shadow-xl opacity-0 transition-all duration-200 group-hover:pointer-events-auto group-hover:opacity-100 dark:border-sand/20 dark:bg-dark-sand', side === 'bottom' ? 'top-full left-1/2 mt-2 -translate-x-1/2 group-hover:translate-y-0' : 'bottom-full left-1/2 mb-2 -translate-x-1/2', className), role: 'tooltip', children: content })] }));
8
+ return (_jsxs("span", { className: 'group relative inline-flex', children: [children, _jsx("span", { className: cn('pointer-events-none absolute z-50 w-72 rounded-[var(--radius-card)] border border-sand/30 bg-white p-4 opacity-0 shadow-[var(--shadow-overlay)] transition-[opacity,transform] duration-[var(--motion-surface)] ease-premium group-hover:pointer-events-auto group-hover:opacity-100 dark:border-white/12 dark:bg-deep-sea', side === 'bottom' ? 'left-1/2 top-full mt-2 -translate-x-1/2 translate-y-1 group-hover:translate-y-0' : 'bottom-full left-1/2 mb-2 -translate-x-1/2 -translate-y-1 group-hover:translate-y-0', className), role: 'tooltip', children: content })] }));
9
9
  }
@@ -1,5 +1,8 @@
1
1
  import React from 'react';
2
+ import type { IconBadgeSize, IconBadgeVariant } from '../core';
3
+ export type { IconBadgeSize, IconBadgeVariant } from '../core';
2
4
  export interface IconBadgeProps extends React.HTMLAttributes<HTMLDivElement> {
3
- size?: 'md' | 'lg';
5
+ size?: IconBadgeSize;
6
+ variant?: IconBadgeVariant;
4
7
  }
5
- export declare function IconBadge({ children, className, size, ...props }: IconBadgeProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function IconBadge({ children, className, size, variant, ...props }: IconBadgeProps): import("react/jsx-runtime").JSX.Element;
@@ -4,6 +4,6 @@ const sizeClassNames = {
4
4
  md: 'h-14 w-14',
5
5
  lg: 'h-16 w-16'
6
6
  };
7
- export function IconBadge({ children, className, size = 'lg', ...props }) {
8
- return (_jsx("div", { className: cn('flex items-center justify-center bg-black text-white dark:bg-white dark:text-black', sizeClassNames[size], className), ...props, children: children }));
7
+ export function IconBadge({ children, className, size = 'lg', variant = 'primary', ...props }) {
8
+ return (_jsx("div", { className: cn('flex items-center justify-center rounded-[10px] border', sizeClassNames[size], variant === 'primary' && 'border-deep-sea bg-deep-sea text-white dark:border-accent-blue dark:bg-accent-blue dark:text-deep-sea', variant === 'subtle' && 'border-sea/10 bg-sea/[0.06] text-sea dark:border-accent-blue/15 dark:bg-accent-blue/10 dark:text-accent-blue', variant === 'outlined' && 'border-sand/40 bg-white text-text-primary dark:border-white/15 dark:bg-deep-sea dark:text-text-primary', className), ...props, children: children }));
9
9
  }
@@ -1,4 +1,8 @@
1
1
  import React from 'react';
2
+ import type { IconButtonSize, IconButtonVariant } from '../core';
3
+ export type { IconButtonSize, IconButtonVariant } from '../core';
2
4
  export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
+ size?: IconButtonSize;
6
+ variant?: IconButtonVariant;
3
7
  }
4
8
  export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { cn } from '../utils/cn.js';
4
- export const IconButton = React.forwardRef(function IconButton({ className, type = 'button', ...props }, ref) {
5
- return (_jsx("button", { ref: ref, type: type, className: cn('inline-flex items-center justify-center rounded-full p-2.5 border border-sand/20 dark:border-sand/70 bg-white/35 dark:bg-sand/25 backdrop-blur-md shadow-sm transition-all duration-400 hover:-translate-y-0.5 hover:scale-105 hover:bg-white/55 dark:hover:bg-sand/35 focus:outline-none focus-visible:ring-2 focus-visible:ring-sea focus-visible:ring-offset-2 focus-visible:ring-offset-white dark:focus-visible:ring-accent-blue dark:focus-visible:ring-offset-dark-sand', className), ...props }));
4
+ const sizes = { sm: 'h-8 w-8', md: 'h-10 w-10', lg: 'h-11 w-11' };
5
+ export const IconButton = React.forwardRef(function IconButton({ className, size = 'md', type = 'button', variant = 'default', ...props }, ref) {
6
+ return (_jsx("button", { ref: ref, type: type, className: cn('inline-flex shrink-0 translate-y-0 scale-100 items-center justify-center rounded-[var(--radius-button)] border text-text-primary transition-[background-color,border-color,color,box-shadow,transform,opacity] duration-[var(--motion-control)] ease-premium active:translate-y-px active:scale-[0.97] active:shadow-none focus:outline-none focus-visible:ring-2 focus-visible:ring-sea/30 focus-visible:ring-offset-2 focus-visible:ring-offset-white disabled:pointer-events-none disabled:transform-none disabled:opacity-45 dark:text-text-primary dark:focus-visible:ring-accent-blue/40 dark:focus-visible:ring-offset-deep-sea', sizes[size], variant === 'default' && 'border-sand/35 bg-white shadow-[0_1px_2px_rgba(26,55,77,0.025)] hover:border-sand/65 hover:bg-light-sand/45 hover:shadow-[0_3px_9px_-6px_rgba(26,55,77,0.28)] dark:border-white/15 dark:bg-deep-sea dark:hover:bg-white/[0.06]', variant === 'subtle' && 'border-transparent bg-light-sand/75 hover:bg-sand/25 dark:bg-white/[0.07] dark:hover:bg-white/[0.11]', variant === 'ghost' && 'border-transparent bg-transparent hover:bg-sand/12 dark:hover:bg-white/[0.06]', className), ...props }));
6
7
  });
@@ -1,10 +1,9 @@
1
1
  import React from 'react';
2
- type InputSize = 'sm' | 'md' | 'lg';
2
+ import type { ControlSize } from '../core';
3
3
  export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
4
4
  endIcon?: React.ReactNode;
5
5
  error?: boolean;
6
- inputSize?: InputSize;
6
+ inputSize?: ControlSize;
7
7
  startIcon?: React.ReactNode;
8
8
  }
9
9
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
10
- export {};
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { cn } from '../utils/cn.js';
4
4
  const sizeClasses = {
5
- sm: 'min-h-9 px-3 py-2 text-sm',
6
- md: 'min-h-11 px-4 py-2.5 text-sm',
7
- lg: 'min-h-12 px-4 py-3 text-base'
5
+ sm: 'h-9 px-3 text-[13px]',
6
+ md: 'h-10 px-3.5 text-sm',
7
+ lg: 'h-11 px-4 text-[15px]'
8
8
  };
9
- export const Input = React.forwardRef(function Input({ className, endIcon, error = false, inputSize = 'md', startIcon, type = 'text', ...props }, ref) {
10
- return (_jsxs("div", { className: 'relative w-full', children: [startIcon ? (_jsx("div", { className: 'pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-secondary dark:text-text-secondary', children: startIcon })) : null, _jsx("input", { ref: ref, type: type, className: cn('w-full rounded-[var(--radius-ui)] border-0 ring-1 ring-inset ring-black/10 bg-light-sand/50 text-text-primary shadow-[inset_0_1px_2px_rgba(0,0,0,0.02)] outline-none transition-all duration-200 placeholder:text-text-secondary/60 hover:bg-white hover:ring-black/20 focus:bg-white focus:ring-2 focus:ring-inset focus:ring-sea disabled:cursor-not-allowed disabled:opacity-50 dark:bg-deep-sea/50 dark:text-text-primary dark:ring-white/10 dark:placeholder:text-text-secondary dark:hover:bg-deep-sea dark:focus:ring-accent-blue', error ? 'ring-terracotta/50 focus:ring-terracotta dark:ring-terracotta/50' : '', startIcon ? 'pl-10' : sizeClasses[inputSize], startIcon && inputSize === 'sm' && 'min-h-9 py-2 pr-3 text-sm', startIcon && inputSize === 'md' && 'min-h-11 py-2.5 pr-4 text-sm', startIcon && inputSize === 'lg' && 'min-h-12 py-3 pr-4 text-base', endIcon ? 'pr-10' : undefined, className), ...props }), endIcon ? (_jsx("div", { className: 'pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-text-secondary dark:text-text-secondary', children: endIcon })) : null] }));
9
+ export const Input = React.forwardRef(function Input({ 'aria-invalid': ariaInvalid, className, endIcon, error = false, inputSize = 'md', startIcon, type = 'text', ...props }, ref) {
10
+ return (_jsxs("div", { className: 'relative w-full', children: [startIcon ? (_jsx("div", { className: 'pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-secondary dark:text-text-secondary', children: startIcon })) : null, _jsx("input", { ref: ref, type: type, "aria-invalid": ariaInvalid ?? (error || undefined), className: cn('w-full rounded-[var(--radius-ui)] border border-sand/40 bg-white text-text-primary shadow-[0_1px_2px_rgba(26,55,77,0.025)] outline-none transition-[background-color,border-color,box-shadow,opacity] duration-[var(--motion-control)] ease-premium placeholder:text-text-secondary/55 hover:border-sand/70 hover:shadow-[0_3px_10px_-8px_rgba(26,55,77,0.25)] focus:border-sea/70 focus:ring-2 focus:ring-sea/10 disabled:cursor-not-allowed disabled:bg-light-sand/65 disabled:opacity-60 dark:border-white/15 dark:bg-deep-sea dark:text-text-primary dark:placeholder:text-text-secondary dark:hover:border-white/25 dark:focus:border-accent-blue dark:focus:ring-accent-blue/12 [&::-webkit-search-cancel-button]:appearance-none', error ? 'border-terracotta focus:border-terracotta focus:ring-terracotta/15 dark:border-terracotta' : '', startIcon ? 'pl-10' : sizeClasses[inputSize], startIcon && inputSize === 'sm' && 'h-9 pr-3 text-[13px]', startIcon && inputSize === 'md' && 'h-10 pr-3.5 text-sm', startIcon && inputSize === 'lg' && 'h-11 pr-4 text-[15px]', endIcon ? 'pr-10' : undefined, className), ...props }), endIcon ? (_jsx("div", { className: 'pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-text-secondary dark:text-text-secondary', children: endIcon })) : null] }));
11
11
  });
@@ -2,6 +2,6 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as React from 'react';
3
3
  import * as LabelPrimitive from '@radix-ui/react-label';
4
4
  import { cn } from '../utils/cn.js';
5
- const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 text-text-primary dark:text-text-primary', className), ...props })));
5
+ const Label = React.forwardRef(({ className, ...props }, ref) => (_jsx(LabelPrimitive.Root, { ref: ref, className: cn('text-[13px] font-medium leading-none tracking-ui text-text-primary peer-disabled:cursor-not-allowed peer-disabled:opacity-60 dark:text-text-primary', className), ...props })));
6
6
  Label.displayName = LabelPrimitive.Root.displayName;
7
7
  export { Label };
@@ -5,5 +5,5 @@ import { LoadingSpinner } from './loading-spinner.js';
5
5
  export function LoadingOverlay({ visible, label = 'Loading...', className, overlayClassName }) {
6
6
  if (!visible || typeof document === 'undefined')
7
7
  return null;
8
- return createPortal(_jsx("div", { className: cn('fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm', overlayClassName), children: _jsxs("div", { className: cn('flex flex-col items-center gap-3 rounded-[var(--radius-card)] bg-card p-6 shadow-lg ring-1 ring-border', className), children: [_jsx(LoadingSpinner, { size: 'lg' }), label && _jsx("p", { className: 'text-sm font-medium text-text-primary dark:text-text-primary', children: label })] }) }), document.body);
8
+ return createPortal(_jsx("div", { className: cn('fixed inset-0 z-50 flex items-center justify-center bg-background/72 backdrop-blur-[2px]', overlayClassName), children: _jsxs("div", { className: cn('flex flex-col items-center gap-3 rounded-[var(--radius-card)] border border-sand/25 bg-card px-7 py-6 shadow-[var(--shadow-overlay)] dark:border-white/10', className), children: [_jsx(LoadingSpinner, { size: 'lg' }), label && _jsx("p", { className: 'text-sm font-medium text-text-primary dark:text-text-primary', children: label })] }) }), document.body);
9
9
  }
@@ -1,5 +1,7 @@
1
+ import type { LoadingSize } from '../core';
2
+ export type { LoadingSize } from '../core';
1
3
  export interface LoadingSpinnerProps {
2
4
  className?: string;
3
- size?: 'sm' | 'md' | 'lg';
5
+ size?: LoadingSize;
4
6
  }
5
7
  export declare function LoadingSpinner({ className, size }: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,10 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Copy, Search, Trash2 } from 'lucide-react';
3
+ import { Copy, Trash2 } from 'lucide-react';
3
4
  import React from 'react';
4
5
  import { IconButton } from './icon-button.js';
5
6
  import { Modal } from './modal.js';
7
+ import { SearchInput } from './search-input.js';
6
8
  import { cn } from '../utils/cn.js';
7
9
  export function MediaLibrary({ actions, className, emptyMessage = 'No media found.', filterSlot, items, onCopy, onDelete, onSearchTermChange, searchPlaceholder = 'Search media...', searchTerm, title }) {
8
10
  const [selectedMedia, setSelectedMedia] = React.useState(null);
@@ -15,8 +17,8 @@ export function MediaLibrary({ actions, className, emptyMessage = 'No media foun
15
17
  void navigator.clipboard.writeText(text);
16
18
  }
17
19
  };
18
- return (_jsxs("div", { className: cn('p-4 md:p-8', className), children: [_jsxs("div", { className: 'mb-8 flex flex-col gap-4 md:flex-row md:items-center md:justify-between', children: [_jsx("h1", { className: 'text-3xl font-bold text-text-primary dark:text-text-primary', children: title }), actions] }), _jsxs("div", { className: 'mb-6 flex flex-col gap-4 md:flex-row', children: [_jsxs("div", { className: 'relative flex-1', children: [_jsx(Search, { size: 20, className: 'absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary' }), _jsx("input", { type: 'text', placeholder: searchPlaceholder, value: searchTerm, onChange: (event) => onSearchTermChange(event.target.value), className: 'w-full rounded-lg border border-sand/30 bg-white py-2 pl-10 pr-4 text-text-primary outline-none focus:ring-2 focus:ring-sea dark:border-sand/50 dark:bg-sand/10 dark:text-text-primary dark:focus:ring-accent-blue' })] }), filterSlot ? _jsx("div", { className: 'md:w-64', children: filterSlot }) : null] }), _jsx("div", { className: 'grid grid-cols-2 gap-6 md:grid-cols-4 lg:grid-cols-5', children: items.map((media) => (_jsxs("div", { className: 'group relative aspect-square cursor-pointer overflow-hidden rounded-xl border border-sand/10 bg-white dark:border-sand/20 dark:bg-sand/10', onClick: () => setSelectedMedia(media), children: [media.thumbnailUrl || media.url ? (_jsx("img", { src: media.thumbnailUrl || media.url, alt: media.alt || media.filename, className: 'h-full w-full object-cover' })) : (_jsx("div", { className: 'flex h-full w-full items-center justify-center bg-gray-100 text-gray-400 dark:bg-gray-800', children: "No Preview" })), _jsxs("div", { className: 'absolute inset-0 flex flex-col justify-end bg-black/50 p-4 opacity-0 transition-opacity group-hover:opacity-100', children: [_jsx("p", { className: 'mb-2 truncate text-sm text-white', children: media.filename }), onDelete ? (_jsx(IconButton, { onClick: (event) => {
20
+ return (_jsxs("div", { className: cn('px-5 py-6 md:px-8 md:py-9', className), children: [_jsxs("div", { className: 'mb-8 flex flex-col gap-5 md:flex-row md:items-end md:justify-between', children: [_jsxs("div", { children: [_jsx("p", { className: 'mb-2 text-[10px] font-semibold uppercase tracking-[0.11em] text-desert', children: "Media collection" }), _jsx("h1", { className: 'text-[2rem] font-semibold leading-tight tracking-refined text-text-primary dark:text-text-primary', children: title })] }), actions] }), _jsxs("div", { className: 'mb-7 flex flex-col gap-3 md:flex-row', children: [_jsx("div", { className: 'flex-1', children: _jsx(SearchInput, { placeholder: searchPlaceholder, value: searchTerm, onChange: (event) => onSearchTermChange(event.target.value), onClear: () => onSearchTermChange('') }) }), filterSlot ? _jsx("div", { className: 'md:w-64', children: filterSlot }) : null] }), _jsx("div", { className: 'grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5', children: items.map((media) => (_jsxs("div", { className: 'group relative aspect-square overflow-hidden rounded-[var(--radius-ui)] border border-sand/30 bg-white shadow-[var(--shadow-surface)] transition-[border-color,box-shadow] duration-[var(--motion-surface)] ease-premium hover:border-sand/55 hover:shadow-[var(--shadow-raised)] focus-within:ring-2 focus-within:ring-sea/25 dark:border-white/10 dark:bg-deep-sea dark:hover:border-white/20', children: [_jsx("button", { type: 'button', className: 'absolute inset-0 z-10 cursor-pointer outline-none', onClick: () => setSelectedMedia(media), "aria-label": `Open ${media.filename}` }), media.thumbnailUrl || media.url ? (_jsx("img", { src: media.thumbnailUrl || media.url, alt: media.alt || media.filename, className: 'h-full w-full object-cover' })) : (_jsx("div", { className: 'font-secondary flex h-full w-full items-center justify-center bg-light-sand/60 text-xs text-text-secondary dark:bg-white/[0.04]', children: "No preview" })), _jsxs("div", { className: 'pointer-events-none absolute inset-x-0 bottom-0 flex translate-y-1 flex-col justify-end bg-deep-sea/82 p-3 opacity-0 backdrop-blur-[2px] transition-[opacity,transform] duration-[var(--motion-surface)] ease-premium group-hover:translate-y-0 group-hover:opacity-100 group-focus-within:translate-y-0 group-focus-within:opacity-100', children: [_jsx("p", { className: 'mb-2 truncate text-[12px] font-medium text-white', children: media.filename }), onDelete ? (_jsx(IconButton, { onClick: (event) => {
19
21
  event.stopPropagation();
20
22
  onDelete(media.id);
21
- }, className: 'self-end rounded-lg border-0 bg-white p-2 text-terracotta shadow-none backdrop-blur-none hover:translate-y-0 hover:scale-100 hover:bg-gray-100 dark:bg-white dark:text-terracotta dark:hover:bg-gray-100', title: 'Delete', "aria-label": 'Delete media item', children: _jsx(Trash2, { size: 16 }) })) : null] })] }, media.id))) }), items.length === 0 ? _jsx("div", { className: 'p-8 text-center text-text-secondary', children: emptyMessage }) : null, _jsx(Modal, { isOpen: !!selectedMedia, onClose: () => setSelectedMedia(null), title: selectedMedia?.filename || 'Media Preview', className: 'max-w-4xl', children: selectedMedia ? (_jsxs("div", { className: 'space-y-4', children: [_jsx("div", { className: 'flex items-center justify-center overflow-hidden rounded-lg bg-black/5 dark:bg-black/20', children: selectedMedia.url ? (_jsx("img", { src: selectedMedia.url, alt: selectedMedia.alt || selectedMedia.filename, className: 'max-h-[60vh] w-auto object-contain' })) : null }), _jsxs("div", { className: 'space-y-3', children: [_jsxs("div", { className: 'flex items-center gap-2', children: [_jsx("h3", { className: 'flex-1 text-xl font-bold text-text-primary dark:text-text-primary', children: selectedMedia.filename }), _jsx(IconButton, { onClick: () => handleCopy(selectedMedia.filename), className: 'border-0 bg-transparent p-2 shadow-none backdrop-blur-none hover:translate-y-0 hover:scale-100 hover:bg-sand/20 dark:bg-transparent dark:hover:bg-sand/30', title: 'Copy filename', "aria-label": 'Copy filename', children: _jsx(Copy, { size: 18 }) })] }), selectedMedia.alt ? (_jsxs("div", { children: [_jsx("label", { className: 'text-sm font-medium text-text-secondary dark:text-text-secondary', children: "Alt Text:" }), _jsx("p", { className: 'text-text-primary dark:text-text-primary', children: selectedMedia.alt })] })) : null, _jsxs("div", { className: 'grid grid-cols-1 gap-4 border-t border-sand/10 pt-2 md:grid-cols-2 dark:border-sand/20', children: [selectedMedia.url ? (_jsxs("div", { children: [_jsx("label", { className: 'text-sm font-medium text-text-secondary dark:text-text-secondary', children: "URL:" }), _jsxs("div", { className: 'flex items-center gap-2', children: [_jsx("a", { href: selectedMedia.url, target: '_blank', rel: 'noreferrer noopener', className: 'flex-1 break-all text-sm text-sea hover:underline dark:text-accent-blue', children: selectedMedia.url }), _jsx(IconButton, { onClick: () => handleCopy(selectedMedia.url || ''), className: 'shrink-0 border-0 bg-transparent p-1.5 shadow-none backdrop-blur-none hover:translate-y-0 hover:scale-100 hover:bg-sand/20 dark:bg-transparent dark:hover:bg-sand/30', title: 'Copy URL', "aria-label": 'Copy URL', children: _jsx(Copy, { size: 14 }) })] })] })) : null, selectedMedia.createdAt ? (_jsxs("div", { children: [_jsx("label", { className: 'text-sm font-medium text-text-secondary dark:text-text-secondary', children: "Created:" }), _jsx("p", { className: 'text-sm text-text-primary dark:text-text-primary', children: new Date(selectedMedia.createdAt).toLocaleDateString() })] })) : null] })] })] })) : null })] }));
23
+ }, variant: 'subtle', className: 'pointer-events-auto relative z-20 self-end text-terracotta hover:text-terracotta', title: 'Delete', "aria-label": 'Delete media item', children: _jsx(Trash2, { size: 16 }) })) : null] })] }, media.id))) }), items.length === 0 ? _jsx("div", { className: 'font-secondary rounded-[var(--radius-card)] border border-sand/25 bg-light-sand/25 px-8 py-14 text-center text-sm text-text-secondary dark:border-white/10 dark:bg-white/[0.025]', children: emptyMessage }) : null, _jsx(Modal, { isOpen: !!selectedMedia, onClose: () => setSelectedMedia(null), title: selectedMedia?.filename || 'Media Preview', className: 'max-w-4xl', children: selectedMedia ? (_jsxs("div", { className: 'space-y-6', children: [_jsx("div", { className: 'flex items-center justify-center overflow-hidden rounded-[var(--radius-ui)] border border-sand/20 bg-light-sand/35 dark:border-white/[0.07] dark:bg-black/20', children: selectedMedia.url ? (_jsx("img", { src: selectedMedia.url, alt: selectedMedia.alt || selectedMedia.filename, className: 'max-h-[60vh] w-auto object-contain' })) : null }), _jsxs("div", { className: 'space-y-5', children: [_jsxs("div", { className: 'flex items-center gap-2', children: [_jsx("h3", { className: 'flex-1 text-xl font-semibold tracking-refined text-text-primary dark:text-text-primary', children: selectedMedia.filename }), _jsx(IconButton, { onClick: () => handleCopy(selectedMedia.filename), variant: 'ghost', title: 'Copy filename', "aria-label": 'Copy filename', children: _jsx(Copy, { size: 18 }) })] }), selectedMedia.alt ? (_jsxs("div", { children: [_jsx("p", { className: 'text-[10px] font-semibold uppercase tracking-[0.09em] text-text-secondary', children: "Alt text" }), _jsx("p", { className: 'font-secondary mt-1 text-sm leading-6 text-text-primary dark:text-text-primary', children: selectedMedia.alt })] })) : null, _jsxs("div", { className: 'grid grid-cols-1 gap-6 border-t border-sand/20 pt-5 md:grid-cols-2 dark:border-white/[0.07]', children: [selectedMedia.url ? (_jsxs("div", { children: [_jsx("p", { className: 'mb-1.5 text-[10px] font-semibold uppercase tracking-[0.09em] text-text-secondary', children: "URL" }), _jsxs("div", { className: 'flex items-center gap-2', children: [_jsx("a", { href: selectedMedia.url, target: '_blank', rel: 'noreferrer noopener', className: 'flex-1 break-all text-sm text-sea transition-colors duration-[var(--motion-control)] ease-premium hover:text-deep-sea hover:underline dark:text-accent-blue dark:hover:text-text-primary', children: selectedMedia.url }), _jsx(IconButton, { onClick: () => handleCopy(selectedMedia.url || ''), variant: 'ghost', size: 'sm', title: 'Copy URL', "aria-label": 'Copy URL', children: _jsx(Copy, { size: 14 }) })] })] })) : null, selectedMedia.createdAt ? (_jsxs("div", { children: [_jsx("p", { className: 'mb-1.5 text-[10px] font-semibold uppercase tracking-[0.09em] text-text-secondary', children: "Created" }), _jsx("p", { className: 'font-secondary text-sm text-text-primary dark:text-text-primary', children: new Date(selectedMedia.createdAt).toLocaleDateString() })] })) : null] })] })] })) : null })] }));
22
24
  }
@@ -1,7 +1,17 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { Check, ChevronRight } from 'lucide-react';
3
4
  import React from 'react';
4
5
  import { cn } from '../utils/cn.js';
6
+ import { usePresence } from '../utils/hooks.js';
7
+ function FloatingMenuSurface({ className, open, ...props }) {
8
+ const { present, visible } = usePresence(open, 150);
9
+ if (!present)
10
+ return null;
11
+ return (_jsx("div", { className: cn('origin-top-left rounded-[var(--radius-ui)] border border-sand/35 bg-white p-1.5 shadow-[var(--shadow-overlay)] outline-none transition-[opacity,transform] dark:border-white/15 dark:bg-deep-sea', visible
12
+ ? 'translate-y-0 scale-100 opacity-100 duration-[var(--motion-surface)] ease-premium'
13
+ : '-translate-y-1 scale-[0.992] opacity-0 duration-[var(--motion-exit)] ease-in', className), ...props }));
14
+ }
5
15
  // ─── MenuItem renderer ───────────────────────────────────────────────────────
6
16
  function MenuItems({ items, radioGroupValue, onClose }) {
7
17
  const [openSub, setOpenSub] = React.useState(null);
@@ -15,24 +25,24 @@ function MenuItems({ items, radioGroupValue, onClose }) {
15
25
  return (_jsxs("button", { type: 'button', role: 'menuitemradio', "aria-checked": isChecked, disabled: rItem.disabled, onClick: () => {
16
26
  item.onValueChange(rItem.value);
17
27
  onClose();
18
- }, className: 'flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-sm text-text-primary transition-colors hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [_jsx("span", { className: 'flex h-4 w-4 items-center justify-center', children: isChecked ? _jsx("span", { className: 'h-2 w-2 rounded-full bg-sea dark:bg-accent-blue' }) : null }), rItem.label, rItem.shortcut ? _jsx("span", { className: 'ml-auto text-xs text-text-secondary', children: rItem.shortcut }) : null] }, rItem.value));
28
+ }, className: 'flex w-full items-center gap-2 rounded-[var(--radius-ui)] px-3 py-1.5 text-sm text-text-primary transition-colors duration-[var(--motion-control)] ease-premium hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [_jsx("span", { className: 'flex h-4 w-4 items-center justify-center', children: isChecked ? _jsx("span", { className: 'h-2 w-2 rounded-full bg-sea dark:bg-accent-blue' }) : null }), rItem.label, rItem.shortcut ? _jsx("span", { className: 'ml-auto text-xs text-text-secondary', children: rItem.shortcut }) : null] }, rItem.value));
19
29
  }) }, i));
20
30
  }
21
31
  if (item.type === 'checkbox') {
22
32
  return (_jsxs("button", { type: 'button', role: 'menuitemcheckbox', "aria-checked": item.checked, disabled: item.disabled, onClick: () => {
23
33
  item.onCheckedChange(!item.checked);
24
34
  onClose();
25
- }, className: 'flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-sm text-text-primary transition-colors hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [_jsx("span", { className: 'flex h-4 w-4 items-center justify-center', children: item.checked ? _jsx(Check, { size: 12, className: 'text-sea dark:text-accent-blue' }) : null }), item.label, item.shortcut ? _jsx("span", { className: 'ml-auto text-xs text-text-secondary', children: item.shortcut }) : null] }, i));
35
+ }, className: 'flex w-full items-center gap-2 rounded-[var(--radius-ui)] px-3 py-1.5 text-sm text-text-primary transition-colors duration-[var(--motion-control)] ease-premium hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [_jsx("span", { className: 'flex h-4 w-4 items-center justify-center', children: item.checked ? _jsx(Check, { size: 12, className: 'text-sea dark:text-accent-blue' }) : null }), item.label, item.shortcut ? _jsx("span", { className: 'ml-auto text-xs text-text-secondary', children: item.shortcut }) : null] }, i));
26
36
  }
27
37
  if (item.type === 'sub') {
28
38
  const isSubOpen = openSub === i;
29
- return (_jsxs("div", { className: 'relative', children: [_jsxs("button", { type: 'button', role: 'menuitem', "aria-haspopup": 'menu', "aria-expanded": isSubOpen, disabled: item.disabled, onPointerEnter: () => setOpenSub(i), onPointerLeave: () => setOpenSub(null), className: 'flex w-full items-center rounded-lg px-3 py-1.5 text-sm text-text-primary transition-colors hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [_jsx("span", { className: 'flex-1', children: item.label }), _jsx(ChevronRight, { size: 14, className: 'text-text-secondary' })] }), isSubOpen && (_jsx("div", { className: 'absolute z-[100] left-full top-0 ml-1 min-w-[12rem] animate-in fade-in slide-in-from-left-2 duration-200 ease-out-expo rounded-[var(--radius-card)] border-0 ring-1 ring-black/5 bg-white/95 backdrop-blur-xl p-1 shadow-[0_8px_32px_rgba(0,0,0,0.08)] outline-none dark:ring-white/10 dark:bg-deep-sea/95 dark:shadow-[0_8px_32px_rgba(0,0,0,0.3)]', onPointerEnter: () => setOpenSub(i), onPointerLeave: () => setOpenSub(null), children: _jsx(MenuItems, { items: item.items, onClose: onClose }) }))] }, i));
39
+ return (_jsxs("div", { className: 'relative', children: [_jsxs("button", { type: 'button', role: 'menuitem', "aria-haspopup": 'menu', "aria-expanded": isSubOpen, disabled: item.disabled, onPointerEnter: () => setOpenSub(i), onPointerLeave: () => setOpenSub(null), className: 'flex w-full items-center rounded-[var(--radius-ui)] px-3 py-1.5 text-sm text-text-primary transition-colors duration-[var(--motion-control)] ease-premium hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [_jsx("span", { className: 'flex-1', children: item.label }), _jsx(ChevronRight, { size: 14, className: 'text-text-secondary' })] }), _jsx(FloatingMenuSurface, { open: isSubOpen, className: 'absolute left-full top-0 z-[100] ml-1 min-w-[12rem]', onPointerEnter: () => setOpenSub(i), onPointerLeave: () => setOpenSub(null), children: _jsx(MenuItems, { items: item.items, onClose: onClose }) })] }, i));
30
40
  }
31
41
  // type === 'item'
32
42
  return (_jsxs("button", { type: 'button', role: 'menuitem', disabled: item.disabled, onClick: () => {
33
43
  item.onSelect();
34
44
  onClose();
35
- }, className: 'flex w-full items-center gap-2 rounded-lg px-3 py-1.5 text-sm text-text-primary transition-colors hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [item.icon ? _jsx("span", { className: 'flex-shrink-0 text-text-secondary', children: item.icon }) : _jsx("span", { className: 'w-4' }), _jsx("span", { className: 'flex-1', children: item.label }), item.shortcut ? _jsx("span", { className: 'ml-auto text-xs text-text-secondary', children: item.shortcut }) : null] }, i));
45
+ }, className: 'flex w-full items-center gap-2 rounded-[var(--radius-ui)] px-3 py-1.5 text-sm text-text-primary transition-colors duration-[var(--motion-control)] ease-premium hover:bg-sand/10 disabled:opacity-50 dark:text-text-primary dark:hover:bg-sand/15', children: [item.icon ? _jsx("span", { className: 'flex-shrink-0 text-text-secondary', children: item.icon }) : _jsx("span", { className: 'w-4' }), _jsx("span", { className: 'flex-1', children: item.label }), item.shortcut ? _jsx("span", { className: 'ml-auto text-xs text-text-secondary', children: item.shortcut }) : null] }, i));
36
46
  }) }));
37
47
  }
38
48
  // ─── Menubar ─────────────────────────────────────────────────────────────────
@@ -49,10 +59,10 @@ export function Menubar({ className, menus }) {
49
59
  document.addEventListener('pointerdown', handler);
50
60
  return () => document.removeEventListener('pointerdown', handler);
51
61
  }, [activeIndex]);
52
- return (_jsx("div", { ref: barRef, role: 'menubar', className: cn('flex items-center gap-1 rounded-2xl ring-1 ring-black/5 bg-white/80 px-1 py-1 shadow-sm backdrop-blur-md dark:ring-white/10 dark:bg-deep-sea/80', className), children: menus.map((menu, i) => {
62
+ return (_jsx("div", { ref: barRef, role: 'menubar', className: cn('flex items-center gap-0.5 rounded-[var(--radius-ui)] border border-sand/30 bg-white px-1 py-1 shadow-[var(--shadow-surface)] dark:border-white/10 dark:bg-deep-sea', className), children: menus.map((menu, i) => {
53
63
  const isOpen = activeIndex === i;
54
- return (_jsxs("div", { className: 'relative', children: [_jsx("button", { type: 'button', role: 'menuitem', "aria-haspopup": 'menu', "aria-expanded": isOpen, onClick: () => setActiveIndex(isOpen ? null : i), className: cn('rounded-lg px-3 py-1.5 text-sm font-medium transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-sea dark:focus-visible:ring-accent-blue', isOpen
64
+ return (_jsxs("div", { className: 'relative', children: [_jsx("button", { type: 'button', role: 'menuitem', "aria-haspopup": 'menu', "aria-expanded": isOpen, onClick: () => setActiveIndex(isOpen ? null : i), className: cn('rounded-[var(--radius-ui)] px-3 py-1.5 text-sm font-medium transition-colors duration-[var(--motion-control)] ease-premium focus:outline-none focus-visible:ring-2 focus-visible:ring-sea dark:focus-visible:ring-accent-blue', isOpen
55
65
  ? 'bg-sea text-white dark:bg-accent-blue'
56
- : 'text-text-secondary hover:bg-sand/10 hover:text-text-primary dark:text-text-secondary dark:hover:bg-sand/15 dark:hover:text-text-primary'), children: menu.trigger }), isOpen && (_jsx("div", { role: 'menu', className: 'absolute z-[100] left-0 top-full mt-1 min-w-[14rem] animate-in fade-in slide-in-from-top-2 duration-200 ease-out-expo rounded-[var(--radius-card)] border-0 ring-1 ring-black/5 bg-white/95 backdrop-blur-xl p-1 shadow-[0_8px_32px_rgba(0,0,0,0.08)] outline-none dark:ring-white/10 dark:bg-deep-sea/95 dark:shadow-[0_8px_32px_rgba(0,0,0,0.3)]', children: _jsx(MenuItems, { items: menu.items, onClose: () => setActiveIndex(null) }) }))] }, menu.trigger));
66
+ : 'text-text-secondary hover:bg-sand/10 hover:text-text-primary dark:text-text-secondary dark:hover:bg-sand/15 dark:hover:text-text-primary'), children: menu.trigger }), _jsx(FloatingMenuSurface, { open: isOpen, role: 'menu', className: 'absolute left-0 top-full z-[100] mt-1 min-w-[14rem]', children: _jsx(MenuItems, { items: menu.items, onClose: () => setActiveIndex(null) }) })] }, menu.trigger));
57
67
  }) }));
58
68
  }
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- type MetricFormat = 'number' | 'currency' | 'percent' | 'compact';
2
+ import type { MetricFormat } from '../core';
3
+ export type { MetricFormat } from '../core';
3
4
  export interface MetricProps {
4
5
  value: number | undefined | null;
5
6
  format?: MetricFormat;
@@ -10,4 +11,3 @@ export interface MetricProps {
10
11
  decimals?: number;
11
12
  }
12
13
  export declare function Metric({ value, format, currency, className, prefix, suffix, decimals }: MetricProps): import("react/jsx-runtime").JSX.Element;
13
- export {};
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import * as React from 'react';
3
4
  import { cn } from '../utils/cn.js';
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import React from 'react';
3
4
  import { createPortal } from 'react-dom';
@@ -5,25 +6,64 @@ import { DialogCloseButton } from './dialog-close-button.js';
5
6
  import { cn } from '../utils/cn.js';
6
7
  export function Modal({ children, className, isOpen, onClose, title }) {
7
8
  const dialogRef = React.useRef(null);
9
+ const closeTimerRef = React.useRef(null);
10
+ const openTimerRef = React.useRef(null);
11
+ const titleId = React.useId();
12
+ const [isPresent, setIsPresent] = React.useState(isOpen);
13
+ const [motionState, setMotionState] = React.useState(isOpen ? 'opening' : 'closing');
8
14
  React.useEffect(() => {
9
- const dialog = dialogRef.current;
10
- if (!dialog) {
15
+ if (isOpen) {
16
+ if (closeTimerRef.current)
17
+ clearTimeout(closeTimerRef.current);
18
+ setIsPresent(true);
19
+ setMotionState('opening');
11
20
  return;
12
21
  }
13
- if (isOpen && !dialog.open) {
14
- dialog.showModal();
15
- return;
22
+ if (isPresent) {
23
+ setMotionState('closing');
24
+ closeTimerRef.current = setTimeout(() => {
25
+ dialogRef.current?.close();
26
+ setIsPresent(false);
27
+ }, 150);
16
28
  }
17
- if (!isOpen && dialog.open) {
18
- dialog.close();
19
- }
20
- }, [isOpen]);
21
- if (typeof document === 'undefined' || !isOpen) {
29
+ }, [isOpen, isPresent]);
30
+ React.useLayoutEffect(() => {
31
+ const dialog = dialogRef.current;
32
+ if (!isPresent || !isOpen || !dialog)
33
+ return;
34
+ if (!dialog.open)
35
+ dialog.showModal();
36
+ openTimerRef.current = setTimeout(() => setMotionState('open'), 20);
37
+ return () => {
38
+ if (openTimerRef.current)
39
+ clearTimeout(openTimerRef.current);
40
+ };
41
+ }, [isOpen, isPresent]);
42
+ React.useEffect(() => {
43
+ return () => {
44
+ if (closeTimerRef.current)
45
+ clearTimeout(closeTimerRef.current);
46
+ if (openTimerRef.current)
47
+ clearTimeout(openTimerRef.current);
48
+ dialogRef.current?.close();
49
+ };
50
+ }, []);
51
+ const requestClose = () => {
52
+ if (motionState !== 'closing')
53
+ onClose();
54
+ };
55
+ if (typeof document === 'undefined' || !isPresent) {
22
56
  return null;
23
57
  }
24
- return createPortal(_jsx("dialog", { ref: dialogRef, className: cn('m-auto w-full max-w-xl animate-in fade-in zoom-in-95 duration-200 ease-out-expo rounded-[var(--radius-card)] border-0 bg-white p-0 text-text-primary shadow-[0_16px_64px_rgba(0,0,0,0.08),0_0_0_1px_rgba(0,0,0,0.02)] outline-none backdrop:bg-deep-sea/40 backdrop:backdrop-blur-md dark:bg-deep-sea dark:shadow-[0_16px_64px_rgba(0,0,0,0.4),0_0_0_1px_rgba(255,255,255,0.08)] dark:text-text-primary dark:backdrop:bg-black/70', className), onClick: (event) => {
58
+ return createPortal(_jsx("dialog", { ref: dialogRef, "aria-labelledby": titleId, "data-state": motionState, className: cn('modal-motion m-auto w-full max-w-xl rounded-[var(--radius-dialog)] border border-sand/30 bg-white p-0 text-text-primary shadow-[var(--shadow-overlay)] outline-none backdrop:bg-deep-sea/38 backdrop:backdrop-blur-[2px] dark:border-white/12 dark:bg-deep-sea dark:text-text-primary dark:backdrop:bg-black/65', className), onClick: (event) => {
25
59
  if (event.target === dialogRef.current) {
26
- onClose();
60
+ requestClose();
27
61
  }
28
- }, onClose: onClose, children: _jsxs("div", { className: 'p-6 md:p-8', children: [_jsxs("div", { className: 'mb-5 flex items-center justify-between gap-4', children: [_jsx("h3", { className: 'text-2xl text-text-primary dark:text-text-primary', children: title }), _jsx(DialogCloseButton, { onClick: onClose, "aria-label": 'Close' })] }), _jsx("div", { children: children })] }) }), document.body);
62
+ }, onCancel: (event) => {
63
+ event.preventDefault();
64
+ requestClose();
65
+ }, onClose: () => {
66
+ if (isOpen)
67
+ onClose();
68
+ }, children: _jsxs("div", { children: [_jsxs("div", { className: 'flex items-center justify-between gap-4 border-b border-sand/20 px-6 py-5 dark:border-white/[0.08] md:px-7', children: [_jsx("h2", { id: titleId, className: 'text-xl font-semibold tracking-refined text-text-primary dark:text-text-primary', children: title }), _jsx(DialogCloseButton, { onClick: requestClose, "aria-label": 'Close' })] }), _jsx("div", { className: 'px-6 py-6 md:px-7 md:py-7', children: children })] }) }), document.body);
29
69
  }
@@ -1,11 +1,21 @@
1
+ 'use client';
1
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
3
  import { ChevronDown } from 'lucide-react';
3
4
  import React from 'react';
4
5
  import { cn } from '../utils/cn.js';
6
+ import { usePresence } from '../utils/hooks.js';
5
7
  import { renderDefaultLink } from './nav-menu.js';
6
8
  function isGroup(entry) {
7
9
  return 'items' in entry;
8
10
  }
11
+ function NavigationMenuSurface({ children, open }) {
12
+ const { present, visible } = usePresence(open, 150);
13
+ if (!present)
14
+ return null;
15
+ return (_jsx("div", { className: cn('absolute left-0 top-full z-50 mt-1 min-w-[16rem] origin-top-left rounded-[var(--radius-ui)] border border-sand/35 bg-white p-1.5 shadow-[var(--shadow-overlay)] transition-[opacity,transform] dark:border-white/15 dark:bg-deep-sea', visible
16
+ ? 'translate-y-0 scale-100 opacity-100 duration-[var(--motion-surface)] ease-premium'
17
+ : '-translate-y-1 scale-[0.992] opacity-0 duration-[var(--motion-exit)] ease-in'), children: children }));
18
+ }
9
19
  export function NavigationMenu({ className, entries, renderLink }) {
10
20
  const [activeIndex, setActiveIndex] = React.useState(null);
11
21
  const linkRenderer = (renderLink ?? renderDefaultLink);
@@ -24,18 +34,18 @@ export function NavigationMenu({ className, entries, renderLink }) {
24
34
  if (!isGroup(entry)) {
25
35
  return (_jsx(React.Fragment, { children: linkRenderer({
26
36
  item: entry,
27
- className: 'px-3 py-2 text-sm font-medium text-text-secondary transition-colors duration-200 hover:text-text-primary rounded-lg hover:bg-sand/10 dark:text-text-secondary dark:hover:text-text-primary dark:hover:bg-sand/15',
37
+ className: 'rounded-[var(--radius-ui)] px-3 py-2 text-sm font-medium text-text-secondary transition-colors duration-[var(--motion-control)] ease-premium hover:bg-sand/10 hover:text-text-primary dark:text-text-secondary dark:hover:bg-sand/15 dark:hover:text-text-primary',
28
38
  children: entry.label
29
39
  }) }, entry.href));
30
40
  }
31
41
  const isOpen = activeIndex === i;
32
- return (_jsxs("div", { className: 'relative', children: [_jsxs("button", { type: 'button', onClick: () => setActiveIndex(isOpen ? null : i), "aria-expanded": isOpen, className: cn('flex items-center gap-1 rounded-lg px-3 py-2 text-sm font-medium transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-sea dark:focus-visible:ring-accent-blue', isOpen
42
+ return (_jsxs("div", { className: 'relative', children: [_jsxs("button", { type: 'button', onClick: () => setActiveIndex(isOpen ? null : i), "aria-expanded": isOpen, className: cn('flex translate-y-0 items-center gap-1 rounded-[var(--radius-button)] px-3 py-2 text-[13px] font-medium tracking-ui transition-[background-color,color,transform] duration-[var(--motion-control)] ease-premium active:translate-y-px focus:outline-none focus-visible:ring-2 focus-visible:ring-sea/30 dark:focus-visible:ring-accent-blue/40', isOpen
33
43
  ? 'bg-sand/10 text-text-primary dark:bg-sand/15 dark:text-text-primary'
34
- : 'text-text-secondary hover:bg-sand/10 hover:text-text-primary dark:text-text-secondary dark:hover:bg-sand/15 dark:hover:text-text-primary'), children: [entry.trigger, _jsx(ChevronDown, { size: 14, className: cn('transition-transform duration-200', isOpen ? 'rotate-180' : 'rotate-0') })] }), isOpen && (_jsx("div", { className: 'absolute left-0 top-full z-50 mt-1.5 min-w-[16rem] animate-in fade-in slide-in-from-top-2 duration-200 ease-out-expo rounded-[var(--radius-card)] border-0 ring-1 ring-black/5 bg-white/95 backdrop-blur-xl p-2 shadow-[0_8px_32px_rgba(0,0,0,0.08)] dark:ring-white/10 dark:bg-deep-sea/95 dark:shadow-[0_8px_32px_rgba(0,0,0,0.3)]', children: entry.items.map((item) => (_jsx(React.Fragment, { children: linkRenderer({
44
+ : 'text-text-secondary hover:bg-sand/10 hover:text-text-primary dark:text-text-secondary dark:hover:bg-sand/15 dark:hover:text-text-primary'), children: [entry.trigger, _jsx(ChevronDown, { size: 14, className: cn('transition-transform duration-[var(--motion-surface)] ease-premium', isOpen ? 'rotate-180' : 'rotate-0') })] }), _jsx(NavigationMenuSurface, { open: isOpen, children: entry.items.map((item) => (_jsx(React.Fragment, { children: linkRenderer({
35
45
  item,
36
- className: 'flex flex-col rounded-lg px-3 py-2.5 hover:bg-sand/10 dark:hover:bg-sand/15 transition-colors duration-200',
46
+ className: 'flex flex-col rounded-[var(--radius-ui)] px-3 py-2.5 transition-colors duration-[var(--motion-control)] ease-premium hover:bg-sand/10 dark:hover:bg-sand/15',
37
47
  children: (_jsxs(_Fragment, { children: [_jsx("span", { className: 'text-sm font-medium text-text-primary dark:text-text-primary', children: item.label }), item.description ? (_jsx("span", { className: 'mt-0.5 text-xs leading-relaxed text-text-secondary dark:text-text-secondary', children: item.description })) : null] })),
38
48
  onClick: () => setActiveIndex(null)
39
- }) }, item.href))) }))] }, entry.trigger));
49
+ }) }, item.href))) })] }, entry.trigger));
40
50
  }) }));
41
51
  }
@@ -5,5 +5,5 @@ import { IconButton } from './icon-button.js';
5
5
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from './dropdown-menu.js';
6
6
  export function NotificationBadge({ count = 0, items = [], onMarkAllRead, className }) {
7
7
  const hasUnread = count > 0 || items.some((item) => item.unread);
8
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs("div", { className: cn('relative', className), children: [_jsx(IconButton, { "aria-label": 'Notifications', children: _jsx(Bell, { size: 18 }) }), count > 0 && (_jsx("span", { className: 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-terracotta px-1 text-[10px] font-bold text-white', children: count > 99 ? '99+' : count }))] }) }), _jsxs(DropdownMenuContent, { align: 'end', className: 'w-80', children: [_jsxs("div", { className: 'flex items-center justify-between px-2 py-1.5', children: [_jsx(DropdownMenuLabel, { className: 'uppercase', children: "Notifications" }), hasUnread && onMarkAllRead && (_jsx("button", { type: 'button', onClick: onMarkAllRead, className: 'text-xs text-sea hover:underline dark:text-accent-blue', children: "Mark all read" }))] }), _jsx(DropdownMenuSeparator, {}), items.length === 0 ? (_jsx("div", { className: 'px-2 py-6 text-center text-sm text-text-secondary dark:text-text-secondary', children: "No notifications" })) : (items.map((item) => (_jsx(DropdownMenuItem, { onClick: item.onClick, className: 'flex flex-col items-start gap-0.5 py-2', children: _jsxs("div", { className: 'flex w-full items-start gap-2', children: [item.unread && _jsx("span", { className: 'mt-1.5 h-2 w-2 shrink-0 rounded-full bg-sea dark:bg-accent-blue' }), _jsxs("div", { className: 'flex-1', children: [_jsx("p", { className: cn('text-sm', item.unread && 'font-semibold'), children: item.title }), item.description && _jsx("p", { className: 'text-xs text-text-secondary dark:text-text-secondary', children: item.description }), item.timestamp && _jsx("p", { className: 'mt-1 text-xs text-text-secondary dark:text-text-secondary', children: item.timestamp })] })] }) }, item.id))))] })] }));
8
+ return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs("div", { className: cn('relative', className), children: [_jsx(IconButton, { "aria-label": 'Notifications', children: _jsx(Bell, { size: 18 }) }), count > 0 && (_jsx("span", { className: 'absolute right-0 top-0 flex h-4 min-w-4 items-center justify-center rounded-full bg-terracotta px-1 text-[10px] font-semibold text-white', children: count > 99 ? '99+' : count }))] }) }), _jsxs(DropdownMenuContent, { align: 'end', className: 'w-80', children: [_jsxs("div", { className: 'flex items-center justify-between px-2 py-1.5', children: [_jsx(DropdownMenuLabel, { className: 'uppercase', children: "Notifications" }), hasUnread && onMarkAllRead && (_jsx("button", { type: 'button', onClick: onMarkAllRead, className: 'text-xs text-sea transition-colors duration-[var(--motion-control)] ease-premium hover:text-deep-sea hover:underline dark:text-accent-blue dark:hover:text-text-primary', children: "Mark all read" }))] }), _jsx(DropdownMenuSeparator, {}), items.length === 0 ? (_jsx("div", { className: 'px-2 py-6 text-center text-sm text-text-secondary dark:text-text-secondary', children: "No notifications" })) : (items.map((item) => (_jsx(DropdownMenuItem, { onClick: item.onClick, className: 'flex flex-col items-start gap-0.5 py-2', children: _jsxs("div", { className: 'flex w-full items-start gap-2', children: [item.unread && _jsx("span", { className: 'mt-1.5 h-2 w-2 shrink-0 rounded-full bg-sea dark:bg-accent-blue' }), _jsxs("div", { className: 'flex-1', children: [_jsx("p", { className: cn('text-sm', item.unread && 'font-semibold'), children: item.title }), item.description && _jsx("p", { className: 'text-xs text-text-secondary dark:text-text-secondary', children: item.description }), item.timestamp && _jsx("p", { className: 'mt-1 text-xs text-text-secondary dark:text-text-secondary', children: item.timestamp })] })] }) }, item.id))))] })] }));
9
9
  }
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  import { jsx as _jsx } from "react/jsx-runtime";
2
3
  import React from 'react';
3
4
  import { cn } from '../utils/cn.js';
@@ -48,6 +49,6 @@ export function OtpInput({ className, disabled = false, length = 6, onChange, se
48
49
  const digit = digits[i]?.trim() ?? '';
49
50
  return (_jsx("input", { ref: (el) => {
50
51
  inputRefs.current[i] = el;
51
- }, type: secure ? 'password' : 'text', inputMode: 'numeric', maxLength: 1, value: digit, disabled: disabled, "aria-label": `Digit ${i + 1}`, onChange: (e) => handleChange(i, e.target.value), onKeyDown: (e) => handleKeyDown(i, e), onPaste: handlePaste, onFocus: (e) => e.target.select(), className: cn('h-12 w-10 rounded-xl border bg-white text-center text-lg font-semibold tracking-widest text-text-primary caret-sea transition-all duration-200 outline-none dark:bg-dark-sand dark:text-text-primary dark:caret-accent-blue', digit ? 'border-sea dark:border-accent-blue' : 'border-sand/30 dark:border-sand/50', 'focus:border-sea focus:ring-2 focus:ring-sea/30 dark:focus:border-accent-blue dark:focus:ring-accent-blue/30', disabled && 'cursor-not-allowed opacity-50') }, i));
52
+ }, type: secure ? 'password' : 'text', inputMode: 'numeric', maxLength: 1, value: digit, disabled: disabled, "aria-label": `Digit ${i + 1}`, onChange: (e) => handleChange(i, e.target.value), onKeyDown: (e) => handleKeyDown(i, e), onPaste: handlePaste, onFocus: (e) => e.target.select(), className: cn('h-12 w-10 rounded-[var(--radius-ui)] border bg-white text-center text-lg font-semibold tracking-[0.08em] text-text-primary caret-sea shadow-[0_1px_2px_rgba(26,55,77,0.025)] outline-none transition-[border-color,box-shadow] duration-[var(--motion-control)] ease-premium dark:bg-deep-sea dark:text-text-primary dark:caret-accent-blue', digit ? 'border-sea/60 dark:border-accent-blue/65' : 'border-sand/40 dark:border-white/15', 'focus:border-sea focus:ring-2 focus:ring-sea/12 dark:focus:border-accent-blue dark:focus:ring-accent-blue/15', disabled && 'cursor-not-allowed opacity-50') }, i));
52
53
  }) }));
53
54
  }
@@ -4,5 +4,5 @@ import { cn } from '../utils/cn.js';
4
4
  import { Button } from './button.js';
5
5
  export function PageHeader({ title, description, breadcrumbs, actions, backHref, onBack, className }) {
6
6
  const showBack = Boolean(backHref || onBack);
7
- return (_jsxs("div", { className: cn('space-y-2', className), children: [breadcrumbs && _jsx("div", { className: 'text-sm text-text-secondary dark:text-text-secondary', children: breadcrumbs }), _jsxs("div", { className: 'flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between', children: [_jsxs("div", { className: 'flex items-start gap-3', children: [showBack && (_jsx(Button, { variant: 'ghost', size: 'sm', className: 'mt-0.5 h-8 w-8 p-0', onClick: onBack, as: backHref ? 'a' : 'button', href: backHref, children: _jsx(ChevronLeft, { size: 18 }) })), _jsxs("div", { children: [_jsx("h1", { className: 'text-2xl font-bold tracking-refined text-text-primary dark:text-text-primary', children: title }), description && _jsx("p", { className: 'mt-1 text-sm text-text-secondary dark:text-text-secondary', children: description })] })] }), actions && _jsx("div", { className: 'flex flex-wrap items-center gap-2', children: actions })] })] }));
7
+ return (_jsxs("header", { className: cn('space-y-5', className), children: [breadcrumbs && _jsx("div", { className: 'text-sm text-text-secondary dark:text-text-secondary', children: breadcrumbs }), _jsxs("div", { className: 'flex flex-col gap-7 sm:flex-row sm:items-start sm:justify-between', children: [_jsxs("div", { className: 'flex items-start gap-4', children: [showBack && (_jsx(Button, { variant: 'ghost', size: 'sm', className: 'mt-0.5 h-8 w-8 p-0', onClick: onBack, as: backHref ? 'a' : 'button', href: backHref, children: _jsx(ChevronLeft, { size: 18 }) })), _jsxs("div", { children: [_jsx("h1", { className: 'text-[2rem] font-semibold leading-[1.15] tracking-refined text-text-primary dark:text-text-primary', children: title }), description && _jsx("p", { className: 'font-secondary mt-2.5 max-w-2xl text-sm leading-6 text-text-secondary dark:text-text-secondary', children: description })] })] }), actions && _jsx("div", { className: 'flex flex-wrap items-center gap-3', children: actions })] })] }));
8
8
  }
@@ -17,7 +17,7 @@ export function Pagination({ className, currentPage, hasNextPage, hasPrevPage, o
17
17
  }
18
18
  return currentPage - 3 + index;
19
19
  });
20
- return (_jsxs("div", { className: cn('mt-8 flex items-center justify-center gap-2', className), children: [_jsx("button", { type: 'button', onClick: () => onPageChange(currentPage - 1), disabled: !hasPrevPage, className: 'rounded-lg border border-sand/10 bg-white p-2 transition-colors hover:bg-sand/10 disabled:cursor-not-allowed disabled:opacity-50 dark:border-sand/20 dark:bg-sand/10 dark:hover:bg-sand/20', title: 'Previous page', children: _jsx(ChevronLeft, { size: 20 }) }), _jsx("div", { className: 'flex items-center gap-1', children: visiblePages.map((pageNumber) => (_jsx("button", { type: 'button', onClick: () => onPageChange(pageNumber), className: cn('rounded-lg px-3 py-2 text-sm font-medium transition-colors', pageNumber === currentPage
21
- ? 'bg-sea text-white dark:bg-accent-blue'
22
- : 'border border-sand/10 bg-white text-text-primary hover:bg-sand/10 dark:border-sand/20 dark:bg-sand/10 dark:text-text-primary dark:hover:bg-sand/20'), children: pageNumber }, pageNumber))) }), _jsx("button", { type: 'button', onClick: () => onPageChange(currentPage + 1), disabled: !hasNextPage, className: 'rounded-lg border border-sand/10 bg-white p-2 transition-colors hover:bg-sand/10 disabled:cursor-not-allowed disabled:opacity-50 dark:border-sand/20 dark:bg-sand/10 dark:hover:bg-sand/20', title: 'Next page', children: _jsx(ChevronRight, { size: 20 }) })] }));
20
+ return (_jsxs("nav", { "aria-label": 'Pagination', className: cn('mt-8 flex items-center justify-center gap-1.5', className), children: [_jsx("button", { type: 'button', onClick: () => onPageChange(currentPage - 1), disabled: !hasPrevPage, className: 'flex h-9 w-9 scale-100 items-center justify-center rounded-[var(--radius-button)] border border-sand/30 bg-white transition-[background-color,border-color,color,transform,opacity] duration-[var(--motion-control)] ease-premium hover:border-sand/60 hover:bg-light-sand/50 active:scale-[0.96] disabled:cursor-not-allowed disabled:transform-none disabled:opacity-40 dark:border-white/15 dark:bg-deep-sea dark:hover:bg-white/[0.06]', title: 'Previous page', children: _jsx(ChevronLeft, { size: 20 }) }), _jsx("div", { className: 'flex items-center gap-1', children: visiblePages.map((pageNumber) => (_jsx("button", { type: 'button', onClick: () => onPageChange(pageNumber), className: cn('flex h-9 min-w-9 scale-100 items-center justify-center rounded-[var(--radius-button)] border px-2.5 text-[13px] font-medium tabular-nums transition-[background-color,border-color,color,transform] duration-[var(--motion-control)] ease-premium active:scale-[0.96]', pageNumber === currentPage
21
+ ? 'border-sea bg-sea text-white dark:border-accent-blue dark:bg-accent-blue dark:text-deep-sea'
22
+ : 'border-transparent bg-white text-text-secondary hover:border-sand/30 hover:bg-light-sand/50 hover:text-text-primary dark:bg-deep-sea dark:text-text-secondary dark:hover:border-white/15 dark:hover:bg-white/[0.06]'), children: pageNumber }, pageNumber))) }), _jsx("button", { type: 'button', onClick: () => onPageChange(currentPage + 1), disabled: !hasNextPage, className: 'flex h-9 w-9 scale-100 items-center justify-center rounded-[var(--radius-button)] border border-sand/30 bg-white transition-[background-color,border-color,color,transform,opacity] duration-[var(--motion-control)] ease-premium hover:border-sand/60 hover:bg-light-sand/50 active:scale-[0.96] disabled:cursor-not-allowed disabled:transform-none disabled:opacity-40 dark:border-white/15 dark:bg-deep-sea dark:hover:bg-white/[0.06]', title: 'Next page', children: _jsx(ChevronRight, { size: 20 }) })] }));
23
23
  }
@@ -7,5 +7,5 @@ export function Panel({ accent, children, className, count, dragHandle, filter,
7
7
  ...(widthValue ? { width: widthValue, minWidth: widthValue } : {}),
8
8
  borderLeftColor: accent ?? 'var(--color-sea)'
9
9
  };
10
- return (_jsxs("div", { className: cn('group flex flex-col h-full min-h-0 overflow-hidden transition-all duration-300 ease-out-expo', 'border-r border-black/[0.04] dark:border-white/[0.04] border-l-0 border-y-0 rounded-none bg-transparent shadow-none', className), style: accentStyle, children: [_jsxs("div", { className: cn('flex flex-col relative z-10 bg-white/40 dark:bg-deep-sea/40 backdrop-blur-md', 'border-b border-black/[0.04] dark:border-white/[0.08] select-none'), children: [_jsxs("div", { className: 'flex items-center gap-3 px-5 py-4', children: [dragHandle ? (_jsx("span", { className: 'cursor-grab text-black/40 hover:text-black/80 dark:text-white/40 dark:hover:text-white/80 active:cursor-grabbing transition-colors', children: dragHandle })) : null, _jsx("span", { className: 'h-2 w-2 flex-shrink-0 rounded-full shadow-[0_0_8px_currentColor] opacity-80 group-hover:opacity-100 transition-opacity', style: { backgroundColor: accent ?? 'var(--color-sea)', color: accent ?? 'var(--color-sea)' } }), _jsx("span", { className: 'flex-1 text-xs font-bold uppercase tracking-widest text-[color:var(--panel-accent,var(--color-sea))]', children: title }), count !== undefined ? (_jsx("span", { className: 'rounded-full bg-light-sand/50 dark:bg-white/10 px-2.5 py-0.5 text-xs font-semibold tabular-nums text-text-primary ring-1 ring-inset ring-black/5 dark:ring-white/10', children: count })) : null] }), filter ? _jsx("div", { className: 'px-5 pb-4', children: filter }) : null, toolbar ? (_jsx("div", { className: 'flex items-center justify-center gap-2 border-t border-black/[0.04] dark:border-white/[0.04] bg-light-sand/20 dark:bg-white/5 px-5 py-2.5', children: toolbar })) : null] }), _jsx("div", { className: 'flex-1 min-h-0 overflow-y-auto bg-light-sand/10 dark:bg-transparent scrollbar-thin scrollbar-track-transparent scrollbar-thumb-black/10 hover:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/10 dark:hover:scrollbar-thumb-white/20', children: children })] }));
10
+ return (_jsxs("div", { className: cn('group flex h-full min-h-0 flex-col overflow-hidden transition-[border-color] duration-200', 'border-l-2 border-r border-r-sand/20 border-y-0 rounded-none bg-transparent shadow-none dark:border-r-white/[0.06]', className), style: accentStyle, children: [_jsxs("div", { className: cn('relative z-10 flex flex-col bg-white dark:bg-deep-sea', 'select-none border-b border-black/[0.06] dark:border-white/[0.08]'), children: [_jsxs("div", { className: 'flex min-h-14 items-center gap-3 px-5 py-3.5', children: [dragHandle ? (_jsx("span", { className: 'cursor-grab text-black/40 transition-colors duration-[var(--motion-control)] ease-premium hover:text-black/80 active:cursor-grabbing dark:text-white/40 dark:hover:text-white/80', children: dragHandle })) : null, _jsx("span", { className: 'h-1.5 w-1.5 flex-shrink-0 rounded-full opacity-80', style: { backgroundColor: accent ?? 'var(--color-sea)', color: accent ?? 'var(--color-sea)' } }), _jsx("span", { className: 'flex-1 text-[11px] font-semibold uppercase tracking-[0.1em] text-[color:var(--panel-accent,var(--color-sea))]', children: title }), count !== undefined ? (_jsx("span", { className: 'rounded-[5px] border border-sand/30 bg-light-sand/40 px-2 py-0.5 text-[11px] font-semibold tabular-nums text-text-primary dark:border-white/10 dark:bg-white/5', children: count })) : null] }), filter ? _jsx("div", { className: 'px-5 pb-4', children: filter }) : null, toolbar ? (_jsx("div", { className: 'flex items-center justify-center gap-2 border-t border-sand/20 bg-light-sand/20 px-5 py-3 dark:border-white/[0.06] dark:bg-white/[0.03]', children: toolbar })) : null] }), _jsx("div", { className: 'flex-1 min-h-0 overflow-y-auto bg-light-sand/10 dark:bg-transparent scrollbar-thin scrollbar-track-transparent scrollbar-thumb-black/10 hover:scrollbar-thumb-black/20 dark:scrollbar-thumb-white/10 dark:hover:scrollbar-thumb-white/20', children: children })] }));
11
11
  }
@@ -6,9 +6,10 @@ export interface PopoverProps {
6
6
  children: React.ReactNode;
7
7
  className?: string;
8
8
  content: React.ReactNode;
9
- /** Controlled open state */
9
+ defaultOpen?: boolean;
10
10
  open?: boolean;
11
11
  onOpenChange?: (open: boolean) => void;
12
12
  side?: PopoverSide;
13
+ sideOffset?: number;
13
14
  }
14
- export declare function Popover({ align, children, className, content, onOpenChange, open: controlledOpen, side }: PopoverProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Popover({ align, children, className, content, defaultOpen, onOpenChange, open, side, sideOffset }: PopoverProps): import("react/jsx-runtime").JSX.Element;