@gaulatti/bleecker 0.1.42 → 0.1.44

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 (62) hide show
  1. package/README.md +98 -1
  2. package/dist/components/alert.js +0 -7
  3. package/dist/components/breadcrumb.js +1 -1
  4. package/dist/components/button.js +2 -2
  5. package/dist/components/chart-theme.d.ts +1 -1
  6. package/dist/components/command-spotlight.d.ts +2 -1
  7. package/dist/components/command-spotlight.js +11 -23
  8. package/dist/components/context-menu.d.ts +1 -1
  9. package/dist/components/context-menu.js +1 -1
  10. package/dist/components/dashboard-grid.d.ts +1 -1
  11. package/dist/components/dashboard-section.d.ts +1 -1
  12. package/dist/components/data-list.d.ts +1 -1
  13. package/dist/components/data-table-filters.d.ts +1 -1
  14. package/dist/components/data-table-toolbar.d.ts +1 -1
  15. package/dist/components/data-table.js +1 -1
  16. package/dist/components/dropdown-menu.d.ts +1 -1
  17. package/dist/components/dropdown-menu.js +1 -1
  18. package/dist/components/error-state.d.ts +1 -1
  19. package/dist/components/eyebrow.d.ts +1 -1
  20. package/dist/components/feed-item.js +4 -11
  21. package/dist/components/icon-badge.d.ts +1 -1
  22. package/dist/components/icon-button.js +1 -1
  23. package/dist/components/input.js +1 -1
  24. package/dist/components/label.d.ts +1 -1
  25. package/dist/components/label.js +1 -1
  26. package/dist/components/loading-overlay.d.ts +1 -1
  27. package/dist/components/media-library.js +2 -4
  28. package/dist/components/metric.d.ts +1 -1
  29. package/dist/components/metric.js +1 -1
  30. package/dist/components/page-header.d.ts +1 -1
  31. package/dist/components/progress.js +2 -1
  32. package/dist/components/sankey-chart.js +1 -1
  33. package/dist/components/search-input.d.ts +1 -1
  34. package/dist/components/search-input.js +1 -1
  35. package/dist/components/select.js +1 -1
  36. package/dist/components/sidebar.d.ts +1 -1
  37. package/dist/components/sidebar.js +1 -1
  38. package/dist/components/skeleton.d.ts +1 -1
  39. package/dist/components/stat-card.d.ts +1 -1
  40. package/dist/components/sunburst-chart.js +1 -1
  41. package/dist/components/table.js +3 -16
  42. package/dist/components/textarea.js +1 -1
  43. package/dist/components/timeline.d.ts +1 -1
  44. package/dist/layout/admin-shell.d.ts +1 -1
  45. package/dist/layout/auth-shell.d.ts +8 -1
  46. package/dist/layout/auth-shell.js +8 -1
  47. package/dist/layout/panel-layout.js +0 -4
  48. package/dist/styles.css +1 -1
  49. package/dist/theme/theme-provider.d.ts +2 -2
  50. package/dist/theme/theme-provider.js +16 -20
  51. package/dist/theme/types.d.ts +11 -0
  52. package/dist/utils/attention-color.js +4 -4
  53. package/dist/utils/avatar-initial.d.ts +1 -0
  54. package/dist/utils/avatar-initial.js +3 -0
  55. package/dist/utils/clamp-percent.d.ts +1 -0
  56. package/dist/utils/clamp-percent.js +3 -0
  57. package/dist/utils/format.js +17 -14
  58. package/dist/utils/hooks.d.ts +1 -1
  59. package/dist/utils/hooks.js +4 -8
  60. package/dist/utils/source-label.d.ts +1 -0
  61. package/dist/utils/source-label.js +9 -0
  62. package/package.json +8 -3
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
  import { ResponsiveContainer, Sankey as RechartsSankey, Tooltip } from 'recharts';
5
5
  import { cn } from '../utils/cn.js';
