@cytario/design 2.4.0 → 3.1.0

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.
package/dist/index.d.ts CHANGED
@@ -7,14 +7,15 @@ import React__default, { ReactNode } from 'react';
7
7
  import { TreeApi } from 'react-arborist';
8
8
  export { TreeApi } from 'react-arborist';
9
9
 
10
+ type Size = "sm" | "md" | "lg";
10
11
  type ButtonVariant = "primary" | "secondary" | "ghost" | "destructive" | "default" | "success" | "info" | "neutral";
11
- type ButtonSize = "sm" | "md" | "lg";
12
12
 
13
+ type ButtonSize$1 = Size;
13
14
  interface ButtonProps extends ButtonProps$1 {
14
15
  /** Visual style variant */
15
16
  variant?: ButtonVariant;
16
17
  /** Size preset */
17
- size?: ButtonSize;
18
+ size?: ButtonSize$1;
18
19
  /** Shows a spinner and disables interaction */
19
20
  isLoading?: boolean;
20
21
  /** Lucide icon rendered before children */
@@ -94,7 +95,7 @@ interface InputProps extends Omit<TextFieldProps, "children" | "className"> {
94
95
  /** HTML input type */
95
96
  type?: "text" | "email" | "password" | "number";
96
97
  /** Controls padding and font size */
97
- size?: "sm" | "md" | "lg";
98
+ size?: Size;
98
99
  /** Text prefix shown inside the input on the left (e.g., "$", "https://") */
99
100
  prefix?: string;
100
101
  /** Text alignment within the input */
@@ -113,11 +114,13 @@ interface SelectProps extends Omit<SelectProps$1<SelectItem>, "children"> {
113
114
  label?: string;
114
115
  placeholder?: string;
115
116
  errorMessage?: string;
117
+ /** Controls padding and font size */
118
+ size?: Size;
116
119
  /** Custom visual renderer for items in the dropdown and trigger.
117
120
  * `item.name` remains the accessible label (used for typeahead and screen readers). */
118
121
  renderItem?: (item: SelectItem) => React__default.ReactNode;
119
122
  }
120
- declare function Select({ label, items, placeholder, errorMessage, isDisabled, isRequired, className, renderItem, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
123
+ declare function Select({ label, items, placeholder, errorMessage, size, isDisabled, isRequired, className, renderItem, ...props }: SelectProps): react_jsx_runtime.JSX.Element;
121
124
 
122
125
  type TableSize = "compact" | "comfortable";
123
126
  interface DataTableProps extends TableProps {
@@ -303,6 +306,7 @@ interface BreadcrumbsProps {
303
306
  }
304
307
  declare function Breadcrumbs({ items, className }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
305
308
 
309
+ type ButtonSize = Size;
306
310
  interface ButtonLinkProps extends Omit<LinkProps$1, "className"> {
307
311
  /** Visual style variant */
308
312
  variant?: ButtonVariant;
@@ -581,40 +585,25 @@ interface SegmentedControlItemProps extends Omit<ToggleButtonProps$1, "className
581
585
  }
582
586
  declare function SegmentedControlItem({ className, ...props }: SegmentedControlItemProps): react_jsx_runtime.JSX.Element;
583
587
 
584
- declare function getFileIcon(type: "directory" | "file", extension?: string): LucideIcon;
585
- declare function getTypeLabel(type: "directory" | "file", extension?: string): string;
586
- declare function FileIcon({ type, extension, size, }: {
587
- type: "directory" | "file";
588
- extension?: string;
589
- size?: number;
590
- }): react_jsx_runtime.JSX.Element;
591
588
  interface FileCardProps {
592
589
  /** File or folder name */
593
590
  name: string;
594
- /** Whether this is a directory or file */
595
- type: "directory" | "file";
591
+ /** Icon to display in thumbnail fallback and metadata row */
592
+ icon?: LucideIcon;
596
593
  /** Human-readable file size (e.g., "12.3 GB") */
597
594
  size?: string;
598
- /** Last modified date/time */
599
- modified?: string;
600
- /** File extension (e.g., "ome.tif", "csv") */
601
- extension?: string;
602
- /** Whether a thumbnail preview is available */
603
- hasPreview?: boolean;
604
595
  /** Compact mode (smaller card, square aspect, minimal metadata) */
605
596
  compact?: boolean;
606
597
  /** Custom thumbnail content (e.g., an image preview) */
607
598
  children?: React__default.ReactNode;
608
599
  /** Info button handler */
609
600
  onInfo?: () => void;
610
- /** Navigation target clicking the card navigates here */
611
- href?: string;
612
- /** Handler for click/press interaction (use instead of href for programmatic navigation) */
601
+ /** Handler for click/press interaction */
613
602
  onPress?: () => void;
614
603
  /** Additional CSS classes */
615
604
  className?: string;
616
605
  }
617
- declare function FileCard({ name, type, size, extension, compact, children, onInfo, href, onPress, className, }: FileCardProps): react_jsx_runtime.JSX.Element;
606
+ declare function FileCard({ name, icon: IconComponent, size, compact, children, onInfo, onPress, className, }: FileCardProps): react_jsx_runtime.JSX.Element;
618
607
 
619
608
  interface StorageConnectionCardProps {
620
609
  name: string;
@@ -1037,4 +1026,4 @@ declare const LineHeightTight = 1.25;
1037
1026
  declare const LineHeightNormal = 1.5;
1038
1027
  declare const LineHeightRelaxed = 1.625;
1039
1028
 
1040
- export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, Cell, Checkbox, type CheckboxProps, ColorActionDanger, ColorActionDangerHover, ColorActionDefault, ColorActionDefaultHover, ColorActionInfo, ColorActionInfoHover, ColorActionPrimary, ColorActionPrimaryActive, ColorActionPrimaryHover, ColorActionSecondary, ColorActionSecondaryHover, ColorActionSuccess, ColorActionSuccessHover, ColorAmber100, ColorAmber200, ColorAmber300, ColorAmber400, ColorAmber50, ColorAmber500, ColorAmber600, ColorAmber700, ColorAmber800, ColorAmber900, ColorBadgeAmberBg, ColorBadgeAmberText, ColorBadgeGreenBg, ColorBadgeGreenText, ColorBadgeNeutralBg, ColorBadgeNeutralText, ColorBadgePurpleBg, ColorBadgePurpleText, ColorBadgeRoseBg, ColorBadgeRoseText, ColorBadgeSlateBg, ColorBadgeSlateText, ColorBadgeTealBg, ColorBadgeTealText, ColorBannerDangerBg, ColorBannerDangerBorder, ColorBannerDangerIcon, ColorBannerDangerText, ColorBannerInfoBg, ColorBannerInfoBorder, ColorBannerInfoIcon, ColorBannerInfoText, ColorBannerSuccessBg, ColorBannerSuccessBorder, ColorBannerSuccessIcon, ColorBannerSuccessText, ColorBannerWarningBg, ColorBannerWarningBorder, ColorBannerWarningIcon, ColorBannerWarningText, ColorBorderAccent, ColorBorderBrand, ColorBorderDanger, ColorBorderDefault, ColorBorderFocus, ColorBorderInfo, ColorBorderStrong, ColorBorderSuccess, ColorBorderWarning, ColorBrandAccent, ColorBrandPrimary, ColorDeltaDecreaseBg, ColorDeltaDecreaseIcon, ColorDeltaDecreaseText, ColorDeltaFlatBg, ColorDeltaFlatIcon, ColorDeltaFlatText, ColorDeltaIncreaseBg, ColorDeltaIncreaseIcon, ColorDeltaIncreaseText, ColorGreen100, ColorGreen200, ColorGreen300, ColorGreen400, ColorGreen50, ColorGreen500, ColorGreen600, ColorGreen700, ColorGreen800, ColorGreen900, ColorNeutral0, ColorNeutral100, ColorNeutral1000, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorNeutral950, ColorOverlayBackdrop, ColorProgressFill, ColorProgressFillDanger, ColorProgressFillSuccess, ColorProgressFillWarning, ColorProgressTrack, ColorPurple100, ColorPurple200, ColorPurple300, ColorPurple400, ColorPurple50, ColorPurple500, ColorPurple600, ColorPurple700, ColorPurple800, ColorPurple900, ColorRose100, ColorRose200, ColorRose300, ColorRose400, ColorRose50, ColorRose500, ColorRose600, ColorRose700, ColorRose800, ColorRose900, ColorSlate100, ColorSlate200, ColorSlate300, ColorSlate400, ColorSlate50, ColorSlate500, ColorSlate600, ColorSlate700, ColorSlate800, ColorSlate900, ColorStatusDanger, ColorStatusInfo, ColorStatusSuccess, ColorStatusWarning, ColorSurfaceAccent, ColorSurfaceBrand, ColorSurfaceDanger, ColorSurfaceDefault, ColorSurfaceHover, ColorSurfaceInfo, ColorSurfaceMuted, ColorSurfaceOverlay, ColorSurfacePressed, ColorSurfaceSelected, ColorSurfaceSelectedHover, ColorSurfaceSubtle, ColorSurfaceSuccess, ColorSurfaceWarning, ColorTeal100, ColorTeal200, ColorTeal300, ColorTeal400, ColorTeal50, ColorTeal500, ColorTeal600, ColorTeal700, ColorTeal800, ColorTeal900, ColorTextAccent, ColorTextBrand, ColorTextDanger, ColorTextInfo, ColorTextInverse, ColorTextPrimary, ColorTextSecondary, ColorTextSuccess, ColorTextTertiary, ColorTextWarning, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Field, type FieldProps, Fieldset, type FieldsetProps, FileCard, type FileCardProps, FileIcon, FontSize2xl, FontSize3xl, FontSize4xl, FontSize5xl, FontSizeBase, FontSizeLg, FontSizeSm, FontSizeXl, FontSizeXs, FontWeightBold, FontWeightExtrabold, FontWeightLight, FontWeightMedium, FontWeightRegular, FontWeightSemibold, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, type GroupPosition, H1, H2, H3, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, type IconProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupContext, type InputGroupProps, type InputProps, Label, type LabelProps, LineHeightNormal, LineHeightRelaxed, LineHeightTight, Link, type LinkProps, type LinkVariant, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuHeader, type MenuHeaderProps, MenuItem, type MenuItemData, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MetricCard, type MetricCardProps, type MetricCardSize, PathPill, type PathPillProps, Pill, type PillColor, type PillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SectionHeader, type SectionHeaderProps, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spacing1, Spacing12, Spacing16, Spacing2, Spacing3, Spacing4, Spacing6, Spacing8, Spinner, type SpinnerProps, StorageConnectionCard, type StorageConnectionCardProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ToastBridge, type ToastContextValue, type ToastData, type ToastPlacement, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleButton, ToggleButtonGroup, ToggleButtonGroupItem, type ToggleButtonGroupItemProps, type ToggleButtonGroupProps, type ToggleButtonGroupSize, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, createToastBridge, getFileIcon, getTypeLabel, pillColorFromName, useFormWizard, useInputGroup, useToast };
1029
+ export { Badge, type BadgeProps, type BadgeSize, type BadgeVariant, Banner, type BannerProps, type BannerVariant, BorderRadiusFull, BorderRadiusLg, BorderRadiusMd, BorderRadiusNone, BorderRadiusSm, BorderRadiusXl, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, ButtonLink, type ButtonLinkProps, type ButtonProps, type ButtonSize$1 as ButtonSize, type ButtonVariant, Card, type CardPadding, type CardProps, Cell, Checkbox, type CheckboxProps, ColorActionDanger, ColorActionDangerHover, ColorActionDefault, ColorActionDefaultHover, ColorActionInfo, ColorActionInfoHover, ColorActionPrimary, ColorActionPrimaryActive, ColorActionPrimaryHover, ColorActionSecondary, ColorActionSecondaryHover, ColorActionSuccess, ColorActionSuccessHover, ColorAmber100, ColorAmber200, ColorAmber300, ColorAmber400, ColorAmber50, ColorAmber500, ColorAmber600, ColorAmber700, ColorAmber800, ColorAmber900, ColorBadgeAmberBg, ColorBadgeAmberText, ColorBadgeGreenBg, ColorBadgeGreenText, ColorBadgeNeutralBg, ColorBadgeNeutralText, ColorBadgePurpleBg, ColorBadgePurpleText, ColorBadgeRoseBg, ColorBadgeRoseText, ColorBadgeSlateBg, ColorBadgeSlateText, ColorBadgeTealBg, ColorBadgeTealText, ColorBannerDangerBg, ColorBannerDangerBorder, ColorBannerDangerIcon, ColorBannerDangerText, ColorBannerInfoBg, ColorBannerInfoBorder, ColorBannerInfoIcon, ColorBannerInfoText, ColorBannerSuccessBg, ColorBannerSuccessBorder, ColorBannerSuccessIcon, ColorBannerSuccessText, ColorBannerWarningBg, ColorBannerWarningBorder, ColorBannerWarningIcon, ColorBannerWarningText, ColorBorderAccent, ColorBorderBrand, ColorBorderDanger, ColorBorderDefault, ColorBorderFocus, ColorBorderInfo, ColorBorderStrong, ColorBorderSuccess, ColorBorderWarning, ColorBrandAccent, ColorBrandPrimary, ColorDeltaDecreaseBg, ColorDeltaDecreaseIcon, ColorDeltaDecreaseText, ColorDeltaFlatBg, ColorDeltaFlatIcon, ColorDeltaFlatText, ColorDeltaIncreaseBg, ColorDeltaIncreaseIcon, ColorDeltaIncreaseText, ColorGreen100, ColorGreen200, ColorGreen300, ColorGreen400, ColorGreen50, ColorGreen500, ColorGreen600, ColorGreen700, ColorGreen800, ColorGreen900, ColorNeutral0, ColorNeutral100, ColorNeutral1000, ColorNeutral200, ColorNeutral300, ColorNeutral400, ColorNeutral50, ColorNeutral500, ColorNeutral600, ColorNeutral700, ColorNeutral800, ColorNeutral900, ColorNeutral950, ColorOverlayBackdrop, ColorProgressFill, ColorProgressFillDanger, ColorProgressFillSuccess, ColorProgressFillWarning, ColorProgressTrack, ColorPurple100, ColorPurple200, ColorPurple300, ColorPurple400, ColorPurple50, ColorPurple500, ColorPurple600, ColorPurple700, ColorPurple800, ColorPurple900, ColorRose100, ColorRose200, ColorRose300, ColorRose400, ColorRose50, ColorRose500, ColorRose600, ColorRose700, ColorRose800, ColorRose900, ColorSlate100, ColorSlate200, ColorSlate300, ColorSlate400, ColorSlate50, ColorSlate500, ColorSlate600, ColorSlate700, ColorSlate800, ColorSlate900, ColorStatusDanger, ColorStatusInfo, ColorStatusSuccess, ColorStatusWarning, ColorSurfaceAccent, ColorSurfaceBrand, ColorSurfaceDanger, ColorSurfaceDefault, ColorSurfaceHover, ColorSurfaceInfo, ColorSurfaceMuted, ColorSurfaceOverlay, ColorSurfacePressed, ColorSurfaceSelected, ColorSurfaceSelectedHover, ColorSurfaceSubtle, ColorSurfaceSuccess, ColorSurfaceWarning, ColorTeal100, ColorTeal200, ColorTeal300, ColorTeal400, ColorTeal50, ColorTeal500, ColorTeal600, ColorTeal700, ColorTeal800, ColorTeal900, ColorTextAccent, ColorTextBrand, ColorTextDanger, ColorTextInfo, ColorTextInverse, ColorTextPrimary, ColorTextSecondary, ColorTextSuccess, ColorTextTertiary, ColorTextWarning, Column, type DataTableProps, type DeltaFormat, DeltaIndicator, type DeltaIndicatorProps, type DeltaMode, Dialog, type DialogProps, EmptyState, type EmptyStateProps, Field, type FieldProps, Fieldset, type FieldsetProps, FileCard, type FileCardProps, FontSize2xl, FontSize3xl, FontSize4xl, FontSize5xl, FontSizeBase, FontSizeLg, FontSizeSm, FontSizeXl, FontSizeXs, FontWeightBold, FontWeightExtrabold, FontWeightLight, FontWeightMedium, FontWeightRegular, FontWeightSemibold, FormWizard, type FormWizardContextValue, FormWizardNav, type FormWizardNavProps, FormWizardProgress, type FormWizardProgressProps, type FormWizardProps, type GroupPosition, H1, H2, H3, Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Icon, IconButton, IconButtonLink, type IconButtonLinkProps, type IconButtonProps, type IconProps, Input, InputAddon, type InputAddonProps, InputGroup, InputGroupContext, type InputGroupProps, type InputProps, Label, type LabelProps, LineHeightNormal, LineHeightRelaxed, LineHeightTight, Link, type LinkProps, type LinkVariant, Menu, MenuCheckboxItem, type MenuCheckboxItemProps, MenuHeader, type MenuHeaderProps, MenuItem, type MenuItemData, type MenuItemProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, MetricCard, type MetricCardProps, type MetricCardSize, PathPill, type PathPillProps, Pill, type PillColor, type PillProps, Popover, PopoverContent, type PopoverContentProps, type PopoverProps, PopoverTrigger, type PopoverTriggerProps, ProgressBar, type ProgressBarProps, type ProgressBarSize, type ProgressBarVariant, Radio, RadioButton, type RadioButtonProps, RadioGroup, type RadioGroupProps, type RadioProps, Row, SectionHeader, type SectionHeaderProps, SegmentedControl, SegmentedControlItem, type SegmentedControlItemProps, type SegmentedControlProps, type SegmentedControlSelectionMode, type SegmentedControlSize, Select, type SelectItem, type SelectProps, Spacing1, Spacing12, Spacing16, Spacing2, Spacing3, Spacing4, Spacing6, Spacing8, Spinner, type SpinnerProps, StorageConnectionCard, type StorageConnectionCardProps, Switch, type SwitchProps, Tab, TabList, type TabListProps, TabPanel, type TabPanelProps, type TabProps, Table, TableBody, TableHeader, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, type ToastBridge, type ToastContextValue, type ToastData, type ToastPlacement, ToastProvider, type ToastProviderProps, type ToastVariant, ToggleButton, ToggleButtonGroup, ToggleButtonGroupItem, type ToggleButtonGroupItemProps, type ToggleButtonGroupProps, type ToggleButtonGroupSize, type ToggleButtonProps, type ToggleButtonSize, type ToggleButtonVariant, Tooltip, type TooltipProps, Tree, type TreeNode, type TreeProps, createToastBridge, pillColorFromName, useFormWizard, useInputGroup, useToast };
package/dist/index.js CHANGED
@@ -10,6 +10,11 @@ import {
10
10
  import { twMerge } from "tailwind-merge";
11
11
 
12
12
  // src/components/_shared/styles.ts
13
+ var sizeStyles = {
14
+ sm: "px-3 py-1.5 text-sm",
15
+ md: "px-4 py-2 text-base",
16
+ lg: "px-6 py-3 text-lg"
17
+ };
13
18
  var variantStyles = {
14
19
  primary: [
15
20
  "bg-(--color-action-primary) text-(--color-text-inverse)",
@@ -54,11 +59,6 @@ var variantStyles = {
54
59
  "pressed:bg-(--color-surface-muted)"
55
60
  ].join(" ")
56
61
  };
57
- var sizeStyles = {
58
- sm: "px-3 py-1.5 text-sm",
59
- md: "px-4 py-2 text-base",
60
- lg: "px-6 py-3 text-lg"
61
- };
62
62
 
63
63
  // src/components/Icon/Icon.tsx
64
64
  import { jsx } from "react/jsx-runtime";
@@ -333,16 +333,6 @@ import {
333
333
  Text
334
334
  } from "react-aria-components";
335
335
  import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
336
- var sizeClasses = {
337
- sm: "px-3 py-1.5 text-sm",
338
- md: "px-4 py-2 text-base",
339
- lg: "px-4 py-3 text-lg"
340
- };
341
- var prefixSizeClasses = {
342
- sm: "px-3 text-sm",
343
- md: "px-3 text-base",
344
- lg: "px-4 text-lg"
345
- };
346
336
  var alignClasses = {
347
337
  left: "text-left",
348
338
  center: "text-center",
@@ -438,7 +428,7 @@ function Input({
438
428
  "bg-(--color-surface-subtle)",
439
429
  "border-r border-r-(--color-border-default)",
440
430
  "text-(--color-text-secondary)",
441
- prefixSizeClasses[size]
431
+ sizeStyles[size]
442
432
  ].join(" "),
443
433
  children: prefix
444
434
  }
@@ -449,7 +439,7 @@ function Input({
449
439
  placeholder,
450
440
  className: [
451
441
  "w-full bg-transparent",
452
- sizeClasses[size],
442
+ sizeStyles[size],
453
443
  alignClasses[align],
454
444
  "text-(--color-text-primary)",
455
445
  "placeholder:text-(--color-text-tertiary)",
@@ -465,7 +455,7 @@ function Input({
465
455
  placeholder,
466
456
  className: [
467
457
  "w-full",
468
- sizeClasses[size],
458
+ sizeStyles[size],
469
459
  alignClasses[align],
470
460
  radiusClass,
471
461
  "border",
@@ -519,6 +509,7 @@ function Select({
519
509
  items,
520
510
  placeholder = "Select an option",
521
511
  errorMessage,
512
+ size = "md",
522
513
  isDisabled,
523
514
  isRequired,
524
515
  className,
@@ -550,14 +541,17 @@ function Select({
550
541
  Button2,
551
542
  {
552
543
  className: twMerge2(
553
- "inline-flex items-center justify-between",
554
- "w-full rounded-md px-4 py-2",
555
- "text-base text-left",
556
- "border outline-none transition-colors",
557
- hasError ? "border-(--color-border-danger)" : "border-(--color-border-default)",
558
- "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2",
559
- "cursor-pointer disabled:opacity-50 disabled:pointer-events-none",
560
- "bg-(--color-surface-default)"
544
+ `
545
+ inline-flex items-center justify-between
546
+ w-full rounded-md
547
+ text-left
548
+ border outline-none transition-colors
549
+ focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2
550
+ cursor-pointer disabled:opacity-50 disabled:pointer-events-none
551
+ bg-(--color-surface-default)
552
+ `,
553
+ sizeStyles[size],
554
+ hasError ? "border-(--color-border-danger)" : "border-(--color-border-default)"
561
555
  ),
562
556
  children: [
563
557
  /* @__PURE__ */ jsx7(
@@ -578,7 +572,10 @@ function Select({
578
572
  ChevronDown,
579
573
  {
580
574
  "aria-hidden": true,
581
- className: "h-4 w-4 shrink-0 text-(--color-text-secondary)"
575
+ className: twMerge2(
576
+ "shrink-0 text-(--color-text-secondary)",
577
+ size === "sm" ? "h-3.5 w-3.5" : "h-4 w-4"
578
+ )
582
579
  }
583
580
  )
584
581
  ]
@@ -604,13 +601,16 @@ function Select({
604
601
  id: item.id,
605
602
  textValue: item.name,
606
603
  className: twMerge2(
607
- "flex items-center justify-between gap-2",
608
- "px-4 py-2 rounded-sm",
609
- "text-base text-(--color-text-primary)",
610
- "cursor-pointer outline-none",
611
- "hover:bg-(--color-surface-muted)",
612
- "focus-visible:bg-(--color-surface-muted)",
613
- "selected:text-(--color-action-primary) selected:font-medium"
604
+ `
605
+ flex items-center justify-between gap-2
606
+ rounded-sm
607
+ text-(--color-text-primary)
608
+ cursor-pointer outline-none
609
+ hover:bg-(--color-surface-muted)
610
+ focus-visible:bg-(--color-surface-muted)
611
+ selected:text-(--color-action-primary) selected:font-medium
612
+ `,
613
+ sizeStyles[size]
614
614
  ),
615
615
  children: ({ isSelected }) => /* @__PURE__ */ jsxs5(Fragment, { children: [
616
616
  /* @__PURE__ */ jsx7("span", { className: "truncate", children: renderItem ? renderItem(item) : item.name }),
@@ -2387,65 +2387,21 @@ function SegmentedControlItem({
2387
2387
 
2388
2388
  // src/components/FileCard/FileCard.tsx
2389
2389
  import { useCallback as useCallback3 } from "react";
2390
- import {
2391
- File as File2,
2392
- FileSpreadsheet,
2393
- Folder as Folder2,
2394
- Image,
2395
- Info as Info2,
2396
- Microscope
2397
- } from "lucide-react";
2390
+ import { File as File2, Info as Info2 } from "lucide-react";
2398
2391
  import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs23 } from "react/jsx-runtime";
2399
- function getFileIcon(type, extension) {
2400
- if (type === "directory") return Folder2;
2401
- const ext = (extension ?? "").toLowerCase();
2402
- if (ext === "ome.tif" || ext === "ome.tiff") return Microscope;
2403
- if (/^(tiff?|png|jpe?g)$/.test(ext)) return Image;
2404
- if (/^(csv|parquet)$/.test(ext)) return FileSpreadsheet;
2405
- return File2;
2406
- }
2407
- function getTypeLabel(type, extension) {
2408
- if (type === "directory") return "Folder";
2409
- const ext = (extension ?? "").toLowerCase();
2410
- if (ext === "ome.tif" || ext === "ome.tiff") return "OME-TIFF";
2411
- if (/^tiff?$/.test(ext)) return "TIFF";
2412
- if (ext === "csv") return "CSV";
2413
- if (ext === "parquet") return "Parquet";
2414
- if (ext === "png") return "PNG";
2415
- if (/^jpe?g$/.test(ext)) return "JPEG";
2416
- return ext.toUpperCase() || "File";
2417
- }
2418
- function FileIcon({
2419
- type,
2420
- extension,
2421
- size = 16
2422
- }) {
2423
- const IconComponent = getFileIcon(type, extension);
2424
- return /* @__PURE__ */ jsx37(
2425
- IconComponent,
2426
- {
2427
- size,
2428
- className: "shrink-0 text-(--color-text-secondary)"
2429
- }
2430
- );
2431
- }
2432
2392
  function FileCard({
2433
2393
  name,
2434
- type,
2394
+ icon: IconComponent = File2,
2435
2395
  size,
2436
- extension,
2437
2396
  compact = false,
2438
2397
  children,
2439
2398
  onInfo,
2440
- href,
2441
2399
  onPress,
2442
2400
  className
2443
2401
  }) {
2444
- const isInteractive = !!href || !!onPress;
2402
+ const isInteractive = !!onPress;
2445
2403
  const radius = compact ? "rounded-md" : "rounded-lg";
2446
- const IconComponent = getFileIcon(type, extension);
2447
2404
  const iconSize = compact ? 24 : 32;
2448
- const iconColor = type === "directory" ? "text-(--color-text-tertiary)" : "text-(--color-text-secondary)";
2449
2405
  const thumbnailClass = compact ? "aspect-square rounded-t-(--border-radius-md)" : "aspect-[4/3] rounded-t-(--border-radius-lg)";
2450
2406
  const handleInfoClick = useCallback3(
2451
2407
  (e) => {
@@ -2471,7 +2427,7 @@ function FileCard({
2471
2427
  "div",
2472
2428
  {
2473
2429
  className: `shrink-0 overflow-hidden bg-neutral-900 ${thumbnailClass}`,
2474
- children: children ? /* @__PURE__ */ jsx37("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx37("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx37(IconComponent, { size: iconSize, className: iconColor }) })
2430
+ children: children ? /* @__PURE__ */ jsx37("div", { className: "h-full w-full overflow-hidden", children }) : /* @__PURE__ */ jsx37("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx37(IconComponent, { size: iconSize, className: "text-(--color-text-secondary)" }) })
2475
2431
  }
2476
2432
  ),
2477
2433
  /* @__PURE__ */ jsx37(
@@ -2484,7 +2440,13 @@ function FileCard({
2484
2440
  ].join(" "),
2485
2441
  children: compact ? /* @__PURE__ */ jsx37("span", { className: "text-xs font-medium text-(--color-text-primary) truncate", children: name }) : /* @__PURE__ */ jsxs23(Fragment9, { children: [
2486
2442
  /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1.5", children: [
2487
- /* @__PURE__ */ jsx37(FileIcon, { type, extension, size: 16 }),
2443
+ /* @__PURE__ */ jsx37(
2444
+ IconComponent,
2445
+ {
2446
+ size: 16,
2447
+ className: "shrink-0 text-(--color-text-secondary)"
2448
+ }
2449
+ ),
2488
2450
  /* @__PURE__ */ jsx37("span", { className: "min-w-0 flex-1 text-sm font-medium text-(--color-text-primary) truncate", children: name }),
2489
2451
  onInfo && /* @__PURE__ */ jsx37(
2490
2452
  "span",
@@ -2525,17 +2487,6 @@ function FileCard({
2525
2487
  isInteractive && "focus-visible:ring-2 focus-visible:ring-(--color-border-focus) focus-visible:ring-offset-2 outline-none",
2526
2488
  className
2527
2489
  ].filter(Boolean).join(" ");
2528
- if (href) {
2529
- return /* @__PURE__ */ jsx37(
2530
- "a",
2531
- {
2532
- href,
2533
- "aria-label": name,
2534
- className: [baseStyles, "no-underline"].join(" "),
2535
- children: cardContent
2536
- }
2537
- );
2538
- }
2539
2490
  if (onPress) {
2540
2491
  return /* @__PURE__ */ jsx37(
2541
2492
  "div",
@@ -3778,7 +3729,6 @@ export {
3778
3729
  Field,
3779
3730
  Fieldset,
3780
3731
  FileCard,
3781
- FileIcon,
3782
3732
  FontSize2xl,
3783
3733
  FontSize3xl,
3784
3734
  FontSize4xl,
@@ -3864,8 +3814,6 @@ export {
3864
3814
  TabPanel2 as UnstyledTabPanel,
3865
3815
  Tabs2 as UnstyledTabs,
3866
3816
  createToastBridge,
3867
- getFileIcon,
3868
- getTypeLabel,
3869
3817
  pillColorFromName,
3870
3818
  useFormWizard,
3871
3819
  useInputGroup,