@gaulatti/bleecker 0.1.5 → 0.1.6

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.
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ChevronDown, ChevronRight } from 'lucide-react';
3
3
  import React from 'react';
4
- import { cn } from '../utils/cn';
4
+ import { cn } from '../utils/cn.js';
5
5
  export function Accordion({ className, defaultExpandedId = null, items }) {
6
6
  const [expandedId, setExpandedId] = React.useState(defaultExpandedId);
7
7
  return (_jsx("div", { className: cn('overflow-hidden rounded-xl border border-sand/10 bg-white shadow-sm dark:border-sand/20 dark:bg-sand/10', className), children: _jsx("ul", { className: 'divide-y divide-sand/10 dark:divide-sand/20', children: items.map((item) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  const patternConfig = {
4
4
  nazca: {
5
5
  bgClassName: 'bg-accent-bronze',
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { renderDefaultLink } from './nav-menu';
3
- import { cn } from '../utils/cn';
2
+ import { renderDefaultLink } from './nav-menu.js';
3
+ import { cn } from '../utils/cn.js';
4
4
  export function BrandLockup({ className, href, logoAlt, logoSrc, name, renderLink }) {
5
5
  const linkRenderer = renderLink ?? renderDefaultLink;
6
6
  return (_jsx(_Fragment, { children: linkRenderer({
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { cn } from '../utils/cn';
3
+ import { cn } from '../utils/cn.js';
4
4
  const variantClasses = {
5
5
  primary: 'bg-sea text-white hover:bg-desert border-transparent',
6
6
  secondary: 'bg-white/65 text-text-primary border-sand/20 hover:bg-white dark:bg-sand/20 dark:text-text-primary dark:border-sand/50 dark:hover:bg-sand/30',
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  export function Card({ className, ...props }) {
4
4
  return (_jsx("div", { className: cn('rounded-[28px] border border-sand/10 dark:border-dark-sand/30 bg-white/80 dark:bg-dark-sand/80 p-6 shadow-sm backdrop-blur-sm transition-all duration-400', className), ...props }));
5
5
  }
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ArrowUpDown, Filter, X } from 'lucide-react';
3
3
  import React from 'react';
4
- import { Select } from './select';
5
- import { cn } from '../utils/cn';
4
+ import { Select } from './select.js';
5
+ import { cn } from '../utils/cn.js';
6
6
  export function CollectionFilters({ className, currentFilters, currentSort, filterOptions, onFilterChange, onSortChange, sortOptions }) {
7
7
  const [showFilters, setShowFilters] = React.useState(false);
8
8
  const activeFilterCount = Object.keys(currentFilters).length;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  export function HeaderSelect({ className, disabled, icon, onChange, options, placeholder = 'Select option', value, wrapperClassName, ...props }) {
4
4
  return (_jsxs("div", { className: cn('inline-flex items-center gap-1.5 rounded-full border border-sand/20 bg-white/35 px-3 py-1.5 shadow-sm backdrop-blur-md dark:border-sand/70 dark:bg-sand/25', disabled && 'opacity-50', wrapperClassName), children: [icon, _jsxs("select", { value: value, disabled: disabled, onChange: (event) => onChange(event.target.value), className: cn('max-w-[140px] cursor-pointer bg-transparent text-sm text-text-primary focus:outline-none dark:text-text-primary', className), ...props, children: [_jsx("option", { value: '', children: placeholder }), options.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] })] }));
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { cn } from '../utils/cn';
3
+ import { cn } from '../utils/cn.js';
4
4
  const defaultBackgroundClassName = 'bg-gradient-to-r from-deep-sea via-dusk to-accent-oxblood';
5
5
  function defaultRenderLink({ ariaLabel, children, className, item }) {
6
6
  return (_jsx("a", { href: item.href, "aria-label": ariaLabel, className: className, rel: item.external ? 'noreferrer noopener' : undefined, target: item.external ? '_blank' : undefined, children: children }));
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  const sizeClassNames = {
4
4
  md: 'h-14 w-14',
5
5
  lg: 'h-16 w-16'
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { cn } from '../utils/cn';
3
+ import { cn } from '../utils/cn.js';
4
4
  export const IconButton = React.forwardRef(function IconButton({ className, type = 'button', ...props }, ref) {
5
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 dark:focus-visible:ring-accent-blue', className), ...props }));
6
6
  });
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  const sizeClasses = {
4
4
  sm: 'h-4 w-4 border-2',
5
5
  md: 'h-8 w-8 border-2',
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Copy, Search, Trash2 } from 'lucide-react';
3
3
  import React from 'react';
4
- import { Modal } from './modal';
5
- import { cn } from '../utils/cn';
4
+ import { Modal } from './modal.js';
5
+ import { cn } from '../utils/cn.js';
6
6
  export function MediaLibrary({ actions, className, emptyMessage = 'No media found.', filterSlot, items, onCopy, onDelete, onSearchTermChange, searchPlaceholder = 'Search media...', searchTerm, title }) {
7
7
  const [selectedMedia, setSelectedMedia] = React.useState(null);
8
8
  const handleCopy = (text) => {
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { X } from 'lucide-react';
3
3
  import React from 'react';
4
4
  import { createPortal } from 'react-dom';
5
- import { cn } from '../utils/cn';
5
+ import { cn } from '../utils/cn.js';
6
6
  export function Modal({ children, className, isOpen, onClose, title }) {
7
7
  const dialogRef = React.useRef(null);
8
8
  React.useEffect(() => {
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { cn } from '../utils/cn';
3
+ import { cn } from '../utils/cn.js';
4
4
  export function renderDefaultLink({ children, className, item, onClick }) {
5
5
  return (_jsx("a", { href: item.href, className: className, onClick: onClick, rel: item.external ? 'noreferrer noopener' : undefined, target: item.external ? '_blank' : undefined, children: children }));
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ChevronLeft, ChevronRight } from 'lucide-react';
3
- import { cn } from '../utils/cn';
3
+ import { cn } from '../utils/cn.js';
4
4
  export function Pagination({ className, currentPage, hasNextPage, hasPrevPage, onPageChange, totalPages }) {
5
5
  if (totalPages <= 1) {
6
6
  return null;
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  export function SectionHeader({ className, description, eyebrow, title, ...props }) {
4
4
  return (_jsxs("div", { className: cn('space-y-3', className), ...props, children: [eyebrow ? _jsx("p", { className: 'text-sm uppercase tracking-elegant text-desert', children: eyebrow }) : null, _jsxs("div", { className: 'space-y-2', children: [_jsx("h2", { className: 'text-3xl font-semibold text-text-primary dark:text-text-primary', children: title }), description ? _jsx("p", { className: 'max-w-2xl text-base leading-relaxed text-text-secondary dark:text-text-secondary', children: description }) : null] })] }));
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Check, ChevronDown } from 'lucide-react';
3
3
  import React from 'react';
4
- import { cn } from '../utils/cn';
4
+ import { cn } from '../utils/cn.js';
5
5
  export function Select({ className, disabled = false, error = false, onChange, options, placeholder = 'Select...', value }) {
6
6
  const [isOpen, setIsOpen] = React.useState(false);
7
7
  const [searchTerm, setSearchTerm] = React.useState('');
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ArrowUpDown } from 'lucide-react';
3
- import { cn } from '../utils/cn';
3
+ import { cn } from '../utils/cn.js';
4
4
  export function SortableTableHeader({ align = 'left', className, currentSort, field, label, onSort, sortable = true }) {
5
5
  const isSorted = currentSort.field === field;
6
6
  if (!sortable) {
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  export function Tabs({ activeTab, className, onChange, tabs }) {
4
4
  return (_jsx("nav", { className: cn('-mb-px flex', className), "aria-label": 'Tabs', children: tabs.map((tab) => {
5
5
  const isActive = tab.id === activeTab;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Monitor, Moon, Sun } from 'lucide-react';
3
- import { useTheme } from '../theme/theme-provider';
4
- import { IconButton } from './icon-button';
3
+ import { useTheme } from '../theme/theme-provider.js';
4
+ import { IconButton } from './icon-button.js';
5
5
  export function ThemeToggle(props) {
6
6
  const { cycleTheme, theme } = useTheme();
7
7
  const label = theme === 'light' ? 'Switch to dark theme' : theme === 'dark' ? 'Switch to system theme' : 'Switch to light theme';
package/dist/index.js CHANGED
@@ -1,27 +1,27 @@
1
- export * from './components/brand-lockup';
2
- export * from './components/bauhaus-background';
3
- export * from './components/button';
4
- export * from './components/card';
5
- export * from './components/accordion';
6
- export * from './components/header-select';
7
- export * from './components/hero-carousel';
8
- export * from './components/icon-badge';
9
- export * from './components/icon-button';
10
- export * from './components/loading-spinner';
11
- export * from './components/media-library';
12
- export * from './components/modal';
13
- export * from './components/nav-menu';
14
- export * from './components/pagination';
15
- export * from './components/collection-filters';
16
- export * from './components/select';
17
- export * from './components/section-header';
18
- export * from './components/sortable-table-header';
19
- export * from './components/tabs';
20
- export * from './components/theme-toggle';
21
- export * from './layout/app-shell';
22
- export * from './layout/footer';
23
- export * from './layout/header';
24
- export * from './theme/theme-provider';
25
- export * from './theme/theme-script';
26
- export * from './theme/types';
27
- export * from './utils/cn';
1
+ export * from './components/brand-lockup.js';
2
+ export * from './components/bauhaus-background.js';
3
+ export * from './components/button.js';
4
+ export * from './components/card.js';
5
+ export * from './components/accordion.js';
6
+ export * from './components/header-select.js';
7
+ export * from './components/hero-carousel.js';
8
+ export * from './components/icon-badge.js';
9
+ export * from './components/icon-button.js';
10
+ export * from './components/loading-spinner.js';
11
+ export * from './components/media-library.js';
12
+ export * from './components/modal.js';
13
+ export * from './components/nav-menu.js';
14
+ export * from './components/pagination.js';
15
+ export * from './components/collection-filters.js';
16
+ export * from './components/select.js';
17
+ export * from './components/section-header.js';
18
+ export * from './components/sortable-table-header.js';
19
+ export * from './components/tabs.js';
20
+ export * from './components/theme-toggle.js';
21
+ export * from './layout/app-shell.js';
22
+ export * from './layout/footer.js';
23
+ export * from './layout/header.js';
24
+ export * from './theme/theme-provider.js';
25
+ export * from './theme/theme-script.js';
26
+ export * from './theme/types.js';
27
+ export * from './utils/cn.js';
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '../utils/cn';
2
+ import { cn } from '../utils/cn.js';
3
3
  export function AppShell({ children, className, contentClassName, footer, header, offsetHeader = true }) {
4
4
  return (_jsxs("div", { className: cn('min-h-screen flex flex-col bg-light-sand text-text-primary dark:bg-deep-sea dark:text-text-primary', className), children: [header, _jsx("main", { className: cn('flex-1 flex flex-col min-h-0', offsetHeader && 'pt-20', contentClassName), children: _jsx("div", { className: 'flex-1 flex flex-col min-h-0', children: children }) }), footer] }));
5
5
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { renderDefaultLink } from '../components/nav-menu';
3
- import { cn } from '../utils/cn';
2
+ import { renderDefaultLink } from '../components/nav-menu.js';
3
+ import { cn } from '../utils/cn.js';
4
4
  export function Footer({ bottomLeft, bottomRight, brand, className, renderLink, sections, showBottomAccent = true }) {
5
5
  const linkRenderer = renderLink ?? renderDefaultLink;
6
6
  const githubItem = sections.flatMap((section) => section.items).find((item) => item.href.includes('github.com'));
@@ -1,8 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { BrandLockup } from '../components/brand-lockup';
4
- import { NavMenu } from '../components/nav-menu';
5
- import { cn } from '../utils/cn';
3
+ import { BrandLockup } from '../components/brand-lockup.js';
4
+ import { NavMenu } from '../components/nav-menu.js';
5
+ import { cn } from '../utils/cn.js';
6
6
  export function Header({ actions, brand, className, mobileActions, navigation, renderLink }) {
7
7
  const [mobileMenuOpen, setMobileMenuOpen] = React.useState(false);
8
8
  return (_jsxs("header", { className: cn('fixed top-0 z-50 w-full bg-white/90 font-[family-name:var(--font-header)] backdrop-blur-2xl shadow-[0_1px_3px_0_rgb(0,0,0,0.02)] dark:bg-dark-sand/95 dark:shadow-[0_1px_3px_0_rgb(0,0,0,0.3)]', className), children: [_jsx("div", { className: 'container mx-auto px-4', children: _jsxs("div", { className: 'flex h-20 items-center justify-between gap-6', children: [_jsx(BrandLockup, { ...brand, renderLink: renderLink }), _jsx("div", { className: 'hidden md:flex md:flex-1 md:items-center md:justify-center', children: _jsx(NavMenu, { items: navigation, renderLink: renderLink }) }), _jsx("div", { className: 'hidden md:flex md:items-center md:gap-3', children: actions }), _jsx("button", { className: 'group md:hidden', "aria-label": 'Toggle navigation menu', type: 'button', onClick: () => setMobileMenuOpen((value) => !value), children: _jsxs("div", { className: 'flex h-5 w-6 flex-col justify-between', children: [_jsx("span", { className: cn('h-px w-full bg-text-primary transition-all duration-400', mobileMenuOpen && 'translate-y-2 rotate-45') }), _jsx("span", { className: cn('h-px w-full bg-text-primary transition-all duration-400', mobileMenuOpen && 'opacity-0') }), _jsx("span", { className: cn('h-px w-full bg-text-primary transition-all duration-400', mobileMenuOpen && '-translate-y-2 -rotate-45') })] }) })] }) }), _jsx("div", { className: cn('md:hidden absolute left-0 top-20 w-full origin-top overflow-hidden border-t border-sand/10 bg-white/95 shadow-lg backdrop-blur-xl transition-all duration-400 dark:bg-sand/95', mobileMenuOpen ? 'max-h-96 opacity-100' : 'max-h-0 opacity-0'), children: _jsxs("div", { className: 'container mx-auto flex flex-col gap-5 px-4 py-6', children: [mobileActions ? _jsx("div", { className: 'flex items-center gap-3', children: mobileActions }) : null, _jsx(NavMenu, { direction: 'vertical', items: navigation, onItemClick: () => setMobileMenuOpen(false), renderLink: renderLink })] }) }), _jsx("div", { className: 'h-px w-full bg-gradient-to-r from-transparent via-sunset/30 to-transparent' })] }));
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { resolveTheme } from './theme-script';
3
+ import { resolveTheme } from './theme-script.js';
4
4
  const ThemeContext = React.createContext(null);
5
5
  function nextTheme(theme) {
6
6
  if (theme === 'light') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gaulatti/bleecker",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/gaulatti/bleecker"
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "scripts": {
34
34
  "build:css": "tailwindcss -i src/styles/global.css -o src/styles/compiled.css --minify",
35
- "build": "npm run build:css && tsc",
35
+ "build": "npm run build:css && tsc && node scripts/fix-esm-imports.mjs",
36
36
  "storybook": "npm run build:css && storybook dev -p 6006",
37
37
  "build-storybook": "npm run build:css && storybook build",
38
38
  "typecheck": "tsc --noEmit -p tsconfig.json"