6
6
  import { chartTheme } from './chart-theme.js';
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  import { type InputProps } from './input';
3
3
  export interface SearchInputProps extends Omit<InputProps, 'startIcon' | 'endIcon' | 'type'> {
4
4
  onClear?: () => void;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import * as React from 'react';
2
+ import React from 'react';
3
3
  import { Search, X } from 'lucide-react';
4
4
  import { cn } from '../utils/cn.js';
5
5
  import { Input } from './input.js';
@@ -12,7 +12,7 @@ const triggerSizeClasses = {
12
12
  };
13
13
  export function Select({ 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, autoFocus, className, contentClassName, disabled = false, error = false, id, name, onChange, options, placeholder = 'Select…', required, size = 'md', startIcon, value }) {
14
14
  const hasEmptyOption = options.some((option) => option.value === '');
15
- const internalValue = value === '' && hasEmptyOption ? EMPTY_OPTION_VALUE : value || undefined;
15
+ const internalValue = value === '' && hasEmptyOption ? EMPTY_OPTION_VALUE : value;
16
16
  const branchRef = useModalBranch();
17
17
  return (_jsxs(SelectPrimitive.Root, { disabled: disabled, name: name, required: required, value: internalValue, onValueChange: (nextValue) => onChange(nextValue === EMPTY_OPTION_VALUE ? '' : nextValue), children: [_jsxs(SelectPrimitive.Trigger, { id: id, autoFocus: autoFocus, "aria-label": ariaLabel ?? placeholder, "aria-describedby": ariaDescribedBy, "aria-invalid": error || undefined, className: cn('flex w-full items-center rounded-[var(--radius-ui)] border border-sand/40 bg-white text-left 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 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 data-[state=open]:border-sea/70 data-[state=open]:ring-2 data-[state=open]:ring-sea/10 data-[disabled]:cursor-not-allowed data-[disabled]:bg-light-sand/65 data-[disabled]:opacity-60 dark:border-white/15 dark:bg-deep-sea dark:text-text-primary dark:hover:border-white/25 dark:focus:border-accent-blue dark:focus:ring-accent-blue/12 dark:data-[state=open]:border-accent-blue dark:data-[state=open]:ring-accent-blue/12', triggerSizeClasses[size], error && 'border-terracotta focus:border-terracotta focus:ring-terracotta/15 dark:border-terracotta', className), children: [startIcon ? _jsx("span", { className: 'flex shrink-0 items-center text-sea dark:text-accent-blue', "aria-hidden": 'true', children: startIcon }) : null, _jsx("span", { className: 'min-w-0 flex-1 truncate', children: _jsx(SelectPrimitive.Value, { placeholder: placeholder }) }), _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDown, { size: 17, className: 'shrink-0 text-text-secondary', "aria-hidden": 'true' }) })] }), _jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { ref: branchRef, position: 'popper', side: 'bottom', align: 'start', sideOffset: 4, collisionPadding: 8, sticky: 'always', updatePositionStrategy: 'always', className: cn('z-50 w-[var(--radix-select-trigger-width)] overflow-hidden rounded-[var(--radius-ui)] border border-sand/40 bg-white shadow-[var(--shadow-overlay)] outline-none data-[side=bottom]:origin-top data-[side=top]:origin-bottom data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 data-[state=open]:zoom-in-[0.99] data-[state=closed]:zoom-out-[0.99] data-[state=open]:duration-[var(--motion-surface)] data-[state=closed]:duration-[var(--motion-exit)] data-[state=open]:ease-premium data-[state=closed]:ease-in dark:border-white/15 dark:bg-deep-sea', contentClassName), children: [_jsx(SelectPrimitive.ScrollUpButton, { className: 'flex h-7 items-center justify-center border-b border-sand/15 bg-white text-text-secondary dark:border-white/10 dark:bg-deep-sea', children: _jsx(ChevronUp, { size: 15, "aria-hidden": 'true' }) }), _jsx(SelectPrimitive.Viewport, { className: 'max-h-[min(18rem,var(--radix-select-content-available-height))] p-1', children: options.map((option) => (_jsxs(SelectPrimitive.Item, { value: option.value === '' ? EMPTY_OPTION_VALUE : option.value, disabled: option.disabled, className: cn('relative flex cursor-default select-none items-center rounded-[5px] pl-3 pr-9 text-text-primary outline-none transition-[background-color,color,opacity] duration-[var(--motion-control)] ease-premium data-[disabled]:pointer-events-none data-[highlighted]:bg-light-sand data-[disabled]:opacity-40 data-[state=checked]:font-medium data-[state=checked]:text-sea dark:text-text-primary dark:data-[highlighted]:bg-white/[0.07] dark:data-[state=checked]:text-accent-blue', size === 'sm' ? 'min-h-8 py-1.5 text-[13px]' : size === 'lg' ? 'min-h-10 py-2 text-[15px]' : 'min-h-9 py-1.5 text-sm'), children: [_jsx(SelectPrimitive.ItemText, { children: option.label }), _jsx(SelectPrimitive.ItemIndicator, { className: 'absolute right-3 inline-flex items-center', children: _jsx(Check, { size: 15, "aria-hidden": 'true' }) })] }, option.value))) }), _jsx(SelectPrimitive.ScrollDownButton, { className: 'flex h-7 items-center justify-center border-t border-sand/15 bg-white text-text-secondary dark:border-white/10 dark:bg-deep-sea', children: _jsx(ChevronDown, { size: 15, "aria-hidden": 'true' }) })] }) })] }));
