@almadar/ui 5.3.1 → 5.5.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.
@@ -1955,7 +1955,7 @@ var init_Overlay = __esm({
1955
1955
  };
1956
1956
  }
1957
1957
  });
1958
- var sizeClasses2, minWidthClasses, Modal;
1958
+ var sizeClasses2, minWidthClasses, lookStyles, Modal;
1959
1959
  var init_Modal = __esm({
1960
1960
  "components/molecules/Modal.tsx"() {
1961
1961
  "use client";
@@ -1980,6 +1980,12 @@ var init_Modal = __esm({
1980
1980
  xl: "min-w-[700px] max-sm:min-w-0",
1981
1981
  full: "min-w-0"
1982
1982
  };
1983
+ lookStyles = {
1984
+ "centered-card": "",
1985
+ "top-sheet": "top-0 rounded-t-none rounded-b-container max-w-full w-full",
1986
+ "side-drawer": "right-0 top-0 bottom-0 h-full rounded-l-container rounded-r-none w-[400px] max-w-full",
1987
+ "full-screen": "inset-0 rounded-none w-full h-full max-w-full"
1988
+ };
1983
1989
  Modal = ({
1984
1990
  isOpen = true,
1985
1991
  onClose = () => {
@@ -1993,7 +1999,8 @@ var init_Modal = __esm({
1993
1999
  closeOnEscape = true,
1994
2000
  className,
1995
2001
  closeEvent,
1996
- swipeDownToClose = true
2002
+ swipeDownToClose = true,
2003
+ look = "centered-card"
1997
2004
  }) => {
1998
2005
  const eventBus = useEventBus();
1999
2006
  const modalRef = React86.useRef(null);
@@ -2078,6 +2085,7 @@ var init_Modal = __esm({
2078
2085
  // Mobile: take the entire screen. Override desktop max-w cap,
2079
2086
  // full height, no rounded corners, no min-width.
2080
2087
  "max-sm:max-w-none max-sm:max-h-none max-sm:w-full max-sm:h-full max-sm:rounded-none",
2088
+ lookStyles[look],
2081
2089
  className
2082
2090
  ),
2083
2091
  style: dragY > 0 ? {
@@ -3652,7 +3660,7 @@ var init_Checkbox = __esm({
3652
3660
  Checkbox.displayName = "Checkbox";
3653
3661
  }
3654
3662
  });
3655
- var variantStyles4, paddingStyles2, shadowStyles2, Card, CardHeader, CardTitle, CardContent, CardBody, CardFooter;
3663
+ var variantStyles4, paddingStyles2, shadowStyles2, lookStyles2, Card, CardHeader, CardTitle, CardContent, CardBody, CardFooter;
3656
3664
  var init_Card = __esm({
3657
3665
  "components/atoms/Card.tsx"() {
3658
3666
  init_cn();
@@ -3700,6 +3708,15 @@ var init_Card = __esm({
3700
3708
  md: "shadow",
3701
3709
  lg: "shadow-elevation-dialog"
3702
3710
  };
3711
+ lookStyles2 = {
3712
+ elevated: "",
3713
+ "flat-bordered": "shadow-none border-[length:var(--border-width)] border-border",
3714
+ "borderless-divider": "shadow-none border-0 border-b border-border rounded-none",
3715
+ ticket: "shadow-none border-dashed border-[length:var(--border-width)] border-border",
3716
+ invoice: "shadow-none border-[length:var(--border-width-thick)] border-border rounded-sm",
3717
+ chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
3718
+ "tile-image-first": "p-0 overflow-hidden"
3719
+ };
3703
3720
  Card = React86__namespace.default.forwardRef(
3704
3721
  ({
3705
3722
  className,
@@ -3708,6 +3725,7 @@ var init_Card = __esm({
3708
3725
  title,
3709
3726
  subtitle,
3710
3727
  shadow,
3728
+ look = "elevated",
3711
3729
  children,
3712
3730
  ...props
3713
3731
  }, ref) => {
@@ -3720,6 +3738,7 @@ var init_Card = __esm({
3720
3738
  "transition-all duration-[var(--transition-normal)]",
3721
3739
  variantStyles4[variant],
3722
3740
  paddingStyles2[padding],
3741
+ lookStyles2[look],
3723
3742
  shadow && shadowStyles2[shadow],
3724
3743
  className
3725
3744
  ),
@@ -16332,7 +16351,7 @@ var init_BookTableOfContents = __esm({
16332
16351
  BookTableOfContents.displayName = "BookTableOfContents";
16333
16352
  }
16334
16353
  });
16335
- var ICON_NAME_ALIASES, EmptyState;
16354
+ var ICON_NAME_ALIASES, lookStyles3, EmptyState;
16336
16355
  var init_EmptyState = __esm({
16337
16356
  "components/molecules/EmptyState.tsx"() {
16338
16357
  "use client";
@@ -16349,6 +16368,12 @@ var init_EmptyState = __esm({
16349
16368
  error: "x-circle",
16350
16369
  warning: "alert-circle"
16351
16370
  };
16371
+ lookStyles3 = {
16372
+ "icon-only": "",
16373
+ illustrated: "[&_svg]:w-32 [&_svg]:h-32",
16374
+ "text-only": "[&_svg]:hidden",
16375
+ mascot: "[&_svg]:w-24 [&_svg]:h-24 [&_svg]:rounded-pill"
16376
+ };
16352
16377
  EmptyState = ({
16353
16378
  icon,
16354
16379
  title,
@@ -16359,7 +16384,8 @@ var init_EmptyState = __esm({
16359
16384
  className,
16360
16385
  destructive,
16361
16386
  variant,
16362
- actionEvent
16387
+ actionEvent,
16388
+ look = "icon-only"
16363
16389
  }) => {
16364
16390
  const eventBus = useEventBus();
16365
16391
  const { t } = useTranslate();
@@ -16379,6 +16405,7 @@ var init_EmptyState = __esm({
16379
16405
  align: "center",
16380
16406
  className: cn(
16381
16407
  "justify-center py-12 text-center",
16408
+ lookStyles3[look],
16382
16409
  className
16383
16410
  ),
16384
16411
  children: [
@@ -17619,7 +17646,7 @@ function useSafeEventBus2() {
17619
17646
  } };
17620
17647
  }
17621
17648
  }
17622
- var log9, ButtonGroup;
17649
+ var log9, lookStyles4, ButtonGroup;
17623
17650
  var init_ButtonGroup = __esm({
17624
17651
  "components/molecules/ButtonGroup.tsx"() {
17625
17652
  "use client";
@@ -17627,6 +17654,13 @@ var init_ButtonGroup = __esm({
17627
17654
  init_atoms();
17628
17655
  init_useEventBus();
17629
17656
  log9 = logger.createLogger("almadar:ui:button-group");
17657
+ lookStyles4 = {
17658
+ "right-aligned-buttons": "",
17659
+ "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
17660
+ "inline-row": "gap-2 inline-flex",
17661
+ "dropdown-menu": "[&>button:not(:first-child)]:hidden",
17662
+ "command-palette-trigger": "[&>button:not(:first-child)]:hidden"
17663
+ };
17630
17664
  ButtonGroup = ({
17631
17665
  children,
17632
17666
  primary,
@@ -17636,7 +17670,8 @@ var init_ButtonGroup = __esm({
17636
17670
  className,
17637
17671
  // Filter-group pattern props (entity and filters are used for schema-driven filtering)
17638
17672
  entity: _entity,
17639
- filters
17673
+ filters,
17674
+ look = "right-aligned-buttons"
17640
17675
  }) => {
17641
17676
  const eventBus = useSafeEventBus2();
17642
17677
  const variantClasses2 = {
@@ -17713,6 +17748,7 @@ var init_ButtonGroup = __esm({
17713
17748
  "inline-flex gap-2",
17714
17749
  variantClasses2[variant],
17715
17750
  orientationClasses[orientation],
17751
+ lookStyles4[look],
17716
17752
  className
17717
17753
  ),
17718
17754
  role: "group",
@@ -20244,7 +20280,7 @@ var init_CastleTemplate = __esm({
20244
20280
  CastleTemplate.displayName = "CastleTemplate";
20245
20281
  }
20246
20282
  });
20247
- var CHART_COLORS, seriesColor, monthFormatter, formatTimeLabel, BarChart, PieChart, LineChart, ScatterChart, Chart;
20283
+ var CHART_COLORS, seriesColor, monthFormatter, formatTimeLabel, BarChart, PieChart, LineChart, ScatterChart, LOOK_FROM_CHART_TYPE, Chart;
20248
20284
  var init_Chart = __esm({
20249
20285
  "components/organisms/Chart.tsx"() {
20250
20286
  "use client";
@@ -20274,7 +20310,7 @@ var init_Chart = __esm({
20274
20310
  if (Number.isNaN(parsed.getTime())) return raw;
20275
20311
  return monthFormatter.format(parsed);
20276
20312
  };
20277
- BarChart = ({ series, height, showValues, stack, timeAxis, histogram = false, onPointClick }) => {
20313
+ BarChart = ({ series, height, showValues, stack, timeAxis, histogram = false, horizontal = false, onPointClick }) => {
20278
20314
  const categories = React86.useMemo(() => {
20279
20315
  const set = [];
20280
20316
  const seen = /* @__PURE__ */ new Set();
@@ -20312,6 +20348,64 @@ var init_Chart = __esm({
20312
20348
  }
20313
20349
  return m;
20314
20350
  }, [series, stack, columnTotals]);
20351
+ if (horizontal) {
20352
+ return /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "xs", align: "stretch", className: "w-full", style: { minHeight: height }, children: categories.map((label, catIdx) => {
20353
+ const displayLabel = timeAxis ? formatTimeLabel(label) : label;
20354
+ const total = columnTotals?.[catIdx] ?? 1;
20355
+ return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", className: "w-full", children: [
20356
+ /* @__PURE__ */ jsxRuntime.jsx(
20357
+ Typography,
20358
+ {
20359
+ variant: "caption",
20360
+ color: "secondary",
20361
+ className: "truncate text-right",
20362
+ style: { width: 80, flexShrink: 0 },
20363
+ children: displayLabel
20364
+ }
20365
+ ),
20366
+ /* @__PURE__ */ jsxRuntime.jsx(
20367
+ HStack,
20368
+ {
20369
+ gap: stack === "none" ? "xs" : "none",
20370
+ align: "center",
20371
+ className: "flex-1 min-w-0",
20372
+ style: { height: 24 },
20373
+ children: series.map((s, sIdx) => {
20374
+ const value = valueAt(s, label);
20375
+ const ratio = stack === "normalize" ? total === 0 ? 0 : value / total * 100 : value / maxValue * 100;
20376
+ const color = seriesColor(s, sIdx);
20377
+ return /* @__PURE__ */ jsxRuntime.jsx(
20378
+ Box,
20379
+ {
20380
+ className: "h-full rounded-r-sm transition-all duration-500 ease-out min-w-[2px] cursor-pointer hover:opacity-80",
20381
+ style: {
20382
+ width: `${ratio}%`,
20383
+ backgroundColor: color
20384
+ },
20385
+ onClick: () => onPointClick?.(
20386
+ { label, value, color },
20387
+ s.name
20388
+ ),
20389
+ title: `${s.name}: ${value}`
20390
+ },
20391
+ s.name
20392
+ );
20393
+ })
20394
+ }
20395
+ ),
20396
+ showValues && series.length === 1 && /* @__PURE__ */ jsxRuntime.jsx(
20397
+ Typography,
20398
+ {
20399
+ variant: "caption",
20400
+ color: "secondary",
20401
+ className: "tabular-nums",
20402
+ style: { width: 40, flexShrink: 0 },
20403
+ children: valueAt(series[0], label)
20404
+ }
20405
+ )
20406
+ ] }, label);
20407
+ }) });
20408
+ }
20315
20409
  return /* @__PURE__ */ jsxRuntime.jsx(
20316
20410
  HStack,
20317
20411
  {
@@ -20739,10 +20833,20 @@ var init_Chart = __esm({
20739
20833
  }
20740
20834
  );
20741
20835
  };
20836
+ LOOK_FROM_CHART_TYPE = {
20837
+ bar: "bar-vertical",
20838
+ line: "line",
20839
+ pie: "pie",
20840
+ area: "area",
20841
+ donut: "donut",
20842
+ scatter: "scatter",
20843
+ histogram: "histogram"
20844
+ };
20742
20845
  Chart = ({
20743
20846
  title,
20744
20847
  subtitle,
20745
- chartType = "bar",
20848
+ chartType,
20849
+ look,
20746
20850
  series,
20747
20851
  data: simpleData,
20748
20852
  scatterData,
@@ -20758,6 +20862,7 @@ var init_Chart = __esm({
20758
20862
  error,
20759
20863
  className
20760
20864
  }) => {
20865
+ const resolvedLook = look ?? (chartType ? LOOK_FROM_CHART_TYPE[chartType] : "bar-vertical");
20761
20866
  const eventBus = useEventBus();
20762
20867
  const { t } = useTranslate();
20763
20868
  const handleAction = React86.useCallback(
@@ -20786,7 +20891,7 @@ var init_Chart = __esm({
20786
20891
  return [];
20787
20892
  }, [simpleData, series]);
20788
20893
  const firstSeriesData = normalizedSeries[0]?.data ?? [];
20789
- const hasContent = chartType === "scatter" ? (scatterData?.length ?? 0) > 0 : normalizedSeries.some((s) => s.data.length > 0);
20894
+ const hasContent = resolvedLook === "scatter" ? (scatterData?.length ?? 0) > 0 : normalizedSeries.some((s) => s.data.length > 0);
20790
20895
  if (isLoading) {
20791
20896
  return /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { message: "Loading chart...", className });
20792
20897
  }
@@ -20821,7 +20926,7 @@ var init_Chart = __esm({
20821
20926
  )) })
20822
20927
  ] }),
20823
20928
  /* @__PURE__ */ jsxRuntime.jsxs(Box, { className: "w-full", children: [
20824
- chartType === "bar" && /* @__PURE__ */ jsxRuntime.jsx(
20929
+ resolvedLook === "bar-vertical" && /* @__PURE__ */ jsxRuntime.jsx(
20825
20930
  BarChart,
20826
20931
  {
20827
20932
  series: normalizedSeries,
@@ -20832,7 +20937,19 @@ var init_Chart = __esm({
20832
20937
  onPointClick: handlePointClick
20833
20938
  }
20834
20939
  ),
20835
- chartType === "histogram" && /* @__PURE__ */ jsxRuntime.jsx(
20940
+ resolvedLook === "bar-horizontal" && /* @__PURE__ */ jsxRuntime.jsx(
20941
+ BarChart,
20942
+ {
20943
+ series: normalizedSeries,
20944
+ height,
20945
+ showValues,
20946
+ stack,
20947
+ timeAxis,
20948
+ horizontal: true,
20949
+ onPointClick: handlePointClick
20950
+ }
20951
+ ),
20952
+ resolvedLook === "histogram" && /* @__PURE__ */ jsxRuntime.jsx(
20836
20953
  BarChart,
20837
20954
  {
20838
20955
  series: normalizedSeries,
@@ -20844,7 +20961,7 @@ var init_Chart = __esm({
20844
20961
  onPointClick: handlePointClick
20845
20962
  }
20846
20963
  ),
20847
- chartType === "line" && /* @__PURE__ */ jsxRuntime.jsx(
20964
+ resolvedLook === "line" && /* @__PURE__ */ jsxRuntime.jsx(
20848
20965
  LineChart,
20849
20966
  {
20850
20967
  series: normalizedSeries,
@@ -20854,7 +20971,7 @@ var init_Chart = __esm({
20854
20971
  onPointClick: handlePointClick
20855
20972
  }
20856
20973
  ),
20857
- chartType === "area" && /* @__PURE__ */ jsxRuntime.jsx(
20974
+ resolvedLook === "area" && /* @__PURE__ */ jsxRuntime.jsx(
20858
20975
  LineChart,
20859
20976
  {
20860
20977
  series: normalizedSeries,
@@ -20865,7 +20982,7 @@ var init_Chart = __esm({
20865
20982
  onPointClick: handlePointClick
20866
20983
  }
20867
20984
  ),
20868
- chartType === "pie" && /* @__PURE__ */ jsxRuntime.jsx(
20985
+ resolvedLook === "pie" && /* @__PURE__ */ jsxRuntime.jsx(
20869
20986
  PieChart,
20870
20987
  {
20871
20988
  data: firstSeriesData,
@@ -20874,7 +20991,7 @@ var init_Chart = __esm({
20874
20991
  onPointClick: handlePointClick
20875
20992
  }
20876
20993
  ),
20877
- chartType === "donut" && /* @__PURE__ */ jsxRuntime.jsx(
20994
+ resolvedLook === "donut" && /* @__PURE__ */ jsxRuntime.jsx(
20878
20995
  PieChart,
20879
20996
  {
20880
20997
  data: firstSeriesData,
@@ -20884,7 +21001,7 @@ var init_Chart = __esm({
20884
21001
  onPointClick: handlePointClick
20885
21002
  }
20886
21003
  ),
20887
- chartType === "scatter" && /* @__PURE__ */ jsxRuntime.jsx(
21004
+ resolvedLook === "scatter" && /* @__PURE__ */ jsxRuntime.jsx(
20888
21005
  ScatterChart,
20889
21006
  {
20890
21007
  data: scatterData ?? [],
@@ -24307,7 +24424,7 @@ var init_useQuerySingleton = __esm({
24307
24424
  queryStores = /* @__PURE__ */ new Map();
24308
24425
  }
24309
24426
  });
24310
- var resolveFilterType, FilterGroup;
24427
+ var resolveFilterType, lookStyles5, FilterGroup;
24311
24428
  var init_FilterGroup = __esm({
24312
24429
  "components/molecules/FilterGroup.tsx"() {
24313
24430
  "use client";
@@ -24321,6 +24438,13 @@ var init_FilterGroup = __esm({
24321
24438
  init_useEventBus();
24322
24439
  init_useQuerySingleton();
24323
24440
  resolveFilterType = (filter) => filter.filterType ?? filter.type;
24441
+ lookStyles5 = {
24442
+ toolbar: "",
24443
+ chips: "gap-2 [&>*]:rounded-pill [&>*]:px-3 [&>*]:py-1",
24444
+ pills: "gap-2 [&>*]:rounded-pill",
24445
+ "popover-trigger": "[&>*:not(:first-child)]:hidden",
24446
+ "inline-column-header": "hidden"
24447
+ };
24324
24448
  FilterGroup = ({
24325
24449
  entity,
24326
24450
  filters,
@@ -24330,7 +24454,8 @@ var init_FilterGroup = __esm({
24330
24454
  variant = "default",
24331
24455
  showIcon = true,
24332
24456
  query,
24333
- isLoading
24457
+ isLoading,
24458
+ look = "toolbar"
24334
24459
  }) => {
24335
24460
  const eventBus = useEventBus();
24336
24461
  const queryState = useQuerySingleton(query);
@@ -24385,63 +24510,71 @@ var init_FilterGroup = __esm({
24385
24510
  }, [onClearAll, queryState, eventBus, entity, query]);
24386
24511
  const activeFilterCount = Object.keys(selectedValues).length;
24387
24512
  if (variant === "pills") {
24388
- return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", align: "center", className: cn("flex-wrap", className), children: [
24389
- showIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
24390
- filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
24391
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-muted-foreground", children: [
24392
- filter.label,
24393
- ":"
24394
- ] }),
24395
- /* @__PURE__ */ jsxRuntime.jsxs(
24396
- HStack,
24397
- {
24398
- gap: "none",
24399
- className: "rounded-sm overflow-hidden border-[length:var(--border-width)] border-border",
24400
- children: [
24401
- /* @__PURE__ */ jsxRuntime.jsx(
24402
- "button",
24403
- {
24404
- type: "button",
24405
- onClick: () => handleFilterSelect(filter.field, null),
24406
- className: cn(
24407
- "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
24408
- !selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
24409
- ),
24410
- children: "All"
24411
- }
24412
- ),
24413
- filter.options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
24414
- "button",
24415
- {
24416
- type: "button",
24417
- onClick: () => handleFilterSelect(filter.field, option),
24418
- className: cn(
24419
- "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
24420
- "border-l-[length:var(--border-width)] border-border",
24421
- selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
24513
+ return /* @__PURE__ */ jsxRuntime.jsxs(
24514
+ HStack,
24515
+ {
24516
+ gap: "md",
24517
+ align: "center",
24518
+ className: cn("flex-wrap", lookStyles5[look], className),
24519
+ children: [
24520
+ showIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
24521
+ filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
24522
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-medium text-muted-foreground", children: [
24523
+ filter.label,
24524
+ ":"
24525
+ ] }),
24526
+ /* @__PURE__ */ jsxRuntime.jsxs(
24527
+ HStack,
24528
+ {
24529
+ gap: "none",
24530
+ className: "rounded-sm overflow-hidden border-[length:var(--border-width)] border-border",
24531
+ children: [
24532
+ /* @__PURE__ */ jsxRuntime.jsx(
24533
+ "button",
24534
+ {
24535
+ type: "button",
24536
+ onClick: () => handleFilterSelect(filter.field, null),
24537
+ className: cn(
24538
+ "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
24539
+ !selectedValues[filter.field] ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
24540
+ ),
24541
+ children: "All"
24542
+ }
24422
24543
  ),
24423
- children: option
24424
- },
24425
- option
24426
- ))
24427
- ]
24428
- }
24429
- )
24430
- ] }, filter.field)),
24431
- activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
24432
- Button,
24433
- {
24434
- variant: "ghost",
24435
- size: "sm",
24436
- onClick: handleClearAll,
24437
- leftIcon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
24438
- children: "Clear"
24439
- }
24440
- )
24441
- ] });
24544
+ filter.options?.map((option) => /* @__PURE__ */ jsxRuntime.jsx(
24545
+ "button",
24546
+ {
24547
+ type: "button",
24548
+ onClick: () => handleFilterSelect(filter.field, option),
24549
+ className: cn(
24550
+ "px-3 py-1.5 text-sm font-medium transition-all duration-[var(--transition-fast)]",
24551
+ "border-l-[length:var(--border-width)] border-border",
24552
+ selectedValues[filter.field] === option ? "bg-primary text-primary-foreground" : "bg-card text-muted-foreground hover:bg-muted"
24553
+ ),
24554
+ children: option
24555
+ },
24556
+ option
24557
+ ))
24558
+ ]
24559
+ }
24560
+ )
24561
+ ] }, filter.field)),
24562
+ activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(
24563
+ Button,
24564
+ {
24565
+ variant: "ghost",
24566
+ size: "sm",
24567
+ onClick: handleClearAll,
24568
+ leftIcon: /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "h-3.5 w-3.5" }),
24569
+ children: "Clear"
24570
+ }
24571
+ )
24572
+ ]
24573
+ }
24574
+ );
24442
24575
  }
24443
24576
  if (variant === "vertical") {
24444
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", className), children: [
24577
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("flex flex-col gap-4", lookStyles5[look], className), children: [
24445
24578
  showIcon && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 text-muted-foreground", children: [
24446
24579
  /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4" }),
24447
24580
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-bold uppercase tracking-wide", children: "Filters" })
@@ -24524,92 +24657,100 @@ var init_FilterGroup = __esm({
24524
24657
  ] });
24525
24658
  }
24526
24659
  if (variant === "compact") {
24527
- return /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "sm", align: "center", className: cn("flex-wrap", className), children: [
24528
- showIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
24529
- filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[120px]", children: resolveFilterType(filter) === "date" ? /* @__PURE__ */ jsxRuntime.jsx(
24530
- Input,
24531
- {
24532
- type: "date",
24533
- value: selectedValues[filter.field] || "",
24534
- onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
24535
- clearable: true,
24536
- onClear: () => handleFilterSelect(filter.field, null),
24537
- className: "text-sm"
24538
- }
24539
- ) : resolveFilterType(filter) === "daterange" || resolveFilterType(filter) === "date-range" ? /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
24540
- /* @__PURE__ */ jsxRuntime.jsx(
24541
- Input,
24542
- {
24543
- type: "date",
24544
- value: selectedValues[`${filter.field}_from`] || "",
24545
- onChange: (e) => handleFilterSelect(
24546
- `${filter.field}_from`,
24547
- e.target.value || null
24548
- ),
24549
- className: "text-sm min-w-[100px]"
24550
- }
24551
- ),
24552
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "-" }),
24553
- /* @__PURE__ */ jsxRuntime.jsx(
24554
- Input,
24555
- {
24556
- type: "date",
24557
- value: selectedValues[`${filter.field}_to`] || "",
24558
- onChange: (e) => handleFilterSelect(
24559
- `${filter.field}_to`,
24560
- e.target.value || null
24660
+ return /* @__PURE__ */ jsxRuntime.jsxs(
24661
+ HStack,
24662
+ {
24663
+ gap: "sm",
24664
+ align: "center",
24665
+ className: cn("flex-wrap", lookStyles5[look], className),
24666
+ children: [
24667
+ showIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "filter", className: "h-4 w-4 text-muted-foreground" }),
24668
+ filters.map((filter) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-[120px]", children: resolveFilterType(filter) === "date" ? /* @__PURE__ */ jsxRuntime.jsx(
24669
+ Input,
24670
+ {
24671
+ type: "date",
24672
+ value: selectedValues[filter.field] || "",
24673
+ onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
24674
+ clearable: true,
24675
+ onClear: () => handleFilterSelect(filter.field, null),
24676
+ className: "text-sm"
24677
+ }
24678
+ ) : resolveFilterType(filter) === "daterange" || resolveFilterType(filter) === "date-range" ? /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
24679
+ /* @__PURE__ */ jsxRuntime.jsx(
24680
+ Input,
24681
+ {
24682
+ type: "date",
24683
+ value: selectedValues[`${filter.field}_from`] || "",
24684
+ onChange: (e) => handleFilterSelect(
24685
+ `${filter.field}_from`,
24686
+ e.target.value || null
24687
+ ),
24688
+ className: "text-sm min-w-[100px]"
24689
+ }
24561
24690
  ),
24562
- className: "text-sm min-w-[100px]"
24563
- }
24564
- )
24565
- ] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsxRuntime.jsx(
24566
- Input,
24567
- {
24568
- value: selectedValues[filter.field] || "",
24569
- onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
24570
- placeholder: filter.label,
24571
- clearable: true,
24572
- onClear: () => handleFilterSelect(filter.field, null),
24573
- className: "text-sm"
24574
- }
24575
- ) : /* @__PURE__ */ jsxRuntime.jsx(
24576
- Select,
24577
- {
24578
- value: selectedValues[filter.field] || "all",
24579
- onChange: (e) => handleFilterSelect(filter.field, e.target.value),
24580
- options: [
24581
- { value: "all", label: `All ${filter.label}` },
24582
- ...filter.options?.map((opt) => ({
24583
- value: opt,
24584
- label: opt
24585
- })) || []
24586
- ],
24587
- className: "text-sm"
24588
- }
24589
- ) }, filter.field)),
24590
- activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
24591
- Object.entries(selectedValues).map(([field, value]) => {
24592
- const filterDef = filters.find((f3) => f3.field === field);
24593
- return /* @__PURE__ */ jsxRuntime.jsxs(
24594
- Badge,
24691
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: "-" }),
24692
+ /* @__PURE__ */ jsxRuntime.jsx(
24693
+ Input,
24694
+ {
24695
+ type: "date",
24696
+ value: selectedValues[`${filter.field}_to`] || "",
24697
+ onChange: (e) => handleFilterSelect(
24698
+ `${filter.field}_to`,
24699
+ e.target.value || null
24700
+ ),
24701
+ className: "text-sm min-w-[100px]"
24702
+ }
24703
+ )
24704
+ ] }) : resolveFilterType(filter) === "text" ? /* @__PURE__ */ jsxRuntime.jsx(
24705
+ Input,
24595
24706
  {
24596
- variant: "primary",
24597
- size: "md",
24598
- className: "cursor-pointer",
24599
- onClick: () => handleFilterSelect(field, null),
24600
- children: [
24601
- filterDef?.label,
24602
- ": ",
24603
- value,
24604
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "ml-1 h-3 w-3" })
24605
- ]
24606
- },
24607
- field
24608
- );
24609
- }),
24610
- /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "Clear all" })
24611
- ] })
24612
- ] });
24707
+ value: selectedValues[filter.field] || "",
24708
+ onChange: (e) => handleFilterSelect(filter.field, e.target.value || null),
24709
+ placeholder: filter.label,
24710
+ clearable: true,
24711
+ onClear: () => handleFilterSelect(filter.field, null),
24712
+ className: "text-sm"
24713
+ }
24714
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
24715
+ Select,
24716
+ {
24717
+ value: selectedValues[filter.field] || "all",
24718
+ onChange: (e) => handleFilterSelect(filter.field, e.target.value),
24719
+ options: [
24720
+ { value: "all", label: `All ${filter.label}` },
24721
+ ...filter.options?.map((opt) => ({
24722
+ value: opt,
24723
+ label: opt
24724
+ })) || []
24725
+ ],
24726
+ className: "text-sm"
24727
+ }
24728
+ ) }, filter.field)),
24729
+ activeFilterCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
24730
+ Object.entries(selectedValues).map(([field, value]) => {
24731
+ const filterDef = filters.find((f3) => f3.field === field);
24732
+ return /* @__PURE__ */ jsxRuntime.jsxs(
24733
+ Badge,
24734
+ {
24735
+ variant: "primary",
24736
+ size: "md",
24737
+ className: "cursor-pointer",
24738
+ onClick: () => handleFilterSelect(field, null),
24739
+ children: [
24740
+ filterDef?.label,
24741
+ ": ",
24742
+ value,
24743
+ /* @__PURE__ */ jsxRuntime.jsx(Icon, { name: "x", className: "ml-1 h-3 w-3" })
24744
+ ]
24745
+ },
24746
+ field
24747
+ );
24748
+ }),
24749
+ /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "ghost", size: "sm", onClick: handleClearAll, children: "Clear all" })
24750
+ ] })
24751
+ ]
24752
+ }
24753
+ );
24613
24754
  }
24614
24755
  return /* @__PURE__ */ jsxRuntime.jsx(
24615
24756
  "div",
@@ -24618,6 +24759,7 @@ var init_FilterGroup = __esm({
24618
24759
  "p-4 rounded-container",
24619
24760
  "bg-card",
24620
24761
  "border-[length:var(--border-width)] border-border",
24762
+ lookStyles5[look],
24621
24763
  className
24622
24764
  ),
24623
24765
  children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "md", align: "center", className: "flex-wrap", children: [
@@ -29091,7 +29233,7 @@ function composeDisplayValue(value, format, max, prefix, suffix) {
29091
29233
  const withMax = max != null && max > 0 ? `${formatted} / ${max}` : formatted;
29092
29234
  return `${prefix ?? ""}${withMax}${suffix ?? ""}`;
29093
29235
  }
29094
- var variantColor, StatDisplay;
29236
+ var lookStyles6, variantColor, StatDisplay;
29095
29237
  var init_StatDisplay = __esm({
29096
29238
  "components/molecules/StatDisplay.tsx"() {
29097
29239
  "use client";
@@ -29103,6 +29245,13 @@ var init_StatDisplay = __esm({
29103
29245
  init_Sparkline();
29104
29246
  init_Icon();
29105
29247
  init_useEventBus();
29248
+ lookStyles6 = {
29249
+ elevated: "",
29250
+ flat: "shadow-none border-[length:var(--border-width)] border-border",
29251
+ "progress-backed": "",
29252
+ gauge: "",
29253
+ sparkline: ""
29254
+ };
29106
29255
  variantColor = {
29107
29256
  default: "text-foreground",
29108
29257
  primary: "text-primary",
@@ -29130,6 +29279,7 @@ var init_StatDisplay = __esm({
29130
29279
  size = "md",
29131
29280
  variant = "default",
29132
29281
  compact = false,
29282
+ look = "elevated",
29133
29283
  className,
29134
29284
  isLoading = false,
29135
29285
  error = null
@@ -29182,7 +29332,7 @@ var init_StatDisplay = __esm({
29182
29332
  return /* @__PURE__ */ jsxRuntime.jsx(
29183
29333
  Card,
29184
29334
  {
29185
- className: cn(padSizes[size], clickEvent && "cursor-pointer hover:shadow-md transition-shadow", className),
29335
+ className: cn(padSizes[size], lookStyles6[look], clickEvent && "cursor-pointer hover:shadow-md transition-shadow", className),
29186
29336
  onClick: clickEvent ? handleClick : void 0,
29187
29337
  children: /* @__PURE__ */ jsxRuntime.jsxs(HStack, { align: "start", justify: "between", children: [
29188
29338
  /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "none", className: "space-y-1 flex-1", children: [
@@ -34764,7 +34914,8 @@ function DataTable({
34764
34914
  bulkActions,
34765
34915
  headerActions,
34766
34916
  showTotal = true,
34767
- className
34917
+ className,
34918
+ look = "dense"
34768
34919
  }) {
34769
34920
  const [openActionMenu, setOpenActionMenu] = React86.useState(
34770
34921
  null
@@ -34891,6 +35042,7 @@ function DataTable({
34891
35042
  {
34892
35043
  className: cn(
34893
35044
  "bg-card border-2 border-border rounded-none overflow-hidden",
35045
+ lookStyles7[look],
34894
35046
  className
34895
35047
  ),
34896
35048
  children: [
@@ -35117,6 +35269,7 @@ function DataTable({
35117
35269
  }
35118
35270
  );
35119
35271
  }
35272
+ var lookStyles7;
35120
35273
  var init_DataTable = __esm({
35121
35274
  "components/organisms/DataTable.tsx"() {
35122
35275
  "use client";
@@ -35130,6 +35283,13 @@ var init_DataTable = __esm({
35130
35283
  init_useEventBus();
35131
35284
  init_useTranslate();
35132
35285
  init_types3();
35286
+ lookStyles7 = {
35287
+ dense: "",
35288
+ spacious: "[&_tbody_tr_td]:py-5 [&_thead_tr_th]:py-4",
35289
+ striped: "[&_tbody_tr:nth-child(odd)]:bg-muted/30",
35290
+ borderless: "border-0 [&_thead]:border-b-0 [&_tbody_tr]:border-b-0 [&_tbody]:divide-y-0",
35291
+ "card-rows": "border-0 [&_tbody]:divide-y-0 [&_tbody_tr]:border-b-0 [&_tbody_tr]:shadow-elevation-card [&_tbody_tr]:rounded-container [&_tbody_tr]:bg-card [&_tbody]:[&_tr]:my-2"
35292
+ };
35133
35293
  DataTable.displayName = "DataTable";
35134
35294
  }
35135
35295
  });
@@ -38288,7 +38448,7 @@ var init_GraphCanvas = __esm({
38288
38448
  GraphCanvas.displayName = "GraphCanvas";
38289
38449
  }
38290
38450
  });
38291
- var Header;
38451
+ var lookStyles8, Header;
38292
38452
  var init_Header = __esm({
38293
38453
  "components/organisms/Header.tsx"() {
38294
38454
  "use client";
@@ -38301,6 +38461,13 @@ var init_Header = __esm({
38301
38461
  init_Typography();
38302
38462
  init_cn();
38303
38463
  init_useTranslate();
38464
+ lookStyles8 = {
38465
+ "compact-bar": "",
38466
+ hero: "py-section min-h-[200px] [&_h1]:text-display-1",
38467
+ breadcrumb: "py-2 text-sm [&_h1]:text-base [&_h1]:font-medium",
38468
+ contextual: "py-3 [&_h1]:text-lg",
38469
+ "editorial-banner": "py-12 [&_h1]:text-display-2 [&_h1]:font-display-bold border-b border-border"
38470
+ };
38304
38471
  Header = ({
38305
38472
  logo,
38306
38473
  logoSrc,
@@ -38318,6 +38485,7 @@ var init_Header = __esm({
38318
38485
  actions,
38319
38486
  sticky = true,
38320
38487
  variant = "mobile",
38488
+ look = "compact-bar",
38321
38489
  onLogoClick,
38322
38490
  className
38323
38491
  }) => {
@@ -38333,6 +38501,7 @@ var init_Header = __esm({
38333
38501
  "flex items-center px-4 justify-between bg-card",
38334
38502
  sticky && "sticky top-0 z-50",
38335
38503
  variant === "mobile" && "lg:hidden",
38504
+ lookStyles8[look],
38336
38505
  className
38337
38506
  ),
38338
38507
  children: [
@@ -45009,7 +45178,7 @@ var init_TeamOrganism = __esm({
45009
45178
  TeamOrganism.displayName = "TeamOrganism";
45010
45179
  }
45011
45180
  });
45012
- var STATUS_STYLES3, Timeline;
45181
+ var lookStyles9, STATUS_STYLES3, Timeline;
45013
45182
  var init_Timeline = __esm({
45014
45183
  "components/organisms/Timeline.tsx"() {
45015
45184
  "use client";
@@ -45020,6 +45189,12 @@ var init_Timeline = __esm({
45020
45189
  init_ErrorState();
45021
45190
  init_EmptyState();
45022
45191
  init_useTranslate();
45192
+ lookStyles9 = {
45193
+ "vertical-compact": "gap-1 [&>*]:py-1",
45194
+ "vertical-spacious": "",
45195
+ horizontal: "flex-row [&>*]:flex-row [&>*]:items-center",
45196
+ swimlane: "flex-row gap-6 [&>*]:flex-row [&>*]:items-center"
45197
+ };
45023
45198
  STATUS_STYLES3 = {
45024
45199
  complete: {
45025
45200
  dotColor: "text-success",
@@ -45050,7 +45225,8 @@ var init_Timeline = __esm({
45050
45225
  entity,
45051
45226
  isLoading = false,
45052
45227
  error,
45053
- className
45228
+ className,
45229
+ look = "vertical-spacious"
45054
45230
  }) => {
45055
45231
  const { t } = useTranslate();
45056
45232
  const entityData = Array.isArray(entity) ? entity : [];
@@ -45106,7 +45282,7 @@ var init_Timeline = __esm({
45106
45282
  }
45107
45283
  return /* @__PURE__ */ jsxRuntime.jsx(Card, { className: cn("p-6", className), children: /* @__PURE__ */ jsxRuntime.jsxs(VStack, { gap: "md", children: [
45108
45284
  title && /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "h5", weight: "semibold", children: title }),
45109
- /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: "relative", children: items.map((item, idx) => {
45285
+ /* @__PURE__ */ jsxRuntime.jsx(VStack, { gap: "none", className: cn("relative", lookStyles9[look]), children: items.map((item, idx) => {
45110
45286
  const status = item.status || "pending";
45111
45287
  const style = STATUS_STYLES3[status] || STATUS_STYLES3.pending;
45112
45288
  const ItemIcon = item.icon || style.icon;