18
18
  }
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export interface SidebarItem {
3
3
  id: string;
4
4
  label: string;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
  import { ChevronRight } from 'lucide-react';
5
5
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
6
6
  import { cn } from '../utils/cn.js';
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
3
3
  circle?: boolean;
4
4
  width?: string | number;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export type StatTrendDirection = 'up' | 'down' | 'neutral';
3
3
  export interface StatCardProps {
4
4
  title: string;
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import * as React from 'react';
3
+ import React from 'react';
4
4
  import { ResponsiveContainer, SunburstChart as RechartsSunburstChart } from 'recharts';
5
5
  import { cn } from '../utils/cn.js';
6
6
  import { chartTheme } from './chart-theme.js';
@@ -29,20 +29,10 @@ export const TableFooter = React.forwardRef(function TableFooter({ className, ..
29
29
  });
30
30
  // ─── TableRow ─────────────────────────────────────────────────────────────────
31
31
  let hoveredRow = null;
32
- export const TableRow = React.forwardRef(function TableRow({ className, onMouseEnter, onMouseLeave, ...props }, ref) {
33
- const rowRef = React.useRef(null);
34
- const mergedRef = React.useCallback((el) => {
35
- rowRef.current = el;
36
- if (typeof ref === 'function')
37
- ref(el);
38
- else if (ref)
39
- ref.current = el;
40
- }, [ref]);
32
+ export const TableRow = React.forwardRef(function TableRow({ className, onMouseEnter, ...props }, ref) {
41
33
  const handleMouseEnter = React.useCallback((e) => {
42
34
  onMouseEnter?.(e);
43
- const el = rowRef.current;
44
- if (!el)
45
- return;
35
+ const el = e.currentTarget;
46
36
  const prev = hoveredRow;
47
37
  hoveredRow = el;
48
38
  if (prev && prev !== el) {
@@ -52,10 +42,7 @@ export const TableRow = React.forwardRef(function TableRow({ className, onMouseE
52
42
  });
53
43
  }
54
44
  }, [onMouseEnter]);
55
- const handleMouseLeave = React.useCallback((e) => {
56
- onMouseLeave?.(e);
57
- }, [onMouseLeave]);
58
- return (_jsx("tr", { ref: mergedRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, className: cn('border-b border-sand/20 data-[selected=true]:bg-sea/[0.045] dark:border-white/[0.07] dark:data-[selected=true]:bg-accent-blue/[0.08]', 'transition-colors duration-[var(--motion-surface)] ease-premium hover:bg-light-sand/45 dark:hover:bg-white/[0.035]', className), ...props }));
45
+ return (_jsx("tr", { ref: ref, onMouseEnter: handleMouseEnter, className: cn('border-b border-sand/20 data-[selected=true]:bg-sea/[0.045] dark:border-white/[0.07] dark:data-[selected=true]:bg-accent-blue/[0.08]', 'transition-colors duration-[var(--motion-surface)] ease-premium hover:bg-light-sand/45 dark:hover:bg-white/[0.035]', className), ...props }));
59
46
  });
60
47
  // ─── TableHead (<th>) ─────────────────────────────────────────────────────────
61
48
  export const TableHead = React.forwardRef(function TableHead({ className, ...props }, ref) {
@@ -7,5 +7,5 @@ const sizeClasses = {
7
7
  lg: 'min-h-32 px-4 py-3 text-base'
8
8
  };
9
9
  export const Textarea = React.forwardRef(function Textarea({ 'aria-invalid': ariaInvalid, className, error = false, textareaSize = 'md', rows = 4, ...props }, ref) {
10
- return (_jsx("textarea", { ref: ref, rows: rows, "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', 'resize-y', error ? 'border-terracotta focus:border-terracotta focus:ring-terracotta/15 dark:border-terracotta' : '', sizeClasses[textareaSize], className), ...props }));
10
+ return (_jsx("textarea", { ref: ref, rows: rows, "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 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', 'resize-y', error ? 'border-terracotta focus:border-terracotta focus:ring-terracotta/15 dark:border-terracotta' : '', sizeClasses[textareaSize], className), ...props }));
11
11
  });
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export type TimelineStatus = 'completed' | 'active' | 'pending' | 'error';
3
3
  export interface TimelineItem {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import React from 'react';
2
2
  export interface AdminShellProps {
3
3
  children: React.ReactNode;
4
4
  className?: string;
@@ -10,5 +10,12 @@ export interface AuthShellProps extends React.HTMLAttributes<HTMLElement> {
10
10
  layout?: AuthShellLayout;
11
11
  side?: AuthShellSide;
12
12
  }
13
- /** A page-level shell for sign-in, recovery, invitation, and other access flows. */
13
+ /**
14
+ * A page-level shell for sign-in, recovery, invitation, and other access flows.
15
+ *
16
+ * This is the required outer layout for every React-DOM product login, including
17
+ * its loading, unavailable, and error states. Products customize it only through
18
+ * `layout`, `side`, `brand`, `aside`, `asideLabel`, `footer`, `className` and their
19
+ * own children, and never duplicate its page structure. See docs/auth-shell-standard.md.
20
+ */
14
21
  export declare function AuthShell({ aside, asideLabel, brand, children, className, footer, layout, side, ...props }: AuthShellProps): import("react/jsx-runtime").JSX.Element;
@@ -4,7 +4,14 @@ const splitColumnClasses = {
4
4
  start: 'lg:grid-cols-[minmax(24rem,5fr)_minmax(0,7fr)]',
5
5
  end: 'lg:grid-cols-[minmax(0,7fr)_minmax(24rem,5fr)]'
6
6
  };
7
- /** A page-level shell for sign-in, recovery, invitation, and other access flows. */
7
+ /**
8
+ * A page-level shell for sign-in, recovery, invitation, and other access flows.
9
+ *
10
+ * This is the required outer layout for every React-DOM product login, including
11
+ * its loading, unavailable, and error states. Products customize it only through
12
+ * `layout`, `side`, `brand`, `aside`, `asideLabel`, `footer`, `className` and their
13
+ * own children, and never duplicate its page structure. See docs/auth-shell-standard.md.
14
+ */
8
15
  export function AuthShell({ aside, asideLabel, brand, children, className, footer, layout = 'centered', side = 'end', ...props }) {
9
16
  const hasAside = layout === 'split' && Boolean(aside);
10
17
  return (_jsxs("main", { className: cn('min-h-screen bg-light-sand/35 text-text-primary dark:bg-background dark:text-text-primary', hasAside && 'grid bg-background', hasAside && splitColumnClasses[side], className), "data-layout": layout, "data-side": side, ...props, children: [_jsx("section", { className: 'flex min-h-screen bg-background px-5 py-6 sm:px-8 sm:py-8 lg:px-12 xl:px-16', "data-slot": 'access', children: _jsxs("div", { className: 'mx-auto flex w-full max-w-md flex-1 flex-col', children: [brand ? _jsx("div", { "data-slot": 'brand', children: brand }) : null, _jsx("div", { className: 'flex flex-1 items-center py-10 sm:py-14', "data-slot": 'content', children: _jsx("div", { className: 'w-full', children: children }) }), footer ? _jsx("footer", { className: 'font-secondary text-xs leading-5 text-text-secondary', "data-slot": 'footer', children: footer }) : null] }) }), hasAside ? (_jsxs("aside", { "aria-label": asideLabel, className: cn('relative hidden min-h-screen overflow-hidden bg-deep-sea text-white lg:flex', side === 'start' && 'lg:order-first'), "data-slot": 'aside', children: [_jsx("div", { className: 'relative z-10 flex w-full items-end p-12 xl:p-16', children: aside }), _jsx("div", { className: 'pointer-events-none absolute -right-24 -top-24 size-80 rounded-full border border-white/10', "aria-hidden": 'true' }), _jsx("div", { className: 'pointer-events-none absolute -right-10 -top-10 size-52 rounded-full border border-white/10', "aria-hidden": 'true' })] })) : null] }));
@@ -20,10 +20,6 @@ export function PanelLayout({ children, className, padding }) {
20
20
  if (!React.isValidElement(child))
21
21
  return child;
22
22
  const shouldFill = Boolean(child.props.grow);
23
- // PanelColumn already handles its own layout — render it directly.
24
- if (child.type === PanelColumn) {
25
- return _jsx("div", { className: cn('flex h-full min-h-0 flex-col', shouldFill ? 'flex-1 min-w-0' : 'shrink-0'), children: child });
26
- }
27
23
  return _jsx("div", { className: cn('flex h-full min-h-0 flex-col', shouldFill ? 'flex-1 min-w-0' : 'shrink-0'), children: child });
28
24
  }) }) }));
29
25
  }